OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Applies a mean deviatoric shear rate and pressure (Neumann boundary condition) in a weakly periodic way. More...
#include <mixedgradientpressureweakperiodic.h>
Public Member Functions | |
MixedGradientPressureWeakPeriodic (int n, Domain *d) | |
Creates boundary condition with given number, belonging to given domain. More... | |
virtual | ~MixedGradientPressureWeakPeriodic () |
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 bcType | giveType () const |
Not relevant for this boundary condition. 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 &sigmaDev, double &vol, TimeStep *tStep) |
Computes the homogenized fields through sensitivity analysis. More... | |
void | computeStress (FloatArray &sigmaDev, FloatArray &tractions, double rve_size) |
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 | assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm=NULL) |
Assembles B.C. 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 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... | |
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 | addElementSide (int elem, int side) |
Adds element for active boundary condition. 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... | |
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... | |
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 | |
void | integrateTractionVelocityTangent (FloatMatrix &answer, Element *el, int boundary) |
void | integrateTractionXTangent (FloatMatrix &answer, Element *el, int boundary) |
void | integrateTractionDev (FloatArray &answer, Element *el, int boundary, const FloatMatrix &ddev) |
void | constructMMatrix (FloatMatrix &mMatrix, FloatArray &coords, FloatArray &normal) |
void | evaluateTractionBasisFunctions (FloatArray &answer, const FloatArray &coords) |
void | constructFullMatrixForm (FloatMatrix &d, const FloatArray &d_voigt) const |
Protected Attributes | |
FloatMatrix | devGradient |
Prescribed gradient . More... | |
double | volGradient |
The volumetric part of what was sent in (needed to return the difference). More... | |
double | pressure |
Prescribed pressure. More... | |
int | order |
Order if polynomials. More... | |
std::unique_ptr< Node > | voldman |
DOF-manager containing the unknown volumetric gradient (always exactly one dof). More... | |
IntArray | v_id |
std::unique_ptr< Node > | tractionsdman |
DOF-manager containing the unknown tractions (Lagrange mult. for micro-periodic velocity) More... | |
IntArray | t_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... | |
Applies a mean deviatoric shear rate and pressure (Neumann boundary condition) in a weakly periodic way.
Definition at line 64 of file mixedgradientpressureweakperiodic.h.
oofem::MixedGradientPressureWeakPeriodic::MixedGradientPressureWeakPeriodic | ( | 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 62 of file mixedgradientpressureweakperiodic.C.
References oofem::FEMComponent::domain, oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), v_id, and voldman.
|
virtual |
Destructor.
Definition at line 72 of file mixedgradientpressureweakperiodic.C.
|
virtual |
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 from oofem::ActiveBoundaryCondition.
Definition at line 425 of file mixedgradientpressureweakperiodic.C.
References oofem::SparseMtrx::assemble(), oofem::IntArray::at(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateTractionVelocityTangent(), integrateTractionXTangent(), oofem::FloatMatrix::negated(), t_id, oofem::FloatMatrix::times(), tractionsdman, v_id, and voldman.
|
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 342 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatArray::add(), oofem::FloatArray::assemble(), oofem::FloatArray::assembleSquared(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatArray::beProductOf(), oofem::FloatArray::beTProductOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::Element::computeBoundaryVectorOf(), devGradient, oofem::GeneralBoundaryCondition::dofs, oofem::MixedGradientPressureBC::domainSize(), oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateTractionDev(), integrateTractionVelocityTangent(), integrateTractionXTangent(), oofem::FloatArray::negated(), pressure, t_id, tractionsdman, v_id, and voldman.
|
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 469 of file mixedgradientpressureweakperiodic.C.
References computeStress(), oofem::MixedGradientPressureBC::domainSize(), oofem::ActiveBoundaryCondition::giveUnknown(), t_id, tractionsdman, voldman, and volGradient.
void oofem::MixedGradientPressureWeakPeriodic::computeStress | ( | FloatArray & | sigmaDev, |
FloatArray & | tractions, | ||
double | rve_size | ||
) |
Definition at line 483 of file mixedgradientpressureweakperiodic.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatArray::beProductOf(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryLocal2Global(), constructMMatrix(), oofem::FEMComponent::domain, oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), order, oofem::FloatMatrix::plusDyadUnsym(), pressure, oofem::FloatArray::resize(), and oofem::FloatMatrix::times().
Referenced by computeFields(), and computeTangents().
|
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 544 of file mixedgradientpressureweakperiodic.C.
References oofem::EngngModel::assemble(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatArray::beColumnOf(), oofem::classFactory, computeStress(), constructFullMatrixForm(), oofem::ClassFactory::createSparseLinSolver(), oofem::ClassFactory::createSparseMtrx(), devGradient, oofem::FEMComponent::domain, oofem::MixedGradientPressureBC::domainSize(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveEngngModel(), oofem::Domain::giveNumber(), oofem::FloatMatrix::giveNumberOfColumns(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), integrateTractionDev(), OOFEM_ERROR, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::FloatMatrix::setColumn(), oofem::ST_Petsc, oofem::FloatArray::subtract(), t_id, tractionsdman, v_id, voldman, and oofem::FloatArray::zero().
|
protected |
Definition at line 129 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatArray::giveSize(), OOFEM_ERROR, and oofem::FloatMatrix::resize().
Referenced by computeTangents(), and setPrescribedDeviatoricGradientFromVoigt().
|
protected |
Definition at line 225 of file mixedgradientpressureweakperiodic.C.
References evaluateTractionBasisFunctions(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::FloatArray::giveSize(), order, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), and oofem::FloatMatrix::zero().
Referenced by computeStress(), integrateTractionDev(), integrateTractionVelocityTangent(), and integrateTractionXTangent().
|
protected |
Definition at line 206 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatArray::giveSize(), order, and oofem::FloatArray::resize().
Referenced by constructMMatrix().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 142 of file mixedgradientpressureweakperiodic.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 650 of file mixedgradientpressureweakperiodic.C.
References _IFT_MixedGradientPressure_pressure, oofem::GeneralBoundaryCondition::giveInputRecord(), OOFEM_ERROR, pressure, and oofem::DynamicInputRecord::setField().
|
inlinevirtual |
Implements oofem::FEMComponent.
Definition at line 143 of file mixedgradientpressureweakperiodic.h.
References _IFT_MixedGradientPressureWeakPeriodic_Name.
|
virtual |
Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 83 of file mixedgradientpressureweakperiodic.C.
References tractionsdman, and voldman.
|
virtual |
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 from oofem::ActiveBoundaryCondition.
Definition at line 154 of file mixedgradientpressureweakperiodic.C.
References oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveInterpolation(), oofem::Domain::giveSet(), oofem::IntArray::giveSize(), oofem::IntArray::resize(), t_id, tractionsdman, v_id, and voldman.
|
virtual |
Returns the number of internal DOF managers (=2).
This boundary condition stores its own DOF managers, one for tractions and one for which is a single DOF for the volumetric gradient.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 77 of file mixedgradientpressureweakperiodic.C.
|
inlinevirtual |
Not relevant for this boundary condition.
Reimplemented from oofem::MixedGradientPressureBC.
Definition at line 111 of file mixedgradientpressureweakperiodic.h.
References oofem::UnknownBT.
|
virtual |
Initializes receiver according to object description stored in input record.
The input record contains two fields;
Reimplemented from oofem::MixedGradientPressureBC.
Definition at line 93 of file mixedgradientpressureweakperiodic.C.
References _IFT_MixedGradientPressureWeakPeriodic_order, oofem::IntArray::clear(), oofem::FEMComponent::domain, oofem::IntArray::followedBy(), oofem::Domain::giveNextFreeDofID(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::MixedGradientPressureBC::initializeFrom(), IR_GIVE_FIELD, OOFEM_ERROR, order, t_id, and tractionsdman.
|
protected |
Definition at line 314 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatArray::beProductOf(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryLocal2Global(), oofem::FloatArray::clear(), constructMMatrix(), oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), order, and oofem::FloatArray::plusProduct().
Referenced by assembleVector(), and computeTangents().
|
protected |
Definition at line 255 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatMatrix::beNMatrixOf(), oofem::FEInterpolation::boundaryEvalN(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryLocal2Global(), oofem::FloatMatrix::clear(), constructMMatrix(), oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::FEMComponent::giveDomain(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Domain::giveNumberOfSpatialDimensions(), order, and oofem::FloatMatrix::plusProductUnsym().
Referenced by assemble(), and assembleVector().
|
protected |
Definition at line 285 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatArray::beScaled(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FEInterpolation::boundaryLocal2Global(), constructMMatrix(), oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), order, oofem::FloatMatrix::resize(), and oofem::FloatMatrix::setColumn().
Referenced by assemble(), and assembleVector().
|
virtual |
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 659 of file mixedgradientpressureweakperiodic.C.
References devGradient, pressure, and oofem::FloatMatrix::times().
|
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 119 of file mixedgradientpressureweakperiodic.C.
References oofem::FloatMatrix::at(), constructFullMatrixForm(), devGradient, oofem::FloatMatrix::giveNumberOfRows(), and volGradient.
|
inlinevirtual |
Set prescribed pressure.
p | New prescribed pressure. |
Implements oofem::MixedGradientPressureBC.
Definition at line 129 of file mixedgradientpressureweakperiodic.h.
|
protected |
Prescribed gradient .
Definition at line 68 of file mixedgradientpressureweakperiodic.h.
Referenced by assembleVector(), computeTangents(), scale(), and setPrescribedDeviatoricGradientFromVoigt().
|
protected |
Order if polynomials.
Definition at line 79 of file mixedgradientpressureweakperiodic.h.
Referenced by computeStress(), constructMMatrix(), evaluateTractionBasisFunctions(), initializeFrom(), integrateTractionDev(), integrateTractionVelocityTangent(), and integrateTractionXTangent().
|
protected |
Prescribed pressure.
Definition at line 76 of file mixedgradientpressureweakperiodic.h.
Referenced by assembleVector(), computeStress(), giveInputRecord(), and scale().
|
protected |
Definition at line 87 of file mixedgradientpressureweakperiodic.h.
Referenced by assemble(), assembleVector(), computeFields(), computeTangents(), giveLocationArrays(), and initializeFrom().
|
protected |
DOF-manager containing the unknown tractions (Lagrange mult. for micro-periodic velocity)
Definition at line 86 of file mixedgradientpressureweakperiodic.h.
Referenced by assemble(), assembleVector(), computeFields(), computeTangents(), giveInternalDofManager(), giveLocationArrays(), and initializeFrom().
|
protected |
Definition at line 83 of file mixedgradientpressureweakperiodic.h.
Referenced by assemble(), assembleVector(), computeTangents(), giveLocationArrays(), and MixedGradientPressureWeakPeriodic().
|
protected |
DOF-manager containing the unknown volumetric gradient (always exactly one dof).
Definition at line 82 of file mixedgradientpressureweakperiodic.h.
Referenced by assemble(), assembleVector(), computeFields(), computeTangents(), giveInternalDofManager(), giveLocationArrays(), and MixedGradientPressureWeakPeriodic().
|
protected |
The volumetric part of what was sent in (needed to return the difference).
If caller takes care and sends in a deviatoric gradient, then this will be zero and the return value for the volumetric part will be the true volumetric change.
Definition at line 73 of file mixedgradientpressureweakperiodic.h.
Referenced by computeFields(), and setPrescribedDeviatoricGradientFromVoigt().