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

Abstract base class for all active boundary conditions. More...

#include <activebc.h>

+ Inheritance diagram for oofem::ActiveBoundaryCondition:
+ Collaboration diagram for oofem::ActiveBoundaryCondition:

Public Member Functions

 ActiveBoundaryCondition (int n, Domain *d)
 Constructor. More...
 
virtual ~ActiveBoundaryCondition ()
 Destructor. More...
 
IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0)
 Assembles B.C. More...
 
virtual void assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms=NULL)
 Assembles B.C. More...
 
virtual void giveLocationArrays (std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s)
 Gives a list of location arrays that will be assembled. More...
 
Methods supporting classical input files.
virtual void addElementSide (int elem, int side)
 Adds element for active boundary condition. More...
 
Functions related to boundary conditions which have to deal with special slave DOFs.

Boundary conditions that do not require slave dofs do not need to overload these functions.

See also
ActiveDof The active DOF passes these functions here.
virtual bool requiresActiveDofs ()
 Checks to see if active boundary condition requires special DOFs. More...
 
virtual bool isPrimaryDof (ActiveDof *dof)
 Checks to see if the dof is a primary DOF. More...
 
virtual double giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep)
 Returns the prescribed value of a dof (if any). More...
 
virtual bool hasBc (Dof *dof, TimeStep *tStep)
 Returns the prescribed value of a dof (if any). More...
 
virtual int giveNumberOfMasterDofs (ActiveDof *dof)
 Allows for active boundary conditions to handle their own special DOF. More...
 
virtual DofgiveMasterDof (ActiveDof *dof, int mdof)
 Give the pointer to master dof belonging to active DOF. More...
 
virtual void computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs)
 
virtual double giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
 Computes the value of the dof. More...
 
virtual double giveUnknown (ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
 Computes the value of the dof. 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 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 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...
 

Additional Inherited Members

- 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

Abstract base class for all active boundary conditions.

Design of active boundary conditions are subject to change.

Definition at line 63 of file activebc.h.

Constructor & Destructor Documentation

oofem::ActiveBoundaryCondition::ActiveBoundaryCondition ( int  n,
Domain d 
)
inline

Constructor.

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

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

Definition at line 71 of file activebc.h.

virtual oofem::ActiveBoundaryCondition::~ActiveBoundaryCondition ( )
inlinevirtual

Destructor.

Definition at line 73 of file activebc.h.

Member Function Documentation

virtual void oofem::ActiveBoundaryCondition::addElementSide ( int  elem,
int  side 
)
inlinevirtual

Adds element for active boundary condition.

Parameters
elemElement number.
sideSide number.

Reimplemented in oofem::WeakPeriodicBoundaryCondition.

Definition at line 96 of file activebc.h.

References OOFEM_ERROR.

virtual void oofem::ActiveBoundaryCondition::assemble ( SparseMtrx answer,
TimeStep tStep,
CharType  type,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s,
double  scale = 1.0 
)
inlinevirtual

Assembles B.C.

contributions to specified matrix.

Parameters
[in,out]answerMatrix to assemble to.
tStepActive time step.
tStepActive time step.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.
scaleScaling factor.

Reimplemented in oofem::WeakPeriodicBoundaryCondition, oofem::MixedGradientPressureNeumann, oofem::PrescribedGradientBCWeak, oofem::MixedGradientPressureWeakPeriodic, oofem::LinearConstraintBC, oofem::TransportGradientNeumann, oofem::PrescribedMean, oofem::PrescribedGradientBCNeumann, and oofem::SurfaceTensionBoundaryCondition.

Definition at line 109 of file activebc.h.

Referenced by oofem::TangentAssembler::assembleFromActiveBC(), and oofem::EffectiveTangentAssembler::assembleFromActiveBC().

virtual void oofem::ActiveBoundaryCondition::assembleVector ( FloatArray answer,
TimeStep tStep,
CharType  type,
ValueModeType  mode,
const UnknownNumberingScheme s,
FloatArray eNorms = NULL 
)
inlinevirtual

Assembles B.C.

contributions to specified vector.

Parameters
[in,out]answerVector to assemble to.
tStepActive time step.
typeType of matrix to assemble.
modeMode of value.
sNumbering scheme.
eNormsNorms for each dofid.
Returns
Equivalent of the sum of the element norm (squared) of assembled vector.

Reimplemented in oofem::WeakPeriodicBoundaryCondition, oofem::MixedGradientPressureNeumann, oofem::MixedGradientPressureDirichlet, oofem::PrescribedGradientBCWeak, oofem::MixedGradientPressureWeakPeriodic, oofem::LinearConstraintBC, oofem::PrescribedMean, oofem::TransportGradientNeumann, oofem::SurfaceTensionBoundaryCondition, and oofem::PrescribedGradientBCNeumann.

Definition at line 122 of file activebc.h.

Referenced by oofem::InternalForceAssembler::assembleFromActiveBC(), and oofem::ExternalForceAssembler::assembleFromActiveBC().

virtual void oofem::ActiveBoundaryCondition::computeDofTransformation ( ActiveDof dof,
FloatArray masterContribs 
)
inlinevirtual
virtual double oofem::ActiveBoundaryCondition::giveBcValue ( Dof dof,
ValueModeType  mode,
TimeStep tStep 
)
inlinevirtual
virtual void oofem::ActiveBoundaryCondition::giveLocationArrays ( std::vector< IntArray > &  rows,
std::vector< IntArray > &  cols,
CharType  type,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s 
)
inlinevirtual

Gives a list of location arrays that will be assembled.

This should only be used to construct zero structure in sparse matrices. The rows and columns location arrays returned in tuples (stored in vector), allowing to efficiently assemble and allocate off-diagonal blocks. The nonzero entries are assembled and allocated for entries at (rows[i], cols[i]) positions.

Parameters
rowsList of location arrays for r_s.
colsList of location arrays for c_s.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.

Reimplemented in oofem::MixedGradientPressureNeumann, oofem::PrescribedGradientBCWeak, oofem::MixedGradientPressureWeakPeriodic, oofem::LinearConstraintBC, oofem::TransportGradientNeumann, oofem::SurfaceTensionBoundaryCondition, and oofem::PrescribedGradientBCNeumann.

Definition at line 138 of file activebc.h.

Referenced by oofem::SkylineUnsym::buildInternalStructure(), oofem::PetscSparseMtrx::buildInternalStructure(), oofem::DynCompRow::buildInternalStructure(), oofem::DynCompCol::buildInternalStructure(), oofem::Skyline::buildInternalStructure(), oofem::SymCompCol::buildInternalStructure(), and oofem::CompCol::buildInternalStructure().

virtual Dof* oofem::ActiveBoundaryCondition::giveMasterDof ( ActiveDof dof,
int  mdof 
)
inlinevirtual

Give the pointer to master dof belonging to active DOF.

Parameters
dofActive dof belonging to receiver.
mdofLocal master dof number.
Returns
Master dof.

Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.

Definition at line 183 of file activebc.h.

References OOFEM_ERROR.

Referenced by oofem::ActiveDof::giveMasterDof().

virtual int oofem::ActiveBoundaryCondition::giveNumberOfMasterDofs ( ActiveDof dof)
inlinevirtual

Allows for active boundary conditions to handle their own special DOF.

Parameters
dofActive dof belonging to receiver.
Returns
Number of primary master DOFs.

Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.

Definition at line 172 of file activebc.h.

References OOFEM_ERROR.

Referenced by oofem::ActiveDof::giveNumberOfMasterDofs(), and oofem::ActiveDof::giveNumberOfPrimaryMasterDofs().

virtual double oofem::ActiveBoundaryCondition::giveUnknown ( PrimaryField field,
ValueModeType  mode,
TimeStep tStep,
ActiveDof dof 
)
inlinevirtual

Computes the value of the dof.

Parameters
fieldField to take value from.
modeMode of unknown value.
tStepTime step.
dofActive dof for which to obtain the value.
Returns
Value of dof.

Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.

Definition at line 200 of file activebc.h.

References OOFEM_ERROR.

Referenced by oofem::MixedGradientPressureWeakPeriodic::computeFields(), oofem::MixedGradientPressureNeumann::computeFields(), and oofem::ActiveDof::giveUnknown().

virtual double oofem::ActiveBoundaryCondition::giveUnknown ( ValueModeType  mode,
TimeStep tStep,
ActiveDof dof 
)
inlinevirtual

Computes the value of the dof.

Parameters
modeMode of unknown value.
tStepTime step.
dofActive dof for which to obtain the value.
Returns
Value of dof.

Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.

Definition at line 212 of file activebc.h.

References OOFEM_ERROR.

virtual bool oofem::ActiveBoundaryCondition::hasBc ( Dof dof,
TimeStep tStep 
)
inlinevirtual

Returns the prescribed value of a dof (if any).

Returns
True if dof is prescribed.

Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.

Definition at line 166 of file activebc.h.

Referenced by oofem::DofDistributedPrimaryField::applyBoundaryCondition(), and oofem::ActiveDof::hasBc().

IRResultType oofem::ActiveBoundaryCondition::initializeFrom ( InputRecord ir)
inlinevirtual

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::WeakPeriodicBoundaryCondition, oofem::MixedGradientPressureNeumann, oofem::SolutionbasedShapeFunction, oofem::MixedGradientPressureDirichlet, oofem::PrescribedGradientBCWeak, oofem::MixedGradientPressureWeakPeriodic, oofem::LinearConstraintBC, oofem::TransportGradientPeriodic, oofem::MixedGradientPressureBC, oofem::PrescribedMean, oofem::PrescribedGradientBCPeriodic, oofem::SurfaceTensionBoundaryCondition, oofem::TransportGradientNeumann, oofem::PrescribedGradientBCNeumann, oofem::PrescribedGradientBCWeakDirichlet, and oofem::PrescribedGradientBCWeakPeriodic.

Definition at line 75 of file activebc.h.

References _IFT_ActiveBoundaryCondition_elementSides, oofem::IntArray::giveSize(), oofem::GeneralBoundaryCondition::initializeFrom(), IR_GIVE_OPTIONAL_FIELD, and oofem::IRRT_OK.

Referenced by oofem::PrescribedGradientBCNeumann::initializeFrom(), oofem::TransportGradientNeumann::initializeFrom(), oofem::SurfaceTensionBoundaryCondition::initializeFrom(), oofem::PrescribedGradientBCPeriodic::initializeFrom(), oofem::TransportGradientPeriodic::initializeFrom(), oofem::LinearConstraintBC::initializeFrom(), oofem::PrescribedGradientBCWeak::initializeFrom(), oofem::SolutionbasedShapeFunction::initializeFrom(), and oofem::WeakPeriodicBoundaryCondition::initializeFrom().

virtual bool oofem::ActiveBoundaryCondition::isPrimaryDof ( ActiveDof dof)
inlinevirtual

Checks to see if the dof is a primary DOF.

Returns
True if ActiveDof is a primary DOF.

Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.

Definition at line 157 of file activebc.h.

Referenced by oofem::ActiveDof::isPrimaryDof().

virtual bool oofem::ActiveBoundaryCondition::requiresActiveDofs ( )
inlinevirtual

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

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