OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
tr1bubblestokes.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 #ifndef tr1bubblestokes_h
36 #define tr1bubblestokes_h
37 
38 #include "fmelement.h"
39 #include "zznodalrecoverymodel.h"
40 #include "spatiallocalizer.h"
41 #include "matresponsemode.h"
42 
43 #define _IFT_Tr1BubbleStokes_Name "tr1bubblestokes"
44 
45 namespace oofem {
46 class FEI2dTrLin;
47 class ElementDofManager;
48 
57 class Tr1BubbleStokes : public FMElement,
60 {
61 protected:
67  static IntArray edge_ordering [ 3 ];
68 
70  std :: unique_ptr< ElementDofManager > bubble;
71  // Coordinates associated with the bubble dofs.
72  //FloatArray bubbleCoord; // Assumed fixed at 0 for now (i.e. only linear geometry)
73 
74 public:
75  Tr1BubbleStokes(int n, Domain * d);
76  virtual ~Tr1BubbleStokes();
77 
78  virtual double computeVolumeAround(GaussPoint *gp);
79 
80  virtual void computeGaussPoints();
81 
82  virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep);
83  virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep);
84 
85  void computeInternalForcesVector(FloatArray &answer, TimeStep *tStep);
86  void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep);
87 
88  void computeExternalForcesVector(FloatArray &answer, TimeStep *tStep);
89  virtual void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep);
90  virtual void computeBoundarySurfaceLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true);
91 
92  virtual const char *giveClassName() const { return "Tr1BubbleStokes"; }
93  virtual const char *giveInputRecordName() const { return _IFT_Tr1BubbleStokes_Name; }
94  virtual MaterialMode giveMaterialMode() { return _2dFlow; }
95 
96  virtual int computeNumberOfDofs();
97 
98  virtual int giveNumberOfInternalDofManagers() const;
99  virtual DofManager *giveInternalDofManager(int i) const;
100  virtual void giveInternalDofManDofIDMask(int i, IntArray &answer) const;
101 
102  virtual FEInterpolation *giveInterpolation() const;
103  virtual FEInterpolation *giveInterpolation(DofIDItem id) const;
104 
105  virtual void giveDofManDofIDMask(int inode, IntArray &answer) const;
106 
107  virtual void updateYourself(TimeStep *tStep);
108 
110 
111  virtual void computeField(ValueModeType u, TimeStep *tStep, const FloatArray &coords, FloatArray &answer);
112 };
113 } // end namespace oofem
114 #endif // tr1bubblestokes_h
virtual void computeBoundarySurfaceLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global=true)
Computes the contribution of the given load at the given boundary surface in global coordinate system...
Class and object Domain.
Definition: domain.h:115
static FEI2dTrLin interp
Interpolation for pressure.
std::unique_ptr< ElementDofManager > bubble
The extra dofs from the bubble.
The element interface required by ZZNodalRecoveryModel.
virtual void computeLoadVector(FloatArray &answer, BodyLoad *load, CharType type, ValueModeType mode, TimeStep *tStep)
Computes the contribution of the given body load (volumetric).
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Class implementing element body load, acting over whole element volume (e.g., the dead weight)...
Definition: bodyload.h:49
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, TimeStep *tStep)
virtual FEInterpolation * giveInterpolation() const
#define _IFT_Tr1BubbleStokes_Name
Base class for dof managers.
Definition: dofmanager.h:113
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
void computeInternalForcesVector(FloatArray &answer, TimeStep *tStep)
static IntArray conservation_ordering
static IntArray edge_ordering[3]
Ordering of dofs on edges. Used to assemble edge loads.
Class representing a 2d triangular linear interpolation based on area coordinates.
Definition: fei2dtrlin.h:44
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
Definition: boundaryload.h:110
virtual const char * giveInputRecordName() const
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
void computeExternalForcesVector(FloatArray &answer, TimeStep *tStep)
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
virtual const char * giveClassName() const
Triangular element for Stokes flow using Bubble basis function.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
This abstract class represent a general base element class for fluid dynamic problems.
Definition: fmelement.h:54
virtual void computeField(ValueModeType u, TimeStep *tStep, const FloatArray &coords, FloatArray &answer)
Computes the unknown vector interpolated at the specified local coordinates.
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual int computeNumberOfDofs()
Computes or simply returns total number of element&#39;s local DOFs.
static IntArray momentum_ordering
Ordering of dofs in element. Used to assemble the element stiffness.
CharType
Definition: chartype.h:87
Class Interface.
Definition: interface.h:82
virtual void giveInternalDofManDofIDMask(int i, IntArray &answer) const
Returns internal dofmanager dof mask for node.
virtual int giveNumberOfInternalDofManagers() const
The spatial localizer element interface associated to spatial localizer.
virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
Computes characteristic vector of receiver of requested type in given time step.
virtual MaterialMode giveMaterialMode()
Returns material mode for receiver integration points.
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
Tr1BubbleStokes(int n, Domain *d)
virtual DofManager * giveInternalDofManager(int i) const
Returns i-th internal element dof manager of the receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80

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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011