OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mixedgradientpressuredirichlet.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 mixedgradientpressuredirichlet_h
36 #define mixedgradientpressuredirichlet_h
37 
39 #include "boundarycondition.h"
40 #include "dof.h"
41 #include "bctype.h"
42 #include "valuemodetype.h"
43 #include "floatarray.h"
44 #include "floatmatrix.h"
45 
46 #include <memory>
47 
48 #define _IFT_MixedGradientPressureDirichlet_Name "mixedgradientpressuredirichlet"
49 
50 namespace oofem {
51 class MasterDof;
52 class Node;
53 class SparseMtrx;
54 class SparseLinearSystemNM;
55 
73 {
74 protected:
77 
80 
82  double pressure;
83 
85  std :: unique_ptr< Node > voldman;
86  int vol_id;
87 
89  std :: unique_ptr< Node > devdman;
91 
92  Dof *giveVolDof();
93 
94 public:
101 
104 
110  virtual int giveNumberOfInternalDofManagers();
114  virtual DofManager *giveInternalDofManager(int i);
115 
126  virtual IRResultType initializeFrom(InputRecord *ir);
127  virtual void giveInputRecord(DynamicInputRecord &input);
128 
129  virtual void scale(double s) {
130  devGradient.times(s);
131  pressure *= s;
132  }
133 
134  virtual void computeFields(FloatArray &stressDev, double &vol, TimeStep *tStep);
135  virtual void computeTangents(FloatMatrix &Ed, FloatArray &Ep, FloatArray &Cd, double &Cp, TimeStep *tStep);
136 
137  virtual void setPrescribedPressure(double p) { pressure = p; }
138  virtual void setPrescribedDeviatoricGradientFromVoigt(const FloatArray &ddev);
139 
144  virtual void setCenterCoordinate(const FloatArray &x) { centerCoord = x; }
146  virtual FloatArray &giveCenterCoordinate() { return centerCoord; }
147 
148  virtual void assembleVector(FloatArray &answer, TimeStep *tStep,
149  CharType type, ValueModeType mode,
150  const UnknownNumberingScheme &s, FloatArray *eNorms = NULL);
151 
152  virtual bool requiresActiveDofs() { return true; }
153  virtual bool isPrimaryDof(ActiveDof *dof);
154 
155  virtual double giveBcValue(Dof *dof, ValueModeType mode, TimeStep *tStep);
156  virtual bool hasBc(Dof *dof, TimeStep *tStep);
157 
159  bool isDevDof(Dof *dof);
160 
161  virtual int giveNumberOfMasterDofs(ActiveDof *dof);
162  virtual Dof *giveMasterDof(ActiveDof *dof, int mdof);
163  virtual void computeDofTransformation(ActiveDof *dof, FloatArray &masterContribs);
164 
165  double giveUnknown(double vol, const FloatArray &dev, ValueModeType mode, TimeStep *tStep, ActiveDof *dof);
166  virtual double giveUnknown(PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof);
167  virtual double giveUnknown(ValueModeType mode, TimeStep *tStep, ActiveDof *dof);
168 
169  virtual const char *giveClassName() const { return "MixedGradientPressureDirichlet"; }
170  virtual const char *giveInputRecordName() const { return _IFT_MixedGradientPressureDirichlet_Name; }
171 };
172 } // end namespace oofem
173 
174 #endif // mixedgradientpressuredirichlet_h
Class and object Domain.
Definition: domain.h:115
Abstract class representing field of primary variables (those, which are unknown and are typically as...
Definition: primaryfield.h:104
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual FloatArray & giveCenterCoordinate()
Returns the center coordinate.
FloatArray devGradient
Prescribed gradient in Voigt form.
Base class for dof managers.
Definition: dofmanager.h:113
Class implementing an array of integers.
Definition: intarray.h:61
std::unique_ptr< Node > devdman
DOF-manager containing the known deviatoric strain(rate).
#define _IFT_MixedGradientPressureDirichlet_Name
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
std::unique_ptr< Node > voldman
DOF-manager containing the unknown volumetric strain(rate).
Class representing "slave" degree of freedom with an active boundary condition.
Definition: activedof.h:48
Prescribes where is unknown, loaded by a pressure.
virtual void setPrescribedPressure(double p)
Set prescribed pressure.
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
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
CharType
Definition: chartype.h:87
Class representing the general Input Record.
Definition: inputrecord.h:101
Class representing the a dynamic Input Record.
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
virtual void setCenterCoordinate(const FloatArray &x)
Set the center coordinate.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
General class for boundary condition that prolongates macroscopic fields to incompressible flow...
Class representing solution step.
Definition: timestep.h:80
virtual void scale(double s)
Scales the receiver according to given value.

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