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

Abstract base class for all boundary conditions of problem. More...

#include <generalboundarycondition.h>

+ Inheritance diagram for oofem::GeneralBoundaryCondition:
+ Collaboration diagram for oofem::GeneralBoundaryCondition:

Public Member Functions

 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 scale (double s)
 Scales the receiver according to given value. More...
 
virtual void postInitialize ()
 Performs post initialization steps. 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...
 
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...
 

Protected Attributes

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

Abstract base class for all boundary conditions of problem.

Boundary condition is an attribute of the domain (it belongs to). General BC is also attribute of several elements, nodes, Dofs and so on, which are subjected to boundary condition.

This base class only declares itself as a base class of all boundary conditions, and declares only very basic services. This base class introduces 'TimeFunction' as an attribute of each boundary condition. 'TimeFunction' represent time variation, its value is dependent on time step. The value (or the components) of a boundary condition (load) will be the product of its value by the value of the associated load time function at given time step. The meaning of boundary condition components is dependent on particular boundary condition type, and should be defined in derived classes documentation.

This base class introduces also two general services for requesting boundary condition physical meaning and boundary condition geometrical character (pointwise, acting on element body or edge and so on).

Derived classes should represent the base classes for particular boundary condition type (like force load, or boundary condition prescribed directly on some dof) and should declare the basic common interface.

Definition at line 81 of file generalboundarycondition.h.

Constructor & Destructor Documentation

oofem::GeneralBoundaryCondition::GeneralBoundaryCondition ( int  n,
Domain d 
)

Constructor.

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

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

Definition at line 45 of file generalboundarycondition.C.

References isImposedTimeFunction, and timeFunction.

virtual oofem::GeneralBoundaryCondition::~GeneralBoundaryCondition ( )
inlinevirtual

Destructor.

Definition at line 106 of file generalboundarycondition.h.

Member Function Documentation

virtual bcGeomType oofem::GeneralBoundaryCondition::giveBCGeoType ( ) const
inlinevirtual

Returns geometry character of boundary condition.

For available values see cltypes.h file. Derived classes should always overload, default implementation returns UnknownLoadGT value.

Reimplemented in oofem::PointLoad, oofem::NodalLoad, oofem::NeumannMomentLoad, oofem::ConstantSurfaceLoad, oofem::ConstantPressureLoad, oofem::LinearEdgeLoad, oofem::Reinforcement, oofem::InteractionLoad, oofem::GravityPressure, oofem::ConstantEdgeLoad, oofem::StructuralEigenstrainLoad, oofem::DeadWeight, oofem::BodyLoad, and oofem::StructuralTemperatureLoad.

Definition at line 153 of file generalboundarycondition.h.

References oofem::UnknownBGT.

Referenced by oofem::SUPGElement::computeBCLhsPressureTerm_MC(), oofem::SUPGElement::computeBCLhsTerm_MB(), oofem::TR1_2D_SUPG_AXI::computeBCRhsTerm_MB(), oofem::SUPGElement2::computeBCRhsTerm_MB(), oofem::TR1_2D_SUPG2_AXI::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::TransportElement::computeBCSubMtrxAt(), oofem::TransportElement::computeBCSubVectorAt(), 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::Quad1MindlinShell3D::computeBodyLoadVectorAt(), oofem::StructuralElement::computeBodyLoadVectorAt(), oofem::TR1_2D_CBS::computeConvectionTermsI(), oofem::TR1_2D_CBS::computeDiffusionTermsI(), oofem::Tr1Darcy::computeExternalForcesVector(), oofem::Hexa21Stokes::computeExternalForcesVector(), oofem::Tet21Stokes::computeExternalForcesVector(), oofem::Tr21Stokes::computeExternalForcesVector(), oofem::Tr1BubbleStokes::computeExternalForcesVector(), oofem::Tet1BubbleStokes::computeExternalForcesVector(), oofem::Beam3d::computeInternalForcesFromBodyLoadVectorAtPoint(), oofem::Lattice2d_mt::computeInternalSourceRhsVectorAt(), oofem::DofManager::computeLoadVector(), oofem::BeamBaseElement::computeLocalForceLoadVector(), and oofem::Beam3d::giveInternalForcesVectorAtPoint().

virtual bcValType oofem::GeneralBoundaryCondition::giveBCValType ( ) const
inlinevirtual

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.

Reimplemented in oofem::Reinforcement, oofem::StructuralEigenstrainLoad, oofem::DeadWeight, and oofem::StructuralTemperatureLoad.

Definition at line 130 of file generalboundarycondition.h.

Referenced by oofem::SUPGElement::computeBCLhsPressureTerm_MC(), oofem::SUPGElement::computeBCLhsTerm_MB(), 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::Quad1MindlinShell3D::computeBodyLoadVectorAt(), oofem::StructuralElement::computeBodyLoadVectorAt(), oofem::TR1_2D_CBS::computeConvectionTermsI(), oofem::Hexa21Stokes::computeExternalForcesVector(), oofem::Tet21Stokes::computeExternalForcesVector(), oofem::Tr21Stokes::computeExternalForcesVector(), oofem::Tr1BubbleStokes::computeExternalForcesVector(), oofem::Tet1BubbleStokes::computeExternalForcesVector(), oofem::Beam3d::computeInternalForcesFromBodyLoadVectorAtPoint(), oofem::TR1_2D_SUPG_AXI::computeLoadVector(), oofem::SUPGElement2::computeLoadVector(), oofem::TR1_2D_SUPG::computeLoadVector(), oofem::BeamBaseElement::computeLocalForceLoadVector(), oofem::StructuralElement::computeResultingIPEigenstrainAt(), oofem::StructuralElement::computeResultingIPTemperatureAt(), giveInputRecord(), and oofem::Beam3d::giveInternalForcesVectorAtPoint().

virtual const IntArray& oofem::GeneralBoundaryCondition::giveDofIDs ( ) const
inlinevirtual
void oofem::GeneralBoundaryCondition::giveInputRecord ( DynamicInputRecord input)
virtual

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::FEMComponent.

Reimplemented in oofem::Load, oofem::BoundaryLoad, oofem::MixedGradientPressureNeumann, oofem::MixedGradientPressureDirichlet, oofem::PrescribedGradientBCWeak, oofem::BoundaryCondition, oofem::MixedGradientPressureWeakPeriodic, oofem::PrescribedGenStrainShell7, oofem::UserDefDirichletBC, oofem::TransportGradientDirichlet, oofem::PrescribedGenStrainShell7, oofem::PointLoad, oofem::NodalLoad, oofem::TransportGradientPeriodic, oofem::PrescribedGradient, oofem::ConstantSurfaceLoad, oofem::ConstantPressureLoad, oofem::PrescribedGradientBCPeriodic, oofem::LinearEdgeLoad, oofem::RotatingBoundary, oofem::InteractionLoad, oofem::TransportGradientNeumann, and oofem::PrescribedGradientBCNeumann.

Definition at line 108 of file generalboundarycondition.C.

References _IFT_GeneralBoundaryCondition_dofs, _IFT_GeneralBoundaryCondition_isImposedTimeFunct, _IFT_GeneralBoundaryCondition_set, _IFT_GeneralBoundaryCondition_timeFunct, _IFT_GeneralBoundaryCondition_valType, giveBCValType(), giveDofIDs(), oofem::FEMComponent::giveInputRecord(), giveSetNumber(), isImposedTimeFunction, oofem::DynamicInputRecord::setField(), and timeFunction.

Referenced by oofem::PrescribedGradientBCNeumann::giveInputRecord(), oofem::RotatingBoundary::giveInputRecord(), oofem::PrescribedGradientBCPeriodic::giveInputRecord(), oofem::PrescribedGradient::giveInputRecord(), oofem::TransportGradientPeriodic::giveInputRecord(), oofem::TransportGradientDirichlet::giveInputRecord(), oofem::UserDefDirichletBC::giveInputRecord(), oofem::MixedGradientPressureWeakPeriodic::giveInputRecord(), oofem::BoundaryCondition::giveInputRecord(), oofem::MixedGradientPressureDirichlet::giveInputRecord(), oofem::PrescribedGradientBCWeak::giveInputRecord(), oofem::MixedGradientPressureNeumann::giveInputRecord(), oofem::Load::giveInputRecord(), and oofem::T3DInterface::t3d_2_OOFEM().

IRResultType oofem::GeneralBoundaryCondition::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::FEMComponent.

Reimplemented in oofem::Load, oofem::WeakPeriodicBoundaryCondition, oofem::BoundaryLoad, oofem::MixedGradientPressureNeumann, oofem::SolutionbasedShapeFunction, oofem::MixedGradientPressureDirichlet, oofem::PrescribedGradientBCWeak, oofem::BoundaryCondition, oofem::MixedGradientPressureWeakPeriodic, oofem::PrescribedGenStrainShell7, oofem::UserDefDirichletBC, oofem::LinearConstraintBC, oofem::TransportGradientDirichlet, oofem::PrescribedGenStrainShell7, oofem::PointLoad, oofem::UserDefinedTemperatureField, oofem::NodalLoad, oofem::NeumannMomentLoad, oofem::ForeignTemperatureFieldLoad, oofem::TransportGradientPeriodic, oofem::PrescribedGradient, oofem::ConstantSurfaceLoad, oofem::MixedGradientPressureBC, oofem::Reinforcement, oofem::ConstantPressureLoad, oofem::PrescribedMean, oofem::PrescribedGradientBCPeriodic, oofem::LinearEdgeLoad, oofem::RotatingBoundary, oofem::GravityPressure, oofem::ActiveBoundaryCondition, oofem::InteractionLoad, oofem::SurfaceTensionBoundaryCondition, oofem::TransportGradientNeumann, oofem::ConstantEdgeLoad, oofem::PrescribedGradientBCNeumann, oofem::TF1, oofem::PrescribedGradientBCWeakDirichlet, and oofem::PrescribedGradientBCWeakPeriodic.

Definition at line 66 of file generalboundarycondition.C.

References _IFT_GeneralBoundaryCondition_dofs, _IFT_GeneralBoundaryCondition_isImposedTimeFunct, _IFT_GeneralBoundaryCondition_set, _IFT_GeneralBoundaryCondition_timeFunct, _IFT_GeneralBoundaryCondition_valType, oofem::IntArray::clear(), dofs, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_BAD_FORMAT, oofem::IRRT_OK, isImposedTimeFunction, OOFEM_WARNING, timeFunction, and valType.

Referenced by oofem::MacroLSpace::changeMicroBoundaryConditions(), oofem::PrescribedGenStrainShell7::computeTangent(), oofem::Subdivision::createMesh(), oofem::ActiveBoundaryCondition::initializeFrom(), oofem::RotatingBoundary::initializeFrom(), oofem::PrescribedMean::initializeFrom(), oofem::MixedGradientPressureBC::initializeFrom(), oofem::PrescribedGradient::initializeFrom(), oofem::TransportGradientDirichlet::initializeFrom(), oofem::UserDefDirichletBC::initializeFrom(), oofem::PrescribedGenStrainShell7::initializeFrom(), oofem::BoundaryCondition::initializeFrom(), oofem::Load::initializeFrom(), oofem::SolutionbasedShapeFunction::setBoundaryConditionOnDof(), oofem::SolutionbasedShapeFunction::setLoads(), and oofem::T3DInterface::t3d_2_OOFEM().

contextIOResultType oofem::GeneralBoundaryCondition::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::FEMComponent.

Reimplemented in oofem::BoundaryCondition, and oofem::LinearConstraintBC.

Definition at line 144 of file generalboundarycondition.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, oofem::DataStream::read(), THROW_CIOERR, and timeFunction.

Referenced by oofem::BoundaryCondition::restoreContext().

contextIOResultType oofem::GeneralBoundaryCondition::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::FEMComponent.

Reimplemented in oofem::BoundaryCondition, and oofem::LinearConstraintBC.

Definition at line 131 of file generalboundarycondition.C.

References oofem::CIO_IOERR, oofem::CIO_OK, CM_Definition, THROW_CIOERR, timeFunction, and oofem::DataStream::write().

Referenced by oofem::BoundaryCondition::saveContext().

virtual void oofem::GeneralBoundaryCondition::scale ( double  s)
inlinevirtual

Member Data Documentation

IntArray oofem::GeneralBoundaryCondition::dofs
protected

Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).

Definition at line 89 of file generalboundarycondition.h.

Referenced by oofem::SurfaceTensionBoundaryCondition::assemble(), oofem::TransportGradientNeumann::assemble(), oofem::MixedGradientPressureWeakPeriodic::assemble(), oofem::MixedGradientPressureNeumann::assemble(), oofem::SurfaceTensionBoundaryCondition::assembleVector(), oofem::TransportGradientNeumann::assembleVector(), oofem::MixedGradientPressureWeakPeriodic::assembleVector(), oofem::MixedGradientPressureNeumann::assembleVector(), oofem::TransportGradientDirichlet::computeCoefficientMatrix(), oofem::SolutionbasedShapeFunction::computeCorrectionFactors(), oofem::MixedGradientPressureNeumann::computeFields(), oofem::TransportGradientNeumann::computeTangent(), oofem::TransportGradientPeriodic::computeTangent(), oofem::TransportGradientDirichlet::computeTangent(), oofem::MixedGradientPressureNeumann::computeTangents(), oofem::Load::computeValues(), oofem::SolutionbasedShapeFunction::copyDofManagersToSurfaceData(), oofem::PrescribedGenStrainShell7::evaluateHigherOrderContribution(), oofem::PrescribedGradient::give(), oofem::BoundaryCondition::give(), oofem::SurfaceTensionBoundaryCondition::giveLocationArrays(), oofem::TransportGradientNeumann::giveLocationArrays(), oofem::MixedGradientPressureWeakPeriodic::giveLocationArrays(), oofem::MixedGradientPressureNeumann::giveLocationArrays(), oofem::BoundaryCondition::initializeFrom(), initializeFrom(), oofem::SolutionbasedShapeFunction::loadProblem(), oofem::SolutionbasedShapeFunction::splitBoundaryNodeIDs(), oofem::PrescribedGradient::updateCoefficientMatrix(), and oofem::PrescribedGenStrainShell7::updateCoefficientMatrix().

int oofem::GeneralBoundaryCondition::isImposedTimeFunction
protected

Zero by default - the BC is than always imposed.

Otherwise the number of associated load time function. If the load time function returns aero value, the BC is inactive.

Definition at line 94 of file generalboundarycondition.h.

Referenced by GeneralBoundaryCondition(), giveInputRecord(), initializeFrom(), and isImposed().

int oofem::GeneralBoundaryCondition::set
protected

Set number for boundary condition to be applied to.

Definition at line 96 of file generalboundarycondition.h.

int oofem::GeneralBoundaryCondition::timeFunction
protected
bcValType oofem::GeneralBoundaryCondition::valType
protected

Physical meaning of BC value.

Definition at line 87 of file generalboundarycondition.h.

Referenced by initializeFrom().


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:36 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011