OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Abstract base class for all active boundary conditions. More...
#include <activebc.h>
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.
| |
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 Dof * | giveMasterDof (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 DofManager * | giveInternalDofManager (int i) |
Gives an internal dof manager from receiver. More... | |
Function * | giveTimeFunction () |
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 IntArray & | giveDofIDs () 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 |
Domain * | giveDomain () 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 Interface * | giveInterface (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... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
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.
|
inline |
Constructor.
Creates boundary an active condition with given number, belonging to given domain.
n | Boundary condition number. |
d | Domain to which new object will belongs. |
Definition at line 71 of file activebc.h.
|
inlinevirtual |
Destructor.
Definition at line 73 of file activebc.h.
|
inlinevirtual |
Adds element for active boundary condition.
elem | Element number. |
side | Side number. |
Reimplemented in oofem::WeakPeriodicBoundaryCondition.
Definition at line 96 of file activebc.h.
References OOFEM_ERROR.
|
inlinevirtual |
Assembles B.C.
contributions to specified matrix.
[in,out] | answer | Matrix to assemble to. |
tStep | Active time step. | |
tStep | Active time step. | |
type | Type of matrix to assemble. | |
r_s | Row numbering scheme. | |
c_s | Column numbering scheme. | |
scale | Scaling 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().
|
inlinevirtual |
Assembles B.C.
contributions to specified vector.
[in,out] | answer | Vector to assemble to. |
tStep | Active time step. | |
type | Type of matrix to assemble. | |
mode | Mode of value. | |
s | Numbering scheme. | |
eNorms | Norms for each dofid. |
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().
|
inlinevirtual |
Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.
Definition at line 188 of file activebc.h.
References OOFEM_ERROR.
Referenced by oofem::ActiveDof::computeDofTransformation().
|
inlinevirtual |
Returns the prescribed value of a dof (if any).
Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.
Definition at line 161 of file activebc.h.
Referenced by oofem::DofDistributedPrimaryField::applyBoundaryCondition(), and oofem::ActiveDof::giveBcValue().
|
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.
rows | List of location arrays for r_s. |
cols | List of location arrays for c_s. |
type | Type of matrix to assemble. |
r_s | Row numbering scheme. |
c_s | Column 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().
|
inlinevirtual |
Give the pointer to master dof belonging to active DOF.
dof | Active dof belonging to receiver. |
mdof | Local master dof number. |
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().
|
inlinevirtual |
Allows for active boundary conditions to handle their own special DOF.
dof | Active dof belonging to receiver. |
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().
|
inlinevirtual |
Computes the value of the dof.
field | Field to take value from. |
mode | Mode of unknown value. |
tStep | Time step. |
dof | Active dof for which to obtain the value. |
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().
|
inlinevirtual |
Computes the value of the dof.
mode | Mode of unknown value. |
tStep | Time step. |
dof | Active dof for which to obtain the value. |
Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.
Definition at line 212 of file activebc.h.
References OOFEM_ERROR.
Returns the prescribed value of a dof (if any).
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().
|
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.
ir | Input record to initialize from. |
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().
|
inlinevirtual |
Checks to see if the dof 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().
|
inlinevirtual |
Checks to see if active boundary condition requires special DOFs.
Reimplemented in oofem::MixedGradientPressureDirichlet, oofem::SolutionbasedShapeFunction, oofem::TransportGradientPeriodic, and oofem::PrescribedGradientBCPeriodic.
Definition at line 152 of file activebc.h.
Referenced by oofem::Domain::createDofs(), oofem::StaticStructural::requiresEquationRenumbering(), oofem::TransientTransportProblem::requiresEquationRenumbering(), and oofem::IncrementalLinearStatic::solveYourselfAt().