OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Prescribes an average displacement gradient based on microperiodicity. More...
#include <prescribedgradientbcperiodic.h>
Public Member Functions | |
PrescribedGradientBCPeriodic (int n, Domain *d) | |
virtual | ~PrescribedGradientBCPeriodic () |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual void | giveInputRecord (DynamicInputRecord &input) |
virtual void | postInitialize () |
Performs post initialization steps. More... | |
virtual int | giveNumberOfInternalDofManagers () |
Gives the number of internal dof managers. More... | |
virtual DofManager * | giveInternalDofManager (int i) |
Gives an internal dof manager from receiver. More... | |
virtual int | giveNumberOfMasterDofs (ActiveDof *dof) |
Allows for active boundary conditions to handle their own special DOF. More... | |
virtual Dof * | giveMasterDof (ActiveDof *dof, int mdof) |
Give the pointer to master dof belonging to active DOF. More... | |
virtual void | computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs) |
virtual void | computeField (FloatArray &sigma, TimeStep *tStep) |
Computes the homogenized, macroscopic, field (stress). More... | |
virtual void | computeTangent (FloatMatrix &E, TimeStep *tStep) |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis. More... | |
double | giveUnknown (double val, ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
virtual double | giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
Computes the value of the dof. More... | |
virtual double | giveUnknown (ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
Computes the value of the dof. More... | |
virtual bool | isPrimaryDof (ActiveDof *dof) |
Checks to see if the dof is a primary DOF. More... | |
virtual double | giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep) |
Returns the prescribed value of a dof (if any). More... | |
virtual bool | hasBc (Dof *dof, TimeStep *tStep) |
Returns the prescribed value of a dof (if any). More... | |
bool | isStrainDof (Dof *dof) |
virtual bool | requiresActiveDofs () |
Checks to see if active boundary condition requires special DOFs. More... | |
virtual const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
Public Member Functions inherited from oofem::ActiveBoundaryCondition | |
ActiveBoundaryCondition (int n, Domain *d) | |
Constructor. More... | |
virtual | ~ActiveBoundaryCondition () |
Destructor. More... | |
virtual void | assemble (SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0) |
Assembles B.C. More... | |
virtual void | assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms=NULL) |
Assembles B.C. More... | |
virtual void | giveLocationArrays (std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) |
Gives a list of location arrays that will be assembled. More... | |
virtual void | addElementSide (int elem, int side) |
Adds element for active boundary condition. More... | |
Public Member Functions inherited from oofem::GeneralBoundaryCondition | |
GeneralBoundaryCondition (int n, Domain *d) | |
Constructor. More... | |
virtual | ~GeneralBoundaryCondition () |
Destructor. More... | |
int | giveSetNumber () |
Gives the set number which boundary condition is applied to. More... | |
Function * | giveTimeFunction () |
virtual bcValType | giveBCValType () const |
Returns receiver load type. More... | |
virtual bool | isImposed (TimeStep *tStep) |
Returns nonzero if receiver representing BC is imposed at given time, otherwise returns zero. More... | |
virtual const IntArray & | giveDofIDs () const |
Array with default dofs which b.c. More... | |
virtual bcType | giveType () const |
virtual bcGeomType | giveBCGeoType () const |
Returns geometry character of boundary condition. More... | |
virtual void | scale (double s) |
Scales the receiver according to given value. More... | |
virtual contextIOResultType | saveContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Stores receiver state to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL) |
Restores the receiver state previously written in stream. More... | |
Public Member Functions inherited from oofem::FEMComponent | |
FEMComponent (int n, Domain *d) | |
Regular constructor, creates component with given number and belonging to given domain. More... | |
virtual | ~FEMComponent () |
Virtual destructor. More... | |
Domain * | giveDomain () const |
virtual void | setDomain (Domain *d) |
Sets associated Domain. More... | |
int | giveNumber () const |
void | setNumber (int num) |
Sets number of receiver. More... | |
virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
Local renumbering support. More... | |
virtual int | checkConsistency () |
Allows programmer to test some internal data, before computation begins. More... | |
virtual void | printOutputAt (FILE *file, TimeStep *tStep) |
Prints output of receiver to stream, for given time step. More... | |
virtual void | printYourself () |
Prints receiver state on stdout. Useful for debugging. More... | |
virtual Interface * | giveInterface (InterfaceType t) |
Interface requesting service. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Public Member Functions inherited from oofem::PrescribedGradientHomogenization | |
PrescribedGradientHomogenization () | |
virtual | ~PrescribedGradientHomogenization () |
virtual double | domainSize () |
void | setPrescribedGradient (const FloatMatrix &t) |
Set prescribed gradient. More... | |
void | setPrescribedGradientVoigt (const FloatArray &t) |
Sets the prescribed gradient from the matrix from given voigt notation. More... | |
void | giveGradientVoigt (FloatArray &oGradient) const |
Gives back the applied gradient in Voigt form. More... | |
void | setCenterCoordinate (FloatArray &x) |
Set the center coordinate for the prescribed values to be set for. More... | |
FloatArray & | giveCenterCoordinate () |
Returns the center coordinate. More... | |
Protected Member Functions | |
void | findSlaveToMasterMap () |
This is the central support function, which finds the corresponding slave nodes for each master node. More... | |
Protected Member Functions inherited from oofem::PrescribedGradientHomogenization | |
virtual double | domainSize (Domain *d, int set) |
Protected Attributes | |
std::unique_ptr< Node > | strain |
IntArray | strain_id |
std::map< int, int > | slavemap |
FloatArray | jump |
int | masterSet |
Protected Attributes inherited from oofem::GeneralBoundaryCondition | |
int | timeFunction |
Associated load time function. More... | |
bcValType | valType |
Physical meaning of BC value. More... | |
IntArray | dofs |
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s). More... | |
int | isImposedTimeFunction |
Zero by default - the BC is than always imposed. More... | |
int | set |
Set number for boundary condition to be applied to. More... | |
Protected Attributes inherited from oofem::FEMComponent | |
int | number |
Component number. More... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
Protected Attributes inherited from oofem::PrescribedGradientHomogenization | |
FloatMatrix | mGradient |
Prescribed gradient . More... | |
FloatArray | mCenterCoord |
Center coordinate . More... | |
Prescribes an average displacement gradient based on microperiodicity.
Definition at line 60 of file prescribedgradientbcperiodic.h.
oofem::PrescribedGradientBCPeriodic::PrescribedGradientBCPeriodic | ( | int | n, |
Domain * | d | ||
) |
Definition at line 63 of file prescribedgradientbcperiodic.C.
References oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfSpatialDimensions(), strain, and strain_id.
|
virtual |
Definition at line 82 of file prescribedgradientbcperiodic.C.
|
virtual |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 262 of file prescribedgradientbcperiodic.C.
References oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), oofem::FEMComponent::domain, oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofManager(), oofem::Domain::giveDofManager(), oofem::FEMComponent::giveNumber(), oofem::FloatArray::giveSize(), oofem::FloatArray::resize(), and slavemap.
|
virtual |
Computes the homogenized, macroscopic, field (stress).
sigma | Output quantity (typically stress). |
tStep | Active time step. |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 179 of file prescribedgradientbcperiodic.C.
References oofem::FloatArray::assemble(), oofem::EngngModel::assembleVector(), oofem::FEMComponent::domain, oofem::PrescribedGradientHomogenization::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), masterSet, oofem::FloatArray::resize(), strain_id, oofem::FloatArray::subtract(), oofem::FloatArray::times(), and oofem::FloatArray::zero().
|
virtual |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
tangent | Output tangent. |
tStep | Active time step. |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 207 of file prescribedgradientbcperiodic.C.
References oofem::FloatMatrix::assemble(), oofem::EngngModel::assemble(), oofem::classFactory, oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), oofem::FEMComponent::domain, oofem::PrescribedGradientHomogenization::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumber(), oofem::FloatMatrix::giveNumberOfColumns(), oofem::FloatMatrix::giveNumberOfRows(), oofem::Domain::giveNumberOfSpatialDimensions(), masterSet, oofem::FloatMatrix::resize(), oofem::ST_Petsc, strain_id, oofem::FloatMatrix::subtract(), and oofem::FloatMatrix::times().
|
protected |
This is the central support function, which finds the corresponding slave nodes for each master node.
Definition at line 99 of file prescribedgradientbcperiodic.C.
References oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), oofem::FEMComponent::domain, oofem::Node::giveCoordinates(), oofem::Domain::giveNode(), oofem::SpatialLocalizer::giveNodeClosestToPoint(), oofem::Set::giveNodeList(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveSet(), oofem::FloatArray::giveSize(), oofem::Domain::giveSpatialLocalizer(), jump, OOFEM_ERROR, and slavemap.
Referenced by postInitialize().
|
virtual |
Returns the prescribed value of a dof (if any).
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 348 of file prescribedgradientbcperiodic.C.
References oofem::Function::evaluateAtTime(), oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), oofem::TimeStep::giveTargetTime(), oofem::GeneralBoundaryCondition::giveTimeFunction(), isStrainDof(), oofem::PrescribedGradientHomogenization::mGradient, OOFEM_ERROR, and strain_id.
|
inlinevirtual |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 103 of file prescribedgradientbcperiodic.h.
|
virtual |
Reimplemented from oofem::PrescribedGradientHomogenization.
Definition at line 383 of file prescribedgradientbcperiodic.C.
References _IFT_PrescribedGradientBCPeriodic_jump, _IFT_PrescribedGradientBCPeriodic_masterSet, oofem::PrescribedGradientHomogenization::giveInputRecord(), oofem::GeneralBoundaryCondition::giveInputRecord(), jump, masterSet, and oofem::DynamicInputRecord::setField().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 104 of file prescribedgradientbcperiodic.h.
References _IFT_PrescribedGradientBCPeriodic_Name.
|
virtual |
Gives an internal dof manager from receiver.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 93 of file prescribedgradientbcperiodic.C.
References strain.
Give the pointer to master dof belonging to active DOF.
dof | Active dof belonging to receiver. |
mdof | Local master dof number. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 154 of file prescribedgradientbcperiodic.C.
References oofem::FEMComponent::domain, oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::Domain::giveDofManager(), oofem::DofManager::giveDofWithID(), oofem::FEMComponent::giveNumber(), oofem::FloatArray::giveSize(), isStrainDof(), slavemap, strain, and strain_id.
|
virtual |
Gives the number of internal dof managers.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 87 of file prescribedgradientbcperiodic.C.
|
virtual |
Allows for active boundary conditions to handle their own special DOF.
dof | Active dof belonging to receiver. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 145 of file prescribedgradientbcperiodic.C.
References oofem::FEMComponent::giveDomain(), oofem::Domain::giveNumberOfSpatialDimensions(), and isStrainDof().
double oofem::PrescribedGradientBCPeriodic::giveUnknown | ( | double | val, |
ValueModeType | mode, | ||
TimeStep * | tStep, | ||
ActiveDof * | dof | ||
) |
Definition at line 282 of file prescribedgradientbcperiodic.C.
References oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), oofem::FloatArray::beProductOf(), oofem::FEMComponent::domain, oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::Domain::giveDofManager(), oofem::FEMComponent::giveNumber(), oofem::IntArray::giveSize(), oofem::Dof::giveUnknown(), slavemap, strain, and strain_id.
Referenced by giveUnknown().
|
virtual |
Computes the value of the dof.
field | Field to take value from. |
mode | Mode of unknown value. |
tStep | Time step. |
dof | Active dof for which to obtain the value. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 311 of file prescribedgradientbcperiodic.C.
References oofem::FEMComponent::domain, oofem::Function::evaluateAtTime(), oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::Domain::giveDofManager(), oofem::DofManager::giveDofWithID(), oofem::FEMComponent::giveNumber(), oofem::TimeStep::giveTargetTime(), oofem::GeneralBoundaryCondition::giveTimeFunction(), giveUnknown(), isStrainDof(), oofem::PrescribedGradientHomogenization::mGradient, slavemap, and strain_id.
|
virtual |
Computes the value of the dof.
mode | Mode of unknown value. |
tStep | Time step. |
dof | Active dof for which to obtain the value. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 324 of file prescribedgradientbcperiodic.C.
References oofem::FEMComponent::domain, oofem::Function::evaluateAtTime(), oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::Domain::giveDofManager(), oofem::DofManager::giveDofWithID(), oofem::FEMComponent::giveNumber(), oofem::TimeStep::giveTargetTime(), oofem::GeneralBoundaryCondition::giveTimeFunction(), giveUnknown(), isStrainDof(), oofem::PrescribedGradientHomogenization::mGradient, slavemap, and strain_id.
Returns the prescribed value of a dof (if any).
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 359 of file prescribedgradientbcperiodic.C.
References isStrainDof().
|
virtual |
Initializes receiver according to object description stored in input record.
This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.
ir | Input record to initialize from. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 371 of file prescribedgradientbcperiodic.C.
References _IFT_PrescribedGradientBCPeriodic_jump, _IFT_PrescribedGradientBCPeriodic_masterSet, oofem::ActiveBoundaryCondition::initializeFrom(), oofem::PrescribedGradientHomogenization::initializeFrom(), IR_GIVE_FIELD, jump, and masterSet.
|
virtual |
Checks to see if the dof is a primary DOF.
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 342 of file prescribedgradientbcperiodic.C.
References isStrainDof().
bool oofem::PrescribedGradientBCPeriodic::isStrainDof | ( | Dof * | dof | ) |
Definition at line 365 of file prescribedgradientbcperiodic.C.
References oofem::Dof::giveDofManager(), and strain.
Referenced by giveBcValue(), giveMasterDof(), giveNumberOfMasterDofs(), giveUnknown(), hasBc(), and isPrimaryDof().
|
virtual |
Performs post initialization steps.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 392 of file prescribedgradientbcperiodic.C.
References findSlaveToMasterMap().
|
inlinevirtual |
Checks to see if active boundary condition requires special DOFs.
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 101 of file prescribedgradientbcperiodic.h.
|
protected |
Definition at line 67 of file prescribedgradientbcperiodic.h.
Referenced by findSlaveToMasterMap(), giveInputRecord(), and initializeFrom().
|
protected |
Definition at line 69 of file prescribedgradientbcperiodic.h.
Referenced by computeField(), computeTangent(), giveInputRecord(), and initializeFrom().
|
protected |
Definition at line 66 of file prescribedgradientbcperiodic.h.
Referenced by computeDofTransformation(), findSlaveToMasterMap(), giveMasterDof(), and giveUnknown().
|
protected |
Definition at line 63 of file prescribedgradientbcperiodic.h.
Referenced by giveInternalDofManager(), giveMasterDof(), giveUnknown(), isStrainDof(), and PrescribedGradientBCPeriodic().
|
protected |
Definition at line 64 of file prescribedgradientbcperiodic.h.
Referenced by computeField(), computeTangent(), giveBcValue(), giveMasterDof(), giveUnknown(), and PrescribedGradientBCPeriodic().