OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
pfemnumberingschemes.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 pfemnumberingschemes_h
36 #define pfemnumberingschemes_h
37 
38 #include "unknownnumberingscheme.h"
39 #include "dof.h"
40 #include "domain.h"
41 #include "dofmanager.h"
42 
43 namespace oofem {
51 {
52 protected:
57  int neq;
59  int pres_neq;
62 
63 public:
67  virtual ~PressureNumberingScheme();
68 
72  virtual void init(Domain *domain, TimeStep *tStep);
73  virtual bool isDefault() const { return false; }
74  virtual int giveDofEquationNumber(Dof *dof) const;
75  virtual int giveRequiredNumberOfDomainEquation() const;
76 
78  virtual int giveTotalNumberOfEquations() const;
79 
81  virtual int giveTotalNumberOfPrescribedEquations() const;
82 
84  virtual void reset();
85 };
86 
93 {
94 protected:
96  int numEqs;
98  bool prescribed;
99 
100 public:
102  VelocityNumberingScheme(bool prescribed);
104  virtual ~VelocityNumberingScheme();
105 
107  void reset() { numEqs = 0; }
108  virtual bool isDefault() const { return !prescribed; }
109  virtual int giveDofEquationNumber(Dof *dof) const;
110  virtual int giveRequiredNumberOfDomainEquation() const { return numEqs; }
111 
113  int askNewEquationNumber() { return ++numEqs; }
115  Dof *giveDofToEquationNumber(Domain *d, int equationNumber);
116 };
117 
126 {
127 protected:
132  int neq;
133 
134 public:
138  virtual ~AuxVelocityNumberingScheme();
139 
141  virtual void reset() { neq = 0; }
142 
144  virtual void init(Domain *domain);
145 
146  virtual int giveDofEquationNumber(Dof *dof) const;
147  virtual int giveRequiredNumberOfDomainEquation() const;
148 };
149 } // end namespace oofem
150 #endif // pfemnumberingschemes_h
virtual ~PressureNumberingScheme()
Destructor.
Class and object Domain.
Definition: domain.h:115
Velocity numbering scheme for PFEM purposes.
Numbering scheme that takes into account only pressure DOFs in PFEM problems.
int pres_neq
Last given number of prescribed equation.
bool isInitialized
Flag controlling wether the numbering has been initialized or not.
Class implementing an array of integers.
Definition: intarray.h:61
void reset()
Resets the numbering in order to start numbering again from 1.
bool prescribed
prescribed equations or not
int askNewEquationNumber()
Asks new equation number.
virtual int giveTotalNumberOfEquations() const
Returns total number of equations.
virtual void reset()
Resets the numbering in order to start numbering again from 1.
virtual bool isDefault() const
Returns true, if receiver is the default engngModel equation numbering scheme; This is useful for som...
int numEqs
Last given equation number.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
virtual int giveRequiredNumberOfDomainEquation() const
Returns required number of domain equation.
virtual int giveDofEquationNumber(Dof *dof) const
Returns the equation number for corresponding DOF.
virtual void init()
Initializes the receiver, if necessary.
virtual int giveTotalNumberOfPrescribedEquations() const
Returns total number of prescribed equations.
int neq
Last given number of equation.
IntArray nodalPressureEquationNumbers
Container storing particular equation numbers for each node.
IntArray nodalAuxVelocityEquationNumbers
Nodal equation numbers are stored in an IntArray.
Numbering scheme for auxiliary velocity in PFEM problems.
virtual bool isDefault() const
Returns true, if receiver is the default engngModel equation numbering scheme; This is useful for som...
virtual int giveRequiredNumberOfDomainEquation() const
Returns required number of domain equation.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void reset()
Resets the numbering in order to start numbering again from 1.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.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:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011