Skip to content
Snippets Groups Projects
Commit b8b7bd54 authored by Ling Wu's avatar Ling Wu
Browse files

bug

parent b098a2a7
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,14 @@ double IPNonLocalDamage::plasticEnergy() const ...@@ -22,6 +22,14 @@ double IPNonLocalDamage::plasticEnergy() const
double IPNonLocalDamage::get(int comp) const double IPNonLocalDamage::get(int comp) const
{ {
//here to vizualize direction
//const double *euler=&(_nldStatev[_pos_euler]);
//if(comp == IPField::SIG_XX) return euler[0];
//if(comp == IPField::SIG_YY) return euler[1];
//if(comp == IPField::SIG_ZZ) return euler[2];
if(comp >= IPField::SIG_XX and comp<=IPField::SIG_XY ) if(comp >= IPField::SIG_XX and comp<=IPField::SIG_XY )
return _nldStress(comp-1); return _nldStress(comp-1);
else if(comp==IPField::SIG_XZ) // order xx yy zz xy xz yz else if(comp==IPField::SIG_XZ) // order xx yy zz xy xz yz
......
...@@ -26,6 +26,7 @@ class IPNonLocalDamage : public IPVariableMechanics ...@@ -26,6 +26,7 @@ class IPNonLocalDamage : public IPVariableMechanics
int _pos_inc_R; int _pos_inc_R;
int _pos_inc_Ja; int _pos_inc_Ja;
int _pos_mtx_Ja; int _pos_mtx_Ja;
int _pos_euler;
public: // All data public to avoid the creation of function to access public: // All data public to avoid the creation of function to access
// x y z // x y z
...@@ -53,7 +54,7 @@ class IPNonLocalDamage : public IPVariableMechanics ...@@ -53,7 +54,7 @@ class IPNonLocalDamage : public IPVariableMechanics
_nldEffectivePlasticStrain(0.), _nldCurrentPlasticStrain(0.), _nldDamage(0.),_nldSpBar(0.), _nldEffectivePlasticStrain(0.), _nldCurrentPlasticStrain(0.), _nldDamage(0.),_nldSpBar(0.),
_pos_str_mtx(-1), _pos_str_inc(-1),_pos_stn_mtx(-1), _pos_stn_inc(-1), _pos_inc_vfi(-1), _pos_str_mtx(-1), _pos_str_inc(-1),_pos_stn_mtx(-1), _pos_stn_inc(-1), _pos_inc_vfi(-1),
_pos_inc_ar(-1), _pos_inc_R (-1), _elasticEne(0.), _pos_inc_Ja(-1), _pos_mtx_Ja(-1), _pos_inc_ar(-1), _pos_inc_R (-1), _elasticEne(0.), _pos_inc_Ja(-1), _pos_mtx_Ja(-1),
_pos_euler(-1),
_plasticEne(0.),_dissipationBlocked(false) _plasticEne(0.),_dissipationBlocked(false)
{ {
mallocvector(&_nldStatev,_nldNsdv); mallocvector(&_nldStatev,_nldNsdv);
...@@ -80,6 +81,7 @@ class IPNonLocalDamage : public IPVariableMechanics ...@@ -80,6 +81,7 @@ class IPNonLocalDamage : public IPVariableMechanics
_pos_inc_R = source._pos_inc_R; _pos_inc_R = source._pos_inc_R;
_pos_inc_Ja = source._pos_inc_Ja; _pos_inc_Ja = source._pos_inc_Ja;
_pos_mtx_Ja = source._pos_mtx_Ja; _pos_mtx_Ja = source._pos_mtx_Ja;
_pos_euler = source._pos_euler;
_nldStrain =source._nldStrain; _nldStrain =source._nldStrain;
_nldStress =source._nldStress; _nldStress =source._nldStress;
_nldEffectivePlasticStrain=source._nldEffectivePlasticStrain; _nldEffectivePlasticStrain=source._nldEffectivePlasticStrain;
...@@ -109,6 +111,7 @@ class IPNonLocalDamage : public IPVariableMechanics ...@@ -109,6 +111,7 @@ class IPNonLocalDamage : public IPVariableMechanics
_pos_inc_R = source->_pos_inc_R; _pos_inc_R = source->_pos_inc_R;
_pos_inc_Ja = source->_pos_inc_Ja; _pos_inc_Ja = source->_pos_inc_Ja;
_pos_mtx_Ja = source->_pos_mtx_Ja; _pos_mtx_Ja = source->_pos_mtx_Ja;
_pos_euler = source->_pos_euler;
_nldStrain = source->_nldStrain; _nldStrain = source->_nldStrain;
_nldStress = source->_nldStress; _nldStress = source->_nldStress;
_nldEffectivePlasticStrain=source->_nldEffectivePlasticStrain; _nldEffectivePlasticStrain=source->_nldEffectivePlasticStrain;
...@@ -150,6 +153,7 @@ class IPNonLocalDamage : public IPVariableMechanics ...@@ -150,6 +153,7 @@ class IPNonLocalDamage : public IPVariableMechanics
virtual void setPosIncR(int i) {_pos_inc_R = i;} virtual void setPosIncR(int i) {_pos_inc_R = i;}
virtual void setPosIncJa(int i) {_pos_inc_Ja = i;} virtual void setPosIncJa(int i) {_pos_inc_Ja = i;}
virtual void setPosMtxJa(int i) {_pos_mtx_Ja = i;} virtual void setPosMtxJa(int i) {_pos_mtx_Ja = i;}
virtual void setPosEuler(int i) {_pos_euler = i;}
virtual IPVariable* clone() const {return new IPNonLocalDamage(*this);}; virtual IPVariable* clone() const {return new IPNonLocalDamage(*this);};
virtual void restart(); virtual void restart();
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <fstream> #include <fstream>
#include <string.h>
#include "RandomField.h" #include "RandomField.h"
#include "matrix_operations.h" #include "matrix_operations.h"
...@@ -338,7 +339,8 @@ Random_Feul::~Random_Feul(){ ...@@ -338,7 +339,8 @@ Random_Feul::~Random_Feul(){
void Random_Feul::RandomGen(const SVector3 &GaussP, double* V_Rand){ void Random_Feul::RandomGen(const SVector3 &GaussP, double* V_Rand){
if(_Geo == "Cylinder"){ if(strcmp(_Geo,"Cylinder")==1)
{
if(_Eul_mean[0] == 0.0){ if(_Eul_mean[0] == 0.0){
V_Rand[0] = 0.0; V_Rand[0] = 0.0;
V_Rand[1] = 0.0; V_Rand[1] = 0.0;
...@@ -355,7 +357,7 @@ void Random_Feul::RandomGen(const SVector3 &GaussP, double* V_Rand){ ...@@ -355,7 +357,7 @@ void Random_Feul::RandomGen(const SVector3 &GaussP, double* V_Rand){
V_Rand[2] = 0.0; V_Rand[2] = 0.0;
} }
} }
else if(_Geo == "Cos" or _Geo == "Logistic"){ else if(strcmp(_Geo,"Cos")==1 or strcmp(_Geo,"Logistic")==1){
double x, y; double x, y;
double L = _Ldomain.x(); double L = _Ldomain.x();
const Yarn_class* TWeft, *TWarp; const Yarn_class* TWeft, *TWarp;
......
...@@ -359,6 +359,7 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD ...@@ -359,6 +359,7 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD
if(Randnum !=0){ if(Randnum !=0){
if(Reuler != NULL) Reuler->RandomGen(GaussP, &(stv1[pos_euler])); if(Reuler != NULL) Reuler->RandomGen(GaussP, &(stv1[pos_euler]));
if(RMatProp !=NULL){ if(RMatProp !=NULL){
double Rprop[Randnum]; double Rprop[Randnum];
int k=0; int k=0;
...@@ -654,10 +655,13 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD ...@@ -654,10 +655,13 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD
} }
ivi->setPosStrMtx(mat->get_pos_mtx_stress()); ivi->setPosStrMtx(mat->get_pos_mtx_stress());
ivi->setPosStrInc(mat->get_pos_inc_stress()); ivi->setPosStrInc(mat->get_pos_inc_stress());
ivi->setPosEuler(pos_euler);
iv1->setPosStrMtx(mat->get_pos_mtx_stress()); iv1->setPosStrMtx(mat->get_pos_mtx_stress());
iv1->setPosStrInc(mat->get_pos_inc_stress()); iv1->setPosStrInc(mat->get_pos_inc_stress());
iv1->setPosEuler(pos_euler);
iv2->setPosStrMtx(mat->get_pos_mtx_stress()); iv2->setPosStrMtx(mat->get_pos_mtx_stress());
iv2->setPosStrInc(mat->get_pos_inc_stress()); iv2->setPosStrInc(mat->get_pos_inc_stress());
iv2->setPosEuler(pos_euler);
copyvect(stv1,stvi,nsdv); copyvect(stv1,stvi,nsdv);
copyvect(stv1,stv2,nsdv); copyvect(stv1,stv2,nsdv);
...@@ -964,5 +968,7 @@ void mlawNonLocalDamage_Stoch::createIPVariable(const SVector3 &GaussP, IPNonLoc ...@@ -964,5 +968,7 @@ void mlawNonLocalDamage_Stoch::createIPVariable(const SVector3 &GaussP, IPNonLoc
} }
ipv->setPosStrMtx(mat->get_pos_mtx_stress()); ipv->setPosStrMtx(mat->get_pos_mtx_stress());
ipv->setPosStrInc(mat->get_pos_inc_stress()); ipv->setPosStrInc(mat->get_pos_inc_stress());
ipv->setPosEuler(pos_euler);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment