|
OOFEM 3.0
|
#include <initialcondition.h>
Public Member Functions | |
| InitialCondition (int i, Domain *d) | |
| virtual | ~InitialCondition () |
| Destructor. | |
| double | give (ValueModeType mode, const FloatArray &coords) |
| bcValType | giveICValType () const |
| int | hasConditionOn (int u) |
| int | hasConditionOn (ValueModeType type) |
| virtual void | scale (ValueModeType type, double s) |
| int | giveSetNumber () |
| const IntArray & | giveDofIDs () |
| void | printYourself () override |
| Prints receiver state on stdout. Useful for debugging. | |
| void | initializeFrom (InputRecord &ir) override |
| const char * | giveClassName () const override |
| const char * | giveInputRecordName () const override |
| Public Member Functions inherited from oofem::FEMComponent | |
| FEMComponent (int n, Domain *d) | |
| virtual | ~FEMComponent ()=default |
| Virtual destructor. | |
| Domain * | giveDomain () const |
| virtual void | setDomain (Domain *d) |
| int | giveNumber () const |
| void | setNumber (int num) |
| virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
| virtual void | initializeFrom (InputRecord &ir, int priority) |
| virtual void | initializeFinish () |
| virtual void | postInitialize () |
| Performs post initialization steps. Called after all components are created and initialized. | |
| virtual void | giveInputRecord (DynamicInputRecord &input) |
| virtual void | saveContext (DataStream &stream, ContextMode mode) |
| virtual void | restoreContext (DataStream &stream, ContextMode mode) |
| virtual int | checkConsistency () |
| virtual void | printOutputAt (FILE *file, TimeStep *tStep) |
| virtual Interface * | giveInterface (InterfaceType t) |
| std::string | errorInfo (const char *func) const |
| Returns string for prepending output (used by error reporting macros). | |
Private Attributes | |
| int | mode = 0 |
| flag indicating compatibility (initialValueDictionary) mode (0 uses initialValueDictionary, 1 uses expressions, 2 uses external field) | |
| Dictionary | initialValueDictionary |
| Dictionary of initial (constant) values (deprecated). | |
| ScalarFunction | valueExpr |
| ScalarFunction | velocityExpr |
| ScalarFunction | accelerationExpr |
| FieldPtr | externalFField |
| FieldType | fFieldType =FieldType::FT_Unknown |
| bcValType | valType |
| Physical meaning of bc value. | |
| int | set |
| Set number. | |
| IntArray | dofIDs |
| List of dof ids that IC is applied to. | |
Additional Inherited Members | |
| Protected Attributes inherited from oofem::FEMComponent | |
| int | number |
| Component number. | |
| Domain * | domain |
| Link to domain object, useful for communicating with other FEM components. | |
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 86 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 119 of file initialcondition.h.
References dofIDs, oofem::FEMComponent::FEMComponent(), initialValueDictionary, set, oofem::UnknownBVT, and valType.
|
inlinevirtual |
Destructor.
Definition at line 121 of file initialcondition.h.
| double oofem::InitialCondition::give | ( | ValueModeType | mode, |
| const FloatArray & | coords ) |
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 43 of file initialcondition.C.
References accelerationExpr, oofem::FloatArray::at(), oofem::cltypesGiveUnknownTypeModeKey(), oofem::FEMComponent::domain, externalFField, fFieldType, oofem::FEMComponent::giveDomain(), oofem::FloatArray::giveSize(), hasConditionOn(), initialValueDictionary, mode, OOFEM_ERROR, valueExpr, and velocityExpr.
Referenced by oofem::PrimaryField::applyDefaultInitialCondition(), and oofem::PrimaryField::applyInitialCondition().
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 171 of file initialcondition.h.
|
inline |
Gives the set number which initial condition is applied to.
Definition at line 166 of file initialcondition.h.
References dofIDs.
Referenced by 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 137 of file initialcondition.h.
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 172 of file initialcondition.h.
References _IFT_InitialCondition_Name.
|
inline |
Gives the set number which initial condition is applied to.
Definition at line 161 of file initialcondition.h.
References set.
Referenced by 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 87 of file initialcondition.C.
References initialValueDictionary, and mode.
Referenced by oofem::PrimaryField::applyDefaultInitialCondition(), oofem::PrimaryField::applyInitialCondition(), give(), 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 99 of file initialcondition.C.
References oofem::cltypesGiveUnknownTypeModeKey(), initialValueDictionary, and mode.
|
overridevirtual |
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. Note that initializeFrom may be called mutiple times.
| ir | Input record to initialize from. |
| priority | Priority of the input record. This is used to determine the order of initialization |
Reimplemented from oofem::FEMComponent.
Definition at line 120 of file initialcondition.C.
References _IFT_InitialCondition_conditions, _IFT_InitialCondition_d2fdt2, _IFT_InitialCondition_dfdt, _IFT_InitialCondition_dofs, _IFT_InitialCondition_f, _IFT_InitialCondition_field, _IFT_InitialCondition_set, _IFT_InitialCondition_valType, accelerationExpr, dofIDs, fFieldType, oofem::InputRecord::hasField(), initialValueDictionary, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mode, OOFEM_ERROR, set, valType, valueExpr, and velocityExpr.
|
overridevirtual |
Prints receiver state on stdout. Useful for debugging.
Reimplemented from oofem::FEMComponent.
Definition at line 111 of file initialcondition.C.
References initialValueDictionary, and oofem::FEMComponent::number.
|
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 163 of file initialcondition.C.
References hasConditionOn(), initialValueDictionary, mode, and OOFEM_ERROR.
|
private |
Definition at line 99 of file initialcondition.h.
Referenced by give(), and initializeFrom().
|
private |
List of dof ids that IC is applied to.
Definition at line 111 of file initialcondition.h.
Referenced by giveDofIDs(), InitialCondition(), and initializeFrom().
|
private |
Definition at line 102 of file initialcondition.h.
Referenced by give().
|
private |
Definition at line 103 of file initialcondition.h.
Referenced by give(), and initializeFrom().
|
private |
Dictionary of initial (constant) values (deprecated).
Definition at line 92 of file initialcondition.h.
Referenced by give(), hasConditionOn(), hasConditionOn(), InitialCondition(), initializeFrom(), printYourself(), and scale().
|
private |
flag indicating compatibility (initialValueDictionary) mode (0 uses initialValueDictionary, 1 uses expressions, 2 uses external field)
Definition at line 90 of file initialcondition.h.
Referenced by give(), hasConditionOn(), hasConditionOn(), initializeFrom(), and scale().
|
private |
Set number.
Definition at line 109 of file initialcondition.h.
Referenced by giveSetNumber(), InitialCondition(), and initializeFrom().
|
private |
Physical meaning of bc value.
Definition at line 107 of file initialcondition.h.
Referenced by InitialCondition(), and initializeFrom().
|
private |
Definition at line 95 of file initialcondition.h.
Referenced by give(), and initializeFrom().
|
private |
Definition at line 97 of file initialcondition.h.
Referenced by give(), and initializeFrom().