OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
#include <solutionbasedshapefunction.h>
Public Member Functions | |
SolutionbasedShapeFunction (int n, Domain *d) | |
virtual | ~SolutionbasedShapeFunction () |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual bool | requiresActiveDofs () |
Checks to see if active boundary condition requires special DOFs. 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... | |
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... | |
virtual bool | hasBc (Dof *dof, TimeStep *tStep) |
Returns the prescribed value of a dof (if any). More... | |
virtual bool | isPrimaryDof (ActiveDof *dof) |
Checks to see if the dof is a primary DOF. More... | |
virtual void | computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs) |
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 const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
double | checkIncompressibility (EngngModel &myEngngModel) |
Public Member Functions inherited from oofem::ActiveBoundaryCondition | |
ActiveBoundaryCondition (int n, Domain *d) | |
Constructor. More... | |
virtual | ~ActiveBoundaryCondition () |
Destructor. 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... | |
virtual void | addElementSide (int elem, int side) |
Adds element for active boundary condition. More... | |
virtual double | giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep) |
Returns the prescribed value of a dof (if any). 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... | |
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... | |
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... | |
Private Member Functions | |
bool | isCoeff (ActiveDof *dof) |
void | updateModelWithFactors (modeStruct *m) |
void | setBoundaryConditionOnDof (Dof *d, double value) |
void | setLoads (EngngModel *myEngngModel, int d) |
void | loadProblem () |
void | init () |
void | computeCorrectionFactors (modeStruct &myMode, IntArray *Dofs, double *am, double *ap) |
void | giveValueAtPoint (FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel) |
giveValueAtPoint More... | |
void | giveCorrectedValueAtPoint (FloatArray &answer, const FloatArray &coords, IntArray &dofID, EngngModel &myEngngModel) |
void | splitBoundaryNodeIDs (modeStruct &mode, Element &e, IntArray &boundary, IntArray &pList, IntArray &mList, IntArray &zList, FloatMatrix &nodeValues) |
void | computeBaseFunctionValueAt (FloatArray &answer, FloatArray &coords, IntArray &dofIDs, EngngModel &myEngngModel) |
void | initializeSurfaceData (modeStruct *mode) |
void | copyDofManagersToSurfaceData (modeStruct *mode, IntArray nodeList, bool isPlus, bool isMinus, bool isZero) |
void | whichBoundary (FloatArray &coord, bool &isPlus, bool &isMinus, bool &isZero) |
Private Attributes | |
Node * | myNode |
IntArray | myDofIDs |
int | externalSet |
int | order |
double | TOL |
std::string | filename |
bool | useConstantBase |
bool | isLoaded |
bool | useCorrectionFactors |
bool | dumpSnapshot |
double | bigNorm |
int | worstIndex |
std::vector< modeStruct * > | modes |
TimeStep * | thisTimestep |
FloatArray | maxCoord |
FloatArray | minCoord |
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... | |
Definition at line 69 of file solutionbasedshapefunction.h.
oofem::SolutionbasedShapeFunction::SolutionbasedShapeFunction | ( | int | n, |
Domain * | d | ||
) |
|
virtual |
Definition at line 74 of file solutionbasedshapefunction.C.
double oofem::SolutionbasedShapeFunction::checkIncompressibility | ( | EngngModel & | myEngngModel | ) |
|
private |
Definition at line 506 of file solutionbasedshapefunction.C.
References oofem::FloatArray::at(), oofem::FloatArray::clear(), oofem::FEMComponent::giveDomain(), oofem::EngngModel::giveDomain(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), oofem::Domain::giveSpatialLocalizer(), giveValueAtPoint(), oofem::SpatialLocalizer::init(), isLoaded, loadProblem(), maxCoord, minCoord, oofem::FloatArray::resize(), TOL, useConstantBase, and oofem::FloatArray::zero().
Referenced by computeCorrectionFactors(), and copyDofManagersToSurfaceData().
|
private |
Definition at line 149 of file solutionbasedshapefunction.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FEInterpolation::boundaryEvalN(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::FEInterpolation::boundaryGiveTransformationJacobian(), oofem::FEInterpolation::boundaryLocal2Global(), computeBaseFunctionValueAt(), oofem::GeneralBoundaryCondition::dofs, oofem::FloatArray::dotProduct(), externalSet, oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::Set::giveBoundaryList(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), oofem::modeStruct::myEngngModel, N, order, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), splitBoundaryNodeIDs(), oofem::FloatArray::zero(), and oofem::FloatMatrix::zero().
Referenced by loadProblem().
|
virtual |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 309 of file solutionbasedshapefunction.C.
References oofem::FloatArray::at(), oofem::SurfaceDataStruct::DofID, oofem::SurfaceDataStruct::DofMan, oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::FEMComponent::giveDomain(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfSpatialDimensions(), isLoaded, loadProblem(), modes, OOFEM_ERROR, oofem::FloatArray::resize(), oofem::modeStruct::SurfaceData, oofem::SurfaceDataStruct::value, and whichBoundary().
Referenced by giveUnknown().
|
private |
Definition at line 812 of file solutionbasedshapefunction.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), computeBaseFunctionValueAt(), oofem::SurfaceDataStruct::DofID, oofem::SurfaceDataStruct::DofMan, oofem::GeneralBoundaryCondition::dofs, oofem::DofManager::giveCoordinates(), oofem::Domain::giveDofManager(), oofem::EngngModel::giveDomain(), oofem::IntArray::giveSize(), oofem::SurfaceDataStruct::isFree, oofem::SurfaceDataStruct::isMinus, oofem::SurfaceDataStruct::isPlus, oofem::SurfaceDataStruct::isZeroBoundary, oofem::modeStruct::myEngngModel, oofem::modeStruct::SurfaceData, and oofem::SurfaceDataStruct::value.
Referenced by initializeSurfaceData().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 147 of file solutionbasedshapefunction.h.
|
private |
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 148 of file solutionbasedshapefunction.h.
References _IFT_SolutionbasedShapeFunction_Name.
|
virtual |
Gives an internal dof manager from receiver.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 116 of file solutionbasedshapefunction.C.
References myNode.
Referenced by oofem::MatlabExportModule::doOutputSpecials().
Give the pointer to master dof belonging to active DOF.
dof | Active dof belonging to receiver. |
mdof | Local master dof number. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 365 of file solutionbasedshapefunction.C.
References oofem::IntArray::at(), oofem::DofManager::giveDofWithID(), myDofIDs, and myNode.
|
inlinevirtual |
Gives the number of internal dof managers.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 132 of file solutionbasedshapefunction.h.
|
virtual |
Allows for active boundary conditions to handle their own special DOF.
dof | Active dof belonging to receiver. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 359 of file solutionbasedshapefunction.C.
References oofem::FEMComponent::giveDomain(), and oofem::Domain::giveNumberOfSpatialDimensions().
|
virtual |
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 from oofem::ActiveBoundaryCondition.
Definition at line 287 of file solutionbasedshapefunction.C.
|
virtual |
Computes the value of the dof.
mode | Mode of unknown value. |
tStep | Time step. |
dof | Active dof for which to obtain the value. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 293 of file solutionbasedshapefunction.C.
References computeDofTransformation(), oofem::FloatArray::dotProduct(), oofem::DofManager::giveUnknownVector(), myDofIDs, and myNode.
|
private |
giveValueAtPoint
answer | Values as point corresponding to the coordinate and dofID |
coords | Coordinated at which evaluation takes place |
dofID | Specifies DofIDs to evaluate |
myEngngModel | EngngModel |
Definition at line 589 of file solutionbasedshapefunction.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::Element::computeField(), oofem::EngngModel::giveDomain(), oofem::SpatialLocalizer::giveElementClosestToPoint(), oofem::Element::giveElementDofIDMask(), oofem::IntArray::giveSize(), oofem::Domain::giveSpatialLocalizer(), OOFEM_WARNING, oofem::FloatArray::pY(), oofem::FloatArray::resize(), and thisTimestep.
Referenced by computeBaseFunctionValueAt().
Returns the prescribed value of a dof (if any).
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 138 of file solutionbasedshapefunction.h.
|
private |
Definition at line 133 of file solutionbasedshapefunction.C.
References oofem::FloatArray::at(), oofem::Node::giveCoordinates(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveNode(), oofem::FloatArray::giveSize(), oofem::max(), maxCoord, oofem::min(), and minCoord.
Referenced by initializeFrom().
|
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.
ir | Input record to initialize from. |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 80 of file solutionbasedshapefunction.C.
References _IFT_SolutionbasedShapeFunction_DumpSnapshots, _IFT_SolutionbasedShapeFunction_Externalset, _IFT_SolutionbasedShapeFunction_ShapeFunctionFile, _IFT_SolutionbasedShapeFunction_UseCorrectionFactors, oofem::DofManager::appendDof(), oofem::FEMComponent::domain, dumpSnapshot, externalSet, filename, oofem::FEMComponent::giveDomain(), oofem::Domain::giveNextFreeDofID(), oofem::Domain::giveNumberOfSpatialDimensions(), init(), oofem::ActiveBoundaryCondition::initializeFrom(), IR_GIVE_OPTIONAL_FIELD, myNode, useConstantBase, and useCorrectionFactors.
|
private |
Definition at line 643 of file solutionbasedshapefunction.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryGiveNodes(), copyDofManagersToSurfaceData(), oofem::FEMComponent::domain, oofem::IntArray::erase(), oofem::Set::giveBoundaryList(), oofem::DofManager::giveCoordinates(), oofem::Domain::giveDofManager(), oofem::Element::giveDofManager(), oofem::Element::giveDofManagerNumber(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveSet(), oofem::GeneralBoundaryCondition::giveSetNumber(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), oofem::IntArray::insertOnce(), maxCoord, minCoord, oofem::modeStruct::myEngngModel, oofem::FloatArray::printYourself(), and oofem::FloatArray::resize().
Referenced by loadProblem().
|
private |
Definition at line 122 of file solutionbasedshapefunction.C.
References myNode.
|
inlinevirtual |
Checks to see if the dof is a primary DOF.
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 140 of file solutionbasedshapefunction.h.
|
private |
Definition at line 371 of file solutionbasedshapefunction.C.
References oofem::_processor, oofem::FloatArray::add(), oofem::modeStruct::am, oofem::modeStruct::ap, oofem::FloatArray::at(), computeCorrectionFactors(), oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, dumpSnapshot, filename, oofem::DofManager::giveCoordinates(), oofem::Domain::giveNumberOfSpatialDimensions(), initializeSurfaceData(), oofem::InstanciateProblem(), isLoaded, modes, oofem::modeStruct::myEngngModel, OOFEM_LOG_INFO, OOFEM_WARNING, oofem::FloatArray::resize(), setLoads(), thisTimestep, updateModelWithFactors(), useCorrectionFactors, and oofem::FloatArray::zero().
Referenced by computeBaseFunctionValueAt(), and computeDofTransformation().
|
inlinevirtual |
Checks to see if active boundary condition requires special DOFs.
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 131 of file solutionbasedshapefunction.h.
|
private |
Definition at line 618 of file solutionbasedshapefunction.C.
References _IFT_BoundaryCondition_PrescribedValue, _IFT_GeneralBoundaryCondition_timeFunct, oofem::classFactory, oofem::ClassFactory::createBoundaryCondition(), oofem::Domain::giveBc(), oofem::Dof::giveBcId(), oofem::Dof::giveDofManager(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveNumberOfBoundaryConditions(), oofem::GeneralBoundaryCondition::initializeFrom(), oofem::Dof::setBcId(), oofem::Domain::setBoundaryCondition(), oofem::DynamicInputRecord::setField(), oofem::BoundaryCondition::setPrescribedValue(), and oofem::DynamicInputRecord::setRecordKeywordField().
Referenced by updateModelWithFactors().
|
private |
Definition at line 478 of file solutionbasedshapefunction.C.
References _IFT_GeneralBoundaryCondition_timeFunct, _IFT_Load_components, oofem::IntArray::at(), oofem::FloatArray::at(), oofem::classFactory, oofem::ClassFactory::createBoundaryCondition(), oofem::FEMComponent::giveDomain(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), oofem::Domain::giveNumberOfBoundaryConditions(), oofem::IntArray::giveSize(), oofem::GeneralBoundaryCondition::initializeFrom(), oofem::FloatArray::resize(), oofem::IntArray::resizeWithValues(), oofem::Domain::setBoundaryCondition(), oofem::DynamicInputRecord::setField(), oofem::DynamicInputRecord::setRecordKeywordField(), and oofem::FloatArray::zero().
Referenced by loadProblem().
|
private |
Definition at line 247 of file solutionbasedshapefunction.C.
References oofem::IntArray::at(), oofem::FloatMatrix::at(), oofem::IntArray::clear(), oofem::GeneralBoundaryCondition::dofs, oofem::DofManager::giveCoordinates(), oofem::Element::giveDofManager(), oofem::IntArray::giveSize(), oofem::IntArray::insertSorted(), oofem::modeStruct::SurfaceData, and whichBoundary().
Referenced by computeCorrectionFactors().
|
private |
Definition at line 457 of file solutionbasedshapefunction.C.
References oofem::modeStruct::am, oofem::modeStruct::ap, oofem::SurfaceDataStruct::DofID, oofem::SurfaceDataStruct::DofMan, oofem::DofManager::giveDofWithID(), setBoundaryConditionOnDof(), and oofem::modeStruct::SurfaceData.
Referenced by loadProblem().
|
private |
Definition at line 797 of file solutionbasedshapefunction.C.
References oofem::FloatArray::at(), oofem::FloatArray::giveSize(), maxCoord, minCoord, and TOL.
Referenced by computeDofTransformation(), and splitBoundaryNodeIDs().
|
private |
Definition at line 84 of file solutionbasedshapefunction.h.
|
private |
Definition at line 82 of file solutionbasedshapefunction.h.
Referenced by initializeFrom(), and loadProblem().
|
private |
Definition at line 74 of file solutionbasedshapefunction.h.
Referenced by computeCorrectionFactors(), and initializeFrom().
|
private |
Definition at line 77 of file solutionbasedshapefunction.h.
Referenced by initializeFrom(), and loadProblem().
|
private |
Definition at line 79 of file solutionbasedshapefunction.h.
Referenced by computeBaseFunctionValueAt(), computeDofTransformation(), and loadProblem().
|
private |
Definition at line 94 of file solutionbasedshapefunction.h.
Referenced by computeBaseFunctionValueAt(), init(), initializeSurfaceData(), and whichBoundary().
|
private |
Definition at line 94 of file solutionbasedshapefunction.h.
Referenced by computeBaseFunctionValueAt(), init(), initializeSurfaceData(), and whichBoundary().
|
private |
Definition at line 89 of file solutionbasedshapefunction.h.
Referenced by computeDofTransformation(), and loadProblem().
|
private |
Definition at line 73 of file solutionbasedshapefunction.h.
Referenced by giveMasterDof(), and giveUnknown().
|
private |
Definition at line 72 of file solutionbasedshapefunction.h.
Referenced by giveInternalDofManager(), giveMasterDof(), giveUnknown(), initializeFrom(), and isCoeff().
|
private |
Definition at line 75 of file solutionbasedshapefunction.h.
Referenced by computeCorrectionFactors().
|
private |
Definition at line 92 of file solutionbasedshapefunction.h.
Referenced by giveValueAtPoint(), and loadProblem().
|
private |
Definition at line 76 of file solutionbasedshapefunction.h.
Referenced by computeBaseFunctionValueAt(), and whichBoundary().
|
private |
Definition at line 78 of file solutionbasedshapefunction.h.
Referenced by computeBaseFunctionValueAt(), and initializeFrom().
|
private |
Definition at line 81 of file solutionbasedshapefunction.h.
Referenced by initializeFrom(), and loadProblem().
|
private |
Definition at line 85 of file solutionbasedshapefunction.h.