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

#include <solutionbasedshapefunction.h>

+ Inheritance diagram for oofem::SolutionbasedShapeFunction:
+ Collaboration diagram for oofem::SolutionbasedShapeFunction:

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 DofManagergiveInternalDofManager (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 DofgiveMasterDof (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...
 
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...
 
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...
 

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

NodemyNode
 
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
 
TimeStepthisTimestep
 
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...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

Detailed Description

Definition at line 69 of file solutionbasedshapefunction.h.

Constructor & Destructor Documentation

oofem::SolutionbasedShapeFunction::SolutionbasedShapeFunction ( int  n,
Domain d 
)
oofem::SolutionbasedShapeFunction::~SolutionbasedShapeFunction ( )
virtual

Definition at line 74 of file solutionbasedshapefunction.C.

Member Function Documentation

double oofem::SolutionbasedShapeFunction::checkIncompressibility ( EngngModel myEngngModel)
virtual const char* oofem::SolutionbasedShapeFunction::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 147 of file solutionbasedshapefunction.h.

void oofem::SolutionbasedShapeFunction::giveCorrectedValueAtPoint ( FloatArray answer,
const FloatArray coords,
IntArray dofID,
EngngModel myEngngModel 
)
private
virtual const char* oofem::SolutionbasedShapeFunction::giveInputRecordName ( ) const
inlinevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 148 of file solutionbasedshapefunction.h.

References _IFT_SolutionbasedShapeFunction_Name.

DofManager * oofem::SolutionbasedShapeFunction::giveInternalDofManager ( int  i)
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().

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

Give the pointer to master dof belonging to active DOF.

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

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 365 of file solutionbasedshapefunction.C.

References oofem::IntArray::at(), oofem::DofManager::giveDofWithID(), myDofIDs, and myNode.

virtual int oofem::SolutionbasedShapeFunction::giveNumberOfInternalDofManagers ( )
inlinevirtual

Gives the number of internal dof managers.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 132 of file solutionbasedshapefunction.h.

int oofem::SolutionbasedShapeFunction::giveNumberOfMasterDofs ( ActiveDof dof)
virtual

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

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

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 359 of file solutionbasedshapefunction.C.

References oofem::FEMComponent::giveDomain(), and oofem::Domain::giveNumberOfSpatialDimensions().

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

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 from oofem::ActiveBoundaryCondition.

Definition at line 287 of file solutionbasedshapefunction.C.

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

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 from oofem::ActiveBoundaryCondition.

Definition at line 293 of file solutionbasedshapefunction.C.

References computeDofTransformation(), oofem::FloatArray::dotProduct(), oofem::DofManager::giveUnknownVector(), myDofIDs, and myNode.

void oofem::SolutionbasedShapeFunction::giveValueAtPoint ( FloatArray answer,
const FloatArray coords,
IntArray dofID,
EngngModel myEngngModel 
)
private

giveValueAtPoint

Parameters
answerValues as point corresponding to the coordinate and dofID
coordsCoordinated at which evaluation takes place
dofIDSpecifies DofIDs to evaluate
myEngngModelEngngModel

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().

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

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

Returns
True if dof is prescribed.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 138 of file solutionbasedshapefunction.h.

IRResultType oofem::SolutionbasedShapeFunction::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
Todo:
This should be in the constructor:

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.

bool oofem::SolutionbasedShapeFunction::isCoeff ( ActiveDof dof)
private

Definition at line 122 of file solutionbasedshapefunction.C.

References myNode.

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

Checks to see if the dof is a primary DOF.

Returns
True if ActiveDof is a primary DOF.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 140 of file solutionbasedshapefunction.h.

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

Checks to see if active boundary condition requires special DOFs.

Returns
True if ActiveDof should be created.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 131 of file solutionbasedshapefunction.h.

void oofem::SolutionbasedShapeFunction::whichBoundary ( FloatArray coord,
bool &  isPlus,
bool &  isMinus,
bool &  isZero 
)
private

Member Data Documentation

double oofem::SolutionbasedShapeFunction::bigNorm
private

Definition at line 84 of file solutionbasedshapefunction.h.

bool oofem::SolutionbasedShapeFunction::dumpSnapshot
private

Definition at line 82 of file solutionbasedshapefunction.h.

Referenced by initializeFrom(), and loadProblem().

int oofem::SolutionbasedShapeFunction::externalSet
private

Definition at line 74 of file solutionbasedshapefunction.h.

Referenced by computeCorrectionFactors(), and initializeFrom().

std :: string oofem::SolutionbasedShapeFunction::filename
private

Definition at line 77 of file solutionbasedshapefunction.h.

Referenced by initializeFrom(), and loadProblem().

bool oofem::SolutionbasedShapeFunction::isLoaded
private
FloatArray oofem::SolutionbasedShapeFunction::maxCoord
private
FloatArray oofem::SolutionbasedShapeFunction::minCoord
private
std :: vector< modeStruct * > oofem::SolutionbasedShapeFunction::modes
private

Definition at line 89 of file solutionbasedshapefunction.h.

Referenced by computeDofTransformation(), and loadProblem().

IntArray oofem::SolutionbasedShapeFunction::myDofIDs
private

Definition at line 73 of file solutionbasedshapefunction.h.

Referenced by giveMasterDof(), and giveUnknown().

Node* oofem::SolutionbasedShapeFunction::myNode
private
int oofem::SolutionbasedShapeFunction::order
private

Definition at line 75 of file solutionbasedshapefunction.h.

Referenced by computeCorrectionFactors().

TimeStep* oofem::SolutionbasedShapeFunction::thisTimestep
private

Definition at line 92 of file solutionbasedshapefunction.h.

Referenced by giveValueAtPoint(), and loadProblem().

double oofem::SolutionbasedShapeFunction::TOL
private

Definition at line 76 of file solutionbasedshapefunction.h.

Referenced by computeBaseFunctionValueAt(), and whichBoundary().

bool oofem::SolutionbasedShapeFunction::useConstantBase
private

Definition at line 78 of file solutionbasedshapefunction.h.

Referenced by computeBaseFunctionValueAt(), and initializeFrom().

bool oofem::SolutionbasedShapeFunction::useCorrectionFactors
private

Definition at line 81 of file solutionbasedshapefunction.h.

Referenced by initializeFrom(), and loadProblem().

int oofem::SolutionbasedShapeFunction::worstIndex
private

Definition at line 85 of file solutionbasedshapefunction.h.


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