OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Prescribes or where are primary unknowns for the subscale. More...
#include <prescribedgradient.h>
Public Member Functions | |
PrescribedGradient (int n, Domain *d) | |
Creates boundary condition with given number, belonging to given domain. More... | |
virtual | ~PrescribedGradient () |
Destructor. More... | |
virtual double | give (Dof *dof, ValueModeType mode, double time) |
virtual bcType | giveType () const |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual void | giveInputRecord (DynamicInputRecord &input) |
Setups the input record string of receiver. More... | |
void | updateCoefficientMatrix (FloatMatrix &C) |
Constructs a coefficient matrix for all prescribed unknowns. More... | |
virtual void | computeField (FloatArray &sigma, TimeStep *tStep) |
Computes the homogenized, macroscopic, field (stress). More... | |
virtual void | computeTangent (FloatMatrix &tangent, TimeStep *tStep) |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis. More... | |
virtual void | scale (double s) |
Scales the receiver according to given value. More... | |
virtual const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
Public Member Functions inherited from oofem::BoundaryCondition | |
BoundaryCondition (int i, Domain *d) | |
Constructor. More... | |
virtual | ~BoundaryCondition () |
Destructor. More... | |
virtual double | give (Dof *dof, ValueModeType mode, TimeStep *tStep) |
Returns the value of a prescribed unknown, respecting requested mode for given time. More... | |
void | setPrescribedValue (double s) |
Set prescribed value at the input record string of receiver. 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::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... | |
virtual int | giveNumberOfInternalDofManagers () |
Gives the number of internal dof managers. More... | |
virtual DofManager * | giveInternalDofManager (int i) |
Gives an internal dof manager from receiver. 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 bcGeomType | giveBCGeoType () const |
Returns geometry character of boundary condition. More... | |
virtual void | postInitialize () |
Performs post initialization steps. 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from oofem::PrescribedGradientHomogenization | |
virtual double | domainSize (Domain *d, int set) |
Protected Attributes inherited from oofem::BoundaryCondition | |
FloatArray | values |
Prescribed values for each resp. dof. More... | |
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 or where are primary unknowns for the subscale.
This is typical boundary condition in multiscale analysis where would a macroscopic gradient at the integration point, i.e. this is a boundary condition for prolongation. It is also convenient to use when one wants to test a arbitrary specimen for shear.
Definition at line 61 of file prescribedgradient.h.
|
inline |
Creates boundary condition with given number, belonging to given domain.
n | Boundary condition number. |
d | Domain to which new object will belongs. |
Definition at line 69 of file prescribedgradient.h.
|
inlinevirtual |
Destructor.
Definition at line 72 of file prescribedgradient.h.
|
virtual |
Computes the homogenized, macroscopic, field (stress).
sigma | Output quantity (typically stress). |
tStep | Active time step. |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 168 of file prescribedgradient.C.
References oofem::EngngModel::assembleVector(), oofem::FloatArray::beTProductOf(), oofem::FEMComponent::domain, oofem::PrescribedGradientHomogenization::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::FEMComponent::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::GeneralBoundaryCondition::giveSetNumber(), oofem::FloatArray::times(), updateCoefficientMatrix(), and oofem::FloatArray::zero().
Referenced by oofem::GnuplotExportModule::outputBoundaryCondition().
|
virtual |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
tangent | Output tangent. |
tStep | Active time step. |
Implements oofem::PrescribedGradientHomogenization.
Definition at line 190 of file prescribedgradient.C.
References oofem::EngngModel::assemble(), oofem::FloatMatrix::beTProductOf(), oofem::classFactory, oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), oofem::FEMComponent::domain, oofem::PrescribedGradientHomogenization::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::GeneralBoundaryCondition::giveSetNumber(), OOFEM_ERROR, oofem::ST_Petsc, oofem::FloatMatrix::subtract(), oofem::FloatMatrix::times(), and updateCoefficientMatrix().
|
virtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 59 of file prescribedgradient.C.
References oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), oofem::FloatArray::beProductOf(), oofem::GeneralBoundaryCondition::dofs, oofem::Function::evaluateAccelerationAtTime(), oofem::Function::evaluateAtTime(), oofem::Function::evaluateVelocityAtTime(), oofem::IntArray::findFirstIndexOf(), oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::FloatArray::giveSize(), oofem::GeneralBoundaryCondition::giveTimeFunction(), oofem::PrescribedGradientHomogenization::mCenterCoord, oofem::PrescribedGradientHomogenization::mGradient, OOFEM_ERROR, oofem::FloatMatrix::resizeWithData(), oofem::FloatArray::resizeWithValues(), and oofem::FloatArray::times().
|
inlinevirtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 113 of file prescribedgradient.h.
|
virtual |
Setups the input record string of receiver.
input | Dynamic input record to be filled by receiver. |
Reimplemented from oofem::BoundaryCondition.
Definition at line 245 of file prescribedgradient.C.
References oofem::PrescribedGradientHomogenization::giveInputRecord(), and oofem::GeneralBoundaryCondition::giveInputRecord().
|
inlinevirtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 114 of file prescribedgradient.h.
References _IFT_PrescribedGradient_Name.
|
inlinevirtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 76 of file prescribedgradient.h.
References oofem::DirichletBT.
|
virtual |
Initializes receiver according to object description stored in input record.
The input record contains two fields;
Reimplemented from oofem::BoundaryCondition.
Definition at line 238 of file prescribedgradient.C.
References oofem::PrescribedGradientHomogenization::initializeFrom(), and oofem::GeneralBoundaryCondition::initializeFrom().
|
inlinevirtual |
Scales the receiver according to given value.
Typically used in nondimensional analysis to scale down BCs and ICs.
s | Scale factor. |
Reimplemented from oofem::BoundaryCondition.
Definition at line 111 of file prescribedgradient.h.
void oofem::PrescribedGradient::updateCoefficientMatrix | ( | FloatMatrix & | C | ) |
Constructs a coefficient matrix for all prescribed unknowns.
Helper routine for computational homogenization.
C | Coefficient matrix to fill. |
Definition at line 103 of file prescribedgradient.C.
References oofem::Dof::__givePrescribedEquationNumber(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, oofem::PrescribedGradientHomogenization::giveCenterCoordinate(), oofem::Domain::giveDofManagers(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::FloatMatrix::resize(), and oofem::FloatMatrix::zero().
Referenced by computeField(), and computeTangent().