38 #include "../fm/stokesflowvelocityhomogenization.h" 57 OOFEM_LOG_INFO(
"************************** Instanciating microproblem from file %s\n", inputfile.c_str() );
63 if ( dynamic_cast< StokesFlowVelocityHomogenization* >(e) ) {
64 this->
rve.reset( dynamic_cast< StokesFlowVelocityHomogenization* >(e) );
70 std :: ostringstream name;
71 name << this->
rve->giveOutputBaseFileName() <<
"-gp" << n;
75 this->
rve->letOutputBaseFileNameBe( name.str() );
78 this->
rve->checkProblemConsistency();
79 this->
rve->initMetaStepAttributes( this->
rve->giveMetaStep(1) );
80 this->
rve->giveNextStep();
83 OOFEM_LOG_INFO(
"************************** Microproblem at %p instanciated \n",
rve.get());
111 this->
rve->updateYourself(tStep);
112 this->
rve->terminate(tStep);
170 case IST_PressureGradient:
173 case IST_TangentNorm:
181 answer.
at(1) = temp.
at(1, 1);
182 answer.
at(2) = temp.
at(1, 2);
183 answer.
at(3) = temp.
at(2, 1);
184 answer.
at(4) = temp.
at(2, 2);
199 OOFEM_LOG_DEBUG(
"\n****** Enter giveFluxVector ********************** Element number %u, Gauss point %u\n",
205 OOFEM_LOG_DEBUG(
"Solve RVE problem for macroscale pressure gradient gradP=[%f, %f, %f]\n ",
210 status->setTimeStep(tStep);
214 OOFEM_LOG_DEBUG(
"Pressure gradient gradP=[%f %f] yields velocity vector [%f %f]\n", grad.
at(1), grad.
at(2), answer.
at(1), answer.
at(2) );
217 status->setTempGradient(grad);
218 status->setTempFlux(answer);
219 status->oldTangent =
true;
221 OOFEM_LOG_DEBUG(
"****** Exit giveFluxVector **************************************** \n");
232 OOFEM_LOG_DEBUG(
"\n****** Enter giveDeviatoricStiffnessMatrix **********************\n");
245 OOFEM_LOG_DEBUG(
"****** Exit giveDeviatoricStiffnessMatrix **************************************** \n");
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
FloatMatrix tangentMatrix
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
void copySubVector(const FloatArray &src, int si)
Copy the given vector as sub-vector to receiver.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
double & at(int i)
Coefficient access function.
int giveGlobalNumber() const
const FloatMatrix & giveTempTangentMatrix()
const FloatMatrix & giveTangentMatrix()
void clear()
Clears receiver (zero size).
void letTempTangentMatrixBe(const FloatMatrix &K)
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
double giveTargetTime()
Returns target time.
bool isParallel() const
Returns true if receiver in parallel mode.
void setTime(double newt)
Sets target and intrinsic time to be equal.
void setTimeIncrement(double newDt)
Sets solution step time increment.
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
Element * giveElement()
Returns corresponding element to receiver.
This class implements a transport material status information.
#define OOFEM_LOG_DEBUG(...)
MatResponseMode
Describes the character of characteristic material matrix.
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
double giveTimeIncrement()
Returns solution step associated time increment.
void computeSeepage(FloatArray &v, TimeStep *tStep)
Computes the mean velocity and pressure gradient.
void applyPressureGradient(const FloatArray &grad)
EngngModel * InstanciateProblem(DataReader &dr, problemMode mode, int contextFlag, EngngModel *_master, bool parallelFlag)
Instanciates the new problem.
const FloatArray & giveFlux()
Returns last flux.
int giveNumber()
Returns receiver's number.
#define OOFEM_LOG_INFO(...)
#define _IFT_RVEStokesFlow_supressoutput
Material status class for the RVEStokesFlow class.
int giveNumber()
Returns number of receiver.
RVEStokesFlow(int n, Domain *d)
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual ~RVEStokesFlowMaterialStatus()
double at(int i, int j) const
Coefficient access function.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
void computeTangent(FloatMatrix &answer, TimeStep *tStep)
Abstract base class representing a material status information.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Class representing vector of real numbers.
void setTimeStep(TimeStep *tStep)
Implementation of matrix containing floating point numbers.
double computeFrobeniusNorm() const
Computes the Frobenius norm of the receiver.
virtual void giveFluxVector(FloatArray &answer, GaussPoint *gp, const FloatArray &grad, const FloatArray &field, TimeStep *tStep)
Returns the flux for the field and its gradient.
IRResultType
Type defining the return values of InputRecord reading operations.
Class for using the stokes flow class as an rve/constitutive model.
FloatMatrix temp_TangentMatrix
Abstract base class for all constitutive models for transport problems.
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
#define _IFT_RVEStokesFlow_fileName
RVEStokesFlowMaterialStatus(int n, Domain *d, GaussPoint *g, const std::string &inputfile)
StokesFlowVelocityHomogenization * giveRVE()
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Domain * giveDomain() const
REGISTER_Material(DummyMaterial)
Abstract base class representing the "problem" under consideration.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
int giveSize() const
Returns the size of receiver.
Class representing the implementation of plain text date reader.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
Class representing integration point in finite element program.
std::unique_ptr< StokesFlowVelocityHomogenization > rve
Class representing solution step.
void setNumber(int i)
Set receiver's number.
const FloatArray & giveGradient()
Return last gradient.
virtual void giveCharacteristicMatrix(FloatMatrix &answer, MatResponseMode, GaussPoint *gp, TimeStep *tStep)
Computes characteristic matrix of receiver in given integration point.
void resize(int s)
Resizes receiver towards requested size.