50StructuralMaterialEvaluator :: StructuralMaterialEvaluator(
int i,
EngngModel *_master) :
EngngModel(i, _master)
55StructuralMaterialEvaluator :: ~StructuralMaterialEvaluator()
58void StructuralMaterialEvaluator :: initializeFrom(
InputRecord &ir)
71 if ( this->
sControl.giveSize() > 0 ) {
80 for (
int i = 1; i <= 6; ++i ) {
88void StructuralMaterialEvaluator :: solveYourself()
92 MaterialMode mode = _3dMat;
97 std :: unique_ptr< GaussPoint > gp = std::make_unique<GaussPoint>(
nullptr, i,
FloatArray(0), 1, mode);
98 gps.emplace_back( std :: move(gp) );
105 this->
outfile.open( outname.c_str() );
107 this->
timer.startTimer(EngngModelTimer :: EMTT_AnalysisTimer);
113 FloatArray stressC, deltaStrain, strain, stress, res;
118 for (
int istep = 1; istep <= this->
numberOfSteps; ++istep ) {
119 this->
timer.startTimer(EngngModelTimer :: EMTT_SolutionStepTimer);
127 for (
int j = 1; j <=
eControl.giveSize(); ++j ) {
132 for (
int j = 1; j <=
sControl.giveSize(); ++j ) {
138 for (
int iter = 1; iter < maxiter; iter++ ) {
154 for (
int j = 1; j <=
sControl.giveSize(); ++j ) {
158 OOFEM_LOG_INFO(
"*** Time step: %d (t = %.2e), Material %d, Iteration: %d, Residual = %e (tolerance %.2e)\n",
174 for (
int j = 1; j <=
sControl.giveSize(); ++j ) {
188 this->
timer.stopTimer(EngngModelTimer :: EMTT_SolutionStepTimer);
193 this->
timer.stopTimer(EngngModelTimer :: EMTT_AnalysisTimer);
197int StructuralMaterialEvaluator :: checkConsistency()
202 OOFEM_LOG_ERROR(
"Material %d is not a StructuralMaterial", mat->giveNumber());
207 return EngngModel :: checkConsistency();
210void StructuralMaterialEvaluator :: doStepOutput(
TimeStep *tStep)
216 for (
int var : this->
vars ) {
226 for (
int var : this->
vars ) {
235TimeStep *StructuralMaterialEvaluator :: giveNextStep()
#define REGISTER_EngngModel(class)
Material * giveMaterial(int n)
int giveNumberOfMaterialModels() const
Returns number of material models in domain.
std ::vector< std ::unique_ptr< Material > > & giveMaterials()
Function * giveFunction(int n)
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
std::string giveOutputBaseFileName()
EngngModel(int i, EngngModel *_master=NULL)
std ::unique_ptr< TimeStep > previousStep
Previous time step.
int ndomains
Number of receiver domains.
int numberOfSteps
Total number of time steps.
Domain * giveDomain(int n)
std ::unique_ptr< TimeStep > currentStep
Current time step.
EngngModelTimer timer
E-model timer.
bool suppressOutput
Flag for suppressing output to file.
double computeNorm() const
virtual void printYourself() const
void zero()
Zeroes all coefficients of receiver.
void beSubMatrixOf(const FloatMatrix &src, Index topRow, Index bottomRow, Index topCol, Index bottomCol)
*Prints matrix to stdout Useful for debugging void printYourself() const
int giveNumberOfRows() const
Returns number of rows of receiver.
bool solveForRhs(const FloatArray &b, FloatArray &answer, bool transpose=false)
virtual double evaluateAtTime(double t)
void updateYourself(TimeStep *tStep)
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
void doStepOutput(TimeStep *tStep) override
double deltaT
Time increment.
TimeStep * giveNextStep() override
Returns next time step (next to current step) of receiver.
IntArray sControl
Time functions controlling each component of the deviatoric part of the stress.
std::vector< std ::unique_ptr< GaussPoint > > gps
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
void letStrainVectorBe(const FloatArray &v)
Assigns strain vector to given vector v.
virtual FloatMatrixF< 6, 6 > give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatArrayF< 6 > giveRealStressVector_3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep) const
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
#define OOFEM_WARNING(...)
#define OOFEM_LOG_INFO(...)
#define OOFEM_LOG_ERROR(...)
const char * __InternalStateTypeToString(InternalStateType _value)
#define _IFT_StructuralMaterialEvaluator_componentFunctions
Integer list of time functions for each component.
#define _IFT_StructuralMaterialEvaluator_tolerance
Tolerance for stress control.
#define _IFT_StructuralMaterialEvaluator_numberOfTimeSteps
#define _IFT_StructuralMaterialEvaluator_keepTangent
#define _IFT_StructuralMaterialEvaluator_stressControl
Integer list of the stress components which are controlled.
#define _IFT_StructuralMaterialEvaluator_deltat
#define _IFT_StructuralMaterialEvaluator_outputVariables
Variables (from integration point) to be written.