OOFEM 3.0
Loading...
Searching...
No Matches
oofem::StressStrainBaseVector Class Referenceabstract

#include <stressstrainbasevector.h>

Inheritance diagram for oofem::StressStrainBaseVector:
Collaboration diagram for oofem::StressStrainBaseVector:

Public Member Functions

 StressStrainBaseVector (MaterialMode)
 Constructor. Creates zero value stress/strain vector for given material mode.
 StressStrainBaseVector (const FloatArray &, MaterialMode)
 Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter.
 ~StressStrainBaseVector ()
 Destructor.
StressStrainBaseVectoroperator= (const StressStrainBaseVector &)
MaterialMode giveStressStrainMode () const
 Returns the material mode of receiver.
void letStressStrainModeBe (const MaterialMode newMode)
void convertToFullForm (FloatArray &fullform) const
void convertFromFullForm (const FloatArray &reducedform, MaterialMode mode)
virtual void computePrincipalValues (FloatArray &answer) const =0
virtual void computePrincipalValDir (FloatArray &answer, FloatMatrix &dir) const =0
void transformTo (StressStrainBaseVector &answer, const FloatMatrix &base, int transpose=0) const
contextIOResultType storeYourself (DataStream &stream)
contextIOResultType restoreYourself (DataStream &stream)
double computeVolumetricPart () const
 Returns the volumetric part of the vector.
Public Member Functions inherited from oofem::FloatArray
FloatArrayoperator= (const double &)
 Assignment of scalar to all components of receiver.
std::vector< double >::iterator begin ()
std::vector< double >::iterator end ()
std::vector< double >::const_iterator begin () const
std::vector< double >::const_iterator end () const
 FloatArray (int n=0)
 Constructor for sized array. Data is zeroed.
 FloatArray (double)=delete
 Disallow double parameter, which can otherwise give unexpected results.
 FloatArray (const FloatArray &src)
 Copy constructor. Creates the array from another array.
 FloatArray (FloatArray &&src) noexcept
 Move constructor. Creates the array from another array.
FloatArrayoperator= (const FloatArray &src)
 Assignment operator.
FloatArrayoperator= (FloatArray &&src) noexcept
 Move operator.
const double * data () const
double * data ()
double & operator() (Index i)
double & operator[] (Index i)
const double & operator() (Index i) const
const double & operator[] (Index i) const
void resize (Index s)
Index size () const
void _resize_internal (Index newsize)
 FloatArray (std ::initializer_list< double >list)
 Initializer list constructor.
template<std::size_t N>
 FloatArray (const FloatArrayF< N > &src)
virtual ~FloatArray ()
 Destructor.
FloatArrayoperator= (std ::initializer_list< double >list)
 Assignment operator.
template<std::size_t N>
FloatArrayoperator= (const FloatArrayF< N > &src)
 Assign from fixed size array.
bool isAllFinite () const
 Returns true if no element is NAN or infinite.
double & at (Index i)
double at (Index i) const
void checkBounds (Index i) const
void checkSizeTowards (const IntArray &loc)
void resizeWithValues (Index s, std::size_t allocChunk=0)
void clear ()
bool containsOnlyZeroes () const
Index giveSize () const
 Returns the size of receiver.
bool isNotEmpty () const
 Returns true if receiver is not empty.
bool isEmpty () const
 Returns true if receiver is empty.
void negated ()
virtual void printYourself () const
virtual void printYourself (const std::string &name) const
virtual void printYourselfToFile (const std::string filename, const bool showDimensions=true) const
virtual void pY () const
void zero ()
 Zeroes all coefficients of receiver.
void beProductOf (const FloatMatrix &aMatrix, const FloatArray &anArray)
void beTProductOf (const FloatMatrix &aMatrix, const FloatArray &anArray)
void beVectorProductOf (const FloatArray &v1, const FloatArray &v2)
void beScaled (double s, const FloatArray &b)
void add (const FloatArray &src)
void add (double factor, const FloatArray &b)
void plusProduct (const FloatMatrix &b, const FloatArray &s, double dV)
void add (double offset)
void subtract (const FloatArray &src)
void times (double s)
void beMaxOf (const FloatArray &a, const FloatArray &b)
void beMinOf (const FloatArray &a, const FloatArray &b)
void beDifferenceOf (const FloatArray &a, const FloatArray &b)
void beDifferenceOf (const FloatArray &a, const FloatArray &b, Index n)
void beSubArrayOf (const FloatArray &src, const IntArray &indx)
void addSubVector (const FloatArray &src, Index si)
void assemble (const FloatArray &fe, const IntArray &loc)
void assembleSquared (const FloatArray &fe, const IntArray &loc)
void copySubVector (const FloatArray &src, int si)
double distance (const FloatArray &x) const
double distance (const FloatArray *x) const
double distance (const FloatArray &iP1, const FloatArray &iP2, double &oXi, double &oXiUnbounded) const
double distance_square (const FloatArray &iP1, const FloatArray &iP2, double &oXi, double &oXiUnbounded) const
double distance_square (const FloatArray &x) const
int giveIndexMinElem (void)
int giveIndexMaxElem (void)
double dotProduct (const FloatArray &x) const
double dotProduct (const FloatArray &x, Index size) const
double normalize_giveNorm ()
void normalize ()
double computeNorm () const
double computeSquaredNorm () const
double sum () const
double product () const
void rotatedWith (FloatMatrix &r, char mode)
const double * givePointer () const
double * givePointer ()
void beVectorForm (const FloatMatrix &aMatrix)
void beSymVectorForm (const FloatMatrix &aMatrix)
void beSymVectorFormOfStrain (const FloatMatrix &aMatrix)
void changeComponentOrder ()
void power (const double exponent)
void beColumnOf (const FloatMatrix &mat, int col)
void beRowOf (const FloatMatrix &mat, Index row)
contextIOResultType storeYourself (DataStream &stream) const
contextIOResultType restoreYourself (DataStream &stream)
int givePackSize (DataStream &buff) const

Protected Member Functions

virtual void giveTranformationMtrx (FloatMatrix &answer, const FloatMatrix &base, int transpose=0) const =0

Protected Attributes

StressStrainMatMode mode
 Stress strain mode.
Protected Attributes inherited from oofem::FloatArray
std::vector< double > values
 Stored values.

Additional Inherited Members

typedef double Scalar
static FloatArray fromVector (const std::vector< double > &v)
static FloatArray fromList (const std::list< double > &l)
static FloatArray fromConcatenated (std::initializer_list< FloatArray > ini)
static FloatArray fromIniList (std::initializer_list< double > ini)
static constexpr int Dim = 1

Detailed Description

Base class for stress/strain vector representations. It is derived from FloatArray class, which is used to store the stress/strain vector components in reduced form. Additional attribute is introduced to keep the stress/strain mode. This allows to implement various stress/strain vector methods regarding the correct stress/strain mode without doing so in full form. The full form includes all components, even if they are zero due to stress/strain mode nature, but in the reduced format, only relevant nonzero components are stored. If in particular mode particular stress component is zero, the corresponding strain is not computed and not stored in reduced vector, and in full vector there is zero value on corresponding position. On the other hand, if zero strain component is imposed this condition must be taken into account in geometrical relations (at element level), and corresponding component are included stress/strain reduced vectors. Methods for converting vectors between reduced and full format are provided.

Definition at line 56 of file stressstrainbasevector.h.

Constructor & Destructor Documentation

◆ StressStrainBaseVector() [1/2]

oofem::StressStrainBaseVector::StressStrainBaseVector ( MaterialMode m)

◆ StressStrainBaseVector() [2/2]

oofem::StressStrainBaseVector::StressStrainBaseVector ( const FloatArray & src,
MaterialMode m )

Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter.

Definition at line 52 of file stressstrainbasevector.C.

References oofem::FloatArray::FloatArray(), and oofem::FloatArray::giveSize().

◆ ~StressStrainBaseVector()

oofem::StressStrainBaseVector::~StressStrainBaseVector ( )
inline

Destructor.

Definition at line 68 of file stressstrainbasevector.h.

Member Function Documentation

◆ computePrincipalValDir()

virtual void oofem::StressStrainBaseVector::computePrincipalValDir ( FloatArray & answer,
FloatMatrix & dir ) const
pure virtual

Computes principal values and directions of receiver vector.

Parameters
answerComputed principal values (sorted).
dirPrincipal directions (stored column wise).

Implemented in oofem::StrainVector, and oofem::StressVector.

References computeVolumetricPart(), oofem::FloatArray::FloatArray(), oofem::FloatArray::FloatMatrix, restoreYourself(), storeYourself(), StressStrainBaseVector(), transformTo(), and oofem::transpose().

◆ computePrincipalValues()

virtual void oofem::StressStrainBaseVector::computePrincipalValues ( FloatArray & answer) const
pure virtual

Member function that computes principal values of receiver (strain vector).

Parameters
answerComputed principal values (sorted).

Implemented in oofem::StrainVector, and oofem::StressVector.

References oofem::FloatArray::FloatArray().

◆ computeVolumetricPart()

double oofem::StressStrainBaseVector::computeVolumetricPart ( ) const

Returns the volumetric part of the vector.

Definition at line 188 of file stressstrainbasevector.C.

References oofem::FloatArray::at(), giveStressStrainMode(), and OOFEM_ERROR.

Referenced by computePrincipalValDir().

◆ convertFromFullForm()

void oofem::StressStrainBaseVector::convertFromFullForm ( const FloatArray & reducedform,
MaterialMode mode )

Assign to receiver the reduced form of given vector.

Parameters
reducedformReduced form of receiver to expand.
modeMode of the stress/strain.

Definition at line 92 of file stressstrainbasevector.C.

References oofem::FloatArray::at(), oofem::IntArray::at(), oofem::FloatArray::FloatArray(), oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), mode, OOFEM_ERROR, oofem::FloatArray::resize(), and oofem::zero().

Referenced by oofem::MPSDamMaterial::giveRealStressVector().

◆ convertToFullForm()

void oofem::StressStrainBaseVector::convertToFullForm ( FloatArray & fullform) const

◆ giveStressStrainMode()

◆ giveTranformationMtrx()

virtual void oofem::StressStrainBaseVector::giveTranformationMtrx ( FloatMatrix & answer,
const FloatMatrix & base,
int transpose = 0 ) const
protectedpure virtual

Computes 3d transformation matrix from standard vector transformation matrix.

Parameters
answertransformation matrix for strain vector
base(3,3) matrix, where on each column are stored unit direction vectors of local coordinate axes to which we do transformation.
transposeIf transpose == 1 then transpose base matrix before transforming

Implemented in oofem::StrainVector, and oofem::StressVector.

References oofem::FloatArray::FloatMatrix, and oofem::transpose().

Referenced by transformTo().

◆ letStressStrainModeBe()

void oofem::StressStrainBaseVector::letStressStrainModeBe ( const MaterialMode newMode)

Changes the material mode of receiver.

Parameters
newModeNew mode.

Definition at line 156 of file stressstrainbasevector.C.

References mode, oofem::FloatArray::resize(), and oofem::zero().

Referenced by oofem::StrainVector::applyDeviatoricElasticStiffness().

◆ operator=()

StressStrainBaseVector & oofem::StressStrainBaseVector::operator= ( const StressStrainBaseVector & src)

Assignment operator. Defines the assignment between two Stress Strain Base Vectors. The Assignment between FloatArray and StressStrainBaseVector is also possible, in this case the FloatArray assignment operator is used, where the operand is converted to FloatArray (mode is lost). The assignment from FloatArray to StressStrainBaseVector is not defined (needs material mode).

Definition at line 62 of file stressstrainbasevector.C.

References mode, oofem::FloatArray::resize(), oofem::FloatArray::size(), and StressStrainBaseVector().

◆ restoreYourself()

contextIOResultType oofem::StressStrainBaseVector::restoreYourself ( DataStream & stream)

◆ storeYourself()

contextIOResultType oofem::StressStrainBaseVector::storeYourself ( DataStream & stream)

◆ transformTo()

void oofem::StressStrainBaseVector::transformTo ( StressStrainBaseVector & answer,
const FloatMatrix & base,
int transpose = 0 ) const

Transforms receiver vector into another coordinate system.

Parameters
answertransformed strain vector
baseTransformation matrix. There are on each column stored unit vectors of coordinate system (so called base vectors) to which we do transformation. These vectors must be expressed in the same coordinate system as source strainVector.
answerTransformed 3d strain.
baseNew base to express vector in.
transposeIf transpose == 1 then transpose base matrix before transforming.

Definition at line 164 of file stressstrainbasevector.C.

References oofem::FloatArray::beProductOf(), convertToFullForm(), oofem::FloatArray::FloatArray(), oofem::FloatArray::FloatMatrix, giveStressStrainMode(), giveTranformationMtrx(), StressStrainBaseVector(), and oofem::transpose().

Referenced by computePrincipalValDir().

Member Data Documentation

◆ mode


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