OOFEM 3.0
Loading...
Searching...
No Matches
oofem::BoundaryCondition Class Reference

#include <boundarycondition.h>

Inheritance diagram for oofem::BoundaryCondition:
Collaboration diagram for oofem::BoundaryCondition:

Public Member Functions

 BoundaryCondition (int i, Domain *d)
virtual ~BoundaryCondition ()
 Destructor.
virtual double give (Dof *dof, ValueModeType mode, TimeStep *tStep)
virtual double give (Dof *dof, ValueModeType mode, double time)
void setPrescribedValue (double s)
bcType giveType () const override
void initializeFrom (InputRecord &ir) override
void giveInputRecord (DynamicInputRecord &input) override
void scale (double s) override
const char * giveClassName () const override
const char * giveInputRecordName () const override
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 bcGeomType giveBCGeoType () const
virtual double giveProperty (int aProperty, TimeStep *tStep) const
void initializeFrom (InputRecord &ir) override
void giveInputRecord (DynamicInputRecord &input) override
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
virtual void updateYourself (TimeStep *tStep)
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
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).

Protected Attributes

FloatArray values
 Prescribed values for each resp. dof.
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

Class implementing Dirichlet boundary condition on DOF (primary boundary condition). This boundary condition is usually attribute of one or more degrees of freedom (DOF).

The type of unknown (physical meaning) is fully determined by corresponding DOF, to which given BC is associated. The previous implementation uses the 'prescribedValueDictionary' to store the unknowns types, but this makes sense, when BC is associated to node, but when associated to BC, the physical meaning of unknown is determined by DOF.

Boundary condition can change its value in time using its inherited TimeFunction. It can also switch itself on or off depending on nonzero value of isImposedTimeFunction load time function. Please note, that previous option must be supported by particular engineering model (because equation renumbering is necessary, and for incremental solution schemes DOFs unknown dictionaries must be used). See particular engineering model documentation for details.

The services provided include

  • Returning a component, i.e., the prescribed value of an unknown (displacement, velocity, temperature, etc). Determined using ValueModeType (determines whether for example total value or its change from previous step is requested) - method give.
  • Returning a value of isImposedTimeFunction, indicating whether b.c. is imposed or not in given time (nonzero indicates imposed BC) - method isImposed.

Definition at line 83 of file boundarycondition.h.

Constructor & Destructor Documentation

◆ BoundaryCondition()

◆ ~BoundaryCondition()

virtual oofem::BoundaryCondition::~BoundaryCondition ( )
inlinevirtual

Destructor.

Definition at line 98 of file boundarycondition.h.

Member Function Documentation

◆ give() [1/2]

◆ give() [2/2]

double oofem::BoundaryCondition::give ( Dof * dof,
ValueModeType mode,
TimeStep * tStep )
virtual

Returns the value of a prescribed unknown, respecting requested mode for given time. Its physical meaning is determined by corresponding DOF. This function should only be used if the BC is imposed.

See also
isImposed
Parameters
dofDetermines the dof subjected to receiver BC.
modeUnknown char type (if total or incremental value is returned).
tStepTime step to give value for.
Returns
Prescribed value of unknown or zero if not prescribed.

Reimplemented in oofem::InteractionBoundaryCondition.

Definition at line 48 of file boundarycondition.C.

References give(), oofem::TimeStep::giveIntrinsicTime(), oofem::TimeStep::giveTargetTime(), and oofem::TimeStep::giveTimeIncrement().

Referenced by oofem::PrimaryField::applyBoundaryCondition(), oofem::PrimaryField::applyBoundaryCondition(), give(), and oofem::GnuplotExportModule::outputReactionForces().

◆ giveClassName()

◆ giveInputRecord()

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

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::FEMComponent.

Reimplemented in oofem::PrescribedDispSlipBCDirichletRC, oofem::PrescribedGenStrainShell7, oofem::PrescribedGenStrainShell7, oofem::PrescribedGradient, oofem::RotatingBoundary, oofem::TransportGradientDirichlet, and oofem::UserDefDirichletBC.

Definition at line 106 of file boundarycondition.C.

References _IFT_BoundaryCondition_values, oofem::DynamicInputRecord::setField(), and values.

◆ giveInputRecordName()

const char * oofem::BoundaryCondition::giveInputRecordName ( ) const
inlineoverridevirtual

◆ giveType()

bcType oofem::BoundaryCondition::giveType ( ) const
inlineoverridevirtual
Returns
Type of boundary condition. It allows to distinguish BC according its mathematical meaning, ie. like Dirichlet, Neumann, or Newton type.

Reimplemented from oofem::GeneralBoundaryCondition.

Reimplemented in oofem::PrescribedGenStrainShell7, oofem::PrescribedGenStrainShell7, oofem::PrescribedGradient, oofem::TransportGradientDirichlet, and oofem::UserDefDirichletBC.

Definition at line 121 of file boundarycondition.h.

References oofem::DirichletBT.

◆ initializeFrom()

void oofem::BoundaryCondition::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::FEMComponent.

Reimplemented in oofem::PrescribedDispSlipBCDirichletRC, oofem::PrescribedGenStrainShell7, oofem::PrescribedGenStrainShell7, oofem::PrescribedGradient, oofem::RotatingBoundary, oofem::TransportGradientDirichlet, and oofem::UserDefDirichletBC.

Definition at line 80 of file boundarycondition.C.

References _IFT_BoundaryCondition_PrescribedValue, _IFT_BoundaryCondition_PrescribedValue_d, _IFT_BoundaryCondition_values, oofem::GeneralBoundaryCondition::dofs, oofem::InputRecord::hasField(), IR_GIVE_FIELD, and values.

◆ restoreContext()

void oofem::BoundaryCondition::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::FEMComponent.

Definition at line 143 of file boundarycondition.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, THROW_CIOERR, and values.

◆ saveContext()

void oofem::BoundaryCondition::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::FEMComponent.

Definition at line 129 of file boundarycondition.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, THROW_CIOERR, and values.

◆ scale()

void oofem::BoundaryCondition::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.

Reimplemented in oofem::PrescribedDispSlipBCDirichletRC, oofem::PrescribedGenStrainShell7, oofem::PrescribedGradient, oofem::RotatingBoundary, oofem::TractionPressureBC, oofem::TransportGradientDirichlet, and oofem::UserDefDirichletBC.

Definition at line 122 of file boundarycondition.C.

References values.

◆ setPrescribedValue()

void oofem::BoundaryCondition::setPrescribedValue ( double s)

Set prescribed value at the input record string of receiver

Parameters
sprescribed value
Todo
This function isn't as meaningful anymore. Possibly keep it if we change it to a vector. No inheriting b.c.s can overload this in a meaningful way.

Definition at line 114 of file boundarycondition.C.

References values.

Referenced by oofem::SolutionbasedShapeFunction::setBoundaryConditionOnDof().

Member Data Documentation

◆ values

FloatArray oofem::BoundaryCondition::values
protected

Prescribed values for each resp. dof.

Definition at line 87 of file boundarycondition.h.

Referenced by give(), giveInputRecord(), initializeFrom(), restoreContext(), saveContext(), scale(), and setPrescribedValue().


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