OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Prescribes where are primary unknown. More...
#include <transportgradientdirichlet.h>
Public Member Functions | |
TransportGradientDirichlet (int n, Domain *d) | |
Creates boundary condition with given number, belonging to given domain. More... | |
virtual | ~TransportGradientDirichlet () |
Destructor. 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 void | postInitialize () |
Performs post initialization steps. More... | |
virtual double | give (Dof *dof, ValueModeType mode, double time) |
virtual bcType | giveType () const |
double | domainSize () |
void | computeCoefficientMatrix (FloatMatrix &C) |
Constructs a coefficient matrix for all prescribed unknowns. More... | |
virtual void | computeField (FloatArray &sigma, TimeStep *tStep) |
Computes the homogenized, macroscopic, field (stress). More... | |
virtual void | computeTangent (FloatMatrix &tangent, TimeStep *tStep) |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis. More... | |
void | computeXi () |
Computes the offset values for "improved" Dirichlet. See class description. More... | |
virtual void | scale (double s) |
Scales the receiver according to given value. More... | |
virtual const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
Public Member Functions inherited from oofem::BoundaryCondition | |
BoundaryCondition (int i, Domain *d) | |
Constructor. More... | |
virtual | ~BoundaryCondition () |
Destructor. More... | |
virtual double | give (Dof *dof, ValueModeType mode, TimeStep *tStep) |
Returns the value of a prescribed unknown, respecting requested mode for given time. More... | |
void | setPrescribedValue (double s) |
Set prescribed value at 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::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 bcGeomType | giveBCGeoType () const |
Returns geometry character of boundary condition. 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... | |
Protected Attributes | |
FloatArray | mGradient |
FloatArray | mCenterCoord |
bool | tractionControl |
std::map< int, FloatArray > | xis |
Stores one "psi" value for each node. More... | |
IntArray | surfSets |
Protected Attributes inherited from oofem::BoundaryCondition | |
FloatArray | values |
Prescribed values for each resp. dof. More... | |
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... | |
Prescribes where are primary unknown.
This is typical boundary condition in multiscale analysis where would be a macroscopic gradient at the integration point, i.e. this is a boundary condition for prolongation. It is also convenient to use when one wants to test a arbitrary specimen for a given average gradient.
Definition at line 73 of file transportgradientdirichlet.h.
|
inline |
Creates boundary condition with given number, belonging to given domain.
n | Boundary condition number. |
d | Domain to which new object will belongs. |
Definition at line 90 of file transportgradientdirichlet.h.
|
inlinevirtual |
Destructor.
Definition at line 93 of file transportgradientdirichlet.h.
void oofem::TransportGradientDirichlet::computeCoefficientMatrix | ( | FloatMatrix & | C | ) |
Constructs a coefficient matrix for all prescribed unknowns.
Helper routine for computational homogenization.
C | Coefficient matrix to fill. |
Definition at line 172 of file transportgradientdirichlet.C.
References oofem::Dof::__givePrescribedEquationNumber(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, oofem::Domain::giveDofManagers(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::Domain::giveNumberOfSpatialDimensions(), mCenterCoord, oofem::FloatMatrix::resize(), tractionControl, xis, and oofem::FloatMatrix::zero().
Referenced by computeField(), and computeTangent().
|
virtual |
Computes the homogenized, macroscopic, field (stress).
sigma | Output quantity (typically stress). |
tStep | Active time step. |
Definition at line 203 of file transportgradientdirichlet.C.
References oofem::EngngModel::assembleVector(), oofem::FloatArray::beTProductOf(), computeCoefficientMatrix(), oofem::FEMComponent::domain, domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::FEMComponent::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::FloatArray::times(), and oofem::FloatArray::zero().
|
virtual |
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
tangent | Output tangent. |
tStep | Active time step. |
Definition at line 225 of file transportgradientdirichlet.C.
References oofem::EngngModel::assemble(), oofem::FloatArray::at(), oofem::FloatMatrix::beTProductOf(), oofem::classFactory, computeCoefficientMatrix(), oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, domainSize(), oofem::Element_remote, oofem::Timer::getUtime(), oofem::Domain::giveDofManagers(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumberOfElements(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Element::giveParallelMode(), oofem::Element::giveRotationMatrix(), oofem::Element::isActivated(), oofem::FloatMatrix::isNotEmpty(), mCenterCoord, NM_NoSuccess, OOFEM_ERROR, OOFEM_LOG_INFO, oofem::FloatMatrix::rotatedWith(), oofem::ST_Petsc, oofem::Timer::startTimer(), oofem::Timer::stopTimer(), and oofem::FloatMatrix::times().
void oofem::TransportGradientDirichlet::computeXi | ( | ) |
Computes the offset values for "improved" Dirichlet. See class description.
Definition at line 343 of file transportgradientdirichlet.C.
References oofem::FloatArray::add(), oofem::FloatMatrix::assemble(), oofem::FloatArray::assemble(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatArray::beProductOf(), oofem::FloatMatrix::beProductOf(), oofem::FloatArray::beScaled(), oofem::FloatArray::beTProductOf(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation3d::boundaryEdgeGiveNodes(), oofem::FEInterpolation3d::boundaryEdgeGiveTransformationJacobian(), oofem::FEInterpolation3d::boundaryEvalN(), oofem::FEInterpolation3d::boundaryEvalNormal(), oofem::FEInterpolation3d::boundaryGiveNodes(), oofem::classFactory, oofem::IntArray::containsSorted(), oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), oofem::FEMComponent::domain, oofem::FloatArray::dotProduct(), oofem::FEInterpolation3d::edgeEvaldNdxi(), oofem::IntArray::followedBy(), oofem::IntegrationRule::getIntegrationPoint(), oofem::FEInterpolation3d::giveBoundaryEdgeIntegrationRule(), oofem::FEInterpolation3d::giveBoundaryIntegrationRule(), oofem::Set::giveBoundaryList(), oofem::Node::giveCoordinates(), oofem::EngngModel::giveCurrentStep(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Element::giveNode(), oofem::Set::giveNodeList(), oofem::FEMComponent::giveNumber(), oofem::FloatMatrix::giveNumberOfColumns(), oofem::FloatMatrix::giveNumberOfRows(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), oofem::IntArray::insertSortedOnce(), oofem::FloatMatrix::negated(), oofem::FloatArray::normalize(), OOFEM_LOG_INFO, oofem::FloatMatrix::plusDyadSymmUpper(), oofem::FloatMatrix::plusDyadUnsym(), oofem::FloatMatrix::plusProductSymmUpper(), oofem::IntArray::preallocate(), oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::Set::setEdgeList(), oofem::ST_Petsc, oofem::FEInterpolation3d::surfaceEvaldNdx(), surfSets, oofem::FloatMatrix::symmetrized(), oofem::FloatArray::times(), and xis.
Referenced by postInitialize().
double oofem::TransportGradientDirichlet::domainSize | ( | ) |
Definition at line 142 of file transportgradientdirichlet.C.
References oofem::IntArray::at(), oofem::FEMComponent::domain, oofem::FEInterpolation::evalNXIntegral(), oofem::Set::giveBoundaryList(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), surfSets, and tractionControl.
Referenced by computeField(), and computeTangent().
|
virtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 111 of file transportgradientdirichlet.C.
References oofem::FloatArray::add(), oofem::FloatArray::beDifferenceOf(), oofem::FloatArray::dotProduct(), oofem::Function::evaluateAccelerationAtTime(), oofem::Function::evaluateAtTime(), oofem::Function::evaluateVelocityAtTime(), oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofManager(), oofem::FEMComponent::giveNumber(), oofem::FloatArray::giveSize(), oofem::GeneralBoundaryCondition::giveTimeFunction(), mCenterCoord, mGradient, OOFEM_ERROR, and xis.
|
inlinevirtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 131 of file transportgradientdirichlet.h.
|
virtual |
Setups the input record string of receiver.
input | Dynamic input record to be filled by receiver. |
Reimplemented from oofem::BoundaryCondition.
Definition at line 89 of file transportgradientdirichlet.C.
References _IFT_TransportGradientDirichlet_centerCoords, _IFT_TransportGradientDirichlet_gradient, _IFT_TransportGradientDirichlet_surfSets, _IFT_TransportGradientDirichlet_tractionControl, oofem::GeneralBoundaryCondition::giveInputRecord(), mCenterCoord, mGradient, oofem::DynamicInputRecord::setField(), surfSets, and tractionControl.
|
inlinevirtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 132 of file transportgradientdirichlet.h.
References _IFT_TransportGradientDirichlet_Name.
|
inlinevirtual |
Reimplemented from oofem::BoundaryCondition.
Definition at line 101 of file transportgradientdirichlet.h.
References oofem::DirichletBT.
|
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::BoundaryCondition.
Definition at line 71 of file transportgradientdirichlet.C.
References _IFT_TransportGradientDirichlet_centerCoords, _IFT_TransportGradientDirichlet_gradient, _IFT_TransportGradientDirichlet_surfSets, _IFT_TransportGradientDirichlet_tractionControl, oofem::InputRecord::hasField(), oofem::GeneralBoundaryCondition::initializeFrom(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mCenterCoord, mGradient, oofem::FloatArray::resize(), surfSets, and tractionControl.
|
virtual |
Performs post initialization steps.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 103 of file transportgradientdirichlet.C.
References computeXi(), oofem::GeneralBoundaryCondition::postInitialize(), and tractionControl.
|
inlinevirtual |
Scales the receiver according to given value.
Typically used in nondimensional analysis to scale down BCs and ICs.
s | Scale factor. |
Reimplemented from oofem::BoundaryCondition.
Definition at line 129 of file transportgradientdirichlet.h.
References oofem::FloatArray::times().
|
protected |
Definition at line 77 of file transportgradientdirichlet.h.
Referenced by computeCoefficientMatrix(), computeTangent(), give(), giveInputRecord(), and initializeFrom().
|
protected |
Definition at line 76 of file transportgradientdirichlet.h.
Referenced by give(), giveInputRecord(), and initializeFrom().
|
protected |
Definition at line 82 of file transportgradientdirichlet.h.
Referenced by computeXi(), domainSize(), giveInputRecord(), and initializeFrom().
|
protected |
Definition at line 79 of file transportgradientdirichlet.h.
Referenced by computeCoefficientMatrix(), domainSize(), giveInputRecord(), initializeFrom(), and postInitialize().
|
protected |
Stores one "psi" value for each node.
Definition at line 81 of file transportgradientdirichlet.h.
Referenced by computeCoefficientMatrix(), computeXi(), and give().