OOFEM 3.0
Loading...
Searching...
No Matches
pfemelement2d.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// *** GENERAL 2D ELEMENT FOR FLUID DYNAMIC PROBLEMS SOLVED WITH PFEM METHOD ***
37// *****************************************************************************
38
39#ifndef pfemelement2d_h
40#define pfemelement2d_h
41
42
43#include "pfemelement.h"
44#include "femcmpnn.h"
45#include "domain.h"
46#include "floatmatrix.h"
47#include "material.h"
48
49
50
51#include "fei2dtrlin.h"
52
53namespace oofem {
54class TimeStep;
55class Node;
56class Material;
57class GaussPoint;
58class FloatMatrix;
59class FloatArray;
60class IntArray;
61
69{
70protected:
71
72public:
74 PFEMElement2d(int n, Domain *d);
76 virtual ~PFEMElement2d();
77
78 double computeCriticalTimeStep(TimeStep *tStep) override = 0;
79
80 const char *giveClassName() const override { return "PFEMElement2d"; }
81 Element_Geometry_Type giveGeometryType() const override { return EGT_triangle_1; }
82
83 void giveElementDofIDMask(IntArray &answer) const override = 0;
84 void giveDofManDofIDMask(int inode, IntArray &answer) const override = 0;
85 int computeNumberOfDofs() override = 0;
86 void initializeFrom(InputRecord &ir, int priority) override;
87 int checkConsistency() override;
88
90
91 virtual Element *giveElement() { return this; }
92
93#ifdef __OOFEG
95 int node, TimeStep *tStep) = 0;
96 // Graphics output
97 //virtual void drawYourself (oofegGraphicContext&);
98 //virtual void drawRawGeometry(oofegGraphicContext &);
99 //virtual void drawScalar(oofegGraphicContext &context);
100 //virtual void drawDeformedGeometry(oofegGraphicContext&, UnknownType) {}
101#endif
102
105
106protected:
107 void computeGaussPoints() override = 0;
108 void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override = 0;
109 void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep) override = 0;
110
111 void computeBMatrix(FloatMatrix &answer, GaussPoint *gp) override;
112 void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep) override; //K
113 void computePressureLaplacianMatrix(FloatMatrix &answer, TimeStep *tStep) override; //L
114 void computeDivergenceMatrix(FloatMatrix &answerx, TimeStep *tStep) override; //D
115 void computeGradientMatrix(FloatMatrix &answer, TimeStep *tStep) override; //G
116
117 void computePrescribedRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode) override;
118
120 void computeEdgeNMatrixAt(FloatMatrix &answer, int iedge, GaussPoint *gp);
122 void computeEgdeNVectorAt(FloatArray &answer, int iedge, GaussPoint *gp);
124 double computeEdgeVolumeAround(GaussPoint *gp, int iEdge);
126 void giveEdgeDofMapping(IntArray &answer, int iEdge) const;
127};
128} // end namespace oofem
129#endif // pfemelement_2d_h
int computeNumberOfDofs() override=0
void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Gives the mapping for degrees of freedom on an edge.
void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) override=0
Computes deviatoric stress vector in given integration point and solution step from given total strai...
virtual int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)=0
void computeEgdeNVectorAt(FloatArray &answer, int iedge, GaussPoint *gp)
Calculates the shape function vector on an edge.
void computeGaussPoints() override=0
PFEMElement2d(int n, Domain *d)
Constructor.
void computeDivergenceMatrix(FloatMatrix &answerx, TimeStep *tStep) override
Calculates the velocity divergence matrix.
const char * giveClassName() const override
FEInterpolation * giveVelocityInterpolation() override=0
Returns the interpolation for velocity.
virtual ~PFEMElement2d()
Destructor.
int checkConsistency() override
void initializeFrom(InputRecord &ir, int priority) override
Initializes receiver acording to object description stored in input record.
Element_Geometry_Type giveGeometryType() const override
void giveElementDofIDMask(IntArray &answer) const override=0
void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep) override=0
Calculates the divergence of the deviatoric stress.
virtual Element * giveElement()
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Calculates the volume around an edge.
Interface * giveInterface(InterfaceType) override=0
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep) override
Calculates the stiffness matrix.
double computeCriticalTimeStep(TimeStep *tStep) override=0
Calculates critical time step.
void computePressureLaplacianMatrix(FloatMatrix &answer, TimeStep *tStep) override
Calculates the pressure laplacian matrix.
FEInterpolation * givePressureInterpolation() override=0
Returns the interpolation for the pressure.
void computeEdgeNMatrixAt(FloatMatrix &answer, int iedge, GaussPoint *gp)
Calculates the shape function matrix on an edge.
void computePrescribedRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode) override
Calculates the prescribed velocity vector for the right hand side of the pressure equation.
void computeBMatrix(FloatMatrix &answer, GaussPoint *gp) override
Calculates the element shape function derivative matrix.
void giveDofManDofIDMask(int inode, IntArray &answer) const override=0
void computeGradientMatrix(FloatMatrix &answer, TimeStep *tStep) override
Calculates the pressure gradient matrix.
PFEMElement(int, Domain *)
Constructor.
Definition pfemelement.C:58
InternalStateMode
Determines the mode of internal variable.

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