OOFEM 3.0
Loading...
Searching...
No Matches
tr1_2d_supg2.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_supg2_h
36#define tr1_2d_supg2_h
37
38#include "tr1_2d_supg.h"
39#include "spatiallocalizer.h"
43#include "leplic.h"
44
45#define _IFT_TR1_2D_SUPG2_Name "tr1supg2"
46
47namespace oofem {
66{
67protected:
73 std::vector< FloatArray > vcoords [ 2 ];
74
80 int mat [ 2 ];
85 std :: unique_ptr< IntegrationRule > defaultIRule;
86
87public:
88 TR1_2D_SUPG2(int n, Domain * d);
89
90 void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep) override;
91 void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep) override;
92 void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep) override;
93 void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep) override;
94 void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep) override;
95 void computePressureTerm_MB(FloatMatrix &answer, TimeStep *tStep) override;
96 void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep) override;
97 void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep) override;
98 void computeAdvectionTerm_MC(FloatArray &answer, TimeStep *tStep) override;
99 void computeAdvectionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep) override;
101 answer.resize(3, 6);
102 answer.zero();
103 }
104 void computeDiffusionTerm_MC(FloatArray &answer, TimeStep *tStep) override {
105 answer.resize(3);
106 answer.zero();
107 }
108 void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep) override;
109 void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep) override;
110 void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep) override;
111 void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep) override;
112
113 void updateStabilizationCoeffs(TimeStep *tStep) override;
115 double computeCriticalTimeStep(TimeStep *tStep) override;
116
117 // definition
118 const char *giveClassName() const override { return "TR1_2D_SUPG2"; }
119 const char *giveInputRecordName() const override { return _IFT_TR1_2D_SUPG2_Name; }
120
121 void giveDofManDofIDMask(int inode, IntArray &answer) const override;
122 int computeNumberOfDofs() override;
123 void initializeFrom(InputRecord &ir, int priority) override;
124 void giveInputRecord(DynamicInputRecord &input) override;
125 void updateYourself(TimeStep *tStep) override;
126
127 void saveContext(DataStream &stream, ContextMode mode) override;
128 void restoreContext(DataStream &stream, ContextMode mode) override;
129
131
133 const FloatArray &coords, IntArray &dofId, ValueModeType mode,
134 TimeStep *tStep) override;
135
136 double computeLEPLICVolumeFraction(const FloatArray &n, const double p, LEPlic *matInterface, bool updFlag) override;
137 void formMaterialVolumePoly(Polygon &matvolpoly, LEPlic *matInterface,
138 const FloatArray &normal, const double p, bool updFlag) override;
139 void formVolumeInterfacePoly(Polygon &matvolpoly, LEPlic *matInterface,
140 const FloatArray &normal, const double p, bool updFlag) override;
141 double truncateMatVolume(const Polygon &matvolpoly, double &volume) override;
142 void giveElementCenter(LEPlic *mat_interface, FloatArray &center, bool updFlag) override;
143 void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag) override;
144 Element *giveElement() override { return this; }
145 double computeMyVolume(LEPlic *matInterface, bool updFlag) override;
146
148 InternalStateType type, TimeStep *tStep) override;
149
151 void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap) override;
154
155 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
156 int giveDefaultIntegrationRule() const override { return 0; }
158
159
160
161#ifdef __OOFEG
163 int node, TimeStep *tStep) override;
164 // Graphics output
165 void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override;
166 void drawScalar(oofegGraphicContext &gc, TimeStep *tStep) override;
167 //void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType) override {}
168#endif
169
170 void printOutputAt(FILE *file, TimeStep *tStep) override;
171
172protected:
173 void computeGaussPoints() override;
174 void postInitialize() override;
175 void computeDeviatoricStress(FloatArray &answer, const FloatArray &eps, GaussPoint *gp, TimeStep *tStep) override;
176 void computeTangent(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) override;
177 void computeNVector(FloatArray &answer, GaussPoint *gp);
178 void updateVolumePolygons(Polygon &referenceFluidPoly, Polygon &secondFluidPoly, int &rfPoints, int &sfPoints,
179 const FloatArray &normal, const double p, bool updFlag);
180 double computeVolumeAroundID(GaussPoint *gp, integrationDomain id, const std::vector< FloatArray > &idpoly);
182 Material *_giveMaterial(int indx) { return domain->giveMaterial(mat [ indx ]); }
183};
184} // end namespace oofem
185#endif // tr1_2d_supg2_h
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition femcmpnn.h:79
void resize(Index s)
Definition floatarray.C:94
void zero()
Zeroes all coefficients of receiver.
Definition floatarray.C:683
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void zero()
Zeroes all coefficient of receiver.
FloatArray normal
Interface segment normal.
Definition leplic.h:67
double p
Line constant of line segment representing interface.
Definition leplic.h:65
double computeVolumeAroundID(GaussPoint *gp, integrationDomain id, const std::vector< FloatArray > &idpoly)
void updateVolumePolygons(Polygon &referenceFluidPoly, Polygon &secondFluidPoly, int &rfPoints, int &sfPoints, const FloatArray &normal, const double p, bool updFlag)
Interface * giveInterface(InterfaceType) override
void computeAccelerationTerm_MC(FloatMatrix &answer, TimeStep *tStep) override
void computeBCRhsTerm_MC(FloatArray &answer, TimeStep *tStep) override
double computeLEPLICVolumeFraction(const FloatArray &n, const double p, LEPlic *matInterface, bool updFlag) override
Computes corresponding volume fraction to given interface position.
int EIPrimaryFieldI_evaluateFieldVectorAt(FloatArray &answer, PrimaryField &pf, const FloatArray &coords, IntArray &dofId, ValueModeType mode, TimeStep *tStep) override
void computeLinearAdvectionTerm_MC(FloatMatrix &answer, TimeStep *tStep) override
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep) override
void printOutputAt(FILE *file, TimeStep *tStep) override
void saveContext(DataStream &stream, ContextMode mode) override
void computeDeviatoricStress(FloatArray &answer, const FloatArray &eps, GaussPoint *gp, TimeStep *tStep) override
void initializeFrom(InputRecord &ir, int priority) override
int SPRNodalRecoveryMI_giveNumberOfIP() override
void computeDiffusionTerm_MC(FloatArray &answer, TimeStep *tStep) override
void formMyVolumePoly(Polygon &myPoly, LEPlic *mat_interface, bool updFlag) override
Assembles receiver volume.
void updateYourself(TimeStep *tStep) override
void drawScalar(oofegGraphicContext &gc, TimeStep *tStep) override
void computeDiffusionTerm_MB(FloatArray &answer, TimeStep *tStep) override
double truncateMatVolume(const Polygon &matvolpoly, double &volume) override
Truncates given material polygon to receiver.
void computeLSICStabilizationTerm_MB(FloatMatrix &answer, TimeStep *tStep) override
void computePressureTerm_MC(FloatMatrix &answer, TimeStep *tStep) override
std ::unique_ptr< IntegrationRule > defaultIRule
void computeAccelerationTerm_MB(FloatMatrix &answer, TimeStep *tStep) override
std::vector< FloatArray > vcoords[2]
int computeNumberOfDofs() override
void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap) override
void updateElementForNewInterfacePosition(TimeStep *tStep) override
Element * giveElement() override
Return number of receiver's element.
const char * giveInputRecordName() const override
const char * giveClassName() const override
void restoreContext(DataStream &stream, ContextMode mode) override
double computeMyVolume(LEPlic *matInterface, bool updFlag) override
Computes the volume of receiver.
void computeAdvectionTerm_MB(FloatArray &answer, TimeStep *tStep) override
void computeAdvectionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep) override
void updateStabilizationCoeffs(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.
void giveElementCenter(LEPlic *mat_interface, FloatArray &center, bool updFlag) override
Computes the receiver center (in updated Lagrangian configuration).
void computePressureTerm_MB(FloatMatrix &answer, TimeStep *tStep) override
void computeAdvectionTerm_MC(FloatArray &answer, TimeStep *tStep) override
Material * _giveMaterial(int indx)
void giveInputRecord(DynamicInputRecord &input) 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).
void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap) override
void postInitialize() override
Performs post initialization steps.
IntegrationRule * giveDefaultIntegrationRulePtr() override
void giveDofManDofIDMask(int inode, IntArray &answer) const override
void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) override
void computeAdvectionDerivativeTerm_MB(FloatMatrix &answer, TimeStep *tStep) override
TR1_2D_SUPG2(int n, Domain *d)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
void computeNVector(FloatArray &answer, GaussPoint *gp)
void computeDiffusionDerivativeTerm_MB(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep) override
void computeGaussPoints() override
void computeDiffusionDerivativeTerm_MC(FloatMatrix &answer, TimeStep *tStep) override
void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep) override
int giveDefaultIntegrationRule() const override
void computeBCRhsTerm_MB(FloatArray &answer, TimeStep *tStep) override
SPRPatchType SPRNodalRecoveryMI_givePatchType() override
void computeTangent(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) override
double computeCriticalTimeStep(TimeStep *tStep) override
Computes the critical time increment.
TR1_2D_SUPG(int n, Domain *d)
Definition tr1_2d_supg.C:79
long ContextMode
Definition contextmode.h:43
InternalStateMode
Determines the mode of internal variable.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define _IFT_TR1_2D_SUPG2_Name

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