OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::BoundaryCondition Class Reference

Class implementing Dirichlet boundary condition on DOF (primary boundary condition). More...

#include <boundarycondition.h>

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

Public Member Functions

 BoundaryCondition (int i, Domain *d)
 Constructor. More...
 
virtual ~BoundaryCondition ()
 Destructor. More...
 
virtual double give (Dof *dof, ValueModeType mode, TimeStep *tStep)
 Returns the value of a prescribed unknown, respecting requested mode for given time. More...
 
virtual double give (Dof *dof, ValueModeType mode, double time)
 
void setPrescribedValue (double s)
 Set prescribed value at the input record string of receiver. More...
 
virtual bcType giveType () const
 
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...
 
virtual void scale (double s)
 Scales the receiver according to given value. More...
 
virtual const char * giveClassName () const
 
virtual const char * giveInputRecordName () const
 
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::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 bcGeomType giveBCGeoType () const
 Returns geometry character of boundary condition. More...
 
virtual void postInitialize ()
 Performs post initialization steps. 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...
 
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...
 

Protected Attributes

FloatArray values
 Prescribed values for each resp. dof. 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...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

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

oofem::BoundaryCondition::BoundaryCondition ( int  i,
Domain d 
)
inline

Constructor.

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

Parameters
iBoundary condition number.
dDomain to which new object will belongs.

Definition at line 95 of file boundarycondition.h.

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

Destructor.

Definition at line 98 of file boundarycondition.h.

Member Function Documentation

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 oofem::TimeStep::giveIntrinsicTime(), oofem::TimeStep::giveTargetTime(), and oofem::TimeStep::giveTimeIncrement().

Referenced by oofem::DofDistributedPrimaryField::applyBoundaryCondition(), oofem::PrimaryField::applyBoundaryCondition(), oofem::Dof::giveBcValue(), and oofem::GnuplotExportModule::outputReactionForces().

virtual const char* oofem::BoundaryCondition::giveClassName ( ) const
inlinevirtual
virtual const char* oofem::BoundaryCondition::giveInputRecordName ( ) const
inlinevirtual
virtual bcType oofem::BoundaryCondition::giveType ( ) const
inlinevirtual
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::TransportGradientDirichlet, oofem::UserDefDirichletBC, oofem::PrescribedGenStrainShell7, oofem::PrescribedGenStrainShell7, and oofem::PrescribedGradient.

Definition at line 121 of file boundarycondition.h.

References oofem::DirichletBT.

IRResultType oofem::BoundaryCondition::initializeFrom ( InputRecord ir)
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.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
Returns
IRResultType

Reimplemented from oofem::GeneralBoundaryCondition.

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

Definition at line 80 of file boundarycondition.C.

References _IFT_BoundaryCondition_PrescribedValue, _IFT_BoundaryCondition_PrescribedValue_d, _IFT_BoundaryCondition_values, oofem::FloatArray::add(), oofem::GeneralBoundaryCondition::dofs, oofem::IntArray::giveSize(), oofem::InputRecord::hasField(), oofem::GeneralBoundaryCondition::initializeFrom(), IR_GIVE_FIELD, oofem::IRRT_OK, oofem::FloatArray::resize(), values, and oofem::FloatArray::zero().

contextIOResultType oofem::BoundaryCondition::restoreContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
)
virtual

Restores the receiver state previously written in stream.

See also
saveContext
Parameters
streamInput stream.
modeDetermines amount of info available in stream (state, definition, ...).
objSpecial parameter for sending extra information.
Returns
contextIOResultType.
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 154 of file boundarycondition.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, oofem::GeneralBoundaryCondition::restoreContext(), oofem::FloatArray::restoreYourself(), THROW_CIOERR, and values.

contextIOResultType oofem::BoundaryCondition::saveContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
)
virtual

Stores receiver state to output stream.

Parameters
streamOutput stream.
modeDetermines amount of info required in stream (state, definition, ...).
objSpecial parameter, used only to send particular integration point to material class version of this method.
Returns
contextIOResultType.
Exceptions
throwsan ContextIOERR exception if error encountered.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 136 of file boundarycondition.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, oofem::GeneralBoundaryCondition::saveContext(), oofem::FloatArray::storeYourself(), THROW_CIOERR, and values.

void oofem::BoundaryCondition::scale ( double  s)
virtual

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::TransportGradientDirichlet, oofem::PrescribedGenStrainShell7, oofem::PrescribedGradient, oofem::UserDefDirichletBC, oofem::RotatingBoundary, and oofem::TractionPressureBC.

Definition at line 129 of file boundarycondition.C.

References oofem::FloatArray::times(), and values.

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 121 of file boundarycondition.C.

References oofem::FloatArray::add(), values, and oofem::FloatArray::zero().

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

Member Data Documentation

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 documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:33 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011