OOFEM 3.0
Loading...
Searching...
No Matches
tr1_2d_pfem.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// ***************************************************************************************
36// *** 2D LINEAR TRIANGULAR ELEMENT FOR FLUID DYNAMIC PROBLEMS SOLVED WITH PFEM METHOD ***
37// ***************************************************************************************
38
39#ifndef tr1_2d_pfem_h
40#define tr1_2d_pfem_h
41
42
43#include "pfemelement2d.h"
44#include "femcmpnn.h"
45#include "domain.h"
46#include "floatmatrix.h"
47#include "fei2dtrlin.h"
48
50
51#define _IFT_TR1_2D_PFEM_Name "tr1pfem"
53
54namespace oofem {
55class TimeStep;
56class Node;
57class Material;
58class GaussPoint;
59class FloatMatrix;
60class FloatArray;
61class IntArray;
62
69{
70protected:
71 double b [ 3 ];
72 double c [ 3 ];
73 double area;
74
79
80 static IntArray edge_ordering [ 3 ];
81
86
87public:
98 TR1_2D_PFEM(int n, Domain *aDomain, int particle1, int particle2, int particle3, int mat, int cs);
100 virtual ~TR1_2D_PFEM();
101
102 void computeDiagonalMassMtrx(FloatArray &answer, TimeStep *tStep) override;
103 void computeDiagonalMassMtrx(FloatMatrix &answer, TimeStep *tStep) override;
104
105 double computeCriticalTimeStep(TimeStep *tStep) override;
106
107 const char *giveClassName() const override { return "TR1_2D_PFEM"; }
108 const char *giveInputRecordName() const override { return _IFT_TR1_2D_PFEM_Name; }
109
110 Element_Geometry_Type giveGeometryType() const override { return EGT_triangle_1; }
111
112 void giveElementDofIDMask(IntArray &answer) const override;
113
114 void giveDofManDofIDMask(int inode, IntArray &answer) const override;
115 int computeNumberOfDofs() override;
116 void initializeFrom(InputRecord &ir, int priority) override;
117 int checkConsistency() override;
118
119 double computeVolumeAround(GaussPoint *gp) override;
120
122
123 void saveContext(DataStream &stream, ContextMode mode) override;
124 void restoreContext(DataStream &stream, ContextMode mode) override;
125
126 Element *giveElement() override { return this; }
127
128#ifdef __OOFEG
130 int node, TimeStep *atTime) override;
131 // Graphics output
132 //void drawYourself(oofegGraphicContext&) override;
133 void drawRawGeometry(oofegGraphicContext &) override;
134 void drawScalar(oofegGraphicContext &context) override;
135 //void drawDeformedGeometry(oofegGraphicContext&, UnknownType) override {}
136#endif
137
140
143
144 const IntArray &giveVelocityDofMask() const override
145 {
146 return this->velocityDofMask;
147 }
148 const IntArray &givePressureDofMask() const override
149 {
150 return this->pressureDofMask;
151 }
152
153protected:
154 void computeGaussPoints() override;
155 void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override;
156
157 void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep) override;
158
159 void computeBodyLoadVectorAt(FloatArray &answer, BodyLoad *load, TimeStep *tStep, ValueModeType mode) override;
160 void computeEdgeBCSubVectorAt(FloatArray &answer, Load *load, int iEdge, TimeStep *tStep) ;
161};
162} // end namespace oofem
163#endif // tr1_2d_pfem_h
PFEMElement2d(int n, Domain *d)
Constructor.
virtual ~TR1_2D_PFEM()
Destructor.
Definition tr1_2d_pfem.C:93
void drawRawGeometry(oofegGraphicContext &) override
FEInterpolation * giveInterpolation() const override
const IntArray & giveVelocityDofMask() const override
Returns mask of velocity Dofs.
static IntArray velocityDofMask
Mask of velocity Dofs.
Definition tr1_2d_pfem.h:83
FEInterpolation * giveVelocityInterpolation() override
Returns the interpolation for velocity.
const IntArray & givePressureDofMask() const override
Returns mask of pressure Dofs.
void computeBodyLoadVectorAt(FloatArray &answer, BodyLoad *load, TimeStep *tStep, ValueModeType mode) override
Interface * giveInterface(InterfaceType) override
Element * giveElement() override
FEInterpolation * givePressureInterpolation() override
Returns the interpolation for the pressure.
void computeEdgeBCSubVectorAt(FloatArray &answer, Load *load, int iEdge, TimeStep *tStep)
void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override
Computes deviatoric stress vector in given integration point and solution step from given total strai...
double computeCriticalTimeStep(TimeStep *tStep) override
Calculates critical time step.
void restoreContext(DataStream &stream, ContextMode mode) override
static FEI2dTrLin pressureInterpolation
Interpolation for pressure unknowns.
Definition tr1_2d_pfem.h:78
void initializeFrom(InputRecord &ir, int priority) override
Initializes receiver acording to object description stored in input record.
static IntArray pressureDofMask
Mask of pressure Dofs.
Definition tr1_2d_pfem.h:85
const char * giveInputRecordName() const override
TR1_2D_PFEM(int n, Domain *aDomain, int particle1, int particle2, int particle3, int mat, int cs)
Definition tr1_2d_pfem.C:78
void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep) override
Calculates the divergence of the deviatoric stress.
void computeGaussPoints() override
void drawScalar(oofegGraphicContext &context) override
void giveDofManDofIDMask(int inode, IntArray &answer) const override
static FEI2dTrLin velocityInterpolation
Interpolation for velocity unknowns.
Definition tr1_2d_pfem.h:76
void saveContext(DataStream &stream, ContextMode mode) override
const char * giveClassName() const override
Element_Geometry_Type giveGeometryType() const override
FEInterpolation * giveInterpolation(DofIDItem id) const override
int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *atTime) override
void computeDiagonalMassMtrx(FloatArray &answer, TimeStep *tStep) override
int computeNumberOfDofs() override
Definition tr1_2d_pfem.C:98
void giveElementDofIDMask(IntArray &answer) const override
static IntArray edge_ordering[3]
Definition tr1_2d_pfem.h:80
int checkConsistency() override
double computeVolumeAround(GaussPoint *gp) override
long ContextMode
Definition contextmode.h:43
InternalStateMode
Determines the mode of internal variable.
#define _IFT_TR1_2D_PFEM_Name
Definition tr1_2d_pfem.h:51

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