35 #include "../sm/Elements/3D/macrolspace.h" 36 #include "../sm/Materials/micromaterial.h" 37 #include "../sm/EngineeringModels/structengngmodel.h" 38 #include "../sm/Elements/3D/lspace.h" 72 OOFEM_WARNING(
"Need 8 master nodes from the microproblem defined on macroLspace element");
83 if ( fopen(this->stiffMatrxFileName,
"r") != NULL ) {
84 stiffMatrxFile = fopen(this->stiffMatrxFileName,
"r");
87 if ( ( stiffMatrxFile = fopen(this->stiffMatrxFileName,
"w") ) == NULL ) {
88 OOFEM_ERROR(
"Can not create a new file %s\n", this->stiffMatrxFileName);
114 OOFEM_ERROR(
"Micromaterial is already used on another element. Only one micromaterial can be assigned to one macro element");
162 FloatArray displ_x(8), displ_y(8), displ_z(8);
181 OOFEM_ERROR(
"Couldn't create constant time function");
199 for (
Dof *dof: *DofMan ) {
201 dof->setBcId(counter);
203 displ = n.dotProduct(
id == D_u ? displ_x : (
id == D_v ? displ_y : displ_z ) );
208 OOFEM_ERROR(
"Couldn't create boundary condition.");
215 for (
Dof *dof: *DofMan ) {
230 double reactionForce;
238 if ( useUpdatedGpRecord ) {
264 reactionForce = reactions.
at(3 * i + j - 3);
265 for (
int k = 1; k <= 8; k++ ) {
266 answer.
at(3 * k + j - 3) += reactionForce * n.
at(k);
296 iRule->updateYourself(tStep);
bool contains(int value) const
virtual bool isActivated(TimeStep *tStep)
EngngModel * problemMicro
Pointer to the underlying micro problem.
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix of receiver.
TimeStep * lastStiffMatrixTimeStep
Last time step when stiffness matrix was assembled.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Function * createFunction(const char *name, int num, Domain *domain)
Creates new instance of load time function corresponding to given keyword.
void initMetaStepAttributes(MetaStep *mStep)
Update e-model attributes attributes according to step metaStep attributes.
void setBoundaryCondition(int i, GeneralBoundaryCondition *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
virtual int global2local(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates local coordinates from given global ones.
void setIntrinsicTime(double newt)
Sets only intrinsic time.
Wrapper around cell with vertex coordinates stored in FloatArray**.
virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0)
Evaluates nodal representation of real internal forces.
double & at(int i)
Coefficient access function.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual void changeMicroBoundaryConditions(TimeStep *tStep)
Related to setting the boundary conditions of micro problem.
void resizeFunctions(int _newSize)
Resizes the internal data structure to accommodate space for _newSize load time functions.
virtual FloatArray * giveCoordinates()
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
The key method of class Dof.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
const char * __MatResponseModeToString(MatResponseMode _value)
double giveTargetTime()
Returns target time.
void setTimeIncrement(double newDt)
Sets solution step time increment.
virtual void terminate(TimeStep *tStep)
Terminates the solution of time step.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Base class for dof managers.
std::vector< FloatArray > microMasterCoords
Array containing coordinates of 8 master nodes of microproblem.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
GeneralBoundaryCondition * createBoundaryCondition(const char *name, int num, Domain *domain)
Creates new instance of boundary condition corresponding to given keyword.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
int & at(int i)
Coefficient access function.
MatResponseMode
Describes the character of characteristic material matrix.
MacroLSpace(int n, Domain *d)
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the array of interpolation functions (shape functions) at given point.
#define _IFT_GeneralBoundaryCondition_timeFunct
virtual int giveNumberOfNodes() const
Returns number of nodes of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
#define _IFT_MacroLspace_microBoundaryNodes
MetaStep * giveCurrentMetaStep()
Returns current meta step.
This class is a base class for microproblem.
bool microMatIsUsed
Flag signalizing whether micromaterial is used by other element.
int giveNumber()
Returns receiver's number.
#define OOFEM_LOG_INFO(...)
int giveNumberOfDofs() const
void clear()
Clears the array (zero size).
DofIDItem
Type representing particular dof type.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Abstract base class for all boundary conditions of problem.
EngngModel * microEngngModel
void setFunction(int i, Function *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
void resize(int n)
Checks size of receiver towards requested bounds.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
IntArray microBoundaryNodes
Class representing vector of real numbers.
virtual int checkProblemConsistency()
Allows programmer to test problem its internal data, before computation begins.
Implementation of matrix containing floating point numbers.
Abstract base class representing a function with vector input and output.
void clearBoundaryConditions()
Clear all boundary conditions.
IRResultType
Type defining the return values of InputRecord reading operations.
void setMacroProperties(Domain *macroDomain, MacroLSpace *macroLSpaceElement, const IntArray µMasterNodes, const IntArray µBoundaryNodes)
IntArray microMasterNodes
Array containing the node mapping from microscale (which microMasterNodes corresponds to which macroN...
IntArray microBoundaryDofManager
Stores node number on the boundary in the triplets.
This class implements a Linear 3d 8-node finite element for stress analysis.
int giveNumberOfFunctions() const
Returns number of load time functions in domain.
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
void zero()
Zeroes all coefficients of receiver.
#define _IFT_ConstantFunction_f
FloatArray internalMacroForcesVector
Array containg the force vector from nodes (if condensation is skipped, use this vector).
ClassFactory & classFactory
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
#define _IFT_BoundaryCondition_PrescribedValue
[rn,optional] Prescribed value of all DOFs
static FEI3dHexaLin interpolation
virtual void evalInterpolation(FloatArray &answer, const std::vector< FloatArray > &coords, const FloatArray &gcoords)
Evaluates shape function at a given pointnodal representation of real internal forces obtained from m...
Domain * giveDomain() const
#define _IFT_MacroLspace_stiffMatrxFileName
This class implements extension of EngngModel for structural models.
int iteration
Information of iteration number.
void computeReaction(FloatArray &answer, TimeStep *tStep, int di)
Computes reaction forces.
void setTargetTime(double newt)
Sets only target time.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
void resizeBoundaryConditions(int _newSize)
Resizes the internal data structure to accommodate space for _newSize boundary conditions.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
MicroMaterial * microMaterial
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
void giveMacroStiffnessMatrix(FloatMatrix &answer, TimeStep *tStep, MatResponseMode rMode, const IntArray µMasterNodes, const IntArray µBoundaryNodes)
#define _IFT_MacroLspace_microMasterNodes
Node * giveNode(int i) const
Returns reference to the i-th node of element.
#define OOFEM_WARNING(...)
Class representing solution step.
int stiffMatrxFileNoneReadingWriting
Process with external file for the storage of stiffness matrix 0-None, 1-read, 2-write.
void init(void)
Related to numbering scheme.
void setProblemScale(problemScale pscale)
Sets scale in multiscale simulation.
virtual Material * giveMaterial()
void resize(int s)
Resizes receiver towards requested size.