OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Specialization of a floating point array for representing a strain state. More...
#include <strainvector.h>
Public Member Functions | |
StrainVector (MaterialMode) | |
Constructor. Creates zero value stress/strain vector for given material mode. More... | |
StrainVector (const FloatArray &, MaterialMode) | |
Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter. More... | |
~StrainVector () | |
Destructor. More... | |
void | computePrincipalValues (FloatArray &answer) const |
Computes the principal values of the receiver. More... | |
void | computePrincipalValDir (FloatArray &answer, FloatMatrix &dir) const |
Computes the principal values and principal directions of the receiver. More... | |
void | computeMaxPrincipalDir (FloatArray &answer) const |
Computes the principal direction of the receiver associated with the maximum principal value. More... | |
void | computeDeviatoricVolumetricSplit (StrainVector &answer, double &vol) const |
Computes split of receiver into deviatoric and volumetric part. More... | |
void | computeDeviatoricVolumetricSum (StrainVector &answer, const double vol) const |
Computes sum of deviatoric and volumetric part. More... | |
void | printYourself () const |
Prints receiver on stdout, useful for debugging. More... | |
double | computeVolumeChange () const |
Computes the change of volume. More... | |
double | computeStrainNorm () const |
Computes the tensorial norm of the strain in engineering notation. More... | |
void | applyElasticStiffness (StressVector &stress, const double EModulus, const double nu) const |
Applies the elastic stiffness to the strain. More... | |
void | applyDeviatoricElasticStiffness (StressVector &stress, const double EModulus, const double nu) const |
Applies the elastic stiffness to the deviatoric strain. More... | |
void | applyDeviatoricElasticStiffness (StressVector &stress, const double GModulus) const |
Applies the elastic stiffness to the deviatoric strain. More... | |
Public Member Functions inherited from oofem::StressStrainBaseVector | |
StressStrainBaseVector (MaterialMode) | |
Constructor. Creates zero value stress/strain vector for given material mode. More... | |
StressStrainBaseVector (const FloatArray &, MaterialMode) | |
Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter. More... | |
~StressStrainBaseVector () | |
Destructor. More... | |
StressStrainBaseVector & | operator= (const StressStrainBaseVector &) |
Assignment operator. More... | |
MaterialMode | giveStressStrainMode () const |
Returns the material mode of receiver. More... | |
void | letStressStrainModeBe (const MaterialMode newMode) |
Changes the material mode of receiver. More... | |
void | convertToFullForm (FloatArray &fullform) const |
Computes the full form of receiver. More... | |
void | convertFromFullForm (const FloatArray &reducedform, MaterialMode mode) |
Assign to receiver the reduced form of given vector. More... | |
void | transformTo (StressStrainBaseVector &answer, const FloatMatrix &base, int transpose=0) const |
Transforms receiver vector into another coordinate system. More... | |
contextIOResultType | storeYourself (DataStream &stream) |
contextIOResultType | restoreYourself (DataStream &stream) |
double | computeVolumetricPart () const |
Returns the volumetric part of the vector. More... | |
Public Member Functions inherited from oofem::FloatArray | |
FloatArray (int n=0) | |
Constructor for sized array. Data is zeroed. More... | |
FloatArray (double)=delete | |
Disallow double parameter, which can otherwise give unexpected results. More... | |
FloatArray (const FloatArray &src) | |
Copy constructor. Creates the array from another array. More... | |
FloatArray (FloatArray &&src) | |
Move constructor. Creates the array from another array. More... | |
FloatArray (std::initializer_list< double >list) | |
Initializer list constructor. More... | |
virtual | ~FloatArray () |
Destructor. More... | |
FloatArray & | operator= (const FloatArray &src) |
Assignment operator. More... | |
FloatArray & | operator= (FloatArray &&src) |
Move operator. More... | |
FloatArray & | operator= (std::initializer_list< double >list) |
Assignment operator. More... | |
void | push_back (const double &iVal) |
Add one element. More... | |
bool | isFinite () const |
Returns true if no element is NAN or infinite. More... | |
double & | at (int i) |
Coefficient access function. More... | |
double | at (int i) const |
Coefficient access function. More... | |
double & | operator() (int i) |
Coefficient access function. More... | |
double & | operator[] (int i) |
const double & | operator() (int i) const |
Coefficient access function. More... | |
const double & | operator[] (int i) const |
void | checkBounds (int i) const |
Checks size of receiver towards requested bounds. More... | |
void | checkSizeTowards (const IntArray &loc) |
Checks size of receiver towards values stored in loc array. More... | |
void | reserve (int s) |
Allocates enough size to fit s, and clears the array. More... | |
void | resizeWithValues (int s, int allocChunk=0) |
Checks size of receiver towards requested bounds. More... | |
void | resize (int s) |
Resizes receiver towards requested size. More... | |
void | clear () |
Clears receiver (zero size). More... | |
void | hardResize (int s) |
Resizes the size of the receiver to requested bounds. More... | |
bool | containsOnlyZeroes () const |
Returns nonzero if all coefficients of the receiver are 0, else returns zero. More... | |
int | giveSize () const |
Returns the size of receiver. More... | |
bool | isNotEmpty () const |
Returns true if receiver is not empty. More... | |
bool | isEmpty () const |
Returns true if receiver is empty. More... | |
void | negated () |
Switches the sign of every coefficient of receiver. More... | |
virtual void | printYourself (const std::string &name) const |
Print receiver on stdout with custom name. More... | |
virtual void | printYourselfToFile (const std::string filename, const bool showDimensions=true) const |
Print receiver to file. More... | |
virtual void | pY () const |
Print receiver on stdout with high accuracy. More... | |
void | zero () |
Zeroes all coefficients of receiver. More... | |
void | append (const FloatArray &a) |
Appends array to reciever. More... | |
void | append (double a) |
Appends value to reciever. More... | |
void | beProductOf (const FloatMatrix &aMatrix, const FloatArray &anArray) |
Receiver becomes the result of the product of aMatrix and anArray. More... | |
void | beTProductOf (const FloatMatrix &aMatrix, const FloatArray &anArray) |
Receiver becomes the result of the product of aMatrix^T and anArray. More... | |
void | beVectorProductOf (const FloatArray &v1, const FloatArray &v2) |
Computes vector product (or cross product) of vectors given as parameters, , and stores the result into receiver. More... | |
void | beScaled (double s, const FloatArray &b) |
Sets receiver to be . More... | |
void | add (const FloatArray &src) |
Adds array src to receiver. More... | |
void | add (double factor, const FloatArray &b) |
Adds array times factor to receiver. More... | |
void | plusProduct (const FloatMatrix &b, const FloatArray &s, double dV) |
Adds the product . More... | |
void | add (double offset) |
Adds scalar to receiver. More... | |
void | subtract (const FloatArray &src) |
Subtracts array src to receiver. More... | |
void | times (double s) |
Multiplies receiver with scalar. More... | |
void | beMaxOf (const FloatArray &a, const FloatArray &b) |
Sets receiver to maximum of a or b's respective elements. More... | |
void | beMinOf (const FloatArray &a, const FloatArray &b) |
Sets receiver to be minimum of a or b's respective elements. More... | |
void | beDifferenceOf (const FloatArray &a, const FloatArray &b) |
Sets receiver to be a - b. More... | |
void | beDifferenceOf (const FloatArray &a, const FloatArray &b, int n) |
Sets receiver to be a - b, using only the first n entries. More... | |
void | beSubArrayOf (const FloatArray &src, const IntArray &indx) |
Extract sub vector form src array and stores the result into receiver. More... | |
void | addSubVector (const FloatArray &src, int si) |
Adds the given vector as sub-vector to receiver. More... | |
void | assemble (const FloatArray &fe, const IntArray &loc) |
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array. More... | |
void | assembleSquared (const FloatArray &fe, const IntArray &loc) |
Assembles the array fe with each component squared. More... | |
void | copySubVector (const FloatArray &src, int si) |
Copy the given vector as sub-vector to receiver. More... | |
double | distance (const FloatArray &x) const |
Computes the distance between position represented by receiver and position given as parameter. More... | |
double | distance (const FloatArray *x) const |
double | distance (const FloatArray &iP1, const FloatArray &iP2, double &oXi, double &oXiUnbounded) const |
Computes distance between the position represented by the reciever and a line segment represented by it's start point iP1 and it's end point iP2. More... | |
double | distance_square (const FloatArray &iP1, const FloatArray &iP2, double &oXi, double &oXiUnbounded) const |
double | distance_square (const FloatArray &x) const |
Computes the square of distance between position represented by receiver and position given as parameter. More... | |
int | giveIndexMinElem (void) |
Returns index (between 1 and Size) of minimum element in the array. More... | |
int | giveIndexMaxElem (void) |
Returns index (between 1 and Size) of maximum element in the array. More... | |
double | dotProduct (const FloatArray &x) const |
Computes the dot product (or inner product) of receiver and argument. More... | |
double | dotProduct (const FloatArray &x, int size) const |
Computes the dot product (or inner product) of receiver and argument. More... | |
double | normalize () |
Normalizes receiver. More... | |
double | computeNorm () const |
Computes the norm (or length) of the vector. More... | |
double | computeSquaredNorm () const |
Computes the square of the norm. More... | |
double | sum () const |
Computes the sum of receiver values. More... | |
double | product () const |
Computes the product of receiver values. More... | |
void | rotatedWith (FloatMatrix &r, char mode) |
Returns the receiver a rotated according the change-of-base matrix r. More... | |
const double * | givePointer () const |
Gives the pointer to the raw data, breaking encapsulation. More... | |
double * | givePointer () |
void | beVectorForm (const FloatMatrix &aMatrix) |
Reciever will be a vector with 9 components formed from a 3x3 matrix. More... | |
void | beSymVectorForm (const FloatMatrix &aMatrix) |
Reciever will be a vector with 6 components formed from a 3x3 matrix. More... | |
void | beSymVectorFormOfStrain (const FloatMatrix &aMatrix) |
void | changeComponentOrder () |
Swaps the fourth and sixth index in the array. More... | |
void | power (const double exponent) |
Raise each element to its power. More... | |
void | beColumnOf (const FloatMatrix &mat, int col) |
Reciever will be set to a given column in a matrix. More... | |
contextIOResultType | storeYourself (DataStream &stream) const |
contextIOResultType | restoreYourself (DataStream &stream) |
int | givePackSize (DataStream &buff) const |
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 & | operator= (const double &) |
Assignment of scalar to all components of receiver. More... | |
Protected Member Functions | |
void | giveTranformationMtrx (FloatMatrix &answer, const FloatMatrix &base, int transpose=0) const |
Computes 3d transformation matrix from standard vector transformation matrix. More... | |
Additional Inherited Members | |
Protected Attributes inherited from oofem::StressStrainBaseVector | |
StressStrainMatMode | mode |
Stress strain mode. More... | |
Protected Attributes inherited from oofem::FloatArray | |
std::vector< double > | values |
Stored values. More... | |
Specialization of a floating point array for representing a strain state.
Definition at line 45 of file strainvector.h.
oofem::StrainVector::StrainVector | ( | MaterialMode | m | ) |
Constructor. Creates zero value stress/strain vector for given material mode.
Definition at line 43 of file strainvector.C.
oofem::StrainVector::StrainVector | ( | const FloatArray & | src, |
MaterialMode | m | ||
) |
Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter.
Definition at line 46 of file strainvector.C.
|
inline |
Destructor.
Definition at line 53 of file strainvector.h.
void oofem::StrainVector::applyDeviatoricElasticStiffness | ( | StressVector & | stress, |
const double | EModulus, | ||
const double | nu | ||
) | const |
Applies the elastic stiffness to the deviatoric strain.
stress | Computed stress. |
EModulus | Elasticity modulus of the material. |
nu | Poisson's ratio of the material. |
Definition at line 390 of file strainvector.C.
void oofem::StrainVector::applyDeviatoricElasticStiffness | ( | StressVector & | stress, |
const double | GModulus | ||
) | const |
Applies the elastic stiffness to the deviatoric strain.
stress | Computed stress. |
GModulus | Shear modulus of the material |
Definition at line 402 of file strainvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), oofem::StressStrainBaseVector::letStressStrainModeBe(), OOFEM_ERROR, and oofem::FloatArray::values.
void oofem::StrainVector::applyElasticStiffness | ( | StressVector & | stress, |
const double | EModulus, | ||
const double | nu | ||
) | const |
Applies the elastic stiffness to the strain.
stress | Computed stress. |
EModulus | Elasticity modulus of the material. |
nu | Poisson's ratio of the material |
Definition at line 350 of file strainvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), OOFEM_ERROR, and oofem::FloatArray::values.
Referenced by oofem::RankineMat::performPlasticityReturn().
void oofem::StrainVector::computeDeviatoricVolumetricSplit | ( | StrainVector & | answer, |
double & | vol | ||
) | const |
Computes split of receiver into deviatoric and volumetric part.
answer | Deviatoric strain. |
vol | Volumetric strain. |
Definition at line 50 of file strainvector.C.
References oofem::FloatArray::at(), oofem::StressStrainBaseVector::giveStressStrainMode(), and OOFEM_ERROR.
void oofem::StrainVector::computeDeviatoricVolumetricSum | ( | StrainVector & | answer, |
const double | vol | ||
) | const |
Computes sum of deviatoric and volumetric part.
answer | Total strain. |
vol | Volumetric strain. |
Definition at line 77 of file strainvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and OOFEM_ERROR.
void oofem::StrainVector::computeMaxPrincipalDir | ( | FloatArray & | answer | ) | const |
Computes the principal direction of the receiver associated with the maximum principal value.
answer | Principal direction. |
Definition at line 182 of file strainvector.C.
References oofem::FloatMatrix::at(), computePrincipalValDir(), and oofem::FloatArray::giveSize().
Referenced by oofem::PlaneStress2d::giveCharacteristicSize().
|
virtual |
Computes the principal values and principal directions of the receiver.
The principal values are ordered from the largest to the smallest.
answer | Principal values. |
dir | Principal directions (first index refers to component, second index to eigenvalue number). |
Implements oofem::StressStrainBaseVector.
Definition at line 199 of file strainvector.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::StressStrainBaseVector::convertToFullForm(), oofem::FloatArray::giveSize(), oofem::StressStrainBaseVector::giveStressStrainMode(), oofem::FloatMatrix::jaco_(), oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), and oofem::FloatArray::zero().
Referenced by oofem::IsotropicDamageMaterial1::computeEta(), and computeMaxPrincipalDir().
|
virtual |
Computes the principal values of the receiver.
answer | Principal values. |
Implements oofem::StressStrainBaseVector.
Definition at line 103 of file strainvector.C.
References oofem::FloatArray::at(), oofem::StressStrainBaseVector::convertToFullForm(), oofem::cubic3r(), oofem::FloatArray::giveSize(), oofem::StressStrainBaseVector::giveStressStrainMode(), oofem::FloatArray::resize(), and oofem::FloatArray::zero().
double oofem::StrainVector::computeStrainNorm | ( | ) | const |
Computes the tensorial norm of the strain in engineering notation.
Definition at line 326 of file strainvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
double oofem::StrainVector::computeVolumeChange | ( | ) | const |
Computes the change of volume.
Definition at line 307 of file strainvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
|
protectedvirtual |
Computes 3d transformation matrix from standard vector transformation matrix.
answer | transformation 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. |
transpose | If transpose == 1 then transpose base matrix before transforming |
Implements oofem::StressStrainBaseVector.
Definition at line 450 of file strainvector.C.
References oofem::FloatMatrix::at(), oofem::FloatMatrix::beTranspositionOf(), and oofem::FloatMatrix::resize().
|
virtual |
Prints receiver on stdout, useful for debugging.
Reimplemented from oofem::FloatArray.
Definition at line 295 of file strainvector.C.
References oofem::StressStrainBaseVector::mode, and oofem::FloatArray::values.