OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Load Class Referenceabstract

Load is base abstract class for all loads. More...

#include <load.h>

+ Inheritance diagram for oofem::Load:
+ Collaboration diagram for oofem::Load:

Public Types

enum  CoordSystType { CST_Global, CST_Local, CST_UpdatedGlobal }
 Load coordinate system type. More...
enum  FormulationType { FT_Entity, FT_Global }
 Type determining the type of formulation (entity local or global one). More...

Public Member Functions

 Load (int n, Domain *d)
 Constructor. More...
virtual ~Load ()
 Destructor. More...
virtual void computeComponentArrayAt (FloatArray &answer, TimeStep *tStep, ValueModeType mode)
 Computes boundary condition value - its components values at given time. More...
virtual void computeValueAt (FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)=0
 Computes components values of load at given point - global coordinates (coordinates given). More...
virtual void computeValues (FloatArray &answer, TimeStep *tStep, const FloatArray &coords, const IntArray &dofids, ValueModeType mode)
 Computes components values for specified dof ids. More...
int isDofExcluded (int index)
 Returns the value of dofExcludeMask corresponding to given index. More...
virtual void scale (double s)
 Scales the receiver according to given value. More...
virtual CoordSystType giveCoordSystMode ()
 Returns receiver's coordinate system. More...
virtual FormulationType giveFormulationType ()
 Specifies is load should take local or global coordinates. More...
virtual int giveApproxOrder ()
virtual double giveProperty (int aProperty, TimeStep *tStep)
 Returns the value of a property 'aProperty'. More...
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...
const FloatArraygiveComponentArray () const
void setComponentArray (FloatArray &arry)
- 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 DofManagergiveInternalDofManager (int i)
 Gives an internal dof manager from receiver. More...
FunctiongiveTimeFunction ()
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 IntArraygiveDofIDs () 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 postInitialize ()
 Performs post initialization steps. 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...
virtual const char * giveClassName () const =0
virtual const char * giveInputRecordName () const =0
DomaingiveDomain () 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 InterfacegiveInterface (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 Attributes

bool reference

Protected Attributes

FloatArray componentArray
 Components of boundary condition. More...
IntArray dofExcludeMask
 The load is specified for all dofs of object to which is associated. 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...
 Link to domain object, useful for communicating with other FEM components. More...

Detailed Description

Load is base abstract class for all loads.

Load is an attribute of the domain that is belongs to, and also of several elements, nodes, which are subjected to loading type boundary condition.

The value (or the components) of a load will be the product of its value (stored in componentArray) by the value of the associated load time function at given time step.

Definition at line 61 of file load.h.

Member Enumeration Documentation

Load coordinate system type.

Variable of this type can have following values CST_Global (indicates that load given in global coordinate system) or CST_Local (entity dependent local coordinate system will be used).


Load is specified in global c.s.


Load is specified in local element c.s.


Load is specified in global c.s. but follows the deformation.

Definition at line 69 of file load.h.

Type determining the type of formulation (entity local or global one).


Definition at line 78 of file load.h.

Constructor & Destructor Documentation

oofem::Load::Load ( int  n,
Domain d 


Creates boundary condition with given number, belonging to given domain.

nBoundary condition number
dDomain to which new object will belongs.

Definition at line 42 of file load.C.

References oofem::GeneralBoundaryCondition::timeFunction.

virtual oofem::Load::~Load ( )


Definition at line 109 of file load.h.

Member Function Documentation

void oofem::Load::computeComponentArrayAt ( FloatArray answer,
TimeStep tStep,
ValueModeType  mode 

Computes boundary condition value - its components values at given time.

Default implementation returns as the answer its component array multiplied with load time function value (load response mode is taken in to account)

answerComputed boundary conditions components.
tStepTime step, for which components are computed.
modeDetermines response mode.

Reimplemented in oofem::BoundaryLoad.

Definition at line 82 of file load.C.

References componentArray, oofem::Function::evaluate(), oofem::GeneralBoundaryCondition::giveTimeFunction(), oofem::GeneralBoundaryCondition::isImposed(), oofem::FloatArray::times(), and oofem::FloatArray::zero().

Referenced by oofem::TR1_2D_SUPG_AXI::computeBCRhsTerm_MB(), oofem::SUPGElement2::computeBCRhsTerm_MB(), oofem::TR1_2D_SUPG::computeBCRhsTerm_MB(), oofem::TR1_2D_SUPG2::computeBCRhsTerm_MB(), oofem::TR1_2D_SUPG_AXI::computeBCRhsTerm_MC(), oofem::SUPGElement2::computeBCRhsTerm_MC(), oofem::TR1_2D_SUPG2_AXI::computeBCRhsTerm_MC(), oofem::TR1_2D_SUPG::computeBCRhsTerm_MC(), oofem::TrPlaneStrRot::computeBodyLoadVectorAt(), oofem::CCTPlate::computeBodyLoadVectorAt(), oofem::TrPlaneStrRot3d::computeBodyLoadVectorAt(), oofem::TrPlanestressRotAllman3d::computeBodyLoadVectorAt(), oofem::DKTPlate3d::computeBodyLoadVectorAt(), oofem::CCTPlate3d::computeBodyLoadVectorAt(), oofem::QDKTPlate::computeBodyLoadVectorAt(), oofem::DKTPlate::computeBodyLoadVectorAt(), oofem::Quad1Mindlin::computeBodyLoadVectorAt(), oofem::RerShell::computeBodyLoadVectorAt(), oofem::Quad1MindlinShell3D::computeBodyLoadVectorAt(), oofem::TR1_2D_PFEM::computeBodyLoadVectorAt(), oofem::StructuralElement::computeBodyLoadVectorAt(), oofem::BoundaryLoad::computeComponentArrayAt(), oofem::TR1_2D_CBS::computeConvectionTermsI(), oofem::Beam3d::computeInternalForcesFromBodyLoadVectorAtPoint(), oofem::TR1_2D_SUPG_AXI::computeLoadVector(), oofem::tet21ghostsolid::computeLoadVector(), oofem::Hexa21Stokes::computeLoadVector(), oofem::Tet21Stokes::computeLoadVector(), oofem::Tr21Stokes::computeLoadVector(), oofem::SUPGElement2::computeLoadVector(), oofem::Tr1BubbleStokes::computeLoadVector(), oofem::Tet1BubbleStokes::computeLoadVector(), oofem::TR1_2D_SUPG::computeLoadVector(), oofem::Node::computeLoadVector(), oofem::DofManager::computeLoadVector(), oofem::StructuralTemperatureLoad::computeValueAt(), oofem::DeadWeight::computeValueAt(), oofem::StructuralEigenstrainLoad::computeValueAt(), oofem::GravityPressure::computeValueAt(), oofem::PointLoad::computeValueAt(), oofem::Shell7Base::giveTractionBC(), and oofem::PFEM::solveYourselfAt().

void oofem::Load::computeValues ( FloatArray answer,
TimeStep tStep,
const FloatArray coords,
const IntArray dofids,
ValueModeType  mode 

Computes components values for specified dof ids.

If a dof id is not defined for the load, zero value is inserted. Typically boundary conditions would specify the full, or a subset of the dofids.

answerComponent values at given point and time.
tStepTime step representing time.
coordsGlobal (or local) problem coordinates, which are used to evaluate components values.
dofidsList of DOF IDs to evaluate for.
modeDetermines response mode.
Backwards compatibility with input files that don't specify dofs.

Reimplemented in oofem::ConstantPressureLoad.

Definition at line 57 of file load.C.

References oofem::FloatArray::at(), computeValueAt(), oofem::GeneralBoundaryCondition::dofs, oofem::IntArray::findFirstIndexOf(), oofem::IntArray::giveSize(), oofem::FloatArray::resize(), and oofem::FloatArray::zero().

Referenced by oofem::Beam2d::computeBoundaryEdgeLoadVector(), oofem::Beam3d::computeBoundaryEdgeLoadVector(), and oofem::Beam3d::computeInternalForcesFromBoundaryEdgeLoadVectorAtPoint().

virtual int oofem::Load::giveApproxOrder ( )
const FloatArray & oofem::Load::giveComponentArray ( ) const
Pointer to receiver component array, where component values of boundary condition are stored.

Definition at line 50 of file load.C.

References componentArray.

virtual CoordSystType oofem::Load::giveCoordSystMode ( )

Returns receiver's coordinate system.

Reimplemented in oofem::BoundaryLoad, oofem::PointLoad, and oofem::NodalLoad.

Definition at line 151 of file load.h.

virtual double oofem::Load::giveProperty ( int  aProperty,
TimeStep tStep 

Returns the value of a property 'aProperty'.

Property must be identified by unique integer id.

aPropertyid of property requested
property value

Reimplemented in oofem::BoundaryLoad.

Definition at line 166 of file load.h.

References OOFEM_ERROR.

IRResultType oofem::Load::initializeFrom ( InputRecord ir)

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.

See also
irInput record to initialize from.

Reimplemented from oofem::GeneralBoundaryCondition.

Reimplemented in oofem::BoundaryLoad, oofem::PointLoad, oofem::UserDefinedTemperatureField, oofem::NodalLoad, oofem::NeumannMomentLoad, oofem::ForeignTemperatureFieldLoad, oofem::ConstantSurfaceLoad, oofem::Reinforcement, oofem::ConstantPressureLoad, oofem::LinearEdgeLoad, oofem::GravityPressure, oofem::InteractionLoad, oofem::ConstantEdgeLoad, and oofem::TF1.

Definition at line 98 of file load.C.

References _IFT_Load_components, _IFT_Load_dofexcludemask, _IFT_Load_reference, oofem::IntArray::at(), oofem::FloatArray::at(), componentArray, dofExcludeMask, oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), oofem::InputRecord::hasField(), oofem::GeneralBoundaryCondition::initializeFrom(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_BAD_FORMAT, OOFEM_WARNING, reference, oofem::IntArray::resize(), and oofem::IntArray::zero().

Referenced by oofem::GravityPressure::initializeFrom(), oofem::NodalLoad::initializeFrom(), oofem::PointLoad::initializeFrom(), and oofem::BoundaryLoad::initializeFrom().

int oofem::Load::isDofExcluded ( int  index)

Returns the value of dofExcludeMask corresponding to given index.

See the description of dofExcludeMask attribute for more details.

indexIndex to check at.
Nonzero if excluded, zero otherwise.

Definition at line 141 of file load.C.

References oofem::IntArray::at(), dofExcludeMask, oofem::IntArray::giveSize(), and OOFEM_ERROR.

Referenced by oofem::TransportElement::computeBCSubMtrxAt(), and oofem::TransportElement::computeBCSubVectorAt().

void oofem::Load::scale ( double  s)

Scales the receiver according to given value.

Typically used in nondimensional analysis to scale down BCs and ICs.

sScale factor.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 154 of file load.C.

References componentArray, reference, and oofem::FloatArray::times().

void oofem::Load::setComponentArray ( FloatArray arry)

Definition at line 178 of file load.h.

Member Data Documentation

IntArray oofem::Load::dofExcludeMask

The load is specified for all dofs of object to which is associated.

For some types of boundary conditions the zero value of load does not mean that the load is not applied (newton's type of bc, for example). Then some mask, which allows to exclude specific dofs is necessary. The dofMask attribute is introduced to allow this. By default it is of the same size as componentArray, filled with zeroes. If some value of dofExcludeMask is set to nonzero, then the corresponding componentArray is set to zero.

Definition at line 96 of file load.h.

Referenced by giveInputRecord(), initializeFrom(), and isDofExcluded().

The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:37 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011