|
OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Specialization of a floating point array for representing a stress state. More...
#include <stressvector.h>
Inheritance diagram for oofem::StressVector:
Collaboration diagram for oofem::StressVector:Public Member Functions | |
| StressVector (MaterialMode) | |
| Constructor. Creates zero value stress/strain vector for given material mode. More... | |
| StressVector (const FloatArray &, MaterialMode) | |
| Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter. More... | |
| ~StressVector () | |
| Destructor. More... | |
| void | computePrincipalValues (FloatArray &answer) const |
| Member function that computes principal values of receiver (stress vector). More... | |
| void | computePrincipalValDir (FloatArray &answer, FloatMatrix &dir) const |
| Computes principal values and directions of receiver vector. More... | |
| void | computeDeviatoricVolumetricSplit (StressVector &dev, double &vol) const |
| Computes split of receiver into deviatoric and volumetric part. More... | |
| void | computeDeviatoricVolumetricSum (StressVector &answer, double vol) const |
| Sums volumetric part to receiver. More... | |
| void | printYourself () const |
| Prints receiver on stdout, useful for debugging. More... | |
| double | computeFirstInvariant () const |
| Computes the first invariant I1 of the stress. More... | |
| double | computeSecondInvariant () const |
| Computes the second invariant J2 of the deviatoric stress. More... | |
| double | computeThirdInvariant () const |
| Computes the third invariant J3 of the deviatoric stress state. More... | |
| void | computeAllThreeHWCoordinates (double &xsi, double &rho, double &theta) const |
| Computes all three Haigh-Westergaard coordinate of the stress. More... | |
| double | computeFirstCoordinate () const |
| Computes the first Haigh-Westergaard coordinate of the stress. More... | |
| double | computeSecondCoordinate () const |
| Computes the second Haigh-Westergaard coordinate of the deviatoric stress. More... | |
| double | computeThirdCoordinate () const |
| Computes the third Haigh-Westergaard coordinate of the deviatoric stress. More... | |
| void | applyElasticCompliance (StrainVector &strain, const double EModulus, const double nu) const |
| Applies the isotropic elastic compliance to the stress. More... | |
| void | applyDeviatoricElasticCompliance (StrainVector &strain, const double EModulus, const double nu) const |
| Applies the isotropic elastic stiffness to the deviatoric stress. More... | |
| void | applyDeviatoricElasticCompliance (StrainVector &strain, const double GModulus) const |
| Applies the isotropic elastic stiffness to the deviatoric stress. More... | |
| double | computeStressNorm () const |
| Computes the norm of the stress tensor using engineering notation. 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 stress state.
Definition at line 48 of file stressvector.h.
| oofem::StressVector::StressVector | ( | MaterialMode | m | ) |
Constructor. Creates zero value stress/strain vector for given material mode.
Definition at line 44 of file stressvector.C.
| oofem::StressVector::StressVector | ( | const FloatArray & | src, |
| MaterialMode | m | ||
| ) |
Constructor. Creates stress/strain vector, values taken from given vector, mode is parameter.
Definition at line 47 of file stressvector.C.
|
inline |
Destructor.
Definition at line 56 of file stressvector.h.
| void oofem::StressVector::applyDeviatoricElasticCompliance | ( | StrainVector & | strain, |
| const double | EModulus, | ||
| const double | nu | ||
| ) | const |
Applies the isotropic elastic stiffness to the deviatoric stress.
| strain | Computed strain |
| EModulus | Elasticity modulus of the material. |
| nu | Poisson's ratio of the material. |
Definition at line 456 of file stressvector.C.
| void oofem::StressVector::applyDeviatoricElasticCompliance | ( | StrainVector & | strain, |
| const double | GModulus | ||
| ) | const |
Applies the isotropic elastic stiffness to the deviatoric stress.
| strain | Computed strain. |
| GModulus | Shear modulus of the material. |
Definition at line 467 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), OOFEM_ERROR, and oofem::FloatArray::values.
| void oofem::StressVector::applyElasticCompliance | ( | StrainVector & | strain, |
| const double | EModulus, | ||
| const double | nu | ||
| ) | const |
Applies the isotropic elastic compliance to the stress.
| strain | Computed strain. |
| EModulus | Elasticity modulus of the material. |
| nu | Poisson's ratio of the material. |
Definition at line 427 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
| void oofem::StressVector::computeAllThreeHWCoordinates | ( | double & | xsi, |
| double & | rho, | ||
| double & | theta | ||
| ) | const |
Computes all three Haigh-Westergaard coordinate of the stress.
| xsi | First HW-coordinate. |
| rho | Second HW-coordinate. |
| theta | third HW-coordinate. |
Definition at line 367 of file stressvector.C.
References computeDeviatoricVolumetricSplit(), computeFirstCoordinate(), computeSecondCoordinate(), computeThirdCoordinate(), and oofem::StressStrainBaseVector::giveStressStrainMode().
| void oofem::StressVector::computeDeviatoricVolumetricSplit | ( | StressVector & | dev, |
| double & | vol | ||
| ) | const |
Computes split of receiver into deviatoric and volumetric part.
| dev | Computed deviatoric part. |
| vol | Computed volumetric part. |
Definition at line 51 of file stressvector.C.
References oofem::FloatArray::at(), oofem::StressStrainBaseVector::giveStressStrainMode(), and OOFEM_ERROR.
Referenced by computeAllThreeHWCoordinates().
| void oofem::StressVector::computeDeviatoricVolumetricSum | ( | StressVector & | answer, |
| double | vol | ||
| ) | const |
Sums volumetric part to receiver.
| answer | Computed full stress vector. |
| vol | Volumetric part to add. |
Definition at line 78 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and OOFEM_ERROR.
| double oofem::StressVector::computeFirstCoordinate | ( | ) | const |
Computes the first Haigh-Westergaard coordinate of the stress.
. Definition at line 382 of file stressvector.C.
References computeFirstInvariant().
Referenced by computeAllThreeHWCoordinates().
| double oofem::StressVector::computeFirstInvariant | ( | ) | const |
Computes the first invariant I1 of the stress.
Definition at line 291 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
Referenced by computeFirstCoordinate().
|
virtual |
Computes principal values and directions of receiver vector.
| answer | Computed principal values (sorted). |
| dir | Principal directions (stored column wise). |
Implements oofem::StressStrainBaseVector.
Definition at line 182 of file stressvector.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(), oofem::FloatArray::zero(), and oofem::FloatMatrix::zero().
Referenced by oofem::RankineMat::computeEta(), oofem::IsotropicDamageMaterial1::computeEta(), oofem::RankineMat::evaluatePlaneStressStiffMtrx(), oofem::IDGMaterial::giveInternalLength(), oofem::IDGMaterial::giveInternalLengthDerivative(), oofem::RankineMatGrad::givePlaneStressKappaMatrix(), oofem::MPSDamMaterial::giveRealStressVector(), and oofem::RankineMat::performPlasticityReturn().
|
virtual |
Member function that computes principal values of receiver (stress vector).
| answer | computed principal values (sorted) |
Implements oofem::StressStrainBaseVector.
Definition at line 104 of file stressvector.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::StressVector::computeSecondCoordinate | ( | ) | const |
Computes the second Haigh-Westergaard coordinate of the deviatoric stress.
. Definition at line 392 of file stressvector.C.
References computeSecondInvariant().
Referenced by computeAllThreeHWCoordinates().
| double oofem::StressVector::computeSecondInvariant | ( | ) | const |
Computes the second invariant J2 of the deviatoric stress.
Definition at line 311 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
Referenced by computeSecondCoordinate(), and computeThirdCoordinate().
| double oofem::StressVector::computeStressNorm | ( | ) | const |
Computes the norm of the stress tensor using engineering notation.
Definition at line 500 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
Referenced by oofem::MisesMatGrad::givePlaneStrainStiffMtrx().
| double oofem::StressVector::computeThirdCoordinate | ( | ) | const |
Computes the third Haigh-Westergaard coordinate of the deviatoric stress.
. Definition at line 402 of file stressvector.C.
References computeSecondInvariant(), and computeThirdInvariant().
Referenced by computeAllThreeHWCoordinates().
| double oofem::StressVector::computeThirdInvariant | ( | ) | const |
Computes the third invariant J3 of the deviatoric stress state.
Definition at line 336 of file stressvector.C.
References oofem::StressStrainBaseVector::giveStressStrainMode(), and oofem::FloatArray::values.
Referenced by computeThirdCoordinate().
|
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 529 of file stressvector.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 278 of file stressvector.C.
References oofem::StressStrainBaseVector::mode.