45StressStrainBaseVector :: StressStrainBaseVector(MaterialMode m) :
FloatArray()
47 this->
resize( StructuralMaterial :: giveSizeOfVoigtSymVector(m) );
54 if ( StructuralMaterial :: giveSizeOfVoigtSymVector(m) != src.
giveSize() ) {
55 OOFEM_ERROR(
"The source has size %d and a new MaterialMode %s has reduced size %d", (int)src.giveSize(), __MaterialModeToString(m), (int)StructuralMaterial :: giveSizeOfVoigtSymVector(m) );
64 if (
this != & src ) {
66 for(
Index i=0; i<this->
size(); i++) (*
this)[i]=src[i];
74StressStrainBaseVector :: convertToFullForm(
FloatArray &answer)
const
79 if (
mode == _3dMat ) {
87 StructuralMaterial :: giveVoigtSymVectorMask(indx, ( MaterialMode )
mode);
92StressStrainBaseVector :: convertFromFullForm(
const FloatArray &vector, MaterialMode
mode)
96 if (
mode == _3dMat ) {
102 for (
int i = 1; i <= 6; i++ ) {
103 this->
at(i) = vector.
at(i);
106 StructuralMaterial :: giveVoigtSymVectorMask(indx,
mode);
107 this->
resize( StructuralMaterial :: giveSizeOfVoigtSymVector(
mode) );
110 for (
int i = 1; i <= indx.
giveSize(); i++ ) {
112 if ( ( j = indx.
at(i) ) ) {
113 this->
at(i) = vector.
at(j);
124 if ( ( iores = FloatArray :: storeYourself(stream) ) !=
CIO_OK ) {
140 if ( ( iores = FloatArray :: restoreYourself(stream) ) !=
CIO_OK ) {
146 if ( !stream.
read(val) ) {
156StressStrainBaseVector :: letStressStrainModeBe(
const MaterialMode newMode)
159 this->
resize( StructuralMaterial :: giveSizeOfVoigtSymVector(newMode) );
188StressStrainBaseVector :: computeVolumetricPart()
const
192 if ( myMode == _1dMat ) {
195 }
else if ( myMode == _PlaneStress ) {
200 return ( this->
at(1) + this->
at(2) + this->
at(3) ) / 3.0;
virtual int read(int *data, std::size_t count)=0
Reads count integer values into array pointed by data.
virtual int write(const int *data, std::size_t count)=0
Writes count integer values from array pointed by data.
void assemble(const FloatArray &fe, const IntArray &loc)
Index giveSize() const
Returns the size of receiver.
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
FloatArray(int n=0)
Constructor for sized array. Data is zeroed.
StressStrainBaseVector(MaterialMode)
Constructor. Creates zero value stress/strain vector for given material mode.
StressStrainMatMode mode
Stress strain mode.
MaterialMode giveStressStrainMode() const
Returns the material mode of receiver.
virtual void giveTranformationMtrx(FloatMatrix &answer, const FloatMatrix &base, int transpose=0) const =0
void convertToFullForm(FloatArray &fullform) const
FloatMatrixF< M, N > transpose(const FloatMatrixF< N, M > &mat)
Constructs transposed matrix.
MaterialMode StressStrainMatMode
FloatMatrixF< N, M > zero()
Constructs a zero matrix (this is the default behavior when constructing a matrix,...
@ CIO_IOERR
General IO error.