OOFEM 3.0
Loading...
Searching...
No Matches
tr1_2d_cbs.h
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35#ifndef tr1_2d_cbs_h
36#define tr1_2d_cbs_h
37
38#include "cbselement.h"
39#include "spatiallocalizer.h"
43#include "primaryfield.h"
44//<RESTRICTED_SECTION>
45#include "leplic.h"
46//</RESTRICTED_SECTION>
47
49
50#define _IFT_TR1_2D_CBS_Name "tr1cbs"
52
53
54namespace oofem {
55class TimeStep;
56class Node;
57class Material;
58class GaussPoint;
59class IntArray;
60class FEI2dTrLin;
61class ParamKey;
62
69//<RESTRICTED_SECTION>
71//</RESTRICTED_SECTION>
72{
73protected:
75 //double a[3];
76 double b [ 3 ];
77 double c [ 3 ];
78 double area = 0.;
79
82
83public:
84 TR1_2D_CBS(int n, Domain * aDomain);
85
86 FEInterpolation *giveInterpolation() const override;
87
88 void computeConsistentMassMtrx(FloatMatrix &answer, TimeStep *tStep) override;
89 void computeDiagonalMassMtrx(FloatArray &answer, TimeStep *tStep) override;
90 void computeConvectionTermsI(FloatArray &answer, TimeStep *tStep) override;
91 void computeDiffusionTermsI(FloatArray &answer, TimeStep *tStep) override;
92 void computeDensityRhsVelocityTerms(FloatArray &answer, TimeStep *tStep) override;
93 void computeDensityRhsPressureTerms(FloatArray &answer, TimeStep *tStep) override;
94 void computePrescribedTractionPressure(FloatArray &answer, TimeStep *tStep) override;
96 void computePressureLhs(FloatMatrix &answer, TimeStep *tStep) override;
97 void computeCorrectionRhs(FloatArray &answer, TimeStep *tStep) override;
98 double computeCriticalTimeStep(TimeStep *tStep) override;
99
100 // definition
101 const char *giveClassName() const override { return "TR1_2D_CBS"; }
102 const char *giveInputRecordName() const override { return _IFT_TR1_2D_CBS_Name; }
103 MaterialMode giveMaterialMode() override { return _2dFlow; }
104 Element_Geometry_Type giveGeometryType() const override {return EGT_triangle_1;}
105
106
107 void giveDofManDofIDMask(int inode, IntArray &answer) const override;
108 int computeNumberOfDofs() override;
109 void initializeFrom(InputRecord &ir, int priority) override;
110 void giveInputRecord(DynamicInputRecord &input) override;
111 void updateYourself(TimeStep *tStep) override;
113 int checkConsistency() override;
114
115 void saveContext(DataStream &stream, ContextMode mode) override;
116 void restoreContext(DataStream &stream, ContextMode mode) override;
117
119
121 const FloatArray &coords, IntArray &dofId, ValueModeType mode,
122 TimeStep *tStep) override;
123
124 //<RESTRICTED_SECTION>
125 double computeLEPLICVolumeFraction(const FloatArray &n, const double p, LEPlic *matInterface, bool updFlag) override;
126 void formMaterialVolumePoly(Polygon &matvolpoly, LEPlic *matInterface,
127 const FloatArray &normal, const double p, bool updFlag) override;
128 void formVolumeInterfacePoly(Polygon &matvolpoly, LEPlic *matInterface,
129 const FloatArray &normal, const double p, bool updFlag) override;
130 double truncateMatVolume(const Polygon &matvolpoly, double &volume) override;
131 void giveElementCenter(LEPlic *mat_interface, FloatArray &center, bool upd) override;
132 void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag) override;
133 Element *giveElement() override { return this; }
134 double computeMyVolume(LEPlic *matInterface, bool updFlag) override;
135 double computeCriticalLEPlicTimeStep(TimeStep *tStep) override { return 1.e6; }
136 //</RESTRICTED_SECTION>
137
139 InternalStateType type, TimeStep *tStep) override;
140
142 void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap) override;
145
146 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
147 void printOutputAt(FILE *file, TimeStep *tStep) override;
148
149#ifdef __OOFEG
151 int node, TimeStep *tStep) override;
152 // Graphics output
153 void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override;
154 void drawScalar(oofegGraphicContext &gc, TimeStep *tStep) override;
155 //void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType) override {}
156#endif
157
158protected:
159 void computeGaussPoints() override;
160 void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override;
161};
162} // end namespace oofem
163#endif // tr1_2d_cbs_h
CBSElement(int n, Domain *aDomain)
Definition cbselement.C:55
FloatArray normal
Interface segment normal.
Definition leplic.h:67
double p
Line constant of line segment representing interface.
Definition leplic.h:65
SpatialLocalizerInterface(Element *element)
void giveDofManDofIDMask(int inode, IntArray &answer) const override
Definition tr1_2d_cbs.C:97
void drawScalar(oofegGraphicContext &gc, TimeStep *tStep) override
void computePressureLhs(FloatMatrix &answer, TimeStep *tStep) override
Calculates the pressure LHS.
Definition tr1_2d_cbs.C:572
void initializeFrom(InputRecord &ir, int priority) override
Definition tr1_2d_cbs.C:104
void giveElementCenter(LEPlic *mat_interface, FloatArray &center, bool upd) override
Computes the receiver center (in updated Lagrangian configuration).
Definition tr1_2d_cbs.C:952
static FEI2dTrLin interp
Definition tr1_2d_cbs.h:74
void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap) override
void computeDensityRhsPressureTerms(FloatArray &answer, TimeStep *tStep) override
Computes pressure terms on RHS for density equation.
Definition tr1_2d_cbs.C:549
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag) override
Assembles receiver volume.
Definition tr1_2d_cbs.C:911
void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep) override
void computeConsistentMassMtrx(FloatMatrix &answer, TimeStep *tStep) override
Definition tr1_2d_cbs.C:148
Interface * giveInterface(InterfaceType) override
Definition tr1_2d_cbs.C:637
const char * giveClassName() const override
Definition tr1_2d_cbs.h:101
FEInterpolation * giveInterpolation() const override
Definition tr1_2d_cbs.C:88
int SPRNodalRecoveryMI_giveNumberOfIP() override
void giveInputRecord(DynamicInputRecord &input) override
Definition tr1_2d_cbs.C:125
void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override
void computeDiagonalMassMtrx(FloatArray &answer, TimeStep *tStep) override
Definition tr1_2d_cbs.C:172
double computeLEPLICVolumeFraction(const FloatArray &n, const double p, LEPlic *matInterface, bool updFlag) override
Computes corresponding volume fraction to given interface position.
Definition tr1_2d_cbs.C:739
void saveContext(DataStream &stream, ContextMode mode) override
const char * giveInputRecordName() const override
Definition tr1_2d_cbs.h:102
Element * giveElement() override
Return number of receiver's element.
Definition tr1_2d_cbs.h:133
void computeCorrectionRhs(FloatArray &answer, TimeStep *tStep) override
Calculates the RHS of velocity correction step.
Definition tr1_2d_cbs.C:589
void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override
Computes deviatoric stress vector in given integration point and solution step from given total strai...
Definition tr1_2d_cbs.C:661
static ParamKey IPK_TR1_2D_CBS_vof
Definition tr1_2d_cbs.h:80
double computeCriticalTimeStep(TimeStep *tStep) override
Calculates critical time step.
Definition tr1_2d_cbs.C:706
TR1_2D_CBS(int n, Domain *aDomain)
Definition tr1_2d_cbs.C:75
void computeConvectionTermsI(FloatArray &answer, TimeStep *tStep) override
Definition tr1_2d_cbs.C:185
double truncateMatVolume(const Polygon &matvolpoly, double &volume) override
Truncates given material polygon to receiver.
Definition tr1_2d_cbs.C:894
double computeMyVolume(LEPlic *matInterface, bool updFlag) override
Computes the volume of receiver.
Definition tr1_2d_cbs.C:934
Element_Geometry_Type giveGeometryType() const override
Definition tr1_2d_cbs.h:104
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
void formVolumeInterfacePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag) override
Assembles receiver material polygon based solely on given interface line.
Definition tr1_2d_cbs.C:785
static ParamKey IPK_TR1_2D_CBS_pvof
Definition tr1_2d_cbs.h:81
void computePrescribedTractionPressure(FloatArray &answer, TimeStep *tStep) override
Computes prescribed pressure due to applied tractions.
Definition tr1_2d_cbs.C:453
int checkConsistency() override
Used to check consistency and initialize some element geometry data (area,b,c).
Definition tr1_2d_cbs.C:676
void computeGaussPoints() override
Definition tr1_2d_cbs.C:137
double computeCriticalLEPlicTimeStep(TimeStep *tStep) override
Computes critical time step.
Definition tr1_2d_cbs.h:135
MaterialMode giveMaterialMode() override
Definition tr1_2d_cbs.h:103
void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap) override
SPRPatchType SPRNodalRecoveryMI_givePatchType() override
void computeDensityRhsVelocityTerms(FloatArray &answer, TimeStep *tStep) override
Computes velocity terms on RHS for density equation.
Definition tr1_2d_cbs.C:373
void restoreContext(DataStream &stream, ContextMode mode) override
void computeNumberOfNodalPrescribedTractionPressureContributions(FloatArray &answer, TimeStep *tStep) override
Computes number of edges/sides with prescribed traction contributing to node with prescribed pressure...
Definition tr1_2d_cbs.C:523
void printOutputAt(FILE *file, TimeStep *tStep) override
int computeNumberOfDofs() override
Definition tr1_2d_cbs.C:91
void updateYourself(TimeStep *tStep) override
void formMaterialVolumePoly(Polygon &matvolpoly, LEPlic *matInterface, const FloatArray &normal, const double p, bool updFlag) override
Assembles the true element material polygon (takes receiver vof into accout).
Definition tr1_2d_cbs.C:753
int EIPrimaryFieldI_evaluateFieldVectorAt(FloatArray &answer, PrimaryField &pf, const FloatArray &coords, IntArray &dofId, ValueModeType mode, TimeStep *tStep) override
Definition tr1_2d_cbs.C:977
void computeDiffusionTermsI(FloatArray &answer, TimeStep *tStep) override
Definition tr1_2d_cbs.C:270
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
long ContextMode
Definition contextmode.h:43
InternalStateMode
Determines the mode of internal variable.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define _IFT_TR1_2D_CBS_Name
Definition tr1_2d_cbs.h:50

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011