OOFEM 3.0
Loading...
Searching...
No Matches
oofem::MixedGradientPressureWeakPeriodic Class Reference

#include <mixedgradientpressureweakperiodic.h>

Inheritance diagram for oofem::MixedGradientPressureWeakPeriodic:
Collaboration diagram for oofem::MixedGradientPressureWeakPeriodic:

Public Member Functions

 MixedGradientPressureWeakPeriodic (int n, Domain *d)
virtual ~MixedGradientPressureWeakPeriodic ()
 Destructor.
int giveNumberOfInternalDofManagers () override
DofManagergiveInternalDofManager (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 computeStress (FloatArray &sigmaDev, FloatArray &tractions, double rve_size)
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 DofgiveMasterDof (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
FunctiongiveTimeFunction ()
int getIsImposedTimeFunctionNumber () const
void setIsImposedTimeFunctionNumber (int funcIndx)
virtual bcValType giveBCValType () const
virtual bool isImposed (TimeStep *tStep)
virtual const IntArraygiveDofIDs () 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.
DomaingiveDomain () 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 InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

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 \( d_{\mathrm{dev},ij} \).
double volGradient
double pressure
 Prescribed pressure.
int order
 Order if polynomials.
std ::unique_ptr< Nodevoldman
 DOF-manager containing the unknown volumetric gradient (always exactly one dof).
IntArray v_id
std ::unique_ptr< Nodetractionsdman
 DOF-manager containing the unknown tractions (Lagrange mult. for micro-periodic velocity).
IntArray t_id
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.
Domaindomain
 Link to domain object, useful for communicating with other FEM components.

Detailed Description

Applies a mean deviatoric shear rate and pressure (Neumann boundary condition) in a weakly periodic way.

Author
Mikael Öhman

Definition at line 64 of file mixedgradientpressureweakperiodic.h.

Constructor & Destructor Documentation

◆ MixedGradientPressureWeakPeriodic()

oofem::MixedGradientPressureWeakPeriodic::MixedGradientPressureWeakPeriodic ( int n,
Domain * d )

Creates boundary condition with given number, belonging to given domain.

Parameters
nBoundary condition number.
dDomain to which new object will belongs.

Definition at line 66 of file mixedgradientpressureweakperiodic.C.

References oofem::FEMComponent::domain, oofem::MixedGradientPressureBC::MixedGradientPressureBC(), tractionsdman, v_id, and voldman.

◆ ~MixedGradientPressureWeakPeriodic()

oofem::MixedGradientPressureWeakPeriodic::~MixedGradientPressureWeakPeriodic ( )
virtual

Destructor.

Definition at line 76 of file mixedgradientpressureweakperiodic.C.

Member Function Documentation

◆ assemble()

void oofem::MixedGradientPressureWeakPeriodic::assemble ( SparseMtrx & answer,
TimeStep * tStep,
CharType type,
const UnknownNumberingScheme & r_s,
const UnknownNumberingScheme & c_s,
double scale = 1.0,
void * lock = nullptr )
overridevirtual

Assembles B.C. contributions to specified matrix.

Parameters
[in,out]answerMatrix to assemble to.
tStepActive time step.
tStepActive time step.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.
scaleScaling factor.
omp_lockoptional OMP lock to ensure correct update of answer

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 444 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::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), integrateTractionVelocityTangent(), integrateTractionXTangent(), oofem::FloatMatrix::negated(), scale(), oofem::GeneralBoundaryCondition::set, t_id, oofem::FloatMatrix::times(), tractionsdman, v_id, and voldman.

◆ assembleVector()

void oofem::MixedGradientPressureWeakPeriodic::assembleVector ( FloatArray & answer,
TimeStep * tStep,
CharType type,
ValueModeType mode,
const UnknownNumberingScheme & s,
FloatArray * eNorms = nullptr,
void * lock = nullptr )
overridevirtual

◆ computeFields()

void oofem::MixedGradientPressureWeakPeriodic::computeFields ( FloatArray & stressDev,
double & vol,
TimeStep * tStep )
overridevirtual

Computes the homogenized fields through sensitivity analysis.

Parameters
[out]stressDevComputes the homogenized deviatoric stress.
[out]volComputes the homogenized volumetric gradient.
tStepTime step for which field to obtain.

Implements oofem::MixedGradientPressureBC.

Definition at line 495 of file mixedgradientpressureweakperiodic.C.

References computeStress(), oofem::MixedGradientPressureBC::domainSize(), t_id, tractionsdman, voldman, and volGradient.

◆ computeStress()

◆ computeTangents()

void oofem::MixedGradientPressureWeakPeriodic::computeTangents ( FloatMatrix & Ed,
FloatArray & Ep,
FloatArray & Cd,
double & Cp,
TimeStep * tStep )
overridevirtual

Computes the macroscopic tangents through sensitivity analysis.

Parameters
[out]EdTangent \( \frac{\partial \sigma_{\mathrm{dev}}}{\partial d_{\mathrm{dev}}} \).
[out]EpTangent \( \frac{\partial \sigma_{\mathrm{dev}}}{\partial p} \).
[out]CdTangent \( \frac{\partial d_{\mathrm{vol}}}{\partial d_{\mathrm{dev}}} \).
[out]CpTangent \( \frac{\partial d_{\mathrm{vol}}}{\partial p} \).
tStepTime step for the tangents.
Todo
Get this from engineering model

Implements oofem::MixedGradientPressureBC.

Definition at line 570 of file mixedgradientpressureweakperiodic.C.

References oofem::EngngModel::assemble(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::IntArray::at(), oofem::FloatArray::beColumnOf(), oofem::FloatArray::beSubArrayOf(), oofem::classFactory, computeStress(), constructFullMatrixForm(), devGradient, oofem::FEMComponent::domain, oofem::MixedGradientPressureBC::domainSize(), oofem::FEMComponent::giveDomain(), oofem::IntArray::giveSize(), integrateTractionDev(), OOFEM_ERROR, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::GeneralBoundaryCondition::set, oofem::FloatMatrix::setColumn(), oofem::ST_Petsc, oofem::FloatArray::subtract(), t_id, tractionsdman, v_id, voldman, and oofem::FloatArray::zero().

◆ constructFullMatrixForm()

void oofem::MixedGradientPressureWeakPeriodic::constructFullMatrixForm ( FloatMatrix & d,
const FloatArray & d_voigt ) const
protected

◆ constructMMatrix()

◆ evaluateTractionBasisFunctions()

void oofem::MixedGradientPressureWeakPeriodic::evaluateTractionBasisFunctions ( FloatArray & answer,
const FloatArray & coords )
protected

◆ giveClassName()

const char * oofem::MixedGradientPressureWeakPeriodic::giveClassName ( ) const
inlineoverridevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 145 of file mixedgradientpressureweakperiodic.h.

◆ giveInputRecord()

void oofem::MixedGradientPressureWeakPeriodic::giveInputRecord ( DynamicInputRecord & input)
overridevirtual

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 676 of file mixedgradientpressureweakperiodic.C.

References _IFT_MixedGradientPressure_pressure, OOFEM_ERROR, pressure, and oofem::DynamicInputRecord::setField().

◆ giveInputRecordName()

const char * oofem::MixedGradientPressureWeakPeriodic::giveInputRecordName ( ) const
inlineoverridevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 146 of file mixedgradientpressureweakperiodic.h.

References _IFT_MixedGradientPressureWeakPeriodic_Name.

◆ giveInternalDofManager()

DofManager * oofem::MixedGradientPressureWeakPeriodic::giveInternalDofManager ( int i)
overridevirtual

Returns the volumetric DOF manager for i == 1, and the deviatoric manager for i == 2.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 87 of file mixedgradientpressureweakperiodic.C.

References tractionsdman, and voldman.

◆ giveLocationArrays()

void oofem::MixedGradientPressureWeakPeriodic::giveLocationArrays ( std ::vector< IntArray > & rows,
std ::vector< IntArray > & cols,
CharType type,
const UnknownNumberingScheme & r_s,
const UnknownNumberingScheme & c_s )
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.

Parameters
rowsList of location arrays for r_s.
colsList of location arrays for c_s.
typeType of matrix to assemble.
r_sRow numbering scheme.
c_sColumn numbering scheme.

Reimplemented from oofem::ActiveBoundaryCondition.

Definition at line 155 of file mixedgradientpressureweakperiodic.C.

References oofem::IntArray::at(), oofem::FEInterpolation::boundaryGiveNodes(), oofem::GeneralBoundaryCondition::dofs, oofem::Element::giveBoundaryLocationArray(), oofem::FEMComponent::giveDomain(), oofem::Element::giveGeometryType(), oofem::Element::giveInterpolation(), oofem::IntArray::giveSize(), oofem::GeneralBoundaryCondition::set, t_id, tractionsdman, v_id, and voldman.

◆ giveNumberOfInternalDofManagers()

int oofem::MixedGradientPressureWeakPeriodic::giveNumberOfInternalDofManagers ( )
overridevirtual

Returns the number of internal DOF managers (=2). This boundary condition stores its own DOF managers, one for tractions and one for \( d_{\mathrm{vol}} \) which is a single DOF for the volumetric gradient.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 81 of file mixedgradientpressureweakperiodic.C.

◆ giveType()

bcType oofem::MixedGradientPressureWeakPeriodic::giveType ( ) const
inlineoverridevirtual

Not relevant for this boundary condition.

Reimplemented from oofem::MixedGradientPressureBC.

Definition at line 111 of file mixedgradientpressureweakperiodic.h.

References oofem::UnknownBT.

◆ initializeFrom()

void oofem::MixedGradientPressureWeakPeriodic::initializeFrom ( InputRecord & ir)
overridevirtual

Initializes receiver according to object description stored in input record. The input record contains two fields;

  • devGradient #columns { d_11 d_22 ... d_21 ... } (required)
  • pressure p (required) The gradient should be in Voigt notation (only the deviatoric part will be used)

Reimplemented from oofem::MixedGradientPressureBC.

Definition at line 97 of file mixedgradientpressureweakperiodic.C.

References _IFT_MixedGradientPressureWeakPeriodic_order, oofem::FEMComponent::domain, IR_GIVE_FIELD, OOFEM_ERROR, order, t_id, and tractionsdman.

◆ integrateTractionDev()

◆ integrateTractionVelocityTangent()

◆ integrateTractionXTangent()

◆ scale()

void oofem::MixedGradientPressureWeakPeriodic::scale ( double s)
overridevirtual

Scales the receiver according to given value. Typically used in nondimensional analysis to scale down BCs and ICs.

Parameters
sScale factor.

Reimplemented from oofem::GeneralBoundaryCondition.

Definition at line 685 of file mixedgradientpressureweakperiodic.C.

References devGradient, and pressure.

Referenced by assemble().

◆ setPrescribedDeviatoricGradientFromVoigt()

void oofem::MixedGradientPressureWeakPeriodic::setPrescribedDeviatoricGradientFromVoigt ( const FloatArray & ddev)
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.

Parameters
ddevVector in Voigt format.

Implements oofem::MixedGradientPressureBC.

Definition at line 120 of file mixedgradientpressureweakperiodic.C.

References constructFullMatrixForm(), devGradient, and volGradient.

◆ setPrescribedPressure()

void oofem::MixedGradientPressureWeakPeriodic::setPrescribedPressure ( double p)
inlineoverridevirtual

Set prescribed pressure.

Parameters
pNew prescribed pressure.

Implements oofem::MixedGradientPressureBC.

Definition at line 129 of file mixedgradientpressureweakperiodic.h.

References pressure.

Member Data Documentation

◆ devGradient

FloatMatrix oofem::MixedGradientPressureWeakPeriodic::devGradient
protected

Prescribed gradient \( d_{\mathrm{dev},ij} \).

Definition at line 68 of file mixedgradientpressureweakperiodic.h.

Referenced by assembleVector(), computeTangents(), scale(), and setPrescribedDeviatoricGradientFromVoigt().

◆ order

int oofem::MixedGradientPressureWeakPeriodic::order
protected

◆ pressure

double oofem::MixedGradientPressureWeakPeriodic::pressure
protected

Prescribed pressure.

Definition at line 76 of file mixedgradientpressureweakperiodic.h.

Referenced by assembleVector(), computeStress(), giveInputRecord(), scale(), and setPrescribedPressure().

◆ t_id

IntArray oofem::MixedGradientPressureWeakPeriodic::t_id
protected

◆ tractionsdman

std :: unique_ptr< Node > oofem::MixedGradientPressureWeakPeriodic::tractionsdman
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(), initializeFrom(), and MixedGradientPressureWeakPeriodic().

◆ v_id

IntArray oofem::MixedGradientPressureWeakPeriodic::v_id
protected

◆ voldman

std :: unique_ptr< Node > oofem::MixedGradientPressureWeakPeriodic::voldman
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().

◆ volGradient

double oofem::MixedGradientPressureWeakPeriodic::volGradient
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().


The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011