OOFEM 3.0
Loading...
Searching...
No Matches
oofem::Load Class Referenceabstract

#include <load.h>

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

Public Types

enum  CoordSystType { CST_Global , CST_Local , CST_UpdatedGlobal }
enum  FormulationType { FT_Entity , FT_Global }

Public Member Functions

 Load (int n, Domain *d)
virtual ~Load ()
 Destructor.
virtual void computeComponentArrayAt (FloatArray &answer, TimeStep *tStep, ValueModeType mode)
virtual void computeValueAt (FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)=0
virtual void computeValueAt (FloatArray &answer, TimeStep *tStep, GaussPoint *gp, ValueModeType mode)
virtual void computeValues (FloatArray &answer, TimeStep *tStep, const FloatArray &coords, const IntArray &dofids, ValueModeType mode)
int isDofExcluded (int index)
void scale (double s) override
virtual CoordSystType giveCoordSystMode ()
virtual FormulationType giveFormulationType ()
virtual int giveApproxOrder ()
virtual double giveProperty (int aProperty, TimeStep *tStep) const override
void initializeFrom (InputRecord &ir) override
void giveInputRecord (DynamicInputRecord &input) override
const FloatArraygiveComponentArray () const
void setComponentArray (FloatArray &arry)
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
Public Member Functions inherited from oofem::GeneralBoundaryCondition
 GeneralBoundaryCondition (int n, Domain *d)
virtual ~GeneralBoundaryCondition ()
 Destructor.
int giveSetNumber () const
virtual int giveNumberOfInternalDofManagers ()
 Gives the number of internal dof managers.
virtual DofManagergiveInternalDofManager (int i)
 Gives an internal dof manager from receiver.
FunctiongiveTimeFunction ()
int getIsImposedTimeFunctionNumber () const
void setIsImposedTimeFunctionNumber (int funcIndx)
virtual bcValType giveBCValType () const
virtual bool isImposed (TimeStep *tStep)
virtual const IntArraygiveDofIDs () const
virtual bcType giveType () const
virtual bcGeomType giveBCGeoType () const
virtual void updateYourself (TimeStep *tStep)
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
virtual const char * giveClassName () const =0
virtual const char * giveInputRecordName () const =0
DomaingiveDomain () 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 int checkConsistency ()
virtual void printOutputAt (FILE *file, TimeStep *tStep)
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging.
virtual InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Public Attributes

bool reference

Protected Attributes

FloatArray componentArray
 Components of boundary condition.
IntArray dofExcludeMask
Protected Attributes inherited from oofem::GeneralBoundaryCondition
int timeFunction
 Associated load time function.
bcValType valType
 Physical meaning of BC value.
IntArray dofs
 Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
int isImposedTimeFunction
int set
 Set number for boundary condition to be applied to.
Protected Attributes inherited from oofem::FEMComponent
int number
 Component number.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

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 62 of file load.h.

Member Enumeration Documentation

◆ CoordSystType

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).

Enumerator
CST_Global 

Load is specified in global c.s.

CST_Local 

Load is specified in local element c.s.

CST_UpdatedGlobal 

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

Definition at line 70 of file load.h.

◆ FormulationType

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

Enumerator
FT_Entity 
FT_Global 

Definition at line 79 of file load.h.

Constructor & Destructor Documentation

◆ Load()

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

◆ ~Load()

virtual oofem::Load::~Load ( )
inlinevirtual

Destructor.

Definition at line 110 of file load.h.

Member Function Documentation

◆ computeComponentArrayAt()

void oofem::Load::computeComponentArrayAt ( FloatArray & answer,
TimeStep * tStep,
ValueModeType mode )
virtual

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)

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

Reimplemented in oofem::BoundaryLoad, and oofem::UsrDefBoundaryLoad.

Definition at line 84 of file load.C.

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

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

◆ computeValueAt() [1/2]

◆ computeValueAt() [2/2]

virtual void oofem::Load::computeValueAt ( FloatArray & answer,
TimeStep * tStep,
GaussPoint * gp,
ValueModeType mode )
inlinevirtual

Computes components values of load at given point - global coordinates (coordinates given).

Parameters
answerComponent values at given point and time.
tStepTime step representing time.
gpIntegration point.
modeDetermines response mode.

Reimplemented in oofem::DepositedHeatSource.

Definition at line 136 of file load.h.

References computeValueAt(), FT_Entity, giveFormulationType(), oofem::GaussPoint::giveGlobalCoordinates(), and oofem::GaussPoint::giveNaturalCoordinates().

◆ computeValues()

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

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.

Parameters
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.
Note
Backwards compatibility with input files that don't specify dofs.

Reimplemented in oofem::ConstantPressureLoad.

Definition at line 59 of file load.C.

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

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

◆ giveApproxOrder()

◆ giveComponentArray()

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

Definition at line 52 of file load.C.

References componentArray.

◆ giveCoordSystMode()

virtual CoordSystType oofem::Load::giveCoordSystMode ( )
inlinevirtual

Returns receiver's coordinate system.

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

Definition at line 166 of file load.h.

References CST_Global.

◆ giveFormulationType()

◆ giveInputRecord()

void oofem::Load::giveInputRecord ( DynamicInputRecord & input)
overridevirtual

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::GeneralBoundaryCondition.

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

Definition at line 124 of file load.C.

References _IFT_Load_components, _IFT_Load_dofexcludemask, _IFT_Load_reference, componentArray, dofExcludeMask, reference, and oofem::DynamicInputRecord::setField().

◆ giveProperty()

virtual double oofem::Load::giveProperty ( int aProperty,
TimeStep * tStep ) const
inlineoverridevirtual

Returns the value of a property 'aProperty'. Property must be identified by unique integer id.

Parameters
aPropertyid of property requested
Returns
property value

Reimplemented from oofem::GeneralBoundaryCondition.

Reimplemented in oofem::BoundaryLoad.

Definition at line 181 of file load.h.

References OOFEM_ERROR.

◆ initializeFrom()

void oofem::Load::initializeFrom ( InputRecord & ir)
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.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::GeneralBoundaryCondition.

Reimplemented in oofem::NeumannMomentLoad, oofem::NodalLoad, oofem::PointLoad, oofem::Reinforcement, oofem::TF1, oofem::UserDefinedTemperatureField, and oofem::UsrDefBoundaryLoad.

Definition at line 100 of file load.C.

References _IFT_Load_components, _IFT_Load_dofexcludemask, _IFT_Load_reference, componentArray, dofExcludeMask, oofem::InputRecord::hasField(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, and reference.

◆ isDofExcluded()

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

Returns the value of dofExcludeMask corresponding to given index. See the description of dofExcludeMask attribute for more details.

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

Definition at line 136 of file load.C.

References dofExcludeMask, and OOFEM_ERROR.

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

◆ restoreContext()

void oofem::Load::restoreContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Restores the receiver state previously written in stream.

See also
saveContext
Parameters
streamInput stream.
modeDetermines amount of info available in stream (state, definition, ...).
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented from oofem::GeneralBoundaryCondition.

Reimplemented in oofem::NodalLoad, and oofem::UsrDefBoundaryLoad.

Definition at line 177 of file load.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, componentArray, dofExcludeMask, oofem::DataStream::read(), reference, and THROW_CIOERR.

◆ saveContext()

void oofem::Load::saveContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Stores receiver state to output stream.

Parameters
streamOutput stream.
modeDetermines amount of info required in stream (state, definition, ...).
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented from oofem::GeneralBoundaryCondition.

Reimplemented in oofem::NodalLoad, and oofem::UsrDefBoundaryLoad.

Definition at line 157 of file load.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, componentArray, dofExcludeMask, reference, THROW_CIOERR, and oofem::DataStream::write().

◆ scale()

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

Scales the receiver according to given value. Typically used in nondimensional analysis to scale down BCs and ICs.

Parameters
sScale factor.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 149 of file load.C.

References componentArray, and reference.

◆ setComponentArray()

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

Definition at line 192 of file load.h.

References componentArray.

Member Data Documentation

◆ componentArray

◆ dofExcludeMask

IntArray oofem::Load::dofExcludeMask
protected

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 97 of file load.h.

Referenced by giveInputRecord(), initializeFrom(), isDofExcluded(), Load(), restoreContext(), and saveContext().

◆ reference


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011