65 if ( result !=
IRRT_OK )
return result;
67 if ( result !=
IRRT_OK )
return result;
70 k = value / sqrt(3.0);
132 for (
int i = 1; i <= isize; i++ ) {
135 answer->
at( mask.
at(i) ) = ( sqrt(2.) * 2. / 3. ) * this->
kinematicModuli * strainSpaceHardeningVariables->
at(i);
143 strainSpaceHardeningVariables->
at(rSize);
158 if ( stressVector != NULL ) {
160 helpVector = * stressVector;
161 helpVector.
add(backStress);
166 helpVector = * stressVector;
191 answer.
resize(size, size);
197 for (
int i = 1; i <= ksize; i++ ) {
215 double f, ax, ay, az, sx, sy, sz;
220 if ( stressVector != NULL ) {
222 helpVector = * stressVector;
223 helpVector.
add(backStress);
228 helpVector = * stressVector;
233 if ( fabs(f) < 1.e-6 ) {
237 ax = helpVector.
at(1);
238 ay = helpVector.
at(2);
239 az = helpVector.
at(3);
241 sx = ( 2. / 3. ) * ax - ( 1. / 3. ) * ay - ( 1. / 3. ) * az;
242 sy = ( 2. / 3. ) * ay - ( 1. / 3. ) * ax - ( 1. / 3. ) * az;
243 sz = ( 2. / 3. ) * az - ( 1. / 3. ) * ay - ( 1. / 3. ) * ax;
245 answer->
at(1) = 0.5 * sx / f;
246 answer->
at(2) = 0.5 * sy / f;
247 answer->
at(3) = 0.5 * sz / f;
248 answer->
at(4) = helpVector.
at(4) / f;
249 answer->
at(5) = helpVector.
at(5) / f;
250 answer->
at(6) = helpVector.
at(6) / f;
266 FloatArray *fullKinematicGradient, reducedKinematicGrad;
278 delete fullKinematicGradient;
280 kcount = reducedKinematicGrad.
giveSize();
284 for (
int i = 1; i <= kcount; i++ ) {
285 answer->
at(i) = reducedKinematicGrad.
at(i);
290 answer->
at(size) = sqrt(1. / 3.);
316 double f, f32, f12, ax, ay, az;
322 answer.
resize(size, size);
326 if ( stressVector.
giveSize() != 0 ) {
330 helpVector = stressVector;
331 helpVector.
add(backStress);
333 helpVector = stressVector;
338 f32 = pow(f, 3. / 2.);
340 ax = helpVector.
at(1);
341 ay = helpVector.
at(2);
342 az = helpVector.
at(3);
344 df.
at(1) = ( 2. / 3. ) * ax - ( 1. / 3. ) * ay - ( 1. / 3. ) * az;
345 df.
at(2) = ( 2. / 3. ) * ay - ( 1. / 3. ) * ax - ( 1. / 3. ) * az;
346 df.
at(3) = ( 2. / 3. ) * az - ( 1. / 3. ) * ay - ( 1. / 3. ) * ax;
347 df.
at(4) = 2. * helpVector.
at(4);
348 df.
at(5) = 2. * helpVector.
at(5);
349 df.
at(6) = 2. * helpVector.
at(6);
351 for (
int i = 1; i <= 3; i++ ) {
352 if ( ( imask = mask.
at(i) ) == 0 ) {
356 for (
int j = i; j <= 3; j++ ) {
357 if ( ( jmask = mask.
at(j) ) == 0 ) {
362 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( 4. / 6 );
364 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( -2. / 6 );
365 answer.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * ( -2. / 6 );
370 for (
int i = 1; i <= 3; i++ ) {
371 if ( ( imask = mask.
at(i) ) == 0 ) {
375 for (
int j = 4; j <= 6; j++ ) {
376 if ( ( jmask = mask.
at(j) ) == 0 ) {
380 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
381 answer.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
385 for (
int i = 4; i <= 6; i++ ) {
386 if ( ( imask = mask.
at(i) ) == 0 ) {
390 for (
int j = i; j <= 6; j++ ) {
391 if ( ( jmask = mask.
at(j) ) == 0 ) {
396 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j) + 0.5 * ( 1. / f12 ) * 2.;
398 answer.
at(imask, jmask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
399 answer.
at(jmask, imask) = -( 1. / 4. ) * ( 1. / f32 ) * df.
at(i) * df.
at(j);
420 reducedAnswer.
beProductOf(reducedModuli, strainIncrement);
441 if ( stressVector == NULL ) {
445 v1 = ( ( stressVector->
at(1) - stressVector->
at(2) ) * ( stressVector->
at(1) - stressVector->
at(2) ) );
446 v2 = ( ( stressVector->
at(2) - stressVector->
at(3) ) * ( stressVector->
at(2) - stressVector->
at(3) ) );
447 v3 = ( ( stressVector->
at(3) - stressVector->
at(1) ) * ( stressVector->
at(3) - stressVector->
at(1) ) );
449 answer = ( 1. / 6. ) * ( v1 + v2 + v3 ) + stressVector->
at(4) * stressVector->
at(4) +
450 stressVector->
at(5) * stressVector->
at(5) + stressVector->
at(6) * stressVector->
at(6);
498 for (
int i = 1; i <= 6; i++ ) {
499 answer.
at(i) = stressSpaceHardeningVars.
at(i);
516 return stressSpaceHardeningVars->
at(7);
518 return stressSpaceHardeningVars->
at(1);
static int giveSizeOfVoigtSymVector(MaterialMode mmode)
Returns the size of symmetric part of a reduced stress/strain vector according to given mode...
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
static int giveVoigtSymVectorMask(IntArray &answer, MaterialMode mmode)
The same as giveVoigtVectorMask but returns a mask corresponding to a symmetric second order tensor...
virtual void computeTrialStressIncrement(FloatArray &answer, GaussPoint *gp, const FloatArray &strainIncrement, TimeStep *tStep)
double & at(int i)
Coefficient access function.
void clear()
Clears receiver (zero size).
int kinematicHardeningFlag
virtual void computeHardeningReducedModuli(FloatMatrix &answer, GaussPoint *gp, FloatArray *strainSpaceHardeningVariables, TimeStep *tStep)
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
static void giveFullSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the reduced unsymmetric Voigt vector (2nd order tensor) to full form.
#define _IFT_J2plasticMaterial_ihm
virtual FloatArray * ComputeStressGradient(GaussPoint *gp, FloatArray *stressVector, FloatArray *stressSpaceHardeningVars)
double givePoissonsRatio()
Returns Poisson's ratio.
int giveSizeOfReducedHardeningVarsVector(GaussPoint *gp) const
double giveIsotropicHardeningVar(FloatArray *stressSpaceHardeningVars)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for giveRealStressVector of receiver in given integration point...
#define _IFT_IsotropicLinearElasticMaterial_talpha
#define _IFT_IsotropicLinearElasticMaterial_n
virtual FloatArray * ComputeStressSpaceHardeningVars(GaussPoint *gp, FloatArray *strainSpaceHardeningVariables)
static void giveReducedSymVectorForm(FloatArray &answer, const FloatArray &vec, MaterialMode matMode)
Converts the full unsymmetric Voigt vector (2nd order tensor) to reduced form.
This class implements an isotropic linear elastic material in a finite element problem.
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
#define _IFT_IsotropicLinearElasticMaterial_e
virtual int hasHardening()
int isotropicHardeningFlag
double at(int i, int j) const
Coefficient access function.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
virtual FloatArray * ComputeStressSpaceHardeningVarsReducedGradient(GaussPoint *gp, FloatArray *stressVector, FloatArray *stressSpaceHardeningVars)
Abstract base class representing a material status information.
virtual void compute3dElasticModuli(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
friend class PlasticMaterialStatus
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
#define _IFT_J2plasticMaterial_khm
virtual void computeReducedGradientMatrix(FloatMatrix &answer, GaussPoint *gp, const FloatArray &stressVector, const FloatArray &stressSpaceHardeningVars)
static void giveInvertedVoigtVectorMask(IntArray &answer, MaterialMode mmode)
Gives the inverted version of giveVoigtVectorMask.
virtual ~J2plasticMaterial()
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
virtual double computeYieldValueAt(GaussPoint *gp, FloatArray *stressVector, FloatArray *stressSpaceHardeningVars)
int giveSizeOfFullHardeningVarsVector()
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
REGISTER_Material(DummyMaterial)
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
void negated()
Switches the sign of every coefficient of receiver.
double giveYoungsModulus()
Returns Young's modulus.
J2plasticMaterial(int n, Domain *d)
#define _IFT_J2plasticMaterial_ry
Class representing integration point in finite element program.
This class implements a general plastic material.
Class representing solution step.
double computeJ2InvariantAt(FloatArray *answer)
void add(const FloatArray &src)
Adds array src to receiver.
void giveStressBackVector(FloatArray &answer, const FloatArray &stressSpaceHardeningVars)
void resize(int s)
Resizes receiver towards requested size.