OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class implementing general initial condition. More...
#include <initialcondition.h>
Public Member Functions | |
InitialCondition (int i, Domain *d) | |
Creates initial condition with given number, belonging to given domain. More... | |
virtual | ~InitialCondition () |
Destructor. More... | |
double | give (ValueModeType mode) |
Returns value of initial condition for given unknown mode (determines whether total or velocity or acceleration mode of unknown is requested). More... | |
bcValType | giveICValType () const |
Returns receiver load type. More... | |
int | hasConditionOn (int u) |
Tests if receiver has initial condition for specific unknown-mode. More... | |
int | hasConditionOn (ValueModeType type) |
Tests if receiver has initial condition for specific unknown-mode. More... | |
virtual void | scale (ValueModeType type, double s) |
Scales the receiver value (determined by ValueModeType) by given value. More... | |
int | giveSetNumber () |
Gives the set number which initial condition is applied to. More... | |
const IntArray & | giveDofIDs () |
Gives the set number which initial condition is applied to. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual void | printYourself () |
Prints receiver state on stdout. Useful for debugging. More... | |
virtual const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
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 void | giveInputRecord (DynamicInputRecord &input) |
Setups 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... | |
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 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... | |
Private Attributes | |
Dictionary | initialValueDictionary |
Dictionary of initial values. More... | |
bcValType | valType |
Physical meaning of bc value. More... | |
int | set |
Set number. More... | |
IntArray | dofIDs |
List of dof ids that IC is applied to. More... | |
Additional Inherited Members | |
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... | |
Class implementing general initial condition.
Initial condition is usually attribute of one or more degrees of freedom (DOFs).
The inherited attribute 'componentArray' is not used. It is replaced with the more adequate dictionary 'initialValueDictionary', which entries are referenced by names rather than by indices.
One particular DOF (with its physical meaning - for example displacement) can have associated only single initial condition. Initial condition therefore must represent several initial conditions for particular DOF (for example velocity and acceleration of unknown can be prescribed using single initial condition instance). These multiple entries are distinguished by their ValueModeType value. The ValueModeType value is also used as key in initialValueDictionary.
Initial conditions apply and should be taken into account only in one particular time step, which number is determined from engineering model giveNumberOfTimeStepWhenIcApply service. If in this time step both boundary condition on unknown and also initial condition on value of this unknown (TotalMode ValueModeType) are prescribed, then always value reported by boundary condition is taken into account.
Definition at line 78 of file initialcondition.h.
|
inline |
Creates initial condition with given number, belonging to given domain.
i | Initial condition number. |
d | Domain to which new object will belongs. |
Definition at line 96 of file initialcondition.h.
|
inlinevirtual |
Destructor.
Definition at line 98 of file initialcondition.h.
double oofem::InitialCondition::give | ( | ValueModeType | mode | ) |
Returns value of initial condition for given unknown mode (determines whether total or velocity or acceleration mode of unknown is requested).
mode | Characteristic mode of unknown, characteristic type depends on DOF (represent physical meaning). |
Definition at line 40 of file initialcondition.C.
References oofem::Dictionary::at(), oofem::cltypesGiveUnknownTypeModeKey(), hasConditionOn(), and initialValueDictionary.
Referenced by oofem::DofDistributedPrimaryField::applyDefaultInitialCondition(), oofem::PrimaryField::applyDefaultInitialCondition(), oofem::DofDistributedPrimaryField::applyInitialCondition(), oofem::PrimaryField::applyInitialCondition(), oofem::Dof::giveBcValue(), and oofem::MasterDof::giveUnknown().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 148 of file initialcondition.h.
|
inline |
Gives the set number which initial condition is applied to.
Definition at line 143 of file initialcondition.h.
Referenced by oofem::DofDistributedPrimaryField::applyInitialCondition(), and oofem::Domain::createDofs().
|
inline |
Returns receiver load type.
It distinguish particular boundary conditions according to their "physical" meaning (like StructuralTemperatureLoadLT, StructuralLoadLT). Derived classes should always overload, default implementation returns UnknownLT value. See cltypes.h file for details.
Definition at line 114 of file initialcondition.h.
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 149 of file initialcondition.h.
References _IFT_InitialCondition_Name.
|
inline |
Gives the set number which initial condition is applied to.
Definition at line 138 of file initialcondition.h.
Referenced by oofem::DofDistributedPrimaryField::applyInitialCondition(), oofem::PrimaryField::applyInitialCondition(), and oofem::Domain::createDofs().
int oofem::InitialCondition::hasConditionOn | ( | int | u | ) |
Tests if receiver has initial condition for specific unknown-mode.
u | ValueModeType value of unknown. |
Definition at line 53 of file initialcondition.C.
References oofem::Dictionary::includes(), and initialValueDictionary.
Referenced by oofem::DofDistributedPrimaryField::applyDefaultInitialCondition(), oofem::PrimaryField::applyDefaultInitialCondition(), oofem::DofDistributedPrimaryField::applyInitialCondition(), oofem::PrimaryField::applyInitialCondition(), give(), oofem::MasterDof::hasIcOn(), and scale().
int oofem::InitialCondition::hasConditionOn | ( | ValueModeType | type | ) |
Tests if receiver has initial condition for specific unknown-mode.
type | ValueModeType of unknown. |
Definition at line 61 of file initialcondition.C.
References oofem::cltypesGiveUnknownTypeModeKey(), oofem::Dictionary::includes(), and initialValueDictionary.
|
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::FEMComponent.
Definition at line 78 of file initialcondition.C.
References _IFT_InitialCondition_conditions, _IFT_InitialCondition_dofs, _IFT_InitialCondition_set, _IFT_InitialCondition_valType, oofem::IntArray::clear(), dofIDs, initialValueDictionary, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, and valType.
Referenced by oofem::T3DInterface::t3d_2_OOFEM().
|
virtual |
Prints receiver state on stdout. Useful for debugging.
Reimplemented from oofem::FEMComponent.
Definition at line 69 of file initialcondition.C.
References initialValueDictionary, oofem::FEMComponent::number, and oofem::Dictionary::printYourself().
|
virtual |
Scales the receiver value (determined by ValueModeType) by given value.
Typically used in nondimensional analysis to scale down BCs and ICs.
type | ValueModeType of unknown. |
s | Scaling factor. |
Definition at line 101 of file initialcondition.C.
References oofem::Dictionary::at(), hasConditionOn(), and initialValueDictionary.
|
private |
List of dof ids that IC is applied to.
Definition at line 88 of file initialcondition.h.
Referenced by initializeFrom().
|
private |
Dictionary of initial values.
Definition at line 82 of file initialcondition.h.
Referenced by give(), hasConditionOn(), initializeFrom(), printYourself(), and scale().
|
private |
Set number.
Definition at line 86 of file initialcondition.h.
|
private |
Physical meaning of bc value.
Definition at line 84 of file initialcondition.h.
Referenced by initializeFrom().