OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Prescribes where is unknown, loaded by a pressure. More...
#include <mixedgradientpressuredirichlet.h>
Public Member Functions | |
MixedGradientPressureDirichlet (int n, Domain *d) | |
Creates boundary condition with given number, belonging to given domain. More... | |
virtual | ~MixedGradientPressureDirichlet () |
Destructor. More... | |
virtual int | giveNumberOfInternalDofManagers () |
Returns the number of internal DOF managers (=2). More... | |
virtual DofManager * | giveInternalDofManager (int i) |
Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2. 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 | scale (double s) |
Scales the receiver according to given value. More... | |
virtual void | computeFields (FloatArray &stressDev, double &vol, TimeStep *tStep) |
Computes the homogenized fields through sensitivity analysis. More... | |
virtual void | computeTangents (FloatMatrix &Ed, FloatArray &Ep, FloatArray &Cd, double &Cp, TimeStep *tStep) |
Computes the macroscopic tangents through sensitivity analysis. More... | |
virtual void | setPrescribedPressure (double p) |
Set prescribed pressure. More... | |
virtual void | setPrescribedDeviatoricGradientFromVoigt (const FloatArray &ddev) |
Sets the prescribed tensor from the matrix from given Voigt notation. More... | |
virtual void | setCenterCoordinate (const FloatArray &x) |
Set the center coordinate. More... | |
virtual FloatArray & | giveCenterCoordinate () |
Returns the center coordinate. More... | |
virtual void | assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms=NULL) |
Assembles B.C. More... | |
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... | |
bool | isDevDof (Dof *dof) |
Returns true is DOF represents one of the deviatoric parts. 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) |
double | giveUnknown (double vol, const FloatArray &dev, ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
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 const char * | giveClassName () const |
virtual const char * | giveInputRecordName () const |
Public Member Functions inherited from oofem::MixedGradientPressureBC | |
MixedGradientPressureBC (int n, Domain *d) | |
Creates boundary condition with given number, belonging to given domain. More... | |
virtual | ~MixedGradientPressureBC () |
Destructor. More... | |
virtual bcType | giveType () const |
Not relevant for this boundary condition. More... | |
double | domainSize () |
Computes the size (including pores) by surface integral over the domain. More... | |
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 | 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... | |
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 bcGeomType | giveBCGeoType () const |
Returns geometry character of boundary condition. More... | |
virtual void | postInitialize () |
Performs post initialization steps. 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... | |
Protected Member Functions | |
Dof * | giveVolDof () |
Protected Attributes | |
FloatArray | devGradient |
Prescribed gradient in Voigt form. More... | |
FloatArray | centerCoord |
Center coordinate . More... | |
double | pressure |
Prescribed pressure. More... | |
std::unique_ptr< Node > | voldman |
DOF-manager containing the unknown volumetric strain(rate). More... | |
int | vol_id |
std::unique_ptr< Node > | devdman |
DOF-manager containing the known deviatoric strain(rate). More... | |
IntArray | dev_id |
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 is unknown, loaded by a pressure.
This is mixed Dirichlet boundary condition in multiscale analysis where would 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 shear.
Definition at line 72 of file mixedgradientpressuredirichlet.h.
oofem::MixedGradientPressureDirichlet::MixedGradientPressureDirichlet | ( | int | n, |
Domain * | d | ||
) |
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 59 of file mixedgradientpressuredirichlet.C.
References oofem::IntArray::clear(), dev_id, devdman, oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfSpatialDimensions(), vol_id, and voldman.
|
virtual |
Destructor.
Definition at line 83 of file mixedgradientpressuredirichlet.C.
|
virtual |
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 from oofem::ActiveBoundaryCondition.
Definition at line 399 of file mixedgradientpressuredirichlet.C.
References oofem::FloatArray::at(), oofem::MixedGradientPressureBC::domainSize(), oofem::Dof::giveDofID(), oofem::Dof::giveEquationNumber(), giveVolDof(), and pressure.
|
virtual |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 132 of file mixedgradientpressuredirichlet.C.
References oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), centerCoord, devdman, oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::FloatArray::giveSize(), OOFEM_ERROR, and oofem::FloatArray::resize().
|
virtual |
Computes the homogenized fields through sensitivity analysis.
[out] | stressDev | Computes the homogenized deviatoric stress. |
[out] | vol | Computes the homogenized volumetric gradient. |
tStep | Time step for which field to obtain. |
Implements oofem::MixedGradientPressureBC.
Definition at line 234 of file mixedgradientpressuredirichlet.C.
References oofem::EngngModel::assembleVector(), oofem::FloatArray::at(), oofem::FEMComponent::domain, oofem::MixedGradientPressureBC::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::FEMComponent::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Dof::giveUnknown(), giveVolDof(), pressure, oofem::FloatArray::resize(), oofem::FloatArray::subtract(), oofem::FloatArray::times(), and oofem::FloatArray::zero().
|
virtual |
Computes the macroscopic tangents through sensitivity analysis.
[out] | Ed | Tangent . |
[out] | Ep | Tangent . |
[out] | Cd | Tangent . |
[out] | Cp | Tangent . |
tStep | Time step for the tangents. |
Implements oofem::MixedGradientPressureBC.
Definition at line 258 of file mixedgradientpressuredirichlet.C.
References oofem::EngngModel::assemble(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::classFactory, oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), dev_id, devdman, devGradient, oofem::FEMComponent::domain, oofem::MixedGradientPressureBC::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveEngngModel(), oofem::Dof::giveEqn(), oofem::FloatMatrix::giveNumberOfColumns(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::FloatArray::giveSize(), giveVolDof(), OOFEM_ERROR, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::ST_Petsc, oofem::FloatMatrix::subtract(), oofem::FloatArray::times(), oofem::FloatMatrix::times(), oofem::FloatArray::zero(), and oofem::FloatMatrix::zero().
|
virtual |
Returns the prescribed value of a dof (if any).
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 424 of file mixedgradientpressuredirichlet.C.
References dev_id, devGradient, oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), isDevDof(), and OOFEM_ERROR.
|
inlinevirtual |
Returns the center coordinate.
Definition at line 146 of file mixedgradientpressuredirichlet.h.
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 169 of file mixedgradientpressuredirichlet.h.
|
virtual |
Setups the input record string of receiver.
input | Dynamic input record to be filled by receiver. |
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 458 of file mixedgradientpressuredirichlet.C.
References _IFT_MixedGradientPressure_centerCoords, _IFT_MixedGradientPressure_devGradient, _IFT_MixedGradientPressure_pressure, centerCoord, devGradient, oofem::GeneralBoundaryCondition::giveInputRecord(), pressure, and oofem::DynamicInputRecord::setField().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 170 of file mixedgradientpressuredirichlet.h.
References _IFT_MixedGradientPressureDirichlet_Name.
|
virtual |
Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 100 of file mixedgradientpressuredirichlet.C.
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 119 of file mixedgradientpressuredirichlet.C.
References dev_id, devdman, isDevDof(), and voldman.
|
virtual |
Returns the number of internal DOF managers (=2).
This boundary condition stores its own DOF managers, one for in which the DOFs are prescribed and one for for single free volumetric strain rate.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 94 of file mixedgradientpressuredirichlet.C.
|
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 110 of file mixedgradientpressuredirichlet.C.
References devdman, and isDevDof().
double oofem::MixedGradientPressureDirichlet::giveUnknown | ( | double | vol, |
const FloatArray & | dev, | ||
ValueModeType | mode, | ||
TimeStep * | tStep, | ||
ActiveDof * | dof | ||
) |
Definition at line 185 of file mixedgradientpressuredirichlet.C.
References oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), centerCoord, oofem::DofManager::giveCoordinates(), oofem::Dof::giveDofID(), oofem::Dof::giveDofManager(), oofem::FloatArray::giveSize(), and OOFEM_ERROR.
Referenced by giveUnknown().
|
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 375 of file mixedgradientpressuredirichlet.C.
References dev_id, devGradient, oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), giveUnknown(), giveVolDof(), and isDevDof().
|
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 384 of file mixedgradientpressuredirichlet.C.
References dev_id, devGradient, oofem::IntArray::findFirstIndexOf(), oofem::Dof::giveDofID(), giveUnknown(), giveVolDof(), and isDevDof().
|
protected |
Definition at line 88 of file mixedgradientpressuredirichlet.C.
References voldman.
Referenced by assembleVector(), computeFields(), computeTangents(), and giveUnknown().
Returns the prescribed value of a dof (if any).
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 434 of file mixedgradientpressuredirichlet.C.
References isDevDof().
|
virtual |
Initializes receiver according to object description stored in input record.
The input record contains two fields;
Reimplemented from oofem::MixedGradientPressureBC.
Definition at line 446 of file mixedgradientpressuredirichlet.C.
References _IFT_MixedGradientPressure_centerCoords, centerCoord, oofem::FEMComponent::domain, oofem::Domain::giveNumberOfSpatialDimensions(), oofem::MixedGradientPressureBC::initializeFrom(), IR_GIVE_OPTIONAL_FIELD, oofem::FloatArray::resize(), and oofem::FloatArray::zero().
bool oofem::MixedGradientPressureDirichlet::isDevDof | ( | Dof * | dof | ) |
Returns true is DOF represents one of the deviatoric parts.
Definition at line 440 of file mixedgradientpressuredirichlet.C.
References devdman, and oofem::Dof::giveDofManager().
Referenced by giveBcValue(), giveMasterDof(), giveNumberOfMasterDofs(), giveUnknown(), hasBc(), and isPrimaryDof().
|
virtual |
Checks to see if the dof is a primary DOF.
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 418 of file mixedgradientpressuredirichlet.C.
References isDevDof().
|
inlinevirtual |
Checks to see if active boundary condition requires special DOFs.
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 152 of file mixedgradientpressuredirichlet.h.
|
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::GeneralBoundaryCondition.
Definition at line 129 of file mixedgradientpressuredirichlet.h.
References oofem::FloatArray::times().
|
inlinevirtual |
Set the center coordinate.
x | New center coordinate. |
Definition at line 144 of file mixedgradientpressuredirichlet.h.
|
virtual |
Sets the prescribed tensor from the matrix from given Voigt notation.
Assumes use of double values (gamma) for off-diagonal, usually the way for strain in Voigt form.
ddev | Vector in Voigt format. |
Implements oofem::MixedGradientPressureBC.
Definition at line 393 of file mixedgradientpressuredirichlet.C.
References devGradient.
|
inlinevirtual |
Set prescribed pressure.
p | New prescribed pressure. |
Implements oofem::MixedGradientPressureBC.
Definition at line 137 of file mixedgradientpressuredirichlet.h.
|
protected |
Center coordinate .
Definition at line 79 of file mixedgradientpressuredirichlet.h.
Referenced by computeDofTransformation(), giveInputRecord(), giveUnknown(), and initializeFrom().
|
protected |
Definition at line 90 of file mixedgradientpressuredirichlet.h.
Referenced by computeTangents(), giveBcValue(), giveMasterDof(), giveUnknown(), and MixedGradientPressureDirichlet().
|
protected |
DOF-manager containing the known deviatoric strain(rate).
Definition at line 89 of file mixedgradientpressuredirichlet.h.
Referenced by computeDofTransformation(), computeTangents(), giveInternalDofManager(), giveMasterDof(), giveNumberOfMasterDofs(), isDevDof(), and MixedGradientPressureDirichlet().
|
protected |
Prescribed gradient in Voigt form.
Definition at line 76 of file mixedgradientpressuredirichlet.h.
Referenced by computeTangents(), giveBcValue(), giveInputRecord(), giveUnknown(), and setPrescribedDeviatoricGradientFromVoigt().
|
protected |
Prescribed pressure.
Definition at line 82 of file mixedgradientpressuredirichlet.h.
Referenced by assembleVector(), computeFields(), and giveInputRecord().
|
protected |
Definition at line 86 of file mixedgradientpressuredirichlet.h.
Referenced by MixedGradientPressureDirichlet().
|
protected |
DOF-manager containing the unknown volumetric strain(rate).
Definition at line 85 of file mixedgradientpressuredirichlet.h.
Referenced by giveInternalDofManager(), giveMasterDof(), giveVolDof(), and MixedGradientPressureDirichlet().