|
OOFEM 3.0
|
#include <mixedgradientpressureneumann.h>
Public Member Functions | |
| MixedGradientPressureNeumann (int n, Domain *d) | |
| virtual | ~MixedGradientPressureNeumann () |
| Destructor. | |
| int | giveNumberOfInternalDofManagers () override |
| DofManager * | giveInternalDofManager (int i) override |
| bcType | giveType () const override |
| Not relevant for this boundary condition. | |
| void | initializeFrom (InputRecord &ir) override |
| void | giveInputRecord (DynamicInputRecord &input) override |
| void | scale (double s) override |
| void | computeFields (FloatArray &sigmaDev, double &vol, TimeStep *tStep) override |
| void | computeTangents (FloatMatrix &Ed, FloatArray &Ep, FloatArray &Cd, double &Cp, TimeStep *tStep) override |
| void | setPrescribedPressure (double p) override |
| void | setPrescribedDeviatoricGradientFromVoigt (const FloatArray &ddev) override |
| void | assembleVector (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm=nullptr, void *lock=nullptr) override |
| void | assemble (SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0, void *lock=nullptr) override |
| void | giveLocationArrays (std ::vector< IntArray > &rows, std ::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) override |
| const char * | giveClassName () const override |
| const char * | giveInputRecordName () const override |
| Public Member Functions inherited from oofem::MixedGradientPressureBC | |
| MixedGradientPressureBC (int n, Domain *d) | |
| virtual | ~MixedGradientPressureBC () |
| Destructor. | |
| double | domainSize () |
| Public Member Functions inherited from oofem::ActiveBoundaryCondition | |
| ActiveBoundaryCondition (int n, Domain *d) | |
| virtual | ~ActiveBoundaryCondition () |
| Destructor. | |
| virtual void | addElementSide (int elem, int side) |
| virtual bool | requiresActiveDofs () |
| virtual bool | isPrimaryDof (ActiveDof *dof) |
| virtual double | giveBcValue (Dof *dof, ValueModeType mode, TimeStep *tStep) |
| virtual bool | hasBc (Dof *dof, TimeStep *tStep) |
| virtual int | giveNumberOfMasterDofs (ActiveDof *dof) |
| virtual Dof * | giveMasterDof (ActiveDof *dof, int mdof) |
| virtual void | computeDofTransformation (ActiveDof *dof, FloatArray &masterContribs) |
| virtual double | giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
| virtual double | giveUnknown (ValueModeType mode, TimeStep *tStep, ActiveDof *dof) |
| Public Member Functions inherited from oofem::GeneralBoundaryCondition | |
| GeneralBoundaryCondition (int n, Domain *d) | |
| virtual | ~GeneralBoundaryCondition () |
| Destructor. | |
| int | giveSetNumber () const |
| Function * | giveTimeFunction () |
| int | getIsImposedTimeFunctionNumber () const |
| void | setIsImposedTimeFunctionNumber (int funcIndx) |
| virtual bcValType | giveBCValType () const |
| virtual bool | isImposed (TimeStep *tStep) |
| virtual const IntArray & | giveDofIDs () const |
| virtual bcGeomType | giveBCGeoType () const |
| virtual double | giveProperty (int aProperty, TimeStep *tStep) const |
| void | saveContext (DataStream &stream, ContextMode mode) override |
| void | restoreContext (DataStream &stream, ContextMode mode) override |
| virtual void | updateYourself (TimeStep *tStep) |
| Public Member Functions inherited from oofem::FEMComponent | |
| FEMComponent (int n, Domain *d) | |
| virtual | ~FEMComponent ()=default |
| Virtual destructor. | |
| Domain * | giveDomain () const |
| virtual void | setDomain (Domain *d) |
| int | giveNumber () const |
| void | setNumber (int num) |
| virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
| virtual void | initializeFrom (InputRecord &ir, int priority) |
| virtual void | initializeFinish () |
| virtual void | postInitialize () |
| Performs post initialization steps. Called after all components are created and initialized. | |
| virtual int | checkConsistency () |
| virtual void | printOutputAt (FILE *file, TimeStep *tStep) |
| virtual void | printYourself () |
| Prints receiver state on stdout. Useful for debugging. | |
| virtual Interface * | giveInterface (InterfaceType t) |
| std::string | errorInfo (const char *func) const |
| Returns string for prepending output (used by error reporting macros). | |
Protected Member Functions | |
| void | integrateDevTangent (FloatMatrix &answer, Element *e, int boundary) |
| Helper function that integrates the deviatoric tangent contribution from a single element boundary. | |
| void | integrateVolTangent (FloatArray &answer, Element *e, int boundary) |
| Helper function that integrates the volumetric tangent contribution from a single element boundary. | |
| void | fromDeviatoricBase2D (FloatArray &cartesian, FloatArray &deviatoric) |
| Converts from deviatoric to (normal) cartesian base (arrays are second order 2D tensors in Voigt notation). | |
| void | fromDeviatoricBase3D (FloatArray &cartesian, FloatArray &deviatoric) |
| Converts from deviatoric to (normal) cartesian base (arrays are second order 3D tensors in Voigt notation). | |
| void | fromDeviatoricBase2D (FloatMatrix &cartesian, FloatMatrix &deviatoric) |
| Converts from deviatoric to (normal) cartesian base (arrays are fourth order 2D tensors in Voigt notation). | |
| void | fromDeviatoricBase3D (FloatMatrix &cartesian, FloatMatrix &deviatoric) |
| Converts from deviatoric to (normal) cartesian base (arrays are fourth order 3D tensors in Voigt notation). | |
Protected Attributes | |
| FloatArray | devGradient |
| Prescribed gradient \( d_{\mathrm{dev},ij} \) in Voigt form. | |
| double | volGradient |
| double | pressure |
| Prescribed pressure. | |
| std ::unique_ptr< Node > | sigmaDev |
| DOF-manager containing the unknown deviatoric stress. | |
| IntArray | dev_id |
| Dof IDs for the lagrange multipliers in sigmaDev. | |
| Protected Attributes inherited from oofem::GeneralBoundaryCondition | |
| int | timeFunction |
| Associated load time function. | |
| bcValType | valType |
| Physical meaning of BC value. | |
| IntArray | dofs |
| Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s). | |
| int | isImposedTimeFunction |
| int | set |
| Set number for boundary condition to be applied to. | |
| Protected Attributes inherited from oofem::FEMComponent | |
| int | number |
| Component number. | |
| Domain * | domain |
| Link to domain object, useful for communicating with other FEM components. | |
Applies a mean deviatoric shear rate and pressure (Neumann boundary condition). Introduces unknowns for the deviatoric stress, and this boundary condition adds contributions to both the left and right hand side of the system. The approach expresses the deviatoric stresses/strain(rates) in a special (nonsymmetric) base;
\[\boldsymbol A_{\mathrm{dev}} = \sum_{i=1}^{n} A_{\mathrm{dev},i} \boldsymbol E_i \]
where the bases \( \boldsymbol E_i \) can be chosen as
\[\boldsymbol E_1 = \frac{1}{\sqrt{2}}\begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix}, \quad \boldsymbol E_2 = \begin{pmatrix}0 & 1 \\ 0 & 0\end{pmatrix}, \quad \boldsymbol E_3 = \begin{pmatrix}0 & 0 \\ 1 & 0\end{pmatrix}. \]
in 2D, and
\[\boldsymbol E_1 = \frac{1}{\sqrt{6}}\begin{pmatrix}2 & 0 & 0\\ 0 & -1 & 0 \\ 0 & 0 & -1\end{pmatrix}, \quad \boldsymbol E_2 = \frac{1}{\sqrt{2}}\begin{pmatrix}0 & 0 & 0\\ 0 & 1 & 0 \\ 0 & 0 & -1\end{pmatrix}, \quad \boldsymbol E_3 = \begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 0 \\ 0 & 0 & 0\end{pmatrix}, \ldots\quad \boldsymbol E_8 = \begin{pmatrix}0 & 0 & 0\\ 0 & 0 & 0 \\ 0 & 1 & 0\end{pmatrix} \]
in 3D (in 1D no deviatoric component exists).
Either bulk elements + side number can be used, or a boundary element (line in 2D, surface in 3D) can be used directly.
Definition at line 91 of file mixedgradientpressureneumann.h.
| oofem::MixedGradientPressureNeumann::MixedGradientPressureNeumann | ( | 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 66 of file mixedgradientpressureneumann.C.
References dev_id, oofem::Domain::giveNextFreeDofID(), oofem::Domain::giveNumberOfSpatialDimensions(), oofem::MixedGradientPressureBC::MixedGradientPressureBC(), and sigmaDev.
|
virtual |
Destructor.
Definition at line 81 of file mixedgradientpressureneumann.C.
|
overridevirtual |
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. | |
| omp_lock | optional OMP lock to ensure correct update of answer |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 491 of file mixedgradientpressureneumann.C.
References oofem::SparseMtrx::assemble(), oofem::IntArray::at(), oofem::FloatMatrix::beTranspositionOf(), oofem::FEInterpolation::boundaryGiveNodes(), dev_id, oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), integrateDevTangent(), oofem::FloatMatrix::negated(), scale(), oofem::GeneralBoundaryCondition::set, sigmaDev, and oofem::FloatMatrix::times().
|
overridevirtual |
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. | |
| omp_lock | optional OMP lock to ensure correct update of answer |
Reimplemented from oofem::ActiveBoundaryCondition.
Definition at line 400 of file mixedgradientpressureneumann.C.
References oofem::FloatArray::assemble(), oofem::FloatArray::assembleSquared(), oofem::IntArray::at(), oofem::FloatArray::beProductOf(), oofem::FloatArray::beScaled(), oofem::FloatArray::beTProductOf(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::Element::computeBoundaryVectorOf(), dev_id, devGradient, oofem::GeneralBoundaryCondition::dofs, oofem::MixedGradientPressureBC::domainSize(), oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), integrateDevTangent(), integrateVolTangent(), oofem::FloatArray::negated(), pressure, oofem::GeneralBoundaryCondition::set, sigmaDev, and oofem::FloatArray::times().
|
overridevirtual |
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 531 of file mixedgradientpressureneumann.C.
References oofem::FloatArray::at(), oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::Element::computeBoundaryVectorOf(), dev_id, oofem::GeneralBoundaryCondition::dofs, oofem::MixedGradientPressureBC::domainSize(), oofem::FloatArray::dotProduct(), fromDeviatoricBase2D(), fromDeviatoricBase3D(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), integrateVolTangent(), oofem::FloatArray::resize(), oofem::GeneralBoundaryCondition::set, sigmaDev, and volGradient.
|
overridevirtual |
Computes the macroscopic tangents through sensitivity analysis.
| [out] | Ed | Tangent \( \frac{\partial \sigma_{\mathrm{dev}}}{\partial d_{\mathrm{dev}}} \). |
| [out] | Ep | Tangent \( \frac{\partial \sigma_{\mathrm{dev}}}{\partial p} \). |
| [out] | Cd | Tangent \( \frac{\partial d_{\mathrm{vol}}}{\partial d_{\mathrm{dev}}} \). |
| [out] | Cp | Tangent \( \frac{\partial d_{\mathrm{vol}}}{\partial p} \). |
| tStep | Time step for the tangents. |
Implements oofem::MixedGradientPressureBC.
Definition at line 570 of file mixedgradientpressureneumann.C.
References oofem::EngngModel::assemble(), oofem::FloatArray::assemble(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::classFactory, oofem::FloatArray::clear(), oofem::FloatMatrix::clear(), dev_id, oofem::GeneralBoundaryCondition::dofs, oofem::FEMComponent::domain, oofem::MixedGradientPressureBC::domainSize(), fromDeviatoricBase2D(), fromDeviatoricBase3D(), oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), integrateVolTangent(), OOFEM_ERROR, oofem::GeneralBoundaryCondition::set, sigmaDev, oofem::ST_Petsc, oofem::FloatArray::times(), oofem::FloatArray::zero(), and oofem::FloatMatrix::zero().
|
protected |
Converts from deviatoric to (normal) cartesian base (arrays are second order 2D tensors in Voigt notation).
Definition at line 98 of file mixedgradientpressureneumann.C.
References oofem::FloatArray::at(), and oofem::FloatArray::resize().
Referenced by computeFields(), and computeTangents().
|
protected |
Converts from deviatoric to (normal) cartesian base (arrays are fourth order 2D tensors in Voigt notation).
Definition at line 122 of file mixedgradientpressureneumann.C.
References oofem::FloatMatrix::at(), and oofem::FloatMatrix::resize().
|
protected |
Converts from deviatoric to (normal) cartesian base (arrays are second order 3D tensors in Voigt notation).
Definition at line 107 of file mixedgradientpressureneumann.C.
References oofem::FloatArray::at(), and oofem::FloatArray::resize().
Referenced by computeFields(), and computeTangents().
|
protected |
Converts from deviatoric to (normal) cartesian base (arrays are fourth order 3D tensors in Voigt notation).
Definition at line 143 of file mixedgradientpressureneumann.C.
References oofem::FloatMatrix::at(), and oofem::FloatMatrix::resize().
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 165 of file mixedgradientpressureneumann.h.
|
overridevirtual |
Setups the input record string of receiver.
| input | Dynamic input record to be filled by receiver. |
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 694 of file mixedgradientpressureneumann.C.
References _IFT_MixedGradientPressure_pressure, OOFEM_ERROR, pressure, and oofem::DynamicInputRecord::setField().
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 166 of file mixedgradientpressureneumann.h.
References _IFT_MixedGradientPressureNeumann_Name.
|
overridevirtual |
Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 92 of file mixedgradientpressureneumann.C.
References sigmaDev.
|
overridevirtual |
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 242 of file mixedgradientpressureneumann.C.
References oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), dev_id, oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), oofem::GeneralBoundaryCondition::set, and sigmaDev.
|
overridevirtual |
Returns the number of internal DOF managers (=2). This boundary condition stores its own DOF managers, one for \( d_{\mathrm{dev},ij} \) in which the DOFs are prescribed and one for \( d_{\mathrm{vol}} \) for single free volumetric strain rate.
Reimplemented from oofem::GeneralBoundaryCondition.
Definition at line 86 of file mixedgradientpressureneumann.C.
|
inlineoverridevirtual |
Not relevant for this boundary condition.
Reimplemented from oofem::MixedGradientPressureBC.
Definition at line 133 of file mixedgradientpressureneumann.h.
References oofem::UnknownBT.
|
overridevirtual |
Initializes receiver according to object description stored in input record. The input record contains two fields;
Reimplemented from oofem::MixedGradientPressureBC.
Definition at line 688 of file mixedgradientpressureneumann.C.
|
protected |
Helper function that integrates the deviatoric tangent contribution from a single element boundary.
Definition at line 314 of file mixedgradientpressureneumann.C.
References oofem::FloatMatrix::add(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatMatrix::beNMatrixOf(), oofem::FloatMatrix::beProductOf(), oofem::FEInterpolation::boundaryEvalN(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FloatMatrix::clear(), oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Domain::giveNumberOfSpatialDimensions(), and oofem::FloatMatrix::resize().
Referenced by assemble(), and assembleVector().
|
protected |
Helper function that integrates the volumetric tangent contribution from a single element boundary.
Definition at line 280 of file mixedgradientpressureneumann.C.
References oofem::FloatMatrix::beNMatrixOf(), oofem::FEInterpolation::boundaryEvalN(), oofem::FEInterpolation::boundaryEvalNormal(), oofem::FloatArray::clear(), oofem::FEInterpolation::giveBoundaryIntegrationRule(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::FEInterpolation::giveInterpolationOrder(), oofem::Domain::giveNumberOfSpatialDimensions(), and oofem::FloatArray::plusProduct().
Referenced by assembleVector(), computeFields(), and computeTangents().
|
overridevirtual |
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 705 of file mixedgradientpressureneumann.C.
References devGradient, and pressure.
Referenced by assemble().
|
overridevirtual |
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 210 of file mixedgradientpressureneumann.C.
References oofem::FloatArray::at(), devGradient, oofem::FEMComponent::domain, and volGradient.
|
inlineoverridevirtual |
Set prescribed pressure.
| p | New prescribed pressure. |
Implements oofem::MixedGradientPressureBC.
Definition at line 150 of file mixedgradientpressureneumann.h.
References pressure.
|
protected |
Dof IDs for the lagrange multipliers in sigmaDev.
Definition at line 108 of file mixedgradientpressureneumann.h.
Referenced by assemble(), assembleVector(), computeFields(), computeTangents(), giveLocationArrays(), and MixedGradientPressureNeumann().
|
protected |
Prescribed gradient \( d_{\mathrm{dev},ij} \) in Voigt form.
Definition at line 95 of file mixedgradientpressureneumann.h.
Referenced by assembleVector(), scale(), and setPrescribedDeviatoricGradientFromVoigt().
|
protected |
Prescribed pressure.
Definition at line 103 of file mixedgradientpressureneumann.h.
Referenced by assembleVector(), giveInputRecord(), scale(), and setPrescribedPressure().
|
protected |
DOF-manager containing the unknown deviatoric stress.
Definition at line 106 of file mixedgradientpressureneumann.h.
Referenced by assemble(), assembleVector(), computeFields(), computeTangents(), giveInternalDofManager(), giveLocationArrays(), and MixedGradientPressureNeumann().
|
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 100 of file mixedgradientpressureneumann.h.
Referenced by computeFields(), and setPrescribedDeviatoricGradientFromVoigt().