OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
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 - 2013 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 
53 namespace oofem {
54 class TimeStep;
55 class Node;
56 class Material;
57 class GaussPoint;
58 class FloatMatrix;
59 class FloatArray;
60 class IntArray;
61 
68 class PFEMElement2d : public PFEMElement
69 {
70 protected:
71 
72 public:
74  PFEMElement2d(int n, Domain *d);
77 
78  virtual double computeCriticalTimeStep(TimeStep *tStep) = 0;
79 
80  virtual const char *giveClassName() const { return "PFEMElement2d"; }
81  virtual Element_Geometry_Type giveGeometryType() const { return EGT_triangle_1; }
82 
83  virtual void giveElementDofIDMask(IntArray &answer) const = 0;
84  virtual void giveDofManDofIDMask(int inode, IntArray &answer) const = 0;
85  virtual int computeNumberOfDofs() = 0;
87  virtual int checkConsistency();
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 
106 protected:
107  virtual void computeGaussPoints() = 0;
108  virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep) = 0;
109  virtual void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep) = 0;
110 
111  virtual void computeBMatrix(FloatMatrix &answer, GaussPoint *gp);
112  virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep); //K
113  virtual void computePressureLaplacianMatrix(FloatMatrix &answer, TimeStep *tStep); //L
114  virtual void computeDivergenceMatrix(FloatMatrix &answerx, TimeStep *tStep); //D
115  virtual void computeGradientMatrix(FloatMatrix &answer, TimeStep *tStep); //G
116 
117  void computePrescribedRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode);
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
virtual FEInterpolation * givePressureInterpolation()=0
Returns the interpolation for the pressure.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual FEInterpolation * giveVelocityInterpolation()=0
Returns the interpolation for velocity.
virtual Element * giveElement()
Definition: pfemelement2d.h:91
virtual int checkConsistency()
Performs consistency check.
Definition: pfemelement2d.C:77
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
Calculates the stiffness matrix.
~PFEMElement2d()
Destructor.
Definition: pfemelement2d.C:66
Class and object Domain.
Definition: domain.h:115
Element_Geometry_Type
Enumerative type used to classify element geometry Possible values are: EGT_point - point in space EG...
virtual int giveInternalStateAtNode(FloatArray &answer, InternalStateType type, InternalStateMode mode, int node, TimeStep *tStep)=0
Returns internal state variable (like stress,strain) at node of element in Reduced form...
virtual Interface * giveInterface(InterfaceType)=0
Interface requesting service.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
void computePrescribedRhsVector(FloatArray &answer, TimeStep *tStep, ValueModeType mode)
Calculates the prescribed velocity vector for the right hand side of the pressure equation...
Abstract base class for all finite elements.
Definition: element.h:145
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void computeDeviatoricStress(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)=0
Computes deviatoric stress vector in given integration point and solution step from given total strai...
This abstract class represent a general base element class for fluid dynamic problems solved using PF...
Definition: pfemelement.h:66
virtual void computePressureLaplacianMatrix(FloatMatrix &answer, TimeStep *tStep)
Calculates the pressure laplacian matrix.
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
virtual int computeNumberOfDofs()=0
Computes or simply returns total number of element's local DOFs.
virtual void computeGradientMatrix(FloatMatrix &answer, TimeStep *tStep)
Calculates the pressure gradient matrix.
virtual const char * giveClassName() const
Definition: pfemelement2d.h:80
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Calculates the volume around an edge.
virtual void giveElementDofIDMask(IntArray &answer) const =0
Returns element dof mask for node.
virtual Element_Geometry_Type giveGeometryType() const
Returns the element geometry type.
Definition: pfemelement2d.h:81
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver acording to object description stored in input record.
Definition: pfemelement2d.C:71
virtual void computeDivergenceMatrix(FloatMatrix &answerx, TimeStep *tStep)
Calculates the velocity divergence matrix.
Class representing vector of real numbers.
Definition: floatarray.h:82
void computeEgdeNVectorAt(FloatArray &answer, int iedge, GaussPoint *gp)
Calculates the shape function vector on an edge.
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual void computeBMatrix(FloatMatrix &answer, GaussPoint *gp)
Calculates the element shape function derivative matrix.
Definition: pfemelement2d.C:84
virtual double computeCriticalTimeStep(TimeStep *tStep)=0
Calculates critical time step.
Class representing the general Input Record.
Definition: inputrecord.h:101
void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Gives the mapping for degrees of freedom on an edge.
Class Interface.
Definition: interface.h:82
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const =0
Returns dofmanager dof mask for node.
virtual void computeDeviatoricStressDivergence(FloatArray &answer, TimeStep *tStep)=0
Calculates the divergence of the deviatoric stress.
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
the oofem namespace is to define a context or scope in which all oofem names are defined.
void computeEdgeNMatrixAt(FloatMatrix &answer, int iedge, GaussPoint *gp)
Calculates the shape function matrix on an edge.
virtual void computeGaussPoints()=0
Initializes the array of integration rules member variable.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
PFEMElement2d(int n, Domain *d)
Constructor.
Definition: pfemelement2d.C:61
Class representing solution step.
Definition: timestep.h:80
This class is the implementation of general 2d element with arbitrary interpolation of velocity and p...
Definition: pfemelement2d.h:68
InternalStateMode
Determines the mode of internal variable.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011