OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mixedgradientpressureneumann.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 mixedgradientpressurecneumann_h
36 #define mixedgradientpressurecneumann_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_MixedGradientPressureNeumann_Name "mixedgradientpressureneumann"
49 
50 namespace oofem {
51 class MasterDof;
52 class Node;
53 class IntegrationRule;
54 class SparseMtrx;
55 class SparseLinearSystemNM;
56 class Element;
57 
92 {
93 protected:
100  double volGradient;
101 
103  double pressure;
104 
106  std :: unique_ptr< Node > sigmaDev;
109 
110 public:
117 
119  virtual ~MixedGradientPressureNeumann();
120 
126  virtual int giveNumberOfInternalDofManagers();
130  virtual DofManager *giveInternalDofManager(int i);
131 
133  virtual bcType giveType() const { return UnknownBT; }
134 
142  virtual IRResultType initializeFrom(InputRecord *ir);
143  virtual void giveInputRecord(DynamicInputRecord &input);
144 
145  virtual void scale(double s);
146 
147  virtual void computeFields(FloatArray &sigmaDev, double &vol, TimeStep *tStep);
148  virtual void computeTangents(FloatMatrix &Ed, FloatArray &Ep, FloatArray &Cd, double &Cp, TimeStep *tStep);
149 
150  virtual void setPrescribedPressure(double p) { pressure = p; }
151  virtual void setPrescribedDeviatoricGradientFromVoigt(const FloatArray &ddev);
152 
153  virtual void assembleVector(FloatArray &answer, TimeStep *tStep,
154  CharType type, ValueModeType mode,
155  const UnknownNumberingScheme &s, FloatArray *eNorm = NULL);
156 
157  virtual void assemble(SparseMtrx &answer, TimeStep *tStep,
158  CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale = 1.0);
159 
160  virtual void giveLocationArrays(std :: vector< IntArray > &rows, std :: vector< IntArray > &cols, CharType type,
161  const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s);
162 
163  virtual const char *giveClassName() const { return "MixedGradientPressureNeumann"; }
164  virtual const char *giveInputRecordName() const { return _IFT_MixedGradientPressureNeumann_Name; }
165 
166 protected:
168  void integrateDevTangent(FloatMatrix &answer, Element *e, int boundary);
170  void integrateVolTangent(FloatArray &answer, Element *e, int boundary);
171 
173  void fromDeviatoricBase2D(FloatArray &cartesian, FloatArray &deviatoric);
175  void fromDeviatoricBase3D(FloatArray &cartesian, FloatArray &deviatoric);
177  void fromDeviatoricBase2D(FloatMatrix &cartesian, FloatMatrix &deviatoric);
179  void fromDeviatoricBase3D(FloatMatrix &cartesian, FloatMatrix &deviatoric);
180 };
181 } // end namespace oofem
182 
183 #endif // mixedgradientpressurecneumann_h
virtual void setPrescribedPressure(double p)
Set prescribed pressure.
Class and object Domain.
Definition: domain.h:115
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
Unknown.
Definition: bctype.h:41
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Abstract base class for all finite elements.
Definition: element.h:145
Base class for dof managers.
Definition: dofmanager.h:113
Class implementing an array of integers.
Definition: intarray.h:61
bcType
Type representing the type of bc.
Definition: bctype.h:40
Applies a mean deviatoric shear rate and pressure (Neumann boundary condition).
double volGradient
The volumetric part of what was sent in (needed to return the difference).
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
FloatArray devGradient
Prescribed gradient in Voigt form.
std::unique_ptr< Node > sigmaDev
DOF-manager containing the unknown deviatoric stress.
virtual const char * giveInputRecordName() const
Class representing vector of real numbers.
Definition: floatarray.h:82
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
virtual bcType giveType() const
Not relevant for this boundary condition.
#define _IFT_MixedGradientPressureNeumann_Name
IntArray dev_id
Dof IDs for the lagrange multipliers in sigmaDev.
Class representing the a dynamic Input Record.
the oofem namespace is to define a context or scope in which all oofem names are defined.
General class for boundary condition that prolongates macroscopic fields to incompressible flow...
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