OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mixedgradientpressureweakperiodic.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_MixedGradientPressureWeakPeriodic_Name "mixedgradientpressureweakperiodic"
49 #define _IFT_MixedGradientPressureWeakPeriodic_order "order"
50 
51 namespace oofem {
52 class MasterDof;
53 class Node;
54 class IntegrationRule;
55 class SparseMtrx;
56 class SparseLinearSystemNM;
57 class Element;
58 
65 {
66 protected:
73  double volGradient;
74 
76  double pressure;
77 
79  int order;
80 
82  std :: unique_ptr< Node > voldman;
84 
86  std :: unique_ptr< Node > tractionsdman;
88 
89 public:
96 
99 
104  virtual int giveNumberOfInternalDofManagers();
108  virtual DofManager *giveInternalDofManager(int i);
109 
111  virtual bcType giveType() const { return UnknownBT; }
112 
120  virtual IRResultType initializeFrom(InputRecord *ir);
121  virtual void giveInputRecord(DynamicInputRecord &input);
122 
123  virtual void scale(double s);
124 
125  virtual void computeFields(FloatArray &sigmaDev, double &vol, TimeStep *tStep);
126  void computeStress(FloatArray &sigmaDev, FloatArray &tractions, double rve_size);
127  virtual void computeTangents(FloatMatrix &Ed, FloatArray &Ep, FloatArray &Cd, double &Cp, TimeStep *tStep);
128 
129  virtual void setPrescribedPressure(double p) { pressure = p; }
130  virtual void setPrescribedDeviatoricGradientFromVoigt(const FloatArray &ddev);
131 
132  virtual void assembleVector(FloatArray &answer, TimeStep *tStep,
133  CharType type, ValueModeType mode,
134  const UnknownNumberingScheme &s, FloatArray *eNorm = NULL);
135 
136  virtual void assemble(SparseMtrx &answer, TimeStep *tStep,
137  CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale = 1.0);
138 
139  virtual void giveLocationArrays(std :: vector< IntArray > &rows, std :: vector< IntArray > &cols, CharType type,
140  const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s);
141 
142  virtual const char *giveClassName() const { return "MixedGradientPressureWeakPeriodic"; }
143  virtual const char *giveInputRecordName() const { return _IFT_MixedGradientPressureWeakPeriodic_Name; }
144 
145 protected:
146  void integrateTractionVelocityTangent(FloatMatrix &answer, Element *el, int boundary);
147  void integrateTractionXTangent(FloatMatrix &answer, Element *el, int boundary);
148  void integrateTractionDev(FloatArray &answer, Element *el, int boundary, const FloatMatrix &ddev);
149  void constructMMatrix(FloatMatrix &mMatrix, FloatArray &coords, FloatArray &normal);
150  void evaluateTractionBasisFunctions(FloatArray &answer, const FloatArray &coords);
151  void constructFullMatrixForm(FloatMatrix &d, const FloatArray &d_voigt) const;
152 };
153 } // end namespace oofem
154 
155 #endif // mixedgradientpressurecneumann_h
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
std::unique_ptr< Node > tractionsdman
DOF-manager containing the unknown tractions (Lagrange mult. for micro-periodic velocity) ...
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
#define _IFT_MixedGradientPressureWeakPeriodic_Name
virtual void setPrescribedPressure(double p)
Set prescribed pressure.
bcType
Type representing the type of bc.
Definition: bctype.h:40
double volGradient
The volumetric part of what was sent in (needed to return the difference).
Applies a mean deviatoric shear rate and pressure (Neumann boundary condition) in a weakly periodic w...
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 gradient (always exactly one dof).
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
Class representing the a dynamic Input Record.
virtual bcType giveType() const
Not relevant for this boundary condition.
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