OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
rvestokesflow.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 rvestokesflow_h
36 #define rvestokesflow_h
37 
38 #include "floatarray.h"
39 #include "floatmatrix.h"
40 #include "transportmaterial.h"
42 
43 #include <memory>
44 
45 #define _IFT_RVEStokesFlow_Name "rvestokesflow"
46 #define _IFT_RVEStokesFlow_fileName "file"
47 #define _IFT_RVEStokesFlow_bctype "bctype"
48 #define _IFT_RVEStokesFlow_supressoutput "supressoutput"
49 
50 namespace oofem {
58 {
59 protected:
61  std :: unique_ptr< StokesFlowVelocityHomogenization > rve;
62 
63 public:
64  RVEStokesFlowMaterialStatus(int n, Domain * d, GaussPoint * g, const std :: string &inputfile);
65 
67 
68  void setTimeStep(TimeStep *tStep);
69 
70  virtual void initTempStatus();
71 
72  virtual void updateYourself(TimeStep *tStep);
73 
74  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
75  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
76 
79  void letTempTangentMatrixBe(const FloatMatrix &K) { temp_TangentMatrix = K; }
80 
81  StokesFlowVelocityHomogenization *giveRVE() { return rve.get(); }
82 
83  bool oldTangent;
84 
85  virtual const char *giveClassName() const { return "RVEStokesFlowMaterialStatus"; }
86 };
87 
88 
100 {
101 private:
102  static int n;
103  std :: string rveFilename;
104  std :: string rveLogFilename;
105 
107 
108  void suppressStdout();
109  void enableStdout();
110 
111 public:
112  RVEStokesFlow(int n, Domain * d);
113 
114  virtual ~RVEStokesFlow() { }
115 
117 
118  virtual void giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep);
119  virtual void giveCharacteristicMatrix(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep);
120  virtual double giveCharacteristicValue(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) { return 0.0; }
121 
122  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
123 
124  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
125 
126  virtual const char *giveClassName() const { return "RVEStokesFlow"; }
127  virtual const char *giveInputRecordName() const { return _IFT_RVEStokesFlow_Name; }
128 };
129 }
130 
131 #endif // rvestokesflow_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual const char * giveClassName() const
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
Material class using an external .in file as a description of the substructure of a transport problem...
Definition: rvestokesflow.h:99
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
const FloatMatrix & giveTempTangentMatrix()
Definition: rvestokesflow.h:78
const FloatMatrix & giveTangentMatrix()
Definition: rvestokesflow.h:77
void letTempTangentMatrixBe(const FloatMatrix &K)
Definition: rvestokesflow.h:79
This class implements a transport material status information.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
Material status class for the RVEStokesFlow class.
Definition: rvestokesflow.h:57
FloatArray field
Vector containing the last equilibrated field. The physical meaning corresponds to temperature...
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Abstract base class representing a material status information.
Definition: matstatus.h:84
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Class representing vector of real numbers.
Definition: floatarray.h:82
void setTimeStep(TimeStep *tStep)
Definition: rvestokesflow.C:91
#define _IFT_RVEStokesFlow_Name
Definition: rvestokesflow.h:45
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
Class for using the stokes flow class as an rve/constitutive model.
virtual const char * giveClassName() const
Definition: rvestokesflow.h:85
Class representing the general Input Record.
Definition: inputrecord.h:101
Abstract base class for all constitutive models for transport problems.
RVEStokesFlowMaterialStatus(int n, Domain *d, GaussPoint *g, const std::string &inputfile)
Definition: rvestokesflow.C:54
StokesFlowVelocityHomogenization * giveRVE()
Definition: rvestokesflow.h:81
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual double giveCharacteristicValue(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the characteristic value of receiver in given integration point, respecting its history...
virtual const char * giveInputRecordName() const
the oofem namespace is to define a context or scope in which all oofem names are defined.
std::string rveLogFilename
Class representing integration point in finite element program.
Definition: gausspoint.h:93
std::unique_ptr< StokesFlowVelocityHomogenization > rve
Definition: rvestokesflow.h:61
Class representing solution step.
Definition: timestep.h:80
std::string rveFilename

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