diff --git a/NonLinearSolver/BoundaryConditions/nonLinearBC.h b/NonLinearSolver/BoundaryConditions/nonLinearBC.h index 4cc02dc782e4c6d00f1557fc08633d14011c7fce..3e080f76117e910932f61708481f5d6f383bfc96 100644 --- a/NonLinearSolver/BoundaryConditions/nonLinearBC.h +++ b/NonLinearSolver/BoundaryConditions/nonLinearBC.h @@ -200,13 +200,16 @@ class nonLinearSameDisplacementBCBetweenTwoGroups : public nonLinearBoundaryCond public: int comp; groupOfElements* g1, *g2; // two pbc group - + int phys1, phys2; + virtual nonLinearBoundaryCondition::type getType() const {return nonLinearBoundaryCondition::PERIODIC;} nonLinearSameDisplacementBCBetweenTwoGroups():nonLinearBoundaryCondition(),comp(0),g1(NULL),g2(NULL){}; nonLinearSameDisplacementBCBetweenTwoGroups(const nonLinearSameDisplacementBCBetweenTwoGroups& src) : nonLinearBoundaryCondition(src){ this->comp = src.comp; this->g1 = src.g1; this->g2 = src.g2; + this->phys1 = src.phys1; + this->phys2 = src.phys2; } virtual ~nonLinearSameDisplacementBCBetweenTwoGroups(){ if (g1!=NULL){delete g1; g1 = NULL;} @@ -219,6 +222,8 @@ class nonLinearPeriodicBCBetweenTwoGroups : public nonLinearBoundaryCondition{ int comp; MVertex* v1, *v2; // two root vertices groupOfElements* g1, *g2; // two pbc group + int phys1, phys2; + int physVer1, physVer2; std::map<Dof,Dof> dofMap; std::pair<Dof,Dof>* rootDofs; @@ -230,6 +235,10 @@ class nonLinearPeriodicBCBetweenTwoGroups : public nonLinearBoundaryCondition{ this->g2 = src.g2; this->v1 = src.v1; this->v2 = src.v2; + this->phys1 = src.phys1; + this->phys2 = src.phys2; + this->physVer1 = src.physVer1; + this->physVer2 = src.physVer2; rootDofs = NULL; this->dofMap.clear(); } @@ -244,7 +253,8 @@ class nonLinearAveragePeriodicBCBetweenTwoGroups : public nonLinearBoundaryCondi int comp; MVertex* v1, *v2; // two root vertices groupOfElements* g1, *g2; // two pbc group - + int phys1, phys2; + int physVer1, physVer2; virtual nonLinearBoundaryCondition::type getType() const {return nonLinearBoundaryCondition::PERIODIC;} nonLinearAveragePeriodicBCBetweenTwoGroups():nonLinearBoundaryCondition(),comp(0),g1(NULL),g2(NULL),v1(NULL),v2(NULL){}; @@ -254,6 +264,10 @@ class nonLinearAveragePeriodicBCBetweenTwoGroups : public nonLinearBoundaryCondi this->g2 = src.g2; this->v1 = src.v1; this->v2 = src.v2; + this->phys1 = src.phys1; + this->phys2 = src.phys2; + this->physVer1 = src.physVer1; + this->physVer2 = src.physVer2; } virtual ~nonLinearAveragePeriodicBCBetweenTwoGroups(){ if (g1!=NULL){delete g1; g1 = NULL;} diff --git a/NonLinearSolver/Domain/partDomain.cpp b/NonLinearSolver/Domain/partDomain.cpp index 6852e9471794c532c9db7886f9ac92cb462ad812..62d7d653934a554cae88cc931780a0d534756386 100644 --- a/NonLinearSolver/Domain/partDomain.cpp +++ b/NonLinearSolver/Domain/partDomain.cpp @@ -21,112 +21,88 @@ #include "mpi.h" #endif //HAVE_MPI -partDomain::partDomain(const partDomain &source){ - // notice: only options are copied - // this domain is created as usual domain in multiscale analyses, - // all other members are created at the solver - - _tag = source._tag; - _phys = source._phys; - _fullDg = source._fullDg; - _wsp = source._wsp; - - // all terms are not copied as they are created in the solver - btermBulk = NULL; // source.btermBulk; - btermElasticBulk = NULL; // not copy - massterm = NULL; //source.massterm; - ltermBulk = NULL; //source.ltermBulk; - btermTangent = NULL; // btermTangent; - btermElasticTangent = NULL; - scalarTermPF = NULL; - linearTermPF = NULL; - - // integBulk will be created in Solver - integBulk = NULL; //source.integBulk; - - _numberNonLocalVariable = source._numberNonLocalVariable; - _numberConstitutiveExtraDofDiffusionVariable = source._numberConstitutiveExtraDofDiffusionVariable; - _bmbp = source._bmbp; - _eps = source._eps; - - setmaterial = false; //source.setmaterial; - +partDomain::partDomain(const int tag, const int phys, + const int ws,const bool fdg, int numNL, int numExtraDof) : +_tag(tag), +_phys(phys), +_fullDg(fdg), +btermBulk(NULL), +btermElasticBulk(NULL), +massterm(NULL), +ltermBulk(NULL), +integBulk(NULL), +btermTangent(NULL), +btermElasticTangent(NULL), +scalarTermPF(NULL), +linearTermPF(NULL), +_numberNonLocalVariable(numNL), +_numberConstitutiveExtraDofDiffusionVariable(numExtraDof), +_bmbp(false), +_eps(1e-8), +setmaterial(false), +_distributedOtherRanks(true), +_distributedOnRoot(true), +g(NULL), +_solver(NULL) +{ + _groupGhostMPI = new groupOfElements(); + switch(ws){ + case 0: + _wsp = functionSpaceType::Lagrange; + break; + case 10000: // Allow to set space later (used for interface domain) + _wsp = functionSpaceType::Inter; + break; + default: + Msg::Error("Function space type is unknown for partDomain %d. So Lagrange by default"); + _wsp = functionSpaceType::Lagrange; + } #if defined(HAVE_MPI) - _rootRank = source._rootRank; - _otherRanks = source._otherRanks; - // not copy - //_domainIPBulk = source._domainIPBulk; - //_mapIPBulk = source._mapIPBulk; + _rootRank = Msg::GetCommRank(); #endif //HAVE_MPI - - _distributedOtherRanks = source._distributedOtherRanks; - _distributedOnRoot = source._distributedOnRoot; - - _macroSolver = source._macroSolver; - - // - g = NULL; - if (source.g != NULL){ - g = new groupOfElements(); - }; - // group are added in solver - _groupGhostMPI = NULL; - if (source._groupGhostMPI != NULL){ - _groupGhostMPI = new groupOfElements(); - }; } -partDomain& partDomain::operator=(const partDomain &source) +partDomain::partDomain(const partDomain &source): +_tag(source._tag), +_phys(source._phys), +_fullDg(source._fullDg), +_wsp(source._wsp), +btermBulk(NULL), +btermElasticBulk(NULL), +massterm(NULL), +ltermBulk(NULL), +integBulk(NULL), +btermTangent(NULL), +btermElasticTangent(NULL), +scalarTermPF(NULL), +linearTermPF(NULL), +_numberNonLocalVariable(source._numberNonLocalVariable), +_numberConstitutiveExtraDofDiffusionVariable(source._numberConstitutiveExtraDofDiffusionVariable), +_bmbp(source._bmbp), +_eps(source._eps), +setmaterial(false), +_distributedOtherRanks(source._distributedOtherRanks), +_distributedOnRoot(source._distributedOnRoot), +g(NULL), +_solver(NULL) { - _tag = source._tag; - _phys = source._phys; - _fullDg = source._fullDg; - _wsp = source._wsp; - - // all terms are not copied as they are created in the solver - btermBulk = NULL; // source.btermBulk; - btermElasticBulk = NULL; - massterm = NULL; //source.massterm; - ltermBulk = NULL; //source.ltermBulk; - btermTangent = NULL; // btermTangent; - btermElasticTangent = NULL; - scalarTermPF = NULL; - linearTermPF = NULL; - - integBulk = source.integBulk; - - _numberNonLocalVariable = source._numberNonLocalVariable; - _numberConstitutiveExtraDofDiffusionVariable = source._numberConstitutiveExtraDofDiffusionVariable; - _bmbp = source._bmbp; - _eps = source._eps; - - setmaterial = false; //source.setmaterial; - + _groupGhostMPI = new groupOfElements(); #if defined(HAVE_MPI) - _rootRank = source._rootRank; - _otherRanks = source._otherRanks; - // not copy - //_domainIPBulk = source._domainIPBulk; - //_mapIPBulk = source._mapIPBulk; + _rootRank = Msg::GetCommRank(); #endif //HAVE_MPI +} - _distributedOtherRanks = source._distributedOtherRanks; - _distributedOnRoot = source._distributedOnRoot; - - _macroSolver = source._macroSolver; - - // - g = NULL; - if (source.g != NULL){ - g = new groupOfElements(); - }; - // group are added in solver - _groupGhostMPI = NULL; - if (source._groupGhostMPI != NULL){ - _groupGhostMPI = new groupOfElements(); - }; - - return *this; +partDomain::~partDomain(){ + if (btermBulk) {delete btermBulk; btermBulk = NULL;} + if (ltermBulk) {delete ltermBulk; ltermBulk = NULL;} + if (integBulk) {delete integBulk; integBulk = NULL;} + if (btermElasticBulk) {delete btermElasticBulk; btermElasticBulk = NULL;}; + if (massterm) {delete massterm; massterm = NULL;} + if (btermTangent) {delete btermTangent; btermTangent= NULL;}; + if (g) {delete g; g = NULL;} + if (_groupGhostMPI) {delete _groupGhostMPI; _groupGhostMPI = NULL;}; + if (scalarTermPF) {delete scalarTermPF; scalarTermPF = NULL;} + if (linearTermPF) {delete linearTermPF; linearTermPF = NULL;} } bool partDomain::isDistributedRootRank() const {return _distributedOnRoot;}; @@ -134,10 +110,10 @@ void partDomain::distributeOnRootRank(const int flg){_distributedOnRoot = flg;}; bool partDomain::isDistributedOtherRanks() const {return _distributedOtherRanks;}; void partDomain::setDistributedOtherRanks(const bool flag) {_distributedOtherRanks = flag;}; -void partDomain::setMacroSolver(const nonLinearMechSolver* solver){ - _macroSolver = solver; +void partDomain::setSolver(const nonLinearMechSolver* solver){ + _solver = solver; } -const nonLinearMechSolver* partDomain::getMacroSolver() const {return _macroSolver;}; +const nonLinearMechSolver* partDomain::getSolver() const {return _solver;}; BilinearTermBase* partDomain::createNeumannMatrixTerm(FunctionSpace<double> *spneu, const groupOfElements* g, const simpleFunctionTime<double>* f, const unknownField *uf, @@ -375,11 +351,11 @@ void partDomain::setBulkMatrixByPerturbation(const int i, const double eps) _eps = eps; } -int partDomain::getHomogenizationOrder() const {return _macroSolver->getHomogenizationOrder();} -bool partDomain::inMultiscaleSimulation() const {return _macroSolver->inMultiscaleSimulation();}; -bool partDomain::isExtractCohesiveLawFromMicroDamage() const {return _macroSolver->getDamageToCohesiveJumpFlag();}; -bool partDomain::getExtractIrreversibleEnergyFlag() const {return _macroSolver->getExtractIrreversibleEnergyFlag();}; -const elementErosionFilter& partDomain::getElementErosionFilter() const{return _macroSolver->getElementErosionFilter();} +int partDomain::getHomogenizationOrder() const {return _solver->getHomogenizationOrder();} +bool partDomain::inMultiscaleSimulation() const {return _solver->inMultiscaleSimulation();}; +bool partDomain::isExtractCohesiveLawFromMicroDamage() const {return _solver->getDamageToCohesiveJumpFlag();}; +bool partDomain::getExtractIrreversibleEnergyFlag() const {return _solver->getExtractIrreversibleEnergyFlag();}; +const elementErosionFilter& partDomain::getElementErosionFilter() const{return _solver->getElementErosionFilter();} void partDomain::computeAverageStress(const IPField* ipf, STensor3& sig) const{ if (g->size() >0){ @@ -794,100 +770,60 @@ double partDomain::computeIrreversibleEnergy(const IPField* ipf) const{ }; - -dgPartDomain::dgPartDomain(const dgPartDomain &source) : partDomain(source){ - - btermBound = NULL; - ltermBound = NULL; - btermVirtBound = NULL; - ltermVirtBound = NULL; - - scalarTermPFBound = NULL; - linearTermPFBound = NULL; - - integBound = NULL; // source.integBound; - _interByPert = source._interByPert; - _virtByPert = source._virtByPert; - - _multipleFieldFormulation = source._multipleFieldFormulation; - _multiFieldMethod = source._multiFieldMethod; - _enrichedUnknownLocation = source._enrichedUnknownLocation; - - _averageStrainBased = source._averageStrainBased; - _brokenIPFromBeginning = source._brokenIPFromBeginning; - _fixInterfaceDofComp = source._fixInterfaceDofComp; - - #if defined(HAVE_MPI) - // not copied - //_domainIPInterfacePlus = source._domainIPInterfacePlus, - //_domainIPInterfaceMinus = source._domainIPInterfaceMinus; - // _mapIPInterfacePlus = source._mapIPInterfacePlus, - // _mapIPInterfaceMinus = source._mapIPInterfaceMinus; - #endif //HAVE_MPI - - gi = NULL; - if (source.gi != NULL){ - gi = new groupOfElements(); - } - gib = NULL; - if (source.gib != NULL){ - gib = new groupOfElements(); - } - giv = NULL; - if (source.giv != NULL){ - giv = new groupOfElements(); - } +dgPartDomain::dgPartDomain(const int tag, const int phys, const int ws, + const bool fdg, int numNL, int numCED) : partDomain(tag,phys,ws,fdg,numNL,numCED), +btermBound(NULL), +ltermBound(NULL), +btermVirtBound(NULL), +ltermVirtBound(NULL), +integBound(NULL), +scalarTermPFBound(NULL), +linearTermPFBound(NULL), +_interByPert(false), +_virtByPert(false), +_multipleFieldFormulation(false), +_multiFieldMethod(ONEFIELD), +_enrichedUnknownLocation(UNDEFINED), +_averageStrainBased(false), +_brokenIPFromBeginning(false) +{ + gi = new groupOfElements(); + gib = new groupOfElements(); + giv = new groupOfElements(); } - -dgPartDomain& dgPartDomain::operator=(const partDomain & dom) +dgPartDomain::dgPartDomain(const dgPartDomain &source) : partDomain(source), +btermBound(NULL), +ltermBound(NULL), +btermVirtBound(NULL), +ltermVirtBound(NULL), +integBound(NULL), +scalarTermPFBound(NULL), +linearTermPFBound(NULL), +_interByPert(source._interByPert), +_virtByPert(source._virtByPert), +_multipleFieldFormulation(source._multipleFieldFormulation), +_multiFieldMethod(source._multiFieldMethod), +_enrichedUnknownLocation(source._enrichedUnknownLocation), +_averageStrainBased(source._averageStrainBased), +_brokenIPFromBeginning(source._brokenIPFromBeginning), +_fixInterfaceDofComp(source._fixInterfaceDofComp) { - partDomain::operator=(dom); - const dgPartDomain* source = dynamic_cast<const dgPartDomain*>(&dom); - if (source!= NULL){ - btermBound = NULL; - ltermBound = NULL; - btermVirtBound = NULL; - ltermVirtBound = NULL; - - scalarTermPFBound = NULL; - linearTermPFBound = NULL; - - integBound = NULL; - _interByPert = source->_interByPert; - _virtByPert = source->_virtByPert; - - _multipleFieldFormulation = source->_multipleFieldFormulation; - _multiFieldMethod = source->_multiFieldMethod; - _enrichedUnknownLocation = source->_enrichedUnknownLocation; - - _averageStrainBased = source->_averageStrainBased; - _brokenIPFromBeginning = source->_brokenIPFromBeginning; - _fixInterfaceDofComp = source->_fixInterfaceDofComp; - - - #if defined(HAVE_MPI) - // not copied - //_domainIPInterfacePlus = source._domainIPInterfacePlus, - //_domainIPInterfaceMinus = source._domainIPInterfaceMinus; - // _mapIPInterfacePlus = source._mapIPInterfacePlus, - // _mapIPInterfaceMinus = source._mapIPInterfaceMinus; - #endif //HAVE_MPI - - gi = NULL; - if (source->gi != NULL){ - gi = new groupOfElements(); - } - gib = NULL; - if (source->gib != NULL){ - gib = new groupOfElements(); - } - giv = NULL; - if (source->giv != NULL){ - giv = new groupOfElements(); - } - } + gi = new groupOfElements(); + gib = new groupOfElements(); + giv = new groupOfElements(); +} - return *this; +dgPartDomain::~dgPartDomain(){ + if (btermBound) {delete btermBound; btermBound = NULL;}; + if (ltermBound) {delete ltermBound; ltermBound = NULL;}; + if (btermVirtBound) {delete btermVirtBound; btermVirtBound= NULL;}; + if (ltermVirtBound) {delete ltermVirtBound; ltermVirtBound=NULL;}; + if (integBound) {delete integBound; integBound = NULL;}; + if (gi) {delete gi; gi = NULL;}; + if (gib) {delete gib; gib = NULL;}; + if (giv) {delete giv; giv = NULL;}; + if (scalarTermPFBound) {delete scalarTermPFBound; scalarTermPFBound = NULL;} + if (linearTermPFBound) {delete linearTermPFBound; linearTermPFBound = NULL;}; } void dgPartDomain::averageStrainBased(const bool flg){_averageStrainBased = flg;}; diff --git a/NonLinearSolver/Domain/partDomain.h b/NonLinearSolver/Domain/partDomain.h index ac7844b64c4371701a10a2d757c6f53bb59b000e..6dcb337b627925c9ad11be800ebd657734757757 100644 --- a/NonLinearSolver/Domain/partDomain.h +++ b/NonLinearSolver/Domain/partDomain.h @@ -26,447 +26,390 @@ // class for a domain (pure virtual class) #endif class dgPartDomain; -class partDomain{ +class partDomain +{ #ifndef SWIG - public : - enum EnrichedUnknownLocation{UNDEFINED=0,NODE=1,GP=2}; - - protected : - int _tag; // tag for the dofManager - int _phys; - bool _fullDg; // To know which formulation Cg/Dg or FullDg is used for this part - functionSpaceType::whichSpace _wsp; - BilinearTermBase* btermBulk; - BilinearTermBase* btermElasticBulk; - BilinearTermBase* massterm; - LinearTermBase<double>* ltermBulk; - QuadratureBase* integBulk; - BilinearTermBase* btermTangent; // tangent estimation by homogenization - BilinearTermBase* btermElasticTangent; // elastic tangent estimation by homogenization - // for pathfollowing - ScalarTermBase<double>* scalarTermPF; // scalar pathfollowing term - LinearTermBase<double>* linearTermPF; // linear pathFollowing term - - // for matrix by perturbation - int _numberNonLocalVariable; // number of nonlocal variables - int _numberConstitutiveExtraDofDiffusionVariable; // number of nonlocal variables - bool _bmbp; - double _eps; - virtual void setBulkMatrixByPerturbation(const int i, const double eps=1e-8); - // To know if law is already set - bool setmaterial; - - #if defined(HAVE_MPI) - int _rootRank; - std::set<int> _otherRanks; - std::set<int> _domainIPBulk; // bulk integration points lie on this domain - std::map<int,std::set<int> > _mapIPBulk; // map IP for bulk elements - #endif //HAVE_MPI - - bool _distributedOtherRanks; - bool _distributedOnRoot; - - const nonLinearMechSolver* _macroSolver; // solver where this domain belongs to - - // Todo protect this variable - - groupOfElements *g; // support for this field -public: - // add a group of element for prescribed Dirichlet BC of other partition in MPI - groupOfElements* _groupGhostMPI; - - groupOfElements::elementContainer::const_iterator g_cbegin() const {return g->begin();} - groupOfElements::elementContainer::const_iterator g_cend() const {return g->end();} - groupOfElements::vertexContainer::const_iterator g_cvbegin() const {return g->vbegin();} - groupOfElements::vertexContainer::const_iterator g_cvend() const {return g->vend();} - size_t groupOfElementsSize() const {return g->size();} - void addPhysicalGroup(int dim,int phys,elementFilter& elemfil) - { - if(g==NULL) g = new groupOfElements(); - g->addPhysical(dim,phys,elemfil); - } - virtual void clearGroupOfElements() {g->clearAll();} - bool g_find(MElement* e) const {return g->find(e);} - const groupOfElements* elements() const {return g;} - #endif // SWIG - public: - // _distributedRootRanks is true if the microscopic solver are computed at - // root ranks, false otherwise - virtual bool isDistributedRootRank() const; - virtual void distributeOnRootRank(const int flg); - // _distributedOtherRanks is true if microscopic solver are computed at other - // ranks, false otherwise - // if _distributedOtherRanks = true and _distributedRootRanks = true mean the - // microsopic BVPs are solved in both root and other ranks - // while _distributedRootRanks = false means that the microscopic BVPs are - // solved in other ranks only --> better for manage load balancing - // Clearly, _distributedOtherRanks and _distributedRootRanks can not be - // simultaneously false - virtual bool isDistributedOtherRanks() const; - virtual void setDistributedOtherRanks(const bool flag); -#ifndef SWIG - // Constructors - partDomain(const int tag, const int phys, - const int ws = 0,const bool fdg=false, int numNL=0, int numExtraDof=0) : g(NULL), _tag(tag), _phys(phys), - _bmbp(false), _eps(1e-8), _fullDg(fdg), setmaterial(false), - _numberNonLocalVariable(numNL),_numberConstitutiveExtraDofDiffusionVariable(numExtraDof), - btermBulk(NULL),btermElasticBulk(NULL),massterm(NULL),ltermBulk(NULL), - integBulk(NULL),btermTangent(NULL), btermElasticTangent(NULL),_distributedOtherRanks(true), - _distributedOnRoot(true),scalarTermPF(NULL),linearTermPF(NULL), - _macroSolver(NULL) - { - _groupGhostMPI = new groupOfElements(); - switch(ws){ - case 0: - _wsp = functionSpaceType::Lagrange; - break; - case 10000: // Allow to set space later (used for interface domain) - _wsp = functionSpaceType::Inter; - break; - default: - Msg::Error("Function space type is unknown for partDomain %d. So Lagrange by default"); - _wsp = functionSpaceType::Lagrange; - } + public : + enum EnrichedUnknownLocation{UNDEFINED=0,NODE=1,GP=2}; + + protected : + int _tag; // tag for the dofManager + int _phys; + bool _fullDg; // To know which formulation Cg/Dg or FullDg is used for this part + functionSpaceType::whichSpace _wsp; + BilinearTermBase* btermBulk; + BilinearTermBase* btermElasticBulk; + BilinearTermBase* massterm; + LinearTermBase<double>* ltermBulk; + QuadratureBase* integBulk; + BilinearTermBase* btermTangent; // tangent estimation by homogenization + BilinearTermBase* btermElasticTangent; // elastic tangent estimation by homogenization + // for pathfollowing + ScalarTermBase<double>* scalarTermPF; // scalar pathfollowing term + LinearTermBase<double>* linearTermPF; // linear pathFollowing term + + // for matrix by perturbation + int _numberNonLocalVariable; // number of nonlocal variables + int _numberConstitutiveExtraDofDiffusionVariable; // number of nonlocal variables + bool _bmbp; + double _eps; + // To know if law is already set + bool setmaterial; + #if defined(HAVE_MPI) - _rootRank = Msg::GetCommRank(); + int _rootRank; + std::set<int> _otherRanks; + std::set<int> _domainIPBulk; // bulk integration points lie on this domain + std::map<int,std::set<int> > _mapIPBulk; // map IP for bulk elements #endif //HAVE_MPI - } - partDomain(const partDomain &source); - virtual partDomain& operator=(const partDomain &source); - virtual ~partDomain(){ - if (btermBulk) {delete btermBulk; btermBulk = NULL;} - if (ltermBulk) {delete ltermBulk; ltermBulk = NULL;} - if (integBulk) {delete integBulk; integBulk = NULL;} - if (btermElasticBulk) {delete btermElasticBulk; btermElasticBulk = NULL;}; - if (massterm) {delete massterm; massterm = NULL;} - if (btermTangent) {delete btermTangent; btermTangent= NULL;}; - if (g) {delete g; g = NULL;} - if (_groupGhostMPI) {delete _groupGhostMPI; _groupGhostMPI = NULL;}; - if (scalarTermPF) {delete scalarTermPF; scalarTermPF = NULL;} - if (linearTermPF) {delete linearTermPF; linearTermPF = NULL;} - } - BilinearTermBase* getBilinearBulkTerm() const{return btermBulk;} - BilinearTermBase* getBilinearElasticBulkTerm() const{return btermElasticBulk;} - BilinearTermBase* getBilinearMassTerm() const{return massterm;} - BilinearTermBase* getBilinearTangentTerm() const{return btermTangent;} - BilinearTermBase* getBilinearElasticTangentTerm() const{return btermElasticTangent;} - LinearTermBase<double>* getLinearBulkTerm() const{return ltermBulk;} - - ScalarTermBase<double>* getScalarTermPFBulk() const {return scalarTermPF;}; - LinearTermBase<double>* getLinearTermPFBulk() const {return linearTermPF;}; - - void setMacroSolver(const nonLinearMechSolver* solver); - const nonLinearMechSolver* getMacroSolver() const; - - QuadratureBase* getBulkGaussIntegrationRule() const{return integBulk;} - int getNumNonLocalVariable() const {return _numberNonLocalVariable;}; - int getNumConstitutiveExtraDofDiffusionVariable() const {return _numberConstitutiveExtraDofDiffusionVariable;}; - virtual double getConstitutiveExtraDofDiffusionEqRatio(const int index) const { - Msg::Error("partDomain::getConstitutiveExtraDofDiffusionEqRatio is not defined"); - return -1.; - }; - virtual double getNonConstitutiveExtraDofEqRatio(const int index) const { - Msg::Error("partDomain::getNonConstitutiveExtraDofEqRatio is not defined"); - return -1.; - }; - - // Dimension of domain - virtual int getDim() const=0; - int getTag()const{return _tag;} - int getPhysical() const{return _phys;} - - virtual bool getAccountPathFollowingFlag() const {return true;}; - - //check cohesive element insertion, failure - virtual void checkFailure(IPField* ipf) const = 0; - - // check internal stata - virtual void checkInternalState(IPField* ipf) const = 0; - - - virtual void initializeTerms(unknownField *uf,IPField *ip)=0; - // alocate the object (new) but is not responsiblefor the delete (the NeumannBC is in charged of the delete) - virtual LinearTermBase<double>* createNeumannTerm(FunctionSpace<double> *spneu, const groupOfElements* g, - const simpleFunctionTime<double>* f, const unknownField *uf, - const IPField * ip, const nonLinearBoundaryCondition::location onWhat, - const nonLinearNeumannBC::NeumannBCType neumann_type, - const int comp) const=0; - virtual BilinearTermBase* createNeumannMatrixTerm(FunctionSpace<double> *spneu, const groupOfElements* g, - const simpleFunctionTime<double>* f, const unknownField *uf, - const IPField * ip, const nonLinearBoundaryCondition::location onWhat, - const nonLinearNeumannBC::NeumannBCType neumann_type, - const int comp) const; - // true is domain has interface terms - virtual bool IsInterfaceTerms() const=0; - functionSpaceType::whichSpace getFunctionSpaceType() const{return _wsp;} - - virtual FunctionSpaceBase* getFunctionSpace() =0; - virtual const FunctionSpaceBase* getFunctionSpace() const=0; - - virtual void getNoMassDofs(std::set<Dof>& DofVector) const{}; + bool _distributedOtherRanks; + bool _distributedOnRoot; + groupOfElements *g; // support for this field + const nonLinearMechSolver* _solver; // solver where this domain belongs to + + protected: + virtual void setBulkMatrixByPerturbation(const int i, const double eps=1e-8); + + public: + // add a group of element for prescribed Dirichlet BC of other partition in MPI + groupOfElements* _groupGhostMPI; + groupOfElements::elementContainer::const_iterator g_cbegin() const {return g->begin();} + groupOfElements::elementContainer::const_iterator g_cend() const {return g->end();} + groupOfElements::vertexContainer::const_iterator g_cvbegin() const {return g->vbegin();} + groupOfElements::vertexContainer::const_iterator g_cvend() const {return g->vend();} + size_t groupOfElementsSize() const {return g->size();} + void addPhysicalGroup(int dim,int phys,elementFilter& elemfil) + { + if(g==NULL) g = new groupOfElements(); + g->addPhysical(dim,phys,elemfil); + } + virtual void clearGroupOfElements() {g->clearAll();} + bool g_find(MElement* e) const {return g->find(e);} + const groupOfElements* elements() const {return g;} + #endif // SWIG + + public: + // _distributedRootRanks is true if the microscopic solver are computed at + // root ranks, false otherwise + virtual bool isDistributedRootRank() const; + virtual void distributeOnRootRank(const int flg); + // _distributedOtherRanks is true if microscopic solver are computed at other + // ranks, false otherwise + // if _distributedOtherRanks = true and _distributedRootRanks = true mean the + // microsopic BVPs are solved in both root and other ranks + // while _distributedRootRanks = false means that the microscopic BVPs are + // solved in other ranks only --> better for manage load balancing + // Clearly, _distributedOtherRanks and _distributedRootRanks can not be + // simultaneously false + virtual bool isDistributedOtherRanks() const; + virtual void setDistributedOtherRanks(const bool flag); -// some data of BC have to be set by domain - virtual FunctionSpaceBase* getSpaceForBC(const nonLinearBoundaryCondition::type bc_type, - const nonLinearBoundaryCondition::location bc_location, - const nonLinearNeumannBC::NeumannBCType neumann_type, - const int dof_comp,const groupOfElements *groupBC) const=0; // for dirichlet, neumann and initial - // groupBC = element of domain where BC is applied - virtual QuadratureBase* getQuadratureRulesForNeumannBC(nonLinearNeumannBC &neu) const=0; - - virtual void createIPState(AllIPState::ipstateContainer& map, const bool *state) const; - - virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff)=0; - virtual void computeIpv(AllIPState *aips,MElement *e, IPStateBase::whichState ws, - materialLaw *mlaw,fullVector<double> &disp, bool stiff)=0; - virtual void setGaussIntegrationRule()=0; - virtual bool getFormulation() const{return _fullDg;} - virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw)=0; - - // No materialLaw store here but the function to give the material law exist - // The law has to be store in the derivated class - virtual materialLaw* getMaterialLaw()=0; - virtual const materialLaw* getMaterialLaw() const=0; - virtual int getLawNum() const=0; - // For dg formulation the stability parameters decrease the critical time step size - // in explicit. So this function allows to scale the time step - virtual double scaleTimeStep() const {return 1.;} - // creation of interface. At least boundary to create interface domain - // can be empty be not interdomain creation in this case - virtual void createInterface(manageInterface &maninter)=0; - virtual MElement* createVirtualInterface(IElement *ie) const=0; - virtual MElement* createInterface(IElement* ie1,IElement* ie2) const=0; - // create an interface domain. Use only in mpi case (an interface domain can be given or a new one has to be - // created if dgdom==NULL) - virtual void createInterfaceMPI(const int rankOtherPart, const groupOfElements &groupOtherPart,dgPartDomain* &dgdom){ - Msg::Error("To use parallel implementation you have to define createInterfaceMPI on your domain. Or your version is obsoleted to domain has to be given as last argument"); - } - // Add for BC - virtual FilterDof* createFilterDof(const int comp) const=0; - - // specify order of computational homogenization uses - int getHomogenizationOrder() const; - bool inMultiscaleSimulation() const; - bool isExtractCohesiveLawFromMicroDamage() const; - bool getExtractIrreversibleEnergyFlag() const; - const elementErosionFilter& getElementErosionFilter() const; - - virtual bool IsMultipleFieldFormulation() const {return false;}; - virtual EnrichedUnknownLocation getEnrichedUnknownLocation() const {return UNDEFINED;}; - - virtual int getStressDimension() const{ - // this function is used to define the dimension of stress matrix in the - // insystem nonliner system - Msg::Error("This function must be defined if homogenized tangent is estimated by insystem method"); - } - - //compute mechanical average quantities - virtual void computeAverageStress(const IPField* ipf, STensor3& stress) const; - virtual void computeActiveDissipationAverageStressIncrement(const IPField* ipf, STensor3& stress) const; - virtual void computeAverageHighOrderStress(const IPField* ipf, STensor33& stress) const; - virtual double computeVolumeDomain(const IPField* ipf) const; - - virtual void computeActiveDissipationCenter(const IPField* ipf, SPoint3& pos) const; - virtual void computeActiveDissipationAverageStrainIncrement(const IPField* _ipf, STensor3& strain) const; - virtual double computeVolumeActiveDissipationDomain(const IPField* ipf) const; - - // compute constitutive extra-dof quantities - virtual void computeConstitutiveExtraDofAverageFlux(const int index, const IPField* _ipf, SVector3& extraDofFluxpart) const; - virtual void computeConstitutiveExtraDofAverageInternalEnergy(const int index, const IPField* _ipf, double &internalEnergyExtraDofpart) const; - virtual void computeConstitutiveExtraDofAverageFieldCapacityPerUnitField(const int index, const IPField* _ipf, double& fieldCapacityPart) const; - virtual void computeConstitutiveExtraDofAverageMechanicalSource(const int index, const IPField* _ipf, double& mechanicalSource) const; - - // compute non-constitutive extra-dof quantities - virtual void computeNonConstitutiveExtraDofAverageFlux(const int index, const IPField* _ipf, SVector3& extraDofFluxpart) const; - - // - virtual double computeDeformationEnergy(const IPField* ipf) const; - virtual double computePlasticEnergy(const IPField* ipf) const; - virtual double computeIrreversibleEnergy(const IPField* ipf) const; - - virtual partDomain* clone() const{ - #ifdef _DEBUG - Msg::Warning("Define copyDomain on your domain for multiscale problem"); - #endif - return NULL; - } - #if defined(HAVE_MPI) - virtual void setWorkingRanks(const int root, const std::set<int>& others); - virtual int getRootRank() const; - virtual void getOtherRanks(std::set<int>& others) const; - virtual void clearOtherRanks(); - virtual void createIPMap(); - virtual const std::map<int,std::set<int> >& getMapIPBulk() const {return _mapIPBulk;}; - virtual const std::set<int>& getDomainIPBulk() const {return _domainIPBulk;}; - #endif //HAVE_MPI - virtual double computeMeanValueDomain(const int num, const IPField* ipf, double& volume) const; - virtual double averagingOnActiveDissipationZone(const int num, const IPField* ipf, double & volume, const IPStateBase::whichState ws = IPStateBase::current) const; - virtual void initMicroMeshId(); -#endif // SWIG + #ifndef SWIG + // Constructors + partDomain(const int tag, const int phys, + const int ws = 0,const bool fdg=false, int numNL=0, int numExtraDof=0); + partDomain(const partDomain &source); + virtual ~partDomain(); + + BilinearTermBase* getBilinearBulkTerm() const{return btermBulk;} + BilinearTermBase* getBilinearElasticBulkTerm() const{return btermElasticBulk;} + BilinearTermBase* getBilinearMassTerm() const{return massterm;} + BilinearTermBase* getBilinearTangentTerm() const{return btermTangent;} + BilinearTermBase* getBilinearElasticTangentTerm() const{return btermElasticTangent;} + LinearTermBase<double>* getLinearBulkTerm() const{return ltermBulk;} + ScalarTermBase<double>* getScalarTermPFBulk() const {return scalarTermPF;}; + LinearTermBase<double>* getLinearTermPFBulk() const {return linearTermPF;}; + + void setSolver(const nonLinearMechSolver* solver); + const nonLinearMechSolver* getSolver() const; + + QuadratureBase* getBulkGaussIntegrationRule() const{return integBulk;} + int getNumNonLocalVariable() const {return _numberNonLocalVariable;}; + int getNumConstitutiveExtraDofDiffusionVariable() const {return _numberConstitutiveExtraDofDiffusionVariable;}; + virtual double getConstitutiveExtraDofDiffusionEqRatio(const int index) const { + Msg::Error("partDomain::getConstitutiveExtraDofDiffusionEqRatio is not defined"); + return -1.; + }; + virtual double getNonConstitutiveExtraDofEqRatio(const int index) const { + Msg::Error("partDomain::getNonConstitutiveExtraDofEqRatio is not defined"); + return -1.; + }; + + // Dimension of domain + virtual int getDim() const=0; + int getTag()const{return _tag;} + int getPhysical() const{return _phys;} + + virtual bool getAccountPathFollowingFlag() const {return true;}; + + //check cohesive element insertion, failure + virtual void checkFailure(IPField* ipf) const = 0; + + // check internal stata + virtual void checkInternalState(IPField* ipf) const = 0; + + + virtual void initializeTerms(unknownField *uf,IPField *ip)=0; + // alocate the object (new) but is not responsiblefor the delete (the NeumannBC is in charged of the delete) + virtual LinearTermBase<double>* createNeumannTerm(FunctionSpace<double> *spneu, const groupOfElements* g, + const simpleFunctionTime<double>* f, const unknownField *uf, + const IPField * ip, const nonLinearBoundaryCondition::location onWhat, + const nonLinearNeumannBC::NeumannBCType neumann_type, + const int comp) const=0; + virtual BilinearTermBase* createNeumannMatrixTerm(FunctionSpace<double> *spneu, const groupOfElements* g, + const simpleFunctionTime<double>* f, const unknownField *uf, + const IPField * ip, const nonLinearBoundaryCondition::location onWhat, + const nonLinearNeumannBC::NeumannBCType neumann_type, + const int comp) const; + // true is domain has interface terms + virtual bool IsInterfaceTerms() const=0; + functionSpaceType::whichSpace getFunctionSpaceType() const{return _wsp;} + + virtual FunctionSpaceBase* getFunctionSpace() =0; + virtual const FunctionSpaceBase* getFunctionSpace() const=0; + + virtual void getNoMassDofs(std::set<Dof>& DofVector) const{}; + + // some data of BC have to be set by domain + virtual FunctionSpaceBase* getSpaceForBC(const nonLinearBoundaryCondition::type bc_type, + const nonLinearBoundaryCondition::location bc_location, + const nonLinearNeumannBC::NeumannBCType neumann_type, + const int dof_comp,const groupOfElements *groupBC) const=0; // for dirichlet, neumann and initial + // groupBC = element of domain where BC is applied + virtual QuadratureBase* getQuadratureRulesForNeumannBC(nonLinearNeumannBC &neu) const=0; + + virtual void createIPState(AllIPState::ipstateContainer& map, const bool *state) const; + + virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff)=0; + virtual void computeIpv(AllIPState *aips,MElement *e, IPStateBase::whichState ws, + materialLaw *mlaw,fullVector<double> &disp, bool stiff)=0; + virtual void setGaussIntegrationRule()=0; + virtual bool getFormulation() const{return _fullDg;} + virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw)=0; + + // No materialLaw store here but the function to give the material law exist + // The law has to be store in the derivated class + virtual materialLaw* getMaterialLaw()=0; + virtual const materialLaw* getMaterialLaw() const=0; + virtual int getLawNum() const=0; + // For dg formulation the stability parameters decrease the critical time step size + // in explicit. So this function allows to scale the time step + virtual double scaleTimeStep() const {return 1.;} + // creation of interface. At least boundary to create interface domain + // can be empty be not interdomain creation in this case + virtual void createInterface(manageInterface &maninter)=0; + virtual MElement* createVirtualInterface(IElement *ie) const=0; + virtual MElement* createInterface(IElement* ie1,IElement* ie2) const=0; + // create an interface domain. Use only in mpi case (an interface domain can be given or a new one has to be + // created if dgdom==NULL) + virtual void createInterfaceMPI(const int rankOtherPart, const groupOfElements &groupOtherPart,dgPartDomain* &dgdom){ + Msg::Error("To use parallel implementation you have to define createInterfaceMPI on your domain. Or your version is obsoleted to domain has to be given as last argument"); + } + // Add for BC + virtual FilterDof* createFilterDof(const int comp) const=0; + + // specify order of computational homogenization uses + int getHomogenizationOrder() const; + bool inMultiscaleSimulation() const; + bool isExtractCohesiveLawFromMicroDamage() const; + bool getExtractIrreversibleEnergyFlag() const; + const elementErosionFilter& getElementErosionFilter() const; + + virtual bool IsMultipleFieldFormulation() const {return false;}; + virtual EnrichedUnknownLocation getEnrichedUnknownLocation() const {return UNDEFINED;}; + + virtual int getStressDimension() const{ + // this function is used to define the dimension of stress matrix in the + // insystem nonliner system + Msg::Error("This function must be defined if homogenized tangent is estimated by insystem method"); + } + + //compute mechanical average quantities + virtual void computeAverageStress(const IPField* ipf, STensor3& stress) const; + virtual void computeActiveDissipationAverageStressIncrement(const IPField* ipf, STensor3& stress) const; + virtual void computeAverageHighOrderStress(const IPField* ipf, STensor33& stress) const; + virtual double computeVolumeDomain(const IPField* ipf) const; + + virtual void computeActiveDissipationCenter(const IPField* ipf, SPoint3& pos) const; + virtual void computeActiveDissipationAverageStrainIncrement(const IPField* _ipf, STensor3& strain) const; + virtual double computeVolumeActiveDissipationDomain(const IPField* ipf) const; + + // compute constitutive extra-dof quantities + virtual void computeConstitutiveExtraDofAverageFlux(const int index, const IPField* _ipf, SVector3& extraDofFluxpart) const; + virtual void computeConstitutiveExtraDofAverageInternalEnergy(const int index, const IPField* _ipf, double &internalEnergyExtraDofpart) const; + virtual void computeConstitutiveExtraDofAverageFieldCapacityPerUnitField(const int index, const IPField* _ipf, double& fieldCapacityPart) const; + virtual void computeConstitutiveExtraDofAverageMechanicalSource(const int index, const IPField* _ipf, double& mechanicalSource) const; + + // compute non-constitutive extra-dof quantities + virtual void computeNonConstitutiveExtraDofAverageFlux(const int index, const IPField* _ipf, SVector3& extraDofFluxpart) const; + + // + virtual double computeDeformationEnergy(const IPField* ipf) const; + virtual double computePlasticEnergy(const IPField* ipf) const; + virtual double computeIrreversibleEnergy(const IPField* ipf) const; + + virtual partDomain* clone() const{ + #ifdef _DEBUG + Msg::Warning("Define copyDomain on your domain for multiscale problem"); + #endif + return NULL; + } + #if defined(HAVE_MPI) + virtual void setWorkingRanks(const int root, const std::set<int>& others); + virtual int getRootRank() const; + virtual void getOtherRanks(std::set<int>& others) const; + virtual void clearOtherRanks(); + virtual void createIPMap(); + virtual const std::map<int,std::set<int> >& getMapIPBulk() const {return _mapIPBulk;}; + virtual const std::set<int>& getDomainIPBulk() const {return _domainIPBulk;}; + #endif //HAVE_MPI + virtual double computeMeanValueDomain(const int num, const IPField* ipf, double& volume) const; + virtual double averagingOnActiveDissipationZone(const int num, const IPField* ipf, double & volume, const IPStateBase::whichState ws = IPStateBase::current) const; + virtual void initMicroMeshId(); + #endif // SWIG }; // class for Dg part domain (pure virtual) -class dgPartDomain : public partDomain{ +class dgPartDomain : public partDomain +{ #ifndef SWIG - public: - enum MultiFieldMethod{ + public: + enum MultiFieldMethod{ ONEFIELD=0, TWOFIELD=1, // full }; // - protected : - BilinearTermBase* btermBound; - LinearTermBase<double>* ltermBound; - BilinearTermBase* btermVirtBound; - LinearTermBase<double>* ltermVirtBound; - QuadratureBase* integBound; - - // for pathfollowing - ScalarTermBase<double>* scalarTermPFBound; // scalar pathfollowing term - LinearTermBase<double>* linearTermPFBound; // linear pathFollowing term - - // For matrix by perturbation - bool _interByPert; - bool _virtByPert; - - bool _multipleFieldFormulation; - MultiFieldMethod _multiFieldMethod; // 0 fullTwoField, 1- augemented twofield, 2-DG twofield - EnrichedUnknownLocation _enrichedUnknownLocation; - - bool _averageStrainBased; - bool _brokenIPFromBeginning; - std::vector<int> _fixInterfaceDofComp; // fix components of interface Dofs - - #if defined(HAVE_MPI) - std::set<int> _domainIPInterfacePlus, // plus intergration points lie on this domain - _domainIPInterfaceMinus; // minus integration points lie on this domain - std::map<int,std::set<int> > _mapIPInterfacePlus, // map IP for positive part of interface elements - _mapIPInterfaceMinus; // map IP for negative part of interface elements - #endif //HAVE_MPI - - - public : - // TODO protect these variables - groupOfElements *gi; // support for the interfaceElement TODO cast to a groupOfElements - groupOfElements *gib; // support for the interfaceElement TODO cast to a groupOfElements - groupOfElements *giv; // support for the virtual interface element (used to set Neumann and Dirichlet BC) - - virtual void clearGroupOfElements() - { - partDomain::clearGroupOfElements(); - gi->clearAll(); - } - #endif // SWIG - public: - - virtual void averageStrainBased(const bool flg); - virtual void setMultipleFieldFormulation(const bool flag, const int method, const int loc=2); - virtual void fixInterfaceDofComponent(const int comp); - virtual void breakAllInterfaceIPsFromBeginning(const bool broken); + protected : + BilinearTermBase* btermBound; + LinearTermBase<double>* ltermBound; + BilinearTermBase* btermVirtBound; + LinearTermBase<double>* ltermVirtBound; + QuadratureBase* integBound; -#ifndef SWIG - dgPartDomain(const int tag, const int phys, const int ws = 0, - const bool fdg=false, int numNL=0, int numCED=0) : partDomain(tag,phys,ws,fdg,numNL,numCED), _interByPert(false), _virtByPert(false), - btermBound(NULL),ltermBound(NULL),btermVirtBound(NULL),ltermVirtBound(NULL),integBound(NULL), - _multipleFieldFormulation(false), _multiFieldMethod(dgPartDomain::ONEFIELD), _enrichedUnknownLocation(partDomain::UNDEFINED), - _averageStrainBased(false),_brokenIPFromBeginning(false), - scalarTermPFBound(NULL),linearTermPFBound(NULL) - { - gi = new groupOfElements(); - gib = new groupOfElements(); - giv = new groupOfElements(); - } - dgPartDomain(const dgPartDomain &source); - virtual dgPartDomain& operator=(const partDomain &source); - virtual ~dgPartDomain(){ - if (btermBound) {delete btermBound; btermBound = NULL;}; - if (ltermBound) {delete ltermBound; ltermBound = NULL;}; - if (btermVirtBound) {delete btermVirtBound; btermVirtBound= NULL;}; - if (ltermVirtBound) {delete ltermVirtBound; ltermVirtBound=NULL;}; - if (integBound) {delete integBound; integBound = NULL;}; - if (gi) {delete gi; gi = NULL;}; - if (gib) {delete gib; gib = NULL;}; - if (giv) {delete giv; giv = NULL;}; - - if (scalarTermPFBound) {delete scalarTermPFBound; scalarTermPFBound = NULL;} - if (linearTermPFBound) {delete linearTermPFBound; linearTermPFBound = NULL;}; - } -// delete integBound; delete gib; delete giv} - BilinearTermBase* getBilinearInterfaceTerm(){return btermBound;} - LinearTermBase<double>* getLinearInterfaceTerm()const{return ltermBound;} - BilinearTermBase* getBilinearVirtualInterfaceTerm(){return btermVirtBound;} - LinearTermBase<double>* getLinearVirtualInterfaceTerm(){return ltermVirtBound;} - QuadratureBase* getInterfaceGaussIntegrationRule() const {return integBound;} - - ScalarTermBase<double>* getScalarTermPFBound() const {return scalarTermPFBound;}; - LinearTermBase<double>* getLinearTermPFBound() const {return linearTermPFBound;}; - - virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff)=0; - virtual void computeIpv(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, - partDomain* efMinus, partDomain *efPlus,materialLaw *mlawminus, - materialLaw *mlawplus,fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, - const bool virt, bool stiff,const bool checkfrac=true)=0; - virtual void computeIpv(AllIPState *aips,MElement *e, IPStateBase::whichState ws, - materialLaw *mlaw,fullVector<double> &disp, bool stiff)=0; - - virtual bool IsMultipleFieldFormulation() const {return _multipleFieldFormulation;}; - virtual EnrichedUnknownLocation getEnrichedUnknownLocation() const{ return _enrichedUnknownLocation;}; - virtual MultiFieldMethod getMultipleFieldMethod() const {return _multiFieldMethod;}; - virtual const std::vector<int>& getFixedInterfaceDofComponent() const {return _fixInterfaceDofComp;}; - virtual bool allInterfaceIPsAreBrokenFromBeginning() const {return _brokenIPFromBeginning;}; - virtual void initiallyBreakAllInterfaceIP(AllIPState *aips) const; - - #if defined(HAVE_MPI) - virtual void createIPMap(); - virtual const std::map<int,std::set<int> >& getMapIPInterfacePlus() const {return _mapIPInterfacePlus;}; - virtual const std::set<int>& getDomainIPInterfacePlus() const {return _domainIPInterfacePlus;}; - virtual const std::map<int,std::set<int> >& getMapIPInterfaceMinus() const {return _mapIPInterfaceMinus;}; - virtual const std::set<int>& getDomainIPInterfaceMinus() const {return _domainIPInterfaceMinus;}; - #endif // HAVE_MPI - - virtual void setGaussIntegrationRule()=0; - virtual void createIPState(AllIPState::ipstateContainer& map, const bool *state) const; - virtual int getDim() const=0; - virtual bool IsInterfaceTerms() const{return true;} - virtual FunctionSpaceBase* getFunctionSpace() =0; - virtual const FunctionSpaceBase* getFunctionSpace() const=0; - - virtual FunctionSpaceBase* getFunctionSpaceMinus()=0; - virtual const FunctionSpaceBase* getFunctionSpaceMinus() const=0; - - virtual FunctionSpaceBase* getFunctionSpacePlus()=0; - virtual const FunctionSpaceBase* getFunctionSpacePlus() const=0; - - virtual FunctionSpaceBase* getInterfaceFunctionSpace() =0; - virtual const FunctionSpaceBase* getInterfaceFunctionSpace() const =0; - - virtual void matrixByPerturbation(const int ibulk, const int iinter, const int ivirt,const double eps=1e-8)=0; - virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw)=0; - virtual materialLaw* getMaterialLaw(){Msg::Error("The law to retrieve is not given on a dgdom"); return NULL;} - virtual const materialLaw* getMaterialLaw() const{Msg::Error("The law to retrieve is not given on a dgdom"); return NULL;} - virtual materialLaw* getMaterialLawMinus()=0; - virtual const materialLaw* getMaterialLawMinus() const=0; - virtual materialLaw* getMaterialLawPlus()=0; - virtual const materialLaw* getMaterialLawPlus() const=0; - virtual int getLawNum() const=0; - virtual int getMinusLawNum() const=0; - virtual int getPlusLawNum() const=0; - virtual const partDomain* getMinusDomain() const=0; - virtual const partDomain* getPlusDomain() const=0; - virtual partDomain* getMinusDomain()=0; - virtual partDomain* getPlusDomain()=0; - virtual void createInterface(manageInterface &maninter)=0; - virtual MElement* createVirtualInterface(IElement *ie) const=0; - virtual MElement* createInterface(IElement *ie1, IElement *ie2) const=0; - // Add for BC - virtual FilterDof* createFilterDof(const int comp) const=0; - virtual interfaceQuadratureBase* getInterfaceQuadrature() const = 0; - - // as to fill the array (of size Msg::GetCommSize()) with at index i the number of values to communicate with rank i - // Normally it is an array of zero in input - virtual void numberValuesToTransfertMPI(AllIPState *aips,int* sizeeachrank)const; - // fill the vector that will be communicate to rank rank - virtual void fillArrayIPvariableMPI(AllIPState *aips,const int rank,double* arrayMPI) const; - virtual void setIPVariableFromArrayMPI(AllIPState *aips,const int rank,const int arraysize,const double* arrayMPI)const; - virtual void initMicroMeshId(); -#endif + // for pathfollowing + ScalarTermBase<double>* scalarTermPFBound; // scalar pathfollowing term + LinearTermBase<double>* linearTermPFBound; // linear pathFollowing term + + // For matrix by perturbation + bool _interByPert; + bool _virtByPert; + + bool _multipleFieldFormulation; + MultiFieldMethod _multiFieldMethod; // 0 fullTwoField, 1- augemented twofield, 2-DG twofield + EnrichedUnknownLocation _enrichedUnknownLocation; + + bool _averageStrainBased; + bool _brokenIPFromBeginning; + std::vector<int> _fixInterfaceDofComp; // fix components of interface Dofs + + #if defined(HAVE_MPI) + std::set<int> _domainIPInterfacePlus, // plus intergration points lie on this domain + _domainIPInterfaceMinus; // minus integration points lie on this domain + std::map<int,std::set<int> > _mapIPInterfacePlus, // map IP for positive part of interface elements + _mapIPInterfaceMinus; // map IP for negative part of interface elements + #endif //HAVE_MPI + + public : + // TODO protect these variables + groupOfElements *gi; // support for the interfaceElement TODO cast to a groupOfElements + groupOfElements *gib; // support for the interfaceElement TODO cast to a groupOfElements + groupOfElements *giv; // support for the virtual interface element (used to set Neumann and Dirichlet BC) + + virtual void clearGroupOfElements() + { + partDomain::clearGroupOfElements(); + gi->clearAll(); + } + #endif // SWIG + public: + virtual void averageStrainBased(const bool flg); + virtual void setMultipleFieldFormulation(const bool flag, const int method, const int loc=2); + virtual void fixInterfaceDofComponent(const int comp); + virtual void breakAllInterfaceIPsFromBeginning(const bool broken); + + #ifndef SWIG + public: + dgPartDomain(const int tag, const int phys, const int ws = 0, + const bool fdg=false, int numNL=0, int numCED=0); + dgPartDomain(const dgPartDomain &source); + virtual ~dgPartDomain(); + // delete integBound; delete gib; delete giv} + BilinearTermBase* getBilinearInterfaceTerm(){return btermBound;} + LinearTermBase<double>* getLinearInterfaceTerm()const{return ltermBound;} + BilinearTermBase* getBilinearVirtualInterfaceTerm(){return btermVirtBound;} + LinearTermBase<double>* getLinearVirtualInterfaceTerm(){return ltermVirtBound;} + QuadratureBase* getInterfaceGaussIntegrationRule() const {return integBound;} + + ScalarTermBase<double>* getScalarTermPFBound() const {return scalarTermPFBound;}; + LinearTermBase<double>* getLinearTermPFBound() const {return linearTermPFBound;}; + + virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff)=0; + virtual void computeIpv(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, + partDomain* efMinus, partDomain *efPlus,materialLaw *mlawminus, + materialLaw *mlawplus,fullVector<double> &dispm, + fullVector<double> &dispp, fullVector<double>& dispExtra, + const bool virt, bool stiff,const bool checkfrac=true)=0; + virtual void computeIpv(AllIPState *aips,MElement *e, IPStateBase::whichState ws, + materialLaw *mlaw,fullVector<double> &disp, bool stiff)=0; + + virtual bool IsMultipleFieldFormulation() const {return _multipleFieldFormulation;}; + virtual EnrichedUnknownLocation getEnrichedUnknownLocation() const{ return _enrichedUnknownLocation;}; + virtual MultiFieldMethod getMultipleFieldMethod() const {return _multiFieldMethod;}; + virtual const std::vector<int>& getFixedInterfaceDofComponent() const {return _fixInterfaceDofComp;}; + virtual bool allInterfaceIPsAreBrokenFromBeginning() const {return _brokenIPFromBeginning;}; + virtual void initiallyBreakAllInterfaceIP(AllIPState *aips) const; + + #if defined(HAVE_MPI) + virtual void createIPMap(); + virtual const std::map<int,std::set<int> >& getMapIPInterfacePlus() const {return _mapIPInterfacePlus;}; + virtual const std::set<int>& getDomainIPInterfacePlus() const {return _domainIPInterfacePlus;}; + virtual const std::map<int,std::set<int> >& getMapIPInterfaceMinus() const {return _mapIPInterfaceMinus;}; + virtual const std::set<int>& getDomainIPInterfaceMinus() const {return _domainIPInterfaceMinus;}; + #endif // HAVE_MPI + + virtual void setGaussIntegrationRule()=0; + virtual void createIPState(AllIPState::ipstateContainer& map, const bool *state) const; + virtual int getDim() const=0; + virtual bool IsInterfaceTerms() const{return true;} + virtual FunctionSpaceBase* getFunctionSpace() =0; + virtual const FunctionSpaceBase* getFunctionSpace() const=0; + + virtual FunctionSpaceBase* getFunctionSpaceMinus()=0; + virtual const FunctionSpaceBase* getFunctionSpaceMinus() const=0; + + virtual FunctionSpaceBase* getFunctionSpacePlus()=0; + virtual const FunctionSpaceBase* getFunctionSpacePlus() const=0; + + virtual FunctionSpaceBase* getInterfaceFunctionSpace() =0; + virtual const FunctionSpaceBase* getInterfaceFunctionSpace() const =0; + + virtual void matrixByPerturbation(const int ibulk, const int iinter, const int ivirt,const double eps=1e-8)=0; + virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw)=0; + virtual materialLaw* getMaterialLaw(){Msg::Error("The law to retrieve is not given on a dgdom"); return NULL;} + virtual const materialLaw* getMaterialLaw() const{Msg::Error("The law to retrieve is not given on a dgdom"); return NULL;} + virtual materialLaw* getMaterialLawMinus()=0; + virtual const materialLaw* getMaterialLawMinus() const=0; + virtual materialLaw* getMaterialLawPlus()=0; + virtual const materialLaw* getMaterialLawPlus() const=0; + virtual int getLawNum() const=0; + virtual int getMinusLawNum() const=0; + virtual int getPlusLawNum() const=0; + virtual const partDomain* getMinusDomain() const=0; + virtual const partDomain* getPlusDomain() const=0; + virtual partDomain* getMinusDomain()=0; + virtual partDomain* getPlusDomain()=0; + virtual void createInterface(manageInterface &maninter)=0; + virtual MElement* createVirtualInterface(IElement *ie) const=0; + virtual MElement* createInterface(IElement *ie1, IElement *ie2) const=0; + // Add for BC + virtual FilterDof* createFilterDof(const int comp) const=0; + virtual interfaceQuadratureBase* getInterfaceQuadrature() const = 0; + + // as to fill the array (of size Msg::GetCommSize()) with at index i the number of values to communicate with rank i + // Normally it is an array of zero in input + virtual void numberValuesToTransfertMPI(AllIPState *aips,int* sizeeachrank)const; + // fill the vector that will be communicate to rank rank + virtual void fillArrayIPvariableMPI(AllIPState *aips,const int rank,double* arrayMPI) const; + virtual void setIPVariableFromArrayMPI(AllIPState *aips,const int rank,const int arraysize,const double* arrayMPI)const; + virtual void initMicroMeshId(); + #endif }; #endif diff --git a/NonLinearSolver/field/eigenModeView.cpp b/NonLinearSolver/field/eigenModeView.cpp index c5555425e5417620c115e65bc8a66eeffa3806d4..6e853882a0b6fac13af675b83acda24e70e559f8 100644 --- a/NonLinearSolver/field/eigenModeView.cpp +++ b/NonLinearSolver/field/eigenModeView.cpp @@ -11,19 +11,47 @@ #include "partDomain.h" #include "staticDofManager.h" -eigenVectorField::eigenVectorField(nonLinearMechSolver* sl, const int nc, - std::vector<unknownField::archiveNode> &archiving, - std::vector<nlsField::dataBuildView> &dbview_, - eigenSolver* eig, int num, const std::string file) : unknownField(sl,nc,archiving,dbview_,file+int2str(num)+".msh"), _eigenSolver(eig), _num(num){} +eigenVectorField::eigenVectorField(nonLinearMechSolver* sl, const int nc, + std::vector<nlsField::dataBuildView> &dbview_, + const std::string file): nodesField(file,nc,dbview_),_solver(sl), _eigenSolver(NULL) +{ + if (_numStepBetweenTwoViews < _solver->getStepBetweenArchiving()) + { + _numStepBetweenTwoViews = _solver->getStepBetweenArchiving(); + } + + long int totelem=0; + std::vector<partDomain*>& allDom = *(_solver->getDomainVector()); + for(std::vector<partDomain*>::iterator itdom=allDom.begin(); itdom!=allDom.end(); ++itdom){ + partDomain *dom = *itdom; + bool fullDg = dom->getFormulation(); + FunctionSpaceBase *sp = dom->getFunctionSpace(); + std::vector<Dof> R; + totelem += dom->groupOfElementsSize(); + } + this->setTotElem(totelem); +}; +eigenVectorField::~eigenVectorField(){ + if (_eigenSolver) delete _eigenSolver; + _eigenSolver = NULL; +} -void eigenVectorField::get(Dof &D,double &udof) const{ +void eigenVectorField::get(Dof &D,double &udof, int modeNumber) const{ + #if defined(HAVE_SLEPC) + if (_eigenSolver==NULL) + { + udof = 0.; + Msg::Error("eigen solver has not been created"); + return; + } + if (_solver->getDofManager()->isFixed(D)){ _solver->getDofManager()->getFixedDofValue(D,udof); return; - }; + }; int comp = _solver->getDofManager()->getDofNumber(D); if (comp>=0){ - std::complex<double> val = _eigenSolver->getEigenVectorComp(_num,comp); + std::complex<double> val = _eigenSolver->getEigenVectorComp(modeNumber,comp); udof = val.real(); } else{ @@ -33,55 +61,52 @@ void eigenVectorField::get(Dof &D,double &udof) const{ udof = it->second.shift; for (unsigned i = 0; i < (it->second).linear.size(); i++){ double tmp = 0; - this->get(((it->second).linear[i]).first, tmp); + this->get(((it->second).linear[i]).first, tmp,modeNumber); udof += ((it->second).linear[i]).second * tmp; } } }; + #else + udof = 0.; + #endif //HAVE_SLEPC }; -void eigenVectorField::get(std::vector<Dof> &R, std::vector<double> &disp) const{ +void eigenVectorField::get(std::vector<Dof> &R, std::vector<double> &disp, int modeNumber) const{ double du; for (int i=0; i<R.size(); i++){ - this->get(R[i],du); + this->get(R[i],du,modeNumber); disp.push_back(du); }; }; -void eigenVectorField::get(std::vector<Dof> &R, fullVector<double> &disp) const{ - double du; - for (int i=0; i<R.size(); i++){ - this->get(R[i],du); - disp(i) = du; - }; -}; - void eigenVectorField::get(partDomain *dom, MElement *ele,std::vector<double> &udofs, const int cc, - const nlsField::ElemValue ev)const{ - if(ev == nlsField::crude){ - std::vector<Dof> R; - FunctionSpaceBase *sp = dom->getFunctionSpace(); - sp->getKeys(ele,R); - this->get(R,udofs); - }; + const ElemValue ev)const +{ + std::vector<Dof> R; + FunctionSpaceBase *sp = dom->getFunctionSpace(); + sp->getKeys(ele,R); + get(R,udofs,cc); }; + void eigenVectorField::archive(const double time,const int step, const bool forceView) { - this->buildAllView(_solver,time,step,forceView); - if(!forceView){ - double u; - for(std::vector<archiveNode>::const_iterator it = varch.begin(); it!=varch.end();++it){ - Dof D = it->D; - this->get(D,u); - fprintf(it->fp,"%e;%e\n",time,u); - }; + // + // solve eigenvalue problem + if (step > _lastViewStep) + { + if (forceView or (step%_numStepBetweenTwoViews == 0)) + { + #if defined (HAVE_SLEPC) + if (_eigenSolver) delete _eigenSolver; + _eigenSolver = _solver->eigenSolve(step); + #else + Msg::Error("slepc must be install"); + #endif // HAVE_SLEPC + } } -}; - -void eigenVectorField::setInitial(const std::vector<Dof> &R,const std::vector<double> &disp){ - staticDofManager<double>* staticAssembler = _solver->getStaticDofManager(); - if (staticAssembler) - staticAssembler->setInitial(R,disp); -}; - - + // + if (_eigenSolver!=NULL) + { + this->buildAllView(_solver,time,step,forceView); + } +}; \ No newline at end of file diff --git a/NonLinearSolver/field/eigenModeView.h b/NonLinearSolver/field/eigenModeView.h index bfabf622f2abb4ddc7db4762017af127bc0a11d6..29c9e6dec97f2f96e3841df36c0632b3d8d2abe4 100644 --- a/NonLinearSolver/field/eigenModeView.h +++ b/NonLinearSolver/field/eigenModeView.h @@ -7,34 +7,37 @@ // Copyright: See COPYING file that comes with this distribution // // -#ifndef EIGENMODEFIELD_H_ -#define EIGENMODEFIELD_H_ +#ifndef EIGENMODEFIELD_H_ +#define EIGENMODEFIELD_H_ #include "unknownField.h" #include "numericalFunctions.h" #include "eigenSolver.h" -class eigenVectorField : public unknownField{ - protected: - eigenSolver* _eigenSolver; - int _num; - public: - eigenVectorField(nonLinearMechSolver* sl, - const int nc, std::vector<unknownField::archiveNode> &archiving, - std::vector<nlsField::dataBuildView> &dbview_, - eigenSolver* eig, int num, const std::string file = "eigenMode"); - virtual ~eigenVectorField(){}; - virtual void get(Dof &D,double &udof) const; - virtual void get(std::vector<Dof> &R, std::vector<double> &disp) const; - virtual void get(std::vector<Dof> &R, fullVector<double> &disp) const; - virtual void get(FunctionSpaceBase *sp1,FunctionSpaceBase *sp2, MInterfaceElement *iele,std::vector<double> &udofs){}; -// For archiving - virtual void get(partDomain *dom, MElement *ele,std::vector<double> &udofs, const int cc, - const ElemValue ev=crude)const; - virtual void archive(const double time,const int step, const bool forceView); - virtual void setInitial(const std::vector<Dof> &R,const std::vector<double> &disp); +class eigenVectorField : public nodesField +{ + protected: + nonLinearMechSolver* _solver; + eigenSolver* _eigenSolver; + + protected: + // For archiving + virtual void get(Dof &D,double &udof,int modeNumber) const; + virtual void get(std::vector<Dof> &R, std::vector<double> &disp,int modeNumber) const; + virtual void get(partDomain *dom, MElement *ele,std::vector<double> &udofs, const int cc, + const ElemValue ev=crude)const; + + public: + eigenVectorField(nonLinearMechSolver* sl, const int nc, + std::vector<nlsField::dataBuildView> &dbview_, + const std::string file = "eigenMode"); + virtual ~eigenVectorField(); + + eigenSolver* getEigenSolver() {return _eigenSolver;}; + const eigenSolver* getEigenSolver() const {return _eigenSolver;}; + virtual void archive(const double time,const int step, const bool forceView); }; - - - -#endif // EIGENMODEFIELD_H_ + + + +#endif // EIGENMODEFIELD_H_ diff --git a/NonLinearSolver/field/energyField.cpp b/NonLinearSolver/field/energyField.cpp index fbaaecfc1e96dc9e22dde19ca680605f8072f344..ba5f2b8b739e8844aa52df000a5d55f682b6fc14 100644 --- a/NonLinearSolver/field/energyField.cpp +++ b/NonLinearSolver/field/energyField.cpp @@ -41,12 +41,12 @@ void energeticField::openFiles(const std::string energyFile, const std::string e if(_solver->getNumRanks() > 1){ std::ostringstream oss; oss << Msg::GetCommRank(); - fname = energyFile+"_part" + oss.str() + ".csv"; + fname =_solver->getFileSavingPrefix()+energyFile+"_part" + oss.str() + ".csv"; } else #endif // HAVE_MPI { - fname = energyFile+".csv"; + fname = _solver->getFileSavingPrefix()+energyFile+".csv"; } // initialize file to store energy if (restartManager::available()) @@ -67,12 +67,12 @@ void energeticField::openFiles(const std::string energyFile, const std::string e if(_solver->getNumRanks() > 1){ std::ostringstream oss; oss << Msg::GetCommRank(); - fname = eneryFractureFile+"_part" + oss.str() + ".csv"; + fname = _solver->getFileSavingPrefix()+eneryFractureFile+"_part" + oss.str() + ".csv"; } else #endif // HAVE_MPI { - fname = eneryFractureFile+".csv"; + fname = _solver->getFileSavingPrefix()+eneryFractureFile+".csv"; } if (restartManager::available()) { @@ -103,6 +103,10 @@ energeticField::energeticField(nonLinearMechSolver* sl, std::vector<dataBuildVie std::vector<partDomain*> &domvec = *(_solver->getDomainVector()); nonLinearMechSolver::contactContainer &vcdom = *(_solver->getAllContactDomain()); dofManager<double>* pAssembler = _solver->getDofManager(); + if (_numStepBetweenTwoViews < _solver->getStepBetweenArchiving()) + { + _numStepBetweenTwoViews = _solver->getStepBetweenArchiving(); + } openFiles(_energyFilePrefix,eneryFractureFilePrefix); diff --git a/NonLinearSolver/field/nlsField.cpp b/NonLinearSolver/field/nlsField.cpp index 5663dc9acd2374c83e87a925bf0bb853536229d1..f6a0f3721554e2a3d183452c30384aa1aea30b63 100644 --- a/NonLinearSolver/field/nlsField.cpp +++ b/NonLinearSolver/field/nlsField.cpp @@ -51,12 +51,12 @@ void nlsField::buildAllView(const nonLinearMechSolver* solver ,const double time #if defined(HAVE_MPI) if (solver->getNumRanks() > 1) { - fileName = _fileNamePrefix+"_part"+int2str(Msg::GetCommRank())+"_step"+int2str(numstep)+extension; + fileName = solver->getFileSavingPrefix()+_fileNamePrefix+"_part"+int2str(Msg::GetCommRank())+"_step"+int2str(numstep)+extension; } else #endif //HAVE_MPI { - fileName = _fileNamePrefix+"_step"+int2str(numstep)+extension; + fileName = solver->getFileSavingPrefix()+_fileNamePrefix+"_step"+int2str(numstep)+extension; } // write to file diff --git a/NonLinearSolver/field/unknownField.cpp b/NonLinearSolver/field/unknownField.cpp index 53c35793b21f99699dc6b2eaed8e3d279f3573d5..dcfdfd3283dbec52cec361c34b847bd1779cd9a2 100644 --- a/NonLinearSolver/field/unknownField.cpp +++ b/NonLinearSolver/field/unknownField.cpp @@ -25,6 +25,10 @@ unknownField::unknownField(nonLinearMechSolver* sl,const int nc, { std::vector<partDomain*>& vdom = *_solver->getDomainVector(); std::vector<partDomain*>& vghostdom = *_solver->getGhostDomainMPI(); + if (_numStepBetweenTwoViews < _solver->getStepBetweenArchiving()) + { + _numStepBetweenTwoViews = _solver->getStepBetweenArchiving(); + } std::vector<bool> alfind; for(int i=0;i<archiving.size(); i++) @@ -163,7 +167,7 @@ unknownField::unknownField(nonLinearMechSolver* sl,const int nc, _numStepBetweenTwoSaves = 1; for(int i=0;i<varch.size();i++) { - varch[i].openFile(); + varch[i].openFile(_solver->getFileSavingPrefix()); if (varch[i].nstep > _numStepBetweenTwoSaves) { _numStepBetweenTwoSaves = varch[i].nstep; @@ -297,7 +301,7 @@ void unknownField::resetArchiving() { archiveNode& an = *it; if (an.fp != NULL) fclose(an.fp); - an.openFile(); + an.openFile(_solver->getFileSavingPrefix()); } } diff --git a/NonLinearSolver/field/unknownField.h b/NonLinearSolver/field/unknownField.h index b17281dc2d79ca8696a2ca3dbb7f87c326038a3d..b9082cd1ace5f1b37dd6feed993f657898e36cd1 100644 --- a/NonLinearSolver/field/unknownField.h +++ b/NonLinearSolver/field/unknownField.h @@ -47,7 +47,7 @@ class unknownField : public nodesField{ ~archiveNode(){ if (fp!=NULL) fclose(fp); fp=NULL; }; - void openFile(){ + void openFile(const std::string prefix){ // open File std::ostringstream oss; oss.str(""); @@ -84,13 +84,13 @@ class unknownField : public nodesField{ std::string fname; switch(wc){ case nonLinearBoundaryCondition::position: - fname = "NodalDisplacement"+s+"comp"+s2+".csv"; + fname = prefix+"NodalDisplacement"+s+"comp"+s2+".csv"; break; case nonLinearBoundaryCondition::velocity: - fname = "NodalVelocity"+s+"comp"+s2+".csv"; + fname = prefix+"NodalVelocity"+s+"comp"+s2+".csv"; break; case nonLinearBoundaryCondition::acceleration: - fname = "NodalAcceleration"+s+"comp"+s2+".csv"; + fname = prefix+"NodalAcceleration"+s+"comp"+s2+".csv"; break; } if (restartManager::available()) diff --git a/NonLinearSolver/internalPoints/ipCoalescence.cpp b/NonLinearSolver/internalPoints/ipCoalescence.cpp index 6d6fa9d325423b404934398b013de83aceefced5..11536d6d205b08e8d59e205ff5b25c6fce56a931 100644 --- a/NonLinearSolver/internalPoints/ipCoalescence.cpp +++ b/NonLinearSolver/internalPoints/ipCoalescence.cpp @@ -15,7 +15,7 @@ // ------------------------------------------- IPCoalescence::IPCoalescence(): _acceleratedRate(1.),_porosityAtCoalescenceOnset(0.), _coalescenceOnsetFlag(false),_ipvAtCoalescenceOnset(NULL), - _shearCoalescenceOnsetFlag(false) + _shearCoalescenceOnsetFlag(false),_coalescenceActive(false) { }; @@ -24,7 +24,8 @@ IPCoalescence::IPCoalescence(): _acceleratedRate(1.),_porosityAtCoalescenceOnse IPCoalescence::IPCoalescence(const IPCoalescence &source) : _acceleratedRate(source._acceleratedRate), _porosityAtCoalescenceOnset(source._porosityAtCoalescenceOnset), _coalescenceOnsetFlag(source._coalescenceOnsetFlag), - _shearCoalescenceOnsetFlag(source._shearCoalescenceOnsetFlag) + _shearCoalescenceOnsetFlag(source._shearCoalescenceOnsetFlag), + _coalescenceActive(source._coalescenceActive) { _ipvAtCoalescenceOnset = NULL; if (source._ipvAtCoalescenceOnset != NULL){ @@ -40,6 +41,7 @@ IPCoalescence &IPCoalescence::operator=(const IPCoalescence &source) _porosityAtCoalescenceOnset = source._porosityAtCoalescenceOnset; _coalescenceOnsetFlag = source._coalescenceOnsetFlag; _shearCoalescenceOnsetFlag = source._shearCoalescenceOnsetFlag; + _coalescenceActive = source._coalescenceActive; if (source._ipvAtCoalescenceOnset != NULL){ if (_ipvAtCoalescenceOnset != NULL){ @@ -72,6 +74,7 @@ void IPCoalescence::restart() restartManager::restart(_shearCoalescenceOnsetFlag); restartManager::restart(_porosityAtCoalescenceOnset); restartManager::restart(_ipvAtCoalescenceOnset); + restartManager::restart(_coalescenceActive); }; const IPNonLocalPorosity* IPCoalescence::getIPvAtCoalescenceOnset() const{ diff --git a/NonLinearSolver/internalPoints/ipCoalescence.h b/NonLinearSolver/internalPoints/ipCoalescence.h index a905dddcec427ff0e6bb477e583c7ab7abdc5c8b..728c917555f8fee922879c5ae8c2601a404e15d5 100644 --- a/NonLinearSolver/internalPoints/ipCoalescence.h +++ b/NonLinearSolver/internalPoints/ipCoalescence.h @@ -27,6 +27,8 @@ class IPCoalescence{ bool _coalescenceOnsetFlag; // =true if coalescence was active at least once // shear coalescence bool _shearCoalescenceOnsetFlag; + // coalescence active + bool _coalescenceActive; IPNonLocalPorosity *_ipvAtCoalescenceOnset; // void state at coalescence @@ -47,9 +49,13 @@ class IPCoalescence{ virtual bool getShearCoalescenceOnsetFlag() const {return _shearCoalescenceOnsetFlag;}; virtual bool& getRefToShearCoalescenceOnsetFlag() {return _shearCoalescenceOnsetFlag;}; + + virtual bool getCoalescenceActiveFlag() const {return _coalescenceActive;}; + virtual bool& getRefToCoalescenceActiveFlag() {return _coalescenceActive;}; virtual double getPorosityAtCoalescenceOnset() const {return _porosityAtCoalescenceOnset;}; virtual double& getRefToPorosityAtCoalescenceOnset() {return _porosityAtCoalescenceOnset;}; + virtual double getAccelerateRate() const {return _acceleratedRate;}; virtual double& getRefToAccelerateRate() {return _acceleratedRate;}; diff --git a/NonLinearSolver/internalPoints/ipField.cpp b/NonLinearSolver/internalPoints/ipField.cpp index 1789269de82446fcc29db701fe6794ae14795e70..c2f6831bdb8b13f33cb39b78ee3e800f09f4d4b8 100644 --- a/NonLinearSolver/internalPoints/ipField.cpp +++ b/NonLinearSolver/internalPoints/ipField.cpp @@ -119,6 +119,7 @@ std::string IPField::ToString(const int i){ else if (i == MTX_SIG_XY) return "MTX_SIG_XY"; else if (i == MTX_SIG_YZ) return "MTX_SIG_YZ"; else if (i == MTX_SIG_XZ) return "MTX_SIG_XZ"; + else if (i == MTX_DAMAGE) return "MTX_DAMAGE"; else if (i == INC_SVM) return "INC_SVM"; else if (i == INC_SIG_XX) return "INC_SIG_XX"; else if (i == INC_SIG_YY) return "INC_SIG_YY"; @@ -126,6 +127,7 @@ std::string IPField::ToString(const int i){ else if (i == INC_SIG_XY) return "INC_SIG_XY"; else if (i == INC_SIG_YZ) return "INC_SIG_YZ"; else if (i == INC_SIG_XZ) return "INC_SIG_XZ"; + else if (i == INC_DAMAGE) return "INC_DAMAGE"; else if (i == TEMPERATURE) return "TEMPERATURE"; else if (i == THERMALFLUX_X) return "THERMALFLUX_X"; else if (i == THERMALFLUX_Y) return "THERMALFLUX_Y"; @@ -228,6 +230,7 @@ std::string IPField::ToString(const int i){ else if (i == GL_YY) return "GL_YY"; else if (i == GL_YZ) return "GL_YZ"; else if (i == GL_ZZ) return "GL_ZZ"; + else if (i == COALESCENCE_ACTIVE) return "COALESCENCE_ACTIVE"; else if (i == COALESCENCE) return "COALESCENCE"; else if (i == COALESCENCE_SHEAR) return "COALESCENCE_SHEAR"; else if (i == COALESCENCE_NECKING) return "COALESCENCE_NECKING"; @@ -731,14 +734,50 @@ void IPField::resetArchiving() for(std::vector<ip2archive>::iterator it=viparch.begin(); it!=viparch.end(); ++it){ ip2archive &ipa = *it; if (ipa.fp != NULL) fclose(ipa.fp); - ipa.openFile(); + ipa.openFile(_solver->getFileSavingPrefix()); } } void IPField::archive(const double time, const int step, const bool forceView){ // msh view this->buildAllView(_solver,time,step, forceView); - + if (_withMultiscale) + { + bool willView = forceView; + if (_vBuildView.size() > 0) + { + if (step == _lastViewStep) + { + willView = true; + } + } + else + { + if (step > _lastViewStep) + { + if (forceView or (step%_numStepBetweenTwoViews == 0)) + { + _lastViewStep = step; + willView = true; + } + } + } + + if (willView) + { + AllIPState::ipstateContainer& mapall =*(_AIPS->getAIPSContainer()); + for (AllIPState::ipstateContainer::iterator it = mapall.begin(); it!= mapall.end(); it++){ + std::vector<IPStateBase*> *vips = &((*it).second); + for (int i = 0; i< vips->size(); i++){ + nonLinearMechSolver* solver = (*vips)[i]->getMicroSolver(); + if (solver!= NULL){ + solver->archiveData(time,step,true); + } + } + } + } + } + // txt archive if (step > _lastSaveStep) { @@ -1527,6 +1566,11 @@ IPField::IPField(nonLinearMechSolver* sl, const std::vector<ip2archive> &vaip, _withDissipation = _solver->withEnergyDissipation(); _withCohesiveFailure = _solver->withFractureLaw(); } + + if (_numStepBetweenTwoViews < _solver->getStepBetweenArchiving()) + { + _numStepBetweenTwoViews = _solver->getStepBetweenArchiving(); + } // Creation of storage for IP data std::vector<partDomain*>* domainVector = _solver->getDomainVector(); @@ -1753,7 +1797,7 @@ IPField::IPField(nonLinearMechSolver* sl, const std::vector<ip2archive> &vaip, _numStepBetweenTwoSaves = 1; for (int i=0; i< viparch.size(); i++) { - viparch[i].openFile(); + viparch[i].openFile(_solver->getFileSavingPrefix()); if (viparch[i].nstep > _numStepBetweenTwoSaves) { _numStepBetweenTwoSaves = viparch[i].nstep; diff --git a/NonLinearSolver/internalPoints/ipField.h b/NonLinearSolver/internalPoints/ipField.h index f65bbaed37d10dc7c8c3b46b2e994162b7a10379..6c80c5149ac7a4dc576995b8392e4278113888c2 100644 --- a/NonLinearSolver/internalPoints/ipField.h +++ b/NonLinearSolver/internalPoints/ipField.h @@ -98,13 +98,13 @@ class IPField : public elementsField { FIELD_CAPACITY, MECHANICAL_SOURCE, FIELD_SOURCE,INCOMPATIBLE_STRAIN_X,INCOMPATIBLE_STRAIN_Y,INCOMPATIBLE_STRAIN_Z, COHESIVE_JUMP_X,COHESIVE_JUMP_Y,COHESIVE_JUMP_Z,DAMAGE_IS_BLOCKED, DEFO_ENERGY,PLASTIC_ENERGY,IRREVERSIBLE_ENERGY,DAMAGE_ENERGY, - MTX_STRAIN_XX,MTX_STRAIN_YY,MTX_STRAIN_ZZ,MTX_STRAIN_XY,MTX_STRAIN_YZ,MTX_STRAIN_XZ, - INC_STRAIN_XX,INC_STRAIN_YY,INC_STRAIN_ZZ,INC_STRAIN_XY,INC_STRAIN_YZ,INC_STRAIN_XZ, + MTX_STRAIN_XX,MTX_STRAIN_YY,MTX_STRAIN_ZZ,MTX_STRAIN_XY,MTX_STRAIN_YZ,MTX_STRAIN_XZ, MTX_DAMAGE, + INC_STRAIN_XX,INC_STRAIN_YY,INC_STRAIN_ZZ,INC_STRAIN_XY,INC_STRAIN_YZ,INC_STRAIN_XZ, INC_DAMAGE, EXTRAFIELD_1,EXTRAFIELD_2,EXTRAFIELD_3,EXTRAFIELD_4,EXTRAFIELD_5,EXTRAFIELD_6,EXTRAFIELD_7,EXTRAFIELD_8,EXTRAFIELD_9, EXTRAFIELD_NORM, DELETED,LOST_ELLIPTICITY, LOCAL_0,LOCAL_1, LOCAL_2, NONLOCAL_0, NONLOCAL_1, NONLOCAL_2, CONSTITUTIVEEXTRADOFDIFFUSION_0, CONSTITUTIVEEXTRADOFDIFFUSION_1, CONSTITUTIVEEXTRADOFDIFFUSION_2, FAILED, - GL_XX, GL_XY, GL_XZ, GL_YY, GL_YZ, GL_ZZ, COALESCENCE_CRITERION, COALESCENCE, COALESCENCE_NECKING, COALESCENCE_SHEAR,POROSITY_COALESCENCE_ONSET, + GL_XX, GL_XY, GL_XZ, GL_YY, GL_YZ, GL_ZZ, COALESCENCE_CRITERION, COALESCENCE_ACTIVE, COALESCENCE, COALESCENCE_NECKING, COALESCENCE_SHEAR,POROSITY_COALESCENCE_ONSET, CL_XX, CL_YY, CL_ZZ, VOLUMETRIC_PLASTIC_STRAIN, LODE_PARAMETER, LODE_ANGLE,DEVIATORIC_PLASTIC_STRAIN, ASPECT_RATIO, SHAPE_FACTOR, LIGAMENT_RATIO_COALESCENCE_ONSET,ASPECT_RATIO_COALESCENCE_ONSET, SHAPE_FACTOR_COALESCENCE_ONSET, LIMIT_LOAD_FACTOR, @@ -137,7 +137,7 @@ class IPField : public elementsField { nlsField::ElemValue evalue; FILE *fp; - void openFile() + void openFile(const std::string prefix) { std::string fname; std::ostringstream oss; @@ -176,16 +176,16 @@ class IPField : public elementsField { std::ostringstream numgss; if (evalue == nlsField::crude) numgss << numgauss; - fname = "IP"+numgss.str()+"OnElement"+s+"val_"+s2+s3+".csv"; + fname = prefix+"IP"+numgss.str()+"OnElement"+s+"val_"+s2+s3+".csv"; } else if(dim == 0) - fname = "IP"+s+"val_"+s2+s3+".csv"; + fname = prefix+"IP"+s+"val_"+s2+s3+".csv"; else if(dim == 1) - fname = "IPLine"+s+"val_"+s2+s3+".csv"; + fname = prefix+"IPLine"+s+"val_"+s2+s3+".csv"; else if(dim == 2) - fname = "IPFace"+s+"val_"+s2+s3+".csv"; + fname = prefix+"IPFace"+s+"val_"+s2+s3+".csv"; else - fname = "IPVolume"+s+"val_"+s2+s3+".csv"; + fname = prefix+"IPVolume"+s+"val_"+s2+s3+".csv"; if (restartManager::available()) { diff --git a/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp b/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp index 3f7731a17910546277b8b8b7d9af1cb1cc8e5898..bdd18d9ebb4eec268e70303ee1f7ba3d897eba61 100644 --- a/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp +++ b/NonLinearSolver/internalPoints/ipNonLocalDamage.cpp @@ -25,10 +25,10 @@ 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]; + // 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 ) return _nldStress(comp-1); @@ -137,6 +137,20 @@ double IPNonLocalDamage::get(int comp) const else return 0.; } + else if(comp==IPField::INC_DAMAGE) + { + if(_pos_inc_Dam>0) + return _nldStatev[_pos_inc_Dam]; + else + return 0.; + } + else if(comp==IPField::MTX_DAMAGE) + { + if(_pos_mtx_Dam>0) + return _nldStatev[_pos_mtx_Dam]; + else + return 0.; + } else if(comp==IPField::INC_ASPECT_RATIO_1 || comp==IPField::INC_ASPECT_RATIO_2) { if(_pos_inc_ar>0) @@ -169,16 +183,28 @@ void IPNonLocalDamage::restart() restartManager::restart(_pos_inc_R); restartManager::restart(_pos_inc_Ja); restartManager::restart(_pos_mtx_Ja); + restartManager::restart(_pos_inc_Dam); + restartManager::restart(_pos_mtx_Dam); restartManager::restart(_nldMaterialTensor.getDataPtr(),36); restartManager::restart(_nldCouplingStressEffectiveStrain.getDataPtr(),6); restartManager::restart(_nldCouplingEffectiveStrainStress.getDataPtr(),6); + restartManager::restart(_nldFiberDamdStrain.getDataPtr(),6); + restartManager::restart(_nldStressdFiberDam.getDataPtr(),6); + restartManager::restart(_nldStrain.getDataPtr(),6); restartManager::restart(_nldStress.getDataPtr(),6); restartManager::restart(_nldCharacteristicLengthMatrix); + restartManager::restart(_nldCharacteristicLengthFiber); restartManager::restart(_nldEffectivePlasticStrain); restartManager::restart(_nldCurrentPlasticStrain); + restartManager::restart(_nlFiber_loc); restartManager::restart(_nldDamage); + restartManager::restart(_nlFiber_d_bar); restartManager::restart(_nldSpBar); + restartManager::restart(_nldFd_d_bar); + restartManager::restart(_nldpdFd); + restartManager::restart(_nldFddp); + restartManager::restart(_nldStatev,_nldNsdv); restartManager::restart(_elasticEne); restartManager::restart(_plasticEne); diff --git a/NonLinearSolver/internalPoints/ipNonLocalDamage.h b/NonLinearSolver/internalPoints/ipNonLocalDamage.h index d431f857dc560e7df4737c4bc7829729866deb18..34e04d91d10fa8089f8b8cc8670e2865705a6107 100644 --- a/NonLinearSolver/internalPoints/ipNonLocalDamage.h +++ b/NonLinearSolver/internalPoints/ipNonLocalDamage.h @@ -27,20 +27,43 @@ class IPNonLocalDamage : public IPVariableMechanics int _pos_inc_Ja; int _pos_mtx_Ja; int _pos_euler; + int _pos_inc_Dam; + int _pos_mtx_Dam; + + + int _pos_maxD; + int _pos_inc_maxD; + int _pos_mtx_maxD; + public: // All data public to avoid the creation of function to access // x y z fullMatrix<double> _nldMaterialTensor; + fullVector<double> _nldCouplingStressEffectiveStrain; fullVector<double> _nldCouplingEffectiveStrainStress; + + fullVector<double> _nldFiberDamdStrain; + fullVector<double> _nldStressdFiberDam; + fullVector<double> _nldStrain; // epsilon fullVector<double> _nldStress; //cauchy - STensor3 _nldCharacteristicLengthMatrix; // by Wu Ling + STensor3 _nldCharacteristicLengthMatrix; // by Wu Ling + STensor3 _nldCharacteristicLengthFiber; // by Wu Ling // bareps + double _nldEffectivePlasticStrain; + double _nlFiber_d_bar; double _nldCurrentPlasticStrain; + double _nlFiber_loc; double _nldDamage; double _nldSpBar; + double _nldFd_d_bar; + double _nldpdFd; + double _nldFddp; + + + // state variables double* _nldStatev; double _elasticEne; @@ -50,12 +73,13 @@ class IPNonLocalDamage : public IPVariableMechanics public: IPNonLocalDamage(int _nsdv) : IPVariableMechanics(), _nldNsdv(_nsdv), _nldStrain(6), _nldStress(6), _nldMaterialTensor(6,6), _nldCouplingStressEffectiveStrain(6), - _nldCouplingEffectiveStrainStress(6), - _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_inc_ar(-1), _pos_inc_R (-1), _elasticEne(0.), _pos_inc_Ja(-1), _pos_mtx_Ja(-1), - _pos_euler(-1), - _plasticEne(0.),_dissipationBlocked(false) + _nldCouplingEffectiveStrainStress(6), _nldFiberDamdStrain(6), _nldStressdFiberDam(6), + _nldEffectivePlasticStrain(0.), _nlFiber_d_bar(0.), _nldCurrentPlasticStrain(0.),_nlFiber_loc(0), _nldDamage(0.),_nldSpBar(0.), + _nldFd_d_bar(0.), _nldpdFd(0.), _nldFddp(0.), _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_euler(-1), _pos_mtx_Dam(-1),_pos_inc_Dam(-1), _plasticEne(0.),_dissipationBlocked(false), + _pos_maxD(-1), _pos_inc_maxD(-1), _pos_mtx_maxD(-1) + { mallocvector(&_nldStatev,_nldNsdv); for(int i = 0; i<_nldNsdv; i++) _nldStatev[i]=0.; @@ -64,8 +88,10 @@ class IPNonLocalDamage : public IPVariableMechanics for(int j=0;j<3; j++) { _nldCharacteristicLengthMatrix(i,j) = 0.; + _nldCharacteristicLengthFiber(i,j) = 0.; } _nldCharacteristicLengthMatrix(i,i) = 1.; + _nldCharacteristicLengthFiber(i,i) = 1.; } } @@ -80,18 +106,35 @@ class IPNonLocalDamage : public IPVariableMechanics _pos_inc_ar = source._pos_inc_ar; _pos_inc_R = source._pos_inc_R; _pos_inc_Ja = source._pos_inc_Ja; - _pos_mtx_Ja = source._pos_mtx_Ja; + _pos_mtx_Ja = source._pos_mtx_Ja; + _pos_mtx_Dam = source._pos_mtx_Dam; + _pos_inc_Dam = source._pos_inc_Dam; _pos_euler = source._pos_euler; + _pos_maxD = source._pos_maxD; + _pos_inc_maxD = source._pos_inc_maxD; + _pos_mtx_maxD = source._pos_mtx_maxD; + _nldStrain =source._nldStrain; _nldStress =source._nldStress; + + + _nldEffectivePlasticStrain=source._nldEffectivePlasticStrain; + _nlFiber_d_bar=source. _nlFiber_d_bar; _nldMaterialTensor=source._nldMaterialTensor; _nldCouplingStressEffectiveStrain = source._nldCouplingStressEffectiveStrain; _nldCouplingEffectiveStrainStress = source._nldCouplingEffectiveStrainStress; + _nldFiberDamdStrain = source._nldFiberDamdStrain; + _nldStressdFiberDam = source._nldStressdFiberDam; _nldCharacteristicLengthMatrix = source._nldCharacteristicLengthMatrix; //by Wu Ling + _nldCharacteristicLengthFiber = source._nldCharacteristicLengthFiber; //by Wu Ling _nldCurrentPlasticStrain=source._nldCurrentPlasticStrain; + _nlFiber_loc = source._nlFiber_loc; _nldDamage=source._nldDamage; _nldSpBar = source._nldSpBar; + _nldFd_d_bar= source._nldFd_d_bar; + _nldpdFd = source._nldpdFd; + _nldFddp = source._nldFddp; _elasticEne=source._elasticEne; _plasticEne=source._plasticEne; mallocvector(&_nldStatev,_nldNsdv); @@ -111,17 +154,32 @@ class IPNonLocalDamage : public IPVariableMechanics _pos_inc_R = source->_pos_inc_R; _pos_inc_Ja = source->_pos_inc_Ja; _pos_mtx_Ja = source->_pos_mtx_Ja; + _pos_mtx_Dam = source->_pos_mtx_Dam; + _pos_inc_Dam = source->_pos_inc_Dam; + _pos_maxD = source->_pos_maxD; + _pos_inc_maxD = source->_pos_inc_maxD; + _pos_mtx_maxD = source->_pos_mtx_maxD; _pos_euler = source->_pos_euler; _nldStrain = source->_nldStrain; _nldStress = source->_nldStress; + + _nldEffectivePlasticStrain=source->_nldEffectivePlasticStrain; + _nlFiber_d_bar=source-> _nlFiber_d_bar; _nldMaterialTensor=source->_nldMaterialTensor; _nldCouplingStressEffectiveStrain = source->_nldCouplingStressEffectiveStrain; _nldCouplingEffectiveStrainStress = source->_nldCouplingEffectiveStrainStress; + _nldFiberDamdStrain = source->_nldFiberDamdStrain; + _nldStressdFiberDam = source->_nldStressdFiberDam; _nldCharacteristicLengthMatrix = source->_nldCharacteristicLengthMatrix; //by Wu Ling + _nldCharacteristicLengthFiber = source->_nldCharacteristicLengthFiber; //by Wu Ling _nldCurrentPlasticStrain=source->_nldCurrentPlasticStrain; + _nlFiber_loc = source->_nlFiber_loc; _nldDamage=source->_nldDamage; _nldSpBar = source->_nldSpBar; + _nldFd_d_bar= source->_nldFd_d_bar; + _nldpdFd = source->_nldpdFd; + _nldFddp = source->_nldFddp; _elasticEne=source->_elasticEne; _plasticEne=source->_plasticEne; if(_nldNsdv !=source->_nldNsdv) Msg::Error("IPNonLocalDamage do not have the same number of internal variables"); @@ -141,8 +199,13 @@ class IPNonLocalDamage : public IPVariableMechanics virtual double plasticEnergy() const; virtual double getEffectivePlasticStrain() const { return _nldEffectivePlasticStrain;} virtual double getCurrentPlasticStrain() const { return _nldCurrentPlasticStrain;} + virtual double getCurrentlocFd() const { return _nlFiber_loc;} virtual double getRefToEffectivePlasticStrain() { return _nldEffectivePlasticStrain;} virtual double getRefToCurrentPlasticStrain() { return _nldCurrentPlasticStrain;} + virtual double getCurrentlocFd() { return _nlFiber_loc;} + + virtual double getFiberDamage() { return _nlFiber_d_bar;} + virtual double getNsdv() const {return _nldNsdv;} virtual void setPosStrMtx(int i) {_pos_str_mtx = i;} virtual void setPosStrInc(int i) {_pos_str_inc = i;} @@ -153,7 +216,26 @@ class IPNonLocalDamage : public IPVariableMechanics virtual void setPosIncR(int i) {_pos_inc_R = i;} virtual void setPosIncJa(int i) {_pos_inc_Ja = i;} virtual void setPosMtxJa(int i) {_pos_mtx_Ja = i;} + virtual void setPosIncDam(int i) {_pos_inc_Dam = i;} + virtual void setPosMtxDam(int i) {_pos_mtx_Dam = i;} virtual void setPosEuler(int i) {_pos_euler = i;} + + virtual void setPosMaxD(int i) {_pos_maxD = i;} + virtual void setPosIncMaxD(int i) {_pos_inc_maxD = i;} + virtual void setPosMtxMaxD(int i) {_pos_mtx_maxD = i;} + + virtual int getPosMaxD() { return _pos_maxD;} + virtual int getPosIncMaxD() { return _pos_inc_maxD;} + virtual int getPosMtxMaxD() { return _pos_mtx_maxD;} + + virtual void setMaxD(double Dc) {if (_pos_maxD>-1) _nldStatev[_pos_maxD] = Dc; } + virtual void setIncMaxD(double Dc) {if (_pos_inc_maxD>-1)_nldStatev[_pos_inc_maxD] = Dc; } + virtual void setMtxMaxD(double Dc) {if (_pos_mtx_maxD>-1)_nldStatev[_pos_mtx_maxD] = Dc; } + + virtual double getMaxD() const {if (_pos_maxD>-1) return _nldStatev[_pos_maxD]; } + virtual double getIncMaxD() const {if (_pos_inc_maxD>-1) return _nldStatev[_pos_inc_maxD]; } + virtual double getMtxMaxD() const {if (_pos_mtx_maxD>-1) return _nldStatev[_pos_mtx_maxD]; } + virtual IPVariable* clone() const {return new IPNonLocalDamage(*this);}; virtual void restart(); diff --git a/NonLinearSolver/internalPoints/ipstate.cpp b/NonLinearSolver/internalPoints/ipstate.cpp index d1097445237b90360826fefc8831f2083c4255a4..9d62798b12381119e1babc5f93992475bc977bf3 100644 --- a/NonLinearSolver/internalPoints/ipstate.cpp +++ b/NonLinearSolver/internalPoints/ipstate.cpp @@ -503,8 +503,8 @@ void AllIPState::setTime(const double time, const double dtime, const int numste for(ipstateElementContainer::iterator it=vips.begin(); it!=vips.end();++it) { IPStateBase* ips = *it; - if (ips->getSolver() != NULL){ - ips->getSolver()->setTime(time,dtime,numstep); + if (ips->getMicroSolver() != NULL){ + ips->getMicroSolver()->setTime(time,dtime,numstep); } } } @@ -519,9 +519,9 @@ void AllIPState::nextStep() { for (ipstateContainer::iterator it = _mapall.begin(); it!= _mapall.end(); it++){ std::vector<IPStateBase*> *vips = &((*it).second); for (int i = 0; i< vips->size(); i++){ - nonLinearMechSolver* solver = (*vips)[i]->getSolver(); + nonLinearMechSolver* solver = (*vips)[i]->getMicroSolver(); if (solver!= NULL){ - solver->nextStep(); + solver->prepareForNextMicroSolve(); } } } diff --git a/NonLinearSolver/internalPoints/ipstate.h b/NonLinearSolver/internalPoints/ipstate.h index 53048fd6019baf12559e0cfb162e17a986527100..eb49c76cd611bdda4b570305b57bf65430c47e34 100644 --- a/NonLinearSolver/internalPoints/ipstate.h +++ b/NonLinearSolver/internalPoints/ipstate.h @@ -47,16 +47,16 @@ class IPStateBase{ } } - virtual void setSolver(nonLinearMechSolver* s){ + virtual void setMicroSolver(nonLinearMechSolver* s){ _solver = s; std::vector<IPVariable*> allIP; getAllIPVariable(allIP); for (int i=0; i< allIP.size(); i++){ - allIP[i]->setSolver(s); + allIP[i]->setMicroSolver(s); } }; - virtual nonLinearMechSolver* getSolver() {return _solver;}; - virtual const nonLinearMechSolver* getSolver() const {return _solver;}; + virtual nonLinearMechSolver* getMicroSolver() {return _solver;}; + virtual const nonLinearMechSolver* getMicroSolver() const {return _solver;}; }; class IP1State : public IPStateBase{ diff --git a/NonLinearSolver/internalPoints/ipvariable.h b/NonLinearSolver/internalPoints/ipvariable.h index 6c1ab72137d8b27eaca145a8471d9d7458e876df..683ebf2f51cfa525aa964cd0042fc55bd375d98e 100644 --- a/NonLinearSolver/internalPoints/ipvariable.h +++ b/NonLinearSolver/internalPoints/ipvariable.h @@ -77,9 +77,9 @@ class IPVariable virtual void setReceivedMicroDataToMacroProblem(const double* val){}; #endif - virtual void setSolver(nonLinearMechSolver* s) {_solver = s;}; - virtual nonLinearMechSolver* getSolver() {return _solver;}; - virtual const nonLinearMechSolver* getSolver() const {return _solver;}; + virtual void setMicroSolver(nonLinearMechSolver* s) {_solver = s;}; + virtual nonLinearMechSolver* getMicroSolver() {return _solver;}; + virtual const nonLinearMechSolver* getMicroSolver() const {return _solver;}; }; class IPVariableMechanics : public IPVariable{ @@ -194,13 +194,13 @@ template<class Tbulk,class Tfrac> class IPVariable2Enhanced : public Tbulk{ } }; - virtual void setSolver(nonLinearMechSolver* s) { - Tbulk::setSolver(s); + virtual void setMicroSolver(nonLinearMechSolver* s) { + Tbulk::setMicroSolver(s); if (_ipvbulk!=NULL){ - _ipvbulk->setSolver(s); + _ipvbulk->setMicroSolver(s); } if (_ipvfrac!=NULL){ - _ipvfrac->setSolver(s); + _ipvfrac->setMicroSolver(s); } }; diff --git a/NonLinearSolver/materialLaw/CoalescenceLaw.cpp b/NonLinearSolver/materialLaw/CoalescenceLaw.cpp index f43f08394ff448017efb6c2147ac624c83ae8008..b6fbce475851cdc232c4b074b3fed2e366442850 100644 --- a/NonLinearSolver/materialLaw/CoalescenceLaw.cpp +++ b/NonLinearSolver/materialLaw/CoalescenceLaw.cpp @@ -139,6 +139,16 @@ void FstarCoalescenceLaw::checkCoalescence(const IPNonLocalPorosity* q0Porous, q1Coal->getRefToAccelerateRate() = _acceleratedRate; } } + + // check active + if (q0Coal->getCoalescenceOnsetFlag() and (q1Porous->getMatrixPlasticStrain() > q0Porous->getMatrixPlasticStrain())) + { + q1Coal->getRefToCoalescenceActiveFlag() = true; + } + else + { + q1Coal->getRefToCoalescenceActiveFlag() = false; + } } }; @@ -256,6 +266,16 @@ void LoadConcentrationFactorBasedCoalescenceLaw::checkCoalescence(const IPNonLoc q1Thom->getRefToAccelerateRate() = _acceleratedRate; } } + + // check active + if (q0Thom->getCoalescenceOnsetFlag() and (q1Porous->getMatrixPlasticStrain() > q0Porous->getMatrixPlasticStrain())) + { + q1Thom->getRefToCoalescenceActiveFlag() = true; + } + else + { + q1Thom->getRefToCoalescenceActiveFlag() = false; + } } }; diff --git a/NonLinearSolver/materialLaw/Weight.cpp b/NonLinearSolver/materialLaw/Weight.cpp index 2de627a04ab9103c4541a2931a2b5df7612ab105..ac9c4ab6b9fe46d4b9f88e9e4b60d1ea25c5ac08 100644 --- a/NonLinearSolver/materialLaw/Weight.cpp +++ b/NonLinearSolver/materialLaw/Weight.cpp @@ -233,13 +233,34 @@ double generateWeight(int N, double **a, double **probDensityList, double **face int i,j,k,l,m,n,o,p; double *lambdaA; double **atmp, **eA, **Rot; + double *thetaPrimGaussian,*deltaThetaPrimGaussian,*phiPrimGaussian,*deltaPhiPrimGaussian, **distr_odf; int eigOrderLarger, eigOrderMid, eigOrderSmaller; double A[3][3][3][3],Atmp[3][3][3][3], bigBofa[3][3][3][3], Al[3][3][3][3]; double bofa[3][3], a33[3][3]; double dir[3]; - double deltaTheta,theta,surfFacet,surfTotal,phi,trbofa,probDensity; + double deltaTheta,theta,surfFacet,surfTotal,phi,deltaPhi,trbofa,probDensity; int *facesPerTheta; int totalFaces, Nphi; + double f1=0.; + double f2=0.; + double f3=0.; + double area=0.; + double esp_theta=0.; //we should use the value of the principal direction as center! + double va_theta=0.; + double esp_phi=0.; + double va_phi=0.; + + int Ind_Max_theta=0; + double theta_max=0.; + double dist_theta_max=0.; + int Ind_Max_phi=0; + double phi_max=0.; + double dist_phi_max=0.; + + bool WithoutGaussian=false; + double negValues=0.; + int nbFacetGIden=45; //should be odd + nbFacetGIden=24*N+1; mallocmatrix(&atmp,3,3); mallocvector(&lambdaA,3); @@ -334,55 +355,450 @@ double generateWeight(int N, double **a, double **probDensityList, double **face } } - deltaTheta=pi/N; + + //for gaussian identification + + mallocvector(&thetaPrimGaussian,nbFacetGIden); + mallocvector(&deltaThetaPrimGaussian,nbFacetGIden); + mallocvector(&phiPrimGaussian,nbFacetGIden); + mallocvector(&deltaPhiPrimGaussian,nbFacetGIden); + mallocmatrix(&distr_odf,nbFacetGIden,nbFacetGIden); + + for(i=0;i<nbFacetGIden;i++) + { + if(i==0) + { + theta=0.; + deltaTheta=pi/(nbFacetGIden-1)/2.; + } + else if(i==nbFacetGIden-1) + { + theta=pi; + deltaTheta=pi/(nbFacetGIden-1)/2.; + } + else + { + theta=i*pi/(nbFacetGIden-1); + deltaTheta=pi/(nbFacetGIden-1); + } + thetaPrimGaussian[i]=theta; + deltaThetaPrimGaussian[i]=deltaTheta; //*sin(theta); + for(j=0;j<nbFacetGIden;j++) + { + if(j==0) + { + phi=0.; + deltaPhi=pi/(nbFacetGIden-1)/2.; + } + else if(j==nbFacetGIden-1) + { + phi=pi; + deltaPhi=pi/(nbFacetGIden-1)/2.; + } + else + { + phi=j*pi/(nbFacetGIden-1); + deltaPhi=pi/(nbFacetGIden-1); + } + phiPrimGaussian[j]=phi; + deltaPhiPrimGaussian[j]=deltaPhi; + dir[0]= cos(phi)*sin(theta); + dir[1]= sin(phi)*sin(theta); + dir[2]= cos(theta); + distr_odf[i][j]=2.*getODF(dir,bofa, bigBofa, false); //*sin(theta); + if(distr_odf[i][j]<0.) negValues+=distr_odf[i][j]*deltaPhi; + } + } + if(negValues<-0.01) WithoutGaussian=false; + else WithoutGaussian=true; + //WithoutGaussian=true; + if(!WithoutGaussian) + { + Ind_Max_theta=0; + theta_max=0.; + dist_theta_max=0.; + Ind_Max_phi=0; + phi_max=0.; + dist_phi_max=0.; + + for(i=0;i<nbFacetGIden;i++){ + for(j=0;j<nbFacetGIden;j++){ + if(distr_odf[i][j]>distr_odf[Ind_Max_theta][Ind_Max_phi]) + { + Ind_Max_theta=i; + Ind_Max_phi=j; + } + } + } + theta_max=thetaPrimGaussian[Ind_Max_theta]; + if(theta_max>pi/2.) theta_max-=pi;//so between -pi/2 and pi/2 + phi_max=phiPrimGaussian[Ind_Max_phi]; + if(phi_max>pi/2.) phi_max-=pi;//so between -pi/2 and pi/2 + for(i=0;i<nbFacetGIden; i++){ + //We need to account for cyclic symmetry + double thetaprim=thetaPrimGaussian[i]; + if(thetaprim>theta_max+pi/2.) thetaprim-=pi; + thetaPrimGaussian[i]=thetaprim; + double phiprim=phiPrimGaussian[i]; + if(phiprim>phi_max+pi/2.) phiprim-=pi; + phiPrimGaussian[i]=phiprim; + } + esp_theta=theta_max; //we should use the value of the principal direction as center! + va_theta=0.; + esp_phi=phi_max; + va_phi=0.; + + //initial guess of variance + int Ind_Max_theta_p1=Ind_Max_theta; + int Ind_Max_phi_p1=Ind_Max_phi; + for(i=1;i<nbFacetGIden/2.;i++) + { + int tmpInMaxp1=Ind_Max_theta+i; + if(tmpInMaxp1>=nbFacetGIden) tmpInMaxp1-=nbFacetGIden; + if(distr_odf[tmpInMaxp1][Ind_Max_phi] < distr_odf[Ind_Max_theta_p1][Ind_Max_phi] && + distr_odf[tmpInMaxp1][Ind_Max_phi]>0.) + Ind_Max_theta_p1=tmpInMaxp1; + //if(distr_odf[tmpInMaxp1][Ind_Max_phi]<=0.) break; + //if(distr_odf[tmpInMaxp1][Ind_Max_phi]< distr_odf[Ind_Max_theta_p1][Ind_Max_phi]) Ind_Max_theta_p1=tmpInMaxp1; + } + for(i=1;i<nbFacetGIden/2.;i++) + { + int tmpInMaxp1=Ind_Max_phi+i; + if(tmpInMaxp1>=nbFacetGIden) tmpInMaxp1-=nbFacetGIden; + if(distr_odf[Ind_Max_theta][tmpInMaxp1]<distr_odf[Ind_Max_theta][Ind_Max_phi_p1] && + distr_odf[Ind_Max_theta][tmpInMaxp1]>0.) + Ind_Max_phi_p1=tmpInMaxp1; + //if(distr_odf[Ind_Max_theta][tmpInMaxp1]<=0.) break; + //if(distr_odf[Ind_Max_theta][tmpInMaxp1]< distr_odf[Ind_Max_theta][Ind_Max_phi_p1]) Ind_Max_phi_p1=tmpInMaxp1; + } + + // if(Ind_Max_theta_p1>=nbFacetGIden) Ind_Max_theta_p1-=nbFacetGIden; + // if(Ind_Max_phi_p1>=nbFacetGIden) Ind_Max_phi_p1-=nbFacetGIden; + double ratioDistr_theta=distr_odf[Ind_Max_theta_p1][Ind_Max_phi]/distr_odf[Ind_Max_theta][Ind_Max_phi]; + double ratioDistr_phi=distr_odf[Ind_Max_theta][Ind_Max_phi_p1]/distr_odf[Ind_Max_theta][Ind_Max_phi]; + va_theta=3*pi; + if(fabs(log(ratioDistr_theta))>1.e-12) + va_theta = -1./2./log(ratioDistr_theta)*((thetaPrimGaussian[Ind_Max_theta_p1] - esp_theta)*(thetaPrimGaussian[Ind_Max_theta_p1] - esp_theta)- + (thetaPrimGaussian[Ind_Max_theta] - esp_theta)*(thetaPrimGaussian[Ind_Max_theta] - esp_theta)); + va_phi=3*pi; + if(fabs(log(ratioDistr_phi))>1.e-12) + va_phi = -1./2./log(ratioDistr_phi)*((phiPrimGaussian[Ind_Max_phi_p1] - esp_phi)*(phiPrimGaussian[Ind_Max_phi_p1] - esp_phi)- + (phiPrimGaussian[Ind_Max_phi] - esp_phi)*(phiPrimGaussian[Ind_Max_phi] - esp_phi)); + + //Least square identification of Gaussian + double old_va_theta=va_theta; + double old_va_phi=va_phi; + + for(j=1;j<1000;j++) + { + va_theta= 1.e-3; + double error=evaluateErrorGaussian(Ind_Max_phi, va_phi, true, va_theta ,esp_theta, distr_odf, thetaPrimGaussian, deltaThetaPrimGaussian,nbFacetGIden); + for(i=0; i<10000; i++) + { + double va_theta_tmp=1.e-3+i*4*pi/10000.; + double error1=evaluateErrorGaussian(Ind_Max_phi, va_phi, true, va_theta_tmp,esp_theta, distr_odf, thetaPrimGaussian, deltaThetaPrimGaussian,nbFacetGIden); + if(error1< error) + { + va_theta=va_theta_tmp; + error=error1; + //printf(" iteration %d, va-of-Gaussian-theta, %e, error %e \n",i,va_theta,error); + } + } + va_phi= 1.e-3; + error=evaluateErrorGaussian(Ind_Max_theta, va_theta, false, va_phi,esp_phi, distr_odf, phiPrimGaussian, deltaPhiPrimGaussian,nbFacetGIden); + for(i=0; i<10000; i++) + { + double va_phi_tmp=1.e-3+i*4*pi/10000.; + double error1=evaluateErrorGaussian(Ind_Max_theta, va_theta, false, va_phi_tmp, esp_phi, distr_odf, phiPrimGaussian, deltaPhiPrimGaussian,nbFacetGIden); + if(error1< error) + { + va_phi=va_phi_tmp; + error=error1; + //printf(" iteration %d, va-of-Gaussian-phi, %e, error %e \n",i,va_phi,error); + } + } + printf("iteration %d,va-of-Gaussian-theta, %e, va-of-Gaussian-phi, %e\n",j,va_theta,va_phi); + if(fabs(va_phi-old_va_phi)/old_va_phi<1.e-4 and fabs(va_theta-old_va_theta)/old_va_theta <1.e-4) break; + old_va_theta = va_theta; + old_va_phi=va_phi; + } + //verification + f1=0.; + f2=0.; + f3=0.; + area=0.; + + for(i=0;i<nbFacetGIden;i++) + { + theta=thetaPrimGaussian[i]; + phi=phiPrimGaussian[i]; + f1+=( deltaThetaPrimGaussian[i]*(exp(-0.5*(theta - esp_theta)*(theta - esp_theta)/va_theta))/(sqrt(2.*pi*va_theta)) ); + f2+=( deltaPhiPrimGaussian[i]*(exp(-0.5*(phi - esp_phi)*(phi - esp_phi)/va_phi))/(sqrt(2.*pi*va_phi)) ); + } + for(i=0;i<nbFacetGIden;i++) + { + theta=thetaPrimGaussian[i]; + for(j=0;j<nbFacetGIden;j++) + { + phi=phiPrimGaussian[j]; + f3+=( deltaPhiPrimGaussian[j]*(exp(-0.5*(phi - esp_phi)*(phi - esp_phi)/va_phi))/(sqrt(2.*pi*va_phi)) )* + ( deltaThetaPrimGaussian[i]*(exp(-0.5*(theta - esp_theta)*(theta - esp_theta)/va_theta))/(sqrt(2.*pi*va_theta)) ); + area+=deltaThetaPrimGaussian[i]*deltaPhiPrimGaussian[j]*sin(theta); + } + } + printf(" esp-of-Gaussian-theta: %e\n",esp_theta); + printf(" variance-Gaussian-theta: %e\n",va_theta); + printf(" check-Gaussian-associated-with-theta: %e\n",f1); + printf(" esp-of-Gaussian-phi: %e\n",esp_phi); + printf(" variance-Gaussian-phi: %e\n",va_phi); + printf(" check-Gaussian-associated-with-phi: %e\n",f2); + printf(" check-global-Gaussian-: %e\n",f3); + printf(" Gaussian-identification-area: %e\n",area); + } + + + + deltaTheta=pi/(N-1); //poles are of angle deltaTheta/2 and other of angle deltaTheta facesPerTheta = new int[N]; totalFaces=0; + for(i=0;i<N;i++) { - theta=i*deltaTheta+deltaTheta/2.; - Nphi=(int)(((double)(N))*sin(theta)); - if(i==0 or i==N-1) Nphi=1; + if(i==0) + { + theta=0.; + Nphi=1; + } + else if(i==N-1) + { + theta=pi; + Nphi=1; + } + else + { + theta=i*deltaTheta; + Nphi=(int)(((double)(N-1))*sin(theta)); + if((int)(Nphi/2)*2+1!=Nphi) Nphi+=1; + } facesPerTheta[i]=Nphi; totalFaces+=Nphi; } + mallocvector(probDensityList,totalFaces); mallocvector(facetList,totalFaces); mallocvector(thetaList,totalFaces); mallocvector(phiList,totalFaces); + k=0; surfTotal=0.; probDensity=0.; + double *probDensityListOther; + mallocvector(&probDensityListOther,totalFaces); + for(i=0;i<N;i++) { - theta=i*deltaTheta+deltaTheta/2.; - surfFacet=2.*pi*sin(theta)*sin(deltaTheta/2.)/facesPerTheta[i]; + if(i==0) + { + theta=0.; + surfFacet=pi*(1.-cos(deltaTheta/2.))/facesPerTheta[i]; + } + else if(i==N-1) + { + theta=pi; + surfFacet=pi*(1.-cos(deltaTheta/2.))/facesPerTheta[i]; + } + else + { + theta=i*deltaTheta; + surfFacet=2.*pi*sin(theta)*sin(deltaTheta/2.)/(facesPerTheta[i]-1); + } + for(j=0;j<facesPerTheta[i];j++) { - phi=(j+1./2.)*pi/facesPerTheta[i]; + if(j==0 && i!=0 && i!=N-1) + { + phi=0.; + (*facetList)[k]= surfFacet/2.; + deltaPhi=pi/(facesPerTheta[i]-1)/2.; + } + else if(j==facesPerTheta[i]-1 && i!=0 && i!=N-1) + { + phi=pi; + (*facetList)[k]= surfFacet/2.; + deltaPhi=pi/(facesPerTheta[i]-1)/2.; + } + else + { + if(i!=0 && i!=N-1) + { + deltaPhi=pi/(facesPerTheta[i]-1); + phi=j*deltaPhi; + } + else + { + phi=0.; + deltaPhi=pi/(facesPerTheta[i]); + } + (*facetList)[k]= surfFacet; + } dir[0]= cos(phi)*sin(theta); dir[1]= sin(phi)*sin(theta); dir[2]= cos(theta); (*thetaList)[k]=theta; - (*phiList)[k]=phi; - (*probDensityList)[k]=2.*getODF(dir,bofa, bigBofa, false); - (*facetList)[k]= surfFacet; + (*phiList)[k]=phi; + if(WithoutGaussian) + { + (*probDensityList)[k]=2.*getODF(dir,bofa, bigBofa, false); + } + else + { + double thetaprim=theta; + if(thetaprim>theta_max+pi/2.) thetaprim-=pi; + double phiprim=phi; + if(phiprim>phi_max+pi/2.) phiprim-=pi; + (*probDensityList)[k]= exp(-0.5*(phiprim-esp_phi)*(phiprim-esp_phi)/va_phi)/sqrt(2*pi*va_phi)*exp(-0.5*(thetaprim - esp_theta)*(thetaprim - esp_theta)/va_theta)/sqrt(2*pi*va_theta)/f1/f2; + probDensityListOther[k]=2.*getODF(dir,bofa, bigBofa, false); + //printf("theta %e, phi %e, Probability closure: %e, Probability Gauss: %e\n", theta, phi, probDensityListOther[k], (*probDensityList)[k]); + } probDensity+=(*probDensityList)[k]*((*facetList)[k]); - surfTotal+=surfFacet; + surfTotal+=(*facetList)[k]; k+=1; } } + for(k=0;k<totalFaces;k++) + { + (*probDensityList)[k]/= probDensity; + } printf("Nfacet: %d, Surface: %e, Probability: %e\n",totalFaces,surfTotal,probDensity); - //for(i=0;i<totalFaces;i++) - //{ - // (*probDensityList)[i]/probDensity; - //} + + + + + free(lambdaA); freematrix(atmp,3); freematrix(eA,3); freematrix(Rot,3); free(facesPerTheta); + free(thetaPrimGaussian); + free(deltaThetaPrimGaussian); + free(phiPrimGaussian); + free(deltaPhiPrimGaussian); + freematrix(distr_odf,nbFacetGIden); + + + // printf(" nombre de case negatif: %d\n",nbn); + return totalFaces; } +double evaluateErrorGaussian(int fixAngleInd, double fixAngleVar, bool theta, double va, double esp, double **odf, double *angleList, double *dangleList, int nbFacetGIden) +{ + int i=fixAngleInd; + int j=fixAngleInd; + int nbpt=0; + double ang=0.; + double f=0.; + double error=0.; + for(int k=0;k<nbFacetGIden; k++) + { + if(theta) i=k; else j=k; + double odfGauss=1./sqrt(2.*pi*va)*exp(-0.5*(angleList[k]-esp)*(angleList[k]-esp)/va); + f+=odfGauss*dangleList[k]; + } + for(int k=0;k<nbFacetGIden; k++) + { + if(theta) i=k; else j=k; + double odfClos=odf[i][j]*sqrt(2.*pi*fixAngleVar); //we need to normalize) + double odfGauss=1./sqrt(2.*pi*va)*exp(-0.5*(angleList[k]-esp)*(angleList[k]-esp)/va)/f; + if(odfClos>0.) + { + nbpt+=1; + error+=(odfClos-odfGauss)*(odfClos-odfGauss)*dangleList[k]*dangleList[k]; + ang+=dangleList[k]; + } + } + error=sqrt(error)/ang; + return error; +} +//this file reads the input from ARtable.i01 generated by ~/cm3Data/Stochastic/BayesianIdentification/FiberDistribution/stat_plaque.py +void getARWeight(double theta, double phi, int Total_number_of_AR_per_phase, double *weightAR, double *ARList) +{ + + FILE *ARtable=NULL; + char line[1000]; + int Nfacets,NAR,i,j,index; + double DAR,dangle; + static double *listTheta=NULL; + static double *listPhi=NULL; + static double *listSurf=NULL; + static double *listVol=NULL; + static double **pdfAR=NULL; + + ARtable = fopen("ARtable.i01", "r"); + if(ARtable==NULL) + printf("Error, no ARtable.i01 file\n"); + fscanf(ARtable,"%s%*[^\n]",line); + fscanf(ARtable, "%s", line); + Nfacets = atoi(line); + fscanf(ARtable, "%s", line); + NAR = atoi(line); + if(NAR!=Total_number_of_AR_per_phase) + printf("NAR!=Total_number_of_AR_per_phase\n"); + fscanf(ARtable, "%s%*[^\n]", line); + DAR = atof(line); + + if(listTheta==NULL) + { + mallocvector(&listTheta,Nfacets); + mallocvector(&listPhi,Nfacets); + mallocvector(&listSurf,Nfacets); + mallocvector(&listVol,Nfacets); + mallocmatrix(&pdfAR,Nfacets,NAR); + } + + fscanf(ARtable,"%s%*[^\n]",line); + for(i=0;i<Nfacets;i++) + { + fscanf(ARtable, "%s", line); + listTheta[i]=atof(line); + fscanf(ARtable, "%s", line); + listPhi[i]=atof(line); + fscanf(ARtable, "%s", line); + listSurf[i]=atof(line); + fscanf(ARtable, "%s", line); + listVol[i]=atof(line); + for(j=0;j<NAR;j++) + { + if(j<NAR-1) + fscanf(ARtable, "%s", line); + else + fscanf(ARtable, "%s%*[^\n]", line); + pdfAR[i][j]=atof(line); + } + } + //identify closest direction + dangle=100.; + index=-1; + for(i=0;i<Nfacets;i++) + { + if(fabs(theta-listTheta[i])+fabs(phi-listPhi[i])<dangle) + { + + dangle=fabs(theta-listTheta[i])+fabs(phi-listPhi[i]); + index=i; + } + } + if(dangle>0.01) + printf("The angles were not identified in ARtable.i01 \n"); + + for(i=0; i<Total_number_of_AR_per_phase; i++) + { + weightAR[i]=pdfAR[index][i]*listVol[index]; + ARList[i]=((double)(i)+0.5)*DAR; + } + fclose(ARtable); +} + #endif diff --git a/NonLinearSolver/materialLaw/Weight.h b/NonLinearSolver/materialLaw/Weight.h index 5a0fb95d4d729e6cd118655fec4b7a702ce36ffb..52b831f3fafbc3057f91cd40dab0bc677f461ac1 100644 --- a/NonLinearSolver/materialLaw/Weight.h +++ b/NonLinearSolver/materialLaw/Weight.h @@ -7,6 +7,9 @@ void getQuadraticClosure(double a[3][3], double Aq[3][3][3][3]); void getHybridClosure(double a[3][3], double Al[3][3][3][3], bool is2D); double getODF(double p[3], double bofa[3][3], double bigBofa[3][3][3][3], bool is2D); double generateWeight(int N, double **a, double **probDensityList, double **facetList, double **thetaList, double **phiList); +double evaluateErrorGaussian(int fixAngleInd, double fixAngleVar, bool theta, double va, double esp, double **odf, double *angleList, double *dangleList, int nbFacetGIden); +void getARWeight(double theta, double phi, int Total_number_of_AR_per_phase, double *weightAR, double *ARList); + #endif // Add by MOHAMEDOU Mohamed diff --git a/NonLinearSolver/materialLaw/damage.cpp b/NonLinearSolver/materialLaw/damage.cpp index b3f4e5a2eb3b2ce063994b2b927e998ed1755db9..b1e15ad18a976818b5fd0ff016a176118c2bdd0a 100755 --- a/NonLinearSolver/materialLaw/damage.cpp +++ b/NonLinearSolver/materialLaw/damage.cpp @@ -4,6 +4,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> +#include <random> #include "damage.h" #include "matrix_operations.h" @@ -20,9 +21,10 @@ using namespace MFH; //constructor LC_Damage::LC_Damage(double* props, int iddam): Damage(props, iddam){ - nsdv = 8; + nsdv = 9; S0 = props[iddam+1]; n = props[iddam+2]; + pos_maxD=nsdv-1; } //destructor @@ -64,10 +66,11 @@ void LC_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int po //constructor LCN_Damage::LCN_Damage(double* props, int iddam):Damage(props, iddam){ - nsdv = 5; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar + nsdv = 6; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar S0 = props[iddam+1]; n = props[iddam+2]; p0 = props[iddam+3]; + pos_maxD=nsdv-1; } //destructor @@ -86,146 +89,13 @@ void LCN_Damage::print(){ //damagebox void LCN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep){ - // statev for damage p_bar, dp_bar ,D, dD - double Y_n, Y, Y_a; - - double p_bar, dp_bar, p_bar_n; - double D, dD, D_n; - double Max_p_bar; - - // allocated once - static double* strs_n; - static double* strs; - static double* Estrn_n; - static double* Estrn; - - static double* strn; - static double* pstrn; - - int i, j; - double mat1; - - static bool initialized = false; - - //allocate memory - if(!initialized){ - mallocvector(&strs_n,6); - mallocvector(&strs,6); - mallocvector(&Estrn_n,6); - mallocvector(&Estrn,6); +} - mallocvector(&strn,6); - mallocvector(&pstrn,6); - - initialized = true; - } - cleartens2(strs_n); - cleartens2(strs); - cleartens2(Estrn_n); - cleartens2(Estrn); - cleartens2(strn); - cleartens2(pstrn); - - p_bar_n= statev_n[pos_dam]; - dp_bar= statev_n[pos_dam+1]; - - D_n= statev_n[pos_dam+2]; - Max_p_bar = statev_n[pos_dam+4]; - p_bar= p_bar_n+dp_bar; - dp_bar = p_bar - Max_p_bar; - - if(p_bar >= Max_p_bar){ - - Max_p_bar= p_bar; - } - - - if(Max_p_bar > p0){ - - copyvect(&(statev_n[pos_strs]),strs_n,6); - copyvect(&(statev[pos_strs]),strs,6); - - copyvect(&(statev_n[pos_strn]),strn,6); - copyvect(&(statev_n[pos_strn+18]),pstrn,6); - addtens2(1., strn, -1., pstrn, Estrn_n); - - copyvect(&(statev[pos_strn]),strn,6); - copyvect(&(statev[pos_strn+18]),pstrn,6); - addtens2(1., strn, -1., pstrn, Estrn); - - Y_n= 0.5*fabs(contraction22(strs_n, Estrn_n)); - Y= 0.5*fabs(contraction22(strs, Estrn)); - - Y_a= (1.-alpha)*Y_n + alpha*Y; - - - // compute dDdp_bar - *dDdp_bar=pow(Y_a/S0, n); - - - if(dp_bar>0.0){ - - dD= dp_bar*pow(Y_a/S0, n); - - // compute dDdE - mat1= alpha*n*dD/Y_a; - - cleartens2(dDdE); - - for(i=0;i<6;i++){ - for (j=0; j<6; j++) { - dDdE[i] = dDdE[i] + Estrn[j]*Calgo[j][i]; - } - dDdE[i]= mat1*dDdE[i]; - } - } - else{ - dD=0.; - cleartens2(dDdE); - } - - D= D_n + dD; - } - else { - D=D_n; - dD=0.0; - - *dDdp_bar= 0.0; - cleartens2(dDdE); - - } - - if( D > 0.99){ - D=0.99; - dD=0.0; - *dDdp_bar= 0.0; - cleartens2(dDdE); - } - - - // update damage variable in statev - statev[pos_dam]= p_bar; - statev[pos_dam+2]= D; - statev[pos_dam+3]= dD; - statev[pos_dam+4]= Max_p_bar; - - printf("damage in matrix is %e,%e\n", D,p_bar); - //free memory allocated once -// free(strs_n); -// free(strs); -// free(Estrn_n); -// free(Estrn); - -// free(strn); -// free(pstrn); - - -} // Stochastic LEMAITRE-CHABOCHE DAMAGE MODEL (nonlocal) @@ -238,10 +108,12 @@ void LCN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int p //constructor LCN_Damage_Stoch::LCN_Damage_Stoch(double* props, int iddam):Damage(props, iddam){ - nsdv = 7; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar - pos_DamParm1 = nsdv-2; - pos_DamParm2 = nsdv-1; + nsdv = 8; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar + pos_DamParm1 = nsdv-3; + pos_DamParm2 = nsdv-2; p0 = props[iddam+3]; + pos_maxD=nsdv-1; + } //destructor @@ -259,148 +131,8 @@ void LCN_Damage_Stoch::print(){ //damagebox void LCN_Damage_Stoch::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep){ - // statev for damage p_bar, dp_bar ,D, dD - double Y_n, Y, Y_a; - double S0, n; - - double p_bar, dp_bar, p_bar_n; - double D, dD, D_n; - double Max_p_bar; - - // allocated once - static double* strs_n; - static double* strs; - static double* Estrn_n; - static double* Estrn; - - static double* strn; - static double* pstrn; - - int i, j; - double mat1; - static bool initialized = false; - - //allocate memory - if(!initialized){ - mallocvector(&strs_n,6); - mallocvector(&strs,6); - mallocvector(&Estrn_n,6); - mallocvector(&Estrn,6); - - mallocvector(&strn,6); - mallocvector(&pstrn,6); - - initialized = true; - } - cleartens2(strs_n); - cleartens2(strs); - cleartens2(Estrn_n); - cleartens2(Estrn); - cleartens2(strn); - cleartens2(pstrn); - - S0 = statev_n[pos_dam+pos_DamParm1]; - n = statev_n[pos_dam+pos_DamParm2]; - - p_bar_n= statev_n[pos_dam]; - dp_bar= statev_n[pos_dam+1]; - - D_n= statev_n[pos_dam+2]; - Max_p_bar = statev_n[pos_dam+4]; - - - p_bar= p_bar_n+dp_bar; - - dp_bar = p_bar - Max_p_bar; - - if(p_bar >= Max_p_bar){ - - Max_p_bar= p_bar; - } - - - if(Max_p_bar > p0){ - - copyvect(&(statev_n[pos_strs]),strs_n,6); - copyvect(&(statev[pos_strs]),strs,6); - - copyvect(&(statev_n[pos_strn]),strn,6); - copyvect(&(statev_n[pos_strn+18]),pstrn,6); - addtens2(1., strn, -1., pstrn, Estrn_n); - - copyvect(&(statev[pos_strn]),strn,6); - copyvect(&(statev[pos_strn+18]),pstrn,6); - addtens2(1., strn, -1., pstrn, Estrn); - - Y_n= 0.5*fabs(contraction22(strs_n, Estrn_n)); - Y= 0.5*fabs(contraction22(strs, Estrn)); - - Y_a= (1.-alpha)*Y_n + alpha*Y; - - - // compute dDdp_bar - *dDdp_bar=pow(Y_a/S0, n); - - - if(dp_bar>0.0){ - - dD= dp_bar*pow(Y_a/S0, n); - - // compute dDdE - mat1= alpha*n*dD/Y_a; - - cleartens2(dDdE); - - for(i=0;i<6;i++){ - for (j=0; j<6; j++) { - dDdE[i] = dDdE[i] + Estrn[j]*Calgo[j][i]; - } - dDdE[i]= mat1*dDdE[i]; - } - } - else{ - dD=0.; - cleartens2(dDdE); - } - - D= D_n + dD; - } - else { - D=D_n; - dD=0.0; - - *dDdp_bar= 0.0; - cleartens2(dDdE); - - } - - if( D > 0.99){ - D=0.99; - dD=0.0; - *dDdp_bar= 0.0; - cleartens2(dDdE); - } - - - // update damage variable in statev - statev[pos_dam]= p_bar; - statev[pos_dam+2]= D; - statev[pos_dam+3]= dD; - statev[pos_dam+4]= Max_p_bar; - - printf("damage in matrix is %e,%e\n", D,p_bar); - //free memory allocated once -// free(strs_n); -// free(strs); -// free(Estrn_n); -// free(Estrn); - -// free(strn); -// free(pstrn); - - } @@ -417,9 +149,10 @@ void LCN_Damage_Stoch::damagebox(double* statev_n, double* statev, int pos_strn, //constructor LINN_Damage::LINN_Damage(double* props, int iddam):Damage(props, iddam){ - nsdv = 5; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar + nsdv = 6; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar p0 = props[iddam+1]; pc = props[iddam+2]; + pos_maxD=nsdv-1; } //destructor @@ -438,49 +171,7 @@ void LINN_Damage::print(){ void LINN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep){ -// statev for damage p_bar, dp_bar ,D, dD - - double p_bar, dp_bar, p_bar_n; - double D, dD, D_n; - double Max_p_bar; - - p_bar_n= statev_n[pos_dam]; - dp_bar= statev_n[pos_dam+1]; - D_n= statev_n[pos_dam+2]; - Max_p_bar = statev_n[pos_dam+4]; - - p_bar= p_bar_n+dp_bar; - - dp_bar = p_bar -Max_p_bar; - - if (dp_bar >= 0) { - Max_p_bar = p_bar; - - if(p_bar > p0){ - - D=(p_bar-p0)/(pc-p0); - dD=D-D_n; - - *dDdp_bar= 1.0/(pc-p0); - - } - } - else { - D=D_n; - dD=0.0; - - *dDdp_bar= 0.0; - - } - - -// update damage variable in statev - statev[pos_dam]= p_bar; - statev[pos_dam+2]= D; - statev[pos_dam+3]= dD; - statev[pos_dam+4]= Max_p_bar; - cleartens2(dDdE); } @@ -499,8 +190,10 @@ void LINN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int //constructor EXPN_Damage::EXPN_Damage(double* props, int iddam):Damage(props,iddam){ - nsdv = 5; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar + nsdv = 6; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar Beta = props[iddam+1]; + pos_maxD=nsdv-1; + } //destructor @@ -520,45 +213,7 @@ void EXPN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int // statev for damage p_bar, dp_bar ,D, dD - double p_bar, dp_bar, p_bar_n; - double Max_p_bar; - double D, dD, D_n; - double para; - - p_bar_n= statev_n[pos_dam]; // p_bar=p_bar_n+dp_bar - dp_bar= statev_n[pos_dam+1]; - - D_n= statev_n[pos_dam+2]; - Max_p_bar = statev_n[pos_dam+4]; - - - p_bar= p_bar_n+dp_bar; - - dp_bar = p_bar -Max_p_bar; - - if(dp_bar >= 0.0){ - - Max_p_bar= p_bar; - - para= -Beta*p_bar; - D=1-exp(para); - dD=D-D_n; - - } - else{ - D=D_n; - dD=0.0; - } -// update damage variable in statev - statev[pos_dam]= p_bar; - statev[pos_dam+2]= D; - statev[pos_dam+3]= dD; - statev[pos_dam+4]= Max_p_bar; - - - cleartens2(dDdE); - *dDdp_bar= Beta*(1.0-D_n-alpha*dD); - + } @@ -586,13 +241,14 @@ void EXPN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int //constructor PLN_Damage::PLN_Damage(double* props, int iddam):Damage(props,iddam){ - nsdv = 6; //p_bar dp_bar D dD, p, Max_p_bar, Max_p_bar keep the highest history value of p_bar + nsdv = 7; //p_bar dp_bar D dD, p, Max_p_bar, Max_p_bar keep the highest history value of p_bar Alpha = props[iddam+1]; Beta = props[iddam+2]; p0 = props[iddam+3]; pc = props[iddam+4]; Dc = props[iddam+5]; if(Dc>1.) Dc=0.999; + pos_maxD=nsdv-1; } //destructor @@ -610,196 +266,16 @@ void PLN_Damage::print(){ void PLN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep){ - double p, p_bar, dp_bar, p_bar_n; - double Max_p_bar; - double D, dD, D_n; - double para1, para2, sq2; - - // for euivalent strain - int i, j, k; - static double* strn = NULL; - static double** S = NULL; - static double* e = NULL; - static double** U = NULL; - static double*** dedS = NULL; - - static double** dpdS = NULL; - - if(strn == NULL) - { - mallocvector(&strn,6); - mallocmatrix(&S,3,3); - mallocvector(&e,3); - mallocmatrix(&U,3,3); - malloctens3(&dedS,3,3,3); - mallocmatrix(&dpdS,3,3); - } - cleartens2(strn); - for(i=0;i<3;i++) - { - e[i]=0.; - for(j=0;j<3;j++) - { - S[i][j]=0.; - U[i][j]=0.; - dpdS[i][j]=0.; - for(k=0;k<3;k++) - dedS[i][j][k]=0.; - } - } - -// compute equivalent strain p - //****** before calling function Jacobian_Eigen a sembly of matrix from strain tensor is used - //******** strain: (e11,e22,e33,sq2*e12,sq2*e13,sq2*e23) - sq2 = sqrt(2.); - cleartens2(dDdE); - - copyvect(&(statev[pos_strn]), strn, 6); - for (i=0; i<3; i++){ - S[i][i] = strn[i]; - e[i] = 0.; - } - S[0][1] = S[1][0] = strn[3]/sq2; - S[0][2] = S[2][0] = strn[4]/sq2; - S[1][2] = S[2][1] = strn[5]/sq2; - - //**compute principle strain and keep in e ************************ - Jacobian_Eigen( 3, S, e, U, dedS); - - para1 = 0.0; - for (int i=0; i<3; i++){ - if(e[i] > 0.) { - para1 = para1 + e[i]*e[i]; - } - } - p = sqrt(para1); - -//********* compute damage********************** - - p_bar_n = statev_n[pos_dam]; // p_bar=p_bar_n+dp_bar - dp_bar = statev_n[pos_dam+1]; - D_n = statev_n[pos_dam+2]; - Max_p_bar = statev_n[pos_dam+5]; - - -#ifdef NONLOCALGMSH -#else -// add by wu ling try nonlocal mehod without finite element cacilation - - dp_bar = p - statev_n[pos_dam+4]; -#endif - - p_bar= p_bar_n+dp_bar; - - if(p_bar >= p0 && p_bar >= Max_p_bar) - { - Max_p_bar = p_bar; - - if(pc > Max_p_bar) - { - para1 = pow((pc - Max_p_bar)/(pc-p0), Alpha); - para2 = pow(p0/Max_p_bar, Beta); - D = 1.0 - para2 * para1; - *dDdp_bar= Beta*para2/ Max_p_bar * para1 + para2 * Alpha * pow((pc- Max_p_bar), (Alpha-1.0))/pow((pc-p0), Alpha); - if(D > Dc) - { - D=Dc; - *dDdp_bar = 0; - } - } - else if (pc <= Max_p_bar) - { - D = Dc; - *dDdp_bar= 0.; - } - dD=D-D_n; - } - - else { - D=D_n; - dD=0.0; - - *dDdp_bar= 0.0; - - } - - - - - - - -// update damage variable in statev - statev[pos_dam]= p_bar; - statev[pos_dam+2]= D; - statev[pos_dam+3]= dD; - statev[pos_dam+5]= Max_p_bar; - - -// compute equivalent strain p's derivatives to strain dpdE which is keept in dDdE - //****** before calling function Jacobian_Eigen a sembly of matrix from strain tensor is used - //******** strain: (e11,e22,e33,sq2*e12,sq2*e13,sq2*e23) - - cleartens2(dDdE); - - for (int j=0; j<3; j++){ - for (int k=0; k<3; k++){ - dpdS[j][k] = 0.0; - } - } - - for (int i=0; i<3; i++){ - if(e[i] > 0.) { - for (int j=0; j<3; j++){ - for (int k=0; k<3; k++){ - dpdS[j][k] = dpdS[j][k] + e[i]/p*dedS[i][j][k]; - } - } - } - } - // here we use dDdE to give back dpdE***** - - dDdE[0] = dpdS[0][0]; - dDdE[1] = dpdS[1][1]; - dDdE[2] = dpdS[2][2]; - - dDdE[3] = (dpdS[0][1]+dpdS[1][0])/sq2; - dDdE[4] = (dpdS[0][2]+dpdS[2][0])/sq2; - dDdE[5] = (dpdS[1][2]+dpdS[2][1])/sq2; - - // update damage variable in statev - statev[pos_dam+4]= p; - + } + //**************************************************************************************** // Weibull Damage model for fibers -*********************** //********************************************************* //constructor Weibull_Damage::Weibull_Damage(double* props, int iddam):Damage(props,iddam){ - nsdv = 6; //p_bar dp_bar D dD, p, Max_p_bar, Max_p_bar keep the highest history value of p_bar - L = props[iddam+1]; - L0 = props[iddam+2]; - S0 = props[iddam+3]; - Alpha = props[iddam+4]; - m = props[iddam+5]; - NFiber = props[iddam+6]; - if(NFiber!= 0){ - std::random_device rd; - std::mt19937 gen(rd()); - std::normal_distribution<double> d(0.0, 1.0); - // get random number with normal distribution using gen as random source - Pdam = d(gen); - double tmp; - tmp = pow(L/L0,-Alpha)*log((9+NFiber)/NFiber); - Strs_cr = S0*pow(tmp, 1.0/m); - pos_DamParm1 = 0; - pos_DamParm2 = 0; - } - else{ - pos_DamParm1 = 1; - pos_DamParm2 = 2; - } + } //destructor @@ -815,11 +291,15 @@ void Weibull_Damage::print(){ } //damagebox -void Weibull_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep){ +void Weibull_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdFd_bar, double alpha, int kinc, int kstep){ + } + + + // JMC JMC JMC NEW //LEMAITRE-CHABOCHE DAMAGE MODEL (nonlocal) @@ -833,10 +313,11 @@ void Weibull_Damage::damagebox(double* statev_n, double* statev, int pos_strn, i //constructor BILIN_Damage::BILIN_Damage(double* props, int iddam):Damage(props, iddam){ - nsdv = 5; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar + nsdv = 6; //p_bar dp_bar D dD, Max_p_bar, Max_p_bar keep the highest history value of p_bar S0 = props[iddam+1]; n = props[iddam+2]; p0 = props[iddam+3]; + pos_maxD=nsdv-1; } //destructor @@ -855,10 +336,12 @@ void BILIN_Damage::print(){ //damagebox void BILIN_Damage::damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep){ - + + } +// JMC JMC JMC NEW #endif diff --git a/NonLinearSolver/materialLaw/damage.h b/NonLinearSolver/materialLaw/damage.h index ac8e28d9336a12a77f77e67fc31395bd0441e604..18d341714a76d37793e2a72d4ebdab35c14c6256 100755 --- a/NonLinearSolver/materialLaw/damage.h +++ b/NonLinearSolver/materialLaw/damage.h @@ -13,6 +13,7 @@ class Damage{ int dammodel; int ndamprops; int nsdv; + int pos_maxD; public: @@ -32,6 +33,13 @@ class Damage{ virtual void damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep)=0; virtual int get_pos_DamParm1() const { return 0; } virtual int get_pos_DamParm2() const { return 0; } + virtual int get_pos_Fd_bar() const { return 0; } + virtual int get_pos_dFd_bar() const { return 0; } + virtual int get_pos_locFd() const { return 0; } + virtual double get_Gc() const {return -1.0;} + virtual int get_pos_maxD() const {return pos_maxD;} + virtual double getMaxD(double *statev, int pos_dam) const {return statev[pos_dam+get_pos_maxD()];} + virtual void setMaxD(double *statev, int pos_dam, double Dmax) { statev[pos_dam+get_pos_maxD()]=Dmax;} }; @@ -237,6 +245,10 @@ class Weibull_Damage : public Damage{ double Pdam; double Strs_cr; int pos_DamParm1, pos_DamParm2; + int pos_Fd_bar, pos_dFd_bar; + int pos_locFd; + double Gc; + public: Weibull_Damage(double* props, int iddam); @@ -245,8 +257,12 @@ class Weibull_Damage : public Damage{ virtual void print(); virtual int get_pos_DamParm1() const { return pos_DamParm1; } virtual int get_pos_DamParm2() const { return pos_DamParm2; } + virtual int get_pos_Fd_bar() const { return pos_Fd_bar; } + virtual int get_pos_dFd_bar() const { return pos_dFd_bar; } + virtual int get_pos_locFd() const { return pos_locFd; } + virtual double get_Gc() const { return Gc; } - virtual void damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdp_bar, double alpha, int kinc, int kstep); + virtual void damagebox(double* statev_n, double* statev, int pos_strn, int pos_strs, int pos_dam, double** Calgo,double* dDdE, double *dDdFd_bar, double alpha, int kinc, int kstep); }; diff --git a/NonLinearSolver/materialLaw/material.cpp b/NonLinearSolver/materialLaw/material.cpp index 37bc6c90b1abaa4c94516dfd39f72d1ed2b3987f..0b28bca3b6670224031367e0493b18d7bd9f3673 100755 --- a/NonLinearSolver/materialLaw/material.cpp +++ b/NonLinearSolver/materialLaw/material.cpp @@ -4,7 +4,7 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> - +//#define pi 3.14159265 #include "material.h" #include "FiniteStrain.h" @@ -22,6 +22,8 @@ using std::max; using namespace MFH; #include "rotations.h" #endif + + //****in all of the constbox**New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** //*******c_g the characteristic length tensor, the value is returned by Clength_creat function*********** @@ -73,12 +75,12 @@ int Material::get_pos_inc_stress () const return -1; } int Material::get_pos_mtx_strain () const -{ - return -1; +{ + return -1; } int Material::get_pos_inc_strain () const { - return -1; + return -1; } int Material::get_pos_mtx_Ja() const { @@ -88,22 +90,31 @@ int Material::get_pos_inc_Ja() const { return -1; } +int Material::get_pos_mtx_Dam() const +{ + return -1; +} +int Material::get_pos_inc_Dam() const +{ + return -1; +} void Material::get_elOp_mtx(double** Cel) { - printf("Function get_elOp_mtx is not defined for this material\n"); + printf("Function get_elOp_mtx is not defined for this material\n"); } void Material::get_elOp_icl(double** Cel) { - printf("Function get_elOp_icl is not defined for this material\n"); + printf("Function get_elOp_icl is not defined for this material\n"); } double Material::get_vfI() { - printf("Function get_vfI is not defined for this material\n"); + printf("Function get_vfI is not defined for this material\n"); } + #endif @@ -120,6 +131,35 @@ double Material::get_vfI() //constructor EL_Material::EL_Material(double* props, int idmat):Material(props, idmat){ + int iddam; + int idclength; + + iddam = (int) props[idmat+1]; + idclength=(int) props[idmat+2]; + E = props[idmat+3]; + nu = props[idmat+4]; + + nsdv = 18; + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_Ja=nsdv; + nsdv +=1; + pos_F = nsdv; + nsdv += 9; + pos_Base = nsdv; + nsdv += 9; + pos_Ri=nsdv; + nsdv +=9; + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + pos_p = pos_dam+4; + nsdv += dam->get_nsdv(); + } + + clength = init_clength(props,idclength); } #ifdef NONLOCALGMSH @@ -148,6 +188,26 @@ int EL_Material::get_pos_damagefornonlocal() const double EL_Material::getElasticEnergy (double* statev) { double eE = 0.; + int i; + static double* strn = NULL; + static double* strs = NULL; + //static double**CelD = NULL; + //double D; + if(strn == NULL) + { + mallocvector(&strn,6); + mallocvector(&strs,6); + //mallocmatrix(&CelD,6,6); + } + cleartens2(strn); + cleartens2(strs); + + copyvect(&(statev[this->get_pos_strn()]), strn,6); + //get_elOD(statev, CelD); + //contraction42(CelD,strn,strs); + copyvect(&statev[get_pos_strs()], strs, 6); + //neegry due to damage has been removed strn3 =eps12*sqrt2, strs3=sqrt2*strs12 + for (i =0; i< 6; i++) eE+=0.5*(strs[i]*strn[i]); return eE; @@ -183,8 +243,7 @@ void EL_Material::print(){ //constbox -void EL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ - +void EL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ } @@ -192,7 +251,6 @@ void EL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* void EL_Material::constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ - } @@ -244,11 +302,69 @@ void EL_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, i //***************************************************** //RATE-INDEPENDENT ELASTO-PLASTICITY -//PROPS: MODEL, iddam, E, nu, sy0, htype, hmod1, (hmod2), hexp +//PROPS: MODEL, iddam, E, nu, sy0, htype, hmod1, (hmod2, hp0), hexp //STATEV: strn, strs, dstrn, pstrn, p, dp, 2*mu_iso //***************************************************** //constructor EP_Material::EP_Material(double* props, int idmat):Material(props, idmat){ + int k; + int iddam, idclength; + + + iddam = (int)props[idmat+1]; + idclength = (int)props[idmat+2]; + + k=idmat+3; + E = props[k++]; + nu = props[k++]; + sy0 = props[k++]; + htype = (int) props[k++]; + hmod1 = props[k++]; + + //hardening models with two hardening moduli + if(htype==H_LINEXP){ + hmod2 = props[k++]; + hp0 = 0.; + } + else if(htype==H_POW_EXP){ + hmod2 = props[k++]; + hp0 = 0.; + } + else if(htype==H_POW_EXTRAPOL){ + hmod2 = props[k++]; + hp0 = props[k++]; + } + else{ + hmod2 = 0.; + hp0 = 0.; + } + hexp = props[k]; + + nsdv = 28; + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_pstrn=18; + pos_p = 24; + pos_dp = 25; + pos_twomu = 26; + pos_eqstrs = 27; + pos_F = nsdv; + nsdv += 9; + pos_Base = nsdv; + nsdv += 9; + pos_Ja=nsdv; + nsdv += 1; + pos_Ri = nsdv; + nsdv += 9; + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + nsdv += dam->get_nsdv(); + } + + clength = init_clength(props,idclength); } @@ -271,6 +387,11 @@ int EP_Material::get_pos_currentplasticstrainfornonlocal() const } int EP_Material::get_pos_effectiveplasticstrainfornonlocal() const { + if(dam) + { + return pos_dam; + } + return -1; } int EP_Material::get_pos_damagefornonlocal() const @@ -281,6 +402,27 @@ int EP_Material::get_pos_damagefornonlocal() const double EP_Material::getElasticEnergy (double* statev) { double eE = 0.; + int i; + static double* strn = NULL; + static double* pstrn = NULL; + static double* strs = NULL; + //static double**CelD = NULL; + if(strn == NULL) + { + mallocvector(&strn,6); + mallocvector(&pstrn,6); + mallocvector(&strs,6); + // mallocmatrix(&CelD,6,6); + } + cleartens2(strn); + cleartens2(pstrn); + cleartens2(strs); + + copyvect(&(statev[pos_strn]), strn,6); + copyvect(&(statev[pos_pstrn]),pstrn,6); + copyvect(&statev[pos_strs], strs, 6); + //enegry due to damage has been removed + for (i =0; i< 6; i++) eE+=0.5*(strs[i]*(strn[i]-pstrn[i])); return eE; } @@ -288,6 +430,54 @@ double EP_Material::getElasticEnergy (double* statev) double EP_Material::getPlasticEnergy (double* statev) { double eP = 0.; + double p = statev[get_pos_currentplasticstrainfornonlocal()]; + eP = sy0*p; + switch(htype) { + //POWER LAW HARDENING + case H_POW: + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(p,hexp+1.)/(hexp+1.); + break; + //EXPONENTIAL HARDENING + case H_EXP: + eP+=hmod1*p; + if(fabs(hexp)!=0) eP+=hmod1*(exp(-hexp*p)-exp(0))/(hexp); + break; + //SWIFT LAW + case H_SWIFT: + eP-=sy0*p; + if(fabs(hexp+1.)!=0 && fabs(hmod1)!=0.) eP+=sy0*pow(1.+hmod1*p,hexp+1.)/(hexp+1.)/hmod1; + break; + //LINEAR-EXPONENTIAL HARDENING + case H_LINEXP: + eP+=hmod1*p*p/2.+hmod2*p; + if(fabs(hexp)!=0) eP+=hmod2*(exp(-hexp*p)-exp(0))/(hexp); + break; + //POWER LAW HARDENING EXTRAPOLATED AFTER 16% DEFO TO MIMIC DIGIMAT TO ABAQUS + case H_POW_EXTRAPOL: + if(p<hp0) + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(p,hexp+1.)/(hexp+1.); + } + else if(p<10.*hp0) + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(hp0,hexp+1.)/(hexp+1.); + eP+=hmod1*pow(hp0,hexp+1.)*(p-hp0)+hmod2*(p-hp0)*(p-hp0)/2.; + } + else + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(hp0,hexp+1.)/(hexp+1.); + eP+=hmod1*pow(hp0,hexp+1.)*(10.*hp0-hp0)+hmod2*(10.*hp0-hp0)*(10.*hp0-hp0)/2.; + eP+=(hmod1*pow(hp0,hexp+1.)+hmod2*(10.*hp0-hp0))*(p-10.*hp0)+hmod2*(p-10.*hp0)*(p-10.*hp0)/2000.; + } + break; + default: + printf("Bad choice of hardening law in j2hard: %d\n",htype); + break; + } return eP; } #endif @@ -303,14 +493,15 @@ void EP_Material::print(){ printf("J2 elasto-plasticity\n"); printf("Young modulus: %lf, Poisson ratio: %lf\n", E, nu); - printf("Intial yield stress: %lf, hardening law: %d, hardening coefficients: %lf\t%lf\t%lf\n", sy0, htype,hmod1,hmod2,hexp); + printf("Intial yield stress: %lf, hardening law: %d, hardening coefficients: %lf\t%lf\t%lf\t%lf\n", sy0, htype,hmod1,hmod2,hp0,hexp); if(dam){ dam->print();} if(clength){clength->print();} } //constbox //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** -void EP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void EP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ + } //****************************************************** //costboxSecant @@ -348,6 +539,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, void EP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt){ + } // end of constbox_2ndNtr() @@ -360,6 +552,7 @@ void EP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, do void EP_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ + } //end of consbox_2order @@ -370,11 +563,39 @@ void EP_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* st void EP_Material::get_refOp(double* statev, double** C, int kinc, int kstep){ + double twomu, threekappa, D; + + if(kinc<2 && kstep==1){ + get_elOp(C); + } + //if(kinc<2 ){ + //get_elOD(statev,C); + //} + else{ + twomu = statev[pos_twomu]; + threekappa = E/(1.-2.*nu); + + + if(dam){ //*********add by wu ling + D = statev[pos_dam+2]; //***********13.04.2011******** + twomu = twomu*(1-D); + threekappa = threekappa*(1-D); + } + makeiso(threekappa/3.,twomu/2.,C); + } } void EP_Material::get_elOD(double* statev, double** Cel) { + get_elOp(Cel); + if(dam) + { + double damage = statev[pos_dam+2]; + for(int i=0; i < 6; i++) + for(int j=0; j < 6; j++) + Cel[i][j]*=1.-damage; + } } @@ -385,6 +606,46 @@ void EP_Material::get_elOp(double** Cel){ void EP_Material::unload_step(double* dstrn,double* strs_n, double* statev_n, int kinc, int kstep){ + if(kinc == 1 && kstep==1){ + return; + } + + int i,error; + static double **C0=NULL; + static double **invC0=NULL; + static double *strs=NULL; + static double *udstrn=NULL; + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&invC0,6,6); + mallocvector(&strs,6); + mallocvector(&udstrn,6); + } + cleartens4(C0); + cleartens4(invC0); + cleartens2(strs); + cleartens2(udstrn); + + + + get_elOD(statev_n, C0); + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in unload_step of MTSecF\n"); + + copyvect(&statev_n[pos_strs], strs, 6); //stress in at tn + contraction42(invC0, strs, udstrn); //unloading strain of composite at tn + + // update statev_n to keep the imformation for residual condition + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- udstrn[i]; //residual strain + statev_n[pos_dstrn +i]= dstrn[i]+ udstrn[i]; // strain increment in composte + + dstrn[i]= statev_n[pos_dstrn +i]; + } } @@ -392,11 +653,109 @@ void EP_Material::unload_step(double* dstrn,double* strs_n, double* statev_n, in //******************* Stochastic EP ************************* //Stochastic RATE-INDEPENDENT ELASTO-PLASTICITY -//PROPS: MODEL, iddam, E, nu, sy0, htype, hmod1, (hmod2), hexp +//PROPS: MODEL, iddam, E, nu, sy0, htype, hmod1, (hmod2, hp0), hexp //STATEV: strn, strs, dstrn, pstrn, p, dp, 2*mu_iso //************************************************************** //constructor EP_Stoch_Material::EP_Stoch_Material(double* props, int idmat):Material(props, idmat){ + int k; + int iddam, idclength, Flag_stoch ; + + iddam = (int)props[idmat+1]; + idclength = (int)props[idmat+2]; + + k=idmat+3; + _E = props[k++]; + _nu = props[k++]; + _sy0 = props[k++]; + htype = (int) props[k++]; + _hmod1 = props[k++]; + + //hardening models with two hardening moduli + if(htype==H_LINEXP) + { + _hmod2 = props[k++]; + _hp0 = 0.; + } + else if(htype==H_POW_EXTRAPOL){ + _hmod2 = props[k++]; + _hp0 = props[k++]; + } + else{ + _hmod2 = 0.; + _hp0 = 0.; + } + _hexp = props[k]; + + nsdv = 28; + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_pstrn=18; + pos_p = 24; + pos_dp = 25; + pos_twomu = 26; + pos_eqstrs = 27; + + if(_E < 1.0e-6){ + pos_E = nsdv; + nsdv += 1;} + else{ pos_E = 0; } + + if(_nu < 1.0e-6){ + pos_nu = nsdv; + nsdv += 1;} + else{ pos_nu = 0; } + + if(_sy0 < 1.0e-6){ + pos_sy0 = nsdv; + nsdv += 1;} + else{ pos_sy0 = 0; } + + if(_hmod1 < 1.0e-6){ + pos_hmod1 = nsdv; + nsdv += 1; } + else{ pos_hmod1 = 0;} + + if((htype==H_LINEXP || htype==H_POW_EXTRAPOL) && (_hmod2 < 1.0e-6)){ + pos_hmod2 = nsdv; + nsdv += 1; + } + else{ pos_hmod2 = 0;} + + if((htype==H_POW_EXTRAPOL) && (_hp0 < 1.0e-6)){ + pos_hp0 = nsdv; + nsdv += 1; + } + else{ pos_hp0 = 0;} + + + if(_hexp < 1.0e-6){ + pos_hexp = nsdv; + nsdv += 1; } + else{ pos_hexp = 0;} + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + nsdv += dam->get_nsdv(); + Flag_stoch = dam->get_pos_DamParm1(); + + if(Flag_stoch > 0){ + pos_DamParm1 = pos_dam + dam->get_pos_DamParm1(); + pos_DamParm2 = pos_dam + dam->get_pos_DamParm2(); + } + else{ + pos_DamParm1 = 0; + pos_DamParm2 = 0; + } + } + else{ + pos_DamParm1 = 0; + pos_DamParm2 = 0; + } + + clength = init_clength(props,idclength); } @@ -434,6 +793,26 @@ int EP_Stoch_Material::get_pos_damagefornonlocal() const double EP_Stoch_Material::getElasticEnergy (double* statev) { double eE = 0.; + int i; + static double* strn = NULL; + static double* pstrn = NULL; + static double* strs = NULL; + //static double**CelD = NULL; + if(strn == NULL) + { + mallocvector(&strn,6); + mallocvector(&pstrn,6); + mallocvector(&strs,6); + } + cleartens2(strn); + cleartens2(pstrn); + cleartens2(strs); + + copyvect(&(statev[pos_strn]), strn,6); + copyvect(&(statev[pos_pstrn]),pstrn,6); + copyvect(&statev[pos_strs], strs, 6); + //enegry due to damage has been removed + for (i =0; i< 6; i++) eE+=0.5*(strs[i]*(strn[i]-pstrn[i])); return eE; } @@ -441,21 +820,94 @@ double EP_Stoch_Material::getElasticEnergy (double* statev) double EP_Stoch_Material::getPlasticEnergy (double* statev) { double eP = 0.; + double p = statev[get_pos_currentplasticstrainfornonlocal()]; + double sy0, hexp, hmod1, hmod2, hp0; + if(pos_sy0 != 0) sy0 = statev[pos_sy0]; + else sy0 = _sy0; + + if(pos_hexp != 0) hexp = statev[pos_hexp]; + else hexp = _hexp; + + if(pos_hmod1 != 0) hmod1 = statev[pos_hmod1]; + else hmod1 = _hmod1; + + if(pos_hmod2 != 0) hmod2 = statev[pos_hmod2]; + else hmod2 = _hmod2; + + if(pos_hp0 != 0) hp0 = statev[pos_hp0]; + else hp0 = _hp0; + + eP = sy0*p; + switch(htype) { + //POWER LAW HARDENING + case H_POW: + if(fabs(hexp+1.)!=0) + eP+= hmod1*pow(p,hexp+1.)/(hexp+1.); + break; + //EXPONENTIAL HARDENING + case H_EXP: + eP+=hmod1*p; + if(fabs(hexp)!=0) eP+=hmod1*(exp(-hexp*p)-exp(0))/(hexp); + break; + //SWIFT LAW + case H_SWIFT: + eP-=sy0*p; + if(fabs(hexp+1.)!=0 && fabs(hmod1)!=0.) eP+=sy0*pow(1.+hmod1*p,hexp+1.)/(hexp+1.)/hmod1; + break; + //LINEAR-EXPONENTIAL HARDENING + case H_LINEXP: + eP+=hmod1*p*p/2.+hmod2*p; + if(fabs(hexp)!=0) eP+=hmod2*(exp(-hexp*p)-exp(0))/(hexp); + break; + //POWER LAW HARDENING EXTRAPOLATED AFTER 16% DEFO TO MIMIC DIGIMAT TO ABAQUS + case H_POW_EXTRAPOL: + if(p<hp0) + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(p,hexp+1.)/(hexp+1.); + } + else if(p<10.*hp0) + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(hp0,hexp+1.)/(hexp+1.); + eP+=hmod1*pow(hp0,hexp+1.)*(p-hp0)+hmod2*(p-hp0)*(p-hp0)/2.; + } + else + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(hp0,hexp+1.)/(hexp+1.); + eP+=hmod1*pow(hp0,hexp+1.)*(10.*hp0-hp0)+hmod2*(10.*hp0-hp0)*(10.*hp0-hp0)/2.; + eP+=(hmod1*pow(hp0,hexp+1.)+hmod2*(10.*hp0-hp0))*(p-10.*hp0)+hmod2*(p-10.*hp0)*(p-10.*hp0)/2000.; + } + break; + default: + printf("Bad choice of hardening law in j2hard: %d\n",htype); + break; + } return eP; } #endif //destructor EP_Stoch_Material::~EP_Stoch_Material(){ + if(dam) delete dam; + if(clength) delete clength; } //print void EP_Stoch_Material::print(){ + printf("Stochastic J2 elasto-plasticity\n"); + printf("Young modulus: %lf, Poisson ratio: %lf\n", _E, _nu); + printf("Intial yield stress: %lf, hardening law: %d, hardening coefficients: %lf\t%lf\t%lf\t%lf\n", _sy0, + htype,_hmod1,_hmod2,_hp0,_hexp); + if(dam){ dam->print();} + if(clength){clength->print();} } //constbox //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** -void EP_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void EP_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ + } //****************************************************** @@ -464,6 +916,7 @@ void EP_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, d void EP_Stoch_Material::constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ + } //end of costboxSecant @@ -474,6 +927,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, + } //end of costboxSecant @@ -484,6 +938,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, void EP_Stoch_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt){ + } // end of constbox_2ndNtr() @@ -495,35 +950,183 @@ void EP_Stoch_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_ void EP_Stoch_Material::get_refOp(double* statev, double** C, int kinc, int kstep){ + double twomu, threekappa, D; + double E, nu; + + if(pos_E != 0) E = statev[pos_E]; + else E = _E; + + if(pos_nu != 0) nu = statev[pos_nu]; + else nu = _nu; + + if(kinc<2 && kstep==1){ + get_elOp(statev, C); + } + //if(kinc<2 ){ + //get_elOD(statev,C); + //} + else{ + twomu = statev[pos_twomu]; + threekappa = E/(1.-2.*nu); + + + if(dam){ //*********add by wu ling + D = statev[pos_dam+2]; //***********13.04.2011******** + twomu = twomu*(1-D); + threekappa = threekappa*(1-D); + } + makeiso(threekappa/3.,twomu/2.,C); + } } void EP_Stoch_Material::get_elOD(double* statev, double** Cel) { + get_elOp(statev, Cel); + if(dam) + { + double damage = statev[pos_dam+2]; + for(int i=0; i < 6; i++) + for(int j=0; j < 6; j++) + Cel[i][j]*=1.-damage; + } } void EP_Stoch_Material::get_elOp(double* statev, double** Cel){ + double E, nu; + if(pos_E != 0) E = statev[pos_E]; + else E = _E; + + if(pos_nu != 0) nu = statev[pos_nu]; + else nu = _nu; + + compute_Hooke(E,nu,Cel); } void EP_Stoch_Material::get_elOp(double** Cel) { - printf("function get_elOp(double** Cel) is not defined for stochastic materials"); + compute_Hooke(_E,_nu,Cel); } void EP_Stoch_Material::unload_step(double* dstrn,double* strs_n, double* statev_n, int kinc, int kstep){ + if(kinc == 1 && kstep==1){ + return; + } + + int i,error; + static double **C0=NULL; + static double **invC0=NULL; + static double *strs=NULL; + static double *udstrn=NULL; + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&invC0,6,6); + mallocvector(&strs,6); + mallocvector(&udstrn,6); + } + cleartens4(C0); + cleartens4(invC0); + cleartens2(strs); + cleartens2(udstrn); + + + + get_elOD(statev_n, C0); + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in unload_step of MTSecF\n"); + + copyvect(&statev_n[pos_strs], strs, 6); //stress in at tn + contraction42(invC0, strs, udstrn); //unloading strain of composite at tn + + // update statev_n to keep the imformation for residual condition + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- udstrn[i]; //residual strain + statev_n[pos_dstrn +i]= dstrn[i]+ udstrn[i]; // strain increment in composte + + dstrn[i]= statev_n[pos_dstrn +i]; + } + } //**************************************************************************************** //**** RATE-DEPENDENT elasto-viscoplastic material ************************************ -//PROPS: MODEL, iddam, E, nu, sy0, htype, hmod1, (hmod2), hexp, viscmodel, vmod, vexp +//PROPS: MODEL, iddam, E, nu, sy0, htype, hmod1, (hmod2, hp0), hexp, viscmodel, vmod, vexp //STATEV: strn, strs, dstrn, pstrn, p, dp, 2*mu_iso //**************************************************************************************** //constructor EVP_Material::EVP_Material(double* props, int idmat):Material(props, idmat){ + int k; + int iddam, idclength; + + + iddam = (int)props[idmat+1]; + idclength = (int)props[idmat+2]; + + k=idmat+3; + E = props[k++]; + nu = props[k++]; + sy0 = props[k++]; + htype = (int) props[k++]; + hmod1 = props[k++]; + + //hardening models with two hardening moduli + if(htype==H_LINEXP) { + hmod2 = props[k++]; + hp0 = 0.; + } + else if(htype==H_POW_EXTRAPOL){ + hmod2 = props[k++]; + hp0 = props[k++]; + } + else{ + hmod2 = 0.; + hp0 = 0.; + } + hexp = props[k++]; + + viscmodel = (int) props[k++]; + vmod = props[k++]; + vexp = props[k++]; + if(viscmodel == V_POWER_NO_HARDENING){ + vstressy = props[k]; + } + else{ + vstressy = 0.0; + } + + nsdv = 28; + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_pstrn=18; + pos_p = 24; + pos_dp = 25; + pos_twomu = 26; + pos_eqstrs = 27; + pos_F = nsdv; + nsdv += 9; + pos_Base = nsdv; + nsdv += 9; + pos_Ja=nsdv; + nsdv += 1; + pos_Ri = nsdv; + nsdv += 9; + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + nsdv += dam->get_nsdv(); + } + + clength = init_clength(props,idclength); } @@ -561,12 +1164,82 @@ int EVP_Material::get_pos_damagefornonlocal() const double EVP_Material::getElasticEnergy (double* statev) { double eE = 0.; + int i; + static double* strn = NULL; + static double* pstrn = NULL; + static double* strs = NULL; + //static double**CelD = NULL; + if(strn == NULL) + { + mallocvector(&strn,6); + mallocvector(&pstrn,6); + mallocvector(&strs,6); + // mallocmatrix(&CelD,6,6); + } + cleartens2(strn); + cleartens2(pstrn); + cleartens2(strs); + + copyvect(&(statev[pos_strn]), strn,6); + copyvect(&(statev[pos_pstrn]),pstrn,6); + copyvect(&statev[pos_strs], strs, 6); + //enegry due to damage has been removed + for (i =0; i< 6; i++) eE+=0.5*(strs[i]*(strn[i]-pstrn[i])); + return eE; } double EVP_Material::getPlasticEnergy (double* statev) { double eP = 0.; + double p = statev[get_pos_currentplasticstrainfornonlocal()]; + eP = sy0*p; + switch(htype) { + //POWER LAW HARDENING + case H_POW: + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(p,hexp+1.)/(hexp+1.); + break; + //EXPONENTIAL HARDENING + case H_EXP: + eP+=hmod1*p; + if(fabs(hexp)!=0) eP+=hmod1*(exp(-hexp*p)-exp(0))/(hexp); + break; + //SWIFT LAW + case H_SWIFT: + eP-=sy0*p; + if(fabs(hexp+1.)!=0 && fabs(hmod1)!=0.) eP+=sy0*pow(1.+hmod1*p,hexp+1.)/(hexp+1.)/hmod1; + break; + //LINEAR-EXPONENTIAL HARDENING + case H_LINEXP: + eP+=hmod1*p*p/2.+hmod2*p; + if(fabs(hexp)!=0) eP+=hmod2*(exp(-hexp*p)-exp(0))/(hexp); + break; + //POWER LAW HARDENING EXTRAPOLATED AFTER 16% DEFO TO MIMIC DIGIMAT TO ABAQUS + case H_POW_EXTRAPOL: + if(p<hp0) + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(p,hexp+1.)/(hexp+1.); + } + else if(p<10.*hp0) + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(hp0,hexp+1.)/(hexp+1.); + eP+=hmod1*pow(hp0,hexp+1.)*(p-hp0)+hmod2*(p-hp0)*(p-hp0)/2.; + } + else + { + if(fabs(hexp+1.)!=0) + eP+=hmod1*pow(hp0,hexp+1.)/(hexp+1.); + eP+=hmod1*pow(hp0,hexp+1.)*(10.*hp0-hp0)+hmod2*(10.*hp0-hp0)*(10.*hp0-hp0)/2.; + eP+=(hmod1*pow(hp0,hexp+1.)+hmod2*(10.*hp0-hp0))*(p-10.*hp0)+hmod2*(p-10.*hp0)*(p-10.*hp0)/2000.; + } + break; + default: + printf("Bad choice of hardening law in j2hard: %d\n",htype); + break; + } return eP; } #endif @@ -582,14 +1255,15 @@ void EVP_Material::print(){ printf("J2 elasto-ViscoPlasticity\n"); printf("Young modulus: %lf, Poisson ratio: %lf\n", E, nu); - printf("Intial yield stress: %lf, hardening law: %d, hardening coefficients: %lf\t%lf\t%lf\n", sy0, htype,hmod1,hmod2,hexp); + printf("Intial yield stress: %lf, hardening law: %d, hardening coefficients: %lf\t%lf\t%lf\t%lf\t%lf\n", sy0, htype,hmod1,hmod2,hp0, hp0,hexp); printf("ViscoPlastic function: %d, ViscoPlastic coefficients: %lf\t%lf\n", viscmodel, vmod, vexp); if(dam){ dam->print();} if(clength){clength->print();} } //constbox //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar **************** -void EVP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void EVP_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ + } //****************************************************** @@ -598,6 +1272,7 @@ void EVP_Material::constbox(double* dstrn, double* strs_n, double* strs, double void EVP_Material::constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ + } //end of costboxSecant @@ -617,6 +1292,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, void EVP_Material::constbox_2ndNtr(double *DE, double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, ELcc* LCC, EPR* epresult, double alpha, double** c_g, int kinc, int kstep, double dt){ + } // end of constbox_2ndNtr() @@ -640,7 +1316,7 @@ double* dnu, double &dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, void EVP_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ - + } //end of consbox_2order @@ -652,11 +1328,39 @@ void EVP_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* s void EVP_Material::get_refOp(double* statev, double** C, int kinc, int kstep){ + double twomu, threekappa, D; + + if(kinc<2 && kstep==1){ + get_elOp(C); + } + //if(kinc<2 ){ + //get_elOD(statev,C); + //} + else{ + twomu = statev[pos_twomu]; + threekappa = E/(1.-2.*nu); + + + if(dam){ + D = statev[pos_dam+2]; + twomu = twomu*(1-D); + threekappa = threekappa*(1-D); + } + makeiso(threekappa/3.,twomu/2.,C); + } } void EVP_Material::get_elOD(double* statev, double** Cel) { + get_elOp(Cel); + if(dam) + { + double damage = statev[pos_dam+2]; + for(int i=0; i < 6; i++) + for(int j=0; j < 6; j++) + Cel[i][j]*=1.-damage; + } } @@ -667,6 +1371,53 @@ void EVP_Material::get_elOp(double** Cel){ void EVP_Material::unload_step(double* dstrn,double* strs_n, double* statev_n, int kinc, int kstep){ + if(kinc == 1 && kstep==1){ + return; + } + + int i,error; + static double **C0 =NULL; + static double **invC0=NULL; + + static double *strs=NULL; + static double *udstrn=NULL; + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&invC0,6,6); + mallocvector(&strs,6); + mallocvector(&udstrn,6); + } + cleartens4(C0); + cleartens4(invC0); + cleartens2(strs); + cleartens2(udstrn); + + + get_elOD(statev_n, C0); + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in unload_step of MTSecF\n"); + + copyvect(&statev_n[pos_strs], strs, 6); //stress in at tn + contraction42(invC0, strs, udstrn); //unloading strain of composite at tn + + // update statev_n to keep the imformation for residual condition + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- udstrn[i]; //residual strain + statev_n[pos_dstrn +i]= dstrn[i]+ udstrn[i]; // strain increment in composte + + dstrn[i]= statev_n[pos_dstrn +i]; + } + + + //freematrix(C0,6); + //freematrix(invC0,6); + + //free(strs); + //free(udstrn); } @@ -682,6 +1433,42 @@ void EVP_Material::unload_step(double* dstrn,double* strs_n, double* statev_n, i //constructor VT_Material::VT_Material(double* props, int idmat):Material(props, idmat){ + int i,idmat_i,idtop_i,k; + int iddam, idclength; + + nsdv=18; + iddam = (int) props[idmat+1]; + idclength = (int)props[idmat+2]; + Nph = (int) props[idmat+3]; + mat = (Material**) malloc(Nph*sizeof(Material*)); + mallocvector(&vf,Nph); + + k=idmat+4; + + for(i=0;i<Nph;i++){ + idmat_i = (int)props[k++]; + idtop_i = (int)props[k++]; + + mat[i] = init_material(props,idmat_i); + vf[i] = props[idtop_i]; + nsdv += mat[i]->get_nsdv(); + } + + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + + pos_p = 0; // defined by Ling Wu for the input of clength->creat_cg, which is not implemented for this material + + + dam = init_damage(props,iddam); + if(dam){ + pos_dam=nsdv; + nsdv += dam->get_nsdv(); + } + + + clength = init_clength(props,idclength); } @@ -702,6 +1489,26 @@ int VT_Material::get_pos_damagefornonlocal() const double VT_Material::getElasticEnergy (double* statev) { double eE = 0.; + int i; + static double* strn = NULL; + static double* strs = NULL; + //static double**CelD = NULL; + //double D; + if(strn == NULL) + { + mallocvector(&strn,6); + mallocvector(&strs,6); + //mallocmatrix(&CelD,6,6); + } + cleartens2(strn); + cleartens2(strs); + copyvect(&(statev[get_pos_strn()]), strn,6); + //get_elOD(statev, CelD); + //contraction42(CelD,strn,strs); + copyvect(&statev[get_pos_strs()], strs, 6); + //neegry due to damage has been removed strn3 =eps12*sqrt2, strs3=sqrt2*strs12 + for (i =0; i< 6; i++) eE+=0.5*(strs[i]*strn[i]); + return eE; } @@ -746,7 +1553,7 @@ void VT_Material::print(){ } //constbox -void VT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void VT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ } @@ -789,6 +1596,65 @@ void VT_Material::get_elOD(double* statev, double** Cel) //constructor MT_Material::MT_Material(double* props, int idmat):Material(props,idmat){ + int idmat_m, idmat_i, idtop_i,k; + int iddam, idclength; + int i; + + nsdv=39; //18 (strn,strs,dstrn) + 21 (MT macro tangent operator) + Nph=2; + + iddam = (int) props[idmat+1]; + idclength = (int)props[idmat+2]; + k=idmat+3; + + idmat_m=(int) props[k++]; + idmat_i=(int) props[k++]; + idtop_i=(int) props[k++]; + + //create materials for each phase + mtx_mat = init_material(props,idmat_m); + icl_mat = init_material(props,idmat_i); + + //compute the total number of state variables + idsdv_m = nsdv; + idsdv_i = idsdv_m + mtx_mat->get_nsdv(); + + nsdv += mtx_mat->get_nsdv(); + nsdv += icl_mat->get_nsdv(); + + //allocate memory + mallocvector(&ar,2); + mallocvector(&euler,3); + + + + //get topology of inclusion + k=idtop_i; + vf_i = props[k++]; + ar[0] = props[k++]; + ar[1] = props[k++]; + euler[0] = props[k++]; + euler[1] = props[k++]; + euler[2] = props[k++]; + + // printf("phase prop: vi %f, AR %f %f, euler %f %f %f\n",vf_i, ar[0], ar[1], euler[0], euler[1], euler[2] ); + + + vf_m = 1.-vf_i; + //set positions of strn, strs, dstrn and tangent operator in statev vector + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_C = 18; + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + nsdv += dam->get_nsdv(); + } + + + clength = init_clength(props,idclength); } #ifdef NONLOCALGMSH @@ -821,14 +1687,21 @@ int MT_Material::get_pos_inc_stress () const return idsdv_i + icl_mat->get_pos_strs(); } int MT_Material::get_pos_mtx_strain () const -{ +{ return idsdv_m + mtx_mat->get_pos_strn(); } int MT_Material::get_pos_inc_strain () const { return idsdv_i + icl_mat->get_pos_strn(); } - +int MT_Material::get_pos_mtx_Dam () const +{ + return idsdv_m + mtx_mat->get_pos_dam(); +} +int MT_Material::get_pos_inc_Dam () const +{ + return idsdv_i + icl_mat->get_pos_dam(); +} double MT_Material::getElasticEnergy (double* statev) { double eEi = icl_mat->getElasticEnergy(&statev[idsdv_i]); @@ -883,7 +1756,7 @@ void MT_Material::print(){ } //constbox ************* new tensor added by wu ling: double* dpdE, double* strs_dDdp_bar 13.04.2011 -void MT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) @@ -892,17 +1765,188 @@ void MT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* void MT_Material::get_refOp(double* statev, double** C, int kinc, int kstep){ + int i,j,k; + + if(kinc < 2 && kstep==1){ + get_elOp(C); + } + else{ + k=pos_C; + for(i=0;i<6;i++){ + for(j=i;j<6;j++){ + C[i][j] = statev[k++]; + C[j][i] = C[i][j]; + } + } + } } void MT_Material::get_elOp(double** Cel){ + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **invC0=NULL; + static double **C0_loc=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1=NULL; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&invC0,6,6); + mallocmatrix(&C0_loc,6,6); + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(invC0); + cleartens4(C0_loc); + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOp(C0); + icl_mat->get_elOp(C1); + + //if fibers not oriented with e3: + if ( (ar[0] != 1 || ar[1] != 1) && (fabs(euler[0]) > 1e-3 || fabs(euler[1]) > 1e-3)){ + + eul_mat(euler, R66); + rot4(R66,C0,C0_loc); + eshelby(C0_loc,ar[0],ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,R66,6,6); + rot4(R66,mat1,S); + + + } + else{ + eshelby(C0,ar[0],ar[1],S); + } + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in compute_elOp of MT\n"); + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,vf_m,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in compute_elOp of MT\n"); + + + addtens4(1.,C1,-1.,C0,mat1); + contraction44(mat1,A,Cel); + addtens4(1.,C0,vf_i,Cel,Cel); + } // Cel with damaged matrix and inclusion, add by Ling WU June 2012 void MT_Material::get_elOD(double* statev, double** Cel) { + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **invC0=NULL; + static double **C0_loc=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1=NULL; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&invC0,6,6); + mallocmatrix(&C0_loc,6,6); + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(invC0); + cleartens4(C0_loc); + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOD(&(statev[idsdv_m]), C0); + icl_mat->get_elOD(&(statev[idsdv_i]), C1); + + //if fibers not oriented with e3: + if ( (ar[0] != 1 || ar[1] != 1) && (fabs(euler[0]) > 1e-3 || fabs(euler[1]) > 1e-3)){ + + eul_mat(euler, R66); + rot4(R66,C0,C0_loc); + eshelby(C0_loc,ar[0],ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,R66,6,6); + rot4(R66,mat1,S); + + + } + else{ + eshelby(C0,ar[0],ar[1],S); + } + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in compute_elOp of MT\n"); + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,vf_m,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in compute_elOp of MT\n"); + + + addtens4(1.,C1,-1.,C0,mat1); + contraction44(mat1,A,Cel); + addtens4(1.,C0,vf_i,Cel,Cel); + + //freematrix(C0,6); + //freematrix(C1,6); + //freematrix(invC0,6); + //freematrix(C0_loc,6); + //freematrix(A,6); + //freematrix(invA,6); + //freematrix(S,6); + //freematrix(R66,6); + //freematrix(I,6); + //freematrix(mat1,6); } @@ -934,10 +1978,9 @@ MTSecF_Material::~MTSecF_Material(){ //********************************************* //unloading is carried out at each iteration -void MTSecF_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MTSecF_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - } @@ -947,18 +1990,162 @@ void MTSecF_Material::constbox(double* dstrn, double* strs_n, double* strs, dou void MTSecF_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, int kinc, int kstep){ + if(kinc == 1 && kstep==1){ + return; + } -} + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **Cel=NULL; + static double **C0_loc=NULL; + static double **invC0=NULL; + static double **invCel=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1=NULL; + + static double *strs_c=NULL; + static double *dstrs_m=NULL; + static double *dstrs_i=NULL; + static double *dstrn_c=NULL; + static double *dstrn_m=NULL; + static double *dstrn_i=NULL; + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&Cel,6,6); + mallocmatrix(&C0_loc,6,6); + + mallocmatrix(&invC0,6,6); + mallocmatrix(&invCel,6,6); + + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&strs_c,6); + mallocvector(&dstrs_m,6); + mallocvector(&dstrs_i,6); + mallocvector(&dstrn_c,6); + mallocvector(&dstrn_m,6); + mallocvector(&dstrn_i,6); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(Cel); + cleartens4(C0_loc); + + cleartens4(invC0); + cleartens4(invCel); + + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + cleartens2(strs_c); + cleartens2(dstrs_m); + cleartens2(dstrs_i); + cleartens2(dstrn_c); + cleartens2(dstrn_m); + cleartens2(dstrn_i); + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } -//************************************************************************************************************************************************** -// COMPOSITE - MORI-TANAKA -//*******modified by Ling wu for second moment for Ntr-- Feb 2014 -//PROPS: MODEL, IDDAM, Nph=2, IDMAT matrix, IDMAT inclusion, IDTOP inclusion, -// (material properties of each phase), topology of inclusion: vf, ar1, ar2, 3 euler angles -//STATEV: strn, strs, dstrn, MT macro operator (21 components - symmetric), MT Elastic operator (21 components - symmetric), (statev of each phase) -//*************************************************************************************************************************************************** -// -//constructor + mtx_mat->get_elOD(&(statev_n[idsdv_m]), C0); + icl_mat->get_elOD(&(statev_n[idsdv_i]), C1); + + get_elOD(statev_n, Cel); + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in unload_step of MTSecF\n"); + + inverse(Cel,invCel,&error,6); + if(error!=0) printf("problem while inversing Cel in unload_step of MTSecF\n"); + + //if fibers not oriented with e3: + if ( (ar[0] != 1.0 || ar[1] != 1.0) && (fabs(euler[0]) > 1e-3 || fabs(euler[1]) > 1e-3)){ + + eul_mat(euler, R66); + rot4(R66,C0,C0_loc); + eshelby(C0_loc,ar[0],ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,R66,6,6); + rot4(R66,mat1,S); + } + else{ + eshelby(C0,ar[0],ar[1],S); + } + + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,vf_m,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in unload_step of MT\n"); + + + copyvect(&(statev_n[pos_strs]), strs_c, 6); //stress in composite at tn + contraction42(invCel, strs_c, dstrn_c); //unloading strain of composite at tn + contraction42(A, dstrn_c, dstrn_i); //unloading strain of inclusion at tn + addtens2 (1./vf_m, dstrn_c, -1.*vf_i/vf_m, dstrn_i, dstrn_m); //unloading strain of matrix at tn + + contraction42(C1, dstrn_i, dstrs_i); //unloading stress of inclusion at tn + contraction42(C0, dstrn_m, dstrs_m); //unloading stress of matrix at tn + + // update statev_n to keep the imformation for residual condition + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress in composte is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- dstrn_c[i]; //residual strain in composte + statev_n[pos_dstrn +i]= dstrn[i]+ dstrn_c[i]; // strain increment in composte + + dstrn[i]= statev_n[pos_dstrn +i]; + +#if Crmatrix_1st==1 + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]-dstrs_m[i]; //residual stress in marix +#else + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= 0.0; +#endif + statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]-dstrn_m[i]; //residual strain in marix + +#if Crinclusion==1 + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= statev_n[idsdv_i + icl_mat->get_pos_strs()+i]-dstrs_i[i]; //residual stress in inclusion +#else + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= 0.0; +#endif + + statev_n[idsdv_i + icl_mat->get_pos_strn()+i]= statev_n[idsdv_i + icl_mat->get_pos_strn()+i]-dstrn_i[i]; //residual strain in inclusion + } + + + +} + + +//************************************************************************************************************************************************** +// COMPOSITE - MORI-TANAKA +//*******modified by Ling wu for second moment for Ntr-- Feb 2014 +//PROPS: MODEL, IDDAM, Nph=2, IDMAT matrix, IDMAT inclusion, IDTOP inclusion, +// (material properties of each phase), topology of inclusion: vf, ar1, ar2, 3 euler angles +//STATEV: strn, strs, dstrn, MT macro operator (21 components - symmetric), MT Elastic operator (21 components - symmetric), (statev of each phase) +//*************************************************************************************************************************************************** +// +//constructor MTSecNtr_Material::MTSecNtr_Material(double* props, int idmat):MT_Material(props,idmat){ malloc_lcc(&LCC, Nph, vf_i); @@ -974,10 +2161,11 @@ MTSecNtr_Material::~MTSecNtr_Material(){ //********************************************* //unloading is carried out at each iteration -void MTSecNtr_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MTSecNtr_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) + } @@ -987,6 +2175,198 @@ void MTSecNtr_Material::constbox(double* dstrn, double* strs_n, double* strs, d void MTSecNtr_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, int kinc, int kstep){ + //get value of mu kappa for LCC and C0 C1 + mtx_mat->get_elOD(&(statev_n[idsdv_m]), LCC.C0); + icl_mat->get_elOD(&(statev_n[idsdv_i]), LCC.C1); + + LCC.mu[0] = LCC.C0[3][3]/2.0; + LCC.mu[1] = LCC.C1[3][3]/2.0; + + LCC.kappa[0] = LCC.C0[0][1] + LCC.C0[3][3]/3.0; + LCC.kappa[1] = LCC.C1[0][1] + LCC.C1[3][3]/3.0; + + int i,j,error; + static double **invC0=NULL; + static double **invCel=NULL; + static double **invA=NULL;; + static double **S=NULL; + static double **dS=NULL; + static double **ddS=NULL; + static double **I=NULL; + static double **Idev=NULL; + static double **mat1=NULL; + + static double *strs_c=NULL; + static double *dstrs_m=NULL; + static double *dstrs_i=NULL; + static double *dstrn_c=NULL; + static double *dstrn_m=NULL; + static double *dstrn_i=NULL; + + static double *dnu=NULL; + + double deqstrs2_m, number; //square of incremental vm equivalent stress in matrix and inclusion + double eqstrs2_m; // vm equivalent stress in matrix and inclusion + static double *dstrs_dev=NULL; + static double *vec1=NULL; + + static double *strs_rmdev=NULL; + if(invC0==NULL) + { + mallocmatrix(&invC0,6,6); + mallocmatrix(&invCel,6,6); + + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&dS,6,6); + mallocmatrix(&ddS,6,6); + + mallocmatrix(&I,6,6); + mallocmatrix(&Idev,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&strs_c,6); + mallocvector(&dstrs_m,6); + mallocvector(&dstrs_i,6); + mallocvector(&dstrn_c,6); + mallocvector(&dstrn_m,6); + mallocvector(&dstrn_i,6); + + mallocvector(&dnu,5); + + mallocvector(&dstrs_dev,6); + mallocvector(&vec1,6); + + mallocvector(&strs_rmdev,6); + } + cleartens4(invC0); + cleartens4(invCel); + + cleartens4(invA); + cleartens4(S); + cleartens4(dS); + cleartens4(ddS); + + cleartens4(I); + cleartens4(Idev); + cleartens4(mat1); + + cleartens2(strs_c); + cleartens2(dstrs_m); + cleartens2(dstrs_i); + cleartens2(dstrn_c); + cleartens2(dstrn_m); + cleartens2(dstrn_i); + + for(i=0;i<5;i++) dnu[i]=0.; + + cleartens2(dstrs_dev); + cleartens2(vec1); + + cleartens2(strs_rmdev); + + for(i=0;i<3;i++){ + Idev[i][i]=1.; + Idev[i+3][i+3]=1.; + I[i][i]=1.; + I[i+3][i+3]=1.; + for(j=0;j<3;j++){ + Idev[i][j]=Idev[i][j]-1./3.; + } + } + + + + Eshelby(LCC.C0, ar, euler, S, dS, ddS, dnu); + CA_dCdA_MT(&LCC, vf_i, S, dS, dnu); + + + for(i=0;i<6;i++){ + LCC.strs_n[i] = statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]; + LCC.dstrnf[i] = dstrn[i]; + LCC.dstrn_m[i] = statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]; + } + + if(kinc == 1 && kstep==1){ + if (mtx_mat->eqstrs_exist()){ + statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()] = 0.0; + } + return; + } + + + inverse(LCC.C,invCel,&error,6); + if(error!=0) printf("problem while inversing Cel in unload_step of MTSecSd\n"); + + copyvect(&(statev_n[pos_strs]), strs_c, 6); //stress in composite at tn + contraction42(invCel, strs_c, dstrn_c); //unloading strain of composite at tn + contraction42(LCC.A, dstrn_c, dstrn_i); //unloading strain of inclusion at tn + addtens2 (1./vf_m, dstrn_c, -1.*vf_i/vf_m, dstrn_i, dstrn_m); //unloading strain of matrix at tn + + contraction42(LCC.C1, dstrn_i, dstrs_i); //unloading stress of inclusion at tn + contraction42(LCC.C0, dstrn_m, dstrs_m); //unloading stress of matrix at tn + + + // update statev_n to keep the imformation for residual condition + contraction42(Idev, &(statev_n[idsdv_m + mtx_mat->get_pos_strs()]), strs_rmdev); + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress in composte is 0 + + statev_n[pos_strn +i]= statev_n[pos_strn +i]- dstrn_c[i]; //residual strain in composte + statev_n[pos_dstrn +i]= dstrn[i]+ dstrn_c[i]; // strain increment in composte + + + dstrn[i]= statev_n[pos_dstrn +i]; + + // printf("stressM=%lf\n",statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]); + + // printf("stressI=%lf\n",statev_n[idsdv_i + icl_mat->get_pos_strs()+i]); +#if Crmatrix_2nd==1 + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]-dstrs_m[i]; //residual stress in marix +#else + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= 0.; //residual +#endif + // printf("stress_Mres= %lf\n",statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]); + statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]-dstrn_m[i]; //residual strain in marix +#if Crinclusion==1 + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= statev_n[idsdv_i + icl_mat->get_pos_strs()+i]-dstrs_i[i]; //residual stress in inclusion +#else + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= 0.; //residual +#endif + // printf("stressIres=%lf\n",statev_n[idsdv_i + icl_mat->get_pos_strs()+i]); + statev_n[idsdv_i + icl_mat->get_pos_strn()+i]= statev_n[idsdv_i + icl_mat->get_pos_strn()+i]-dstrn_i[i]; //residual strain in inclusion + } + + + +//compute the second-moment equivalent stress (eqstrs) in eacher phases +//1. in matrix + + if (mtx_mat->eqstrs_exist()){ + + contraction42(Idev, dstrs_m, dstrs_dev); + contraction42(LCC.dCdmu0,dstrn_c,vec1); + deqstrs2_m =(contraction22(dstrn_c,vec1))*3.0*LCC.mu[0]*LCC.mu[0]/vf_m; + + eqstrs2_m = statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()]; + // if(contraction22(dstrs_dev,strs_rmdev)>0) + // number= eqstrs2_m + deqstrs2_m - 3.0*contraction22(dstrs_dev,strs_rmdev); + // else + number= eqstrs2_m-deqstrs2_m; + //for 0-incr.residual method either put number at 0 or scheme 1 in j2plast + //here we use the assumption + number=0.; + statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()] = number; + //printf("number= %f\n", number); + + /* if(contraction22(dstrs_dev,strs_rmdev)<0){ + statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()] = 0.0;} + if(contraction22(dstrs_dev,strs_rmdev)==0){ + statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()] = 0.0;}*/ + } + } //************************************************************************************************************************************************** @@ -1016,9 +2396,9 @@ MTSecSd_Material::~MTSecSd_Material(){ //********************************************* //unloading is carried out at each iteration -void MTSecSd_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MTSecSd_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + } @@ -1029,6 +2409,241 @@ void MTSecSd_Material::constbox(double* dstrn, double* strs_n, double* strs, do void MTSecSd_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, int kinc, int kstep){ + if(kinc == 1 && kstep==1){ + //get value of mu kappa for LCC and C0 C1 + mtx_mat->get_elOD(&(statev_n[idsdv_m]), LCC.C0); + icl_mat->get_elOD(&(statev_n[idsdv_i]), LCC.C1); + + LCC.mu[0] = LCC.C0[3][3]/2.0; + LCC.mu[1] = LCC.C1[3][3]/2.0; + + if (mtx_mat->eqstrs_exist()){ + statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()] = max(statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()],0.0); + } + if (icl_mat->eqstrs_exist()){ + statev_n[idsdv_i + icl_mat->get_pos_eqstrs()] = 0.0; + } + return; + } + + int i,j,error; + static double **invC0=NULL; + static double **invCel=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **dS=NULL; + static double **ddS=NULL; + static double **I=NULL; + static double **Idev=NULL; + static double **mat1=NULL; + + static double *strs_c=NULL; + static double *dstrs_m=NULL; + static double *dstrs_i=NULL; + static double *dstrn_c=NULL; + static double *dstrn_m=NULL; + static double *dstrn_i=NULL; + + static double *dnu=NULL; + + double deqstrs2_m, deqstrs2_i, number; //square of incremental vm equivalent stress in matrix and inclusion + double eqstrs_m, eqstrs_i; // vm equivalent stress in matrix and inclusion + + static double *strs_mdev=NULL; + static double *strs_idev=NULL; + static double *dstrs_dev=NULL; + static double *vec1=NULL; + + static double *strs_rmdev=NULL; + static double *strs_ridev=NULL; + + + if(invC0==NULL) + { + mallocmatrix(&invC0,6,6); + mallocmatrix(&invCel,6,6); + + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&dS,6,6); + mallocmatrix(&ddS,6,6); + + + mallocmatrix(&I,6,6); + mallocmatrix(&Idev,6,6); + mallocmatrix(&mat1,6,6); + + + mallocvector(&strs_c,6); + mallocvector(&dstrs_m,6); + mallocvector(&dstrs_i,6); + mallocvector(&dstrn_c,6); + mallocvector(&dstrn_m,6); + mallocvector(&dstrn_i,6); + + mallocvector(&dnu,5); + + mallocvector(&strs_mdev,6); + mallocvector(&strs_idev,6); + mallocvector(&dstrs_dev,6); + mallocvector(&vec1,6); + + mallocvector(&strs_rmdev,6); + mallocvector(&strs_ridev,6); + } + cleartens4(invC0); + cleartens4(invCel); + + cleartens4(invA); + cleartens4(S); + cleartens4(dS); + cleartens4(ddS); + + + cleartens4(I); + cleartens4(Idev); + cleartens4(mat1); + + + cleartens2(strs_c); + cleartens2(dstrs_m); + cleartens2(dstrs_i); + cleartens2(dstrn_c); + cleartens2(dstrn_m); + cleartens2(dstrn_i); + + for(i=0;i<5;i++) dnu[i]=0.; + + cleartens2(strs_mdev); + cleartens2(strs_idev); + cleartens2(dstrs_dev); + cleartens2(vec1); + + cleartens2(strs_rmdev); + cleartens2(strs_ridev); + + for(i=0;i<3;i++){ + Idev[i][i]=1.; + Idev[i+3][i+3]=1.; + I[i][i]=1.; + I[i+3][i+3]=1.; + for(j=0;j<3;j++){ + Idev[i][j]=Idev[i][j]-1./3.; + } + } + + + //get value of mu kappa for LCC and C0 C1 + mtx_mat->get_elOD(&(statev_n[idsdv_m]), LCC.C0); + icl_mat->get_elOD(&(statev_n[idsdv_i]), LCC.C1); + + LCC.mu[0] = LCC.C0[3][3]/2.0; + LCC.mu[1] = LCC.C1[3][3]/2.0; + + LCC.kappa[0] = LCC.C0[0][1] + LCC.C0[3][3]/3.0; + LCC.kappa[1] = LCC.C1[0][1] + LCC.C1[3][3]/3.0; + + Eshelby(LCC.C0, ar, euler, S, dS, ddS, dnu); + + CA_dCdA_MT(&LCC, vf_i, S, dS, dnu); + + inverse(LCC.C,invCel,&error,6); + if(error!=0) printf("problem while inversing Cel in unload_step of MTSecSd\n"); + + + copyvect(&(statev_n[pos_strs]), strs_c, 6); //stress in composite at tn + contraction42(invCel, strs_c, dstrn_c); //unloading strain of composite at tn + contraction42(LCC.A, dstrn_c, dstrn_i); //unloading strain of inclusion at tn + addtens2 (1./vf_m, dstrn_c, -1.*vf_i/vf_m, dstrn_i, dstrn_m); //unloading strain of matrix at tn + + contraction42(LCC.C1, dstrn_i, dstrs_i); //unloading stress of inclusion at tn + contraction42(LCC.C0, dstrn_m, dstrs_m); //unloading stress of matrix at tn + + contraction42(Idev, &(statev_n[idsdv_m + mtx_mat->get_pos_strs()]), strs_mdev); + contraction42(Idev, &(statev_n[idsdv_i + icl_mat->get_pos_strs()]), strs_idev); + + + // update statev_n to keep the imformation for residual condition + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress in composte is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- dstrn_c[i]; //residual strain in composte + statev_n[pos_dstrn +i]= dstrn[i]+ dstrn_c[i]; // strain increment in composte + + dstrn[i]= statev_n[pos_dstrn +i]; +#if Crmatrix_2nd==1 + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]-dstrs_m[i]; //residual stress in marix +#else + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= 0.; //residual +#endif + statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]-dstrn_m[i]; //residual strain in marix + +#if Crinclusion==1 + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= statev_n[idsdv_i + icl_mat->get_pos_strs()+i]-dstrs_i[i]; //residual stress in inclusion +#else + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= 0.; +#endif + statev_n[idsdv_i + icl_mat->get_pos_strn()+i]= statev_n[idsdv_i + icl_mat->get_pos_strn()+i]-dstrn_i[i]; //residual strain in inclusion + } + + contraction42(Idev, &(statev_n[idsdv_m + mtx_mat->get_pos_strs()]), strs_rmdev); + contraction42(Idev, &(statev_n[idsdv_i + icl_mat->get_pos_strs()]), strs_ridev); + +//compute the second-moment equivalent stress (eqstrs) in eacher phases +//1. in matrix + + if (mtx_mat->eqstrs_exist()){ + + contraction42(Idev, dstrs_m, dstrs_dev); + contraction42(LCC.dCdmu0,dstrn_c,vec1); + deqstrs2_m =(contraction22(dstrn_c,vec1))*3.0*LCC.mu[0]*LCC.mu[0]/vf_m; + + eqstrs_m = statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()]; + number= 0.0;//eqstrs_m-deqstrs2_m-3.0*contraction22(dstrs_dev,strs_rmdev); + + + + + //sqrt(deqstrs2_m-1.5*contraction22(dstrs_dev,dstrs_dev)); + + /* number = eqstrs_m*eqstrs_m+deqstrs2_m-3.0*contraction22(dstrs_dev,strs_mdev)-2.0* + sqrt(max(0.0,(deqstrs2_m-1.5*contraction22(dstrs_dev,dstrs_dev))* + (eqstrs_m*eqstrs_m-1.5*contraction22(strs_mdev,strs_mdev)))); + + + // number = eqstrs_m*eqstrs_m-deqstrs2_m-3.0*contraction22(dstrs_dev,strs_rmdev); + // number = max(number, 0.0); + // number= vonmises(strs_rmdev)*vonmises(strs_rmdev); + + // if(number == 0.0){ + // for(i=0; i<6; i++){ + // statev_n[idsdv_m + mtx_mat->get_pos_strs()+i] = 0.0; + // } + // }*/ + + + statev_n[idsdv_m + mtx_mat->get_pos_eqstrs()] = number; + } + + +//2. in inclusion + if (icl_mat->eqstrs_exist()){ + + contraction42(Idev, dstrs_i, dstrs_dev); + + contraction42(LCC.dCdmu1,dstrn_c,vec1); + deqstrs2_i =(contraction22(dstrn_c,vec1))*3.0*LCC.mu[1]*LCC.mu[1]/vf_i; + + eqstrs_i = statev_n[idsdv_i + icl_mat->get_pos_eqstrs()]; + // number = eqstrs_i*eqstrs_i + deqstrs2_i - 3.0*contraction22(dstrs_dev,strs_idev); + number = fabs( eqstrs_i*eqstrs_i -deqstrs2_i) ; + // number= max(number, 0.0); + statev_n[idsdv_i + icl_mat->get_pos_eqstrs()] = number;//sqrt(number); + + } + + } @@ -1041,7 +2656,29 @@ void MTSecSd_Material::unload_step(double* dstrn, double* strs_n, double* statev //constructor MTSecF_Stoch_Material::MTSecF_Stoch_Material(double* props, int idmat):MT_Material(props,idmat){ - + if (vf_i > 1.0){ + pos_vfi = nsdv; + nsdv += 1; + } + else{ + pos_vfi = 0; + } + + if (euler[0] > 180.0+1.0e-6){ + pos_euler = nsdv; + nsdv += 3; + } + else{ + pos_euler = 0; + } + + if (ar[0] < 1.0e-6){ + pos_aspR = nsdv; + nsdv += 1; + } + else{ + pos_aspR = 0; + } } //destructor @@ -1075,14 +2712,14 @@ int MTSecF_Stoch_Material::get_pos_hmod2()const if(mtx_mat->get_pos_hmod2()!= 0) return idsdv_m + mtx_mat->get_pos_hmod2(); else return 0; } -int MTSecF_Stoch_Material::get_pos_hexp()const +int MTSecF_Stoch_Material::get_pos_hp0()const { - if(mtx_mat->get_pos_hexp()!= 0) return idsdv_m + mtx_mat->get_pos_hexp(); + if(mtx_mat->get_pos_hp0()!= 0) return idsdv_m + mtx_mat->get_pos_hp0(); else return 0; } -int MTSecF_Stoch_Material::get_pos_hp0()const +int MTSecF_Stoch_Material::get_pos_hexp()const { - if(mtx_mat->get_pos_hp0()!= 0) return idsdv_m + mtx_mat->get_pos_hp0(); + if(mtx_mat->get_pos_hexp()!= 0) return idsdv_m + mtx_mat->get_pos_hexp(); else return 0; } @@ -1096,18 +2733,192 @@ int MTSecF_Stoch_Material::get_pos_DamParm2()const if(mtx_mat->get_pos_DamParm2()!= 0) return idsdv_m + mtx_mat->get_pos_DamParm2(); else return 0; } + +int MTSecF_Stoch_Material::get_pos_INCDamParm1()const +{ + if(icl_mat->get_pos_DamParm1()!= 0) return idsdv_i + icl_mat->get_pos_DamParm1(); + else return 0; +} +int MTSecF_Stoch_Material::get_pos_INCDamParm2()const +{ + if(icl_mat->get_pos_DamParm2()!= 0) return idsdv_i + icl_mat->get_pos_DamParm2(); + else return 0; +} +int MTSecF_Stoch_Material::get_pos_Fd_bar()const +{ + if(icl_mat->get_pos_Fd_bar()!= 0) return idsdv_i + icl_mat->get_pos_Fd_bar(); + else return 0; +} +int MTSecF_Stoch_Material::get_pos_dFd_bar()const +{ + if(icl_mat->get_pos_dFd_bar()!= 0) return idsdv_i + icl_mat->get_pos_dFd_bar(); + else return 0; +} +int MTSecF_Stoch_Material::get_pos_locFd()const +{ + if(icl_mat->get_pos_locFd()!= 0) return idsdv_i + icl_mat->get_pos_locFd(); + else return 0; +} //constbox -void MTSecF_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MTSecF_Stoch_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) + } // unloading step for MTSecF_Material material to reset statev_n in residual condition, by Ling Wu June 2012 void MTSecF_Stoch_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, double _Vfm, double _Vfi, - double* _euler, double* _ar, int kinc, int kstep){ + double* _euler, double* _ar, int kinc, int kstep){ + + if(kinc == 1 && kstep==1){ + return; + } + + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **Cel=NULL; + static double **C0_loc=NULL; + static double **invC0=NULL; + static double **invCel=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1; + + static double *strs_c=NULL; + static double *dstrs_m=NULL; + static double *dstrs_i=NULL; + static double *dstrn_c=NULL; + static double *dstrn_m=NULL; + static double *dstrn_i=NULL; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&Cel,6,6); + mallocmatrix(&C0_loc,6,6); + + mallocmatrix(&invC0,6,6); + mallocmatrix(&invCel,6,6); + + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&strs_c,6); + mallocvector(&dstrs_m,6); + mallocvector(&dstrs_i,6); + mallocvector(&dstrn_c,6); + mallocvector(&dstrn_m,6); + mallocvector(&dstrn_i,6); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(Cel); + cleartens4(C0_loc); + + cleartens4(invC0); + cleartens4(invCel); + + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + cleartens2(strs_c); + cleartens2(dstrs_m); + cleartens2(dstrs_i); + cleartens2(dstrn_c); + cleartens2(dstrn_m); + cleartens2(dstrn_i); + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOD(&(statev_n[idsdv_m]), C0); + icl_mat->get_elOD(&(statev_n[idsdv_i]), C1); + + get_elOD(statev_n, Cel); + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in unload_step of MTSecF\n"); + + inverse(Cel,invCel,&error,6); + if(error!=0) printf("problem while inversing Cel in unload_step of MTSecF\n"); + + //if fibers not oriented with e3: + if ( _ar[0] == 1.0 && _ar[1] == 1.0){ + eshelby(C0,_ar[0],_ar[1],S); + } + else if (fabs(_euler[0]) > 1.e-3 || fabs(_euler[1]) > 1.e-3){ + eul_mat(_euler, R66); + rot4(R66,C0,C0_loc); + eshelby(C0_loc,_ar[0],_ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,R66,6,6); + rot4(R66,mat1,S); + } + else{ + eshelby(C0,_ar[0],_ar[1],S); + } + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,_Vfm,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in unload_step of MT\n"); + + + copyvect(&(statev_n[pos_strs]), strs_c, 6); //stress in composite at tn + contraction42(invCel, strs_c, dstrn_c); //unloading strain of composite at tn + contraction42(A, dstrn_c, dstrn_i); //unloading strain of inclusion at tn + addtens2 (1./_Vfm, dstrn_c, -1.*_Vfi/_Vfm, dstrn_i, dstrn_m); //unloading strain of matrix at tn + + contraction42(C1, dstrn_i, dstrs_i); //unloading stress of inclusion at tn + contraction42(C0, dstrn_m, dstrs_m); //unloading stress of matrix at tn + + // update statev_n to keep the imformation for residual condition + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress in composte is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- dstrn_c[i]; //residual strain in composte + statev_n[pos_dstrn +i]= dstrn[i]+ dstrn_c[i]; // strain increment in composte + + dstrn[i]= statev_n[pos_dstrn +i]; + +#if Crmatrix_1st==1 + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]-dstrs_m[i]; //residual stress in marix +#else + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= 0.0; +#endif + + statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]-dstrn_m[i]; //residual strain in marix + // statev_n[idsdv_m + mtx_mat->get_pos_strn()+i]= statev_n[pos_strn +i]; + +#if Crinclusion==1 + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= statev_n[idsdv_i + icl_mat->get_pos_strs()+i]-dstrs_i[i]; //residual stress in inclusion +#else + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= 0.0; + +#endif // statev_n[idsdv_i + icl_mat->get_pos_strn()+i]= 0.0; + statev_n[idsdv_i + icl_mat->get_pos_strn()+i]= statev_n[idsdv_i + icl_mat->get_pos_strn()+i]-dstrn_i[i]; //residual strain in inclusion + } + } #ifdef NONLOCALGMSH @@ -1152,40 +2963,260 @@ double MTSecF_Stoch_Material::getPlasticEnergy(double* statev) void MTSecF_Stoch_Material::get_refOp(double* statev, double** C, int kinc, int kstep){ + int i,j,k; - int i,j,k; - - if(kinc < 2 && kstep==1){ - get_elOp(statev, C); + if(kinc < 2 && kstep==1){ + get_elOp(statev, C); + } + else{ + k=pos_C; + for(i=0;i<6;i++){ + for(j=i;j<6;j++){ + C[i][j] = statev[k++]; + C[j][i] = C[i][j]; + } } - else{ - k=pos_C; - for(i=0;i<6;i++){ - for(j=i;j<6;j++){ - C[i][j] = statev[k++]; - C[j][i] = C[i][j]; - } - } - } + } } void MTSecF_Stoch_Material::get_elOp(double* statev, double** Cel){ + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **invC0=NULL; + static double **C0_loc=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1; + + double _Vfi, _Vfm; + static double *_euler=NULL; + static double *_ar=NULL; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&invC0,6,6); + mallocmatrix(&C0_loc,6,6); + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&_euler,3); + mallocvector(&_ar,2); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(invC0); + cleartens4(C0_loc); + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + for(i=0;i<3;i++) _euler[i]=0.; + + if(pos_vfi == 0){ + _Vfi = vf_i; + } + else{ + _Vfi = statev[pos_vfi]; + } + _Vfm = 1.0 - _Vfi; + + if( pos_euler == 0){ + copyvect(euler,_euler,3); + } + else{ + _euler[0] = statev[pos_euler]; + _euler[1] = statev[pos_euler+1]; + _euler[2] = statev[pos_euler+2]; + } + + if( pos_aspR == 0){ + copyvect(ar,_ar,2); + } + else if(fabs(statev[pos_aspR]-1.0) <= 1.0e-6){ + _ar[0] = 1000000.0; + _ar[1] = 1000000.0; + } + else{ + _ar[0] = 1.0; + _ar[1] = statev[pos_aspR]; + } + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOp(C0); + icl_mat->get_elOp(C1); + + //if fibers not oriented with e3: + if ( _ar[0] == 1.0 && _ar[1] == 1.0){ + eshelby(C0,_ar[0],_ar[1],S); + } + else if (fabs(_euler[0]) > 1.e-3 || fabs(_euler[1]) > 1.e-3){ + eul_mat(_euler, R66); + rot4(R66,C0,C0_loc); + eshelby(C0_loc,_ar[0],_ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,R66,6,6); + rot4(R66,mat1,S); + } + else{ + eshelby(C0,_ar[0],_ar[1],S); + } + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in compute_elOp of MT\n"); + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,_Vfm,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in compute_elOp of MT\n"); + + + addtens4(1.,C1,-1.,C0,mat1); + contraction44(mat1,A,Cel); + addtens4(1.,C0,_Vfi,Cel,Cel); + } void MTSecF_Stoch_Material::get_elOD(double* statev, double** Cel) { + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **invC0=NULL; + static double **C0_loc=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1=NULL; + + double _Vfi, _Vfm; + static double *_euler=NULL; + static double *_ar=NULL; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&invC0,6,6); + mallocmatrix(&C0_loc,6,6); + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + mallocvector(&_euler,3); + mallocvector(&_ar,2); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(invC0); + cleartens4(C0_loc); + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + for(i=0;i<3;i++) _euler[i]=0.; + if(pos_vfi == 0){ + _Vfi = vf_i; + } + else{ + _Vfi = statev[pos_vfi]; + } + _Vfm = 1.0 - _Vfi; + + if( pos_euler == 0){ + copyvect(euler,_euler,3); + } + else{ + _euler[0] = statev[pos_euler]; + _euler[1] = statev[pos_euler+1]; + _euler[2] = statev[pos_euler+2]; + } + + if( pos_aspR == 0){ + copyvect(ar,_ar,2); + } + else if(fabs(statev[pos_aspR]-1.0) <= 1.0e-6){ + _ar[0] = 1000000.0; + _ar[1] = 1000000.0; + } + else{ + _ar[0] = 1.0; + _ar[1] = statev[pos_aspR]; + } + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOD(&(statev[idsdv_m]), C0); + icl_mat->get_elOD(&(statev[idsdv_i]), C1); + + //if fibers not oriented with e3: + if ( _ar[0] == 1.0 && _ar[1] == 1.0){ + eshelby(C0,_ar[0],_ar[1],S); + } + else if (fabs(_euler[0]) > 1.e-3 || fabs(_euler[1]) > 1.e-3){ + eul_mat(_euler, R66); + rot4(R66,C0,C0_loc); + eshelby(C0_loc,_ar[0],_ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,R66,6,6); + rot4(R66,mat1,S); + } + else{ + eshelby(C0,_ar[0],_ar[1],S); + } + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in compute_elOp of MT\n"); + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,_Vfm,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in compute_elOp of MT\n"); + + + addtens4(1.,C1,-1.,C0,mat1); + contraction44(mat1,A,Cel); + addtens4(1.,C0,_Vfi,Cel,Cel); + + } #ifdef NONLOCALGMSH void MTSecF_Stoch_Material:: get_elOp_mtx(double** Cel){ - mtx_mat->get_elOp(Cel); + mtx_mat->get_elOp(Cel); } void MTSecF_Stoch_Material::get_elOp_icl(double** Cel){ - icl_mat->get_elOp(Cel); + icl_mat->get_elOp(Cel); } #endif @@ -1206,6 +3237,8 @@ MTSecF_LargD::MTSecF_LargD(double* props, int idmat):MT_Material(props,idmat){ nsdv += 2; pos_R66 = nsdv; nsdv += 36; + pos_dR = nsdv; + nsdv += 9; } //destructor @@ -1214,9 +3247,9 @@ MTSecF_LargD::~MTSecF_LargD(){ } //constbox -void MTSecF_LargD::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MTSecF_LargD::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* dstrsdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ //alpha: for mid-point integration law to compute reference MT operator: C_MT = (1-alpha)*C_MT(tn) + alpha*C_MT(tn+1) - + } // unloading step for MTSecF_Material material to reset statev_n in residual condition, by Ling Wu June 2012 @@ -1224,6 +3257,223 @@ void MTSecF_LargD::constbox(double* dstrn, double* strs_n, double* strs, double void MTSecF_LargD::unload_step(double* dstrn, double* strs_n, double* statev_n, double _Vfm, double _Vfi, double** R66, int kinc, int kstep){ + if(kinc == 1 && kstep==1){ + return; + } + + int i,j,k,error; + double JaI, JaM, JaC; + static double **C0= NULL; + static double **C1= NULL; + static double **Cel= NULL; + static double **C0_loc= NULL; + static double **invC0= NULL; + static double **invCel= NULL; + static double **A= NULL; + static double **invA= NULL; + static double **S= NULL; + static double **_R66= NULL; + static double **I= NULL; + static double **mat1= NULL; + static double *strs_c= NULL; + static double *dstrs_m= NULL; + static double *dstrs_i= NULL; + static double *dstrn_c= NULL; + static double *dstrn_m= NULL; + static double *dstrn_i=NULL; + static double *resstrs_m=NULL; + static double *resstrs_i=NULL; + + + static double *_ar= NULL; + static double** Fi0 = NULL; + static double** Fm0 = NULL; + static double** Fi1 = NULL; + static double** Fm1 = NULL; + + if(Fi1 == NULL) + { + mallocmatrix(&Fi1,3,3); + mallocmatrix(&Fm1,3,3); + mallocmatrix(&Fi0,3,3); + mallocmatrix(&Fm0,3,3); + + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&Cel,6,6); + mallocmatrix(&C0_loc,6,6); + + mallocmatrix(&invC0,6,6); + mallocmatrix(&invCel,6,6); + + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&_R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&strs_c,6); + mallocvector(&dstrs_m,6); + mallocvector(&dstrs_i,6); + mallocvector(&dstrn_c,6); + mallocvector(&dstrn_m,6); + mallocvector(&dstrn_i,6); + mallocvector(&resstrs_m,6); + mallocvector(&resstrs_i,6); + mallocvector(&_ar,2); + } + + cleartens4(C0); + cleartens4(C1); + cleartens4(Cel); + cleartens4(C0_loc); + + cleartens4(invC0); + cleartens4(invCel); + + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(_R66); + cleartens4(I); + cleartens4(mat1); + + cleartens2(strs_c); + cleartens2(dstrs_m); + cleartens2(dstrs_i); + cleartens2(dstrn_c); + cleartens2(dstrn_m); + cleartens2(dstrn_i); + for(i=0;i<2;i++) _ar[i]=0.; + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + JaI = statev_n[idsdv_i + icl_mat->get_pos_Ja()]; + JaM = statev_n[idsdv_m + mtx_mat->get_pos_Ja()]; + JaC = (vf_i*JaI+(1.0-vf_i)*JaM); + + _ar[0] = statev_n[pos_aspR]; + _ar[1] = statev_n[pos_aspR+1]; + + mtx_mat->get_elOD(&(statev_n[idsdv_m]), C0); + icl_mat->get_elOD(&(statev_n[idsdv_i]), C1); + + get_elOD(statev_n, R66, Cel); + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in unload_step of MTSecF\n"); + + inverse(Cel,invCel,&error,6); + if(error!=0) printf("problem while inversing Cel in unload_step of MTSecF\n"); + + //if fibers not oriented with e3: + rot4(R66,C0,C0_loc); + eshelby(C0_loc,_ar[0],_ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(R66,_R66,6,6); + rot4(_R66,mat1,S); + + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,_Vfm,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in unload_step of MT\n"); + + for(i=0;i<6;i++){ + // strs_n[i] = JaC*(_Vfi*(statev_n[idsdv_i+icl_mat->get_pos_strs()+i]) + // + _Vfm*(statev_n[idsdv_m + mtx_mat->get_pos_strs()+i])); + strs_n[i] = JaC*(1./JaI*_Vfi*(statev_n[idsdv_i+icl_mat->get_pos_strs()+i]) + + 1./JaM*_Vfm*(statev_n[idsdv_m + mtx_mat->get_pos_strs()+i])); + + } + + copyvect(strs_n, strs_c, 6); //stress in composite at tn + contraction42(invCel, strs_c, dstrn_c); //unloading strain of composite at tn with shear factor sqrt(2) + contraction42(A, dstrn_c, dstrn_i); //unloading strain of inclusion at tn with shear factor sqrt(2) + addtens2 (1./_Vfm, dstrn_c, -1.*_Vfi/_Vfm, dstrn_i, dstrn_m); //unloading strain of matrix at tn with shear factor sqrt(2) + + contraction42(C1, dstrn_i, dstrs_i); //unloading stress of inclusion at tn + contraction42(C0, dstrn_m, dstrs_m); //unloading stress of matrix at tn + + // For inclusion update R66 according to the results of previous step: to do before unloading. + //At this stage the phases strain are not the elastic ones + + vect_to_matrix(3, &(statev_n[idsdv_i+icl_mat->get_pos_Ri()]), Fi0); + //printf("Rincl: %f %f %f %f %f %f %f %f %f\n", Fi0[0][0], Fi0[0][1], Fi0[0][2], Fi0[1][0], Fi0[1][1], Fi0[1][2], Fi0[2][0], Fi0[2][1], Fi0[2][2]); + + vect_to_matrix(3, &(statev_n[idsdv_i+icl_mat->get_pos_F()]), Fi0); + vect_to_matrix(3, &(statev_n[idsdv_m+mtx_mat->get_pos_F()]), Fm0); + //printf("Fincl: %f %f %f %f %f %f %f %f %f\n", Fi0[0][0], Fi0[0][1], Fi0[0][2], Fi0[1][0], Fi0[1][1], Fi0[1][2], Fi0[2][0], Fi0[2][1], Fi0[2][2]); + UpdateIncl(ar, euler, Fi0, _ar, R66); + + statev_n[pos_aspR] = _ar[0]; + statev_n[pos_aspR+1] = _ar[1]; + + //************* + matrix_to_vect(6, R66, &(statev_n[pos_R66])); + + + // update statev_n to keep the imformation for residual condition + // We use the strain in pos_strn and in pos_strn with the shear factor of *sqrt(2)!!!! + + for(i=0;i<6;i++){ + strs_n[i]=0.0; + statev_n[pos_strs +i]=0.0; //residual stress in composte is 0 + statev_n[pos_strn +i]= statev_n[pos_strn +i]- dstrn_c[i]; //residual strain in composte with shear factor sqrt(2) + +//#if Crmatrix_LD==1 + dstrs_m[i] = -dstrs_m[i]; //*JaM; +//#else +// dstrs_m[i] = -statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]; +//#endif + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]= statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]+dstrs_m[i]; //residual stress in matrix strain +//#if Crinclusion_LD==1 + dstrs_i[i] = -dstrs_i[i]; //*JaI; +//#else +// dstrs_i[i] = -statev_n[idsdv_i + icl_mat->get_pos_strs()+i]; +//#endif + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]= statev_n[idsdv_i + icl_mat->get_pos_strs()+i]+dstrs_i[i]; //residual stress in inclusion + } + //now we compute the elastic residual strain (!!! is residual was canceled they are 0, and we loose the basis) + for(i=0;i<6;i++){ + resstrs_m[i] = statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]; //*JaM; + dstrs_m[i] = dstrs_m[i]; //*JaM; + resstrs_i[i] = statev_n[idsdv_i + icl_mat->get_pos_strs()+i];//*JaI; + dstrs_i[i] = dstrs_i[i];//*JaI; + } + contraction42(invC0, resstrs_m, &(statev_n[idsdv_m + mtx_mat->get_pos_strn()])); //with shear factor sqrt(2) + contraction42(invC0, dstrs_m, dstrn_m); //with shear factor sqrt(2) + inverse(C1,invC0,&error,6); + contraction42(invC0, resstrs_i, &(statev_n[idsdv_i + icl_mat->get_pos_strn()])); //with shear factor sqrt(2) + contraction42(invC0, dstrs_i, dstrn_i); //with shear factor sqrt(2) + +#if Crmatrix_LD==0 + for(i=0;i<6;i++) + statev_n[idsdv_m + mtx_mat->get_pos_strs()+i]=0.; +#endif +#if Crinclusion_LD==0 + for(i=0;i<6;i++) + statev_n[idsdv_i + icl_mat->get_pos_strs()+i]=0.; +#endif + + //we rotate the residual strain in composite (not yet in the phases, it will be done after) + Rot_vect(&(statev_n[pos_dR]), &(statev_n[pos_strn])); //with shear factor sqrt(2) + + + for(i=0;i<6;i++){ + statev_n[pos_dstrn +i]= dstrn[i]- statev_n[pos_strn+ i]; // strain increment in composte + dstrn[i]= statev_n[pos_dstrn +i]; + } + //update F in phases AFTER UNLOADING + UpdateF(Fi0, dstrn_i, Fi1, sqrt(2.)); + UpdateF(Fm0, dstrn_m, Fm1, sqrt(2.)); + matrix_to_vect(3, Fi1, &(statev_n[idsdv_i+icl_mat->get_pos_F()])); + matrix_to_vect(3, Fm1, &(statev_n[idsdv_m+mtx_mat->get_pos_F()])); + } #ifdef NONLOCALGMSH @@ -1257,15 +3507,221 @@ double MTSecF_LargD::getPlasticEnergy(double* statev) void MTSecF_LargD::get_refOp(double* statev, double** _R66, double** C, int kinc, int kstep){ + int i,j,k; + + if(kinc < 2 && kstep==1){ + get_elOp(statev, _R66, C); + } + else{ + k=pos_C; + for(i=0;i<6;i++){ + for(j=i;j<6;j++){ + C[i][j] = statev[k++]; + C[j][i] = C[i][j]; + } + } + } } void MTSecF_LargD::get_elOp(double* statev, double** _R66, double** Cel){ + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **invC0=NULL; + static double **C0_loc=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1=NULL; + static double *_ar=NULL; + + double _Vfi, _Vfm; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&invC0,6,6); + mallocmatrix(&C0_loc,6,6); + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&_ar,2); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(invC0); + cleartens4(C0_loc); + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + for(i=0;i<2;i++) _ar[i]=0.; + + _Vfi = statev[pos_vfi]; + _Vfm = 1.0 - _Vfi; + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOp(C0); + icl_mat->get_elOp(C1); + + //if fibers not oriented with e3: + mallocvector(&_ar,2); + + + _Vfi = statev[pos_vfi]; + _Vfm = 1.0 - _Vfi; + + _ar[0] = statev[pos_aspR]; + _ar[1] = statev[pos_aspR+1]; + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOD(&(statev[idsdv_m]), C0); + icl_mat->get_elOD(&(statev[idsdv_i]), C1); + + rot4(_R66,C0,C0_loc); + eshelby(C0_loc,_ar[0],_ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(_R66,R66,6,6); + rot4(R66,mat1,S); + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in compute_elOp of MT\n"); + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,_Vfm,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in compute_elOp of MT\n"); + + + addtens4(1.,C1,-1.,C0,mat1); + contraction44(mat1,A,Cel); + addtens4(1.,C0,_Vfi,Cel,Cel); + + //freematrix(C0,6); + //freematrix(C1,6); + //freematrix(invC0,6); + //freematrix(C0_loc,6); + //freematrix(A,6); + //freematrix(invA,6); + //freematrix(S,6); + //freematrix(R66,6); + //freematrix(I,6); + //freematrix(mat1,6); + //free(_ar); } void MTSecF_LargD::get_elOD(double* statev, double** _R66, double** Cel) { + int i,error; + static double **C0=NULL; + static double **C1=NULL; + static double **invC0=NULL; + static double **C0_loc=NULL; + static double **A=NULL; + static double **invA=NULL; + static double **S=NULL; + static double **R66=NULL; + static double **I=NULL; + static double **mat1=NULL; + static double *_ar=NULL; + + double _Vfi, _Vfm; + + if(C0==NULL) + { + mallocmatrix(&C0,6,6); + mallocmatrix(&C1,6,6); + mallocmatrix(&invC0,6,6); + mallocmatrix(&C0_loc,6,6); + mallocmatrix(&A,6,6); + mallocmatrix(&invA,6,6); + mallocmatrix(&S,6,6); + mallocmatrix(&R66,6,6); + mallocmatrix(&I,6,6); + mallocmatrix(&mat1,6,6); + + mallocvector(&_ar,2); + } + cleartens4(C0); + cleartens4(C1); + cleartens4(invC0); + cleartens4(C0_loc); + cleartens4(A); + cleartens4(invA); + cleartens4(S); + cleartens4(R66); + cleartens4(I); + cleartens4(mat1); + + _Vfi = statev[pos_vfi]; + _Vfm = 1.0 - _Vfi; + + _ar[0] = statev[pos_aspR]; + _ar[1] = statev[pos_aspR+1]; + + + for(i=0;i<6;i++){ + I[i][i] = 1.; + } + + mtx_mat->get_elOD(&(statev[idsdv_m]), C0); + icl_mat->get_elOD(&(statev[idsdv_i]), C1); + + rot4(_R66,C0,C0_loc); + eshelby(C0_loc,_ar[0],_ar[1],mat1); //compute Eshelby's tensor in local frame + transpose(_R66,R66,6,6); + rot4(R66,mat1,S); + + + + inverse(C0,invC0,&error,6); + if(error!=0) printf("problem while inversing C0 in compute_elOp of MT\n"); + + contraction44(invC0,C1,mat1); + addtens4(1.,mat1,-1.,I,mat1); + contraction44(S,mat1,invA); + addtens4(1.,I,_Vfm,invA,invA); + inverse(invA,A,&error,6); + if(error!=0) printf("problem while inversing invA in compute_elOp of MT\n"); + + + addtens4(vf_i,C1,-1.0*vf_m*_Vfi/_Vfm,C0,mat1); + contraction44(mat1,A,Cel); + addtens4(vf_m/_Vfm,C0,1.0,Cel,Cel); + + //freematrix(C0,6); + //freematrix(C1,6); + //freematrix(invC0,6); + //freematrix(C0_loc,6); + //freematrix(A,6); + //freematrix(invA,6); + //freematrix(S,6); + //freematrix(R66,6); + //freematrix(I,6); + //freematrix(mat1,6); + + //free(_ar); } @@ -1278,6 +3734,80 @@ void MTSecF_LargD::get_elOD(double* statev, double** _R66, double** Cel) //constructor SC_Material::SC_Material(double* props, int idmat):Material(props, idmat){ + int i,idmat_m, idmat_i, idtop_i,k; + int iddam, idclength; + double sum_vf=0.; + nsdv=54; //18 (strn,strs,dstrn) + 36 (SC macro tangent operator) + iddam = (int) props[idmat+1]; + idclength = (int)props[idmat+2]; + mtx = (int) props[idmat+3]; + Nicl = (int) props[idmat+4]; + Nph = mtx + Nicl; + + + if(Nicl==0){ + printf("Cannot use SC scheme without any inclusion\n"); + } + + //allocate memory + icl_mat = (Material**) malloc(Nicl*sizeof(Material*)); + mallocmatrix(&ar,Nicl,2); + mallocmatrix(&euler,Nicl,3); + mallocvector(&vf_i,Nicl); + idsdv_i = (int*) malloc(Nicl*sizeof(int)); + + + //create materials for each phase, initialize topology and count state variables + if(mtx){ + idmat_m=(int) props[idmat+5]; + mtx_mat = init_material(props,idmat_m); //lecture de matrice + idsdv_m = nsdv; + nsdv += mtx_mat->get_nsdv(); + k=idmat+6; + + } + else{ + k=idmat+5; // il commence par la lecture de l'inclusion + mtx_mat=NULL; + } + + for(i=0;i<Nicl;i++){ + idmat_i=(int) props[k++]; + idtop_i=(int) props[k++]; + icl_mat[i] = init_material(props,idmat_i); + vf_i[i] = props[idtop_i++]; + ar[i][0] = props[idtop_i++]; + ar[i][1] = props[idtop_i++]; + euler[i][0] = props[idtop_i++]; + euler[i][1] = props[idtop_i++]; + euler[i][2] = props[idtop_i++]; + idsdv_i[i] = nsdv; + nsdv += icl_mat[i]->get_nsdv(); + sum_vf += vf_i[i]; + } + + if(mtx) vf_m = 1.-sum_vf; + + if( fabs(sum_vf-1.) > 1e-4) { + printf("the sum of phase volume fractions is not equal to 1!: %.10e\n",sum_vf); + } + + //set positions of strn, strs, dstrn and tangent operator in statev vector + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_C = 18; + + pos_p =0; // For the input of clength->creat_cg, not implemented for this material + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + nsdv += dam->get_nsdv(); + } + + + clength = init_clength(props,idclength); } #ifdef NONLOCALGMSH int SC_Material::get_pos_currentplasticstrainfornonlocal() const @@ -1309,7 +3839,7 @@ int SC_Material::get_pos_inc_stress () const return idsdv_i[0] + icl_mat[0]->get_pos_strs(); } int SC_Material::get_pos_mtx_strain () const -{ +{ return idsdv_m + mtx_mat->get_pos_strn(); } int SC_Material::get_pos_inc_strain () const @@ -1367,7 +3897,7 @@ void SC_Material::print(){ int i; printf("Self-Consistent\n"); if(dam) dam->print(); - printf("Number of phases: %d\n", Nph); + printf("Number of phases: %d\n", Nicl); if(mtx){ printf("matrix, volume fraction: %lf\n",vf_m); @@ -1383,12 +3913,38 @@ void SC_Material::print(){ } //constbox -void SC_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void SC_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ + + } void SC_Material::get_refOp(double* statev_n, double** C, int kinc, int kstep){ + + int i,j; + + //first increment: use reference operator of matrix material or of first inclusion + //TO DO (better): compute elastic, SC operator + if((kinc < 2) && (kstep==1)){ + if(mtx){ + mtx_mat->get_elOp(C); + } + else{ + icl_mat[0]->get_elOp(C); + } + } + //else: get C from statev + else{ + for(i=0;i<6;i++){ + for(j=0;j<6;j++){ + C[i][j] = statev_n[18 + (i*6) + j]; + } + } + } + } + + void SC_Material::get_elOp(double** Cel){ printf("get_elOp not implemented for Self-Consistent material\n"); @@ -1403,6 +3959,7 @@ void SC_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, i printf("unload_step not implemented for SC material\n"); } + //******************************************************************************************** // COMPOSITE - Two-step Mori-Tanaka/Voight //PROPS: MODEL, IDDAM, mtx (1 or 0), Nph, IDMAT matrix (if any), IDMAT inclusion, IDTOP inclusion, @@ -1413,26 +3970,290 @@ void SC_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, i MT_VT_Material::MT_VT_Material(double* props, int idmat):Material(props, idmat){ + int i, j, k, l, lay, idclength, idtop, iddam, idmat_i, sizetable, ID_Mat_First_Step,nAR, Nlayers,nbpropperlayer,materialIndex; + int *Total_number_phase_tmp; + double a11,a22,a33,a12,a13,a23,corEuler1,corEuler2,corEuler3; + double **a; + double **probDensityList, **facetList, **thetaList, **phiList; + double *props_ph; + double ***RBasis; + double *eulerBasis; + double Wtot, euler1, euler2, dir[3], dirtmp[3], s2; + double **weightAR, **ARList; + + mallocmatrix(&a,3,3); + mallocvector(&eulerBasis,3); + + nsdv=39; //18 (strn,strs,dstrn) + 21 (MT macro tangent operator) + + Total_number_of_AR_per_phase=1; //700; //50; //default value + + iddam = (int) props[idmat+1]; + idclength = (int)props[idmat+2]; + + k=idmat+5; + + + idtop=(int) props[k]; + idmat_i=0; //identie material position + Nlayers=(int) props[idtop]; + weightAR=new double*[Nlayers]; + ARList=new double*[Nlayers];; + probDensityList=new double*[Nlayers]; + facetList=new double*[Nlayers]; + thetaList=new double*[Nlayers]; + phiList=new double*[Nlayers]; + RBasis=new double**[Nlayers]; + Total_number_phase_tmp=new int[Nlayers]; + Total_number_phase=0; + nbpropperlayer=14; + for(lay=0; lay<Nlayers; lay++) + { + + N_theta_increment = (int) props[idtop+4+lay*nbpropperlayer]; // phase number's in theta direction + + if((int)(N_theta_increment/2)*2+1 !=N_theta_increment){ + N_theta_increment+=1; + printf("N_theta_increment set to %d\n",N_theta_increment); + } + + //read the orientation matrix + + k=idtop+5+lay*nbpropperlayer; + mallocvector(&weightAR[lay],Total_number_of_AR_per_phase); + mallocvector(&ARList[lay],Total_number_of_AR_per_phase); + mallocmatrix(&RBasis[lay],3,3); + + a11=props[k++]; + a22=props[k++]; + a33=props[k++]; + a12=props[k++]; + a23=props[k++]; + a13=props[k++]; + corEuler1=corEuler2=corEuler3=0.; + // the Gaussian identification is only reliable is a1>a2>a3 because of the order of theta and phi + if(a11> a22 and a22> a33) //OK + { + a[0][0]=a11; a[1][1]=a22; a[2][2]=a33; + a[0][1]=a[1][0]=a12; a[1][2]=a[2][1]=a23; a[0][2]=a[2][0]=a13; + corEuler1=corEuler2=corEuler3=0.; + } + else if(a11> a33 and a33> a22) //OK + { + a[0][0]=a11; a[1][1]=a33; a[2][2]=a22; + a[0][1]=a[1][0]=a13; a[1][2]=a[2][1]=-a23; a[0][2]=a[2][0]=-a12; + corEuler1=0; + corEuler2=-90.; + corEuler3=0.; + } + else if(a22> a11 and a11> a33) //OK + { + a[0][0]=a22; a[1][1]=a11; a[2][2]=a33; + a[0][1]=a[1][0]=-a12; a[1][2]=a[2][1]=a13; a[0][2]=a[2][0]=-a23; + corEuler1=-90.; + corEuler2=0.; + corEuler3=0.; + } + else if(a22> a33 and a33> a11)//OK + { + a[0][0]=a22; a[1][1]=a33; a[2][2]=a11; + a[0][1]=a[1][0]=-a23; a[1][2]=a[2][1]=-a13; a[0][2]=a[2][0]=-a12; + corEuler1=0.; + corEuler2=90.; + corEuler3=-90.; + } + else if(a33> a11 and a11> a22) //OK + { + a[0][0]=a33; a[1][1]=a11; a[2][2]=a22; + a[0][1]=a[1][0]=-a13; a[1][2]=a[2][1]=a12; a[0][2]=a[2][0]=-a23; + corEuler1=-90.; + corEuler2=90.; + corEuler3=0.; + } + else if(a33> a22 and a22> a11)//OK + { + a[0][0]=a33; a[1][1]=a22; a[2][2]=a11; + a[0][1]=a[1][0]=a23; a[1][2]=a[2][1]=-a12; a[0][2]=a[2][0]=-a13; + corEuler1=90.; + corEuler2=90.; + corEuler3=90.; + } + else + { + printf("MT_VT: enter the matrix a in descending order and use Euler angle for rotations\n"); + exit(0); + } + + + ID_Mat_First_Step = props[k++]; // read the identie of schemas for the first step : 4:MT ,8:MTSecF , 6:MTSecFirStoch ..... + + + eulerBasis[0]= props[k++]+corEuler1; //read rotation angle -->(OZ) + eulerBasis[1]= props[k++]+corEuler2; //read rotation angle -->(OX) + eulerBasis[2]= props[k++]+corEuler3; //read rotation angle -->(OZ) + eul_mat33(eulerBasis,RBasis[lay]); + transpose(RBasis[lay],RBasis[lay],3,3); + //rot33(RBasis,atmp, a); // we will apply the rotation later after Gaussian identification + // which is only reliable is a1>a2>a3 because of the order of theta and phi + Total_number_phase_tmp[lay] =generateWeight(N_theta_increment, a, &probDensityList[lay], &facetList[lay], &thetaList[lay], &phiList[lay]); + Total_number_phase+=Total_number_phase_tmp[lay]*Total_number_of_AR_per_phase; + } + //allocate memory + ph_mat = (Material**) malloc(Total_number_phase*sizeof(Material*)); + + idsdv_i = (int*) malloc(Total_number_phase*sizeof(int)); + Wgt=(double*) malloc(Total_number_phase*sizeof(double)); // vector of Weight + + //create materials for each phase, initialize topology and count state variables + + mallocvector(&props_ph,idtop+6); + for(i=0;i<idtop;i++){ // we stop just before inclusin geometry + props_ph[i]=props[i]; + } + materialIndex=0; + for(lay=0; lay<Nlayers; lay++) + { + k=idtop+1+lay*nbpropperlayer; + for(i=0;i<Total_number_phase_tmp[lay];i++){ + props_ph[idtop]=props[k]; //volume fraction + props_ph[idtop+1]=props[k+1]; //AR1 + props_ph[idtop+2]=props[k+2]; //AR2 + ID_Mat_First_Step = props[k+10]; // read the identie of schemas for the first step : 4:MT ,8:MTSecF , 6:MTSecFirStoch ..... + + props_ph[idmat_i] = ID_Mat_First_Step; //identie of schemas for the first step + + dirtmp[0]= cos(phiList[lay][i])*sin(thetaList[lay][i]); + dirtmp[1]= sin(phiList[lay][i])*sin(thetaList[lay][i]); + dirtmp[2]= cos(thetaList[lay][i]); + for(j=0;j<3;j++) + { + dir[j]=0.; + for(l=0;l<3;l++) + dir[j]+=RBasis[lay][j][l]*dirtmp[l]; + } + + euler2 = acos(dir[2]); + s2 = sqrt(1.-cos(euler2)*cos(euler2)); + euler1 = 0.; + if(s2!=0.) + if(fabs(dir[1]/s2)<1.) + euler1=acos(-1.*dir[1]/s2); + else + euler1=pi; + if(dir[0]*s2*sin(euler1)<0.) euler1*=-1.; + + props_ph[idtop+3]=euler1*180./pi; + props_ph[idtop+4]=euler2*180./pi; + props_ph[idtop+5]=0.; + //verification + //double *tmp,*eulertmp; + //double **Rtmp; + //mallocvector(&tmp,3); + //mallocvector(&eulertmp,3); + //mallocmatrix(&Rtmp,3,3); + //eulertmp[0]=euler1*180./pi; + //eulertmp[1]=euler2*180./pi; + //eulertmp[2]=0.; + //eul_mat33(eulertmp,Rtmp); + //transpose(Rtmp,Rtmp,3,3); + //for(int j=0;j<3;j++) + // tmp[j]=Rtmp[j][2]; + if(Total_number_of_AR_per_phase>1) + { + getARWeight(thetaList[lay][i], phiList[lay][i], Total_number_of_AR_per_phase, weightAR[lay],ARList[lay]); + } + for(nAR=0;nAR<Total_number_of_AR_per_phase; nAR++) + { + Wgt[materialIndex+i*Total_number_of_AR_per_phase+nAR] = probDensityList[lay][i]*facetList[lay][i]/float(Nlayers); + //here we need to change AR + if(Total_number_of_AR_per_phase>1) + { + props_ph[idtop+1]=ARList[lay][nAR]; + props_ph[idtop+2]=ARList[lay][nAR]; + Wgt[materialIndex+i*Total_number_of_AR_per_phase+nAR]=weightAR[lay][nAR]/float(Nlayers); + } + ph_mat[materialIndex+i*Total_number_of_AR_per_phase+nAR] = init_material(props_ph,idmat_i); // initialisation of phase + //printf("phase prop: p %f %f %f, vi %f, AR %f %f, Weight %f\n",dir[0],dir[1],dir[2],props_ph[idtop],props_ph[idtop+1],props_ph[idtop+2],Wgt[materialIndex+i*Total_number_of_AR_per_phase+nAR] ); + //for(j=0; j<idtop+6; j++) + // printf("phase %d prop: %e\n",materialIndex+i*Total_number_of_AR_per_phase+nAR,props_ph[j]); + //check if damage + if(i==0) + { + if(ph_mat[0]->getDamage()!=NULL) + { + pos_dam=nsdv; + nsdv+=4; // 1 pbar + Delta p bar + 1 D + p local + pos_p=nsdv-1; + withDamage=true; + //dam = ph_mat[0]->getDamage(); + } + else + { + withDamage=false; + dam=NULL; + } + } + idsdv_i[materialIndex+i*Total_number_of_AR_per_phase+nAR] = nsdv; + nsdv += ph_mat[materialIndex+i*Total_number_of_AR_per_phase+nAR]->get_nsdv(); + } + } + materialIndex=materialIndex+Total_number_phase_tmp[lay]*Total_number_of_AR_per_phase; + } + Wtot=0.; + for(i=0;i<Total_number_phase;i++) + Wtot+=Wgt[i]; + printf(" %d phases of total weight %.10e, with %d internal variables\n", Total_number_phase, Wtot, nsdv); + + + //set positions of strn, strs, dstrn and tangent operator in statev vector + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + pos_C = 18; + + clength = init_clength(props,idclength); + + free(props_ph); + freematrix(a,3); + for(lay=0;lay<Nlayers;lay++) + { + free(weightAR[lay]); + free(ARList[lay]); + free(probDensityList[lay]); + free(thetaList[lay]); + free(phiList[lay]); + free(facetList[lay]); + freematrix(RBasis[lay],3); + } + free(Total_number_phase_tmp); + free(RBasis); + free(weightAR); + free(ARList); + free(probDensityList); + free(thetaList); + free(phiList); + free(facetList); + free(eulerBasis); } #ifdef NONLOCALGMSH int MT_VT_Material::get_pos_currentplasticstrainfornonlocal() const { - if(pos_p>=0) + if(get_pos_p()>=0) return pos_p; return -1; } int MT_VT_Material::get_pos_effectiveplasticstrainfornonlocal() const { - if(pos_dam>=0) + if(get_pos_dam()>=0) return pos_dam; return -1; } int MT_VT_Material::get_pos_damagefornonlocal() const { - if(pos_dam >=0) + if(get_pos_dam() >=0) return pos_dam+2; return -1; } @@ -1481,16 +4302,15 @@ double MT_VT_Material::getPlasticEnergy (double* statev) //destructor MT_VT_Material::~MT_VT_Material(){ - int i; - //if(Total_number_phase) delete Total_number_phase; - //for(i=0;i<s;i++){ - // if(ph_mat[i]) delete ph_mat[i]; - //} - free(ph_mat); - free(idsdv_i); - if(clength) delete clength; - free(Wgt); - // if(dam) delete(dam); + int i; + for(i=0;i<Total_number_phase;i++){ + if(ph_mat[i]) delete ph_mat[i]; + } + free(ph_mat); + free(idsdv_i); + if(clength) delete clength; + free(Wgt); + //if(dam) delete(dam); } void MT_VT_Material::print(){ @@ -1508,50 +4328,66 @@ void MT_VT_Material::print(){ } //constbox -void MT_VT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void MT_VT_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ - -} //*********add by MOHAMEDOU Mohamed - + +} void MT_VT_Material::get_refOp(double* statev_n, double** C, int kinc, int kstep){ + int i,j; + static double **Ctmp=NULL ; + if(Ctmp==NULL){ + mallocmatrix(&Ctmp,6,6); + } + cleartens4(Ctmp); + //first increment: use reference operator of different phases + if((kinc < 2) && (kstep==1)){ + for(int i=0;i<Total_number_phase ;i++){ + ph_mat[i]->get_elOp(Ctmp); + addtens4(1.,C,Wgt[i],Ctmp,C); + } + } + else{ + for(i=0;i<6;i++){ + for(j=0;j<6;j++){ + C[i][j] = statev_n[pos_C + (i*6) + j]; + } + } + } } void MT_VT_Material::get_elOp(double** Cel){ -double **Ctmp=NULL ; -if(Ctmp==NULL){ - mallocmatrix(&Ctmp,6,6); + static double **Ctmp=NULL ; + if(Ctmp==NULL){ + mallocmatrix(&Ctmp,6,6); } -cleartens4(Ctmp); + cleartens4(Ctmp); - for(int i=0;i<Total_number_phase;i++){ - ph_mat[i]->get_elOp(Ctmp); - // C+=Ctmp*Wtg - addtens4(1.,Cel,Wgt[i],Ctmp,Cel); - } + for(int i=0;i<Total_number_phase;i++){ + ph_mat[i]->get_elOp(Ctmp); + addtens4(1.,Cel,Wgt[i],Ctmp,Cel); } +} void MT_VT_Material::get_elOD(double* statev, double** Cel){ -double **Ctmp=NULL ; - if(Ctmp==NULL){ - mallocmatrix(&Ctmp,6,6); + static double **Ctmp=NULL ; + if(Ctmp==NULL){ + mallocmatrix(&Ctmp,6,6); } - cleartens4(Ctmp); + cleartens4(Ctmp); - for(int i=0;i<Total_number_phase ;i++){ - - ph_mat[i]->get_elOD(&(statev[idsdv_i[i]]),Ctmp); - // C+=Ctmp*Wtg - addtens4(1.,Cel,Wgt[i],Ctmp,Cel); - } + for(int i=0;i<Total_number_phase ;i++){ + ph_mat[i]->get_elOD(&(statev[idsdv_i[i]]),Ctmp); + addtens4(1.,Cel,Wgt[i],Ctmp,Cel); } +} void MT_VT_Material::unload_step(double* dstrn, double* strs_n, double* statev_n, int kinc, int kstep){ @@ -1569,6 +4405,70 @@ void MT_VT_Material::unload_step(double* dstrn, double* strs_n, double* statev_n //constructor ANEL_Material::ANEL_Material(double* props, int idmat):Material(props, idmat){ + int k; + int iddam, idclength; + int i; + +//allocate memory for the 9 material constants and 3 euler angles + + mallocvector(&anpr,9); + mallocvector(&euler,3); + + + iddam = (int) props[idmat+1]; // damage + idclength = (int)props[idmat+2]; + + k=idmat+3; + + anpr[0] = props[k++]; + anpr[1] = props[k++]; + anpr[2] = props[k++]; + anpr[3] = props[k++]; + anpr[4] = props[k++]; + anpr[5] = props[k++]; + anpr[6] = props[k++]; + anpr[7] = props[k++]; + anpr[8] = props[k++]; + + euler[0] = props[k++]; + euler[1] = props[k++]; + euler[2] = props[k]; + + nsdv = 18; + pos_strn=0; + pos_strs=6; + pos_dstrn=12; + + pos_p =0; // for the input of clength->creat_cg, as damage is not implemented in this material + + dam = init_damage(props,iddam); + if(dam){ + pos_dam = nsdv; + if(dam->get_pos_DamParm1() != 0){ + pos_NFiber = pos_dam + dam->get_pos_DamParm1(); + pos_Pdam = pos_dam + dam->get_pos_DamParm2(); + } + else { + pos_NFiber = 0; + pos_Pdam = 0; + } + pos_Fd_bar = pos_dam + dam->get_pos_Fd_bar(); + pos_dFd_bar = pos_dam + dam->get_pos_dFd_bar(); + pos_locFd = pos_dam + dam->get_pos_locFd(); + nsdv += dam->get_nsdv(); + } + else{ + pos_NFiber = 0; + pos_Pdam = 0; + pos_Fd_bar = 0; + pos_dFd_bar = 0; + pos_locFd = 0; + + } + + + clength = init_clength(props,idclength); + cl = sqrt(props[idclength+3]); } @@ -1613,6 +4513,9 @@ double ANEL_Material::getElasticEnergy (double* statev) mallocvector(&strn,6); mallocvector(&strs,6); } + cleartens2(strn); + cleartens2(strs); + copyvect(&(statev[get_pos_strn()]), strn,6); copyvect(&statev[get_pos_strs()], strs, 6); //enegry due to damage has been removed @@ -1630,12 +4533,14 @@ double ANEL_Material::getPlasticEnergy (double* statev) #endif //constbox -void ANEL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, int kinc, int kstep, double dt){ +void ANEL_Material::constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar,double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt){ + + } void ANEL_Material::constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt){ - + } @@ -1646,7 +4551,7 @@ void ANEL_Material::constboxSecant(double* dstrn, double* strs_n, double* strs, void ANEL_Material::constbox_2order(int mtx, double *DE, double* dstrn, double* strs, double* statev_n, double* statev, double **Calgo, Lcc* LCC, YieldF* YF, double** c_g, int kinc, int kstep, double dt){ - + } //end of consbox_2order diff --git a/NonLinearSolver/materialLaw/material.h b/NonLinearSolver/materialLaw/material.h index 72f96afc0111da5f1f2e028e0b972f89a2ba7a52..3cc05f5ab6536cb867bf070c87c40eb085e821c8 100755 --- a/NonLinearSolver/materialLaw/material.h +++ b/NonLinearSolver/materialLaw/material.h @@ -46,11 +46,20 @@ class Material{ inline int get_pos_dstrn() const { return pos_dstrn; } virtual int get_pos_dR() const { return -1;} + //give the position of damage in the statev vector === p_bar, dp_bar ,D, dD inline int get_pos_dam() const { if(dam) return pos_dam; else return -1; } inline int get_pos_p() const { if(dam) return pos_p; else return -1; } virtual bool isInLargeDeformation() const {return false;} virtual const Damage* getDamage() const {return dam;} + + virtual int get_pos_maxD() const {if (dam) return pos_dam+dam->get_pos_maxD(); else return -1;} + virtual double getMaxD(double *statev) const {if (dam) return statev[get_pos_maxD()]; else return -1.;} + virtual void setMaxD(double *statev, double Dmax) {if (dam) statev[get_pos_maxD()]=Dmax;} + virtual int getNbNonLocalVariables() const {if(get_pos_dam()>-1) return 1; else return 0;} + + + //print the material properties virtual void print()=0; @@ -60,7 +69,7 @@ class Material{ //compute the constitutive response of the material //INPUT: dstrn, strs_n, statev_n, kinc, kstep //OUTPUT: strs, statev, Cref, dCref, Calgo - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev,double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt)=0; + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev,double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt)=0; virtual void constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt ); virtual void constboxSecantZero(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); @@ -104,8 +113,20 @@ class Material{ virtual int get_pos_hexp() const { return 0; } virtual int get_pos_DamParm1() const { return 0; } virtual int get_pos_DamParm2() const { return 0; } + virtual int get_pos_INCDamParm1() const { return 0; } + virtual int get_pos_INCDamParm2() const { return 0; } + virtual int get_pos_Fd_bar() const { return 0; } + virtual int get_pos_dFd_bar() const { return 0; } + virtual int get_pos_locFd() const { return 0; } + + + virtual int get_pos_inc_maxD() const {return -1; } + virtual double get_inc_MaxD(double *statev) const { return -1.; } + virtual void set_inc_MaxD(double *statev, double Dmax) {} + virtual int get_pos_mtx_maxD() const {return -1; } + virtual double get_mtx_MaxD(double *statev) const {return -1.; } + virtual void set_mtx_MaxD(double *statev, double Dmax) {} - #ifdef NONLOCALGMSH virtual int get_pos_currentplasticstrainfornonlocal() const = 0; virtual int get_pos_effectiveplasticstrainfornonlocal() const = 0; @@ -116,6 +137,8 @@ class Material{ virtual int get_pos_inc_strain () const; virtual int get_pos_mtx_Ja() const; virtual int get_pos_inc_Ja() const; + virtual int get_pos_mtx_Dam() const; + virtual int get_pos_inc_Dam() const; virtual double getElasticEnergy (double* statev) =0; virtual double getPlasticEnergy (double* statev) =0; @@ -143,7 +166,7 @@ class EL_Material : public Material{ ~EL_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); virtual void constboxLargD(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); @@ -187,7 +210,7 @@ class EP_Material : public Material{ ~EP_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar, double* dDdE,**************** virtual void constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); virtual void constboxSecantZero(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); @@ -241,7 +264,7 @@ class EP_Stoch_Material : public Material{ ~EP_Stoch_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar, double* dDdE,**************** virtual void constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); virtual void constboxSecantZero(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); @@ -298,7 +321,7 @@ class EVP_Material : public Material{ ~EVP_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); //*****************New tenor added by wu ling: double* dpdE, double* strs_dDdp_bar, double* dDdE,**************** virtual void constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); virtual void constboxSecantZero(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); @@ -346,7 +369,7 @@ class VT_Material : public Material{ ~VT_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void get_refOp(double* statev, double** C, int kinc, int kstep); virtual void get_elOp(double** Cel); virtual void get_elOD(double* statev, double** Cel); @@ -379,13 +402,52 @@ class MT_Material : public Material{ ~MT_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual int get_pos_C() const {return pos_C; } virtual void get_refOp(double* statev, double** C, int kinc, int kstep); virtual void get_elOp(double** Cel); virtual void get_elOD(double* statev, double** Cel); virtual void unload_step(double* dstrn, double* strs_n, double* statev, int kinc, int kstep); + virtual int get_pos_inc_maxD() const { + if(icl_mat->get_pos_maxD()>=0) + return icl_mat->get_pos_maxD()+idsdv_i; + return -1; + } + virtual double get_inc_MaxD(double *statev) const { + if(icl_mat->get_pos_maxD()>=0) + return statev[get_pos_inc_maxD()]; + return -1.; + } + + virtual void set_inc_MaxD(double *statev, double Dmax) + { + if(icl_mat->get_pos_maxD()>=0) + statev[get_pos_inc_maxD()]=Dmax; + } + virtual int get_pos_mtx_maxD() const { + if(mtx_mat->get_pos_maxD()>=0) + return mtx_mat->get_pos_maxD()+idsdv_m; + return -1; + } + virtual double get_mtx_MaxD(double *statev) const { + if(mtx_mat->get_pos_maxD()>=0) + return statev[get_pos_mtx_maxD()]; + return -1.; + } + virtual void set_mtx_MaxD(double *statev, double Dmax) + { + if(mtx_mat->get_pos_maxD()>=0) + statev[get_pos_mtx_maxD()]=Dmax; + } + virtual int getNbNonLocalVariables() const + { + int nb=0; + if(mtx_mat->get_pos_dam()>-1) nb=nb+1; + if(icl_mat->get_pos_dam()>-1) nb=nb+1; + return nb; + } + #ifdef NONLOCALGMSH virtual int get_pos_currentplasticstrainfornonlocal() const; virtual int get_pos_effectiveplasticstrainfornonlocal() const; @@ -394,10 +456,14 @@ class MT_Material : public Material{ virtual int get_pos_inc_stress () const; virtual int get_pos_mtx_strain () const; virtual int get_pos_inc_strain () const; + virtual int get_pos_mtx_Dam () const; + virtual int get_pos_inc_Dam () const; virtual double getElasticEnergy (double* statev) ; virtual double getPlasticEnergy (double* statev) ; + + #endif }; @@ -412,7 +478,7 @@ class MTSecF_Material : public MT_Material{ MTSecF_Material(double* props, int idmat); ~MTSecF_Material(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void unload_step(double* dstrn, double* strs_n, double* statev, int kinc, int kstep); }; @@ -426,7 +492,7 @@ class MTSecNtr_Material : public MT_Material{ MTSecNtr_Material(double* props, int idmat); ~MTSecNtr_Material(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF,double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void unload_step(double* dstrn, double* strs_n, double* statev, int kinc, int kstep); }; @@ -441,7 +507,7 @@ class MTSecSd_Material : public MT_Material{ MTSecSd_Material(double* props, int idmat); ~MTSecSd_Material(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void unload_step(double* dstrn, double* strs_n, double* statev, int kinc, int kstep); }; @@ -459,7 +525,7 @@ class MTSecF_Stoch_Material : public MT_Material{ MTSecF_Stoch_Material(double* props, int idmat); ~MTSecF_Stoch_Material(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void unload_step(double* dstrn, double* strs_n, double* statev_n, double _Vfm, double _Vfi, double* _euler, double* _ar, int kinc, int kstep); virtual int get_pos_vfi() const { return pos_vfi; } @@ -475,6 +541,12 @@ class MTSecF_Stoch_Material : public MT_Material{ virtual int get_pos_hexp()const; virtual int get_pos_DamParm1()const; virtual int get_pos_DamParm2()const; + virtual int get_pos_INCDamParm1()const; + virtual int get_pos_INCDamParm2()const; + virtual int get_pos_Fd_bar()const; + virtual int get_pos_dFd_bar()const; + virtual int get_pos_locFd() const; + #ifdef NONLOCALGMSH virtual double getElasticEnergy (double* statev); @@ -504,7 +576,7 @@ class MTSecF_LargD : public MT_Material{ MTSecF_LargD(double* props, int idmat); ~MTSecF_LargD(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void unload_step(double* dstrn, double* strs_n, double* statev_n, double _Vfm, double _Vfi, double** R66, int kinc, int kstep); virtual int get_pos_vfi() const { return pos_vfi; } @@ -555,13 +627,14 @@ class SC_Material : public Material{ ~SC_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual int get_pos_C() const { return pos_C; } virtual void get_refOp(double* statev, double** C, int kinc, int kstep); virtual void get_elOp(double** Cel); virtual void get_elOD(double* statev, double** Cel); virtual void unload_step(double* dstrn, double* strs_n, double* statev, int kinc, int kstep); + #ifdef NONLOCALGMSH virtual int get_pos_currentplasticstrainfornonlocal() const; virtual int get_pos_effectiveplasticstrainfornonlocal() const; @@ -588,13 +661,14 @@ class MT_VT_Material : public Material{ double* Wgt;// vector of weight for all phase int pos_C; bool withDamage; + int Total_number_of_AR_per_phase; public: MT_VT_Material(double* props, int idmat); ~MT_VT_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev,double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev,double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual int get_pos_C() const { return pos_C; } @@ -623,14 +697,20 @@ class ANEL_Material : public Material{ private: double* anpr; double* euler; - + double cl; + int pos_NFiber; + int pos_Pdam; + int pos_Fd_bar; + int pos_dFd_bar; + int pos_locFd; + public: ANEL_Material(double* props, int idmat); ~ANEL_Material(); virtual void print(); - virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, int kinc, int kstep, double dt); + virtual void constbox(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double** Cref, double*** dCref, double* tau, double** dtau, double** Calgo, double alpha, double* dpdE, double* strs_dDdp_bar, double *Sp_bar, double** c_g, double* dFd_d_bar, double* dstrs_dFd_bar, double *dFd_dE, double** c_gF, double* dpdFd, double* dFddp, int kinc, int kstep, double dt); virtual void constboxSecant(double* dstrn, double* strs_n, double* strs, double* statev_n, double* statev, double **Calgo, double** Csd, double*** dCsd, double** dCsdp_bar, double* dnu, double& dnudp_bar, double alpha, double* dpdE, double* dstrsdp_bar, double** c_g, int kinc, int kstep, double dt); @@ -642,6 +722,12 @@ class ANEL_Material : public Material{ virtual void get_elOD(double* statev, double** Cel); virtual void unload_step(double* dstrn, double* strs_n, double* statev, int kinc, int kstep); + + virtual int get_pos_DamParm1() const { return pos_NFiber; } + virtual int get_pos_DamParm2() const { return pos_Pdam; } + virtual int get_pos_Fd_bar() const { return pos_Fd_bar; } + virtual int get_pos_dFd_bar() const { return pos_dFd_bar; } + virtual int get_pos_locFd() const { return pos_locFd; } #ifdef NONLOCALGMSH virtual int get_pos_currentplasticstrainfornonlocal() const; virtual int get_pos_effectiveplasticstrainfornonlocal() const; diff --git a/NonLinearSolver/materialLaw/mlaw.cpp b/NonLinearSolver/materialLaw/mlaw.cpp index 58b23c070485906c8b6d835d8b1df5a3255bb233..70b6b6d5e7437f44c5bd94f1feb246d6a817e62b 100644 --- a/NonLinearSolver/materialLaw/mlaw.cpp +++ b/NonLinearSolver/materialLaw/mlaw.cpp @@ -11,7 +11,7 @@ // #include "mlaw.h" materialLaw::materialLaw(const int num, const bool init): _num(num), _initialized(init), _timeStep(0.), _currentTime(0.), -_macroSolver(NULL){/*std::cout<<"materialLaw_constructed"<<"\n";*/} +_solver(NULL){/*std::cout<<"materialLaw_constructed"<<"\n";*/} materialLaw::materialLaw(const materialLaw &source) { @@ -19,10 +19,7 @@ materialLaw::materialLaw(const materialLaw &source) _initialized = source._initialized; _timeStep = source._timeStep; _currentTime = source._currentTime; - _macroSolver = source._macroSolver; -// _K = source._K; -// _speedEOS = source._speedEOS; -// _force_speed = source._force_speed; + _solver = source._solver; } materialLaw& materialLaw::operator=(const materialLaw &source) @@ -31,9 +28,6 @@ materialLaw& materialLaw::operator=(const materialLaw &source) _initialized = source._initialized; _timeStep = source._timeStep; _currentTime = source._currentTime; - _macroSolver = source._macroSolver; -// _K = source._K; -// _speedEOS = source._speedEOS; -// _force_speed = source._force_speed; + _solver = source._solver; return *this; } diff --git a/NonLinearSolver/materialLaw/mlaw.h b/NonLinearSolver/materialLaw/mlaw.h index 090a01078421294039e7347871c3226283d82816..d6c2190f47597b3952d6563e2681978b2579c039 100644 --- a/NonLinearSolver/materialLaw/mlaw.h +++ b/NonLinearSolver/materialLaw/mlaw.h @@ -44,7 +44,7 @@ class materialLaw{ #ifndef SWIG - const nonLinearMechSolver* _macroSolver; // solver that this material belongs to + const nonLinearMechSolver* _solver; // solver that this material belongs to public: // constructor @@ -80,8 +80,8 @@ class materialLaw{ virtual double getInitialExtraDofStoredEnergyPerUnitField() const {return 0.;} virtual double getExtraDofStoredEnergyPerUnitField(double T) const {return 0.;} virtual double getCharacteristicLength() const {return 0.;}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){_macroSolver = sv;}; - virtual const nonLinearMechSolver* getMacroSolver() const {return _macroSolver;}; + virtual void setSolver(const nonLinearMechSolver* sv){_solver = sv;}; + virtual const nonLinearMechSolver* getSolver() const {return _solver;}; virtual bool withEnergyDissipation() const = 0; // function to define when one IP is broken for block dissipation diff --git a/NonLinearSolver/materialLaw/mlawHyperelastic.cpp b/NonLinearSolver/materialLaw/mlawHyperelastic.cpp index 9eae58007f0ae7770bbcc6c01fddd3833526af99..e374bd872d30e281bfda463047c1e2c9d2aebfc6 100644 --- a/NonLinearSolver/materialLaw/mlawHyperelastic.cpp +++ b/NonLinearSolver/materialLaw/mlawHyperelastic.cpp @@ -871,11 +871,11 @@ void mlawPowerYieldHyper::predictorCorrector_nonAssociatedFlow(const STensor3& F q1->getRefToPlasticEnergy() += Gamma*dotKSN; } - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ q1->getRefToIrreversibleEnergy() = q1->defoEnergy(); } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ q1->getRefToIrreversibleEnergy() = q1->plasticEnergy(); } else{ @@ -1101,7 +1101,7 @@ void mlawPowerYieldHyper::predictorCorrector_nonAssociatedFlow(const STensor3& F } STensor3& DirrEnergDF = q1->_DirreversibleEnergyDF; - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DirrEnergDF(i,j) = 0.; @@ -1115,8 +1115,8 @@ void mlawPowerYieldHyper::predictorCorrector_nonAssociatedFlow(const STensor3& F } } } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ if (Dgamma > 0){ static STensor3 DirrEnergDCepr; double dotKSN = dot(KS,N); @@ -1392,11 +1392,11 @@ void mlawPowerYieldHyper::predictorCorrector_associatedFlow(const STensor3& F, c q1->getRefToPlasticEnergy() += Gamma*dotKSN; } - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ q1->getRefToIrreversibleEnergy() = q1->defoEnergy(); } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ q1->getRefToIrreversibleEnergy() = q1->plasticEnergy(); } else{ @@ -1639,7 +1639,7 @@ void mlawPowerYieldHyper::predictorCorrector_associatedFlow(const STensor3& F, c STensor3& DirrEnergDF = q1->_DirreversibleEnergyDF; - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DirrEnergDF(i,j) = 0.; @@ -1653,8 +1653,8 @@ void mlawPowerYieldHyper::predictorCorrector_associatedFlow(const STensor3& F, c } } } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)){ if (Dgamma > 0){ static STensor3 DirrEnergDCepr; double dotKSN = dot(KS,N); diff --git a/NonLinearSolver/materialLaw/mlawHyperelasticDamage.cpp b/NonLinearSolver/materialLaw/mlawHyperelasticDamage.cpp index 582bf3f06c4fbb45f368aeb9882cc7db0f1dfc10..9966e4978bdc1f5490ec7bce4dab2e7d9c9beb2e 100644 --- a/NonLinearSolver/materialLaw/mlawHyperelasticDamage.cpp +++ b/NonLinearSolver/materialLaw/mlawHyperelasticDamage.cpp @@ -102,11 +102,11 @@ void mlawLocalDamageHyperelastic::constitutive( } } - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ q->getRefToIrreversibleEnergy() = q->defoEnergy(); } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ q->getRefToIrreversibleEnergy() = q->damageEnergy(); } else{ @@ -115,15 +115,15 @@ void mlawLocalDamageHyperelastic::constitutive( if (stiff){ STensor3& DIrrevEnergyDF = q->getRefToDIrreversibleEnergyDF(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ for (int i=0; i<3; i++){ for (int j=0; j<3; j++){ DIrrevEnergyDF(i,j) = effP(i,j)*(1-D) - ene*q->getDDamageDp()*dLocalVardF(i,j); } } } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ for (int i=0; i<3; i++){ for (int j=0; j<3; j++){ DIrrevEnergyDF(i,j) = effP(i,j)*(D-q0->getDamage()) + ene*q->getDDamageDp()*dLocalVardF(i,j); @@ -208,11 +208,11 @@ void mlawLocalAnisotropicDamageHyperelastic::constitutive( } } - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ q->getRefToIrreversibleEnergy() = q->defoEnergy(); } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ q->getRefToIrreversibleEnergy() = q->damageEnergy(); } else{ @@ -221,15 +221,15 @@ void mlawLocalAnisotropicDamageHyperelastic::constitutive( if (stiff){ STensor3& DIrrevEnergyDF = q->getRefToDIrreversibleEnergyDF(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ for (int i=0; i<3; i++){ for (int j=0; j<3; j++){ DIrrevEnergyDF(i,j) = effPp(i,j)*(1-D) - effEnergPos*q->getDDamageDp()*dLocalVardF(i,j) + effPm(i,j); } } } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ for (int i=0; i<3; i++){ for (int j=0; j<3; j++){ DIrrevEnergyDF(i,j) = effPp(i,j)*(D-q0->getDamage()) + effEnergPos*q->getDDamageDp()*dLocalVardF(i,j); diff --git a/NonLinearSolver/materialLaw/mlawJ2linear.cpp b/NonLinearSolver/materialLaw/mlawJ2linear.cpp index d75c247a01799790ebf54cf1b37d9b95e9d46651..d55982f734dc3848ad7abd07f308d9898e085fce 100644 --- a/NonLinearSolver/materialLaw/mlawJ2linear.cpp +++ b/NonLinearSolver/materialLaw/mlawJ2linear.cpp @@ -534,12 +534,12 @@ void mlawJ2linear::predictorCorector(const STensor3& F0, // initial defo } // irreversible energy - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ // q->getRefToIrreversibleEnergy() = q->defoEnergy(); } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { q->getRefToIrreversibleEnergy() = q->plasticEnergy(); } else{ @@ -813,7 +813,7 @@ void mlawJ2linear::predictorCorector(const STensor3& F0, // initial defo // irreversible energy STensor3& DirrEnegDF = q->getRefToDIrreversibleEnergyDF(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DirrEnegDF(i,j) = 0.; @@ -827,8 +827,8 @@ void mlawJ2linear::predictorCorector(const STensor3& F0, // initial defo } } } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { DirrEnegDF = dpdF; DirrEnegDF*= (Sy+H*Deps); } diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamage.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamage.cpp index 08def763edce1c0a80d6b73fd6b8663776ed4457..6a0af8d92544ab1e29ad4db35e3f8076db2e40c0 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamage.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamage.cpp @@ -19,7 +19,7 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, - const char *propName) : materialLawWithDamage(num,true), _rho(rho) + const char *propName) : materialLaw(num,true), _rho(rho) { sq2 = sqrt(2.); @@ -55,12 +55,24 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, } mat = init_material(props,0); nsdv = mat->get_nsdv(); + nlVar=mat->getNbNonLocalVariables(); + mallocvector(&dpdE,6); mallocvector(&strs_dDdp_bar,6); - mallocmatrix(&chara_Length,3,3); //by Wu Ling 2011/10/04 + mallocvector(&dFd_dE,6); + mallocvector(&dstrs_dFd_bar,6); + + + mallocmatrix(&chara_Length,3,3); + mallocmatrix(&chara_Length_INC,3,3); + SpBar = 0.0; + dFd_d_bar = 0.0; + dpdFd = 0.0; + dFddp = 0.0; + int model = (int)props[0]; switch(model){ @@ -101,7 +113,7 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, } mlawNonLocalDamage::mlawNonLocalDamage(const mlawNonLocalDamage &source) : - materialLawWithDamage(source), _rho(source._rho), _mu0(source._mu0), _nu0(source._nu0) + materialLaw(source), _rho(source._rho), _mu0(source._mu0), _nu0(source._nu0) { sq2 = sqrt(2.); @@ -158,30 +170,42 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, } mat = init_material(props,0); nsdv = mat->get_nsdv(); + nlVar=source.nlVar; mallocvector(&dpdE,6); mallocvector(&strs_dDdp_bar,6); + mallocvector(&dFd_dE,6); + mallocvector(&dstrs_dFd_bar,6); + for(int i=0; i< 6; i++) { dpdE[i] = source.dpdE[i]; strs_dDdp_bar[i] = source.strs_dDdp_bar[i]; + dFd_dE[i] = source.dFd_dE[i]; + dstrs_dFd_bar[i] = source.dstrs_dFd_bar[i]; + } - mallocmatrix(&chara_Length,3,3); //by Wu Ling 2011/10/04 + mallocmatrix(&chara_Length,3,3); + mallocmatrix(&chara_Length_INC,3,3); for(int i=0; i< 3; i++) { for (int j=0; j<3; j++) { chara_Length[i][j] = source.chara_Length[i][j]; + chara_Length_INC[i][j] = source.chara_Length_INC[i][j]; } } // by Wu Ling 2011/10/04 SpBar = source.SpBar; + dFd_d_bar = source.dFd_d_bar; + dpdFd = source.dpdFd; + dFddp = source.dFddp; } mlawNonLocalDamage& mlawNonLocalDamage::operator=(const materialLaw &source) { - materialLawWithDamage::operator=(source); + materialLaw::operator=(source); const mlawNonLocalDamage* src =static_cast<const mlawNonLocalDamage*>(&source); _rho = src->_rho; @@ -223,11 +247,14 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, } mat = init_material(props,0); nsdv = mat->get_nsdv(); + nlVar= src->nlVar; for(int i=0; i< 6; i++) { dpdE[i] = src->dpdE[i]; strs_dDdp_bar[i] = src->strs_dDdp_bar[i]; + dFd_dE[i] = src->dFd_dE[i]; + dstrs_dFd_bar[i] = src->dstrs_dFd_bar[i]; } for(int i=0; i< 3; i++) @@ -235,9 +262,13 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, for (int j=0; j<3; j++) { chara_Length[i][j] = src->chara_Length[i][j]; + chara_Length_INC[i][j] = src->chara_Length_INC[i][j]; } } // by Wu Ling 2011/10/04 SpBar = src->SpBar; + dFd_d_bar = src->dFd_d_bar; + dpdFd = src->dpdFd; + dFddp = src->dFddp; return *this; } @@ -263,8 +294,11 @@ mlawNonLocalDamage::mlawNonLocalDamage(const int num, const double rho, free(dpdE); free(strs_dDdp_bar); + free(dFd_dE); + free(dstrs_dFd_bar); - freematrix(chara_Length,3); // by Wu Ling 2011/10/04 + freematrix(chara_Length,3); + freematrix(chara_Length_INC,3); } void mlawNonLocalDamage::createIPState(IPNonLocalDamage *ivi, IPNonLocalDamage *iv1, IPNonLocalDamage *iv2) const { @@ -276,13 +310,44 @@ void mlawNonLocalDamage::createIPState(IPNonLocalDamage *ivi, IPNonLocalDamage * double *stv1 = iv1->_nldStatev; double *stv2 = iv2->_nldStatev; double SpBartmp = 0.0; - mat->constbox(dstrn, strs_n, strs, stvi, stv1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, kinc, kstep,_timeStep); + double dFd_d_bartmp = 0.0; + double dpdFdtmp = 0.0; + double dFddptmp = 0.0; + + double Dmax=0.9999; + ivi->setPosMaxD(mat->get_pos_maxD()); + ivi->setPosIncMaxD(mat->get_pos_inc_maxD()); + ivi->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + iv1->setPosMaxD(mat->get_pos_maxD()); + iv1->setPosIncMaxD(mat->get_pos_inc_maxD()); + iv1->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + iv2->setPosMaxD(mat->get_pos_maxD()); + iv2->setPosIncMaxD(mat->get_pos_inc_maxD()); + iv2->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + + ivi->setMaxD(Dmax); + ivi->setIncMaxD(Dmax); + ivi->setMtxMaxD(Dmax); + iv1->setMaxD(Dmax); + iv1->setIncMaxD(Dmax); + iv1->setMtxMaxD(Dmax); + iv2->setMaxD(Dmax); + iv2->setIncMaxD(Dmax); + iv2->setMtxMaxD(Dmax); + + + + mat->constbox(dstrn, strs_n, strs, stvi, stv1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, &dFd_d_bartmp, dstrs_dFd_bar, dFd_dE, chara_Length_INC, &dpdFdtmp, &dFddptmp, kinc, kstep, _timeStep); + for(int i=0;i<3;i++) { for(int j=0;j<3;j++){ ivi->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling iv1->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling iv2->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling + ivi->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; + iv1->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; + iv2->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; } } ivi->setPosStrMtx(mat->get_pos_mtx_stress()); @@ -293,6 +358,8 @@ void mlawNonLocalDamage::createIPState(IPNonLocalDamage *ivi, IPNonLocalDamage * iv1->setPosStrInc(mat->get_pos_inc_stress()); iv1->setPosStnMtx(mat->get_pos_mtx_strain()); iv1->setPosStnInc(mat->get_pos_inc_strain()); + iv1->setPosIncDam(mat->get_pos_inc_Dam()); + iv1->setPosMtxDam(mat->get_pos_mtx_Dam()); iv2->setPosStrMtx(mat->get_pos_mtx_stress()); iv2->setPosStrInc(mat->get_pos_inc_stress()); iv2->setPosStnMtx(mat->get_pos_mtx_strain()); @@ -302,11 +369,17 @@ void mlawNonLocalDamage::createIPState(IPNonLocalDamage *ivi, IPNonLocalDamage * ivi->setPosIncR(mat->get_pos_Ri()); ivi->setPosIncJa(mat->get_pos_inc_Ja()); ivi->setPosMtxJa(mat->get_pos_mtx_Ja()); + ivi->setPosIncDam(mat->get_pos_inc_Dam()); + ivi->setPosMtxDam(mat->get_pos_mtx_Dam()); iv2->setPosIncVfi(mat->get_pos_vfi()); iv2->setPosIncAR(mat->get_pos_aspR()); iv2->setPosIncR(mat->get_pos_Ri()); iv2->setPosIncJa(mat->get_pos_inc_Ja()); iv2->setPosMtxJa(mat->get_pos_mtx_Ja()); + iv2->setPosIncDam(mat->get_pos_inc_Dam()); + iv2->setPosMtxDam(mat->get_pos_mtx_Dam()); + + copyvect(stv1,stvi,nsdv); copyvect(stv1,stv2,nsdv); @@ -320,12 +393,26 @@ void mlawNonLocalDamage::createIPVariable(IPNonLocalDamage *&ipv,const MElement int kinc = 1; double *stvi = ipv->_nldStatev; double SpBartmp = 0.0; - // stv1 ?? - mat->constbox(dstrn, strs_n, strs, stvi, stvi, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, kinc, kstep, _timeStep); + double dFd_d_bartmp = 0.0; + double dpdFdtmp = 0.0; + double dFddptmp = 0.0; + + double Dmax=0.9999; + ipv->setPosMaxD(mat->get_pos_maxD()); + ipv->setPosIncMaxD(mat->get_pos_inc_maxD()); + ipv->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + + ipv->setMaxD(Dmax); + ipv->setIncMaxD(Dmax); + ipv->setMtxMaxD(Dmax); + + mat->constbox(dstrn, strs_n, strs, stvi, stvi, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, &dFd_d_bartmp, dstrs_dFd_bar, dFd_dE, chara_Length_INC, &dpdFdtmp, &dFddptmp, kinc, kstep, _timeStep); + for(int i=0;i<3;i++) { for(int j=0;j<3;j++){ ipv->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling + ipv->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; //by Wu Ling } } ipv->setPosStrMtx(mat->get_pos_mtx_stress()); @@ -337,6 +424,8 @@ void mlawNonLocalDamage::createIPVariable(IPNonLocalDamage *&ipv,const MElement ipv->setPosIncR(mat->get_pos_Ri()); ipv->setPosIncJa(mat->get_pos_inc_Ja()); ipv->setPosMtxJa(mat->get_pos_mtx_Ja()); + ipv->setPosIncDam(mat->get_pos_inc_Dam()); + ipv->setPosMtxDam(mat->get_pos_mtx_Dam()); } double mlawNonLocalDamage::soundSpeed() const @@ -348,7 +437,6 @@ double mlawNonLocalDamage::soundSpeed() const return sqrt(E*factornu/_rho); } - void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STensor3 &P,const IPVariable *ipvprevi, IPVariable *ipvcuri,STensor43 &Tangent,const bool stiff,STensor43* elasticTangent) const { @@ -416,6 +504,12 @@ void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STen statev_n[mat->get_pos_effectiveplasticstrainfornonlocal()+1] = (ipvcur->_nldEffectivePlasticStrain- ipvprev->_nldEffectivePlasticStrain); } + if( mat->get_pos_Fd_bar() > 0 ) + { + statev_n[mat->get_pos_Fd_bar()] = ipvprev->_nlFiber_d_bar; + statev_n[mat->get_pos_dFd_bar()] = (ipvcur->_nlFiber_d_bar - ipvprev->_nlFiber_d_bar); + } + // to required to use Eshelby tensor of previous step? copyvect(statev_n,statev_1,nsdv); @@ -432,7 +526,12 @@ void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STen int kinc = 1; int kstep = 2; SpBar = 0.0; - mat->constbox(dstrn, strs_n, strs, statev_n, statev_1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBar, chara_Length, kinc, kstep,_timeStep); + dFd_d_bar = 0.0; + dpdFd = 0.0; + dFddp = 0.0; + + + mat->constbox(dstrn, strs_n, strs, statev_n, statev_1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBar, chara_Length, &dFd_d_bar, dstrs_dFd_bar, dFd_dE, chara_Length_INC, &dpdFd, &dFddp, kinc, kstep, _timeStep); //update stress and tangent operator for(int i=0;i<3;i++) @@ -442,15 +541,25 @@ void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STen (ipvcur->_nldMaterialTensor)(i,j)=Calgo[i][j]; (ipvcur->_nldCharacteristicLengthMatrix)(i,j) = chara_Length[i][j]; //by Wu Ling + (ipvcur->_nldCharacteristicLengthFiber)(i,j) = chara_Length_INC[i][j]; } if( mat->get_pos_damagefornonlocal()>0) { ipvcur->_nldCouplingStressEffectiveStrain(i) = strs_dDdp_bar[i]; ipvcur->_nldCouplingEffectiveStrainStress(i) = dpdE[i]; } - + if( mat->get_pos_Fd_bar()>0) + { + ipvcur->_nldFiberDamdStrain(i) = dFd_dE[i]; + ipvcur->_nldStressdFiberDam(i) = dstrs_dFd_bar[i]; + } } + ipvcur->_nldSpBar = SpBar; + ipvcur->_nldFd_d_bar = dFd_d_bar; + ipvcur->_nldpdFd = dpdFd; + ipvcur->_nldFddp = dFddp; + for(int i=3;i<6;i++) { (ipvcur->_nldStress)(i)=strs[i]/sq2; @@ -468,16 +577,31 @@ void mlawNonLocalDamage::constitutive(const STensor3& F0,const STensor3& Fn,STen ipvcur->_nldCouplingStressEffectiveStrain(i) = strs_dDdp_bar[i]/sq2; ipvcur->_nldCouplingEffectiveStrainStress(i) = dpdE[i]/sq2; } + if( mat->get_pos_Fd_bar()>0) + { + ipvcur->_nldFiberDamdStrain(i) = dFd_dE[i]/sq2; + ipvcur->_nldStressdFiberDam(i) = dstrs_dFd_bar[i]/sq2; + } } if( mat->get_pos_damagefornonlocal() >= 0) { ipvcur->_nldDamage = statev_1[mat->get_pos_damagefornonlocal()]; } + if( mat->get_pos_Fd_bar() > 0) + { + ipvcur->_nlFiber_d_bar = statev_1[mat->get_pos_Fd_bar()]; + } + if( mat->get_pos_currentplasticstrainfornonlocal() >=0) { ipvcur->_nldCurrentPlasticStrain = statev_1[mat->get_pos_currentplasticstrainfornonlocal()]; } + if( mat->get_pos_locFd() >0) + { + ipvcur->_nlFiber_loc = statev_1[mat->get_pos_locFd()]; + } + ipvcur->_elasticEne = mat->getElasticEnergy(statev_1); ipvcur->_plasticEne = mat->getPlasticEnergy(statev_1); //convert str to P :order xx yy zz xy xz yz @@ -637,9 +761,11 @@ void mlawNonLocalDamage::constitutive( const IPVariable *ipvprevi, // array of initial internal variable IPVariable *ipvcuri, // updated array of internal variable (in ipvcur on output), STensor43 &Tangent, // constitutive tangents (output) - STensor3 &dLocalPlasticStrainDStrain, - STensor3 &dStressDNonLocalPlasticStrain, - double &dLocalPlasticStrainDNonLocalPlasticStrain, + std::vector<STensor3> &dLocalPlasticStrainDStrain, + std::vector<STensor3> &dGradLocalPlasticStrainDStrain, + std::vector<STensor3> &dStressDNonLocalPlasticStrain, + fullMatrix<double> &dLocalPlasticStrainDNonLocalPlasticStrain, + fullMatrix<double> &dLocalPlasticStrainDGradNonLocalPlasticStrain, const bool stiff, STensor43* elasticTangent) const { @@ -650,28 +776,82 @@ void mlawNonLocalDamage::constitutive( mlawNonLocalDamage::constitutive(F0, Fn, P, ipvprev, ipvcur, Tangent, stiff,elasticTangent); if(stiff) { - dLocalPlasticStrainDStrain(0,0) = ipvcur->_nldCouplingEffectiveStrainStress(0); - dLocalPlasticStrainDStrain(1,1) = ipvcur->_nldCouplingEffectiveStrainStress(1); - dLocalPlasticStrainDStrain(2,2) = ipvcur->_nldCouplingEffectiveStrainStress(2); - dLocalPlasticStrainDStrain(0,1) = ipvcur->_nldCouplingEffectiveStrainStress(3); - dLocalPlasticStrainDStrain(1,0) = ipvcur->_nldCouplingEffectiveStrainStress(3); - dLocalPlasticStrainDStrain(0,2) = ipvcur->_nldCouplingEffectiveStrainStress(4); - dLocalPlasticStrainDStrain(2,0) = ipvcur->_nldCouplingEffectiveStrainStress(4); - dLocalPlasticStrainDStrain(2,1) = ipvcur->_nldCouplingEffectiveStrainStress(5); - dLocalPlasticStrainDStrain(1,2) = ipvcur->_nldCouplingEffectiveStrainStress(5); - - dStressDNonLocalPlasticStrain(0,0) = ipvcur->_nldCouplingStressEffectiveStrain(0); - dStressDNonLocalPlasticStrain(1,1) = ipvcur->_nldCouplingStressEffectiveStrain(1); - dStressDNonLocalPlasticStrain(2,2) = ipvcur->_nldCouplingStressEffectiveStrain(2); - dStressDNonLocalPlasticStrain(0,1) = ipvcur->_nldCouplingStressEffectiveStrain(3); - dStressDNonLocalPlasticStrain(1,0) = ipvcur->_nldCouplingStressEffectiveStrain(3); - dStressDNonLocalPlasticStrain(0,2) = ipvcur->_nldCouplingStressEffectiveStrain(4); - dStressDNonLocalPlasticStrain(2,0) = ipvcur->_nldCouplingStressEffectiveStrain(4); - dStressDNonLocalPlasticStrain(2,1) = ipvcur->_nldCouplingStressEffectiveStrain(5); - dStressDNonLocalPlasticStrain(1,2) = ipvcur->_nldCouplingStressEffectiveStrain(5); - - dLocalPlasticStrainDNonLocalPlasticStrain = ipvcur->_nldSpBar; + dLocalPlasticStrainDStrain[0](0,0) = ipvcur->_nldCouplingEffectiveStrainStress(0); //minus? + dLocalPlasticStrainDStrain[0](1,1) = ipvcur->_nldCouplingEffectiveStrainStress(1); + dLocalPlasticStrainDStrain[0](2,2) = ipvcur->_nldCouplingEffectiveStrainStress(2); + dLocalPlasticStrainDStrain[0](0,1) = ipvcur->_nldCouplingEffectiveStrainStress(3); + dLocalPlasticStrainDStrain[0](1,0) = ipvcur->_nldCouplingEffectiveStrainStress(3); + dLocalPlasticStrainDStrain[0](0,2) = ipvcur->_nldCouplingEffectiveStrainStress(4); + dLocalPlasticStrainDStrain[0](2,0) = ipvcur->_nldCouplingEffectiveStrainStress(4); + dLocalPlasticStrainDStrain[0](2,1) = ipvcur->_nldCouplingEffectiveStrainStress(5); + dLocalPlasticStrainDStrain[0](1,2) = ipvcur->_nldCouplingEffectiveStrainStress(5); + + dGradLocalPlasticStrainDStrain[0](0,0) = 0.; + dGradLocalPlasticStrainDStrain[0](1,1) = 0.; + dGradLocalPlasticStrainDStrain[0](2,2) = 0.; + dGradLocalPlasticStrainDStrain[0](0,1) = 0.; + dGradLocalPlasticStrainDStrain[0](1,0) = 0.; + dGradLocalPlasticStrainDStrain[0](0,2) = 0.; + dGradLocalPlasticStrainDStrain[0](2,0) = 0.; + dGradLocalPlasticStrainDStrain[0](2,1) = 0.; + dGradLocalPlasticStrainDStrain[0](1,2) = 0.; + + dStressDNonLocalPlasticStrain[0](0,0) = ipvcur->_nldCouplingStressEffectiveStrain(0); + dStressDNonLocalPlasticStrain[0](1,1) = ipvcur->_nldCouplingStressEffectiveStrain(1); + dStressDNonLocalPlasticStrain[0](2,2) = ipvcur->_nldCouplingStressEffectiveStrain(2); + dStressDNonLocalPlasticStrain[0](0,1) = ipvcur->_nldCouplingStressEffectiveStrain(3); + dStressDNonLocalPlasticStrain[0](1,0) = ipvcur->_nldCouplingStressEffectiveStrain(3); + dStressDNonLocalPlasticStrain[0](0,2) = ipvcur->_nldCouplingStressEffectiveStrain(4); + dStressDNonLocalPlasticStrain[0](2,0) = ipvcur->_nldCouplingStressEffectiveStrain(4); + dStressDNonLocalPlasticStrain[0](2,1) = ipvcur->_nldCouplingStressEffectiveStrain(5); + dStressDNonLocalPlasticStrain[0](1,2) = ipvcur->_nldCouplingStressEffectiveStrain(5); + + dLocalPlasticStrainDNonLocalPlasticStrain(0,0) = ipvcur->_nldSpBar; + if(getNbNonLocalVariables()>1){ + dLocalPlasticStrainDNonLocalPlasticStrain(1,0) = ipvcur->_nldFddp; + dLocalPlasticStrainDNonLocalPlasticStrain(0,1) = ipvcur->_nldpdFd; + dLocalPlasticStrainDNonLocalPlasticStrain(1,1) = ipvcur->_nldFd_d_bar; + } + + dLocalPlasticStrainDGradNonLocalPlasticStrain(0,0) = 0.; + if(getNbNonLocalVariables()>1){ + dLocalPlasticStrainDGradNonLocalPlasticStrain(1,0) = 0.; + dLocalPlasticStrainDGradNonLocalPlasticStrain(0,1) = 0.; + dLocalPlasticStrainDGradNonLocalPlasticStrain(1,1) = 0.; + } + if(getNbNonLocalVariables()>1){ + dLocalPlasticStrainDStrain[1](0,0) = ipvcur->_nldFiberDamdStrain(0); + dLocalPlasticStrainDStrain[1](1,1) = ipvcur->_nldFiberDamdStrain(1); + dLocalPlasticStrainDStrain[1](2,2) = ipvcur->_nldFiberDamdStrain(2); + dLocalPlasticStrainDStrain[1](0,1) = ipvcur->_nldFiberDamdStrain(3); + dLocalPlasticStrainDStrain[1](1,0) = ipvcur->_nldFiberDamdStrain(3); + dLocalPlasticStrainDStrain[1](0,2) = ipvcur->_nldFiberDamdStrain(4); + dLocalPlasticStrainDStrain[1](2,0) = ipvcur->_nldFiberDamdStrain(4); + dLocalPlasticStrainDStrain[1](2,1) = ipvcur->_nldFiberDamdStrain(5); + dLocalPlasticStrainDStrain[1](1,2) = ipvcur->_nldFiberDamdStrain(5); + + dGradLocalPlasticStrainDStrain[1](0,0) = 0.; + dGradLocalPlasticStrainDStrain[1](1,1) = 0.; + dGradLocalPlasticStrainDStrain[1](2,2) = 0.; + dGradLocalPlasticStrainDStrain[1](0,1) = 0.; + dGradLocalPlasticStrainDStrain[1](1,0) = 0.; + dGradLocalPlasticStrainDStrain[1](0,2) = 0.; + dGradLocalPlasticStrainDStrain[1](2,0) = 0.; + dGradLocalPlasticStrainDStrain[1](2,1) = 0.; + dGradLocalPlasticStrainDStrain[1](1,2) = 0.; + + + dStressDNonLocalPlasticStrain[1](0,0) = ipvcur->_nldStressdFiberDam(0); + dStressDNonLocalPlasticStrain[1](1,1) = ipvcur->_nldStressdFiberDam(1); + dStressDNonLocalPlasticStrain[1](2,2) = ipvcur->_nldStressdFiberDam(2); + dStressDNonLocalPlasticStrain[1](0,1) = ipvcur->_nldStressdFiberDam(3); + dStressDNonLocalPlasticStrain[1](1,0) = ipvcur->_nldStressdFiberDam(3); + dStressDNonLocalPlasticStrain[1](0,2) = ipvcur->_nldStressdFiberDam(4); + dStressDNonLocalPlasticStrain[1](2,0) = ipvcur->_nldStressdFiberDam(4); + dStressDNonLocalPlasticStrain[1](2,1) = ipvcur->_nldStressdFiberDam(5); + dStressDNonLocalPlasticStrain[1](1,2) = ipvcur->_nldStressdFiberDam(5); + } } } diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamage.h b/NonLinearSolver/materialLaw/mlawNonLocalDamage.h index 0a7c6fbf5b5a47c3ad542a7f8837d50020a74878..1b22ff8ef092729fb339811e769dd7567619b90f 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamage.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamage.h @@ -19,7 +19,7 @@ #include "material.h" #include "nonLocalDamageLaw.h" -class mlawNonLocalDamage : public materialLawWithDamage +class mlawNonLocalDamage : public materialLaw { protected: @@ -45,14 +45,23 @@ class mlawNonLocalDamage : public materialLawWithDamage int nprops1; int nsdv; + int nlVar; mutable double* dpdE; mutable double* strs_dDdp_bar; mutable double** chara_Length; + mutable double** chara_Length_INC; mutable double SpBar; + mutable double dFd_d_bar; + mutable double dpdFd; + mutable double dFddp; + + mutable double* dFd_dE; + mutable double* dstrs_dFd_bar; public: mlawNonLocalDamage(const int num, const double rho, const char *propName); + void setNumberOfNonLocalVariables(int nb) {nlVar=nb;}; //in case we want to combine two materials of different kind #ifndef SWIG mlawNonLocalDamage(const mlawNonLocalDamage &source); @@ -76,6 +85,7 @@ class mlawNonLocalDamage : public materialLawWithDamage virtual const double bulkModulus() const; virtual const double shearModulus() const; virtual const double poissonRatio() const; + virtual int getNbNonLocalVariables() const {return nlVar;}; // specific function public: virtual void constitutive( @@ -97,11 +107,13 @@ class mlawNonLocalDamage : public materialLawWithDamage const IPVariable *q0, // array of initial internal variable IPVariable *q1, // updated array of internal variable (in ipvcur on output), STensor43 &Tangent, // constitutive tangents (output) - STensor3 &dLocalPlasticStrainDStrain, - STensor3 &dStressDNonLocalPlasticStrain, - double &dLocalPlasticStrainDNonLocalPlasticStrain, + std::vector< STensor3 > &dLocalPlasticStrainDStrain, + std::vector< STensor3 > &dGradLocalPlasticStrainDStrain, + std::vector< STensor3 > &dStressDNonLocalPlasticStrain, + fullMatrix<double> &dLocalPlasticStrainDNonLocalPlasticStrain, + fullMatrix<double> &dLocalPlasticStrainDGradNonLocalPlasticStrain, const bool stiff, // if true compute the tangents - STensor43* elasticTangent = NULL) const; + STensor43* elasticTangent = NULL) const; int getNsdv() const { return nsdv;} diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageHyperelastic.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamageHyperelastic.cpp index b568e803b949f6c388b863340b62e649f9662233..73a00ae408bb5a88e055233e2501f5ccd8123286 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamageHyperelastic.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageHyperelastic.cpp @@ -119,16 +119,16 @@ void mlawNonLocalDamagePowerYieldHyper::constitutive( ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy()+ DenerPlas*(1-D); ipvcur->getRefToDamageEnergy() = ipvprev->damageEnergy()+ ene*(D-Dprev); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->defoEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { ipvcur->getRefToIrreversibleEnergy() = ipvcur->plasticEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->damageEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->plasticEnergy()+ipvcur->damageEnergy(); } else{ @@ -164,17 +164,17 @@ void mlawNonLocalDamagePowerYieldHyper::constitutive( dLocalPlasticStrainDNonLocalPlasticStrain = 0.; STensor3& DirrEnergDF = ipvcur->getRefToDIrreversibleEnergyDF(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ DirrEnergDF*= (1-D); DirrEnergDF.daxpy(dDdF,-ene); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable() = -ene*ipvcur->getDDamageDp(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { DirrEnergDF*= (1-D); DirrEnergDF.daxpy(dDdF,-DenerPlas); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable() = -DenerPlas*ipvcur->getDDamageDp(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DirrEnergDF(i,j) = 0.; @@ -190,7 +190,7 @@ void mlawNonLocalDamagePowerYieldHyper::constitutive( DirrEnergDF.daxpy(dDdF,ene); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable() = ene*ipvcur->getDDamageDp(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ DirrEnergDF*= (1-D); for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ @@ -320,16 +320,16 @@ void mlawLocalDamagePowerYieldHyperWithFailure::constitutive( ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy() + (1-D)*DenerPlas; ipvcur->getRefToDamageEnergy() = ipvprev->damageEnergy() + ene*(D-Dprev); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->defoEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { ipvcur->getRefToIrreversibleEnergy() = ipvcur->plasticEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->damageEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->plasticEnergy()+ipvcur->damageEnergy(); } else{ @@ -365,15 +365,15 @@ void mlawLocalDamagePowerYieldHyperWithFailure::constitutive( } STensor3& DirrEnergDF = ipvcur->getRefToDIrreversibleEnergyDF(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ DirrEnergDF*= (1-D); DirrEnergDF.daxpy(dDdF,-ene); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) { DirrEnergDF*= (1-D); DirrEnergDF.daxpy(dDdF,-DenerPlas); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DirrEnergDF(i,j) = 0.; @@ -388,7 +388,7 @@ void mlawLocalDamagePowerYieldHyperWithFailure::constitutive( } DirrEnergDF.daxpy(dDdF,ene); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ DirrEnergDF*= (1-D); for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ @@ -635,16 +635,16 @@ void mlawNonLocalDamagePowerYieldHyperWithFailure::predictorCorrector( ipvcur->getRefToPlasticEnergy() = ipvprev->plasticEnergy() + (1.-D)*plasticDisStep; ipvcur->getRefToDamageEnergy() = ipvprev->damageEnergy() + ene*DeltaD; - if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->defoEnergy(); } - else if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ + else if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->plasticEnergy(); } - else if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ + else if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->damageEnergy(); } - else if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ ipvcur->getRefToIrreversibleEnergy() = ipvcur->plasticEnergy()+ipvcur->damageEnergy(); } else{ @@ -697,21 +697,21 @@ void mlawNonLocalDamagePowerYieldHyperWithFailure::predictorCorrector( // for irreversible energy STensor3& DirrEnergDF = ipvcur->getRefToDIrreversibleEnergyDF(); - if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ DirrEnergDF*= (1-D); DirrEnergDF.daxpy(dDdF,-ene); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) = (-ene)*(ipvcur->getDDamageDp(0)*(1.- D1)); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(1) = (-ene)*(ipvcur->getDDamageDp(1)*(1.- D0)); } - else if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ + else if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ DirrEnergDF *= (1-D); DirrEnergDF.daxpy(dDdF,-plasticDisStep); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) = (-plasticDisStep)*(ipvcur->getDDamageDp(0)*(1.- D1)); ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(1) = (-plasticDisStep)*(ipvcur->getDDamageDp(1)*(1.- D0)); } - else if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ + else if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DirrEnergDF(i,j) = 0.; @@ -735,7 +735,7 @@ void mlawNonLocalDamagePowerYieldHyperWithFailure::predictorCorrector( ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(1) = (ene)*(ipvcur->getDDamageDp(1)*(1.- D0- (D0-D0prev))); } - else if (getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ // plastic part DirrEnergDF *= (1-D); DirrEnergDF.daxpy(dDdF,-plasticDisStep); diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageIsotropicElasticity.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamageIsotropicElasticity.cpp index 42b6466227a08b391acaf2f45805eacfe6e163b2..fdd2e14eb5a0bc72c41be2041c289f9c0a341aa1 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamageIsotropicElasticity.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageIsotropicElasticity.cpp @@ -396,11 +396,11 @@ void mlawNonLocalDamageIsotropicElasticity::constitutive( // Path following only - irreversible energy // Dissipated energy = previous dissipated energy + Y delta_D - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ q1->getRefToIrreversibleEnergy() = q1->defoEnergy(); } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ q1->getRefToIrreversibleEnergy() = q1->damageEnergy(); } @@ -416,7 +416,7 @@ void mlawNonLocalDamageIsotropicElasticity::constitutive( DIrrevEnergyDF = Peff; - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ DIrrevEnergyDF*= (1.-D); if (q1->getNonLocalToLocal()){ DIrrevEnergyDF.daxpy(dLocalEffectiveStrainsDStrains,-q1->getDDamageDp()*effEner); @@ -427,8 +427,8 @@ void mlawNonLocalDamageIsotropicElasticity::constitutive( DIrrevEnergyDNonlocalVar = -effEner*q1->getDDamageDp(); } } - else if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ + else if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY)){ DIrrevEnergyDF *= (D - q0->getDamage()); if (q1->getNonLocalToLocal()){ DIrrevEnergyDF.daxpy(dLocalEffectiveStrainsDStrains,q1->getDDamageDp()*effEner); diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2Hyper.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2Hyper.cpp index be53d5328597f4ea7be80a58c4bff4407a110084..b1280d4fe92545de9ba721c9f6ff8018bf023bc1 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2Hyper.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2Hyper.cpp @@ -211,16 +211,16 @@ void mlawNonLocalDamageJ2Hyper::constitutive( // irreversible energy double& irrEneg = ipvcur->getRefToIrreversibleEnergy(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ irrEneg = ipvcur->defoEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ irrEneg = ipvcur->plasticEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY) { irrEneg = ipvcur->damageEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ irrEneg = ipvcur->plasticEnergy()+ ipvcur->damageEnergy(); } else{ @@ -285,7 +285,7 @@ void mlawNonLocalDamageJ2Hyper::constitutive( STensor3& DdissEnergDF = ipvcur->getRefToDIrreversibleEnergyDF(); double& DdissEnergDNonlocalVar = ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ DdissEnergDF *= (1-D); DdissEnergDF.daxpy(DDamageDF,-ene); if (ipvcur->getNonLocalToLocal()){ @@ -296,7 +296,7 @@ void mlawNonLocalDamageJ2Hyper::constitutive( DdissEnergDNonlocalVar = -ipvcur->getDDamageDp()*ene; } } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ DdissEnergDF *= (1-D); DdissEnergDF.daxpy(DDamageDF,-dPlasticDisp); @@ -308,7 +308,7 @@ void mlawNonLocalDamageJ2Hyper::constitutive( DdissEnergDNonlocalVar = -ipvcur->getDDamageDp()*dPlasticDisp; } } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY) { for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ DdissEnergDF(i,j) = 0.; @@ -331,7 +331,7 @@ void mlawNonLocalDamageJ2Hyper::constitutive( } } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ DdissEnergDF *= (1-D); for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2SmallStrain.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2SmallStrain.cpp index 01e66f5119f65d6e56588a04943f155d5b16ecf4..2726199928fe4214b9ab2d38a1324ae9fdebd3c7 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2SmallStrain.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamageJ2SmallStrain.cpp @@ -163,16 +163,16 @@ void mlawNonLocalDamageJ2SmallStrain::constitutive( // irreversible energy double& irrEneg = ipvcur->getRefToIrreversibleEnergy(); - if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ + if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DEFO_ENERGY){ irrEneg = ipvcur->defoEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY){ irrEneg = ipvcur->plasticEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY) { + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DAMAGE_ENERGY) { irrEneg = ipvcur->damageEnergy(); } - else if (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ + else if (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY){ irrEneg = ipvcur->plasticEnergy()+ ipvcur->damageEnergy(); } else{ diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp b/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp index f27daa4ba36f24e7203fef3e0849364ca1576ef3..a79efae2977530e1214f784b9c62c354483f9078 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.cpp @@ -12,6 +12,8 @@ #include <math.h> #include "MInterfaceElement.h" #include <fstream> +#include <stdio.h> +#include <stdlib.h> #include "mlawNonLocalDamage.h" #include "mlawNonLocalDamage_Stoch.h" @@ -27,6 +29,8 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r pos_Mhexp = mat->get_pos_hexp(); pos_DamParm1 = mat->get_pos_DamParm1(); pos_DamParm2 = mat->get_pos_DamParm2(); + pos_INCDamParm1 = mat->get_pos_INCDamParm1(); + pos_INCDamParm2 = mat->get_pos_INCDamParm2(); Randnum = 0; if(pos_vfi !=0) Randnum +=1; @@ -40,6 +44,8 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r if(pos_euler !=0) Randnum +=1; if(pos_DamParm1 !=0) Randnum +=1; if(pos_DamParm2 !=0) Randnum +=1; + if(pos_INCDamParm1 !=0) Randnum +=1; + if(pos_INCDamParm2 !=0) Randnum +=1; //allocate memory if random variable are required if (pos_euler != 0){ @@ -55,8 +61,7 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r else if ( Randnum != 0){ RMatProp = init_RandF(Randnum, _Ldomain, _OrigX, _OrigY,_OrigZ, _dx, _dy, _dz, RandProp); } - - } +} mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double rho, const char *propName, const double Ori_x, const double Ori_y, const double Ori_z,const double Lx,const double Ly,const double Lz, const char *RandProp, const int intpl): mlawNonLocalDamage(num, rho, propName), _OrigX(Ori_x), _OrigY(Ori_y), _OrigZ(Ori_z), _Ldomain(Lx, Ly, Lz), _intpl(intpl), Reuler(NULL), RMatProp(NULL), _Euler_mean(NULL){ @@ -76,6 +81,8 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r pos_Mhexp = mat->get_pos_hexp(); pos_DamParm1 = mat->get_pos_DamParm1(); pos_DamParm2 = mat->get_pos_DamParm2(); + pos_INCDamParm1 = mat->get_pos_INCDamParm1(); + pos_INCDamParm2 = mat->get_pos_INCDamParm2(); Randnum = 0; if(pos_vfi !=0) Randnum +=1; @@ -89,6 +96,8 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r if(pos_euler !=0) Randnum +=1; if(pos_DamParm1 !=0) Randnum +=1; if(pos_DamParm2 !=0) Randnum +=1; + if(pos_INCDamParm1 !=0) Randnum +=1; + if(pos_INCDamParm2 !=0) Randnum +=1; //allocate memory if random variable are required // read random property variables from @@ -262,8 +271,8 @@ mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const int num, const double r mlawNonLocalDamage_Stoch::mlawNonLocalDamage_Stoch(const mlawNonLocalDamage_Stoch &source): mlawNonLocalDamage(source), pos_vfi(source.pos_vfi), pos_euler(source.pos_euler), pos_aspR(source.pos_aspR), pos_ME(source.pos_ME), pos_Mnu(source.pos_Mnu), pos_Msy0(source.pos_Msy0), pos_Mhmod1(source.pos_Mhmod1), - pos_Mhmod2(source.pos_Mhmod2), pos_Mhexp(source.pos_Mhexp), pos_DamParm1(source.pos_DamParm1), pos_DamParm2(source.pos_DamParm2), - Randnum(source.Randnum), _intpl(source._intpl), + pos_Mhmod2(source.pos_Mhmod2), pos_Mhexp(source.pos_Mhexp), pos_DamParm1(source.pos_DamParm1), pos_DamParm2(source.pos_DamParm2), + pos_INCDamParm1(source.pos_INCDamParm1), pos_INCDamParm2(source.pos_INCDamParm2), Randnum(source.Randnum), _intpl(source._intpl), _dx(source._dx), _dy(source._dy), _dz(source._dz), _OrigX(source._OrigX), _OrigY(source._OrigY), _OrigZ(source._OrigZ), _Ldomain(source._Ldomain), _VfMat(source._VfMat), _aspRMat(source._aspRMat), _E_Mat(source._E_Mat), _nu_Mat(source._nu_Mat), _sy0_Mat(source._sy0_Mat), _hmod1_Mat(source._hmod1_Mat), @@ -297,6 +306,9 @@ mlawNonLocalDamage_Stoch& mlawNonLocalDamage_Stoch::operator=(const materialLaw pos_DamParm1 = src->pos_DamParm1; pos_DamParm2 = src->pos_DamParm2; + pos_INCDamParm1 = src->pos_INCDamParm1; + pos_INCDamParm2 = src->pos_INCDamParm2; + Randnum = src->Randnum; _intpl = src->_intpl; @@ -356,9 +368,34 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD double *stv1 = iv1->_nldStatev; double *stv2 = iv2->_nldStatev; double SpBartmp = 0.0; + double dFd_d_bartmp = 0.0; + double dpdFdtmp = 0.0; + double dFddptmp = 0.0; + + double Dmax=0.9999; + ivi->setPosMaxD(mat->get_pos_maxD()); + ivi->setPosIncMaxD(mat->get_pos_inc_maxD()); + ivi->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + iv1->setPosMaxD(mat->get_pos_maxD()); + iv1->setPosIncMaxD(mat->get_pos_inc_maxD()); + iv1->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + iv2->setPosMaxD(mat->get_pos_maxD()); + iv2->setPosIncMaxD(mat->get_pos_inc_maxD()); + iv2->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + + ivi->setMaxD(Dmax); + ivi->setIncMaxD(Dmax); + ivi->setMtxMaxD(Dmax); + iv1->setMaxD(Dmax); + iv1->setIncMaxD(Dmax); + iv1->setMtxMaxD(Dmax); + iv2->setMaxD(Dmax); + iv2->setIncMaxD(Dmax); + iv2->setMtxMaxD(Dmax); if(Randnum !=0){ if(Reuler != NULL) Reuler->RandomGen(GaussP, &(stv1[pos_euler])); + if(RMatProp !=NULL){ double Rprop[Randnum]; @@ -375,8 +412,8 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD if(pos_Mhexp !=0) stv1[pos_Mhexp] = Rprop[k++]; if(pos_DamParm1 !=0) stv1[pos_DamParm1] = Rprop[k++]; if(pos_DamParm2 !=0) stv1[pos_DamParm2] = Rprop[k]; - } + else if(_intpl != 0){ double param_x = (GaussP(0)-_OrigX)/_dx; double param_y = (GaussP(1)-_OrigY)/_dy; @@ -635,12 +672,21 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD else { printf("Unknown interpolation method: %d\n", _intpl); } + + if(pos_INCDamParm1 !=0){ + std::random_device rd; + std::mt19937 gen(rd()); + std::normal_distribution<double> d(0.0, 1.0); + // get random number with normal distribution using gen as random source + stv1[pos_INCDamParm1] = 100;// int(stv1[pos_vfi]*0.25*0.15*1000000/3.141592/3.5/3.5); + stv1[pos_INCDamParm2] = d(gen); + } } } copyvect(stv1,stvi,nsdv); - mat->constbox(dstrn, strs_n, strs, stvi, stv1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, kinc, kstep,_timeStep); + mat->constbox(dstrn, strs_n, strs, stvi, stv1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, &dFd_d_bartmp, dstrs_dFd_bar, dFd_dE, chara_Length_INC, &dpdFdtmp, &dFddptmp, kinc, kstep, _timeStep); //if(pos_vfi != 0) Rvfi->RandomGen(GaussP, &(stv1[pos_vfi])); // if(pos_euler != 0) Reuler->RandomGen(GaussP, &(stv1[pos_euler])); @@ -651,17 +697,45 @@ void mlawNonLocalDamage_Stoch::createIPState(const SVector3 &GaussP, IPNonLocalD ivi->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling iv1->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling iv2->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling + + ivi->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; + iv1->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; + iv2->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; } } + ivi->setPosEuler(pos_euler); + iv1->setPosEuler(pos_euler); + iv2->setPosEuler(pos_euler); + + ivi->setPosStrMtx(mat->get_pos_mtx_stress()); ivi->setPosStrInc(mat->get_pos_inc_stress()); - ivi->setPosEuler(pos_euler); + ivi->setPosStnMtx(mat->get_pos_mtx_strain()); + ivi->setPosStnInc(mat->get_pos_inc_strain()); iv1->setPosStrMtx(mat->get_pos_mtx_stress()); iv1->setPosStrInc(mat->get_pos_inc_stress()); - iv1->setPosEuler(pos_euler); + iv1->setPosStnMtx(mat->get_pos_mtx_strain()); + iv1->setPosStnInc(mat->get_pos_inc_strain()); + iv1->setPosIncDam(mat->get_pos_inc_Dam()); + iv1->setPosMtxDam(mat->get_pos_mtx_Dam()); iv2->setPosStrMtx(mat->get_pos_mtx_stress()); iv2->setPosStrInc(mat->get_pos_inc_stress()); - iv2->setPosEuler(pos_euler); + iv2->setPosStnMtx(mat->get_pos_mtx_strain()); + iv2->setPosStnInc(mat->get_pos_inc_strain()); + ivi->setPosIncVfi(mat->get_pos_vfi()); + ivi->setPosIncAR(mat->get_pos_aspR()); + ivi->setPosIncR(mat->get_pos_Ri()); + ivi->setPosIncJa(mat->get_pos_inc_Ja()); + ivi->setPosMtxJa(mat->get_pos_mtx_Ja()); + ivi->setPosIncDam(mat->get_pos_inc_Dam()); + ivi->setPosMtxDam(mat->get_pos_mtx_Dam()); + iv2->setPosIncVfi(mat->get_pos_vfi()); + iv2->setPosIncAR(mat->get_pos_aspR()); + iv2->setPosIncR(mat->get_pos_Ri()); + iv2->setPosIncJa(mat->get_pos_inc_Ja()); + iv2->setPosMtxJa(mat->get_pos_mtx_Ja()); + iv2->setPosIncDam(mat->get_pos_inc_Dam()); + iv2->setPosMtxDam(mat->get_pos_mtx_Dam()); copyvect(stv1,stvi,nsdv); copyvect(stv1,stv2,nsdv); @@ -675,9 +749,22 @@ void mlawNonLocalDamage_Stoch::createIPVariable(const SVector3 &GaussP, IPNonLoc int kinc = 1; double *stv1 = ipv->_nldStatev; double SpBartmp = 0.0; + double dFd_d_bartmp = 0.0; + double dpdFdtmp = 0.0; + double dFddptmp = 0.0; + + double Dmax=0.9999; + ipv->setPosMaxD(mat->get_pos_maxD()); + ipv->setPosIncMaxD(mat->get_pos_inc_maxD()); + ipv->setPosMtxMaxD(mat->get_pos_mtx_maxD()); + + ipv->setMaxD(Dmax); + ipv->setIncMaxD(Dmax); + ipv->setMtxMaxD(Dmax); if(Randnum !=0){ if(Reuler != NULL) Reuler->RandomGen(GaussP, &(stv1[pos_euler])); + if(RMatProp !=NULL){ double Rprop[Randnum]; int k=0; @@ -953,22 +1040,45 @@ void mlawNonLocalDamage_Stoch::createIPVariable(const SVector3 &GaussP, IPNonLoc else { printf("Unknown interpolation method: %d\n", _intpl); } + + if(pos_INCDamParm1 !=0){ + std::random_device rd; + std::mt19937 gen(rd()); + std::normal_distribution<double> d(0.0, 1.0); + // get random number with normal distribution using gen as random source + stv1[pos_INCDamParm1] = 100;// int(stv1[pos_vfi]*0.25*0.15*1000000/3.141592/3.5/3.5); + stv1[pos_INCDamParm2] = d(gen); + } + } } - mat->constbox(dstrn, strs_n, strs, stv1, stv1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, kinc, kstep, _timeStep); + mat->constbox(dstrn, strs_n, strs, stv1, stv1, Cref, dCref, tau, dtau, Calgo, 1., dpdE, strs_dDdp_bar, &SpBartmp, chara_Length, &dFd_d_bartmp, dstrs_dFd_bar, dFd_dE, chara_Length_INC, &dpdFdtmp, &dFddptmp, kinc, kstep, _timeStep); + + for(int i=0;i<3;i++) { for(int j=0;j<3;j++){ ipv->_nldCharacteristicLengthMatrix(i,j) = chara_Length[i][j]; //by Wu Ling + ipv->_nldCharacteristicLengthFiber(i,j) = chara_Length_INC[i][j]; } } + ipv->setPosEuler(pos_euler); + ipv->setPosStrMtx(mat->get_pos_mtx_stress()); ipv->setPosStrInc(mat->get_pos_inc_stress()); - ipv->setPosEuler(pos_euler); + ipv->setPosStnMtx(mat->get_pos_mtx_strain()); + ipv->setPosStnInc(mat->get_pos_inc_strain()); + ipv->setPosIncVfi(mat->get_pos_vfi()); + ipv->setPosIncAR(mat->get_pos_aspR()); + ipv->setPosIncR(mat->get_pos_Ri()); + ipv->setPosIncJa(mat->get_pos_inc_Ja()); + ipv->setPosMtxJa(mat->get_pos_mtx_Ja()); + ipv->setPosIncDam(mat->get_pos_inc_Dam()); + ipv->setPosMtxDam(mat->get_pos_mtx_Dam()); } diff --git a/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.h b/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.h index 6f997813c32bd8256e264b215b760a9a7ffaa5c4..1f7a3c037769281afd7926ffc09c28558b3e2087 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalDamage_Stoch.h @@ -12,6 +12,7 @@ // #ifndef MLAWNONLOCALDAMAGE_STOCH_H_ #define MLAWNONLOCALDAMAGE_STOCH_H_ +#include <random> #include "mlaw.h" #include "STensor3.h" #include "STensor43.h" @@ -35,6 +36,8 @@ class mlawNonLocalDamage_Stoch : public mlawNonLocalDamage int pos_Mhexp; int pos_DamParm1; int pos_DamParm2; + int pos_INCDamParm1; + int pos_INCDamParm2; int Randnum; int _intpl; diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp b/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp index 971f94c55eeafb10be0b673ef544b2a632b2bcc4..e5ab7b6884c795fd22239d283bc722fbd39efeea 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorous.cpp @@ -823,7 +823,7 @@ void mlawNonLocalPorosity::predictorCorrector_NonLocalLogarithmPorosity( ipvcur->getRefToDPlasticEnergyDNonLocalVariable(0) *= DNonlocalPoroDlogNonlocalPoro; dFeDNonlocalVar *= DNonlocalPoroDlogNonlocalPoro; - if (_macroSolver->withPathFollowing()){ + if (getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) *= DNonlocalPoroDlogNonlocalPoro; } } @@ -1546,10 +1546,10 @@ void mlawNonLocalPorosity::predictorCorrector_NonLocalPorosity( // update elastic energy ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce,&T); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToIrreversibleEnergy() = ipvprev->irreversibleEnergy()+ ipvcur->plasticEnergy() - ipvprev->plasticEnergy(); } else{ @@ -1621,10 +1621,10 @@ void mlawNonLocalPorosity::predictorCorrector_NonLocalPorosity( STensor3& DplEnergyDF = ipvcur->getRefToDPlasticEnergyDF(); STensorOperation::multSTensor3STensor43(DplEnergyDEpr,EprToF,DplEnergyDF); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToDIrreversibleEnergyDF() = ipvcur->getConstRefToDPlasticEnergyDF(); for (int i=0; i< _numNonLocalVar; i++){ if (ipvprev->getNonLocalToLocal()){ @@ -2204,10 +2204,10 @@ void mlawNonLocalPorosity::predictorCorrectorLocal( // elastic energy ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToIrreversibleEnergy() = ipvprev->irreversibleEnergy()+ ipvcur->plasticEnergy() - ipvprev->plasticEnergy(); } else{ @@ -2247,10 +2247,10 @@ void mlawNonLocalPorosity::predictorCorrectorLocal( STensor3& DplEnergyDF = ipvcur->getRefToDPlasticEnergyDF(); STensorOperation::multSTensor3STensor43(DplEnergyDEpr,EprToF,DplEnergyDF); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToDIrreversibleEnergyDF() = ipvcur->getConstRefToDPlasticEnergyDF(); } else{ @@ -4240,7 +4240,7 @@ void mlawNonLocalPorosity::constitutive_multipleNonLocalVariables( dLocaldVarDStrain[2](i,j) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/_perturbationfactor; // energy - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDF()(i,j) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/_perturbationfactor; } } @@ -4259,7 +4259,7 @@ void mlawNonLocalPorosity::constitutive_multipleNonLocalVariables( dLocalVarDNonLocalVar(1,0) = (ipvcurPlus.getMatrixPlasticStrain() - ipvcur->getMatrixPlasticStrain())/(_perturbationfactor); dLocalVarDNonLocalVar(2,0) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); } @@ -4276,7 +4276,7 @@ void mlawNonLocalPorosity::constitutive_multipleNonLocalVariables( dLocalVarDNonLocalVar(1,1) = (ipvcurPlus.getMatrixPlasticStrain() - ipvcur->getMatrixPlasticStrain())/(_perturbationfactor); dLocalVarDNonLocalVar(2,1) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(1) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); } @@ -4293,7 +4293,7 @@ void mlawNonLocalPorosity::constitutive_multipleNonLocalVariables( dLocalVarDNonLocalVar(1,2) = (ipvcurPlus.getMatrixPlasticStrain() - ipvcur->getMatrixPlasticStrain())/(_perturbationfactor); dLocalVarDNonLocalVar(2,2) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(2) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); } @@ -4339,7 +4339,7 @@ void mlawNonLocalPorosity::constitutive_NonLocalLogarithmPorosity( } } dLocaldPorosityDStrain(i,j) = (ipvcurPlus.getLocalLogarithmPorosity() - ipvcur->getLocalLogarithmPorosity())/_perturbationfactor; - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDF()(i,j) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/_perturbationfactor; } } @@ -4353,7 +4353,7 @@ void mlawNonLocalPorosity::constitutive_NonLocalLogarithmPorosity( } } dLocalPorosityDNonLocalPorosity = (ipvcurPlus.getLocalLogarithmPorosity() - ipvcur->getLocalLogarithmPorosity())/(_perturbationfactor*log(_fV_failure)); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor*log(_fV_failure)); } @@ -4753,7 +4753,7 @@ void mlawNonLocalPorosity::constitutive_NonLocalPorosity( } } dLocaldPorosityDStrain(i,j) = (ipvcurPlus.getLocalPorosity() - ipvcur->getLocalPorosity())/_perturbationfactor; - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDF()(i,j) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/_perturbationfactor; } } @@ -4767,7 +4767,7 @@ void mlawNonLocalPorosity::constitutive_NonLocalPorosity( } } dLocalPorosityDNonLocalPorosity = (ipvcurPlus.getLocalPorosity() - ipvcur->getLocalPorosity())/(_perturbationfactor*_fV_failure); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor*_fV_failure); } @@ -4810,7 +4810,7 @@ void mlawNonLocalPorosity::constitutive( Tangent(k,l,i,j) = (Pplus(k,l) - P(k,l))/(_perturbationfactor); } } - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDF()(i,j) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/_perturbationfactor; } } @@ -5837,11 +5837,6 @@ void mlawNonLocalPorosity::predictorCorrector_multipleNonLocalVariables(const ST } } } - else{ - //reset nucleation - // no nucleation - ipvcur->getRefToIPNucleation().resetNucleation(ipvprev->getConstRefToIPNucleation()); - } } } @@ -5860,10 +5855,10 @@ void mlawNonLocalPorosity::predictorCorrector_multipleNonLocalVariables(const ST // elastic energy ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce,&T); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToIrreversibleEnergy() = ipvprev->irreversibleEnergy()+ ipvcur->plasticEnergy() - ipvprev->plasticEnergy(); } else{ @@ -5932,10 +5927,10 @@ void mlawNonLocalPorosity::predictorCorrector_multipleNonLocalVariables(const ST STensor3& DplEnergyDF = ipvcur->getRefToDPlasticEnergyDF(); STensorOperation::multSTensor3STensor43(DplEnergyDEpr,EprToF,DplEnergyDF); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToDIrreversibleEnergyDF() = ipvcur->getConstRefToDPlasticEnergyDF(); for (int i=0; i< _numNonLocalVar; i++){ if (ipvcur->getNonLocalToLocal()){ @@ -7236,10 +7231,6 @@ void mlawNonLocalPorosity::I1J2J3_predictorCorrector_NonLocal(const STensor3& F0 } } } - else{ - //reset behavior with elastic - I1J2J3_copyInternalVariableForElasticState(ipvcur,ipvprev,T); - } } } @@ -7258,10 +7249,10 @@ void mlawNonLocalPorosity::I1J2J3_predictorCorrector_NonLocal(const STensor3& F0 // elastic energy ipvcur->getRefToElasticEnergy()= this->deformationEnergy(Ce,&T); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToIrreversibleEnergy() = ipvprev->irreversibleEnergy()+ ipvcur->plasticEnergy() - ipvprev->plasticEnergy(); } else{ @@ -7330,10 +7321,10 @@ void mlawNonLocalPorosity::I1J2J3_predictorCorrector_NonLocal(const STensor3& F0 STensor3& DplEnergyDF = ipvcur->getRefToDPlasticEnergyDF(); STensorOperation::multSTensor3STensor43(DplEnergyDEpr,EprToF,DplEnergyDF); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ // irreversible energy - if ((this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or - (this->getMacroSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { + if ((this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::PLASTIC_ENERGY) or + (this->getSolver()->getPathFollowingLocalIncrementType() == nonLinearMechSolver::DISSIPATION_ENERGY)) { ipvcur->getRefToDIrreversibleEnergyDF() = ipvcur->getConstRefToDPlasticEnergyDF(); for (int i=0; i< _numNonLocalVar; i++){ if (ipvcur->getNonLocalToLocal()){ @@ -7392,7 +7383,7 @@ void mlawNonLocalPorosity::I1J2J3_constitutive_NonLocal( dLocaldVarDStrain[2](i,j) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/_perturbationfactor; // energy - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDF()(i,j) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/_perturbationfactor; } } @@ -7411,7 +7402,7 @@ void mlawNonLocalPorosity::I1J2J3_constitutive_NonLocal( dLocalVarDNonLocalVar(1,0) = (ipvcurPlus.getMatrixPlasticStrain() - ipvcur->getMatrixPlasticStrain())/(_perturbationfactor); dLocalVarDNonLocalVar(2,0) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(0) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); } @@ -7428,7 +7419,7 @@ void mlawNonLocalPorosity::I1J2J3_constitutive_NonLocal( dLocalVarDNonLocalVar(1,1) = (ipvcurPlus.getMatrixPlasticStrain() - ipvcur->getMatrixPlasticStrain())/(_perturbationfactor); dLocalVarDNonLocalVar(2,1) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(1) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); } @@ -7445,7 +7436,7 @@ void mlawNonLocalPorosity::I1J2J3_constitutive_NonLocal( dLocalVarDNonLocalVar(1,2) = (ipvcurPlus.getMatrixPlasticStrain() - ipvcur->getMatrixPlasticStrain())/(_perturbationfactor); dLocalVarDNonLocalVar(2,2) = (ipvcurPlus.getDeviatoricPlasticStrain() - ipvcur->getDeviatoricPlasticStrain())/(_perturbationfactor); - if (this->getMacroSolver()->withPathFollowing()){ + if (this->getSolver()->withPathFollowing()){ ipvcur->getRefToDIrreversibleEnergyDNonLocalVariable(2) = (ipvcurPlus.plasticEnergy() - ipvcur->plasticEnergy())/(_perturbationfactor); } @@ -7476,12 +7467,12 @@ combinedPorousLaw::~combinedPorousLaw() }; -void combinedPorousLaw::setMacroSolver(const nonLinearMechSolver* sv) +void combinedPorousLaw::setSolver(const nonLinearMechSolver* sv) { - mlawNonLocalPorosity::setMacroSolver(sv); + mlawNonLocalPorosity::setSolver(sv); for (int i=0; i< _multipleLaws.size(); i++) { - _multipleLaws[i]->setMacroSolver(sv); + _multipleLaws[i]->setSolver(sv); } }; // Option settings diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorous.h b/NonLinearSolver/materialLaw/mlawNonLocalPorous.h index 375da0812f424c2cbb9008889e013cfdd6c74f09..8de90b2e23ce2930468c1f32aaab627036d5fff9 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorous.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorous.h @@ -948,7 +948,7 @@ class combinedPorousLaw : public mlawNonLocalPorosity virtual void createIPVariable(IPNonLocalPorosity* &ipv, const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const {}; virtual void createIPVariable(IPNonLocalPorosity *&ipv) const {}; virtual void initLaws(const std::map<int,materialLaw*> &maplaw){}; // this law is initialized so nothing to do - virtual void setMacroSolver(const nonLinearMechSolver* sv); + virtual void setSolver(const nonLinearMechSolver* sv); // Option settings virtual void setStressFormulation(const int fm); diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp index 4c0857f3e008936858270a7b688239b36fd728d5..a66b8302055c6d3ebe33a23a37f2f861b49600e2 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorousCoupled.cpp @@ -428,14 +428,22 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons return; } - - //Those lines are not mandatory == commented - // as they should add oscillations to the solution - //if (!(q1->getMatrixPlasticStrain() > q0->getMatrixPlasticStrain())){ - // only check if plastic is active - //return; - //}; - + // Get ipvs + const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); + IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); + if (q1Thom == NULL){ + Msg::Error("mlawNonLocalPorousThomasonLaw::computeResidual: IPThomasonCoalescence must be used!"); + Msg::Exit(0); + } + // check active + if (q0Thom->getCoalescenceOnsetFlag() and q1->dissipationIsActive()) + { + q1Thom->getRefToCoalescenceActiveFlag() = true; + } + else + { + q1Thom->getRefToCoalescenceActiveFlag() = false; + } // Determine: // a. if the coales. state needs to be updated (otherwise, the function returns directly). @@ -477,12 +485,7 @@ void mlawNonLocalPorousCoupledLaw::checkCoalescence(IPNonLocalPorosity* q1, cons } } - // Get ipvs - const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); - IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); - if (q1Thom == NULL){ - Msg::Error("mlawNonLocalPorousThomasonLaw::computeResidual: IPThomasonCoalescence must be used!"); - } + if (q0Thom->getCoalescenceOnsetFlag()) { // if onset already occurs @@ -976,11 +979,23 @@ void mlawNonLocalPorousCoupledLawWithMPS::checkCoalescence(IPNonLocalPorosity* q return; } - if (!(q1->getMatrixPlasticStrain() > q0->getMatrixPlasticStrain())) + // Get ipvs + const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); + IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); + if (q1Thom == NULL){ + Msg::Error("mlawNonLocalPorousThomasonLaw::computeResidual: IPThomasonCoalescence must be used!"); + Msg::Exit(0); + } + // check active + if (q0Thom->getCoalescenceOnsetFlag() and q1->dissipationIsActive()) { - // only check if plastic is active - return; - }; + q1Thom->getRefToCoalescenceActiveFlag() = true; + } + else + { + q1Thom->getRefToCoalescenceActiveFlag() = false; + } + bool willUseNormalToCheck = false; if (_checkCoalescenceWithNormal) @@ -1006,14 +1021,6 @@ void mlawNonLocalPorousCoupledLawWithMPS::checkCoalescence(IPNonLocalPorosity* q } } - // Get ipvs - const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); - IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); - if (q1Thom == NULL){ - Msg::Error("mlawNonLocalPorousThomasonLaw::computeResidual: IPThomasonCoalescence must be used!"); - } - - if (q0Thom->getCoalescenceOnsetFlag()) { // if onset already occurs @@ -1673,11 +1680,22 @@ void mlawNonLocalPorousCoupledLawWithMPSAndMSS::checkCoalescence(IPNonLocalPoros return; } - if (!(q1->getMatrixPlasticStrain() > q0->getMatrixPlasticStrain())) + // Get ipvs + const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); + IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); + if (q1Thom == NULL){ + Msg::Error("mlawNonLocalPorousThomasonLaw::computeResidual: IPThomasonCoalescence must be used!"); + Msg::Exit(0); + } + // check active + if ((q0Thom->getCoalescenceOnsetFlag() or q0Thom->getShearCoalescenceOnsetFlag()) and q1->dissipationIsActive()) { - // only check if plastic is active - return; - }; + q1Thom->getRefToCoalescenceActiveFlag() = true; + } + else + { + q1Thom->getRefToCoalescenceActiveFlag() = false; + } bool willUseNormalToCheck = false; if (_checkCoalescenceWithNormal) @@ -1703,9 +1721,6 @@ void mlawNonLocalPorousCoupledLawWithMPSAndMSS::checkCoalescence(IPNonLocalPoros } } - // Get ipvs - const IPThomasonCoalescence* q0Thom = dynamic_cast<const IPThomasonCoalescence*>(&q0->getConstRefToIPCoalescence()); - IPThomasonCoalescence* q1Thom = dynamic_cast<IPThomasonCoalescence*>(&q1->getRefToIPCoalescence()); if (q0Thom->getCoalescenceOnsetFlag() or q0Thom->getShearCoalescenceOnsetFlag()) { diff --git a/NonLinearSolver/materialLaw/mlawNonLocalPorousWithFailure.h b/NonLinearSolver/materialLaw/mlawNonLocalPorousWithFailure.h index 84b11c88219e3ca6931b7550151da8248935eb8d..63b66dafd0f18027c337c094f0c1fb1380dd7191 100644 --- a/NonLinearSolver/materialLaw/mlawNonLocalPorousWithFailure.h +++ b/NonLinearSolver/materialLaw/mlawNonLocalPorousWithFailure.h @@ -52,9 +52,9 @@ class mlawNonLocalPorousWithCleavageFailure : public materialLaw{ virtual double getInitialExtraDofStoredEnergyPerUnitField() const {return _nonlocalPorousLaw->getInitialExtraDofStoredEnergyPerUnitField();} virtual double getExtraDofStoredEnergyPerUnitField(double T) const {return _nonlocalPorousLaw->getExtraDofStoredEnergyPerUnitField(T);} virtual double getCharacteristicLength() const {return _nonlocalPorousLaw->getCharacteristicLength();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - materialLaw::setMacroSolver(sv); - _nonlocalPorousLaw->setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + materialLaw::setSolver(sv); + _nonlocalPorousLaw->setSolver(sv); }; virtual const CLengthLaw *getCleavageCLengthLaw() const {return _cLLawCleavage; }; diff --git a/NonLinearSolver/materialLaw/nonLocalDamageLaw.h b/NonLinearSolver/materialLaw/nonLocalDamageLaw.h index 214607f4d03b08702ae8444107af93fc90086876..891ff4bc43d0e21c407e12187db2df7c64cf1c5b 100644 --- a/NonLinearSolver/materialLaw/nonLocalDamageLaw.h +++ b/NonLinearSolver/materialLaw/nonLocalDamageLaw.h @@ -100,9 +100,10 @@ template<class Tbulk, class Tdamage> class nonLocalDamageLaw : public fractureBy const IPNonLocalDamage *q0, // array of initial internal variable IPNonLocalDamage *q1, // updated array of internal variable (in ipvcur on output), STensor43 &Tangent, // constitutive tangents (output) - STensor3 &dNonLocalPlasticStrainDStrain, - STensor3 &dStressDNonLocalPlasticStrain, - double &dLocalPlasticStrainDNonLocalPlasticStrain, + std::vector<STensor3> &dNonLocalPlasticStrainDStrain, + std::vector<STensor3> &dGradNonLocalPlasticStrainDStrain, + std::vector<STensor3> &dStressDNonLocalPlasticStrain, + fullMatrix<double> &dLocalPlasticStrainDNonLocalPlasticStrain, const bool stiff // if true compute the tangents ) const=0; diff --git a/NonLinearSolver/materialLaw/numericalMaterial.cpp b/NonLinearSolver/materialLaw/numericalMaterial.cpp index 51c70aac7f53f2a72ed90dc243de2e063183957f..586f2ed31d2ae1de37d450f1facf4cd49d1fd43e 100644 --- a/NonLinearSolver/materialLaw/numericalMaterial.cpp +++ b/NonLinearSolver/materialLaw/numericalMaterial.cpp @@ -12,7 +12,8 @@ #include "numericalMaterial.h" #include "nonLinearMechSolver.h" #include "nonLinearBC.h" -#include "dirent.h" +#include "dirent.h" +#include "ipField.h" void numericalMaterialBase::distributeMacroIP(const std::vector<int>& allIPNum, const std::vector<int>& allRanks, std::map<int,std::set<int> >& mapIP){ @@ -67,74 +68,53 @@ void numericalMaterialBase::distributeMacroIP(const std::vector<int>& allIPNum, #endif // _DEBUG }; -numericalMaterial::numericalMaterial(int tag) - :numericalMaterialBase(),_tag(tag),_numstep(1),_tol(1e-6),_absTol(1e-10), - _stressFlag(true),_stressIntegFlag(0), _sameStateCriterion(1e-10), - _tangentFlag(true),_tangentIntegFlag(0),_tangentPerturbation(1.e-7), - _isIterative(true),_stiffModification(true), - _stabilityAnalysis(false), _instabilitycriterion(1.e-8), - _perturbation(false),_perturbationfactor(0.01), _numeigenvalue(100), _eigenFollowing(false), - _isViewAll(false),_systemType(1), _rveVolume(0.), - _scheme(1),_solver(2), _pathFollowing(false),_controlType(1), - _microMeshFile(""),_microGeoFile(""), - _meshOrder(-1),_meshDim(-1),_meshIncomplete(false), - _microBC(NULL),_extractIrreversibleEnergy(false){}; - -numericalMaterial::numericalMaterial(const numericalMaterial& src):numericalMaterialBase(src){ - _tag = src._tag; // for tag of microsolver - _numstep = src._numstep; // number of time step at microsolve - _tol = src._tol; // tolerance used in NR at microsolver - _absTol = src._absTol; - _systemType = src._systemType; - _solver = src._solver; - _isIterative = src._isIterative; - _stiffModification = src._stiffModification; - _sameStateCriterion = src._sameStateCriterion; - // micro-data - _microMeshFile = src._microMeshFile; // micro meshfile - _microGeoFile = src._microGeoFile; - _meshDim = src._meshDim; - _meshOrder = src._meshOrder; - _meshIncomplete = src._meshIncomplete; - - _stressFlag = src._stressFlag; - _stressIntegFlag = src._stressIntegFlag; // 0- volume, 1-surface - _tangentFlag = src._tangentFlag; - _tangentIntegFlag = src._tangentIntegFlag; - _tangentPerturbation = src._tangentPerturbation; - _allView = src._allView; // micro-solver to view - _isViewAll = src._isViewAll; // true if view all - _allDomain = src._allDomain; - _allMaterialLaw = src._allMaterialLaw; - _microBC = NULL; - if (src._microBC != NULL){ - _microBC = src._microBC->clone(); - } - - _stabilityAnalysis = src._stabilityAnalysis; - _modeview = src._modeview; - _numeigenvalue = src._numeigenvalue; - _perturbation = src._perturbation; - _perturbationfactor = src._perturbationfactor; - _instabilitycriterion = src._instabilitycriterion; - _eigenFollowing = src._eigenFollowing; - - _allGP = src._allGP; - _viewMicroField = src._viewMicroField; - _viewMicroUnknownComponnent = src._viewMicroUnknownComponnent; - - _pathFollowing = src._pathFollowing; - _controlType = src._controlType; - - _rveVolume = src._rveVolume; - _allInitialBC = src._allInitialBC; - _allDirichletBC = src._allDirichletBC; - - _extractIrreversibleEnergy = src._extractIrreversibleEnergy; +numericalMaterial::numericalMaterial(int tag) : + numericalMaterialBase(), + _isViewAll(false), + _macroSolver(NULL) +{ + _microSolver = new nonLinearMechSolver(tag,false); + // default options + _microSolver->Scheme(1); + _microSolver->Solver(2); + _microSolver->setSystemType(1); + _microSolver->setControlType(0); + _microSolver->snlData(1,1.,1e-6,1e-10); + _microSolver->stressAveragingFlag(true); + _microSolver->setStressAveragingMethod(0); + _microSolver->tangentAveragingFlag(true); + _microSolver->setTangentAveragingMethod(2,1e-8); + _microSolver->setSameStateCriterion(1e-10); + _microSolver->setMicroSolverFlag(true); + _microSolver->setMultiscaleFlag(true); + + // no view + _microSolver->setHomogenizationPropertyArchiveFlag(false); + _microSolver->setDisplacementAndIPArchiveFlag(false); + _microSolver->setMessageView(false); + _microSolver->setStrainArchiveFlag(false); +} + +numericalMaterial::numericalMaterial(const numericalMaterial& src): + numericalMaterialBase(src), + _meshOnIP(src._meshOnIP), + _pertMaterialLawIP(src._pertMaterialLawIP), + _allPertubationLaw(src._allPertubationLaw), + _solverToView(src._solverToView), + _isViewAll(src._isViewAll), + _allGP(src._allGP), + _macroSolver(NULL) +{ + _microSolver = NULL; + if (src._microSolver) + { + _microSolver = new nonLinearMechSolver(*src._microSolver); + } }; numericalMaterial::~numericalMaterial(){ // delete cache + if (_microSolver) delete _microSolver; for (int i=0; i< _allocatedDomains.size(); i++){ delete _allocatedDomains[i]; } @@ -145,198 +125,146 @@ numericalMaterial::~numericalMaterial(){ _allocatedLaws.clear(); }; -nonLinearMechSolver* numericalMaterial::createMicroSolver(const int ele, const int gpt) const { +nonLinearMechSolver* numericalMaterial::createMicroSolver(const int ele, const int gpt) const +{ /**create serial micro-solver **/ - nonLinearMechSolver* solver = new nonLinearMechSolver(_tag,false); - solver->setMicroSolverFlag(true); - solver->setMultiscaleFlag(true); - - /** set microsolver identification **/ - solver->setMicroProblemIndentification(ele,gpt); int type = numericalMaterial::createTypeWithTwoInts(ele,gpt); - - std::map<int,int>::const_iterator itm = _meshIdMap.find(type); - if (itm == _meshIdMap.end() or _allPertMesh.size() ==0){ - /**load model**/ - std::map<int,std::string>::const_iterator itMestConstraint = _meshOnIP.find(type); - if (itMestConstraint == _meshOnIP.end()){ - if (_microMeshFile.length() >0){ - Msg::Info("create model from mesh file %s",_microMeshFile.c_str()); - solver->loadModel(_microMeshFile); - } - else if (_microGeoFile.length()>0 ){ - Msg::Info("create model from geometry file %s",_microGeoFile.c_str()); - solver->createMicroModel(_microGeoFile,_meshDim,_meshOrder,_meshIncomplete); - } - else{ - Msg::Error("micro model file must be provided: proc %d, ele %d, GP %d",Msg::GetCommRank(),ele,gpt); - } - } - else{ - std::string mshFile = itMestConstraint->second; - printf("create model from mesh file %s \n",mshFile.c_str()); - solver->loadModel(mshFile); - } - } - else{ - std::map<int,std::string>::const_iterator itstr = _allPertMesh.find(itm->second); - std::string mshFile = itstr->second; - printf("perturbation mesh on ele %d gp %d \n",ele,gpt); - printf("create model from mesh file %s \n",mshFile.c_str()); - solver->loadModel(mshFile); - } - - - /** set domain for micro solver**/ - for (int i=0; i<_allDomain.size(); i++){ - partDomain* dom = _allDomain[i]->clone(); - if (dom) { - solver->addDomain(dom); + std::string mshFileName = getMeshFileName(ele,gpt); + std::map<int,std::string>::const_iterator itMestConstraint = _meshOnIP.find(type); + if (itMestConstraint != _meshOnIP.end()) + { + mshFileName = itMestConstraint->second; + }; + printf("create model from mesh file %s \n",mshFileName.c_str()); + + const std::vector<partDomain*>& allDomain = *(_microSolver->getDomainVector()); + std::vector<partDomain*> allDomainToMicroSolver; + for (int i=0; i<allDomain.size(); i++) + { + partDomain* dom = allDomain[i]->clone(); + if (dom !=NULL) + { + allDomainToMicroSolver.push_back(dom); _allocatedDomains.push_back(dom); } - else{ + else + { Msg::Error("partDomain::clone has not been defined"); + Msg::Exit(0); } }; - /** set material law**/ - if (_pertMaterialLawIP.find(type) == _pertMaterialLawIP.end()){ - for (int i=0; i<_allMaterialLaw.size(); i++){ - materialLaw* law = _allMaterialLaw[i]->clone(); - if (law != NULL){ - solver->addMaterialLaw(law); + + std::vector<materialLaw*> allLaw; + if (_pertMaterialLawIP.find(type) == _pertMaterialLawIP.end()) + { + const std::map<int,materialLaw*>& mapLaw = _microSolver->getMaplaw(); + for (std::map<int,materialLaw*>::const_iterator itlaw = mapLaw.begin(); itlaw != mapLaw.end(); itlaw++) + { + materialLaw* law = itlaw->second->clone(); + if (law != NULL) + { + allLaw.push_back(law); _allocatedLaws.push_back(law); } - else{ + else + { Msg::Error("materialLaw::clone must be defined"); + Msg::Exit(0); } }; } - else{ + else + { Msg::Warning("perturbation in ele %d GP %d",ele,gpt); - for (int i=0; i<_allPertubationLaw.size(); i++){ + for (int i=0; i<_allPertubationLaw.size(); i++) + { materialLaw* law = _allPertubationLaw[i]->clone(); - if (law != NULL){ - solver->addMaterialLaw(law); + if (law != NULL) + { + allLaw.push_back(law); _allocatedLaws.push_back(law); } - else{ + else + { Msg::Error("materialLaw::clone must be defined"); + Msg::Exit(0); } }; } - - if (_rveVolume >0){ - solver->setRVEVolume(_rveVolume); + + nonLinearMechSolver* solver = _microSolver->clone(_microSolver->getTag(),false,mshFileName,allDomainToMicroSolver,allLaw); + /** set microsolver identification **/ + TwoNum tn(ele,ele); + if (ele > 0) + { + if (_macroSolver==NULL) + { + Msg::Error("macro solver is not correctly set"); + Msg::Exit(0); + }; + + const std::map<int,TwoNum>& interfaceMap = _macroSolver->getInterfaceElementsInverseMap(); + std::map<int,TwoNum>::const_iterator itInt = interfaceMap.find(ele); + if (itInt == interfaceMap.end()) + { + solver->setMicroProblemIndentification(ele,gpt); + } + else + { + tn = itInt->second; + solver->setMicroProblemIndentification(tn.small,tn.large,gpt); + } } - - /** set micro BC**/ - if (_microBC == NULL){ - Msg::Error("microscopic BC must be specified to launch multiscale analyses"); - } - else{ - solver->addMicroBC(_microBC); - } - - /**set control type --> always load control**/ - solver->setControlType(0); - /** set system type**/ - solver->setSystemType(_systemType); - /** set stress method**/ - solver->setStressAveragingMethod(_stressIntegFlag); - /** set tangent method**/ - solver->setTangentAveragingMethod(_tangentIntegFlag,_tangentPerturbation); - /** set scheme**/ - solver->Scheme(_scheme); - /** set solver **/ - solver->Solver(_solver); - - /**set numstep and tolerance, compute time always from 0 to 1 **/ - solver->snlData(_numstep,1.,_tol,_absTol); - solver->setSameStateCriterion(_sameStateCriterion); - - solver->setExtractIrreversibleEnergyFlag(_extractIrreversibleEnergy); - -/** set eigensolver analysis**/ - if (_allStabilityView.find(type) != _allStabilityView.end() or _stabilityAnalysis){ - solver->eigenValueSolver(_numeigenvalue,true); - for (int i=0; i<_modeview.size(); i++) - solver->setModeView(_modeview[i]); - solver->setEigenSolverFollowing(_eigenFollowing); - solver->setInstabilityCriterion(_instabilitycriterion); - solver->setPerturbationFactor(_perturbationfactor); - solver->perturbateBucklingModeByMinimalEigenValueMode(_perturbation); + else + { + solver->setMicroProblemIndentification(0,0); } - /** set stiffness midification **/ - solver->stiffnessModification(_stiffModification); - /** set iterative solver**/ - solver->iterativeProcedure(_isIterative); - - /** for viewing**/ - std::set<int>::iterator it = _allView.find(type); - if ( (ele>0) and (it!=_allView.end() or (_isViewAll and _allGP.find(gpt)!=_allGP.end()))){ - solver->setMessageView(1); - solver->setStrainArchiveFlag(1); - solver->setHomogenizationPropertyArchiveFlag(1); - solver->setDisplacementAndIPArchiveFlag(1); - - for (std::map<int,std::string>::const_iterator itFieldView = _viewMicroField.begin(); itFieldView!= _viewMicroField.end(); itFieldView++){ - solver->internalPointBuildView(itFieldView->second,itFieldView->first,1,1); + + bool willView = false; + if (ele > 0) + { + if (_isViewAll and _allGP.find(gpt)!=_allGP.end()) + { + willView = true; } - - for (std::map<int,std::string>::const_iterator itUView = _viewMicroUnknownComponnent.begin(); itUView!= _viewMicroUnknownComponnent.end(); itUView++){ - solver->OneUnknownBuildView(itUView->second,itUView->first,1); + else + { + std::map<TwoNum, std::set<int> >::const_iterator itV = _solverToView.find(tn); + if (itV != _solverToView.end()) + { + const std::set<int>& viewGP = itV->second; + if (viewGP.find(gpt)!=viewGP.end()) + { + willView = true; + } + } } - } - else{ - solver->setHomogenizationPropertyArchiveFlag(0); - solver->setDisplacementAndIPArchiveFlag(0); - solver->setMessageView(0); - /** archive all strain to recompute if necessary**/ - solver->setStrainArchiveFlag(0); - } - /** initialize microsolver from setting data**/ - - solver->pathFollowing(_pathFollowing,0); - solver->setPathFollowingControlType(_controlType); - - // stress and tangent initial flag - solver->stressAveragingFlag(_stressFlag); - solver->tangentAveragingFlag(_tangentFlag); + - // initial boundayr condition - for (int iInit=0; iInit< _allInitialBC.size(); iInit++){ - const initialBoundaryCondition& iBC = _allInitialBC[iInit]; - solver->initialBC(iBC.onWhat,"Position",iBC.physical,iBC.comp,iBC.val); + /** for viewing**/ + if (willView) + { + solver->setMessageView(true); + solver->setStrainArchiveFlag(true); + solver->setHomogenizationPropertyArchiveFlag(true); + solver->setDisplacementAndIPArchiveFlag(true); + } + else + { + solver->setMessageView(false); + solver->setStrainArchiveFlag(false); + solver->setHomogenizationPropertyArchiveFlag(false); + solver->setDisplacementAndIPArchiveFlag(false); } - - for (int iD=0; iD < _allDirichletBC.size(); iD++){ - const DirichletBoundaryCondition& dirichLetBC= _allDirichletBC[iD]; - solver->displacementBC(dirichLetBC.onWhat,dirichLetBC.physical,dirichLetBC.comp,dirichLetBC.val); - }; - return solver; }; -void numericalMaterial::loadModel(const std::string meshfile){ - _microMeshFile = meshfile; -}; -void numericalMaterial::createMicroModel(const std::string geoFileName,const int dim,const int order, - const bool incomplete){ - _microGeoFile = geoFileName; - _meshDim = dim; - _meshOrder = order; - _meshIncomplete = incomplete; -}; - -// set micro part domains -void numericalMaterial::addDomain(partDomain* domain){ - _allDomain.push_back(domain); -}; -// set micro material law -void numericalMaterial::addMaterialLaw(materialLaw* mlaw){ - _allMaterialLaw.push_back(mlaw); -}; +nonLinearMechSolver* numericalMaterial::getMicroSolver() +{ + return _microSolver; +} + void numericalMaterial::addPertutationalMeshIP(const int ele, const int ip, const std::string meshfile){ Msg::Info("pert mesh it element %d ip %d",ele,ip); @@ -353,129 +281,25 @@ void numericalMaterial::addPerturbationMaterialLaw(materialLaw* mlaw){ _allPertubationLaw.push_back(mlaw); } -void numericalMaterial::addMicroBC(nonLinearMicroBC* bc){ - _microBC = bc; -} - -// set tolerence for micro newton-raphson -void numericalMaterial::setNumStep(const int i){ - _numstep = i; +// set view to this element +void numericalMaterial::addViewMicroSolver(const int e, const int gp){ + TwoNum tn(e,e); + std::set<int>& saveGP = _solverToView[tn]; + saveGP.insert(gp); }; - // -void numericalMaterial::setTolerance(const double tol, const double abstol){ - _tol = tol; - _absTol = abstol; -}; -void numericalMaterial::setSameStateCriterion(const double cr){ - _sameStateCriterion = cr; +void numericalMaterial::addViewMicroSolver(const int em, const int ep, const int gp){ + TwoNum tn(em,ep); + std::set<int>& saveGP = _solverToView[tn]; + saveGP.insert(gp); }; -// set view to this element -void numericalMaterial::addViewMicroSolver(const int e, const int gp){ - int type = numericalMaterial::createTypeWithTwoInts(e,gp); - _allView.insert(type); -}; + // set view all elements void numericalMaterial::setViewAllMicroProblems(const bool flag, const int a){ _allGP.insert(a); _isViewAll= flag; }; -void numericalMaterial::tangentAveragingFlag(const bool fl){ - _tangentFlag = fl; - -}; -void numericalMaterial::stressAveragingFlag(const bool fl){ - _stressFlag = fl; -}; - -void numericalMaterial::setStressAveragingMethod(const int method){ - _stressIntegFlag = method; -}; -void numericalMaterial::setTangentAveragingMethod(const int method, const double prec){ - _tangentIntegFlag = method; - _tangentPerturbation = prec; -}; - -void numericalMaterial::Scheme(const int s){ - _scheme = s; -}; -// -void numericalMaterial::Solver(const int s){ - _solver = s; -}; -// -void numericalMaterial::setSystemType(const int s){ - _systemType = s; -}; - - -void numericalMaterial::stiffnessModification(const bool flag){ - _stiffModification = flag; -}; - // -void numericalMaterial::iterativeProcedure(const bool flag){ - _isIterative = flag; -}; - -void numericalMaterial::pathFollowing(const bool p){ - _pathFollowing = p; -}; - -void numericalMaterial::setPathFollowingControlType(const int i){ - _controlType = i; -}; - - -void numericalMaterial::setRVEVolume(const double val){ - _rveVolume = val; -}; - -void numericalMaterial::addStabilityMicroSolver(const int e, const int gp){ - int type = numericalMaterial::createTypeWithTwoInts(e,gp); - _allStabilityView.insert(type); -}; - -void numericalMaterial::eigenValueSolver(const int num, const bool fl){ - _numeigenvalue = num; - _stabilityAnalysis = fl; -}; // number of eigenvalue -void numericalMaterial::setModeView(const int view){ - _modeview.push_back(view); -}; // for view buckling mode -void numericalMaterial::setPerturbationFactor(const double val){ - _perturbationfactor = val; -}; -void numericalMaterial::setInstabilityCriterion(const double val){ - _instabilitycriterion = val; -}; -void numericalMaterial::perturbateBucklingModeByMinimalEigenValueMode(const bool flag){ - _perturbation = flag; -}; -void numericalMaterial::setEigenSolverFollowing(const bool flag){ - _eigenFollowing = flag; -}; - -void numericalMaterial::internalPointBuildView(const std::string vname,const int comp){ - _viewMicroField[comp] = vname; -}; - -void numericalMaterial::OneUnknownBuildView(const std::string vname, const int comp){ - _viewMicroUnknownComponnent[comp] = vname; -}; - -void numericalMaterial::initialBC(std::string onwhat, const int numphys, const int comp, const double value){ - _allInitialBC.push_back(initialBoundaryCondition(onwhat,numphys,comp,value)); -}; - -void numericalMaterial::dirichletBC(std::string onwhat, const int numphys, const int comp, const double value){ - _allDirichletBC.push_back(DirichletBoundaryCondition(onwhat,numphys,comp,value)); -}; - -void numericalMaterial::setExtractIrreversibleEnergyFlag(const bool flg){ - _extractIrreversibleEnergy = flg; -}; - void numericalMaterial::loadAllRVEMeshes(const std::string prefix){ DIR *dir; struct dirent *ent; @@ -515,7 +339,6 @@ void numericalMaterial::assignMeshId(const int e, const int gpt){ if (_idIterator == _allPertMesh.end()) _idIterator = _allPertMesh.begin(); - _meshIdMap[type] = _idIterator->first; _idIterator++; } @@ -539,11 +362,11 @@ int numericalMaterial::getMeshId(const int e, const int gpt) const{ }; std::string numericalMaterial::getMeshFileName(const int e, const int gpt) const{ - if (_allPertMesh.size() ==0) return _microMeshFile; + if (_allPertMesh.size() ==0) return _microSolver->getMeshFileName(); int id = this->getMeshId(e,gpt); std::map<int,std::string>::const_iterator it = _allPertMesh.find(id); if (it == _allPertMesh.end()){ - return _microMeshFile; + return _microSolver->getMeshFileName(); } else{ return it->second; diff --git a/NonLinearSolver/materialLaw/numericalMaterial.h b/NonLinearSolver/materialLaw/numericalMaterial.h index 632b44d464469f753ea6aaaa7cbbdac5184d13ba..55f18a5399fb6578b5918983fce5bb947a4e3a3e 100644 --- a/NonLinearSolver/materialLaw/numericalMaterial.h +++ b/NonLinearSolver/materialLaw/numericalMaterial.h @@ -21,6 +21,7 @@ class nonLinearMechSolver; class partDomain; class IPStateBase; +class TwoNum; class numericalMaterialBase{ #ifndef SWIG @@ -48,7 +49,7 @@ class numericalMaterialBase{ } virtual ~numericalMaterialBase(){} - virtual nonLinearMechSolver* createMicroSolver(const int ele=0, const int gpt=0) const = 0; + virtual nonLinearMechSolver* createMicroSolver(const int ele, const int gpt) const = 0; virtual void createIPState(const bool issolve, /*create IPstate but create solver if true else false*/ IPStateBase* &ips, const bool* state_=NULL, @@ -69,111 +70,27 @@ class numericalMaterialBase{ #endif // SWIG }; -class numericalMaterial : public numericalMaterialBase{ +class numericalMaterial : public numericalMaterialBase +{ #ifndef SWIG - public: - class initialBoundaryCondition{ - public: - std::string onWhat; - int physical; - int comp; - double val; - public: - initialBoundaryCondition(const std::string locat, const int phys, const int c, const double v): - onWhat(locat),physical(phys),comp(c),val(v){} - initialBoundaryCondition(const initialBoundaryCondition& src): onWhat(src.onWhat),physical(src.physical), - comp(src.comp),val(src.val){} - virtual initialBoundaryCondition& operator = (const initialBoundaryCondition& src){ - onWhat = src.onWhat; - physical = src.physical; - comp = src.comp; - val = src.val; - return *this; - } - virtual ~initialBoundaryCondition(){}; - }; - - class DirichletBoundaryCondition : public initialBoundaryCondition{ - public: - DirichletBoundaryCondition(const std::string locat, const int phys, const int c, const double v): - initialBoundaryCondition(locat,phys,c,v){} - DirichletBoundaryCondition(const DirichletBoundaryCondition& src): initialBoundaryCondition(src){} - virtual DirichletBoundaryCondition& operator = (const initialBoundaryCondition& src){ - initialBoundaryCondition::operator =(src); - return *this; - }; - virtual ~DirichletBoundaryCondition(){}; - }; - - - protected: - mutable std::vector<partDomain*> _allocatedDomains; // cache - mutable std::vector<materialLaw*> _allocatedLaws; - - int _tag; // tag for solver - int _numstep; // number of time step at microsolve - double _tol; // tolerance used in NR at microsolver - double _absTol; // absotlute tolerane - int _systemType; // 0 - Disp elumination, 1 - mult elimination, 2 - disp-mult - int _scheme; // 1- linear static, 2- nonlinear static - int _solver; // 0 - gmm, 1 - tausc, 2 -petsc - bool _isIterative; // 0 - non-iterative , 1 - iterative - bool _stiffModification; // 0 - using one stiffness, 1- using multiple stiffness - double _sameStateCriterion; // the microcompute will not be performed if strain different less than this value - - + protected: + mutable std::vector<partDomain*> _allocatedDomains; // cache + mutable std::vector<materialLaw*> _allocatedLaws; + const nonLinearMechSolver* _macroSolver; + nonLinearMechSolver* _microSolver; + // std::map<int,int> _meshIdMap; // mesh id map, std::map<int,std::string>::iterator _idIterator;// iterator to acces meshes std::map<int,std::string> _allPertMesh; // all perturbed meshes - + // std::map<int,std::string> _meshOnIP; // constraint mesh on each ip - - std::string _microMeshFile; // micro meshfile - std::string _microGeoFile; // micro geometry - int _meshOrder; // mesh ord - int _meshDim; // mesh dimension - bool _meshIncomplete; // mesh incomplete - - std::vector<partDomain*> _allDomain; // micro domain to define - std::vector<materialLaw*> _allMaterialLaw; // micro material to define - nonLinearMicroBC* _microBC; // microBC - + // std::set<int> _pertMaterialLawIP; // all perturbed by material law std::vector<materialLaw*> _allPertubationLaw; // all perturbed law - - // initial BCs - std::vector<initialBoundaryCondition> _allInitialBC; - // dirichlet BCs - std::vector<DirichletBoundaryCondition> _allDirichletBC; - - // homogenized flags - bool _stressFlag; // stress flag 0- no 1- yes - int _stressIntegFlag; // stress method 0- volume, 1-surface - bool _tangentFlag; // tangent flag 0- no 1- yes - int _tangentIntegFlag; // tangent method 0- perturbation 1-condensation - double _tangentPerturbation; // perturbation value to compute tangent operator - - std::set<int> _allStabilityView; // stability view - bool _stabilityAnalysis; // true if using eigen analysis - std::vector<int> _modeview; // view mode - int _numeigenvalue; // number eigenvalue to computed - double _perturbationfactor; // factor for adding buckling mode to solution - double _instabilitycriterion; // criterion for instability - bool _perturbation; // perturbaton flag: 0- not perturbate buckling mode 1 - yes - bool _eigenFollowing; // eigen following - - std::set<int> _allView; // micro-solver to view + + std::map<TwoNum, std::set<int> > _solverToView; // micro-solver to view bool _isViewAll; // true if view all std::set<int> _allGP; // view all GP - std::map<int,std::string> _viewMicroField; - std::map<int,std::string> _viewMicroUnknownComponnent; - - // for pathFollowing analysis - bool _pathFollowing; // true if using path following method - int _controlType; // following strategies - - double _rveVolume; // volume of RVE - bool _extractIrreversibleEnergy; #endif public: @@ -186,70 +103,17 @@ class numericalMaterial : public numericalMaterialBase{ virtual nonLinearMechSolver* createMicroSolver(const int ele, const int gpt) const; #endif - // set micro meshes - virtual void loadModel(const std::string meshfile); - - virtual void createMicroModel(const std::string geoFileName,const int dim,const int order, - const bool incomplete=false); - - // set micro part domains - virtual void addDomain(partDomain* domain); - // set micro material law - virtual void addMaterialLaw(materialLaw* mlaw); + nonLinearMechSolver* getMicroSolver(); virtual void addPertutationalMeshIP(const int ele, const int ip, const std::string meshfile); virtual void setPerturbationMaterialLawIP(const int ele, const int ip); virtual void addPerturbationMaterialLaw(materialLaw* mlaw); - // add micro BC - virtual void addMicroBC(nonLinearMicroBC* bc); - // set tolerence for micro newton-raphson - virtual void setNumStep(const int i); - // - virtual void setTolerance(const double tol, const double abstol = 1e-10); - // - virtual void setSameStateCriterion(const double cr); // set view to this element - virtual void addViewMicroSolver(const int e, const int gp = 0); + virtual void addViewMicroSolver(const int e, const int gp); + virtual void addViewMicroSolver(const int em, const int ep, const int gp); // set view all elements - virtual void setViewAllMicroProblems(const bool flag = true, const int algp = 0); - - virtual void tangentAveragingFlag(const bool fl = true); - virtual void stressAveragingFlag(const bool fl = true); - virtual void setStressAveragingMethod(const int method); - virtual void setTangentAveragingMethod(const int method, const double prec = 1.e-8); - // - virtual void Scheme(const int s); - virtual void Solver(const int s); - virtual void setSystemType(const int s); - - virtual void stiffnessModification(const bool flag = true); - virtual void iterativeProcedure(const bool flag = true); - - // path following flag - virtual void pathFollowing(const bool p); - virtual void setPathFollowingControlType(const int i); - - virtual void setRVEVolume(const double val); - - /** for stability analysis */ - virtual void addStabilityMicroSolver(const int e, const int gp); - virtual void eigenValueSolver(const int num = 10, const bool fl = true); // number of eigenvalue - virtual void setModeView(const int view); // for view buckling mode - virtual void setPerturbationFactor(const double val = 1e-2); - virtual void setInstabilityCriterion(const double val = 1e-6); - virtual void perturbateBucklingModeByMinimalEigenValueMode(const bool flag = true); - virtual void setEigenSolverFollowing(const bool flag); - - virtual void setExtractIrreversibleEnergyFlag(const bool flg); - - // for initial BC - virtual void initialBC(std::string onwhat, const int numphys, const int comp, const double value); - virtual void dirichletBC(std::string onwhat, const int numphys, const int comp, const double value); - // for view - virtual void internalPointBuildView(const std::string vname,const int comp); - virtual void OneUnknownBuildView(const std::string vname, const int comp); - + virtual void setViewAllMicroProblems(const bool flag, const int algp); // this function load all meshes in current folder virtual void loadAllRVEMeshes(const std::string prefix); virtual void printMeshIdMap() const; diff --git a/NonLinearSolver/nlsolver/ElementErosionFilter.h b/NonLinearSolver/nlsolver/ElementErosionFilter.h index 61407f8b42e843bf9d147cd81894239fec84d89c..7752720248e04bb8ea501cff9b0ce10b8d8509d8 100644 --- a/NonLinearSolver/nlsolver/ElementErosionFilter.h +++ b/NonLinearSolver/nlsolver/ElementErosionFilter.h @@ -28,7 +28,7 @@ class elementErosionFilter :public elementFilter{ } void print() const{ if (_erosionElements.size() == 0){ - printf("No element is eroded\n"); + //printf("No element is eroded\n"); } else{ #if defined(HAVE_MPI) diff --git a/NonLinearSolver/nlsolver/homogenizedData.cpp b/NonLinearSolver/nlsolver/homogenizedData.cpp index 2870c59f73071a49da96b19ad5d30250ced8e637..3f26a7b13be78ae27c265eb1174157a73f5026a5 100644 --- a/NonLinearSolver/nlsolver/homogenizedData.cpp +++ b/NonLinearSolver/nlsolver/homogenizedData.cpp @@ -209,28 +209,28 @@ homogenizedData& homogenizedData::operator = (const homogenizedData& src){ return *this; }; -void allFirstOrderMechanicsFiles::openFiles(const int elnum, const int gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ +void allFirstOrderMechanicsFiles::openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ if (strainToFile){ - std::string filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_strain.csv"; + std::string filename = solver->getFileSavingPrefix()+"strain.csv"; F_File = Tensor23::createFile(filename); } if (stressToFile){ - std::string filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_stress.csv"; + std::string filename = solver->getFileSavingPrefix()+"stress.csv"; P_File= Tensor23::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_tangent.csv"; + filename = solver->getFileSavingPrefix()+"tangent.csv"; dPdF_File = Tensor43::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_defoEnergy.csv"; + filename = solver->getFileSavingPrefix()+"defoEnergy.csv"; defoEnerg_File = Tensor11::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_plasticEnergy.csv"; + filename = solver->getFileSavingPrefix()+"plasticEnergy.csv"; plasticEnerg_File = Tensor11::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_irreversibleEnergy.csv"; + filename = solver->getFileSavingPrefix()+"irreversibleEnergy.csv"; irreversibleEnergFile =Tensor11::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_lostSolutionUniquenssCriterion.csv"; + filename = solver->getFileSavingPrefix()+"lostSolutionUniquenssCriterion.csv"; lostSolutionUniquenssCriterion_File = Tensor11::createFile(filename); } }; @@ -258,24 +258,24 @@ void allFirstOrderMechanicsFiles::dataToFile(const double time, const nonLinearM }; } -void allFailureFiles::openFiles(const int _enum, const int _gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ +void allFailureFiles::openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ if (failureToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_cohesiveJump.csv"; + std::string filename = solver->getFileSavingPrefix()+"cohesiveJump.csv"; cohesiveJump_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_damageVolume.csv"; + filename = solver->getFileSavingPrefix()+"damageVolume.csv"; damageVolume_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_cohesiveTraction.csv"; + filename = solver->getFileSavingPrefix()+"cohesiveTraction.csv"; cohesiveTraction_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_averageCohesiveBandWidth.csv"; + filename = solver->getFileSavingPrefix()+"averageCohesiveBandWidth.csv"; averageCohesiveBandWidth_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_Fdam.csv"; + filename = solver->getFileSavingPrefix()+"Fdam.csv"; FDam_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_tangentCohesiveJumpDF.csv"; + filename = solver->getFileSavingPrefix()+"tangentCohesiveJumpDF.csv"; dCohesiveJumpDF_File = Tensor33::createFile(filename); } }; @@ -301,23 +301,23 @@ void allFailureFiles::dataToFile(const double time, const nonLinearMechSolver* s } }; -void allSecondOrderMechanicsFiles::openFiles(const int elnum, const int gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ +void allSecondOrderMechanicsFiles::openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ if (strainToFile){ - std::string filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_second_strain.csv"; + std::string filename = solver->getFileSavingPrefix()+"second_strain.csv"; G_File = Tensor33::createFile(filename); } if (stressToFile){ - std::string filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_second_stress.csv"; + std::string filename = solver->getFileSavingPrefix()+"second_stress.csv"; Q_File = Tensor33::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_firstsecond_tangent.csv"; + filename = solver->getFileSavingPrefix()+"firstsecond_tangent.csv"; dPdG_File = Tensor53::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_secondfirst_tangent.csv"; + filename = solver->getFileSavingPrefix()+"secondfirst_tangent.csv"; dQdF_File = Tensor53::createFile(filename); - filename = "E_"+int2str(elnum)+"_GP_"+int2str(gnum)+"_second_tangent.csv"; + filename = solver->getFileSavingPrefix()+"second_tangent.csv"; dQdG_File = Tensor63::createFile(filename); } }; @@ -340,78 +340,78 @@ void allSecondOrderMechanicsFiles::dataToFile(const double time, const nonLinear } }; -void allConExtraDofFiles::openFiles(const int _enum, const int _gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ +void allConExtraDofFiles::openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile){ if (solver->getMicroBC()->getTotalNumberOfConDofs() > 1){ if (strainToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_gradExtraDof_"+int2str(fieldIndex)+".csv"; + std::string filename = solver->getFileSavingPrefix()+"gradExtraDof_"+int2str(fieldIndex)+".csv"; gradT_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_ExtraDofValue_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"ExtraDofValue_"+int2str(fieldIndex)+".csv"; T_File = Tensor11::createFile(filename); }; if (stressToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_ExtraDofFlux_"+int2str(fieldIndex)+".csv"; + std::string filename = solver->getFileSavingPrefix()+"ExtraDofFlux_"+int2str(fieldIndex)+".csv"; fluxT_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_InternalEnergyExtraDof_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"InternalEnergyExtraDof_"+int2str(fieldIndex)+".csv"; eT_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentFluxF_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"TangentFluxF_"+int2str(fieldIndex)+".csv"; dFluxTdF_File = Tensor33::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentFluxGradExtraDof_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"TangentFluxGradExtraDof_"+int2str(fieldIndex)+".csv"; dFluxTdGradT_File = Tensor23::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentFluxExtraDof_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"TangentFluxExtraDof_"+int2str(fieldIndex)+".csv"; dFluxTdT_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentStressGradExtraDof_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"TangentStressGradExtraDof_"+int2str(fieldIndex)+".csv"; dPdGradT_File = Tensor33::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentStressExtraDofValue_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"TangentStressExtraDofValue_"+int2str(fieldIndex)+".csv"; dPdT_File = Tensor23::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_mechanicalSource_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"mechanicalSource_"+int2str(fieldIndex)+".csv"; mecaSource_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_fieldCapacity_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"fieldCapacity_"+int2str(fieldIndex)+".csv"; Cp_File = Tensor11::createFile(filename); } } else if (solver->getMicroBC()->getTotalNumberOfConDofs() == 1){ if (strainToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_gradExtraDof.csv"; + std::string filename = solver->getFileSavingPrefix()+"gradExtraDof.csv"; gradT_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_ExtraDofValue.csv"; + filename = solver->getFileSavingPrefix()+"ExtraDofValue.csv"; T_File = Tensor11::createFile(filename); }; if (stressToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_ExtraDofFlux.csv"; + std::string filename = solver->getFileSavingPrefix()+"ExtraDofFlux.csv"; fluxT_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_InternalEnergyExtraDof.csv"; + filename = solver->getFileSavingPrefix()+"InternalEnergyExtraDof.csv"; eT_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentFluxF.csv"; + filename = solver->getFileSavingPrefix()+"TangentFluxF.csv"; dFluxTdF_File = Tensor33::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentFluxGradExtraDof.csv"; + filename = solver->getFileSavingPrefix()+"TangentFluxGradExtraDof.csv"; dFluxTdGradT_File = Tensor23::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentFluxExtraDof.csv"; + filename = solver->getFileSavingPrefix()+"TangentFluxExtraDof.csv"; dFluxTdT_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentStressGradExtraDof.csv"; + filename = solver->getFileSavingPrefix()+"TangentStressGradExtraDof.csv"; dPdGradT_File = Tensor33::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentStressExtraDofValue.csv"; + filename = solver->getFileSavingPrefix()+"TangentStressExtraDofValue.csv"; dPdT_File = Tensor23::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_mechanicalSource.csv"; + filename = solver->getFileSavingPrefix()+"mechanicalSource.csv"; mecaSource_File = Tensor11::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_fieldCapacity.csv"; + filename = solver->getFileSavingPrefix()+"fieldCapacity.csv"; Cp_File = Tensor11::createFile(filename); } } @@ -452,31 +452,31 @@ void allConExtraDofFiles::dataToFile(const double time, const nonLinearMechSolve } }; -void allNonConExtraDofFiles::openFiles(const int _enum, const int _gnum, const nonLinearMechSolver* solver, const bool strainToFile, const bool stressToFile, const bool failureToFile){ +void allNonConExtraDofFiles::openFiles(const nonLinearMechSolver* solver, const bool strainToFile, const bool stressToFile, const bool failureToFile){ if (solver->getMicroBC()->getTotalNumberOfNonConDofs() > 1){ if (strainToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_gradNonConExtraDof_"+int2str(fieldIndex)+".csv"; + std::string filename = solver->getFileSavingPrefix()+"gradNonConExtraDof_"+int2str(fieldIndex)+".csv"; gradV_File = Tensor13::createFile(filename); }; if (stressToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_NonConExtraDofFlux_"+int2str(fieldIndex)+".csv"; + std::string filename = solver->getFileSavingPrefix()+"NonConExtraDofFlux_"+int2str(fieldIndex)+".csv"; fluxV_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentNonConFluxGradNonConExtraDof_"+int2str(fieldIndex)+".csv"; + filename = solver->getFileSavingPrefix()+"TangentNonConFluxGradNonConExtraDof_"+int2str(fieldIndex)+".csv"; dfluxVdgradV_File = Tensor23::createFile(filename); } } else if (solver->getMicroBC()->getTotalNumberOfNonConDofs() == 1){ if (strainToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_gradNonConExtraDof.csv"; + std::string filename = solver->getFileSavingPrefix()+"gradNonConExtraDof.csv"; gradV_File = Tensor13::createFile(filename); }; if (stressToFile){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_NonConExtraDofFlux.csv"; + std::string filename =solver->getFileSavingPrefix()+"NonConExtraDofFlux.csv"; fluxV_File = Tensor13::createFile(filename); - filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_TangentNonConFluxGradNonConExtraDof.csv"; + filename = solver->getFileSavingPrefix()+"TangentNonConFluxGradNonConExtraDof.csv"; dfluxVdgradV_File = Tensor23::createFile(filename); } @@ -507,25 +507,25 @@ homogenizedDataFiles::homogenizedDataFiles(const nonLinearMechSolver* solver): _ }; -void homogenizedDataFiles::openFiles(const int elnum, const int gnum, const nonLinearMechSolver* solver, +void homogenizedDataFiles::openFiles(const nonLinearMechSolver* solver, const bool strainToFile, const bool stressToFile, const bool failureToFile){ if (solver->getMicroBC()->getTotalNumberOfMechanicalDofs()>0){ - _allFirstOrderFiles.openFiles(elnum,gnum,solver,strainToFile,stressToFile,failureToFile); + _allFirstOrderFiles.openFiles(solver,strainToFile,stressToFile,failureToFile); if (solver->getMicroBC()->getOrder()==2){ - _allSecondOrderFiles.openFiles(elnum,gnum,solver,strainToFile,stressToFile,failureToFile); + _allSecondOrderFiles.openFiles(solver,strainToFile,stressToFile,failureToFile); } if (failureToFile){ - _allFailureFiles.openFiles(elnum,gnum,solver,strainToFile,stressToFile,failureToFile); + _allFailureFiles.openFiles(solver,strainToFile,stressToFile,failureToFile); } } if (solver->getMicroBC()->getTotalNumberOfConDofs()>0){ for (int index=0; index < solver->getMicroBC()->getTotalNumberOfConDofs(); index++){ - _allConFiles[index].openFiles(elnum,gnum,solver,strainToFile,stressToFile,failureToFile); + _allConFiles[index].openFiles(solver,strainToFile,stressToFile,failureToFile); } } if (solver->getMicroBC()->getTotalNumberOfNonConDofs()>0){ for (int index=0; index < solver->getMicroBC()->getTotalNumberOfNonConDofs(); index++){ - _allNonConFiles[index].openFiles(elnum,gnum,solver,strainToFile,stressToFile,failureToFile); + _allNonConFiles[index].openFiles(solver,strainToFile,stressToFile,failureToFile); } } }; diff --git a/NonLinearSolver/nlsolver/homogenizedData.h b/NonLinearSolver/nlsolver/homogenizedData.h index 9ee07218b0e23644f6bd202debf0f680d02448d7..cfd80a755168ea993969ec15400d5e045e84d177 100644 --- a/NonLinearSolver/nlsolver/homogenizedData.h +++ b/NonLinearSolver/nlsolver/homogenizedData.h @@ -294,7 +294,7 @@ class allFirstOrderMechanicsFiles{ allFirstOrderMechanicsFiles():F_File(NULL),P_File(NULL),dPdF_File(NULL),defoEnerg_File(NULL),plasticEnerg_File(NULL), irreversibleEnergFile(NULL),lostSolutionUniquenssCriterion_File(NULL){}; ~allFirstOrderMechanicsFiles(){}; - void openFiles(const int elnum, const int gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); + void openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); void dataToFile(const double time, const nonLinearMechSolver* solver, const homogenizedData* data); void closeFiles(){ if (F_File!=NULL) {fclose(F_File); F_File = NULL;}; @@ -319,7 +319,7 @@ class allFailureFiles{ damageVolume_File(NULL),cohesiveTraction_File(NULL),averageCohesiveBandWidth_File(NULL), FDam_File(NULL), dCohesiveJumpDF_File(NULL){}; ~allFailureFiles(){}; - void openFiles(const int _enum, const int _gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); + void openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); void dataToFile(const double time, const nonLinearMechSolver* solver, const homogenizedData* data); void closeFiles(){ if (cohesiveJump_File!=NULL){fclose(cohesiveJump_File);cohesiveJump_File=NULL;}; @@ -341,7 +341,7 @@ class allSecondOrderMechanicsFiles{ *dQdF_File; allSecondOrderMechanicsFiles():G_File(NULL),Q_File(NULL),dQdG_File(NULL),dPdG_File(NULL),dQdF_File(NULL){}; ~allSecondOrderMechanicsFiles(){}; - void openFiles(const int elnum, const int gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); + void openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); void dataToFile(const double time, const nonLinearMechSolver* solver, const homogenizedData* data); void closeFiles(){ @@ -370,7 +370,7 @@ class allConExtraDofFiles{ allConExtraDofFiles(const int index):fieldIndex(index), gradT_File(NULL),T_File(NULL),fluxT_File(NULL),eT_File(NULL),dFluxTdF_File(NULL),dFluxTdGradT_File(NULL), dFluxTdT_File(NULL),dPdGradT_File(NULL),dPdT_File(NULL),mecaSource_File(NULL),Cp_File(NULL){}; ~allConExtraDofFiles(){}; - void openFiles(const int _enum, const int _gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); + void openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); void dataToFile(const double time, const nonLinearMechSolver* solver, const homogenizedData* data); void closeFiles(){ if (gradT_File !=NULL){ fclose(gradT_File);gradT_File=NULL;}; @@ -397,7 +397,7 @@ class allNonConExtraDofFiles{ allNonConExtraDofFiles(const int index):fieldIndex(index),gradV_File(NULL),fluxV_File(NULL),dfluxVdgradV_File(NULL){}; ~allNonConExtraDofFiles(){}; - void openFiles(const int _enum, const int _gnum, const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); + void openFiles(const nonLinearMechSolver* solver,const bool strainToFile, const bool stressToFile, const bool failureToFile); void dataToFile(const double time, const nonLinearMechSolver* solver, const homogenizedData* data); void closeFiles(){ if (gradV_File!=NULL){fclose(gradV_File);gradV_File=NULL;}; @@ -418,7 +418,7 @@ class homogenizedDataFiles{ public: homogenizedDataFiles(const nonLinearMechSolver* solver), ~homogenizedDataFiles(){} - void openFiles(const int elnum, const int gnum, const nonLinearMechSolver* solver, + void openFiles(const nonLinearMechSolver* solver, const bool strainToFile, const bool stressToFile, const bool failureToFile); void dataToFile(const double time, const nonLinearMechSolver* solver, const homogenizedData* data); diff --git a/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp b/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp index a25361122b42f3a3a549bae565ab78ffc97a9c68..fb1552cdf2200aae4a125cbd411335472db9a88a 100644 --- a/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp +++ b/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp @@ -81,61 +81,175 @@ #include "nlmpiAlgorithms.h" #endif // HAVE_MPI - nonLinearMechSolver::nonLinearMechSolver(int tag, bool isParallel) : _tag(tag), _dim(0), pAssembler(NULL), _numstepExpl(1), _numstepImpl(1), - endtime(1.), _tol(1.e-6), _absTol(1.e-12), whatSolver(nonLinearMechSolver::Gmm), - whatScheme(nonLinearMechSolver::StaticLinear), - _beta(0.25), _gamma(0.5), _alpham(0.), _alphaf(0.),_rhoinfty(1.), _gammas(0.6666), - _mpiUserDom(0), _maxNRite(15),_pathFollowing(false),_pathFollowingMethod(GLOBAL_ARC_LENGTH_BASED), - _loadStep(0.),_localStep(0.), _loadStepPrev(0.),_localStepPrev(0.), - _localStepMinimal(0.),_localStepMaximal(1e100), nsba(0), - _arcLengthStepMinimal(0.),_arcLengthStepMaximal(1e100), - _numNROptimal(5),_expNROptimal(1.),_numNROptimalLocal(5), _timeStepAdaptation(false),_switchedControlType(false), - _pathFollowingIncrementType(DISSIPATION_ENERGY), _arcLengthStep(0.),_arcLengthStepPrev(0.), - _timeStepAdaptationFactor(1.), _endSchemeMonitoring(false),_endSchemeMonitoringObject(NULL), - _timeStepFactorReduction(2.),_maxAttemptStepReduction(6), _niteTimeStepIncrease(5), - _maximalTimeStep(1e10), _minimalTimeStep(0), - _solver_options(""), _notResetUnknowns(true), - _crackTrackingFile(NULL), _mpiDofManager(false), _previousInit(false), - _notResetedBC(false),_notResetedContact(false), _ipf(NULL), _meshFileName(""), _restartMshFileName("restart_"), - _dynamicRelaxation(false),_previousScheme(StaticNonLinear),_criterionFile(NULL), - _microFlag(false),_ufield(NULL),_pAl(NULL), _multiscaleFlag(false), _pbcNodeData(NULL), - _extractPerturbationToFile(false), _sameStateCriterion(1e-10), - _currentState(NULL),_initialState(NULL), _elasticState(NULL), - _homogenizedFiles(NULL), _elasticDPDFTangentFile(NULL), - _condensation(NULL),_eigenSolver(NULL),_eigflag(false),_energField(NULL), - _stressflag(true),_tangentflag(false),_enum(0),_gnum(0),_rveVolume(0.), - _systemType(nonLinearMechSolver::MULT_ELIM),_controlType(nonLinearMechSolver::LOAD_CONTROL), - _highOrderFlag(false), _eigenValueFile(NULL), _perturbationfactor(0.1), - _archive(true),_stiffEstimation(true),_stiffnessModification(true), - _iterativeNR(true),_messageView(false), _outputFile(NULL), _eigenFollowing(false), - _homogenizeStressMethod(nonLinearMechSolver::VOLUME), _stabilityCriterionFollowing(false), - _homogenizeTangentMethod(nonLinearMechSolver::PERTURB), _isHommStrainSaveToFile(true), - _isHommProSaveToFile(true), _tangentPerturbation(1.e-8), _perturbate(false), - _fragmentationFile(NULL), _energyComputation(1), _fractureEnergyComputation(0), - _timeStepByBenson(false),_lineSearch(false),_strainMap(NULL),_strainMappingFollwing(true), - _GmshOneLabViewNum(0), _isWriteDeformedMeshToFile(false),_isPerturbedEigenMode(false),_numberPerturbedMode(1),_valPerturbedMode(1.), - _pbcGroup(NULL),_testFlag(false), _eigenSolverType(DYNAMIC),_eigenSolverNumIteration(20),_eigenSolverMethod("krylovschur"), _eigenSolverConvergenCriterion(1e-6), - _MKToFile(false),_lostSolutionUniquenssNormal(0.,0.,0.), _surfaceReductionRatio(1.), - _damageToCohesiveJump(false), _RVELengthInCohesiveNormal(1.),_FdamOnset(0.), - _useMatMatSolveToInvertMatrix(false), _maximalLostEllipticityCriterion(-1.), - _microBC(NULL), _damageIsBlocked(false), _solverIsBroken(false), - _bulkElementErosionFlag(false), _interfaceElementErosionFlag(false),_erosionType(ALL_IP_FAILED), - _globalCheckFlag(false),_erosionGlobalCriterion(NULL), - _macroControlTypePathFollowing(-1),_correctionMethodPathFollowing(-1), - _tranversalCriterionPathFollowing(-1),_solverTypePathFollowing(-1), - _pathFollowingEqRatio(1.),_extractIrreversibleEnergy(false), - _pathFollowingLocation(BULK_INTERFACE), - _homogenizedStressLastActiveDissipation(0.),_homogenizedStrainLastActiveDissipation(0.), - _homogenizedDissipationStrainLastActiveDissipation(0.), - _homogenizedCohesiveJumpLastActiveDissipation(0.), - _lostSolutionUniquenssTolerance(0.), _voidPartInLocalizationBand(0.), - _GModelIsRotated(false), _checkFailureOnset(false), _checkWithNormal(true), _homogenizedCrackSurface(0.), - _microBCOld(NULL),_microFailureBC(NULL), _failureBCIsSwitched(false), - _pathFollowingSwitchCriterion(0.), _failureBasedOnPreviousState(true), _selectiveObject(NULL), - _macroTime(0.),_macroTimeStep(1.),_macroStep(0.),_hermitian(true), - _extractElasticTangentOperator(false), - _resetRestart(false),_disableResetRestart(false), - _noMassPredicorWithoutVelocityAndAcceleration(false) +nonLinearMechSolver::nonLinearMechSolver(int tag, bool isParallel) : +pModel(NULL), +_dim(0), +_tag(tag), +_mpiUserDom(0), +_workingRank(0), +_mpiDofManager(false), +_isPartitioned(false), +_mapRanks(), +_meshFileName(""), +_currentStep(0), +_solver_options(""), +_GmshOneLabViewNum(0), + +pAssembler(NULL), +_ipf(NULL), +_ufield(NULL), +_energField(NULL), + +whatSolver(Petsc), +whatScheme(StaticLinear), + +endtime(1.), +_explicitOpts(), + +_numstepImpl(1), +_tol(1.e-6), +_absTol(1.e-12), +_stiffEstimation(true), +_stiffnessModification(true), +_iterativeNR(true), +_lineSearch(false), + +_implicitOpts(), + +_pathFollowing(false), +_pathFollowingMethod(GLOBAL_ARC_LENGTH_BASED), +_macroControlTypePathFollowing(-1), +_correctionMethodPathFollowing(-1), +_tranversalCriterionPathFollowing(-1), +_solverTypePathFollowing(-1), +_pathFollowingEqRatio(1.), +_switchedControlType(false), +_pathFollowingSwitchCriterion(0.), +_pathFollowingIncrementType(DISSIPATION_ENERGY), +_pathFollowingLocation(BULK_INTERFACE), + +_maxNRite(15), +_timeStepFactorReduction(2.), +_maxAttemptStepReduction(6), +_niteTimeStepIncrease(5), +_timeStepAdaptation(false), +_maximalTimeStep(1e10), +_minimalTimeStep(0), +_numNROptimal(5), +_expNROptimal(1.), +_localStep(0.), +_localStepPrev(0.), +_localStepMinimal(0.), +_localStepMaximal(1e100), +_arcLengthStep(0.), +_arcLengthStepPrev(0.), +_arcLengthStepMinimal(0.), +_arcLengthStepMaximal(1e100), +_timeStepAdaptationFactor(1.), +_numNROptimalLocal(5), + +_restartMshFileName("restart_"), +_resetRestart(false), +_disableResetRestart(false), +_crackTrackingName(""), +_crackTrackingFile(NULL), +_fragmentationName(""), +_fragmentationFile(NULL), + +_energyComputation(1), +_fractureEnergyComputation(0), +nsba(0), + +_previousScheme(StaticLinear), +_previousInit(false), +_notResetedBC(false), +_notResetedContact(false), +_notResetUnknowns(true), + +_strainMap(NULL), +_endSchemeMonitoringObject(NULL), +_selectiveObject(NULL), + +_bulkElementErosionFlag(false), +_interfaceElementErosionFlag(false), +_erosionType(ALL_IP_FAILED), +_erosionGlobalCriterion(NULL), + +_eigOpts(), + +_isWriteDeformedMeshToFile(false), + +_enumMinus(0), +_enumPlus(0), +_gnum(0), + +_macroTime(1.), +_macroTimeStep(1.), +_macroStep(1), + +_systemType(MULT_ELIM), +_controlType(LOAD_CONTROL), +_microFlag(false), +_multiscaleFlag(false), + +_microBC(NULL), +_microBCOld(NULL), +_microFailureBC(NULL), + +_stressflag(true), +_tangentflag(false), + +_homogenizeStressMethod(VOLUME), +_homogenizeTangentMethod(PERTURB), +_sameStateCriterion(1e-8), + +_archive(true), +_isHommProSaveToFile(true), +_isHommStrainSaveToFile(true), +_extractPerturbationToFile(false), +_messageView(false), +_tangentPerturbation(1.e-8), + +_rho(0.), +_rveVolume(0.), +_currentState(NULL), +_initialState(NULL), +_elasticState(NULL), + +_pAl(NULL), +_condensation(NULL), +_homogenizedFiles(NULL), +_outputFile(NULL), + +_testFlag(false), +_pbcGroup(NULL), + +_damageIsBlocked(false), +_solverIsBroken(false), +_maximalLostEllipticityCriterion(-1.), +_homogenizedCrackSurface(0.), + +_failureBCIsSwitched(false), +_failureBasedOnPreviousState(true), +_GModelIsRotated(false), +_checkFailureOnset(false), +_checkWithNormal(true), +_damageToCohesiveJump(false), +_RVELengthInCohesiveNormal(1.), +_surfaceReductionRatio(1.), +_lostSolutionUniquenssTolerance(0.), +_voidPartInLocalizationBand(0.), +_extractIrreversibleEnergy(false), + +_FdamOnset(0.), +_lostSolutionUniquenssNormal(0.,0.,0.), +_homogenizedStressLastActiveDissipation(0.), +_homogenizedStrainLastActiveDissipation(0.), +_homogenizedDissipationStrainLastActiveDissipation(0.), +_homogenizedCohesiveJumpLastActiveDissipation(0.), + +_extractElasticTangentOperator(false), +_elasticDPDFTangentFile(NULL) { // check parallelization of dofManager #if defined(HAVE_MPI) @@ -163,8 +277,6 @@ std::string srank = oss.str(); _restartMshFileName += oss.str() + ".msh"; - - _hyperellipticControlComp.resize(3); _hyperellipticControlComp[0] =0; _hyperellipticControlComp[1] =1; @@ -174,22 +286,19 @@ nonLinearMechSolver::~nonLinearMechSolver(){ if (pModel) delete pModel; if (pAssembler) delete pAssembler; - if (_crackTrackingFile != NULL) fclose(_crackTrackingFile); - if (_fragmentationFile != NULL) fclose(_fragmentationFile); - this->resetBoundaryConditions(); - this->resetContactInteraction(); - - if (_strainMap) delete _strainMap; - - if (_pAl) delete _pAl; - if (_condensation) delete _condensation; - if (_eigenSolver) delete _eigenSolver; - if(_ipf != NULL) delete _ipf; if (_ufield) delete _ufield; if (_energField) delete _energField; - if (_pbcGroup != NULL) delete _pbcGroup; + if (_crackTrackingFile != NULL) fclose(_crackTrackingFile); + if (_fragmentationFile != NULL) fclose(_fragmentationFile); + + if (_strainMap) delete _strainMap; + if (_endSchemeMonitoringObject != NULL) delete _endSchemeMonitoringObject; + if (_selectiveObject) delete _selectiveObject; + if (_erosionGlobalCriterion!=NULL){ + delete _erosionGlobalCriterion; + } if (_microBC){ delete _microBC; @@ -197,17 +306,952 @@ nonLinearMechSolver::~nonLinearMechSolver(){ } if (_microBCOld) delete _microBCOld; if (_microFailureBC) delete _microFailureBC; - if (_erosionGlobalCriterion!=NULL){ - delete _erosionGlobalCriterion; + + this->resetBoundaryConditions(); + this->resetContactInteraction(); + + + if (_pAl) delete _pAl; + if (_condensation) delete _condensation; + if (_pbcGroup != NULL) delete _pbcGroup; + if (_homogenizedFiles !=NULL) + { + _homogenizedFiles->closeFiles(); + delete _homogenizedFiles; } - if (_endSchemeMonitoringObject != NULL) delete _endSchemeMonitoringObject; - if (_selectiveObject) delete _selectiveObject; + if (_elasticDPDFTangentFile) {fclose(_elasticDPDFTangentFile); _elasticDPDFTangentFile = NULL;}; + if (_initialState) {delete _initialState;} + if (_currentState) {delete _currentState;} + if (_elasticState) {delete _elasticState;}; + + if (_outputFile != NULL) fclose(_outputFile); if(!_microFlag) // only on the master solver? -->ok, we need to pass once only to finish everything (PETSc, SLEPc, ...) Msg::Exit(0); } +nonLinearMechSolver::nonLinearMechSolver(const nonLinearMechSolver& src): +_dim(src._dim), _tag(src._tag), +_mpiUserDom(src._mpiUserDom), +_workingRank(src._workingRank), // current working rank +_mpiDofManager(src._mpiDofManager), // true -> parallelization of dofManager. +_isPartitioned(src._isPartitioned), // true if FE mesh is partitioned + // the mapRank is created from number of proc available and number of mesh partion, +_mapRanks(), +_meshFileName(""), // To transfert the mesh file from one folder to an other one +_currentStep(0), // As it is used in different functions now (Onelab control) + // user solver option given as a string +_solver_options(src._solver_options), + // For Onelab display +_GmshOneLabViewNum(src._GmshOneLabViewNum), + +pAssembler(NULL), +_ipf(NULL), +_ufield(NULL), +_energField(NULL), + +whatSolver(Petsc), +whatScheme(StaticLinear), + +endtime(1.), +_explicitOpts(), + +_numstepImpl(1), +_tol(1.e-6), +_absTol(1.e-12), +_stiffEstimation(true), +_stiffnessModification(true), +_iterativeNR(true), +_lineSearch(false), + +_implicitOpts(), + +_pathFollowing(false), +_pathFollowingMethod(GLOBAL_ARC_LENGTH_BASED), +_macroControlTypePathFollowing(-1), +_correctionMethodPathFollowing(-1), +_tranversalCriterionPathFollowing(-1), +_solverTypePathFollowing(-1), +_pathFollowingEqRatio(1.), +_switchedControlType(false), +_pathFollowingSwitchCriterion(0.), +_pathFollowingIncrementType(DISSIPATION_ENERGY), +_pathFollowingLocation(BULK_INTERFACE), + +_maxNRite(15), +_timeStepFactorReduction(2.), +_maxAttemptStepReduction(6), +_niteTimeStepIncrease(5), +_timeStepAdaptation(false), +_maximalTimeStep(1e10), +_minimalTimeStep(0), +_numNROptimal(5), +_expNROptimal(1.), +_localStep(0.), +_localStepPrev(0.), +_localStepMinimal(0.), +_localStepMaximal(1e100), +_arcLengthStep(0.), +_arcLengthStepPrev(0.), +_arcLengthStepMinimal(0.), +_arcLengthStepMaximal(1e100), +_timeStepAdaptationFactor(1.), +_numNROptimalLocal(5), + +_restartMshFileName("restart_"), +_resetRestart(false), +_disableResetRestart(false), +_crackTrackingName(""), +_crackTrackingFile(NULL), +_fragmentationName(""), +_fragmentationFile(NULL), + +_energyComputation(1), +_fractureEnergyComputation(0), +nsba(0), + +_previousScheme(StaticLinear), +_previousInit(false), +_notResetedBC(false), +_notResetedContact(false), +_notResetUnknowns(true), + +_strainMap(NULL), +_endSchemeMonitoringObject(NULL), +_selectiveObject(NULL), + +_bulkElementErosionFlag(false), +_interfaceElementErosionFlag(false), +_erosionType(ALL_IP_FAILED), +_erosionGlobalCriterion(NULL), + +_eigOpts(), + +_isWriteDeformedMeshToFile(false), + +_enumMinus(0), +_enumPlus(0), +_gnum(0), + +_macroTime(1.), +_macroTimeStep(1.), +_macroStep(1), + +_systemType(MULT_ELIM), +_controlType(LOAD_CONTROL), +_microFlag(false), +_multiscaleFlag(false), + +_microBC(NULL), +_microBCOld(NULL), +_microFailureBC(NULL), + +_stressflag(true), +_tangentflag(false), + +_homogenizeStressMethod(VOLUME), +_homogenizeTangentMethod(PERTURB), +_sameStateCriterion(1e-8), + +_archive(true), +_isHommProSaveToFile(true), +_isHommStrainSaveToFile(true), +_extractPerturbationToFile(false), +_messageView(false), +_tangentPerturbation(1.e-8), + +_rho(0.), +_rveVolume(0.), +_currentState(NULL), +_initialState(NULL), +_elasticState(NULL), + +_pAl(NULL), +_condensation(NULL), +_homogenizedFiles(NULL), +_outputFile(NULL), + +_testFlag(false), +_pbcGroup(NULL), + +_damageIsBlocked(false), +_solverIsBroken(false), +_maximalLostEllipticityCriterion(-1.), +_homogenizedCrackSurface(0.), + +_failureBCIsSwitched(false), +_failureBasedOnPreviousState(true), +_GModelIsRotated(false), +_checkFailureOnset(false), +_checkWithNormal(true), +_damageToCohesiveJump(false), +_RVELengthInCohesiveNormal(1.), +_surfaceReductionRatio(1.), +_lostSolutionUniquenssTolerance(0.), +_voidPartInLocalizationBand(0.), +_extractIrreversibleEnergy(false), + +_FdamOnset(0.), +_lostSolutionUniquenssNormal(0.,0.,0.), +_homogenizedStressLastActiveDissipation(0.), +_homogenizedStrainLastActiveDissipation(0.), +_homogenizedDissipationStrainLastActiveDissipation(0.), +_homogenizedCohesiveJumpLastActiveDissipation(0.), + +_extractElasticTangentOperator(false), +_elasticDPDFTangentFile(NULL) +{ + src.copyOptionsToOtherSolver(this); + loadModel(src._meshFileName); + // domain + for (int i=0; i<src.domainVector.size(); i++) + { + const partDomain* dom = src.domainVector[i]; + const dgPartDomain* dgdom = dynamic_cast<const dgPartDomain*>(dom); + bool add=false; + if (dgdom) + { + add = true; + if (dom->groupOfElementsSize() ==0 and (dgdom->getPlusDomain()->getPhysical() == dgdom->getMinusDomain()->getPhysical())) + { + add = false; + } + } + else + { + add = true; + } + + if (add) + { + addDomain(src.domainVector[i]->clone()); + } + }; + // material law + for (std::map<int,materialLaw*>::const_iterator it = src.maplaw.begin(); it!= src.maplaw.end(); it++) + { + addMaterialLaw(it->second->clone()); + } + src.copyBCsToOtherSolver(this); +} + +nonLinearMechSolver* nonLinearMechSolver::clone(const std::string mshFile, int tag,bool isParallel) const +{ + nonLinearMechSolver* sv = new nonLinearMechSolver(tag,isParallel); + // + copyOptionsToOtherSolver(sv); + // load model + sv->loadModel(mshFile); + // domain + for (int i=0; i<domainVector.size(); i++) + { + const partDomain* dom = domainVector[i]; + const dgPartDomain* dgdom = dynamic_cast<const dgPartDomain*>(dom); + bool add=false; + if (dgdom) + { + add = true; + if (dom->groupOfElementsSize() ==0 and (dgdom->getPlusDomain()->getPhysical() == dgdom->getMinusDomain()->getPhysical())) + { + add = false; + } + } + else + { + add = true; + } + + if (add) + { + sv->addDomain(domainVector[i]->clone()); + } + }; + // material law + for (std::map<int,materialLaw*>::const_iterator it = maplaw.begin(); it!= maplaw.end(); it++) + { + sv->addMaterialLaw(it->second->clone()); + } + copyBCsToOtherSolver(sv); + return sv; +}; + +nonLinearMechSolver* nonLinearMechSolver::clone(int tag, bool isParallel, + const std::string mshFile, + std::vector<partDomain*>& allDom, + std::vector<materialLaw*>& allMat) const +{ + nonLinearMechSolver* sv = new nonLinearMechSolver(tag,isParallel); + // + copyOptionsToOtherSolver(sv); + sv->loadModel(mshFile); + // domain + for (int i=0; i<allDom.size(); i++) + { + sv->addDomain(allDom[i]); + }; + // material law + for (int i=0; i< allMat.size(); i++) + { + sv->addMaterialLaw(allMat[i]); + } + copyBCsToOtherSolver(sv); + return sv; +} + +void nonLinearMechSolver::copyOptionsToOtherSolver(nonLinearMechSolver* sv) const +{ + sv->whatSolver = whatSolver; // Solver used to solve + sv->whatScheme = whatScheme; // scheme used to solve equation + // + // get all Options + /*TIME SETTING FOR NONLINEAR SOLVER*/ + sv->endtime = endtime; // final time, time start from 0 to endtime + + /*FOR EXPLICIT SCHEME*/ + sv->_explicitOpts = _explicitOpts; + + /* FOR MULTI SYSTEM */ + /* MultiSystems solve */ + sv->_vcompBySys = _vcompBySys; + sv->_vschemeBySys = _vschemeBySys; + + /*FOR QUASI-STATIC AND IMPLICIT SCHEMES*/ + sv->_numstepImpl = _numstepImpl; // Number of steps + sv->_tol = _tol; + sv->_absTol = _absTol; // relative and absolute tolerance for iteration + sv->_stiffEstimation = _stiffEstimation; + sv->_stiffnessModification = _stiffnessModification; // true if recalculate stiffness matrix + sv->_iterativeNR = _iterativeNR; // true if using iterative procedure + sv->_lineSearch = _lineSearch; + + /*FOR CH DYNAMIC SCHEME*/ + sv->_implicitOpts = _implicitOpts; + + /*FOR PATH FOLLOWING*/ + sv->_pathFollowing = _pathFollowing; // true to activate path following + //_pathFollowingMethod holds the method of path following, 0- GLOBAL_ARC_LENGTH_BASED , 1 - LOCAL_BASED, and 2- HYPERELLIPTIC_BASED + //GLOBAL_ARC_LENGTH_BASED based on the general path following constraint type + // + //LOCAL_BASED is a combination of LOAD CONTROL+ DISSIPATION CONTROL after the onset of dissipation + // + //HYPERELLIPTIC_BASED uses several particular DOFs insteads of all DOF used in GLOBAL_ARC_LENGTH_BASED to build the path following constraint + // + sv->_pathFollowingMethod = _pathFollowingMethod; + + // if _pathFollowingMethod=GLOBAL_ARC_LENGTH_BASED or HYPERELLIPTIC_BASED is used, + sv->_macroControlTypePathFollowing = _macroControlTypePathFollowing; // control type + sv->_correctionMethodPathFollowing = _correctionMethodPathFollowing; // correction method + sv->_tranversalCriterionPathFollowing = _tranversalCriterionPathFollowing; // method to correctly estimate load paramater in the predictor of path following constrain as two solutions exists + sv->_solverTypePathFollowing = _solverTypePathFollowing; // solve method two use, + sv->_pathFollowingEqRatio = _pathFollowingEqRatio; // equa ratio + sv->_hyperellipticControlComp = _hyperellipticControlComp; // comp used in hyperelliptic control + // + // if _pathFollowingMethod = LOCAL_BASED + //bool _switchedControlType; + sv->_pathFollowingSwitchCriterion = _pathFollowingSwitchCriterion; + sv->_pathFollowingIncrementType = _pathFollowingIncrementType; + sv->_pathFollowingLocation = _pathFollowingLocation; + // + + /*TIME STEP AND PATHFOLLOWING STEP MANAGEMENT*/ + // time step adaptation if solver fails, always consider + sv->_maxNRite = _maxNRite; // if this number of iteration is reached the time step is reduce + sv->_timeStepFactorReduction = _timeStepFactorReduction; // the time step is divided by this value if no convergence (default 2) + sv->_maxAttemptStepReduction = _maxAttemptStepReduction; // number of attemp to reduce time step (default 6 which leads to a decrease by 64 (2^6) of time step) + sv->_niteTimeStepIncrease = _niteTimeStepIncrease; // if convergence with nite < _nite the time step is increase (default 5)(but can be greater than its max value given by numstep/endtime) + + // time step adaptation to obtain optimal number of iterations + sv->_timeStepAdaptation = _timeStepAdaptation; // true if path following step is adapted with number NR + // for time + sv->_maximalTimeStep = _maximalTimeStep; // maximal time step + sv->_minimalTimeStep = _minimalTimeStep; // minimal time step + sv->_numNROptimal = _numNROptimal; // num optimal + sv->_expNROptimal = _expNROptimal; + + // for path following increment (arc-length or local == dissipation increment) + sv->_localStep = _localStep; // to local cr control + sv->_localStepPrev = _localStepPrev; + sv->_localStepMinimal = _localStepMinimal; + sv->_localStepMaximal = _localStepMaximal; + + sv->_arcLengthStep = _arcLengthStep; // for arc-length control + sv->_arcLengthStepPrev = _arcLengthStepPrev; + sv->_arcLengthStepMinimal = _arcLengthStepMinimal; + sv->_arcLengthStepMaximal = _arcLengthStepMaximal; + sv->_timeStepAdaptationFactor = _timeStepAdaptationFactor; + // time step adaptation + sv->_numNROptimalLocal = _numNROptimalLocal; // number optimal for local + // + /* data for restart */ + //size_t _beginTime; + //std::string _restartMshFileName; + //bool _resetRestart; //to avoid restart when shitfing schemes + //bool _disableResetRestart; //to allow restat in battery only + + /*FOR CRACK*/ + // physical entities that are initialy broken + sv->initbrokeninter = initbrokeninter; + /* crack tracking */ + //FILE *_crackTrackingFile; // name of files for crack tracking no name == NULL and no track + if (_crackTrackingFile!=NULL) + { + sv->crackTracking(_crackTrackingName); + } + /* fragmentation */ + //FILE *_fragmentationFile; + if (_fragmentationFile!=NULL) + { + sv->postproFragment(_fragmentationName); + } + + + /* FOR ARCHIVING*/ + // std vector to archive a node displacement + //std::vector<unknownField::archiveNode> anoded; + for (std::vector<unknownField::archiveNode>::const_iterator it = anoded.begin(); it != anoded.end(); it++) + { + const unknownField::archiveNode& ar = *it; + sv->anoded.emplace_back(ar.physnum,ar.nodenum,ar._comp,ar.wc,ar.nstep); + }; + + // std::vector to archive a force + //std::vector<archiveForce> vaf; + for (std::vector<archiveForce>::const_iterator it = vaf.begin(); it != vaf.end(); it++) + { + const archiveForce& ar = *it; + sv->vaf.emplace_back(ar.numphys,ar.dim,ar.comp,ar.nstep); + }; + // std vector to archive ipvariable + //std::vector<IPField::ip2archive> vaip; + for (std::vector<IPField::ip2archive>::const_iterator it = vaip.begin(); it != vaip.end(); it++) + { + const IPField::ip2archive& ar = *it; + sv->vaip.emplace_back(ar); + } + // list to archive the integral operation in volume + //std::list<IntegralVolume> _dataVolumeIntegral; + for (std::list<IntegralVolume>::const_iterator it = _dataVolumeIntegral.begin(); it!=_dataVolumeIntegral.end(); it++) + { + const IntegralVolume& ar = *it; + sv->_dataVolumeIntegral.emplace_back(ar.integType,ar.ipVal,ar.physical,ar.nbArch); + } + // list to archive IP data over physical (data at gauss point with coordinates) + //std::list<IPDataOnPhysical> _dataOnPhysical; + // for archiving energy and fracture energy + sv->_energyComputation = _energyComputation; // equal to 0 if no energy is saved; >0 if energy is saved with _energyComputation as interval step of archiving + sv->_fractureEnergyComputation = _fractureEnergyComputation; // equal to 0 if no energy is saved; >0 if energy is saved with _energyComputation as interval step of archiving + + + /*FOR VIEW*/ + // view of unknown --> disp file + //std::vector<nlsField::dataBuildView> unknownView; + for (std::vector<nlsField::dataBuildView>::const_iterator it = unknownView.begin(); it!= unknownView.end(); it++) + { + const nlsField::dataBuildView& ar = *it; + sv->unknownView.emplace_back(ar.viewname,ar.comp,ar.ev,ar.nbstepArch); + } + // view of ip field --> stress file + //std::vector<nlsField::dataBuildView> ipView; + for (std::vector<nlsField::dataBuildView>::const_iterator it = ipView.begin(); it!= ipView.end(); it++) + { + const nlsField::dataBuildView& ar = *it; + sv->ipView.emplace_back(ar.viewname,ar.comp,ar.ev,ar.nbstepArch); + } + // view of energy field --> energy file, but it is not + //std::vector<nlsField::dataBuildView> energyView; + for (std::vector<nlsField::dataBuildView>::const_iterator it = energyView.begin(); it!= energyView.end(); it++) + { + const nlsField::dataBuildView& ar = *it; + sv->energyView.emplace_back(ar.viewname,ar.comp,ar.ev,ar.nbstepArch); + } + sv->nsba=nsba; // number of step between two view + + /* SWITCH scheme data */ + sv->_previousScheme= _previousScheme; // to known the previous used scheme for switch + //bool _previousInit; // To known if the initialization as already be made by an other scheme + //bool _notResetedBC; // To known if the BC are modified. + //bool _notResetedContact; // To known if the contact interaction are modified + //bool _notResetUnknowns; // To known if the unknowns are modified + + // strain mapping for foams + if (_strainMap!=NULL) + { + GModel* pm = GModel::current(); + sv->createStrainMapping(_strainMap->getMappingMeshFileName(),_strainMap->getNumStepBetweenTwoSaves()); + GModel::setCurrent(pm); + } + // programe monitoring + if (_endSchemeMonitoringObject!=NULL) + { + sv->endSchemeMonitoring(*_endSchemeMonitoringObject); + } + // selective update with cohesive crack + if (_selectiveObject) + { + sv->setSelectiveUpdate(*_selectiveObject); + } + + // element erosion control + if (_bulkElementErosionFlag or _interfaceElementErosionFlag) + { + sv->setElementErosion(_bulkElementErosionFlag,_interfaceElementErosionFlag,_erosionType); + } + if (_erosionGlobalCriterion) + { + sv->setGlobalErosionCheck(true,_erosionGlobalCriterion); + } + + /*EIGEN SOLVER*/ + sv->_eigOpts = _eigOpts; + //std::vector<nlsField::dataBuildView> _eigview; + for (std::vector<nlsField::dataBuildView>::const_iterator it = _eigview.begin(); it!= _eigview.end(); it++) + { + const nlsField::dataBuildView& ar = *it; + sv->_eigview.emplace_back(ar.viewname,ar.comp,ar.ev,ar.nbstepArch); + } + + /*DEFORMED MESH TO FILE*/ + sv->_isWriteDeformedMeshToFile = _isWriteDeformedMeshToFile; // write deformed mesh to file + + + /*FOR MULTISCALE ANALYSIS*/ + // Element number and Integration point number + sv->_enumMinus = _enumMinus; + sv->_enumPlus = _enumPlus; + sv->_gnum =_gnum; + + + // time and time step + sv->_macroTimeStep = _macroTimeStep; // for law which works on increment. (Use only in so no getTimeStep function) + sv->_macroTime = _macroTime; // To save results vs time + sv->_macroStep = _macroStep; // current macroscopic step + + //for micro flag + sv->_systemType = _systemType; + sv->_controlType = _controlType; + // micro flag--> true if microsolver is used + sv->_microFlag = _microFlag; + sv->_multiscaleFlag = _multiscaleFlag; // to know if a multiscale analysis is performed, to be true with both micro and marco solver + + //stress flag and tangent flag + sv->_stressflag = _stressflag; // true if homogenized stress is estimated + sv->_tangentflag = _tangentflag; // true if homogenizd tangnent is estimated + // homogenized method + sv->_homogenizeTangentMethod = _homogenizeTangentMethod; + sv->_homogenizeStressMethod = _homogenizeStressMethod; + sv->_sameStateCriterion = _sameStateCriterion; // this parameter to check if same sate-> economise + // for archiving + sv->_archive = _archive; + // all homogenized filename + sv->_isHommProSaveToFile = _isHommProSaveToFile; // flag -->save homogenized properties to files + sv->_isHommStrainSaveToFile = _isHommStrainSaveToFile; //flag --> save homogenized strain to files + sv->_extractPerturbationToFile = _extractPerturbationToFile; //flag --> save perturbation on RVE boundary to file + sv->_messageView = _messageView; // flag to archive message to file + sv->_tangentPerturbation = _tangentPerturbation; // tangent by perturbation + + sv->_rho = _rho; // homogenized density + sv->_rveVolume = _rveVolume; // rve volume + + + sv->_damageIsBlocked = _damageIsBlocked; + sv->_solverIsBroken = _solverIsBroken; + sv->_maximalLostEllipticityCriterion = _maximalLostEllipticityCriterion; // maximal value + sv->_homogenizedCrackSurface = _homogenizedCrackSurface; + + // + sv->_failureBCIsSwitched = _failureBCIsSwitched; // true if FailureBC is switsched after failure, + sv->_failureBasedOnPreviousState = _failureBasedOnPreviousState; + sv->_GModelIsRotated = _GModelIsRotated; + sv->_checkFailureOnset = _checkFailureOnset; // + sv->_checkWithNormal = _checkWithNormal; // + sv->_damageToCohesiveJump = _damageToCohesiveJump; // true if extracting cohsive law + sv->_RVELengthInCohesiveNormal = _RVELengthInCohesiveNormal; // length perpendicular to cohesive normal + sv->_surfaceReductionRatio = _surfaceReductionRatio; // load carrying surface over nominal surface following cohesive normal + sv->_lostSolutionUniquenssTolerance = _lostSolutionUniquenssTolerance; + sv->_voidPartInLocalizationBand = _voidPartInLocalizationBand; // void part in localization band + sv->_extractIrreversibleEnergy = _extractIrreversibleEnergy; // flag + + // + sv->_extractElasticTangentOperator = _extractElasticTangentOperator; // true if elastic tangent operator is extracted at the same time as full tangent operator +}; + + +void nonLinearMechSolver::copyBCsToOtherSolver(nonLinearMechSolver* sv) const +{ + /*FOR CONTACT*/ // TODO + // contact + //contactContainer _allContact; + // defo defo contact BC + //defoDefoContactContainer _allDefoDefoContact; + + /*FOR BOUNDARY CONDITIONS*/ + // neumann BC + //std::list<nonLinearNeumannBC> allNeumann; + for (std::list<nonLinearNeumannBC>::const_iterator it = allNeumann.begin(); it!=allNeumann.end(); it++) + { + const nonLinearNeumannBC& bc = *it; + sv->allNeumann.emplace_back(); + nonLinearNeumannBC& neu = sv->allNeumann.back(); + neu.onWhat = bc.onWhat; + neu._tag = bc._tag; + neu._NeumannBCType = bc._NeumannBCType; + neu._f= bc._f; + neu._comp=bc._comp; + + if(neu.onWhat==nonLinearBoundaryCondition::ON_VERTEX) + { + neu.g = new groupOfElements (0, neu._tag); + } + else if(neu.onWhat==nonLinearBoundaryCondition::ON_EDGE) + { + neu.g = new groupOfElements (1, neu._tag); + } + else if(neu.onWhat==nonLinearBoundaryCondition::ON_FACE) + { + neu.g = new groupOfElements (2, neu._tag); + } + else if(neu.onWhat==nonLinearBoundaryCondition::ON_FACE_VERTEX) + { + neu.g = new groupOfElements(2,neu._tag); + } + else if(neu.onWhat==nonLinearBoundaryCondition::ON_VOLUME) + { + neu.g = new groupOfElements (3, neu._tag); + } + } + // dirichlet BC + //std::list<nonLinearDirichletBC> allDirichlet; + for (std::list<nonLinearDirichletBC>::const_iterator it = allDirichlet.begin(); it != allDirichlet.end(); it++) + { + const nonLinearDirichletBC& bc = *it; + sv->allDirichlet.emplace_back(); + nonLinearDirichletBC& diri = sv->allDirichlet.back(); + diri.onWhat = bc.onWhat; + diri._tag = bc._tag; + diri._comp = bc._comp; + diri._f = bc._f; + diri._mycondition = bc._mycondition; + + if(diri.onWhat==nonLinearBoundaryCondition::ON_VERTEX) + { + diri.g = new groupOfElements (0, diri._tag); + } + else if(diri.onWhat==nonLinearBoundaryCondition::ON_EDGE) + { + diri.g = new groupOfElements (1, diri._tag); + } + else if(diri.onWhat==nonLinearBoundaryCondition::ON_FACE) + { + diri.g = new groupOfElements (2, diri._tag); + } + else if(diri.onWhat==nonLinearBoundaryCondition::ON_FACE_VERTEX) + { + diri.g = new groupOfElements(2,diri._tag); + } + else if(diri.onWhat==nonLinearBoundaryCondition::ON_VOLUME) + { + diri.g = new groupOfElements (3, diri._tag); + } + + } + // all periodic groups + //std::list<nonLinearPeriodicBCBetweenTwoGroups> allPeriodic; + for (std::list<nonLinearPeriodicBCBetweenTwoGroups>::const_iterator it = allPeriodic.begin(); it != allPeriodic.end(); it++) + { + const nonLinearPeriodicBCBetweenTwoGroups& bc = *it; + sv->allPeriodic.emplace_back(); + nonLinearPeriodicBCBetweenTwoGroups& pbc = sv->allPeriodic.back(); + pbc.onWhat=bc.onWhat; + pbc.phys1 = bc.phys1; + pbc.phys2 = bc.phys2; + pbc.physVer1 = bc.physVer1; + pbc.physVer2 = bc.physVer2; + pbc.comp = bc.comp; + if (pbc.onWhat==nonLinearBoundaryCondition::ON_EDGE) + { + pbc.g1 = new groupOfElements (1, pbc.phys1); + pbc.g2 = new groupOfElements (1, pbc.phys2); + } + else if (pbc.onWhat==nonLinearBoundaryCondition::ON_FACE) + { + pbc.g1 = new groupOfElements (2, pbc.phys1); + pbc.g2 = new groupOfElements (2, pbc.phys2); + } + + groupOfElements grv1(0,pbc.physVer1); + groupOfElements grv2(0,pbc.physVer2); + if (grv1.vsize() > 0 and grv2.vsize() > 0) + { + pbc.v1 = *(grv1.vbegin()); + pbc.v2 = *(grv2.vbegin()); + } + else{ + Msg::Error("periodic root vertices have not been correctly defined on cloned solver"); + Msg::Exit(0); + } + } + //all average PBC groups + //std::list<nonLinearAveragePeriodicBCBetweenTwoGroups> allAveragePeriodic; + for (std::list<nonLinearAveragePeriodicBCBetweenTwoGroups>::const_iterator it = allAveragePeriodic.begin(); it != allAveragePeriodic.end(); it++) + { + const nonLinearAveragePeriodicBCBetweenTwoGroups& bc = *it; + sv->allAveragePeriodic.emplace_back(); + nonLinearAveragePeriodicBCBetweenTwoGroups& pbc = sv->allAveragePeriodic.back(); + pbc.onWhat=bc.onWhat; + pbc.phys1 = bc.phys1; + pbc.phys2 = bc.phys2; + pbc.physVer1 = bc.physVer1; + pbc.physVer2 = bc.physVer2; + pbc.comp = bc.comp; + if (pbc.onWhat==nonLinearBoundaryCondition::ON_EDGE) + { + pbc.g1 = new groupOfElements (1, pbc.phys1); + pbc.g2 = new groupOfElements (1, pbc.phys2); + } + else if (pbc.onWhat==nonLinearBoundaryCondition::ON_FACE) + { + pbc.g1 = new groupOfElements (2, pbc.phys1); + pbc.g2 = new groupOfElements (2, pbc.phys2); + } + + groupOfElements grv1(0,pbc.physVer1); + groupOfElements grv2(0,pbc.physVer2); + if (grv1.vsize() > 0 and grv2.vsize() > 0) + { + pbc.v1 = *(grv1.vbegin()); + pbc.v2 = *(grv2.vbegin()); + } + else{ + Msg::Error("average periodic root vertices have not been correctly defined on cloned solver"); + Msg::Exit(0); + } + } + // all samedisp bc + //std::list<nonLinearSameDisplacementBC> allSameDisp; + for (std::list<nonLinearSameDisplacementBC>::const_iterator it = allSameDisp.begin(); it != allSameDisp.end(); it++) + { + const nonLinearSameDisplacementBC& bc = *it; + sv->allSameDisp.emplace_back(); + nonLinearSameDisplacementBC& sameDispBC = sv->allSameDisp.back(); + sameDispBC.onWhat = bc.onWhat; + sameDispBC._tag = bc._tag; + sameDispBC.comp = bc.comp; + sameDispBC.tagRoot = bc.tagRoot; + sameDispBC.fac = bc.fac; + + sameDispBC.gRoot = new groupOfElements(0,sameDispBC.tagRoot); + if(sameDispBC.onWhat==nonLinearBoundaryCondition::ON_VERTEX) + { + sameDispBC.g = new groupOfElements(0,sameDispBC._tag); + } + if(sameDispBC.onWhat==nonLinearBoundaryCondition::ON_EDGE) + { + sameDispBC.g = new groupOfElements(1,sameDispBC._tag); + } + else if (sameDispBC.onWhat==nonLinearBoundaryCondition::ON_FACE) + { + sameDispBC.g = new groupOfElements(2,sameDispBC._tag); + } + else if (sameDispBC.onWhat==nonLinearBoundaryCondition::ON_VOLUME) + { + sameDispBC.g = new groupOfElements(3,sameDispBC._tag); + } + } + + // all samedisp bc between two groups + //std::list<nonLinearSameDisplacementBCBetweenTwoGroups> allSameDispBetweenTwoGroups; + for (std::list<nonLinearSameDisplacementBCBetweenTwoGroups>::const_iterator it = allSameDispBetweenTwoGroups.begin(); it!= allSameDispBetweenTwoGroups.end(); it++) + { + const nonLinearSameDisplacementBCBetweenTwoGroups& bc = *it; + sv->allSameDispBetweenTwoGroups.emplace_back(); + nonLinearSameDisplacementBCBetweenTwoGroups& sameDispBC = sv->allSameDispBetweenTwoGroups.back(); + sameDispBC.onWhat = bc.onWhat; + sameDispBC._tag = bc._tag; + sameDispBC.comp = bc.comp; + sameDispBC.phys1 = bc.phys1; + sameDispBC.phys2 = bc.phys2; + + if(sameDispBC.onWhat==nonLinearBoundaryCondition::ON_VERTEX) + { + sameDispBC.g1 = new groupOfElements(0,sameDispBC.phys1); + sameDispBC.g2 = new groupOfElements(0,sameDispBC.phys2); + } + if(sameDispBC.onWhat==nonLinearBoundaryCondition::ON_EDGE) + { + sameDispBC.g1 = new groupOfElements(1,sameDispBC.phys1); + sameDispBC.g2 = new groupOfElements(1,sameDispBC.phys2); + } + if(sameDispBC.onWhat==nonLinearBoundaryCondition::ON_FACE) + { + sameDispBC.g1 = new groupOfElements(2,sameDispBC.phys1); + sameDispBC.g2 = new groupOfElements(2,sameDispBC.phys2); + } + + } + // fix on face + //std::list<nonLinearFixOnFaceBC> allFixAllFace; + for (std::list<nonLinearFixOnFaceBC>::const_iterator it = allFixAllFace.begin(); it != allFixAllFace.end(); it++) + { + const nonLinearFixOnFaceBC& bc = *it; + + sv->allFixAllFace.emplace_back(bc.A,bc.B,bc.C,bc.D); + nonLinearFixOnFaceBC& fixBC = sv->allFixAllFace.back(); + fixBC.onWhat = bc.onWhat; + fixBC._tag = bc._tag; + if (fixBC.onWhat == nonLinearBoundaryCondition::ON_VERTEX) + { + fixBC.g = new groupOfElements(0,fixBC._tag); + } + else if (fixBC.onWhat == nonLinearBoundaryCondition::ON_EDGE) + { + fixBC.g = new groupOfElements(1,fixBC._tag); + } + else if (fixBC.onWhat == nonLinearBoundaryCondition::ON_FACE) + { + fixBC.g = new groupOfElements(2,fixBC._tag); + } + else if (fixBC.onWhat == nonLinearBoundaryCondition::ON_VOLUME) + { + fixBC.g = new groupOfElements(3,fixBC._tag); + } + } + // constraint BC + //std::list<nonLinearConstraintBC> allConstraint; + for (std::list<nonLinearConstraintBC>::const_iterator it = allConstraint.begin(); it!= allConstraint.end(); it++) + { + const nonLinearConstraintBC& bc = *it; + sv->allConstraint.emplace_back(); + nonLinearConstraintBC& uc = sv->allConstraint.back(); + uc.onWhat = bc.onWhat; + uc._tag = bc._tag; + uc._comp=bc._comp; + uc._tag=bc._tag; + + if (uc.onWhat == nonLinearBoundaryCondition::ON_VERTEX) + { + uc.g = new groupOfElements (0, uc._tag); + } + else if (uc.onWhat == nonLinearBoundaryCondition::ON_EDGE) + { + uc.g = new groupOfElements (1, uc._tag); + } + else if (uc.onWhat == nonLinearBoundaryCondition::ON_FACE) + { + uc.g = new groupOfElements (2, uc._tag); + } + else if (uc.onWhat == nonLinearBoundaryCondition::ON_VOLUME) + { + uc.g = new groupOfElements (3, uc._tag); + } + } + // when using with microBC, BC can appy on corners of RVE + //std::list<nonLinearDirichletBCAtCorner> allCornerConstraint; + for (std::list<nonLinearDirichletBCAtCorner>::const_iterator it = allCornerConstraint.begin(); it !=allCornerConstraint.end(); it++) + { + const nonLinearDirichletBCAtCorner& bc = *it; + sv->allCornerConstraint.emplace_back(); + nonLinearDirichletBCAtCorner& cornerConstraint = sv->allCornerConstraint.back(); + cornerConstraint._tag = bc._tag; + cornerConstraint._comp = bc._comp; + cornerConstraint._cornerNumber = bc._cornerNumber; + cornerConstraint._f = bc._f; + } + // force BC + //std::list<nonLinearNeumannBCAtCorner> allCornerForce; + for (std::list<nonLinearNeumannBCAtCorner>::const_iterator it =allCornerForce.begin(); it != allCornerForce.end(); it++) + { + const nonLinearNeumannBCAtCorner& bc = *it; + sv->allCornerForce.emplace_back(); + nonLinearNeumannBCAtCorner& cornerConstraint = sv->allCornerForce.back(); + cornerConstraint._tag = bc._tag; + cornerConstraint._comp = bc._comp; + cornerConstraint._cornerNumber = bc._cornerNumber; + cornerConstraint._f = bc._f; + } + // initial BC + //std::list<initialCondition> allinitial; + for (std::list<initialCondition>::const_iterator it = allinitial.begin(); it!= allinitial.end(); it++) + { + const initialCondition& bc = *it; + + sv->allinitial.emplace_back(bc._comp,bc._mycondition); + initialCondition& initc = sv->allinitial.back(); + initc.onWhat = bc.onWhat; + initc._tag = bc._tag; + initc._f = bc._f; + elementFilterTrivial filter; + initc.g = new groupOfElements(); + if (initc.onWhat == nonLinearBoundaryCondition::ON_VERTEX) + { + initc.g->addPhysical(0,initc._tag,filter); + } + else if (initc.onWhat == nonLinearBoundaryCondition::ON_EDGE) + { + initc.g->addPhysical(1,initc._tag,filter); + } + else if (initc.onWhat == nonLinearBoundaryCondition::ON_FACE) + { + initc.g->addPhysical(2,initc._tag,filter); + } + else if (initc.onWhat == nonLinearBoundaryCondition::ON_VOLUME) + { + initc.g->addPhysical(3,initc._tag,filter); + } + else if (initc.onWhat == nonLinearBoundaryCondition::RIGIDCONTACT) + { + + } + else if (initc.onWhat == nonLinearBoundaryCondition::UNDEF) + { + initc.g->addPhysical(2,initc._tag,filter); + } + } + // neumann BC theta (weak enforcement of rotation) group this with allNeumann ? + //std::list<nonLinearNeumannBC> allTheta; + for (std::list<nonLinearNeumannBC>::const_iterator it = allTheta.begin(); it != allTheta.end(); it++) + { + const nonLinearNeumannBC& bc = *it; + sv->allTheta.emplace_back(); + nonLinearNeumannBC& neu = sv->allTheta.back(); + + neu._tag = bc._tag; + neu._comp = bc._comp; + neu.onWhat = nonLinearBoundaryCondition::UNDEF; + neu.g = new groupOfElements(1,neu._tag); + neu._f = bc._f; + } + + // dirichlet BC on rigid surface (prescribed the motion of gravity center) + //std::list<rigidContactBC> allContactBC; + for (std::list<rigidContactBC>::const_iterator it = allContactBC.begin(); it != allContactBC.end(); it++) + { + const rigidContactBC& bc = *it; + + sv->allContactBC.emplace_back(bc._tag); + rigidContactBC& diri = sv->allContactBC.back(); + diri.onWhat = nonLinearBoundaryCondition::RIGIDCONTACT; + diri._comp = bc._comp; + diri._f = bc._f; + }; + + //micro BC + if (_microBC) + { + sv->addMicroBC(_microBC); + } + if (_microFailureBC) + { + sv->addMicroBCForFailure(_microFailureBC); + } + // for test use microBC with macrosolver + if (_testFlag) + { + sv->activateTest(_testFlag); + } + +} + void nonLinearMechSolver::createRestartByTime(const int day,const int hour,const int minute,const int second) { restartManager::setTimeBetweenCheckpoint(day,hour,minute,second); @@ -224,11 +1268,11 @@ bool nonLinearMechSolver::mustRestart(const int numstep) } void nonLinearMechSolver::stepBetweenArchiving(const int n) -{ +{ if (n > 0) { nsba = n; - if (_ipf!=NULL) + if (_ipf!=NULL) { _ipf->stepBetweenArchiving(n); } @@ -240,22 +1284,22 @@ void nonLinearMechSolver::stepBetweenArchiving(const int n) { _energField->stepBetweenArchiving(n); } - + // modify all existing view for(int i=0;i<ipView.size();i++) { ipView[i].nbstepArch = n; } - + for(int i=0;i<unknownView.size();i++) { unknownView[i].nbstepArch = n; - } - + } + for (int i=0; i< energyView.size(); i++) { energyView[i].nbstepArch = n; - } + } } } @@ -268,7 +1312,7 @@ void nonLinearMechSolver::setFactorOnArchivingFiles(const int fact) { vaip[i].nstep*=fact; } - + for(int i=0;i<anoded.size();i++) { anoded[i].nstep*=fact; @@ -278,10 +1322,10 @@ void nonLinearMechSolver::setFactorOnArchivingFiles(const int fact) { vaf[i].nstep*=fact; } - + _energyComputation *= fact; _fractureEnergyComputation *= fact; - + // change factor inside field if exist if (_ipf!=NULL) { @@ -290,7 +1334,7 @@ void nonLinearMechSolver::setFactorOnArchivingFiles(const int fact) if (_ufield!=NULL) { _ufield->setFactorOnArchivingFiles(fact); - + } if (_energField !=NULL) { @@ -339,28 +1383,40 @@ void nonLinearMechSolver::commonModel() _isPartitioned = false; } - Msg::Info("Number of mesh partition %d for %d cpu(s)",numPartitions,Msg::GetCommSize()); - if(numPartitions > Msg::GetCommSize()) - { - Msg::Error("Your mesh is wrong partitioned"); - } - else if(numPartitions !=0 and Msg::GetCommSize() == 1) + if (_microFlag) { - Msg::Error("Cannot perform a serial computation with a partitionned mesh"); + if (_isPartitioned) + { + Msg::Error("micro solver cannot run with partitioned meshes"); + Msg::Exit(0); + } } - else if(numPartitions > 0 and numPartitions < Msg::GetCommSize()) + else { - Msg::Warning("You have more cpu than mesh partition so some cpus may have no work"); - } + Msg::Info("Number of mesh partition %d for %d cpu(s)",numPartitions,Msg::GetCommSize()); + if(numPartitions > Msg::GetCommSize()) + { + Msg::Error("Your mesh is wrong partitioned"); + Msg::Exit(0); + } + else if(numPartitions !=0 and Msg::GetCommSize() == 1) + { + Msg::Error("Cannot perform a serial computation with a partitionned mesh"); + Msg::Exit(0); + } + else if(numPartitions > 0 and numPartitions < Msg::GetCommSize()) + { + Msg::Warning("You have more cpu than mesh partition so some cpus may have no work"); + } - // partitions are numerated from 1 to numPartitions - std::set<int> mshPart; - for (int im=1; im < numPartitions+1; im++){ - mshPart.insert(im); - } - // int map of ranks - if (!_microFlag) + // partitions are numerated from 1 to numPartitions + std::set<int> mshPart; + for (int im=1; im < numPartitions+1; im++){ + mshPart.insert(im); + } + // int map of ranks initMapRanks(mshPart); + } #endif // HAVE_MPI } @@ -418,7 +1474,7 @@ void nonLinearMechSolver::createModel(const std::string &geoFileName, const std: void nonLinearMechSolver::createMicroModel(const std::string geoFile, const int dim, const int order, const bool incomplte){ - std::string mshFile = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+".msh"; + std::string mshFile = getFileSavingPrefix()+".msh"; this->createModel(geoFile,mshFile,dim,order,incomplte); }; @@ -669,7 +1725,7 @@ void nonLinearMechSolver::init(){ partDomain *dom = *it; dom->setGaussIntegrationRule(); // set Solver - dom->setMacroSolver(this); // some options in domaian come from solver + dom->setSolver(this); // some options in domaian come from solver } // add create new material cerate inside solver @@ -688,7 +1744,7 @@ void nonLinearMechSolver::init(){ } }; for (std::map<int,materialLaw*>::iterator it = maplaw.begin(); it!= maplaw.end(); it++){ - it->second->setMacroSolver(this); + it->second->setSolver(this); } // at root ranks @@ -721,11 +1777,12 @@ void nonLinearMechSolver::init(){ std::ostringstream oss; oss<<Msg::GetCommRank(); std::string partNum = oss.str(); - std::string filename = "InterfaceElement_part"+partNum+".csv"; + std::string filename = getFileSavingPrefix()+"InterfaceElement_part"+partNum+".csv"; interFile = fopen(filename.c_str(),"w"); } else{ - interFile = fopen("InterfaceElement.csv","w"); + std::string filename = getFileSavingPrefix()+ "InterfaceElement.csv"; + interFile = fopen(filename.c_str(),"w"); } for (std::map<int,TwoNum>::const_iterator itm = _interfaceElementsInverseMap.begin(); itm != _interfaceElementsInverseMap.end(); itm++){ fprintf(interFile,"%d %d %d\n",itm->first,itm->second.small,itm->second.large); @@ -907,16 +1964,17 @@ void nonLinearMechSolver::init(){ if (!_previousInit) { this->initArchiveForce(); + this->initPathFollowingArchiving(); } else { if (_notResetUnknowns) - { + { for (std::vector<archiveForce>::iterator it = vaf.begin(); it!= vaf.end(); it++) { - it->resetArchiving(); + it->resetArchiving(getFileSavingPrefix()); } - } + } else { for (std::vector<archiveForce>::iterator it = vaf.begin(); it!= vaf.end(); it++) @@ -925,15 +1983,16 @@ void nonLinearMechSolver::init(){ } this->initArchiveForce(); } - + for (std::list<IntegralVolume>::iterator it = _dataVolumeIntegral.begin(); it!= _dataVolumeIntegral.end(); it++) { - it->resetArchiving(); + it->resetArchiving(getFileSavingPrefix()); } for (std::list<IPDataOnPhysical>::iterator it= _dataOnPhysical.begin(); it!= _dataOnPhysical.end(); it++) { it->resetArchiving(); } + this->initPathFollowingArchiving(); } } @@ -1019,7 +2078,8 @@ void nonLinearMechSolver::moveFiles(const std::string &dirName, const std::strin { Msg::Warning("Nothing moved on rank %d, hostname %s",Msg::GetCommRank(),vhostname[Msg::GetCommRank()]); } - Msg::Barrier(); + if (getNumRanks() > 1) + Msg::Barrier(); // delete array delete[] vhostname; delete[] vallsizename; @@ -1184,7 +2244,7 @@ void nonLinearMechSolver::init2() if (_dataVolumeIntegral.size() > 0){ // because all average values are computed independently in each procs // the volume in chech procs must be estimated - std::string fname = "VolumeOnProc"; + std::string fname = getFileSavingPrefix()+"VolumeOnProc"; std::ostringstream oss; oss << Msg::GetCommRank(); fname += oss.str(); @@ -1212,19 +2272,19 @@ void nonLinearMechSolver::init2() if (_ufield) delete _ufield; _ufield = new unknownField(this,3,anoded,unknownView); } - + if (_energField) { _energField->resetArchiving(); } } - + /* terms initialization */ this->initTerms(); _previousInit = true; Msg::Info("End of initialization"); #if defined(HAVE_MPI) && defined(_DEBUG) - if(Msg::GetCommSize() > 1) + if (getNumRanks() > 1) { Msg::Error("End init OK from rank %d wait all in debug",Msg::GetCommRank()); Msg::Barrier(); @@ -1236,32 +2296,22 @@ void nonLinearMechSolver::endOfScheme(const double curtime, const int step) { this->postproFragment(); - if (_microFlag){ - _homogenizedFiles->closeFiles(); + if (_strainMap !=NULL) + { + _strainMap->buildDisplacementViewAndStrainView(step,true); } - if (_strainMap && !_strainMappingFollwing){ - Msg::Info("Create displacement and strain mapping"); - _strainMap->solve(pAssembler); - std::string filename = "dispMap"+int2str(step)+".msh"; - _strainMap->buildDisplacementView(filename); - filename = "strainMap"+int2str(step)+".msh"; - _strainMap->buildStrainView(filename); - } - _ufield->archive(curtime,step,true); _ipf->archive(curtime,step,true); - - if(_energField !=NULL) - { - _energField->archive(curtime,step,true); - } + _energField->archive(curtime,step,true); + forceArchiving(curtime,step,true); this->IPVolumeIntegralArchiving(curtime,step,true); this->IPDataOnPhysicalArchiving(curtime,step,true); #if defined(HAVE_MPI) - Msg::Barrier(); // Wait all before new computation (MPI problem ??) + if (getNumRanks() > 1) + Msg::Barrier(); // Wait all before new computation (MPI problem ??) #endif // HAVE_MPI } @@ -1278,8 +2328,9 @@ void nonLinearMechSolver::oneStepPreSolve(const double curtime, const double tim } } + void nonLinearMechSolver::oneStepPreSolvePathFollowing(const double curtime, const double timestep, const int numstep){ - static std::string name = "A"; + static std::string name = "A"; linearSystem<double>* lsys =pAssembler->getLinearSystem(name); pathFollowingSystem<double>* pathsys = dynamic_cast<pathFollowingSystem<double>*>(lsys); // if @@ -1296,8 +2347,8 @@ void nonLinearMechSolver::oneStepPreSolvePathFollowing(const double curtime, con } if (pathsys->getControlType() == pathFollowingSystemBase::LOAD_CONTROL){ - _loadStep = _loadStepPrev*_timeStepAdaptationFactor; - currentPathFollowingIncr = _loadStep; + _arcLengthStep = _arcLengthStepPrev*_timeStepAdaptationFactor; + currentPathFollowingIncr = _arcLengthStep; } else if (pathsys->getControlType() == pathFollowingSystemBase::LOCAL_CONTROL){ double ff = 1.; @@ -1321,9 +2372,8 @@ void nonLinearMechSolver::oneStepPreSolvePathFollowing(const double curtime, con else Msg::Error("missing case nonLinearMechSolver::oneStepPreSolvePathFollowing"); - pathsys->setPseudoTimeIncrement(currentPathFollowingIncr); - - Msg::Info("path following step: %e ",currentPathFollowingIncr); + pathsys->setPathFollowingIncrement(currentPathFollowingIncr); + Msg::Info("path following step: %e ",currentPathFollowingIncr); double loadParam = pathsys->getControlParameter(); @@ -1341,8 +2391,6 @@ void nonLinearMechSolver::oneStepPostSolve(const double curtime, const int numst _elementErosionFilter.print(); } - staticDofManager<double> *sAssembler = static_cast<staticDofManager<double>*>(pAssembler); - /*writing deformed mesh */ if (_isWriteDeformedMeshToFile){ this->writeDeformedMesh(numstep); @@ -1352,7 +2400,7 @@ void nonLinearMechSolver::oneStepPostSolve(const double curtime, const int numst _ufield->archive(curtime,numstep,false); _ipf->archive(curtime,numstep,false); _energField->archive(curtime,numstep,false); - + this->crackTracking(curtime); this->forceArchiving(curtime,numstep,false); // Edge force value; this->pathFollowingArchiving(curtime,numstep); @@ -1360,49 +2408,71 @@ void nonLinearMechSolver::oneStepPostSolve(const double curtime, const int numst this->IPVolumeIntegralArchiving(curtime,numstep,false); this->IPDataOnPhysicalArchiving(curtime,numstep,false); - if (_strainMap && _strainMappingFollwing){ - Msg::Info("Create displacement and strain mapping"); - _strainMap->solve(pAssembler); - std::string filename = "dispMap"+int2str(numstep)+".msh"; - _strainMap->buildDisplacementView(filename); - filename = "strainMap"+int2str(numstep)+".msh"; - _strainMap->buildStrainView(filename); + if (_strainMap !=NULL){ + _strainMap->buildDisplacementViewAndStrainView(numstep,false); } - if (_pathFollowing){ - if ((_pathFollowingMethod == LOCAL_BASED) and (!_switchedControlType) and _timeStepAdaptation){ - _localStep = this->computeLocalPathFollowingStep(); + if (_microFlag) + { + // copy current to initial state + (*_initialState) = (*_currentState); + + this->extractAverageProperties(_tangentflag); + if (getDamageToCohesiveJumpFlag() and !_multiscaleFlag){ + this->checkFailureOnset(); } - _loadStepPrev = _loadStep; - _localStepPrev = _localStep; - _arcLengthStepPrev = _arcLengthStep; - } - // check element erosion + if (_microBC->getTotalNumberOfMechanicalDofs() > 0){ + if (_stressflag){ + _currentState->getHomogenizedStress().print("Stress "); + if (_microBC->getOrder() == 2) + _currentState->getHomogenizedSecondOrderStress().print("hostress "); + } + } - /* field next step */ - if (_selectiveObject != NULL){ - _selectiveObject->nextStep(); - } + for (int index=0; index < _microBC->getTotalNumberOfConDofs(); index++){ + _currentState->getHomogenizedConstitutiveExtraDofFlux(index).print("con extra dof flux"); + printf("double con extra dof %d internal energy %f\n",index,_currentState->getHomogenizedConstitutiveExtraDofInternalEnergy(index)); + } - _ipf->nextStep(curtime); //ipvariable - sAssembler->nextStep(); - // contact - for(contactContainer::iterator it = _allContact.begin(); it!=_allContact.end(); ++it){ - contactDomain *cdom = *it; - cdom->nextStep(); - } - for(defoDefoContactContainer::iterator it = _allDefoDefoContact.begin(); it!=_allDefoDefoContact.end(); ++it){ - defoDefoContactDomain *cdom = *it; - cdom->nextStep(); + if (_tangentflag){ + _currentState->getHomogenizedTangentOperator_F_F().print("tangent"); + } + + if (_extractPerturbationToFile){ + _pAl->getPBCConstraintGroup()->writePertBoundaryToFile(numstep); + } + + if (_isWriteDeformedMeshToFile){ + this->writeDeformedMesh(numstep); + } + + if (withEnergyDissipation()){ + _ipf->checkActiveDissipation(); + if (_ipf->getNumOfActiveDissipationIPsCurrent() > 0){ + // store historical value + _homogenizedStressLastActiveDissipation = this->getHomogenizationState(IPStateBase::current)->getHomogenizedStress(); + _homogenizedStrainLastActiveDissipation = this->getMicroBC()->getFirstOrderKinematicalVariable(); + _homogenizedDissipationStrainLastActiveDissipation = this->getHomogenizationState(IPStateBase::current)->getHomogenizedActiveDissipationDeformationGradient(); + _homogenizedCohesiveJumpLastActiveDissipation = this->getHomogenizationState(IPStateBase::current)->getHomogenizedCohesiveJump(); + + } + } + // save files + this->homogenizedDataToFile(curtime); } + + // next step + this->nextStep(curtime,numstep); + // restart at end if not need to redo next step when reading restart if(this->mustRestart(numstep)) { // special operation for the GModel to avoid libGmsh modifications pModel->writeMSH(_restartMshFileName, CTX::instance()->mesh.mshFileVersion,CTX::instance()->mesh.binary, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.saveParametric, CTX::instance()->mesh.scalingFactor); - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end restartManager::createRestartFile("nonLinearMechSolver"); restartManager::restart(this); // restart takes only nonm const argument! So convert numstep and curtime @@ -1413,7 +2483,8 @@ void nonLinearMechSolver::oneStepPostSolve(const double curtime, const int numst restartManager::closeRestartFile(); //move output file for restart (if not the stress and disp files have duplicated steps) moveFiles("beforeRestart","cp"); - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end } } @@ -1452,7 +2523,7 @@ void nonLinearMechSolver::checkElementErosion(const IPStateBase::whichState ws){ const IPVariable* ipvprev = (*ips)[ip]->getState(IPStateBase::previous); const IPVariable* ipv = (*ips)[ip]->getState(ws); // check element - if (_globalCheckFlag){ + if (_erosionGlobalCriterion!=NULL){ // global check if (_erosionGlobalCriterion->isFailed(ipvprev,ipv)){ willBeEroded = true; @@ -1483,7 +2554,7 @@ void nonLinearMechSolver::checkElementErosion(const IPStateBase::whichState ws){ for (int ip=0; ip < (*ips).size(); ip++){ const IPVariable* ipv = (*ips)[ip]->getState(ws); const IPVariable* ipvprev = (*ips)[ip]->getState(IPStateBase::previous); - if (_globalCheckFlag){ + if (_erosionGlobalCriterion!=NULL){ if (!_erosionGlobalCriterion->isFailed(ipvprev,ipv)){ numberNoFailedIP++; break; @@ -1559,9 +2630,7 @@ void nonLinearMechSolver::restartPathFollowing() //double _pathFollowingEqRatio; //pathFollowingMethod _pathFollowingMethod; // 0- arclength based, 1 - - restartManager::restart(_loadStep); // for load control restartManager::restart(_localStep); // to local cr control - restartManager::restart(_loadStepPrev); // for load control restartManager::restart(_localStepPrev); // to local cr control //double _localStepMinimal; //double _localStepMaximal; @@ -1582,7 +2651,6 @@ void nonLinearMechSolver::restartErosion() //restartManager::restart(_interfaceElementErosionFlag); // true if interface element erosion //restartManager::restart(_erosionType); // all ip failed //FailureCriterionBase* _erosionGlobalCriterion; - //restartManager::restart(_globalCheckFlag); // true if global verification based on _erosionGlobalCriterion _elementErosionFilter.restart(); // a set consists of all erosion elements _elementErosionFilter.print(); } @@ -1593,6 +2661,27 @@ void nonLinearMechSolver::restartDefoDefoContact() cdom->restart(); } } + + +std::string nonLinearMechSolver::getFileSavingPrefix() const +{ + if (_microFlag) + { + if (_enumMinus == _enumPlus) + { + return "E_"+int2str(_enumMinus)+"_GP_"+int2str(_gnum)+"_"; + } + else + { + return "E_Interface_"+int2str(_enumMinus)+"_"+int2str(_enumPlus)+"_GP_"+int2str(_gnum)+"_"; + } + } + else + { + return ""; + } +} + void nonLinearMechSolver::initContactInteraction(){ // find a common element between slave group of element and the group of element of partdomain bool flagfind; @@ -1643,7 +2732,7 @@ void nonLinearMechSolver::initContactInteraction(){ } } - // Idem for defo defo contact. MPI not implemented + // Idem for defo defo contact. MPI not implemented // for parallel we need to define the master faces as ghost faces in all the other partitions for(defoDefoContactContainer::iterator it = _allDefoDefoContact.begin(); it!=_allDefoDefoContact.end(); ++it){ defoDefoContactDomain *cdom = (*it); @@ -1896,18 +2985,18 @@ void nonLinearMechSolver::initContactInteraction(){ } } if(flagfind) - break; + break; } } } // now the map Space Element is filled for the BC for(std::map<partDomain*,std::vector<MElement*> >::iterator it=mapfindMaster.begin(); it!=mapfindMaster.end(); ++it) { - groupOfElements mast(it->second); + groupOfElements mast(it->second); for(std::map<partDomain*,std::vector<MElement*> >::iterator itslave=mapfindSlave.begin(); itslave!=mapfindSlave.end(); ++itslave) { - groupOfElements slav(itslave->second); - cdom->insertSlaveMasterDomainsAndFunctionSpace(itslave->first,&slav,it->first,&mast); + groupOfElements slav(itslave->second); + cdom->insertSlaveMasterDomainsAndFunctionSpace(itslave->first,&slav,it->first,&mast); } } } @@ -2671,7 +3760,7 @@ void nonLinearMechSolver::numberDofs(){ static std::string A("A"); pAssembler->getLinearSystem(A)->allocate(nunk); - if (whatScheme == Eigen and _eigenSolverType == DYNAMIC){ + if (whatScheme == Eigen and _eigOpts.type == eigenSolverOptions::Dynamic){ static std::string B("B"); pAssembler->getLinearSystem(B)->allocate(nunk); }; @@ -2974,15 +4063,15 @@ void nonLinearMechSolver::setPathFollowingSolverType( const int i, const double }; void nonLinearMechSolver::setPathFollowingLocalSteps(const double loadStep, const double localCrStep){ - _loadStep = loadStep; - _loadStepPrev = loadStep; + _arcLengthStep = loadStep; + _arcLengthStepPrev = loadStep; _localStep = localCrStep; - _localStepPrev = localCrStep; + _localStepPrev = localCrStep; } void nonLinearMechSolver::setPathFollowingArcLengthStep(const double arcStep){ _arcLengthStep = arcStep; - _arcLengthStepPrev = arcStep; + _arcLengthStepPrev = arcStep; }; void nonLinearMechSolver::setBoundsOfPathFollowingLocalSteps(const double lowerBound, const double upperBound){ @@ -2991,6 +4080,12 @@ void nonLinearMechSolver::setBoundsOfPathFollowingLocalSteps(const double lowerB Msg::Info("path following local step is bounded by lowerbound %e and by upper bound %e",lowerBound,upperBound); }; +void nonLinearMechSolver::setBoundsOfPathFollowingLoadSteps(const double lowerBound, const double upperBound){ + _arcLengthStepMinimal = lowerBound; + _arcLengthStepMaximal = upperBound; + Msg::Info("path following load step is bounded by lowerbound %e and by upper bound %e",lowerBound,upperBound); +}; + void nonLinearMechSolver::setBoundsOfPathFollowingArcLengthSteps(const double lowerBound, const double upperBound){ _arcLengthStepMinimal = lowerBound; _arcLengthStepMaximal = upperBound; @@ -3303,7 +4398,7 @@ void nonLinearMechSolver::createInterfaceElement_2() void nonLinearMechSolver::rotateModel(const SVector3& n1, const SVector3& n2, const SVector3& n3){ if (!_GModelIsRotated){ _GModelIsRotated = true; - GeometryRotation::rotateGModel(_enum,_gnum,pModel,n1,n2,n3); + GeometryRotation::rotateGModel(getFileSavingPrefix(),pModel,n1,n2,n3); } }; @@ -3401,12 +4496,9 @@ double nonLinearMechSolver::solveStaticLinear() Msg::Error("StaticLinear cannot run with multiple processors!!!"); } #endif //HAVE_MPI - + this->init(); this->init2(); - if (_energField != NULL){ - delete _energField; _energField=NULL; // energy cannot be computed with this scheme as the system does not computed the forces of fixed ddl!! - } /* time initialization */ double curtime = 1.; @@ -3435,57 +4527,33 @@ double nonLinearMechSolver::solveStaticLinear() double nonLinearMechSolver::solveEigen() { - /* init data */ - this->init(); - this->init2(); - if (_energField){ - delete _energField; _energField=NULL; // energy cannot be computed with this scheme as the system does not computed the forces of fixed ddl!! - } + // no view + unknownView.clear(); + ipView.clear(); + _energyComputation = 0; + _fractureEnergyComputation = 0; - /* time initialization */ - double curtime = 1.; - double timestep = 1.; - int step = 1; - - /* solving */ - this->setTimeForLaw(curtime,timestep,step); - printf("--begin assembling \n"); - double tsystresol = Cpu(); - if (_eigenSolverType == DYNAMIC) - this->computeMassMatrix(); - - this->computeStiffMatrix(); - printf("-- done assembling!\n"); - - #if defined (HAVE_SLEPC) - this->createEigenvalueSolver(); - _eigenSolver->solve(_numeigenvalue,"smallestReal",_eigenSolverMethod,_eigenSolverConvergenCriterion,_eigenSolverNumIteration); - tsystresol = Cpu() - tsystresol; - Msg::Info("Time of Eigen Value resolution resolution: %f",tsystresol); - - - if (domainVector.size() == 0) - Msg::Error("no domain"); - const groupOfElements* g = domainVector[0]->elements(); - - MElement* ele = *(g->begin()); - double scale = 1.; - int d = ele->getDim(); - double vl = ele->getVolume(); - if (vl<=0 ){ - Msg::Error("element volume = 0"); - } - else{ - if (d ==1) scale = vl; - else if (d ==2) scale = sqrt(vl); - else if (d==3) scale = pow(vl,1./3.); - else Msg::Error("dim = %d not exist",d); - }; + /* init data */ + this->init(); + this->init2(); + + /* time initialization */ + double curtime = 1.; + double timestep = 1.; + int step = 1; - Msg::Info("scale eigenvector = %f",scale); - _eigenSolver->normalize_mode(_modeview,scale); + /* solving */ + this->setTimeForLaw(curtime,timestep,step); + printf("--begin assembling \n"); + double tsystresol = Cpu(); + if (_eigOpts.type == eigenSolverOptions::Dynamic) + { + this->computeMassMatrix(); + } + this->computeStiffMatrix(); + printf("-- done assembling!\n"); - if (_MKToFile){ + if (_eigOpts.MKToFile){ #if defined(HAVE_PETSC) std::string Aname("A"); linearSystem<double>* lsysA = pAssembler->getLinearSystem(Aname); @@ -3501,31 +4569,34 @@ double nonLinearMechSolver::solveEigen() functionPETSc::MatToFile(Bpet->getMatrix(),"Mat_Mass.txt"); }; } - #endif } - for (int i=0; i<_numeigenvalue; i++){ - std::complex<double> val = _eigenSolver->getEigenValue(i); - fprintf(_eigenValueFile,"%.16g \t %.16g \n",val.real(), val.imag()); - } - fprintf(_eigenValueFile,"\n"); - fflush(_eigenValueFile); - - this->modeViewToFile(_modeview,1.,1.); + #if defined (HAVE_SLEPC) + eigenVectorField eigfield(this,3,_eigview,"eigenMode"); + eigfield.archive(curtime,step,false); - if (_isPerturbedEigenMode) - this->writeDisturbedMeshByEigenVector(0); - #else - Msg::Error("solveEigen::Slepc is not intalled"); - #endif // HAVE_SLEPC + // save perturbe file + if (_eigOpts.isPerturbedEigenMode) + { + eigenSolver* eig = eigfield.getEigenSolver(); + if (eig!=NULL) + { + writeDisturbedMeshByEigenVector(*eig,_eigOpts.numberPerturbedMode,_eigOpts.valPerturbedMode); + } + } + #else + Msg::Error("Slepc is not intalled"); + #endif // HAVE_SLEPC - printf("-- done solving!\n"); + printf("-- done solving!\n"); - /* end of scheme */ - this->endOfScheme(curtime,step); - Msg::Info("EigenSolve OK"); - return curtime; + /* end of scheme */ + this->endOfScheme(curtime,step); + tsystresol = Cpu() - tsystresol; + Msg::Info("Time of Eigen Value resolution resolution: %f",tsystresol); + Msg::Info("EigenSolve OK"); + return curtime; } void nonLinearMechSolver::computeLoadVector(){ @@ -3761,34 +4832,33 @@ void nonLinearMechSolver::snlManageTimeStep(const int miteNR,const int iteIncrea } void nonLinearMechSolver::explicitData(const double ftime, const double gams, const double beta, const double gamma, const double alpham,const bool benson){ - _timeStepByBenson = benson; + _explicitOpts.timeStepByBenson = benson; endtime = ftime; - _beta=beta; - _gamma=gamma; - _alpham = alpham; + _explicitOpts.beta=beta; + _explicitOpts.gamma=gamma; + _explicitOpts.alpham = alpham; // depends on numerical damping - double omegas; - _rhoinfty = (alpham+1.)/(2.-alpham); - omegas = sqrt((12.*(1.+_rhoinfty)*(1.+_rhoinfty)*(1.+_rhoinfty)*(2.-_rhoinfty))/(10.+15.*_rhoinfty-_rhoinfty*_rhoinfty+_rhoinfty*_rhoinfty*_rhoinfty-_rhoinfty*_rhoinfty*_rhoinfty*_rhoinfty)); - _gammas = gams*omegas; + double _rhoinfty = (alpham+1.)/(2.-alpham); + double omegas = sqrt((12.*(1.+_rhoinfty)*(1.+_rhoinfty)*(1.+_rhoinfty)*(2.-_rhoinfty))/(10.+15.*_rhoinfty-_rhoinfty*_rhoinfty+_rhoinfty*_rhoinfty*_rhoinfty-_rhoinfty*_rhoinfty*_rhoinfty*_rhoinfty)); + _explicitOpts.gammas = gams*omegas; } void nonLinearMechSolver::implicitData(const double beta, const double gamma, const double alpham , const double alphaf){ - _beta = beta; - _gamma = gamma; - _alphaf = alphaf; - _alpham = alpham; + _implicitOpts.beta = beta; + _implicitOpts.gamma = gamma; + _implicitOpts.alphaf = alphaf; + _implicitOpts.alpham = alpham; }; void nonLinearMechSolver::explicitSpectralRadius(const double ftime,const double gams, const double rho,const bool benson){ - _timeStepByBenson = benson; + _explicitOpts.timeStepByBenson = benson; endtime = ftime; - _rhoinfty=rho; - _beta = (5.-3.*_rhoinfty)/((1.+_rhoinfty)*(1.+_rhoinfty)*(2.-_rhoinfty)); - _alpham = (2.*_rhoinfty-1.)/(1.+_rhoinfty); - _gamma = 1.5-_alpham; + double _rhoinfty=rho; + _explicitOpts.beta = (5.-3.*_rhoinfty)/((1.+_rhoinfty)*(1.+_rhoinfty)*(2.-_rhoinfty)); + _explicitOpts.alpham = (2.*_rhoinfty-1.)/(1.+_rhoinfty); + _explicitOpts.gamma = 1.5-_explicitOpts.alpham; double omegas = sqrt((12.*(1.+_rhoinfty)*(1.+_rhoinfty)*(1.+_rhoinfty)*(2.-_rhoinfty))/(10.+15.*_rhoinfty-_rhoinfty*_rhoinfty+_rhoinfty*_rhoinfty*_rhoinfty-_rhoinfty*_rhoinfty*_rhoinfty*_rhoinfty)); - _gammas = gams*omegas; + _explicitOpts.gammas = gams*omegas; } void nonLinearMechSolver::options(const std::string &options) @@ -3813,16 +4883,15 @@ void nonLinearMechSolver::options(const std::string &options) } void nonLinearMechSolver::implicitSpectralRadius(const double rho){ - _rhoinfty = rho; - _alpham = (2.*_rhoinfty-1.)/(1.+_rhoinfty); - _alphaf = _rhoinfty/(_rhoinfty +1.); - _beta = 1./((_rhoinfty +1.)*(_rhoinfty +1.)); - _gamma = (3.-_rhoinfty)/(2.+2.*_rhoinfty); - + double _rhoinfty = rho; + _implicitOpts.alpham = (2.*_rhoinfty-1.)/(1.+_rhoinfty); + _implicitOpts.alphaf = _rhoinfty/(_rhoinfty +1.); + _implicitOpts.beta = 1./((_rhoinfty +1.)*(_rhoinfty +1.)); + _implicitOpts.gamma = (3.-_rhoinfty)/(2.+2.*_rhoinfty); }; void nonLinearMechSolver::explicitTimeStepEvaluation(const int nst){ - _numstepExpl = nst; + _explicitOpts.numstepExpl = nst; } double nonLinearMechSolver::solve(){ @@ -3859,12 +4928,13 @@ double nonLinearMechSolver::solve(){ break; } }; - Msg::Barrier(); // wait all before end (for MPI) + if (getNumRanks() > 1) + Msg::Barrier(); // wait all before end (for MPI) _previousScheme = whatScheme; _notResetedBC = true; _notResetedContact = true; _notResetUnknowns = true; - _dynamicRelaxation = false; + _explicitOpts.dynamicRelaxation = false; return reachtime; } @@ -3925,8 +4995,8 @@ void nonLinearMechSolver::disableResetRestart() //to avoid restart at a change o void nonLinearMechSolver::dynamicRelaxation(const double gams,const double ftime,const double tol,const int wsolver,const bool benson) { - _timeStepByBenson = true; - _dynamicRelaxation = true; + _explicitOpts.timeStepByBenson = true; + _explicitOpts.dynamicRelaxation = true; whatScheme = Explicit; if(wsolver == 2) whatSolver = Petsc; @@ -3936,7 +5006,7 @@ void nonLinearMechSolver::dynamicRelaxation(const double gams,const double ftime void nonLinearMechSolver::displacementBC(std::string onwhat, const int numphys, const int comp, const double value) { - simpleFunction<double> *fct = new simpleFunctionTime<double>(value); + simpleFunctionTime<double> *fct = new simpleFunctionTime<double>(value); elementFilterTrivial filter = elementFilterTrivial(); this->displacementBC(onwhat,numphys,comp,&filter,fct); } @@ -3961,7 +5031,7 @@ void nonLinearMechSolver::accelerationBC(std::string onwhat, const int numphys, void nonLinearMechSolver::displacementBC(std::string onwhat, const int numphys, const int comp, const double value, elementFilter *filter) { - simpleFunction<double> *fct = new simpleFunctionTime<double>(value); + simpleFunctionTime<double> *fct = new simpleFunctionTime<double>(value); this->displacementBC(onwhat,numphys,comp,filter,fct); } @@ -3971,20 +5041,20 @@ void nonLinearMechSolver::velocityBC(std::string onwhat, const int numphys, cons allDirichlet.back()._mycondition = nonLinearBoundaryCondition::velocity; } -void nonLinearMechSolver::displacementBC(std::string onwhat, const int numphys, const int comp,simpleFunction<double> *fct) +void nonLinearMechSolver::displacementBC(std::string onwhat, const int numphys, const int comp,simpleFunctionTime<double> *fct) { elementFilterTrivial filter = elementFilterTrivial(); this->displacementBC(onwhat,numphys,comp,&filter,fct); } -void nonLinearMechSolver::velocityBC(std::string onwhat, const int numphys, const int comp,simpleFunction<double> *fct) +void nonLinearMechSolver::velocityBC(std::string onwhat, const int numphys, const int comp,simpleFunctionTime<double> *fct) { this->displacementBC(onwhat,numphys,comp,fct); allDirichlet.back()._mycondition = nonLinearBoundaryCondition::velocity; } void nonLinearMechSolver::displacementBC(std::string onwhat, const int numphys, const int comp, elementFilter *filter, - simpleFunction<double> *fct) + simpleFunctionTime<double> *fct) { allDirichlet.emplace_back(); nonLinearDirichletBC& diri = allDirichlet.back(); @@ -4020,7 +5090,7 @@ void nonLinearMechSolver::displacementBC(std::string onwhat, const int numphys, } void nonLinearMechSolver::velocityBC(std::string onwhat, const int numphys, const int comp, elementFilter *filter, - simpleFunction<double> *fct) + simpleFunctionTime<double> *fct) { this->displacementBC(onwhat,numphys,comp,filter,fct); allDirichlet.back()._mycondition = nonLinearBoundaryCondition::velocity; @@ -4028,10 +5098,10 @@ void nonLinearMechSolver::velocityBC(std::string onwhat, const int numphys, cons void nonLinearMechSolver::displacementRigidContactBC(const int numphys, const int comp_, const double value) { - simpleFunction<double> *fct = new simpleFunctionTime<double>(value); + simpleFunctionTime<double> *fct = new simpleFunctionTime<double>(value); this->displacementRigidContactBC(numphys,comp_,fct); } -void nonLinearMechSolver::displacementRigidContactBC(const int numphys, const int comp_, simpleFunction<double> *fct) +void nonLinearMechSolver::displacementRigidContactBC(const int numphys, const int comp_, simpleFunctionTime<double> *fct) { allContactBC.emplace_back(numphys); rigidContactBC& diri = allContactBC.back(); @@ -4316,7 +5386,7 @@ void nonLinearMechSolver::pressureOnPhysicalGroupBC(std::string onwhat, const in void nonLinearMechSolver::pressureOnPhysicalGroupBC(std::string onwhat, const int numphys, simpleFunctionTime<double> *fct){ - allNeumann.emplace_back(nonLinearNeumannBC()); + allNeumann.emplace_back(); nonLinearNeumannBC& neu = allNeumann.back(); const std::string edge("Edge"); @@ -4365,8 +5435,8 @@ void nonLinearMechSolver::archivingForceOnPhysicalGroup(const std::string onwhat dim = 2; else if(onwhat == volu) dim = 3; - - // check if + + // check if bool found = false; for (int i=0; i< vaf.size(); i++) { @@ -4383,7 +5453,7 @@ void nonLinearMechSolver::archivingForceOnPhysicalGroup(const std::string onwhat } void nonLinearMechSolver::archivingRigidContactForce(const int numphys, const int comp,const int nstep){ - // check if + // check if bool found = false; for (int i=0; i< vaf.size(); i++) { @@ -4393,7 +5463,7 @@ void nonLinearMechSolver::archivingRigidContactForce(const int numphys, const in break; } } - + if (!found) { vaf.emplace_back(numphys,0,comp,nstep); @@ -4523,7 +5593,22 @@ void nonLinearMechSolver::initArchiveForce(){ } } if(!af.vdof.empty() && (af.contact_root == -1 || af.contact_root==Msg::GetCommRank())) - af.openFile(); + af.openFile(getFileSavingPrefix()); + } +} + +void nonLinearMechSolver::initPathFollowingArchiving() +{ + if (_pathFollowing) + { + #if defined(HAVE_MPI) + if (Msg::GetCommRank() == 0) + #endif // HAVE_MPI + { + std::string filename = getFileSavingPrefix()+"pathResult_Time_ControlParameter_StateParameter.csv"; + FILE* file = fopen(filename.c_str(),"w"); + fclose(file); + } } } @@ -4535,12 +5620,12 @@ void nonLinearMechSolver::pathFollowingArchiving(const double curtime, const int pathFollowingSystem<double>* psys = dynamic_cast<pathFollowingSystem<double>*>(lsys); double control = psys->getControlParameter(); double state = psys->getStateParameter(); - + #if defined(HAVE_MPI) if (Msg::GetCommRank() == 0) #endif // HAVE_MPI { - std::string filename = "pathResult_Time_ControlParameter_StateParameter.csv"; + std::string filename = getFileSavingPrefix()+"pathResult_Time_ControlParameter_StateParameter.csv"; FILE* file = fopen(filename.c_str(),"a"); fprintf(file,"%e; %e; %e; \n",curtime,control,state); fclose(file); @@ -4623,7 +5708,7 @@ void nonLinearMechSolver::IPVolumeIntegralArchiving(const double curtime, const { Msg::Error("integType has not been defined"); } - if (iv.fp == NULL) iv.openFile(); + if (iv.fp == NULL) iv.openFile(getFileSavingPrefix()); fprintf(iv.fp,"%e;%e\n",curtime,val); fflush(iv.fp); } @@ -4651,7 +5736,7 @@ void nonLinearMechSolver::IPDataOnPhysicalArchiving(const double curtime, const #endif // HAVE_MPI - std::string fname = "coordinate_"+ IPField::ToString(ipval)+ "_OnPhysical_"+int2str(phys); + std::string fname = getFileSavingPrefix()+"coordinate_"+ IPField::ToString(ipval)+ "_OnPhysical_"+int2str(phys); #if defined(HAVE_MPI) if (this->getNumRanks() > 1){ fname += "_part"+int2str(Msg::GetCommRank()); @@ -4686,14 +5771,14 @@ void nonLinearMechSolver::IPDataOnPhysicalArchiving(const double curtime, const } fclose(coordinateFile); } - + if (numstep > ipdata.lastSaveStep) { if (numstep%ipdata.nbArch==0 or forceSave) { ipdata.lastSaveStep = numstep; // - std::string fname = "IPDdata_"+ IPField::ToString(ipval)+ "_OnPhysical_"+int2str(phys); + std::string fname = getFileSavingPrefix()+"IPDdata_"+ IPField::ToString(ipval)+ "_OnPhysical_"+int2str(phys); #if defined(HAVE_MPI) if ( getNumRanks() > 1){ fname += "_part"+int2str(Msg::GetCommRank()); @@ -4794,6 +5879,10 @@ void nonLinearMechSolver::periodicBC(std::string onwhat, const int phys1, const Msg::Error("periodic root vertices have not been correctly defined"); } pbc.comp = comp; + pbc.phys1 = phys1; + pbc.phys2 = phys2; + pbc.physVer1 = v1; + pbc.physVer2 = v2; }; void nonLinearMechSolver::averagePeriodicBC(std::string onwhat, const int phys1, const int phys2, const int v1, const int v2, const int comp){ @@ -4824,6 +5913,10 @@ void nonLinearMechSolver::averagePeriodicBC(std::string onwhat, const int phys1, Msg::Error("periodic root vertices have not been correctly defined"); } pbc.comp = comp; + pbc.phys1 = phys1; + pbc.phys2 = phys2; + pbc.physVer1 = v1; + pbc.physVer2 = v2; }; void nonLinearMechSolver::sameDisplacementBC(std::string onwhat, const int phy, const int rootphy, const int comp, const double fac){ @@ -4870,6 +5963,8 @@ void nonLinearMechSolver::sameDisplacementBCBetweenTwoGroups(std::string onwhat, bc.comp = comp; bc._tag = phy1; + bc.phys1 = phy1; + bc.phys2 = phy2; const std::string node("Node"); const std::string edge("Edge"); @@ -5335,7 +6430,7 @@ void nonLinearMechSolver::applyFixOnFace(){ void nonLinearMechSolver::archivingNode(const int numphys, const int comp, nonLinearBoundaryCondition::whichCondition wc,const int nstep){ // no distinction between cG/dG and full Dg formulation. class Displacement Field manage it - + groupOfElements g(0,numphys); if(g.vsize() >0){ @@ -5350,7 +6445,7 @@ void nonLinearMechSolver::archivingNode(const int numphys, const int comp, nonLi break; } } - + if (!found) { anoded.emplace_back(numphys,v->getNum(),comp,wc,nstep); @@ -5373,7 +6468,7 @@ void nonLinearMechSolver::archivingNode(const int numpphys, const int dim, const std::ostringstream ossnumver; ossnumver << numpphys; std::string ss = ossnumver.str(); - std::string fnam = "numver" + ss+ ".csv"; + std::string fnam = getFileSavingPrefix()+ "numver" + ss+ ".csv"; file = fopen(fnam.c_str(),"w"); } @@ -5388,7 +6483,7 @@ void nonLinearMechSolver::archivingNode(const int numpphys, const int dim, const break; } } - + if (!found) { anoded.emplace_back(numpphys,vv->getNum(),comp,wc,nstep); @@ -5429,12 +6524,12 @@ void nonLinearMechSolver::archivingRigidContact(const int numphys, const int com default: whc = nonLinearBoundaryCondition::position; } - + bool found = false; for (int i=0; i< anoded.size(); i++) { - if (anoded[i].physnum == numphys and anoded[i].nodenum == numphys and - anoded[i]._comp == comp and anoded[i].wc == whc and + if (anoded[i].physnum == numphys and anoded[i].nodenum == numphys and + anoded[i]._comp == comp and anoded[i].wc == whc and anoded[i].iscontact) { found = true; @@ -5460,7 +6555,8 @@ void nonLinearMechSolver::archivingNodeIPOnPhysicalGroup(const int dim, const in if (Msg::GetCommRank() ==0) #endif // HAVE_MPI { - ff = fopen("archivingNodeIPOnPhysicalGroup_vertexList.csv","w"); + std::string filename = getFileSavingPrefix()+"archivingNodeIPOnPhysicalGroup_vertexList.csv"; + ff = fopen(filename.c_str(),"w"); fprintf(ff,"Num;X;Y;Z\n"); } for (groupOfElements::vertexContainer::iterator it = g.vbegin(); it!= g.vend(); it++){ @@ -5658,7 +6754,7 @@ double nonLinearMechSolver::initialCriticalExplicitTimeStep(){ if(hs<hsmin) hsmin = hs; R.clear(); disp.clear(); } - double dt = scaleTimeStep*hsmin/celerity; + double dt = scaleTimeStep*hsmin/celerity; if(dt < dtmin ) dtmin = dt; } } @@ -5758,7 +6854,7 @@ double nonLinearMechSolver::criticalExplicitTimeStep(){ R.clear(); disp.clear(); } } - double dt = scaleTimeStep*hsmin/celerity; + double dt = scaleTimeStep*hsmin/celerity; if(dt < dtmin ) dtmin = dt; } } @@ -5869,7 +6965,8 @@ double nonLinearMechSolver::solveExplicit(){ bool forceTimeStepEvaluation=false; if(restartManager::available() and !_resetRestart) { - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end restartManager::openRestartFile("nonLinearMechSolver"); restartManager::restart(this); // restart takes only nonm const argument! So convert numstep and curtime @@ -5892,7 +6989,8 @@ double nonLinearMechSolver::solveExplicit(){ forceTimeStepEvaluation=true; } _resetRestart=false; - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end /* time loop */ while(curtime<endtime){ // end via break for dynamic relaxation @@ -5905,7 +7003,7 @@ double nonLinearMechSolver::solveExplicit(){ void nonLinearMechSolver::initializeExplicitScheme() { - Msg::Info("Explicit Data: endtime = %e beta=%f gamma=%f alpha_m=%f",this->getEndTime(), this->_beta, this->_gamma, this->_alpham); + Msg::Info("Explicit Data: endtime = %e beta=%f gamma=%f alpha_m=%f",this->getEndTime(), this->_explicitOpts.beta, this->_explicitOpts.gamma, this->_explicitOpts.alpham); /* init data */ this->init(); @@ -5941,8 +7039,8 @@ double nonLinearMechSolver::oneExplicitStep(const double curtime, bool &forceTim static staticDofManager<double> *sAssembler = static_cast<staticDofManager<double>*>(pAssembler); // compute time step and current time - if(_currentStep%_numstepExpl ==0 || forceTimeStepEvaluation){ - timeStep = _gammas * this->criticalExplicitTimeStep(); + if(_currentStep%_explicitOpts.numstepExpl ==0 || forceTimeStepEvaluation){ + timeStep = _explicitOpts.gammas * this->criticalExplicitTimeStep(); #if defined(HAVE_MPI) if(Msg::GetCommSize()>1){ // in case of mpi the time step is choosen as the minimal value compute on each partition @@ -5957,7 +7055,7 @@ double nonLinearMechSolver::oneExplicitStep(const double curtime, bool &forceTim } double mytime= curtime + timeStep; - if(mytime>endtime) + if(mytime>endtime) { mytime = endtime; timeStep = mytime - curtime; @@ -5976,9 +7074,9 @@ double nonLinearMechSolver::oneExplicitStep(const double curtime, bool &forceTim Msg::Error("Nan force value --> end"); return endtime; // To finish the loop } - if(_dynamicRelaxation){ + if(_explicitOpts.dynamicRelaxation){ double norm0 = sAssembler->norm0Inf(); - if(_currentStep%_numstepExpl ==0 ) Msg::Info("Rel norm for dynamic relaxation %e tol = %e",normRHS/norm0,_tol); + if(_currentStep%_explicitOpts.numstepExpl ==0 ) Msg::Info("Rel norm for dynamic relaxation %e tol = %e",normRHS/norm0,_tol); if(normRHS/norm0 < _tol){ Msg::Info("Dynamic relaxation procedure is converged. Return endtime to finish the loop"); return endtime; @@ -5986,7 +7084,7 @@ double nonLinearMechSolver::oneExplicitStep(const double curtime, bool &forceTim if(mytime == endtime) Msg::Info("Dynamic relaxation ended as the final time is reached. But convergence is not achieved!"); } - + this->oneStepPostSolve(mytime,_currentStep+1); // current step _currentStep++; @@ -6013,13 +7111,13 @@ void nonLinearMechSolver::initializeStaticScheme() std::string name = "A"; linearSystem<double>* lsys =pAssembler->getLinearSystem(name); nonLinearSystem<double>* nlsys = dynamic_cast<nonLinearSystem<double>*>(lsys); - + if (whatScheme == Implicit){ Msg::Info("begin assembling mass matrix"); /* mass matrix computation outside the loop */ // zero matrix first nlsys->zeroMatrix(nonLinearSystem<double>::mass); - + for(std::vector<partDomain*>::iterator it = domainVector.begin(); it!=domainVector.end(); ++it){ partDomain *dom = *it; AssembleMass(dom->getBilinearMassTerm(),*(dom->getFunctionSpace()),dom->g_cbegin(),dom->g_cend(), @@ -6037,10 +7135,10 @@ void nonLinearMechSolver::initializeStaticScheme() Msg::Info("done assembling mass matrix"); } - + if (whatScheme == Implicit){ //now only for implicit and dgdomain - if (_noMassPredicorWithoutVelocityAndAcceleration) + if (_implicitOpts.noMassPredicorWithoutVelocityAndAcceleration) { Msg::Info("start no mass DOFs collecting"); // collect all no mass DOFs @@ -6077,8 +7175,8 @@ void nonLinearMechSolver::initializeStaticScheme() bool nonLinearMechSolver::localPathFollowingSwitching() const{ // for test - double pfCr = _ipf->computePathFollowingLocalValue(IPStateBase::previous); - double Defor = _ipf->computeDeformationEnergy(IPStateBase::previous); + double pfCr = _ipf->computePathFollowingLocalValue(IPStateBase::current); + double Defor = _ipf->computeDeformationEnergy(IPStateBase::current); #if defined(HAVE_MPI) if (Msg::GetCommSize()> 1){ double Cr[2]; @@ -6087,7 +7185,7 @@ bool nonLinearMechSolver::localPathFollowingSwitching() const{ double totalCr[2]; MPI_Allreduce(&Cr[0],&totalCr[0],2,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD); if (totalCr[1] > 0.) - printf("rank %d pf = %e, deforEnerg = %e cr = %e impose value %e \n",Msg::GetCommRank(),totalCr[0],totalCr[1],totalCr[0]/totalCr[1],_pathFollowingSwitchCriterion); + Msg::Info("pf = %e, deforEnerg = %e cr = %e impose value %e ",totalCr[0],totalCr[1],totalCr[0]/totalCr[1],_pathFollowingSwitchCriterion); if (totalCr[0] > _pathFollowingSwitchCriterion*totalCr[1]) return true; else return false; } @@ -6121,19 +7219,13 @@ double nonLinearMechSolver::computeLocalPathFollowingStep() const{ int nonLinearMechSolver::oneStaticStep(const double curtime,const double dt, const int numstep) { - double tsystresol = Cpu(); + double tsystresol = Cpu(); int niteNR = 0; if (_pathFollowing){ this->oneStepPreSolvePathFollowing(curtime,dt,numstep); niteNR = NewtonRaphsonPathFollowing(numstep); } else{ - //std::string name = "A"; - //linearSystem<double>* lsys =pAssembler->getLinearSystem(name); - //lsys->zeroRightHandSide(); - //nonLinearSystemPETSc<double>* nonsys = dynamic_cast< nonLinearSystemPETSc<double>*>(lsys); - //nonsys->zeroRightHandSide(); - //nonsys->printAll(); // Solve one step by NR scheme this->oneStepPreSolve(curtime,dt,numstep); niteNR = NewtonRaphson(numstep); } @@ -6237,7 +7329,7 @@ double nonLinearMechSolver::getArchivedNodalValue(const int numphys,const int co break; } } - + #if defined(HAVE_MPI) if (getNumRanks() > 1) { @@ -6334,7 +7426,7 @@ void nonLinearMechSolver::forceArchiving(const double curtime,const int numstep, fprintf(vaf[i].FP,"%e;%e\n",curtime,vaf[i].fval); fflush(vaf[i].FP); } - + } } } @@ -6378,26 +7470,17 @@ void nonLinearMechSolver::setSelectiveUpdate(const selectiveUpdateBase& selectiv }; void nonLinearMechSolver::endSchemeMonitoring(const EndSchemeMonitoringBase& endObj){ - _endSchemeMonitoring = true; if (_endSchemeMonitoringObject != NULL) delete _endSchemeMonitoringObject; _endSchemeMonitoringObject = endObj.clone(); }; -bool nonLinearMechSolver::solverEndedByMornitoring() const{ - if (_endSchemeMonitoring){ - return _endSchemeMonitoringObject->solverEndedByMornitoring(); - } - else{ - return false; - } -}; void nonLinearMechSolver::setNoMassPredicorWithoutVelocityAndAcceleration(const bool fl){ - _noMassPredicorWithoutVelocityAndAcceleration = fl; + _implicitOpts.noMassPredicorWithoutVelocityAndAcceleration = fl; if (fl) { Msg::Info("no velocity in predictor of nomass dof with Implicit CH scheme"); } - + }; // for crack insertion control @@ -6430,9 +7513,9 @@ void nonLinearMechSolver::setElementErosion(const bool bulkErosion, const bool i }; void nonLinearMechSolver::setGlobalErosionCheck(const bool flag, const FailureCriterionBase* fcr){ - _globalCheckFlag = flag; - if (_globalCheckFlag){ + if (flag){ Msg::Info("erosion is checked globally based on a global criterion"); + if (_erosionGlobalCriterion!=NULL) delete _erosionGlobalCriterion; _erosionGlobalCriterion = fcr->clone(); } }; @@ -7015,13 +8098,13 @@ linearSystem<double>* nonLinearMechSolver::createExplicitSystem() if(nonLinearMechSolver::whatSolver == Petsc){ #if defined(HAVE_PETSC) Msg::Info("Explicit scheme based on PETSc"); - esys = new explicitHulbertChungPetsc<double>(_alpham,_beta,_gamma,_timeStepByBenson,_dynamicRelaxation); + esys = new explicitHulbertChungPetsc<double>(_explicitOpts.alpham,_explicitOpts.beta,_explicitOpts.gamma,_explicitOpts.timeStepByBenson,_explicitOpts.dynamicRelaxation); #else Msg::Warning("petsc is not install on this computer. Use blas explicit system"); #if !defined(HAVE_BLAS) Msg::Warning("blas is not installed. Use not optimized default implementation"); #endif // HAVE_BLAS - esys = new explicitHulbertChungBlas<double>(_alpham,_beta,_gamma,_timeStepByBenson,_dynamicRelaxation); + esys = new explicitHulbertChungBlas<double>(_explicitOpts.alpham,_explicitOpts.beta,_explicitOpts.gamma,_explicitOpts.timeStepByBenson,_explicitOpts.dynamicRelaxation); #endif // HAVE_PETSC } else{ @@ -7030,14 +8113,14 @@ linearSystem<double>* nonLinearMechSolver::createExplicitSystem() #else Msg::Info("Explicit scheme based on BLAS"); #endif // HAVE_BLAS - esys = new explicitHulbertChungBlas<double>(_alpham,_beta,_gamma,_timeStepByBenson,_dynamicRelaxation); + esys = new explicitHulbertChungBlas<double>(_explicitOpts.alpham,_explicitOpts.beta,_explicitOpts.gamma,_explicitOpts.timeStepByBenson,_explicitOpts.dynamicRelaxation); } } else{ std::string sysname("A"); esys = pAssembler->getLinearSystem(sysname); explicitHulbertChung<double>* expsys = static_cast<explicitHulbertChung<double>*>(esys); - expsys->setDynamicRelaxation(_dynamicRelaxation); + expsys->setDynamicRelaxation(_explicitOpts.dynamicRelaxation); } return esys; } @@ -7047,7 +8130,7 @@ linearSystem<double>* nonLinearMechSolver::createImplicitSystem(){ if(nonLinearMechSolver::whatSolver == Petsc){ #if defined(HAVE_PETSC) Msg::Info("Implicit scheme based on PETSc"); - esys = new implicitHulbertChungPetsc<double>(_alpham,_alphaf,_beta,_gamma); + esys = new implicitHulbertChungPetsc<double>(_implicitOpts.alpham,_implicitOpts.alphaf,_implicitOpts.beta,_implicitOpts.gamma); #else Msg::Warning("petsc is not install on this computer. Use blas explicit system"); #endif // HAVE_PETSC @@ -7092,7 +8175,7 @@ void nonLinearMechSolver::createSystem() } else if (whatScheme == Eigen){ lsys = this->createEigenSystem(); - if (_eigenSolverType == DYNAMIC) + if (_eigOpts.type == eigenSolverOptions::Dynamic) lsys2 = this->createEigenSystem(); } else @@ -7104,7 +8187,7 @@ void nonLinearMechSolver::createSystem() if(whatScheme==Explicit) { explicitHulbertChung<double>* esys = static_cast<explicitHulbertChung<double>*>(lsys); - esys->setDynamicRelaxation(_dynamicRelaxation); + esys->setDynamicRelaxation(_explicitOpts.dynamicRelaxation); } if(whatScheme==Eigen) Msg::Error("Eigen solver in createSystem"); } @@ -7237,7 +8320,7 @@ void nonLinearMechSolver::createSystem() if(whatScheme==Explicit or whatScheme==Multi){ staticDofManager<double>* sAssembler = dynamic_cast<staticDofManager<double>*>(pAssembler); if (sAssembler != NULL){ - double timeStep = _gammas * this->initialCriticalExplicitTimeStep(); + double timeStep = _explicitOpts.gammas * this->initialCriticalExplicitTimeStep(); #if defined(HAVE_MPI) if(Msg::GetCommSize()>1){ // in case of mpi the time step is choosen as the minimal value compute on each partition @@ -7317,31 +8400,6 @@ int nonLinearMechSolver::NewtonRaphsonPathFollowing(const int numstep){ return iter; }; -void nonLinearMechSolver::perturbationProcedure(const double pre, double* mode){ - /* - Perturbation is case of simple buckling mode - */ - if (pre>this->_instabilitycriterion) return; - Msg::Warning("buckling occurs, criterion = %f < %f",pre,_instabilitycriterion); - int sizeR = pAssembler->sizeOfR(); - /* Get infinity norm of mode to give the unity vector*/ - double norm = 0; - for (int i=0; i<sizeR; i++){ - if (fabs(mode[i])> norm) norm = fabs(mode[i]); - } - - std::string name = "A"; - linearSystem<double>* lsys = pAssembler->getLinearSystem(name); - double normSol = lsys->normInfSolution(); - - Msg::Warning("Perturbating to system: "); - double factor = (_perturbationfactor*normSol)/norm; - /* Perturbation to solution*/ - for (int i=0; i<sizeR; i++){ - double val = mode[i]*factor; - lsys->addToSolution(i,val); - } -} double nonLinearMechSolver::solveSNL() { @@ -7357,10 +8415,12 @@ double nonLinearMechSolver::solveSNL() double tolend = 0.000001*dendtime; // OTHERWISE LAST STEP CAN BE DONE TWICE ?? double toldtmax = 0.000001*dtmax; // IDEM (PRECISION PROBLEM) _timeStepAdaptationFactor = 1.; + _currentStep = 0; int numberTimeStepReduction=0; if(restartManager::available() and !_resetRestart) { - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end restartManager::openRestartFile("nonLinearMechSolver"); restartManager::restart(this); // restart takes only nonm const argument! So convert numstep and curtime @@ -7370,8 +8430,8 @@ double nonLinearMechSolver::solveSNL() restartManager::closeRestartFile(); restartManager::InitFromRestartFile(); - Msg::Barrier(); // To wait rank0 before end - + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end struct stat st; if(stat("beforeRestart",&st) == 0) { @@ -7383,7 +8443,6 @@ double nonLinearMechSolver::solveSNL() #if defined(HAVE_MPI) if(Msg::GetCommSize()>1) { //we need to reinitializae after the restart of the nonLinearSolver - staticDofManager<double>* sAssembler = static_cast<staticDofManager<double>*>(pAssembler); Msg::Info("MPI restart initialization begins"); sAssembler->systemMPIComm(); // To initiate the MPI Communication Msg::Info("MPI restart initialization OK"); @@ -7391,8 +8450,8 @@ double nonLinearMechSolver::solveSNL() #endif // HAVE_MPI } _resetRestart=false; - Msg::Barrier(); // To wait rank0 before end - + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end while(fabs(curtime-dendtime) > tolend ){ curtime+=dt; if(curtime > dendtime) @@ -7405,9 +8464,10 @@ double nonLinearMechSolver::solveSNL() int niteNR = this->oneStaticStep(curtime,dt,ii+1); bool redoStepWithSelectiveUpdate = false; + bool willEnd = false; if (niteNR < _maxNRite){ // check for monitoring or selective update - if (!_ipf->isAllChecked() or _endSchemeMonitoring or (_selectiveObject != NULL)){ + if (!_ipf->isAllChecked() or (_endSchemeMonitoringObject!=NULL) or (_selectiveObject != NULL)){ _ipf->checkAll(); } @@ -7418,10 +8478,11 @@ double nonLinearMechSolver::solveSNL() } } - if (_endSchemeMonitoring ){ + if (_endSchemeMonitoringObject!=NULL ){ // check of end cr is satisfy _endSchemeMonitoringObject->checkEnd(this); - if (!_endSchemeMonitoringObject->solverEndedByMornitoring()){ + willEnd = _endSchemeMonitoringObject->solverEndedByMornitoring(); + if (!willEnd){ if (_endSchemeMonitoringObject->reduceTimeStepByMornitoring()){ Msg::Warning("reduce by monitoring"); niteNR = _maxNRite; @@ -7442,12 +8503,12 @@ double nonLinearMechSolver::solveSNL() if (_selectiveObject != NULL){ _selectiveObject->resetToPreviousStep(); } - if (_endSchemeMonitoring){ + if (_endSchemeMonitoringObject!=NULL){ _endSchemeMonitoringObject->resetToPreviousStep(); } break; } - Msg::Warning("Convergence of Newton-Raphson failed --> reduced time step"); + Msg::Warning("Convergence of Newton-Raphson failed (%d fails %d allowable fails) --> reduced time step",numberTimeStepReduction,_maxAttemptStepReduction); curtime = lasttime; @@ -7459,7 +8520,7 @@ double nonLinearMechSolver::solveSNL() if (_selectiveObject != NULL){ _selectiveObject->resetToPreviousStep(); } - if (_endSchemeMonitoring){ + if (_endSchemeMonitoringObject!=NULL){ _endSchemeMonitoringObject->resetToPreviousStep(); } } @@ -7470,9 +8531,18 @@ double nonLinearMechSolver::solveSNL() } else { + if (_pathFollowing){ + if ((_pathFollowingMethod == LOCAL_BASED) and (!_switchedControlType) and _timeStepAdaptation){ + _localStep = this->computeLocalPathFollowingStep(); + } + _localStepPrev = _localStep; + _arcLengthStepPrev = _arcLengthStep; + } + lasttime = curtime; this->oneStepPostSolve(curtime,ii+1); - ii ++; + _currentStep ++; + ii ++; // save for next step if (_timeStepAdaptation) { @@ -7481,7 +8551,7 @@ double nonLinearMechSolver::solveSNL() else{ _timeStepAdaptationFactor = 1.0; } - + // if (_timeStepAdaptation && !_pathFollowing) { @@ -7515,16 +8585,12 @@ double nonLinearMechSolver::solveSNL() _timeStepAdaptationFactor *= _timeStepFactorReduction; sAssembler->setTimeStep(dt); } - - - if (_endSchemeMonitoring) { - if (_endSchemeMonitoringObject->solverEndedByMornitoring()){ - Msg::Info("Computation is finished following _endSchemeMonitoring"); - _endSchemeMonitoringObject->nextStep(); - break; - } - // normal nextstep - _endSchemeMonitoringObject->nextStep(); + + + if (willEnd) + { + Msg::Info("Computation is finished following _endSchemeMonitoring"); + break; } } } @@ -7533,11 +8599,12 @@ double nonLinearMechSolver::solveSNL() return this->finalizeStaticScheme(curtime,ii); } + double nonLinearMechSolver::solveMulti() { Msg::Info("Mixed static and dynamic solving: endtime=%e",this->getEndTime()); Msg::Info("Static Data: tolerance: %lf",_tol); - Msg::Info("Dynamic Data: beta=%f gamma=%f alpha_m=%f",this->_beta, this->_gamma, this->_alpham); + Msg::Info("Dynamic Data: beta=%f gamma=%f alpha_m=%f",_explicitOpts.beta, _explicitOpts.gamma, _explicitOpts.alpham); /* init data */ this->init(); @@ -7583,7 +8650,8 @@ double nonLinearMechSolver::solveMulti() bool forceTimeStepEvaluation=false; if(restartManager::available() and !_resetRestart) { - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end restartManager::openRestartFile("nonLinearMechSolver"); restartManager::restart(this); // restart takes only nonm const argument! So convert numstep and curtime @@ -7593,7 +8661,8 @@ double nonLinearMechSolver::solveMulti() restartManager::closeRestartFile(); restartManager::InitFromRestartFile(); - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end struct stat st; if(stat("beforeRestart",&st) == 0) @@ -7606,7 +8675,6 @@ double nonLinearMechSolver::solveMulti() #if defined(HAVE_MPI) if(Msg::GetCommSize()>1) { //we need to reinitializae after the restart of the nonLinearSolver - //staticDofManager<double>* sAssembler = static_cast<staticDofManager<double>*>(pAssembler); Msg::Info("MPI restart initialization begins"); sAssembler->systemMPIComm(); // To initiate the MPI Communication Msg::Info("MPI restart initialization OK"); @@ -7622,7 +8690,8 @@ double nonLinearMechSolver::solveMulti() sAssembler->nextStep(); // save solution of previous (initially last step == initial step BEAWARE FOR RESTART) }*/ _resetRestart=false; - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end @@ -7642,7 +8711,7 @@ double nonLinearMechSolver::solveMulti() } else if (step==1 or forceTimeStepEvaluation) // compute the explicit time step in case of a previousScheme { - dt = _gammas * this->criticalExplicitTimeStep(); + dt = _explicitOpts.gammas * this->criticalExplicitTimeStep(); #if defined(HAVE_MPI) if(Msg::GetCommSize()>1){ // in case of mpi the time step is choosen as the minimal value compute on each partition @@ -7661,8 +8730,8 @@ double nonLinearMechSolver::solveMulti() /* time loop */ while(fabs(curtime-dendtime) > tolend ){ // compute the time step (explicit limitation) - if(step%_numstepExpl ==0 and oneExplicitScheme){ - dt = _gammas * this->criticalExplicitTimeStep(); + if(step% _explicitOpts.numstepExpl ==0 and oneExplicitScheme){ + dt = _explicitOpts.gammas * this->criticalExplicitTimeStep(); #if defined(HAVE_MPI) if(Msg::GetCommSize()>1){ // in case of mpi the time step is choosen as the minimal value compute on each partition @@ -7708,7 +8777,7 @@ double nonLinearMechSolver::solveMulti() else if(niteNR!=0) { this->oneStepPostSolve(curtime,step+1); - + if(fabs(dtmax-dt) > toldtmax ) // increase time step if convergence in a few iteration { if(niteNR <= _niteTimeStepIncrease) @@ -7719,8 +8788,8 @@ double nonLinearMechSolver::solveMulti() } } lasttime = curtime; - - + + } } if(niteNR==0) // no Implicit computation or no force on the implicit systems @@ -7742,10 +8811,10 @@ double nonLinearMechSolver::solveMulti() Msg::Error("Nan force value --> end"); break; } - if(_dynamicRelaxation) + if(_explicitOpts.dynamicRelaxation) { double norm0 = sAssembler->norm0Inf(); - if(step%_numstepExpl ==0 ) Msg::Info("Rel norm for dynamic relaxation %e tol = %e",normRHS/norm0,_tol); + if(step%_explicitOpts.numstepExpl ==0 ) Msg::Info("Rel norm for dynamic relaxation %e tol = %e",normRHS/norm0,_tol); if(normRHS/norm0 < _tol){ Msg::Info("Dynamic relaxation procedure is achieved"); break; @@ -7768,7 +8837,7 @@ void nonLinearMechSolver::unknownBuildView(const int comp,const int nbstep) { int nstep_; nsba==0 ? nstep_ = nbstep : nstep_=nsba; - + switch(comp){ case 1: unknownView.emplace_back("velocity",1,nlsField::crude,nstep_); @@ -7785,7 +8854,7 @@ void nonLinearMechSolver::OneUnknownBuildView(const std::string vname, const int { int nstep_; nsba==0 ? nstep_ = nbstep : nstep_=nsba; - + int unknownComp = -1 - comp; unknownView.emplace_back(vname,unknownComp,nlsField::crude,nstep_); }; @@ -8445,6 +9514,7 @@ void nonLinearMechSolver::applySameDispBCBetweenTwoGroups(){ void nonLinearMechSolver::crackTracking(std::string fname) { + _crackTrackingName = fname; #if defined(HAVE_MPI) if(Msg::GetCommSize() > 1){ std::ostringstream oss; @@ -8452,6 +9522,7 @@ void nonLinearMechSolver::crackTracking(std::string fname) fname += oss.str(); } #endif // HAVE_MPI + fname = getFileSavingPrefix()+ fname; _crackTrackingFile = fopen(fname.c_str(),"w"); fprintf(_crackTrackingFile,"time0,time1;inter num;num minus;num plus;x0;y0;z0;x1;y1;z1\n"); } @@ -8459,6 +9530,7 @@ void nonLinearMechSolver::crackTracking(std::string fname) // In MPI only 1 final file on rank 0 void nonLinearMechSolver::postproFragment(std::string fname) { + _fragmentationName = fname; #if defined(HAVE_MPI) if(Msg::GetCommSize()>1) { @@ -8474,11 +9546,13 @@ void nonLinearMechSolver::postproFragment(std::string fname) std::string newname(fname,0,ext_pos); std::string fileName = newname + "_part" + partnum +"." + ext; // open file + fileName = getFileSavingPrefix()+fileName; _fragmentationFile = fopen(fileName.c_str(),"w"); } else #endif //HAVE_MPI { + fname = getFileSavingPrefix()+fname; _fragmentationFile = fopen(fname.c_str(),"w"); } } @@ -8801,7 +9875,8 @@ void nonLinearMechSolver::postproFragment() delete[] allfragMPI; } - Msg::Barrier(); // To wait rank0 before end + if (getNumRanks() > 1) + Msg::Barrier(); // To wait rank0 before end #endif // HAVE_MPI // total mass at the end fprintf(_fragmentationFile,"total mass; %e\n number of fragment %d\n",massallfrag,fragnum-1); @@ -8815,12 +9890,12 @@ void nonLinearMechSolver::postproFragment() std::ostringstream oss; oss << Msg::GetCommRank(); std::string partnum = oss.str(); - fragmshname = "fragview_part"+partnum+".msh"; + fragmshname = getFileSavingPrefix()+ "fragview_part"+partnum+".msh"; } else #endif //HAVE_MPI { - fragmshname = "fragview.msh"; + fragmshname = getFileSavingPrefix()+ "fragview.msh"; } FILE *fpfragmsh = fopen(fragmshname.c_str(),"w"); FILE *fpmsh = fopen(_meshFileName.c_str(),"r"); @@ -8952,7 +10027,8 @@ void nonLinearMechSolver::postproFragment() fprintf(fpfragmsh,"$EndElements"); fclose(fpmsh); fclose(fpfragmsh); - Msg::Barrier(); // wait all otherwise archiving problem ?? + if (getNumRanks() > 1) + Msg::Barrier(); // wait all otherwise archiving problem ?? } } @@ -9041,28 +10117,23 @@ void nonLinearMechSolver::getLocalBasis(const MElement* ele, const int gpt, SVec -void nonLinearMechSolver::createStrainMapping(const std::string filename){ +void nonLinearMechSolver::createStrainMapping(const std::string filename, const int nbstepArch){ if (_strainMap) delete _strainMap; - _strainMap = new strainMapping(domainVector); + _strainMap = new strainMapping(*this,nbstepArch); _strainMap->readMesh(filename); - GModel::setCurrent(pModel); }; -void nonLinearMechSolver::setStrainMappingFollowing(const bool flag){ - _strainMappingFollwing = flag; -}; - void nonLinearMechSolver::blockDissipation(const IPStateBase::whichState ws, const bool fl){ if (_ipf){ if (fl and !_damageIsBlocked){ - printf("rank %d damage is blocked ele = %d, gp = %d \n",Msg::GetCommRank(),_enum,_gnum); + printf("rank %d damage is blocked %s \n",Msg::GetCommRank(),getFileSavingPrefix().c_str()); } else if (fl and _damageIsBlocked){ - printf("rank %d damage is reblocked ele = %d, gp = %d \n",Msg::GetCommRank(),_enum,_gnum); + printf("rank %d damage is reblocked %s \n",Msg::GetCommRank(),getFileSavingPrefix().c_str()); } else if (!fl and _damageIsBlocked){ - printf("rank %d damage is unblocked ele = %d, gp = %d \n",Msg::GetCommRank(),_enum,_gnum); + printf("rank %d damage is unblocked %s \n",Msg::GetCommRank(),getFileSavingPrefix().c_str()); } _damageIsBlocked = fl; @@ -9225,15 +10296,6 @@ void nonLinearMechSolver::addMicroBC(const nonLinearMicroBC* bc){ if (_microBCOld != NULL){ _microBC->collecDataFromPrevious(*_microBCOld); } - - // set highorder flag - if (_microBC->getOrder() >1){ - _highOrderFlag = true; - } - else{ - _highOrderFlag = false; - } - // add BC suppport std::vector<groupOfElements*>& bgroup = _microBC->getBoundaryGroupOfElements(); const std::vector<int>& bphysical = _microBC->getBoundaryPhysicals(); @@ -10970,12 +12032,12 @@ void nonLinearMechSolver::checkFailureOnset(){ _solverIsBroken = true; _FdamOnset = homoData->getHomogenizedActiveDissipationDeformationGradient(); if (_checkWithNormal){ - printf("solver is broken at ele %d gpt %d at rank %d real tolearance = %e, following prescribed normal direction [%e %e %e] \n", - _enum,_gnum,Msg::GetCommRank(),cr,_lostSolutionUniquenssNormal[0],_lostSolutionUniquenssNormal[1],_lostSolutionUniquenssNormal[2]); + printf("solver is broken %s at rank %d real tolearance = %e, following prescribed normal direction [%e %e %e] \n", + getFileSavingPrefix().c_str(),Msg::GetCommRank(),cr,_lostSolutionUniquenssNormal[0],_lostSolutionUniquenssNormal[1],_lostSolutionUniquenssNormal[2]); } else{ - printf("solver is broken at ele %d gpt %d at rank %d real tolearance = %e, with minimal normal direction [%e %e %e] \n", - _enum,_gnum,Msg::GetCommRank(),cr, _lostSolutionUniquenssNormal[0],_lostSolutionUniquenssNormal[1],_lostSolutionUniquenssNormal[2]); + printf("solver is broken %s at rank %d real tolearance = %e, with minimal normal direction [%e %e %e] \n", + getFileSavingPrefix().c_str(),Msg::GetCommRank(),cr, _lostSolutionUniquenssNormal[0],_lostSolutionUniquenssNormal[1],_lostSolutionUniquenssNormal[2]); } } else { @@ -11063,7 +12125,7 @@ void nonLinearMechSolver::computeHomogenizedCrackFace(){ Msg::Info("_homogenizedCrackSurface = %f ",_homogenizedCrackSurface); } else{ - Msg::Error("computeHomogenizedCrackLength is wrong ele %d, gp %d _lostSolutionUniquenssNormal = [%f %f %f]",_enum,_gnum, + Msg::Error("computeHomogenizedCrackLength is wrong %s _lostSolutionUniquenssNormal = [%f %f %f]",getFileSavingPrefix().c_str(), _lostSolutionUniquenssNormal[0],_lostSolutionUniquenssNormal[1],_lostSolutionUniquenssNormal[2]); } @@ -11071,15 +12133,15 @@ void nonLinearMechSolver::computeHomogenizedCrackFace(){ _homogenizedCrackSurface *= (Lz.norm()); // generally, _LzNorm = 1 #ifdef _DEBUG - printf("on ele %d gp %d _homogenizedCrackSurface = %e \n",_enum,_gnum,_homogenizedCrackSurface); + printf("%s _homogenizedCrackSurface = %e \n",getFileSavingPrefix().c_str(),_homogenizedCrackSurface); #endif //_DEBUG } else if (getDim() == 3){ - Msg::Error("nonLinearMechSolver::computeHomogenizedCrackFace for 3D has not been implemented"); + Msg::Info("nonLinearMechSolver::computeHomogenizedCrackFace for 3D has not been implemented"); } else{ - Msg::Error("computeHomogenizedCrackLength has not been implemented for %d D problems"); + Msg::Info("computeHomogenizedCrackLength has not been implemented for %d D problems"); } }; @@ -11101,38 +12163,76 @@ void nonLinearMechSolver::extractAverageProperties(bool stiff){ }; -void nonLinearMechSolver::createEigenvalueSolver(){ - if (_eigflag){ - if (_eigenSolver) delete _eigenSolver; - std::string strA = "A"; - linearSystem<double>* lsysA = pAssembler->getLinearSystem(strA); - linearSystemPETSc<double>* lpetA = dynamic_cast<linearSystemPETSc<double>*>(lsysA); +eigenSolver* nonLinearMechSolver::eigenSolve(const int numstep) +{ + #if defined(HAVE_SLEPC) + // get system + // stiffness + std::string strA = "A"; + linearSystem<double>* lsysA = pAssembler->getLinearSystem(strA); + linearSystemPETSc<double>* lpetA = dynamic_cast<linearSystemPETSc<double>*>(lsysA); + + // mass + linearSystemPETSc<double>* lpetB = NULL; + if (_eigOpts.type == eigenSolverOptions::Dynamic) + { + std::string strB = "B"; + linearSystem<double>* lsysB = pAssembler->getLinearSystem(strB); + lpetB = dynamic_cast<linearSystemPETSc<double>*>(lsysB); + } + if (lpetA==NULL) + { + Msg::Error("stiffness matrix is null"); + return NULL; + } + eigenSolver* eigsol = new eigenSolver(lpetA,lpetB, _eigOpts.hermitian); + bool ok = eigsol->solve(_eigOpts.numeigenvalue,"smallestReal", _eigOpts.method,_eigOpts.convergenCriterion,_eigOpts.maxNumIteration); + // save eigenvalue to file + // first column is real part and second column is the imag part + std::string eigValueFileName = getFileSavingPrefix()+"eigenValues_step"+int2str(numstep)+".csv"; + FILE* eigValueFile = fopen(eigValueFileName.c_str(),"w"); + for (int i=0; i<_eigOpts.numeigenvalue; i++) + { + std::complex<double> val = eigsol->getEigenValue(i); + fprintf(eigValueFile,"%d\t%.16g \t %.16g \n",i,val.real(), val.imag()); + } + fclose(eigValueFile); - std::string strB = "B"; - linearSystem<double>* lsysB = pAssembler->getLinearSystem(strB); - linearSystemPETSc<double>* lpetB = dynamic_cast<linearSystemPETSc<double>*>(lsysB); + // normalized mode with infinite norm + std::vector<int> modeView(_eigview.size()); + for (int i=0; i< _eigview.size(); i++) + { + modeView[i] = _eigview[i].comp; + } + eigsol->normalize_mode(modeView,1.); + return eigsol; + #else + Msg::Error("SLEPs must be used"); + #endif //HAVE_SLEPC +}; - if (lpetA != NULL ){ - _eigenSolver = new eigenSolver(lpetA,lpetB,_hermitian); - // for eigen mode view - if (_eigfield.size() > 0){ - for (int i= 0; i< _eigfield.size(); i++){ - delete _eigfield[i]; - } - _eigfield.clear(); - } - for (int i=0; i<_modeview.size(); i++){ - std::string modefilename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_mode"; - unknownField* field = new eigenVectorField(this,3,anoded,_eigview[i],_eigenSolver,_modeview[i],modefilename); - _eigfield.push_back(field); - }; - std::string eigfilename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_eigenValue.csv"; - _eigenValueFile = fopen(eigfilename.c_str(),"w"); - } - else{ - Msg::Error("eigensolver requires PETSc"); - } - }; +void nonLinearMechSolver::nextStep(const double curtime, const int step) +{ + /* field next step */ + if (_selectiveObject != NULL){ + _selectiveObject->nextStep(); + } + if (_endSchemeMonitoringObject!=NULL) + { + _endSchemeMonitoringObject->nextStep(); + } + _ipf->nextStep(curtime); //ipvariable + staticDofManager<double> *sAssembler = static_cast<staticDofManager<double>*>(pAssembler); + sAssembler->nextStep(); + // contact + for(contactContainer::iterator it = _allContact.begin(); it!=_allContact.end(); ++it){ + contactDomain *cdom = *it; + cdom->nextStep(); + } + for(defoDefoContactContainer::iterator it = _allDefoDefoContact.begin(); it!=_allDefoDefoContact.end(); ++it){ + defoDefoContactDomain *cdom = *it; + cdom->nextStep(); + } }; void nonLinearMechSolver::computeSplittedStiffnessMatrix(){ @@ -11230,26 +12330,7 @@ void nonLinearMechSolver::resetSolverToInitialStep(){ }; -void nonLinearMechSolver::closeAllFile(){ - if (_outputFile != NULL) fclose(_outputFile); - - if (_eigenValueFile != NULL) fclose(_eigenValueFile); - - if (_homogenizedFiles!=NULL){ - _homogenizedFiles->closeFiles(); - delete _homogenizedFiles; - _homogenizedFiles= NULL; - } - - if (_elasticDPDFTangentFile) {fclose(_elasticDPDFTangentFile); _elasticDPDFTangentFile = NULL;}; - if (_initialState) {delete _initialState;} - if (_currentState) {delete _currentState;} - if (_elasticState) {delete _elasticState;}; - - if (_criterionFile != NULL) fclose(_criterionFile); -}; - -void nonLinearMechSolver::nextStep(){ +void nonLinearMechSolver::prepareForNextMicroSolve(){ // in microBC bool BCIsChanged = false; if (_failureBCIsSwitched){ @@ -11272,9 +12353,6 @@ void nonLinearMechSolver::nextStep(){ _microBC->nextStep(); } - // archive data - this->archiveData(_macroTime,_macroStep); - // next step for solver std::string name = "A"; linearSystem<double>* lsys = pAssembler->getLinearSystem(name); @@ -11314,44 +12392,6 @@ void nonLinearMechSolver::nextStep(){ (*_initialState)=(*_currentState); }; -double nonLinearMechSolver::critialPointTestFunction(double time, double* &mode){ - if (_eigflag){ - if (_eigenSolver == NULL) createEigenvalueSolver(); - _eigenSolver->clear(); - int nsize = pAssembler->sizeOfR(); - if (_numeigenvalue >= nsize) { - _numeigenvalue = nsize; - if (_outputFile) - fprintf(_outputFile,"Modify number of eigenvalues computed: %d \n",nsize); - } - // solver eigen solver - //_eigenSolver->solve(_numeigenvalue,"smallestReal"); - _eigenSolver->solve(_numeigenvalue,"smallestReal",_eigenSolverMethod,_eigenSolverConvergenCriterion,_eigenSolverNumIteration); - - std::complex<double> ls = _eigenSolver->getEigenValue(0); - std::complex<double> lm = _eigenSolver->getEigenValue(_numeigenvalue-1); - - fprintf(_eigenValueFile,"%.16g\t",time); - for (int i=0; i<_numeigenvalue; i++){ - std::complex<double> val = _eigenSolver->getEigenValue(i); - fprintf(_eigenValueFile,"%.16g \t %.16g \t",val.real(), val.imag()); - } - fprintf(_eigenValueFile,"\n"); - fflush(_eigenValueFile); - - mode = new double[nsize]; - for (int i=0; i<nsize; i++){ - std::complex<double> s = _eigenSolver->getEigenVectorComp(0,i); - mode[i] = s.real(); - } - - return ls.real(); - } - else - { - return 1.e10; - } -}; linearSystem<double>* nonLinearMechSolver::createMicroSNLSystem(){ linearSystem<double>* lsys = NULL; @@ -11388,7 +12428,6 @@ linearSystem<double>* nonLinearMechSolver::createMicroSNLSystem(){ if(nonLinearMechSolver::whatSolver == Petsc){ #if defined(HAVE_PETSC) lsys = new pbcNonLinearSystemPETSc<double>(PETSC_COMM_SELF); - (dynamic_cast<pbcNonLinearSystemPETSc<double>*>(lsys))->invertFlag(_useMatMatSolveToInvertMatrix); if(_solver_options.size()) lsys->setParameter(std::string("petsc_solver_options"),_solver_options); if (_outputFile) @@ -11403,7 +12442,6 @@ linearSystem<double>* nonLinearMechSolver::createMicroSNLSystem(){ if(nonLinearMechSolver::whatSolver == Petsc){ #if defined(HAVE_PETSC) lsys = new pbcConstraintEliminationNonLinearSystemPETSc<double>(PETSC_COMM_SELF); - (dynamic_cast<pbcConstraintEliminationNonLinearSystemPETSc<double>*>(lsys))->invertFlag(_useMatMatSolveToInvertMatrix); if(_solver_options.size()) lsys->setParameter(std::string("petsc_solver_options"),_solver_options); if (_outputFile) @@ -11520,13 +12558,11 @@ void nonLinearMechSolver::init2Micro(){ } if (_ufield) delete _ufield; - std::string dispfile ="E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_disp"; - _ufield = new unknownField(this,3,anoded,unknownView,dispfile); // 3 components by nodes User choice ?? + _ufield = new unknownField(this,3,anoded,unknownView); // 3 components by nodes User choice ?? if (!_previousInit){ if (_ipf) delete _ipf; - std::string ipfile = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_stress"; - _ipf = new IPField(this,vaip,ipView,ipfile); // Field for GaussPoint + _ipf = new IPField(this,vaip,ipView); // Field for GaussPoint _ipf->compute1state(IPStateBase::current,true); _ipf->copy(IPStateBase::current,IPStateBase::previous); @@ -11554,14 +12590,6 @@ void nonLinearMechSolver::init2Micro(){ _fractureEnergyComputation = 0; _energField = new energeticField(this,energyView,_energyComputation,_fractureEnergyComputation,getScheme()); - if (_eigflag){ - if (_outputFile) - fprintf(_outputFile,"Create EigenSolver \n"); - createEigenvalueSolver(); - if (_outputFile) - fprintf(_outputFile,"EigenSolver created \n"); - }; - // init terms this->initTerms(); @@ -11569,11 +12597,6 @@ void nonLinearMechSolver::init2Micro(){ this->computeStiffMatrix(); } - if (_stabilityCriterionFollowing == true){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_stabilityCriterion.csv"; - if (_criterionFile != NULL) fclose(_criterionFile); - _criterionFile = fopen(filename.c_str(),"w"); - } // rve_volume from periodicity if (!_previousInit){ if (_rveVolume <=0.){ @@ -11583,7 +12606,7 @@ void nonLinearMechSolver::init2Micro(){ // compute density this->computeDensity(); if (_isHommProSaveToFile){ - std::string denfile = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_density.csv"; + std::string denfile = getFileSavingPrefix()+"density.csv"; FILE* fileden = fopen(denfile.c_str(),"w"); fprintf(fileden,"%e",this->_rho); fclose(fileden); @@ -11595,7 +12618,7 @@ void nonLinearMechSolver::init2Micro(){ if (_extractElasticTangentOperator){ _elasticState = new homogenizedData(this,_damageToCohesiveJump,_extractIrreversibleEnergy); - std::string elasticFileName = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_elasticTangent.csv"; + std::string elasticFileName = getFileSavingPrefix()+"elasticTangent.csv"; _elasticDPDFTangentFile = Tensor43::createFile(elasticFileName); } @@ -11628,7 +12651,7 @@ void nonLinearMechSolver::init2Micro(){ _homogenizedFiles = new homogenizedDataFiles(this); bool saveCohesiveLawFile = (_isHommProSaveToFile and _damageToCohesiveJump); - _homogenizedFiles->openFiles(_enum,_gnum,this,_isHommStrainSaveToFile,_isHommProSaveToFile,saveCohesiveLawFile); + _homogenizedFiles->openFiles(this,_isHommStrainSaveToFile,_isHommProSaveToFile,saveCohesiveLawFile); this->homogenizedDataToFile(0.); } @@ -11656,7 +12679,7 @@ void nonLinearMechSolver::init2Micro(){ } bool saveCohesiveLawFile = (_isHommProSaveToFile and _damageToCohesiveJump); - _homogenizedFiles->openFiles(_enum,_gnum,this,_isHommStrainSaveToFile,_isHommProSaveToFile,saveCohesiveLawFile); + _homogenizedFiles->openFiles(this,_isHommStrainSaveToFile,_isHommProSaveToFile,saveCohesiveLawFile); this->homogenizedDataToFile(0.); } @@ -11666,12 +12689,12 @@ void nonLinearMechSolver::init2Micro(){ void nonLinearMechSolver::initMicroSolver(){ if (_messageView){ - std::string filename = "E_"+int2str(_enum)+"_GP_"+int2str(_gnum)+"_out.txt"; + std::string filename = getFileSavingPrefix()+"out.txt"; if (_outputFile != NULL) fclose(_outputFile); _outputFile = fopen(filename.c_str(),"w"); - fprintf(_outputFile,"Initializing on processor %d of %d \nMicro-problem: element %d, gauss point %d \nMicro SNL Data : nstep =%d endtime = %f\n", - Msg::GetCommRank(),Msg::GetCommSize(),this->getElementSolverNumber(),this->getGaussPointSolverNumber(), + fprintf(_outputFile,"Initializing on processor %d of %d \nMicro-problem: %s \nMicro SNL Data : nstep =%d endtime = %f\n", + Msg::GetCommRank(),Msg::GetCommSize(),getFileSavingPrefix().c_str(), _numstepImpl,endtime); } // read mesh file @@ -11726,7 +12749,7 @@ void nonLinearMechSolver::OneStep(const int numstep){ } if(niteNR == _maxNRite) // time step reduction { - Msg::Error("convergent fails in tangent perturbation ele %d GP %d",_enum,_gnum); + Msg::Error("convergent fails in tangent perturbation %s",getFileSavingPrefix().c_str()); } } @@ -11745,7 +12768,7 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ double dendtime = double(endtime); double dtmax = dendtime/double(_numstepImpl); // time step value prescribed by user (time step can not be greater than this value) double dt = dtmax; // initial time step value - int ii =0.; // iteration counter + double tolend = 0.000001*dendtime; // OTHERWISE LAST STEP CAN BE DONE TWICE ?? double toldtmax = 0.000001*dtmax; // IDEM (PRECISION PROBLEM) int numberTimeStepReduction=0; @@ -11754,9 +12777,9 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ if (_pathFollowing){ _pAl->computeLoadVector(); } + _currentStep = 0; bool willFinish = false; - while(fabs(curtime-dendtime) > tolend ){ curtime+=dt; if(curtime > dendtime) @@ -11767,21 +12790,17 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ if (_outputFile) fprintf(_outputFile,"MICRO t= %e on %e \n",curtime,dendtime); - // switch next step - if (isSuccess){ - if (sAssembler) - sAssembler->nextStep(); - _ipf->nextStep(); - } - if (sAssembler) + { sAssembler->setTimeStep(dt); + } // Solve one step by NR scheme int niteNR = 0; - if (_pathFollowing){ - pathSys->setPseudoTimeIncrement(dt); + if (_pathFollowing) + { + pathSys->setPathFollowingIncrement(dt); _pAl->updateConstraint(_ipf); - niteNR = microNewtonRaphsonPathFollowing(ii+1); + niteNR = microNewtonRaphsonPathFollowing(_currentStep+1); double control = pathSys->getControlParameter(); if (_outputFile) @@ -11798,21 +12817,21 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ curtime = lasttime; dt = 1-pathSys->getControlParameter(); dtmax = dt; - isSuccess = false; continue; } else if (fabs(control-1) <=tolend) { willFinish = true; } else if (control<0){ - Msg::Error("path following is not converge e= %d, gp = %d!",_enum,_gnum); + Msg::Error("path following is not converge %s !",getFileSavingPrefix().c_str()); } } - else{ - this->oneStepPreSolve(curtime,dt,ii+1); + else + { + this->oneStepPreSolve(curtime,dt,_currentStep+1); _pAl->updateConstraint(_ipf); if (_systemType == MULT_ELIM) - niteNR = microNewtonRaphson(ii+1); + niteNR = microNewtonRaphson(_currentStep+1); else { if (_systemType == DISP_ELIM){ _pAl->applyPBCByConstraintElimination(); @@ -11821,28 +12840,25 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ _pAl->updateSystemUnknown(); } - niteNR = NewtonRaphson(ii+1); + niteNR = NewtonRaphson(_currentStep+1); } } if(niteNR == _maxNRite) // time step reduction { - isSuccess = false; numberTimeStepReduction ++; if(numberTimeStepReduction > _maxAttemptStepReduction) // end of simulation { if (_outputFile) - fprintf(_outputFile,"Simulation end due to convergence problem element %d, IP %d !!!\n", - getElementSolverNumber(),getGaussPointSolverNumber()); - Msg::Error("Simulation end due to convergence problem element %d, IP %d !!!", - getElementSolverNumber(),getGaussPointSolverNumber()); + fprintf(_outputFile,"Simulation end due to convergence problem %s !!!\n", getFileSavingPrefix().c_str()); + Msg::Error("Simulation end due to convergence problem %s!!!", getFileSavingPrefix().c_str()); break; } if (_outputFile) - fprintf(_outputFile,"Convergence of Newton-Raphson failed at element %d, IP %d --> reduced time step", - getElementSolverNumber(),getGaussPointSolverNumber()); - Msg::Warning("Convergence of Newton-Raphson failed at element %d, IP %d --> reduced time step", - getElementSolverNumber(),getGaussPointSolverNumber()); + fprintf(_outputFile,"Convergence of Newton-Raphson failed %s --> reduced time step", + getFileSavingPrefix().c_str()); + Msg::Warning("Convergence of Newton-Raphson failed %s --> reduced time step", + getFileSavingPrefix().c_str()); curtime = lasttime; dt /= _timeStepFactorReduction; @@ -11851,45 +12867,52 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ } else { - isSuccess = true; // save solution of previous as sucessfull convergence of NR process - if(fabs(dtmax-dt) > toldtmax ) // increase time step if convergence in a few iteration + if (_timeStepAdaptation) { - if(niteNR <= _niteTimeStepIncrease) + // time step update with optimal number of iterations + double fact = pow((double)_numNROptimal/(double)niteNR,_expNROptimal); + dt *= fact; + // if time step is bounded + if (dt > _maximalTimeStep or niteNR==0) { - if (_outputFile) - fprintf(_outputFile,"Time step is increased due to convergence of Newton-Raphson in less than %d at element %d, IP %d ",_niteTimeStepIncrease, - getElementSolverNumber(),getGaussPointSolverNumber()); - Msg::Warning("Time step is increased due to convergence of Newton-Raphson in less than %d at element %d, IP %d ",_niteTimeStepIncrease, - getElementSolverNumber(),getGaussPointSolverNumber()); - numberTimeStepReduction --; - dt *= _timeStepFactorReduction; + dt = _maximalTimeStep; } - } - // next step - - if (_eigenFollowing){ - double* mode = NULL; - double pre = this->critialPointTestFunction(curtime,mode); - printf("Buckling criterion = %e\n",pre); - if (_outputFile) - fprintf(_outputFile,"Critial Point test function = %f \n",pre); - this->modeViewToFile(_modeview,pre,ii+1); - if ((pre < _instabilitycriterion) and _perturbate){ - this->perturbationProcedure(pre,mode); + if (dt < _minimalTimeStep) + { + dt = _minimalTimeStep; } - if (mode) delete mode; } - + else if ((niteNR <= _niteTimeStepIncrease) && fabs(dtmax-dt) > toldtmax)// increase time step if convergence in a few iteration + { + if (_outputFile) + fprintf(_outputFile,"Time step is increased due to convergence of Newton-Raphson in less than %d %s ",_niteTimeStepIncrease, + getFileSavingPrefix().c_str()); + Msg::Warning("Time step is increased due to convergence of Newton-Raphson in less than %d %s",_niteTimeStepIncrease, + getFileSavingPrefix().c_str()); + numberTimeStepReduction --; + dt *= _timeStepFactorReduction; + } + if (dtmax > dt) + { + dtmax = dt; + } lasttime = curtime; + _currentStep ++; + if (!_multiscaleFlag){ if (_outputFile) fflush(_outputFile); - this->microPostSolveStep(curtime,ii+1); + // + this->oneStepPostSolve(curtime,_currentStep); + } + else + { + this->nextStep(curtime,_currentStep); } } - ii ++; // increase counter of iteration even if no convergence --> more archivage if no convergence (can be usefull) - if(_pathFollowing){ + if(_pathFollowing) + { if (fabs(curtime-dendtime) < tolend){ double control = pathSys->getControlParameter(); if (control<1.){ @@ -11903,97 +12926,35 @@ double nonLinearMechSolver::solveMicroSolverSNL(){ } } } - _iterMax = ii; return curtime; }; -void nonLinearMechSolver::microPostSolveStep(const double curtime, const int numstep){ - Msg::Info("Extract macro properties"); - // echeck erosion - this->checkElementErosion(IPStateBase::current); - if (_bulkElementErosionFlag or _interfaceElementErosionFlag) +void nonLinearMechSolver::archiveData(const double curtime, const int numstep, const bool forceView){ + // Archiving + if (_archive) { - _elementErosionFilter.print(); - } - - // copy current to initial state - (*_initialState) = (*_currentState); - - this->extractAverageProperties(_tangentflag); - - this->IPVolumeIntegralArchiving(curtime,numstep,false); - this->IPDataOnPhysicalArchiving(curtime,numstep,false); - - - if (getDamageToCohesiveJumpFlag() and !_multiscaleFlag){ - this->checkFailureOnset(); - } - - this->pathFollowingArchiving(curtime,numstep); - - if (_microBC->getTotalNumberOfMechanicalDofs() > 0){ - if (_stressflag){ - _currentState->getHomogenizedStress().print("Stress "); - if (_microBC->getOrder() == 2) - _currentState->getHomogenizedSecondOrderStress().print("hostress "); - } - } - - for (int index=0; index < _microBC->getTotalNumberOfConDofs(); index++){ - _currentState->getHomogenizedConstitutiveExtraDofFlux(index).print("con extra dof flux"); - printf("double con extra dof %d internal energy %f\n",index,_currentState->getHomogenizedConstitutiveExtraDofInternalEnergy(index)); - } - - if (_tangentflag){ - _currentState->getHomogenizedTangentOperator_F_F().print("tangent"); - } - - if (_extractPerturbationToFile){ - _pAl->getPBCConstraintGroup()->writePertBoundaryToFile(pAssembler,_enum,_gnum,numstep); - } - - if (_isWriteDeformedMeshToFile){ - this->writeDeformedMesh(numstep); - } - this->archiveData(curtime,numstep); - - if (withEnergyDissipation()){ - _ipf->checkActiveDissipation(); - if (_ipf->getNumOfActiveDissipationIPsCurrent() > 0){ - // store historical value - _homogenizedStressLastActiveDissipation = this->getHomogenizationState(IPStateBase::current)->getHomogenizedStress(); - _homogenizedStrainLastActiveDissipation = this->getMicroBC()->getFirstOrderKinematicalVariable(); - _homogenizedDissipationStrainLastActiveDissipation = this->getHomogenizationState(IPStateBase::current)->getHomogenizedActiveDissipationDeformationGradient(); - _homogenizedCohesiveJumpLastActiveDissipation = this->getHomogenizationState(IPStateBase::current)->getHomogenizedCohesiveJump(); - - } - } - -}; - + //printf("arching solver ele %d gpt %d\n",getElementSolverNumber(),getGaussPointSolverNumber()); + /*writing deformed mesh */ + if (_isWriteDeformedMeshToFile){ + this->writeDeformedMesh(numstep); + } + /* Archiving */ + _ufield->archive(curtime,numstep,forceView); + _ipf->archive(curtime,numstep,forceView); + _energField->archive(curtime,numstep,forceView); -void nonLinearMechSolver::archiveData(const double curtime, const int numstep){ - // Archiving - if (_outputFile) - fprintf(_outputFile,"Archiving on element %d, IP point %d \n",getElementSolverNumber(),getGaussPointSolverNumber()); + this->crackTracking(curtime); + this->forceArchiving(curtime,numstep,forceView); // Edge force value; + this->pathFollowingArchiving(curtime,numstep); - if (_criterionFile != NULL){ - std::string name = "A"; - linearSystem<double>* lsys = pAssembler->getLinearSystem(name); - nonLinearSystem<double>* nonsys = dynamic_cast<nonLinearSystem<double>*>(lsys); - double val = nonsys->getInstabilityCriterion(); - fprintf(_criterionFile,"%e; %e; \n",curtime,val); - } + this->IPVolumeIntegralArchiving(curtime,numstep,forceView); + this->IPDataOnPhysicalArchiving(curtime,numstep,forceView); - if (_archive){ - _energField->archive(curtime,numstep,true); - _ufield->archive(curtime,numstep,true); - _ipf->archive(curtime,numstep,true); + if (_strainMap !=NULL){ + _strainMap->buildDisplacementViewAndStrainView(numstep,forceView); + } } - this->homogenizedDataToFile(curtime); - - this->forceArchiving(curtime,numstep,true); }; @@ -12023,7 +12984,7 @@ double nonLinearMechSolver::solveMicroSolverStaticLinear(){ _ipf->compute1state(IPStateBase::current,true); /* end of scheme */ - _iterMax = step; + _currentStep = step; return curtime; }; @@ -12037,12 +12998,14 @@ double nonLinearMechSolver::solveMicroSolverForwardEuler(){ linearSystem<double>* lsys = pAssembler->getLinearSystem(Aname); double time = 0; + _currentStep = 0; for (int i=0; i<_numstepImpl; i++){ + _currentStep = i+1; _ipf->nextStep(); double arclength = dt; time += dt; if (_outputFile) - fprintf(_outputFile," iter = %d, t = %f\n",i+1,time); + fprintf(_outputFile," iter = %d, t = %f\n",_currentStep,time); this->computeStiffMatrix(); _pAl->assembleConstraintMatrix(); @@ -12054,7 +13017,15 @@ double nonLinearMechSolver::solveMicroSolverForwardEuler(){ this->setTimeForBC(control); // update ipvariable _ipf->compute1state(IPStateBase::current,true); - this->microPostSolveStep(time,i+1); + + if (_multiscaleFlag) + { + this->oneStepPostSolve(time,_currentStep); + } + else + { + this->nextStep(time,_currentStep); + } lsys->zeroMatrix(); }; }; @@ -12086,8 +13057,7 @@ double nonLinearMechSolver::microSolveStaticLinear(){ _currentState->getHomogenizedConstitutiveExtraDofFlux(index).print("con extra dof flux"); printf("double con extra dof %d internal energy %f\n",index,_currentState->getHomogenizedConstitutiveExtraDofInternalEnergy(index)); } - - this->endOfScheme(time,_iterMax); + this->endOfScheme(time,_currentStep); } else if (_controlType == ARC_CONTROL_EULER) Msg::Error("This is not exist"); @@ -12106,7 +13076,7 @@ double nonLinearMechSolver::microSolveSNL(){ else if (_controlType == ARC_CONTROL_EULER) time = solveMicroSolverForwardEuler(); - this->endOfScheme(time,_iterMax); + this->endOfScheme(time,_currentStep); t = Cpu() -t; Msg::Info("StaticNonLinear OK, total time = %e seconds",t); @@ -12282,36 +13252,11 @@ int nonLinearMechSolver::microNewtonRaphsonPathFollowing(const int numstep){ }; -void nonLinearMechSolver::setPerturbationFactor(const double fact){ - _perturbationfactor = fact; -}; - -void nonLinearMechSolver::setInstabilityCriterion(const double val){ - _instabilitycriterion = val; -} -void nonLinearMechSolver::perturbateBucklingModeByMinimalEigenValueMode(const bool flag){ - _perturbate = flag; -}; - -void nonLinearMechSolver::setModeView(const int view){ - _modeview.push_back(view); +void nonLinearMechSolver::setModeView(const int view, const int nbstepArch){ std::string str = "ModeShape" + int2str(view); - std::vector<nlsField::dataBuildView> tempview; - tempview.push_back(nlsField::dataBuildView(str,-1,nlsField::crude,1)); - _eigview.push_back(tempview); + _eigview.emplace_back(nlsField::dataBuildView(str,view,nlsField::crude,nbstepArch)); }; -void nonLinearMechSolver::modeViewToFile(std::vector<int>& num, double time, int step){ - if (_eigflag){ - for (int i=0; i<num.size(); i++){ - printf("printting mode %d to file \n", num[i]); - _eigfield[i]->archive(time,step,true); - }; - } - else{ - Msg::Info("Eigen solver is not activated"); - }; -}; void nonLinearMechSolver::tangentAveragingFlag(const bool fl){ _tangentflag = fl; @@ -12337,46 +13282,40 @@ void nonLinearMechSolver::setTangentAveragingMethod(const int method, const doub _tangentPerturbation = prec; }; -void nonLinearMechSolver::eigenValueSolver(const int num , const bool fl){ - _numeigenvalue = num; - _eigflag = fl; - #ifdef _DEBUG - if (_eigflag) Msg::Info("Eigen solver is activated"); - else Msg::Info("Eigen solver is desactivated"); - #endif +void nonLinearMechSolver::eigenValueSolver(const int num){ + _eigOpts.numeigenvalue = num; }; void nonLinearMechSolver::setEigenSolverParamerters(const int type, const int numiter, const std::string method, const double tol, const bool mktofile, const bool hem){ - if (_eigflag){ - if (type == 0){ - _eigenSolverType = STATIC; - Msg::Info("static eigen solver is used"); - } - else if (type ==1){ - _eigenSolverType = DYNAMIC; - Msg::Info("dynamic eigen solver is used"); - } - else - Msg::Error("eigensolver type %d is not correctly defined",type); - - _eigenSolverNumIteration= numiter; - _eigenSolverMethod = method; - _eigenSolverConvergenCriterion = tol; - _MKToFile = mktofile; - _hermitian = hem; + if (type == 0){ + _eigOpts.type = eigenSolverOptions::Static; + Msg::Info("static eigen solver is used"); } + else if (type ==1){ + _eigOpts.type = eigenSolverOptions::Dynamic; + Msg::Info("dynamic eigen solver is used"); + } + else + Msg::Error("eigensolver type %d is not correctly defined",type); + + _eigOpts.maxNumIteration = numiter; + _eigOpts.method = method; + _eigOpts.convergenCriterion = tol; + _eigOpts.MKToFile = mktofile; + _eigOpts.hermitian = hem; }; void nonLinearMechSolver::setMicroProblemIndentification(int ele, int gpt){ - _enum = ele; + _enumMinus = ele; + _enumPlus = ele; _gnum = gpt; }; -int nonLinearMechSolver::getElementSolverNumber() const{ - return _enum; -}; -int nonLinearMechSolver::getGaussPointSolverNumber() const{ - return _gnum; + +void nonLinearMechSolver::setMicroProblemIndentification(int eleMinus, int elePlus, int gpt){ + _enumMinus = eleMinus; + _enumPlus = elePlus; + _gnum = gpt; }; void nonLinearMechSolver::setHomogenizationPropertyArchiveFlag(const bool flg){ @@ -12404,14 +13343,6 @@ void nonLinearMechSolver::setMicroSolverFlag(const bool flag){ _microFlag = flag; }; -void nonLinearMechSolver::setEigenSolverFollowing(const bool f){ - _eigenFollowing = f; -} - -void nonLinearMechSolver::setStabilityCriterionFollowing(const bool flag){ - _stabilityCriterionFollowing = flag; -} - void nonLinearMechSolver::setMultiscaleFlag( const bool flag){ _multiscaleFlag = true; }; @@ -12421,17 +13352,6 @@ void nonLinearMechSolver::setSameStateCriterion(const double cr){ _sameStateCriterion = cr; }; -void nonLinearMechSolver::readPBCDataFromFile(const std::string fn){ - if (_pbcNodeData != NULL) fclose(_pbcNodeData); - _pbcNodeData = NULL; - - _pbcNodeData = fopen(fn.c_str(),"r"); - if (_pbcNodeData == NULL){ - Msg::Error("Unable to open file %s",fn.c_str()); - } -}; - - void nonLinearMechSolver::saveStiffnessMatrixToFile(const int iter){ linearSystem<double>* lsys=NULL; std::string name="A"; @@ -12450,29 +13370,26 @@ void nonLinearMechSolver::saveStiffnessMatrixToFile(const int iter){ #endif }; -void nonLinearMechSolver::invertFlag(const bool fl){ - _useMatMatSolveToInvertMatrix = fl; -} void nonLinearMechSolver::setDisturbedEigenMode(int num, double val, bool flag){ - _isPerturbedEigenMode = flag; - _numberPerturbedMode = num; - _valPerturbedMode = val; + _eigOpts.isPerturbedEigenMode = flag; + _eigOpts.numberPerturbedMode = num; + _eigOpts.valPerturbedMode = val; if (flag) Msg::Info("Set disturbing by eigenmodes: num = %d, val = %f ",num,val); }; -void nonLinearMechSolver::writeDisturbedMeshByEigenVector(int step){ +void nonLinearMechSolver::writeDisturbedMeshByEigenVector(eigenSolver& eigS, int numberMode, double fact){ Msg::Info("Begin writing deformed mesh"); GModel* dispgmodel = new GModel(); dispgmodel->readMSH(_meshFileName.c_str()); std::set<MVertex*> computedVertex; - int numMode = _eigenSolver->getNumberEigenvectors(); - if (_numberPerturbedMode >numMode) - _numberPerturbedMode = numMode; + int numMode = eigS.getNumberEigenvectors(); + if (numberMode >numMode) + numberMode = numMode; - eigenVectorData* eigData = new eigenVectorData(_eigenSolver,pAssembler,_numberPerturbedMode,_valPerturbedMode); + eigenVectorData eigData(&eigS,pAssembler,numberMode,fact); for (int i=0; i<domainVector.size(); i++){ partDomain* dom = domainVector[i]; @@ -12484,7 +13401,7 @@ void nonLinearMechSolver::writeDisturbedMeshByEigenVector(int step){ sp->getKeys(e,keys); // get displacement results std::vector<double> vals; - eigData->get(keys,vals); + eigData.get(keys,vals); for (int iver =0; iver< e->getNumVertices(); iver++){ MVertex* v = e->getVertex(iver); @@ -12506,13 +13423,11 @@ void nonLinearMechSolver::writeDisturbedMeshByEigenVector(int step){ } // write deformed mesh to file - std::string filename = "Disturb_mesh_"+int2str(step)+ ".msh"; + std::string filename = "Disturb_mesh.msh"; dispgmodel->writeMSH(filename, CTX::instance()->mesh.mshFileVersion,CTX::instance()->mesh.binary, CTX::instance()->mesh.saveAll,CTX::instance()->mesh.saveParametric, CTX::instance()->mesh.scalingFactor); computedVertex.clear(); delete dispgmodel; - delete eigData; Msg::Info("End writing deformed mesh"); - }; void nonLinearMechSolver::setWriteDeformedMeshToFile(bool flag){ @@ -12561,141 +13476,6 @@ void nonLinearMechSolver::writeDeformedMesh(int step){ Msg::Info("End writing deformed mesh"); }; -void nonLinearMechSolver::addModeData(std::string filename){ - FILE* file = fopen(filename.c_str(),"r"); - if (file == NULL){ - Msg::Error("File is not exist"); - } - else - _allModeData.push_back(file); -}; - -void nonLinearMechSolver::writeDisturbedMeshByEigenVectorFromFile(){ - Msg::Info("Begin writing deformed mesh"); - - groupOfElements* g = new groupOfElements(); - - std::map<int, std::vector<GEntity*> > groups[4]; - pModel->getPhysicalGroups(groups); - std::map<int, std::vector<GEntity*> > &entmap = groups[_dim]; - for (std::map<int, std::vector<GEntity*> >::iterator it = entmap.begin(); it!= entmap.end(); it++){ - std::vector<GEntity*> &ent = it->second; - for (unsigned int i = 0; i < ent.size(); i++){ - for (unsigned int j = 0; j < ent[i]->getNumMeshElements(); j++){ - MElement *e = ent[i]->getMeshElement(j); - g->insert(e); - } - } - } - - int numMode = _allModeData.size(); - - if (numMode == 0){ - Msg::Info("no mode is used"); - return; - }; - - std::map<int, SVector3> disp; - std::set<int> computedNode; - - for (int i=0; i<numMode; i++){ - // read data from file - FILE* f = _allModeData[i]; - Msg::Info("begin reading in file %d",i); - while (!feof(f)){ - char what[256]; - fscanf(f,"%s",what); - if (!strcmp(what,"$ElementNodeData")){ - int nstr; - fscanf(f,"%d",&nstr); - for (int i=0; i<nstr; i++){ - char str[256]; - fscanf(f,"%s",str); - printf("%s \n",str); - }; - - int nreal; - fscanf(f,"%d",&nreal); - for (int i=0; i<nreal; i++){ - double val; - fscanf(f,"%lf",&val); - printf("%f \n",val); - }; - - int ninteg; - fscanf(f,"%d",&ninteg); - - int timestep; - fscanf(f,"%d",×tep); - printf("time step = %d \n",timestep); - - if (timestep ==0) continue; - - int numcomp; - fscanf(f,"%d",&numcomp); - printf("num comp = %d \n", numcomp); - - int nele; - fscanf(f,"%d",&nele); - printf("num ele = %d \n", nele); - - int part; - fscanf(f,"%d",&part); - - for (int i=0; i<nele; i++){ - int ele; - fscanf(f,"%d",&ele); - //printf("read ele = %d \n",ele); - int numnode; - std::vector<double> eledisp; - fscanf(f,"%d",&numnode); - for (int j=0; j<numnode*numcomp; j++) { - double d; - fscanf(f,"%lf",&d); - eledisp.push_back(d); - }; - if (timestep == 1){ - MElement* e = pModel->getMeshElementByTag(ele); - std::vector<MVertex*> vv; - e->getVertices(vv); - for (int k=0; k<vv.size(); k++){ - MVertex* ver = vv[k]; - //Msg::Info("node =¨%d",ver->getNum()); - if (computedNode.find(ver->getNum()) == computedNode.end()){ - computedNode.insert(ver->getNum()); - SVector3 vec(0.,0.,0.); - vec[0] = _valPerturbedMode*eledisp[k*numcomp+0]; - vec[1] = _valPerturbedMode*eledisp[k*numcomp+1]; - vec[2] = _valPerturbedMode*eledisp[k*numcomp+2]; - //vec.print("vec = "); - disp[ver->getNum()] += vec; - }; - }; - } - }; - }; - - } - Msg::Info("End reading"); - fclose(f); - computedNode.clear(); - }; - - for (groupOfElements::vertexContainer::iterator it = g->vbegin(); it!= g->vend(); it++){ - MVertex* v = *it; - SVector3& pert = disp[v->getNum()]; - v->x() += pert[0]; - v->y() += pert[1]; - v->z() += pert[2]; - - } - - std::string filename = "deformed_mesh.msh"; - pModel->writeMSH(filename, CTX::instance()->mesh.mshFileVersion,CTX::instance()->mesh.binary, CTX::instance()->mesh.saveAll,CTX::instance()->mesh.saveParametric, CTX::instance()->mesh.scalingFactor); - Msg::Info("End writing deformed mesh"); - -}; - /** perform a particular test**/ void nonLinearMechSolver::activateTest(const bool fl){ @@ -12704,8 +13484,6 @@ void nonLinearMechSolver::activateTest(const bool fl){ Msg::Info("activation test"); }; - - void nonLinearMechSolver::initialize_test(){ if (_microBC == NULL) { Msg::Error("test with micro BC must be coupled with one micro BC"); diff --git a/NonLinearSolver/nlsolver/nonLinearMechSolver.h b/NonLinearSolver/nlsolver/nonLinearMechSolver.h index 1dd5b45832e15dd377f842dbf7b5a1277bda5dad..709caf77bcac1ac52a2e75397904aa669e0ceee7 100644 --- a/NonLinearSolver/nlsolver/nonLinearMechSolver.h +++ b/NonLinearSolver/nlsolver/nonLinearMechSolver.h @@ -48,7 +48,8 @@ template<class T1,class T2> class DgC0BilinearTerm; template<class T1> class DgC0LinearTerm; template<class T> class staticDofManager; -class archiveForce{ +class archiveForce +{ public: int numphys; int dim; @@ -72,7 +73,7 @@ class archiveForce{ vdof.insert(*itD); } } - void openFile() + void openFile(const std::string prefix) { // create file only if there is dof to archive if(vdof.size()!=0){ @@ -89,7 +90,7 @@ class archiveForce{ s2 += "_part"+oss.str(); } #endif // HAVE_MPI - std::string fname = "force"+s+"comp"+s2+".csv"; + std::string fname =prefix+"force"+s+"comp"+s2+".csv"; FP = fopen(fname.c_str(),"w"); } #if defined(HAVE_MPI) @@ -116,11 +117,11 @@ class archiveForce{ vdof.clear(); contact_root = -1; } - void resetArchiving() + void resetArchiving(const std::string prefix) { lastSaveStep = 0; if(FP!=NULL) fclose(FP); - openFile(); + openFile(prefix); } }; @@ -171,9 +172,9 @@ class IntegralVolume Msg::Error("integType %d has not been defined",integType); } } - void openFile() + void openFile(const std::string prefix) { - std::string fname = getString()+"_"+IPField::ToString(ipVal); + std::string fname = prefix+getString()+"_"+IPField::ToString(ipVal); #if defined(HAVE_MPI) if (Msg::GetCommSize() > 1){ fname += "_part"+int2str(Msg::GetCommRank()); @@ -182,14 +183,119 @@ class IntegralVolume fname += ".csv"; fp = fopen(fname.c_str(),"w"); } - void resetArchiving() + void resetArchiving(const std::string prefix) { lastSaveStep = 0; if (fp!=NULL) fclose(fp); - openFile(); + openFile(prefix); } }; +class implicitSolverOptions +{ + public: + double beta, gamma, alpham, alphaf; + bool noMassPredicorWithoutVelocityAndAcceleration; // allows predicting nomass DOf differently with massDOf if implicicit CH is used + + implicitSolverOptions():beta(0.25), gamma(0.5), alpham(0.), alphaf(0.),noMassPredicorWithoutVelocityAndAcceleration(false){} + implicitSolverOptions(const implicitSolverOptions& src):beta(src.beta), gamma(src.gamma), alpham(src.alpham), alphaf(src.alphaf), + noMassPredicorWithoutVelocityAndAcceleration(src.noMassPredicorWithoutVelocityAndAcceleration){} + implicitSolverOptions& operator=(const implicitSolverOptions& src) + { + beta = src.beta; + gamma = src.gamma; + alpham = src.alpham; + alphaf = src.alphaf; + noMassPredicorWithoutVelocityAndAcceleration = src.noMassPredicorWithoutVelocityAndAcceleration; + return *this; + }; + ~implicitSolverOptions(){}; +}; + +class explicitSolverOptions +{ + public: + double beta, gamma, alpham, gammas; + bool timeStepByBenson, dynamicRelaxation; + int numstepExpl; // interval to re-estimate timestep + explicitSolverOptions(): beta(0.), gamma(0.5), alpham(0.), gammas(0.6666), + timeStepByBenson(false),dynamicRelaxation(false),numstepExpl(1){} + explicitSolverOptions(const explicitSolverOptions& src): beta(src.beta), gamma(src.gamma), alpham(src.alpham), gammas(src.gammas), + timeStepByBenson(src.timeStepByBenson),dynamicRelaxation(src.dynamicRelaxation),numstepExpl(src.numstepExpl){} + explicitSolverOptions& operator=(const explicitSolverOptions& src) + { + beta = src.beta; + gamma = src.gamma; + alpham = src.alpham; + gammas = src.gammas; + timeStepByBenson = src.timeStepByBenson; + dynamicRelaxation = src.dynamicRelaxation; + numstepExpl = src.numstepExpl; + return *this; + }; + ~explicitSolverOptions(){}; +}; + +class eigenSolverOptions +{ + public: + // eigen solver type + enum EIGENSOLVER_TYPE{Static = 0, Dynamic=1}; + // eigensolver using for stability analysis + int numeigenvalue; + + EIGENSOLVER_TYPE type; // static - K only, and dynamic K and M + bool MKToFile; + int maxNumIteration; // maximal number of iteration + std::string method; // method to estimate eigven value + double convergenCriterion; // toleranece + bool hermitian; // true if matrix is symmetrical or not + // + bool isPerturbedEigenMode; // true if use eigenvector to create perturbe structure + int numberPerturbedMode; // number of eigenmode is used + double valPerturbedMode; // per + // + eigenSolverOptions(): + numeigenvalue(1), + type(Dynamic), + MKToFile(false), + maxNumIteration(20), + method("krylovschur"), + convergenCriterion(1e-6), + hermitian(true), + isPerturbedEigenMode(false), + numberPerturbedMode(1), + valPerturbedMode(1.) + {}; + eigenSolverOptions(const eigenSolverOptions& src): + numeigenvalue(src.numeigenvalue), + type(src.type), + MKToFile(src.MKToFile), + maxNumIteration(src.maxNumIteration), + method(src.method), + convergenCriterion(src.convergenCriterion), + hermitian(src.hermitian), + isPerturbedEigenMode(src.isPerturbedEigenMode), + numberPerturbedMode(src.numberPerturbedMode), + valPerturbedMode(src.valPerturbedMode){}; + eigenSolverOptions& operator= (const eigenSolverOptions& src) + { + numeigenvalue = src.numeigenvalue; + type = src.type; + MKToFile = src.MKToFile; + maxNumIteration = src.maxNumIteration; + method = src.method; + convergenCriterion = src.convergenCriterion; + hermitian = src.hermitian; + isPerturbedEigenMode = src.isPerturbedEigenMode; + numberPerturbedMode = src.numberPerturbedMode; + valPerturbedMode = src.valPerturbedMode; + return *this; + }; + ~eigenSolverOptions(){} +}; + + #endif // SWIG @@ -211,13 +317,45 @@ class nonLinearMechSolver enum pathFollowingLocalIncrementType{DEFO_ENERGY=0, DISSIPATION_ENERGY=1,PLASTIC_ENERGY=2,DAMAGE_ENERGY=3}; enum pathFollowingLocation{BULK_INTERFACE=0,BULK=1,INTERFACE=2}; enum elementErosionType{FIRST_IP_FAILED=1, ALL_IP_FAILED=2}; - #endif //SWIG + /** + * 3 method for constraint treatment + * DISP_ELIM = displacement elimination + * MULT_ELIM = multiplier elimination + * DISP_MULT = displacement + multiplier system, no elimination + */ + enum SYSTEM_TYPE{DISP_ELIM=0, MULT_ELIM = 1, DISP_MULT=2, DISP_ELIM_UNIFIED=3}; + /** + * homogenized stress method by volume or surface integral + */ + enum STRESS_HOMO_TYPE{VOLUME=0, SURFACE=1}; + /** + * homogenized tangent by perturbation of by condensation + */ + enum TANGENT_HOMO_TYPE{PERTURB=0, CONDEN=1, INSYSTEMCONDEN=2, UNIFIED_CONDEN=3}; + /** + * if LOAD_CONTROL , solve until time = 1. + * if ARC_CONTROL_EULER, solve by explicit Euler and only at microlevel + */ + enum CONTROL_TYPE{LOAD_CONTROL=0, ARC_CONTROL_EULER=1}; + protected: GModel *pModel; int _dim, _tag; int _mpiUserDom; - int _workingRank; - bool _mpiDofManager; // true -> parallelization of dofManager. By default = true if Msg::GetCommSize() > 1 + int _workingRank; // current working rank + bool _mpiDofManager; // true -> parallelization of dofManager. + bool _isPartitioned; // true if FE mesh is partitioned + // the mapRank is created from number of proc available and number of mesh partion, + std::map<int,std::set<int> > _mapRanks; + std::string _meshFileName; // To transfert the mesh file from one folder to an other one + + int _currentStep; // As it is used in different functions now (Onelab control) + // user solver option given as a string + std::string _solver_options; + // For Onelab display + mutable int _GmshOneLabViewNum; + + //all main objects dofManager<double> *pAssembler; // IPField declared here to allow to pass it from one scheme to an other scheme IPField* _ipf; @@ -225,200 +363,301 @@ class nonLinearMechSolver unknownField* _ufield; // energetic field energeticField* _energField; + + solver whatSolver; // Solver used to solve + scheme whatScheme; // scheme used to solve equation + + + /*TIME SETTING FOR NONLINEAR SOLVER*/ + double endtime; // final time, time start from 0 to endtime + + /*FOR EXPLICIT SCHEME*/ + explicitSolverOptions _explicitOpts; -// dgGroupCollection _groups; - // specific data - int _numstepImpl, _numstepExpl; // Number of step not used for StaticLinearScheme and number of step between time step evaluation for Explicit Scheme - unsigned long int _currentStep; // As it is used in different functions now (Onelab control) - double endtime; // final time not used for StaticLinearScheme but it is not necesary to derive class because (small useless data) - double _tol, _absTol; // relative and absolute tolerance for iteration not used for StaticLinearScheme but it is not necesary to derive class because (small useless data) - // adaptative time step if no convergence for Static Non Linear Scheme + // + std::map<int,MElement*> _mapMElementTmp; // used to compute characteristique element size in the deformed configuration CLEAR THE MAP ??? + std::map<int,MElement*> _mapMElementFirstOrder; // idem + + /* FOR MULTI SYSTEM */ + /* MultiSystems solve */ + std::vector<int> _vcompBySys; + std::vector<scheme> _vschemeBySys; + + /*FOR QUASI-STATIC AND IMPLICIT SCHEMES*/ + int _numstepImpl; // Number of steps + double _tol, _absTol; // relative and absolute tolerance for iteration + bool _stiffEstimation, _stiffnessModification; // true if recalculate stiffness matrix + bool _iterativeNR; // true if using iterative procedure + bool _lineSearch; + + /*FOR CH DYNAMIC SCHEME*/ + implicitSolverOptions _implicitOpts; + + /*FOR PATH FOLLOWING*/ + bool _pathFollowing; // true to activate path following + //_pathFollowingMethod holds the method of path following, 0- GLOBAL_ARC_LENGTH_BASED , 1 - LOCAL_BASED, and 2- HYPERELLIPTIC_BASED + //GLOBAL_ARC_LENGTH_BASED based on the general path following constraint type + // + //LOCAL_BASED is a combination of LOAD CONTROL+ DISSIPATION CONTROL after the onset of dissipation + // + //HYPERELLIPTIC_BASED uses several particular DOFs insteads of all DOF used in GLOBAL_ARC_LENGTH_BASED to build the path following constraint + // + pathFollowingMethod _pathFollowingMethod; + + // if _pathFollowingMethod=GLOBAL_ARC_LENGTH_BASED or HYPERELLIPTIC_BASED is used, + int _macroControlTypePathFollowing; // control type + int _correctionMethodPathFollowing; // correction method + int _tranversalCriterionPathFollowing; // method to correctly estimate load paramater in the predictor of path following constrain as two solutions exists + int _solverTypePathFollowing; // solve method two use, + double _pathFollowingEqRatio; // equa ratio + std::vector<int> _hyperellipticControlComp; // comp used in hyperelliptic control + // + // if _pathFollowingMethod = LOCAL_BASED + bool _switchedControlType; + double _pathFollowingSwitchCriterion; + pathFollowingLocalIncrementType _pathFollowingIncrementType; + pathFollowingLocation _pathFollowingLocation; + // + + /*TIME STEP AND PATHFOLLOWING STEP MANAGEMENT*/ + // time step adaptation if solver fails, always consider int _maxNRite; // if this number of iteration is reached the time step is reduce double _timeStepFactorReduction; // the time step is divided by this value if no convergence (default 2) int _maxAttemptStepReduction; // number of attemp to reduce time step (default 6 which leads to a decrease by 64 (2^6) of time step) int _niteTimeStepIncrease; // if convergence with nite < _nite the time step is increase (default 5)(but can be greater than its max value given by numstep/endtime) + + // time step adaptation to obtain optimal number of iterations + bool _timeStepAdaptation; // true if path following step is adapted with number NR + // for time double _maximalTimeStep; // maximal time step double _minimalTimeStep; // minimal time step - int nsba; // number of step between two view - // user solver option given as a string - std::string _solver_options; - + int _numNROptimal; // num optimal + double _expNROptimal; + // for path following increment (arc-length or local == dissipation increment) + double _localStep; // to local cr control + double _localStepPrev; + double _localStepMinimal; + double _localStepMaximal; + + double _arcLengthStep; // for arc-length control + double _arcLengthStepPrev; + double _arcLengthStepMinimal; + double _arcLengthStepMaximal; + double _timeStepAdaptationFactor; + // time step adaptation + int _numNROptimalLocal; // number optimal for local + // + /* data for restart */ size_t _beginTime; + std::string _restartMshFileName; + bool _resetRestart; //to avoid restart when shitfing schemes + bool _disableResetRestart; //to allow restat in battery only + - /* specific data for explicit scheme */ - double _beta, _gamma, _alpham, _alphaf, _gammas, _rhoinfty; - bool _timeStepByBenson; - std::map<int,MElement*> _mapMElementTmp; // used to compute characteristique element size in the deformed configuration CLEAR THE MAP ??? - std::map<int,MElement*> _mapMElementFirstOrder; // idem - + /*FOR CRACK*/ + // physical entities that are initialy broken + std::vector<int> initbrokeninter; /* crack tracking */ + std::string _crackTrackingName; FILE *_crackTrackingFile; // name of files for crack tracking no name == NULL and no track - /* fragmentation */ + std::string _fragmentationName; FILE *_fragmentationFile; - + + // vector of all domains std::vector<partDomain*> domainVector; + #if defined(HAVE_MPI) + std::map<int,std::vector<groupOfElements> >_mapOtherDomain; // map build by the creation of groupOfElement. Retrieve the element of other partition + #endif // HAVE_MPI + std::vector<partDomain*> _ghostDomainMPI; // to prescribed Dirichlet BC of other partition in MPI (avoid search in map in each iteration) + // vector of all material law + std::map<int,materialLaw*> maplaw; + + /*FOR CONTACT*/ // contact contactContainer _allContact; // defo defo contact BC defoDefoContactContainer _allDefoDefoContact; + /*FOR BOUNDARY CONDITIONS*/ // neumann BC std::list<nonLinearNeumannBC> allNeumann; // dirichlet BC std::list<nonLinearDirichletBC> allDirichlet; - // all periodic groups std::list<nonLinearPeriodicBCBetweenTwoGroups> allPeriodic; - //all average PBC groups std::list<nonLinearAveragePeriodicBCBetweenTwoGroups> allAveragePeriodic; - // all samedisp bc std::list<nonLinearSameDisplacementBC> allSameDisp; - // all samedisp bc between two groups std::list<nonLinearSameDisplacementBCBetweenTwoGroups> allSameDispBetweenTwoGroups; // fix on face std::list<nonLinearFixOnFaceBC> allFixAllFace; - // constraint BC std::list<nonLinearConstraintBC> allConstraint; - - // corner BC + // when using with microBC, BC can appy on corners of RVE std::list<nonLinearDirichletBCAtCorner> allCornerConstraint; - // + // force BC std::list<nonLinearNeumannBCAtCorner> allCornerForce; - // initial BC std::list<initialCondition> allinitial; - // neumann BC theta (weak enforcement of rotation) group this with allNeumann ? std::list<nonLinearNeumannBC> allTheta; - // dirichlet BC on rigid surface (prescribed the motion of gravity center) std::list<rigidContactBC> allContactBC; - // set with virtual interfaceElements used to prescribed BC put this in an other place ?? - std::map<int,groupOfElements> mapvinter; - - // vector with material law - std::map<int,materialLaw*> maplaw; - // physical entities that are initialy broken - std::vector<int> initbrokeninter; + + /* FOR ARCHIVING*/ // std vector to archive a node displacement std::vector<unknownField::archiveNode> anoded; - // std::vector to archive a force (info musy be store before creation because functionSpace are not initialize) + // std::vector to archive a force std::vector<archiveForce> vaf; // std vector to archive ipvariable std::vector<IPField::ip2archive> vaip; - // for view + // list to archive the integral operation in volume + std::list<IntegralVolume> _dataVolumeIntegral; + // list to archive IP data over physical (data at gauss point with coordinates) + std::list<IPDataOnPhysical> _dataOnPhysical; + // for archiving energy and fracture energy + int _energyComputation; // equal to 0 if no energy is saved; >0 if energy is saved with _energyComputation as interval step of archiving + int _fractureEnergyComputation; // equal to 0 if no energy is saved; >0 if energy is saved with _energyComputation as interval step of archiving + + + /*FOR VIEW*/ + // view of unknown --> disp file std::vector<nlsField::dataBuildView> unknownView; + // view of ip field --> stress file std::vector<nlsField::dataBuildView> ipView; + // view of energy field --> energy file, but it is not std::vector<nlsField::dataBuildView> energyView; - int _energyComputation, _fractureEnergyComputation; // step interval to compute total energy (never if 0) - + int nsba; // number of step between two view + /* SWITCH scheme data */ + scheme _previousScheme; // to known the previous used scheme for switch bool _previousInit; // To known if the initialization as already be made by an other scheme bool _notResetedBC; // To known if the BC are modified. bool _notResetedContact; // To known if the contact interaction are modified - std::string _meshFileName; // To transfert the mesh file from one folder to an other one - std::string _restartMshFileName; - bool _resetRestart; //to avoid restart when shitfing schemes - bool _disableResetRestart; //to allow restat in battery only - bool _notResetUnknowns; - bool _noMassPredicorWithoutVelocityAndAcceleration; // allows predicting nomass DOf differently with massDOf if implicicit CH is used - - /* Dynamic relaxation */ - bool _dynamicRelaxation; // performed explicit dynamic relaxtion - - /*Path following option with arc-length control*/ - bool _pathFollowing; // true if considering pathFollowing - int _macroControlTypePathFollowing; - int _correctionMethodPathFollowing; - int _tranversalCriterionPathFollowing; - int _solverTypePathFollowing; - double _pathFollowingEqRatio; - - pathFollowingMethod _pathFollowingMethod; // 0- arclength based, 1 - - double _loadStep; // for load control - double _localStep; // to local cr control - double _loadStepPrev; // for load control - double _localStepPrev; // to local cr control - double _localStepMinimal; - double _localStepMaximal; + bool _notResetUnknowns; // To known if the unknowns are modified + // strain mapping for foams + strainMapping* _strainMap; + // programe monitoring + EndSchemeMonitoringBase* _endSchemeMonitoringObject; + // selective update with cohesive crack + selectiveUpdateBase* _selectiveObject; - double _arcLengthStep; // for arc-length control - double _arcLengthStepPrev; // previous - double _arcLengthStepMinimal; - double _arcLengthStepMaximal; + // element erosion control + bool _bulkElementErosionFlag; // true if bulk element erosion + bool _interfaceElementErosionFlag; // true if interface element erosion + elementErosionType _erosionType; // all ip failed + FailureCriterionBase* _erosionGlobalCriterion; + elementErosionFilter _elementErosionFilter; // a set consists of all erosion elements + + /*EIGEN SOLVER*/ + eigenSolverOptions _eigOpts; + std::vector<nlsField::dataBuildView> _eigview; + + /*DEFORMED MESH TO FILE*/ + bool _isWriteDeformedMeshToFile; // write deformed mesh to file - double _pathFollowingSwitchCriterion; - bool _switchedControlType; - pathFollowingLocalIncrementType _pathFollowingIncrementType; - pathFollowingLocation _pathFollowingLocation; - // - std::vector<int> _hyperellipticControlComp; // comp used in hyperelliptic control + /*FOR MULTISCALE ANALYSIS*/ + // Element number and Integration point number + int _enumMinus,_enumPlus, _gnum; + + + // time and time step + double _macroTimeStep; // for law which works on increment. (Use only in so no getTimeStep function) + double _macroTime; // To save results vs time + int _macroStep; // current macroscopic step - int _numNROptimal; // num optimal - int _numNROptimalLocal; // number optimal for local - double _expNROptimal; - double _timeStepAdaptationFactor; // for timestep adaptation = pow(_numNROptimal/previous number NR iterations,_expNROptimal) - bool _timeStepAdaptation; // true if path following step is adapted with number NR + //for micro flag + SYSTEM_TYPE _systemType; + CONTROL_TYPE _controlType; + // micro flag--> true if microsolver is used + bool _microFlag; + bool _multiscaleFlag; // to know if a multiscale analysis is performed, to be true with both micro and marco solver + + //micro BC + nonLinearMicroBC* _microBC; + nonLinearMicroBC* _microBCOld; + nonLinearMicroBC* _microFailureBC; + + //stress flag and tangent flag + bool _stressflag; // true if homogenized stress is estimated + bool _tangentflag; // true if homogenizd tangnent is estimated + // homogenized method + TANGENT_HOMO_TYPE _homogenizeTangentMethod; + STRESS_HOMO_TYPE _homogenizeStressMethod; + double _sameStateCriterion; // this parameter to check if same sate-> economise + // for archiving + bool _archive; + // all homogenized filename + bool _isHommProSaveToFile; // flag -->save homogenized properties to files + bool _isHommStrainSaveToFile; //flag --> save homogenized strain to files + bool _extractPerturbationToFile; //flag --> save perturbation on RVE boundary to file + bool _messageView; // flag to archive message to file + double _tangentPerturbation; // tangent by perturbation + double _rho; // homogenized density + double _rveVolume; // rve volume - #if defined(HAVE_MPI) - std::map<int,std::vector<groupOfElements> >_mapOtherDomain; // map build by the creation of groupOfElement. Retrieve the element of other partition - #endif // HAVE_MPI - std::vector<partDomain*> _ghostDomainMPI; // to prescribed Dirichlet BC of other partition in MPI (avoid search in map in each iteration) + // homogenized stresses + homogenizedData* _currentState, *_initialState, *_elasticState; - /* MultiSystems solve */ - std::vector<int> _vcompBySys; - std::vector<scheme> _vschemeBySys; - bool _stiffEstimation, _stiffnessModification; // true if recalculate stiffness matrix - bool _iterativeNR; // true if using iterative procedure - bool _lineSearch; - // for multiscale analysis - std::map<int,std::set<int> > _mapRanks; - bool _isPartitioned; // true if FE mesh is partitioned - strainMapping* _strainMap; - bool _strainMappingFollwing; - // For Onelab display - mutable int _GmshOneLabViewNum; + // for managing periodic boudary condition + pbcAlgorithm* _pAl; + // for tangent estimation + stiffnessCondensation* _condensation; + // eigensolver using for stability analysis + homogenizedDataFiles* _homogenizedFiles; // homogenized file data + FILE* _outputFile; // output file --> if set _messagive - // Failure management parameters - // Crack insertion control - int _maxAllowedNewlyBrokenElement; // Max number of allowed newly cracked elements during one step (for implicit case) - // Erosion control - bool _bulkElementErosionFlag; // true if bulk element erosion - bool _interfaceElementErosionFlag; // true if interface element erosion - elementErosionType _erosionType; // all ip failed - FailureCriterionBase* _erosionGlobalCriterion; - bool _globalCheckFlag; // true if global verification based on _erosionGlobalCriterion - elementErosionFilter _elementErosionFilter; // a set consists of all erosion elements + // for test use microBC with macrosolver + bool _testFlag; + pbcConstraintElementGroup* _pbcGroup; - // - bool _GModelIsRotated; // + + // local basis at element interfaces std::map<int, STensor3> _allInterfaceLocalBasis; // ele+ gp, [n b t] + // to known interface std::map<TwoNum,int> _interfaceElements; // negative and positive element number versus interface std::map<int, TwoNum> _interfaceElementsInverseMap; + // + bool _damageIsBlocked; + bool _solverIsBroken; + double _maximalLostEllipticityCriterion; // maximal value + double _homogenizedCrackSurface; + // + bool _failureBCIsSwitched; // true if FailureBC is switsched after failure, bool _failureBasedOnPreviousState; + bool _GModelIsRotated; + bool _checkFailureOnset; // + bool _checkWithNormal; // + bool _damageToCohesiveJump; // true if extracting cohsive law + double _RVELengthInCohesiveNormal; // length perpendicular to cohesive normal + double _surfaceReductionRatio; // load carrying surface over nominal surface following cohesive normal + double _lostSolutionUniquenssTolerance; + double _voidPartInLocalizationBand; // void part in localization band + bool _extractIrreversibleEnergy; // flag - std::list<IntegralVolume> _dataVolumeIntegral; - std::list<IPDataOnPhysical> _dataOnPhysical; - - bool _endSchemeMonitoring; - EndSchemeMonitoringBase* _endSchemeMonitoringObject; - - selectiveUpdateBase* _selectiveObject; + STensor3 _FdamOnset; // average damage deformation atinitCornerBC failure onset + SVector3 _lostSolutionUniquenssNormal; // normal to cohesive element + // last extract value + STensor3 _homogenizedStressLastActiveDissipation; + STensor3 _homogenizedStrainLastActiveDissipation; + STensor3 _homogenizedDissipationStrainLastActiveDissipation; + SVector3 _homogenizedCohesiveJumpLastActiveDissipation; + // + bool _extractElasticTangentOperator; // true if elastic tangent operator is extracted at the same time as full tangent operator + FILE* _elasticDPDFTangentFile; -#ifndef SWIG + protected: void commonModel(); // common operation for loadModel and createModel void initMapRanks(const std::set<int>& parts); void init(); @@ -429,7 +668,7 @@ class nonLinearMechSolver void endOfScheme(const double endtime, const int endstep); // common operation at the end of a scheme void oneStepPreSolve(const double curtime, const double timestep, const int numstep); void oneStepPreSolvePathFollowing(const double curtime, const double timestep, const int numstep); - + void fillMapOfInterfaceElementsInOneDomain(MElement *e, std::vector<MElement*> &eleFound, const groupOfElements *g) const; @@ -472,7 +711,7 @@ class nonLinearMechSolver void setTimeForLaw(const double t,const double dt, const int numstep); void initArchiveForce(); void forceArchiving(const double curtime,const int numstep, const bool forceSave); - + void initPathFollowingArchiving(); void pathFollowingArchiving(const double curtime, const int numstep); void IPDataOnPhysicalArchiving(const double curtime, const int numstep, const bool forceSave); void IPVolumeIntegralArchiving(const double curtime, const int numstep, const bool forceSave); @@ -502,22 +741,23 @@ class nonLinearMechSolver void restartPathFollowing(); void restartErosion(); void restartDefoDefoContact(); - + void checkElementErosion(const IPStateBase::whichState ws); - -#endif // SWIG - // Unfortunately should be part of the interface to be able to control the loop from outside - public: - void oneStepPostSolve(const double curtime, const int numstep); - - protected: - solver whatSolver; // Solver used to solve - scheme whatScheme; // scheme used to solve equation - scheme _previousScheme; // to known the previous used scheme for switch + void writeDisturbedMeshByEigenVector(eigenSolver& eigS, int numberMode, double fact); + void writeDeformedMesh(int step); + #endif // SWIG public: nonLinearMechSolver(int tag,bool isParallel=true); - virtual ~nonLinearMechSolver(); -#ifndef SWIG + nonLinearMechSolver(const nonLinearMechSolver& src); + nonLinearMechSolver* clone(const std::string mshFile, int tag,bool isParallel=true) const; + void copyOptionsToOtherSolver(nonLinearMechSolver* sv) const; + void copyBCsToOtherSolver(nonLinearMechSolver* sv) const; + #ifndef SWIG + ~nonLinearMechSolver(); + nonLinearMechSolver* clone(int tag, bool isParallel, + const std::string mshFile, + std::vector<partDomain*>& allDom, + std::vector<materialLaw*>& allMat) const; int getNumRanks() const; int getNumRootRanks() const; bool rankOnSolver(const int rank) const; @@ -533,22 +773,23 @@ class nonLinearMechSolver void getLocalBasis(const MElement* ele, const int gpt, SVector3& n, SVector3& t, SVector3& b) const; int getDim() const {return _dim;}; + int getTag() const {return _tag;}; double getEndTime() const{return endtime;} scheme getScheme() const{return whatScheme;} - virtual linearSystem<double>* createSNLSystem(); - virtual linearSystem<double>* createExplicitSystem(); - virtual linearSystem<double>* createImplicitSystem(); - virtual linearSystem<double>* createEigenSystem(); - virtual void createSystem(); - - virtual double solveExplicit(); - virtual double solveMulti(); - virtual double solveEigen(); - virtual void createInterfaceElement(); - virtual materialLaw* getMaterialLaw(const int num); + linearSystem<double>* createSNLSystem(); + linearSystem<double>* createExplicitSystem(); + linearSystem<double>* createImplicitSystem(); + linearSystem<double>* createEigenSystem(); + void createSystem(); + + double solveExplicit(); + double solveMulti(); + double solveEigen(); + void createInterfaceElement(); + materialLaw* getMaterialLaw(const int num); // create interfaceelement with dgGoupOfElement from dg project doesn't work (segmentation fault) - virtual void createInterfaceElement_2(); - virtual bool mustRestart(const int numstep); + void createInterfaceElement_2(); + bool mustRestart(const int numstep); pathFollowingLocalIncrementType getPathFollowingLocalIncrementType() const{return _pathFollowingIncrementType;}; pathFollowingLocation getPathFollowingLocation() const {return _pathFollowingLocation;}; @@ -557,6 +798,11 @@ class nonLinearMechSolver bool GModelIsRotated() const {return _GModelIsRotated;} int getInterfaceElementNumber(const int em, const int ep) const; TwoNum getMinusAndPlusElementNumber(const int elnum) const; + const std::map<int,TwoNum>& getInterfaceElementsInverseMap() const {return _interfaceElementsInverseMap;}; + + const std::string& getMeshFileName() const {return _meshFileName;}; + + int getStepBetweenArchiving() const {return nsba;}; IPField* getIPField(); const IPField* getIPField() const ; @@ -585,23 +831,33 @@ class nonLinearMechSolver GModel* getGModel(); const GModel* getGModel() const; - std::map<int,materialLaw*> getMaplaw() {return maplaw;}; - const std::map<int,materialLaw*> getMaplaw() const {return maplaw;}; + std::map<int,materialLaw*>& getMaplaw() {return maplaw;}; + const std::map<int,materialLaw*>& getMaplaw() const {return maplaw;}; bool withFailureBasedOnPreviousState() const {return _failureBasedOnPreviousState;}; void initArchiveReactionForceOnFixedPhysical(archiveForce& aforce); + // for eigen value problem + eigenSolver* eigenSolve(const int numstep); + void nextStep(const double curtime, const int step); + std::string getFileSavingPrefix() const; + #endif + + public: + // for eigensolver + void eigenValueSolver(const int num = 10); // number of eigenvalue + void setEigenSolverParamerters(const int type, const int numiter, const std::string method, const double tol, const bool mktofile = false, const bool hem = true); + void setModeView(const int view, const int nbstepArch = 1); + void setDisturbedEigenMode(int numMode, double val, bool flag = true); -#endif - virtual double solveStaticLinear(); - virtual double solveSNL(); - virtual void perturbationProcedure(const double pre, double* mode); + double solveStaticLinear(); + double solveSNL(); // functions for python (swig) interaction void loadModel(const std::string &meshFileName); void createModel(const std::string &geoFileName, const std::string &outFileName="",const int dim=3,const int order=1, const bool incomplete=false); - virtual double solve(); // return the time reaches at the end of the computation can be !=endtime if solving problem - virtual void addDomain(partDomain *dom); - virtual void addMaterialLaw(materialLaw *mlaw); + double solve(); // return the time reaches at the end of the computation can be !=endtime if solving problem + void addDomain(partDomain *dom); + void addMaterialLaw(materialLaw *mlaw); void Solver(const int s){whatSolver= (solver)s;} void Scheme(const int s){whatScheme=(scheme)s;} void lineSearch(const bool line); @@ -620,6 +876,7 @@ class nonLinearMechSolver // increment for local pathFollowing void setPathFollowingLocalSteps(const double loadStep, const double localCrStep); // if setPathFollowingIncrementAdaptation is active, localCrStep is not used void setPathFollowingLocalIncrementType(const int i); + void setBoundsOfPathFollowingLoadSteps(const double lowerBound, const double upperBound); void setBoundsOfPathFollowingLocalSteps(const double lowerBound, const double upperBound); // for global pathFollowing void setPathFollowingArcLengthStep(const double arcStep); @@ -646,284 +903,145 @@ class nonLinearMechSolver void implicitSpectralRadius(const double rho); void explicitTimeStepEvaluation(const int nst); void stepBetweenArchiving(const int n); - virtual void thetaBC(const int numphys); - virtual void displacementBC(std::string onwhat, const int numphys, const int comp, const double value); - virtual void displacementBC(std::string onwhat, const int numphys, const int comp, const double valueDiff, const double valueInit); - virtual void displacementBC(std::string onwhat, const int numphys, const int comp, const double value,elementFilter *filter); - virtual void displacementBC(std::string onwhat, const int numphys, const int comp, simpleFunction<double> *fct); - virtual void displacementBC(std::string onwhat, const int numphys, const int comp, elementFilter *filter, simpleFunction<double> *fct); - virtual void velocityBC(std::string onwhat, const int numphys, const int comp, const double value); - virtual void velocityBC(std::string onwhat, const int numphys, const int comp, const double value,elementFilter *filter); - virtual void velocityBC(std::string onwhat, const int numphys, const int comp, simpleFunction<double> *fct); - virtual void velocityBC(std::string onwhat, const int numphys, const int comp, elementFilter *filter, simpleFunction<double> *fct); - virtual void accelerationBC(std::string onwhat, const int numphys, const int comp, const double value); - virtual void constraintBC(std::string onwhat, const int numphys, const int comp); - - virtual void periodicBC(std::string onwhat, const int phys1, const int phys2, const int v1, const int v2, const int comp); - virtual void averagePeriodicBC(std::string onwhat, const int phys1, const int phys2, const int v1, const int v2, const int comp); - virtual void sameDisplacementBC(std::string onwhat, const int phy, const int rootphy, + void thetaBC(const int numphys); + void displacementBC(std::string onwhat, const int numphys, const int comp, const double value); + void displacementBC(std::string onwhat, const int numphys, const int comp, const double valueDiff, const double valueInit); + void displacementBC(std::string onwhat, const int numphys, const int comp, const double value,elementFilter *filter); + void displacementBC(std::string onwhat, const int numphys, const int comp, simpleFunctionTime<double> *fct); + void displacementBC(std::string onwhat, const int numphys, const int comp, elementFilter *filter, simpleFunctionTime<double> *fct); + void velocityBC(std::string onwhat, const int numphys, const int comp, const double value); + void velocityBC(std::string onwhat, const int numphys, const int comp, const double value,elementFilter *filter); + void velocityBC(std::string onwhat, const int numphys, const int comp, simpleFunctionTime<double> *fct); + void velocityBC(std::string onwhat, const int numphys, const int comp, elementFilter *filter, simpleFunctionTime<double> *fct); + void accelerationBC(std::string onwhat, const int numphys, const int comp, const double value); + void constraintBC(std::string onwhat, const int numphys, const int comp); + + void periodicBC(std::string onwhat, const int phys1, const int phys2, const int v1, const int v2, const int comp); + void averagePeriodicBC(std::string onwhat, const int phys1, const int phys2, const int v1, const int v2, const int comp); + void sameDisplacementBC(std::string onwhat, const int phy, const int rootphy, const int comp, const double fact = 1.); - virtual void sameDisplacementBCBetweenTwoGroups(std::string onwhat, const int phy1, const int phy2, const int comp); - virtual void fixOnFace(std::string onwhat, const int phy, const double A, const double B, const double C, const double D); - virtual void symetryBC(std::string onwhat, const int phy); - virtual void displacementRigidContactBC(const int numphys, const int comp,const double value); - virtual void displacementRigidContactBC(const int numphys, const int comp_, simpleFunction<double> *fct); - virtual void initialBC(std::string onwhat, std::string whichC, const int numphys, const int comp, const double value); - virtual void initialBC(std::string onwhat, std::string whichC, const int numphys, const int comp, const double value, elementFilter *filter); - virtual void initialBC(std::string onwhat, std::string whichC, const int numphys, const int comp, simpleFunctionTime<double> *fct,elementFilter* filter=NULL); - virtual void initialDCBVeloBC(std::string onwhat,const int numphys,const int axiscomp,const int deflcomp,const double length, const double value); + void sameDisplacementBCBetweenTwoGroups(std::string onwhat, const int phy1, const int phy2, const int comp); + void fixOnFace(std::string onwhat, const int phy, const double A, const double B, const double C, const double D); + void symetryBC(std::string onwhat, const int phy); + void displacementRigidContactBC(const int numphys, const int comp,const double value); + void displacementRigidContactBC(const int numphys, const int comp_, simpleFunctionTime<double> *fct); + void initialBC(std::string onwhat, std::string whichC, const int numphys, const int comp, const double value); + void initialBC(std::string onwhat, std::string whichC, const int numphys, const int comp, const double value, elementFilter *filter); + void initialBC(std::string onwhat, std::string whichC, const int numphys, const int comp, simpleFunctionTime<double> *fct,elementFilter* filter=NULL); + void initialDCBVeloBC(std::string onwhat,const int numphys,const int axiscomp,const int deflcomp,const double length, const double value); - virtual void forceBC(std::string onwhat, const int numphys, const int comp, const double val); - virtual void forceBC(std::string onwhat, const int numphys, const int comp, simpleFunctionTime<double> *fct); + void forceBC(std::string onwhat, const int numphys, const int comp, const double val); + void forceBC(std::string onwhat, const int numphys, const int comp, simpleFunctionTime<double> *fct); - virtual void scalarFluxBC(std::string onwhat, const int numphys, const int comp, const double val); - virtual void scalarFluxBC(std::string onwhat, const int numphys, const int comp, simpleFunctionTime<double> *fct); + void scalarFluxBC(std::string onwhat, const int numphys, const int comp, const double val); + void scalarFluxBC(std::string onwhat, const int numphys, const int comp, simpleFunctionTime<double> *fct); - virtual void independentDisplacementBC(std::string onwhat, const int numphys, const int comp, const double value); - virtual void independentForceBC(std::string onwhat, const int numphys, const int comp, const double val); + void independentDisplacementBC(std::string onwhat, const int numphys, const int comp, const double value); + void independentForceBC(std::string onwhat, const int numphys, const int comp, const double val); - virtual void blastPressureBC(const int numphys,const double p0,const double p1, const double plexp, const double t0, const double t1); - virtual void pressureOnPhysicalGroupBC(const int numphys, const double pressDiff, const double p0); - virtual void pressureOnPhysicalGroupBC(const int numphys, simpleFunctionTime<double> *fct); + void blastPressureBC(const int numphys,const double p0,const double p1, const double plexp, const double t0, const double t1); + void pressureOnPhysicalGroupBC(const int numphys, const double pressDiff, const double p0); + void pressureOnPhysicalGroupBC(const int numphys, simpleFunctionTime<double> *fct); - virtual void blastPressureBC(std::string onwhat,const int numphys,const double p0,const double p1, const double plexp, const double t0, const double t1); - virtual void pressureOnPhysicalGroupBC(std::string onwhat, const int numphys, const double pressDiff, const double p0); - virtual void pressureOnPhysicalGroupBC(std::string onwhat, const int numphys, simpleFunctionTime<double> *fct); + void blastPressureBC(std::string onwhat,const int numphys,const double p0,const double p1, const double plexp, const double t0, const double t1); + void pressureOnPhysicalGroupBC(std::string onwhat, const int numphys, const double pressDiff, const double p0); + void pressureOnPhysicalGroupBC(std::string onwhat, const int numphys, simpleFunctionTime<double> *fct); - virtual void archivingForceOnPhysicalGroup(const std::string onwhat, const int numphys, const int comp,const int nstep=1); - virtual void archivingRigidContactForce(const int numphys, const int comp,const int nstep=1); - virtual void archivingNodeDisplacement(const int num, const int comp,const int nstep=1); - virtual void archivingMeshVertexDisplacement(const int num, const int comp,const int nstep = 1); - virtual void archivingNodeDisplacementOnPhysical(const int dim, const int physical, const int comp,const int nstep=1); - virtual void archivingNodeDisplacementOnControlNode(const int pos, const int comp,const int nstep=1); - - virtual void archivingVolumeIntegralValue(const int num, const int nstep=1); - virtual void archivingVolumeIntegralValueOnPhysical(const int phy, const int num, const int nstep=1); - virtual void archivingAverageValue(const int num, const int nstep=1); - virtual void archivingAverageValueActiveDissipation(const int num, const int nstep=1); - - virtual void archivingIPDataOnPhysical(const int ipval, const int phys, const int dim, const int nstep=1); - - virtual void archivingNodeVelocity(const int num, const int comp,const int nstep=1); - virtual void archivingNodeAcceleration(const int num, const int comp,const int nstep=1); - virtual void archivingNode(const int num, const int comp, nonLinearBoundaryCondition::whichCondition,const int nstep=1); - virtual void archivingNode(const int numpphys, const int dim, const int comp, nonLinearBoundaryCondition::whichCondition,const int nstep); - virtual void archivingNodeIP(const int numphys, const int ipval,const int elemval,const int nstep=1); - virtual void archivingNodeIPOnPhysicalGroup(const int dim, const int numphys, const int ipval, const int nstep=1); - virtual void archivingElementIP(const int elenum, const int ipval,const int elemval, const int numip=0, const int nstep=1); - virtual void archivingInterfaceElementIP(const int elenumMinus,const int elenumPlus, const int ipval,const int elemval, const int numip=0, const int nstep=1); - virtual void archivingIPOnPhysicalGroup(std::string onwhat, const int numphys, const int ipval, const int elemval, + void archivingForceOnPhysicalGroup(const std::string onwhat, const int numphys, const int comp,const int nstep=1); + void archivingRigidContactForce(const int numphys, const int comp,const int nstep=1); + void archivingNodeDisplacement(const int num, const int comp,const int nstep=1); + void archivingMeshVertexDisplacement(const int num, const int comp,const int nstep = 1); + void archivingNodeDisplacementOnPhysical(const int dim, const int physical, const int comp,const int nstep=1); + void archivingNodeDisplacementOnControlNode(const int pos, const int comp,const int nstep=1); + + void archivingVolumeIntegralValue(const int num, const int nstep=1); + void archivingVolumeIntegralValueOnPhysical(const int phy, const int num, const int nstep=1); + void archivingAverageValue(const int num, const int nstep=1); + void archivingAverageValueActiveDissipation(const int num, const int nstep=1); + + void archivingIPDataOnPhysical(const int ipval, const int phys, const int dim, const int nstep=1); + + void archivingNodeVelocity(const int num, const int comp,const int nstep=1); + void archivingNodeAcceleration(const int num, const int comp,const int nstep=1); + void archivingNode(const int num, const int comp, nonLinearBoundaryCondition::whichCondition,const int nstep=1); + void archivingNode(const int numpphys, const int dim, const int comp, nonLinearBoundaryCondition::whichCondition,const int nstep); + void archivingNodeIP(const int numphys, const int ipval,const int elemval,const int nstep=1); + void archivingNodeIPOnPhysicalGroup(const int dim, const int numphys, const int ipval, const int nstep=1); + void archivingElementIP(const int elenum, const int ipval,const int elemval, const int numip=0, const int nstep=1); + void archivingInterfaceElementIP(const int elenumMinus,const int elenumPlus, const int ipval,const int elemval, const int numip=0, const int nstep=1); + void archivingIPOnPhysicalGroup(std::string onwhat, const int numphys, const int ipval, const int elemval, const int nstep=1); - virtual void physInitBroken(const int phys); -// virtual void setInitOrRestartFileName(const std::string fname); - virtual void contactInteraction(contactDomain *cdom); - virtual void defoDefoContactInteraction(defoDefoContactDomain *cdom); - virtual void archivingRigidContact(const int numphys, const int comp, const int wc=0,const int nstep=1); - virtual void unknownBuildView(const int comp=0,const int nbstep=1); - virtual void OneUnknownBuildView(const std::string vname, const int comp,const int nbstep=1); - virtual void internalPointBuildView(const std::string vname,const int comp,const int nbstep=1,const int ev=-1); - virtual void energyBuildView(const std::string vname,const int comp,const int nbstep=1); - virtual void energyComputation(const int val=1); - virtual void fractureEnergy(const int val=0); - virtual void crackTracking(std::string fname); - virtual void postproFragment(std::string fname); - virtual void resetBoundaryConditions(const bool notResetUnknwown = true); // true if do not modify unknwons false if do - virtual void resetContactInteraction(); - virtual void disableResetRestart(); //to avoid restart at a change of solver - virtual void setFactorOnArchivingFiles(const int fact); // only for csv files (for view use nstepBetweenArchiving) - virtual void dynamicRelaxation(const double gams,const double ftime,const double tol=1.e-6,const int wsolver=0,const bool benson=false); - virtual void createRestartByTime(const int day,const int hour=0,const int minute=0,const int second=0); - virtual void createRestartBySteps(const int numstep); - - virtual void createStrainMapping(const std::string filename); - virtual void setStrainMappingFollowing(const bool flag); + void physInitBroken(const int phys); +// void setInitOrRestartFileName(const std::string fname); + void contactInteraction(contactDomain *cdom); + void defoDefoContactInteraction(defoDefoContactDomain *cdom); + void archivingRigidContact(const int numphys, const int comp, const int wc=0,const int nstep=1); + void unknownBuildView(const int comp=0,const int nbstep=1); + void OneUnknownBuildView(const std::string vname, const int comp,const int nbstep=1); + void internalPointBuildView(const std::string vname,const int comp,const int nbstep=1,const int ev=-1); + void energyBuildView(const std::string vname,const int comp,const int nbstep=1); + void energyComputation(const int val=1); + void fractureEnergy(const int val=0); + void crackTracking(std::string fname);// time and time step + void postproFragment(std::string fname); + void resetBoundaryConditions(const bool notResetUnknwown = true); // true if do not modify unknwons false if do + void resetContactInteraction(); + void disableResetRestart(); //to avoid restart at a change of solver + void setFactorOnArchivingFiles(const int fact); // only for csv files (for view use nstepBetweenArchiving) + void dynamicRelaxation(const double gams,const double ftime,const double tol=1.e-6,const int wsolver=0,const bool benson=false); + void createRestartByTime(const int day,const int hour=0,const int minute=0,const int second=0); + void createRestartBySteps(const int numstep); + + void createStrainMapping(const std::string filename, const int nbstepArch=1); // Get the value of a Dof contained in a txt file - virtual double getArchivedNodalValue(const int numphys,const int comp,nonLinearBoundaryCondition::whichCondition) const; - virtual double getArchivedForceOnPhysicalGroup(std::string onwhat, const int numphys,const int comp) const; - virtual double getEnergy(int we) const; - virtual double getHomogenizedStress(const int i, const int j) const; - virtual double getHomogenizedTangent(const int i, const int j, const int k, const int l) const; - virtual double getHomogenizedSecondStress(const int i, const int j, const int k) const; - virtual double getHomogenizedSecondTangent(const int i, const int j, const int k, const int p, const int q, const int r) const; - virtual double getHomogenizedFirstSecondTangent(const int i, const int j, const int p, const int q, const int r) const; - virtual double getHomogenizedSecondFirstTangent(const int i, const int j, const int k, const int p, const int q) const; - virtual double getHomogenizedCohesiveJump(const int i) const; - virtual double getNodeIP(const int physical, const int ipVal) const; + double getArchivedNodalValue(const int numphys,const int comp,nonLinearBoundaryCondition::whichCondition) const; + double getArchivedForceOnPhysicalGroup(std::string onwhat, const int numphys,const int comp) const; + double getEnergy(int we) const; + double getHomogenizedStress(const int i, const int j) const; + double getHomogenizedTangent(const int i, const int j, const int k, const int l) const; + double getHomogenizedSecondStress(const int i, const int j, const int k) const; + double getHomogenizedSecondTangent(const int i, const int j, const int k, const int p, const int q, const int r) const; + double getHomogenizedFirstSecondTangent(const int i, const int j, const int p, const int q, const int r) const; + double getHomogenizedSecondFirstTangent(const int i, const int j, const int k, const int p, const int q) const; + double getHomogenizedCohesiveJump(const int i) const; + double getNodeIP(const int physical, const int ipVal) const; void setSelectiveUpdate(const selectiveUpdateBase& selectiveObj); void endSchemeMonitoring(const EndSchemeMonitoringBase& endObj); - bool solverEndedByMornitoring() const; void setNoMassPredicorWithoutVelocityAndAcceleration(const bool fl); // Failure control settings // for crack insertion - virtual void setMaxAllowedCrackInsertionAtOneStep(const int maxNum); + void setMaxAllowedCrackInsertionAtOneStep(const int maxNum); // for element erosion - virtual void setElementErosion(const bool bulkErosion, const bool interfaceErosion, const int method); - virtual void setGlobalErosionCheck(const bool flag, const FailureCriterionBase* fcr); + void setElementErosion(const bool bulkErosion, const bool interfaceErosion, const int method); + void setGlobalErosionCheck(const bool flag, const FailureCriterionBase* fcr); /** To control via Onelab **/ // Explicit scheme control - virtual void initializeExplicitScheme(); - virtual double oneExplicitStep(const double curtime, bool &forceTimeStepEvaluation); - virtual double finalizeExplicitScheme(const double curtime); + void initializeExplicitScheme(); + double oneExplicitStep(const double curtime, bool &forceTimeStepEvaluation); + double finalizeExplicitScheme(const double curtime); // Implicit scheme control - virtual void initializeStaticScheme(); - virtual int oneStaticStep(const double curtime, const double dt, const int numstep); - virtual double finalizeStaticScheme(const double curtime, const int numstep); + void initializeStaticScheme(); + int oneStaticStep(const double curtime, const double dt, const int numstep); + void oneStepPostSolve(const double curtime, const int numstep); + double finalizeStaticScheme(const double curtime, const int numstep); // Display control - virtual void createOnelabDisplacementView(const std::string &fname,const double time) const; - virtual void createOnelabVelocityView(const std::string &fname,const double time) const; + void createOnelabDisplacementView(const std::string &fname,const double time) const; + void createOnelabVelocityView(const std::string &fname,const double time) const; // Onelab can only access to dof that are archived in txt files // They are given in the order defined by the user in his/her python files - virtual void getOnelabArchiveNodalUnknowns(fullVector<double> &nodalValues) const; - - virtual bool checkVertexBelongToDomains(const int phyVer) const; - -// for periodic BC - public: - /** - * 3 method for constraint treatment - * DISP_ELIM = displacement elimination - * MULT_ELIM = multiplier elimination - * DISP_MULT = displacement + multiplier system, no elimination - */ - enum SYSTEM_TYPE{DISP_ELIM=0, MULT_ELIM = 1, DISP_MULT=2, DISP_ELIM_UNIFIED=3}; - /** - * homogenized stress method by volume or surface integral - */ - enum STRESS_HOMO_TYPE{VOLUME=0, SURFACE=1}; - /** - * homogenized tangent by perturbation of by condensation - */ - enum TANGENT_HOMO_TYPE{PERTURB=0, CONDEN=1, INSYSTEMCONDEN=2, UNIFIED_CONDEN=3}; - /** - * if LOAD_CONTROL , solve until time = 1. - * if ARC_CONTROL_EULER, solve by explicit Euler and only at microlevel - */ - enum CONTROL_TYPE{LOAD_CONTROL=0, ARC_CONTROL_EULER=1}; - - enum EIGENSOLVER_TYPE{STATIC = 0, DYNAMIC=1}; - - /** - ** microscopic tests - **/ - protected: - #ifndef SWIG - // time and time step - double _macroTimeStep; // for law which works on increment. (Use only in so no getTimeStep function) - double _macroTime; // To save results vs time - int _macroStep; // current macroscopic step - - //for micro flag - SYSTEM_TYPE _systemType; - CONTROL_TYPE _controlType; - // micro flag--> true if microsolver is used - bool _microFlag, _multiscaleFlag; - // Element number and Integration point number - int _enum, _gnum; - //micro BC - nonLinearMicroBC* _microBC; - nonLinearMicroBC* _microBCOld; - nonLinearMicroBC* _microFailureBC; - //stress flag and tangent flag - bool _stressflag, _tangentflag; - // homogenized density - double _rho; - // homogenized stresses - double _sameStateCriterion; // this parameter to check if same sate-> economise - homogenizedData* _currentState, *_initialState, *_elasticState; - // highorder flag : true if using second order multiscale analysis - bool _highOrderFlag; - // homogenized method - STRESS_HOMO_TYPE _homogenizeStressMethod; - TANGENT_HOMO_TYPE _homogenizeTangentMethod; - - // for managing periodic boudary condition - pbcAlgorithm* _pAl; - // for tangent estimation - stiffnessCondensation* _condensation; - // eigensolver using for stability analysis - bool _eigflag; - eigenSolver* _eigenSolver; - EIGENSOLVER_TYPE _eigenSolverType; // static - K only, and dynamic K and M - bool _MKToFile; - int _eigenSolverNumIteration; - std::string _eigenSolverMethod; // - double _eigenSolverConvergenCriterion; - bool _hermitian; // if matrix is symmetrical or not - std::vector<std::vector<nlsField::dataBuildView> > _eigview; - std::vector<unknownField*> _eigfield; - std::vector<int> _modeview; - int _numeigenvalue; - double _perturbationfactor, _instabilitycriterion; - bool _eigenFollowing, _perturbate; - // for archiving - bool _archive; - int _iterMax; - // all homogenized filename - bool _isHommProSaveToFile; // flag -->save homogenized properties to files - bool _isHommStrainSaveToFile; //flag --> save homogenized strain to files - bool _extractPerturbationToFile; //flag --> save perturbation on RVE boundary to file - homogenizedDataFiles* _homogenizedFiles; // homogenized file data - bool _messageView; // flag to archive message to file - FILE* _outputFile; // output file --> if set _messagive - FILE* _eigenValueFile; // eigenvalus file - FILE* _criterionFile; // criterion to file - FILE* _pbcNodeData; // periodic BC based on file - double _tangentPerturbation; // tangent by perturbation - double _rveVolume; // rve volume - bool _isWriteDeformedMeshToFile; // write deformed mesh to file - - bool _stabilityCriterionFollowing; - bool _isPerturbedEigenMode; - int _numberPerturbedMode; - double _valPerturbedMode; - std::vector<FILE*> _allModeData; - // for test - bool _testFlag; - pbcConstraintElementGroup* _pbcGroup; - - bool _damageIsBlocked; - bool _solverIsBroken; - bool _checkFailureOnset; // - bool _checkWithNormal; // - bool _damageToCohesiveJump; // true if extracting cohsive law - - STensor3 _FdamOnset; // average damage deformation atinitCornerBC failure onset - SVector3 _lostSolutionUniquenssNormal; // normal to cohesive element - double _RVELengthInCohesiveNormal; // length perpendicular to cohesive normal - double _surfaceReductionRatio; // load carrying surface over nominal surface following cohesive normal - - double _maximalLostEllipticityCriterion; // maximal value - double _lostSolutionUniquenssTolerance; - double _voidPartInLocalizationBand; // void part in localization band - - bool _extractIrreversibleEnergy; // flag + void getOnelabArchiveNodalUnknowns(fullVector<double> &nodalValues) const; - // last extract value - STensor3 _homogenizedStressLastActiveDissipation; - STensor3 _homogenizedStrainLastActiveDissipation; - STensor3 _homogenizedDissipationStrainLastActiveDissipation; - SVector3 _homogenizedCohesiveJumpLastActiveDissipation; - - double _homogenizedCrackSurface; - bool _useMatMatSolveToInvertMatrix; + bool checkVertexBelongToDomains(const int phyVer) const; - // - bool _failureBCIsSwitched; // true if FailureBC is switsched after failure, - - // - bool _extractElasticTangentOperator; // true if elastic tangent operator is extracted at the same time as full tangent operator - FILE* _elasticDPDFTangentFile; - - #endif //SWIG protected: - #ifndef SWIG + #ifndef SWIG void init2Micro(); void switchMicroBC(const nonLinearMicroBC* mbc); void setTimeForMicroBC(const double time); @@ -949,10 +1067,7 @@ class nonLinearMechSolver void homogenizedDataToFile(const double time); void computeDensity(); - // for eigen value problem - void createEigenvalueSolver(); - double critialPointTestFunction(double time, double* &mode); - void modeViewToFile(std::vector<int>& num, double time, int step); + // newton raphson int microNewtonRaphson(const int numstep); int microNewtonRaphsonPathFollowing(const int numstep); @@ -960,7 +1075,6 @@ class nonLinearMechSolver int pathFollowingPerturbation(); linearSystem<double>* createMicroSNLSystem(); - void microPostSolveStep(const double curtime, const int iter); void createMicroSystem(); double solveMicroSolverSNL(); @@ -969,11 +1083,9 @@ class nonLinearMechSolver void OneStep(const int numstep); - void writeDisturbedMeshByEigenVector(int step); - void writeDeformedMesh(int step); - #endif // SWIG + + public: - #ifndef SWIG void setTime(const double ctime,const double dtime, const int curstep); // RVE analysis newton raphson double microSolveStaticLinear(); @@ -982,8 +1094,6 @@ class nonLinearMechSolver double getRVEVolume() const; bool dissipationIsBlocked() const; void blockDissipation(const IPStateBase::whichState ws, const bool fl); - int getElementSolverNumber() const; - int getGaussPointSolverNumber() const; void extractAverageProperties(bool stiff); homogenizedData* getHomogenizationState(const IPStateBase::whichState state); const homogenizedData* getHomogenizationState(const IPStateBase::whichState state) const; @@ -996,7 +1106,6 @@ class nonLinearMechSolver void resetSolverToInitialStep(); - void closeAllFile(); void checkFailureOnset(); @@ -1020,31 +1129,21 @@ class nonLinearMechSolver STensor3& getFdamOnset(); const STensor3& getFdamOnset() const; - - FILE * getPBCFile() {return _pbcNodeData;}; - #endif // SWIG + public: void createMicroModel(const std::string geoFile, const int dim, const int order, const bool incomplte = false); void setMicroProblemIndentification(int ele, int gpt); + void setMicroProblemIndentification(int eleMinus, int elePlus, int gpt); void initMicroSolver(); double microSolve(); - void nextStep(); - void archiveData(const double curtime, const int numstep); + void prepareForNextMicroSolve(); + void archiveData(const double curtime, const int numstep, const bool forceView); void setMessageView(const bool view); void setPeriodicity(const double x, const double y, const double z, const std::string direction); void addMicroBC(const nonLinearMicroBC* bc); void addMicroBCForFailure(const nonLinearMicroBC* bc); - // for instability - void eigenValueSolver(const int num = 10, const bool fl = true); // number of eigenvalue - void setEigenSolverParamerters(const int type, const int numiter, const std::string method, const double tol, const bool mktofile = false, const bool hem = true); - void setModeView(const int view); // for view buckling mode - void setPerturbationFactor(const double val = 1e-2); - void setInstabilityCriterion(const double val = 1e-6); - void perturbateBucklingModeByMinimalEigenValueMode(const bool flag = true); - void setEigenSolverFollowing(const bool flag); - void setStabilityCriterionFollowing(const bool flag); // get macro properties void tangentAveragingFlag(const bool fl = true); @@ -1072,15 +1171,9 @@ class nonLinearMechSolver void setMultiscaleFlag( const bool flag); void setSameStateCriterion(const double cr); void saveStiffnessMatrixToFile(const int iter); - void invertFlag(const bool fl); - void readPBCDataFromFile(const std::string fn); void setRVEVolume(const double val); void setWriteDeformedMeshToFile(bool flag); - void setDisturbedEigenMode(int numMode, double val, bool flag = true); - void addModeData(std::string filename); - void writeDisturbedMeshByEigenVectorFromFile(); - /** perform a particular test**/ void activateTest(const bool flag); diff --git a/NonLinearSolver/nlsolver/strainMapping.cpp b/NonLinearSolver/nlsolver/strainMapping.cpp index ba34bfc1552ca10002c2eccf03473a1c056fc49a..009be87c98349bc004c53236028a2cbfc6c4fd09 100644 --- a/NonLinearSolver/nlsolver/strainMapping.cpp +++ b/NonLinearSolver/nlsolver/strainMapping.cpp @@ -10,8 +10,11 @@ // #include "strainMapping.h" #include "MPoint.h" +#include "nonLinearMechSolver.h" + +strainMapping::strainMapping(nonLinearMechSolver& s , const int stepArch):_solver(s), _pModel(NULL), _g(NULL), +_lastSaveStep(0),_numStepBetweenTwoSaves(stepArch),_meshFileName(""){} -strainMapping::strainMapping(std::vector<partDomain*>& dom):_allDomain(dom), _pModel(NULL){} strainMapping::~strainMapping(){ _nodeElementMap.clear(); _elementValue.clear(); @@ -21,6 +24,7 @@ strainMapping::~strainMapping(){ } void strainMapping::readMesh(const std::string meshFileName){ + _meshFileName = meshFileName; _pModel = new GModel(); _pModel->readMSH(meshFileName.c_str()); int dim = _pModel->getNumRegions() ? 3 : 2; @@ -39,8 +43,8 @@ void strainMapping::readMesh(const std::string meshFileName){ } } - - FILE* file = fopen("elementCenter.txt","w"); + std::string fName = _solver.getFileSavingPrefix() + "elementCenter.txt"; + FILE* file = fopen(fName.c_str(),"w"); for (groupOfElements::elementContainer::iterator it = _g->begin(); it!= _g->end(); it++){ MElement* e = *it; @@ -63,11 +67,12 @@ void strainMapping::readMesh(const std::string meshFileName){ } fclose(file); + std::vector<partDomain*>& allDomain = *(_solver.getDomainVector()); for (groupOfElements::elementContainer::iterator itg = _g->begin(); itg!= _g->end(); itg++){ MElement* e = *itg; std::map<partDomain*,groupOfElements*> insideEle; - for (int i=0; i<_allDomain.size(); i++){ - partDomain* dom = _allDomain[i]; + for (int i=0; i<allDomain.size(); i++){ + partDomain* dom = allDomain[i]; groupOfElements* gr = new groupOfElements(); for (groupOfElements::elementContainer::iterator it = dom->g_cbegin(); it!= dom->g_cend(); it++){ MElement* ele = *it; @@ -116,13 +121,13 @@ void strainMapping::getMeanValueOnElement(dofManager<double>* p, MElement* e, SV val*= inv; } } -void strainMapping::solve(dofManager<double>* p){ +void strainMapping::solve(){ printf("Begin creating mapping \n"); // create displacement mean by element for (groupOfElements::elementContainer::iterator it = _g->begin(); it!= _g->end(); it++){ MElement* e = *it; SVector3 val(0.); - this->getMeanValueOnElement(p,e,val); + this->getMeanValueOnElement(_solver.getDofManager(),e,val); _elementValue[e] = val; } @@ -248,3 +253,20 @@ void strainMapping::buildStrainView(const std::string postFileName){ delete pv; }; + +void strainMapping::buildDisplacementViewAndStrainView(int step, bool forceView) +{ + if (step > _lastSaveStep) + { + if ( (step%_numStepBetweenTwoSaves == 0) or forceView) + { + _lastSaveStep = step; + Msg::Info("Create displacement and strain mapping"); + this->solve(); + std::string filename = "dispMap_step"+int2str(step)+".msh"; + this->buildDisplacementView(filename); + filename = "strainMap_step"+int2str(step)+".msh"; + this->buildStrainView(filename); + } + } +}; \ No newline at end of file diff --git a/NonLinearSolver/nlsolver/strainMapping.h b/NonLinearSolver/nlsolver/strainMapping.h index 54b932959d438d895f8b460e9e9fe6af2e3a24f0..aea64684c0125428621e35c4917501c97300cf96 100644 --- a/NonLinearSolver/nlsolver/strainMapping.h +++ b/NonLinearSolver/nlsolver/strainMapping.h @@ -20,7 +20,9 @@ class strainMapping{ protected: - std::vector<partDomain*>& _allDomain; + nonLinearMechSolver& _solver; + std::string _meshFileName; + // GModel *_pModel; groupOfElements* _g; std::map<MVertex*, std::set<MElement*> > _nodeElementMap; @@ -29,17 +31,23 @@ class strainMapping{ std::map<MVertex*, SVector3> _nodeValue; std::map<MElement*,std::map<partDomain*,groupOfElements*> > _meanMap; - + + int _lastSaveStep; + int _numStepBetweenTwoSaves; + + protected: + void getMeanValueOnElement(dofManager<double>* p, MElement* e, SVector3& val); + void solve(); + void buildDisplacementView(const std::string postFileName); + void buildStrainView(const std::string postFileName); public: - strainMapping(std::vector<partDomain*>& dom); + strainMapping(nonLinearMechSolver& s, const int stepArch=1); ~strainMapping(); - + std::string getMappingMeshFileName() const {return _meshFileName;}; + int getNumStepBetweenTwoSaves() const {return _numStepBetweenTwoSaves;}; void readMesh(const std::string meshFileName); - void getMeanValueOnElement(dofManager<double>* p, MElement* e, SVector3& val); - void solve(dofManager<double>* p); - void buildDisplacementView(const std::string postFileName); - void buildStrainView(const std::string postFileName); + void buildDisplacementViewAndStrainView(int numstep, bool force); }; #endif // STRAINMAPPING_H_ diff --git a/NonLinearSolver/pathFollowing/generalLocalControlBasedPathFollowingSystemPETSc.h b/NonLinearSolver/pathFollowing/generalLocalControlBasedPathFollowingSystemPETSc.h index 5c112c4642c7a7164627b2c928b49b9815ef3e5b..19998827bb9d8197acbefa896f4dd51c12f94983 100644 --- a/NonLinearSolver/pathFollowing/generalLocalControlBasedPathFollowingSystemPETSc.h +++ b/NonLinearSolver/pathFollowing/generalLocalControlBasedPathFollowingSystemPETSc.h @@ -42,7 +42,7 @@ class generalLocalControlBasedPathFollowingSystemPETSc : public nonLinearSystem _pseudoTimeIncrement(0.){}; virtual ~generalLocalControlBasedPathFollowingSystemPETSc(){} - virtual void setPseudoTimeIncrement(const double dt) { + virtual void setPathFollowingIncrement(const double dt) { _pseudoTimeIncrement = dt; if (this->_controlType == pathFollowingSystemBase::LOAD_CONTROL){ // if load control, _pseudoTimeIncrement is the prescribed loa @@ -297,7 +297,7 @@ class generalLocalControlBasedPathFollowingSystemPETSc : public nonLinearSystem virtual ~generalLocalControlBasedPathFollowingSystemPETSc(){} virtual double getControlParameter() const {return 0;}; virtual double getControlParameterStep() const {return 0.;}; - virtual void setPseudoTimeIncrement(const double dt) {}; + virtual void setPathFollowingIncrement(const double dt) {}; virtual double getStateParameter() const {return 0.;}; virtual void resetControlParameter() {}; virtual void addToPathFollowingContraint(const scalar& val) {}; diff --git a/NonLinearSolver/pathFollowing/pathFollowingSystem.h b/NonLinearSolver/pathFollowing/pathFollowingSystem.h index e50e6bbbdae3f4d3806e44c143243e32ccded8f2..873c12f8a9877df38f1a73140ff189a7e0e6b4d9 100644 --- a/NonLinearSolver/pathFollowing/pathFollowingSystem.h +++ b/NonLinearSolver/pathFollowing/pathFollowingSystem.h @@ -15,7 +15,7 @@ // Phi - s = 0; // lambda == getControlParameter // q == load vector -// s == setPseudoTimeIncrement (arclength) +// s == setPathFollowingIncrement (arclength) // Phi == path following left hand side // dPhi/du == path following constraint vector @@ -69,7 +69,7 @@ class pathFollowingSystemBase{ virtual double getControlParameter() const = 0; virtual double getControlParameterStep() const = 0; /**arc-length increment or load increment depend on control type **/ - virtual void setPseudoTimeIncrement(const double dt) = 0; + virtual void setPathFollowingIncrement(const double dt) = 0; /**state parameter to draw the equilibrium path **/ virtual double getStateParameter() const = 0; virtual void resetControlParameter() = 0; diff --git a/NonLinearSolver/pathFollowing/pathFollowingSystemPETSc.h b/NonLinearSolver/pathFollowing/pathFollowingSystemPETSc.h index 299bff395fc3197ed4eb94a2bd380aced10feb1c..c3cc3e0761bc454555769c5fbc796b2f5b9f3178 100644 --- a/NonLinearSolver/pathFollowing/pathFollowingSystemPETSc.h +++ b/NonLinearSolver/pathFollowing/pathFollowingSystemPETSc.h @@ -80,7 +80,7 @@ class pathFollowingSystemPETSC : public nonLinearSystemPETSc<scalar>, } } - virtual void setPseudoTimeIncrement(const double dt) { + virtual void setPathFollowingIncrement(const double dt) { _pseudoTimeIncrement = dt; }; @@ -519,7 +519,7 @@ class pathFollowingSystemPETSC : public nonLinearSystemPETSc<scalar>, virtual ~pathFollowingSystemPETSC(){} virtual double getControlParameter() const {return 0;}; virtual double getControlParameterStep() const {return 0.;}; - virtual void setPseudoTimeIncrement(const double dt) {}; + virtual void setPathFollowingIncrement(const double dt) {}; virtual double getStateParameter() const {return 0.;}; virtual void resetControlParameter() {}; virtual void addToPathFollowingContraint(const scalar& val) {}; diff --git a/NonLinearSolver/pathFollowing/pbcPathFollowingSystemPETSc.h b/NonLinearSolver/pathFollowing/pbcPathFollowingSystemPETSc.h index 281304493685174e88cc3bc10c8f65a01df8944b..c3df2c385a178ddc8c6eb5ce0512e6e3a021b3cc 100644 --- a/NonLinearSolver/pathFollowing/pbcPathFollowingSystemPETSc.h +++ b/NonLinearSolver/pathFollowing/pbcPathFollowingSystemPETSc.h @@ -42,7 +42,7 @@ class pbcPathFollowingSystemPETSC : public pbcNonLinearSystemPETSc<scalar>, public: pbcPathFollowingSystemPETSC(MPI_Comm com = PETSC_COMM_SELF) : pbcNonLinearSystemPETSc<scalar>(com),pathFollowingSystem<scalar>(), _controlParameter(0.),_controlParameterPrev(0.),_controlStep(0), _pseudoTimeIncrement(0.), _pseudoTimeIncrement_prev(0.), - _aU(1.),_aL(1),_iter(1),_uScale(1.),uScale2(1.),_setScale(false){} + _aU(1.),_aL(1),_iter(0),_uScale(1.),uScale2(1.),_setScale(false){} virtual ~pbcPathFollowingSystemPETSC(){} virtual void setControlType(const int i){ @@ -68,7 +68,7 @@ class pbcPathFollowingSystemPETSC : public pbcNonLinearSystemPETSc<scalar>, } - virtual void setPseudoTimeIncrement(const double dt) { + virtual void setPathFollowingIncrement(const double dt) { _pseudoTimeIncrement = dt; }; @@ -383,7 +383,7 @@ class pbcPathFollowingSystemPETSC : public pbcNonLinearSystemPETSc<scalar>, pbcPathFollowingSystemPETSC(){Msg::Error("petsc is required");}; virtual double getControlParameter() const {return 0;}; virtual double getControlParameterStep() const {return 0.;}; - virtual void setPseudoTimeIncrement(const double dt) {}; + virtual void setPathFollowingIncrement(const double dt) {}; virtual double getStateParameter() const {return 0.;}; virtual void resetControlParameter() {}; virtual void addToPathFollowingContraint(const scalar& val) {}; diff --git a/NonLinearSolver/periodicBC/extractMacroPropertiesPETSc.cpp b/NonLinearSolver/periodicBC/extractMacroPropertiesPETSc.cpp index 91324666d63d2f99be191cff22963662ecb96138..9f4a83b96f9738e821989c0c7fab04c9b7d42a1b 100644 --- a/NonLinearSolver/periodicBC/extractMacroPropertiesPETSc.cpp +++ b/NonLinearSolver/periodicBC/extractMacroPropertiesPETSc.cpp @@ -65,7 +65,7 @@ void stiffnessCondensationPETScWithDirectConstraints::init(){ _try(MatDestroy(&invCbCbT)); }; - _try(MatConvert(Cb,MATDENSE,MAT_REUSE_MATRIX,&Cb)); + _try(MatConvert(Cb,MATDENSE,MAT_INPLACE_MATRIX,&Cb)); // all necessary transpose matrix _try(MatTranspose(Sb,MAT_INITIAL_MATRIX,&_SbT)); _try(MatTranspose(Cb,MAT_INITIAL_MATRIX,&_CbT)); @@ -215,8 +215,8 @@ void stiffnessCondensationPETScWithDirectConstraints::tangentCondensationSolve(f Mat& Sc = _cConMat->getKinematicalMatrix(); Mat Kccstar, Kblambda, Cbc, Ccb; - _try(MatConvert(Cb,MATDENSE,MAT_REUSE_MATRIX,&Cb)); - _try(MatConvert(_CbT,MATDENSE,MAT_REUSE_MATRIX,&_CbT)); + _try(MatConvert(Cb,MATDENSE,MAT_INPLACE_MATRIX,&Cb)); + _try(MatConvert(_CbT,MATDENSE,MAT_INPLACE_MATRIX,&_CbT)); _try(functionPETSc::CondenseMatrixBlocks(Kbbt,Kbct,_CbT,Kcbt,Kcct,_CcT,Cb,Cc,PETSC_NULL,&Kccstar,&Ccb,&Cbc,&Kblambda)); @@ -497,7 +497,7 @@ void stiffnessCondensationPETSc::init(){ _try(MatDestroy(&CCT)); _try(MatDestroy(&invCCT)); }; - _try(MatConvert(C,MATDENSE,MAT_REUSE_MATRIX,&C)); + _try(MatConvert(C,MATDENSE,MAT_INPLACE_MATRIX,&C)); _try(MatTranspose(C,MAT_INITIAL_MATRIX,&_CT)); _try(MatTranspose(S,MAT_INITIAL_MATRIX,&_ST)); } diff --git a/NonLinearSolver/periodicBC/functionPETSc.cpp b/NonLinearSolver/periodicBC/functionPETSc.cpp index 4a0fa497a7809384a097ef85c79e2ee40b53e41c..1d5df0d6b1efbe4bd0f9fd089f4f29f1bb313562 100644 --- a/NonLinearSolver/periodicBC/functionPETSc.cpp +++ b/NonLinearSolver/periodicBC/functionPETSc.cpp @@ -80,7 +80,7 @@ PetscErrorCode functionPETSc::GetFactorMatrix(Mat A11, Mat* F){ case 0: Msg::Info("using SUPERLU LU"); if (matType != "seqaij"){ - _try(MatConvert(A11,MATSEQAIJ,MAT_REUSE_MATRIX,&A11)); + _try(MatConvert(A11,MATSEQAIJ,MAT_INPLACE_MATRIX,&A11)); } _try(MatGetFactor(A11,MATSOLVERSUPERLU,MAT_FACTOR_LU,F)); break; @@ -89,7 +89,7 @@ PetscErrorCode functionPETSc::GetFactorMatrix(Mat A11, Mat* F){ case 1: Msg::Info("using SUPERLU_DIST LU"); if (matType != "seqaij"){ - _try(MatConvert(A11,MATSEQAIJ,MAT_REUSE_MATRIX,&A11)); + _try(MatConvert(A11,MATSEQAIJ,MAT_INPLACE_MATRIX,&A11)); } _try(MatGetFactor(A11,MATSOLVERSUPERLU_DIST,MAT_FACTOR_LU,F)); break; @@ -98,7 +98,7 @@ PetscErrorCode functionPETSc::GetFactorMatrix(Mat A11, Mat* F){ case 2: Msg::Info("using MUMPS LU"); if (matType != "seqaij"){ - _try(MatConvert(A11,MATSEQAIJ,MAT_REUSE_MATRIX,&A11)); + _try(MatConvert(A11,MATSEQAIJ,MAT_INPLACE_MATRIX,&A11)); } _try(MatGetFactor(A11,MATSOLVERMUMPS,MAT_FACTOR_LU,F)); // test mumps options @@ -115,7 +115,7 @@ PetscErrorCode functionPETSc::GetFactorMatrix(Mat A11, Mat* F){ case 3: Msg::Info("using UMFPACK LU"); if (matType != "seqaij"){ - _try(MatConvert(A11,MATSEQAIJ,MAT_REUSE_MATRIX,&A11)); + _try(MatConvert(A11,MATSEQAIJ,MAT_INPLACE_MATRIX,&A11)); } _try(MatGetFactor(A11,MATSOLVERUMFPACK,MAT_FACTOR_LU,F)); break; @@ -188,18 +188,6 @@ PetscErrorCode functionPETSc::CondenseMatrixBlocks(Mat A11, Mat A12, Mat A13, //destroy the temp matrix _try(MatDestroy(&invA11A13)); - _try(MatAssemblyBegin(*B22,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B22,MAT_FINAL_ASSEMBLY)); - - _try(MatAssemblyBegin(*B23,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B23,MAT_FINAL_ASSEMBLY)); - - _try(MatAssemblyBegin(*B32,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B32,MAT_FINAL_ASSEMBLY)); - - _try(MatAssemblyBegin(*B33,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B33,MAT_FINAL_ASSEMBLY)); - t = Cpu() - t; Msg::Info("Done performing 3x3 to 2x2 condensation (%f s)",t); PetscFunctionReturn(0); @@ -227,8 +215,6 @@ PetscErrorCode functionPETSc::CondenseMatrixBlocks(Mat A11, Mat A12, if (A22){ _try(MatAXPY(*B22,1.,A22,DIFFERENT_NONZERO_PATTERN)); } - _try(MatAssemblyBegin(*B22,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B22,MAT_FINAL_ASSEMBLY)); //destroy the temp matrix t = Cpu() - t; @@ -323,10 +309,6 @@ PetscErrorCode functionPETSc::GetSchurComplementMat(Mat fA11, Mat A12, Mat A21, #ifdef _DEBUG Msg::Info("Begin computing Schur complement"); #endif - _try(MatAssemblyBegin(A12,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(A12,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyBegin(A21,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(A21,MAT_FINAL_ASSEMBLY)); Mat invA11A12; _try(MatDuplicate(A12,MAT_DO_NOT_COPY_VALUES,&invA11A12)); @@ -336,12 +318,8 @@ PetscErrorCode functionPETSc::GetSchurComplementMat(Mat fA11, Mat A12, Mat A21, _try(MatScale(*A,-1.)); if (A22){ - _try(MatAssemblyBegin(A22,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(A22,MAT_FINAL_ASSEMBLY)); _try(MatAXPY(*A,1.,A22,DIFFERENT_NONZERO_PATTERN)); } - _try(MatAssemblyBegin(*A,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*A,MAT_FINAL_ASSEMBLY)); //destroy the temp matrix _try(MatDestroy(&invA11A12)); @@ -354,12 +332,6 @@ PetscErrorCode functionPETSc::GetSchurComplementMat(Mat fA11, Mat A12, Mat A21, PetscErrorCode functionPETSc::GetSchurComplementMat_Naive(KSP& ksp, Mat A11, Mat A12, Mat A21, Mat A22, Mat* A){ MPI_Comm comm = PETSC_COMM_WORLD; //Msg::Info("Begin computing Schur complement"); - _try(MatAssemblyBegin(A12,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(A12,MAT_FINAL_ASSEMBLY)); - - _try(MatAssemblyBegin(A21,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(A21,MAT_FINAL_ASSEMBLY)); - PetscInt M21, N21, M12, N12; _try(MatGetSize(A12,&M12,&N12)); _try(MatGetSize(A21,&M21,&N21)); @@ -376,9 +348,6 @@ PetscErrorCode functionPETSc::GetSchurComplementMat_Naive(KSP& ksp, Mat A11, Mat _try(MatSetFromOptions(*A)); }; - _try(MatAssemblyBegin(*A,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*A,MAT_FINAL_ASSEMBLY)); - Mat invA11A12; _try(MatDuplicate(A12,MAT_DO_NOT_COPY_VALUES,&invA11A12)); @@ -414,15 +383,10 @@ PetscErrorCode functionPETSc::GetSchurComplementMat_Naive(KSP& ksp, Mat A11, Mat _try(MatDuplicate(*A,MAT_DO_NOT_COPY_VALUES,&A21invA11A12)); _try(MatMatMult(A21,invA11A12, MAT_INITIAL_MATRIX,PETSC_DEFAULT,&A21invA11A12)); - _try(MatAssemblyBegin(A21invA11A12,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(A21invA11A12,MAT_FINAL_ASSEMBLY)); - _try(MatAXPY(*A,-1,A21invA11A12,DIFFERENT_NONZERO_PATTERN)); - _try(MatAssemblyBegin(*A,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*A,MAT_FINAL_ASSEMBLY)); //destroy the temp matrix _try(MatDestroy(&invA11A12)); - _try(MatDestroy(&A21invA11A12)); + _try(MatDestroy(&A21invA11A12)); // //Msg::Info("End computing Schur complement"); PetscFunctionReturn(0); @@ -442,10 +406,8 @@ PetscErrorCode functionPETSc::MatInverse_MatMatSolve(Mat A, Mat* B, MPI_Comm com // create multiple RHS identity matrix Mat I; _try(MatDuplicate(A,MAT_DO_NOT_COPY_VALUES,&I)); - _try(MatConvert(I,MATDENSE,MAT_REUSE_MATRIX,&I)); + _try(MatConvert(I,MATDENSE,MAT_INPLACE_MATRIX,&I)); _try(MatShift(I,1.)); - _try(MatAssemblyBegin(I,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(I,MAT_FINAL_ASSEMBLY)); Mat invA; _try(MatDuplicate(I,MAT_DO_NOT_COPY_VALUES,B)); @@ -453,9 +415,7 @@ PetscErrorCode functionPETSc::MatInverse_MatMatSolve(Mat A, Mat* B, MPI_Comm com _try(MatDestroy(&I)); _try(MatDestroy(&F)); // create matrix B - _try(MatConvert(*B,MATAIJ,MAT_REUSE_MATRIX,B)); - _try(MatAssemblyBegin(*B,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B,MAT_FINAL_ASSEMBLY)); + _try(MatConvert(*B,MATAIJ,MAT_INPLACE_MATRIX,B)); t = Cpu() -t; Msg::Info("Done inverting matrix MatInverse_MatMatSolve (%f s)",t); @@ -540,8 +500,6 @@ PetscErrorCode functionPETSc::MatMatSolve_MultipleRHS(Mat A, Mat RHS, Mat* B){ _try(MatMatSolve(F,RHS,*B)); _try(MatDestroy(&F)); // create matrix B - _try(MatAssemblyBegin(*B,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B,MAT_FINAL_ASSEMBLY)); t = Cpu() -t; Msg::Info("Done performing MatMatSolve_MultipleRHS (%f s)",t); @@ -566,13 +524,7 @@ PetscErrorCode functionPETSc::MatMatSolve_MultipleRHS(Mat A, Mat RHS1, Mat RHS2, _try(MatMatSolve(F,RHS2,*B2)); _try(MatDestroy(&F)); - // create matrix B - _try(MatAssemblyBegin(*B1,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B1,MAT_FINAL_ASSEMBLY)); - - _try(MatAssemblyBegin(*B2,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(*B2,MAT_FINAL_ASSEMBLY)); - + t = Cpu() -t; Msg::Info("Done performing MatMatSolve_MultipleRHS (%f s)",t); PetscFunctionReturn(0); diff --git a/NonLinearSolver/periodicBC/geometryRotation.cpp b/NonLinearSolver/periodicBC/geometryRotation.cpp index fb91b3243e033b0f4ea4a047420ca2b83dcebeba..01f028811c8481cf32903b37ac59517ec5a22a9e 100644 --- a/NonLinearSolver/periodicBC/geometryRotation.cpp +++ b/NonLinearSolver/periodicBC/geometryRotation.cpp @@ -20,7 +20,7 @@ GeometryRotation::~GeometryRotation(){ }; void GeometryRotation::exportRotatedModel(const SVector3& e1, const SVector3& e2, const SVector3& e3, // reference coordinate system - GModel* pModel, const int elenum, const int gpt, + GModel* pModel, const std::string filePrefix, const SVector3& n1, const SVector3& n2, const SVector3& n3 // rotated coordinate system ){ STensor3 LeftHS(0.); @@ -87,21 +87,12 @@ void GeometryRotation::exportRotatedModel(const SVector3& e1, const SVector3& e2 std::string newname(modelName,0,ext_pos); newFileName += newname; } - newFileName += "Rotated_ELE"; - std::ostringstream oss; - oss << elenum; - newFileName += oss.str(); - oss.str(""); - newFileName += "GP"; - oss << gpt; - newFileName += oss.str(); - newFileName += ".msh"; - + newFileName += "Rotated_ELE"+filePrefix+".msh"; // write deformed mesh to file - printf("Begin writing rotated mesh ele %d gpt %d\n",elenum,gpt); + printf("Begin writing rotated mesh %s\n",filePrefix.c_str()); pModel->writeMSH(newFileName, CTX::instance()->mesh.mshFileVersion,CTX::instance()->mesh.binary, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.saveParametric, CTX::instance()->mesh.scalingFactor); - printf("End writing rotated mesh ele %d gpt %d \n",elenum,gpt); + printf("End writing rotated mesh %s \n",filePrefix.c_str()); }; void GeometryRotation::exportRotatedModel(const double e1x, const double e1y, const double e1z, @@ -130,13 +121,13 @@ void GeometryRotation::exportRotatedModel(const double e1x, const double e1y, co pModel->readMSH(inMeshFile.c_str()); pModel->setFileName(inMeshFile); - exportRotatedModel(e1,e2,e3,pModel,0,0,n1,n2,n3); + exportRotatedModel(e1,e2,e3,pModel,"",n1,n2,n3); delete pModel; }; -void GeometryRotation::rotateGModel(const int elenum, const int gpt, +void GeometryRotation::rotateGModel(const std::string filePrefix, GModel* pModel, const SVector3& n1, const SVector3& n2, const SVector3& n3){ SVector3 e1(1.,0.,0.); @@ -144,5 +135,5 @@ void GeometryRotation::rotateGModel(const int elenum, const int gpt, SVector3 e3(0.,0.,1.); GeometryRotation obj; - obj.exportRotatedModel(e1,e2,e3,pModel,elenum,gpt,n1,n2,n3); + obj.exportRotatedModel(e1,e2,e3,pModel,filePrefix,n1,n2,n3); }; diff --git a/NonLinearSolver/periodicBC/geometryRotation.h b/NonLinearSolver/periodicBC/geometryRotation.h index 576364a605880783954f567f57efa0f57c1ae94b..4bb0d6e3aa0c6a7e46de32f40b26d221fc820e71 100644 --- a/NonLinearSolver/periodicBC/geometryRotation.h +++ b/NonLinearSolver/periodicBC/geometryRotation.h @@ -18,7 +18,7 @@ class GeometryRotation{ #ifndef SWIG protected: virtual void exportRotatedModel(const SVector3& e1, const SVector3& e2, const SVector3& e3, // reference coordinate system - GModel* pModel, const int elenum, const int gpt, + GModel* pModel, const std::string filePrefix, const SVector3& n1, const SVector3& n2, const SVector3& n3 // rotated coordinate system ); #endif // SWIG @@ -34,7 +34,7 @@ class GeometryRotation{ #ifndef SWIG virtual ~GeometryRotation(); - static void rotateGModel(const int elenum, const int gpt, + static void rotateGModel(const std::string filePrefix, GModel* pModel, const SVector3& n1, const SVector3& n2, const SVector3& n3); #endif // SWIG diff --git a/NonLinearSolver/periodicBC/pbcAlgorithm.cpp b/NonLinearSolver/periodicBC/pbcAlgorithm.cpp index c8ffc56590bdf6039f75f21abdfa7b502bd0f54d..e951e4a1a6c517f409b9515a88ee8da5665f11ca 100644 --- a/NonLinearSolver/periodicBC/pbcAlgorithm.cpp +++ b/NonLinearSolver/periodicBC/pbcAlgorithm.cpp @@ -58,7 +58,7 @@ void pbcAlgorithm::__int__(){ _pbcConstraint->createConstraintGroup(); } else{ - _pbcConstraint->createPBCFromFile(_solver->getPBCFile(),_solver->getGModel()); + Msg::Error("physicals for micro BCs are not correctly defined"); } #ifdef _DEBUG _pbcConstraint->print(); diff --git a/NonLinearSolver/periodicBC/pbcConstraintEliminationNonLinearSystemPETSc.h b/NonLinearSolver/periodicBC/pbcConstraintEliminationNonLinearSystemPETSc.h index 12da8a30e200eb3eeee52d7d042442ce0bacfa44..fc4671c4d67a249ef51f650b88fb974183eb6e7d 100644 --- a/NonLinearSolver/periodicBC/pbcConstraintEliminationNonLinearSystemPETSc.h +++ b/NonLinearSolver/periodicBC/pbcConstraintEliminationNonLinearSystemPETSc.h @@ -33,8 +33,6 @@ class pbcConstraintEliminationNonLinearSystemPETSc : public pbcSystemConden<scal Vec _kinematicVariablePrev; Vec _kinematicVariableTemp; - bool _useMatMatSolveToInvertMatrix; - // stress matrix Mat _StressMatrix; int _dimStress; @@ -74,15 +72,12 @@ class pbcConstraintEliminationNonLinearSystemPETSc : public pbcSystemConden<scal public: pbcConstraintEliminationNonLinearSystemPETSc(MPI_Comm com = PETSC_COMM_SELF) : _pAl(NULL), nonLinearSystemPETSc<scalar>(com), pbcSystemConden<scalar>(), _dimStress(0), _isComputedProjectMatrices(false),_isSolvedPass(false), - _isModifiedStressMatrix(false),_isAllocatedStressMatrix(false), _useMatMatSolveToInvertMatrix(true) + _isModifiedStressMatrix(false),_isAllocatedStressMatrix(false) {} virtual ~pbcConstraintEliminationNonLinearSystemPETSc() { this->clear(); clearStressMatrix(); } - virtual void invertFlag(const bool fl){ - _useMatMatSolveToInvertMatrix = fl; - } virtual void setPBCAlgorithm(pbcAlgorithm* p) { _pAl = p; @@ -263,8 +258,12 @@ class pbcConstraintEliminationNonLinearSystemPETSc : public pbcSystemConden<scal _try(MatAssemblyEnd(Sbc,MAT_FINAL_ASSEMBLY)); // from matrix Cd u_d + C_f*u_f = Sbc*FM becomes u_d = Cdf u_f + Sdf*FM - - if (_useMatMatSolveToInvertMatrix){ + + PetscBool useMatMatSolveToInvertMatrix = PETSC_TRUE; + _try(PetscOptionsGetBool(PETSC_NULL, "", "-useMatMatSolveToInverseMatrix", + &useMatMatSolveToInvertMatrix, PETSC_NULL)); + + if (useMatMatSolveToInvertMatrix){ _try(functionPETSc::MatMatSolve_MultipleRHS(Cd,Cf,Sbc,&Cdf,&Sdf)); _try(MatScale(Cdf,-1.)); } @@ -556,7 +555,6 @@ class pbcConstraintEliminationNonLinearSystemPETSc : public pbcSystemConden<scal pbcConstraintEliminationNonLinearSystemPETSc(){Msg::Error("Petsc is not available");}; virtual ~pbcConstraintEliminationNonLinearSystemPETSc(){}; virtual void setPBCAlgorith(pbcAlgorithm* p) {}; - virtual void invertFlag(const bool fl){} virtual void zeroKinematicVector() {}; virtual void addToKinematicVector(int row, const scalar& val) {}; virtual void initialKinematicVector(int row, const scalar& val){} diff --git a/NonLinearSolver/periodicBC/pbcCreateConstraints.cpp b/NonLinearSolver/periodicBC/pbcCreateConstraints.cpp index b19eebdc711f3e26e417c041c6bf669e4761b970..96f3752e29c9e769d0fb60e264074e11990377e0 100644 --- a/NonLinearSolver/periodicBC/pbcCreateConstraints.cpp +++ b/NonLinearSolver/periodicBC/pbcCreateConstraints.cpp @@ -3152,10 +3152,11 @@ SVector3 pbcConstraintElementGroup::getTangentCubicSpline(dofManager<double>* pm -void pbcConstraintElementGroup::writePertBoundaryToFile(dofManager<double>* pmanager, const int e, const int g, const int iter ){ +void pbcConstraintElementGroup::writePertBoundaryToFile(const int iter ){ + dofManager<double>* pmanager = _solver->getDofManager(); if (_solver->getMicroBC()->getType() == nonLinearMicroBC::PBC){ nonLinearPeriodicBC* pbc = dynamic_cast<nonLinearPeriodicBC*>(_solver->getMicroBC()); - std::string filename = "E_"+int2str(e)+"_GP_"+int2str(g)+"_xInterpolation_iter_"+int2str(iter)+ ".csv"; + std::string filename = _solver->getFileSavingPrefix()+"_xInterpolation_iter_"+int2str(iter)+ ".csv"; FILE* file = fopen(filename.c_str(),"w"); if (pbc->getPBCMethod() == nonLinearPeriodicBC::CSIM) cubicSplineToFile(_xBase,pmanager,file,0); @@ -3163,7 +3164,7 @@ void pbcConstraintElementGroup::writePertBoundaryToFile(dofManager<double>* pman lagrangeToFile(_xBase,pmanager,file); fclose(file); - filename = "E_"+int2str(e)+"_GP_"+int2str(g)+"_yInterpolation_iter_"+int2str(iter)+ ".csv"; + filename = _solver->getFileSavingPrefix()+"_yInterpolation_iter_"+int2str(iter)+ ".csv"; file = fopen(filename.c_str(),"w"); if (pbc->getPBCMethod() == nonLinearPeriodicBC::CSIM) cubicSplineToFile(_yBase,pmanager,file,1); @@ -3171,7 +3172,7 @@ void pbcConstraintElementGroup::writePertBoundaryToFile(dofManager<double>* pman lagrangeToFile(_yBase,pmanager,file); fclose(file); - filename = "E_"+int2str(e)+"_GP_"+int2str(g)+"_zInterpolation_iter_"+int2str(iter)+ ".csv"; + filename = _solver->getFileSavingPrefix()+"_zInterpolation_iter_"+int2str(iter)+ ".csv"; file = fopen(filename.c_str(),"w"); if (pbc->getPBCMethod() == nonLinearPeriodicBC::CSIM) cubicSplineToFile(_zBase,pmanager,file,2); @@ -3182,7 +3183,7 @@ void pbcConstraintElementGroup::writePertBoundaryToFile(dofManager<double>* pman const std::vector<groupOfElements*>& bgr = _solver->getMicroBC()->getBoundaryGroupOfElements(); for (int i =0; i< bgr.size(); i++){ - std::string filename ="E_"+int2str(e)+"_GP_"+int2str(g)+"_pert_" + int2str(i)+ "_iter_"+int2str(iter)+ ".csv"; + std::string filename =_solver->getFileSavingPrefix()+"_pert_" + int2str(i)+ "_iter_"+int2str(iter)+ ".csv"; FILE* file = fopen(filename.c_str(),"w"); const groupOfElements* g = bgr[i]; for (groupOfElements::vertexContainer::iterator it = g->vbegin(); it!= g->vend(); it++){ @@ -3232,6 +3233,7 @@ void pbcConstraintElementGroup::print() const { void pbcConstraintElementGroup::createConstraintForTest(){ _allConstraint.clear(); + constraintElement::allPositiveDof.clear(); Msg::Info("apply periodic boundary condition"); if (_solver->getMicroBC()->getNumberOfConstrainedConstitutiveExtraDofs() > 0){ diff --git a/NonLinearSolver/periodicBC/pbcCreateConstraints.h b/NonLinearSolver/periodicBC/pbcCreateConstraints.h index 2265b71856606f56bd19f4f9262211f8808c658b..94098cbabca146991db85b320e883f7fab0cb05e 100644 --- a/NonLinearSolver/periodicBC/pbcCreateConstraints.h +++ b/NonLinearSolver/periodicBC/pbcCreateConstraints.h @@ -302,7 +302,7 @@ class pbcConstraintElementGroup{ void print() const ; const groupOfElements* getAllBulkElement() const {return _g;}; void createPBCFromFile(FILE* fp, GModel* pModel); - void writePertBoundaryToFile(dofManager<double>* pmanager,const int e=0, const int g=0, const int iter =0); + void writePertBoundaryToFile(const int iter =0); /** interface for creating linear constraints with PBC**/ diff --git a/NonLinearSolver/periodicBC/pbcNonLinearSystemPETSc.h b/NonLinearSolver/periodicBC/pbcNonLinearSystemPETSc.h index 1e20ba822d2e5e027df113523539659286ce5716..28bcde215da92499037d4b7215e824c2c15dd619 100644 --- a/NonLinearSolver/periodicBC/pbcNonLinearSystemPETSc.h +++ b/NonLinearSolver/periodicBC/pbcNonLinearSystemPETSc.h @@ -58,7 +58,7 @@ class pbcNonLinearSystemPETSc : public pbcSystem<scalar>, bool _isModifiedStressMatrix; bool _isAllocatedStressMatrix; - bool _useMatMatSolveToInvertMatrix; + bool _estimatedK; protected: @@ -91,15 +91,12 @@ class pbcNonLinearSystemPETSc : public pbcSystem<scalar>, _dimKin(0),_dimStress(0),_isSolvedPass(false), _isModifiedKinematicMatrix(false), _isAllocatedKinematicMatrix(false), _isModifiedStressMatrix(false),_isAllocatedStressMatrix(false), - _useMatMatSolveToInvertMatrix(false),_estimatedK(false){ + _estimatedK(false){ }; virtual ~pbcNonLinearSystemPETSc(){ clear(); clearConstraintMatrix(); }; - virtual void invertFlag(const bool fl){ - _useMatMatSolveToInvertMatrix = fl; - } virtual bool isAllocatedConstraintMatrix() const { return _isAllocatedConstraintMatrix; @@ -195,8 +192,11 @@ class pbcNonLinearSystemPETSc : public pbcSystem<scalar>, // Mat CCT, invCCT; _try(MatMatMult(_C,_CT,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&CCT)); - - if (_useMatMatSolveToInvertMatrix){ + + PetscBool useMatMatSolveToInvertMatrix = PETSC_TRUE; + _try(PetscOptionsGetBool(PETSC_NULL, "", "-useMatMatSolveToInverseMatrix", + &useMatMatSolveToInvertMatrix, PETSC_NULL)); + if (useMatMatSolveToInvertMatrix){ Msg::Info("use MatMatSolve to invert matrix"); _try(functionPETSc::MatInverse_MatMatSolve(CCT,&invCCT)); } @@ -204,26 +204,39 @@ class pbcNonLinearSystemPETSc : public pbcSystem<scalar>, Msg::Info("use KSP to invert matrix"); _try(functionPETSc::MatInverse_Naive(CCT,&invCCT)); } - - - _try(MatMatMult(_CT,invCCT,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&_R)); - _try(MatAssemblyBegin(_R,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(_R,MAT_FINAL_ASSEMBLY)); _try(MatDestroy(&invCCT)); _try(MatDestroy(&CCT)); /*Q = I-RC */ + Mat mRC; + _try(MatMatMult(_R,_C,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&mRC)); + _try(MatScale(mRC,-1)); + + _try(MatCreate(this->getComm(),&_Q)); + _try(MatSetSizes(_Q,this->_nbRows,this->_nbRows,PETSC_DETERMINE,PETSC_DETERMINE)); + _try(MatSetType(_Q,MATSEQAIJ)); + _try(MatSetFromOptions(_Q)); + PetscInt nz = 1; + _try(MatSeqAIJSetPreallocation(_Q,nz,PETSC_NULL)); + for (int i=0; i< this->_nbRows; i++) + { + PetscScalar s = 1.; + _try(MatSetValues(_Q, 1, &i, 1, &i, &s, ADD_VALUES)); + } + _try(MatAssemblyBegin(_Q,MAT_FINAL_ASSEMBLY)); + _try(MatAssemblyEnd(_Q,MAT_FINAL_ASSEMBLY)); + PetscScalar aa = 1.; + _try(MatAXPY(_Q,aa,mRC,DIFFERENT_NONZERO_PATTERN)); + + /* _try(MatMatMult(_R,_C,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&_Q)); _try(MatScale(_Q,-1)); _try(MatShift(_Q,1.)); - _try(MatAssemblyBegin(_Q,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(_Q,MAT_FINAL_ASSEMBLY)); - + */ + _try(MatMatMult(_CT,_C,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&_CTC)); - _try(MatAssemblyBegin(_CTC,MAT_FINAL_ASSEMBLY)); - _try(MatAssemblyEnd(_CTC,MAT_FINAL_ASSEMBLY)); - + _isComputedProjectMatrices = true; _constraintMatrixModified = false; Msg::Info("End computing all constraint project matrices"); @@ -485,8 +498,8 @@ class pbcNonLinearSystemPETSc : public pbcSystem<scalar>, virtual bool isAllocatedConstraintMatrix() const {return false;}; // allocated flag virtual void clearConstraintMatrix() {}; // clear function virtual void allocateConstraintMatrix(int nbcon, int nbR) {}; // constraint dof number, system dof number - virtual void addToConstraintMatrix(int row, int col, const scalar& val) {}; // add to constraint matrix - virtual void addToConstraintResidual(int row, const scalar& val) {}; // add to constraint residual + virtual void addToConstraintMatrix(int row, int col, const scalar& val) {}; // add to constraint matrix + virtual void addToConstraintResidual(int row, const scalar& val) {}; // add to constraint residual virtual void setScaleFactor(double scale) {}; // scale factor virtual void zeroConstraintMatrix() {}; // zero constraint matrix virtual void zeroConstraintResidual() {}; // zero constraint residual diff --git a/NonLinearSolver/periodicBC/pbcSystems.h b/NonLinearSolver/periodicBC/pbcSystems.h index 3f17ef3883fae4f87a6a1447dc810d33f4ffe8fc..56012ab9795110620365e7a5afec2659d0fa4044 100644 --- a/NonLinearSolver/periodicBC/pbcSystems.h +++ b/NonLinearSolver/periodicBC/pbcSystems.h @@ -15,7 +15,6 @@ class pbcSystemBase{ public: virtual ~pbcSystemBase(){} virtual void computeConstraintProjectMatrices() =0; // compute all constraint projection matrices - virtual void invertFlag(const bool fl) = 0; virtual bool isAllocatedStressMatrix() const = 0; virtual void clearStressMatrix() = 0; virtual void allocateStressMatrix(int stressDim, int nbR) = 0; @@ -30,7 +29,6 @@ template<class scalar> class pbcSystem : public pbcSystemBase<scalar>{ public: virtual ~pbcSystem(){}; - virtual void invertFlag(const bool fl) = 0; virtual bool isAllocatedConstraintMatrix() const=0; // allocated flag virtual void clearConstraintMatrix() = 0; // clear function virtual void allocateConstraintMatrix(int nbcon, int nbR) = 0; // constraint dof number, system dof number diff --git a/dG3D/benchmarks/CMakeLists.txt b/dG3D/benchmarks/CMakeLists.txt index dd660e0bd350e529bda18bd41f77b12ef5192f85..e53bcb786ea649e5b4fd20779214f384ab0744b7 100644 --- a/dG3D/benchmarks/CMakeLists.txt +++ b/dG3D/benchmarks/CMakeLists.txt @@ -189,3 +189,6 @@ add_subdirectory(Thomason_planeStrain_withLodeEnhanced) add_subdirectory(LocalGurson_PathFollowing) add_subdirectory(GursonThomason_cube_I1J2J3_withTwoYieldReg) add_subdirectory(GursonThomason_cube_withShear_withTwoYieldReg) +add_subdirectory(eigenValueTest) +add_subdirectory(micro_pathFollowing) + diff --git a/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py b/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py index ab55dfe8275854688f324e9546b3125a5fa4dde1..67c4cf30394e4a46c491b4fc44cecdf872f01aca 100755 --- a/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py +++ b/dG3D/benchmarks/CohesiveBand_Plate/notchedPlate.py @@ -205,7 +205,7 @@ mysolver.archivingNodeDisplacement(73,2,nstepArchForce) mysolver.solve() check = TestCheck() -check.equal(-6.666707e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 61, 1),1.e-4) +check.equal(-7.475520e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 61, 1),1.e-3) diff --git a/dG3D/benchmarks/DG_TET4/twoHole.py b/dG3D/benchmarks/DG_TET4/twoHole.py index c8498396ccf7a4f304757441f6b12903c93aa932..23895a35a8c22bbee3310e10cbb16ede289893e0 100644 --- a/dG3D/benchmarks/DG_TET4/twoHole.py +++ b/dG3D/benchmarks/DG_TET4/twoHole.py @@ -89,3 +89,10 @@ mysolver.solve() check = TestCheck() check.equal(-2.859523e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) + + +#newsolver = mysolver.clone(meshfile,1000) +newsolver = nonLinearMechSolver(mysolver) +newsolver.solve() +check = TestCheck() +check.equal(-2.859523e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) diff --git a/dG3D/benchmarks/GursonMultipleNonlocal_PathFollowing/Plane_notch.py b/dG3D/benchmarks/GursonMultipleNonlocal_PathFollowing/Plane_notch.py index 294bc3b553e033387900908d0e238b987a68a916..0f685b6e06b247f7f02b8d6868f6656130db003c 100644 --- a/dG3D/benchmarks/GursonMultipleNonlocal_PathFollowing/Plane_notch.py +++ b/dG3D/benchmarks/GursonMultipleNonlocal_PathFollowing/Plane_notch.py @@ -180,4 +180,4 @@ mysolver.archivingIPOnPhysicalGroup("Face", 700, IPField.LOCAL_POROSITY,IPField. mysolver.solve() check = TestCheck() -check.equal(-2.084549e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-6) +check.equal(-2.084728e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-6) diff --git a/dG3D/benchmarks/GursonThomasonFullCoalescence/Plane_notch.py b/dG3D/benchmarks/GursonThomasonFullCoalescence/Plane_notch.py index 88b81a0a9dbe6ba814381242ef8fc962f4984420..64722f9441dc431d91d398a447fedbde2a79b600 100644 --- a/dG3D/benchmarks/GursonThomasonFullCoalescence/Plane_notch.py +++ b/dG3D/benchmarks/GursonThomasonFullCoalescence/Plane_notch.py @@ -195,4 +195,4 @@ mysolver.archivingIPOnPhysicalGroup("Face", 700, IPField.LOCAL_POROSITY,IPField. mysolver.solve() check = TestCheck() -check.equal(-9.131203e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-4) +check.equal(-9.176614e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-4) diff --git a/dG3D/benchmarks/GursonThomasonMultipleNonlocalVar_PathFollowing/Plane_notch.py b/dG3D/benchmarks/GursonThomasonMultipleNonlocalVar_PathFollowing/Plane_notch.py index 617ccb838f2748ce770fa96cd52879b16942e1c3..e6dadd6a33728babc34a214f5c9ca2217f64e39e 100644 --- a/dG3D/benchmarks/GursonThomasonMultipleNonlocalVar_PathFollowing/Plane_notch.py +++ b/dG3D/benchmarks/GursonThomasonMultipleNonlocalVar_PathFollowing/Plane_notch.py @@ -189,4 +189,4 @@ mysolver.archivingIPOnPhysicalGroup("Face", 700, IPField.LOCAL_POROSITY,IPField. mysolver.solve() check = TestCheck() -check.equal(-1.889379e+03,3,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-6) +check.equal(-2.558598e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-6) diff --git a/dG3D/benchmarks/GursonThomasonThermo_NonlocalLogPorosity/Plane_notch.py b/dG3D/benchmarks/GursonThomasonThermo_NonlocalLogPorosity/Plane_notch.py index a3c1fb718f13386de49c7737be9ecf36d248bdca..7d79d2d44560adc352b3f2c6c8101dc3122e17c5 100644 --- a/dG3D/benchmarks/GursonThomasonThermo_NonlocalLogPorosity/Plane_notch.py +++ b/dG3D/benchmarks/GursonThomasonThermo_NonlocalLogPorosity/Plane_notch.py @@ -196,4 +196,4 @@ mysolver.archivingIPOnPhysicalGroup("Face", 700, IPField.LOCAL_POROSITY,IPField. mysolver.solve() check = TestCheck() -check.equal(-1.912441e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-6) +check.equal(-1.912437e+03,mysolver.getArchivedForceOnPhysicalGroup("Edge", 1400, 0),1.e-6) diff --git a/dG3D/benchmarks/GursonThomason_cube_withLodeEnhanced/cube.py b/dG3D/benchmarks/GursonThomason_cube_withLodeEnhanced/cube.py index 109f885467221055e20d6c5499d7f6711159e471..57c2b2aeac362f9b16a0c7244f11f6b5be4aa624 100644 --- a/dG3D/benchmarks/GursonThomason_cube_withLodeEnhanced/cube.py +++ b/dG3D/benchmarks/GursonThomason_cube_withLodeEnhanced/cube.py @@ -198,7 +198,7 @@ check = TestCheck() import csv data = csv.reader(open('IPVolume11val_LOCAL_POROSITYMax.csv'), delimiter=';') porosity = list(data) -check.equal(5.856826e-01,float(porosity[-1][1]),1e-6) +check.equal(5.473613e-01,float(porosity[-1][1]),1e-6) diff --git a/dG3D/benchmarks/Gurson_Cube_Transition/cube.py b/dG3D/benchmarks/Gurson_Cube_Transition/cube.py index 1e5c4a79a0ddfbc26d8f2ee2aa3aac403d9e53f4..50741c868a7783a4d1729f591d1c6b1ec3c82ebe 100755 --- a/dG3D/benchmarks/Gurson_Cube_Transition/cube.py +++ b/dG3D/benchmarks/Gurson_Cube_Transition/cube.py @@ -169,7 +169,7 @@ check = TestCheck() import csv data = csv.reader(open('IPVolume29val_DAMAGEMean.csv'), delimiter=';') porosity = list(data) -check.equal(2.759742e-02,float(porosity[-1][1]),1e-6) +check.equal(2.758505e-02,float(porosity[-1][1]),1e-6) diff --git a/dG3D/benchmarks/MFH_2EVP_Czarnota/cube.py b/dG3D/benchmarks/MFH_2EVP_Czarnota/cube.py index 425f57919d51fa29a0439a8c5d517fc9584047b9..85d0ba0de64bc3eff4fb109802b7fbcdfbe68509 100644 --- a/dG3D/benchmarks/MFH_2EVP_Czarnota/cube.py +++ b/dG3D/benchmarks/MFH_2EVP_Czarnota/cube.py @@ -31,7 +31,7 @@ space1 = 0 # function space (Lagrange=0) law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_2Step/cube.py b/dG3D/benchmarks/MFH_2Step/cube.py index d39c920ff719be1e715926303793d9808ed4c6dd..4adb418470a75792601a0b0b9864d4bba46b0439 100644 --- a/dG3D/benchmarks/MFH_2Step/cube.py +++ b/dG3D/benchmarks/MFH_2Step/cube.py @@ -31,7 +31,7 @@ d1=0.03e-3 law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_2Step_SkinCore/cube.py b/dG3D/benchmarks/MFH_2Step_SkinCore/cube.py index 4e75b969b39a77d141383f28371cddad5aa279ff..25760d39f3f7ce8713c12f46cd683e3d2f1f70ba 100644 --- a/dG3D/benchmarks/MFH_2Step_SkinCore/cube.py +++ b/dG3D/benchmarks/MFH_2Step_SkinCore/cube.py @@ -31,7 +31,7 @@ d1=0.10e-3 law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EP_SEC/cube.py b/dG3D/benchmarks/MFH_EP_SEC/cube.py index e4f6294ff81729acaa3487e6d4ed5bfc62c5bd03..ed98871419e6b569104dc929fe58f269f1d2d740 100644 --- a/dG3D/benchmarks/MFH_EP_SEC/cube.py +++ b/dG3D/benchmarks/MFH_EP_SEC/cube.py @@ -32,7 +32,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,0) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EVP_Creep/cube.py b/dG3D/benchmarks/MFH_EVP_Creep/cube.py index 543fbfe2e2b0bf77500c8c85ea1e1217c3a343f4..c53ee49fb5a2893aca0d84195b0f5d571cb9e0e3 100644 --- a/dG3D/benchmarks/MFH_EVP_Creep/cube.py +++ b/dG3D/benchmarks/MFH_EVP_Creep/cube.py @@ -36,7 +36,7 @@ space1 = 0 # function space (Lagrange=0) law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EVP_Cube/cube.py b/dG3D/benchmarks/MFH_EVP_Cube/cube.py index 8bed1125988c6f2a97c4ceb31669e70aa52138aa..65866597153eee6d3305536de9e8a9390405affb 100644 --- a/dG3D/benchmarks/MFH_EVP_Cube/cube.py +++ b/dG3D/benchmarks/MFH_EVP_Cube/cube.py @@ -31,7 +31,7 @@ space1 = 0 # function space (Lagrange=0) law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EVP_Czarnota/cube.py b/dG3D/benchmarks/MFH_EVP_Czarnota/cube.py index 23f66d23b4b7c6c9d8c56aa85fbbb67fdebe92f2..8887076487754cf854cc400f7ddbc2c8eaa77411 100644 --- a/dG3D/benchmarks/MFH_EVP_Czarnota/cube.py +++ b/dG3D/benchmarks/MFH_EVP_Czarnota/cube.py @@ -38,7 +38,7 @@ space1 = 0 # function space (Lagrange=0) law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EVP_Lahellec/cube.py b/dG3D/benchmarks/MFH_EVP_Lahellec/cube.py index a959638d3a1cae52646bcdecca2333917f786bca..e7e04bd326a8614705162b9a52a286e10bbc683f 100644 --- a/dG3D/benchmarks/MFH_EVP_Lahellec/cube.py +++ b/dG3D/benchmarks/MFH_EVP_Lahellec/cube.py @@ -56,7 +56,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EVP_Mercier/cube.py b/dG3D/benchmarks/MFH_EVP_Mercier/cube.py index 41ea1d98ec6c2821844a91e5d627d2c6881de522..9455b3b88c438ad289a3b0fe3b69af4480304fc1 100644 --- a/dG3D/benchmarks/MFH_EVP_Mercier/cube.py +++ b/dG3D/benchmarks/MFH_EVP_Mercier/cube.py @@ -37,7 +37,7 @@ d1=0.1 law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_EVP_Pierard/cube.py b/dG3D/benchmarks/MFH_EVP_Pierard/cube.py index 3d1ae80a12500fac269bd040b9689ecf36e94e53..c46b852f090ceb8536c1d983291eae8d40ee3421 100644 --- a/dG3D/benchmarks/MFH_EVP_Pierard/cube.py +++ b/dG3D/benchmarks/MFH_EVP_Pierard/cube.py @@ -31,7 +31,7 @@ space1 = 0 # function space (Lagrange=0) law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) #myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_FiniteStrainDPS_20/cube.py b/dG3D/benchmarks/MFH_FiniteStrainDPS_20/cube.py index ba73f646b393915edd8899a5ab20427fe31cb138..c2d632e4ae6dff46cf34f040ca93ba27d40ac0b4 100644 --- a/dG3D/benchmarks/MFH_FiniteStrainDPS_20/cube.py +++ b/dG3D/benchmarks/MFH_FiniteStrainDPS_20/cube.py @@ -30,7 +30,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver @@ -119,5 +119,5 @@ else: check.equal(1.999675e-01,float(linesVF.split(';')[1])) check.equal(9.882490e-01,float(linesAR1.split(';')[1])) check.equal(9.882490e-01,float(linesAR2.split(';')[1])) - check.equal(4.239224e-01,float(linesRXX.split(';')[1])) + check.equal(2.498074e-01,float(linesRXX.split(';')[1])) diff --git a/dG3D/benchmarks/MFH_FiniteStrainDPS_El20/cube.py b/dG3D/benchmarks/MFH_FiniteStrainDPS_El20/cube.py index 798f186e9b83af73f2d9d8dcc4cf0329d3300a9e..b4813586913c10ea85b97a478246143637c8e670 100644 --- a/dG3D/benchmarks/MFH_FiniteStrainDPS_El20/cube.py +++ b/dG3D/benchmarks/MFH_FiniteStrainDPS_El20/cube.py @@ -30,7 +30,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver @@ -132,7 +132,7 @@ else: check.equal(2.002383e-01,float(linesVF.split(';')[1])) check.equal(3.033909e+00,float(linesAR1.split(';')[1])) check.equal(3.033909e+00,float(linesAR2.split(';')[1])) - check.equal(8.291733e-02,float(linesRXX.split(';')[1])) + check.equal(5.176525e-01,float(linesRXX.split(';')[1])) check.equal(1.723483e+09,float(linesISIG.split(';')[1])) check.equal(1.012394e+09,float(linesMSIG.split(';')[1])) diff --git a/dG3D/benchmarks/MFH_FiniteStrainDPS_El20Shear/cube.py b/dG3D/benchmarks/MFH_FiniteStrainDPS_El20Shear/cube.py index 0ea93fd692ba532df43e3dd63095416738570c71..6d003c8366a716dbe931d364937d9a9fcfac9d24 100644 --- a/dG3D/benchmarks/MFH_FiniteStrainDPS_El20Shear/cube.py +++ b/dG3D/benchmarks/MFH_FiniteStrainDPS_El20Shear/cube.py @@ -30,7 +30,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_FiniteStrainMMC1/cube.py b/dG3D/benchmarks/MFH_FiniteStrainMMC1/cube.py index 8c09a7d23fe1e6254e3e12fd168517e598233fea..b103825bf75f2d04df432b93d8d415bde397f480 100644 --- a/dG3D/benchmarks/MFH_FiniteStrainMMC1/cube.py +++ b/dG3D/benchmarks/MFH_FiniteStrainMMC1/cube.py @@ -30,7 +30,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver @@ -127,7 +127,7 @@ else: check.equal(1.998084e-01,float(linesVF.split(';')[1])) check.equal(9.986400e-01,float(linesAR1.split(';')[1])) check.equal(9.986400e-01,float(linesAR2.split(';')[1])) - check.equal(6.910060e-01,float(linesRXX.split(';')[1])) + check.equal(6.926818e-01,float(linesRXX.split(';')[1])) check.equal(3.600329e+08,float(linesSigZZ.split(';')[1])) check.equal(5.248672e+08,float(linesISIG.split(';')[1])) check.equal(3.188737e+08,float(linesMSIG.split(';')[1])) diff --git a/dG3D/benchmarks/MFH_FiniteStrainPorousMMC1Shear/cube.py b/dG3D/benchmarks/MFH_FiniteStrainPorousMMC1Shear/cube.py index b8bf848ab63e3581a6ce0cd4ba3313a1058d0b40..8420956081a269c02cccea053adb4cbeb9ebb5e9 100644 --- a/dG3D/benchmarks/MFH_FiniteStrainPorousMMC1Shear/cube.py +++ b/dG3D/benchmarks/MFH_FiniteStrainPorousMMC1Shear/cube.py @@ -30,7 +30,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnum,rho,properties) law1.setUseBarF(True) # creation of ElasticField nfield = 10 # number of the field (physical number of surface) -myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnum,fullDg,3) myfield1.stabilityParameters(30.) myfield1.matrixByPerturbation(1,1,1,1e-8) # creation of Solver diff --git a/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py b/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py index cbe041f92413291a49e48065d3ba38bdce731413..9dd6647a411aae7cf9dc69175762087f18bb1f9a 100644 --- a/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py +++ b/dG3D/benchmarks/MFH_Stoch_Ply/Stoch_Sample.py @@ -50,7 +50,7 @@ mylaw.setUseBarF(True) mysolver.addMaterialLaw(mylaw) #mydom = dG3DDomain(10,myfield,space1,lawnum,fulldg) -mydom = dG3DDomain(10,myfield,space1,lawnum,fulldg,3,1) +mydom = dG3DDomain(10,myfield,space1,lawnum,fulldg,3) mydom.setNonLocalStabilityParameters(beta1,True) mydom.setNonLocalEqRatio(eqRatio) mydom.stabilityParameters(30.) @@ -103,9 +103,9 @@ except: import os os._exit(1) else: - check.equal(8.624847e+08,float(linesmax.split(';')[1])) - check.equal(4.115902e+08,float(linesmin.split(';')[1])) - check.equal(5.851568e+08,float(linesmean.split(';')[1])) + check.equal(8.471975e+08,float(linesmax.split(';')[1])) + check.equal(4.028659e+08,float(linesmin.split(';')[1])) + check.equal(5.730540e+08,float(linesmean.split(';')[1])) diff --git a/dG3D/benchmarks/PureThermoPBC/CMakeLists.txt b/dG3D/benchmarks/PureThermoPBC/CMakeLists.txt index f669a5fa3e49c1a6bc1b9c380652f1c7c4a117c5..74297a07b9044745ef3cdaa0913d73de5f56e1f6 100644 --- a/dG3D/benchmarks/PureThermoPBC/CMakeLists.txt +++ b/dG3D/benchmarks/PureThermoPBC/CMakeLists.txt @@ -3,7 +3,6 @@ set(PYFILE thermoMecPolycrystalCondensation.py) set(FILES2DELETE - NodalDisplacement* E_0_GP_1000_* ) diff --git a/dG3D/benchmarks/PureThermoPBC/thermoMecPolycrystalCondensation.py b/dG3D/benchmarks/PureThermoPBC/thermoMecPolycrystalCondensation.py index 22441f543513e6a084c41d187ccd2dd68f946955..cff21b5c7fb582073756f742c8c7476cc3b039e6 100644 --- a/dG3D/benchmarks/PureThermoPBC/thermoMecPolycrystalCondensation.py +++ b/dG3D/benchmarks/PureThermoPBC/thermoMecPolycrystalCondensation.py @@ -102,7 +102,6 @@ mysolver.setMessageView(True) mysolver.setSystemType(system) #mysolver.setControlType(control) mysolver.setMicroProblemIndentification(0, 1000); -mysolver.invertFlag(True) #boundary condition diff --git a/dG3D/benchmarks/Thomason_planeStrain_withLodeEnhanced/model.py b/dG3D/benchmarks/Thomason_planeStrain_withLodeEnhanced/model.py index 9f179dc9b3b015cf1d19af511404ed51e5a32078..2ff7930f107e0623c1e97819860736fb315f3812 100644 --- a/dG3D/benchmarks/Thomason_planeStrain_withLodeEnhanced/model.py +++ b/dG3D/benchmarks/Thomason_planeStrain_withLodeEnhanced/model.py @@ -164,7 +164,7 @@ mysolver.solve() check = TestCheck() -check.equal(-5.738027e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 4, 0),1.e-4) +check.equal(-5.774703e+02,mysolver.getArchivedForceOnPhysicalGroup("Edge", 4, 0),1.e-4) diff --git a/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py b/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py index 39d70e503e184f0936bbc0715769ef90f4076762..7ece0af27f0306144acdd2a895d5452ef55d1143 100644 --- a/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py +++ b/dG3D/benchmarks/TransverseAnisotropicCZM/cubeTransverseAnisotropy.py @@ -108,6 +108,6 @@ mysolver.archivingForceOnPhysicalGroup("Face", 5678, 2) mysolver.solve() check = TestCheck() -check.equal(4.133117e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 5678, 2),1.e-3) +check.equal(4.132246e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 5678, 2),1.e-3) diff --git a/dG3D/benchmarks/compositeNonLocalRVECG/RVE.py b/dG3D/benchmarks/compositeNonLocalRVECG/RVE.py index c59676310e432e582a9f46dbffbeaa0e303a251c..c496b401def78d8cae0da0845da323ad38dec495 100644 --- a/dG3D/benchmarks/compositeNonLocalRVECG/RVE.py +++ b/dG3D/benchmarks/compositeNonLocalRVECG/RVE.py @@ -32,6 +32,7 @@ eqRatio =1.e6 # creation of law law1 = NonLocalDamageDG3DMaterialLaw(lawnonlocal,rho,propertiesLC) law2 = NonLocalDamageDG3DMaterialLaw(lawlinear,rho,propertiesLin) +law2.setNumberOfNonLocalVariables(1) # creation of ElasticField Mfield = 101 # number of the field (physical number of Mtrix) diff --git a/dG3D/benchmarks/compositeNonLocalRVEDG/CMakeLists.txt b/dG3D/benchmarks/compositeNonLocalRVEDG/CMakeLists.txt index 80287b82e651a9a32438b9862de1772c7c291000..eada9a1d787d093787874d969fb3bc678bae4cd8 100644 --- a/dG3D/benchmarks/compositeNonLocalRVEDG/CMakeLists.txt +++ b/dG3D/benchmarks/compositeNonLocalRVEDG/CMakeLists.txt @@ -3,9 +3,9 @@ set(PYFILE RVE.py) set(FILES2DELETE - disp.msh + disp*.msh force*.csv - stress.msh + stress*.msh energy.csv IP* RVE.msh diff --git a/dG3D/benchmarks/compositeNonLocalRVEDG/RVE.py b/dG3D/benchmarks/compositeNonLocalRVEDG/RVE.py index 78a45a1651276e750d5eaa9580ce27220c542f3d..84b1468ac009dda397942265f4adbaaa431a1592 100644 --- a/dG3D/benchmarks/compositeNonLocalRVEDG/RVE.py +++ b/dG3D/benchmarks/compositeNonLocalRVEDG/RVE.py @@ -34,6 +34,7 @@ beta1=30. law1 = NonLocalDamageDG3DMaterialLaw(lawnonlocal,rho,propertiesLC) #law1.setUseBarF(True) law2 = NonLocalDamageDG3DMaterialLaw(lawlinear,rho,propertiesLin) +law2.setNumberOfNonLocalVariables(1) #law2.setUseBarF(True) # creation of ElasticField diff --git a/dG3D/benchmarks/eigenValueTest/CMakeLists.txt b/dG3D/benchmarks/eigenValueTest/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4f377b0166c9250ddd2d4a43ef35be2be70ba3fd --- /dev/null +++ b/dG3D/benchmarks/eigenValueTest/CMakeLists.txt @@ -0,0 +1,11 @@ +# test file + +set(PYFILE twoHole.py) + +set(FILES2DELETE + *.csv + Disturb_mesh.msh + eigenMode_step1.msh +) + +add_cm3python_test(${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/eigenValueTest/twoHole.geo b/dG3D/benchmarks/eigenValueTest/twoHole.geo new file mode 100644 index 0000000000000000000000000000000000000000..ab02dc76e69f58f042ab3b3819647386d6238c82 --- /dev/null +++ b/dG3D/benchmarks/eigenValueTest/twoHole.geo @@ -0,0 +1,72 @@ + +mm=1.0e-3; +n=1; +L=10*mm; +sl1=0.4*L/n; +Lx = 2*L; +Ly = 4*L; +Point(1)={0,0,0,sl1}; +Point(2)={Lx,0,0,sl1}; +Point(3)={Lx,Ly,0,sl1}; +Point(4)={0,Ly,0,sl1}; +Line(1)={1,2}; +Line(2)={2,3}; +Line(3)={3,4}; +Line(4)={4,1}; +x0=0.5*Lx/n; y0=0.5*Ly/n; r=0.2*L/n; + +x=0.3*Lx; +y=0.4*Ly; +r = 0.2*L; +sl2=0.7*sl1; +p1=newp; Point(p1)={x-r,y,0,sl2}; +p2=newp; Point(p2)={x,y+r,0,sl2}; +p3=newp; Point(p3)={x+r,y,0,sl2}; +p4=newp; Point(p4)={x,y-r,0,sl2}; +pc=newp; Point(pc)={x,y,0,sl2}; +c1 = newreg; Circle(c1) = {p1,pc,p2}; +c2 = newreg; Circle(c2) = {p2,pc,p3}; +c3 = newreg; Circle(c3) = {p3,pc,p4}; +c4 = newreg; Circle(c4) = {p4,pc,p1}; +l[1]=newreg; Line Loop(l[1]) = {c1,c2,c3,c4}; + + +x=0.7*Lx; +y=0.6*Ly; +r = 0.2*L; +sl2=0.4*sl1; +p1=newp; Point(p1)={x-r,y,0,sl2}; +p2=newp; Point(p2)={x,y+r,0,sl2}; +p3=newp; Point(p3)={x+r,y,0,sl2}; +p4=newp; Point(p4)={x,y-r,0,sl2}; +pc=newp; Point(pc)={x,y,0,sl2}; +c1 = newreg; Circle(c1) = {p1,pc,p2}; +c2 = newreg; Circle(c2) = {p2,pc,p3}; +c3 = newreg; Circle(c3) = {p3,pc,p4}; +c4 = newreg; Circle(c4) = {p4,pc,p1}; +l[2]=newreg; Line Loop(l[2]) = {c1,c2,c3,c4}; + + +l[0]=newreg; +Line Loop(l[0])={1,2,3,4}; +Plane Surface(11)={l[]}; +//Recombine Surface{11}; + +Physical Surface(16) = {11}; +Physical Line(17) = {1}; +Physical Line(18) = {3}; +Physical Point(19) = {4}; +Physical Point(20) = {1}; +//+ +//Recombine Surface {11}; +//+ +Extrude {0, 0, 1e-3} { + Surface{11}; Layers{1}; //Recombine; +} + +//+ +Physical Volume(83) = {1}; +//+ +Physical Surface(84) = {37}; +//+ +Physical Surface(85) = {45}; diff --git a/dG3D/benchmarks/eigenValueTest/twoHole.msh b/dG3D/benchmarks/eigenValueTest/twoHole.msh new file mode 100644 index 0000000000000000000000000000000000000000..196f501e6db305f618ad5dac1f697b93393ae92c --- /dev/null +++ b/dG3D/benchmarks/eigenValueTest/twoHole.msh @@ -0,0 +1,2153 @@ +$MeshFormat +4.1 0 8 +$EndMeshFormat +$Entities +28 36 14 1 +1 0 0 0 1 20 +2 0.02 0 0 0 +3 0.02 0.04 0 0 +4 0 0.04 0 1 19 +5 0.004 0.016 0 0 +6 0.006 0.018 0 0 +7 0.008 0.016 0 0 +8 0.006 0.014 0 0 +9 0.006 0.016 0 0 +10 0.012 0.024 0 0 +11 0.014 0.026 0 0 +12 0.016 0.024 0 0 +13 0.014 0.022 0 0 +14 0.014 0.024 0 0 +15 0 0 0.001 0 +16 0.02 0 0.001 0 +20 0.02 0.04 0.001 0 +24 0 0.04 0.001 0 +31 0.004 0.016 0.001 0 +32 0.006 0.016 0.001 0 +33 0.006 0.014 0.001 0 +38 0.008 0.016 0.001 0 +43 0.006 0.018 0.001 0 +51 0.012 0.024 0.001 0 +52 0.014 0.024 0.001 0 +53 0.014 0.022 0.001 0 +58 0.016 0.024 0.001 0 +63 0.014 0.026 0.001 0 +1 0 0 0 0.02 0 0 1 17 2 1 -2 +2 0.02 0 0 0.02 0.04 0 0 2 2 -3 +3 0 0.04 0 0.02 0.04 0 1 18 2 3 -4 +4 0 0 0 0 0.04 0 0 2 4 -1 +5 0.004 0.016 0 0.006 0.018 0 0 2 5 -6 +6 0.006 0.016 0 0.008000000000000002 0.018 0 0 2 6 -7 +7 0.006 0.014 0 0.008 0.016 0 0 2 7 -8 +8 0.004 0.014 0 0.006 0.016 0 0 2 8 -5 +10 0.012 0.024 0 0.014 0.026 0 0 2 10 -11 +11 0.014 0.024 0 0.016 0.026 0 0 2 11 -12 +12 0.014 0.022 0 0.016 0.024 0 0 2 12 -13 +13 0.012 0.022 0 0.014 0.024 0 0 2 13 -10 +22 0 0 0.001 0.02 0 0.001 0 2 15 -16 +23 0.02 0 0.001 0.02 0.04 0.001 0 2 16 -20 +24 0 0.04 0.001 0.02 0.04 0.001 0 2 20 -24 +25 0 0 0.001 0 0.04 0.001 0 2 24 -15 +26 0.004 0.014 0.001 0.006 0.016 0.001 0 2 31 -33 +27 0.006 0.014 0.001 0.008 0.016 0.001 0 2 33 -38 +28 0.006 0.016 0.001 0.008000000000000002 0.018 0.001 0 2 38 -43 +29 0.004 0.016 0.001 0.006 0.018 0.001 0 2 43 -31 +30 0.012 0.022 0.001 0.014 0.024 0.001 0 2 51 -53 +31 0.014 0.022 0.001 0.016 0.024 0.001 0 2 53 -58 +32 0.014 0.024 0.001 0.016 0.026 0.001 0 2 58 -63 +33 0.012 0.024 0.001 0.014 0.026 0.001 0 2 63 -51 +35 0 0 0 0 0 0.001 0 2 1 -15 +36 0.02 0 0 0.02 0 0.001 0 2 2 -16 +40 0.02 0.04 0 0.02 0.04 0.001 0 2 3 -20 +44 0 0.04 0 0 0.04 0.001 0 2 4 -24 +51 0.004 0.016 0 0.004 0.016 0.001 0 2 5 -31 +52 0.006 0.014 0 0.006 0.014 0.001 0 2 8 -33 +56 0.008 0.016 0 0.008 0.016 0.001 0 2 7 -38 +60 0.006 0.018 0 0.006 0.018 0.001 0 2 6 -43 +67 0.012 0.024 0 0.012 0.024 0.001 0 2 10 -51 +68 0.014 0.022 0 0.014 0.022 0.001 0 2 13 -53 +72 0.016 0.024 0 0.016 0.024 0.001 0 2 12 -58 +76 0.014 0.026 0 0.014 0.026 0.001 0 2 11 -63 +11 0 0 0 0.02 0.04 0 1 16 12 1 2 3 4 -8 -7 -6 -5 -13 -12 -11 -10 +37 0 0 0 0.02 0 0.001 1 84 4 1 36 -22 -35 +41 0.02 0 0 0.02 0.04 0.001 0 4 2 40 -23 -36 +45 0 0.04 0 0.02 0.04 0.001 1 85 4 3 44 -24 -40 +49 0 0 0 0 0.04 0.001 0 4 4 35 -25 -44 +53 0.004 0.014 0 0.006 0.016 0.001 0 4 -8 52 -26 -51 +57 0.006 0.014 0 0.008 0.016 0.001 0 4 -7 56 -27 -52 +61 0.006 0.016 0 0.008000000000000002 0.018 0.001 0 4 -6 60 -28 -56 +65 0.004 0.016 0 0.006 0.018 0.001 0 4 -5 51 -29 -60 +69 0.012 0.022 0 0.014 0.024 0.001 0 4 -13 68 -30 -67 +73 0.014 0.022 0 0.016 0.024 0.001 0 4 -12 72 -31 -68 +77 0.014 0.024 0 0.016 0.026 0.001 0 4 -11 76 -32 -72 +81 0.012 0.024 0 0.014 0.026 0.001 0 4 -10 67 -33 -76 +82 0 0 0.001 0.02 0.04 0.001 0 12 22 23 24 25 26 27 28 29 30 31 32 33 +1 0 0 0 0.02 0.04 0.001 1 83 14 -11 82 37 41 45 49 -53 -57 -61 -65 -69 -73 -77 -81 +$EndEntities +$Nodes +53 318 1 318 +0 1 0 1 +1 +0 0 0 +0 2 0 1 +2 +0.02 0 0 +0 3 0 1 +3 +0.02 0.04 0 +0 4 0 1 +4 +0 0.04 0 +0 5 0 1 +5 +0.004 0.016 0 +0 6 0 1 +6 +0.006 0.018 0 +0 7 0 1 +7 +0.008 0.016 0 +0 8 0 1 +8 +0.006 0.014 0 +0 10 0 1 +9 +0.012 0.024 0 +0 11 0 1 +10 +0.014 0.026 0 +0 12 0 1 +11 +0.016 0.024 0 +0 13 0 1 +12 +0.014 0.022 0 +0 15 0 1 +13 +0 0 0.001 +0 16 0 1 +14 +0.02 0 0.001 +0 20 0 1 +15 +0.02 0.04 0.001 +0 24 0 1 +16 +0 0.04 0.001 +0 31 0 1 +17 +0.004 0.016 0.001 +0 33 0 1 +18 +0.006 0.014 0.001 +0 38 0 1 +19 +0.008 0.016 0.001 +0 43 0 1 +20 +0.006 0.018 0.001 +0 51 0 1 +21 +0.012 0.024 0.001 +0 53 0 1 +22 +0.014 0.022 0.001 +0 58 0 1 +23 +0.016 0.024 0.001 +0 63 0 1 +24 +0.014 0.026 0.001 +1 1 0 4 +25 +26 +27 +28 +0.003999999999991045 0 0 +0.007999999999979423 0 0 +0.01199999999997901 0 0 +0.01599999999998917 0 0 +1 2 0 9 +29 +30 +31 +32 +33 +34 +35 +36 +37 +0.02 0.003999999999992779 0 +0.02 0.007999999999982091 0 +0.02 0.0119999999999705 0 +0.02 0.01599999999995885 0 +0.02 0.01999999999994786 0 +0.02 0.02399999999995802 0 +0.02 0.02799999999996886 0 +0.02 0.03199999999997834 0 +0.02 0.03599999999998998 0 +1 3 0 4 +38 +39 +40 +41 +0.01600000000001043 0.04 0 +0.01200000000002099 0.04 0 +0.008000000000021266 0.04 0 +0.004000000000010967 0.04 0 +1 4 0 9 +42 +43 +44 +45 +46 +47 +48 +49 +50 +0 0.0360000000000088 0 +0 0.03200000000002086 0 +0 0.02800000000003047 0 +0 0.02400000000004199 0 +0 0.02000000000005283 0 +0 0.01600000000004253 0 +0 0.01200000000003156 0 +0 0.008000000000021934 0 +0 0.004000000000010155 0 +1 5 0 1 +51 +0.004585786438864124 0.01741421356361032 0 +1 6 0 1 +52 +0.007414213564626375 0.01741421356011982 0 +1 7 0 1 +53 +0.007414213557591704 0.01458578643284551 0 +1 8 0 1 +54 +0.004585786434403288 0.01458578644085052 0 +1 10 0 1 +55 +0.01258578643832573 0.02541421356307192 0 +1 11 0 1 +56 +0.01541421356361026 0.02541421356113593 0 +1 12 0 1 +57 +0.01541421355827332 0.02258578643352713 0 +1 13 0 1 +58 +0.01258578643573995 0.02258578643951385 0 +1 22 0 4 +59 +60 +61 +62 +0.003999999999991045 0 0.001 +0.007999999999979423 0 0.001 +0.01199999999997901 0 0.001 +0.01599999999998917 0 0.001 +1 23 0 9 +63 +64 +65 +66 +67 +68 +69 +70 +71 +0.02 0.003999999999992779 0.001 +0.02 0.007999999999982091 0.001 +0.02 0.0119999999999705 0.001 +0.02 0.01599999999995885 0.001 +0.02 0.01999999999994786 0.001 +0.02 0.02399999999995802 0.001 +0.02 0.02799999999996886 0.001 +0.02 0.03199999999997834 0.001 +0.02 0.03599999999998998 0.001 +1 24 0 4 +72 +73 +74 +75 +0.01600000000001043 0.04 0.001 +0.01200000000002099 0.04 0.001 +0.008000000000021266 0.04 0.001 +0.004000000000010967 0.04 0.001 +1 25 0 9 +76 +77 +78 +79 +80 +81 +82 +83 +84 +0 0.0360000000000088 0.001 +0 0.03200000000002086 0.001 +0 0.02800000000003047 0.001 +0 0.02400000000004199 0.001 +0 0.02000000000005283 0.001 +0 0.01600000000004253 0.001 +0 0.01200000000003156 0.001 +0 0.008000000000021934 0.001 +0 0.004000000000010155 0.001 +1 26 0 1 +85 +0.004585786434403288 0.01458578644085052 0.001 +1 27 0 1 +86 +0.007414213557591704 0.01458578643284551 0.001 +1 28 0 1 +87 +0.007414213564626375 0.01741421356011982 0.001 +1 29 0 1 +88 +0.004585786438864124 0.01741421356361032 0.001 +1 30 0 1 +89 +0.01258578643573995 0.02258578643951385 0.001 +1 31 0 1 +90 +0.01541421355827332 0.02258578643352713 0.001 +1 32 0 1 +91 +0.01541421356361026 0.02541421356113593 0.001 +1 33 0 1 +92 +0.01258578643832573 0.02541421356307192 0.001 +2 11 0 113 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +0.009305085336318814 0.007242932335077995 0 +0.01069491464981511 0.03275706766339832 0 +0.01179994313185588 0.01818590741815099 0 +0.01169692765931399 0.01273881551247091 0 +0.008073074645847118 0.02143998157715517 0 +0.008303072338858398 0.02726118448154595 0 +0.008126359681160147 0.01086651359471463 0 +0.01187364031107554 0.02913348640307228 0 +0.01596681275866813 0.01797754530892798 0 +0.003898705358817215 0.02211526162911288 0 +0.01472528537422266 0.008714336140430158 0 +0.00527471462015333 0.03128566383584049 0 +0.003225993561541615 0.01027843205349559 0 +0.01677400643575444 0.02972156794989849 0 +0.01443926882981783 0.03459017604779629 0 +0.005560731158156068 0.005409823959566326 0 +0.009177566573930549 0.01927807810338915 0 +0.01068817106543584 0.01566152123143427 0 +0.009296923934482258 0.02433394312423463 0 +0.01114613564357423 0.02083470943266296 0 +0.006882941406954447 0.0355039910091392 0 +0.01311705857024701 0.004496008982877209 0 +0.00817079272444216 0.02983066727944972 0 +0.01182920726723616 0.01016933271065389 0 +0.005984015967726991 0.02376912672139728 0 +0.01406528955805806 0.01624043170650718 0 +0.01354826362409331 0.02001028795017678 0 +0.003027281655374947 0.02681472675379423 0 +0.01697271834242629 0.01318527324352493 0 +0.009304761244630231 0.01286949893555778 0 +0.01069523875007233 0.02713050106098266 0 +0.00715168830665149 0.01984116825173512 0 +0.01059639485583505 0.02259018059098434 0 +0.009039337073247089 0.01770983071438829 0 +0.008075124534206234 0.003752623988266514 0 +0.01192487544895909 0.03624737601234268 0 +0.01552347273039341 0.02032201145729972 0 +0.004476527265911718 0.01967798854109203 0 +0.01346101180270721 0.03147260721525217 0 +0.006538988188273088 0.008527392786708237 0 +0.007386510837589877 0.01265266671550832 0 +0.01261348915780672 0.02734733328193956 0 +0.01791663715907019 0.02238115850468353 0 +0.002083362840702939 0.01761884149185942 0 +0.01780861717602628 0.02524974426718877 0 +0.002191382823676036 0.01475025573345791 0 +0.006183497494515773 0.02135885999336555 0 +0.01671887744484033 0.005966012789220299 0 +0.003281122539781163 0.03403398719028428 0 +0.009114022947489 0.01471012945544162 0 +0.01088597704927713 0.02528987054063187 0 +0.004621726218752481 0.01251294327566644 0 +0.006038643169173592 0.01104805737741494 0 +0.01537827377959256 0.027487056727493 0 +0.0139613568245035 0.02895194262304975 0 +0.005504168719618512 0.02848787898994182 0 +0.01449583127650941 0.01151212100307678 0 +0.01150329511201502 0.007490434027081601 0 +0.00849670487388818 0.03250956596515134 0 +0.01352895092355669 0.01803819602628648 0 +0.00960501003749376 0.0209310252656697 0 +0.01746316904973481 0.0101957858053449 0 +0.002536830942682246 0.02980421419144355 0 +0.003724464603623828 0.02452598650038467 0 +0.016258500125055 0.01549448657299096 0 +0.01246800413404313 0.02116362760182919 0 +0.007952068908547548 0.01870006982962981 0 +0.005424692594778121 0.002675320667748494 0 +0.01457530738784064 0.0373246793409118 0 +0.0169843064118451 0.03333563343148784 0 +0.003015693582991975 0.006664366573930614 0 +0.01053855436293785 0.01917765284078777 0 +0.01000573759576886 0.03478984563581824 0 +0.009994262387912022 0.005210154360501543 0 +0.009529830686073864 0.009361660902646242 0 +0.01047016930319267 0.03063833909389299 0 +0.01217965612526984 0.01673270877401377 0 +0.007803613537192673 0.02319322421702164 0 +0.0106394452677493 0.02395093877851701 0 +0.01009741730768288 0.01120116433120869 0 +0.009902582685528221 0.02879883566378872 0 +0.01063855450088786 0.0172357395614159 0 +0.009450180827123362 0.01619603156760335 0 +0.007625758442256362 0.006094553911178172 0 +0.012374241543195 0.03390544608908563 0 +0.008315014115255849 0.01367630196442499 0 +0.01168498588063227 0.02632369803204516 0 +0.005715028950688431 0.02596513809445731 0 +0.01429034942600494 0.01403986715200083 0 +0.004078898313742819 0.03736986866518741 0 +0.01592110166133062 0.002630131325264771 0 +0.005879309911003273 0.01950543264656156 0 +0.01026642145102587 0.002546790452671545 0 +0.009733578536475329 0.03745320954412638 0 +0.008394889882427281 0.02018386115777897 0 +0.009385676498323604 0.025789484865415 0 +0.01061134250230719 0.01420960800166776 0 +0.01210494933210627 0.01958548222676341 0 +0.01699981377158567 0.03687508147003097 0 +0.003000186222652868 0.003124918533542597 0 +0.01729338797506882 0.02743341137603463 0 +0.002706612024462588 0.01256658862752312 0 +0.01770622707096568 0.01968175959386512 0 +0.002306852414653195 0.02031712578117859 0 +0.005985944229318694 0.01257982649592883 0 +0.01401405576762962 0.02742017350549465 0 +0.01225528938939831 0.01493715872968245 0 +0.007748055204545391 0.0250520169173453 0 +0.00919278214996957 0.02279222597536587 0 +0.01169908026729809 0.02179357601624758 0 +0.01664013762967565 0.02124267899734387 0 +0.003363132240032993 0.01875704234443508 0 +0.01464187500917789 0.01908701018567274 0 +2 37 0 0 +2 45 0 0 +2 82 0 113 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +0.009305085336318814 0.007242932335077995 0.001 +0.01069491464981511 0.03275706766339832 0.001 +0.01179994313185588 0.01818590741815099 0.001 +0.01169692765931399 0.01273881551247091 0.001 +0.008073074645847118 0.02143998157715517 0.001 +0.008303072338858398 0.02726118448154595 0.001 +0.008126359681160147 0.01086651359471463 0.001 +0.01187364031107554 0.02913348640307228 0.001 +0.01596681275866813 0.01797754530892798 0.001 +0.003898705358817215 0.02211526162911288 0.001 +0.01472528537422266 0.008714336140430158 0.001 +0.00527471462015333 0.03128566383584049 0.001 +0.003225993561541615 0.01027843205349559 0.001 +0.01677400643575444 0.02972156794989849 0.001 +0.01443926882981783 0.03459017604779629 0.001 +0.005560731158156068 0.005409823959566326 0.001 +0.009177566573930549 0.01927807810338915 0.001 +0.01068817106543584 0.01566152123143427 0.001 +0.009296923934482258 0.02433394312423463 0.001 +0.01114613564357423 0.02083470943266296 0.001 +0.006882941406954447 0.0355039910091392 0.001 +0.01311705857024701 0.004496008982877209 0.001 +0.00817079272444216 0.02983066727944972 0.001 +0.01182920726723616 0.01016933271065389 0.001 +0.005984015967726991 0.02376912672139728 0.001 +0.01406528955805806 0.01624043170650718 0.001 +0.01354826362409331 0.02001028795017678 0.001 +0.003027281655374947 0.02681472675379423 0.001 +0.01697271834242629 0.01318527324352493 0.001 +0.009304761244630231 0.01286949893555778 0.001 +0.01069523875007233 0.02713050106098266 0.001 +0.00715168830665149 0.01984116825173512 0.001 +0.01059639485583505 0.02259018059098434 0.001 +0.009039337073247089 0.01770983071438829 0.001 +0.008075124534206234 0.003752623988266514 0.001 +0.01192487544895909 0.03624737601234268 0.001 +0.01552347273039341 0.02032201145729972 0.001 +0.004476527265911718 0.01967798854109203 0.001 +0.01346101180270721 0.03147260721525217 0.001 +0.006538988188273088 0.008527392786708237 0.001 +0.007386510837589877 0.01265266671550832 0.001 +0.01261348915780672 0.02734733328193956 0.001 +0.01791663715907019 0.02238115850468353 0.001 +0.002083362840702939 0.01761884149185942 0.001 +0.01780861717602628 0.02524974426718877 0.001 +0.002191382823676036 0.01475025573345791 0.001 +0.006183497494515773 0.02135885999336555 0.001 +0.01671887744484033 0.005966012789220299 0.001 +0.003281122539781163 0.03403398719028428 0.001 +0.009114022947489 0.01471012945544162 0.001 +0.01088597704927713 0.02528987054063187 0.001 +0.004621726218752481 0.01251294327566644 0.001 +0.006038643169173592 0.01104805737741494 0.001 +0.01537827377959256 0.027487056727493 0.001 +0.0139613568245035 0.02895194262304975 0.001 +0.005504168719618512 0.02848787898994182 0.001 +0.01449583127650941 0.01151212100307678 0.001 +0.01150329511201502 0.007490434027081601 0.001 +0.00849670487388818 0.03250956596515134 0.001 +0.01352895092355669 0.01803819602628648 0.001 +0.00960501003749376 0.0209310252656697 0.001 +0.01746316904973481 0.0101957858053449 0.001 +0.002536830942682246 0.02980421419144355 0.001 +0.003724464603623828 0.02452598650038467 0.001 +0.016258500125055 0.01549448657299096 0.001 +0.01246800413404313 0.02116362760182919 0.001 +0.007952068908547548 0.01870006982962981 0.001 +0.005424692594778121 0.002675320667748494 0.001 +0.01457530738784064 0.0373246793409118 0.001 +0.0169843064118451 0.03333563343148784 0.001 +0.003015693582991975 0.006664366573930614 0.001 +0.01053855436293785 0.01917765284078777 0.001 +0.01000573759576886 0.03478984563581824 0.001 +0.009994262387912022 0.005210154360501543 0.001 +0.009529830686073864 0.009361660902646242 0.001 +0.01047016930319267 0.03063833909389299 0.001 +0.01217965612526984 0.01673270877401377 0.001 +0.007803613537192673 0.02319322421702164 0.001 +0.0106394452677493 0.02395093877851701 0.001 +0.01009741730768288 0.01120116433120869 0.001 +0.009902582685528221 0.02879883566378872 0.001 +0.01063855450088786 0.0172357395614159 0.001 +0.009450180827123362 0.01619603156760335 0.001 +0.007625758442256362 0.006094553911178172 0.001 +0.012374241543195 0.03390544608908563 0.001 +0.008315014115255849 0.01367630196442499 0.001 +0.01168498588063227 0.02632369803204516 0.001 +0.005715028950688431 0.02596513809445731 0.001 +0.01429034942600494 0.01403986715200083 0.001 +0.004078898313742819 0.03736986866518741 0.001 +0.01592110166133062 0.002630131325264771 0.001 +0.005879309911003273 0.01950543264656156 0.001 +0.01026642145102587 0.002546790452671545 0.001 +0.009733578536475329 0.03745320954412638 0.001 +0.008394889882427281 0.02018386115777897 0.001 +0.009385676498323604 0.025789484865415 0.001 +0.01061134250230719 0.01420960800166776 0.001 +0.01210494933210627 0.01958548222676341 0.001 +0.01699981377158567 0.03687508147003097 0.001 +0.003000186222652868 0.003124918533542597 0.001 +0.01729338797506882 0.02743341137603463 0.001 +0.002706612024462588 0.01256658862752312 0.001 +0.01770622707096568 0.01968175959386512 0.001 +0.002306852414653195 0.02031712578117859 0.001 +0.005985944229318694 0.01257982649592883 0.001 +0.01401405576762962 0.02742017350549465 0.001 +0.01225528938939831 0.01493715872968245 0.001 +0.007748055204545391 0.0250520169173453 0.001 +0.00919278214996957 0.02279222597536587 0.001 +0.01169908026729809 0.02179357601624758 0.001 +0.01664013762967565 0.02124267899734387 0.001 +0.003363132240032993 0.01875704234443508 0.001 +0.01464187500917789 0.01908701018567274 0.001 +3 1 0 0 +$EndNodes +$Elements +8 1128 1 1128 +0 1 15 1 +1 1 +0 4 15 1 +2 4 +1 1 1 5 +3 1 25 +4 25 26 +5 26 27 +6 27 28 +7 28 2 +1 3 1 5 +8 3 38 +9 38 39 +10 39 40 +11 40 41 +12 41 4 +2 11 2 274 +13 120 45 156 +14 121 32 157 +15 12 119 129 +16 113 104 151 +17 114 103 150 +18 124 6 159 +19 109 126 164 +20 2 29 183 +21 4 42 182 +22 164 126 174 +23 11 135 137 +24 5 136 138 +25 28 2 183 +26 41 4 182 +27 35 106 193 +28 48 105 194 +29 96 122 172 +30 98 123 173 +31 57 12 129 +32 51 6 130 +33 11 57 135 +34 5 51 136 +35 54 5 138 +36 56 11 137 +37 116 96 172 +38 115 98 173 +39 105 49 163 +40 106 36 162 +41 101 32 195 +42 102 45 196 +43 99 122 133 +44 100 123 134 +45 58 9 125 +46 103 140 154 +47 104 141 155 +48 104 113 141 +49 103 114 140 +50 100 131 168 +51 99 132 167 +52 146 56 193 +53 144 54 194 +54 44 45 120 +55 31 32 121 +56 32 101 157 +57 45 102 156 +58 105 132 145 +59 106 131 147 +60 119 12 158 +61 6 52 159 +62 48 49 105 +63 35 36 106 +64 6 124 184 +65 97 124 187 +66 132 99 145 +67 131 100 147 +68 112 125 153 +69 58 125 202 +70 53 8 133 +71 55 10 134 +72 163 50 192 +73 162 37 191 +74 131 106 162 +75 132 105 163 +76 140 30 154 +77 141 43 155 +78 124 97 139 +79 52 7 126 +80 139 130 184 +81 130 6 184 +82 98 115 148 +83 96 116 149 +84 133 122 178 +85 134 123 179 +86 113 40 182 +87 114 27 183 +88 49 50 163 +89 36 37 162 +90 1 25 192 +91 3 38 191 +92 124 139 184 +93 52 126 159 +94 131 94 168 +95 132 93 167 +96 153 125 201 +97 8 54 144 +98 10 56 146 +99 56 137 193 +100 54 138 194 +101 116 103 149 +102 115 104 148 +103 122 96 189 +104 123 98 188 +105 40 113 186 +106 27 114 185 +107 122 99 172 +108 123 100 173 +109 29 140 183 +110 42 141 182 +111 125 112 202 +112 103 116 150 +113 104 115 151 +114 95 164 174 +115 50 1 192 +116 37 3 191 +117 126 109 159 +118 107 131 162 +119 108 132 163 +120 150 116 167 +121 151 115 168 +122 135 57 203 +123 136 51 204 +124 29 30 140 +125 42 43 141 +126 121 149 154 +127 120 148 155 +128 125 9 171 +129 93 150 167 +130 94 151 168 +131 108 127 176 +132 107 128 177 +133 40 41 182 +134 27 28 183 +135 95 152 190 +136 118 101 152 +137 7 53 142 +138 9 55 143 +139 32 33 195 +140 45 46 196 +141 152 119 190 +142 117 102 139 +143 148 104 155 +144 149 103 154 +145 107 162 191 +146 108 163 192 +147 12 58 158 +148 97 153 201 +149 139 97 170 +150 102 130 139 +151 129 119 205 +152 26 127 160 +153 39 128 161 +154 127 108 160 +155 128 107 161 +156 53 133 178 +157 55 134 179 +158 31 121 154 +159 44 120 155 +160 126 7 175 +161 47 48 138 +162 33 34 135 +163 34 35 137 +164 46 47 136 +165 57 129 203 +166 51 130 204 +167 99 133 145 +168 100 134 147 +169 150 93 166 +170 151 94 165 +171 102 117 156 +172 101 118 157 +173 96 149 181 +174 98 148 180 +175 25 26 160 +176 38 39 161 +177 94 131 177 +178 93 132 176 +179 112 153 164 +180 133 8 197 +181 134 10 198 +182 153 109 164 +183 113 151 165 +184 114 150 166 +185 30 31 154 +186 43 44 155 +187 131 107 177 +188 132 108 176 +189 128 39 186 +190 127 26 185 +191 165 94 177 +192 166 93 176 +193 25 160 192 +194 38 161 191 +195 8 144 197 +196 10 146 198 +197 152 95 169 +198 39 40 186 +199 26 27 185 +200 174 126 175 +201 149 121 181 +202 148 120 180 +203 142 110 175 +204 143 111 171 +205 135 34 137 +206 136 47 138 +207 140 114 183 +208 141 113 182 +209 152 101 205 +210 125 171 201 +211 113 165 186 +212 114 166 185 +213 117 139 170 +214 9 143 171 +215 158 112 190 +216 7 142 175 +217 124 159 187 +218 142 53 178 +219 143 55 179 +220 110 174 175 +221 159 109 187 +222 110 142 189 +223 111 143 188 +224 171 111 201 +225 145 133 197 +226 147 134 198 +227 128 165 177 +228 127 166 176 +229 119 158 190 +230 156 117 180 +231 157 118 181 +232 99 167 172 +233 100 168 173 +234 153 97 187 +235 109 153 187 +236 129 101 195 +237 130 102 196 +238 180 117 200 +239 181 118 199 +240 46 136 196 +241 33 135 195 +242 146 106 147 +243 144 105 145 +244 196 136 204 +245 195 135 203 +246 98 180 200 +247 96 181 199 +248 169 95 174 +249 119 152 205 +250 110 189 199 +251 111 188 200 +252 112 158 202 +253 101 129 205 +254 138 48 194 +255 137 35 193 +256 161 107 191 +257 160 108 192 +258 158 58 202 +259 118 152 169 +260 112 164 190 +261 144 145 197 +262 146 147 198 +263 129 195 203 +264 130 196 204 +265 189 96 199 +266 188 98 200 +267 143 123 188 +268 142 122 189 +269 120 156 180 +270 121 157 181 +271 122 142 178 +272 123 143 179 +273 110 169 174 +274 170 97 201 +275 166 127 185 +276 165 128 186 +277 169 110 199 +278 170 111 200 +279 164 95 190 +280 111 170 201 +281 167 116 172 +282 168 115 173 +283 118 169 199 +284 117 170 200 +285 105 144 194 +286 106 146 193 +2 37 2 10 +287 13 1 25 +288 13 25 59 +289 59 25 26 +290 59 26 60 +291 60 26 61 +292 26 27 61 +293 61 27 62 +294 27 28 62 +295 62 28 2 +296 62 2 14 +2 45 2 10 +297 15 3 72 +298 3 38 72 +299 72 38 73 +300 38 39 73 +301 73 39 74 +302 39 40 74 +303 74 40 75 +304 40 41 75 +305 75 41 4 +306 75 4 16 +3 1 4 822 +307 120 45 156 269 +308 79 233 269 45 +309 45 233 269 120 +310 121 32 157 270 +311 66 234 270 32 +312 32 234 270 121 +313 12 119 129 242 +314 232 22 242 12 +315 119 12 232 242 +316 113 104 151 264 +317 217 226 264 104 +318 104 226 264 113 +319 114 103 150 263 +320 216 227 263 103 +321 103 227 263 114 +322 124 6 159 272 +323 20 237 272 6 +324 6 237 272 124 +325 109 126 164 277 +326 239 222 277 109 +327 126 109 239 277 +328 2 29 183 296 +329 63 14 296 2 +330 29 2 63 296 +331 4 42 182 295 +332 76 16 295 4 +333 42 4 76 295 +334 164 126 174 287 +335 239 277 287 126 +336 126 277 287 164 +337 11 135 137 250 +338 248 23 250 11 +339 135 11 248 250 +340 5 136 138 251 +341 249 17 251 5 +342 136 5 249 251 +343 28 2 183 296 +344 14 62 296 2 +345 2 62 296 28 +346 41 4 182 295 +347 16 75 295 4 +348 4 75 295 41 +349 35 106 193 306 +350 219 69 306 35 +351 106 35 219 306 +352 48 105 194 307 +353 218 82 307 48 +354 105 48 218 307 +355 96 122 172 285 +356 235 209 285 96 +357 122 96 235 285 +358 98 123 173 286 +359 236 211 286 98 +360 123 98 236 286 +361 57 12 129 242 +362 22 90 242 12 +363 12 90 242 57 +364 51 6 130 243 +365 20 88 243 6 +366 6 88 243 51 +367 11 57 135 248 +368 90 23 248 11 +369 57 11 90 248 +370 5 51 136 249 +371 88 17 249 5 +372 51 5 88 249 +373 54 5 138 251 +374 17 85 251 5 +375 5 85 251 54 +376 56 11 137 250 +377 23 91 250 11 +378 11 91 250 56 +379 116 96 172 285 +380 209 229 285 96 +381 96 229 285 116 +382 115 98 173 286 +383 211 228 286 98 +384 98 228 286 115 +385 105 49 163 276 +386 83 218 276 49 +387 49 218 276 105 +388 106 36 162 275 +389 70 219 275 36 +390 36 219 275 106 +391 101 32 195 308 +392 66 214 308 32 +393 32 214 308 101 +394 102 45 196 309 +395 79 215 309 45 +396 45 215 309 102 +397 99 122 133 246 +398 235 212 246 99 +399 122 99 235 246 +400 100 123 134 247 +401 236 213 247 100 +402 123 100 236 247 +403 58 9 125 238 +404 21 89 238 9 +405 9 89 238 58 +406 103 140 154 267 +407 253 216 267 103 +408 140 103 253 267 +409 104 141 155 268 +410 254 217 268 104 +411 141 104 254 268 +412 104 113 141 254 +413 226 217 254 104 +414 113 104 226 254 +415 103 114 140 253 +416 227 216 253 103 +417 114 103 227 253 +418 100 131 168 281 +419 244 213 281 100 +420 131 100 244 281 +421 99 132 167 280 +422 245 212 280 99 +423 132 99 245 280 +424 146 56 193 306 +425 91 259 306 56 +426 56 259 306 146 +427 144 54 194 307 +428 85 257 307 54 +429 54 257 307 144 +430 44 45 120 233 +431 79 78 233 44 +432 45 44 79 233 +433 31 32 121 234 +434 66 65 234 31 +435 32 31 66 234 +436 32 101 157 270 +437 214 66 270 32 +438 101 32 214 270 +439 45 102 156 269 +440 215 79 269 45 +441 102 45 215 269 +442 105 132 145 258 +443 245 218 258 105 +444 132 105 245 258 +445 106 131 147 260 +446 244 219 260 106 +447 131 106 244 260 +448 119 12 158 271 +449 22 232 271 12 +450 12 232 271 119 +451 6 52 159 272 +452 87 20 272 6 +453 52 6 87 272 +454 48 49 105 218 +455 83 82 218 48 +456 49 48 83 218 +457 35 36 106 219 +458 70 69 219 35 +459 36 35 70 219 +460 6 124 184 297 +461 237 20 297 6 +462 124 6 237 297 +463 97 124 187 300 +464 237 210 300 97 +465 124 97 237 300 +466 132 99 145 258 +467 212 245 258 99 +468 99 245 258 132 +469 131 100 147 260 +470 213 244 260 100 +471 100 244 260 131 +472 112 125 153 266 +473 238 225 266 112 +474 125 112 238 266 +475 58 125 202 315 +476 238 89 315 58 +477 125 58 238 315 +478 53 8 133 246 +479 18 86 246 8 +480 8 86 246 53 +481 55 10 134 247 +482 24 92 247 10 +483 10 92 247 55 +484 163 50 192 305 +485 84 276 305 50 +486 50 276 305 163 +487 162 37 191 304 +488 71 275 304 37 +489 37 275 304 162 +490 131 106 162 275 +491 219 244 275 106 +492 106 244 275 131 +493 132 105 163 276 +494 218 245 276 105 +495 105 245 276 132 +496 140 30 154 267 +497 64 253 267 30 +498 30 253 267 140 +499 141 43 155 268 +500 77 254 268 43 +501 43 254 268 141 +502 124 97 139 252 +503 210 237 252 97 +504 97 237 252 124 +505 52 7 126 239 +506 19 87 239 7 +507 7 87 239 52 +508 139 130 184 297 +509 243 252 297 130 +510 130 252 297 139 +511 130 6 184 297 +512 20 243 297 6 +513 6 243 297 130 +514 98 115 148 261 +515 228 211 261 98 +516 115 98 228 261 +517 96 116 149 262 +518 229 209 262 96 +519 116 96 229 262 +520 133 122 178 291 +521 235 246 291 122 +522 122 246 291 133 +523 134 123 179 292 +524 236 247 292 123 +525 123 247 292 134 +526 113 40 182 295 +527 74 226 295 40 +528 40 226 295 113 +529 114 27 183 296 +530 61 227 296 27 +531 27 227 296 114 +532 49 50 163 276 +533 84 83 276 49 +534 50 49 84 276 +535 36 37 162 275 +536 71 70 275 36 +537 37 36 71 275 +538 1 25 192 305 +539 59 13 305 25 +540 25 13 305 1 +541 3 38 191 304 +542 72 15 304 3 +543 38 3 72 304 +544 124 139 184 297 +545 252 237 297 124 +546 139 124 252 297 +547 52 126 159 272 +548 239 87 272 52 +549 126 52 239 272 +550 131 94 168 281 +551 207 244 281 94 +552 94 244 281 131 +553 132 93 167 280 +554 206 245 280 93 +555 93 245 280 132 +556 153 125 201 314 +557 238 266 314 125 +558 125 266 314 153 +559 8 54 144 257 +560 85 18 257 8 +561 54 8 85 257 +562 10 56 146 259 +563 91 24 259 10 +564 56 10 91 259 +565 56 137 193 306 +566 250 91 306 56 +567 137 56 250 306 +568 54 138 194 307 +569 251 85 307 54 +570 138 54 251 307 +571 116 103 149 262 +572 216 229 262 103 +573 103 229 262 116 +574 115 104 148 261 +575 217 228 261 104 +576 104 228 261 115 +577 122 96 189 302 +578 209 235 302 96 +579 96 235 302 122 +580 123 98 188 301 +581 211 236 301 98 +582 98 236 301 123 +583 40 113 186 299 +584 226 74 299 40 +585 113 40 226 299 +586 27 114 185 298 +587 227 61 298 27 +588 114 27 227 298 +589 122 99 172 285 +590 212 235 285 99 +591 99 235 285 122 +592 123 100 173 286 +593 213 236 286 100 +594 100 236 286 123 +595 29 140 183 296 +596 253 63 296 29 +597 140 29 253 296 +598 42 141 182 295 +599 254 76 295 42 +600 141 42 254 295 +601 125 112 202 315 +602 225 238 315 112 +603 112 238 315 125 +604 103 116 150 263 +605 229 216 263 103 +606 116 103 229 263 +607 104 115 151 264 +608 228 217 264 104 +609 115 104 228 264 +610 95 164 174 287 +611 277 208 287 95 +612 164 95 277 287 +613 50 1 192 305 +614 13 84 305 1 +615 1 84 305 50 +616 37 3 191 304 +617 15 71 304 3 +618 3 71 304 37 +619 126 109 159 272 +620 222 239 272 109 +621 109 239 272 126 +622 107 131 162 275 +623 244 220 275 107 +624 131 107 244 275 +625 108 132 163 276 +626 245 221 276 108 +627 132 108 245 276 +628 150 116 167 280 +629 229 263 280 116 +630 116 263 280 150 +631 151 115 168 281 +632 228 264 281 115 +633 115 264 281 151 +634 135 57 203 316 +635 90 248 316 57 +636 57 248 316 135 +637 136 51 204 317 +638 88 249 317 51 +639 51 249 317 136 +640 29 30 140 253 +641 64 63 253 29 +642 30 29 64 253 +643 42 43 141 254 +644 77 76 254 42 +645 43 42 77 254 +646 121 149 154 267 +647 262 234 267 121 +648 149 121 262 267 +649 120 148 155 268 +650 261 233 268 120 +651 148 120 261 268 +652 125 9 171 284 +653 21 238 284 9 +654 9 238 284 125 +655 93 150 167 280 +656 263 206 280 93 +657 150 93 263 280 +658 94 151 168 281 +659 264 207 281 94 +660 151 94 264 281 +661 108 127 176 240 +662 240 221 289 108 +663 176 108 240 289 +664 107 128 177 290 +665 241 220 290 107 +666 128 107 241 290 +667 40 41 182 295 +668 75 74 295 40 +669 41 40 75 295 +670 27 28 183 296 +671 62 61 296 27 +672 28 27 62 296 +673 95 152 190 303 +674 265 208 303 95 +675 152 95 265 303 +676 118 101 152 265 +677 214 231 265 101 +678 101 231 265 118 +679 7 53 142 255 +680 86 19 255 7 +681 53 7 86 255 +682 9 55 143 256 +683 92 21 256 9 +684 55 9 92 256 +685 32 33 195 308 +686 67 66 308 32 +687 33 32 67 308 +688 45 46 196 309 +689 80 79 309 45 +690 46 45 80 309 +691 152 119 190 303 +692 232 265 303 119 +693 119 265 303 152 +694 117 102 139 252 +695 215 230 252 102 +696 102 230 252 117 +697 148 104 155 268 +698 217 261 268 104 +699 104 261 268 148 +700 149 103 154 267 +701 216 262 267 103 +702 103 262 267 149 +703 107 162 191 304 +704 275 220 304 107 +705 162 107 275 304 +706 108 163 192 305 +707 276 221 305 108 +708 163 108 276 305 +709 12 58 158 271 +710 89 22 271 12 +711 58 12 89 271 +712 97 153 201 314 +713 266 210 314 97 +714 153 97 266 314 +715 139 97 170 283 +716 210 252 283 97 +717 97 252 283 139 +718 102 130 139 252 +719 243 215 252 102 +720 130 102 243 252 +721 129 119 205 318 +722 232 242 318 119 +723 119 242 318 129 +724 26 127 160 273 +725 240 60 273 26 +726 127 26 240 273 +727 39 128 161 274 +728 241 73 274 39 +729 128 39 241 274 +730 127 108 160 273 +731 221 240 273 108 +732 108 240 273 127 +733 128 107 161 274 +734 220 241 274 107 +735 107 241 274 128 +736 53 133 178 291 +737 246 86 291 53 +738 133 53 246 291 +739 55 134 179 292 +740 247 92 292 55 +741 134 55 247 292 +742 31 121 154 267 +743 234 65 267 31 +744 121 31 234 267 +745 44 120 155 268 +746 233 78 268 44 +747 120 44 233 268 +748 126 7 175 288 +749 19 239 288 7 +750 7 239 288 126 +751 47 48 138 251 +752 82 81 251 47 +753 48 47 82 251 +754 33 34 135 248 +755 68 67 248 33 +756 34 33 68 248 +757 34 35 137 250 +758 69 68 250 34 +759 35 34 69 250 +760 46 47 136 249 +761 81 80 249 46 +762 47 46 81 249 +763 57 129 203 316 +764 242 90 316 57 +765 129 57 242 316 +766 51 130 204 317 +767 243 88 317 51 +768 130 51 243 317 +769 99 133 145 258 +770 246 212 258 99 +771 133 99 246 258 +772 100 134 147 260 +773 247 213 260 100 +774 134 100 247 260 +775 150 93 166 279 +776 206 263 279 93 +777 93 263 279 150 +778 151 94 165 278 +779 207 264 278 94 +780 94 264 278 151 +781 102 117 156 269 +782 230 215 269 102 +783 117 102 230 269 +784 101 118 157 270 +785 231 214 270 101 +786 118 101 231 270 +787 96 149 181 294 +788 262 209 294 96 +789 149 96 262 294 +790 98 148 180 293 +791 261 211 293 98 +792 148 98 261 293 +793 25 26 160 273 +794 60 59 273 26 +795 26 59 273 25 +796 38 39 161 274 +797 73 72 274 38 +798 39 38 73 274 +799 94 131 177 290 +800 244 207 290 94 +801 131 94 244 290 +802 93 132 176 245 +803 245 206 289 93 +804 176 93 245 289 +805 112 153 164 277 +806 266 225 277 112 +807 153 112 266 277 +808 133 8 197 310 +809 18 246 310 8 +810 8 246 310 133 +811 134 10 198 311 +812 24 247 311 10 +813 10 247 311 134 +814 153 109 164 277 +815 222 266 277 109 +816 109 266 277 153 +817 113 151 165 278 +818 264 226 278 113 +819 151 113 264 278 +820 114 150 166 279 +821 263 227 279 114 +822 150 114 263 279 +823 30 31 154 267 +824 65 64 267 30 +825 31 30 65 267 +826 43 44 155 268 +827 78 77 268 43 +828 44 43 78 268 +829 131 107 177 290 +830 220 244 290 107 +831 107 244 290 131 +832 132 108 176 245 +833 221 245 289 108 +834 108 245 289 176 +835 128 39 186 299 +836 73 241 299 39 +837 39 241 299 128 +838 127 26 185 298 +839 60 240 298 26 +840 26 240 298 127 +841 165 94 177 290 +842 207 278 290 94 +843 94 278 290 165 +844 166 93 176 279 +845 206 279 289 93 +846 93 279 289 176 +847 25 160 192 305 +848 273 59 305 25 +849 160 25 273 305 +850 38 161 191 304 +851 274 72 304 38 +852 161 38 274 304 +853 8 144 197 310 +854 257 18 310 8 +855 144 8 257 310 +856 10 146 198 311 +857 259 24 311 10 +858 146 10 259 311 +859 152 95 169 282 +860 208 265 282 95 +861 95 265 282 152 +862 39 40 186 299 +863 74 73 299 39 +864 40 39 74 299 +865 26 27 185 298 +866 61 60 298 26 +867 27 26 61 298 +868 174 126 175 288 +869 239 287 288 126 +870 126 287 288 174 +871 149 121 181 294 +872 234 262 294 121 +873 121 262 294 149 +874 148 120 180 293 +875 233 261 293 120 +876 120 261 293 148 +877 142 110 175 288 +878 223 255 288 110 +879 110 255 288 142 +880 143 111 171 284 +881 224 256 284 111 +882 111 256 284 143 +883 135 34 137 250 +884 68 248 250 34 +885 34 248 250 135 +886 136 47 138 251 +887 81 249 251 47 +888 47 249 251 136 +889 140 114 183 296 +890 227 253 296 114 +891 114 253 296 140 +892 141 113 182 295 +893 226 254 295 113 +894 113 254 295 141 +895 152 101 205 318 +896 214 265 318 101 +897 101 265 318 152 +898 125 171 201 314 +899 284 238 314 125 +900 171 125 284 314 +901 113 165 186 299 +902 278 226 299 113 +903 165 113 278 299 +904 114 166 185 298 +905 279 227 298 114 +906 166 114 279 298 +907 117 139 170 283 +908 252 230 283 117 +909 139 117 252 283 +910 9 143 171 284 +911 256 21 284 9 +912 143 9 256 284 +913 158 112 190 303 +914 225 271 303 112 +915 112 271 303 158 +916 7 142 175 288 +917 255 19 288 7 +918 142 7 255 288 +919 124 159 187 300 +920 272 237 300 124 +921 159 124 272 300 +922 142 53 178 291 +923 86 255 291 53 +924 53 255 291 142 +925 143 55 179 292 +926 92 256 292 55 +927 55 256 292 143 +928 110 174 175 288 +929 287 223 288 110 +930 174 110 287 288 +931 159 109 187 300 +932 222 272 300 109 +933 109 272 300 159 +934 110 142 189 302 +935 255 223 302 110 +936 142 110 255 302 +937 111 143 188 301 +938 256 224 301 111 +939 143 111 256 301 +940 171 111 201 314 +941 224 284 314 111 +942 111 284 314 171 +943 145 133 197 310 +944 246 258 310 133 +945 133 258 310 145 +946 147 134 198 311 +947 247 260 311 134 +948 134 260 311 147 +949 128 165 177 290 +950 278 241 290 128 +951 165 128 278 290 +952 127 166 176 279 +953 279 240 289 176 +954 127 240 279 176 +955 119 158 190 303 +956 271 232 303 119 +957 158 119 271 303 +958 156 117 180 293 +959 230 269 293 117 +960 117 269 293 156 +961 157 118 181 294 +962 231 270 294 118 +963 118 270 294 157 +964 99 167 172 285 +965 280 212 285 99 +966 167 99 280 285 +967 100 168 173 286 +968 281 213 286 100 +969 168 100 281 286 +970 153 97 187 300 +971 210 266 300 97 +972 97 266 300 153 +973 109 153 187 300 +974 266 222 300 109 +975 153 109 266 300 +976 129 101 195 308 +977 214 242 308 101 +978 101 242 308 129 +979 130 102 196 309 +980 215 243 309 102 +981 102 243 309 130 +982 180 117 200 313 +983 230 293 313 117 +984 117 293 313 180 +985 181 118 199 312 +986 231 294 312 118 +987 118 294 312 181 +988 46 136 196 309 +989 249 80 309 46 +990 136 46 249 309 +991 33 135 195 308 +992 248 67 308 33 +993 135 33 248 308 +994 146 106 147 260 +995 219 259 260 106 +996 106 259 260 146 +997 144 105 145 258 +998 218 257 258 105 +999 105 257 258 144 +1000 196 136 204 317 +1001 249 309 317 136 +1002 136 309 317 196 +1003 195 135 203 316 +1004 248 308 316 135 +1005 135 308 316 195 +1006 98 180 200 313 +1007 293 211 313 98 +1008 180 98 293 313 +1009 96 181 199 312 +1010 294 209 312 96 +1011 181 96 294 312 +1012 169 95 174 287 +1013 208 282 287 95 +1014 95 282 287 169 +1015 119 152 205 318 +1016 265 232 318 119 +1017 152 119 265 318 +1018 110 189 199 312 +1019 302 223 312 110 +1020 189 110 302 312 +1021 111 188 200 313 +1022 301 224 313 111 +1023 188 111 301 313 +1024 112 158 202 315 +1025 271 225 315 112 +1026 158 112 271 315 +1027 101 129 205 318 +1028 242 214 318 101 +1029 129 101 242 318 +1030 138 48 194 307 +1031 82 251 307 48 +1032 48 251 307 138 +1033 137 35 193 306 +1034 69 250 306 35 +1035 35 250 306 137 +1036 161 107 191 304 +1037 220 274 304 107 +1038 107 274 304 161 +1039 160 108 192 305 +1040 221 273 305 108 +1041 108 273 305 160 +1042 158 58 202 315 +1043 89 271 315 58 +1044 58 271 315 158 +1045 118 152 169 282 +1046 265 231 282 118 +1047 152 118 265 282 +1048 112 164 190 303 +1049 277 225 303 112 +1050 164 112 277 303 +1051 144 145 197 310 +1052 258 257 310 144 +1053 145 144 258 310 +1054 146 147 198 311 +1055 260 259 311 146 +1056 147 146 260 311 +1057 129 195 203 316 +1058 308 242 316 129 +1059 195 129 308 316 +1060 130 196 204 317 +1061 309 243 317 130 +1062 196 130 309 317 +1063 189 96 199 312 +1064 209 302 312 96 +1065 96 302 312 189 +1066 188 98 200 313 +1067 211 301 313 98 +1068 98 301 313 188 +1069 143 123 188 301 +1070 236 256 301 123 +1071 123 256 301 143 +1072 142 122 189 302 +1073 235 255 302 122 +1074 122 255 302 142 +1075 120 156 180 293 +1076 269 233 293 120 +1077 156 120 269 293 +1078 121 157 181 294 +1079 270 234 294 121 +1080 157 121 270 294 +1081 122 142 178 291 +1082 255 235 291 122 +1083 142 122 255 291 +1084 123 143 179 292 +1085 256 236 292 123 +1086 143 123 256 292 +1087 110 169 174 287 +1088 282 223 287 110 +1089 169 110 282 287 +1090 170 97 201 314 +1091 210 283 314 97 +1092 97 283 314 170 +1093 166 127 185 298 +1094 240 279 298 127 +1095 127 279 298 166 +1096 165 128 186 299 +1097 241 278 299 128 +1098 128 278 299 165 +1099 169 110 199 312 +1100 223 282 312 110 +1101 110 282 312 169 +1102 170 111 200 313 +1103 224 283 313 111 +1104 111 283 313 170 +1105 164 95 190 303 +1106 208 277 303 95 +1107 95 277 303 164 +1108 111 170 201 314 +1109 283 224 314 111 +1110 170 111 283 314 +1111 167 116 172 285 +1112 229 280 285 116 +1113 116 280 285 167 +1114 168 115 173 286 +1115 228 281 286 115 +1116 115 281 286 168 +1117 118 169 199 312 +1118 282 231 312 118 +1119 169 118 282 312 +1120 117 170 200 313 +1121 283 230 313 117 +1122 170 117 283 313 +1123 105 144 194 307 +1124 257 218 307 105 +1125 144 105 257 307 +1126 106 146 193 306 +1127 259 219 306 106 +1128 146 106 259 306 +$EndElements +$Periodic +25 +0 15 1 +0 +1 +13 1 +0 16 2 +0 +1 +14 2 +0 20 3 +0 +1 +15 3 +0 24 4 +0 +1 +16 4 +0 31 5 +0 +1 +17 5 +0 33 8 +0 +1 +18 8 +0 38 7 +0 +1 +19 7 +0 43 6 +0 +1 +20 6 +0 51 10 +0 +1 +21 9 +0 53 13 +0 +1 +22 12 +0 58 12 +0 +1 +23 11 +0 63 11 +0 +1 +24 10 +1 22 1 +0 +4 +59 25 +60 26 +61 27 +62 28 +1 23 2 +0 +9 +63 29 +64 30 +65 31 +66 32 +67 33 +68 34 +69 35 +70 36 +71 37 +1 24 3 +0 +4 +72 38 +73 39 +74 40 +75 41 +1 25 4 +0 +9 +76 42 +77 43 +78 44 +79 45 +80 46 +81 47 +82 48 +83 49 +84 50 +1 26 8 +0 +1 +85 54 +1 27 7 +0 +1 +86 53 +1 28 6 +0 +1 +87 52 +1 29 5 +0 +1 +88 51 +1 30 13 +0 +1 +89 58 +1 31 12 +0 +1 +90 57 +1 32 11 +0 +1 +91 56 +1 33 10 +0 +1 +92 55 +2 82 11 +0 +113 +221 108 +222 109 +217 104 +214 101 +262 149 +263 150 +206 93 +220 107 +273 160 +274 161 +275 162 +276 163 +224 111 +269 156 +270 157 +271 158 +272 159 +215 102 +213 100 +212 99 +207 94 +223 110 +218 105 +211 98 +216 103 +228 115 +229 116 +230 117 +231 118 +232 119 +233 120 +234 121 +235 122 +236 123 +237 124 +238 125 +239 126 +240 127 +241 128 +242 129 +243 130 +244 131 +245 132 +246 133 +247 134 +248 135 +249 136 +250 137 +251 138 +252 139 +253 140 +254 141 +255 142 +256 143 +257 144 +258 145 +259 146 +260 147 +261 148 +266 153 +267 154 +268 155 +209 96 +208 95 +225 112 +219 106 +210 97 +227 114 +226 113 +264 151 +265 152 +277 164 +278 165 +279 166 +280 167 +281 168 +282 169 +283 170 +284 171 +285 172 +286 173 +287 174 +288 175 +289 176 +290 177 +291 178 +292 179 +293 180 +294 181 +295 182 +296 183 +297 184 +298 185 +299 186 +300 187 +301 188 +302 189 +303 190 +304 191 +305 192 +306 193 +307 194 +308 195 +309 196 +310 197 +311 198 +312 199 +313 200 +314 201 +315 202 +316 203 +317 204 +318 205 +$EndPeriodic diff --git a/dG3D/benchmarks/eigenValueTest/twoHole.py b/dG3D/benchmarks/eigenValueTest/twoHole.py new file mode 100644 index 0000000000000000000000000000000000000000..acbf9df92d2cac5278004ed1252b25a8988e8cfc --- /dev/null +++ b/dG3D/benchmarks/eigenValueTest/twoHole.py @@ -0,0 +1,70 @@ +#coding-Utf-8-*- +from gmshpy import * +from dG3Dpy import* + +#script to launch beam problem with a python script + + +lawnum1 = 1 # unique number of law +rho = 7850 +young = 28.9e9 +nu = 0.3 +law1 = dG3DLinearElasticMaterialLaw(lawnum1,rho,young,nu) +law1.setUseBarF(True) + + +# geometry +geofile="twoHole.geo" +meshfile="twoHole.msh" # name of mesh file + +# solver +sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 +soltype = 5 #eigen value + + +# creation of ElasticField +beta1 = 1e2 +fullDG = False; +averageStrainBased = False + +myfield1 = dG3DDomain(1000,83,0,lawnum1,fullDG,3) +myfield1.stabilityParameters(beta1) +myfield1.averageStrainBased(averageStrainBased) + + +# creation of Solver +mysolver = nonLinearMechSolver(1000) +mysolver.loadModel(meshfile) +mysolver.addDomain(myfield1) +mysolver.addMaterialLaw(law1) + +mysolver.Scheme(soltype) +mysolver.Solver(sol) + +# BC +#mysolver.displacementBC("Volume",83,2,0.) +mysolver.displacementBC("Face",84,0,0.) +mysolver.displacementBC("Face",84,1,0.) +mysolver.displacementBC("Face",84,2,0.) +mysolver.displacementBC("Face",85,0,0.) +mysolver.displacementBC("Face",85,1,5e-4) +mysolver.displacementBC("Face",85,2,0.) + +mysolver.eigenValueSolver(100) +mysolver.setModeView(0) +mysolver.setModeView(1) +mysolver.setModeView(10) +mysolver.setModeView(50) + +mysolver.setEigenSolverParamerters(1,200,'krylovschur',1e-3) +mysolver.setDisturbedEigenMode(5,1e-4,True) + +mysolver.solve() + +check = TestCheck() +import csv +data = csv.reader(open('eigenValues_step1.csv'), delimiter='\t') +variables = list(data) +check.equal(712649588.1261963,float(variables[0][1]),1e-6) +check.equal(2190570944.450352,float(variables[1][1]),1e-6) + diff --git a/dG3D/benchmarks/elasticFE2/macro.py b/dG3D/benchmarks/elasticFE2/macro.py index 1a287bf9421dd06467beae02709ac3c32cce4be8..94e0f7f34a889a6a9cfb5fbc7b59e74263df1b19 100644 --- a/dG3D/benchmarks/elasticFE2/macro.py +++ b/dG3D/benchmarks/elasticFE2/macro.py @@ -40,23 +40,21 @@ matnum1 = 2; macromat1 = dG3DElasticMultiscaleMaterialLaw(matnum1, 1000) macromat1.setUseBarF(True) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); - - -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(1) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(1,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); macromeshfile="macro.msh" # name of mesh file macrogeofile="macro.geo" diff --git a/dG3D/benchmarks/incrementalSecantTest/RVE1.py b/dG3D/benchmarks/incrementalSecantTest/RVE1.py index 3d94e6bc71f389e0baf0ac2c20eb978320560e2e..c919c53cb714cc641f95df37dfcdcddd514a98d3 100644 --- a/dG3D/benchmarks/incrementalSecantTest/RVE1.py +++ b/dG3D/benchmarks/incrementalSecantTest/RVE1.py @@ -31,7 +31,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnonlocal,rho,propertiesLC) # creation of ElasticField nfield = 100 # number of the field (physical number of surface) space1 = 0 # function space (Lagrange=6 -myfield1 = dG3DDomain(1000,nfield,space1,lawnonlocal,fulldg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnonlocal,fulldg,3) #myfield1.setNonLocalStabilityParameters(beta1,True) myfield1.setNonLocalEqRatio(eqRatio) #myfield1.matrixByPerturbation(1,1,1,1e-8) diff --git a/dG3D/benchmarks/incrementalSecantTest2/RVE2.py b/dG3D/benchmarks/incrementalSecantTest2/RVE2.py index 566bfca5188bf7a18965c5d4aca7243cfcf2e54c..779bcb1069e59e065381bf6aa4bc9ecbcfae70c7 100644 --- a/dG3D/benchmarks/incrementalSecantTest2/RVE2.py +++ b/dG3D/benchmarks/incrementalSecantTest2/RVE2.py @@ -31,7 +31,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnonlocal,rho,propertiesLC) # creation of ElasticField nfield = 100 # number of the field (physical number of surface) space1 = 0 # function space (Lagrange=6 -myfield1 = dG3DDomain(1000,nfield,space1,lawnonlocal,fulldg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnonlocal,fulldg,3) #myfield1.setNonLocalStabilityParameters(beta1,True) myfield1.setNonLocalEqRatio(eqRatio) #myfield1.matrixByPerturbation(1,1,1,1e-8) diff --git a/dG3D/benchmarks/interpolationPBC_SecondOrder_insysElim/idealHole.py b/dG3D/benchmarks/interpolationPBC_SecondOrder_insysElim/idealHole.py index 76525178e0bd4a2236aff9e0ffbed257be4094f4..2fbfef353a2127fde981b5f3cd191f5f45d94eee 100644 --- a/dG3D/benchmarks/interpolationPBC_SecondOrder_insysElim/idealHole.py +++ b/dG3D/benchmarks/interpolationPBC_SecondOrder_insysElim/idealHole.py @@ -52,7 +52,6 @@ mysolver.setControlType(control) mysolver.stiffnessModification(bool(1)) mysolver.iterativeProcedure(bool(1)) mysolver.setMessageView(bool(1)) -mysolver.invertFlag(bool(1)) #boundary condition microBC = nonLinearPeriodicBC(1000,3) diff --git a/dG3D/benchmarks/microNonLocalDamage/idealHole.py b/dG3D/benchmarks/microNonLocalDamage/idealHole.py index 9a99dbf8b1587c497d6e75b83b6e1c776eca453d..d35b912170340821fa0cf2589a3a2e13b63b8236 100644 --- a/dG3D/benchmarks/microNonLocalDamage/idealHole.py +++ b/dG3D/benchmarks/microNonLocalDamage/idealHole.py @@ -37,7 +37,7 @@ soltype = 1 # StaticLinear=0 (default) StaticNonLinear=1 nstep = 100 # number of step (used only if soltype=1) ftime =1. # Final time (used only if soltype=1) tol=1.e-4 # relative tolerance for NR scheme (used only if soltype=1) -nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) +nstepArch=10 # Number of step between 2 archiving (used only if soltype=1) system = 3 # Displacement elimination =0 Multiplier elimination = 1 Displacement+ multiplier = 2 control = 0 # load control = 0 arc length control euler = 1 @@ -49,6 +49,7 @@ mysolver.addMaterialLaw(law1) mysolver.Scheme(soltype) mysolver.Solver(sol) mysolver.snlData(nstep,ftime,tol) +mysolver.stepBetweenArchiving(nstepArch) mysolver.setSystemType(system) mysolver.setControlType(control) mysolver.stiffnessModification(True) diff --git a/dG3D/benchmarks/micro_pathFollowing/CMakeLists.txt b/dG3D/benchmarks/micro_pathFollowing/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..1a3d79cf7f5547cb8cb862d421fe061893ab5950 --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/CMakeLists.txt @@ -0,0 +1,10 @@ +# test file + +set(PYFILE rve.py) + +set(FILES2DELETE + E_1_GP_0_* + *.csv +) + +add_cm3python_test(${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/micro_pathFollowing/elastic/rve.py b/dG3D/benchmarks/micro_pathFollowing/elastic/rve.py new file mode 100644 index 0000000000000000000000000000000000000000..8757bb40bd424de7cab60d1ef1ed616f7f25b277 --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/elastic/rve.py @@ -0,0 +1,134 @@ +#coding-Utf-8-*- + +from gmshpy import * +from dG3Dpy import* + +import math + +# material law +lawnum1 = 11 # unique number of law +E = 68.9E3 #Young modulus +nu = 0.33 #Poisson ratio +K = E/3./(1.-2.*nu) +mu = E/2./(1+nu) +sy0 = 276.e100 #Yield stress +h = E/100 # hardening modulus +rho = 1. #density + +# creation of material law +harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) +law1 = J2LinearDG3DMaterialLaw(lawnum1,rho,E,nu,harden) + + +#type = 0; +#law1 = FSElasticMaterialLaw(lawnum,type,K,mu,rho) + +# geometry +meshfile="rve1.msh" # name of mesh file + +# creation of part Domain +nfield = 11 # number of the field (physical number of entity) +dim =2 + + +myfield1 = dG3DDomain(10,11,0,lawnum1,0,2) + + +# solver +sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 +soltype =1 # StaticLinear=0 (default) StaticNonLinear=1 +nstep = 50 # number of step (used only if soltype=1) +ftime =1. # Final time (used only if soltype=1) +tol=1.e-5 # relative tolerance for NR scheme (used only if soltype=1) +nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) +system = 3 # Displacement elimination =0 Multiplier elimination = 1 Displacement+ multiplier = 2 +control = 0 # load control = 0 arc length control euler = 1 + +# creation of Solver +mysolver = nonLinearMechSolver(1000) + +mysolver.loadModel(meshfile) + +mysolver.addDomain(myfield1) +mysolver.addMaterialLaw(law1) +mysolver.Scheme(soltype) +mysolver.Solver(sol) +mysolver.snlData(nstep,ftime,tol) +mysolver.setSystemType(system) +mysolver.setControlType(control) +mysolver.stiffnessModification(True) +mysolver.iterativeProcedure(True) +mysolver.setMessageView(True) + +mysolver.setMicroProblemIndentification(1,0) + +mysolver.pathFollowing(True,0) +mysolver.setPathFollowingControlType(1) + +microBC = nonLinearPeriodicBC(10,2) +microBC.setOrder(2) +microBC.setBCPhysical(1,2,3,4) +microBC.setPeriodicBCOptions(1, 9,True) + # Deformation gradient +microBC.setDeformationGradient(1.0,0.0,0.0,0.98) + + # Gradient of deformation gradient +#mysolver.setGradientOfDeformationGradient(0,1,0,0.1) +#mysolver.setGradientOfDeformationGradient(0,0,1,0.1) +#mysolver.setGradientOfDeformationGradient(1,0,1,0.1) +#mysolver.setGradientOfDeformationGradient(1,1,1,0.1) +#mysolver.setGradientOfDeformationGradient(0,0,1,-0.1) +#mysolver.setGradientOfDeformationGradient(0,0,0,0.1) + +mysolver.addMicroBC(microBC) + + +#stress averaging flag and averaging method 0- VOLUME, 1- SURFACE +mysolver.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +mysolver.setStressAveragingMethod(0) # 0 -volume 1- surface +#tangent averaging flag +mysolver.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +mysolver.setTangentAveragingMethod(2,1e-6) # 0- perturbation 1- condensation + + +# build view +mysolver.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ, 1, 1); +mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1); +mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1); +mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1); +mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1); +mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1); +mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1); +mysolver.internalPointBuildView("sig_VM",IPField.SVM, 1, 1); +mysolver.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN, 1, 1); + +mysolver.internalPointBuildView("F_xx",IPField.F_XX, 1, 1); +mysolver.internalPointBuildView("F_xy",IPField.F_XY, 1, 1); +mysolver.internalPointBuildView("F_yx",IPField.F_YX, 1, 1); +mysolver.internalPointBuildView("F_yy",IPField.F_YY, 1, 1); + +mysolver.internalPointBuildView("G_xxx",IPField.G_XXX, 1, 1); +mysolver.internalPointBuildView("G_xyy",IPField.G_XYY, 1, 1); +mysolver.internalPointBuildView("G_xxy",IPField.G_XXY, 1, 1); +mysolver.internalPointBuildView("G_yxx",IPField.G_YXX, 1, 1); +mysolver.internalPointBuildView("G_yyy",IPField.G_YYY, 1, 1); +mysolver.internalPointBuildView("G_yxy",IPField.G_YXY, 1, 1); + + +mysolver.internalPointBuildView("High-order strain norm",IPField.HIGHSTRAIN_NORM, 1, 1); +mysolver.internalPointBuildView("High-order stress norm",IPField.HIGHSTRESS_NORM, 1, 1); +mysolver.internalPointBuildView("Green -Lagrange strain norm",IPField.GL_NORM, 1, 1); + + +# solve +mysolver.solve() +# test check +check = TestCheck() +check.equal(-1.414453e+01,mysolver.getHomogenizedStress(1,1),1.e-4) +check.equal(1.871172e+01,mysolver.getHomogenizedTangent(1,1,1,1),1.e-4) + diff --git a/dG3D/benchmarks/micro_pathFollowing/elastic/rve1.geo b/dG3D/benchmarks/micro_pathFollowing/elastic/rve1.geo new file mode 100644 index 0000000000000000000000000000000000000000..be9a5476bba1874369c35b33787d92ccb2b2aa66 --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/elastic/rve1.geo @@ -0,0 +1,256 @@ +Point(69) = {0.43034, -0.490289, 0, 0.2}; +Point(71) = {1.29592, -1.99477, 0, 0.2}; +Point(75) = {1.29707, -0.988613, 0, 0.2}; +Point(82) = {0.433689, -2.49526, 0, 0.2}; +Point(147) = {-1.30229, -2.49301, 0, 0.2}; +Point(148) = {-1.31029, -0.497681, 0, 0.2}; +Point(150) = {-0.429693, -0.99721, 0, 0.2}; +Point(151) = {-0.426053, -1.99531, 0, 0.2}; +Point(169) = {0.423229, 0.499706, 0, 0.2}; +Point(170) = {1.29034, 1.0074, 0, 0.2}; +Point(171) = {0.432102, 2.49473, 0, 0.2}; +Point(172) = {1.28857, 1.9992, 0, 0.2}; +Point(174) = {-1.30543, 2.49621, 0, 0.2}; +Point(175) = {-0.440302, 1.99569, 0, 0.2}; +Point(176) = {-0.434068, 0.993208, 0, 0.2}; +Point(177) = {-1.30689, 0.493467, 0, 0.2}; +Point(1794) = {-1.35207, -2.52208, 0, 0.2}; +Point(1871) = {0.383674, -2.52402, 0, 0.2}; +Point(1872) = {-0.426346, -2.05298, 0, 0.2}; +Point(1873) = {-1.25207, -2.52199, 0, 0.2}; +Point(1949) = {0.483674, -2.52406, 0, 0.2}; +Point(1950) = {1.2962, -2.05242, 0, 0.2}; +Point(2571) = {-0.476159, -1.96627, 0, 0.2}; +Point(2572) = {-1.30215, -2.43543, 0, 0.2}; +Point(2575) = {-1.30979, -0.555446, 0, 0.2}; +Point(2576) = {-0.479587, -1.02639, 0, 0.2}; +Point(2649) = {-0.376158, -1.96649, 0, 0.2}; +Point(2650) = {0.433712, -2.43743, 0, 0.2}; +Point(2651) = {1.24595, -1.96596, 0, 0.2}; +Point(2652) = {1.24704, -1.01752, 0, 0.2}; +Point(2653) = {0.430653, -0.548144, 0, 0.2}; +Point(2654) = {-0.379589, -1.02572, 0, 0.2}; +Point(2727) = {1.34704, -1.01757, 0, 0.2}; +Point(2728) = {1.34595, -1.96568, 0, 0.2}; +Point(3199) = {-1.36019, -0.469073, 0, 0.2}; +Point(3200) = {-1.35699, 0.464967, 0, 0.2}; +Point(3273) = {-1.25699, 0.464422, 0, 0.2}; +Point(3274) = {-1.26019, -0.468616, 0, 0.2}; +Point(3275) = {-0.430173, -0.939454, 0, 0.2}; +Point(3276) = {0.380134, -0.461842, 0, 0.2}; +Point(3277) = {0.373436, 0.470677, 0, 0.2}; +Point(3278) = {-0.434135, 0.935554, 0, 0.2}; +Point(3351) = {1.29056, 0.949589, 0, 0.2}; +Point(3354) = {1.29708, -0.930942, 0, 0.2}; +Point(3355) = {0.480133, -0.461242, 0, 0.2}; +Point(3356) = {0.473435, 0.471162, 0, 0.2}; +Point(3977) = {-1.30547, 2.43847, 0, 0.2}; +Point(3978) = {-0.490123, 1.96675, 0, 0.2}; +Point(3979) = {-0.484249, 1.02209, 0, 0.2}; +Point(3980) = {-1.30652, 0.551297, 0, 0.2}; +Point(4053) = {-0.384247, 1.02222, 0, 0.2}; +Point(4054) = {0.423016, 0.557521, 0, 0.2}; +Point(4055) = {1.24029, 1.03603, 0, 0.2}; +Point(4056) = {1.23862, 1.97033, 0, 0.2}; +Point(4057) = {0.43196, 2.43705, 0, 0.2}; +Point(4058) = {-0.390121, 1.96679, 0, 0.2}; +Point(4131) = {1.33862, 1.97043, 0, 0.2}; +Point(4136) = {1.34029, 1.03635, 0, 0.2}; +Point(4602) = {-1.35516, 2.52525, 0, 0.2}; +Point(4677) = {-0.440161, 2.05337, 0, 0.2}; +Point(4678) = {0.38198, 2.52366, 0, 0.2}; +Point(4682) = {-1.25516, 2.52489, 0, 0.2}; +Point(4755) = {1.28854, 2.05698, 0, 0.2}; +Point(4760) = {0.481981, 2.52364, 0, 0.2}; +Point(6601) = {-1.29839, -3, 0, 0.2}; +Point(6655) = {-1.73205, -2.24611, 0, 0.2}; +Point(6708) = {-1.34839, -3, 0, 0.2}; +Point(6762) = {-1.73205, -2.30377, 0, 0.2}; +Point(6867) = {0.433432, -3, 0, 0.2}; +Point(6918) = {0.383432, -3, 0, 0.2}; +Point(6971) = {-1.24839, -3, 0, 0.2}; +Point(7077) = {1.73205, -2.24234, 0, 0.2}; +Point(7129) = {0.483432, -3, 0, 0.2}; +Point(7182) = {1.73205, -2.29983, 0, 0.2}; +Point(7289) = {-1.73205, -0.746585, 0, 0.2}; +Point(7343) = {-1.73205, -2.18844, 0, 0.2}; +Point(7397) = {-1.73205, -0.804643, 0, 0.2}; +Point(7503) = {1.73205, -0.738664, 0, 0.2}; +Point(7557) = {1.73205, -2.18484, 0, 0.2}; +Point(7609) = {1.73205, -0.796331, 0, 0.2}; +Point(7716) = {-1.73205, 0.744246, 0, 0.2}; +Point(7770) = {-1.73205, -0.688527, 0, 0.2}; +Point(7824) = {-1.73205, 0.686196, 0, 0.2}; +Point(7930) = {1.73205, 0.753282, 0, 0.2}; +Point(7984) = {1.73205, 0.695598, 0, 0.2}; +Point(8038) = {1.73205, -0.680997, 0, 0.2}; +Point(8145) = {-1.73205, 2.25014, 0, 0.2}; +Point(8195) = {-1.73205, 2.19242, 0, 0.2}; +Point(8249) = {-1.73205, 0.802296, 0, 0.2}; +Point(8356) = {1.73205, 2.25644, 0, 0.2}; +Point(8410) = {1.73205, 2.19864, 0, 0.2}; +Point(8463) = {1.73205, 0.810966, 0, 0.2}; +Point(8569) = {-1.30076, 3, 0, 0.2}; +Point(8622) = {-1.73205, 2.30786, 0, 0.2}; +Point(8675) = {-1.35076, 3, 0, 0.2}; +Point(8779) = {0.429982, 3, 0, 0.2}; +Point(8832) = {0.379981, 3, 0, 0.2}; +Point(8882) = {-1.25075, 3, 0, 0.2}; +Point(9038) = {1.73205, 2.31425, 0, 0.2}; +Point(9089) = {0.479982, 3, 0, 0.2}; +Line(213) = {82, 151 }; +Line(214) = {151, 147 }; +Line(217) = {1871, 1872 }; +Line(218) = {1872, 1873 }; +Line(221) = {82, 71 }; +Line(226) = {1949, 1950 }; +Line(297) = {148, 150 }; +Line(298) = {150, 151 }; +Line(299) = {2571, 2572 }; +Line(303) = {2575, 2576 }; +Line(304) = {2576, 2571 }; +Line(305) = {71, 75 }; +Line(306) = {75, 69 }; +Line(307) = {69, 150 }; +Line(308) = {2649, 2650 }; +Line(309) = {2650, 2651 }; +Line(310) = {2651, 2652 }; +Line(311) = {2652, 2653 }; +Line(312) = {2653, 2654 }; +Line(313) = {2654, 2649 }; +Line(317) = {2727, 2728 }; +Line(370) = {148, 177 }; +Line(376) = {3199, 3200 }; +Line(378) = {69, 169 }; +Line(379) = {169, 176 }; +Line(380) = {176, 177 }; +Line(381) = {3273, 3274 }; +Line(382) = {3274, 3275 }; +Line(383) = {3275, 3276 }; +Line(384) = {3276, 3277 }; +Line(385) = {3277, 3278 }; +Line(386) = {3278, 3273 }; +Line(389) = {169, 170 }; +Line(393) = {3354, 3355 }; +Line(394) = {3355, 3356 }; +Line(395) = {3356, 3351 }; +Line(463) = {174, 175 }; +Line(464) = {175, 176 }; +Line(467) = {3977, 3978 }; +Line(468) = {3978, 3979 }; +Line(469) = {3979, 3980 }; +Line(471) = {170, 172 }; +Line(472) = {172, 171 }; +Line(473) = {171, 175 }; +Line(474) = {4053, 4054 }; +Line(475) = {4054, 4055 }; +Line(476) = {4055, 4056 }; +Line(477) = {4056, 4057 }; +Line(478) = {4057, 4058 }; +Line(479) = {4058, 4053 }; +Line(488) = {4136, 4131 }; +Line(547) = {4677, 4678 }; +Line(552) = {4682, 4677 }; +Line(561) = {4760, 4755 }; +Line(765) = {6601, 147 }; +Line(766) = {147, 6655 }; +Line(767) = {6708, 1794 }; +Line(768) = {1794, 6762 }; +Line(769) = {6655, 6762 }; +Line(770) = {6708, 6601 }; +Line(771) = {6867, 82 }; +Line(772) = {6918, 1871 }; +Line(773) = {1873, 6971 }; +Line(774) = {6601, 6971 }; +Line(775) = {6918, 6867 }; +Line(776) = {71, 7077 }; +Line(777) = {7129, 1949 }; +Line(778) = {1950, 7182 }; +Line(779) = {7077, 7182 }; +Line(780) = {7129, 6867 }; +Line(781) = {7289, 148 }; +Line(782) = {2572, 7343 }; +Line(783) = {7397, 2575 }; +Line(784) = {6655, 7343 }; +Line(785) = {7397, 7289 }; +Line(786) = {7503, 75 }; +Line(787) = {2728, 7557 }; +Line(788) = {7609, 2727 }; +Line(789) = {7077, 7557 }; +Line(790) = {7609, 7503 }; +Line(791) = {177, 7716 }; +Line(792) = {7770, 3199 }; +Line(793) = {3200, 7824 }; +Line(794) = {7716, 7824 }; +Line(795) = {7770, 7289 }; +Line(796) = {170, 7930 }; +Line(797) = {3351, 7984 }; +Line(798) = {8038, 3354 }; +Line(799) = {7930, 7984 }; +Line(800) = {8038, 7503 }; +Line(801) = {8145, 174 }; +Line(802) = {8195, 3977 }; +Line(803) = {3980, 8249 }; +Line(804) = {7716, 8249 }; +Line(805) = {8195, 8145 }; +Line(806) = {172, 8356 }; +Line(807) = {4131, 8410 }; +Line(808) = {8463, 4136 }; +Line(809) = {8356, 8410 }; +Line(810) = {8463, 7930 }; +Line(811) = {174, 8569 }; +Line(812) = {8622, 4602 }; +Line(813) = {4602, 8675 }; +Line(814) = {8569, 8675 }; +Line(815) = {8622, 8145 }; +Line(816) = {171, 8779 }; +Line(817) = {4678, 8832 }; +Line(818) = {8882, 4682 }; +Line(819) = {8779, 8832 }; +Line(820) = {8882, 8569 }; +Line(821) = {4755, 9038 }; +Line(822) = {9089, 4760 }; +Line(823) = {8356, 9038 }; +Line(824) = {9089, 8779 }; +Line Loop(63) = {-213,221 ,298 ,305 ,306 ,307 }; +Line Loop(64) = {308,309 ,310 ,311 ,312 ,313 }; +Line Loop(79) = {-370,-307 ,297 ,378 ,379 ,380 }; +Line Loop(80) = {381,382 ,383 ,384 ,385 ,386 }; +Line Loop(99) = {-379,389 ,464 ,471 ,472 ,473 }; +Line Loop(100) = {474,475 ,476 ,477 ,478 ,479 }; +Line Loop(163) = {-768,-767 ,765 ,766 ,769 ,770 }; +Line Loop(164) = {-773,-772 ,-765 ,-218 ,-217 ,213 ,214 ,771 ,774 ,775 }; +Line Loop(165) = {-778,-777 ,-226 ,221 ,771 ,776 ,779 ,780 }; +Line Loop(166) = {-783,-782 ,-304 ,-303 ,-299 ,214 ,297 ,298 ,766 ,781 ,784 ,785 }; +Line Loop(167) = {-788,-787 ,-317 ,-305 ,776 ,786 ,789 ,790 }; +Line Loop(168) = {-793,-792 ,-376 ,370 ,781 ,791 ,794 ,795 }; +Line Loop(169) = {-798,-797 ,-395 ,-394 ,-393 ,306 ,378 ,389 ,786 ,796 ,799 ,800 }; +Line Loop(170) = {-803,-802 ,-469 ,-468 ,-467 ,380 ,463 ,464 ,791 ,801 ,804 ,805 }; +Line Loop(171) = {-808,-807 ,-796 ,-488 ,471 ,806 ,809 ,810 }; +Line Loop(172) = {-813,-812 ,801 ,811 ,814 ,815 }; +Line Loop(173) = {-818,-817 ,-811 ,-552 ,-547 ,-473 ,463 ,816 ,819 ,820 }; +Line Loop(174) = {-822,-821 ,-816 ,-561 ,-472 ,806 ,823 ,824 }; +Plane Surface(50) = {-64 ,63 }; +Plane Surface(60) = {-80 ,79 }; +Plane Surface(72) = {-100 ,99 }; +Plane Surface(110) = {163 }; +Plane Surface(111) = {164 }; +Plane Surface(112) = {165 }; +Plane Surface(113) = {166 }; +Plane Surface(114) = {167 }; +Plane Surface(115) = {168 }; +Plane Surface(116) = {169 }; +Plane Surface(117) = {170 }; +Plane Surface(118) = {171 }; +Plane Surface(119) = {172 }; +Plane Surface(120) = {173 }; +Plane Surface(121) = {174 }; +Physical Surface(11) = {50 ,60,72,110,111,112,113,114,115,116,117,118,119,120,121}; +Physical Line(1) = {770 ,774,775,780}; +Physical Line(2) = {779 ,789,790,799,800,809,810,823}; +Physical Line(3) = {814 ,819,820,824}; +Physical Line(4) = {769 ,784,785,794,795,804,805,815}; +Physical Point(1) = {6708}; +Physical Point(2) = {6655}; +Physical Point(3) = {7077}; +Physical Point(4) = {8569}; diff --git a/dG3D/benchmarks/micro_pathFollowing/elastic/rve1.msh b/dG3D/benchmarks/micro_pathFollowing/elastic/rve1.msh new file mode 100644 index 0000000000000000000000000000000000000000..b98bd95ba522382ef0bd71851c93a0a8d699638b --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/elastic/rve1.msh @@ -0,0 +1,1865 @@ +$MeshFormat +2.2 0 8 +$EndMeshFormat +$Nodes +1310 +1 0.43034 -0.490289 0 +2 1.29592 -1.99477 0 +3 1.29707 -0.988613 0 +4 0.433689 -2.49526 0 +5 -1.30229 -2.49301 0 +6 -1.31029 -0.497681 0 +7 -0.429693 -0.99721 0 +8 -0.426053 -1.99531 0 +9 0.423229 0.499706 0 +10 1.29034 1.0074 0 +11 0.432102 2.49473 0 +12 1.28857 1.9992 0 +13 -1.30543 2.49621 0 +14 -0.440302 1.99569 0 +15 -0.434068 0.993208 0 +16 -1.30689 0.493467 0 +17 -1.35207 -2.52208 0 +18 0.383674 -2.52402 0 +19 -0.426346 -2.05298 0 +20 -1.25207 -2.52199 0 +21 0.483674 -2.52406 0 +22 1.2962 -2.05242 0 +23 -0.476159 -1.96627 0 +24 -1.30215 -2.43543 0 +25 -1.30979 -0.555446 0 +26 -0.479587 -1.02639 0 +27 -0.376158 -1.96649 0 +28 0.433712 -2.43743 0 +29 1.24595 -1.96596 0 +30 1.24704 -1.01752 0 +31 0.430653 -0.548144 0 +32 -0.379589 -1.02572 0 +33 1.34704 -1.01757 0 +34 1.34595 -1.96568 0 +35 -1.36019 -0.469073 0 +36 -1.35699 0.464967 0 +37 -1.25699 0.464422 0 +38 -1.26019 -0.468616 0 +39 -0.430173 -0.939454 0 +40 0.380134 -0.461842 0 +41 0.373436 0.470677 0 +42 -0.434135 0.935554 0 +43 1.29056 0.949589 0 +44 1.29708 -0.930942 0 +45 0.480133 -0.461242 0 +46 0.473435 0.471162 0 +47 -1.30547 2.43847 0 +48 -0.490123 1.96675 0 +49 -0.484249 1.02209 0 +50 -1.30652 0.551297 0 +51 -0.384247 1.02222 0 +52 0.423016 0.557521 0 +53 1.24029 1.03603 0 +54 1.23862 1.97033 0 +55 0.43196 2.43705 0 +56 -0.390121 1.96679 0 +57 1.33862 1.97043 0 +58 1.34029 1.03635 0 +59 -1.35516 2.52525 0 +60 -0.440161 2.05337 0 +61 0.38198 2.52366 0 +62 -1.25516 2.52489 0 +63 1.28854 2.05698 0 +64 0.481981 2.52364 0 +65 -1.29839 -3 0 +66 -1.73205 -2.24611 0 +67 -1.34839 -3 0 +68 -1.73205 -2.30377 0 +69 0.433432 -3 0 +70 0.383432 -3 0 +71 -1.24839 -3 0 +72 1.73205 -2.24234 0 +73 0.483432 -3 0 +74 1.73205 -2.29983 0 +75 -1.73205 -0.7465850000000001 0 +76 -1.73205 -2.18844 0 +77 -1.73205 -0.804643 0 +78 1.73205 -0.738664 0 +79 1.73205 -2.18484 0 +80 1.73205 -0.796331 0 +81 -1.73205 0.744246 0 +82 -1.73205 -0.688527 0 +83 -1.73205 0.686196 0 +84 1.73205 0.753282 0 +85 1.73205 0.695598 0 +86 1.73205 -0.680997 0 +87 -1.73205 2.25014 0 +88 -1.73205 2.19242 0 +89 -1.73205 0.802296 0 +90 1.73205 2.25644 0 +91 1.73205 2.19864 0 +92 1.73205 0.810966 0 +93 -1.30076 3 0 +94 -1.73205 2.30786 0 +95 -1.35076 3 0 +96 0.429982 3 0 +97 0.379981 3 0 +98 -1.25075 3 0 +99 1.73205 2.31425 0 +100 0.479982 3 0 +101 0.2617406000005067 -2.395270000000294 0 +102 0.08979220000104959 -2.29528000000061 0 +103 -0.08215619999900903 -2.195290000000576 0 +104 -0.2541045999995161 -2.095300000000281 0 +105 0.3477148000003136 -2.445265000000183 0 +106 0.1757664000006902 -2.345275000000401 0 +107 0.003818000001298005 -2.245285000000755 0 +108 -0.1681303999992432 -2.14529500000044 0 +109 -0.3400787999997973 -2.045305000000118 0 +110 -0.5720924999996617 -2.078259999999808 0 +111 -0.7181319999994114 -2.161209999999666 0 +112 -0.8641714999988419 -2.244159999999342 0 +113 -1.010210999999259 -2.327109999999579 0 +114 -1.156250499999807 -2.41005999999989 0 +115 -0.4990727499999725 -2.036784999999984 0 +116 -0.6451122499993905 -2.119734999999654 0 +117 -0.7911517499995393 -2.202684999999738 0 +118 -0.9371912499990606 -2.285634999999466 0 +119 -1.083230749999445 -2.368584999999685 0 +120 -1.229270250000084 -2.451535000000048 0 +121 0.2216700000003441 -2.4298120000002 0 +122 0.05966600000076372 -2.335604000000444 0 +123 -0.1023379999989917 -2.241396000000586 0 +124 -0.2643419999996064 -2.147188000000229 0 +125 0.3026720000002116 -2.476916000000123 0 +126 0.1406680000005917 -2.382708000000344 0 +127 -0.02133599999886432 -2.28850000000066 0 +128 -0.1833399999993148 -2.194292000000398 0 +129 -0.3453439999998723 -2.100084000000074 0 +130 -0.5914907999995056 -2.146781999999719 0 +131 -0.7566355999990066 -2.240583999999436 0 +132 -0.9217803999990083 -2.334385999999437 0 +133 -1.086925199999506 -2.428187999999719 0 +134 -0.5089183999997098 -2.099880999999835 0 +135 -0.6740631999992172 -2.193682999999555 0 +136 -0.8392079999987831 -2.287484999999309 0 +137 -1.004352799999414 -2.381286999999667 0 +138 -1.169497599999697 -2.475088999999828 0 +139 0.6061351999995477 -2.395162000000262 0 +140 0.7785813999989772 -2.295064000000594 0 +141 0.9510275999989332 -2.194966000000619 0 +142 1.123473799999488 -2.094868000000297 0 +143 0.5199120999997495 -2.445211000000145 0 +144 0.6923582999993572 -2.345113000000373 0 +145 0.8648044999986997 -2.245015000000755 0 +146 1.037250699999265 -2.144917000000427 0 +147 1.209696899999638 -2.04481900000021 0 +148 0.6461791999995798 -2.429732000000244 0 +149 0.8086843999989899 -2.335404000000586 0 +150 0.9711895999990137 -2.241076000000572 0 +151 1.133694799999454 -2.146748000000317 0 +152 0.5649265999998099 -2.476896000000111 0 +153 0.7274317999990101 -2.382568000000575 0 +154 0.8899369999989946 -2.288240000000584 0 +155 1.052442199998856 -2.193912000000664 0 +156 1.214947399999715 -2.099584000000165 0 +157 -1.163523833333612 -0.5809358333331756 0 +158 -1.016757666667448 -0.6641906666662237 0 +159 -0.8699915000011456 -0.7474454999993502 0 +160 -0.7232253333341392 -0.8307003333328762 0 +161 -0.576459166667053 -0.9139551666664476 0 +162 -1.236906916666869 -0.5393084166665519 0 +163 -1.090140750000474 -0.6225632499997309 0 +164 -0.9433745833342624 -0.7058180833328063 0 +165 -0.7966084166676223 -0.7890729166661246 0 +166 -0.6498422500006401 -0.8723277499996369 0 +167 -0.5030760833334934 -0.9555825833332425 0 +168 -0.4289650000000014 -1.196829999999619 0 +169 -0.4282370000000038 -1.396449999998951 0 +170 -0.4275090000000042 -1.596069999998838 0 +171 -0.4267810000000021 -1.79568999999942 0 +172 -0.4293290000000003 -1.097019999999916 0 +173 -0.4286010000000036 -1.296639999999025 0 +174 -0.4278730000000049 -1.49625999999866 0 +175 -0.4271450000000035 -1.695879999999026 0 +176 -0.4264170000000017 -1.895499999999534 0 +177 -0.6413571999996448 -2.060101999999798 0 +178 -0.8065553999990784 -2.153933999999476 0 +179 -0.971753599999147 -2.247765999999515 0 +180 -1.136951799999551 -2.341597999999745 0 +181 -0.5587580999997254 -2.013185999999844 0 +182 -0.7239562999993745 -2.107017999999645 0 +183 -0.8891544999988644 -2.200849999999355 0 +184 -1.054352699999221 -2.294681999999558 0 +185 -1.21955089999968 -2.388513999999819 0 +186 -1.14374940000046 -0.6496347999997393 0 +187 -0.9777088000009495 -0.7438235999994613 0 +188 -0.8116682000009527 -0.8380123999994595 0 +189 -0.6456276000004577 -0.9322011999997404 0 +190 -1.22676970000021 -0.602540399999881 0 +191 -1.060729100000771 -0.6967291999995623 0 +192 -0.8946885000012847 -0.7909179999992713 0 +193 -0.7286479000006921 -0.8851067999996073 0 +194 -0.5626073000002488 -0.9792955999998587 0 +195 -0.4789014000000019 -1.21436599999948 0 +196 -0.4782158000000035 -1.402341999999046 0 +197 -0.4775302000000032 -1.590317999999116 0 +198 -0.4768446000000019 -1.77829399999948 0 +199 -0.4792442000000008 -1.120377999999758 0 +200 -0.4785586000000028 -1.308353999999218 0 +201 -0.4778730000000045 -1.496329999998773 0 +202 -0.4771874000000024 -1.684305999999329 0 +203 -0.4765018000000017 -1.872281999999531 0 +204 1.296111666666666 -1.827077166667259 0 +205 1.296303333333332 -1.659384333334201 0 +206 1.296494999999998 -1.491691500001345 0 +207 1.296686666666665 -1.323998666667607 0 +208 1.296878333333333 -1.156305833333782 0 +209 1.296015833333333 -1.910923583333545 0 +210 1.296207499999999 -1.743230750000866 0 +211 1.296399166666665 -1.575537916667868 0 +212 1.296590833333332 -1.407845083334364 0 +213 1.296782499999999 -1.240152250000869 0 +214 1.296974166666666 -1.072459416666834 0 +215 1.123724000000403 -0.8889482000002316 0 +216 0.9503780000009385 -0.7892834000005395 0 +217 0.7770320000009363 -0.6896186000005384 0 +218 0.6036860000004607 -0.5899538000002649 0 +219 1.210397000000103 -0.938780600000059 0 +220 1.037051000000673 -0.8391158000003872 0 +221 0.8637050000011058 -0.7394510000006358 0 +222 0.6903590000005769 -0.6397862000003317 0 +223 0.5170130000002944 -0.5401214000001693 0 +224 0.2583334000003545 -0.591673199999791 0 +225 0.08632680000090776 -0.6930573999994649 0 +226 -0.08567979999913095 -0.7944415999994878 0 +227 -0.2576863999995271 -0.8958257999997212 0 +228 0.3443367000001515 -0.5409810999999107 0 +229 0.1723301000005171 -0.6423652999996952 0 +230 0.0003235000011100331 -0.7437494999993457 0 +231 -0.1716830999991698 -0.8451336999995107 0 +232 -0.3436896999998096 -0.9465178999998878 0 +233 -0.2141840000004024 -2.060677999999766 0 +234 -0.05221000000090797 -2.154865999999472 0 +235 0.1097639999992526 -2.249053999999565 0 +236 0.2717379999995418 -2.343241999999734 0 +237 -0.2951710000000674 -2.013583999999961 0 +238 -0.1331970000006161 -2.107771999999642 0 +239 0.02877699999896488 -2.201959999999398 0 +240 0.1907509999993289 -2.29614799999961 0 +241 0.3527249999997172 -2.390335999999836 0 +242 0.5961595999996265 -2.343136000000217 0 +243 0.7586071999991447 -2.248842000000496 0 +244 0.9210547999990564 -2.154548000000548 0 +245 1.083502399999468 -2.060254000000309 0 +246 0.5149357999997706 -2.390283000000133 0 +247 0.6773833999993335 -2.295989000000387 0 +248 0.8398309999988927 -2.201695000000643 0 +249 1.002278599999023 -2.107401000000567 0 +250 1.164726199999887 -2.013107000000065 0 +251 1.246167999999999 -1.776272000000373 0 +252 1.246385999999999 -1.586584000001015 0 +253 1.246603999999999 -1.396896000001058 0 +254 1.246821999999999 -1.207208000000642 0 +255 1.246059 -1.871116000000107 0 +256 1.246276999999999 -1.681428000000697 0 +257 1.246494999999998 -1.491740000001335 0 +258 1.246712999999999 -1.302052000000787 0 +259 1.246930999999999 -1.112364000000535 0 +260 1.083762600000354 -0.9236448000002033 0 +261 0.9204852000008423 -0.8297696000004843 0 +262 0.7572078000008797 -0.7358944000005058 0 +263 0.5939304000004003 -0.6420192000002302 0 +264 1.165401300000228 -0.9705824000001311 0 +265 1.002123900000633 -0.8767072000003641 0 +266 0.8388465000011727 -0.7828320000006742 0 +267 0.6755691000006473 -0.6889568000003722 0 +268 0.5122917000001693 -0.5950816000000974 0 +269 0.2686046000003327 -0.6436591999998038 0 +270 0.1065562000007608 -0.7391743999995515 0 +271 -0.05549219999926291 -0.8346895999995655 0 +272 -0.2175405999996726 -0.930204799999807 0 +273 0.3496288000001164 -0.5959015999999313 0 +274 0.1875804000005268 -0.6914167999996894 0 +275 0.02553200000098327 -0.7869319999994204 0 +276 -0.1365163999994978 -0.8824471999997039 0 +277 -0.2985647999999007 -0.9779623999999414 0 +278 -0.3789028000000018 -1.213873999999505 0 +279 -0.3782166000000038 -1.402027999998968 0 +280 -0.3775304000000037 -1.590181999998977 0 +281 -0.3768442000000018 -1.778335999999515 0 +282 -0.3792459000000004 -1.119796999999907 0 +283 -0.3785597000000035 -1.307950999999038 0 +284 -0.3778735000000051 -1.496104999998601 0 +285 -0.3771873000000032 -1.684258999999134 0 +286 -0.3765011000000003 -1.872412999999934 0 +287 1.346822000000001 -1.207191999999462 0 +288 1.346604000000001 -1.396813999999002 0 +289 1.346386000000001 -1.58643599999882 0 +290 1.346168 -1.776057999999661 0 +291 1.346931 -1.112380999999806 0 +292 1.346713000000001 -1.302002999999269 0 +293 1.346495000000002 -1.491624999998559 0 +294 1.346277000000001 -1.681246999999187 0 +295 1.346059 -1.870868999999692 0 +296 -1.309610000000001 -0.2994514000004558 0 +297 -1.308930000000003 -0.1012218000010374 0 +298 -1.308250000000004 0.09700779999894921 0 +299 -1.307570000000002 0.2952373999994536 0 +300 -1.309950000000001 -0.3985662000002135 0 +301 -1.309270000000003 -0.2003366000007274 0 +302 -1.308590000000005 -0.002107000001322079 0 +303 -1.307910000000003 0.1961225999991712 0 +304 -1.307230000000001 0.3943521999997265 0 +305 -1.359550000000001 -0.2822650000003964 0 +306 -1.358910000000003 -0.09545700000093416 0 +307 -1.358270000000003 0.09135099999902924 0 +308 -1.357630000000001 0.2781589999995385 0 +309 -1.359870000000001 -0.3756690000001458 0 +310 -1.359230000000002 -0.1888610000006493 0 +311 -1.358590000000004 -0.002053000001253413 0 +312 -1.357950000000002 0.1847549999992474 0 +313 -1.357310000000001 0.3715629999997176 0 +314 0.4289178000000032 -0.2922900000004383 0 +315 0.4274956000000071 -0.09429100000098489 0 +316 0.426073400000007 0.1037079999990236 0 +317 0.4246512000000038 0.3017069999994788 0 +318 0.4296289000000014 -0.3912895000001931 0 +319 0.4282067000000051 -0.1932905000007087 0 +320 0.4267845000000091 0.004708499998738291 0 +321 0.4253623000000051 0.2027074999992873 0 +322 0.4239401000000021 0.400706499999709 0 +323 0.2517696000003449 0.5984063999998015 0 +324 0.08031020000082029 0.6971067999995277 0 +325 -0.09114919999917231 0.7958071999995235 0 +326 -0.2626085999995685 0.8945075999997516 0 +327 0.3374993000001074 0.5490561999999382 0 +328 0.1660399000005793 0.6477565999996666 0 +329 -0.005419499998925215 0.7464569999993813 0 +330 -0.1768788999992599 0.845157399999574 0 +331 -0.3483382999998331 0.9438577999999038 0 +332 -0.5795383333330741 0.9099178333334816 0 +333 -0.7250086666660599 0.826627666667014 0 +334 -0.8704789999988117 0.7433375000006803 0 +335 -1.015949333332312 0.6600473333339182 0 +336 -1.161419666665957 0.5767571666670732 0 +337 -0.5068031666664957 0.9515629166667645 0 +338 -0.6522734999995895 0.868272750000235 0 +339 -0.7977438333324283 0.7849825833338515 0 +340 -0.9432141666655712 0.7016924166672939 0 +341 -1.088684499999114 0.6184022500005073 0 +342 -1.234154833332914 0.5351120833335732 0 +343 -1.257629999999998 0.2778144000004442 0 +344 -1.258269999999997 0.09120680000098413 0 +345 -1.258909999999997 -0.09540079999902884 0 +346 -1.259549999999998 -0.28200839999948 0 +347 -1.257309999999999 0.3711182000001887 0 +348 -1.257949999999998 0.1845106000006995 0 +349 -1.258589999999996 -0.00209699999874996 0 +350 -1.259229999999997 -0.1887045999992452 0 +351 -1.259869999999999 -0.37531219999979 0 +352 -1.094186600000462 -0.5627835999997381 0 +353 -0.9281832000008267 -0.656951199999531 0 +354 -0.7621798000008679 -0.7511187999995077 0 +355 -0.5961764000004575 -0.8452863999997404 0 +356 -1.177188300000175 -0.5156997999999006 0 +357 -1.011184900000701 -0.6098673999996025 0 +358 -0.8451815000010989 -0.7040349999993766 0 +359 -0.6791781000007289 -0.7982025999995865 0 +360 -0.5131747000002347 -0.8923701999998669 0 +361 -0.2681116000003194 -0.8439316000001883 0 +362 -0.1060502000007919 -0.7484092000004667 0 +363 0.05601119999918208 -0.6528868000004822 0 +364 0.2180725999995596 -0.5573644000002596 0 +365 -0.3491423000001385 -0.8916928000000817 0 +366 -0.1870809000005841 -0.7961704000003442 0 +367 -0.02501950000107384 -0.700648000000633 0 +368 0.1370418999994072 -0.6051256000003494 0 +369 0.2991032999997638 -0.5096032000001391 0 +370 0.378794400000003 -0.2753382000004147 0 +371 0.3774548000000071 -0.08883440000098908 0 +372 0.3761152000000075 0.09766939999895818 0 +373 0.3747756000000036 0.2841731999995002 0 +374 0.3794642000000015 -0.3685901000001985 0 +375 0.378124600000005 -0.1820863000006868 0 +376 0.3767850000000096 0.004417499998663921 0 +377 0.3754454000000055 0.1909212999992295 0 +378 0.3741058000000018 0.3774250999997502 0 +379 0.2119218000003893 0.5636523999997759 0 +380 0.05040760000086258 0.6566277999995035 0 +381 -0.1111065999991659 0.7496031999995199 0 +382 -0.2726207999996515 0.8425785999997993 0 +383 0.2926789000001565 0.5171646999999099 0 +384 0.1311647000006118 0.6101400999996478 0 +385 -0.03034949999893416 0.7031154999993865 0 +386 -0.1918636999993593 0.7960908999996312 0 +387 -0.3533778999998957 0.8890662999999399 0 +388 -0.5987059999996671 0.8413276000001906 0 +389 -0.7632769999991642 0.7471012000004786 0 +390 -0.9278479999991288 0.6528748000004989 0 +391 -1.092418999999577 0.5586484000002422 0 +392 -0.5164204999998416 0.8884408000000907 0 +393 -0.680991499999531 0.7942144000002685 0 +394 -0.8455624999989951 0.6999880000005754 0 +395 -1.010133499999459 0.6057616000003099 0 +396 -1.17470449999969 0.5115352000001774 0 +397 0.5677474999996993 0.5843216666664905 0 +398 0.7122659999992536 0.6689373333328963 0 +399 0.8567844999988043 0.7535529999992999 0 +400 1.001302999999091 0.8381686666661348 0 +401 1.145821499999541 0.9227843333330648 0 +402 0.4954882499998502 0.5420138333332456 0 +403 0.6400067499994418 0.6266294999996732 0 +404 0.784525249999044 0.711245166666107 0 +405 0.9290437499989734 0.7958608333327323 0 +406 1.073562249999164 0.8804764999995108 0 +407 1.218080749999648 0.9650921666664605 0 +408 1.133690600000383 -0.8370020000002205 0 +409 0.9703012000008321 -0.7430620000004784 0 +410 0.8069118000008286 -0.6491220000004765 0 +411 0.6435224000004495 -0.5551820000002585 0 +412 1.215385300000258 -0.8839720000001483 0 +413 1.051995900000637 -0.7900320000003661 0 +414 0.8886065000010842 -0.6960920000006234 0 +415 0.7252171000006745 -0.6021520000003878 0 +416 0.5618277000002018 -0.508212000000116 0 +417 0.4787934000000027 -0.274761200000379 0 +418 0.4774538000000069 -0.08828040000096793 0 +419 0.4761142000000074 0.09820039999897273 0 +420 0.4747746000000038 0.284681199999474 0 +421 0.479463200000001 -0.3680016000001445 0 +422 0.4781236000000049 -0.1815208000006887 0 +423 0.4767840000000083 0.004959999998843778 0 +424 0.475444400000006 0.1914407999991625 0 +425 0.4741048000000017 0.3779215999997674 0 +426 0.6368599999996709 0.5668473999998074 0 +427 0.8002849999991627 0.6625327999995098 0 +428 0.9637099999991461 0.7582181999995001 0 +429 1.127134999999561 0.8539035999997431 0 +430 0.5551474999999615 0.5190046999999774 0 +431 0.718572499999459 0.6146900999996834 0 +432 0.8819974999989644 0.7103754999993938 0 +433 1.04542249999939 0.8060608999996428 0 +434 1.208847499999675 0.9017462999998097 0 +435 -1.132404400000324 2.396106000000187 0 +436 -0.9593788000010182 2.296002000000589 0 +437 -0.7863532000009199 2.195898000000532 0 +438 -0.6133276000004453 2.095794000000258 0 +439 -1.218917200000233 2.446158000000135 0 +440 -1.04589160000081 2.346054000000469 0 +441 -0.8728660000012134 2.245950000000702 0 +442 -0.6998404000007696 2.145846000000445 0 +443 -0.5268148000002677 2.045742000000155 0 +444 -0.4392630000000022 1.828609666667013 0 +445 -0.4382240000000052 1.661529333334157 0 +446 -0.4371850000000084 1.494449000001344 0 +447 -0.4361460000000053 1.327368666667519 0 +448 -0.4351070000000028 1.160288333333781 0 +449 -0.4397825000000006 1.912149833333421 0 +450 -0.4387435000000037 1.745069500000596 0 +451 -0.4377045000000073 1.577989166667835 0 +452 -0.4366655000000071 1.410908833334472 0 +453 -0.4356265000000042 1.24382850000068 0 +454 -0.4345875000000002 1.076748166666696 0 +455 -1.14240060000035 2.344126000000203 0 +456 -0.9793312000007781 2.24978200000045 0 +457 -0.8162618000008449 2.155438000000489 0 +458 -0.6531924000003521 2.061094000000204 0 +459 -1.223935300000175 2.391298000000101 0 +460 -1.060865900000678 2.296954000000392 0 +461 -0.8977965000010258 2.202610000000594 0 +462 -0.7347271000006866 2.108266000000397 0 +463 -0.5716577000000673 2.013922000000039 0 +464 -0.4889482000000018 1.777818000000295 0 +465 -0.4877734000000052 1.58888600000085 0 +466 -0.4865986000000065 1.399954000001058 0 +467 -0.4854238000000031 1.211022000000503 0 +468 -0.4895356000000011 1.87228400000018 0 +469 -0.4883608000000035 1.683352000000572 0 +470 -0.4871860000000087 1.494420000001407 0 +471 -0.4860112000000039 1.305488000000631 0 +472 -0.4848364000000002 1.116556000000031 0 +473 -0.6487031999994304 0.927931400000326 0 +474 -0.8131573999989385 0.8337728000006077 0 +475 -0.9776115999991215 0.739614200000503 0 +476 -1.142065799999215 0.6454556000004493 0 +477 -0.5664760999997429 0.9750107000001471 0 +478 -0.7309302999991596 0.8808521000004812 0 +479 -0.895384499998803 0.7866935000006853 0 +480 -1.059838699999129 0.6925349000004988 0 +481 -1.224292899999702 0.5983763000001703 0 +482 1.289986000000001 1.205759999999427 0 +483 1.289632000000002 1.404119999998942 0 +484 1.289278000000002 1.602479999998837 0 +485 1.288924000000001 1.800839999999461 0 +486 1.290163000000001 1.106579999999695 0 +487 1.289809000000002 1.304939999999196 0 +488 1.289455000000002 1.503299999998615 0 +489 1.289101000000002 1.701659999999081 0 +490 1.288747000000001 1.900019999999532 0 +491 1.117276400000445 2.098305999999742 0 +492 0.9459828000008056 2.197411999999534 0 +493 0.7746892000009715 2.296517999999438 0 +494 0.6033956000005313 2.395623999999693 0 +495 1.202923199999927 2.048753000000042 0 +496 1.031629600000634 2.147858999999633 0 +497 0.8603360000011731 2.246964999999321 0 +498 0.6890424000006479 2.346070999999625 0 +499 0.5177488000003155 2.445176999999818 0 +500 0.2867013333335277 2.411556666666778 0 +501 0.141300666667303 2.328383333333697 0 +502 -0.004099999998913306 2.245210000000622 0 +503 -0.1495006666659581 2.162036666667072 0 +504 -0.2949013333329749 2.078863333333538 0 +505 0.3594016666669086 2.453143333333472 0 +506 0.2140010000004658 2.369970000000266 0 +507 0.0686003333340936 2.286796666667102 0 +508 -0.07680033333243452 2.203623333333848 0 +509 -0.2222009999993874 2.12045000000035 0 +510 -0.3676016666665382 2.03727666666674 0 +511 -0.222794400000406 0.9292802000002336 0 +512 -0.06134180000084993 0.8363404000004893 0 +513 0.1001107999991452 0.743400600000492 0 +514 0.2615633999995667 0.6504608000002494 0 +515 -0.3035207000001107 0.9757501000000637 0 +516 -0.1420681000006141 0.8828103000003534 0 +517 0.01938449999884295 0.7898705000006661 0 +518 0.1808370999994218 0.6969307000003329 0 +519 0.3422896999997043 0.6039909000001702 0 +520 0.5864707999996374 0.6532227999997877 0 +521 0.7499255999991481 0.7489245999995013 0 +522 0.9133803999991514 0.8446263999995032 0 +523 1.076835199999618 0.9403281999997763 0 +524 0.5047433999998336 0.6053718999999027 0 +525 0.6681981999994744 0.7010736999996923 0 +526 0.8316529999989073 0.7967754999993604 0 +527 0.9951077999993927 0.8924772999996444 0 +528 1.158562599999782 0.9881790999998722 0 +529 1.239956000000001 1.22288999999954 0 +530 1.239622000000002 1.409749999999028 0 +531 1.239288000000002 1.596609999998968 0 +532 1.238954000000001 1.783469999999497 0 +533 1.240123 1.129459999999852 0 +534 1.239789000000002 1.31631999999885 0 +535 1.239455000000002 1.503179999998615 0 +536 1.239121000000001 1.690039999999165 0 +537 1.238787000000001 1.876899999999583 0 +538 1.077288000000356 2.063673999999794 0 +539 0.9159560000008775 2.157017999999492 0 +540 0.7546240000009659 2.250361999999441 0 +541 0.5932920000004215 2.343705999999756 0 +542 1.157954000000244 2.017001999999859 0 +543 0.9966220000005874 2.11034599999966 0 +544 0.8352900000010258 2.203689999999407 0 +545 0.6739580000006455 2.297033999999627 0 +546 0.5126260000001344 2.390377999999922 0 +547 0.2675438000002852 2.342998000000163 0 +548 0.1031276000007084 2.248946000000406 0 +549 -0.06128859999903391 2.154894000000553 0 +550 -0.2257047999994377 2.060842000000322 0 +551 0.3497519000000808 2.390024000000047 0 +552 0.1853357000005199 2.295972000000297 0 +553 0.02091950000109455 2.201920000000626 0 +554 -0.1434966999991159 2.107868000000506 0 +555 -0.3079128999995635 2.01381600000025 0 +556 -0.3889462000000029 1.77787600000046 0 +557 -0.3877714000000044 1.588962000000703 0 +558 -0.3865966000000068 1.400048000001094 0 +559 -0.385421800000003 1.211134000000477 0 +560 -0.3895336000000011 1.872333000000189 0 +561 -0.3883588000000041 1.683419000000656 0 +562 -0.387184000000007 1.494505000001118 0 +563 -0.3860092000000049 1.305591000000785 0 +564 -0.384834400000001 1.116677000000165 0 +565 1.339956000000001 1.223165999999531 0 +566 1.339622000000001 1.409981999999141 0 +567 1.339288000000002 1.596797999998985 0 +568 1.338954000000001 1.783613999999532 0 +569 1.340123 1.129757999999829 0 +570 1.339789000000001 1.316573999999551 0 +571 1.339455000000002 1.503389999999002 0 +572 1.339121000000002 1.690205999999117 0 +573 1.338787 1.877021999999888 0 +574 -0.2757328000003022 2.147427999999827 0 +575 -0.1113046000005742 2.241485999999671 0 +576 0.05312359999944882 2.335543999999685 0 +577 0.2175517999996784 2.429601999999816 0 +578 -0.3579469000001792 2.100398999999898 0 +579 -0.193518700000555 2.194456999999683 0 +580 -0.0290905000007855 2.288514999999551 0 +581 0.1353376999997372 2.38257299999985 0 +582 0.2997658999997973 2.476630999999884 0 +583 -1.092160200000161 2.430586000000093 0 +584 -0.9291604000006964 2.336282000000403 0 +585 -0.7661606000008094 2.241978000000469 0 +586 -0.6031608000001131 2.147674000000066 0 +587 -1.173660100000123 2.477738000000071 0 +588 -1.010660300000514 2.383434000000297 0 +589 -0.8476605000009279 2.289130000000537 0 +590 -0.6846607000005083 2.194826000000294 0 +591 -0.5216608999999657 2.10052199999998 0 +592 0.6432927999995659 2.430308000000251 0 +593 0.804604599999182 2.336976000000473 0 +594 0.9659163999993696 2.243644000000365 0 +595 1.127228199999689 2.15031200000018 0 +596 0.562636899999748 2.476974000000146 0 +597 0.7239486999995017 2.383642000000288 0 +598 0.8852604999990195 2.290310000000567 0 +599 1.046572299999645 2.196978000000205 0 +600 1.207884100000034 2.10364599999998 0 +601 -1.299689999999997 -2.831003333333766 0 +602 -1.300989999999998 -2.662006666666928 0 +603 -1.299039999999998 -2.915501666666881 0 +604 -1.300339999999998 -2.746505000000315 0 +605 -1.301640000000002 -2.577508333333058 0 +606 -1.445543333333042 -2.410710000000167 0 +607 -1.588796666666437 -2.328410000000131 0 +608 -1.373916666666599 -2.451860000000039 0 +609 -1.517169999999596 -2.369560000000232 0 +610 -1.660423333332712 -2.287260000000356 0 +611 -1.349616666666662 -2.840693333333883 0 +612 -1.350843333333331 -2.681386666666985 0 +613 -1.349003333333332 -2.920346666666785 0 +614 -1.350229999999992 -2.761040000001018 0 +615 -1.351456666666668 -2.601733333333213 0 +616 -1.478729999999704 -2.44931000000017 0 +617 -1.605389999999592 -2.376540000000234 0 +618 -1.415399999999631 -2.485695000000212 0 +619 -1.542059999999521 -2.412925000000275 0 +620 -1.668719999999505 -2.340155000000284 0 +621 -1.73205 -2.27494 0 +622 -1.32339 -3 0 +623 0.4335176666666665 -2.831753333333536 0 +624 0.4336033333333331 -2.663506666667158 0 +625 0.4334748333333335 -2.915876666666243 0 +626 0.4335604999999997 -2.747630000000479 0 +627 0.4336461666666667 -2.579383333333238 0 +628 0.3835126666666665 -2.841340000000347 0 +629 0.3835933333333331 -2.68268000000052 0 +630 0.3834723333333331 -2.920670000000511 0 +631 0.3835529999999995 -2.762010000000886 0 +632 0.3836336666666666 -2.603350000000122 0 +633 -1.250843333333336 -2.681326666666291 0 +634 -1.249616666666671 -2.840663333332842 0 +635 -1.251456666666666 -2.601658333333484 0 +636 -1.250230000000004 -2.760994999999486 0 +637 -1.249003333333334 -2.920331666666538 0 +638 -1.273390000000304 -3 0 +639 0.408432 -3 0 +640 1.441296666666229 -2.077293333333085 0 +641 1.586673333332937 -2.159816666666442 0 +642 1.368608333333165 -2.036031666666571 0 +643 1.513984999998969 -2.118554999999414 0 +644 1.659361666666792 -2.201078333333404 0 +645 0.4835126666666665 -2.841353333333565 0 +646 0.4835933333333333 -2.682706666666638 0 +647 0.4834723333333337 -2.920676666665895 0 +648 0.483553 -2.762030000000101 0 +649 0.4836336666666662 -2.603383333334161 0 +650 1.441483333333013 -2.134889999999818 0 +651 1.586766666666436 -2.217359999999869 0 +652 1.368841666666741 -2.093655000000042 0 +653 1.514124999999109 -2.176124999999494 0 +654 1.6594083333328 -2.258594999999697 0 +655 1.73205 -2.271085 0 +656 0.458432 -3 0 +657 -1.591463333333613 -0.6636170000001651 0 +658 -1.450876666667019 -0.580649000000208 0 +659 -1.661756666666684 -0.70510100000001 0 +660 -1.521170000000608 -0.6221330000003589 0 +661 -1.380583333333791 -0.5391650000002702 0 +662 -1.445449999999546 -2.353100000000261 0 +663 -1.588749999999783 -2.270770000000125 0 +664 -1.373800000000051 -2.394264999999971 0 +665 -1.517099999999425 -2.31193500000033 0 +666 -1.660399999999997 -2.229605000000002 0 +667 -1.591296666667062 -0.7215773333335669 0 +668 -1.450543333333839 -0.638511666666965 0 +669 -1.661673333333439 -0.7631101666667289 0 +670 -1.520920000000844 -0.680044500000498 0 +671 -1.380166666667028 -0.5969788333335464 0 +672 -1.73205 -2.217275 0 +673 -1.73205 -0.775614 0 +674 1.58705666666699 -0.8219803333331474 0 +675 1.44206333333357 -0.9052966666665306 0 +676 1.659553333333565 -0.7803221666665338 0 +677 1.514560000000426 -0.8636384999997554 0 +678 1.369566666666831 -0.946954833333239 0 +679 1.474649999999399 -2.038733333332992 0 +680 1.603349999999578 -2.111786666666427 0 +681 1.410299999999861 -2.002206666666588 0 +682 1.538999999999087 -2.075259999999482 0 +683 1.66770000000001 -2.148313333333339 0 +684 1.603713333333591 -0.8700773333331852 0 +685 1.475376666666877 -0.9438236666665462 0 +686 1.667881666666953 -0.8332041666665021 0 +687 1.539545000000337 -0.9069504999998063 0 +688 1.411208333333489 -0.9806968333332442 0 +689 1.73205 -2.21359 0 +690 1.73205 -0.7674975000002331 0 +691 -1.448609999999712 0.57705999999983 0 +692 -1.590329999999591 0.6606529999997586 0 +693 -1.377749999999877 0.5352634999999274 0 +694 -1.519469999999313 0.6188564999995945 0 +695 -1.661189999999916 0.7024494999999502 0 +696 -1.608096666666945 -0.6153756666668305 0 +697 -1.484143333333629 -0.5422243333335081 0 +698 -1.670073333333505 -0.6519513333334346 0 +699 -1.546120000000417 -0.578800000000246 0 +700 -1.422166666666928 -0.5056486666668208 0 +701 -1.482009999999716 0.5387099999998327 0 +702 -1.60702999999959 0.6124529999997579 0 +703 -1.41949999999985 0.5018384999999116 0 +704 -1.544519999999573 0.5755814999997484 0 +705 -1.669539999999661 0.6493244999997997 0 +706 -1.73205 0.7152210000002074 0 +707 -1.73205 -0.7175560000000001 0 +708 1.437576666665968 0.9226940000004024 0 +709 1.584813333332832 0.8379880000002887 0 +710 1.363958333333036 0.965047000000171 0 +711 1.511194999999127 0.8803410000005025 0 +712 1.658431666666422 0.7956350000001409 0 +713 1.437723333332889 0.8649253333335891 0 +714 1.584886666666206 0.7802616666669315 0 +715 1.364141666666628 0.9072571666666888 0 +716 1.511304999999379 0.8225935000003572 0 +717 1.65846833333334 0.7379298333333295 0 +718 1.587060000000289 -0.7643119999998338 0 +719 1.442070000000448 -0.8476269999997427 0 +720 1.659554999999965 -0.7226545000000201 0 +721 1.51456500000047 -0.8059694999997301 0 +722 1.369574999999969 -0.8892845000000178 0 +723 1.73205 0.7244400000000463 0 +724 1.73205 -0.7098304999997669 0 +725 -1.589843333333876 2.33216333333302 0 +726 -1.447636666667087 2.414186666666424 0 +727 -1.660946666666911 2.291151666666526 0 +728 -1.518740000000687 2.373174999999604 0 +729 -1.37653333333345 2.455198333333266 0 +730 -1.589856666667181 2.27443666666637 0 +731 -1.447663333333816 2.356453333333055 0 +732 -1.660953333333707 2.233428333333118 0 +733 -1.518760000000609 2.315444999999649 0 +734 -1.376566666666504 2.397461666666761 0 +735 -1.448363333333023 0.6349633333331502 0 +736 -1.590206666666479 0.7186296666665559 0 +737 -1.37744166666644 0.5931301666665331 0 +738 -1.519284999999669 0.6767964999998048 0 +739 -1.66112833333311 0.7604628333332017 0 +740 -1.73205 0.7732709999999999 0 +741 -1.73205 2.22128 0 +742 1.436396666666256 2.084946666666428 0 +743 1.584223333332777 2.170693333333011 0 +744 1.362483333333141 2.042073333333222 0 +745 1.510309999999077 2.127819999999465 0 +746 1.658136666666486 2.213566666666562 0 +747 1.469763333333083 2.046499999999855 0 +748 1.600906666666422 2.122569999999858 0 +749 1.404191666666621 2.008464999999974 0 +750 1.535334999999387 2.084534999999644 0 +751 1.666478333333245 2.160604999999949 0 +752 1.601463333333672 0.8860939999998051 0 +753 1.470876666667034 0.961221999999789 0 +754 1.666756666666449 0.848530000000125 0 +755 1.536170000000485 0.923657999999721 0 +756 1.405583333333372 0.9987859999999782 0 +757 1.73205 2.22754 0 +758 1.73205 0.782124 0 +759 -1.303873333333333 2.664140000000058 0 +760 -1.30231666666667 2.832069999999596 0 +761 -1.304651666666671 2.580174999999554 0 +762 -1.303094999999999 2.74810500000014 0 +763 -1.301538333333336 2.916034999999735 0 +764 -1.606420000000397 2.380323333333104 0 +765 -1.480790000000114 2.452786666666601 0 +766 -1.669235000000029 2.34409166666665 0 +767 -1.543605000000387 2.416554999999776 0 +768 -1.417975000000061 2.489018333333298 0 +769 -1.353693333333336 2.683499999999681 0 +770 -1.352226666666667 2.841749999999972 0 +771 -1.354426666666668 2.604374999999838 0 +772 -1.352960000000006 2.762624999999376 0 +773 -1.351493333333331 2.920875000000191 0 +774 -1.32576 3 0 +775 -1.73205 2.279 0 +776 0.431395333333335 2.663153333332929 0 +777 0.4306886666666686 2.831576666666204 0 +778 0.4317486666666691 2.578941666666083 0 +779 0.4310420000000016 2.747364999999613 0 +780 0.430335333333333 2.915788333333422 0 +781 0.3813136666666687 2.682439999999509 0 +782 0.3806473333333347 2.841219999999682 0 +783 0.3816468333333326 2.603050000000168 0 +784 0.3809805000000007 2.761829999999844 0 +785 0.3803141666666668 2.920609999999979 0 +786 -1.25222 2.841630000000029 0 +787 -1.253689999999997 2.683260000000318 0 +788 -1.251484999999996 2.920815000000403 0 +789 -1.252955000000002 2.762444999999787 0 +790 -1.254424999999996 2.604075000000448 0 +791 0.4049815000001397 3 0 +792 -1.275755 3 0 +793 1.436376666666364 2.142736666666491 0 +794 1.584213333332902 2.228493333333083 0 +795 1.362458333333232 2.099858333333275 0 +796 1.510294999999549 2.185614999999738 0 +797 1.65813166666681 2.27137166666675 0 +798 0.4806483333333347 2.841213333333015 0 +799 0.4813146666666668 2.682426666666638 0 +800 0.4803151666666682 2.920606666666299 0 +801 0.4809814999999996 2.761820000000091 0 +802 0.4816478333333318 2.603033333333706 0 +803 1.73205 2.285345 0 +804 0.4549820000002051 3 0 +805 1.271754333333332 -1.265603333334124 0 +806 1.271645333333332 -1.360447333334332 0 +807 1.103743300000378 -0.9062965000002174 0 +808 1.185382000000201 -0.9532341000001158 0 +809 0.4337005 -2.466345 0 +810 0.5199235999997738 -2.416296000000131 0 +811 1.017264999999201 -2.127610000000464 0 +812 1.103488099999478 -2.077561000000303 0 +813 -0.4032268000000038 -1.399238999998959 0 +814 -0.402862800000004 -1.499048999998903 0 +815 1.270935 -1.980365 0 +816 1.271030833333333 -1.89651858333363 0 +817 0.3477263000002533 -2.416350000000147 0 +818 0.1807651000002957 -2.319261000000172 0 +819 0.2667393000000243 -2.369256000000014 0 +820 1.271344666666665 -1.622984166667608 0 +821 1.271235666666666 -1.717828166667287 0 +822 0.0138039000001218 -2.222172000000071 0 +823 0.09977810000015111 -2.272167000000088 0 +824 1.271549499999999 -1.444293750001201 0 +825 1.271440499999998 -1.53913775000118 0 +826 0.7685942999990609 -2.271953000000545 0 +827 0.8548173999990389 -2.221904000000558 0 +828 0.6011473999995871 -2.36914900000024 0 +829 0.6873704999993019 -2.319100000000405 0 +830 1.184711899999744 -2.030414000000149 0 +831 1.271139833333333 -1.801674583333816 0 +832 0.8537929000009091 -0.7625889000005226 0 +833 0.767119900000908 -0.712756500000522 0 +834 1.272055 -1.0030665 0 +835 0.09644150000083429 -0.7161158999995082 0 +836 0.1774657000006202 -0.6683582999996344 0 +837 -0.2376134999995999 -0.9130152999997641 0 +838 -0.1516101999994018 -0.8623231999996475 0 +839 0.6854812000006683 -0.6658189000003842 0 +840 0.5988082000004304 -0.6159865000002476 0 +841 0.2634690000003436 -0.6176661999997974 0 +842 0.3444932000001772 -0.5699085999998954 0 +843 -0.402176600000003 -1.687202999999176 0 +844 -0.401812600000002 -1.787012999999467 0 +845 -0.07058599999919693 -0.8145655999995267 0 +846 -0.401469500000001 -1.88108999999971 0 +847 -0.4011055 -1.9809 0 +848 0.01043820000081494 -0.7668079999995197 0 +849 0.9354316000008904 -0.8095265000005119 0 +850 1.017070300000646 -0.8564641000003714 0 +851 -0.315131299999758 -2.030895000000141 0 +852 -0.2341442999999592 -2.077989000000024 0 +853 -0.402519700000004 -1.593125999998907 0 +854 -0.4039339000000016 -1.205351999999562 0 +855 -0.4042770000000007 -1.111274999999809 0 +856 -0.4035699000000028 -1.305161999999228 0 +857 1.271850166666666 -1.181756916667212 0 +858 0.9360411999989948 -2.174757000000583 0 +859 1.271959166666666 -1.086912916666891 0 +860 -0.3186376999997635 -0.9607728999998606 0 +861 -0.1481700999997057 -2.127984000000171 0 +862 -0.0671830999999585 -2.175078000000024 0 +863 0.5171695000002303 -0.5690489000001324 0 +864 -0.404641 -1.011465 0 +865 0.4304965 -0.5192165 0 +866 -1.28524 -0.4831485 0 +867 -1.211856916666806 -0.5247759166665877 0 +868 0.4010943000000072 0.1006886999989909 0 +869 0.4017641000000071 0.007436799999017252 0 +870 0.3126028000001724 0.5345416999999008 0 +871 0.3983325 0.4851915 0 +872 -0.6597008666672983 -0.8379933666663083 0 +873 -0.5863177833337552 -0.879620783333094 0 +874 0.4004245000000053 0.1939405999992619 0 +875 0.3997134000000037 0.2929400999994895 0 +876 -0.8160856500010067 -0.7492821499994289 0 +877 -0.7427025666675036 -0.7909095666661919 0 +878 -0.01539819999917283 0.7233549999995238 0 +879 0.06535890000084144 0.6768672999995156 0 +880 -0.09586499999996143 -0.7714253999999773 0 +881 -0.009861699999942075 -0.7207332999999658 0 +882 0.4024752000000071 -0.09156270000098699 0 +883 -0.5033160833335265 -0.9267045833332238 0 +884 0.403145000000005 -0.1848146000006998 0 +885 0.1461160000006048 0.6303795999996518 0 +886 -1.054184166665945 0.6093478666670802 0 +887 -0.9718986666657203 0.6564610666672086 0 +888 -1.2826 0.2865258999999489 0 +889 -1.282280000000001 0.3798296999997268 0 +890 0.3990436000000019 0.3861919999997394 0 +891 -0.1011278999991691 0.7727051999995217 0 +892 -0.8991634999989703 0.6981061500005896 0 +893 -0.8168779999989879 0.7452193500005795 0 +894 -0.7441428333326121 0.7868644333337463 0 +895 -0.2628989999999233 -0.8698786999999548 0 +896 -0.1768956999997252 -0.819186599999838 0 +897 -1.28358 0.0008034999999601833 0 +898 -1.28326 0.09410729999996667 0 +899 -0.8990873500009862 -0.7021983499994406 0 +900 -1.128855216667036 -0.5718597166664569 0 +901 -1.055472133333955 -0.613487133332981 0 +902 -1.284900000000001 -0.3840337000002279 0 +903 -0.429933 -0.968332 0 +904 -0.3439296999997635 -0.9176398999998606 0 +905 -1.284240000000001 -0.1916151000002587 0 +906 -1.28458 -0.2907298999999679 0 +907 -0.9724704333341372 -0.6605709333328773 0 +908 0.3192337000001773 -0.5267575999998955 0 +909 0.405237 -0.4760655 0 +910 0.07116900000004492 -0.6729720999999735 0 +911 -1.282940000000001 0.1874110999996967 0 +912 -1.126919333332767 0.5677027833336576 0 +913 -0.5891221666663706 0.8756227166668361 0 +914 -0.506836666666537 0.9227359166667408 0 +915 -0.6618573333328635 0.8339776333336023 0 +916 -0.3483717999997842 0.9150307999998758 0 +917 -0.26761469999961 0.8685430999997754 0 +918 0.1521997000002337 -0.6252108999998622 0 +919 0.2382029999999571 -0.5745188000000252 0 +920 -0.4341015 0.9643809999999999 0 +921 -1.28194 0.4789445 0 +922 -1.209204833332978 0.5205895833335366 0 +923 0.2318457000003671 0.5810293999997886 0 +924 -0.1818849999994119 0.8191928999996614 0 +925 0.403856100000003 -0.2838141000004265 0 +926 0.4045259000000016 -0.3770660000002191 0 +927 -1.28392 -0.09831130000003313 0 +928 -0.3425111666664874 2.022826666666769 0 +929 -0.2603030666662063 2.06985266666693 0 +930 0.5176778000002656 2.416336999999847 0 +931 0.432031 2.46589 0 +932 1.264460000000002 1.500364999998955 0 +933 1.264283000000002 1.599544999998902 0 +934 0.4231225 0.5286135000000001 0 +935 0.4953817499998496 0.5709213333332452 0 +936 1.264627000000002 1.406934999998985 0 +937 1.264794000000001 1.313504999999241 0 +938 -0.1569717999997892 0.8625436999998786 0 +939 -0.07624550000001112 0.8160738000000064 0 +940 0.3373928000001725 0.5779636999999007 0 +941 0.2566664999999558 0.6244336000000255 0 +942 1.097282200000401 2.080989999999768 0 +943 1.177948200000223 2.034317999999871 0 +944 1.01163540000058 2.130542999999664 0 +945 0.8453226000009245 2.226767999999465 0 +946 0.9309694000008415 2.177214999999513 0 +947 -0.4141046000000025 1.803242833333737 0 +948 -0.413585100000004 1.719702666667309 0 +949 1.263772000000001 1.885584999999731 0 +950 1.263595 1.984765 0 +951 0.3593306666667638 2.424303333333389 0 +952 0.8850824499989779 0.7990896999994015 0 +953 0.8033550499989762 0.7512387999994006 0 +954 1.264971000000001 1.214324999999484 0 +955 1.265315 1.021715 0 +956 1.265138 1.120894999999714 0 +957 1.11132834999958 0.9315562666664206 0 +958 1.19305574999977 0.9794071666665324 0 +959 -0.1876027333326979 2.111439333333696 0 +960 -0.105394633332496 2.158465333333813 0 +961 0.004480799999986435 0.7696039000000078 0 +962 0.09021049999998274 0.7202537000000099 0 +963 -0.03269429999897361 2.200052000000587 0 +964 0.5771091499996683 0.6187722333331391 0 +965 1.264116000000002 1.692974999999167 0 +966 1.263939000000001 1.792154999999479 0 +967 0.5983438000004764 2.369664999999725 0 +968 -0.4129977000000048 1.62524566666743 0 +969 -0.4124782000000063 1.541705500001023 0 +970 0.6839906000006966 2.320111999999597 0 +971 0.9573416999991214 0.841397533332819 0 +972 0.04951380000089756 2.247078000000513 0 +973 -0.4107839000000041 1.269251333333998 0 +974 -0.4102644000000029 1.185711166667129 0 +975 -0.4146920000000011 1.897699833333507 0 +976 -0.4118908000000076 1.447248500001219 0 +977 -0.411371300000006 1.363708333334306 0 +978 0.7310957999992008 0.7089309666661988 0 +979 0.6493683999994455 0.661080066666342 0 +980 0.1709368000001935 0.6737837999998886 0 +981 -0.4091575 1.007714 0 +982 -0.3234277999997842 0.9583637999998758 0 +983 -0.2427014999999872 0.9118938999999926 0 +984 -0.4096770000000014 1.09125416666689 0 +985 0.2771225666669065 2.37727733333347 0 +986 0.7646566000009687 2.273439999999439 0 +987 0.1222141333340057 2.288664666667051 0 +988 1.039069099999355 0.8892484333329556 0 +989 0.2044222333337941 2.33569066666693 0 +990 -0.4152115 1.98124 0 +991 -1.32718 -2.507545 0 +992 -1.326529999999999 -2.592043333333464 0 +993 -1.597093333333015 -2.352475000000183 0 +994 -1.525466666666317 -2.393625000000201 0 +995 -1.324003333333331 -2.920346666666942 0 +996 -1.660423333333219 -2.316090000000066 0 +997 -1.324653333333329 -2.835848333333824 0 +998 -1.325266666666664 -2.756195000000376 0 +999 -1.325916666666664 -2.671696666666956 0 +1000 -1.398806666666521 -2.466395000000084 0 +1001 -1.462136666666373 -2.430010000000169 0 +1002 -0.8929759499989252 -2.289272999999389 0 +1003 -0.9659956999991339 -2.330747999999508 0 +1004 -0.8104035499989243 -2.242371999999389 0 +1005 0.3227073000002534 -2.459645000000148 0 +1006 0.2417053000004254 -2.412541000000247 0 +1007 -1.121587849999656 -2.419123999999805 0 +1008 -1.204160249999903 -2.466024999999945 0 +1009 -1.048568099999382 -2.377648999999649 0 +1010 0.1557311000006968 -2.362546000000405 0 +1011 -1.27718 -2.5075 0 +1012 0.4086815 -2.50964 0 +1013 -0.4261995 -2.024145 0 +1014 -0.340225299999758 -2.074140000000141 0 +1015 -1.275266666666667 -2.756165000000029 0 +1016 -1.274653333333334 -2.835833333333304 0 +1017 -1.275916666666667 -2.67166666666661 0 +1018 0.4085983333333331 -2.673093333333839 0 +1019 0.4085554999999998 -2.757216666667028 0 +1020 -0.4992192499998309 -2.065619999999904 0 +1021 -0.2592232999995613 -2.121244000000255 0 +1022 -0.09224709999900038 -2.218343000000581 0 +1023 -0.1732490999993077 -2.171239000000402 0 +1024 -1.276529999999999 -2.591998333333464 0 +1025 0.4085151666666665 -2.836546666666941 0 +1026 0.4084723333333332 -2.920670000000174 0 +1027 -1.274003333333335 -2.920331666666421 0 +1028 0.07472910000090666 -2.315442000000527 0 +1029 -0.6548113999994585 -2.153995999999692 0 +1030 -0.737383799999209 -2.200896999999551 0 +1031 -0.5817916499995837 -2.112520999999763 0 +1032 0.4086386666666665 -2.593763333333579 0 +1033 -0.01124509999912265 -2.26544700000051 0 +1034 0.5449045999997738 -2.459611000000131 0 +1035 0.6261571999995638 -2.412447000000253 0 +1036 0.4585151666666665 -2.83655333333355 0 +1037 0.4585554999999999 -2.757230000000087 0 +1038 0.4586815 -2.50966 0 +1039 1.514078333332975 -2.14735333333313 0 +1040 1.441389999999621 -2.106091666666452 0 +1041 1.659408333333218 -2.229849999999935 0 +1042 1.368748333333115 -2.064856666666543 0 +1043 1.29606 -2.023595 0 +1044 0.4584723333333333 -2.920676666666782 0 +1045 0.4585983333333332 -2.673106666666898 0 +1046 0.7123802999992785 -2.362398000000419 0 +1047 0.7936328999989836 -2.31523400000059 0 +1048 1.586719999999687 -2.188588333333156 0 +1049 1.128584299999471 -2.120808000000307 0 +1050 1.042361199999194 -2.170857000000468 0 +1051 0.4586386666666665 -2.593783333333579 0 +1052 1.209836899999744 -2.073644000000149 0 +1053 0.9611085999989735 -2.218021000000596 0 +1054 0.8798559999989615 -2.265185000000603 0 +1055 -0.4542760000000007 -1.111609999999809 0 +1056 -0.4539332000000016 -1.205597999999549 0 +1057 -0.9238501500010475 -0.7456345499994057 0 +1058 -0.8408298500010492 -0.7927289499994048 0 +1059 -1.660399999999892 -2.258440000000062 0 +1060 -1.58877333333311 -2.299590000000128 0 +1061 -1.450710000000429 -0.6095803333335865 0 +1062 -1.380333333333509 -0.568047500000104 0 +1063 -1.080253533333954 -0.6569127333329815 0 +1064 -0.9972332333341986 -0.7040071333328426 0 +1065 -0.8353634499989602 -2.19904699999941 0 +1066 -0.7623436999992449 -2.157571999999571 0 +1067 -1.517123333332992 -2.340755000000196 0 +1068 -1.445496666666294 -2.381905000000214 0 +1069 -0.4525196000000037 -1.593193999998977 0 +1070 -0.4528836000000035 -1.493383999999033 0 +1071 -0.451106 -1.98079 0 +1072 -0.451470000000001 -1.88097999999971 0 +1073 -0.9909822999992033 -2.287437999999547 0 +1074 -1.073581399999405 -2.334353999999662 0 +1075 -1.591380000000338 -0.692597166666866 0 +1076 -1.661673333333531 -0.7340811666667835 0 +1077 -0.6844264666672984 -0.8814507666663083 0 +1078 -0.6110433833337554 -0.923078183333094 0 +1079 -0.4535692000000028 -1.305407999999215 0 +1080 -0.4532264000000036 -1.399395999998998 0 +1081 -1.153636616667036 -0.6152853166664574 0 +1082 -0.9179625499989945 -2.245962999999429 0 +1083 -1.31004 -0.5265635 0 +1084 -1.146601149999679 -2.375828999999817 0 +1085 -1.229200249999904 -2.422744999999945 0 +1086 -1.30222 -2.46422 0 +1087 -1.373846666666521 -2.423070000000084 0 +1088 -0.6067248499996533 -2.069180999999803 0 +1089 -0.5241257499998309 -2.022264999999904 0 +1090 -0.5280230833335264 -0.9701725833332238 0 +1091 -0.45464 -1.0118 0 +1092 -0.767446766667546 -0.8343563666661679 0 +1093 -0.6797445999995281 -2.110655999999732 0 +1094 -1.236656916666806 -0.5681909166665877 0 +1095 -1.521003333333726 -0.6510643333335651 0 +1096 -0.451812800000002 -1.78699199999945 0 +1097 -0.452176800000003 -1.687181999999159 0 +1098 1.321959166666666 -1.086937916666891 0 +1099 1.321850166666667 -1.181748916666622 0 +1100 1.530661666666168 -2.099274999999717 0 +1101 1.457973333332814 -2.058013333333039 0 +1102 1.321139833333333 -1.80156758333346 0 +1103 1.321235666666666 -1.717721166666931 0 +1104 1.394551666666785 -0.9614333333332654 0 +1105 1.322055 -1.0030915 0 +1106 1.458720000000223 -0.9245601666665384 0 +1107 1.320935 -1.980225 0 +1108 1.321030833333333 -1.89637858333363 0 +1109 1.321754333333333 -1.265595333333534 0 +1110 1.659553333333495 -0.8091556666665737 0 +1111 1.595385000000291 -0.8460288333331663 0 +1112 1.531216666666933 -0.8829019999998468 0 +1113 1.595011666666258 -2.135801666666434 0 +1114 1.3215495 -1.444252750000174 0 +1115 1.3214405 -1.539063750000082 0 +1116 1.321645333333333 -1.360406333333305 0 +1117 1.321344666666667 -1.62291016666651 0 +1118 1.659361666666469 -2.172328333333221 0 +1119 1.393623333333115 -2.021486666666543 0 +1120 -1.333260000000003 0.09417939999898922 0 +1121 -1.333600000000003 -0.004935400001004092 0 +1122 -1.529486666666982 -0.5980123333335192 0 +1123 -1.467510000000324 -0.561436666666858 0 +1124 -1.59867999999959 0.6365529999997582 0 +1125 -1.527819999999651 0.594756499999794 0 +1126 -1.33194 0.479217 0 +1127 -1.402799999999856 0.521013499999915 0 +1128 -1.40553333333351 -0.524861000000104 0 +1129 -1.334900000000001 -0.3842622000002279 0 +1130 -1.334580000000001 -0.2908582000004261 0 +1131 -1.661189999999795 0.6734244999998793 0 +1132 -1.33524 -0.483377 0 +1133 -1.332600000000002 0.286698199999496 0 +1134 -1.332280000000001 0.3801021999997268 0 +1135 -1.599780000000279 -0.6394963333334978 0 +1136 -1.465309999999714 0.5578849999998314 0 +1137 -1.661756666666807 -0.6760720000000826 0 +1138 -1.332940000000002 0.1875833999992438 0 +1139 -1.334240000000003 -0.1917434000007169 0 +1140 -1.333920000000003 -0.09833940000098579 0 +1141 0.7562754999992081 0.665735066666203 0 +1142 0.8285347499989835 0.7080428999994048 0 +1143 0.4531445000000049 -0.1845261000006819 0 +1144 0.4538556000000029 -0.2835256000004086 0 +1145 0.4510938000000072 0.1009541999989982 0 +1146 0.4518049000000072 0.00195469999899392 0 +1147 0.9102472499989752 0.7558855999994001 0 +1148 1.364068333332984 0.9361415000002011 0 +1149 1.29045 0.9784945 0 +1150 1.659555000000145 -0.7514879999999169 0 +1151 1.210402000000201 -0.9099451000001157 0 +1152 1.128707300000393 -0.862975100000226 0 +1153 1.437649999999428 0.8938096666669957 0 +1154 1.297075 -0.9597775 0 +1155 0.4497129000000037 0.2931940999994764 0 +1156 0.4490431000000019 0.3864344999997394 0 +1157 0.6236042000004551 -0.5725679000002617 0 +1158 0.7102772000006929 -0.6224003000003985 0 +1159 0.7919719000008825 -0.6693703000005075 0 +1160 1.442066666667009 -0.8764618333331367 0 +1161 1.514563333333719 -0.834803666666445 0 +1162 1.042034300000661 -0.81314270000038 0 +1163 0.8736666000008841 -0.7163403000005084 0 +1164 0.9603396000008853 -0.766172700000509 0 +1165 1.218190749999771 0.9361866666665324 0 +1166 1.136478249999551 0.8883439666664039 0 +1167 1.064218999999326 0.8460361333329389 0 +1168 1.51126833333286 0.851456666666939 0 +1169 1.58705833333364 -0.7931461666664905 0 +1170 0.4552365 -0.4757655 0 +1171 0.5419095000002303 -0.5255979000001324 0 +1172 0.4545254000000016 -0.3767660000002191 0 +1173 0.452474700000007 -0.09128570000097641 0 +1174 1.658468333333103 0.7667718333334658 0 +1175 1.584849999999519 0.8091248333336101 0 +1176 0.9825064999991188 0.7981934333328174 0 +1177 0.5205912499998496 0.5277418333332453 0 +1178 0.6023037499996851 0.575584533333149 0 +1179 0.4504240000000054 0.1941945999992488 0 +1180 0.448332 0.485434 0 +1181 0.6745629999994622 0.6178923666663518 0 +1182 1.369571666666785 -0.9181193333332653 0 +1183 -1.306705 0.522382 0 +1184 -1.233969833332978 0.5640270833335366 0 +1185 -0.4624792000000068 1.541667500001097 0 +1186 -0.4629987000000052 1.625207666667503 0 +1187 -1.66095333333359 2.262288333333185 0 +1188 -0.531893666666537 0.9660039166667408 0 +1189 -0.4591585 1.007649 0 +1190 -0.882842200000849 2.222840000000491 0 +1191 -0.8013075000008825 2.175668000000511 0 +1192 -0.4602654000000029 1.185655166667142 0 +1193 -0.4607849000000042 1.269195333334011 0 +1194 -0.719772800000636 2.128496000000368 0 +1195 -0.9693550000008981 2.27289200000052 0 +1196 -0.7690830333324992 0.8302002333338109 0 +1197 -0.6868559333327451 0.87727953333367 0 +1198 -1.589850000000528 2.303299999999695 0 +1199 -1.518753333333846 2.344308333333037 0 +1200 -0.6141207666662523 0.9189246166669038 0 +1201 -1.050889700000684 2.320064000000396 0 +1202 -0.4635861000000035 1.719673666667226 0 +1203 -0.4646930000000011 1.897679833333507 0 +1204 -0.4652125 1.98122 0 +1205 -0.6332600000003987 2.078444000000231 0 +1206 -0.4596780000000014 1.09118916666689 0 +1207 -0.5517253000002227 2.031272000000129 0 +1208 -0.9967804666657167 0.6998307666672106 0 +1209 -0.9240452999989666 0.7414758500005917 0 +1210 -0.8418181999988752 0.788555150000644 0 +1211 -0.464105600000002 1.803213833333654 0 +1212 -1.519346666666307 0.6478081666664544 0 +1213 -1.590268333333035 0.6896413333331572 0 +1214 -0.4618918000000075 1.447201500001201 0 +1215 -1.447650000000452 2.38531999999974 0 +1216 -1.137402500000337 2.370116000000195 0 +1217 -1.376553333333543 2.426328333333212 0 +1218 -1.218937200000162 2.417288000000094 0 +1219 -1.30545 2.46734 0 +1220 -1.661128333333239 0.7314378333332779 0 +1221 -1.377564999999856 0.5641784999999151 0 +1222 -0.461372300000006 1.363661333334288 0 +1223 -1.151742733332586 0.6111063833337613 0 +1224 -1.079007566665763 0.6527514666671838 0 +1225 -1.448486666666367 0.6060116666664901 0 +1226 1.658136666666389 2.184666666666505 0 +1227 1.314283000000002 1.599638999998911 0 +1228 1.314116000000002 1.693046999999184 0 +1229 1.45307999999967 2.065723333333142 0 +1230 1.518651666666339 2.103758333333143 0 +1231 1.388933333332984 0.9795220000002012 0 +1232 1.4542266666665 0.9419580000000957 0 +1233 1.658431666666416 0.8244770000001443 0 +1234 1.593138333333252 0.8620410000000469 0 +1235 1.527844999999933 0.8996050000000388 0 +1236 1.314794000000001 1.313642999999237 0 +1237 1.314627000000002 1.407050999999042 0 +1238 1.387508333333128 2.027688333333214 0 +1239 1.592564999999599 2.146631666666434 0 +1240 1.313939000000001 1.792226999999496 0 +1241 1.313772000000001 1.885634999999731 0 +1242 1.314450000000002 1.506230999998989 0 +1243 1.313595 1.984815 0 +1244 1.315138000000001 1.121054999999714 0 +1245 1.315315 1.021875 0 +1246 1.314971000000001 1.214462999999479 0 +1247 -1.329516666666666 2.594695000000029 0 +1248 -1.330295 2.51073 0 +1249 -1.527028333333742 2.397254999999764 0 +1250 -1.464213333333601 2.433486666666512 0 +1251 -1.326493333333334 2.920874999999986 0 +1252 -1.327271666666669 2.836909999999784 0 +1253 -1.328005000000003 2.757784999999639 0 +1254 -1.328783333333335 2.67381999999987 0 +1255 -1.598131666667136 2.356243333333063 0 +1256 -1.660946666666938 2.32001166666651 0 +1257 -1.401398333333543 2.469718333333212 0 +1258 -0.2126167333331301 2.15473233333345 0 +1259 -0.2853170666666385 2.113145666666683 0 +1260 0.4060011666666686 2.757008333332856 0 +1261 0.4063545000000018 2.672796666666219 0 +1262 0.4053146666666673 2.920609999999841 0 +1263 0.4056680000000016 2.836398333332943 0 +1264 -0.4402315 2.02453 0 +1265 -0.5267443000002227 2.074582000000129 0 +1266 -1.277268333333335 2.836849999999813 0 +1267 -1.278003333333334 2.757664999999957 0 +1268 -0.05770229999974374 2.243348000000147 0 +1269 -0.1304026333332661 2.201761333333372 0 +1270 -0.7762569000008647 2.218938000000501 0 +1271 -0.6947570000005165 2.171786000000299 0 +1272 -0.8577568000008082 2.266090000000467 0 +1273 -0.9442696000008572 2.316142000000496 0 +1274 0.4066876666666675 2.593406666666464 0 +1275 -1.02576950000059 2.363294000000341 0 +1276 -0.6082442000002792 2.121734000000162 0 +1277 -1.278781666666665 2.673700000000188 0 +1278 -1.27649 2.920815000000014 0 +1279 0.09721213333337589 2.331963666666691 0 +1280 0.02451180000026776 2.290377000000153 0 +1281 0.3343406666667639 2.467608333333389 0 +1282 0.252126566666603 2.420579333333297 0 +1283 -1.193782200000162 2.460498000000094 0 +1284 -1.280295 2.51055 0 +1285 -1.112282300000242 2.41334600000014 0 +1286 0.1794262333334907 2.378992666666757 0 +1287 -1.279516666666666 2.594515000000029 0 +1288 0.407041 2.509195 0 +1289 -0.3675311666664874 2.066116666666769 0 +1290 1.510299999999571 2.156714999999751 0 +1291 1.584218333332839 2.199593333333047 0 +1292 0.5426883000002656 2.459631999999846 0 +1293 0.4570415 2.509185 0 +1294 0.7089910000002687 2.363412999999845 0 +1295 0.6233442000000486 2.412965999999972 0 +1296 1.362468333333128 2.070963333333214 0 +1297 1.43638666666631 2.11384166666646 0 +1298 0.9559496000000876 2.220527999999949 0 +1299 0.8703028000001706 2.270080999999902 0 +1300 0.7896469000000768 2.316746999999956 0 +1301 1.122252300000067 2.124308999999961 0 +1302 1.202908200000223 2.077642999999871 0 +1303 1.036605500000247 2.173861999999857 0 +1304 1.288555 2.02809 0 +1305 0.4553151666666673 2.920606666666508 0 +1306 0.4556685000000016 2.83639499999961 0 +1307 0.4566881666666675 2.593396666666465 0 +1308 0.4560016666666677 2.757001666666421 0 +1309 1.658131666666451 2.242466666666541 0 +1310 0.4563550000000009 2.672789999999783 0 +$EndNodes +$Elements +546 +1 15 2 2 6655 66 +2 15 2 1 6708 67 +3 15 2 3 7077 72 +4 15 2 4 8569 93 +5 8 2 4 769 66 68 621 +6 8 2 1 770 67 65 622 +7 8 2 1 774 65 71 638 +8 8 2 1 775 70 69 639 +9 8 2 2 779 72 74 655 +10 8 2 1 780 73 69 656 +11 8 2 4 784 66 76 672 +12 8 2 4 785 77 75 673 +13 8 2 2 789 72 79 689 +14 8 2 2 790 80 78 690 +15 8 2 4 794 81 83 706 +16 8 2 4 795 82 75 707 +17 8 2 2 799 84 85 723 +18 8 2 2 800 86 78 724 +19 8 2 4 804 81 89 740 +20 8 2 4 805 88 87 741 +21 8 2 2 809 90 91 757 +22 8 2 2 810 92 84 758 +23 8 2 3 814 93 95 774 +24 8 2 4 815 94 87 775 +25 8 2 3 819 96 97 791 +26 8 2 3 820 98 93 792 +27 8 2 2 823 90 99 803 +28 8 2 3 824 100 96 804 +29 9 2 11 50 253 254 207 258 805 806 +30 9 2 11 50 30 260 215 264 807 808 +31 9 2 11 50 4 28 139 809 810 143 +32 9 2 11 50 141 245 142 811 812 146 +33 9 2 11 50 170 169 279 174 813 814 +34 9 2 11 50 2 29 204 815 816 209 +35 9 2 11 50 4 101 28 105 817 809 +36 9 2 11 50 101 102 236 106 818 819 +37 9 2 11 50 251 252 205 256 820 821 +38 9 2 11 50 102 103 235 107 822 823 +39 9 2 11 50 28 101 236 817 819 241 +40 9 2 11 50 252 253 206 257 824 825 +41 9 2 11 50 140 243 141 826 827 145 +42 9 2 11 50 28 242 139 246 828 810 +43 9 2 11 50 139 242 140 828 829 144 +44 9 2 11 50 142 29 2 830 815 147 +45 9 2 11 50 29 251 204 255 831 816 +46 9 2 11 50 216 262 217 832 833 221 +47 9 2 11 50 30 215 3 808 219 834 +48 9 2 11 50 270 225 269 835 836 274 +49 9 2 11 50 272 227 226 837 231 838 +50 9 2 11 50 217 263 218 839 840 222 +51 9 2 11 50 269 224 31 841 842 273 +52 9 2 11 50 205 252 206 820 825 211 +53 9 2 11 50 171 170 281 175 843 844 +54 9 2 11 50 272 226 271 838 845 276 +55 9 2 11 50 204 251 205 831 821 210 +56 9 2 11 50 8 171 27 176 846 847 +57 9 2 11 50 271 226 270 845 848 275 +58 9 2 11 50 260 261 216 265 849 850 +59 9 2 11 50 104 27 233 851 237 852 +60 9 2 11 50 170 279 280 814 284 853 +61 9 2 11 50 278 168 32 854 855 282 +62 9 2 11 50 169 168 278 173 854 856 +63 9 2 11 50 104 8 27 109 847 851 +64 9 2 11 50 207 254 208 805 857 213 +65 9 2 11 50 206 253 207 824 806 212 +66 9 2 11 50 141 244 245 858 249 811 +67 9 2 11 50 279 169 278 813 856 283 +68 9 2 11 50 208 30 3 859 834 214 +69 9 2 11 50 27 171 281 846 844 286 +70 9 2 11 50 243 244 141 248 858 827 +71 9 2 11 50 32 227 272 860 837 277 +72 9 2 11 50 242 243 140 247 826 829 +73 9 2 11 50 281 170 280 843 853 285 +74 9 2 11 50 103 233 234 861 238 862 +75 9 2 11 50 236 102 235 818 823 240 +76 9 2 11 50 142 245 29 812 250 830 +77 9 2 11 50 235 103 234 822 862 239 +78 9 2 11 50 103 104 233 108 852 861 +79 9 2 11 50 260 216 215 850 220 807 +80 9 2 11 50 261 262 216 266 832 849 +81 9 2 11 50 262 263 217 267 839 833 +82 9 2 11 50 226 225 270 230 835 848 +83 9 2 11 50 263 31 218 268 863 840 +84 9 2 11 50 225 224 269 229 841 836 +85 9 2 11 50 32 7 227 864 232 860 +86 9 2 11 50 168 7 32 172 864 855 +87 9 2 11 50 254 30 208 259 859 857 +88 9 2 11 50 224 1 31 228 865 842 +89 9 2 11 50 218 31 1 863 865 223 +90 9 2 11 60 157 6 38 162 866 867 +91 9 2 11 60 371 372 316 376 868 869 +92 9 2 11 60 41 323 9 870 327 871 +93 9 2 11 60 161 160 355 166 872 873 +94 9 2 11 60 316 373 317 874 875 321 +95 9 2 11 60 160 159 354 165 876 877 +96 9 2 11 60 380 381 324 385 878 879 +97 9 2 11 60 355 160 354 872 877 359 +98 9 2 11 60 226 362 225 880 881 230 +99 9 2 11 60 315 371 316 882 869 320 +100 9 2 11 60 39 161 355 883 873 360 +101 9 2 11 60 370 371 315 375 882 884 +102 9 2 11 60 379 380 324 384 879 885 +103 9 2 11 60 391 335 390 886 887 395 +104 9 2 11 60 343 299 37 888 889 347 +105 9 2 11 60 317 41 9 890 871 322 +106 9 2 11 60 324 381 325 878 891 329 +107 9 2 11 60 390 334 389 892 893 394 +108 9 2 11 60 334 333 389 339 894 893 +109 9 2 11 60 227 361 226 895 896 231 +110 9 2 11 60 345 298 344 897 898 349 +111 9 2 11 60 354 159 353 876 899 358 +112 9 2 11 60 158 157 352 163 900 901 +113 9 2 11 60 6 296 38 300 902 866 +114 9 2 11 60 7 161 39 167 883 903 +115 9 2 11 60 7 39 227 903 904 232 +116 9 2 11 60 296 297 346 301 905 906 +117 9 2 11 60 38 296 346 902 906 351 +118 9 2 11 60 157 38 352 867 356 900 +119 9 2 11 60 159 158 353 164 907 899 +120 9 2 11 60 224 40 1 908 909 228 +121 9 2 11 60 362 363 225 367 910 881 +122 9 2 11 60 298 299 343 303 888 911 +123 9 2 11 60 391 336 335 912 341 886 +124 9 2 11 60 344 298 343 898 911 348 +125 9 2 11 60 388 332 42 913 914 392 +126 9 2 11 60 333 332 388 338 913 915 +127 9 2 11 60 372 373 316 377 874 868 +128 9 2 11 60 382 42 326 387 916 917 +129 9 2 11 60 225 364 224 918 919 229 +130 9 2 11 60 326 42 15 916 920 331 +131 9 2 11 60 37 16 336 921 342 922 +132 9 2 11 60 225 363 364 910 368 918 +133 9 2 11 60 37 336 391 922 912 396 +134 9 2 11 60 41 379 323 383 923 870 +135 9 2 11 60 325 382 326 924 917 330 +136 9 2 11 60 40 370 314 374 925 926 +137 9 2 11 60 346 297 345 905 927 350 +138 9 2 11 60 39 361 227 365 895 904 +139 9 2 11 60 158 352 353 901 357 907 +140 9 2 11 60 314 370 315 925 884 319 +141 9 2 11 60 297 298 345 302 897 927 +142 9 2 11 60 1 40 314 909 926 318 +143 9 2 11 60 224 364 40 919 369 908 +144 9 2 11 60 390 335 334 887 340 892 +145 9 2 11 60 299 16 37 304 921 889 +146 9 2 11 60 361 362 226 366 880 896 +147 9 2 11 60 379 324 323 885 328 923 +148 9 2 11 60 381 382 325 386 924 891 +149 9 2 11 60 373 41 317 378 890 875 +150 9 2 11 60 389 333 388 894 915 393 +151 9 2 11 60 332 15 42 337 920 914 +152 9 2 11 72 56 504 550 928 929 555 +153 9 2 11 72 494 55 11 930 931 499 +154 9 2 11 72 483 531 484 932 933 488 +155 9 2 11 72 9 52 397 934 935 402 +156 9 2 11 72 529 530 483 534 936 937 +157 9 2 11 72 325 511 512 938 516 939 +158 9 2 11 72 52 323 514 940 941 519 +159 9 2 11 72 54 538 491 542 942 943 +160 9 2 11 72 538 492 491 944 496 942 +161 9 2 11 72 539 493 492 945 497 946 +162 9 2 11 72 538 539 492 543 946 944 +163 9 2 11 72 445 444 556 450 947 948 +164 9 2 11 72 485 54 12 949 950 490 +165 9 2 11 72 500 11 55 505 931 951 +166 9 2 11 72 521 522 399 526 952 953 +167 9 2 11 72 482 529 483 954 937 487 +168 9 2 11 72 9 323 52 327 940 934 +169 9 2 11 72 10 53 482 955 956 486 +170 9 2 11 72 401 523 53 957 528 958 +171 9 2 11 72 550 503 549 959 960 554 +172 9 2 11 72 324 325 513 329 961 962 +173 9 2 11 72 549 503 502 960 508 963 +174 9 2 11 72 52 520 397 524 964 935 +175 9 2 11 72 53 529 482 533 954 956 +176 9 2 11 72 513 325 512 961 939 517 +177 9 2 11 72 484 532 485 965 966 489 +178 9 2 11 72 541 55 494 546 930 967 +179 9 2 11 72 446 445 557 451 968 969 +180 9 2 11 72 493 541 494 970 967 498 +181 9 2 11 72 399 522 400 952 971 405 +182 9 2 11 72 532 54 485 537 949 966 +183 9 2 11 72 549 502 548 963 972 553 +184 9 2 11 72 448 447 559 453 973 974 +185 9 2 11 72 556 444 56 947 975 560 +186 9 2 11 72 550 504 503 929 509 959 +187 9 2 11 72 558 446 557 976 969 562 +188 9 2 11 72 559 447 558 973 977 563 +189 9 2 11 72 520 521 398 525 978 979 +190 9 2 11 72 323 324 514 328 980 941 +191 9 2 11 72 326 15 51 331 981 982 +192 9 2 11 72 397 520 398 964 979 403 +193 9 2 11 72 325 326 511 330 983 938 +194 9 2 11 72 447 446 558 452 976 977 +195 9 2 11 72 401 53 10 958 955 407 +196 9 2 11 72 51 448 559 984 974 564 +197 9 2 11 72 547 500 55 985 951 551 +198 9 2 11 72 539 540 493 544 986 945 +199 9 2 11 72 557 445 556 968 948 561 +200 9 2 11 72 54 491 12 943 495 950 +201 9 2 11 72 326 51 511 982 515 983 +202 9 2 11 72 502 501 548 507 987 972 +203 9 2 11 72 400 523 401 988 957 406 +204 9 2 11 72 15 448 51 454 984 981 +205 9 2 11 72 548 501 547 987 989 552 +206 9 2 11 72 444 14 56 449 990 975 +207 9 2 11 72 56 14 504 990 510 928 +208 9 2 11 72 531 532 484 536 965 933 +209 9 2 11 72 400 522 523 971 527 988 +210 9 2 11 72 540 541 493 545 970 986 +211 9 2 11 72 501 500 547 506 985 989 +212 9 2 11 72 514 324 513 980 962 518 +213 9 2 11 72 483 530 531 936 535 932 +214 9 2 11 72 398 521 399 978 953 404 +215 9 2 11 110 602 5 17 605 991 992 +216 9 2 11 110 606 607 617 609 993 994 +217 9 2 11 110 67 65 611 622 995 613 +218 9 2 11 110 607 66 68 610 621 996 +219 9 2 11 110 617 607 68 993 996 620 +220 9 2 11 110 611 601 612 997 998 614 +221 9 2 11 110 601 602 612 604 999 998 +222 9 2 11 110 17 606 616 1000 1001 618 +223 9 2 11 110 65 601 611 603 997 995 +224 9 2 11 110 612 602 17 999 992 615 +225 9 2 11 110 616 606 617 1001 994 619 +226 9 2 11 110 17 5 606 991 608 1000 +227 9 2 11 111 132 112 113 1002 118 1003 +228 9 2 11 111 132 131 112 136 1004 1002 +229 9 2 11 111 18 101 121 1005 1006 125 +230 9 2 11 111 20 133 114 138 1007 1008 +231 9 2 11 111 133 132 113 137 1003 1009 +232 9 2 11 111 121 101 102 1006 106 1010 +233 9 2 11 111 20 114 5 1008 120 1011 +234 9 2 11 111 133 113 114 1009 119 1007 +235 9 2 11 111 18 4 101 1012 105 1005 +236 9 2 11 111 104 8 19 109 1013 1014 +237 9 2 11 111 634 633 601 636 1015 1016 +238 9 2 11 111 601 633 602 1015 1017 604 +239 9 2 11 111 623 624 629 626 1018 1019 +240 9 2 11 111 110 19 8 1020 1013 115 +241 9 2 11 111 124 104 19 1021 1014 129 +242 9 2 11 111 123 103 124 1022 1023 128 +243 9 2 11 111 103 104 124 108 1021 1023 +244 9 2 11 111 633 20 602 635 1024 1017 +245 9 2 11 111 69 623 628 625 1025 1026 +246 9 2 11 111 65 71 634 638 637 1027 +247 9 2 11 111 65 634 601 1027 1016 603 +248 9 2 11 111 121 102 122 1010 1028 126 +249 9 2 11 111 70 69 628 639 1026 630 +250 9 2 11 111 628 623 629 1025 1019 631 +251 9 2 11 111 602 20 5 1024 1011 605 +252 9 2 11 111 131 130 111 135 1029 1030 +253 9 2 11 111 111 130 110 1029 1031 116 +254 9 2 11 111 130 19 110 134 1020 1031 +255 9 2 11 111 629 624 18 1018 1032 632 +256 9 2 11 111 122 102 103 1028 107 1033 +257 9 2 11 111 624 4 18 627 1012 1032 +258 9 2 11 111 112 131 111 1004 1030 117 +259 9 2 11 111 122 103 123 1033 1022 127 +260 9 2 11 112 21 139 148 1034 1035 152 +261 9 2 11 112 645 623 646 1036 1037 648 +262 9 2 11 112 21 4 139 1038 143 1034 +263 9 2 11 112 641 650 640 1039 1040 643 +264 9 2 11 112 74 651 72 654 1041 655 +265 9 2 11 112 640 22 2 1042 1043 642 +266 9 2 11 112 69 645 73 1044 647 656 +267 9 2 11 112 623 624 646 626 1045 1037 +268 9 2 11 112 69 623 645 625 1036 1044 +269 9 2 11 112 148 139 140 1035 144 1046 +270 9 2 11 112 148 140 149 1046 1047 153 +271 9 2 11 112 72 651 641 1041 1048 644 +272 9 2 11 112 141 142 151 146 1049 1050 +273 9 2 11 112 650 22 640 652 1042 1040 +274 9 2 11 112 624 4 21 627 1038 1051 +275 9 2 11 112 651 650 641 653 1039 1048 +276 9 2 11 112 646 624 21 1045 1051 649 +277 9 2 11 112 151 142 22 1049 1052 156 +278 9 2 11 112 150 141 151 1053 1050 155 +279 9 2 11 112 149 140 141 1047 145 1054 +280 9 2 11 112 149 141 150 1054 1053 154 +281 9 2 11 112 142 2 22 147 1043 1052 +282 9 2 11 113 195 26 168 199 1055 1056 +283 9 2 11 113 188 187 159 192 1057 1058 +284 9 2 11 113 607 66 663 610 1059 1060 +285 9 2 11 113 668 658 25 1061 1062 671 +286 9 2 11 113 187 186 158 191 1063 1064 +287 9 2 11 113 663 66 76 1059 672 666 +288 9 2 11 113 112 178 111 1065 1066 117 +289 9 2 11 113 606 607 662 609 1067 1068 +290 9 2 11 113 662 607 663 1067 1060 665 +291 9 2 11 113 170 197 169 1069 1070 174 +292 9 2 11 113 8 23 171 1071 1072 176 +293 9 2 11 113 180 179 113 184 1073 1074 +294 9 2 11 113 75 657 667 659 1075 1076 +295 9 2 11 113 189 160 161 1077 166 1078 +296 9 2 11 113 196 195 169 200 1079 1080 +297 9 2 11 113 158 186 157 1063 1081 163 +298 9 2 11 113 179 178 112 183 1065 1082 +299 9 2 11 113 658 6 25 661 1083 1062 +300 9 2 11 113 113 179 112 1073 1082 118 +301 9 2 11 113 24 180 114 185 1084 1085 +302 9 2 11 113 114 180 113 1084 1074 119 +303 9 2 11 113 5 24 114 1086 1085 120 +304 9 2 11 113 5 606 24 608 1087 1086 +305 9 2 11 113 110 177 23 1088 181 1089 +306 9 2 11 113 169 195 168 1079 1056 173 +307 9 2 11 113 24 606 662 1087 1068 664 +308 9 2 11 113 159 187 158 1057 1064 164 +309 9 2 11 113 26 161 7 1090 167 1091 +310 9 2 11 113 189 188 160 193 1092 1077 +311 9 2 11 113 168 26 7 1055 1091 172 +312 9 2 11 113 26 189 161 194 1078 1090 +313 9 2 11 113 111 177 110 1093 1088 116 +314 9 2 11 113 157 25 6 1094 1083 162 +315 9 2 11 113 110 23 8 1089 1071 115 +316 9 2 11 113 197 196 169 201 1080 1070 +317 9 2 11 113 667 657 668 1075 1095 670 +318 9 2 11 113 77 75 667 673 1076 669 +319 9 2 11 113 111 178 177 1066 182 1093 +320 9 2 11 113 23 198 171 203 1096 1072 +321 9 2 11 113 188 159 160 1058 165 1092 +322 9 2 11 113 198 197 170 202 1069 1097 +323 9 2 11 113 171 198 170 1096 1097 175 +324 9 2 11 113 657 658 668 660 1061 1095 +325 9 2 11 113 186 25 157 190 1094 1081 +326 9 2 11 114 287 33 208 291 1098 1099 +327 9 2 11 114 641 679 640 1100 1101 643 +328 9 2 11 114 204 290 205 1102 1103 210 +329 9 2 11 114 33 675 3 1104 678 1105 +330 9 2 11 114 33 685 675 688 1106 1104 +331 9 2 11 114 2 34 204 1107 1108 209 +332 9 2 11 114 207 287 208 1109 1099 213 +333 9 2 11 114 684 80 674 686 1110 1111 +334 9 2 11 114 685 684 674 687 1111 1112 +335 9 2 11 114 641 680 679 1113 682 1100 +336 9 2 11 114 289 288 206 293 1114 1115 +337 9 2 11 114 208 33 3 1098 1105 214 +338 9 2 11 114 288 287 207 292 1109 1116 +339 9 2 11 114 206 288 207 1114 1116 212 +340 9 2 11 114 290 289 205 294 1117 1103 +341 9 2 11 114 674 80 78 1110 690 676 +342 9 2 11 114 685 674 675 1112 677 1106 +343 9 2 11 114 34 290 204 295 1102 1108 +344 9 2 11 114 205 289 206 1117 1115 211 +345 9 2 11 114 72 79 641 689 1118 644 +346 9 2 11 114 79 680 641 683 1113 1118 +347 9 2 11 114 640 34 2 1119 1107 642 +348 9 2 11 114 640 679 34 1101 681 1119 +349 9 2 11 115 297 298 307 302 1120 1121 +350 9 2 11 115 696 658 697 1122 1123 699 +351 9 2 11 115 691 692 702 694 1124 1125 +352 9 2 11 115 36 16 691 1126 693 1127 +353 9 2 11 115 658 35 697 1128 700 1123 +354 9 2 11 115 35 296 305 1129 1130 309 +355 9 2 11 115 702 692 83 1124 1131 705 +356 9 2 11 115 658 6 35 661 1132 1128 +357 9 2 11 115 6 296 35 300 1129 1132 +358 9 2 11 115 308 299 36 1133 1134 313 +359 9 2 11 115 657 658 696 660 1122 1135 +360 9 2 11 115 701 691 702 1136 1125 704 +361 9 2 11 115 692 81 83 695 706 1131 +362 9 2 11 115 82 657 696 1137 1135 698 +363 9 2 11 115 298 299 308 303 1133 1138 +364 9 2 11 115 296 297 305 301 1139 1130 +365 9 2 11 115 297 307 306 1121 311 1140 +366 9 2 11 115 36 691 701 1127 1136 703 +367 9 2 11 115 305 297 306 1139 1140 310 +368 9 2 11 115 307 298 308 1120 1138 312 +369 9 2 11 115 299 16 36 304 1126 1134 +370 9 2 11 115 75 657 82 659 1137 707 +371 9 2 11 116 427 398 399 1141 404 1142 +372 9 2 11 116 314 315 417 319 1143 1144 +373 9 2 11 116 315 316 419 320 1145 1146 +374 9 2 11 116 427 399 428 1142 1147 432 +375 9 2 11 116 708 43 10 1148 1149 710 +376 9 2 11 116 718 86 78 720 724 1150 +377 9 2 11 116 44 215 408 1151 1152 412 +378 9 2 11 116 713 43 708 715 1148 1153 +379 9 2 11 116 3 215 44 219 1151 1154 +380 9 2 11 116 420 317 46 1155 1156 425 +381 9 2 11 116 217 218 411 222 1157 1158 +382 9 2 11 116 217 411 410 1158 415 1159 +383 9 2 11 116 675 719 674 1160 1161 677 +384 9 2 11 116 215 216 408 220 1162 1152 +385 9 2 11 116 216 217 409 221 1163 1164 +386 9 2 11 116 401 10 43 407 1149 1165 +387 9 2 11 116 400 401 429 406 1166 1167 +388 9 2 11 116 709 713 708 1168 1153 711 +389 9 2 11 116 674 718 78 1169 1150 676 +390 9 2 11 116 409 217 410 1163 1159 414 +391 9 2 11 116 218 1 45 223 1170 1171 +392 9 2 11 116 719 718 674 721 1169 1161 +393 9 2 11 116 1 314 45 318 1172 1170 +394 9 2 11 116 315 419 418 1146 423 1173 +395 9 2 11 116 408 216 409 1162 1164 413 +396 9 2 11 116 84 714 709 1174 1175 712 +397 9 2 11 116 428 400 429 1176 1167 433 +398 9 2 11 116 46 397 426 1177 1178 430 +399 9 2 11 116 419 316 420 1145 1179 424 +400 9 2 11 116 46 9 397 1180 402 1177 +401 9 2 11 116 714 713 709 716 1168 1175 +402 9 2 11 116 316 317 420 321 1155 1179 +403 9 2 11 116 45 314 417 1172 1144 421 +404 9 2 11 116 218 45 411 1171 416 1157 +405 9 2 11 116 429 401 43 1166 1165 434 +406 9 2 11 116 426 397 398 1178 403 1181 +407 9 2 11 116 317 9 46 322 1180 1156 +408 9 2 11 116 417 315 418 1143 1173 422 +409 9 2 11 116 399 400 428 405 1176 1147 +410 9 2 11 116 426 398 427 1181 1141 431 +411 9 2 11 116 85 714 84 717 1174 723 +412 9 2 11 116 44 719 675 722 1160 1182 +413 9 2 11 116 3 44 675 1154 1182 678 +414 9 2 11 117 16 50 336 1183 1184 342 +415 9 2 11 117 446 465 445 1185 1186 451 +416 9 2 11 117 88 87 730 741 1187 732 +417 9 2 11 117 332 49 15 1188 1189 337 +418 9 2 11 117 457 456 437 461 1190 1191 +419 9 2 11 117 448 467 447 1192 1193 453 +420 9 2 11 117 458 457 437 462 1191 1194 +421 9 2 11 117 437 456 436 1190 1195 441 +422 9 2 11 117 333 474 473 1196 478 1197 +423 9 2 11 117 730 725 731 1198 1199 733 +424 9 2 11 117 333 473 332 1197 1200 338 +425 9 2 11 117 456 455 436 460 1201 1195 +426 9 2 11 117 465 464 445 469 1202 1186 +427 9 2 11 117 444 48 14 1203 1204 449 +428 9 2 11 117 458 437 438 1194 442 1205 +429 9 2 11 117 49 467 448 472 1192 1206 +430 9 2 11 117 48 438 14 1207 443 1204 +431 9 2 11 117 335 475 334 1208 1209 340 +432 9 2 11 117 475 474 334 479 1210 1209 +433 9 2 11 117 445 464 444 1202 1211 450 +434 9 2 11 117 332 473 49 1200 477 1188 +435 9 2 11 117 735 692 736 1212 1213 738 +436 9 2 11 117 334 474 333 1210 1196 339 +437 9 2 11 117 466 465 446 470 1185 1214 +438 9 2 11 117 725 726 731 728 1215 1199 +439 9 2 11 117 436 455 435 1201 1216 440 +440 9 2 11 117 731 726 47 1215 1217 734 +441 9 2 11 117 455 47 435 459 1218 1216 +442 9 2 11 117 726 13 47 729 1219 1217 +443 9 2 11 117 692 81 736 695 1220 1213 +444 9 2 11 117 435 47 13 1218 1219 439 +445 9 2 11 117 736 81 89 1220 740 739 +446 9 2 11 117 16 691 50 693 1221 1183 +447 9 2 11 117 464 48 444 468 1203 1211 +448 9 2 11 117 447 466 446 1222 1214 452 +449 9 2 11 117 336 476 335 1223 1224 341 +450 9 2 11 117 691 692 735 694 1212 1225 +451 9 2 11 117 48 458 438 463 1205 1207 +452 9 2 11 117 15 49 448 1189 1206 454 +453 9 2 11 117 87 725 730 727 1198 1187 +454 9 2 11 117 50 476 336 481 1223 1184 +455 9 2 11 117 50 691 735 1221 1225 737 +456 9 2 11 117 467 466 447 471 1222 1193 +457 9 2 11 117 476 475 335 480 1208 1224 +458 9 2 11 118 743 90 91 746 757 1226 +459 9 2 11 118 567 484 568 1227 1228 572 +460 9 2 11 118 747 742 748 1229 1230 750 +461 9 2 11 118 708 58 753 1231 756 1232 +462 9 2 11 118 92 709 752 1233 1234 754 +463 9 2 11 118 709 753 752 1235 755 1234 +464 9 2 11 118 709 708 753 711 1232 1235 +465 9 2 11 118 565 483 566 1236 1237 570 +466 9 2 11 118 57 742 747 1238 1229 749 +467 9 2 11 118 742 743 748 745 1239 1230 +468 9 2 11 118 568 485 57 1240 1241 573 +469 9 2 11 118 566 484 567 1242 1227 571 +470 9 2 11 118 485 12 57 490 1243 1241 +471 9 2 11 118 10 482 58 486 1244 1245 +472 9 2 11 118 708 10 58 710 1245 1231 +473 9 2 11 118 84 709 92 712 1233 758 +474 9 2 11 118 57 12 742 1243 744 1238 +475 9 2 11 118 748 743 91 1239 1226 751 +476 9 2 11 118 58 482 565 1244 1246 569 +477 9 2 11 118 482 483 565 487 1236 1246 +478 9 2 11 118 484 485 568 489 1240 1228 +479 9 2 11 118 483 484 566 488 1242 1237 +480 9 2 11 119 13 759 59 761 1247 1248 +481 9 2 11 119 764 726 765 1249 1250 767 +482 9 2 11 119 770 93 95 1251 774 773 +483 9 2 11 119 760 93 770 763 1251 1252 +484 9 2 11 119 769 760 770 1253 1252 772 +485 9 2 11 119 59 759 769 1247 1254 771 +486 9 2 11 119 725 726 764 728 1249 1255 +487 9 2 11 119 87 725 94 727 1256 775 +488 9 2 11 119 726 13 59 729 1248 1257 +489 9 2 11 119 726 59 765 1257 768 1250 +490 9 2 11 119 94 725 764 1256 1255 766 +491 9 2 11 119 759 760 769 762 1253 1254 +492 9 2 11 120 504 503 574 509 1258 1259 +493 9 2 11 120 776 777 781 779 1260 1261 +494 9 2 11 120 777 96 782 780 1262 1263 +495 9 2 11 120 14 60 438 1264 1265 443 +496 9 2 11 120 787 786 760 789 1266 1267 +497 9 2 11 120 503 502 575 508 1268 1269 +498 9 2 11 120 586 585 437 590 1270 1271 +499 9 2 11 120 437 584 436 1272 1273 441 +500 9 2 11 120 437 585 584 1270 589 1272 +501 9 2 11 120 61 776 781 1274 1261 783 +502 9 2 11 120 436 584 583 1273 588 1275 +503 9 2 11 120 60 586 438 591 1276 1265 +504 9 2 11 120 781 777 782 1260 1263 784 +505 9 2 11 120 759 787 760 1277 1267 762 +506 9 2 11 120 786 98 93 788 792 1278 +507 9 2 11 120 502 501 576 507 1279 1280 +508 9 2 11 120 438 586 437 1276 1271 442 +509 9 2 11 120 500 61 577 1281 582 1282 +510 9 2 11 120 574 503 575 1258 1269 579 +511 9 2 11 120 435 62 13 1283 1284 439 +512 9 2 11 120 436 583 435 1275 1285 440 +513 9 2 11 120 501 577 576 1286 581 1279 +514 9 2 11 120 501 500 577 506 1282 1286 +515 9 2 11 120 575 502 576 1268 1280 580 +516 9 2 11 120 62 787 759 790 1277 1287 +517 9 2 11 120 11 776 61 778 1274 1288 +518 9 2 11 120 13 62 759 1284 1287 761 +519 9 2 11 120 760 786 93 1266 1278 763 +520 9 2 11 120 500 11 61 505 1288 1281 +521 9 2 11 120 14 504 60 510 1289 1264 +522 9 2 11 120 60 504 574 1289 1259 578 +523 9 2 11 120 782 96 97 1262 791 785 +524 9 2 11 120 435 583 62 1285 587 1283 +525 9 2 11 121 793 743 794 1290 1291 796 +526 9 2 11 121 494 64 11 1292 1293 499 +527 9 2 11 121 493 592 494 1294 1295 498 +528 9 2 11 121 63 742 793 1296 1297 795 +529 9 2 11 121 492 594 493 1298 1299 497 +530 9 2 11 121 493 593 592 1300 597 1294 +531 9 2 11 121 63 595 491 600 1301 1302 +532 9 2 11 121 491 595 492 1301 1303 496 +533 9 2 11 121 12 63 491 1304 1302 495 +534 9 2 11 121 798 100 96 800 804 1305 +535 9 2 11 121 777 798 96 1306 1305 780 +536 9 2 11 121 742 743 793 745 1290 1297 +537 9 2 11 121 11 64 776 1293 1307 778 +538 9 2 11 121 799 798 777 801 1306 1308 +539 9 2 11 121 794 90 99 1309 803 797 +540 9 2 11 121 494 592 64 1295 596 1292 +541 9 2 11 121 594 593 493 598 1300 1299 +542 9 2 11 121 12 742 63 744 1296 1304 +543 9 2 11 121 595 594 492 599 1298 1303 +544 9 2 11 121 64 799 776 802 1310 1307 +545 9 2 11 121 776 799 777 1310 1308 779 +546 9 2 11 121 743 90 794 746 1309 1291 +$EndElements diff --git a/dG3D/benchmarks/micro_pathFollowing/rve.py b/dG3D/benchmarks/micro_pathFollowing/rve.py new file mode 100644 index 0000000000000000000000000000000000000000..bedf652d94b96653263b31d7f0f312c92e82ad2f --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/rve.py @@ -0,0 +1,136 @@ +#coding-Utf-8-*- + +from gmshpy import * +from dG3Dpy import* + +import math + +# material law +lawnum1 = 11 # unique number of law +E = 68.9E3 #Young modulus +nu = 0.33 #Poisson ratio +K = E/3./(1.-2.*nu) +mu = E/2./(1+nu) +sy0 = 276. #Yield stress +h = E/100 # hardening modulus +rho = 1. #density + +# creation of material law +harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) +law1 = J2LinearDG3DMaterialLaw(lawnum1,rho,E,nu,harden) + + +#type = 0; +#law1 = FSElasticMaterialLaw(lawnum,type,K,mu,rho) + +# geometry +meshfile="rve1.msh" # name of mesh file + +# creation of part Domain +nfield = 11 # number of the field (physical number of entity) +dim =2 + + +myfield1 = dG3DDomain(10,11,0,lawnum1,0,2) + + +# solver +sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 +soltype =1 # StaticLinear=0 (default) StaticNonLinear=1 +nstep = 50 # number of step (used only if soltype=1) +ftime =1. # Final time (used only if soltype=1) +tol=1.e-5 # relative tolerance for NR scheme (used only if soltype=1) +nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) +system = 3 # Displacement elimination =0 Multiplier elimination = 1 Displacement+ multiplier = 2 +control = 0 # load control = 0 arc length control euler = 1 + +# creation of Solver +mysolver = nonLinearMechSolver(1000) + +mysolver.loadModel(meshfile) + +mysolver.addDomain(myfield1) +mysolver.addMaterialLaw(law1) +mysolver.Scheme(soltype) +mysolver.Solver(sol) +mysolver.snlData(nstep,ftime,tol) +mysolver.setSystemType(system) +mysolver.setControlType(control) +mysolver.stiffnessModification(True) +mysolver.iterativeProcedure(True) +mysolver.setMessageView(True) + +mysolver.setTimeIncrementAdaptation(True,5,1,0.,0.2,100) + +mysolver.setMicroProblemIndentification(1,0) + +mysolver.pathFollowing(True,0) +mysolver.setPathFollowingControlType(1) + +microBC = nonLinearPeriodicBC(10,2) +microBC.setOrder(2) +microBC.setBCPhysical(1,2,3,4) +microBC.setPeriodicBCOptions(1, 9,True) + # Deformation gradient +microBC.setDeformationGradient(1.0,0.0,0.0,0.98) + + # Gradient of deformation gradient +#mysolver.setGradientOfDeformationGradient(0,1,0,0.1) +#mysolver.setGradientOfDeformationGradient(0,0,1,0.1) +#mysolver.setGradientOfDeformationGradient(1,0,1,0.1) +#mysolver.setGradientOfDeformationGradient(1,1,1,0.1) +#mysolver.setGradientOfDeformationGradient(0,0,1,-0.1) +#mysolver.setGradientOfDeformationGradient(0,0,0,0.1) + +mysolver.addMicroBC(microBC) + + +#stress averaging flag and averaging method 0- VOLUME, 1- SURFACE +mysolver.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +mysolver.setStressAveragingMethod(0) # 0 -volume 1- surface +#tangent averaging flag +mysolver.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +mysolver.setTangentAveragingMethod(2,1e-6) # 0- perturbation 1- condensation + + +# build view +mysolver.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ, 1, 1); +mysolver.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ, 1, 1); +mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1); +mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1); +mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1); +mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1); +mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1); +mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1); +mysolver.internalPointBuildView("sig_VM",IPField.SVM, 1, 1); +mysolver.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN, 1, 1); + +mysolver.internalPointBuildView("F_xx",IPField.F_XX, 1, 1); +mysolver.internalPointBuildView("F_xy",IPField.F_XY, 1, 1); +mysolver.internalPointBuildView("F_yx",IPField.F_YX, 1, 1); +mysolver.internalPointBuildView("F_yy",IPField.F_YY, 1, 1); + +mysolver.internalPointBuildView("G_xxx",IPField.G_XXX, 1, 1); +mysolver.internalPointBuildView("G_xyy",IPField.G_XYY, 1, 1); +mysolver.internalPointBuildView("G_xxy",IPField.G_XXY, 1, 1); +mysolver.internalPointBuildView("G_yxx",IPField.G_YXX, 1, 1); +mysolver.internalPointBuildView("G_yyy",IPField.G_YYY, 1, 1); +mysolver.internalPointBuildView("G_yxy",IPField.G_YXY, 1, 1); + + +mysolver.internalPointBuildView("High-order strain norm",IPField.HIGHSTRAIN_NORM, 1, 1); +mysolver.internalPointBuildView("High-order stress norm",IPField.HIGHSTRESS_NORM, 1, 1); +mysolver.internalPointBuildView("Green -Lagrange strain norm",IPField.GL_NORM, 1, 1); + + +# solve +mysolver.solve() +# test check +check = TestCheck() +check.equal(-4.525161e+00,mysolver.getHomogenizedStress(1,1),1.e-4) +check.equal(-1.050612e+02,mysolver.getHomogenizedTangent(1,1,1,1),1.e-4) + diff --git a/dG3D/benchmarks/micro_pathFollowing/rve1.geo b/dG3D/benchmarks/micro_pathFollowing/rve1.geo new file mode 100644 index 0000000000000000000000000000000000000000..be9a5476bba1874369c35b33787d92ccb2b2aa66 --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/rve1.geo @@ -0,0 +1,256 @@ +Point(69) = {0.43034, -0.490289, 0, 0.2}; +Point(71) = {1.29592, -1.99477, 0, 0.2}; +Point(75) = {1.29707, -0.988613, 0, 0.2}; +Point(82) = {0.433689, -2.49526, 0, 0.2}; +Point(147) = {-1.30229, -2.49301, 0, 0.2}; +Point(148) = {-1.31029, -0.497681, 0, 0.2}; +Point(150) = {-0.429693, -0.99721, 0, 0.2}; +Point(151) = {-0.426053, -1.99531, 0, 0.2}; +Point(169) = {0.423229, 0.499706, 0, 0.2}; +Point(170) = {1.29034, 1.0074, 0, 0.2}; +Point(171) = {0.432102, 2.49473, 0, 0.2}; +Point(172) = {1.28857, 1.9992, 0, 0.2}; +Point(174) = {-1.30543, 2.49621, 0, 0.2}; +Point(175) = {-0.440302, 1.99569, 0, 0.2}; +Point(176) = {-0.434068, 0.993208, 0, 0.2}; +Point(177) = {-1.30689, 0.493467, 0, 0.2}; +Point(1794) = {-1.35207, -2.52208, 0, 0.2}; +Point(1871) = {0.383674, -2.52402, 0, 0.2}; +Point(1872) = {-0.426346, -2.05298, 0, 0.2}; +Point(1873) = {-1.25207, -2.52199, 0, 0.2}; +Point(1949) = {0.483674, -2.52406, 0, 0.2}; +Point(1950) = {1.2962, -2.05242, 0, 0.2}; +Point(2571) = {-0.476159, -1.96627, 0, 0.2}; +Point(2572) = {-1.30215, -2.43543, 0, 0.2}; +Point(2575) = {-1.30979, -0.555446, 0, 0.2}; +Point(2576) = {-0.479587, -1.02639, 0, 0.2}; +Point(2649) = {-0.376158, -1.96649, 0, 0.2}; +Point(2650) = {0.433712, -2.43743, 0, 0.2}; +Point(2651) = {1.24595, -1.96596, 0, 0.2}; +Point(2652) = {1.24704, -1.01752, 0, 0.2}; +Point(2653) = {0.430653, -0.548144, 0, 0.2}; +Point(2654) = {-0.379589, -1.02572, 0, 0.2}; +Point(2727) = {1.34704, -1.01757, 0, 0.2}; +Point(2728) = {1.34595, -1.96568, 0, 0.2}; +Point(3199) = {-1.36019, -0.469073, 0, 0.2}; +Point(3200) = {-1.35699, 0.464967, 0, 0.2}; +Point(3273) = {-1.25699, 0.464422, 0, 0.2}; +Point(3274) = {-1.26019, -0.468616, 0, 0.2}; +Point(3275) = {-0.430173, -0.939454, 0, 0.2}; +Point(3276) = {0.380134, -0.461842, 0, 0.2}; +Point(3277) = {0.373436, 0.470677, 0, 0.2}; +Point(3278) = {-0.434135, 0.935554, 0, 0.2}; +Point(3351) = {1.29056, 0.949589, 0, 0.2}; +Point(3354) = {1.29708, -0.930942, 0, 0.2}; +Point(3355) = {0.480133, -0.461242, 0, 0.2}; +Point(3356) = {0.473435, 0.471162, 0, 0.2}; +Point(3977) = {-1.30547, 2.43847, 0, 0.2}; +Point(3978) = {-0.490123, 1.96675, 0, 0.2}; +Point(3979) = {-0.484249, 1.02209, 0, 0.2}; +Point(3980) = {-1.30652, 0.551297, 0, 0.2}; +Point(4053) = {-0.384247, 1.02222, 0, 0.2}; +Point(4054) = {0.423016, 0.557521, 0, 0.2}; +Point(4055) = {1.24029, 1.03603, 0, 0.2}; +Point(4056) = {1.23862, 1.97033, 0, 0.2}; +Point(4057) = {0.43196, 2.43705, 0, 0.2}; +Point(4058) = {-0.390121, 1.96679, 0, 0.2}; +Point(4131) = {1.33862, 1.97043, 0, 0.2}; +Point(4136) = {1.34029, 1.03635, 0, 0.2}; +Point(4602) = {-1.35516, 2.52525, 0, 0.2}; +Point(4677) = {-0.440161, 2.05337, 0, 0.2}; +Point(4678) = {0.38198, 2.52366, 0, 0.2}; +Point(4682) = {-1.25516, 2.52489, 0, 0.2}; +Point(4755) = {1.28854, 2.05698, 0, 0.2}; +Point(4760) = {0.481981, 2.52364, 0, 0.2}; +Point(6601) = {-1.29839, -3, 0, 0.2}; +Point(6655) = {-1.73205, -2.24611, 0, 0.2}; +Point(6708) = {-1.34839, -3, 0, 0.2}; +Point(6762) = {-1.73205, -2.30377, 0, 0.2}; +Point(6867) = {0.433432, -3, 0, 0.2}; +Point(6918) = {0.383432, -3, 0, 0.2}; +Point(6971) = {-1.24839, -3, 0, 0.2}; +Point(7077) = {1.73205, -2.24234, 0, 0.2}; +Point(7129) = {0.483432, -3, 0, 0.2}; +Point(7182) = {1.73205, -2.29983, 0, 0.2}; +Point(7289) = {-1.73205, -0.746585, 0, 0.2}; +Point(7343) = {-1.73205, -2.18844, 0, 0.2}; +Point(7397) = {-1.73205, -0.804643, 0, 0.2}; +Point(7503) = {1.73205, -0.738664, 0, 0.2}; +Point(7557) = {1.73205, -2.18484, 0, 0.2}; +Point(7609) = {1.73205, -0.796331, 0, 0.2}; +Point(7716) = {-1.73205, 0.744246, 0, 0.2}; +Point(7770) = {-1.73205, -0.688527, 0, 0.2}; +Point(7824) = {-1.73205, 0.686196, 0, 0.2}; +Point(7930) = {1.73205, 0.753282, 0, 0.2}; +Point(7984) = {1.73205, 0.695598, 0, 0.2}; +Point(8038) = {1.73205, -0.680997, 0, 0.2}; +Point(8145) = {-1.73205, 2.25014, 0, 0.2}; +Point(8195) = {-1.73205, 2.19242, 0, 0.2}; +Point(8249) = {-1.73205, 0.802296, 0, 0.2}; +Point(8356) = {1.73205, 2.25644, 0, 0.2}; +Point(8410) = {1.73205, 2.19864, 0, 0.2}; +Point(8463) = {1.73205, 0.810966, 0, 0.2}; +Point(8569) = {-1.30076, 3, 0, 0.2}; +Point(8622) = {-1.73205, 2.30786, 0, 0.2}; +Point(8675) = {-1.35076, 3, 0, 0.2}; +Point(8779) = {0.429982, 3, 0, 0.2}; +Point(8832) = {0.379981, 3, 0, 0.2}; +Point(8882) = {-1.25075, 3, 0, 0.2}; +Point(9038) = {1.73205, 2.31425, 0, 0.2}; +Point(9089) = {0.479982, 3, 0, 0.2}; +Line(213) = {82, 151 }; +Line(214) = {151, 147 }; +Line(217) = {1871, 1872 }; +Line(218) = {1872, 1873 }; +Line(221) = {82, 71 }; +Line(226) = {1949, 1950 }; +Line(297) = {148, 150 }; +Line(298) = {150, 151 }; +Line(299) = {2571, 2572 }; +Line(303) = {2575, 2576 }; +Line(304) = {2576, 2571 }; +Line(305) = {71, 75 }; +Line(306) = {75, 69 }; +Line(307) = {69, 150 }; +Line(308) = {2649, 2650 }; +Line(309) = {2650, 2651 }; +Line(310) = {2651, 2652 }; +Line(311) = {2652, 2653 }; +Line(312) = {2653, 2654 }; +Line(313) = {2654, 2649 }; +Line(317) = {2727, 2728 }; +Line(370) = {148, 177 }; +Line(376) = {3199, 3200 }; +Line(378) = {69, 169 }; +Line(379) = {169, 176 }; +Line(380) = {176, 177 }; +Line(381) = {3273, 3274 }; +Line(382) = {3274, 3275 }; +Line(383) = {3275, 3276 }; +Line(384) = {3276, 3277 }; +Line(385) = {3277, 3278 }; +Line(386) = {3278, 3273 }; +Line(389) = {169, 170 }; +Line(393) = {3354, 3355 }; +Line(394) = {3355, 3356 }; +Line(395) = {3356, 3351 }; +Line(463) = {174, 175 }; +Line(464) = {175, 176 }; +Line(467) = {3977, 3978 }; +Line(468) = {3978, 3979 }; +Line(469) = {3979, 3980 }; +Line(471) = {170, 172 }; +Line(472) = {172, 171 }; +Line(473) = {171, 175 }; +Line(474) = {4053, 4054 }; +Line(475) = {4054, 4055 }; +Line(476) = {4055, 4056 }; +Line(477) = {4056, 4057 }; +Line(478) = {4057, 4058 }; +Line(479) = {4058, 4053 }; +Line(488) = {4136, 4131 }; +Line(547) = {4677, 4678 }; +Line(552) = {4682, 4677 }; +Line(561) = {4760, 4755 }; +Line(765) = {6601, 147 }; +Line(766) = {147, 6655 }; +Line(767) = {6708, 1794 }; +Line(768) = {1794, 6762 }; +Line(769) = {6655, 6762 }; +Line(770) = {6708, 6601 }; +Line(771) = {6867, 82 }; +Line(772) = {6918, 1871 }; +Line(773) = {1873, 6971 }; +Line(774) = {6601, 6971 }; +Line(775) = {6918, 6867 }; +Line(776) = {71, 7077 }; +Line(777) = {7129, 1949 }; +Line(778) = {1950, 7182 }; +Line(779) = {7077, 7182 }; +Line(780) = {7129, 6867 }; +Line(781) = {7289, 148 }; +Line(782) = {2572, 7343 }; +Line(783) = {7397, 2575 }; +Line(784) = {6655, 7343 }; +Line(785) = {7397, 7289 }; +Line(786) = {7503, 75 }; +Line(787) = {2728, 7557 }; +Line(788) = {7609, 2727 }; +Line(789) = {7077, 7557 }; +Line(790) = {7609, 7503 }; +Line(791) = {177, 7716 }; +Line(792) = {7770, 3199 }; +Line(793) = {3200, 7824 }; +Line(794) = {7716, 7824 }; +Line(795) = {7770, 7289 }; +Line(796) = {170, 7930 }; +Line(797) = {3351, 7984 }; +Line(798) = {8038, 3354 }; +Line(799) = {7930, 7984 }; +Line(800) = {8038, 7503 }; +Line(801) = {8145, 174 }; +Line(802) = {8195, 3977 }; +Line(803) = {3980, 8249 }; +Line(804) = {7716, 8249 }; +Line(805) = {8195, 8145 }; +Line(806) = {172, 8356 }; +Line(807) = {4131, 8410 }; +Line(808) = {8463, 4136 }; +Line(809) = {8356, 8410 }; +Line(810) = {8463, 7930 }; +Line(811) = {174, 8569 }; +Line(812) = {8622, 4602 }; +Line(813) = {4602, 8675 }; +Line(814) = {8569, 8675 }; +Line(815) = {8622, 8145 }; +Line(816) = {171, 8779 }; +Line(817) = {4678, 8832 }; +Line(818) = {8882, 4682 }; +Line(819) = {8779, 8832 }; +Line(820) = {8882, 8569 }; +Line(821) = {4755, 9038 }; +Line(822) = {9089, 4760 }; +Line(823) = {8356, 9038 }; +Line(824) = {9089, 8779 }; +Line Loop(63) = {-213,221 ,298 ,305 ,306 ,307 }; +Line Loop(64) = {308,309 ,310 ,311 ,312 ,313 }; +Line Loop(79) = {-370,-307 ,297 ,378 ,379 ,380 }; +Line Loop(80) = {381,382 ,383 ,384 ,385 ,386 }; +Line Loop(99) = {-379,389 ,464 ,471 ,472 ,473 }; +Line Loop(100) = {474,475 ,476 ,477 ,478 ,479 }; +Line Loop(163) = {-768,-767 ,765 ,766 ,769 ,770 }; +Line Loop(164) = {-773,-772 ,-765 ,-218 ,-217 ,213 ,214 ,771 ,774 ,775 }; +Line Loop(165) = {-778,-777 ,-226 ,221 ,771 ,776 ,779 ,780 }; +Line Loop(166) = {-783,-782 ,-304 ,-303 ,-299 ,214 ,297 ,298 ,766 ,781 ,784 ,785 }; +Line Loop(167) = {-788,-787 ,-317 ,-305 ,776 ,786 ,789 ,790 }; +Line Loop(168) = {-793,-792 ,-376 ,370 ,781 ,791 ,794 ,795 }; +Line Loop(169) = {-798,-797 ,-395 ,-394 ,-393 ,306 ,378 ,389 ,786 ,796 ,799 ,800 }; +Line Loop(170) = {-803,-802 ,-469 ,-468 ,-467 ,380 ,463 ,464 ,791 ,801 ,804 ,805 }; +Line Loop(171) = {-808,-807 ,-796 ,-488 ,471 ,806 ,809 ,810 }; +Line Loop(172) = {-813,-812 ,801 ,811 ,814 ,815 }; +Line Loop(173) = {-818,-817 ,-811 ,-552 ,-547 ,-473 ,463 ,816 ,819 ,820 }; +Line Loop(174) = {-822,-821 ,-816 ,-561 ,-472 ,806 ,823 ,824 }; +Plane Surface(50) = {-64 ,63 }; +Plane Surface(60) = {-80 ,79 }; +Plane Surface(72) = {-100 ,99 }; +Plane Surface(110) = {163 }; +Plane Surface(111) = {164 }; +Plane Surface(112) = {165 }; +Plane Surface(113) = {166 }; +Plane Surface(114) = {167 }; +Plane Surface(115) = {168 }; +Plane Surface(116) = {169 }; +Plane Surface(117) = {170 }; +Plane Surface(118) = {171 }; +Plane Surface(119) = {172 }; +Plane Surface(120) = {173 }; +Plane Surface(121) = {174 }; +Physical Surface(11) = {50 ,60,72,110,111,112,113,114,115,116,117,118,119,120,121}; +Physical Line(1) = {770 ,774,775,780}; +Physical Line(2) = {779 ,789,790,799,800,809,810,823}; +Physical Line(3) = {814 ,819,820,824}; +Physical Line(4) = {769 ,784,785,794,795,804,805,815}; +Physical Point(1) = {6708}; +Physical Point(2) = {6655}; +Physical Point(3) = {7077}; +Physical Point(4) = {8569}; diff --git a/dG3D/benchmarks/micro_pathFollowing/rve1.msh b/dG3D/benchmarks/micro_pathFollowing/rve1.msh new file mode 100644 index 0000000000000000000000000000000000000000..b98bd95ba522382ef0bd71851c93a0a8d699638b --- /dev/null +++ b/dG3D/benchmarks/micro_pathFollowing/rve1.msh @@ -0,0 +1,1865 @@ +$MeshFormat +2.2 0 8 +$EndMeshFormat +$Nodes +1310 +1 0.43034 -0.490289 0 +2 1.29592 -1.99477 0 +3 1.29707 -0.988613 0 +4 0.433689 -2.49526 0 +5 -1.30229 -2.49301 0 +6 -1.31029 -0.497681 0 +7 -0.429693 -0.99721 0 +8 -0.426053 -1.99531 0 +9 0.423229 0.499706 0 +10 1.29034 1.0074 0 +11 0.432102 2.49473 0 +12 1.28857 1.9992 0 +13 -1.30543 2.49621 0 +14 -0.440302 1.99569 0 +15 -0.434068 0.993208 0 +16 -1.30689 0.493467 0 +17 -1.35207 -2.52208 0 +18 0.383674 -2.52402 0 +19 -0.426346 -2.05298 0 +20 -1.25207 -2.52199 0 +21 0.483674 -2.52406 0 +22 1.2962 -2.05242 0 +23 -0.476159 -1.96627 0 +24 -1.30215 -2.43543 0 +25 -1.30979 -0.555446 0 +26 -0.479587 -1.02639 0 +27 -0.376158 -1.96649 0 +28 0.433712 -2.43743 0 +29 1.24595 -1.96596 0 +30 1.24704 -1.01752 0 +31 0.430653 -0.548144 0 +32 -0.379589 -1.02572 0 +33 1.34704 -1.01757 0 +34 1.34595 -1.96568 0 +35 -1.36019 -0.469073 0 +36 -1.35699 0.464967 0 +37 -1.25699 0.464422 0 +38 -1.26019 -0.468616 0 +39 -0.430173 -0.939454 0 +40 0.380134 -0.461842 0 +41 0.373436 0.470677 0 +42 -0.434135 0.935554 0 +43 1.29056 0.949589 0 +44 1.29708 -0.930942 0 +45 0.480133 -0.461242 0 +46 0.473435 0.471162 0 +47 -1.30547 2.43847 0 +48 -0.490123 1.96675 0 +49 -0.484249 1.02209 0 +50 -1.30652 0.551297 0 +51 -0.384247 1.02222 0 +52 0.423016 0.557521 0 +53 1.24029 1.03603 0 +54 1.23862 1.97033 0 +55 0.43196 2.43705 0 +56 -0.390121 1.96679 0 +57 1.33862 1.97043 0 +58 1.34029 1.03635 0 +59 -1.35516 2.52525 0 +60 -0.440161 2.05337 0 +61 0.38198 2.52366 0 +62 -1.25516 2.52489 0 +63 1.28854 2.05698 0 +64 0.481981 2.52364 0 +65 -1.29839 -3 0 +66 -1.73205 -2.24611 0 +67 -1.34839 -3 0 +68 -1.73205 -2.30377 0 +69 0.433432 -3 0 +70 0.383432 -3 0 +71 -1.24839 -3 0 +72 1.73205 -2.24234 0 +73 0.483432 -3 0 +74 1.73205 -2.29983 0 +75 -1.73205 -0.7465850000000001 0 +76 -1.73205 -2.18844 0 +77 -1.73205 -0.804643 0 +78 1.73205 -0.738664 0 +79 1.73205 -2.18484 0 +80 1.73205 -0.796331 0 +81 -1.73205 0.744246 0 +82 -1.73205 -0.688527 0 +83 -1.73205 0.686196 0 +84 1.73205 0.753282 0 +85 1.73205 0.695598 0 +86 1.73205 -0.680997 0 +87 -1.73205 2.25014 0 +88 -1.73205 2.19242 0 +89 -1.73205 0.802296 0 +90 1.73205 2.25644 0 +91 1.73205 2.19864 0 +92 1.73205 0.810966 0 +93 -1.30076 3 0 +94 -1.73205 2.30786 0 +95 -1.35076 3 0 +96 0.429982 3 0 +97 0.379981 3 0 +98 -1.25075 3 0 +99 1.73205 2.31425 0 +100 0.479982 3 0 +101 0.2617406000005067 -2.395270000000294 0 +102 0.08979220000104959 -2.29528000000061 0 +103 -0.08215619999900903 -2.195290000000576 0 +104 -0.2541045999995161 -2.095300000000281 0 +105 0.3477148000003136 -2.445265000000183 0 +106 0.1757664000006902 -2.345275000000401 0 +107 0.003818000001298005 -2.245285000000755 0 +108 -0.1681303999992432 -2.14529500000044 0 +109 -0.3400787999997973 -2.045305000000118 0 +110 -0.5720924999996617 -2.078259999999808 0 +111 -0.7181319999994114 -2.161209999999666 0 +112 -0.8641714999988419 -2.244159999999342 0 +113 -1.010210999999259 -2.327109999999579 0 +114 -1.156250499999807 -2.41005999999989 0 +115 -0.4990727499999725 -2.036784999999984 0 +116 -0.6451122499993905 -2.119734999999654 0 +117 -0.7911517499995393 -2.202684999999738 0 +118 -0.9371912499990606 -2.285634999999466 0 +119 -1.083230749999445 -2.368584999999685 0 +120 -1.229270250000084 -2.451535000000048 0 +121 0.2216700000003441 -2.4298120000002 0 +122 0.05966600000076372 -2.335604000000444 0 +123 -0.1023379999989917 -2.241396000000586 0 +124 -0.2643419999996064 -2.147188000000229 0 +125 0.3026720000002116 -2.476916000000123 0 +126 0.1406680000005917 -2.382708000000344 0 +127 -0.02133599999886432 -2.28850000000066 0 +128 -0.1833399999993148 -2.194292000000398 0 +129 -0.3453439999998723 -2.100084000000074 0 +130 -0.5914907999995056 -2.146781999999719 0 +131 -0.7566355999990066 -2.240583999999436 0 +132 -0.9217803999990083 -2.334385999999437 0 +133 -1.086925199999506 -2.428187999999719 0 +134 -0.5089183999997098 -2.099880999999835 0 +135 -0.6740631999992172 -2.193682999999555 0 +136 -0.8392079999987831 -2.287484999999309 0 +137 -1.004352799999414 -2.381286999999667 0 +138 -1.169497599999697 -2.475088999999828 0 +139 0.6061351999995477 -2.395162000000262 0 +140 0.7785813999989772 -2.295064000000594 0 +141 0.9510275999989332 -2.194966000000619 0 +142 1.123473799999488 -2.094868000000297 0 +143 0.5199120999997495 -2.445211000000145 0 +144 0.6923582999993572 -2.345113000000373 0 +145 0.8648044999986997 -2.245015000000755 0 +146 1.037250699999265 -2.144917000000427 0 +147 1.209696899999638 -2.04481900000021 0 +148 0.6461791999995798 -2.429732000000244 0 +149 0.8086843999989899 -2.335404000000586 0 +150 0.9711895999990137 -2.241076000000572 0 +151 1.133694799999454 -2.146748000000317 0 +152 0.5649265999998099 -2.476896000000111 0 +153 0.7274317999990101 -2.382568000000575 0 +154 0.8899369999989946 -2.288240000000584 0 +155 1.052442199998856 -2.193912000000664 0 +156 1.214947399999715 -2.099584000000165 0 +157 -1.163523833333612 -0.5809358333331756 0 +158 -1.016757666667448 -0.6641906666662237 0 +159 -0.8699915000011456 -0.7474454999993502 0 +160 -0.7232253333341392 -0.8307003333328762 0 +161 -0.576459166667053 -0.9139551666664476 0 +162 -1.236906916666869 -0.5393084166665519 0 +163 -1.090140750000474 -0.6225632499997309 0 +164 -0.9433745833342624 -0.7058180833328063 0 +165 -0.7966084166676223 -0.7890729166661246 0 +166 -0.6498422500006401 -0.8723277499996369 0 +167 -0.5030760833334934 -0.9555825833332425 0 +168 -0.4289650000000014 -1.196829999999619 0 +169 -0.4282370000000038 -1.396449999998951 0 +170 -0.4275090000000042 -1.596069999998838 0 +171 -0.4267810000000021 -1.79568999999942 0 +172 -0.4293290000000003 -1.097019999999916 0 +173 -0.4286010000000036 -1.296639999999025 0 +174 -0.4278730000000049 -1.49625999999866 0 +175 -0.4271450000000035 -1.695879999999026 0 +176 -0.4264170000000017 -1.895499999999534 0 +177 -0.6413571999996448 -2.060101999999798 0 +178 -0.8065553999990784 -2.153933999999476 0 +179 -0.971753599999147 -2.247765999999515 0 +180 -1.136951799999551 -2.341597999999745 0 +181 -0.5587580999997254 -2.013185999999844 0 +182 -0.7239562999993745 -2.107017999999645 0 +183 -0.8891544999988644 -2.200849999999355 0 +184 -1.054352699999221 -2.294681999999558 0 +185 -1.21955089999968 -2.388513999999819 0 +186 -1.14374940000046 -0.6496347999997393 0 +187 -0.9777088000009495 -0.7438235999994613 0 +188 -0.8116682000009527 -0.8380123999994595 0 +189 -0.6456276000004577 -0.9322011999997404 0 +190 -1.22676970000021 -0.602540399999881 0 +191 -1.060729100000771 -0.6967291999995623 0 +192 -0.8946885000012847 -0.7909179999992713 0 +193 -0.7286479000006921 -0.8851067999996073 0 +194 -0.5626073000002488 -0.9792955999998587 0 +195 -0.4789014000000019 -1.21436599999948 0 +196 -0.4782158000000035 -1.402341999999046 0 +197 -0.4775302000000032 -1.590317999999116 0 +198 -0.4768446000000019 -1.77829399999948 0 +199 -0.4792442000000008 -1.120377999999758 0 +200 -0.4785586000000028 -1.308353999999218 0 +201 -0.4778730000000045 -1.496329999998773 0 +202 -0.4771874000000024 -1.684305999999329 0 +203 -0.4765018000000017 -1.872281999999531 0 +204 1.296111666666666 -1.827077166667259 0 +205 1.296303333333332 -1.659384333334201 0 +206 1.296494999999998 -1.491691500001345 0 +207 1.296686666666665 -1.323998666667607 0 +208 1.296878333333333 -1.156305833333782 0 +209 1.296015833333333 -1.910923583333545 0 +210 1.296207499999999 -1.743230750000866 0 +211 1.296399166666665 -1.575537916667868 0 +212 1.296590833333332 -1.407845083334364 0 +213 1.296782499999999 -1.240152250000869 0 +214 1.296974166666666 -1.072459416666834 0 +215 1.123724000000403 -0.8889482000002316 0 +216 0.9503780000009385 -0.7892834000005395 0 +217 0.7770320000009363 -0.6896186000005384 0 +218 0.6036860000004607 -0.5899538000002649 0 +219 1.210397000000103 -0.938780600000059 0 +220 1.037051000000673 -0.8391158000003872 0 +221 0.8637050000011058 -0.7394510000006358 0 +222 0.6903590000005769 -0.6397862000003317 0 +223 0.5170130000002944 -0.5401214000001693 0 +224 0.2583334000003545 -0.591673199999791 0 +225 0.08632680000090776 -0.6930573999994649 0 +226 -0.08567979999913095 -0.7944415999994878 0 +227 -0.2576863999995271 -0.8958257999997212 0 +228 0.3443367000001515 -0.5409810999999107 0 +229 0.1723301000005171 -0.6423652999996952 0 +230 0.0003235000011100331 -0.7437494999993457 0 +231 -0.1716830999991698 -0.8451336999995107 0 +232 -0.3436896999998096 -0.9465178999998878 0 +233 -0.2141840000004024 -2.060677999999766 0 +234 -0.05221000000090797 -2.154865999999472 0 +235 0.1097639999992526 -2.249053999999565 0 +236 0.2717379999995418 -2.343241999999734 0 +237 -0.2951710000000674 -2.013583999999961 0 +238 -0.1331970000006161 -2.107771999999642 0 +239 0.02877699999896488 -2.201959999999398 0 +240 0.1907509999993289 -2.29614799999961 0 +241 0.3527249999997172 -2.390335999999836 0 +242 0.5961595999996265 -2.343136000000217 0 +243 0.7586071999991447 -2.248842000000496 0 +244 0.9210547999990564 -2.154548000000548 0 +245 1.083502399999468 -2.060254000000309 0 +246 0.5149357999997706 -2.390283000000133 0 +247 0.6773833999993335 -2.295989000000387 0 +248 0.8398309999988927 -2.201695000000643 0 +249 1.002278599999023 -2.107401000000567 0 +250 1.164726199999887 -2.013107000000065 0 +251 1.246167999999999 -1.776272000000373 0 +252 1.246385999999999 -1.586584000001015 0 +253 1.246603999999999 -1.396896000001058 0 +254 1.246821999999999 -1.207208000000642 0 +255 1.246059 -1.871116000000107 0 +256 1.246276999999999 -1.681428000000697 0 +257 1.246494999999998 -1.491740000001335 0 +258 1.246712999999999 -1.302052000000787 0 +259 1.246930999999999 -1.112364000000535 0 +260 1.083762600000354 -0.9236448000002033 0 +261 0.9204852000008423 -0.8297696000004843 0 +262 0.7572078000008797 -0.7358944000005058 0 +263 0.5939304000004003 -0.6420192000002302 0 +264 1.165401300000228 -0.9705824000001311 0 +265 1.002123900000633 -0.8767072000003641 0 +266 0.8388465000011727 -0.7828320000006742 0 +267 0.6755691000006473 -0.6889568000003722 0 +268 0.5122917000001693 -0.5950816000000974 0 +269 0.2686046000003327 -0.6436591999998038 0 +270 0.1065562000007608 -0.7391743999995515 0 +271 -0.05549219999926291 -0.8346895999995655 0 +272 -0.2175405999996726 -0.930204799999807 0 +273 0.3496288000001164 -0.5959015999999313 0 +274 0.1875804000005268 -0.6914167999996894 0 +275 0.02553200000098327 -0.7869319999994204 0 +276 -0.1365163999994978 -0.8824471999997039 0 +277 -0.2985647999999007 -0.9779623999999414 0 +278 -0.3789028000000018 -1.213873999999505 0 +279 -0.3782166000000038 -1.402027999998968 0 +280 -0.3775304000000037 -1.590181999998977 0 +281 -0.3768442000000018 -1.778335999999515 0 +282 -0.3792459000000004 -1.119796999999907 0 +283 -0.3785597000000035 -1.307950999999038 0 +284 -0.3778735000000051 -1.496104999998601 0 +285 -0.3771873000000032 -1.684258999999134 0 +286 -0.3765011000000003 -1.872412999999934 0 +287 1.346822000000001 -1.207191999999462 0 +288 1.346604000000001 -1.396813999999002 0 +289 1.346386000000001 -1.58643599999882 0 +290 1.346168 -1.776057999999661 0 +291 1.346931 -1.112380999999806 0 +292 1.346713000000001 -1.302002999999269 0 +293 1.346495000000002 -1.491624999998559 0 +294 1.346277000000001 -1.681246999999187 0 +295 1.346059 -1.870868999999692 0 +296 -1.309610000000001 -0.2994514000004558 0 +297 -1.308930000000003 -0.1012218000010374 0 +298 -1.308250000000004 0.09700779999894921 0 +299 -1.307570000000002 0.2952373999994536 0 +300 -1.309950000000001 -0.3985662000002135 0 +301 -1.309270000000003 -0.2003366000007274 0 +302 -1.308590000000005 -0.002107000001322079 0 +303 -1.307910000000003 0.1961225999991712 0 +304 -1.307230000000001 0.3943521999997265 0 +305 -1.359550000000001 -0.2822650000003964 0 +306 -1.358910000000003 -0.09545700000093416 0 +307 -1.358270000000003 0.09135099999902924 0 +308 -1.357630000000001 0.2781589999995385 0 +309 -1.359870000000001 -0.3756690000001458 0 +310 -1.359230000000002 -0.1888610000006493 0 +311 -1.358590000000004 -0.002053000001253413 0 +312 -1.357950000000002 0.1847549999992474 0 +313 -1.357310000000001 0.3715629999997176 0 +314 0.4289178000000032 -0.2922900000004383 0 +315 0.4274956000000071 -0.09429100000098489 0 +316 0.426073400000007 0.1037079999990236 0 +317 0.4246512000000038 0.3017069999994788 0 +318 0.4296289000000014 -0.3912895000001931 0 +319 0.4282067000000051 -0.1932905000007087 0 +320 0.4267845000000091 0.004708499998738291 0 +321 0.4253623000000051 0.2027074999992873 0 +322 0.4239401000000021 0.400706499999709 0 +323 0.2517696000003449 0.5984063999998015 0 +324 0.08031020000082029 0.6971067999995277 0 +325 -0.09114919999917231 0.7958071999995235 0 +326 -0.2626085999995685 0.8945075999997516 0 +327 0.3374993000001074 0.5490561999999382 0 +328 0.1660399000005793 0.6477565999996666 0 +329 -0.005419499998925215 0.7464569999993813 0 +330 -0.1768788999992599 0.845157399999574 0 +331 -0.3483382999998331 0.9438577999999038 0 +332 -0.5795383333330741 0.9099178333334816 0 +333 -0.7250086666660599 0.826627666667014 0 +334 -0.8704789999988117 0.7433375000006803 0 +335 -1.015949333332312 0.6600473333339182 0 +336 -1.161419666665957 0.5767571666670732 0 +337 -0.5068031666664957 0.9515629166667645 0 +338 -0.6522734999995895 0.868272750000235 0 +339 -0.7977438333324283 0.7849825833338515 0 +340 -0.9432141666655712 0.7016924166672939 0 +341 -1.088684499999114 0.6184022500005073 0 +342 -1.234154833332914 0.5351120833335732 0 +343 -1.257629999999998 0.2778144000004442 0 +344 -1.258269999999997 0.09120680000098413 0 +345 -1.258909999999997 -0.09540079999902884 0 +346 -1.259549999999998 -0.28200839999948 0 +347 -1.257309999999999 0.3711182000001887 0 +348 -1.257949999999998 0.1845106000006995 0 +349 -1.258589999999996 -0.00209699999874996 0 +350 -1.259229999999997 -0.1887045999992452 0 +351 -1.259869999999999 -0.37531219999979 0 +352 -1.094186600000462 -0.5627835999997381 0 +353 -0.9281832000008267 -0.656951199999531 0 +354 -0.7621798000008679 -0.7511187999995077 0 +355 -0.5961764000004575 -0.8452863999997404 0 +356 -1.177188300000175 -0.5156997999999006 0 +357 -1.011184900000701 -0.6098673999996025 0 +358 -0.8451815000010989 -0.7040349999993766 0 +359 -0.6791781000007289 -0.7982025999995865 0 +360 -0.5131747000002347 -0.8923701999998669 0 +361 -0.2681116000003194 -0.8439316000001883 0 +362 -0.1060502000007919 -0.7484092000004667 0 +363 0.05601119999918208 -0.6528868000004822 0 +364 0.2180725999995596 -0.5573644000002596 0 +365 -0.3491423000001385 -0.8916928000000817 0 +366 -0.1870809000005841 -0.7961704000003442 0 +367 -0.02501950000107384 -0.700648000000633 0 +368 0.1370418999994072 -0.6051256000003494 0 +369 0.2991032999997638 -0.5096032000001391 0 +370 0.378794400000003 -0.2753382000004147 0 +371 0.3774548000000071 -0.08883440000098908 0 +372 0.3761152000000075 0.09766939999895818 0 +373 0.3747756000000036 0.2841731999995002 0 +374 0.3794642000000015 -0.3685901000001985 0 +375 0.378124600000005 -0.1820863000006868 0 +376 0.3767850000000096 0.004417499998663921 0 +377 0.3754454000000055 0.1909212999992295 0 +378 0.3741058000000018 0.3774250999997502 0 +379 0.2119218000003893 0.5636523999997759 0 +380 0.05040760000086258 0.6566277999995035 0 +381 -0.1111065999991659 0.7496031999995199 0 +382 -0.2726207999996515 0.8425785999997993 0 +383 0.2926789000001565 0.5171646999999099 0 +384 0.1311647000006118 0.6101400999996478 0 +385 -0.03034949999893416 0.7031154999993865 0 +386 -0.1918636999993593 0.7960908999996312 0 +387 -0.3533778999998957 0.8890662999999399 0 +388 -0.5987059999996671 0.8413276000001906 0 +389 -0.7632769999991642 0.7471012000004786 0 +390 -0.9278479999991288 0.6528748000004989 0 +391 -1.092418999999577 0.5586484000002422 0 +392 -0.5164204999998416 0.8884408000000907 0 +393 -0.680991499999531 0.7942144000002685 0 +394 -0.8455624999989951 0.6999880000005754 0 +395 -1.010133499999459 0.6057616000003099 0 +396 -1.17470449999969 0.5115352000001774 0 +397 0.5677474999996993 0.5843216666664905 0 +398 0.7122659999992536 0.6689373333328963 0 +399 0.8567844999988043 0.7535529999992999 0 +400 1.001302999999091 0.8381686666661348 0 +401 1.145821499999541 0.9227843333330648 0 +402 0.4954882499998502 0.5420138333332456 0 +403 0.6400067499994418 0.6266294999996732 0 +404 0.784525249999044 0.711245166666107 0 +405 0.9290437499989734 0.7958608333327323 0 +406 1.073562249999164 0.8804764999995108 0 +407 1.218080749999648 0.9650921666664605 0 +408 1.133690600000383 -0.8370020000002205 0 +409 0.9703012000008321 -0.7430620000004784 0 +410 0.8069118000008286 -0.6491220000004765 0 +411 0.6435224000004495 -0.5551820000002585 0 +412 1.215385300000258 -0.8839720000001483 0 +413 1.051995900000637 -0.7900320000003661 0 +414 0.8886065000010842 -0.6960920000006234 0 +415 0.7252171000006745 -0.6021520000003878 0 +416 0.5618277000002018 -0.508212000000116 0 +417 0.4787934000000027 -0.274761200000379 0 +418 0.4774538000000069 -0.08828040000096793 0 +419 0.4761142000000074 0.09820039999897273 0 +420 0.4747746000000038 0.284681199999474 0 +421 0.479463200000001 -0.3680016000001445 0 +422 0.4781236000000049 -0.1815208000006887 0 +423 0.4767840000000083 0.004959999998843778 0 +424 0.475444400000006 0.1914407999991625 0 +425 0.4741048000000017 0.3779215999997674 0 +426 0.6368599999996709 0.5668473999998074 0 +427 0.8002849999991627 0.6625327999995098 0 +428 0.9637099999991461 0.7582181999995001 0 +429 1.127134999999561 0.8539035999997431 0 +430 0.5551474999999615 0.5190046999999774 0 +431 0.718572499999459 0.6146900999996834 0 +432 0.8819974999989644 0.7103754999993938 0 +433 1.04542249999939 0.8060608999996428 0 +434 1.208847499999675 0.9017462999998097 0 +435 -1.132404400000324 2.396106000000187 0 +436 -0.9593788000010182 2.296002000000589 0 +437 -0.7863532000009199 2.195898000000532 0 +438 -0.6133276000004453 2.095794000000258 0 +439 -1.218917200000233 2.446158000000135 0 +440 -1.04589160000081 2.346054000000469 0 +441 -0.8728660000012134 2.245950000000702 0 +442 -0.6998404000007696 2.145846000000445 0 +443 -0.5268148000002677 2.045742000000155 0 +444 -0.4392630000000022 1.828609666667013 0 +445 -0.4382240000000052 1.661529333334157 0 +446 -0.4371850000000084 1.494449000001344 0 +447 -0.4361460000000053 1.327368666667519 0 +448 -0.4351070000000028 1.160288333333781 0 +449 -0.4397825000000006 1.912149833333421 0 +450 -0.4387435000000037 1.745069500000596 0 +451 -0.4377045000000073 1.577989166667835 0 +452 -0.4366655000000071 1.410908833334472 0 +453 -0.4356265000000042 1.24382850000068 0 +454 -0.4345875000000002 1.076748166666696 0 +455 -1.14240060000035 2.344126000000203 0 +456 -0.9793312000007781 2.24978200000045 0 +457 -0.8162618000008449 2.155438000000489 0 +458 -0.6531924000003521 2.061094000000204 0 +459 -1.223935300000175 2.391298000000101 0 +460 -1.060865900000678 2.296954000000392 0 +461 -0.8977965000010258 2.202610000000594 0 +462 -0.7347271000006866 2.108266000000397 0 +463 -0.5716577000000673 2.013922000000039 0 +464 -0.4889482000000018 1.777818000000295 0 +465 -0.4877734000000052 1.58888600000085 0 +466 -0.4865986000000065 1.399954000001058 0 +467 -0.4854238000000031 1.211022000000503 0 +468 -0.4895356000000011 1.87228400000018 0 +469 -0.4883608000000035 1.683352000000572 0 +470 -0.4871860000000087 1.494420000001407 0 +471 -0.4860112000000039 1.305488000000631 0 +472 -0.4848364000000002 1.116556000000031 0 +473 -0.6487031999994304 0.927931400000326 0 +474 -0.8131573999989385 0.8337728000006077 0 +475 -0.9776115999991215 0.739614200000503 0 +476 -1.142065799999215 0.6454556000004493 0 +477 -0.5664760999997429 0.9750107000001471 0 +478 -0.7309302999991596 0.8808521000004812 0 +479 -0.895384499998803 0.7866935000006853 0 +480 -1.059838699999129 0.6925349000004988 0 +481 -1.224292899999702 0.5983763000001703 0 +482 1.289986000000001 1.205759999999427 0 +483 1.289632000000002 1.404119999998942 0 +484 1.289278000000002 1.602479999998837 0 +485 1.288924000000001 1.800839999999461 0 +486 1.290163000000001 1.106579999999695 0 +487 1.289809000000002 1.304939999999196 0 +488 1.289455000000002 1.503299999998615 0 +489 1.289101000000002 1.701659999999081 0 +490 1.288747000000001 1.900019999999532 0 +491 1.117276400000445 2.098305999999742 0 +492 0.9459828000008056 2.197411999999534 0 +493 0.7746892000009715 2.296517999999438 0 +494 0.6033956000005313 2.395623999999693 0 +495 1.202923199999927 2.048753000000042 0 +496 1.031629600000634 2.147858999999633 0 +497 0.8603360000011731 2.246964999999321 0 +498 0.6890424000006479 2.346070999999625 0 +499 0.5177488000003155 2.445176999999818 0 +500 0.2867013333335277 2.411556666666778 0 +501 0.141300666667303 2.328383333333697 0 +502 -0.004099999998913306 2.245210000000622 0 +503 -0.1495006666659581 2.162036666667072 0 +504 -0.2949013333329749 2.078863333333538 0 +505 0.3594016666669086 2.453143333333472 0 +506 0.2140010000004658 2.369970000000266 0 +507 0.0686003333340936 2.286796666667102 0 +508 -0.07680033333243452 2.203623333333848 0 +509 -0.2222009999993874 2.12045000000035 0 +510 -0.3676016666665382 2.03727666666674 0 +511 -0.222794400000406 0.9292802000002336 0 +512 -0.06134180000084993 0.8363404000004893 0 +513 0.1001107999991452 0.743400600000492 0 +514 0.2615633999995667 0.6504608000002494 0 +515 -0.3035207000001107 0.9757501000000637 0 +516 -0.1420681000006141 0.8828103000003534 0 +517 0.01938449999884295 0.7898705000006661 0 +518 0.1808370999994218 0.6969307000003329 0 +519 0.3422896999997043 0.6039909000001702 0 +520 0.5864707999996374 0.6532227999997877 0 +521 0.7499255999991481 0.7489245999995013 0 +522 0.9133803999991514 0.8446263999995032 0 +523 1.076835199999618 0.9403281999997763 0 +524 0.5047433999998336 0.6053718999999027 0 +525 0.6681981999994744 0.7010736999996923 0 +526 0.8316529999989073 0.7967754999993604 0 +527 0.9951077999993927 0.8924772999996444 0 +528 1.158562599999782 0.9881790999998722 0 +529 1.239956000000001 1.22288999999954 0 +530 1.239622000000002 1.409749999999028 0 +531 1.239288000000002 1.596609999998968 0 +532 1.238954000000001 1.783469999999497 0 +533 1.240123 1.129459999999852 0 +534 1.239789000000002 1.31631999999885 0 +535 1.239455000000002 1.503179999998615 0 +536 1.239121000000001 1.690039999999165 0 +537 1.238787000000001 1.876899999999583 0 +538 1.077288000000356 2.063673999999794 0 +539 0.9159560000008775 2.157017999999492 0 +540 0.7546240000009659 2.250361999999441 0 +541 0.5932920000004215 2.343705999999756 0 +542 1.157954000000244 2.017001999999859 0 +543 0.9966220000005874 2.11034599999966 0 +544 0.8352900000010258 2.203689999999407 0 +545 0.6739580000006455 2.297033999999627 0 +546 0.5126260000001344 2.390377999999922 0 +547 0.2675438000002852 2.342998000000163 0 +548 0.1031276000007084 2.248946000000406 0 +549 -0.06128859999903391 2.154894000000553 0 +550 -0.2257047999994377 2.060842000000322 0 +551 0.3497519000000808 2.390024000000047 0 +552 0.1853357000005199 2.295972000000297 0 +553 0.02091950000109455 2.201920000000626 0 +554 -0.1434966999991159 2.107868000000506 0 +555 -0.3079128999995635 2.01381600000025 0 +556 -0.3889462000000029 1.77787600000046 0 +557 -0.3877714000000044 1.588962000000703 0 +558 -0.3865966000000068 1.400048000001094 0 +559 -0.385421800000003 1.211134000000477 0 +560 -0.3895336000000011 1.872333000000189 0 +561 -0.3883588000000041 1.683419000000656 0 +562 -0.387184000000007 1.494505000001118 0 +563 -0.3860092000000049 1.305591000000785 0 +564 -0.384834400000001 1.116677000000165 0 +565 1.339956000000001 1.223165999999531 0 +566 1.339622000000001 1.409981999999141 0 +567 1.339288000000002 1.596797999998985 0 +568 1.338954000000001 1.783613999999532 0 +569 1.340123 1.129757999999829 0 +570 1.339789000000001 1.316573999999551 0 +571 1.339455000000002 1.503389999999002 0 +572 1.339121000000002 1.690205999999117 0 +573 1.338787 1.877021999999888 0 +574 -0.2757328000003022 2.147427999999827 0 +575 -0.1113046000005742 2.241485999999671 0 +576 0.05312359999944882 2.335543999999685 0 +577 0.2175517999996784 2.429601999999816 0 +578 -0.3579469000001792 2.100398999999898 0 +579 -0.193518700000555 2.194456999999683 0 +580 -0.0290905000007855 2.288514999999551 0 +581 0.1353376999997372 2.38257299999985 0 +582 0.2997658999997973 2.476630999999884 0 +583 -1.092160200000161 2.430586000000093 0 +584 -0.9291604000006964 2.336282000000403 0 +585 -0.7661606000008094 2.241978000000469 0 +586 -0.6031608000001131 2.147674000000066 0 +587 -1.173660100000123 2.477738000000071 0 +588 -1.010660300000514 2.383434000000297 0 +589 -0.8476605000009279 2.289130000000537 0 +590 -0.6846607000005083 2.194826000000294 0 +591 -0.5216608999999657 2.10052199999998 0 +592 0.6432927999995659 2.430308000000251 0 +593 0.804604599999182 2.336976000000473 0 +594 0.9659163999993696 2.243644000000365 0 +595 1.127228199999689 2.15031200000018 0 +596 0.562636899999748 2.476974000000146 0 +597 0.7239486999995017 2.383642000000288 0 +598 0.8852604999990195 2.290310000000567 0 +599 1.046572299999645 2.196978000000205 0 +600 1.207884100000034 2.10364599999998 0 +601 -1.299689999999997 -2.831003333333766 0 +602 -1.300989999999998 -2.662006666666928 0 +603 -1.299039999999998 -2.915501666666881 0 +604 -1.300339999999998 -2.746505000000315 0 +605 -1.301640000000002 -2.577508333333058 0 +606 -1.445543333333042 -2.410710000000167 0 +607 -1.588796666666437 -2.328410000000131 0 +608 -1.373916666666599 -2.451860000000039 0 +609 -1.517169999999596 -2.369560000000232 0 +610 -1.660423333332712 -2.287260000000356 0 +611 -1.349616666666662 -2.840693333333883 0 +612 -1.350843333333331 -2.681386666666985 0 +613 -1.349003333333332 -2.920346666666785 0 +614 -1.350229999999992 -2.761040000001018 0 +615 -1.351456666666668 -2.601733333333213 0 +616 -1.478729999999704 -2.44931000000017 0 +617 -1.605389999999592 -2.376540000000234 0 +618 -1.415399999999631 -2.485695000000212 0 +619 -1.542059999999521 -2.412925000000275 0 +620 -1.668719999999505 -2.340155000000284 0 +621 -1.73205 -2.27494 0 +622 -1.32339 -3 0 +623 0.4335176666666665 -2.831753333333536 0 +624 0.4336033333333331 -2.663506666667158 0 +625 0.4334748333333335 -2.915876666666243 0 +626 0.4335604999999997 -2.747630000000479 0 +627 0.4336461666666667 -2.579383333333238 0 +628 0.3835126666666665 -2.841340000000347 0 +629 0.3835933333333331 -2.68268000000052 0 +630 0.3834723333333331 -2.920670000000511 0 +631 0.3835529999999995 -2.762010000000886 0 +632 0.3836336666666666 -2.603350000000122 0 +633 -1.250843333333336 -2.681326666666291 0 +634 -1.249616666666671 -2.840663333332842 0 +635 -1.251456666666666 -2.601658333333484 0 +636 -1.250230000000004 -2.760994999999486 0 +637 -1.249003333333334 -2.920331666666538 0 +638 -1.273390000000304 -3 0 +639 0.408432 -3 0 +640 1.441296666666229 -2.077293333333085 0 +641 1.586673333332937 -2.159816666666442 0 +642 1.368608333333165 -2.036031666666571 0 +643 1.513984999998969 -2.118554999999414 0 +644 1.659361666666792 -2.201078333333404 0 +645 0.4835126666666665 -2.841353333333565 0 +646 0.4835933333333333 -2.682706666666638 0 +647 0.4834723333333337 -2.920676666665895 0 +648 0.483553 -2.762030000000101 0 +649 0.4836336666666662 -2.603383333334161 0 +650 1.441483333333013 -2.134889999999818 0 +651 1.586766666666436 -2.217359999999869 0 +652 1.368841666666741 -2.093655000000042 0 +653 1.514124999999109 -2.176124999999494 0 +654 1.6594083333328 -2.258594999999697 0 +655 1.73205 -2.271085 0 +656 0.458432 -3 0 +657 -1.591463333333613 -0.6636170000001651 0 +658 -1.450876666667019 -0.580649000000208 0 +659 -1.661756666666684 -0.70510100000001 0 +660 -1.521170000000608 -0.6221330000003589 0 +661 -1.380583333333791 -0.5391650000002702 0 +662 -1.445449999999546 -2.353100000000261 0 +663 -1.588749999999783 -2.270770000000125 0 +664 -1.373800000000051 -2.394264999999971 0 +665 -1.517099999999425 -2.31193500000033 0 +666 -1.660399999999997 -2.229605000000002 0 +667 -1.591296666667062 -0.7215773333335669 0 +668 -1.450543333333839 -0.638511666666965 0 +669 -1.661673333333439 -0.7631101666667289 0 +670 -1.520920000000844 -0.680044500000498 0 +671 -1.380166666667028 -0.5969788333335464 0 +672 -1.73205 -2.217275 0 +673 -1.73205 -0.775614 0 +674 1.58705666666699 -0.8219803333331474 0 +675 1.44206333333357 -0.9052966666665306 0 +676 1.659553333333565 -0.7803221666665338 0 +677 1.514560000000426 -0.8636384999997554 0 +678 1.369566666666831 -0.946954833333239 0 +679 1.474649999999399 -2.038733333332992 0 +680 1.603349999999578 -2.111786666666427 0 +681 1.410299999999861 -2.002206666666588 0 +682 1.538999999999087 -2.075259999999482 0 +683 1.66770000000001 -2.148313333333339 0 +684 1.603713333333591 -0.8700773333331852 0 +685 1.475376666666877 -0.9438236666665462 0 +686 1.667881666666953 -0.8332041666665021 0 +687 1.539545000000337 -0.9069504999998063 0 +688 1.411208333333489 -0.9806968333332442 0 +689 1.73205 -2.21359 0 +690 1.73205 -0.7674975000002331 0 +691 -1.448609999999712 0.57705999999983 0 +692 -1.590329999999591 0.6606529999997586 0 +693 -1.377749999999877 0.5352634999999274 0 +694 -1.519469999999313 0.6188564999995945 0 +695 -1.661189999999916 0.7024494999999502 0 +696 -1.608096666666945 -0.6153756666668305 0 +697 -1.484143333333629 -0.5422243333335081 0 +698 -1.670073333333505 -0.6519513333334346 0 +699 -1.546120000000417 -0.578800000000246 0 +700 -1.422166666666928 -0.5056486666668208 0 +701 -1.482009999999716 0.5387099999998327 0 +702 -1.60702999999959 0.6124529999997579 0 +703 -1.41949999999985 0.5018384999999116 0 +704 -1.544519999999573 0.5755814999997484 0 +705 -1.669539999999661 0.6493244999997997 0 +706 -1.73205 0.7152210000002074 0 +707 -1.73205 -0.7175560000000001 0 +708 1.437576666665968 0.9226940000004024 0 +709 1.584813333332832 0.8379880000002887 0 +710 1.363958333333036 0.965047000000171 0 +711 1.511194999999127 0.8803410000005025 0 +712 1.658431666666422 0.7956350000001409 0 +713 1.437723333332889 0.8649253333335891 0 +714 1.584886666666206 0.7802616666669315 0 +715 1.364141666666628 0.9072571666666888 0 +716 1.511304999999379 0.8225935000003572 0 +717 1.65846833333334 0.7379298333333295 0 +718 1.587060000000289 -0.7643119999998338 0 +719 1.442070000000448 -0.8476269999997427 0 +720 1.659554999999965 -0.7226545000000201 0 +721 1.51456500000047 -0.8059694999997301 0 +722 1.369574999999969 -0.8892845000000178 0 +723 1.73205 0.7244400000000463 0 +724 1.73205 -0.7098304999997669 0 +725 -1.589843333333876 2.33216333333302 0 +726 -1.447636666667087 2.414186666666424 0 +727 -1.660946666666911 2.291151666666526 0 +728 -1.518740000000687 2.373174999999604 0 +729 -1.37653333333345 2.455198333333266 0 +730 -1.589856666667181 2.27443666666637 0 +731 -1.447663333333816 2.356453333333055 0 +732 -1.660953333333707 2.233428333333118 0 +733 -1.518760000000609 2.315444999999649 0 +734 -1.376566666666504 2.397461666666761 0 +735 -1.448363333333023 0.6349633333331502 0 +736 -1.590206666666479 0.7186296666665559 0 +737 -1.37744166666644 0.5931301666665331 0 +738 -1.519284999999669 0.6767964999998048 0 +739 -1.66112833333311 0.7604628333332017 0 +740 -1.73205 0.7732709999999999 0 +741 -1.73205 2.22128 0 +742 1.436396666666256 2.084946666666428 0 +743 1.584223333332777 2.170693333333011 0 +744 1.362483333333141 2.042073333333222 0 +745 1.510309999999077 2.127819999999465 0 +746 1.658136666666486 2.213566666666562 0 +747 1.469763333333083 2.046499999999855 0 +748 1.600906666666422 2.122569999999858 0 +749 1.404191666666621 2.008464999999974 0 +750 1.535334999999387 2.084534999999644 0 +751 1.666478333333245 2.160604999999949 0 +752 1.601463333333672 0.8860939999998051 0 +753 1.470876666667034 0.961221999999789 0 +754 1.666756666666449 0.848530000000125 0 +755 1.536170000000485 0.923657999999721 0 +756 1.405583333333372 0.9987859999999782 0 +757 1.73205 2.22754 0 +758 1.73205 0.782124 0 +759 -1.303873333333333 2.664140000000058 0 +760 -1.30231666666667 2.832069999999596 0 +761 -1.304651666666671 2.580174999999554 0 +762 -1.303094999999999 2.74810500000014 0 +763 -1.301538333333336 2.916034999999735 0 +764 -1.606420000000397 2.380323333333104 0 +765 -1.480790000000114 2.452786666666601 0 +766 -1.669235000000029 2.34409166666665 0 +767 -1.543605000000387 2.416554999999776 0 +768 -1.417975000000061 2.489018333333298 0 +769 -1.353693333333336 2.683499999999681 0 +770 -1.352226666666667 2.841749999999972 0 +771 -1.354426666666668 2.604374999999838 0 +772 -1.352960000000006 2.762624999999376 0 +773 -1.351493333333331 2.920875000000191 0 +774 -1.32576 3 0 +775 -1.73205 2.279 0 +776 0.431395333333335 2.663153333332929 0 +777 0.4306886666666686 2.831576666666204 0 +778 0.4317486666666691 2.578941666666083 0 +779 0.4310420000000016 2.747364999999613 0 +780 0.430335333333333 2.915788333333422 0 +781 0.3813136666666687 2.682439999999509 0 +782 0.3806473333333347 2.841219999999682 0 +783 0.3816468333333326 2.603050000000168 0 +784 0.3809805000000007 2.761829999999844 0 +785 0.3803141666666668 2.920609999999979 0 +786 -1.25222 2.841630000000029 0 +787 -1.253689999999997 2.683260000000318 0 +788 -1.251484999999996 2.920815000000403 0 +789 -1.252955000000002 2.762444999999787 0 +790 -1.254424999999996 2.604075000000448 0 +791 0.4049815000001397 3 0 +792 -1.275755 3 0 +793 1.436376666666364 2.142736666666491 0 +794 1.584213333332902 2.228493333333083 0 +795 1.362458333333232 2.099858333333275 0 +796 1.510294999999549 2.185614999999738 0 +797 1.65813166666681 2.27137166666675 0 +798 0.4806483333333347 2.841213333333015 0 +799 0.4813146666666668 2.682426666666638 0 +800 0.4803151666666682 2.920606666666299 0 +801 0.4809814999999996 2.761820000000091 0 +802 0.4816478333333318 2.603033333333706 0 +803 1.73205 2.285345 0 +804 0.4549820000002051 3 0 +805 1.271754333333332 -1.265603333334124 0 +806 1.271645333333332 -1.360447333334332 0 +807 1.103743300000378 -0.9062965000002174 0 +808 1.185382000000201 -0.9532341000001158 0 +809 0.4337005 -2.466345 0 +810 0.5199235999997738 -2.416296000000131 0 +811 1.017264999999201 -2.127610000000464 0 +812 1.103488099999478 -2.077561000000303 0 +813 -0.4032268000000038 -1.399238999998959 0 +814 -0.402862800000004 -1.499048999998903 0 +815 1.270935 -1.980365 0 +816 1.271030833333333 -1.89651858333363 0 +817 0.3477263000002533 -2.416350000000147 0 +818 0.1807651000002957 -2.319261000000172 0 +819 0.2667393000000243 -2.369256000000014 0 +820 1.271344666666665 -1.622984166667608 0 +821 1.271235666666666 -1.717828166667287 0 +822 0.0138039000001218 -2.222172000000071 0 +823 0.09977810000015111 -2.272167000000088 0 +824 1.271549499999999 -1.444293750001201 0 +825 1.271440499999998 -1.53913775000118 0 +826 0.7685942999990609 -2.271953000000545 0 +827 0.8548173999990389 -2.221904000000558 0 +828 0.6011473999995871 -2.36914900000024 0 +829 0.6873704999993019 -2.319100000000405 0 +830 1.184711899999744 -2.030414000000149 0 +831 1.271139833333333 -1.801674583333816 0 +832 0.8537929000009091 -0.7625889000005226 0 +833 0.767119900000908 -0.712756500000522 0 +834 1.272055 -1.0030665 0 +835 0.09644150000083429 -0.7161158999995082 0 +836 0.1774657000006202 -0.6683582999996344 0 +837 -0.2376134999995999 -0.9130152999997641 0 +838 -0.1516101999994018 -0.8623231999996475 0 +839 0.6854812000006683 -0.6658189000003842 0 +840 0.5988082000004304 -0.6159865000002476 0 +841 0.2634690000003436 -0.6176661999997974 0 +842 0.3444932000001772 -0.5699085999998954 0 +843 -0.402176600000003 -1.687202999999176 0 +844 -0.401812600000002 -1.787012999999467 0 +845 -0.07058599999919693 -0.8145655999995267 0 +846 -0.401469500000001 -1.88108999999971 0 +847 -0.4011055 -1.9809 0 +848 0.01043820000081494 -0.7668079999995197 0 +849 0.9354316000008904 -0.8095265000005119 0 +850 1.017070300000646 -0.8564641000003714 0 +851 -0.315131299999758 -2.030895000000141 0 +852 -0.2341442999999592 -2.077989000000024 0 +853 -0.402519700000004 -1.593125999998907 0 +854 -0.4039339000000016 -1.205351999999562 0 +855 -0.4042770000000007 -1.111274999999809 0 +856 -0.4035699000000028 -1.305161999999228 0 +857 1.271850166666666 -1.181756916667212 0 +858 0.9360411999989948 -2.174757000000583 0 +859 1.271959166666666 -1.086912916666891 0 +860 -0.3186376999997635 -0.9607728999998606 0 +861 -0.1481700999997057 -2.127984000000171 0 +862 -0.0671830999999585 -2.175078000000024 0 +863 0.5171695000002303 -0.5690489000001324 0 +864 -0.404641 -1.011465 0 +865 0.4304965 -0.5192165 0 +866 -1.28524 -0.4831485 0 +867 -1.211856916666806 -0.5247759166665877 0 +868 0.4010943000000072 0.1006886999989909 0 +869 0.4017641000000071 0.007436799999017252 0 +870 0.3126028000001724 0.5345416999999008 0 +871 0.3983325 0.4851915 0 +872 -0.6597008666672983 -0.8379933666663083 0 +873 -0.5863177833337552 -0.879620783333094 0 +874 0.4004245000000053 0.1939405999992619 0 +875 0.3997134000000037 0.2929400999994895 0 +876 -0.8160856500010067 -0.7492821499994289 0 +877 -0.7427025666675036 -0.7909095666661919 0 +878 -0.01539819999917283 0.7233549999995238 0 +879 0.06535890000084144 0.6768672999995156 0 +880 -0.09586499999996143 -0.7714253999999773 0 +881 -0.009861699999942075 -0.7207332999999658 0 +882 0.4024752000000071 -0.09156270000098699 0 +883 -0.5033160833335265 -0.9267045833332238 0 +884 0.403145000000005 -0.1848146000006998 0 +885 0.1461160000006048 0.6303795999996518 0 +886 -1.054184166665945 0.6093478666670802 0 +887 -0.9718986666657203 0.6564610666672086 0 +888 -1.2826 0.2865258999999489 0 +889 -1.282280000000001 0.3798296999997268 0 +890 0.3990436000000019 0.3861919999997394 0 +891 -0.1011278999991691 0.7727051999995217 0 +892 -0.8991634999989703 0.6981061500005896 0 +893 -0.8168779999989879 0.7452193500005795 0 +894 -0.7441428333326121 0.7868644333337463 0 +895 -0.2628989999999233 -0.8698786999999548 0 +896 -0.1768956999997252 -0.819186599999838 0 +897 -1.28358 0.0008034999999601833 0 +898 -1.28326 0.09410729999996667 0 +899 -0.8990873500009862 -0.7021983499994406 0 +900 -1.128855216667036 -0.5718597166664569 0 +901 -1.055472133333955 -0.613487133332981 0 +902 -1.284900000000001 -0.3840337000002279 0 +903 -0.429933 -0.968332 0 +904 -0.3439296999997635 -0.9176398999998606 0 +905 -1.284240000000001 -0.1916151000002587 0 +906 -1.28458 -0.2907298999999679 0 +907 -0.9724704333341372 -0.6605709333328773 0 +908 0.3192337000001773 -0.5267575999998955 0 +909 0.405237 -0.4760655 0 +910 0.07116900000004492 -0.6729720999999735 0 +911 -1.282940000000001 0.1874110999996967 0 +912 -1.126919333332767 0.5677027833336576 0 +913 -0.5891221666663706 0.8756227166668361 0 +914 -0.506836666666537 0.9227359166667408 0 +915 -0.6618573333328635 0.8339776333336023 0 +916 -0.3483717999997842 0.9150307999998758 0 +917 -0.26761469999961 0.8685430999997754 0 +918 0.1521997000002337 -0.6252108999998622 0 +919 0.2382029999999571 -0.5745188000000252 0 +920 -0.4341015 0.9643809999999999 0 +921 -1.28194 0.4789445 0 +922 -1.209204833332978 0.5205895833335366 0 +923 0.2318457000003671 0.5810293999997886 0 +924 -0.1818849999994119 0.8191928999996614 0 +925 0.403856100000003 -0.2838141000004265 0 +926 0.4045259000000016 -0.3770660000002191 0 +927 -1.28392 -0.09831130000003313 0 +928 -0.3425111666664874 2.022826666666769 0 +929 -0.2603030666662063 2.06985266666693 0 +930 0.5176778000002656 2.416336999999847 0 +931 0.432031 2.46589 0 +932 1.264460000000002 1.500364999998955 0 +933 1.264283000000002 1.599544999998902 0 +934 0.4231225 0.5286135000000001 0 +935 0.4953817499998496 0.5709213333332452 0 +936 1.264627000000002 1.406934999998985 0 +937 1.264794000000001 1.313504999999241 0 +938 -0.1569717999997892 0.8625436999998786 0 +939 -0.07624550000001112 0.8160738000000064 0 +940 0.3373928000001725 0.5779636999999007 0 +941 0.2566664999999558 0.6244336000000255 0 +942 1.097282200000401 2.080989999999768 0 +943 1.177948200000223 2.034317999999871 0 +944 1.01163540000058 2.130542999999664 0 +945 0.8453226000009245 2.226767999999465 0 +946 0.9309694000008415 2.177214999999513 0 +947 -0.4141046000000025 1.803242833333737 0 +948 -0.413585100000004 1.719702666667309 0 +949 1.263772000000001 1.885584999999731 0 +950 1.263595 1.984765 0 +951 0.3593306666667638 2.424303333333389 0 +952 0.8850824499989779 0.7990896999994015 0 +953 0.8033550499989762 0.7512387999994006 0 +954 1.264971000000001 1.214324999999484 0 +955 1.265315 1.021715 0 +956 1.265138 1.120894999999714 0 +957 1.11132834999958 0.9315562666664206 0 +958 1.19305574999977 0.9794071666665324 0 +959 -0.1876027333326979 2.111439333333696 0 +960 -0.105394633332496 2.158465333333813 0 +961 0.004480799999986435 0.7696039000000078 0 +962 0.09021049999998274 0.7202537000000099 0 +963 -0.03269429999897361 2.200052000000587 0 +964 0.5771091499996683 0.6187722333331391 0 +965 1.264116000000002 1.692974999999167 0 +966 1.263939000000001 1.792154999999479 0 +967 0.5983438000004764 2.369664999999725 0 +968 -0.4129977000000048 1.62524566666743 0 +969 -0.4124782000000063 1.541705500001023 0 +970 0.6839906000006966 2.320111999999597 0 +971 0.9573416999991214 0.841397533332819 0 +972 0.04951380000089756 2.247078000000513 0 +973 -0.4107839000000041 1.269251333333998 0 +974 -0.4102644000000029 1.185711166667129 0 +975 -0.4146920000000011 1.897699833333507 0 +976 -0.4118908000000076 1.447248500001219 0 +977 -0.411371300000006 1.363708333334306 0 +978 0.7310957999992008 0.7089309666661988 0 +979 0.6493683999994455 0.661080066666342 0 +980 0.1709368000001935 0.6737837999998886 0 +981 -0.4091575 1.007714 0 +982 -0.3234277999997842 0.9583637999998758 0 +983 -0.2427014999999872 0.9118938999999926 0 +984 -0.4096770000000014 1.09125416666689 0 +985 0.2771225666669065 2.37727733333347 0 +986 0.7646566000009687 2.273439999999439 0 +987 0.1222141333340057 2.288664666667051 0 +988 1.039069099999355 0.8892484333329556 0 +989 0.2044222333337941 2.33569066666693 0 +990 -0.4152115 1.98124 0 +991 -1.32718 -2.507545 0 +992 -1.326529999999999 -2.592043333333464 0 +993 -1.597093333333015 -2.352475000000183 0 +994 -1.525466666666317 -2.393625000000201 0 +995 -1.324003333333331 -2.920346666666942 0 +996 -1.660423333333219 -2.316090000000066 0 +997 -1.324653333333329 -2.835848333333824 0 +998 -1.325266666666664 -2.756195000000376 0 +999 -1.325916666666664 -2.671696666666956 0 +1000 -1.398806666666521 -2.466395000000084 0 +1001 -1.462136666666373 -2.430010000000169 0 +1002 -0.8929759499989252 -2.289272999999389 0 +1003 -0.9659956999991339 -2.330747999999508 0 +1004 -0.8104035499989243 -2.242371999999389 0 +1005 0.3227073000002534 -2.459645000000148 0 +1006 0.2417053000004254 -2.412541000000247 0 +1007 -1.121587849999656 -2.419123999999805 0 +1008 -1.204160249999903 -2.466024999999945 0 +1009 -1.048568099999382 -2.377648999999649 0 +1010 0.1557311000006968 -2.362546000000405 0 +1011 -1.27718 -2.5075 0 +1012 0.4086815 -2.50964 0 +1013 -0.4261995 -2.024145 0 +1014 -0.340225299999758 -2.074140000000141 0 +1015 -1.275266666666667 -2.756165000000029 0 +1016 -1.274653333333334 -2.835833333333304 0 +1017 -1.275916666666667 -2.67166666666661 0 +1018 0.4085983333333331 -2.673093333333839 0 +1019 0.4085554999999998 -2.757216666667028 0 +1020 -0.4992192499998309 -2.065619999999904 0 +1021 -0.2592232999995613 -2.121244000000255 0 +1022 -0.09224709999900038 -2.218343000000581 0 +1023 -0.1732490999993077 -2.171239000000402 0 +1024 -1.276529999999999 -2.591998333333464 0 +1025 0.4085151666666665 -2.836546666666941 0 +1026 0.4084723333333332 -2.920670000000174 0 +1027 -1.274003333333335 -2.920331666666421 0 +1028 0.07472910000090666 -2.315442000000527 0 +1029 -0.6548113999994585 -2.153995999999692 0 +1030 -0.737383799999209 -2.200896999999551 0 +1031 -0.5817916499995837 -2.112520999999763 0 +1032 0.4086386666666665 -2.593763333333579 0 +1033 -0.01124509999912265 -2.26544700000051 0 +1034 0.5449045999997738 -2.459611000000131 0 +1035 0.6261571999995638 -2.412447000000253 0 +1036 0.4585151666666665 -2.83655333333355 0 +1037 0.4585554999999999 -2.757230000000087 0 +1038 0.4586815 -2.50966 0 +1039 1.514078333332975 -2.14735333333313 0 +1040 1.441389999999621 -2.106091666666452 0 +1041 1.659408333333218 -2.229849999999935 0 +1042 1.368748333333115 -2.064856666666543 0 +1043 1.29606 -2.023595 0 +1044 0.4584723333333333 -2.920676666666782 0 +1045 0.4585983333333332 -2.673106666666898 0 +1046 0.7123802999992785 -2.362398000000419 0 +1047 0.7936328999989836 -2.31523400000059 0 +1048 1.586719999999687 -2.188588333333156 0 +1049 1.128584299999471 -2.120808000000307 0 +1050 1.042361199999194 -2.170857000000468 0 +1051 0.4586386666666665 -2.593783333333579 0 +1052 1.209836899999744 -2.073644000000149 0 +1053 0.9611085999989735 -2.218021000000596 0 +1054 0.8798559999989615 -2.265185000000603 0 +1055 -0.4542760000000007 -1.111609999999809 0 +1056 -0.4539332000000016 -1.205597999999549 0 +1057 -0.9238501500010475 -0.7456345499994057 0 +1058 -0.8408298500010492 -0.7927289499994048 0 +1059 -1.660399999999892 -2.258440000000062 0 +1060 -1.58877333333311 -2.299590000000128 0 +1061 -1.450710000000429 -0.6095803333335865 0 +1062 -1.380333333333509 -0.568047500000104 0 +1063 -1.080253533333954 -0.6569127333329815 0 +1064 -0.9972332333341986 -0.7040071333328426 0 +1065 -0.8353634499989602 -2.19904699999941 0 +1066 -0.7623436999992449 -2.157571999999571 0 +1067 -1.517123333332992 -2.340755000000196 0 +1068 -1.445496666666294 -2.381905000000214 0 +1069 -0.4525196000000037 -1.593193999998977 0 +1070 -0.4528836000000035 -1.493383999999033 0 +1071 -0.451106 -1.98079 0 +1072 -0.451470000000001 -1.88097999999971 0 +1073 -0.9909822999992033 -2.287437999999547 0 +1074 -1.073581399999405 -2.334353999999662 0 +1075 -1.591380000000338 -0.692597166666866 0 +1076 -1.661673333333531 -0.7340811666667835 0 +1077 -0.6844264666672984 -0.8814507666663083 0 +1078 -0.6110433833337554 -0.923078183333094 0 +1079 -0.4535692000000028 -1.305407999999215 0 +1080 -0.4532264000000036 -1.399395999998998 0 +1081 -1.153636616667036 -0.6152853166664574 0 +1082 -0.9179625499989945 -2.245962999999429 0 +1083 -1.31004 -0.5265635 0 +1084 -1.146601149999679 -2.375828999999817 0 +1085 -1.229200249999904 -2.422744999999945 0 +1086 -1.30222 -2.46422 0 +1087 -1.373846666666521 -2.423070000000084 0 +1088 -0.6067248499996533 -2.069180999999803 0 +1089 -0.5241257499998309 -2.022264999999904 0 +1090 -0.5280230833335264 -0.9701725833332238 0 +1091 -0.45464 -1.0118 0 +1092 -0.767446766667546 -0.8343563666661679 0 +1093 -0.6797445999995281 -2.110655999999732 0 +1094 -1.236656916666806 -0.5681909166665877 0 +1095 -1.521003333333726 -0.6510643333335651 0 +1096 -0.451812800000002 -1.78699199999945 0 +1097 -0.452176800000003 -1.687181999999159 0 +1098 1.321959166666666 -1.086937916666891 0 +1099 1.321850166666667 -1.181748916666622 0 +1100 1.530661666666168 -2.099274999999717 0 +1101 1.457973333332814 -2.058013333333039 0 +1102 1.321139833333333 -1.80156758333346 0 +1103 1.321235666666666 -1.717721166666931 0 +1104 1.394551666666785 -0.9614333333332654 0 +1105 1.322055 -1.0030915 0 +1106 1.458720000000223 -0.9245601666665384 0 +1107 1.320935 -1.980225 0 +1108 1.321030833333333 -1.89637858333363 0 +1109 1.321754333333333 -1.265595333333534 0 +1110 1.659553333333495 -0.8091556666665737 0 +1111 1.595385000000291 -0.8460288333331663 0 +1112 1.531216666666933 -0.8829019999998468 0 +1113 1.595011666666258 -2.135801666666434 0 +1114 1.3215495 -1.444252750000174 0 +1115 1.3214405 -1.539063750000082 0 +1116 1.321645333333333 -1.360406333333305 0 +1117 1.321344666666667 -1.62291016666651 0 +1118 1.659361666666469 -2.172328333333221 0 +1119 1.393623333333115 -2.021486666666543 0 +1120 -1.333260000000003 0.09417939999898922 0 +1121 -1.333600000000003 -0.004935400001004092 0 +1122 -1.529486666666982 -0.5980123333335192 0 +1123 -1.467510000000324 -0.561436666666858 0 +1124 -1.59867999999959 0.6365529999997582 0 +1125 -1.527819999999651 0.594756499999794 0 +1126 -1.33194 0.479217 0 +1127 -1.402799999999856 0.521013499999915 0 +1128 -1.40553333333351 -0.524861000000104 0 +1129 -1.334900000000001 -0.3842622000002279 0 +1130 -1.334580000000001 -0.2908582000004261 0 +1131 -1.661189999999795 0.6734244999998793 0 +1132 -1.33524 -0.483377 0 +1133 -1.332600000000002 0.286698199999496 0 +1134 -1.332280000000001 0.3801021999997268 0 +1135 -1.599780000000279 -0.6394963333334978 0 +1136 -1.465309999999714 0.5578849999998314 0 +1137 -1.661756666666807 -0.6760720000000826 0 +1138 -1.332940000000002 0.1875833999992438 0 +1139 -1.334240000000003 -0.1917434000007169 0 +1140 -1.333920000000003 -0.09833940000098579 0 +1141 0.7562754999992081 0.665735066666203 0 +1142 0.8285347499989835 0.7080428999994048 0 +1143 0.4531445000000049 -0.1845261000006819 0 +1144 0.4538556000000029 -0.2835256000004086 0 +1145 0.4510938000000072 0.1009541999989982 0 +1146 0.4518049000000072 0.00195469999899392 0 +1147 0.9102472499989752 0.7558855999994001 0 +1148 1.364068333332984 0.9361415000002011 0 +1149 1.29045 0.9784945 0 +1150 1.659555000000145 -0.7514879999999169 0 +1151 1.210402000000201 -0.9099451000001157 0 +1152 1.128707300000393 -0.862975100000226 0 +1153 1.437649999999428 0.8938096666669957 0 +1154 1.297075 -0.9597775 0 +1155 0.4497129000000037 0.2931940999994764 0 +1156 0.4490431000000019 0.3864344999997394 0 +1157 0.6236042000004551 -0.5725679000002617 0 +1158 0.7102772000006929 -0.6224003000003985 0 +1159 0.7919719000008825 -0.6693703000005075 0 +1160 1.442066666667009 -0.8764618333331367 0 +1161 1.514563333333719 -0.834803666666445 0 +1162 1.042034300000661 -0.81314270000038 0 +1163 0.8736666000008841 -0.7163403000005084 0 +1164 0.9603396000008853 -0.766172700000509 0 +1165 1.218190749999771 0.9361866666665324 0 +1166 1.136478249999551 0.8883439666664039 0 +1167 1.064218999999326 0.8460361333329389 0 +1168 1.51126833333286 0.851456666666939 0 +1169 1.58705833333364 -0.7931461666664905 0 +1170 0.4552365 -0.4757655 0 +1171 0.5419095000002303 -0.5255979000001324 0 +1172 0.4545254000000016 -0.3767660000002191 0 +1173 0.452474700000007 -0.09128570000097641 0 +1174 1.658468333333103 0.7667718333334658 0 +1175 1.584849999999519 0.8091248333336101 0 +1176 0.9825064999991188 0.7981934333328174 0 +1177 0.5205912499998496 0.5277418333332453 0 +1178 0.6023037499996851 0.575584533333149 0 +1179 0.4504240000000054 0.1941945999992488 0 +1180 0.448332 0.485434 0 +1181 0.6745629999994622 0.6178923666663518 0 +1182 1.369571666666785 -0.9181193333332653 0 +1183 -1.306705 0.522382 0 +1184 -1.233969833332978 0.5640270833335366 0 +1185 -0.4624792000000068 1.541667500001097 0 +1186 -0.4629987000000052 1.625207666667503 0 +1187 -1.66095333333359 2.262288333333185 0 +1188 -0.531893666666537 0.9660039166667408 0 +1189 -0.4591585 1.007649 0 +1190 -0.882842200000849 2.222840000000491 0 +1191 -0.8013075000008825 2.175668000000511 0 +1192 -0.4602654000000029 1.185655166667142 0 +1193 -0.4607849000000042 1.269195333334011 0 +1194 -0.719772800000636 2.128496000000368 0 +1195 -0.9693550000008981 2.27289200000052 0 +1196 -0.7690830333324992 0.8302002333338109 0 +1197 -0.6868559333327451 0.87727953333367 0 +1198 -1.589850000000528 2.303299999999695 0 +1199 -1.518753333333846 2.344308333333037 0 +1200 -0.6141207666662523 0.9189246166669038 0 +1201 -1.050889700000684 2.320064000000396 0 +1202 -0.4635861000000035 1.719673666667226 0 +1203 -0.4646930000000011 1.897679833333507 0 +1204 -0.4652125 1.98122 0 +1205 -0.6332600000003987 2.078444000000231 0 +1206 -0.4596780000000014 1.09118916666689 0 +1207 -0.5517253000002227 2.031272000000129 0 +1208 -0.9967804666657167 0.6998307666672106 0 +1209 -0.9240452999989666 0.7414758500005917 0 +1210 -0.8418181999988752 0.788555150000644 0 +1211 -0.464105600000002 1.803213833333654 0 +1212 -1.519346666666307 0.6478081666664544 0 +1213 -1.590268333333035 0.6896413333331572 0 +1214 -0.4618918000000075 1.447201500001201 0 +1215 -1.447650000000452 2.38531999999974 0 +1216 -1.137402500000337 2.370116000000195 0 +1217 -1.376553333333543 2.426328333333212 0 +1218 -1.218937200000162 2.417288000000094 0 +1219 -1.30545 2.46734 0 +1220 -1.661128333333239 0.7314378333332779 0 +1221 -1.377564999999856 0.5641784999999151 0 +1222 -0.461372300000006 1.363661333334288 0 +1223 -1.151742733332586 0.6111063833337613 0 +1224 -1.079007566665763 0.6527514666671838 0 +1225 -1.448486666666367 0.6060116666664901 0 +1226 1.658136666666389 2.184666666666505 0 +1227 1.314283000000002 1.599638999998911 0 +1228 1.314116000000002 1.693046999999184 0 +1229 1.45307999999967 2.065723333333142 0 +1230 1.518651666666339 2.103758333333143 0 +1231 1.388933333332984 0.9795220000002012 0 +1232 1.4542266666665 0.9419580000000957 0 +1233 1.658431666666416 0.8244770000001443 0 +1234 1.593138333333252 0.8620410000000469 0 +1235 1.527844999999933 0.8996050000000388 0 +1236 1.314794000000001 1.313642999999237 0 +1237 1.314627000000002 1.407050999999042 0 +1238 1.387508333333128 2.027688333333214 0 +1239 1.592564999999599 2.146631666666434 0 +1240 1.313939000000001 1.792226999999496 0 +1241 1.313772000000001 1.885634999999731 0 +1242 1.314450000000002 1.506230999998989 0 +1243 1.313595 1.984815 0 +1244 1.315138000000001 1.121054999999714 0 +1245 1.315315 1.021875 0 +1246 1.314971000000001 1.214462999999479 0 +1247 -1.329516666666666 2.594695000000029 0 +1248 -1.330295 2.51073 0 +1249 -1.527028333333742 2.397254999999764 0 +1250 -1.464213333333601 2.433486666666512 0 +1251 -1.326493333333334 2.920874999999986 0 +1252 -1.327271666666669 2.836909999999784 0 +1253 -1.328005000000003 2.757784999999639 0 +1254 -1.328783333333335 2.67381999999987 0 +1255 -1.598131666667136 2.356243333333063 0 +1256 -1.660946666666938 2.32001166666651 0 +1257 -1.401398333333543 2.469718333333212 0 +1258 -0.2126167333331301 2.15473233333345 0 +1259 -0.2853170666666385 2.113145666666683 0 +1260 0.4060011666666686 2.757008333332856 0 +1261 0.4063545000000018 2.672796666666219 0 +1262 0.4053146666666673 2.920609999999841 0 +1263 0.4056680000000016 2.836398333332943 0 +1264 -0.4402315 2.02453 0 +1265 -0.5267443000002227 2.074582000000129 0 +1266 -1.277268333333335 2.836849999999813 0 +1267 -1.278003333333334 2.757664999999957 0 +1268 -0.05770229999974374 2.243348000000147 0 +1269 -0.1304026333332661 2.201761333333372 0 +1270 -0.7762569000008647 2.218938000000501 0 +1271 -0.6947570000005165 2.171786000000299 0 +1272 -0.8577568000008082 2.266090000000467 0 +1273 -0.9442696000008572 2.316142000000496 0 +1274 0.4066876666666675 2.593406666666464 0 +1275 -1.02576950000059 2.363294000000341 0 +1276 -0.6082442000002792 2.121734000000162 0 +1277 -1.278781666666665 2.673700000000188 0 +1278 -1.27649 2.920815000000014 0 +1279 0.09721213333337589 2.331963666666691 0 +1280 0.02451180000026776 2.290377000000153 0 +1281 0.3343406666667639 2.467608333333389 0 +1282 0.252126566666603 2.420579333333297 0 +1283 -1.193782200000162 2.460498000000094 0 +1284 -1.280295 2.51055 0 +1285 -1.112282300000242 2.41334600000014 0 +1286 0.1794262333334907 2.378992666666757 0 +1287 -1.279516666666666 2.594515000000029 0 +1288 0.407041 2.509195 0 +1289 -0.3675311666664874 2.066116666666769 0 +1290 1.510299999999571 2.156714999999751 0 +1291 1.584218333332839 2.199593333333047 0 +1292 0.5426883000002656 2.459631999999846 0 +1293 0.4570415 2.509185 0 +1294 0.7089910000002687 2.363412999999845 0 +1295 0.6233442000000486 2.412965999999972 0 +1296 1.362468333333128 2.070963333333214 0 +1297 1.43638666666631 2.11384166666646 0 +1298 0.9559496000000876 2.220527999999949 0 +1299 0.8703028000001706 2.270080999999902 0 +1300 0.7896469000000768 2.316746999999956 0 +1301 1.122252300000067 2.124308999999961 0 +1302 1.202908200000223 2.077642999999871 0 +1303 1.036605500000247 2.173861999999857 0 +1304 1.288555 2.02809 0 +1305 0.4553151666666673 2.920606666666508 0 +1306 0.4556685000000016 2.83639499999961 0 +1307 0.4566881666666675 2.593396666666465 0 +1308 0.4560016666666677 2.757001666666421 0 +1309 1.658131666666451 2.242466666666541 0 +1310 0.4563550000000009 2.672789999999783 0 +$EndNodes +$Elements +546 +1 15 2 2 6655 66 +2 15 2 1 6708 67 +3 15 2 3 7077 72 +4 15 2 4 8569 93 +5 8 2 4 769 66 68 621 +6 8 2 1 770 67 65 622 +7 8 2 1 774 65 71 638 +8 8 2 1 775 70 69 639 +9 8 2 2 779 72 74 655 +10 8 2 1 780 73 69 656 +11 8 2 4 784 66 76 672 +12 8 2 4 785 77 75 673 +13 8 2 2 789 72 79 689 +14 8 2 2 790 80 78 690 +15 8 2 4 794 81 83 706 +16 8 2 4 795 82 75 707 +17 8 2 2 799 84 85 723 +18 8 2 2 800 86 78 724 +19 8 2 4 804 81 89 740 +20 8 2 4 805 88 87 741 +21 8 2 2 809 90 91 757 +22 8 2 2 810 92 84 758 +23 8 2 3 814 93 95 774 +24 8 2 4 815 94 87 775 +25 8 2 3 819 96 97 791 +26 8 2 3 820 98 93 792 +27 8 2 2 823 90 99 803 +28 8 2 3 824 100 96 804 +29 9 2 11 50 253 254 207 258 805 806 +30 9 2 11 50 30 260 215 264 807 808 +31 9 2 11 50 4 28 139 809 810 143 +32 9 2 11 50 141 245 142 811 812 146 +33 9 2 11 50 170 169 279 174 813 814 +34 9 2 11 50 2 29 204 815 816 209 +35 9 2 11 50 4 101 28 105 817 809 +36 9 2 11 50 101 102 236 106 818 819 +37 9 2 11 50 251 252 205 256 820 821 +38 9 2 11 50 102 103 235 107 822 823 +39 9 2 11 50 28 101 236 817 819 241 +40 9 2 11 50 252 253 206 257 824 825 +41 9 2 11 50 140 243 141 826 827 145 +42 9 2 11 50 28 242 139 246 828 810 +43 9 2 11 50 139 242 140 828 829 144 +44 9 2 11 50 142 29 2 830 815 147 +45 9 2 11 50 29 251 204 255 831 816 +46 9 2 11 50 216 262 217 832 833 221 +47 9 2 11 50 30 215 3 808 219 834 +48 9 2 11 50 270 225 269 835 836 274 +49 9 2 11 50 272 227 226 837 231 838 +50 9 2 11 50 217 263 218 839 840 222 +51 9 2 11 50 269 224 31 841 842 273 +52 9 2 11 50 205 252 206 820 825 211 +53 9 2 11 50 171 170 281 175 843 844 +54 9 2 11 50 272 226 271 838 845 276 +55 9 2 11 50 204 251 205 831 821 210 +56 9 2 11 50 8 171 27 176 846 847 +57 9 2 11 50 271 226 270 845 848 275 +58 9 2 11 50 260 261 216 265 849 850 +59 9 2 11 50 104 27 233 851 237 852 +60 9 2 11 50 170 279 280 814 284 853 +61 9 2 11 50 278 168 32 854 855 282 +62 9 2 11 50 169 168 278 173 854 856 +63 9 2 11 50 104 8 27 109 847 851 +64 9 2 11 50 207 254 208 805 857 213 +65 9 2 11 50 206 253 207 824 806 212 +66 9 2 11 50 141 244 245 858 249 811 +67 9 2 11 50 279 169 278 813 856 283 +68 9 2 11 50 208 30 3 859 834 214 +69 9 2 11 50 27 171 281 846 844 286 +70 9 2 11 50 243 244 141 248 858 827 +71 9 2 11 50 32 227 272 860 837 277 +72 9 2 11 50 242 243 140 247 826 829 +73 9 2 11 50 281 170 280 843 853 285 +74 9 2 11 50 103 233 234 861 238 862 +75 9 2 11 50 236 102 235 818 823 240 +76 9 2 11 50 142 245 29 812 250 830 +77 9 2 11 50 235 103 234 822 862 239 +78 9 2 11 50 103 104 233 108 852 861 +79 9 2 11 50 260 216 215 850 220 807 +80 9 2 11 50 261 262 216 266 832 849 +81 9 2 11 50 262 263 217 267 839 833 +82 9 2 11 50 226 225 270 230 835 848 +83 9 2 11 50 263 31 218 268 863 840 +84 9 2 11 50 225 224 269 229 841 836 +85 9 2 11 50 32 7 227 864 232 860 +86 9 2 11 50 168 7 32 172 864 855 +87 9 2 11 50 254 30 208 259 859 857 +88 9 2 11 50 224 1 31 228 865 842 +89 9 2 11 50 218 31 1 863 865 223 +90 9 2 11 60 157 6 38 162 866 867 +91 9 2 11 60 371 372 316 376 868 869 +92 9 2 11 60 41 323 9 870 327 871 +93 9 2 11 60 161 160 355 166 872 873 +94 9 2 11 60 316 373 317 874 875 321 +95 9 2 11 60 160 159 354 165 876 877 +96 9 2 11 60 380 381 324 385 878 879 +97 9 2 11 60 355 160 354 872 877 359 +98 9 2 11 60 226 362 225 880 881 230 +99 9 2 11 60 315 371 316 882 869 320 +100 9 2 11 60 39 161 355 883 873 360 +101 9 2 11 60 370 371 315 375 882 884 +102 9 2 11 60 379 380 324 384 879 885 +103 9 2 11 60 391 335 390 886 887 395 +104 9 2 11 60 343 299 37 888 889 347 +105 9 2 11 60 317 41 9 890 871 322 +106 9 2 11 60 324 381 325 878 891 329 +107 9 2 11 60 390 334 389 892 893 394 +108 9 2 11 60 334 333 389 339 894 893 +109 9 2 11 60 227 361 226 895 896 231 +110 9 2 11 60 345 298 344 897 898 349 +111 9 2 11 60 354 159 353 876 899 358 +112 9 2 11 60 158 157 352 163 900 901 +113 9 2 11 60 6 296 38 300 902 866 +114 9 2 11 60 7 161 39 167 883 903 +115 9 2 11 60 7 39 227 903 904 232 +116 9 2 11 60 296 297 346 301 905 906 +117 9 2 11 60 38 296 346 902 906 351 +118 9 2 11 60 157 38 352 867 356 900 +119 9 2 11 60 159 158 353 164 907 899 +120 9 2 11 60 224 40 1 908 909 228 +121 9 2 11 60 362 363 225 367 910 881 +122 9 2 11 60 298 299 343 303 888 911 +123 9 2 11 60 391 336 335 912 341 886 +124 9 2 11 60 344 298 343 898 911 348 +125 9 2 11 60 388 332 42 913 914 392 +126 9 2 11 60 333 332 388 338 913 915 +127 9 2 11 60 372 373 316 377 874 868 +128 9 2 11 60 382 42 326 387 916 917 +129 9 2 11 60 225 364 224 918 919 229 +130 9 2 11 60 326 42 15 916 920 331 +131 9 2 11 60 37 16 336 921 342 922 +132 9 2 11 60 225 363 364 910 368 918 +133 9 2 11 60 37 336 391 922 912 396 +134 9 2 11 60 41 379 323 383 923 870 +135 9 2 11 60 325 382 326 924 917 330 +136 9 2 11 60 40 370 314 374 925 926 +137 9 2 11 60 346 297 345 905 927 350 +138 9 2 11 60 39 361 227 365 895 904 +139 9 2 11 60 158 352 353 901 357 907 +140 9 2 11 60 314 370 315 925 884 319 +141 9 2 11 60 297 298 345 302 897 927 +142 9 2 11 60 1 40 314 909 926 318 +143 9 2 11 60 224 364 40 919 369 908 +144 9 2 11 60 390 335 334 887 340 892 +145 9 2 11 60 299 16 37 304 921 889 +146 9 2 11 60 361 362 226 366 880 896 +147 9 2 11 60 379 324 323 885 328 923 +148 9 2 11 60 381 382 325 386 924 891 +149 9 2 11 60 373 41 317 378 890 875 +150 9 2 11 60 389 333 388 894 915 393 +151 9 2 11 60 332 15 42 337 920 914 +152 9 2 11 72 56 504 550 928 929 555 +153 9 2 11 72 494 55 11 930 931 499 +154 9 2 11 72 483 531 484 932 933 488 +155 9 2 11 72 9 52 397 934 935 402 +156 9 2 11 72 529 530 483 534 936 937 +157 9 2 11 72 325 511 512 938 516 939 +158 9 2 11 72 52 323 514 940 941 519 +159 9 2 11 72 54 538 491 542 942 943 +160 9 2 11 72 538 492 491 944 496 942 +161 9 2 11 72 539 493 492 945 497 946 +162 9 2 11 72 538 539 492 543 946 944 +163 9 2 11 72 445 444 556 450 947 948 +164 9 2 11 72 485 54 12 949 950 490 +165 9 2 11 72 500 11 55 505 931 951 +166 9 2 11 72 521 522 399 526 952 953 +167 9 2 11 72 482 529 483 954 937 487 +168 9 2 11 72 9 323 52 327 940 934 +169 9 2 11 72 10 53 482 955 956 486 +170 9 2 11 72 401 523 53 957 528 958 +171 9 2 11 72 550 503 549 959 960 554 +172 9 2 11 72 324 325 513 329 961 962 +173 9 2 11 72 549 503 502 960 508 963 +174 9 2 11 72 52 520 397 524 964 935 +175 9 2 11 72 53 529 482 533 954 956 +176 9 2 11 72 513 325 512 961 939 517 +177 9 2 11 72 484 532 485 965 966 489 +178 9 2 11 72 541 55 494 546 930 967 +179 9 2 11 72 446 445 557 451 968 969 +180 9 2 11 72 493 541 494 970 967 498 +181 9 2 11 72 399 522 400 952 971 405 +182 9 2 11 72 532 54 485 537 949 966 +183 9 2 11 72 549 502 548 963 972 553 +184 9 2 11 72 448 447 559 453 973 974 +185 9 2 11 72 556 444 56 947 975 560 +186 9 2 11 72 550 504 503 929 509 959 +187 9 2 11 72 558 446 557 976 969 562 +188 9 2 11 72 559 447 558 973 977 563 +189 9 2 11 72 520 521 398 525 978 979 +190 9 2 11 72 323 324 514 328 980 941 +191 9 2 11 72 326 15 51 331 981 982 +192 9 2 11 72 397 520 398 964 979 403 +193 9 2 11 72 325 326 511 330 983 938 +194 9 2 11 72 447 446 558 452 976 977 +195 9 2 11 72 401 53 10 958 955 407 +196 9 2 11 72 51 448 559 984 974 564 +197 9 2 11 72 547 500 55 985 951 551 +198 9 2 11 72 539 540 493 544 986 945 +199 9 2 11 72 557 445 556 968 948 561 +200 9 2 11 72 54 491 12 943 495 950 +201 9 2 11 72 326 51 511 982 515 983 +202 9 2 11 72 502 501 548 507 987 972 +203 9 2 11 72 400 523 401 988 957 406 +204 9 2 11 72 15 448 51 454 984 981 +205 9 2 11 72 548 501 547 987 989 552 +206 9 2 11 72 444 14 56 449 990 975 +207 9 2 11 72 56 14 504 990 510 928 +208 9 2 11 72 531 532 484 536 965 933 +209 9 2 11 72 400 522 523 971 527 988 +210 9 2 11 72 540 541 493 545 970 986 +211 9 2 11 72 501 500 547 506 985 989 +212 9 2 11 72 514 324 513 980 962 518 +213 9 2 11 72 483 530 531 936 535 932 +214 9 2 11 72 398 521 399 978 953 404 +215 9 2 11 110 602 5 17 605 991 992 +216 9 2 11 110 606 607 617 609 993 994 +217 9 2 11 110 67 65 611 622 995 613 +218 9 2 11 110 607 66 68 610 621 996 +219 9 2 11 110 617 607 68 993 996 620 +220 9 2 11 110 611 601 612 997 998 614 +221 9 2 11 110 601 602 612 604 999 998 +222 9 2 11 110 17 606 616 1000 1001 618 +223 9 2 11 110 65 601 611 603 997 995 +224 9 2 11 110 612 602 17 999 992 615 +225 9 2 11 110 616 606 617 1001 994 619 +226 9 2 11 110 17 5 606 991 608 1000 +227 9 2 11 111 132 112 113 1002 118 1003 +228 9 2 11 111 132 131 112 136 1004 1002 +229 9 2 11 111 18 101 121 1005 1006 125 +230 9 2 11 111 20 133 114 138 1007 1008 +231 9 2 11 111 133 132 113 137 1003 1009 +232 9 2 11 111 121 101 102 1006 106 1010 +233 9 2 11 111 20 114 5 1008 120 1011 +234 9 2 11 111 133 113 114 1009 119 1007 +235 9 2 11 111 18 4 101 1012 105 1005 +236 9 2 11 111 104 8 19 109 1013 1014 +237 9 2 11 111 634 633 601 636 1015 1016 +238 9 2 11 111 601 633 602 1015 1017 604 +239 9 2 11 111 623 624 629 626 1018 1019 +240 9 2 11 111 110 19 8 1020 1013 115 +241 9 2 11 111 124 104 19 1021 1014 129 +242 9 2 11 111 123 103 124 1022 1023 128 +243 9 2 11 111 103 104 124 108 1021 1023 +244 9 2 11 111 633 20 602 635 1024 1017 +245 9 2 11 111 69 623 628 625 1025 1026 +246 9 2 11 111 65 71 634 638 637 1027 +247 9 2 11 111 65 634 601 1027 1016 603 +248 9 2 11 111 121 102 122 1010 1028 126 +249 9 2 11 111 70 69 628 639 1026 630 +250 9 2 11 111 628 623 629 1025 1019 631 +251 9 2 11 111 602 20 5 1024 1011 605 +252 9 2 11 111 131 130 111 135 1029 1030 +253 9 2 11 111 111 130 110 1029 1031 116 +254 9 2 11 111 130 19 110 134 1020 1031 +255 9 2 11 111 629 624 18 1018 1032 632 +256 9 2 11 111 122 102 103 1028 107 1033 +257 9 2 11 111 624 4 18 627 1012 1032 +258 9 2 11 111 112 131 111 1004 1030 117 +259 9 2 11 111 122 103 123 1033 1022 127 +260 9 2 11 112 21 139 148 1034 1035 152 +261 9 2 11 112 645 623 646 1036 1037 648 +262 9 2 11 112 21 4 139 1038 143 1034 +263 9 2 11 112 641 650 640 1039 1040 643 +264 9 2 11 112 74 651 72 654 1041 655 +265 9 2 11 112 640 22 2 1042 1043 642 +266 9 2 11 112 69 645 73 1044 647 656 +267 9 2 11 112 623 624 646 626 1045 1037 +268 9 2 11 112 69 623 645 625 1036 1044 +269 9 2 11 112 148 139 140 1035 144 1046 +270 9 2 11 112 148 140 149 1046 1047 153 +271 9 2 11 112 72 651 641 1041 1048 644 +272 9 2 11 112 141 142 151 146 1049 1050 +273 9 2 11 112 650 22 640 652 1042 1040 +274 9 2 11 112 624 4 21 627 1038 1051 +275 9 2 11 112 651 650 641 653 1039 1048 +276 9 2 11 112 646 624 21 1045 1051 649 +277 9 2 11 112 151 142 22 1049 1052 156 +278 9 2 11 112 150 141 151 1053 1050 155 +279 9 2 11 112 149 140 141 1047 145 1054 +280 9 2 11 112 149 141 150 1054 1053 154 +281 9 2 11 112 142 2 22 147 1043 1052 +282 9 2 11 113 195 26 168 199 1055 1056 +283 9 2 11 113 188 187 159 192 1057 1058 +284 9 2 11 113 607 66 663 610 1059 1060 +285 9 2 11 113 668 658 25 1061 1062 671 +286 9 2 11 113 187 186 158 191 1063 1064 +287 9 2 11 113 663 66 76 1059 672 666 +288 9 2 11 113 112 178 111 1065 1066 117 +289 9 2 11 113 606 607 662 609 1067 1068 +290 9 2 11 113 662 607 663 1067 1060 665 +291 9 2 11 113 170 197 169 1069 1070 174 +292 9 2 11 113 8 23 171 1071 1072 176 +293 9 2 11 113 180 179 113 184 1073 1074 +294 9 2 11 113 75 657 667 659 1075 1076 +295 9 2 11 113 189 160 161 1077 166 1078 +296 9 2 11 113 196 195 169 200 1079 1080 +297 9 2 11 113 158 186 157 1063 1081 163 +298 9 2 11 113 179 178 112 183 1065 1082 +299 9 2 11 113 658 6 25 661 1083 1062 +300 9 2 11 113 113 179 112 1073 1082 118 +301 9 2 11 113 24 180 114 185 1084 1085 +302 9 2 11 113 114 180 113 1084 1074 119 +303 9 2 11 113 5 24 114 1086 1085 120 +304 9 2 11 113 5 606 24 608 1087 1086 +305 9 2 11 113 110 177 23 1088 181 1089 +306 9 2 11 113 169 195 168 1079 1056 173 +307 9 2 11 113 24 606 662 1087 1068 664 +308 9 2 11 113 159 187 158 1057 1064 164 +309 9 2 11 113 26 161 7 1090 167 1091 +310 9 2 11 113 189 188 160 193 1092 1077 +311 9 2 11 113 168 26 7 1055 1091 172 +312 9 2 11 113 26 189 161 194 1078 1090 +313 9 2 11 113 111 177 110 1093 1088 116 +314 9 2 11 113 157 25 6 1094 1083 162 +315 9 2 11 113 110 23 8 1089 1071 115 +316 9 2 11 113 197 196 169 201 1080 1070 +317 9 2 11 113 667 657 668 1075 1095 670 +318 9 2 11 113 77 75 667 673 1076 669 +319 9 2 11 113 111 178 177 1066 182 1093 +320 9 2 11 113 23 198 171 203 1096 1072 +321 9 2 11 113 188 159 160 1058 165 1092 +322 9 2 11 113 198 197 170 202 1069 1097 +323 9 2 11 113 171 198 170 1096 1097 175 +324 9 2 11 113 657 658 668 660 1061 1095 +325 9 2 11 113 186 25 157 190 1094 1081 +326 9 2 11 114 287 33 208 291 1098 1099 +327 9 2 11 114 641 679 640 1100 1101 643 +328 9 2 11 114 204 290 205 1102 1103 210 +329 9 2 11 114 33 675 3 1104 678 1105 +330 9 2 11 114 33 685 675 688 1106 1104 +331 9 2 11 114 2 34 204 1107 1108 209 +332 9 2 11 114 207 287 208 1109 1099 213 +333 9 2 11 114 684 80 674 686 1110 1111 +334 9 2 11 114 685 684 674 687 1111 1112 +335 9 2 11 114 641 680 679 1113 682 1100 +336 9 2 11 114 289 288 206 293 1114 1115 +337 9 2 11 114 208 33 3 1098 1105 214 +338 9 2 11 114 288 287 207 292 1109 1116 +339 9 2 11 114 206 288 207 1114 1116 212 +340 9 2 11 114 290 289 205 294 1117 1103 +341 9 2 11 114 674 80 78 1110 690 676 +342 9 2 11 114 685 674 675 1112 677 1106 +343 9 2 11 114 34 290 204 295 1102 1108 +344 9 2 11 114 205 289 206 1117 1115 211 +345 9 2 11 114 72 79 641 689 1118 644 +346 9 2 11 114 79 680 641 683 1113 1118 +347 9 2 11 114 640 34 2 1119 1107 642 +348 9 2 11 114 640 679 34 1101 681 1119 +349 9 2 11 115 297 298 307 302 1120 1121 +350 9 2 11 115 696 658 697 1122 1123 699 +351 9 2 11 115 691 692 702 694 1124 1125 +352 9 2 11 115 36 16 691 1126 693 1127 +353 9 2 11 115 658 35 697 1128 700 1123 +354 9 2 11 115 35 296 305 1129 1130 309 +355 9 2 11 115 702 692 83 1124 1131 705 +356 9 2 11 115 658 6 35 661 1132 1128 +357 9 2 11 115 6 296 35 300 1129 1132 +358 9 2 11 115 308 299 36 1133 1134 313 +359 9 2 11 115 657 658 696 660 1122 1135 +360 9 2 11 115 701 691 702 1136 1125 704 +361 9 2 11 115 692 81 83 695 706 1131 +362 9 2 11 115 82 657 696 1137 1135 698 +363 9 2 11 115 298 299 308 303 1133 1138 +364 9 2 11 115 296 297 305 301 1139 1130 +365 9 2 11 115 297 307 306 1121 311 1140 +366 9 2 11 115 36 691 701 1127 1136 703 +367 9 2 11 115 305 297 306 1139 1140 310 +368 9 2 11 115 307 298 308 1120 1138 312 +369 9 2 11 115 299 16 36 304 1126 1134 +370 9 2 11 115 75 657 82 659 1137 707 +371 9 2 11 116 427 398 399 1141 404 1142 +372 9 2 11 116 314 315 417 319 1143 1144 +373 9 2 11 116 315 316 419 320 1145 1146 +374 9 2 11 116 427 399 428 1142 1147 432 +375 9 2 11 116 708 43 10 1148 1149 710 +376 9 2 11 116 718 86 78 720 724 1150 +377 9 2 11 116 44 215 408 1151 1152 412 +378 9 2 11 116 713 43 708 715 1148 1153 +379 9 2 11 116 3 215 44 219 1151 1154 +380 9 2 11 116 420 317 46 1155 1156 425 +381 9 2 11 116 217 218 411 222 1157 1158 +382 9 2 11 116 217 411 410 1158 415 1159 +383 9 2 11 116 675 719 674 1160 1161 677 +384 9 2 11 116 215 216 408 220 1162 1152 +385 9 2 11 116 216 217 409 221 1163 1164 +386 9 2 11 116 401 10 43 407 1149 1165 +387 9 2 11 116 400 401 429 406 1166 1167 +388 9 2 11 116 709 713 708 1168 1153 711 +389 9 2 11 116 674 718 78 1169 1150 676 +390 9 2 11 116 409 217 410 1163 1159 414 +391 9 2 11 116 218 1 45 223 1170 1171 +392 9 2 11 116 719 718 674 721 1169 1161 +393 9 2 11 116 1 314 45 318 1172 1170 +394 9 2 11 116 315 419 418 1146 423 1173 +395 9 2 11 116 408 216 409 1162 1164 413 +396 9 2 11 116 84 714 709 1174 1175 712 +397 9 2 11 116 428 400 429 1176 1167 433 +398 9 2 11 116 46 397 426 1177 1178 430 +399 9 2 11 116 419 316 420 1145 1179 424 +400 9 2 11 116 46 9 397 1180 402 1177 +401 9 2 11 116 714 713 709 716 1168 1175 +402 9 2 11 116 316 317 420 321 1155 1179 +403 9 2 11 116 45 314 417 1172 1144 421 +404 9 2 11 116 218 45 411 1171 416 1157 +405 9 2 11 116 429 401 43 1166 1165 434 +406 9 2 11 116 426 397 398 1178 403 1181 +407 9 2 11 116 317 9 46 322 1180 1156 +408 9 2 11 116 417 315 418 1143 1173 422 +409 9 2 11 116 399 400 428 405 1176 1147 +410 9 2 11 116 426 398 427 1181 1141 431 +411 9 2 11 116 85 714 84 717 1174 723 +412 9 2 11 116 44 719 675 722 1160 1182 +413 9 2 11 116 3 44 675 1154 1182 678 +414 9 2 11 117 16 50 336 1183 1184 342 +415 9 2 11 117 446 465 445 1185 1186 451 +416 9 2 11 117 88 87 730 741 1187 732 +417 9 2 11 117 332 49 15 1188 1189 337 +418 9 2 11 117 457 456 437 461 1190 1191 +419 9 2 11 117 448 467 447 1192 1193 453 +420 9 2 11 117 458 457 437 462 1191 1194 +421 9 2 11 117 437 456 436 1190 1195 441 +422 9 2 11 117 333 474 473 1196 478 1197 +423 9 2 11 117 730 725 731 1198 1199 733 +424 9 2 11 117 333 473 332 1197 1200 338 +425 9 2 11 117 456 455 436 460 1201 1195 +426 9 2 11 117 465 464 445 469 1202 1186 +427 9 2 11 117 444 48 14 1203 1204 449 +428 9 2 11 117 458 437 438 1194 442 1205 +429 9 2 11 117 49 467 448 472 1192 1206 +430 9 2 11 117 48 438 14 1207 443 1204 +431 9 2 11 117 335 475 334 1208 1209 340 +432 9 2 11 117 475 474 334 479 1210 1209 +433 9 2 11 117 445 464 444 1202 1211 450 +434 9 2 11 117 332 473 49 1200 477 1188 +435 9 2 11 117 735 692 736 1212 1213 738 +436 9 2 11 117 334 474 333 1210 1196 339 +437 9 2 11 117 466 465 446 470 1185 1214 +438 9 2 11 117 725 726 731 728 1215 1199 +439 9 2 11 117 436 455 435 1201 1216 440 +440 9 2 11 117 731 726 47 1215 1217 734 +441 9 2 11 117 455 47 435 459 1218 1216 +442 9 2 11 117 726 13 47 729 1219 1217 +443 9 2 11 117 692 81 736 695 1220 1213 +444 9 2 11 117 435 47 13 1218 1219 439 +445 9 2 11 117 736 81 89 1220 740 739 +446 9 2 11 117 16 691 50 693 1221 1183 +447 9 2 11 117 464 48 444 468 1203 1211 +448 9 2 11 117 447 466 446 1222 1214 452 +449 9 2 11 117 336 476 335 1223 1224 341 +450 9 2 11 117 691 692 735 694 1212 1225 +451 9 2 11 117 48 458 438 463 1205 1207 +452 9 2 11 117 15 49 448 1189 1206 454 +453 9 2 11 117 87 725 730 727 1198 1187 +454 9 2 11 117 50 476 336 481 1223 1184 +455 9 2 11 117 50 691 735 1221 1225 737 +456 9 2 11 117 467 466 447 471 1222 1193 +457 9 2 11 117 476 475 335 480 1208 1224 +458 9 2 11 118 743 90 91 746 757 1226 +459 9 2 11 118 567 484 568 1227 1228 572 +460 9 2 11 118 747 742 748 1229 1230 750 +461 9 2 11 118 708 58 753 1231 756 1232 +462 9 2 11 118 92 709 752 1233 1234 754 +463 9 2 11 118 709 753 752 1235 755 1234 +464 9 2 11 118 709 708 753 711 1232 1235 +465 9 2 11 118 565 483 566 1236 1237 570 +466 9 2 11 118 57 742 747 1238 1229 749 +467 9 2 11 118 742 743 748 745 1239 1230 +468 9 2 11 118 568 485 57 1240 1241 573 +469 9 2 11 118 566 484 567 1242 1227 571 +470 9 2 11 118 485 12 57 490 1243 1241 +471 9 2 11 118 10 482 58 486 1244 1245 +472 9 2 11 118 708 10 58 710 1245 1231 +473 9 2 11 118 84 709 92 712 1233 758 +474 9 2 11 118 57 12 742 1243 744 1238 +475 9 2 11 118 748 743 91 1239 1226 751 +476 9 2 11 118 58 482 565 1244 1246 569 +477 9 2 11 118 482 483 565 487 1236 1246 +478 9 2 11 118 484 485 568 489 1240 1228 +479 9 2 11 118 483 484 566 488 1242 1237 +480 9 2 11 119 13 759 59 761 1247 1248 +481 9 2 11 119 764 726 765 1249 1250 767 +482 9 2 11 119 770 93 95 1251 774 773 +483 9 2 11 119 760 93 770 763 1251 1252 +484 9 2 11 119 769 760 770 1253 1252 772 +485 9 2 11 119 59 759 769 1247 1254 771 +486 9 2 11 119 725 726 764 728 1249 1255 +487 9 2 11 119 87 725 94 727 1256 775 +488 9 2 11 119 726 13 59 729 1248 1257 +489 9 2 11 119 726 59 765 1257 768 1250 +490 9 2 11 119 94 725 764 1256 1255 766 +491 9 2 11 119 759 760 769 762 1253 1254 +492 9 2 11 120 504 503 574 509 1258 1259 +493 9 2 11 120 776 777 781 779 1260 1261 +494 9 2 11 120 777 96 782 780 1262 1263 +495 9 2 11 120 14 60 438 1264 1265 443 +496 9 2 11 120 787 786 760 789 1266 1267 +497 9 2 11 120 503 502 575 508 1268 1269 +498 9 2 11 120 586 585 437 590 1270 1271 +499 9 2 11 120 437 584 436 1272 1273 441 +500 9 2 11 120 437 585 584 1270 589 1272 +501 9 2 11 120 61 776 781 1274 1261 783 +502 9 2 11 120 436 584 583 1273 588 1275 +503 9 2 11 120 60 586 438 591 1276 1265 +504 9 2 11 120 781 777 782 1260 1263 784 +505 9 2 11 120 759 787 760 1277 1267 762 +506 9 2 11 120 786 98 93 788 792 1278 +507 9 2 11 120 502 501 576 507 1279 1280 +508 9 2 11 120 438 586 437 1276 1271 442 +509 9 2 11 120 500 61 577 1281 582 1282 +510 9 2 11 120 574 503 575 1258 1269 579 +511 9 2 11 120 435 62 13 1283 1284 439 +512 9 2 11 120 436 583 435 1275 1285 440 +513 9 2 11 120 501 577 576 1286 581 1279 +514 9 2 11 120 501 500 577 506 1282 1286 +515 9 2 11 120 575 502 576 1268 1280 580 +516 9 2 11 120 62 787 759 790 1277 1287 +517 9 2 11 120 11 776 61 778 1274 1288 +518 9 2 11 120 13 62 759 1284 1287 761 +519 9 2 11 120 760 786 93 1266 1278 763 +520 9 2 11 120 500 11 61 505 1288 1281 +521 9 2 11 120 14 504 60 510 1289 1264 +522 9 2 11 120 60 504 574 1289 1259 578 +523 9 2 11 120 782 96 97 1262 791 785 +524 9 2 11 120 435 583 62 1285 587 1283 +525 9 2 11 121 793 743 794 1290 1291 796 +526 9 2 11 121 494 64 11 1292 1293 499 +527 9 2 11 121 493 592 494 1294 1295 498 +528 9 2 11 121 63 742 793 1296 1297 795 +529 9 2 11 121 492 594 493 1298 1299 497 +530 9 2 11 121 493 593 592 1300 597 1294 +531 9 2 11 121 63 595 491 600 1301 1302 +532 9 2 11 121 491 595 492 1301 1303 496 +533 9 2 11 121 12 63 491 1304 1302 495 +534 9 2 11 121 798 100 96 800 804 1305 +535 9 2 11 121 777 798 96 1306 1305 780 +536 9 2 11 121 742 743 793 745 1290 1297 +537 9 2 11 121 11 64 776 1293 1307 778 +538 9 2 11 121 799 798 777 801 1306 1308 +539 9 2 11 121 794 90 99 1309 803 797 +540 9 2 11 121 494 592 64 1295 596 1292 +541 9 2 11 121 594 593 493 598 1300 1299 +542 9 2 11 121 12 742 63 744 1296 1304 +543 9 2 11 121 595 594 492 599 1298 1303 +544 9 2 11 121 64 799 776 802 1310 1307 +545 9 2 11 121 776 799 777 1310 1308 779 +546 9 2 11 121 743 90 794 746 1309 1291 +$EndElements diff --git a/dG3D/benchmarks/multiscale2DThermoMechanics/macro.py b/dG3D/benchmarks/multiscale2DThermoMechanics/macro.py index 6316bb5a7c1e068c04cb38a0b5ca7197ff7836e5..00c4088d4a294c5909e0d013ced8d1e0c6d46dec 100644 --- a/dG3D/benchmarks/multiscale2DThermoMechanics/macro.py +++ b/dG3D/benchmarks/multiscale2DThermoMechanics/macro.py @@ -79,45 +79,41 @@ microBC.setInitialConstitutiveExtraDofDiffusionValue(0,Tr); #intial value for co # DEFINE MACROPROBLEM matnum = 100; macromat = MultiscaleThermoMechanicsDG3DMaterialLaw(matnum, 1000) -macromat.loadModel(micromeshfile); -macromat.addDomain(myfield1) -macromat.addMaterialLaw(law1); -macromat.addDomain(myfield2) -macromat.addMaterialLaw(law2); - -macromat.addMicroBC(microBC) - -macromat.setNumStep(1) -macromat.setTolerance(1e-6,1e-16) -macromat.setSystemType(3) -macromat.Solver(2) #macromat.setViewAllMicroProblems(bool(1),0) #macromat.addViewMicroSolver(36,0) #macromat.addViewMicroSolver(84,0) -macromat.Scheme(1) - -macromat.stressAveragingFlag(True) -macromat.tangentAveragingFlag(True) -macromat.setStressAveragingMethod(0); -macromat.setTangentAveragingMethod(2,1e-6); - -macromat.initialBC("Face",11,3,Tr) -macromat.initialBC("Face",12,3,Tr) -macromat.dirichletBC("Face",11,2,0.) -macromat.dirichletBC("Face",12,2,0.) - -macromat.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat.internalPointBuildView("sig_VM",IPField.SVM); -macromat.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat.internalPointBuildView("temperature",IPField.TEMPERATURE) -macromat.internalPointBuildView("qx",IPField.THERMALFLUX_X) -macromat.internalPointBuildView("qy",IPField.THERMALFLUX_Y) -macromat.internalPointBuildView("qz",IPField.THERMALFLUX_Z) + +baseSolver1 = macromat.getMicroSolver() +baseSolver1.loadModel(micromeshfile); +baseSolver1.addDomain(myfield1) +baseSolver1.addMaterialLaw(law1); +baseSolver1.addDomain(myfield2) +baseSolver1.addMaterialLaw(law2); +baseSolver1.addMicroBC(microBC) +baseSolver1.snlData(1,1.,1e-6,1e-16) +baseSolver1.setSystemType(3) +baseSolver1.Solver(2) +baseSolver1.Scheme(1) +baseSolver1.stressAveragingFlag(True) +baseSolver1.tangentAveragingFlag(True) +baseSolver1.setStressAveragingMethod(0); +baseSolver1.setTangentAveragingMethod(2,1e-6); +baseSolver1.initialBC("Face","Position",11,3,Tr) +baseSolver1.initialBC("Face","Position",12,3,Tr) +baseSolver1.displacementBC("Face",11,2,0.) +baseSolver1.displacementBC("Face",12,2,0.) +baseSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +baseSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +baseSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +baseSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +baseSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +baseSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +baseSolver1.internalPointBuildView("sig_VM",IPField.SVM); +baseSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +baseSolver1.internalPointBuildView("temperature",IPField.TEMPERATURE) +baseSolver1.internalPointBuildView("qx",IPField.THERMALFLUX_X) +baseSolver1.internalPointBuildView("qy",IPField.THERMALFLUX_Y) +baseSolver1.internalPointBuildView("qz",IPField.THERMALFLUX_Z) macromeshfile="macro.msh" # name of mesh file diff --git a/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py b/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py index fbeefe97ad889afe1494cd595d99e1faa0a7bc7c..2ff5c5a99e8f56003e5e813b9c6469b4b161cce4 100644 --- a/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py +++ b/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py @@ -44,53 +44,54 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +microSolver1.displacementBC("Face",11,2,0.) matnum2 = 3 macromat2 = J2LinearDG3DMaterialLaw(matnum2,rho,young,nu,sy0,h) diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py index c625da8251c1b9c7108594cada65792c996b5dd3..e28c56701ed8ab006768c0b25cdb355a85a3d34e 100644 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py +++ b/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py @@ -42,54 +42,62 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) -#for i in range(0,1): -macromat1.setViewAllMicroProblems(True,0) +macromat1.setViewAllMicroProblems(False,1) macromat1.setBlockDamageAfterFailureOnset(True) - -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +macromat1.addViewMicroSolver(15,2) +macromat1.addViewMicroSolver(15,3) +macromat1.addViewMicroSolver(16,0) +macromat1.addViewMicroSolver(16,3) +macromat1.addViewMicroSolver(15,16,1) +macromat1.addViewMicroSolver(15,16,2) + +baseSolver1 =macromat1.getMicroSolver() +baseSolver1.loadModel(micromeshfile); +baseSolver1.addDomain(myfield1) +baseSolver1.addMaterialLaw(law1); +baseSolver1.addMicroBC(microBC) + +baseSolver1.snlData(3,1,1e-6,1e-10) +baseSolver1.setSystemType(1) +baseSolver1.Solver(2) +baseSolver1.Scheme(1) +baseSolver1.setSameStateCriterion(1e-16) +baseSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +baseSolver1.setStressAveragingMethod(0) +baseSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +baseSolver1.setTangentAveragingMethod(2,1e-6); + +baseSolver1.setHomogenizationPropertyArchiveFlag(True) +baseSolver1.setDisplacementAndIPArchiveFlag(False) + +baseSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +baseSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +baseSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +baseSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +baseSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +baseSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +baseSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +baseSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +baseSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +baseSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +baseSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +baseSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +baseSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +baseSolver1.internalPointBuildView("F_xx",IPField.F_XX); +baseSolver1.internalPointBuildView("F_yy",IPField.F_YY); +baseSolver1.internalPointBuildView("F_xy",IPField.F_XY); +baseSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +baseSolver1.internalPointBuildView("P_xx",IPField.P_XX); +baseSolver1.internalPointBuildView("P_yy",IPField.P_YY); +baseSolver1.internalPointBuildView("P_xy",IPField.P_XY); +baseSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +baseSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +baseSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +baseSolver1.displacementBC("Face",11,2,0.) matnum2 = 2 macromat2 = J2LinearDG3DMaterialLaw(matnum2,rho,young,nu,sy0,h) @@ -108,7 +116,7 @@ soltype =1 # StaticLinear=0 (default) StaticNonLinear=1 nstep = 100 # number of step (used only if soltype=1) ftime =1. # Final time (used only if soltype=1) tol=1.e-5 # relative tolerance for NR scheme (used only if soltype=1) -nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) +nstepArch=3 # Number of step between 2 archiving (used only if soltype=1) # creation of macro part Domain @@ -149,6 +157,7 @@ mysolver.addMaterialLaw(lawCoh) mysolver.Scheme(soltype) mysolver.Solver(sol) mysolver.snlData(nstep,ftime,tol) +mysolver.stepBetweenArchiving(nstepArch) mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_shift_type NONZERO -pc_factor_mat_solver_package petsc") diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG/model.py index eae23ca45849498fce7d19950cbd81b0d76ca1b3..6cc21e7d0e095568a0e4134e2aa90e8d3630d02d 100644 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG/model.py +++ b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG/model.py @@ -69,56 +69,56 @@ elif BC=="mixedBC": # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) -#for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) - macromat1.setBlockDamageAfterFailureOnset(True) #macromat1.setBlockDamageAfterFailureOnsetTolerance(0.95) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +microSolver1.displacementBC("Face",11,2,0.) lcohNum = 13 diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_changeBCAfterFailure/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_changeBCAfterFailure/model.py index 354a29636ef56394a0eb8deb4ce3dd0b88c156f9..238831f30aa3e38f135b8e4f41f7ed417423fe6a 100644 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_changeBCAfterFailure/model.py +++ b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_changeBCAfterFailure/model.py @@ -43,56 +43,60 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); - -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) +macromat1.setBlockDamageAfterFailureOnset(True) +macromat1.setBlockDamageAfterFailureOnsetTolerance(0.) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) -macromat1.setBlockDamageAfterFailureOnset(True) +microSolver1 = macromat1.getMicroSolver() + +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); + +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + + + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1.displacementBC("Face",11,2,0.) lcohNum = 13 diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_rotateRVE/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_rotateRVE/model.py index 3e8fd7577f0305ef56f0e164fa1b0f6fea76a490..3cf5e6b7a79b3ffed6425027c97d4b2b61f5e3b3 100644 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_rotateRVE/model.py +++ b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_rotateRVE/model.py @@ -42,55 +42,55 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) - macromat1.setBlockDamageAfterFailureOnset(True) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +microSolver1.displacementBC("Face",11,2,0.) lcohNum = 13 diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_shiftedBC/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_shiftedBC/model.py index 16c3fa355904e4e7d882ef90ac626bef4936a6ee..5d191c954becd40b3fc92a7655b3193a462b21ba 100644 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_shiftedBC/model.py +++ b/dG3D/benchmarks/multiscaleCohesiveTest2D_fullDG_shiftedBC/model.py @@ -43,55 +43,56 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) - macromat1.setBlockDamageAfterFailureOnset(True) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +microSolver1.displacementBC("Face",11,2,0.) lcohNum = 13 diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py index 2ed544096455b6d52b7cc54a76c7d17bdc0d7e97..efac6d69c04f0a11578de25968ca520d42263117 100644 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py +++ b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py @@ -43,56 +43,57 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) macromat1.setBlockDamageAfterFailureOnset(True) macromat1.setBlockDamageAfterFailureOnsetTolerance(0.001) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +microSolver1.displacementBC("Face",11,2,0.) lcohNum = 13 diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/model.py b/dG3D/benchmarks/multiscaleEnhanceStrain/model.py index 3a410fdf6b18cbeaf4a82a4af2fb431365692361..29025ba8cfc0bb9ffd8f6444d5d83e3248672380 100644 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/model.py +++ b/dG3D/benchmarks/multiscaleEnhanceStrain/model.py @@ -49,62 +49,62 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = enhancedStraindG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); - -macromat1.setPerturbationMaterialLawIP(7,0); -macromat1.setPerturbationMaterialLawIP(8,0); -macromat1.addPerturbationMaterialLaw(law2); - - -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) macromat1.setLostSolutionUniquenssTolerance(0.) macromat1.setCharacteristicLength(1,0.7) +macromat1.setPerturbationMaterialLawIP(7,0); +macromat1.setPerturbationMaterialLawIP(8,0); +macromat1.addPerturbationMaterialLaw(law2); -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); - -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); -macromat1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); -macromat1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_xz",IPField.SIG_XZ); -macromat1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); -macromat1.internalPointBuildView("sig_yz",IPField.SIG_YZ); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); - -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); - -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); - -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Damage",IPField.DAMAGE); - -macromat1.dirichletBC("Face",11,2,0.) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); + +microSolver1.addMicroBC(microBC) + +microSolver1.snlData(3,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) + + +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); + +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("Green-Lagrange_zz",IPField.STRAIN_ZZ); +microSolver1.internalPointBuildView("Green-Lagrange_yz",IPField.STRAIN_YZ); +microSolver1.internalPointBuildView("Green-Lagrange_xz",IPField.STRAIN_XZ); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_xz",IPField.SIG_XZ); +microSolver1.internalPointBuildView("sig_zz",IPField.SIG_ZZ); +microSolver1.internalPointBuildView("sig_yz",IPField.SIG_YZ); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); + +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); + +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); + +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Damage",IPField.DAMAGE); + +microSolver1.displacementBC("Face",11,2,0.) diff --git a/dG3D/benchmarks/multiscale_1order_shearlayer/shearlayer.py b/dG3D/benchmarks/multiscale_1order_shearlayer/shearlayer.py index 63a3e383421077e35f0b09f7331e246a8e7aae65..730222932de23e1627cae8fb2b26b77fb4f03563 100644 --- a/dG3D/benchmarks/multiscale_1order_shearlayer/shearlayer.py +++ b/dG3D/benchmarks/multiscale_1order_shearlayer/shearlayer.py @@ -40,22 +40,19 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum = 1; macromat = dG3DMultiscaleMaterialLaw(matnum, 1000) -macromat.loadModel(micromeshfile); -macromat.addDomain(myfield1) -macromat.addMaterialLaw(law1); -macromat.addMicroBC(microBC) - -macromat.setTolerance(1e-6,1e-10) -macromat.setSystemType(1) -macromat.Solver(2) -macromat.setViewAllMicroProblems(False,0) macromat.addViewMicroSolver(45,0) macromat.addViewMicroSolver(55,0) -macromat.Scheme(1) -macromat.setSameStateCriterion(1e-6) -macromat.setStressAveragingMethod(1) -macromat.setTangentAveragingMethod(1,1e-6); -macromat.dirichletBC("Face",11,2,0.) # fix out-of-plan displacement + + +baseSolver1 = macromat.getMicroSolver() +baseSolver1.loadModel(micromeshfile); +baseSolver1.addDomain(myfield1) +baseSolver1.addMaterialLaw(law1); +baseSolver1.addMicroBC(microBC) + +baseSolver1.setStressAveragingMethod(1) +baseSolver1.setTangentAveragingMethod(1,1e-6); +baseSolver1.displacementBC("Face",11,2,0.) # fix out-of-plan displacement macromeshfile="shearlayer.msh" # name of mesh file diff --git a/dG3D/benchmarks/multiscale_2order_3Dsimple/Readme.txt b/dG3D/benchmarks/multiscale_2order_3Dsimple/Readme.txt index aeaaa35d51de8c942780780f5ba5c7d5081f64a0..351175074aab02e2a306072b2f6bee39d0415607 100644 --- a/dG3D/benchmarks/multiscale_2order_3Dsimple/Readme.txt +++ b/dG3D/benchmarks/multiscale_2order_3Dsimple/Readme.txt @@ -31,13 +31,21 @@ addVertex = 0 microBC.setPeriodicBCOptions(method, degree,bool(addVertex)) - b) Define the Macro-scale problem + b) Define the homogenized-scale problem i) The homogenized material law (one for each kind of macro structure) matnum = 1; macromat = hoDGMultiscaleMaterialLaw(matnum , 1000) - macromat.loadModel(micromeshfile); - macromat.addDomain(myfield1) - macromat.addMaterialLaw(law1); + + # all options for microstructured law + macromat.setViewAllMicroProblems(bool(1),0) + + #set all optiosn for solver + microSolver = macromat.getMicroSolver() + microSolver.loadModel(micromeshfile); + microSolver.addDomain(myfield1) + microSolver.addMaterialLaw(law1); + microSolver.addMicroBC(microBC) + .. etc ii) resolution parameter: in non linear use several time steps!!! diff --git a/dG3D/benchmarks/multiscale_2order_3Dsimple/multiscale.py b/dG3D/benchmarks/multiscale_2order_3Dsimple/multiscale.py index bc0f43b98e4feebe342ccc8d7c9b23fc50760a70..ea066b03a9bfa2fe17c75cec65c4eef85ab66ee7 100644 --- a/dG3D/benchmarks/multiscale_2order_3Dsimple/multiscale.py +++ b/dG3D/benchmarks/multiscale_2order_3Dsimple/multiscale.py @@ -41,25 +41,24 @@ microBC.setPeriodicBCOptions(method, degree,bool(addVertex)) # DEFINE MACROPROBLEM matnum = 1; macromat = hoDGMultiscaleMaterialLaw(matnum , 1000) -macromat.loadModel(micromeshfile); -macromat.addDomain(myfield1) -macromat.addMaterialLaw(law1); +macromat.setViewAllMicroProblems(bool(1),0) +microSolver = macromat.getMicroSolver() +microSolver.loadModel(micromeshfile); +microSolver.addDomain(myfield1) +microSolver.addMaterialLaw(law1); +microSolver.addMicroBC(microBC) -macromat.addMicroBC(microBC) +microSolver.snlData(1,1.,1e-6) +microSolver.setSystemType(1) +microSolver.Solver(2) +microSolver.Scheme(1) -macromat.setViewAllMicroProblems(bool(1)) -macromat.setNumStep(1) -macromat.setTolerance(1e-6) -macromat.setSystemType(1) -macromat.Solver(2) -macromat.Scheme(1) +microSolver.setStressAveragingMethod(1) +microSolver.setTangentAveragingMethod(1,1e-6) -macromat.setStressAveragingMethod(1) -macromat.setTangentAveragingMethod(1,1e-6) - -macromat.stiffnessModification(bool(1)); -macromat.iterativeProcedure(bool(1)); +microSolver.stiffnessModification(bool(1)); +microSolver.iterativeProcedure(bool(1)); macromeshfile="macro.msh" # name of mesh file diff --git a/dG3D/benchmarks/multiscale_2order_shearlayer/shearlayer.py b/dG3D/benchmarks/multiscale_2order_shearlayer/shearlayer.py index a6f0a23d04e45b6a5eb1b2ebe815623a59fdb0ac..2ff264b85382ca0e837e638d28e1ac8751c60feb 100644 --- a/dG3D/benchmarks/multiscale_2order_shearlayer/shearlayer.py +++ b/dG3D/benchmarks/multiscale_2order_shearlayer/shearlayer.py @@ -40,24 +40,21 @@ microBC.setPeriodicBCOptions(method, degree,bool(addvertex)) # DEFINE MACROPROBLEM matnum = 1; macromat = hoDGMultiscaleMaterialLaw(matnum, 1000) -macromat.loadModel(micromeshfile); -macromat.addDomain(myfield1) -macromat.addMaterialLaw(law1); -macromat.addMicroBC(microBC) - -macromat.setNumStep(1) -macromat.setTolerance(1e-6,1e-10) -macromat.setSystemType(1) -macromat.Solver(2) -macromat.setViewAllMicroProblems(bool(0),0) macromat.addViewMicroSolver(45,0) macromat.addViewMicroSolver(55,0) -macromat.Scheme(1) -macromat.setSameStateCriterion(1e-6) -macromat.setStressAveragingMethod(0) -macromat.setTangentAveragingMethod(2,1e-6); -macromat.dirichletBC("Face",11,2,0.) # fix out-of-plan displacement +baseSolver1 = macromat.getMicroSolver() +baseSolver1.loadModel(micromeshfile); +baseSolver1.addDomain(myfield1) +baseSolver1.addMaterialLaw(law1); +baseSolver1.addMicroBC(microBC) + +#baseSolver1.snlData(1,1,1e-6,1e-10) +#baseSolver1.setSystemType(1) +#baseSolver1.Solver(2) +#baseSolver1.Scheme(1) + +baseSolver1.displacementBC("Face",11,2,0.) # fix out-of-plan displacement macromeshfile="shearlayer.msh" # name of mesh file diff --git a/dG3D/benchmarks/nonLocalDamageMFH/RVESec.py b/dG3D/benchmarks/nonLocalDamageMFH/RVESec.py index 40fd68176ab49f46946ece3b3d5bbe21ced74551..00cc84d14cc9c29953380155d0931d5d85ba645f 100644 --- a/dG3D/benchmarks/nonLocalDamageMFH/RVESec.py +++ b/dG3D/benchmarks/nonLocalDamageMFH/RVESec.py @@ -187,7 +187,7 @@ mysolver.archivingIPOnPhysicalGroup("Volume",nfield, IPField.INC_SIG_YZ,IPField. mysolver.solve() check = TestCheck() -check.equal(2.068530e-02,mysolver.getArchivedForceOnPhysicalGroup("Face", 4158, 0),1.e-6) -check.equal(-2.293022e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 5678, 2),1.e-6) +check.equal(2.068536e-02,mysolver.getArchivedForceOnPhysicalGroup("Face", 4158, 0),1.e-6) +check.equal(-2.293030e-01,mysolver.getArchivedForceOnPhysicalGroup("Face", 5678, 2),1.e-6) diff --git a/dG3D/benchmarks/nonLocalDamageParallel/RVE.py b/dG3D/benchmarks/nonLocalDamageParallel/RVE.py index 249b950e1a5b95a70466a6f3e8341322c897173b..4e9a7f743ec905753e215b09c70cfaa17698b3f3 100644 --- a/dG3D/benchmarks/nonLocalDamageParallel/RVE.py +++ b/dG3D/benchmarks/nonLocalDamageParallel/RVE.py @@ -35,6 +35,7 @@ nlVar=1 law1 = NonLocalDamageDG3DMaterialLaw(lawnonlocal,rho,propertiesLC) law1.setUseBarF(True) law2 = NonLocalDamageDG3DMaterialLaw(lawlinear,rho,propertiesLin) +law2.setNumberOfNonLocalVariables(1) law2.setUseBarF(True) # creation of ElasticField diff --git a/dG3D/benchmarks/nonLocalMFH/RVESuquet.py b/dG3D/benchmarks/nonLocalMFH/RVESuquet.py index 5f07b9dbf4100301838ad4161c93f08ca82a0c3e..1b55ecbad668dc4f2b6748604de14d0f18a3dfef 100644 --- a/dG3D/benchmarks/nonLocalMFH/RVESuquet.py +++ b/dG3D/benchmarks/nonLocalMFH/RVESuquet.py @@ -31,7 +31,7 @@ law1 = NonLocalDamageDG3DMaterialLaw(lawnonlocal,rho,propertiesLC) # creation of ElasticField nfield = 100 # number of the field (physical number of surface) space1 = 0 # function space (Lagrange=6 -myfield1 = dG3DDomain(1000,nfield,space1,lawnonlocal,fulldg,3,1) +myfield1 = dG3DDomain(1000,nfield,space1,lawnonlocal,fulldg,3) #myfield1.setNonLocalStabilityParameters(beta1,True) myfield1.setNonLocalEqRatio(eqRatio) #myfield1.matrixByPerturbation(1,1,1,1e-8) diff --git a/dG3D/benchmarks/nonlocalDamageExpliciteErosion/CMakeLists.txt b/dG3D/benchmarks/nonlocalDamageExpliciteErosion/CMakeLists.txt index 71c592b340d99b6bb7cbf639c59b8fd973f9ff96..1032fb76b2cbd792f3820ff47489c007037f1470 100644 --- a/dG3D/benchmarks/nonlocalDamageExpliciteErosion/CMakeLists.txt +++ b/dG3D/benchmarks/nonlocalDamageExpliciteErosion/CMakeLists.txt @@ -4,8 +4,8 @@ set(PYFILE notchedBar.py) set(FILES2DELETE notchedBar.msh - disp.msh - stress.msh + disp*.msh + stress*.msh *.csv ) diff --git a/dG3D/benchmarks/pathFollowing/arch3D.py b/dG3D/benchmarks/pathFollowing/arch3D.py index 91ead88698a3aea4bca7e468951e5358646bb5e8..28a3f8d1e95eb163b810ff7e680ef7e6bf32e840 100644 --- a/dG3D/benchmarks/pathFollowing/arch3D.py +++ b/dG3D/benchmarks/pathFollowing/arch3D.py @@ -85,4 +85,4 @@ mysolver.archivingForceOnPhysicalGroup('Face',57,1) mysolver.solve() check = TestCheck() -check.equal(1.340224e+01,mysolver.getArchivedForceOnPhysicalGroup("Face", 57, 1),1.e-4) +check.equal(1.481245e+01,mysolver.getArchivedForceOnPhysicalGroup("Face", 57, 1),1.e-4) diff --git a/dG3D/benchmarks/pathFollowingMultiscale/model.py b/dG3D/benchmarks/pathFollowingMultiscale/model.py index b20fcc8c43619698c6aa1f44c7c62747a81217bb..4ac47a0dec5939d2b720285ba821562850e6c3aa 100644 --- a/dG3D/benchmarks/pathFollowingMultiscale/model.py +++ b/dG3D/benchmarks/pathFollowingMultiscale/model.py @@ -39,54 +39,55 @@ microBC.setPeriodicBCOptions(method, degree,addvertex) # DEFINE MACROPROBLEM matnum1 = 1; macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.loadModel(micromeshfile); -macromat1.addDomain(myfield1) -macromat1.addMaterialLaw(law1); -macromat1.addMicroBC(microBC) - -macromat1.setNumStep(3) -macromat1.setTolerance(1e-6,1e-10) -macromat1.setSystemType(1) -macromat1.Solver(2) #for i in range(0,1): macromat1.setViewAllMicroProblems(True,0) #macromat1.addViewMicroSolver(46,0) #macromat1.addViewMicroSolver(47,0) -macromat1.setExtractIrreversibleEnergyFlag(True) +microSolver1 = macromat1.getMicroSolver() +microSolver1.loadModel(micromeshfile); +microSolver1.addDomain(myfield1) +microSolver1.addMaterialLaw(law1); +microSolver1.addMicroBC(microBC) -macromat1.Scheme(1) -macromat1.setSameStateCriterion(1e-16) -macromat1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 -macromat1.setStressAveragingMethod(0) -macromat1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 -macromat1.setTangentAveragingMethod(2,1e-6); +microSolver1.snlData(1,1.,1e-6,1e-10) +microSolver1.setSystemType(1) +microSolver1.Solver(2) +microSolver1.setExtractIrreversibleEnergyFlag(True) -macromat1.pathFollowing(True) +microSolver1.Scheme(1) +microSolver1.setSameStateCriterion(1e-16) +microSolver1.stressAveragingFlag(True) # set stress averaging ON- 0 , OFF-1 +microSolver1.setStressAveragingMethod(0) +microSolver1.tangentAveragingFlag(True) # set tangent averaging ON -0, OFF -1 +microSolver1.setTangentAveragingMethod(2,1e-6); -macromat1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); -macromat1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); -macromat1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); -macromat1.internalPointBuildView("sig_xx",IPField.SIG_XX); -macromat1.internalPointBuildView("sig_yy",IPField.SIG_YY); -macromat1.internalPointBuildView("sig_xy",IPField.SIG_XY); -macromat1.internalPointBuildView("sig_VM",IPField.SVM); +microSolver1.pathFollowing(True,0) +microSolver1.setPathFollowingControlType(1) -macromat1.internalPointBuildView("F_xx",IPField.F_XX); -macromat1.internalPointBuildView("F_yy",IPField.F_YY); -macromat1.internalPointBuildView("F_xy",IPField.F_XY); -macromat1.internalPointBuildView("F_yx",IPField.F_YX); +microSolver1.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX); +microSolver1.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY); +microSolver1.internalPointBuildView("Green-Lagrange_xy",IPField.STRAIN_XY); +microSolver1.internalPointBuildView("sig_xx",IPField.SIG_XX); +microSolver1.internalPointBuildView("sig_yy",IPField.SIG_YY); +microSolver1.internalPointBuildView("sig_xy",IPField.SIG_XY); +microSolver1.internalPointBuildView("sig_VM",IPField.SVM); -macromat1.internalPointBuildView("P_xx",IPField.P_XX); -macromat1.internalPointBuildView("P_yy",IPField.P_YY); -macromat1.internalPointBuildView("P_xy",IPField.P_XY); -macromat1.internalPointBuildView("P_yx",IPField.P_YX); +microSolver1.internalPointBuildView("F_xx",IPField.F_XX); +microSolver1.internalPointBuildView("F_yy",IPField.F_YY); +microSolver1.internalPointBuildView("F_xy",IPField.F_XY); +microSolver1.internalPointBuildView("F_yx",IPField.F_YX); -macromat1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); -macromat1.internalPointBuildView("Deformation energy",IPField.DEFO_ENERGY); -macromat1.internalPointBuildView("Plastic energy",IPField.PLASTIC_ENERGY); +microSolver1.internalPointBuildView("P_xx",IPField.P_XX); +microSolver1.internalPointBuildView("P_yy",IPField.P_YY); +microSolver1.internalPointBuildView("P_xy",IPField.P_XY); +microSolver1.internalPointBuildView("P_yx",IPField.P_YX); -macromat1.dirichletBC("Face",11,2,0.) +microSolver1.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN); +microSolver1.internalPointBuildView("Deformation energy",IPField.DEFO_ENERGY); +microSolver1.internalPointBuildView("Plastic energy",IPField.PLASTIC_ENERGY); + +microSolver1.displacementBC("Face",11,2,0.) macromeshfile="model.msh" # name of mesh file @@ -97,7 +98,7 @@ soltype =1 # StaticLinear=0 (default) StaticNonLinear=1 nstep = 16 # number of step (used only if soltype=1) ftime =1. # Final time (used only if soltype=1) tol=1.e-5 # relative tolerance for NR scheme (used only if soltype=1) -nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) +nstepArch=3 # Number of step between 2 archiving (used only if soltype=1) # creation of macro part Domain @@ -126,6 +127,7 @@ mysolver.setMultiscaleFlag(True) mysolver.Scheme(soltype) mysolver.Solver(sol) mysolver.snlData(nstep,ftime,tol) +mysolver.stepBetweenArchiving(nstepArch) mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_mat_solver_package petsc") mysolver.pathFollowing(True,1) @@ -145,6 +147,7 @@ mysolver.displacementBC("Edge",4,0,0.0) #mysolver.constraintBC("Edge",3,1) mysolver.forceBC("Edge",3,1,1e2) + # archivage mysolver.internalPointBuildView("Green-Lagrange_xx",IPField.STRAIN_XX, 1, 1); mysolver.internalPointBuildView("Green-Lagrange_yy",IPField.STRAIN_YY, 1, 1); diff --git a/dG3D/benchmarks/pathFollowing_cohesive_selectiveUpdate/model.py b/dG3D/benchmarks/pathFollowing_cohesive_selectiveUpdate/model.py index 86a8f23259314153eb81f739c695003d2a4e78e6..da9c9a22b7b22f0d5299aa52b611d63a862f00d0 100644 --- a/dG3D/benchmarks/pathFollowing_cohesive_selectiveUpdate/model.py +++ b/dG3D/benchmarks/pathFollowing_cohesive_selectiveUpdate/model.py @@ -132,4 +132,4 @@ mysolver.archivingForceOnPhysicalGroup('Face',1,1) mysolver.solve() check = TestCheck() -check.equal(2.227505e-11,mysolver.getArchivedForceOnPhysicalGroup("Face", 1, 1),1.e-2) +check.equal(-7.680655e-11,mysolver.getArchivedForceOnPhysicalGroup("Face", 1, 1),1.e1) diff --git a/dG3D/benchmarks/restartNonLocalJ2MPI/CMakeLists.txt b/dG3D/benchmarks/restartNonLocalJ2MPI/CMakeLists.txt index af63e5b5133faafcf44de0aa4798f6c92ce6bff3..79ee5ca960e583520be970eec6d9d2e815f9ffc1 100644 --- a/dG3D/benchmarks/restartNonLocalJ2MPI/CMakeLists.txt +++ b/dG3D/benchmarks/restartNonLocalJ2MPI/CMakeLists.txt @@ -8,7 +8,7 @@ set(FILES2DELETE stress* previousScheme* restart* - nonLinearMechSolver0.ckp + nonLinearMechSolver*.ckp ) add_cm3python_mpi_test(3 ${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/strainMappingFoam/box.geo b/dG3D/benchmarks/strainMappingFoam/box.geo new file mode 100644 index 0000000000000000000000000000000000000000..7315ba5ccf468123533e608f064a298b355dfeaa --- /dev/null +++ b/dG3D/benchmarks/strainMappingFoam/box.geo @@ -0,0 +1,22 @@ + +lsca = 1.5; +Point(1) = {1.732050e+00,-3.000000e+00, 0.000000e+00,lsca}; +Point(2) = {-1.732050e+00,-3.000000e+00, 0.000000e+00,lsca}; +Point(3) = {-1.732050e+00,3.000000e+00, 0.000000e+00,lsca}; +Point(4) = {1.732050e+00,3.000000e+00, 0.000000e+00,lsca}; + + +//+ +Line(1) = {3, 4}; +//+ +Line(2) = {4, 1}; +//+ +Line(3) = {1, 2}; +//+ +Line(4) = {2, 3}; +//+ +Curve Loop(1) = {4, 1, 2, 3}; +//+ +Plane Surface(1) = {1}; +//+ +Physical Surface(5) = {1}; diff --git a/dG3D/benchmarks/strainMappingFoam/box.msh b/dG3D/benchmarks/strainMappingFoam/box.msh new file mode 100644 index 0000000000000000000000000000000000000000..416a5b58405809dc8fd69321bc99f9444d3b6718 --- /dev/null +++ b/dG3D/benchmarks/strainMappingFoam/box.msh @@ -0,0 +1,115 @@ +$MeshFormat +4.1 0 8 +$EndMeshFormat +$Entities +4 4 1 0 +1 1.73205 -3 0 0 +2 -1.73205 -3 0 0 +3 -1.73205 3 0 0 +4 1.73205 3 0 0 +1 -1.73205 3 0 1.73205 3 0 0 2 3 -4 +2 1.73205 -3 0 1.73205 3 0 0 2 4 -1 +3 -1.73205 -3 0 1.73205 -3 0 0 2 1 -2 +4 -1.73205 -3 0 -1.73205 3 0 0 2 2 -3 +1 -1.73205 -3 0 1.73205 3 0 1 5 4 4 1 2 3 +$EndEntities +$Nodes +9 25 1 25 +0 1 0 1 +1 +1.73205 -3 0 +0 2 0 1 +2 +-1.73205 -3 0 +0 3 0 1 +3 +-1.73205 3 0 +0 4 0 1 +4 +1.73205 3 0 +1 1 0 2 +5 +6 +-0.5773500000027496 3 0 +0.5773499999969895 3 0 +1 2 0 3 +7 +8 +9 +1.73205 1.500000000005556 0 +1.73205 1.1020961920849e-11 0 +1.73205 -1.499999999994445 0 +1 3 0 2 +10 +11 +0.5773500000027496 -3 0 +-0.5773499999969895 -3 0 +1 4 0 3 +12 +13 +14 +-1.73205 -1.500000000005556 0 +-1.73205 -1.1020961920849e-11 0 +-1.73205 1.499999999994445 0 +2 1 0 11 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +-2.879830261839184e-12 1.361111940003789 -0 +2.879830261839184e-12 -1.361111940003789 0 +-0.3312177735282241 -7.008138399898264e-13 0 +0.7804044599613709 -0.6228241024906698 0 +0.8209197583771516 1.993055970001046 0 +-0.8118985023922189 -2.167805440370127 0 +-0.8118985023963724 2.167805440368526 -0 +0.8209197583830483 -1.993055970000998 0 +0.9205968070452741 0.7500000000082885 0 +0.001804251194427864 2.304394670074672 0 +0.001804251199893847 -2.304394670074983 0 +$EndNodes +$Elements +1 34 1 34 +2 1 2 34 +1 16 12 17 +2 14 15 17 +3 12 13 17 +4 13 14 17 +5 12 16 20 +6 15 14 21 +7 9 1 22 +8 14 3 21 +9 2 12 20 +10 4 7 19 +11 11 2 20 +12 6 4 19 +13 1 10 22 +14 3 5 21 +15 18 9 22 +16 8 9 18 +17 16 18 22 +18 17 15 23 +19 18 17 23 +20 7 8 23 +21 5 6 24 +22 10 11 25 +23 16 17 18 +24 19 7 23 +25 15 19 23 +26 8 18 23 +27 22 10 25 +28 21 5 24 +29 11 20 25 +30 6 19 24 +31 20 16 25 +32 19 15 24 +33 16 22 25 +34 15 21 24 +$EndElements diff --git a/dG3D/benchmarks/strainMappingFoam/rve.py b/dG3D/benchmarks/strainMappingFoam/rve.py new file mode 100644 index 0000000000000000000000000000000000000000..a00f88904d68013107882168be1eac40686503af --- /dev/null +++ b/dG3D/benchmarks/strainMappingFoam/rve.py @@ -0,0 +1,83 @@ +#coding-Utf-8-*- + +from gmshpy import * +from dG3Dpy import* + +import math + +# material law +lawnum1 = 11 # unique number of law +E = 68.9E3 #Young modulus +nu = 0.33 #Poisson ratio +K = E/3./(1.-2.*nu) +mu = E/2./(1+nu) +sy0 = 276. #Yield stress +h = E/100 # hardening modulus +rho = 1. #density + +# creation of material law +harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) +law1 = J2LinearDG3DMaterialLaw(lawnum1,rho,E,nu,harden) + + +# geometry +meshfile="rve1.msh" # name of mesh file + +# creation of part Domain +nfield = 11 # number of the field (physical number of entity) +dim =2 + +myfield1 = dG3DDomain(10,11,0,lawnum1,0,2) + + +# solver +sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 +soltype =1 # StaticLinear=0 (default) StaticNonLinear=1 +nstep = 50 # number of step (used only if soltype=1) +ftime =1. # Final time (used only if soltype=1) +tol=1.e-5 # relative tolerance for NR scheme (used only if soltype=1) +nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) + +# creation of Solver +mysolver = nonLinearMechSolver(1000) +mysolver.loadModel(meshfile) +mysolver.addDomain(myfield1) +mysolver.addMaterialLaw(law1) +mysolver.Scheme(soltype) +mysolver.Solver(sol) +mysolver.snlData(nstep,ftime,tol) + + +mysolver.pathFollowing(True,0) +mysolver.setPathFollowingControlType(1) +mysolver.setPathFollowingArcLengthStep(0.1) + +#rve - periodicity +mysolver.displacementBC("Edge",1,1,0) +mysolver.displacementBC("Edge",4,0,0) +mysolver.forceBC("Edge",3,1,-10) + +mysolver.createStrainMapping("box.msh",3) + + +# build view +mysolver.internalPointBuildView("sig_xx",IPField.SIG_XX, 1, 1); +mysolver.internalPointBuildView("sig_yy",IPField.SIG_YY, 1, 1); +mysolver.internalPointBuildView("sig_zz",IPField.SIG_ZZ, 1, 1); +mysolver.internalPointBuildView("sig_xy",IPField.SIG_XY, 1, 1); +mysolver.internalPointBuildView("sig_yz",IPField.SIG_YZ, 1, 1); +mysolver.internalPointBuildView("sig_xz",IPField.SIG_XZ, 1, 1); +mysolver.internalPointBuildView("sig_VM",IPField.SVM, 1, 1); +mysolver.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN, 1, 1); + +mysolver.internalPointBuildView("F_xx",IPField.F_XX, 1, 1); +mysolver.internalPointBuildView("F_xy",IPField.F_XY, 1, 1); +mysolver.internalPointBuildView("F_yx",IPField.F_YX, 1, 1); +mysolver.internalPointBuildView("F_yy",IPField.F_YY, 1, 1); + + + +# solve +mysolver.solve() + + diff --git a/dG3D/benchmarks/strainMappingFoam/rve1.geo b/dG3D/benchmarks/strainMappingFoam/rve1.geo new file mode 100644 index 0000000000000000000000000000000000000000..be9a5476bba1874369c35b33787d92ccb2b2aa66 --- /dev/null +++ b/dG3D/benchmarks/strainMappingFoam/rve1.geo @@ -0,0 +1,256 @@ +Point(69) = {0.43034, -0.490289, 0, 0.2}; +Point(71) = {1.29592, -1.99477, 0, 0.2}; +Point(75) = {1.29707, -0.988613, 0, 0.2}; +Point(82) = {0.433689, -2.49526, 0, 0.2}; +Point(147) = {-1.30229, -2.49301, 0, 0.2}; +Point(148) = {-1.31029, -0.497681, 0, 0.2}; +Point(150) = {-0.429693, -0.99721, 0, 0.2}; +Point(151) = {-0.426053, -1.99531, 0, 0.2}; +Point(169) = {0.423229, 0.499706, 0, 0.2}; +Point(170) = {1.29034, 1.0074, 0, 0.2}; +Point(171) = {0.432102, 2.49473, 0, 0.2}; +Point(172) = {1.28857, 1.9992, 0, 0.2}; +Point(174) = {-1.30543, 2.49621, 0, 0.2}; +Point(175) = {-0.440302, 1.99569, 0, 0.2}; +Point(176) = {-0.434068, 0.993208, 0, 0.2}; +Point(177) = {-1.30689, 0.493467, 0, 0.2}; +Point(1794) = {-1.35207, -2.52208, 0, 0.2}; +Point(1871) = {0.383674, -2.52402, 0, 0.2}; +Point(1872) = {-0.426346, -2.05298, 0, 0.2}; +Point(1873) = {-1.25207, -2.52199, 0, 0.2}; +Point(1949) = {0.483674, -2.52406, 0, 0.2}; +Point(1950) = {1.2962, -2.05242, 0, 0.2}; +Point(2571) = {-0.476159, -1.96627, 0, 0.2}; +Point(2572) = {-1.30215, -2.43543, 0, 0.2}; +Point(2575) = {-1.30979, -0.555446, 0, 0.2}; +Point(2576) = {-0.479587, -1.02639, 0, 0.2}; +Point(2649) = {-0.376158, -1.96649, 0, 0.2}; +Point(2650) = {0.433712, -2.43743, 0, 0.2}; +Point(2651) = {1.24595, -1.96596, 0, 0.2}; +Point(2652) = {1.24704, -1.01752, 0, 0.2}; +Point(2653) = {0.430653, -0.548144, 0, 0.2}; +Point(2654) = {-0.379589, -1.02572, 0, 0.2}; +Point(2727) = {1.34704, -1.01757, 0, 0.2}; +Point(2728) = {1.34595, -1.96568, 0, 0.2}; +Point(3199) = {-1.36019, -0.469073, 0, 0.2}; +Point(3200) = {-1.35699, 0.464967, 0, 0.2}; +Point(3273) = {-1.25699, 0.464422, 0, 0.2}; +Point(3274) = {-1.26019, -0.468616, 0, 0.2}; +Point(3275) = {-0.430173, -0.939454, 0, 0.2}; +Point(3276) = {0.380134, -0.461842, 0, 0.2}; +Point(3277) = {0.373436, 0.470677, 0, 0.2}; +Point(3278) = {-0.434135, 0.935554, 0, 0.2}; +Point(3351) = {1.29056, 0.949589, 0, 0.2}; +Point(3354) = {1.29708, -0.930942, 0, 0.2}; +Point(3355) = {0.480133, -0.461242, 0, 0.2}; +Point(3356) = {0.473435, 0.471162, 0, 0.2}; +Point(3977) = {-1.30547, 2.43847, 0, 0.2}; +Point(3978) = {-0.490123, 1.96675, 0, 0.2}; +Point(3979) = {-0.484249, 1.02209, 0, 0.2}; +Point(3980) = {-1.30652, 0.551297, 0, 0.2}; +Point(4053) = {-0.384247, 1.02222, 0, 0.2}; +Point(4054) = {0.423016, 0.557521, 0, 0.2}; +Point(4055) = {1.24029, 1.03603, 0, 0.2}; +Point(4056) = {1.23862, 1.97033, 0, 0.2}; +Point(4057) = {0.43196, 2.43705, 0, 0.2}; +Point(4058) = {-0.390121, 1.96679, 0, 0.2}; +Point(4131) = {1.33862, 1.97043, 0, 0.2}; +Point(4136) = {1.34029, 1.03635, 0, 0.2}; +Point(4602) = {-1.35516, 2.52525, 0, 0.2}; +Point(4677) = {-0.440161, 2.05337, 0, 0.2}; +Point(4678) = {0.38198, 2.52366, 0, 0.2}; +Point(4682) = {-1.25516, 2.52489, 0, 0.2}; +Point(4755) = {1.28854, 2.05698, 0, 0.2}; +Point(4760) = {0.481981, 2.52364, 0, 0.2}; +Point(6601) = {-1.29839, -3, 0, 0.2}; +Point(6655) = {-1.73205, -2.24611, 0, 0.2}; +Point(6708) = {-1.34839, -3, 0, 0.2}; +Point(6762) = {-1.73205, -2.30377, 0, 0.2}; +Point(6867) = {0.433432, -3, 0, 0.2}; +Point(6918) = {0.383432, -3, 0, 0.2}; +Point(6971) = {-1.24839, -3, 0, 0.2}; +Point(7077) = {1.73205, -2.24234, 0, 0.2}; +Point(7129) = {0.483432, -3, 0, 0.2}; +Point(7182) = {1.73205, -2.29983, 0, 0.2}; +Point(7289) = {-1.73205, -0.746585, 0, 0.2}; +Point(7343) = {-1.73205, -2.18844, 0, 0.2}; +Point(7397) = {-1.73205, -0.804643, 0, 0.2}; +Point(7503) = {1.73205, -0.738664, 0, 0.2}; +Point(7557) = {1.73205, -2.18484, 0, 0.2}; +Point(7609) = {1.73205, -0.796331, 0, 0.2}; +Point(7716) = {-1.73205, 0.744246, 0, 0.2}; +Point(7770) = {-1.73205, -0.688527, 0, 0.2}; +Point(7824) = {-1.73205, 0.686196, 0, 0.2}; +Point(7930) = {1.73205, 0.753282, 0, 0.2}; +Point(7984) = {1.73205, 0.695598, 0, 0.2}; +Point(8038) = {1.73205, -0.680997, 0, 0.2}; +Point(8145) = {-1.73205, 2.25014, 0, 0.2}; +Point(8195) = {-1.73205, 2.19242, 0, 0.2}; +Point(8249) = {-1.73205, 0.802296, 0, 0.2}; +Point(8356) = {1.73205, 2.25644, 0, 0.2}; +Point(8410) = {1.73205, 2.19864, 0, 0.2}; +Point(8463) = {1.73205, 0.810966, 0, 0.2}; +Point(8569) = {-1.30076, 3, 0, 0.2}; +Point(8622) = {-1.73205, 2.30786, 0, 0.2}; +Point(8675) = {-1.35076, 3, 0, 0.2}; +Point(8779) = {0.429982, 3, 0, 0.2}; +Point(8832) = {0.379981, 3, 0, 0.2}; +Point(8882) = {-1.25075, 3, 0, 0.2}; +Point(9038) = {1.73205, 2.31425, 0, 0.2}; +Point(9089) = {0.479982, 3, 0, 0.2}; +Line(213) = {82, 151 }; +Line(214) = {151, 147 }; +Line(217) = {1871, 1872 }; +Line(218) = {1872, 1873 }; +Line(221) = {82, 71 }; +Line(226) = {1949, 1950 }; +Line(297) = {148, 150 }; +Line(298) = {150, 151 }; +Line(299) = {2571, 2572 }; +Line(303) = {2575, 2576 }; +Line(304) = {2576, 2571 }; +Line(305) = {71, 75 }; +Line(306) = {75, 69 }; +Line(307) = {69, 150 }; +Line(308) = {2649, 2650 }; +Line(309) = {2650, 2651 }; +Line(310) = {2651, 2652 }; +Line(311) = {2652, 2653 }; +Line(312) = {2653, 2654 }; +Line(313) = {2654, 2649 }; +Line(317) = {2727, 2728 }; +Line(370) = {148, 177 }; +Line(376) = {3199, 3200 }; +Line(378) = {69, 169 }; +Line(379) = {169, 176 }; +Line(380) = {176, 177 }; +Line(381) = {3273, 3274 }; +Line(382) = {3274, 3275 }; +Line(383) = {3275, 3276 }; +Line(384) = {3276, 3277 }; +Line(385) = {3277, 3278 }; +Line(386) = {3278, 3273 }; +Line(389) = {169, 170 }; +Line(393) = {3354, 3355 }; +Line(394) = {3355, 3356 }; +Line(395) = {3356, 3351 }; +Line(463) = {174, 175 }; +Line(464) = {175, 176 }; +Line(467) = {3977, 3978 }; +Line(468) = {3978, 3979 }; +Line(469) = {3979, 3980 }; +Line(471) = {170, 172 }; +Line(472) = {172, 171 }; +Line(473) = {171, 175 }; +Line(474) = {4053, 4054 }; +Line(475) = {4054, 4055 }; +Line(476) = {4055, 4056 }; +Line(477) = {4056, 4057 }; +Line(478) = {4057, 4058 }; +Line(479) = {4058, 4053 }; +Line(488) = {4136, 4131 }; +Line(547) = {4677, 4678 }; +Line(552) = {4682, 4677 }; +Line(561) = {4760, 4755 }; +Line(765) = {6601, 147 }; +Line(766) = {147, 6655 }; +Line(767) = {6708, 1794 }; +Line(768) = {1794, 6762 }; +Line(769) = {6655, 6762 }; +Line(770) = {6708, 6601 }; +Line(771) = {6867, 82 }; +Line(772) = {6918, 1871 }; +Line(773) = {1873, 6971 }; +Line(774) = {6601, 6971 }; +Line(775) = {6918, 6867 }; +Line(776) = {71, 7077 }; +Line(777) = {7129, 1949 }; +Line(778) = {1950, 7182 }; +Line(779) = {7077, 7182 }; +Line(780) = {7129, 6867 }; +Line(781) = {7289, 148 }; +Line(782) = {2572, 7343 }; +Line(783) = {7397, 2575 }; +Line(784) = {6655, 7343 }; +Line(785) = {7397, 7289 }; +Line(786) = {7503, 75 }; +Line(787) = {2728, 7557 }; +Line(788) = {7609, 2727 }; +Line(789) = {7077, 7557 }; +Line(790) = {7609, 7503 }; +Line(791) = {177, 7716 }; +Line(792) = {7770, 3199 }; +Line(793) = {3200, 7824 }; +Line(794) = {7716, 7824 }; +Line(795) = {7770, 7289 }; +Line(796) = {170, 7930 }; +Line(797) = {3351, 7984 }; +Line(798) = {8038, 3354 }; +Line(799) = {7930, 7984 }; +Line(800) = {8038, 7503 }; +Line(801) = {8145, 174 }; +Line(802) = {8195, 3977 }; +Line(803) = {3980, 8249 }; +Line(804) = {7716, 8249 }; +Line(805) = {8195, 8145 }; +Line(806) = {172, 8356 }; +Line(807) = {4131, 8410 }; +Line(808) = {8463, 4136 }; +Line(809) = {8356, 8410 }; +Line(810) = {8463, 7930 }; +Line(811) = {174, 8569 }; +Line(812) = {8622, 4602 }; +Line(813) = {4602, 8675 }; +Line(814) = {8569, 8675 }; +Line(815) = {8622, 8145 }; +Line(816) = {171, 8779 }; +Line(817) = {4678, 8832 }; +Line(818) = {8882, 4682 }; +Line(819) = {8779, 8832 }; +Line(820) = {8882, 8569 }; +Line(821) = {4755, 9038 }; +Line(822) = {9089, 4760 }; +Line(823) = {8356, 9038 }; +Line(824) = {9089, 8779 }; +Line Loop(63) = {-213,221 ,298 ,305 ,306 ,307 }; +Line Loop(64) = {308,309 ,310 ,311 ,312 ,313 }; +Line Loop(79) = {-370,-307 ,297 ,378 ,379 ,380 }; +Line Loop(80) = {381,382 ,383 ,384 ,385 ,386 }; +Line Loop(99) = {-379,389 ,464 ,471 ,472 ,473 }; +Line Loop(100) = {474,475 ,476 ,477 ,478 ,479 }; +Line Loop(163) = {-768,-767 ,765 ,766 ,769 ,770 }; +Line Loop(164) = {-773,-772 ,-765 ,-218 ,-217 ,213 ,214 ,771 ,774 ,775 }; +Line Loop(165) = {-778,-777 ,-226 ,221 ,771 ,776 ,779 ,780 }; +Line Loop(166) = {-783,-782 ,-304 ,-303 ,-299 ,214 ,297 ,298 ,766 ,781 ,784 ,785 }; +Line Loop(167) = {-788,-787 ,-317 ,-305 ,776 ,786 ,789 ,790 }; +Line Loop(168) = {-793,-792 ,-376 ,370 ,781 ,791 ,794 ,795 }; +Line Loop(169) = {-798,-797 ,-395 ,-394 ,-393 ,306 ,378 ,389 ,786 ,796 ,799 ,800 }; +Line Loop(170) = {-803,-802 ,-469 ,-468 ,-467 ,380 ,463 ,464 ,791 ,801 ,804 ,805 }; +Line Loop(171) = {-808,-807 ,-796 ,-488 ,471 ,806 ,809 ,810 }; +Line Loop(172) = {-813,-812 ,801 ,811 ,814 ,815 }; +Line Loop(173) = {-818,-817 ,-811 ,-552 ,-547 ,-473 ,463 ,816 ,819 ,820 }; +Line Loop(174) = {-822,-821 ,-816 ,-561 ,-472 ,806 ,823 ,824 }; +Plane Surface(50) = {-64 ,63 }; +Plane Surface(60) = {-80 ,79 }; +Plane Surface(72) = {-100 ,99 }; +Plane Surface(110) = {163 }; +Plane Surface(111) = {164 }; +Plane Surface(112) = {165 }; +Plane Surface(113) = {166 }; +Plane Surface(114) = {167 }; +Plane Surface(115) = {168 }; +Plane Surface(116) = {169 }; +Plane Surface(117) = {170 }; +Plane Surface(118) = {171 }; +Plane Surface(119) = {172 }; +Plane Surface(120) = {173 }; +Plane Surface(121) = {174 }; +Physical Surface(11) = {50 ,60,72,110,111,112,113,114,115,116,117,118,119,120,121}; +Physical Line(1) = {770 ,774,775,780}; +Physical Line(2) = {779 ,789,790,799,800,809,810,823}; +Physical Line(3) = {814 ,819,820,824}; +Physical Line(4) = {769 ,784,785,794,795,804,805,815}; +Physical Point(1) = {6708}; +Physical Point(2) = {6655}; +Physical Point(3) = {7077}; +Physical Point(4) = {8569}; diff --git a/dG3D/benchmarks/strainMappingFoam/rve1.msh b/dG3D/benchmarks/strainMappingFoam/rve1.msh new file mode 100644 index 0000000000000000000000000000000000000000..b98bd95ba522382ef0bd71851c93a0a8d699638b --- /dev/null +++ b/dG3D/benchmarks/strainMappingFoam/rve1.msh @@ -0,0 +1,1865 @@ +$MeshFormat +2.2 0 8 +$EndMeshFormat +$Nodes +1310 +1 0.43034 -0.490289 0 +2 1.29592 -1.99477 0 +3 1.29707 -0.988613 0 +4 0.433689 -2.49526 0 +5 -1.30229 -2.49301 0 +6 -1.31029 -0.497681 0 +7 -0.429693 -0.99721 0 +8 -0.426053 -1.99531 0 +9 0.423229 0.499706 0 +10 1.29034 1.0074 0 +11 0.432102 2.49473 0 +12 1.28857 1.9992 0 +13 -1.30543 2.49621 0 +14 -0.440302 1.99569 0 +15 -0.434068 0.993208 0 +16 -1.30689 0.493467 0 +17 -1.35207 -2.52208 0 +18 0.383674 -2.52402 0 +19 -0.426346 -2.05298 0 +20 -1.25207 -2.52199 0 +21 0.483674 -2.52406 0 +22 1.2962 -2.05242 0 +23 -0.476159 -1.96627 0 +24 -1.30215 -2.43543 0 +25 -1.30979 -0.555446 0 +26 -0.479587 -1.02639 0 +27 -0.376158 -1.96649 0 +28 0.433712 -2.43743 0 +29 1.24595 -1.96596 0 +30 1.24704 -1.01752 0 +31 0.430653 -0.548144 0 +32 -0.379589 -1.02572 0 +33 1.34704 -1.01757 0 +34 1.34595 -1.96568 0 +35 -1.36019 -0.469073 0 +36 -1.35699 0.464967 0 +37 -1.25699 0.464422 0 +38 -1.26019 -0.468616 0 +39 -0.430173 -0.939454 0 +40 0.380134 -0.461842 0 +41 0.373436 0.470677 0 +42 -0.434135 0.935554 0 +43 1.29056 0.949589 0 +44 1.29708 -0.930942 0 +45 0.480133 -0.461242 0 +46 0.473435 0.471162 0 +47 -1.30547 2.43847 0 +48 -0.490123 1.96675 0 +49 -0.484249 1.02209 0 +50 -1.30652 0.551297 0 +51 -0.384247 1.02222 0 +52 0.423016 0.557521 0 +53 1.24029 1.03603 0 +54 1.23862 1.97033 0 +55 0.43196 2.43705 0 +56 -0.390121 1.96679 0 +57 1.33862 1.97043 0 +58 1.34029 1.03635 0 +59 -1.35516 2.52525 0 +60 -0.440161 2.05337 0 +61 0.38198 2.52366 0 +62 -1.25516 2.52489 0 +63 1.28854 2.05698 0 +64 0.481981 2.52364 0 +65 -1.29839 -3 0 +66 -1.73205 -2.24611 0 +67 -1.34839 -3 0 +68 -1.73205 -2.30377 0 +69 0.433432 -3 0 +70 0.383432 -3 0 +71 -1.24839 -3 0 +72 1.73205 -2.24234 0 +73 0.483432 -3 0 +74 1.73205 -2.29983 0 +75 -1.73205 -0.7465850000000001 0 +76 -1.73205 -2.18844 0 +77 -1.73205 -0.804643 0 +78 1.73205 -0.738664 0 +79 1.73205 -2.18484 0 +80 1.73205 -0.796331 0 +81 -1.73205 0.744246 0 +82 -1.73205 -0.688527 0 +83 -1.73205 0.686196 0 +84 1.73205 0.753282 0 +85 1.73205 0.695598 0 +86 1.73205 -0.680997 0 +87 -1.73205 2.25014 0 +88 -1.73205 2.19242 0 +89 -1.73205 0.802296 0 +90 1.73205 2.25644 0 +91 1.73205 2.19864 0 +92 1.73205 0.810966 0 +93 -1.30076 3 0 +94 -1.73205 2.30786 0 +95 -1.35076 3 0 +96 0.429982 3 0 +97 0.379981 3 0 +98 -1.25075 3 0 +99 1.73205 2.31425 0 +100 0.479982 3 0 +101 0.2617406000005067 -2.395270000000294 0 +102 0.08979220000104959 -2.29528000000061 0 +103 -0.08215619999900903 -2.195290000000576 0 +104 -0.2541045999995161 -2.095300000000281 0 +105 0.3477148000003136 -2.445265000000183 0 +106 0.1757664000006902 -2.345275000000401 0 +107 0.003818000001298005 -2.245285000000755 0 +108 -0.1681303999992432 -2.14529500000044 0 +109 -0.3400787999997973 -2.045305000000118 0 +110 -0.5720924999996617 -2.078259999999808 0 +111 -0.7181319999994114 -2.161209999999666 0 +112 -0.8641714999988419 -2.244159999999342 0 +113 -1.010210999999259 -2.327109999999579 0 +114 -1.156250499999807 -2.41005999999989 0 +115 -0.4990727499999725 -2.036784999999984 0 +116 -0.6451122499993905 -2.119734999999654 0 +117 -0.7911517499995393 -2.202684999999738 0 +118 -0.9371912499990606 -2.285634999999466 0 +119 -1.083230749999445 -2.368584999999685 0 +120 -1.229270250000084 -2.451535000000048 0 +121 0.2216700000003441 -2.4298120000002 0 +122 0.05966600000076372 -2.335604000000444 0 +123 -0.1023379999989917 -2.241396000000586 0 +124 -0.2643419999996064 -2.147188000000229 0 +125 0.3026720000002116 -2.476916000000123 0 +126 0.1406680000005917 -2.382708000000344 0 +127 -0.02133599999886432 -2.28850000000066 0 +128 -0.1833399999993148 -2.194292000000398 0 +129 -0.3453439999998723 -2.100084000000074 0 +130 -0.5914907999995056 -2.146781999999719 0 +131 -0.7566355999990066 -2.240583999999436 0 +132 -0.9217803999990083 -2.334385999999437 0 +133 -1.086925199999506 -2.428187999999719 0 +134 -0.5089183999997098 -2.099880999999835 0 +135 -0.6740631999992172 -2.193682999999555 0 +136 -0.8392079999987831 -2.287484999999309 0 +137 -1.004352799999414 -2.381286999999667 0 +138 -1.169497599999697 -2.475088999999828 0 +139 0.6061351999995477 -2.395162000000262 0 +140 0.7785813999989772 -2.295064000000594 0 +141 0.9510275999989332 -2.194966000000619 0 +142 1.123473799999488 -2.094868000000297 0 +143 0.5199120999997495 -2.445211000000145 0 +144 0.6923582999993572 -2.345113000000373 0 +145 0.8648044999986997 -2.245015000000755 0 +146 1.037250699999265 -2.144917000000427 0 +147 1.209696899999638 -2.04481900000021 0 +148 0.6461791999995798 -2.429732000000244 0 +149 0.8086843999989899 -2.335404000000586 0 +150 0.9711895999990137 -2.241076000000572 0 +151 1.133694799999454 -2.146748000000317 0 +152 0.5649265999998099 -2.476896000000111 0 +153 0.7274317999990101 -2.382568000000575 0 +154 0.8899369999989946 -2.288240000000584 0 +155 1.052442199998856 -2.193912000000664 0 +156 1.214947399999715 -2.099584000000165 0 +157 -1.163523833333612 -0.5809358333331756 0 +158 -1.016757666667448 -0.6641906666662237 0 +159 -0.8699915000011456 -0.7474454999993502 0 +160 -0.7232253333341392 -0.8307003333328762 0 +161 -0.576459166667053 -0.9139551666664476 0 +162 -1.236906916666869 -0.5393084166665519 0 +163 -1.090140750000474 -0.6225632499997309 0 +164 -0.9433745833342624 -0.7058180833328063 0 +165 -0.7966084166676223 -0.7890729166661246 0 +166 -0.6498422500006401 -0.8723277499996369 0 +167 -0.5030760833334934 -0.9555825833332425 0 +168 -0.4289650000000014 -1.196829999999619 0 +169 -0.4282370000000038 -1.396449999998951 0 +170 -0.4275090000000042 -1.596069999998838 0 +171 -0.4267810000000021 -1.79568999999942 0 +172 -0.4293290000000003 -1.097019999999916 0 +173 -0.4286010000000036 -1.296639999999025 0 +174 -0.4278730000000049 -1.49625999999866 0 +175 -0.4271450000000035 -1.695879999999026 0 +176 -0.4264170000000017 -1.895499999999534 0 +177 -0.6413571999996448 -2.060101999999798 0 +178 -0.8065553999990784 -2.153933999999476 0 +179 -0.971753599999147 -2.247765999999515 0 +180 -1.136951799999551 -2.341597999999745 0 +181 -0.5587580999997254 -2.013185999999844 0 +182 -0.7239562999993745 -2.107017999999645 0 +183 -0.8891544999988644 -2.200849999999355 0 +184 -1.054352699999221 -2.294681999999558 0 +185 -1.21955089999968 -2.388513999999819 0 +186 -1.14374940000046 -0.6496347999997393 0 +187 -0.9777088000009495 -0.7438235999994613 0 +188 -0.8116682000009527 -0.8380123999994595 0 +189 -0.6456276000004577 -0.9322011999997404 0 +190 -1.22676970000021 -0.602540399999881 0 +191 -1.060729100000771 -0.6967291999995623 0 +192 -0.8946885000012847 -0.7909179999992713 0 +193 -0.7286479000006921 -0.8851067999996073 0 +194 -0.5626073000002488 -0.9792955999998587 0 +195 -0.4789014000000019 -1.21436599999948 0 +196 -0.4782158000000035 -1.402341999999046 0 +197 -0.4775302000000032 -1.590317999999116 0 +198 -0.4768446000000019 -1.77829399999948 0 +199 -0.4792442000000008 -1.120377999999758 0 +200 -0.4785586000000028 -1.308353999999218 0 +201 -0.4778730000000045 -1.496329999998773 0 +202 -0.4771874000000024 -1.684305999999329 0 +203 -0.4765018000000017 -1.872281999999531 0 +204 1.296111666666666 -1.827077166667259 0 +205 1.296303333333332 -1.659384333334201 0 +206 1.296494999999998 -1.491691500001345 0 +207 1.296686666666665 -1.323998666667607 0 +208 1.296878333333333 -1.156305833333782 0 +209 1.296015833333333 -1.910923583333545 0 +210 1.296207499999999 -1.743230750000866 0 +211 1.296399166666665 -1.575537916667868 0 +212 1.296590833333332 -1.407845083334364 0 +213 1.296782499999999 -1.240152250000869 0 +214 1.296974166666666 -1.072459416666834 0 +215 1.123724000000403 -0.8889482000002316 0 +216 0.9503780000009385 -0.7892834000005395 0 +217 0.7770320000009363 -0.6896186000005384 0 +218 0.6036860000004607 -0.5899538000002649 0 +219 1.210397000000103 -0.938780600000059 0 +220 1.037051000000673 -0.8391158000003872 0 +221 0.8637050000011058 -0.7394510000006358 0 +222 0.6903590000005769 -0.6397862000003317 0 +223 0.5170130000002944 -0.5401214000001693 0 +224 0.2583334000003545 -0.591673199999791 0 +225 0.08632680000090776 -0.6930573999994649 0 +226 -0.08567979999913095 -0.7944415999994878 0 +227 -0.2576863999995271 -0.8958257999997212 0 +228 0.3443367000001515 -0.5409810999999107 0 +229 0.1723301000005171 -0.6423652999996952 0 +230 0.0003235000011100331 -0.7437494999993457 0 +231 -0.1716830999991698 -0.8451336999995107 0 +232 -0.3436896999998096 -0.9465178999998878 0 +233 -0.2141840000004024 -2.060677999999766 0 +234 -0.05221000000090797 -2.154865999999472 0 +235 0.1097639999992526 -2.249053999999565 0 +236 0.2717379999995418 -2.343241999999734 0 +237 -0.2951710000000674 -2.013583999999961 0 +238 -0.1331970000006161 -2.107771999999642 0 +239 0.02877699999896488 -2.201959999999398 0 +240 0.1907509999993289 -2.29614799999961 0 +241 0.3527249999997172 -2.390335999999836 0 +242 0.5961595999996265 -2.343136000000217 0 +243 0.7586071999991447 -2.248842000000496 0 +244 0.9210547999990564 -2.154548000000548 0 +245 1.083502399999468 -2.060254000000309 0 +246 0.5149357999997706 -2.390283000000133 0 +247 0.6773833999993335 -2.295989000000387 0 +248 0.8398309999988927 -2.201695000000643 0 +249 1.002278599999023 -2.107401000000567 0 +250 1.164726199999887 -2.013107000000065 0 +251 1.246167999999999 -1.776272000000373 0 +252 1.246385999999999 -1.586584000001015 0 +253 1.246603999999999 -1.396896000001058 0 +254 1.246821999999999 -1.207208000000642 0 +255 1.246059 -1.871116000000107 0 +256 1.246276999999999 -1.681428000000697 0 +257 1.246494999999998 -1.491740000001335 0 +258 1.246712999999999 -1.302052000000787 0 +259 1.246930999999999 -1.112364000000535 0 +260 1.083762600000354 -0.9236448000002033 0 +261 0.9204852000008423 -0.8297696000004843 0 +262 0.7572078000008797 -0.7358944000005058 0 +263 0.5939304000004003 -0.6420192000002302 0 +264 1.165401300000228 -0.9705824000001311 0 +265 1.002123900000633 -0.8767072000003641 0 +266 0.8388465000011727 -0.7828320000006742 0 +267 0.6755691000006473 -0.6889568000003722 0 +268 0.5122917000001693 -0.5950816000000974 0 +269 0.2686046000003327 -0.6436591999998038 0 +270 0.1065562000007608 -0.7391743999995515 0 +271 -0.05549219999926291 -0.8346895999995655 0 +272 -0.2175405999996726 -0.930204799999807 0 +273 0.3496288000001164 -0.5959015999999313 0 +274 0.1875804000005268 -0.6914167999996894 0 +275 0.02553200000098327 -0.7869319999994204 0 +276 -0.1365163999994978 -0.8824471999997039 0 +277 -0.2985647999999007 -0.9779623999999414 0 +278 -0.3789028000000018 -1.213873999999505 0 +279 -0.3782166000000038 -1.402027999998968 0 +280 -0.3775304000000037 -1.590181999998977 0 +281 -0.3768442000000018 -1.778335999999515 0 +282 -0.3792459000000004 -1.119796999999907 0 +283 -0.3785597000000035 -1.307950999999038 0 +284 -0.3778735000000051 -1.496104999998601 0 +285 -0.3771873000000032 -1.684258999999134 0 +286 -0.3765011000000003 -1.872412999999934 0 +287 1.346822000000001 -1.207191999999462 0 +288 1.346604000000001 -1.396813999999002 0 +289 1.346386000000001 -1.58643599999882 0 +290 1.346168 -1.776057999999661 0 +291 1.346931 -1.112380999999806 0 +292 1.346713000000001 -1.302002999999269 0 +293 1.346495000000002 -1.491624999998559 0 +294 1.346277000000001 -1.681246999999187 0 +295 1.346059 -1.870868999999692 0 +296 -1.309610000000001 -0.2994514000004558 0 +297 -1.308930000000003 -0.1012218000010374 0 +298 -1.308250000000004 0.09700779999894921 0 +299 -1.307570000000002 0.2952373999994536 0 +300 -1.309950000000001 -0.3985662000002135 0 +301 -1.309270000000003 -0.2003366000007274 0 +302 -1.308590000000005 -0.002107000001322079 0 +303 -1.307910000000003 0.1961225999991712 0 +304 -1.307230000000001 0.3943521999997265 0 +305 -1.359550000000001 -0.2822650000003964 0 +306 -1.358910000000003 -0.09545700000093416 0 +307 -1.358270000000003 0.09135099999902924 0 +308 -1.357630000000001 0.2781589999995385 0 +309 -1.359870000000001 -0.3756690000001458 0 +310 -1.359230000000002 -0.1888610000006493 0 +311 -1.358590000000004 -0.002053000001253413 0 +312 -1.357950000000002 0.1847549999992474 0 +313 -1.357310000000001 0.3715629999997176 0 +314 0.4289178000000032 -0.2922900000004383 0 +315 0.4274956000000071 -0.09429100000098489 0 +316 0.426073400000007 0.1037079999990236 0 +317 0.4246512000000038 0.3017069999994788 0 +318 0.4296289000000014 -0.3912895000001931 0 +319 0.4282067000000051 -0.1932905000007087 0 +320 0.4267845000000091 0.004708499998738291 0 +321 0.4253623000000051 0.2027074999992873 0 +322 0.4239401000000021 0.400706499999709 0 +323 0.2517696000003449 0.5984063999998015 0 +324 0.08031020000082029 0.6971067999995277 0 +325 -0.09114919999917231 0.7958071999995235 0 +326 -0.2626085999995685 0.8945075999997516 0 +327 0.3374993000001074 0.5490561999999382 0 +328 0.1660399000005793 0.6477565999996666 0 +329 -0.005419499998925215 0.7464569999993813 0 +330 -0.1768788999992599 0.845157399999574 0 +331 -0.3483382999998331 0.9438577999999038 0 +332 -0.5795383333330741 0.9099178333334816 0 +333 -0.7250086666660599 0.826627666667014 0 +334 -0.8704789999988117 0.7433375000006803 0 +335 -1.015949333332312 0.6600473333339182 0 +336 -1.161419666665957 0.5767571666670732 0 +337 -0.5068031666664957 0.9515629166667645 0 +338 -0.6522734999995895 0.868272750000235 0 +339 -0.7977438333324283 0.7849825833338515 0 +340 -0.9432141666655712 0.7016924166672939 0 +341 -1.088684499999114 0.6184022500005073 0 +342 -1.234154833332914 0.5351120833335732 0 +343 -1.257629999999998 0.2778144000004442 0 +344 -1.258269999999997 0.09120680000098413 0 +345 -1.258909999999997 -0.09540079999902884 0 +346 -1.259549999999998 -0.28200839999948 0 +347 -1.257309999999999 0.3711182000001887 0 +348 -1.257949999999998 0.1845106000006995 0 +349 -1.258589999999996 -0.00209699999874996 0 +350 -1.259229999999997 -0.1887045999992452 0 +351 -1.259869999999999 -0.37531219999979 0 +352 -1.094186600000462 -0.5627835999997381 0 +353 -0.9281832000008267 -0.656951199999531 0 +354 -0.7621798000008679 -0.7511187999995077 0 +355 -0.5961764000004575 -0.8452863999997404 0 +356 -1.177188300000175 -0.5156997999999006 0 +357 -1.011184900000701 -0.6098673999996025 0 +358 -0.8451815000010989 -0.7040349999993766 0 +359 -0.6791781000007289 -0.7982025999995865 0 +360 -0.5131747000002347 -0.8923701999998669 0 +361 -0.2681116000003194 -0.8439316000001883 0 +362 -0.1060502000007919 -0.7484092000004667 0 +363 0.05601119999918208 -0.6528868000004822 0 +364 0.2180725999995596 -0.5573644000002596 0 +365 -0.3491423000001385 -0.8916928000000817 0 +366 -0.1870809000005841 -0.7961704000003442 0 +367 -0.02501950000107384 -0.700648000000633 0 +368 0.1370418999994072 -0.6051256000003494 0 +369 0.2991032999997638 -0.5096032000001391 0 +370 0.378794400000003 -0.2753382000004147 0 +371 0.3774548000000071 -0.08883440000098908 0 +372 0.3761152000000075 0.09766939999895818 0 +373 0.3747756000000036 0.2841731999995002 0 +374 0.3794642000000015 -0.3685901000001985 0 +375 0.378124600000005 -0.1820863000006868 0 +376 0.3767850000000096 0.004417499998663921 0 +377 0.3754454000000055 0.1909212999992295 0 +378 0.3741058000000018 0.3774250999997502 0 +379 0.2119218000003893 0.5636523999997759 0 +380 0.05040760000086258 0.6566277999995035 0 +381 -0.1111065999991659 0.7496031999995199 0 +382 -0.2726207999996515 0.8425785999997993 0 +383 0.2926789000001565 0.5171646999999099 0 +384 0.1311647000006118 0.6101400999996478 0 +385 -0.03034949999893416 0.7031154999993865 0 +386 -0.1918636999993593 0.7960908999996312 0 +387 -0.3533778999998957 0.8890662999999399 0 +388 -0.5987059999996671 0.8413276000001906 0 +389 -0.7632769999991642 0.7471012000004786 0 +390 -0.9278479999991288 0.6528748000004989 0 +391 -1.092418999999577 0.5586484000002422 0 +392 -0.5164204999998416 0.8884408000000907 0 +393 -0.680991499999531 0.7942144000002685 0 +394 -0.8455624999989951 0.6999880000005754 0 +395 -1.010133499999459 0.6057616000003099 0 +396 -1.17470449999969 0.5115352000001774 0 +397 0.5677474999996993 0.5843216666664905 0 +398 0.7122659999992536 0.6689373333328963 0 +399 0.8567844999988043 0.7535529999992999 0 +400 1.001302999999091 0.8381686666661348 0 +401 1.145821499999541 0.9227843333330648 0 +402 0.4954882499998502 0.5420138333332456 0 +403 0.6400067499994418 0.6266294999996732 0 +404 0.784525249999044 0.711245166666107 0 +405 0.9290437499989734 0.7958608333327323 0 +406 1.073562249999164 0.8804764999995108 0 +407 1.218080749999648 0.9650921666664605 0 +408 1.133690600000383 -0.8370020000002205 0 +409 0.9703012000008321 -0.7430620000004784 0 +410 0.8069118000008286 -0.6491220000004765 0 +411 0.6435224000004495 -0.5551820000002585 0 +412 1.215385300000258 -0.8839720000001483 0 +413 1.051995900000637 -0.7900320000003661 0 +414 0.8886065000010842 -0.6960920000006234 0 +415 0.7252171000006745 -0.6021520000003878 0 +416 0.5618277000002018 -0.508212000000116 0 +417 0.4787934000000027 -0.274761200000379 0 +418 0.4774538000000069 -0.08828040000096793 0 +419 0.4761142000000074 0.09820039999897273 0 +420 0.4747746000000038 0.284681199999474 0 +421 0.479463200000001 -0.3680016000001445 0 +422 0.4781236000000049 -0.1815208000006887 0 +423 0.4767840000000083 0.004959999998843778 0 +424 0.475444400000006 0.1914407999991625 0 +425 0.4741048000000017 0.3779215999997674 0 +426 0.6368599999996709 0.5668473999998074 0 +427 0.8002849999991627 0.6625327999995098 0 +428 0.9637099999991461 0.7582181999995001 0 +429 1.127134999999561 0.8539035999997431 0 +430 0.5551474999999615 0.5190046999999774 0 +431 0.718572499999459 0.6146900999996834 0 +432 0.8819974999989644 0.7103754999993938 0 +433 1.04542249999939 0.8060608999996428 0 +434 1.208847499999675 0.9017462999998097 0 +435 -1.132404400000324 2.396106000000187 0 +436 -0.9593788000010182 2.296002000000589 0 +437 -0.7863532000009199 2.195898000000532 0 +438 -0.6133276000004453 2.095794000000258 0 +439 -1.218917200000233 2.446158000000135 0 +440 -1.04589160000081 2.346054000000469 0 +441 -0.8728660000012134 2.245950000000702 0 +442 -0.6998404000007696 2.145846000000445 0 +443 -0.5268148000002677 2.045742000000155 0 +444 -0.4392630000000022 1.828609666667013 0 +445 -0.4382240000000052 1.661529333334157 0 +446 -0.4371850000000084 1.494449000001344 0 +447 -0.4361460000000053 1.327368666667519 0 +448 -0.4351070000000028 1.160288333333781 0 +449 -0.4397825000000006 1.912149833333421 0 +450 -0.4387435000000037 1.745069500000596 0 +451 -0.4377045000000073 1.577989166667835 0 +452 -0.4366655000000071 1.410908833334472 0 +453 -0.4356265000000042 1.24382850000068 0 +454 -0.4345875000000002 1.076748166666696 0 +455 -1.14240060000035 2.344126000000203 0 +456 -0.9793312000007781 2.24978200000045 0 +457 -0.8162618000008449 2.155438000000489 0 +458 -0.6531924000003521 2.061094000000204 0 +459 -1.223935300000175 2.391298000000101 0 +460 -1.060865900000678 2.296954000000392 0 +461 -0.8977965000010258 2.202610000000594 0 +462 -0.7347271000006866 2.108266000000397 0 +463 -0.5716577000000673 2.013922000000039 0 +464 -0.4889482000000018 1.777818000000295 0 +465 -0.4877734000000052 1.58888600000085 0 +466 -0.4865986000000065 1.399954000001058 0 +467 -0.4854238000000031 1.211022000000503 0 +468 -0.4895356000000011 1.87228400000018 0 +469 -0.4883608000000035 1.683352000000572 0 +470 -0.4871860000000087 1.494420000001407 0 +471 -0.4860112000000039 1.305488000000631 0 +472 -0.4848364000000002 1.116556000000031 0 +473 -0.6487031999994304 0.927931400000326 0 +474 -0.8131573999989385 0.8337728000006077 0 +475 -0.9776115999991215 0.739614200000503 0 +476 -1.142065799999215 0.6454556000004493 0 +477 -0.5664760999997429 0.9750107000001471 0 +478 -0.7309302999991596 0.8808521000004812 0 +479 -0.895384499998803 0.7866935000006853 0 +480 -1.059838699999129 0.6925349000004988 0 +481 -1.224292899999702 0.5983763000001703 0 +482 1.289986000000001 1.205759999999427 0 +483 1.289632000000002 1.404119999998942 0 +484 1.289278000000002 1.602479999998837 0 +485 1.288924000000001 1.800839999999461 0 +486 1.290163000000001 1.106579999999695 0 +487 1.289809000000002 1.304939999999196 0 +488 1.289455000000002 1.503299999998615 0 +489 1.289101000000002 1.701659999999081 0 +490 1.288747000000001 1.900019999999532 0 +491 1.117276400000445 2.098305999999742 0 +492 0.9459828000008056 2.197411999999534 0 +493 0.7746892000009715 2.296517999999438 0 +494 0.6033956000005313 2.395623999999693 0 +495 1.202923199999927 2.048753000000042 0 +496 1.031629600000634 2.147858999999633 0 +497 0.8603360000011731 2.246964999999321 0 +498 0.6890424000006479 2.346070999999625 0 +499 0.5177488000003155 2.445176999999818 0 +500 0.2867013333335277 2.411556666666778 0 +501 0.141300666667303 2.328383333333697 0 +502 -0.004099999998913306 2.245210000000622 0 +503 -0.1495006666659581 2.162036666667072 0 +504 -0.2949013333329749 2.078863333333538 0 +505 0.3594016666669086 2.453143333333472 0 +506 0.2140010000004658 2.369970000000266 0 +507 0.0686003333340936 2.286796666667102 0 +508 -0.07680033333243452 2.203623333333848 0 +509 -0.2222009999993874 2.12045000000035 0 +510 -0.3676016666665382 2.03727666666674 0 +511 -0.222794400000406 0.9292802000002336 0 +512 -0.06134180000084993 0.8363404000004893 0 +513 0.1001107999991452 0.743400600000492 0 +514 0.2615633999995667 0.6504608000002494 0 +515 -0.3035207000001107 0.9757501000000637 0 +516 -0.1420681000006141 0.8828103000003534 0 +517 0.01938449999884295 0.7898705000006661 0 +518 0.1808370999994218 0.6969307000003329 0 +519 0.3422896999997043 0.6039909000001702 0 +520 0.5864707999996374 0.6532227999997877 0 +521 0.7499255999991481 0.7489245999995013 0 +522 0.9133803999991514 0.8446263999995032 0 +523 1.076835199999618 0.9403281999997763 0 +524 0.5047433999998336 0.6053718999999027 0 +525 0.6681981999994744 0.7010736999996923 0 +526 0.8316529999989073 0.7967754999993604 0 +527 0.9951077999993927 0.8924772999996444 0 +528 1.158562599999782 0.9881790999998722 0 +529 1.239956000000001 1.22288999999954 0 +530 1.239622000000002 1.409749999999028 0 +531 1.239288000000002 1.596609999998968 0 +532 1.238954000000001 1.783469999999497 0 +533 1.240123 1.129459999999852 0 +534 1.239789000000002 1.31631999999885 0 +535 1.239455000000002 1.503179999998615 0 +536 1.239121000000001 1.690039999999165 0 +537 1.238787000000001 1.876899999999583 0 +538 1.077288000000356 2.063673999999794 0 +539 0.9159560000008775 2.157017999999492 0 +540 0.7546240000009659 2.250361999999441 0 +541 0.5932920000004215 2.343705999999756 0 +542 1.157954000000244 2.017001999999859 0 +543 0.9966220000005874 2.11034599999966 0 +544 0.8352900000010258 2.203689999999407 0 +545 0.6739580000006455 2.297033999999627 0 +546 0.5126260000001344 2.390377999999922 0 +547 0.2675438000002852 2.342998000000163 0 +548 0.1031276000007084 2.248946000000406 0 +549 -0.06128859999903391 2.154894000000553 0 +550 -0.2257047999994377 2.060842000000322 0 +551 0.3497519000000808 2.390024000000047 0 +552 0.1853357000005199 2.295972000000297 0 +553 0.02091950000109455 2.201920000000626 0 +554 -0.1434966999991159 2.107868000000506 0 +555 -0.3079128999995635 2.01381600000025 0 +556 -0.3889462000000029 1.77787600000046 0 +557 -0.3877714000000044 1.588962000000703 0 +558 -0.3865966000000068 1.400048000001094 0 +559 -0.385421800000003 1.211134000000477 0 +560 -0.3895336000000011 1.872333000000189 0 +561 -0.3883588000000041 1.683419000000656 0 +562 -0.387184000000007 1.494505000001118 0 +563 -0.3860092000000049 1.305591000000785 0 +564 -0.384834400000001 1.116677000000165 0 +565 1.339956000000001 1.223165999999531 0 +566 1.339622000000001 1.409981999999141 0 +567 1.339288000000002 1.596797999998985 0 +568 1.338954000000001 1.783613999999532 0 +569 1.340123 1.129757999999829 0 +570 1.339789000000001 1.316573999999551 0 +571 1.339455000000002 1.503389999999002 0 +572 1.339121000000002 1.690205999999117 0 +573 1.338787 1.877021999999888 0 +574 -0.2757328000003022 2.147427999999827 0 +575 -0.1113046000005742 2.241485999999671 0 +576 0.05312359999944882 2.335543999999685 0 +577 0.2175517999996784 2.429601999999816 0 +578 -0.3579469000001792 2.100398999999898 0 +579 -0.193518700000555 2.194456999999683 0 +580 -0.0290905000007855 2.288514999999551 0 +581 0.1353376999997372 2.38257299999985 0 +582 0.2997658999997973 2.476630999999884 0 +583 -1.092160200000161 2.430586000000093 0 +584 -0.9291604000006964 2.336282000000403 0 +585 -0.7661606000008094 2.241978000000469 0 +586 -0.6031608000001131 2.147674000000066 0 +587 -1.173660100000123 2.477738000000071 0 +588 -1.010660300000514 2.383434000000297 0 +589 -0.8476605000009279 2.289130000000537 0 +590 -0.6846607000005083 2.194826000000294 0 +591 -0.5216608999999657 2.10052199999998 0 +592 0.6432927999995659 2.430308000000251 0 +593 0.804604599999182 2.336976000000473 0 +594 0.9659163999993696 2.243644000000365 0 +595 1.127228199999689 2.15031200000018 0 +596 0.562636899999748 2.476974000000146 0 +597 0.7239486999995017 2.383642000000288 0 +598 0.8852604999990195 2.290310000000567 0 +599 1.046572299999645 2.196978000000205 0 +600 1.207884100000034 2.10364599999998 0 +601 -1.299689999999997 -2.831003333333766 0 +602 -1.300989999999998 -2.662006666666928 0 +603 -1.299039999999998 -2.915501666666881 0 +604 -1.300339999999998 -2.746505000000315 0 +605 -1.301640000000002 -2.577508333333058 0 +606 -1.445543333333042 -2.410710000000167 0 +607 -1.588796666666437 -2.328410000000131 0 +608 -1.373916666666599 -2.451860000000039 0 +609 -1.517169999999596 -2.369560000000232 0 +610 -1.660423333332712 -2.287260000000356 0 +611 -1.349616666666662 -2.840693333333883 0 +612 -1.350843333333331 -2.681386666666985 0 +613 -1.349003333333332 -2.920346666666785 0 +614 -1.350229999999992 -2.761040000001018 0 +615 -1.351456666666668 -2.601733333333213 0 +616 -1.478729999999704 -2.44931000000017 0 +617 -1.605389999999592 -2.376540000000234 0 +618 -1.415399999999631 -2.485695000000212 0 +619 -1.542059999999521 -2.412925000000275 0 +620 -1.668719999999505 -2.340155000000284 0 +621 -1.73205 -2.27494 0 +622 -1.32339 -3 0 +623 0.4335176666666665 -2.831753333333536 0 +624 0.4336033333333331 -2.663506666667158 0 +625 0.4334748333333335 -2.915876666666243 0 +626 0.4335604999999997 -2.747630000000479 0 +627 0.4336461666666667 -2.579383333333238 0 +628 0.3835126666666665 -2.841340000000347 0 +629 0.3835933333333331 -2.68268000000052 0 +630 0.3834723333333331 -2.920670000000511 0 +631 0.3835529999999995 -2.762010000000886 0 +632 0.3836336666666666 -2.603350000000122 0 +633 -1.250843333333336 -2.681326666666291 0 +634 -1.249616666666671 -2.840663333332842 0 +635 -1.251456666666666 -2.601658333333484 0 +636 -1.250230000000004 -2.760994999999486 0 +637 -1.249003333333334 -2.920331666666538 0 +638 -1.273390000000304 -3 0 +639 0.408432 -3 0 +640 1.441296666666229 -2.077293333333085 0 +641 1.586673333332937 -2.159816666666442 0 +642 1.368608333333165 -2.036031666666571 0 +643 1.513984999998969 -2.118554999999414 0 +644 1.659361666666792 -2.201078333333404 0 +645 0.4835126666666665 -2.841353333333565 0 +646 0.4835933333333333 -2.682706666666638 0 +647 0.4834723333333337 -2.920676666665895 0 +648 0.483553 -2.762030000000101 0 +649 0.4836336666666662 -2.603383333334161 0 +650 1.441483333333013 -2.134889999999818 0 +651 1.586766666666436 -2.217359999999869 0 +652 1.368841666666741 -2.093655000000042 0 +653 1.514124999999109 -2.176124999999494 0 +654 1.6594083333328 -2.258594999999697 0 +655 1.73205 -2.271085 0 +656 0.458432 -3 0 +657 -1.591463333333613 -0.6636170000001651 0 +658 -1.450876666667019 -0.580649000000208 0 +659 -1.661756666666684 -0.70510100000001 0 +660 -1.521170000000608 -0.6221330000003589 0 +661 -1.380583333333791 -0.5391650000002702 0 +662 -1.445449999999546 -2.353100000000261 0 +663 -1.588749999999783 -2.270770000000125 0 +664 -1.373800000000051 -2.394264999999971 0 +665 -1.517099999999425 -2.31193500000033 0 +666 -1.660399999999997 -2.229605000000002 0 +667 -1.591296666667062 -0.7215773333335669 0 +668 -1.450543333333839 -0.638511666666965 0 +669 -1.661673333333439 -0.7631101666667289 0 +670 -1.520920000000844 -0.680044500000498 0 +671 -1.380166666667028 -0.5969788333335464 0 +672 -1.73205 -2.217275 0 +673 -1.73205 -0.775614 0 +674 1.58705666666699 -0.8219803333331474 0 +675 1.44206333333357 -0.9052966666665306 0 +676 1.659553333333565 -0.7803221666665338 0 +677 1.514560000000426 -0.8636384999997554 0 +678 1.369566666666831 -0.946954833333239 0 +679 1.474649999999399 -2.038733333332992 0 +680 1.603349999999578 -2.111786666666427 0 +681 1.410299999999861 -2.002206666666588 0 +682 1.538999999999087 -2.075259999999482 0 +683 1.66770000000001 -2.148313333333339 0 +684 1.603713333333591 -0.8700773333331852 0 +685 1.475376666666877 -0.9438236666665462 0 +686 1.667881666666953 -0.8332041666665021 0 +687 1.539545000000337 -0.9069504999998063 0 +688 1.411208333333489 -0.9806968333332442 0 +689 1.73205 -2.21359 0 +690 1.73205 -0.7674975000002331 0 +691 -1.448609999999712 0.57705999999983 0 +692 -1.590329999999591 0.6606529999997586 0 +693 -1.377749999999877 0.5352634999999274 0 +694 -1.519469999999313 0.6188564999995945 0 +695 -1.661189999999916 0.7024494999999502 0 +696 -1.608096666666945 -0.6153756666668305 0 +697 -1.484143333333629 -0.5422243333335081 0 +698 -1.670073333333505 -0.6519513333334346 0 +699 -1.546120000000417 -0.578800000000246 0 +700 -1.422166666666928 -0.5056486666668208 0 +701 -1.482009999999716 0.5387099999998327 0 +702 -1.60702999999959 0.6124529999997579 0 +703 -1.41949999999985 0.5018384999999116 0 +704 -1.544519999999573 0.5755814999997484 0 +705 -1.669539999999661 0.6493244999997997 0 +706 -1.73205 0.7152210000002074 0 +707 -1.73205 -0.7175560000000001 0 +708 1.437576666665968 0.9226940000004024 0 +709 1.584813333332832 0.8379880000002887 0 +710 1.363958333333036 0.965047000000171 0 +711 1.511194999999127 0.8803410000005025 0 +712 1.658431666666422 0.7956350000001409 0 +713 1.437723333332889 0.8649253333335891 0 +714 1.584886666666206 0.7802616666669315 0 +715 1.364141666666628 0.9072571666666888 0 +716 1.511304999999379 0.8225935000003572 0 +717 1.65846833333334 0.7379298333333295 0 +718 1.587060000000289 -0.7643119999998338 0 +719 1.442070000000448 -0.8476269999997427 0 +720 1.659554999999965 -0.7226545000000201 0 +721 1.51456500000047 -0.8059694999997301 0 +722 1.369574999999969 -0.8892845000000178 0 +723 1.73205 0.7244400000000463 0 +724 1.73205 -0.7098304999997669 0 +725 -1.589843333333876 2.33216333333302 0 +726 -1.447636666667087 2.414186666666424 0 +727 -1.660946666666911 2.291151666666526 0 +728 -1.518740000000687 2.373174999999604 0 +729 -1.37653333333345 2.455198333333266 0 +730 -1.589856666667181 2.27443666666637 0 +731 -1.447663333333816 2.356453333333055 0 +732 -1.660953333333707 2.233428333333118 0 +733 -1.518760000000609 2.315444999999649 0 +734 -1.376566666666504 2.397461666666761 0 +735 -1.448363333333023 0.6349633333331502 0 +736 -1.590206666666479 0.7186296666665559 0 +737 -1.37744166666644 0.5931301666665331 0 +738 -1.519284999999669 0.6767964999998048 0 +739 -1.66112833333311 0.7604628333332017 0 +740 -1.73205 0.7732709999999999 0 +741 -1.73205 2.22128 0 +742 1.436396666666256 2.084946666666428 0 +743 1.584223333332777 2.170693333333011 0 +744 1.362483333333141 2.042073333333222 0 +745 1.510309999999077 2.127819999999465 0 +746 1.658136666666486 2.213566666666562 0 +747 1.469763333333083 2.046499999999855 0 +748 1.600906666666422 2.122569999999858 0 +749 1.404191666666621 2.008464999999974 0 +750 1.535334999999387 2.084534999999644 0 +751 1.666478333333245 2.160604999999949 0 +752 1.601463333333672 0.8860939999998051 0 +753 1.470876666667034 0.961221999999789 0 +754 1.666756666666449 0.848530000000125 0 +755 1.536170000000485 0.923657999999721 0 +756 1.405583333333372 0.9987859999999782 0 +757 1.73205 2.22754 0 +758 1.73205 0.782124 0 +759 -1.303873333333333 2.664140000000058 0 +760 -1.30231666666667 2.832069999999596 0 +761 -1.304651666666671 2.580174999999554 0 +762 -1.303094999999999 2.74810500000014 0 +763 -1.301538333333336 2.916034999999735 0 +764 -1.606420000000397 2.380323333333104 0 +765 -1.480790000000114 2.452786666666601 0 +766 -1.669235000000029 2.34409166666665 0 +767 -1.543605000000387 2.416554999999776 0 +768 -1.417975000000061 2.489018333333298 0 +769 -1.353693333333336 2.683499999999681 0 +770 -1.352226666666667 2.841749999999972 0 +771 -1.354426666666668 2.604374999999838 0 +772 -1.352960000000006 2.762624999999376 0 +773 -1.351493333333331 2.920875000000191 0 +774 -1.32576 3 0 +775 -1.73205 2.279 0 +776 0.431395333333335 2.663153333332929 0 +777 0.4306886666666686 2.831576666666204 0 +778 0.4317486666666691 2.578941666666083 0 +779 0.4310420000000016 2.747364999999613 0 +780 0.430335333333333 2.915788333333422 0 +781 0.3813136666666687 2.682439999999509 0 +782 0.3806473333333347 2.841219999999682 0 +783 0.3816468333333326 2.603050000000168 0 +784 0.3809805000000007 2.761829999999844 0 +785 0.3803141666666668 2.920609999999979 0 +786 -1.25222 2.841630000000029 0 +787 -1.253689999999997 2.683260000000318 0 +788 -1.251484999999996 2.920815000000403 0 +789 -1.252955000000002 2.762444999999787 0 +790 -1.254424999999996 2.604075000000448 0 +791 0.4049815000001397 3 0 +792 -1.275755 3 0 +793 1.436376666666364 2.142736666666491 0 +794 1.584213333332902 2.228493333333083 0 +795 1.362458333333232 2.099858333333275 0 +796 1.510294999999549 2.185614999999738 0 +797 1.65813166666681 2.27137166666675 0 +798 0.4806483333333347 2.841213333333015 0 +799 0.4813146666666668 2.682426666666638 0 +800 0.4803151666666682 2.920606666666299 0 +801 0.4809814999999996 2.761820000000091 0 +802 0.4816478333333318 2.603033333333706 0 +803 1.73205 2.285345 0 +804 0.4549820000002051 3 0 +805 1.271754333333332 -1.265603333334124 0 +806 1.271645333333332 -1.360447333334332 0 +807 1.103743300000378 -0.9062965000002174 0 +808 1.185382000000201 -0.9532341000001158 0 +809 0.4337005 -2.466345 0 +810 0.5199235999997738 -2.416296000000131 0 +811 1.017264999999201 -2.127610000000464 0 +812 1.103488099999478 -2.077561000000303 0 +813 -0.4032268000000038 -1.399238999998959 0 +814 -0.402862800000004 -1.499048999998903 0 +815 1.270935 -1.980365 0 +816 1.271030833333333 -1.89651858333363 0 +817 0.3477263000002533 -2.416350000000147 0 +818 0.1807651000002957 -2.319261000000172 0 +819 0.2667393000000243 -2.369256000000014 0 +820 1.271344666666665 -1.622984166667608 0 +821 1.271235666666666 -1.717828166667287 0 +822 0.0138039000001218 -2.222172000000071 0 +823 0.09977810000015111 -2.272167000000088 0 +824 1.271549499999999 -1.444293750001201 0 +825 1.271440499999998 -1.53913775000118 0 +826 0.7685942999990609 -2.271953000000545 0 +827 0.8548173999990389 -2.221904000000558 0 +828 0.6011473999995871 -2.36914900000024 0 +829 0.6873704999993019 -2.319100000000405 0 +830 1.184711899999744 -2.030414000000149 0 +831 1.271139833333333 -1.801674583333816 0 +832 0.8537929000009091 -0.7625889000005226 0 +833 0.767119900000908 -0.712756500000522 0 +834 1.272055 -1.0030665 0 +835 0.09644150000083429 -0.7161158999995082 0 +836 0.1774657000006202 -0.6683582999996344 0 +837 -0.2376134999995999 -0.9130152999997641 0 +838 -0.1516101999994018 -0.8623231999996475 0 +839 0.6854812000006683 -0.6658189000003842 0 +840 0.5988082000004304 -0.6159865000002476 0 +841 0.2634690000003436 -0.6176661999997974 0 +842 0.3444932000001772 -0.5699085999998954 0 +843 -0.402176600000003 -1.687202999999176 0 +844 -0.401812600000002 -1.787012999999467 0 +845 -0.07058599999919693 -0.8145655999995267 0 +846 -0.401469500000001 -1.88108999999971 0 +847 -0.4011055 -1.9809 0 +848 0.01043820000081494 -0.7668079999995197 0 +849 0.9354316000008904 -0.8095265000005119 0 +850 1.017070300000646 -0.8564641000003714 0 +851 -0.315131299999758 -2.030895000000141 0 +852 -0.2341442999999592 -2.077989000000024 0 +853 -0.402519700000004 -1.593125999998907 0 +854 -0.4039339000000016 -1.205351999999562 0 +855 -0.4042770000000007 -1.111274999999809 0 +856 -0.4035699000000028 -1.305161999999228 0 +857 1.271850166666666 -1.181756916667212 0 +858 0.9360411999989948 -2.174757000000583 0 +859 1.271959166666666 -1.086912916666891 0 +860 -0.3186376999997635 -0.9607728999998606 0 +861 -0.1481700999997057 -2.127984000000171 0 +862 -0.0671830999999585 -2.175078000000024 0 +863 0.5171695000002303 -0.5690489000001324 0 +864 -0.404641 -1.011465 0 +865 0.4304965 -0.5192165 0 +866 -1.28524 -0.4831485 0 +867 -1.211856916666806 -0.5247759166665877 0 +868 0.4010943000000072 0.1006886999989909 0 +869 0.4017641000000071 0.007436799999017252 0 +870 0.3126028000001724 0.5345416999999008 0 +871 0.3983325 0.4851915 0 +872 -0.6597008666672983 -0.8379933666663083 0 +873 -0.5863177833337552 -0.879620783333094 0 +874 0.4004245000000053 0.1939405999992619 0 +875 0.3997134000000037 0.2929400999994895 0 +876 -0.8160856500010067 -0.7492821499994289 0 +877 -0.7427025666675036 -0.7909095666661919 0 +878 -0.01539819999917283 0.7233549999995238 0 +879 0.06535890000084144 0.6768672999995156 0 +880 -0.09586499999996143 -0.7714253999999773 0 +881 -0.009861699999942075 -0.7207332999999658 0 +882 0.4024752000000071 -0.09156270000098699 0 +883 -0.5033160833335265 -0.9267045833332238 0 +884 0.403145000000005 -0.1848146000006998 0 +885 0.1461160000006048 0.6303795999996518 0 +886 -1.054184166665945 0.6093478666670802 0 +887 -0.9718986666657203 0.6564610666672086 0 +888 -1.2826 0.2865258999999489 0 +889 -1.282280000000001 0.3798296999997268 0 +890 0.3990436000000019 0.3861919999997394 0 +891 -0.1011278999991691 0.7727051999995217 0 +892 -0.8991634999989703 0.6981061500005896 0 +893 -0.8168779999989879 0.7452193500005795 0 +894 -0.7441428333326121 0.7868644333337463 0 +895 -0.2628989999999233 -0.8698786999999548 0 +896 -0.1768956999997252 -0.819186599999838 0 +897 -1.28358 0.0008034999999601833 0 +898 -1.28326 0.09410729999996667 0 +899 -0.8990873500009862 -0.7021983499994406 0 +900 -1.128855216667036 -0.5718597166664569 0 +901 -1.055472133333955 -0.613487133332981 0 +902 -1.284900000000001 -0.3840337000002279 0 +903 -0.429933 -0.968332 0 +904 -0.3439296999997635 -0.9176398999998606 0 +905 -1.284240000000001 -0.1916151000002587 0 +906 -1.28458 -0.2907298999999679 0 +907 -0.9724704333341372 -0.6605709333328773 0 +908 0.3192337000001773 -0.5267575999998955 0 +909 0.405237 -0.4760655 0 +910 0.07116900000004492 -0.6729720999999735 0 +911 -1.282940000000001 0.1874110999996967 0 +912 -1.126919333332767 0.5677027833336576 0 +913 -0.5891221666663706 0.8756227166668361 0 +914 -0.506836666666537 0.9227359166667408 0 +915 -0.6618573333328635 0.8339776333336023 0 +916 -0.3483717999997842 0.9150307999998758 0 +917 -0.26761469999961 0.8685430999997754 0 +918 0.1521997000002337 -0.6252108999998622 0 +919 0.2382029999999571 -0.5745188000000252 0 +920 -0.4341015 0.9643809999999999 0 +921 -1.28194 0.4789445 0 +922 -1.209204833332978 0.5205895833335366 0 +923 0.2318457000003671 0.5810293999997886 0 +924 -0.1818849999994119 0.8191928999996614 0 +925 0.403856100000003 -0.2838141000004265 0 +926 0.4045259000000016 -0.3770660000002191 0 +927 -1.28392 -0.09831130000003313 0 +928 -0.3425111666664874 2.022826666666769 0 +929 -0.2603030666662063 2.06985266666693 0 +930 0.5176778000002656 2.416336999999847 0 +931 0.432031 2.46589 0 +932 1.264460000000002 1.500364999998955 0 +933 1.264283000000002 1.599544999998902 0 +934 0.4231225 0.5286135000000001 0 +935 0.4953817499998496 0.5709213333332452 0 +936 1.264627000000002 1.406934999998985 0 +937 1.264794000000001 1.313504999999241 0 +938 -0.1569717999997892 0.8625436999998786 0 +939 -0.07624550000001112 0.8160738000000064 0 +940 0.3373928000001725 0.5779636999999007 0 +941 0.2566664999999558 0.6244336000000255 0 +942 1.097282200000401 2.080989999999768 0 +943 1.177948200000223 2.034317999999871 0 +944 1.01163540000058 2.130542999999664 0 +945 0.8453226000009245 2.226767999999465 0 +946 0.9309694000008415 2.177214999999513 0 +947 -0.4141046000000025 1.803242833333737 0 +948 -0.413585100000004 1.719702666667309 0 +949 1.263772000000001 1.885584999999731 0 +950 1.263595 1.984765 0 +951 0.3593306666667638 2.424303333333389 0 +952 0.8850824499989779 0.7990896999994015 0 +953 0.8033550499989762 0.7512387999994006 0 +954 1.264971000000001 1.214324999999484 0 +955 1.265315 1.021715 0 +956 1.265138 1.120894999999714 0 +957 1.11132834999958 0.9315562666664206 0 +958 1.19305574999977 0.9794071666665324 0 +959 -0.1876027333326979 2.111439333333696 0 +960 -0.105394633332496 2.158465333333813 0 +961 0.004480799999986435 0.7696039000000078 0 +962 0.09021049999998274 0.7202537000000099 0 +963 -0.03269429999897361 2.200052000000587 0 +964 0.5771091499996683 0.6187722333331391 0 +965 1.264116000000002 1.692974999999167 0 +966 1.263939000000001 1.792154999999479 0 +967 0.5983438000004764 2.369664999999725 0 +968 -0.4129977000000048 1.62524566666743 0 +969 -0.4124782000000063 1.541705500001023 0 +970 0.6839906000006966 2.320111999999597 0 +971 0.9573416999991214 0.841397533332819 0 +972 0.04951380000089756 2.247078000000513 0 +973 -0.4107839000000041 1.269251333333998 0 +974 -0.4102644000000029 1.185711166667129 0 +975 -0.4146920000000011 1.897699833333507 0 +976 -0.4118908000000076 1.447248500001219 0 +977 -0.411371300000006 1.363708333334306 0 +978 0.7310957999992008 0.7089309666661988 0 +979 0.6493683999994455 0.661080066666342 0 +980 0.1709368000001935 0.6737837999998886 0 +981 -0.4091575 1.007714 0 +982 -0.3234277999997842 0.9583637999998758 0 +983 -0.2427014999999872 0.9118938999999926 0 +984 -0.4096770000000014 1.09125416666689 0 +985 0.2771225666669065 2.37727733333347 0 +986 0.7646566000009687 2.273439999999439 0 +987 0.1222141333340057 2.288664666667051 0 +988 1.039069099999355 0.8892484333329556 0 +989 0.2044222333337941 2.33569066666693 0 +990 -0.4152115 1.98124 0 +991 -1.32718 -2.507545 0 +992 -1.326529999999999 -2.592043333333464 0 +993 -1.597093333333015 -2.352475000000183 0 +994 -1.525466666666317 -2.393625000000201 0 +995 -1.324003333333331 -2.920346666666942 0 +996 -1.660423333333219 -2.316090000000066 0 +997 -1.324653333333329 -2.835848333333824 0 +998 -1.325266666666664 -2.756195000000376 0 +999 -1.325916666666664 -2.671696666666956 0 +1000 -1.398806666666521 -2.466395000000084 0 +1001 -1.462136666666373 -2.430010000000169 0 +1002 -0.8929759499989252 -2.289272999999389 0 +1003 -0.9659956999991339 -2.330747999999508 0 +1004 -0.8104035499989243 -2.242371999999389 0 +1005 0.3227073000002534 -2.459645000000148 0 +1006 0.2417053000004254 -2.412541000000247 0 +1007 -1.121587849999656 -2.419123999999805 0 +1008 -1.204160249999903 -2.466024999999945 0 +1009 -1.048568099999382 -2.377648999999649 0 +1010 0.1557311000006968 -2.362546000000405 0 +1011 -1.27718 -2.5075 0 +1012 0.4086815 -2.50964 0 +1013 -0.4261995 -2.024145 0 +1014 -0.340225299999758 -2.074140000000141 0 +1015 -1.275266666666667 -2.756165000000029 0 +1016 -1.274653333333334 -2.835833333333304 0 +1017 -1.275916666666667 -2.67166666666661 0 +1018 0.4085983333333331 -2.673093333333839 0 +1019 0.4085554999999998 -2.757216666667028 0 +1020 -0.4992192499998309 -2.065619999999904 0 +1021 -0.2592232999995613 -2.121244000000255 0 +1022 -0.09224709999900038 -2.218343000000581 0 +1023 -0.1732490999993077 -2.171239000000402 0 +1024 -1.276529999999999 -2.591998333333464 0 +1025 0.4085151666666665 -2.836546666666941 0 +1026 0.4084723333333332 -2.920670000000174 0 +1027 -1.274003333333335 -2.920331666666421 0 +1028 0.07472910000090666 -2.315442000000527 0 +1029 -0.6548113999994585 -2.153995999999692 0 +1030 -0.737383799999209 -2.200896999999551 0 +1031 -0.5817916499995837 -2.112520999999763 0 +1032 0.4086386666666665 -2.593763333333579 0 +1033 -0.01124509999912265 -2.26544700000051 0 +1034 0.5449045999997738 -2.459611000000131 0 +1035 0.6261571999995638 -2.412447000000253 0 +1036 0.4585151666666665 -2.83655333333355 0 +1037 0.4585554999999999 -2.757230000000087 0 +1038 0.4586815 -2.50966 0 +1039 1.514078333332975 -2.14735333333313 0 +1040 1.441389999999621 -2.106091666666452 0 +1041 1.659408333333218 -2.229849999999935 0 +1042 1.368748333333115 -2.064856666666543 0 +1043 1.29606 -2.023595 0 +1044 0.4584723333333333 -2.920676666666782 0 +1045 0.4585983333333332 -2.673106666666898 0 +1046 0.7123802999992785 -2.362398000000419 0 +1047 0.7936328999989836 -2.31523400000059 0 +1048 1.586719999999687 -2.188588333333156 0 +1049 1.128584299999471 -2.120808000000307 0 +1050 1.042361199999194 -2.170857000000468 0 +1051 0.4586386666666665 -2.593783333333579 0 +1052 1.209836899999744 -2.073644000000149 0 +1053 0.9611085999989735 -2.218021000000596 0 +1054 0.8798559999989615 -2.265185000000603 0 +1055 -0.4542760000000007 -1.111609999999809 0 +1056 -0.4539332000000016 -1.205597999999549 0 +1057 -0.9238501500010475 -0.7456345499994057 0 +1058 -0.8408298500010492 -0.7927289499994048 0 +1059 -1.660399999999892 -2.258440000000062 0 +1060 -1.58877333333311 -2.299590000000128 0 +1061 -1.450710000000429 -0.6095803333335865 0 +1062 -1.380333333333509 -0.568047500000104 0 +1063 -1.080253533333954 -0.6569127333329815 0 +1064 -0.9972332333341986 -0.7040071333328426 0 +1065 -0.8353634499989602 -2.19904699999941 0 +1066 -0.7623436999992449 -2.157571999999571 0 +1067 -1.517123333332992 -2.340755000000196 0 +1068 -1.445496666666294 -2.381905000000214 0 +1069 -0.4525196000000037 -1.593193999998977 0 +1070 -0.4528836000000035 -1.493383999999033 0 +1071 -0.451106 -1.98079 0 +1072 -0.451470000000001 -1.88097999999971 0 +1073 -0.9909822999992033 -2.287437999999547 0 +1074 -1.073581399999405 -2.334353999999662 0 +1075 -1.591380000000338 -0.692597166666866 0 +1076 -1.661673333333531 -0.7340811666667835 0 +1077 -0.6844264666672984 -0.8814507666663083 0 +1078 -0.6110433833337554 -0.923078183333094 0 +1079 -0.4535692000000028 -1.305407999999215 0 +1080 -0.4532264000000036 -1.399395999998998 0 +1081 -1.153636616667036 -0.6152853166664574 0 +1082 -0.9179625499989945 -2.245962999999429 0 +1083 -1.31004 -0.5265635 0 +1084 -1.146601149999679 -2.375828999999817 0 +1085 -1.229200249999904 -2.422744999999945 0 +1086 -1.30222 -2.46422 0 +1087 -1.373846666666521 -2.423070000000084 0 +1088 -0.6067248499996533 -2.069180999999803 0 +1089 -0.5241257499998309 -2.022264999999904 0 +1090 -0.5280230833335264 -0.9701725833332238 0 +1091 -0.45464 -1.0118 0 +1092 -0.767446766667546 -0.8343563666661679 0 +1093 -0.6797445999995281 -2.110655999999732 0 +1094 -1.236656916666806 -0.5681909166665877 0 +1095 -1.521003333333726 -0.6510643333335651 0 +1096 -0.451812800000002 -1.78699199999945 0 +1097 -0.452176800000003 -1.687181999999159 0 +1098 1.321959166666666 -1.086937916666891 0 +1099 1.321850166666667 -1.181748916666622 0 +1100 1.530661666666168 -2.099274999999717 0 +1101 1.457973333332814 -2.058013333333039 0 +1102 1.321139833333333 -1.80156758333346 0 +1103 1.321235666666666 -1.717721166666931 0 +1104 1.394551666666785 -0.9614333333332654 0 +1105 1.322055 -1.0030915 0 +1106 1.458720000000223 -0.9245601666665384 0 +1107 1.320935 -1.980225 0 +1108 1.321030833333333 -1.89637858333363 0 +1109 1.321754333333333 -1.265595333333534 0 +1110 1.659553333333495 -0.8091556666665737 0 +1111 1.595385000000291 -0.8460288333331663 0 +1112 1.531216666666933 -0.8829019999998468 0 +1113 1.595011666666258 -2.135801666666434 0 +1114 1.3215495 -1.444252750000174 0 +1115 1.3214405 -1.539063750000082 0 +1116 1.321645333333333 -1.360406333333305 0 +1117 1.321344666666667 -1.62291016666651 0 +1118 1.659361666666469 -2.172328333333221 0 +1119 1.393623333333115 -2.021486666666543 0 +1120 -1.333260000000003 0.09417939999898922 0 +1121 -1.333600000000003 -0.004935400001004092 0 +1122 -1.529486666666982 -0.5980123333335192 0 +1123 -1.467510000000324 -0.561436666666858 0 +1124 -1.59867999999959 0.6365529999997582 0 +1125 -1.527819999999651 0.594756499999794 0 +1126 -1.33194 0.479217 0 +1127 -1.402799999999856 0.521013499999915 0 +1128 -1.40553333333351 -0.524861000000104 0 +1129 -1.334900000000001 -0.3842622000002279 0 +1130 -1.334580000000001 -0.2908582000004261 0 +1131 -1.661189999999795 0.6734244999998793 0 +1132 -1.33524 -0.483377 0 +1133 -1.332600000000002 0.286698199999496 0 +1134 -1.332280000000001 0.3801021999997268 0 +1135 -1.599780000000279 -0.6394963333334978 0 +1136 -1.465309999999714 0.5578849999998314 0 +1137 -1.661756666666807 -0.6760720000000826 0 +1138 -1.332940000000002 0.1875833999992438 0 +1139 -1.334240000000003 -0.1917434000007169 0 +1140 -1.333920000000003 -0.09833940000098579 0 +1141 0.7562754999992081 0.665735066666203 0 +1142 0.8285347499989835 0.7080428999994048 0 +1143 0.4531445000000049 -0.1845261000006819 0 +1144 0.4538556000000029 -0.2835256000004086 0 +1145 0.4510938000000072 0.1009541999989982 0 +1146 0.4518049000000072 0.00195469999899392 0 +1147 0.9102472499989752 0.7558855999994001 0 +1148 1.364068333332984 0.9361415000002011 0 +1149 1.29045 0.9784945 0 +1150 1.659555000000145 -0.7514879999999169 0 +1151 1.210402000000201 -0.9099451000001157 0 +1152 1.128707300000393 -0.862975100000226 0 +1153 1.437649999999428 0.8938096666669957 0 +1154 1.297075 -0.9597775 0 +1155 0.4497129000000037 0.2931940999994764 0 +1156 0.4490431000000019 0.3864344999997394 0 +1157 0.6236042000004551 -0.5725679000002617 0 +1158 0.7102772000006929 -0.6224003000003985 0 +1159 0.7919719000008825 -0.6693703000005075 0 +1160 1.442066666667009 -0.8764618333331367 0 +1161 1.514563333333719 -0.834803666666445 0 +1162 1.042034300000661 -0.81314270000038 0 +1163 0.8736666000008841 -0.7163403000005084 0 +1164 0.9603396000008853 -0.766172700000509 0 +1165 1.218190749999771 0.9361866666665324 0 +1166 1.136478249999551 0.8883439666664039 0 +1167 1.064218999999326 0.8460361333329389 0 +1168 1.51126833333286 0.851456666666939 0 +1169 1.58705833333364 -0.7931461666664905 0 +1170 0.4552365 -0.4757655 0 +1171 0.5419095000002303 -0.5255979000001324 0 +1172 0.4545254000000016 -0.3767660000002191 0 +1173 0.452474700000007 -0.09128570000097641 0 +1174 1.658468333333103 0.7667718333334658 0 +1175 1.584849999999519 0.8091248333336101 0 +1176 0.9825064999991188 0.7981934333328174 0 +1177 0.5205912499998496 0.5277418333332453 0 +1178 0.6023037499996851 0.575584533333149 0 +1179 0.4504240000000054 0.1941945999992488 0 +1180 0.448332 0.485434 0 +1181 0.6745629999994622 0.6178923666663518 0 +1182 1.369571666666785 -0.9181193333332653 0 +1183 -1.306705 0.522382 0 +1184 -1.233969833332978 0.5640270833335366 0 +1185 -0.4624792000000068 1.541667500001097 0 +1186 -0.4629987000000052 1.625207666667503 0 +1187 -1.66095333333359 2.262288333333185 0 +1188 -0.531893666666537 0.9660039166667408 0 +1189 -0.4591585 1.007649 0 +1190 -0.882842200000849 2.222840000000491 0 +1191 -0.8013075000008825 2.175668000000511 0 +1192 -0.4602654000000029 1.185655166667142 0 +1193 -0.4607849000000042 1.269195333334011 0 +1194 -0.719772800000636 2.128496000000368 0 +1195 -0.9693550000008981 2.27289200000052 0 +1196 -0.7690830333324992 0.8302002333338109 0 +1197 -0.6868559333327451 0.87727953333367 0 +1198 -1.589850000000528 2.303299999999695 0 +1199 -1.518753333333846 2.344308333333037 0 +1200 -0.6141207666662523 0.9189246166669038 0 +1201 -1.050889700000684 2.320064000000396 0 +1202 -0.4635861000000035 1.719673666667226 0 +1203 -0.4646930000000011 1.897679833333507 0 +1204 -0.4652125 1.98122 0 +1205 -0.6332600000003987 2.078444000000231 0 +1206 -0.4596780000000014 1.09118916666689 0 +1207 -0.5517253000002227 2.031272000000129 0 +1208 -0.9967804666657167 0.6998307666672106 0 +1209 -0.9240452999989666 0.7414758500005917 0 +1210 -0.8418181999988752 0.788555150000644 0 +1211 -0.464105600000002 1.803213833333654 0 +1212 -1.519346666666307 0.6478081666664544 0 +1213 -1.590268333333035 0.6896413333331572 0 +1214 -0.4618918000000075 1.447201500001201 0 +1215 -1.447650000000452 2.38531999999974 0 +1216 -1.137402500000337 2.370116000000195 0 +1217 -1.376553333333543 2.426328333333212 0 +1218 -1.218937200000162 2.417288000000094 0 +1219 -1.30545 2.46734 0 +1220 -1.661128333333239 0.7314378333332779 0 +1221 -1.377564999999856 0.5641784999999151 0 +1222 -0.461372300000006 1.363661333334288 0 +1223 -1.151742733332586 0.6111063833337613 0 +1224 -1.079007566665763 0.6527514666671838 0 +1225 -1.448486666666367 0.6060116666664901 0 +1226 1.658136666666389 2.184666666666505 0 +1227 1.314283000000002 1.599638999998911 0 +1228 1.314116000000002 1.693046999999184 0 +1229 1.45307999999967 2.065723333333142 0 +1230 1.518651666666339 2.103758333333143 0 +1231 1.388933333332984 0.9795220000002012 0 +1232 1.4542266666665 0.9419580000000957 0 +1233 1.658431666666416 0.8244770000001443 0 +1234 1.593138333333252 0.8620410000000469 0 +1235 1.527844999999933 0.8996050000000388 0 +1236 1.314794000000001 1.313642999999237 0 +1237 1.314627000000002 1.407050999999042 0 +1238 1.387508333333128 2.027688333333214 0 +1239 1.592564999999599 2.146631666666434 0 +1240 1.313939000000001 1.792226999999496 0 +1241 1.313772000000001 1.885634999999731 0 +1242 1.314450000000002 1.506230999998989 0 +1243 1.313595 1.984815 0 +1244 1.315138000000001 1.121054999999714 0 +1245 1.315315 1.021875 0 +1246 1.314971000000001 1.214462999999479 0 +1247 -1.329516666666666 2.594695000000029 0 +1248 -1.330295 2.51073 0 +1249 -1.527028333333742 2.397254999999764 0 +1250 -1.464213333333601 2.433486666666512 0 +1251 -1.326493333333334 2.920874999999986 0 +1252 -1.327271666666669 2.836909999999784 0 +1253 -1.328005000000003 2.757784999999639 0 +1254 -1.328783333333335 2.67381999999987 0 +1255 -1.598131666667136 2.356243333333063 0 +1256 -1.660946666666938 2.32001166666651 0 +1257 -1.401398333333543 2.469718333333212 0 +1258 -0.2126167333331301 2.15473233333345 0 +1259 -0.2853170666666385 2.113145666666683 0 +1260 0.4060011666666686 2.757008333332856 0 +1261 0.4063545000000018 2.672796666666219 0 +1262 0.4053146666666673 2.920609999999841 0 +1263 0.4056680000000016 2.836398333332943 0 +1264 -0.4402315 2.02453 0 +1265 -0.5267443000002227 2.074582000000129 0 +1266 -1.277268333333335 2.836849999999813 0 +1267 -1.278003333333334 2.757664999999957 0 +1268 -0.05770229999974374 2.243348000000147 0 +1269 -0.1304026333332661 2.201761333333372 0 +1270 -0.7762569000008647 2.218938000000501 0 +1271 -0.6947570000005165 2.171786000000299 0 +1272 -0.8577568000008082 2.266090000000467 0 +1273 -0.9442696000008572 2.316142000000496 0 +1274 0.4066876666666675 2.593406666666464 0 +1275 -1.02576950000059 2.363294000000341 0 +1276 -0.6082442000002792 2.121734000000162 0 +1277 -1.278781666666665 2.673700000000188 0 +1278 -1.27649 2.920815000000014 0 +1279 0.09721213333337589 2.331963666666691 0 +1280 0.02451180000026776 2.290377000000153 0 +1281 0.3343406666667639 2.467608333333389 0 +1282 0.252126566666603 2.420579333333297 0 +1283 -1.193782200000162 2.460498000000094 0 +1284 -1.280295 2.51055 0 +1285 -1.112282300000242 2.41334600000014 0 +1286 0.1794262333334907 2.378992666666757 0 +1287 -1.279516666666666 2.594515000000029 0 +1288 0.407041 2.509195 0 +1289 -0.3675311666664874 2.066116666666769 0 +1290 1.510299999999571 2.156714999999751 0 +1291 1.584218333332839 2.199593333333047 0 +1292 0.5426883000002656 2.459631999999846 0 +1293 0.4570415 2.509185 0 +1294 0.7089910000002687 2.363412999999845 0 +1295 0.6233442000000486 2.412965999999972 0 +1296 1.362468333333128 2.070963333333214 0 +1297 1.43638666666631 2.11384166666646 0 +1298 0.9559496000000876 2.220527999999949 0 +1299 0.8703028000001706 2.270080999999902 0 +1300 0.7896469000000768 2.316746999999956 0 +1301 1.122252300000067 2.124308999999961 0 +1302 1.202908200000223 2.077642999999871 0 +1303 1.036605500000247 2.173861999999857 0 +1304 1.288555 2.02809 0 +1305 0.4553151666666673 2.920606666666508 0 +1306 0.4556685000000016 2.83639499999961 0 +1307 0.4566881666666675 2.593396666666465 0 +1308 0.4560016666666677 2.757001666666421 0 +1309 1.658131666666451 2.242466666666541 0 +1310 0.4563550000000009 2.672789999999783 0 +$EndNodes +$Elements +546 +1 15 2 2 6655 66 +2 15 2 1 6708 67 +3 15 2 3 7077 72 +4 15 2 4 8569 93 +5 8 2 4 769 66 68 621 +6 8 2 1 770 67 65 622 +7 8 2 1 774 65 71 638 +8 8 2 1 775 70 69 639 +9 8 2 2 779 72 74 655 +10 8 2 1 780 73 69 656 +11 8 2 4 784 66 76 672 +12 8 2 4 785 77 75 673 +13 8 2 2 789 72 79 689 +14 8 2 2 790 80 78 690 +15 8 2 4 794 81 83 706 +16 8 2 4 795 82 75 707 +17 8 2 2 799 84 85 723 +18 8 2 2 800 86 78 724 +19 8 2 4 804 81 89 740 +20 8 2 4 805 88 87 741 +21 8 2 2 809 90 91 757 +22 8 2 2 810 92 84 758 +23 8 2 3 814 93 95 774 +24 8 2 4 815 94 87 775 +25 8 2 3 819 96 97 791 +26 8 2 3 820 98 93 792 +27 8 2 2 823 90 99 803 +28 8 2 3 824 100 96 804 +29 9 2 11 50 253 254 207 258 805 806 +30 9 2 11 50 30 260 215 264 807 808 +31 9 2 11 50 4 28 139 809 810 143 +32 9 2 11 50 141 245 142 811 812 146 +33 9 2 11 50 170 169 279 174 813 814 +34 9 2 11 50 2 29 204 815 816 209 +35 9 2 11 50 4 101 28 105 817 809 +36 9 2 11 50 101 102 236 106 818 819 +37 9 2 11 50 251 252 205 256 820 821 +38 9 2 11 50 102 103 235 107 822 823 +39 9 2 11 50 28 101 236 817 819 241 +40 9 2 11 50 252 253 206 257 824 825 +41 9 2 11 50 140 243 141 826 827 145 +42 9 2 11 50 28 242 139 246 828 810 +43 9 2 11 50 139 242 140 828 829 144 +44 9 2 11 50 142 29 2 830 815 147 +45 9 2 11 50 29 251 204 255 831 816 +46 9 2 11 50 216 262 217 832 833 221 +47 9 2 11 50 30 215 3 808 219 834 +48 9 2 11 50 270 225 269 835 836 274 +49 9 2 11 50 272 227 226 837 231 838 +50 9 2 11 50 217 263 218 839 840 222 +51 9 2 11 50 269 224 31 841 842 273 +52 9 2 11 50 205 252 206 820 825 211 +53 9 2 11 50 171 170 281 175 843 844 +54 9 2 11 50 272 226 271 838 845 276 +55 9 2 11 50 204 251 205 831 821 210 +56 9 2 11 50 8 171 27 176 846 847 +57 9 2 11 50 271 226 270 845 848 275 +58 9 2 11 50 260 261 216 265 849 850 +59 9 2 11 50 104 27 233 851 237 852 +60 9 2 11 50 170 279 280 814 284 853 +61 9 2 11 50 278 168 32 854 855 282 +62 9 2 11 50 169 168 278 173 854 856 +63 9 2 11 50 104 8 27 109 847 851 +64 9 2 11 50 207 254 208 805 857 213 +65 9 2 11 50 206 253 207 824 806 212 +66 9 2 11 50 141 244 245 858 249 811 +67 9 2 11 50 279 169 278 813 856 283 +68 9 2 11 50 208 30 3 859 834 214 +69 9 2 11 50 27 171 281 846 844 286 +70 9 2 11 50 243 244 141 248 858 827 +71 9 2 11 50 32 227 272 860 837 277 +72 9 2 11 50 242 243 140 247 826 829 +73 9 2 11 50 281 170 280 843 853 285 +74 9 2 11 50 103 233 234 861 238 862 +75 9 2 11 50 236 102 235 818 823 240 +76 9 2 11 50 142 245 29 812 250 830 +77 9 2 11 50 235 103 234 822 862 239 +78 9 2 11 50 103 104 233 108 852 861 +79 9 2 11 50 260 216 215 850 220 807 +80 9 2 11 50 261 262 216 266 832 849 +81 9 2 11 50 262 263 217 267 839 833 +82 9 2 11 50 226 225 270 230 835 848 +83 9 2 11 50 263 31 218 268 863 840 +84 9 2 11 50 225 224 269 229 841 836 +85 9 2 11 50 32 7 227 864 232 860 +86 9 2 11 50 168 7 32 172 864 855 +87 9 2 11 50 254 30 208 259 859 857 +88 9 2 11 50 224 1 31 228 865 842 +89 9 2 11 50 218 31 1 863 865 223 +90 9 2 11 60 157 6 38 162 866 867 +91 9 2 11 60 371 372 316 376 868 869 +92 9 2 11 60 41 323 9 870 327 871 +93 9 2 11 60 161 160 355 166 872 873 +94 9 2 11 60 316 373 317 874 875 321 +95 9 2 11 60 160 159 354 165 876 877 +96 9 2 11 60 380 381 324 385 878 879 +97 9 2 11 60 355 160 354 872 877 359 +98 9 2 11 60 226 362 225 880 881 230 +99 9 2 11 60 315 371 316 882 869 320 +100 9 2 11 60 39 161 355 883 873 360 +101 9 2 11 60 370 371 315 375 882 884 +102 9 2 11 60 379 380 324 384 879 885 +103 9 2 11 60 391 335 390 886 887 395 +104 9 2 11 60 343 299 37 888 889 347 +105 9 2 11 60 317 41 9 890 871 322 +106 9 2 11 60 324 381 325 878 891 329 +107 9 2 11 60 390 334 389 892 893 394 +108 9 2 11 60 334 333 389 339 894 893 +109 9 2 11 60 227 361 226 895 896 231 +110 9 2 11 60 345 298 344 897 898 349 +111 9 2 11 60 354 159 353 876 899 358 +112 9 2 11 60 158 157 352 163 900 901 +113 9 2 11 60 6 296 38 300 902 866 +114 9 2 11 60 7 161 39 167 883 903 +115 9 2 11 60 7 39 227 903 904 232 +116 9 2 11 60 296 297 346 301 905 906 +117 9 2 11 60 38 296 346 902 906 351 +118 9 2 11 60 157 38 352 867 356 900 +119 9 2 11 60 159 158 353 164 907 899 +120 9 2 11 60 224 40 1 908 909 228 +121 9 2 11 60 362 363 225 367 910 881 +122 9 2 11 60 298 299 343 303 888 911 +123 9 2 11 60 391 336 335 912 341 886 +124 9 2 11 60 344 298 343 898 911 348 +125 9 2 11 60 388 332 42 913 914 392 +126 9 2 11 60 333 332 388 338 913 915 +127 9 2 11 60 372 373 316 377 874 868 +128 9 2 11 60 382 42 326 387 916 917 +129 9 2 11 60 225 364 224 918 919 229 +130 9 2 11 60 326 42 15 916 920 331 +131 9 2 11 60 37 16 336 921 342 922 +132 9 2 11 60 225 363 364 910 368 918 +133 9 2 11 60 37 336 391 922 912 396 +134 9 2 11 60 41 379 323 383 923 870 +135 9 2 11 60 325 382 326 924 917 330 +136 9 2 11 60 40 370 314 374 925 926 +137 9 2 11 60 346 297 345 905 927 350 +138 9 2 11 60 39 361 227 365 895 904 +139 9 2 11 60 158 352 353 901 357 907 +140 9 2 11 60 314 370 315 925 884 319 +141 9 2 11 60 297 298 345 302 897 927 +142 9 2 11 60 1 40 314 909 926 318 +143 9 2 11 60 224 364 40 919 369 908 +144 9 2 11 60 390 335 334 887 340 892 +145 9 2 11 60 299 16 37 304 921 889 +146 9 2 11 60 361 362 226 366 880 896 +147 9 2 11 60 379 324 323 885 328 923 +148 9 2 11 60 381 382 325 386 924 891 +149 9 2 11 60 373 41 317 378 890 875 +150 9 2 11 60 389 333 388 894 915 393 +151 9 2 11 60 332 15 42 337 920 914 +152 9 2 11 72 56 504 550 928 929 555 +153 9 2 11 72 494 55 11 930 931 499 +154 9 2 11 72 483 531 484 932 933 488 +155 9 2 11 72 9 52 397 934 935 402 +156 9 2 11 72 529 530 483 534 936 937 +157 9 2 11 72 325 511 512 938 516 939 +158 9 2 11 72 52 323 514 940 941 519 +159 9 2 11 72 54 538 491 542 942 943 +160 9 2 11 72 538 492 491 944 496 942 +161 9 2 11 72 539 493 492 945 497 946 +162 9 2 11 72 538 539 492 543 946 944 +163 9 2 11 72 445 444 556 450 947 948 +164 9 2 11 72 485 54 12 949 950 490 +165 9 2 11 72 500 11 55 505 931 951 +166 9 2 11 72 521 522 399 526 952 953 +167 9 2 11 72 482 529 483 954 937 487 +168 9 2 11 72 9 323 52 327 940 934 +169 9 2 11 72 10 53 482 955 956 486 +170 9 2 11 72 401 523 53 957 528 958 +171 9 2 11 72 550 503 549 959 960 554 +172 9 2 11 72 324 325 513 329 961 962 +173 9 2 11 72 549 503 502 960 508 963 +174 9 2 11 72 52 520 397 524 964 935 +175 9 2 11 72 53 529 482 533 954 956 +176 9 2 11 72 513 325 512 961 939 517 +177 9 2 11 72 484 532 485 965 966 489 +178 9 2 11 72 541 55 494 546 930 967 +179 9 2 11 72 446 445 557 451 968 969 +180 9 2 11 72 493 541 494 970 967 498 +181 9 2 11 72 399 522 400 952 971 405 +182 9 2 11 72 532 54 485 537 949 966 +183 9 2 11 72 549 502 548 963 972 553 +184 9 2 11 72 448 447 559 453 973 974 +185 9 2 11 72 556 444 56 947 975 560 +186 9 2 11 72 550 504 503 929 509 959 +187 9 2 11 72 558 446 557 976 969 562 +188 9 2 11 72 559 447 558 973 977 563 +189 9 2 11 72 520 521 398 525 978 979 +190 9 2 11 72 323 324 514 328 980 941 +191 9 2 11 72 326 15 51 331 981 982 +192 9 2 11 72 397 520 398 964 979 403 +193 9 2 11 72 325 326 511 330 983 938 +194 9 2 11 72 447 446 558 452 976 977 +195 9 2 11 72 401 53 10 958 955 407 +196 9 2 11 72 51 448 559 984 974 564 +197 9 2 11 72 547 500 55 985 951 551 +198 9 2 11 72 539 540 493 544 986 945 +199 9 2 11 72 557 445 556 968 948 561 +200 9 2 11 72 54 491 12 943 495 950 +201 9 2 11 72 326 51 511 982 515 983 +202 9 2 11 72 502 501 548 507 987 972 +203 9 2 11 72 400 523 401 988 957 406 +204 9 2 11 72 15 448 51 454 984 981 +205 9 2 11 72 548 501 547 987 989 552 +206 9 2 11 72 444 14 56 449 990 975 +207 9 2 11 72 56 14 504 990 510 928 +208 9 2 11 72 531 532 484 536 965 933 +209 9 2 11 72 400 522 523 971 527 988 +210 9 2 11 72 540 541 493 545 970 986 +211 9 2 11 72 501 500 547 506 985 989 +212 9 2 11 72 514 324 513 980 962 518 +213 9 2 11 72 483 530 531 936 535 932 +214 9 2 11 72 398 521 399 978 953 404 +215 9 2 11 110 602 5 17 605 991 992 +216 9 2 11 110 606 607 617 609 993 994 +217 9 2 11 110 67 65 611 622 995 613 +218 9 2 11 110 607 66 68 610 621 996 +219 9 2 11 110 617 607 68 993 996 620 +220 9 2 11 110 611 601 612 997 998 614 +221 9 2 11 110 601 602 612 604 999 998 +222 9 2 11 110 17 606 616 1000 1001 618 +223 9 2 11 110 65 601 611 603 997 995 +224 9 2 11 110 612 602 17 999 992 615 +225 9 2 11 110 616 606 617 1001 994 619 +226 9 2 11 110 17 5 606 991 608 1000 +227 9 2 11 111 132 112 113 1002 118 1003 +228 9 2 11 111 132 131 112 136 1004 1002 +229 9 2 11 111 18 101 121 1005 1006 125 +230 9 2 11 111 20 133 114 138 1007 1008 +231 9 2 11 111 133 132 113 137 1003 1009 +232 9 2 11 111 121 101 102 1006 106 1010 +233 9 2 11 111 20 114 5 1008 120 1011 +234 9 2 11 111 133 113 114 1009 119 1007 +235 9 2 11 111 18 4 101 1012 105 1005 +236 9 2 11 111 104 8 19 109 1013 1014 +237 9 2 11 111 634 633 601 636 1015 1016 +238 9 2 11 111 601 633 602 1015 1017 604 +239 9 2 11 111 623 624 629 626 1018 1019 +240 9 2 11 111 110 19 8 1020 1013 115 +241 9 2 11 111 124 104 19 1021 1014 129 +242 9 2 11 111 123 103 124 1022 1023 128 +243 9 2 11 111 103 104 124 108 1021 1023 +244 9 2 11 111 633 20 602 635 1024 1017 +245 9 2 11 111 69 623 628 625 1025 1026 +246 9 2 11 111 65 71 634 638 637 1027 +247 9 2 11 111 65 634 601 1027 1016 603 +248 9 2 11 111 121 102 122 1010 1028 126 +249 9 2 11 111 70 69 628 639 1026 630 +250 9 2 11 111 628 623 629 1025 1019 631 +251 9 2 11 111 602 20 5 1024 1011 605 +252 9 2 11 111 131 130 111 135 1029 1030 +253 9 2 11 111 111 130 110 1029 1031 116 +254 9 2 11 111 130 19 110 134 1020 1031 +255 9 2 11 111 629 624 18 1018 1032 632 +256 9 2 11 111 122 102 103 1028 107 1033 +257 9 2 11 111 624 4 18 627 1012 1032 +258 9 2 11 111 112 131 111 1004 1030 117 +259 9 2 11 111 122 103 123 1033 1022 127 +260 9 2 11 112 21 139 148 1034 1035 152 +261 9 2 11 112 645 623 646 1036 1037 648 +262 9 2 11 112 21 4 139 1038 143 1034 +263 9 2 11 112 641 650 640 1039 1040 643 +264 9 2 11 112 74 651 72 654 1041 655 +265 9 2 11 112 640 22 2 1042 1043 642 +266 9 2 11 112 69 645 73 1044 647 656 +267 9 2 11 112 623 624 646 626 1045 1037 +268 9 2 11 112 69 623 645 625 1036 1044 +269 9 2 11 112 148 139 140 1035 144 1046 +270 9 2 11 112 148 140 149 1046 1047 153 +271 9 2 11 112 72 651 641 1041 1048 644 +272 9 2 11 112 141 142 151 146 1049 1050 +273 9 2 11 112 650 22 640 652 1042 1040 +274 9 2 11 112 624 4 21 627 1038 1051 +275 9 2 11 112 651 650 641 653 1039 1048 +276 9 2 11 112 646 624 21 1045 1051 649 +277 9 2 11 112 151 142 22 1049 1052 156 +278 9 2 11 112 150 141 151 1053 1050 155 +279 9 2 11 112 149 140 141 1047 145 1054 +280 9 2 11 112 149 141 150 1054 1053 154 +281 9 2 11 112 142 2 22 147 1043 1052 +282 9 2 11 113 195 26 168 199 1055 1056 +283 9 2 11 113 188 187 159 192 1057 1058 +284 9 2 11 113 607 66 663 610 1059 1060 +285 9 2 11 113 668 658 25 1061 1062 671 +286 9 2 11 113 187 186 158 191 1063 1064 +287 9 2 11 113 663 66 76 1059 672 666 +288 9 2 11 113 112 178 111 1065 1066 117 +289 9 2 11 113 606 607 662 609 1067 1068 +290 9 2 11 113 662 607 663 1067 1060 665 +291 9 2 11 113 170 197 169 1069 1070 174 +292 9 2 11 113 8 23 171 1071 1072 176 +293 9 2 11 113 180 179 113 184 1073 1074 +294 9 2 11 113 75 657 667 659 1075 1076 +295 9 2 11 113 189 160 161 1077 166 1078 +296 9 2 11 113 196 195 169 200 1079 1080 +297 9 2 11 113 158 186 157 1063 1081 163 +298 9 2 11 113 179 178 112 183 1065 1082 +299 9 2 11 113 658 6 25 661 1083 1062 +300 9 2 11 113 113 179 112 1073 1082 118 +301 9 2 11 113 24 180 114 185 1084 1085 +302 9 2 11 113 114 180 113 1084 1074 119 +303 9 2 11 113 5 24 114 1086 1085 120 +304 9 2 11 113 5 606 24 608 1087 1086 +305 9 2 11 113 110 177 23 1088 181 1089 +306 9 2 11 113 169 195 168 1079 1056 173 +307 9 2 11 113 24 606 662 1087 1068 664 +308 9 2 11 113 159 187 158 1057 1064 164 +309 9 2 11 113 26 161 7 1090 167 1091 +310 9 2 11 113 189 188 160 193 1092 1077 +311 9 2 11 113 168 26 7 1055 1091 172 +312 9 2 11 113 26 189 161 194 1078 1090 +313 9 2 11 113 111 177 110 1093 1088 116 +314 9 2 11 113 157 25 6 1094 1083 162 +315 9 2 11 113 110 23 8 1089 1071 115 +316 9 2 11 113 197 196 169 201 1080 1070 +317 9 2 11 113 667 657 668 1075 1095 670 +318 9 2 11 113 77 75 667 673 1076 669 +319 9 2 11 113 111 178 177 1066 182 1093 +320 9 2 11 113 23 198 171 203 1096 1072 +321 9 2 11 113 188 159 160 1058 165 1092 +322 9 2 11 113 198 197 170 202 1069 1097 +323 9 2 11 113 171 198 170 1096 1097 175 +324 9 2 11 113 657 658 668 660 1061 1095 +325 9 2 11 113 186 25 157 190 1094 1081 +326 9 2 11 114 287 33 208 291 1098 1099 +327 9 2 11 114 641 679 640 1100 1101 643 +328 9 2 11 114 204 290 205 1102 1103 210 +329 9 2 11 114 33 675 3 1104 678 1105 +330 9 2 11 114 33 685 675 688 1106 1104 +331 9 2 11 114 2 34 204 1107 1108 209 +332 9 2 11 114 207 287 208 1109 1099 213 +333 9 2 11 114 684 80 674 686 1110 1111 +334 9 2 11 114 685 684 674 687 1111 1112 +335 9 2 11 114 641 680 679 1113 682 1100 +336 9 2 11 114 289 288 206 293 1114 1115 +337 9 2 11 114 208 33 3 1098 1105 214 +338 9 2 11 114 288 287 207 292 1109 1116 +339 9 2 11 114 206 288 207 1114 1116 212 +340 9 2 11 114 290 289 205 294 1117 1103 +341 9 2 11 114 674 80 78 1110 690 676 +342 9 2 11 114 685 674 675 1112 677 1106 +343 9 2 11 114 34 290 204 295 1102 1108 +344 9 2 11 114 205 289 206 1117 1115 211 +345 9 2 11 114 72 79 641 689 1118 644 +346 9 2 11 114 79 680 641 683 1113 1118 +347 9 2 11 114 640 34 2 1119 1107 642 +348 9 2 11 114 640 679 34 1101 681 1119 +349 9 2 11 115 297 298 307 302 1120 1121 +350 9 2 11 115 696 658 697 1122 1123 699 +351 9 2 11 115 691 692 702 694 1124 1125 +352 9 2 11 115 36 16 691 1126 693 1127 +353 9 2 11 115 658 35 697 1128 700 1123 +354 9 2 11 115 35 296 305 1129 1130 309 +355 9 2 11 115 702 692 83 1124 1131 705 +356 9 2 11 115 658 6 35 661 1132 1128 +357 9 2 11 115 6 296 35 300 1129 1132 +358 9 2 11 115 308 299 36 1133 1134 313 +359 9 2 11 115 657 658 696 660 1122 1135 +360 9 2 11 115 701 691 702 1136 1125 704 +361 9 2 11 115 692 81 83 695 706 1131 +362 9 2 11 115 82 657 696 1137 1135 698 +363 9 2 11 115 298 299 308 303 1133 1138 +364 9 2 11 115 296 297 305 301 1139 1130 +365 9 2 11 115 297 307 306 1121 311 1140 +366 9 2 11 115 36 691 701 1127 1136 703 +367 9 2 11 115 305 297 306 1139 1140 310 +368 9 2 11 115 307 298 308 1120 1138 312 +369 9 2 11 115 299 16 36 304 1126 1134 +370 9 2 11 115 75 657 82 659 1137 707 +371 9 2 11 116 427 398 399 1141 404 1142 +372 9 2 11 116 314 315 417 319 1143 1144 +373 9 2 11 116 315 316 419 320 1145 1146 +374 9 2 11 116 427 399 428 1142 1147 432 +375 9 2 11 116 708 43 10 1148 1149 710 +376 9 2 11 116 718 86 78 720 724 1150 +377 9 2 11 116 44 215 408 1151 1152 412 +378 9 2 11 116 713 43 708 715 1148 1153 +379 9 2 11 116 3 215 44 219 1151 1154 +380 9 2 11 116 420 317 46 1155 1156 425 +381 9 2 11 116 217 218 411 222 1157 1158 +382 9 2 11 116 217 411 410 1158 415 1159 +383 9 2 11 116 675 719 674 1160 1161 677 +384 9 2 11 116 215 216 408 220 1162 1152 +385 9 2 11 116 216 217 409 221 1163 1164 +386 9 2 11 116 401 10 43 407 1149 1165 +387 9 2 11 116 400 401 429 406 1166 1167 +388 9 2 11 116 709 713 708 1168 1153 711 +389 9 2 11 116 674 718 78 1169 1150 676 +390 9 2 11 116 409 217 410 1163 1159 414 +391 9 2 11 116 218 1 45 223 1170 1171 +392 9 2 11 116 719 718 674 721 1169 1161 +393 9 2 11 116 1 314 45 318 1172 1170 +394 9 2 11 116 315 419 418 1146 423 1173 +395 9 2 11 116 408 216 409 1162 1164 413 +396 9 2 11 116 84 714 709 1174 1175 712 +397 9 2 11 116 428 400 429 1176 1167 433 +398 9 2 11 116 46 397 426 1177 1178 430 +399 9 2 11 116 419 316 420 1145 1179 424 +400 9 2 11 116 46 9 397 1180 402 1177 +401 9 2 11 116 714 713 709 716 1168 1175 +402 9 2 11 116 316 317 420 321 1155 1179 +403 9 2 11 116 45 314 417 1172 1144 421 +404 9 2 11 116 218 45 411 1171 416 1157 +405 9 2 11 116 429 401 43 1166 1165 434 +406 9 2 11 116 426 397 398 1178 403 1181 +407 9 2 11 116 317 9 46 322 1180 1156 +408 9 2 11 116 417 315 418 1143 1173 422 +409 9 2 11 116 399 400 428 405 1176 1147 +410 9 2 11 116 426 398 427 1181 1141 431 +411 9 2 11 116 85 714 84 717 1174 723 +412 9 2 11 116 44 719 675 722 1160 1182 +413 9 2 11 116 3 44 675 1154 1182 678 +414 9 2 11 117 16 50 336 1183 1184 342 +415 9 2 11 117 446 465 445 1185 1186 451 +416 9 2 11 117 88 87 730 741 1187 732 +417 9 2 11 117 332 49 15 1188 1189 337 +418 9 2 11 117 457 456 437 461 1190 1191 +419 9 2 11 117 448 467 447 1192 1193 453 +420 9 2 11 117 458 457 437 462 1191 1194 +421 9 2 11 117 437 456 436 1190 1195 441 +422 9 2 11 117 333 474 473 1196 478 1197 +423 9 2 11 117 730 725 731 1198 1199 733 +424 9 2 11 117 333 473 332 1197 1200 338 +425 9 2 11 117 456 455 436 460 1201 1195 +426 9 2 11 117 465 464 445 469 1202 1186 +427 9 2 11 117 444 48 14 1203 1204 449 +428 9 2 11 117 458 437 438 1194 442 1205 +429 9 2 11 117 49 467 448 472 1192 1206 +430 9 2 11 117 48 438 14 1207 443 1204 +431 9 2 11 117 335 475 334 1208 1209 340 +432 9 2 11 117 475 474 334 479 1210 1209 +433 9 2 11 117 445 464 444 1202 1211 450 +434 9 2 11 117 332 473 49 1200 477 1188 +435 9 2 11 117 735 692 736 1212 1213 738 +436 9 2 11 117 334 474 333 1210 1196 339 +437 9 2 11 117 466 465 446 470 1185 1214 +438 9 2 11 117 725 726 731 728 1215 1199 +439 9 2 11 117 436 455 435 1201 1216 440 +440 9 2 11 117 731 726 47 1215 1217 734 +441 9 2 11 117 455 47 435 459 1218 1216 +442 9 2 11 117 726 13 47 729 1219 1217 +443 9 2 11 117 692 81 736 695 1220 1213 +444 9 2 11 117 435 47 13 1218 1219 439 +445 9 2 11 117 736 81 89 1220 740 739 +446 9 2 11 117 16 691 50 693 1221 1183 +447 9 2 11 117 464 48 444 468 1203 1211 +448 9 2 11 117 447 466 446 1222 1214 452 +449 9 2 11 117 336 476 335 1223 1224 341 +450 9 2 11 117 691 692 735 694 1212 1225 +451 9 2 11 117 48 458 438 463 1205 1207 +452 9 2 11 117 15 49 448 1189 1206 454 +453 9 2 11 117 87 725 730 727 1198 1187 +454 9 2 11 117 50 476 336 481 1223 1184 +455 9 2 11 117 50 691 735 1221 1225 737 +456 9 2 11 117 467 466 447 471 1222 1193 +457 9 2 11 117 476 475 335 480 1208 1224 +458 9 2 11 118 743 90 91 746 757 1226 +459 9 2 11 118 567 484 568 1227 1228 572 +460 9 2 11 118 747 742 748 1229 1230 750 +461 9 2 11 118 708 58 753 1231 756 1232 +462 9 2 11 118 92 709 752 1233 1234 754 +463 9 2 11 118 709 753 752 1235 755 1234 +464 9 2 11 118 709 708 753 711 1232 1235 +465 9 2 11 118 565 483 566 1236 1237 570 +466 9 2 11 118 57 742 747 1238 1229 749 +467 9 2 11 118 742 743 748 745 1239 1230 +468 9 2 11 118 568 485 57 1240 1241 573 +469 9 2 11 118 566 484 567 1242 1227 571 +470 9 2 11 118 485 12 57 490 1243 1241 +471 9 2 11 118 10 482 58 486 1244 1245 +472 9 2 11 118 708 10 58 710 1245 1231 +473 9 2 11 118 84 709 92 712 1233 758 +474 9 2 11 118 57 12 742 1243 744 1238 +475 9 2 11 118 748 743 91 1239 1226 751 +476 9 2 11 118 58 482 565 1244 1246 569 +477 9 2 11 118 482 483 565 487 1236 1246 +478 9 2 11 118 484 485 568 489 1240 1228 +479 9 2 11 118 483 484 566 488 1242 1237 +480 9 2 11 119 13 759 59 761 1247 1248 +481 9 2 11 119 764 726 765 1249 1250 767 +482 9 2 11 119 770 93 95 1251 774 773 +483 9 2 11 119 760 93 770 763 1251 1252 +484 9 2 11 119 769 760 770 1253 1252 772 +485 9 2 11 119 59 759 769 1247 1254 771 +486 9 2 11 119 725 726 764 728 1249 1255 +487 9 2 11 119 87 725 94 727 1256 775 +488 9 2 11 119 726 13 59 729 1248 1257 +489 9 2 11 119 726 59 765 1257 768 1250 +490 9 2 11 119 94 725 764 1256 1255 766 +491 9 2 11 119 759 760 769 762 1253 1254 +492 9 2 11 120 504 503 574 509 1258 1259 +493 9 2 11 120 776 777 781 779 1260 1261 +494 9 2 11 120 777 96 782 780 1262 1263 +495 9 2 11 120 14 60 438 1264 1265 443 +496 9 2 11 120 787 786 760 789 1266 1267 +497 9 2 11 120 503 502 575 508 1268 1269 +498 9 2 11 120 586 585 437 590 1270 1271 +499 9 2 11 120 437 584 436 1272 1273 441 +500 9 2 11 120 437 585 584 1270 589 1272 +501 9 2 11 120 61 776 781 1274 1261 783 +502 9 2 11 120 436 584 583 1273 588 1275 +503 9 2 11 120 60 586 438 591 1276 1265 +504 9 2 11 120 781 777 782 1260 1263 784 +505 9 2 11 120 759 787 760 1277 1267 762 +506 9 2 11 120 786 98 93 788 792 1278 +507 9 2 11 120 502 501 576 507 1279 1280 +508 9 2 11 120 438 586 437 1276 1271 442 +509 9 2 11 120 500 61 577 1281 582 1282 +510 9 2 11 120 574 503 575 1258 1269 579 +511 9 2 11 120 435 62 13 1283 1284 439 +512 9 2 11 120 436 583 435 1275 1285 440 +513 9 2 11 120 501 577 576 1286 581 1279 +514 9 2 11 120 501 500 577 506 1282 1286 +515 9 2 11 120 575 502 576 1268 1280 580 +516 9 2 11 120 62 787 759 790 1277 1287 +517 9 2 11 120 11 776 61 778 1274 1288 +518 9 2 11 120 13 62 759 1284 1287 761 +519 9 2 11 120 760 786 93 1266 1278 763 +520 9 2 11 120 500 11 61 505 1288 1281 +521 9 2 11 120 14 504 60 510 1289 1264 +522 9 2 11 120 60 504 574 1289 1259 578 +523 9 2 11 120 782 96 97 1262 791 785 +524 9 2 11 120 435 583 62 1285 587 1283 +525 9 2 11 121 793 743 794 1290 1291 796 +526 9 2 11 121 494 64 11 1292 1293 499 +527 9 2 11 121 493 592 494 1294 1295 498 +528 9 2 11 121 63 742 793 1296 1297 795 +529 9 2 11 121 492 594 493 1298 1299 497 +530 9 2 11 121 493 593 592 1300 597 1294 +531 9 2 11 121 63 595 491 600 1301 1302 +532 9 2 11 121 491 595 492 1301 1303 496 +533 9 2 11 121 12 63 491 1304 1302 495 +534 9 2 11 121 798 100 96 800 804 1305 +535 9 2 11 121 777 798 96 1306 1305 780 +536 9 2 11 121 742 743 793 745 1290 1297 +537 9 2 11 121 11 64 776 1293 1307 778 +538 9 2 11 121 799 798 777 801 1306 1308 +539 9 2 11 121 794 90 99 1309 803 797 +540 9 2 11 121 494 592 64 1295 596 1292 +541 9 2 11 121 594 593 493 598 1300 1299 +542 9 2 11 121 12 742 63 744 1296 1304 +543 9 2 11 121 595 594 492 599 1298 1303 +544 9 2 11 121 64 799 776 802 1310 1307 +545 9 2 11 121 776 799 777 1310 1308 779 +546 9 2 11 121 743 90 794 746 1309 1291 +$EndElements diff --git a/dG3D/benchmarks/taylorMPI/taylorCG.py b/dG3D/benchmarks/taylorMPI/taylorCG.py index e1da15d9a40b2f12b66221c017877779c85500ed..c54ce21acc174db3c373ba7c556b0d95a2314975 100644 --- a/dG3D/benchmarks/taylorMPI/taylorCG.py +++ b/dG3D/benchmarks/taylorMPI/taylorCG.py @@ -73,7 +73,7 @@ mysolver.solve() # perform some check (pay attention that only rank 0 really perform the check) try: import linecache - linedisp = linecache.getline('NodalDisplacement1comp0_part3.csv',26050) + linedisp = linecache.getline('NodalDisplacementPhysical5Num1comp0_part3.csv',26050) except: print('Cannot read the results in the files') import os diff --git a/dG3D/benchmarks/thermoMecPBC/CMakeLists.txt b/dG3D/benchmarks/thermoMecPBC/CMakeLists.txt index 4f371adcc638427b820266c70364251b74cf8df8..677aebae58b06d26230c513ab4bd9dbdc0148927 100644 --- a/dG3D/benchmarks/thermoMecPBC/CMakeLists.txt +++ b/dG3D/benchmarks/thermoMecPBC/CMakeLists.txt @@ -3,7 +3,6 @@ set(PYFILE thermoMecPolycrystal.py) set(FILES2DELETE - NodalDisplacement* E_0_GP_1000_* ) diff --git a/dG3D/benchmarks/thermoMecPBCCondensation/CMakeLists.txt b/dG3D/benchmarks/thermoMecPBCCondensation/CMakeLists.txt index 4e034747ded42899c501a9cb97334330ac0d51ff..c98e8c3ae58f4e2cddb110cf355a69510a2d2698 100644 --- a/dG3D/benchmarks/thermoMecPBCCondensation/CMakeLists.txt +++ b/dG3D/benchmarks/thermoMecPBCCondensation/CMakeLists.txt @@ -4,7 +4,6 @@ set(PYFILE thermoMecPolycrystalCondensation.py) set(FILES2DELETE polycrystal.msh - NodalDisplacement* E_0_GP_1000_* ) diff --git a/dG3D/benchmarks/thermoMecPBCInSystemCondensation/CMakeLists.txt b/dG3D/benchmarks/thermoMecPBCInSystemCondensation/CMakeLists.txt index 4e034747ded42899c501a9cb97334330ac0d51ff..c98e8c3ae58f4e2cddb110cf355a69510a2d2698 100644 --- a/dG3D/benchmarks/thermoMecPBCInSystemCondensation/CMakeLists.txt +++ b/dG3D/benchmarks/thermoMecPBCInSystemCondensation/CMakeLists.txt @@ -4,7 +4,6 @@ set(PYFILE thermoMecPolycrystalCondensation.py) set(FILES2DELETE polycrystal.msh - NodalDisplacement* E_0_GP_1000_* ) diff --git a/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/CMakeLists.txt b/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/CMakeLists.txt index 4e034747ded42899c501a9cb97334330ac0d51ff..c98e8c3ae58f4e2cddb110cf355a69510a2d2698 100644 --- a/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/CMakeLists.txt +++ b/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/CMakeLists.txt @@ -4,7 +4,6 @@ set(PYFILE thermoMecPolycrystalCondensation.py) set(FILES2DELETE polycrystal.msh - NodalDisplacement* E_0_GP_1000_* ) diff --git a/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/thermoMecPolycrystalCondensation.py b/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/thermoMecPolycrystalCondensation.py index 83a9899f0117e77c147264fa7898f72be3856dd2..0d40d01e34f485a983c2e872987023b24156a05c 100644 --- a/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/thermoMecPolycrystalCondensation.py +++ b/dG3D/benchmarks/thermoMecPBCInSystemCondensationElim/thermoMecPolycrystalCondensation.py @@ -99,7 +99,6 @@ mysolver.setMessageView(True) mysolver.setSystemType(system) #mysolver.setControlType(control) mysolver.setMicroProblemIndentification(0, 1000); -mysolver.invertFlag(True) #boundary condition diff --git a/dG3D/benchmarks/thermoMecPBCPertElim/CMakeLists.txt b/dG3D/benchmarks/thermoMecPBCPertElim/CMakeLists.txt index 4f371adcc638427b820266c70364251b74cf8df8..677aebae58b06d26230c513ab4bd9dbdc0148927 100644 --- a/dG3D/benchmarks/thermoMecPBCPertElim/CMakeLists.txt +++ b/dG3D/benchmarks/thermoMecPBCPertElim/CMakeLists.txt @@ -3,7 +3,6 @@ set(PYFILE thermoMecPolycrystal.py) set(FILES2DELETE - NodalDisplacement* E_0_GP_1000_* ) diff --git a/dG3D/benchmarks/uniaxialTest_PBC/run.py b/dG3D/benchmarks/uniaxialTest_PBC/run.py index 3a6b8484203688e40a69e65bbdf591ad35dc6237..6fd6851b7e12cd3c27d59288fa793058d082e16c 100644 --- a/dG3D/benchmarks/uniaxialTest_PBC/run.py +++ b/dG3D/benchmarks/uniaxialTest_PBC/run.py @@ -100,3 +100,9 @@ import linecache homoStress = linecache.getline('Average_P_ZZ.csv',2) val = float(homoStress.split(';')[1]) check.equal(2.871301e+02,val,1.e-4) + +newsolver = mysolver.clone(meshfile,1000) +newsolver.solve() +homoStress = linecache.getline('Average_P_ZZ.csv',2) +val = float(homoStress.split(';')[1]) +check.equal(2.871301e+02,val,1.e-4) diff --git a/dG3D/src/FractureCohesiveDG3DIPVariable.h b/dG3D/src/FractureCohesiveDG3DIPVariable.h index c158b96d278e02a1dd665847b8c4ab9110b2e9ab..59bdf298dba5734fd7ee277fd32dc075f5812ebd 100644 --- a/dG3D/src/FractureCohesiveDG3DIPVariable.h +++ b/dG3D/src/FractureCohesiveDG3DIPVariable.h @@ -101,6 +101,8 @@ class FractureCohesive3DIPVariable : public IPVariable2ForFracture<dG3DIPVariabl virtual const std::vector<STensor3> &getConstRefToDLocalVariableDStrain() const {return _ipvbulk->getConstRefToDLocalVariableDStrain();}; virtual std::vector<STensor3> &getRefToDLocalVariableDStrain() {return _ipvbulk->getRefToDLocalVariableDStrain();}; + virtual const std::vector<STensor3> &getConstRefToDGradLocalVariableDStrain() const {return _ipvbulk->getConstRefToDGradLocalVariableDStrain();}; + virtual std::vector<STensor3> &getRefToDGradLocalVariableDStrain() {return _ipvbulk->getRefToDGradLocalVariableDStrain();}; virtual const std::vector<STensor3> &getConstRefToDStressDNonLocalVariable() const {return _ipvbulk->getConstRefToDStressDNonLocalVariable();}; virtual std::vector<STensor3> &getRefToDStressDNonLocalVariable() {return _ipvbulk->getRefToDStressDNonLocalVariable();}; @@ -108,6 +110,9 @@ class FractureCohesive3DIPVariable : public IPVariable2ForFracture<dG3DIPVariabl virtual const fullMatrix<double> &getConstRefToDLocalVariableDNonLocalVariable() const {return _ipvbulk->getConstRefToDLocalVariableDNonLocalVariable();}; virtual fullMatrix<double> &getRefToDLocalVariableDNonLocalVariable() {return _ipvbulk->getRefToDLocalVariableDNonLocalVariable();}; + virtual const fullMatrix<double> &getConstRefToDLocalVariableDGradNonLocalVariable() const {return _ipvbulk->getConstRefToDLocalVariableDGradNonLocalVariable();}; + virtual fullMatrix<double> &getRefToDLocalVariableDGradNonLocalVariable() {return _ipvbulk->getRefToDLocalVariableDGradNonLocalVariable();}; + virtual const fullVector<double> &getConstRefToNonLocalJump() const {return _ipvbulk->getConstRefToNonLocalJump(); } virtual fullVector<double> &getRefToNonLocalJump() {return _ipvbulk->getRefToNonLocalJump(); } @@ -218,9 +223,9 @@ class FractureCohesive3DIPVariable : public IPVariable2ForFracture<dG3DIPVariabl virtual const STensor3 &getConstRefToFirstPiolaKirchhoffStressb4AV() const {return _ipvbulk->getConstRefToFirstPiolaKirchhoffStressb4AV();} virtual STensor3 &getRefToFirstPiolaKirchhoffStressb4AV() {return _ipvbulk->getRefToFirstPiolaKirchhoffStressb4AV();} - - virtual void setBulkCriticalDamage(const double DT){_ipvbulk->setBulkCriticalDamage(DT);}; - virtual double getBulkCriticalDamage() const {return _ipvbulk->getBulkCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idx){_ipvbulk->setBulkCriticalDamage(DT,idx);}; + virtual double getBulkCriticalDamage(int idx) const {return _ipvbulk->getBulkCriticalDamage(idx);}; + virtual double getDamageIndicator(int idx) const {return _ipvbulk->getDamageIndicator(idx);}; virtual void setNonLocalToLocal(const bool fl){_ipvbulk->setNonLocalToLocal(fl);}; virtual bool getNonLocalToLocal() const {return _ipvbulk->getNonLocalToLocal();}; diff --git a/dG3D/src/FractureCohesiveDG3DMaterialLaw.cpp b/dG3D/src/FractureCohesiveDG3DMaterialLaw.cpp index ba837263f84316a88b80f7411d1247cc1f6014d0..11dcbd994e99746f44432e8b1957ad27c853a34d 100644 --- a/dG3D/src/FractureCohesiveDG3DMaterialLaw.cpp +++ b/dG3D/src/FractureCohesiveDG3DMaterialLaw.cpp @@ -87,15 +87,24 @@ void FractureByCohesive3DLaw::createIPState(IPStateBase* &ips,const bool* state_ // when cohesive element is inserted dG3DIPVariableBase *ipvfi = dynamic_cast<dG3DIPVariableBase*>(ips->getState(IPStateBase::current)); if (ipvfi != NULL){ - ipvfi->setBulkCriticalDamage(_mfrac->getCriticalDamage()); + for(int nlv=0; nlv<ipvfi->getNumberNonLocalVariable(); nlv++) + { + ipvfi->setBulkCriticalDamage(_mfrac->getCriticalDamage(nlv),nlv); + } } dG3DIPVariableBase *ipvf1 = dynamic_cast<dG3DIPVariableBase*>(ips->getState(IPStateBase::previous)); if (ipvf1 != NULL){ - ipvf1->setBulkCriticalDamage(_mfrac->getCriticalDamage()); + for(int nlv=0; nlv<ipvfi->getNumberNonLocalVariable(); nlv++) + { + ipvf1->setBulkCriticalDamage(_mfrac->getCriticalDamage(nlv),nlv); + } } dG3DIPVariableBase *ipvf2 = dynamic_cast<dG3DIPVariableBase*>(ips->getState(IPStateBase::initial)); if (ipvf2 != NULL){ - ipvf2->setBulkCriticalDamage(_mfrac->getCriticalDamage()); + for(int nlv=0; nlv<ipvfi->getNumberNonLocalVariable(); nlv++) + { + ipvf2->setBulkCriticalDamage(_mfrac->getCriticalDamage(nlv),nlv); + } } } } @@ -121,7 +130,10 @@ void FractureByCohesive3DLaw::createIPVariable(IPVariable* &ipv,const MElement * dG3DIPVariableBase *ipvfi = dynamic_cast<dG3DIPVariableBase*>(ipv); if (ipvfi != NULL){ - ipvfi->setBulkCriticalDamage(_mfrac->getCriticalDamage()); + for(int nlv=0; nlv<ipvfi->getNumberNonLocalVariable(); nlv++) + { + ipvfi->setBulkCriticalDamage(_mfrac->getCriticalDamage(nlv),nlv); + } } } } @@ -271,25 +283,6 @@ void MultiscaleFractureByCohesive3DLaw::createIPState(const bool isSolve, IPStat if (isSolve){ // if bulk law is a multiscale law int el = ele->getNum(); - // need to known - if (_nummat->allInterfacesAreViewed()){ - std::set<int>::const_iterator itF = _nummat->getInterfaceGPsToAllView().find(gpt); - if (itF != _nummat->getInterfaceGPsToAllView().end()){ - _nummat->setViewAllMicroProblems(true,gpt); - } - } - else{ - TwoNum tn = this->getMacroSolver()->getMinusAndPlusElementNumber(el); - const std::map<TwoNum,std::set<int> >::const_iterator itF = _nummat->getInterfaceElementsToView().find(tn); - if ( itF != _nummat->getInterfaceElementsToView().end()){ - const std::set<int>& gpToView = itF->second; - if (gpToView.find(gpt) != gpToView.end()){ - _nummat->addViewMicroSolver(el,gpt); - } - } - } - - nonLinearMechSolver* solver = this->createMicroSolver(el,gpt); if (_interfaceLaw != NULL){ bool withNormal = _interfaceLaw->getCheckFailureOnsetWithInterfaceNormal(); @@ -299,7 +292,7 @@ void MultiscaleFractureByCohesive3DLaw::createIPState(const bool isSolve, IPStat SVector3 n, t, b; // get macrosolver - const nonLinearMechSolver* macroSolver = _mbulk->getMacroSolver(); + const nonLinearMechSolver* macroSolver = _mbulk->getSolver(); if (macroSolver== NULL){ Msg::Error("macro solver has not set yet"); } @@ -370,7 +363,7 @@ void MultiscaleFractureByCohesive3DLaw::createIPState(const bool isSolve, IPStat Msg::Error("GeneralMultiscaleBulkFollwedCohesive3DLaw must be used in MultiscaleFractureByCohesive3DLaw::createIPState"); } solver->initMicroSolver(); - ips->setSolver(solver); + ips->setMicroSolver(solver); } } @@ -387,7 +380,7 @@ void MultiscaleFractureByCohesive3DLaw::createIPState(IPStateBase* &ips,const bo void MultiscaleFractureByCohesive3DLaw::initialBroken(IPStateBase *ips) const { FractureByCohesive3DLaw::initialBroken(ips); - nonLinearMechSolver* solver = ips->getSolver(); + nonLinearMechSolver* solver = ips->getMicroSolver(); if (solver != NULL){ solver->brokenSolver(true); } diff --git a/dG3D/src/FractureCohesiveDG3DMaterialLaw.h b/dG3D/src/FractureCohesiveDG3DMaterialLaw.h index 3fe5bab19e8a9596c5ba26cbb809f6f041f31e0f..2ad77236d3da16d7d11119bb387ccb8ee9fe507d 100644 --- a/dG3D/src/FractureCohesiveDG3DMaterialLaw.h +++ b/dG3D/src/FractureCohesiveDG3DMaterialLaw.h @@ -71,13 +71,13 @@ class FractureByCohesive3DLaw : public dG3DMaterialLaw, public fractureBy2Laws< virtual double getExtraDofStoredEnergyPerUnitField(double T) const {return _mbulk->getExtraDofStoredEnergyPerUnitField(T);} virtual double getCharacteristicLength() const {return _mfrac->getCharacteristicLength();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_mbulk != NULL){ - _mbulk->setMacroSolver(sv); + _mbulk->setSolver(sv); } if (_mfrac != NULL){ - _mfrac->setMacroSolver(sv); + _mfrac->setSolver(sv); } } @@ -107,7 +107,7 @@ class MultiscaleFractureByCohesive3DLaw : public FractureByCohesive3DLaw, virtual void createIPState(const bool isSolve, IPStateBase* &ips,const bool* state =NULL, const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt=0) const; - virtual nonLinearMechSolver* createMicroSolver(const int ele=0, const int gpt=0) const ; + virtual nonLinearMechSolver* createMicroSolver(const int ele, const int gpt) const ; virtual bool isNumeric() const {return true;}; diff --git a/dG3D/src/NonLocalDamageHyperelasticDG3DMaterialLaw.h b/dG3D/src/NonLocalDamageHyperelasticDG3DMaterialLaw.h index f89a73b42ffa44f8bf37f590138a1255fa3bb1de..4421c99cc698c55fff1738d4e58f14b9461f3599 100644 --- a/dG3D/src/NonLocalDamageHyperelasticDG3DMaterialLaw.h +++ b/dG3D/src/NonLocalDamageHyperelasticDG3DMaterialLaw.h @@ -61,9 +61,9 @@ class NonLocalDamagePowerYieldHyperDG3DMaterialLaw : public dG3DMaterialLaw virtual void stress(IPVariable*ipv, const IPVariable*ipvprev, const bool stiff=true, const bool checkfrac=true); virtual void initialIPVariable(IPVariable* ipv) const; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _nldPowerYieldHyperlaw->setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _nldPowerYieldHyperlaw->setSolver(sv); }; #endif @@ -118,9 +118,9 @@ class LocalDamagePowerYieldHyperDG3DMaterialLawWithFailure: public dG3DMaterialL virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvp) const; virtual void stress(IPVariable*ipv, const IPVariable*ipvprev, const bool stiff=true, const bool checkfrac=true); virtual void initialIPVariable(IPVariable* ipv) const; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _localPowerYieldHyperlaw->setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _localPowerYieldHyperlaw->setSolver(sv); }; #endif @@ -179,9 +179,9 @@ class NonLocalDamagePowerYieldHyperDG3DMaterialLawWithFailure: public dG3DMateri virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvp) const; virtual void stress(IPVariable*ipv, const IPVariable*ipvprev, const bool stiff=true, const bool checkfrac=true); virtual void initialIPVariable(IPVariable* ipv) const; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _nldPowerYieldHyperlaw->setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _nldPowerYieldHyperlaw->setSolver(sv); }; #endif diff --git a/dG3D/src/axisymmetricDG3DDomain.cpp b/dG3D/src/axisymmetricDG3DDomain.cpp index 0a658c24fa73be1258d5a8fa3e1fd81e9eb2f9e6..5602ba1938cd462e2c10e1995792d77d284a888e 100644 --- a/dG3D/src/axisymmetricDG3DDomain.cpp +++ b/dG3D/src/axisymmetricDG3DDomain.cpp @@ -589,9 +589,9 @@ void axisymmetricDG3DDomain::createTerms(unknownField *uf,IPField*ip) // path following - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ Msg::Error("path following is not implemented for this case"); } scalarTermPFBound = new nonLinearScalarTermVoid(); @@ -953,7 +953,7 @@ void axisymmetricInterDomainBetween3D::createTerms(unknownField *uf,IPField*ip) // path following - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ //Msg::Error("axisymmetricDG3DDomain::createTerms PathFollowing has not been verified in axisymmetricDG3DDomain"); this->scalarTermPF = new nonLinearScalarTermVoid(); this->linearTermPF = new nonLinearTermVoid(); diff --git a/dG3D/src/dG3D1DDomain.cpp b/dG3D/src/dG3D1DDomain.cpp index 7396dfc25c891c5b7b8997c873bc2d5107bdb2f8..913b7a4d8d5419625b0ef047c429afaac2f759c7 100644 --- a/dG3D/src/dG3D1DDomain.cpp +++ b/dG3D/src/dG3D1DDomain.cpp @@ -101,8 +101,8 @@ void dG3D1DDomain::createTerms(unknownField *uf,IPField*ip) btermTangent = new dG3DHomogenizedTangent(this,ip); // path following term - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ scalarTermPF = new nonLinearScalarTermVoid(); linearTermPF = new nonLinearTermVoid(); } @@ -111,7 +111,7 @@ void dG3D1DDomain::createTerms(unknownField *uf,IPField*ip) linearTermPF = new dG3DDissipationPathFollowingBulkLinearTerm(this,ip); } - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ scalarTermPFBound = new nonLinearScalarTermVoid(); linearTermPFBound = new nonLinearTermVoid(); } @@ -144,8 +144,8 @@ void dG3D1DDomain::createTerms(unknownField *uf,IPField*ip) btermTangent = new dG3DHomogenizedTangent(this,ip); // path following term - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ scalarTermPF = new nonLinearScalarTermVoid(); linearTermPF = new nonLinearTermVoid(); } @@ -154,7 +154,7 @@ void dG3D1DDomain::createTerms(unknownField *uf,IPField*ip) linearTermPF = new dG3DDissipationPathFollowingBulkLinearTerm(this,ip); } - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ scalarTermPFBound = new nonLinearScalarTermVoid(); linearTermPFBound = new nonLinearTermVoid(); } diff --git a/dG3D/src/dG3DCohesiveBandMaterialLaw.cpp b/dG3D/src/dG3DCohesiveBandMaterialLaw.cpp index 420af0a6edb927f882c9934a8c2243fa60daf383..f988a793876a91e125dac8e6e4db75b90a5b1955 100644 --- a/dG3D/src/dG3DCohesiveBandMaterialLaw.cpp +++ b/dG3D/src/dG3DCohesiveBandMaterialLaw.cpp @@ -98,7 +98,10 @@ void CohesiveBand3DLaw::transferInterfaceDataToBulk(IPVariable* ipv, const IPVar /* Update data from previous steps */ // Set critical damage and non-local to local offset when switching - fipv->setBulkCriticalDamage(fipvprev->getBulkCriticalDamage()); + for(int nlv=0; nlv<fipv->getNumberNonLocalVariable(); nlv++) + { + fipv->setBulkCriticalDamage(fipvprev->getBulkCriticalDamage(nlv),nlv); + } fipv->getRefToBulkDeformationGradientAtFailureOnset() = fipvprev->getConstRefToBulkDeformationGradientAtFailureOnset(); fipv->setNonLocalToLocal(true); @@ -850,8 +853,16 @@ void CohesiveBand3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPStateBase* i if (ift==false){Msg::Error(" ! Crack insertion in compression !");}; // set critical damage for bulk part - fMinusCur->setBulkCriticalDamage(damageMinus); - fPlusCur->setBulkCriticalDamage(damagePlus); + for(int nlv=0; nlv<fMinusCur->getNumberNonLocalVariable(); nlv++) + { + if(damageMinus!=fMinusCur->getDamageIndicator(0)) Msg::Error("damageMinus has changed"); + fMinusCur->setBulkCriticalDamage(fMinusCur->getDamageIndicator(nlv),nlv); + } + for(int nlv=0; nlv<fPlusCur->getNumberNonLocalVariable(); nlv++) + { + if(damagePlus!=fPlusCur->getDamageIndicator(0)) Msg::Error("damagePlus has changed"); + fPlusCur->setBulkCriticalDamage(fPlusCur->getDamageIndicator(nlv),nlv); + } // activate nonlocal to local transition fMinusCur->setNonLocalToLocal(true); @@ -1213,7 +1224,7 @@ void PorosityCohesiveBand3DLaw::stress(IPVariable* ipv, const IPVariable* ipvpre } } - if (getMacroSolver()->withPathFollowing()){ + if (getSolver()->withPathFollowing()){ STensorOperation::zero(fipv->getRefToDIrreversibleEnergyDDeformationGradient()); STensorOperation::zero(fipv->getRefToDIrreversibleEnergyDJump()); } @@ -1313,7 +1324,7 @@ void PorosityCohesiveBand3DLaw::stress(IPVariable* ipv, const IPVariable* ipvpre } }; - if (getMacroSolver()->withPathFollowing()){ + if (getSolver()->withPathFollowing()){ STensor3& dirrEnergDF = fipv->getRefToDIrreversibleEnergyDDeformationGradient(); SVector3& dirrEnergDJump = fipv->getRefToDIrreversibleEnergyDJump(); STensorOperation::zero(dirrEnergDF); diff --git a/dG3D/src/dG3DCohesiveIPVariable.cpp b/dG3D/src/dG3DCohesiveIPVariable.cpp index 63a5bff0f0d0e75104244b7c3ad926d440a1426e..c38a6bdc6b59f583acfd78781db920e27ab8c1dc 100644 --- a/dG3D/src/dG3DCohesiveIPVariable.cpp +++ b/dG3D/src/dG3DCohesiveIPVariable.cpp @@ -291,6 +291,42 @@ void NonLocalDamageLinearCohesive3DIPVariable::restart() return; } +NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable::NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable() : BaseTransverseIsotropicLinearCohesive3DIPVariable() +{ + _qCohesive = new IPTransverseIsotropicCohesive(); +} + +NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable::NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(const NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable &source): BaseTransverseIsotropicLinearCohesive3DIPVariable(source) +{ +}; +NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable& NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable::operator = (const IPVariable &source) +{ + BaseTransverseIsotropicLinearCohesive3DIPVariable::operator=(source); + const NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable *src = static_cast<const NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable*>(&source); + if(src != NULL) + { + } + return *this; +} + + +void NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable::initializeFracture(const SVector3 &ujump_, + const double smax, const double snor, const double tau, const double Gc, + const double beta_, const bool ift, const STensor3 &cauchy, const double K, + const SVector3& norm, const SVector3& f0, + const IPVariable* bulkIPv) +{ + BaseTransverseIsotropicLinearCohesive3DIPVariable::initializeFracture(ujump_, smax, snor, tau, Gc, beta_, ift, cauchy,K,norm,f0,bulkIPv); +} + +void NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable::restart() +{ + BaseTransverseIsotropicLinearCohesive3DIPVariable::restart(); + return; +} + + + DelaminationLinearCohesive3DIPVariable::DelaminationLinearCohesive3DIPVariable() : LinearCohesive3DIPVariable() { diff --git a/dG3D/src/dG3DCohesiveIPVariable.h b/dG3D/src/dG3DCohesiveIPVariable.h index b496f9ec6e00ef55bbac805da53fe3ca6235617c..33ec54427a5550391620392990179def429fbefd 100644 --- a/dG3D/src/dG3DCohesiveIPVariable.h +++ b/dG3D/src/dG3DCohesiveIPVariable.h @@ -432,6 +432,27 @@ class NonLocalDamageLinearCohesive3DIPVariable : public LinearCohesive3DIPVariab virtual void restart(); }; + +class NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable : public BaseTransverseIsotropicLinearCohesive3DIPVariable{ + protected : + + public : + NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable();// no initial fracture (for initial fracture use ipfield) + virtual ~NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(){}; + NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(const NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable &source); + virtual NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable &operator = (const IPVariable &source); + + virtual void initializeFracture(const SVector3 &ujump_, + const double smax, const double snor, const double tau, const double Gc, + const double beta_, const bool ift, const STensor3 &, const double Kp, + const SVector3& normDir, const SVector3& f0, + const IPVariable* bulkIPv); + virtual IPVariable* clone() const {return new NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(*this);}; + virtual void restart(); +}; + + + class DelaminationLinearCohesive3DIPVariable : public LinearCohesive3DIPVariable{ protected : // variables use by cohesive law diff --git a/dG3D/src/dG3DCohesiveMaterialLaw.cpp b/dG3D/src/dG3DCohesiveMaterialLaw.cpp index 65f38669cd09f17ef6cba06b155991f2eb6aea15..7cf0c46b6ca0c3fa9bec154495c6d3d16c7b0922 100644 --- a/dG3D/src/dG3DCohesiveMaterialLaw.cpp +++ b/dG3D/src/dG3DCohesiveMaterialLaw.cpp @@ -264,7 +264,7 @@ void LinearCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPStateBase* } - if (this->getMacroSolver()->withFailureBasedOnPreviousState()){ + if (this->getSolver()->withFailureBasedOnPreviousState()){ // initialize cohesive law in negative part Cohesive3DIPVariableBase* coMinus = fMinusCur->getIPvFrac(); coMinus->initializeFracture(fMinusCur->getConstRefToJump(),seff,snor,tau,getGc(),getBeta(),ift,cauchyAverage,getKp(),normDir,force0, @@ -467,7 +467,7 @@ void BaseTransverseIsotropicLinearCohesive3D::checkCohesiveInsertion(IPStateBase fPlusCur->getOnsetCriterion() = 0.; } - if (this->getMacroSolver()->withFailureBasedOnPreviousState()){ + if (this->getSolver()->withFailureBasedOnPreviousState()){ // initialize cohesive law in negative part Cohesive3DIPVariableBase* coMinus = fMinusCur->getIPvFrac(); coMinus->initializeFracture(fMinusCur->getConstRefToJump(),seff,snor,tau,Gc,getBeta(),ift,cauchyAverage,getKp(),normDir,force0, @@ -783,9 +783,13 @@ void NonLocalDamageLinearCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm // set critical damage at insertation time // the damage variable in bulk IPs remains constant after inserting cohesive elements // the material softening continues with cohesive elements - fMinusCur->setBulkCriticalDamage(fMinusCur->get(IPField::DAMAGE)); - fPlusCur->setBulkCriticalDamage(fPlusCur->get(IPField::DAMAGE)); - + if(fPlusCur->getNumberNonLocalVariable()!=fMinusCur->getNumberNonLocalVariable()) + Msg::Error("NonLocalDamageLinearCohesive3DLaw::checkCohesiveInsertion: the two laws do not have the same number of non-local variables"); + for(int nlv=0; nlv<fMinusCur->getNumberNonLocalVariable(); nlv++) + { + fMinusCur->setBulkCriticalDamage(fMinusCur->getDamageIndicator(nlv),nlv); + fPlusCur->setBulkCriticalDamage(fPlusCur->getDamageIndicator(nlv),nlv); + } // initialize cohesive law in negative part Cohesive3DIPVariableBase* coMinus = fMinusCur->getIPvFrac(); coMinus->initializeFracture(fMinusCur->getConstRefToJump(),seff,snor,tau,remainingG,getBeta(),ift,cauchyAverage,getKp(),normDir,force0, @@ -796,7 +800,7 @@ void NonLocalDamageLinearCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm coPlus->initializeFracture(fPlusCur->getConstRefToJump(),seff,snor,tau,remainingG,getBeta(),ift,cauchyAverage,getKp(),normDir,force0, fPlusCur->getIPvBulk()); - if (!this->getMacroSolver()->withFailureBasedOnPreviousState()){ + if (!this->getSolver()->withFailureBasedOnPreviousState()){ fMinusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coMinus)); fPlusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coPlus)); } @@ -809,6 +813,241 @@ void NonLocalDamageLinearCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm }; + + +//------added begin ---------------WU-------------- + +NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::NonLocalDamageTransverseIsotropicLinearCohesive3DLaw(const int num, const double GcL, const double sigmacL, const double DcL, const double GcT, + const double sigmacT, const double DcT, const double beta, const double mu, const double Ax, const double Ay, const double Az, const double fractureStrengthFactorMin, + const double fractureStrengthFactorMax, const double Kp, const bool damageCheck): + BaseTransverseIsotropicLinearCohesive3D(num, GcL, sigmacL, GcT, sigmacT, beta, mu, fractureStrengthFactorMin, fractureStrengthFactorMax, Kp), + _DcL(DcL), _DcT(DcT), _damageBased(damageCheck) +{ + _cohesiveLaw = new TransverseIsotropicCohesiveLaw(Ax, Ay, Az, num, true); +} + +NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::NonLocalDamageTransverseIsotropicLinearCohesive3DLaw(const NonLocalDamageTransverseIsotropicLinearCohesive3DLaw &source) : + BaseTransverseIsotropicLinearCohesive3D(source), _DcL(source._DcL), _DcT(source._DcT), _damageBased(source._damageBased) +{ + +} + +void NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::createIPState(IPStateBase* &ips,const bool* state_, + const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const +{ + IPVariable *ipvi = new NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(); + IPVariable *ipv1 = new NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(); + IPVariable *ipv2 = new NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(); + if(ips != NULL) delete ips; + ips = new IP3State(state_,ipvi,ipv1,ipv2); +} + +void NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::createIPVariable(IPVariable* &ipv,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const +{ + ipv = new NonLocalDamageTransverseIsotropicLinearCohesive3DIPVariable(); +} + + +void NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::stress(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac) +{ + BaseTransverseIsotropicLinearCohesive3D::stress(ipv,ipvprev,stiff,checkfrac); +} + + +void NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPStateBase* ipsp, const bool forcedInsert) const{ + // check failure onset from both negative and postive IPStates + FractureCohesive3DIPVariable* fMinusCur = dynamic_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::current)); + FractureCohesive3DIPVariable* fMinusPrev = dynamic_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::previous)); + + FractureCohesive3DIPVariable* fPlusCur = dynamic_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::current)); + FractureCohesive3DIPVariable* fPlusPrev = dynamic_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::previous)); + + if (fMinusCur == NULL or fPlusCur == NULL or fMinusPrev==NULL or fPlusPrev==NULL){ + Msg::Error("In NonLocalDamageTransverseIsotropicLinearCohesive3DLaw, FractureCohesive3DIPVariable is not used "); + return; + } + + if (fMinusPrev->isbroken() or fPlusPrev->isbroken()){ + Msg::Warning("Previous IPs are broken"); + fMinusCur->broken(); + fPlusCur->broken(); + return; + } + + const TransverseIsotropicCohesiveLaw *tic = dynamic_cast<const TransverseIsotropicCohesiveLaw*>(_cohesiveLaw); + if(tic==NULL) Msg::Error("In NonLocalDamageTransverseIsotropicLinearCohesive3DLaw, not a TransverseIsotropicCohesiveLaw"); + Cohesive3DIPVariable* cohIpvMinus = dynamic_cast<Cohesive3DIPVariable*>(fMinusCur->getIPvFrac()); + if(cohIpvMinus==NULL) Msg::Error("In NonLocalDamageTransverseIsotropicLinearCohesive3DLaw, not a BaseCohesive3DIPVariable"); + Cohesive3DIPVariable* cohIpvPlus = dynamic_cast<Cohesive3DIPVariable*>(fPlusCur->getIPvFrac()); + if(cohIpvPlus==NULL) Msg::Error("In NonLocalDamageTransverseIsotropicLinearCohesive3DLaw, not a BaseCohesive3DIPVariable"); + + static SVector3 anisotropyDirection; + anisotropyDirection*=0.; + tic->getTransverseDirection(anisotropyDirection,cohIpvMinus->getIPCohesive()); + anisotropyDirection.normalize(); + + + // because this step is check to activate the cohesive law for the next time step + // current outward normal is used + static SVector3 normDir; + normDir = fMinusCur->getConstRefToCurrentOutwardNormal(); + normDir.normalize(); + + static SVector3 refNormDir; + refNormDir = fMinusCur->getConstRefToCohesiveReferenceNormal(); + refNormDir.normalize(); + + double cosTheta = dot(anisotropyDirection,refNormDir); + double sinTheta = norm(crossprod(anisotropyDirection,refNormDir)); + + double gamma = 0.5; // average factor + // set the broken criterion with the effect of damage 2019 L.Wu + double damage_L = gamma*fMinusCur->get(IPField::INC_DAMAGE) + (1.-gamma)*fPlusCur->get(IPField::INC_DAMAGE); + double damage_T = gamma*fMinusCur->get(IPField::MTX_DAMAGE) + (1.-gamma)*fPlusCur->get(IPField::MTX_DAMAGE); + + double sigmac = sqrt(sinTheta*sinTheta*_sigmacT*_sigmacT*(1.0-damage_T)*(1.0-damage_T)+cosTheta*cosTheta*_sigmacL*_sigmacL*(1.0-damage_L)*(1.0-damage_L)); + double remainingG = sqrt(sinTheta*sinTheta*_GcT*_GcT+cosTheta*cosTheta*_GcL*_GcL); + + // estimate value of cauchy stress at interface + + /* value of sigma_c which depends on random factor */ + double facminus = fMinusCur->fractureStrengthFactor(); + double facplus = fPlusCur->fractureStrengthFactor(); + + + const double effDcL = (gamma*facminus+ (1.-gamma)*facplus) * _DcL; + const double effDcT = (gamma*facminus+ (1.-gamma)*facplus) * _DcT; + const double effsigc = (gamma*facminus+ (1.-gamma)*facplus) * sigmac; + + // get Cauchy stress on negative IP + static STensor3 cauchyMinus; + cauchyMinus*=0.; + fMinusCur->getCauchyStress(cauchyMinus); + // get Cauchy stress on positive IP + static STensor3 cauchyPplus; + cauchyPplus*=0.; + fPlusCur->getCauchyStress(cauchyPplus); + + // get mean value using gamma + static STensor3 cauchyAverage; + for (int i=0; i<3; i++) + for (int j=0; j<3; j++) + cauchyAverage(i,j) = gamma*cauchyMinus(i,j)+ (1.-gamma)*cauchyPplus(i,j); + + // interface force vector n + static SVector3 force0; + for (int i=0; i<3; i++){ + force0(i)=0.; + for (int j=0; j<3; j++){ + force0(i) += cauchyAverage(i,j)*normDir(j); + } + } + + double tractionSq=0.; // square interface force + double snor =0.; // normal part + double tau =0.; // sliding part + + for (int i=0; i<3; i++){ + tractionSq += force0(i)*force0(i); + snor += force0(i)*normDir(i); + } + tau = sqrt(fabs(tractionSq-snor*snor)); + double traction = sqrt(tractionSq); + + // compute effective stress + bool ift = true; + double smax = 0.; // normal part when failure + double seff = 0.; // effective stress when failure + + // sigma eff (Camacho and Ortiz) + if(snor>=0.){ + // traction case + seff = sqrt(snor*snor+tau*tau/(_beta*_beta)); // _betaexpm2 = 1/beta^2 + smax = snor; + ift = true; // tension flag + } + else{ + // compression case + double temp = fabs(tau)-_mu*fabs(snor); // friction force + if (temp >0) + seff = temp/_beta; + else + seff = 0.; + //no fracture in compression if mu<0 + if(_mu< 0) seff =0.; + smax = tau; + ift=false; // tension flag + } + + //broken check according to damage reduced maximum stress sigma_c (Ling Wu) + + bool broken = false; + if (_damageBased){ + Msg::Error("In NonLocalDamageTransverseIsotropicLinearCohesive3DLaw, Damage based broken is not applicable."); + } + else{ + broken = seff > effsigc; + if (broken){ + fMinusCur->getOnsetCriterion() = seff - effsigc; + fPlusCur->getOnsetCriterion() = seff - effsigc; + } + } + + //if(damage > effDc && ift){ + + //if(seff/(1.0-damage)> effsigc){ + //Msg::Info("broken with damage %e, smax %e, traction %d",damage, smax,ift); + // failure occurs + // activate cohesive element + + if (broken or forcedInsert){ + if(forcedInsert and seff ==0.) seff= sqrt(snor*snor+tau*tau/(_beta*_beta)); + + fMinusCur->broken(); + fPlusCur->broken(); + if (forcedInsert){ + fMinusCur->getOnsetCriterion() = 0; + fPlusCur->getOnsetCriterion() = 0.; + } + + // set critical damage at insertation time + // the damage variable in bulk IPs remains constant after inserting cohesive elements + // the material softening continues with cohesive elements + + if(fPlusCur->getNumberNonLocalVariable()!=fMinusCur->getNumberNonLocalVariable()) + Msg::Error("NonLocalDamageTransverseIsotropicLinearCohesive3DLaw::checkCohesiveInsertion: the two laws do not have the same number of non-local variables"); + for(int nlv=0; nlv<fMinusCur->getNumberNonLocalVariable(); nlv++) + { + fMinusCur->setBulkCriticalDamage(fMinusCur->getDamageIndicator(nlv),nlv); + fPlusCur->setBulkCriticalDamage(fPlusCur->getDamageIndicator(nlv),nlv); + } + + // initialize cohesive law in negative part + Cohesive3DIPVariableBase* coMinus = fMinusCur->getIPvFrac(); + coMinus->initializeFracture(fMinusCur->getConstRefToJump(),seff,snor,tau,remainingG,getBeta(),ift,cauchyAverage,getKp(),normDir,force0, + fMinusCur->getIPvBulk()); + + // positive part take a same value as negative cohesive part + Cohesive3DIPVariableBase* coPlus = fPlusCur->getIPvFrac(); + coPlus->initializeFracture(fPlusCur->getConstRefToJump(),seff,snor,tau,remainingG,getBeta(),ift,cauchyAverage,getKp(),normDir,force0, + fPlusCur->getIPvBulk()); + + if (!this->getSolver()->withFailureBasedOnPreviousState()){ + fMinusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coMinus)); + fPlusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coPlus)); + } + } + else{ + // no brocken + fMinusCur->nobroken(); + fPlusCur->nobroken(); + } +}; + +//------added end-----------------WU --------- + + + DelaminationLinearCohesive3DLaw::DelaminationLinearCohesive3DLaw(const int num, const double GcI, const double GcII, const double sigmacI,const double sigmacII, const double _alphaGc, const double fractureStrengthFactorMin, const double fractureStrengthFactorMax, const double Kp) : @@ -996,7 +1235,7 @@ void DelaminationLinearCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, coPlus->initializeFracture(fPlusCur->getConstRefToJump(),smax,snor,tau,effGc,1.,ift,cauchyAverage,getKp(),normDir,force0, fPlusCur->getIPvBulk()); - if (!this->getMacroSolver()->withFailureBasedOnPreviousState()){ + if (!this->getSolver()->withFailureBasedOnPreviousState()){ fMinusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coMinus)); fPlusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coPlus)); } @@ -1065,8 +1304,8 @@ void BulkFollwedCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPState const STensor43& Lp = fPlusCur->getConstRefToTangentModuli(); double detQm, detQp; - FailureDetection::getLostSolutionUniquenessCriterionFollowingDirection(getMacroSolver()->getDim(),Lm,refN,detQm); - FailureDetection::getLostSolutionUniquenessCriterionFollowingDirection(getMacroSolver()->getDim(),Lp,refN,detQp); + FailureDetection::getLostSolutionUniquenessCriterionFollowingDirection(getSolver()->getDim(),Lm,refN,detQm); + FailureDetection::getLostSolutionUniquenessCriterionFollowingDirection(getSolver()->getDim(),Lp,refN,detQp); @@ -1096,7 +1335,7 @@ void BulkFollwedCohesive3DLaw::checkCohesiveInsertion(IPStateBase* ipsm, IPState coPlus->initializeFracture(fPlusCur->getConstRefToJump(),0.,0.,0.,0.,0.,true,zeroTen,0.,refN,zeroVec, fPlusCur->getIPvBulk()); - if (!this->getMacroSolver()->withFailureBasedOnPreviousState()){ + if (!this->getSolver()->withFailureBasedOnPreviousState()){ fMinusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coMinus)); fPlusPrev->getIPvFrac()->operator =(*dynamic_cast<const IPVariable*>(coPlus)); } diff --git a/dG3D/src/dG3DCohesiveMaterialLaw.h b/dG3D/src/dG3DCohesiveMaterialLaw.h index 2db71512fb95537819b0537c215d700c72b16be7..315e1172a3f3d23301e8f6aecda5ea7aaf7ea35e 100644 --- a/dG3D/src/dG3DCohesiveMaterialLaw.h +++ b/dG3D/src/dG3DCohesiveMaterialLaw.h @@ -53,7 +53,7 @@ class Cohesive3DLaw : public materialLaw{ virtual void checkCohesiveInsertion(IPStateBase* ipsm, IPStateBase* ipsp, const bool forcedInsert=false) const = 0; // set function allows to prescribe the deformation gradient at bulk ipv equal to mean F virtual void transferInterfaceDataToBulk(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff) const = 0; - virtual double getCriticalDamage() const {return 1;}; + virtual double getCriticalDamage(int idx) const {return 1;}; virtual double getCharacteristicLength() const {return 1.;}; virtual materialLaw* clone() const = 0; virtual bool withEnergyDissipation() const {return true;} @@ -90,9 +90,9 @@ class BaseCohesive3DLaw : public Cohesive3DLaw BaseCohesive3DLaw(const BaseCohesive3DLaw &source); virtual ~BaseCohesive3DLaw(); - virtual void setMacroSolver(nonLinearMechSolver* sv){ - Cohesive3DLaw::setMacroSolver(sv); - _cohesiveLaw->setMacroSolver(sv); + virtual void setSolver(nonLinearMechSolver* sv){ + Cohesive3DLaw::setSolver(sv); + _cohesiveLaw->setSolver(sv); }; virtual void initLaws(const std::map<int,materialLaw*> &maplaw){} // nothing to do for this law @@ -260,9 +260,9 @@ class NonLocalDamageLinearCohesive3DLaw : public LinearCohesive3DLaw #ifndef SWIG NonLocalDamageLinearCohesive3DLaw(const NonLocalDamageLinearCohesive3DLaw &source); - virtual ~NonLocalDamageLinearCohesive3DLaw(){} + virtual ~NonLocalDamageLinearCohesive3DLaw(){}; - virtual double getCriticalDamage() const {return _Dc;}; + virtual double getCriticalDamage(int idx) const {if(idx==0) return _Dc; else return 0.99999;}; virtual void initLaws(const std::map<int,materialLaw*> &maplaw){} // nothing to do for this law virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const; virtual void createIPVariable(IPVariable* &ipv,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const; @@ -276,6 +276,38 @@ class NonLocalDamageLinearCohesive3DLaw : public LinearCohesive3DLaw #endif }; + +class NonLocalDamageTransverseIsotropicLinearCohesive3DLaw : public BaseTransverseIsotropicLinearCohesive3D +{ + protected: + const double _DcL; + const double _DcT; + bool _damageBased; // true if using damage as criterion, false if using effective stress + public: + NonLocalDamageTransverseIsotropicLinearCohesive3DLaw(const int num, const double GcL, const double sigmacL, const double DcL, const double GcT, const double sigmacT, const double DcT, const double beta, + const double mu, const double Ax, const double Ay, const double Az, const double fractureStrengthFactorMin = 1., const double fractureStrengthFactorMax = 1., + const double Kp = 1e6, const bool damageCheck = false); + +#ifndef SWIG + NonLocalDamageTransverseIsotropicLinearCohesive3DLaw(const NonLocalDamageTransverseIsotropicLinearCohesive3DLaw &source); + virtual ~NonLocalDamageTransverseIsotropicLinearCohesive3DLaw(){}; + + virtual double getCriticalDamage(int idx) const {if(idx==0) return _DcT; else if(idx==1) return _DcL; else return 0.99999;}; + virtual void initLaws(const std::map<int,materialLaw*> &maplaw){} // nothing to do for this law + virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const; + virtual void createIPVariable(IPVariable* &ipv,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const; + + virtual void stress(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff=true, const bool checkfrac=true); + virtual void checkCohesiveInsertion(IPStateBase* ipsm, IPStateBase* ipsp, const bool forcedInsert=false) const; + + virtual materialLaw* clone() const{ return new NonLocalDamageTransverseIsotropicLinearCohesive3DLaw(*this);}; + virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const{}; // do nothing + +#endif +}; + + + class DelaminationLinearCohesive3DLaw : public LinearCohesive3DLaw { protected: diff --git a/dG3D/src/dG3DDomain.cpp b/dG3D/src/dG3DDomain.cpp index 2a8d89bfad64d018d202eb6090f5a3782351e65a..5797c18cfdc36ef2430738a111e4c91a9d3e68f3 100644 --- a/dG3D/src/dG3DDomain.cpp +++ b/dG3D/src/dG3DDomain.cpp @@ -29,19 +29,41 @@ -dG3DDomain::dG3DDomain (const int tag,const int phys, const int ws, const int lnum, - const int fdg, const int dim, int nonLocalVar, int nonConstitutiveExtraDOFVar) : dgPartDomain(tag,phys,ws,fdg,nonLocalVar, nonConstitutiveExtraDOFVar), - _lnum(lnum), - _beta1(10.),_sts(1.), _isHighOrder(false), _interQuad(NULL), - _space(NULL), _dim(dim), - _gqt(Gauss), _gaussorderbulk(-1), _gaussorderbound(-1), _evalStiff(false), - _bulkDamageBlockMethod(-1),_subSteppingMethod(0), - _forceInterfaceElementBroken(false),_failureIPRatio(1.), _EqMultiFieldFactor(1.), - _nonLocalBeta(100.), _nonLocalContinuity(true), _nonLocalEqRatio(100.), - _constitutiveExtraDofDiffusionBeta(100.), _constitutiveExtraDofDiffusionContinuity(true), _constitutiveExtraDofDiffusionEqRatio(100.), - _constitutiveExtraDofDiffusionUseEnergyConjugatedField(false), _constitutiveExtraDofDiffusionAccountFieldSource(true), - _constitutiveExtraDofDiffusionAccountMecaSource(false), _imposeCrackFlag(false),_accountPathFollowing(true), - _incrementNonlocalBased(false), _planeStressState(false) +dG3DDomain::dG3DDomain (const int tag,const int phys, const int ws, const int lnum, const int fdg, const int dim, int nonLocalVar, int nonConstitutiveExtraDOFVar): + dgPartDomain(tag,phys,ws,fdg,nonLocalVar, nonConstitutiveExtraDOFVar), + _mlaw(NULL), + _lnum(lnum), + _dim(dim), + _beta1(10.), + _sts(1.), + _evalStiff(false), + _isHighOrder(false), + _nonLocalBeta(100.), + _nonLocalContinuity(true), + _nonLocalEqRatio(1.), + _constitutiveExtraDofDiffusionBeta(100.), + _constitutiveExtraDofDiffusionContinuity(true), + _constitutiveExtraDofDiffusionEqRatio(100.), + _constitutiveExtraDofDiffusionUseEnergyConjugatedField(false), + _constitutiveExtraDofDiffusionAccountFieldSource(true), + _constitutiveExtraDofDiffusionAccountMecaSource(false), + _incrementNonlocalBased(false), + _planeStressState(false), + _extraSpace(NULL), + _space(NULL), + _spaceInterUVW(NULL), + _gaussorderbulk(-1), + _gaussorderbound(-1), + _interQuad(NULL), + _gqt(Gauss), + _subSteppingMethod(0), + _subStepNumber(1), + _bulkDamageBlockMethod(-1), + _forceInterfaceElementBroken(false), + _failureIPRatio(1.), + _EqMultiFieldFactor(1.), + _imposeCrackFlag(false), + _accountPathFollowing(true) { switch(_wsp) { @@ -58,65 +80,60 @@ dG3DDomain::dG3DDomain (const int tag,const int phys, const int ws, const int ln default: Msg::Error("Function space type is unknown on domain %d",getTag()); } - _extraSpace = new extraFieldFunctionSpace(this,tag,3); // is getNumNonLocalVariable() missing - } -dG3DDomain::dG3DDomain(const dG3DDomain &source) : dgPartDomain(source), _lnum(source._lnum){ - _mlaw = NULL; // law is not copied - _dim = source._dim; - _beta1 = source._beta1; - // - _sts = source._sts; - _evalStiff = source._evalStiff; - // - _isHighOrder = source._isHighOrder; - - _extraSpace = NULL; - if (source._extraSpace != NULL) - _extraSpace = source._extraSpace->clone(source._extraSpace->getId()); - // - _space = NULL; - if (source._space != NULL) - _space = source._space->clone(source._space->getId()); - // - _spaceInterUVW = NULL; - if (source._spaceInterUVW != NULL) - _spaceInterUVW = source._spaceInterUVW->clone(source._spaceInterUVW->getId()); - - _gaussorderbulk = source._gaussorderbulk; - _gaussorderbound = source._gaussorderbound; - // - // _interQuad will be set in solver - _interQuad = NULL; // source._interQuad; - _gqt = source._gqt; - - _subSteppingMethod = source._subSteppingMethod; - _subStepNumber = source._subStepNumber; - - _bulkDamageBlockMethod = source._bulkDamageBlockMethod; - _forceInterfaceElementBroken = source._forceInterfaceElementBroken; - _failureIPRatio = source._failureIPRatio; - - _EqMultiFieldFactor = source._EqMultiFieldFactor; - _imposeCrackFlag = source._imposeCrackFlag; - - _accountPathFollowing = source._accountPathFollowing; - - _nonLocalBeta = source._nonLocalBeta; - _nonLocalContinuity = source._nonLocalContinuity; - _nonLocalEqRatio = source._nonLocalEqRatio; - // - _constitutiveExtraDofDiffusionBeta = source._constitutiveExtraDofDiffusionBeta; - _constitutiveExtraDofDiffusionContinuity = source._constitutiveExtraDofDiffusionContinuity; - _constitutiveExtraDofDiffusionEqRatio = source._constitutiveExtraDofDiffusionEqRatio; - _constitutiveExtraDofDiffusionUseEnergyConjugatedField = source._constitutiveExtraDofDiffusionUseEnergyConjugatedField; - _constitutiveExtraDofDiffusionAccountFieldSource = source._constitutiveExtraDofDiffusionAccountFieldSource; - _constitutiveExtraDofDiffusionAccountMecaSource = source._constitutiveExtraDofDiffusionAccountMecaSource; - - _incrementNonlocalBased = source._incrementNonlocalBased; - _planeStressState = source._planeStressState; +dG3DDomain::dG3DDomain(const dG3DDomain &source) : dgPartDomain(source), + _mlaw(NULL), + _lnum(source._lnum), + _dim(source._dim), + _beta1(source._beta1), + _sts(source._sts), + _evalStiff(false), + _isHighOrder(source._isHighOrder), + _nonLocalBeta(source._nonLocalBeta), + _nonLocalContinuity(source._nonLocalContinuity), + _nonLocalEqRatio(source._nonLocalEqRatio), + _constitutiveExtraDofDiffusionBeta(source._constitutiveExtraDofDiffusionBeta), + _constitutiveExtraDofDiffusionContinuity(source._constitutiveExtraDofDiffusionContinuity), + _constitutiveExtraDofDiffusionEqRatio(source._constitutiveExtraDofDiffusionEqRatio), + _constitutiveExtraDofDiffusionUseEnergyConjugatedField(source._constitutiveExtraDofDiffusionUseEnergyConjugatedField), + _constitutiveExtraDofDiffusionAccountFieldSource(source._constitutiveExtraDofDiffusionAccountFieldSource), + _constitutiveExtraDofDiffusionAccountMecaSource(source._constitutiveExtraDofDiffusionAccountMecaSource), + _incrementNonlocalBased(source._incrementNonlocalBased), + _planeStressState(source._planeStressState), + _extraSpace(NULL), + _space(NULL), + _spaceInterUVW(NULL), + _gaussorderbulk(source._gaussorderbulk), + _gaussorderbound(source._gaussorderbound), + _interQuad(NULL), + _gqt(source._gqt), + _subSteppingMethod(source._subSteppingMethod), + _subStepNumber(source._subStepNumber), + _bulkDamageBlockMethod(source._bulkDamageBlockMethod), + _forceInterfaceElementBroken(source._forceInterfaceElementBroken), + _failureIPRatio(source._failureIPRatio), + _EqMultiFieldFactor(source._EqMultiFieldFactor), + _imposeCrackFlag(source._imposeCrackFlag), + _accountPathFollowing(source._accountPathFollowing) +{ + switch(_wsp) + { + case functionSpaceType::Lagrange: + if(_fullDg) + _space = new dG3DLagrangeFunctionSpace(getTag(),3+getNumNonLocalVariable()+getNumConstitutiveExtraDofDiffusionVariable()); + else + _space = new g3DLagrangeFunctionSpace(getTag(),3+getNumNonLocalVariable()+getNumConstitutiveExtraDofDiffusionVariable()); + _spaceInterUVW = new IsoparametricLagrangeFunctionSpace(getTag()); // 3 composantes + break; + case functionSpaceType::Inter : + _spaceInterUVW = new IsoparametricLagrangeFunctionSpace(getTag()); // 3 composantes + break; // InterfaceDomain set function space later + default: + Msg::Error("Function space type is unknown on domain %d",getTag()); + } + _extraSpace = new extraFieldFunctionSpace(this,getTag(),3); } dG3DDomain::~dG3DDomain(){ @@ -576,8 +593,8 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) this->ltermVirtBound = new nonLinearTermVoid(); //path following - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::INTERFACE){ scalarTermPF = new nonLinearScalarTermVoid(); linearTermPF = new nonLinearTermVoid(); } @@ -586,7 +603,7 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) linearTermPF = new dG3DDissipationPathFollowingBulkLinearTerm(this,ip); } - if (getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ + if (getSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ scalarTermPFBound = new nonLinearScalarTermVoid(); linearTermPFBound = new nonLinearTermVoid(); } @@ -2489,11 +2506,13 @@ void dG3DDomain::checkFailure(IPField* ipf) const{ if (ipv_bulkPrev->dissipationIsBlocked()){ ipv_bulk->blockDissipation(true); - ipv_bulk->setBulkCriticalDamage(ipv_bulkPrev->getBulkCriticalDamage()); + for(int nlv=0; nlv< ipv_bulk->getNumberNonLocalVariable(); nlv++) + ipv_bulk->setBulkCriticalDamage(ipv_bulkPrev->getBulkCriticalDamage(nlv),nlv); } else{ ipv_bulk->blockDissipation(true); - ipv_bulk->setBulkCriticalDamage(ipv_bulk->get(IPField::DAMAGE)); + for(int nlv=0; nlv< ipv_bulk->getNumberNonLocalVariable(); nlv++) + ipv_bulk->setBulkCriticalDamage(ipv_bulk->getDamageIndicator(nlv),nlv); ipf->blockDissipationIP(numericalMaterialBase::createTypeWithTwoInts(em->getNum(),k)); } } @@ -2519,11 +2538,13 @@ void dG3DDomain::checkFailure(IPField* ipf) const{ if (ipv_bulkPrev->dissipationIsBlocked()){ ipv_bulk->blockDissipation(true); - ipv_bulk->setBulkCriticalDamage(ipv_bulkPrev->getBulkCriticalDamage()); + for(int nlv=0; nlv< ipv_bulk->getNumberNonLocalVariable(); nlv++) + ipv_bulk->setBulkCriticalDamage(ipv_bulkPrev->getBulkCriticalDamage(nlv),nlv); } else{ ipv_bulk->blockDissipation(true); - ipv_bulk->setBulkCriticalDamage(ipv_bulk->get(IPField::DAMAGE)); + for(int nlv=0; nlv< ipv_bulk->getNumberNonLocalVariable(); nlv++) + ipv_bulk->setBulkCriticalDamage(ipv_bulk->getDamageIndicator(nlv),nlv); ipf->blockDissipationIP(numericalMaterialBase::createTypeWithTwoInts(ep->getNum(),k)); } } @@ -2575,11 +2596,13 @@ void dG3DDomain::checkFailure(IPField* ipf) const{ const dG3DIPVariableBase *ipvprev_bulk = static_cast<const dG3DIPVariableBase*>(ips_bulk->getState(IPStateBase::previous)); if (ipvprev_bulk->dissipationIsBlocked()){ ipv_bulk->blockDissipation(true); - ipv_bulk->setBulkCriticalDamage(ipvprev_bulk->getBulkCriticalDamage()); + for(int nlv=0; nlv< ipv_bulk->getNumberNonLocalVariable(); nlv++) + ipv_bulk->setBulkCriticalDamage(ipvprev_bulk->getBulkCriticalDamage(nlv),nlv); } else{ ipv_bulk->blockDissipation(true); - ipv_bulk->setBulkCriticalDamage(ipv_bulk->get(IPField::DAMAGE)); + for(int nlv=0; nlv< ipv_bulk->getNumberNonLocalVariable(); nlv++) + ipv_bulk->setBulkCriticalDamage(ipv_bulk->getDamageIndicator(nlv),nlv); ipf->blockDissipationIP(numericalMaterialBase::createTypeWithTwoInts(ele->getNum(),k)); } } @@ -4482,8 +4505,8 @@ void interDomainBetween3D::createTerms(unknownField *uf,IPField*ip) } } } - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ - if (this->getMacroSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ + if (this->getSolver()->getPathFollowingLocation() == nonLinearMechSolver::BULK){ scalarTermPFBound = new nonLinearScalarTermVoid(); linearTermPFBound = new nonLinearTermVoid(); } diff --git a/dG3D/src/dG3DDomain.h b/dG3D/src/dG3DDomain.h index 03c8a09f114973378bb25c274e6caa791ca8216e..fb7098bd00c5e217177639661e8f4a5304e35927 100644 --- a/dG3D/src/dG3DDomain.h +++ b/dG3D/src/dG3DDomain.h @@ -50,10 +50,6 @@ class dG3DDomain : public dgPartDomain{ bool _incrementNonlocalBased; bool _planeStressState; // - public: - - // - // function space manage extra Dof at interface in multifield formulation FunctionSpaceBase *_extraSpace; // @@ -90,7 +86,6 @@ class dG3DDomain : public dgPartDomain{ // crack injection bool _imposeCrackFlag; std::set<TwoNum> _imposedInterfaceCrack; // pair is positive and negative - bool _accountPathFollowing; #endif // SWIG @@ -250,35 +245,34 @@ class dG3DDomain : public dgPartDomain{ #endif }; -class interDomainBase { -protected : - #ifndef SWIG - bool _lawFromBulkPart; // by default false, - // true if mlawminus and mlawplus are taken from bulk part instead of whole - // compound law - // this flag is used when considering problem with FractureByCohesive3DLaw - partDomain *_domMinus; - partDomain *_domPlus; - materialLaw* _mlawMinus; - materialLaw* _mlawPlus; - FunctionSpaceBase *_spaceMinus; - FunctionSpaceBase *_spacePlus; - - int _bulkNum; // material bulk law at interface if underlying material does not belong to positive an negative domain - // if not _bulkNum = 0 - #endif // SWIG - public : - interDomainBase(partDomain *dom1,partDomain *dom2, int bulkNum); - void setLawFromBulkPartFlag(const bool fl); -#ifndef SWIG - interDomainBase(const interDomainBase &source); - virtual ~interDomainBase(){} - - void initializeFractureBase(unknownField *uf,IPField*ip, +class interDomainBase{ + protected : + #ifndef SWIG + bool _lawFromBulkPart; // by default false, + // true if mlawminus and mlawplus are taken from bulk part instead of whole + // compound law + // this flag is used when considering problem with FractureByCohesive3DLaw + partDomain *_domMinus; + partDomain *_domPlus; + materialLaw* _mlawMinus; + materialLaw* _mlawPlus; + FunctionSpaceBase *_spaceMinus; + FunctionSpaceBase *_spacePlus; + int _bulkNum; // material bulk law at interface if underlying material does not belong to positive an negative domain + // if not _bulkNum = 0 + #endif // SWIG + public : + interDomainBase(partDomain *dom1,partDomain *dom2, int bulkNum); + void setLawFromBulkPartFlag(const bool fl); + #ifndef SWIG + interDomainBase(const interDomainBase &source); + virtual ~interDomainBase(){} + + void initializeFractureBase(unknownField *uf,IPField*ip, groupOfElements *gi, QuadratureBase* integBound); - void setGaussIntegrationRuleBase(groupOfElements *gi, QuadratureBase** integBound, QuadratureBase** integBulk, + void setGaussIntegrationRuleBase(groupOfElements *gi, QuadratureBase** integBound, QuadratureBase** integBulk, interfaceQuadratureBase** interQuad,int _gaussorderbound, dG3DDomain::GaussType _gqt); -#endif + #endif }; class interDomainBetween3D : public interDomainBase, public dG3DDomain{ diff --git a/dG3D/src/dG3DEnhancedDomain.cpp b/dG3D/src/dG3DEnhancedDomain.cpp index d386e657f41bbffa2dabad06b3f01dec8611058b..cee19f6af95226c76746c2582f4940005e07031a 100644 --- a/dG3D/src/dG3DEnhancedDomain.cpp +++ b/dG3D/src/dG3DEnhancedDomain.cpp @@ -58,7 +58,7 @@ void dG3DEnhancedDomain::createTerms(unknownField *uf,IPField*ip) massterm = new mass3D(*dgspace,_mlaw); - if (this->getMacroSolver()->withPathFollowing() and _accountPathFollowing){ + if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ scalarTermPF = new dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm(this,ip); linearTermPF = new dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm(this,ip); } diff --git a/dG3D/src/dG3DEnhancedStrainIPVariable.h b/dG3D/src/dG3DEnhancedStrainIPVariable.h index 97b639972d05dd924aaaea3be079c4e417302a7f..d6213a57d411c4c6750cc252519205573053ae0d 100644 --- a/dG3D/src/dG3DEnhancedStrainIPVariable.h +++ b/dG3D/src/dG3DEnhancedStrainIPVariable.h @@ -193,12 +193,18 @@ class dG3DEnhancedStrainIPVariable : public IPVariable2Enhanced<dG3DIPVariableBa virtual const std::vector<STensor3> &getConstRefToDLocalVariableDStrain() const {return _ipvbulk->getConstRefToDLocalVariableDStrain();}; virtual std::vector<STensor3> &getRefToDLocalVariableDStrain() {return _ipvbulk->getRefToDLocalVariableDStrain();}; + virtual const std::vector<STensor3> &getConstRefToDGradLocalVariableDStrain() const {return _ipvbulk->getConstRefToDGradLocalVariableDStrain();}; + virtual std::vector<STensor3> &getRefToDGradLocalVariableDStrain() {return _ipvbulk->getRefToDGradLocalVariableDStrain();}; + virtual const std::vector<STensor3> &getConstRefToDStressDNonLocalVariable() const {return _ipvbulk->getConstRefToDStressDNonLocalVariable();}; virtual std::vector<STensor3> &getRefToDStressDNonLocalVariable() {return _ipvbulk->getRefToDStressDNonLocalVariable();}; virtual const fullMatrix<double> &getConstRefToDLocalVariableDNonLocalVariable() const {return _ipvbulk->getConstRefToDLocalVariableDNonLocalVariable();}; virtual fullMatrix<double> &getRefToDLocalVariableDNonLocalVariable() {return _ipvbulk->getRefToDLocalVariableDNonLocalVariable();}; + virtual const fullMatrix<double> &getConstRefToDLocalVariableDGradNonLocalVariable() const {return _ipvbulk->getConstRefToDLocalVariableDGradNonLocalVariable();}; + virtual fullMatrix<double> &getRefToDLocalVariableDGradNonLocalVariable() {return _ipvbulk->getRefToDLocalVariableDGradNonLocalVariable();}; + virtual const fullVector<double> &getConstRefToNonLocalJump() const {return _ipvbulk->getConstRefToNonLocalJump(); } virtual fullVector<double> &getRefToNonLocalJump() {return _ipvbulk->getRefToNonLocalJump(); } @@ -306,9 +312,9 @@ class dG3DEnhancedStrainIPVariable : public IPVariable2Enhanced<dG3DIPVariableBa virtual const STensor3 &getConstRefToFirstPiolaKirchhoffStressb4AV() const {return _ipvbulk->getConstRefToFirstPiolaKirchhoffStressb4AV();} virtual STensor3 &getRefToFirstPiolaKirchhoffStressb4AV() {return _ipvbulk->getRefToFirstPiolaKirchhoffStressb4AV();} - - virtual void setBulkCriticalDamage(const double DT){_ipvbulk->setBulkCriticalDamage(DT);}; - virtual double getBulkCriticalDamage() const {return _ipvbulk->getBulkCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idx){_ipvbulk->setBulkCriticalDamage(DT,idx);}; // set critical damage value + virtual double getBulkCriticalDamage(int idx) const {return _ipvbulk->getBulkCriticalDamage(idx);}; + virtual double getDamageIndicator(int idx) const { return _ipvbulk->getDamageIndicator(idx);}; virtual void setNonLocalToLocal(const bool fl){_ipvbulk->setNonLocalToLocal(fl);}; virtual bool getNonLocalToLocal() const {return _ipvbulk->getNonLocalToLocal();}; diff --git a/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp b/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp index 18e68c32fb82ec300646b45ee9357e366625f6d9..f977333b44fc251c8ac59b3a8c66a903aa73d5bf 100644 --- a/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp +++ b/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp @@ -170,7 +170,7 @@ void enhancedStraindG3DMultiscaleMaterialLaw::createIPState(const bool isSolve, solver->setCheckFailureOnset(true,withNormal); solver->setRVELengthInNormalDirection(_RVELength,_surfaceReductionRatio); solver->initMicroSolver(); - ips->setSolver(solver); + ips->setMicroSolver(solver); } }; @@ -191,7 +191,7 @@ void enhancedStraindG3DMultiscaleMaterialLaw::checkInternalState(IPVariable* ipv const dG3DEnhancedStrainIPVariable* eipvprev = static_cast<const dG3DEnhancedStrainIPVariable*>(ipvprev); dG3DMultiscaleIPVariable* mipv = static_cast<dG3DMultiscaleIPVariable*>(eipv->getIPvBulk()); - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); // check failure solver->setLostSolutionUniquenssTolerance(_lostSolutionUniquenssTolerance); @@ -205,7 +205,7 @@ void enhancedStraindG3DMultiscaleMaterialLaw::stress(IPVariable* ipv, const IPVa const dG3DEnhancedStrainIPVariable* eipvprev = static_cast<const dG3DEnhancedStrainIPVariable*>(ipvprev); dG3DMultiscaleIPVariable* mipv = static_cast<dG3DMultiscaleIPVariable*>(eipv->getIPvBulk()); - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); const STensor3& Fbulk = eipv->getConstRefToBulkDeformationGradient(); const STensor3& Fbulkprev= eipvprev->getConstRefToBulkDeformationGradient(); @@ -330,3 +330,8 @@ void enhancedStraindG3DMultiscaleMaterialLaw::initialIPVariable(IPVariable* ipv, Msg::Error("dG3DIPVariableBase must be used"); }; }; + +bool enhancedStraindG3DMultiscaleMaterialLaw::withEnergyDissipation() const +{ + return _microSolver->withEnergyDissipation(); +}; \ No newline at end of file diff --git a/dG3D/src/dG3DEnhancedStrainMaterialLaw.h b/dG3D/src/dG3DEnhancedStrainMaterialLaw.h index e8e11f277911297ce41730eb6378043e4a9e631b..2508da6cc1d03c92d47403466582c16b458d1129 100644 --- a/dG3D/src/dG3DEnhancedStrainMaterialLaw.h +++ b/dG3D/src/dG3DEnhancedStrainMaterialLaw.h @@ -78,14 +78,11 @@ class enhancedStraindG3DMultiscaleMaterialLaw : public dG3DMaterialLaw, public n virtual void initialIPVariable(IPVariable* ipv, bool stiff); virtual materialLaw* clone() const {return new enhancedStraindG3DMultiscaleMaterialLaw(*this);}; - virtual bool withEnergyDissipation() const { - for (int i=0; i< _allMaterialLaw.size(); i++){ - if (_allMaterialLaw[i]->withEnergyDissipation()){ - return true; - } - } - return false; - } + virtual bool withEnergyDissipation() const; + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _macroSolver = sv; + }; #endif // SWIG }; diff --git a/dG3D/src/dG3DIPVariable.cpp b/dG3D/src/dG3DIPVariable.cpp index 8288464132b073c4cb6919a130c40b6d2b68577d..3469d7833e9a7c2b9653ca848985c231be950b50 100644 --- a/dG3D/src/dG3DIPVariable.cpp +++ b/dG3D/src/dG3DIPVariable.cpp @@ -31,10 +31,13 @@ dG3DIPVariableBase & dG3DIPVariableBase::operator = (const IPVariable &source) nonlocalData::nonlocalData(const int num, const int numExtraDof): numNonLocalVariable(num), numConstitutiveExtraDofDiffusionVariable(numExtraDof) { if (num > 0){ dLocalVariableDStrain.resize(num,STensor3(0.)); + dGradLocalVariableDStrain.resize(num,STensor3(0.)); dStressDNonLocalVariable.resize(num,STensor3(0.)); gradNonLocalVariable.resize(num,SVector3(0.)); dLocalVariableDNonLocalVariable.resize(num,num); dLocalVariableDNonLocalVariable.setAll(0.); + dLocalVariableDGradNonLocalVariable.resize(num,num); + dLocalVariableDGradNonLocalVariable.setAll(0.); nonLocalJump.resize(num); nonLocalJump.setAll(0.); if(numExtraDof>0) @@ -47,19 +50,23 @@ nonlocalData::nonlocalData(const nonlocalData& source): numNonLocalVariable(source.numNonLocalVariable), numConstitutiveExtraDofDiffusionVariable(source.numConstitutiveExtraDofDiffusionVariable), dLocalVariableDStrain(source.dLocalVariableDStrain), + dGradLocalVariableDStrain(source.dGradLocalVariableDStrain), dStressDNonLocalVariable(source.dStressDNonLocalVariable), dLocalVariableDNonLocalVariable(source.dLocalVariableDNonLocalVariable), nonLocalJump(source.nonLocalJump), gradNonLocalVariable(source.gradNonLocalVariable), - dLocalVariableDExtraDofDiffusionField(source.dLocalVariableDExtraDofDiffusionField) + dLocalVariableDExtraDofDiffusionField(source.dLocalVariableDExtraDofDiffusionField), + dLocalVariableDGradNonLocalVariable(source.dLocalVariableDGradNonLocalVariable) { }; nonlocalData& nonlocalData::operator = (const nonlocalData& source){ numNonLocalVariable = source.numNonLocalVariable; numConstitutiveExtraDofDiffusionVariable = source.numConstitutiveExtraDofDiffusionVariable; dLocalVariableDStrain = source.dLocalVariableDStrain; + dGradLocalVariableDStrain = source.dGradLocalVariableDStrain; dStressDNonLocalVariable = source.dStressDNonLocalVariable; dLocalVariableDNonLocalVariable = source.dLocalVariableDNonLocalVariable; + dLocalVariableDGradNonLocalVariable=source.dLocalVariableDGradNonLocalVariable; nonLocalJump = source.nonLocalJump; gradNonLocalVariable = source.gradNonLocalVariable; dLocalVariableDExtraDofDiffusionField= source.dLocalVariableDExtraDofDiffusionField; @@ -70,11 +77,14 @@ void nonlocalData::restart(){ restartManager::restart(numNonLocalVariable); restartManager::restart(numConstitutiveExtraDofDiffusionVariable); restartManager::restart(dLocalVariableDStrain); + restartManager::restart(dGradLocalVariableDStrain); restartManager::restart(dStressDNonLocalVariable); restartManager::restart(dLocalVariableDNonLocalVariable.getDataPtr(),numNonLocalVariable*numNonLocalVariable); + restartManager::restart(dLocalVariableDGradNonLocalVariable.getDataPtr(),numNonLocalVariable*numNonLocalVariable); restartManager::restart(nonLocalJump.getDataPtr(),numNonLocalVariable); restartManager::restart(gradNonLocalVariable); restartManager::restart(dLocalVariableDExtraDofDiffusionField.getDataPtr(),numNonLocalVariable*numConstitutiveExtraDofDiffusionVariable); + }; // constitutiveExtraDofDiffusionData::constitutiveExtraDofDiffusionData(const int num, const int numNonLocal, bool _useOfEnergy, bool _useOfEnergyConjugatedField): numConstitutiveExtraDofDiffusionVariable(num), numNonLocalVariable(numNonLocal), useOfEnergy(_useOfEnergy), useOfEnergyConjugatedField(_useOfEnergyConjugatedField) diff --git a/dG3D/src/dG3DIPVariable.h b/dG3D/src/dG3DIPVariable.h index 1fdbb7ccd6eef21f921e006545bba8601c93a2dd..970437e798b6fe97498b34bc2ffc1bacae7ec32d 100644 --- a/dG3D/src/dG3DIPVariable.h +++ b/dG3D/src/dG3DIPVariable.h @@ -13,6 +13,7 @@ #ifndef DG3DIPVARIABLE_H_ #define DG3DIPVARIABLE_H_ #include "ipvariable.h" +#include "ipField.h" #include "STensor43.h" #include "STensor33.h" #include "ipJ2linear.h" @@ -116,12 +117,18 @@ class dG3DIPVariableBase : public ipFiniteStrain virtual const std::vector<STensor3> &getConstRefToDLocalVariableDStrain() const = 0; virtual std::vector<STensor3> &getRefToDLocalVariableDStrain() = 0; + virtual const std::vector<STensor3> &getConstRefToDGradLocalVariableDStrain() const = 0; + virtual std::vector<STensor3> &getRefToDGradLocalVariableDStrain() = 0; + virtual const std::vector<STensor3> &getConstRefToDStressDNonLocalVariable() const = 0; virtual std::vector<STensor3> &getRefToDStressDNonLocalVariable() = 0; virtual const fullMatrix<double> &getConstRefToDLocalVariableDNonLocalVariable() const = 0; virtual fullMatrix<double> &getRefToDLocalVariableDNonLocalVariable() = 0; + virtual const fullMatrix<double> &getConstRefToDLocalVariableDGradNonLocalVariable() const = 0; + virtual fullMatrix<double> &getRefToDLocalVariableDGradNonLocalVariable() = 0; + virtual const fullVector<double> &getConstRefToNonLocalJump() const = 0; virtual fullVector<double> &getRefToNonLocalJump() = 0; @@ -137,8 +144,15 @@ class dG3DIPVariableBase : public ipFiniteStrain virtual const STensor3 &getConstRefToFirstPiolaKirchhoffStressb4AV() const=0; virtual STensor3 &getRefToFirstPiolaKirchhoffStressb4AV()=0; - virtual void setBulkCriticalDamage(const double DT){}; // set critical damage value - virtual double getBulkCriticalDamage() const {return 1.;}; + + virtual void setBulkCriticalDamage(const double DT, int idex){ + } + virtual double getBulkCriticalDamage(int idex) const { + return 1.; + }; + virtual double getDamageIndicator(int idex) const { + return 0.; + }; virtual void setNonLocalToLocal(const bool fl){}; virtual bool getNonLocalToLocal() const {return false;}; @@ -261,8 +275,10 @@ class nonlocalData{ int numConstitutiveExtraDofDiffusionVariable; //number of extra dof variables // for coupling std::vector<STensor3> dLocalVariableDStrain; + std::vector<STensor3> dGradLocalVariableDStrain; std::vector<STensor3> dStressDNonLocalVariable; fullMatrix<double> dLocalVariableDNonLocalVariable; + fullMatrix<double> dLocalVariableDGradNonLocalVariable; // for dg: jump in non local epl fullVector<double> nonLocalJump; @@ -481,6 +497,22 @@ protected: return _nonlocalData->dLocalVariableDStrain; } + virtual const std::vector<STensor3> &getConstRefToDGradLocalVariableDStrain() const + { + if(_nonlocalData==NULL) + Msg::Error("getConstRefToDGradLocalVariableDStrain(): _nonlocalData not created"); + else + return _nonlocalData->dGradLocalVariableDStrain; + } + virtual std::vector<STensor3> &getRefToDGradLocalVariableDStrain() + { + if(_nonlocalData==NULL) + Msg::Error("getRefToDLocalVariableDStrain(): _nonlocalData not created"); + else + return _nonlocalData->dGradLocalVariableDStrain; + } + + virtual const std::vector<STensor3> &getConstRefToDStressDNonLocalVariable() const { if(_nonlocalData==NULL) @@ -511,6 +543,23 @@ protected: return _nonlocalData->dLocalVariableDNonLocalVariable; } + virtual const fullMatrix<double> &getConstRefToDLocalVariableDGradNonLocalVariable() const + { + if(_nonlocalData==NULL) + Msg::Error("getConstRefToDLocalVariableDGradNonLocalVariable(): _nonlocalData not created"); + else + return _nonlocalData->dLocalVariableDGradNonLocalVariable; + + } + virtual fullMatrix<double> &getRefToDLocalVariableDGradNonLocalVariable() + { + if(_nonlocalData==NULL) + Msg::Error("getRefToDLocalVariableDGradNonLocalVariable(): _nonlocalData not created"); + else + return _nonlocalData->dLocalVariableDGradNonLocalVariable; + + } + virtual const fullVector<double> &getConstRefToNonLocalJump() const { if(_nonlocalData==NULL) @@ -1423,8 +1472,10 @@ class localDamageJ2HyperDG3DIPVariable : public dG3DIPVariable{ virtual void blockDissipation(const bool fl){ _nldJ2Hyperipv->blockDissipation(fl);} virtual bool dissipationIsBlocked() const { return _nldJ2Hyperipv->dissipationIsBlocked();} - virtual void setBulkCriticalDamage(const double DT){_nldJ2Hyperipv->setCriticalDamage(DT);}; // set critical damage value - virtual double getBulkCriticalDamage() const {return _nldJ2Hyperipv->getCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idx){if(idx==0) _nldJ2Hyperipv->setCriticalDamage(DT); }; // set critical damage value + virtual double getBulkCriticalDamage(int idx) const {if(idx==0) return _nldJ2Hyperipv->getCriticalDamage(); else return 1.;}; + virtual double getDamageIndicator(int idx) const { if(idx==0) return get(IPField::DAMAGE); else return 0.; }; + virtual double get(const int i) const; virtual double defoEnergy() const; @@ -1483,8 +1534,9 @@ class localDamageIsotropicElasticityDG3DIPVariable : public dG3DIPVariable else return false; } - virtual void setBulkCriticalDamage(const double DT){_localIPV->setCriticalDamage(DT);}; // set critical damage value - virtual double getBulkCriticalDamage() const {return _localIPV->getCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idx){if(idx==0) _localIPV->setCriticalDamage(DT); }; // set critical damage value + virtual double getBulkCriticalDamage(int idx) const {if(idx==0) return _localIPV->getCriticalDamage(); else return 1.;}; + virtual double getDamageIndicator(int idx) const { if(idx==0) return get(IPField::DAMAGE); else return 0.; }; virtual double get(const int i) const; virtual double defoEnergy() const {return _localIPV->defoEnergy();}; diff --git a/dG3D/src/dG3DMaterialLaw.cpp b/dG3D/src/dG3DMaterialLaw.cpp index 5ee502d396070711de79c815eb8be2ed96bd0191..42bf0d325e12141e9c2ed7146ed50f603f8aa908 100644 --- a/dG3D/src/dG3DMaterialLaw.cpp +++ b/dG3D/src/dG3DMaterialLaw.cpp @@ -3114,10 +3114,10 @@ void crystalPlasticityDG3DMaterialLaw::stress(IPVariable* ipv, const IPVariable* double crystalPlasticityDG3DMaterialLaw::scaleFactor() const{return _cplaw->scaleFactor();}; -void crystalPlasticityDG3DMaterialLaw::setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); +void crystalPlasticityDG3DMaterialLaw::setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_cplaw != NULL){ - _cplaw->setMacroSolver(sv); + _cplaw->setSolver(sv); } }; diff --git a/dG3D/src/dG3DMaterialLaw.h b/dG3D/src/dG3DMaterialLaw.h index 8c51499acc18384a5c5611498dbd275696904d91..797e7b506e5b267b4b84b3248bd6d9f4b45abaeb 100644 --- a/dG3D/src/dG3DMaterialLaw.h +++ b/dG3D/src/dG3DMaterialLaw.h @@ -193,9 +193,9 @@ class J2SmallStrainDG3DMaterialLaw : public dG3DMaterialLaw virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _j2law.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _j2law.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _j2law.setSolver(sv); }; #endif // SWIG }; @@ -248,9 +248,9 @@ class J2LinearDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new J2LinearDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _j2law.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _j2law.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _j2law.setSolver(sv); }; #endif // SWIG @@ -292,9 +292,9 @@ class HyperViscoElasticDG3DMaterialLaw : public dG3DMaterialLaw{ virtual materialLaw* clone() const{return new HyperViscoElasticDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _viscoLaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _viscoLaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _viscoLaw.setSolver(sv); }; #endif //SWIG }; @@ -343,9 +343,9 @@ class HyperViscoElastoPlasticPowerYieldDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new HyperViscoElastoPlasticPowerYieldDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _viscoLaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _viscoLaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _viscoLaw.setSolver(sv); }; #endif //SWIG }; @@ -387,9 +387,9 @@ class ViscoelasticDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new ViscoelasticDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _Vislaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _Vislaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _Vislaw.setSolver(sv); }; #endif // SWIG }; @@ -442,11 +442,11 @@ class EOSDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new EOSDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _EOSlaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _EOSlaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _EOSlaw.setSolver(sv); for (std::map<int,materialLaw*>::iterator it = maplaw.begin(); it != maplaw.end(); it++){ - it->second->setMacroSolver(sv); + it->second->setSolver(sv); } }; #endif // SWIG @@ -480,9 +480,9 @@ class VUMATinterfaceDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new VUMATinterfaceDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _vumatlaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _vumatlaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _vumatlaw.setSolver(sv); }; #endif }; @@ -522,9 +522,9 @@ class TransverseIsotropicDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new TransverseIsotropicDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _tilaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _tilaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _tilaw.setSolver(sv); }; @@ -565,9 +565,9 @@ class TransverseIsoCurvatureDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new TransverseIsoCurvatureDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _tilaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _tilaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _tilaw.setSolver(sv); }; #endif // SWIG }; @@ -675,9 +675,9 @@ class TransverseIsoYarnBDG3DMaterialLaw : public dG3DMaterialLaw virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _tilaw.withEnergyDissipation();}; TransverseIsoYarnBDG3DMaterialLaw(const TransverseIsoYarnBDG3DMaterialLaw &source); - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _tilaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _tilaw.setSolver(sv); }; #endif // SWIG }; @@ -719,9 +719,9 @@ class AnisotropicDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new AnisotropicDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _tilaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _tilaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _tilaw.setSolver(sv); }; #endif // SWIG }; @@ -754,9 +754,9 @@ class AnisotropicStochDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new AnisotropicStochDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _tilaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _tilaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _tilaw.setSolver(sv); }; #endif // SWIG }; @@ -795,9 +795,9 @@ class ClusterDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{return new ClusterDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _clusterlaw.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _clusterlaw.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _clusterlaw.setSolver(sv); }; #endif // SWIG }; @@ -827,9 +827,9 @@ protected: virtual materialLaw* clone() const{return new LocalDamageHyperelasticDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _nlLaw->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _nlLaw->setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _nlLaw->setSolver(sv); }; #endif }; @@ -873,10 +873,10 @@ class LocalDamageJ2HyperDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{ return new LocalDamageJ2HyperDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _nldJ2Hyperlaw->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nldJ2Hyperlaw != NULL){ - _nldJ2Hyperlaw->setMacroSolver(sv); + _nldJ2Hyperlaw->setSolver(sv); } } #endif @@ -923,10 +923,10 @@ class LinearThermoMechanicsDG3DMaterialLaw : public dG3DMaterialLaw // public ma virtual materialLaw* clone() const{ return new LinearThermoMechanicsDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _lawLinearTM->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawLinearTM!=NULL){ - _lawLinearTM->setMacroSolver(sv); + _lawLinearTM->setSolver(sv); } } #endif @@ -968,9 +968,9 @@ class J2ThermoMechanicsDG3DMaterialLaw : public dG3DMaterialLaw virtual materialLaw* clone() const{ return new J2ThermoMechanicsDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _j2law.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _j2law.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _j2law.setSolver(sv); } #endif // SWIG }; @@ -1026,9 +1026,9 @@ class FullJ2ThermoMechanicsDG3DMaterialLaw : public dG3DMaterialLaw{ virtual materialLaw* clone() const{ return new FullJ2ThermoMechanicsDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _j2FullThermo.withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _j2FullThermo.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _j2FullThermo.setSolver(sv); } #endif // SWIG }; @@ -1077,10 +1077,10 @@ class mlawAnIsotropicTherMechDG3DMaterialLaw :public dG3DMaterialLaw virtual materialLaw* clone() const{ return new mlawAnIsotropicTherMechDG3DMaterialLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const; virtual bool withEnergyDissipation() const {return _lawAnTM->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawAnTM!=NULL) - _lawAnTM->setMacroSolver(sv); + _lawAnTM->setSolver(sv); } #endif }; @@ -1128,10 +1128,10 @@ class SMPDG3DMaterialLaw :public dG3DMaterialLaw // ,public mlawSMP double getExtraDofStoredEnergyPerUnitField(double T) const; virtual materialLaw* clone() const{ return new SMPDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _lawTMSMP->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawTMSMP!=NULL) - _lawTMSMP->setMacroSolver(sv); + _lawTMSMP->setSolver(sv); } #endif }; @@ -1187,10 +1187,10 @@ class PhenomenologicalSMPDG3DMaterialLaw :public dG3DMaterialLaw // ,public mlaw double getExtraDofStoredEnergyPerUnitField(double T) const; virtual materialLaw* clone() const{ return new PhenomenologicalSMPDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _lawTMSMP->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawTMSMP!=NULL) - _lawTMSMP->setMacroSolver(sv); + _lawTMSMP->setSolver(sv); } #endif }; @@ -1220,7 +1220,7 @@ class crystalPlasticityDG3DMaterialLaw : public dG3DMaterialLaw{ virtual double scaleFactor() const; virtual materialLaw* clone() const{return new crystalPlasticityDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const; - virtual void setMacroSolver(const nonLinearMechSolver* sv); + virtual void setSolver(const nonLinearMechSolver* sv); #endif }; @@ -1265,10 +1265,10 @@ class LinearElecTherMechDG3DMaterialLaw : public dG3DMaterialLaw // public mater } virtual materialLaw* clone() const{ return new LinearElecTherMechDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _lawLinearETM->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawLinearETM!=NULL) - _lawLinearETM->setMacroSolver(sv); + _lawLinearETM->setSolver(sv); } #endif }; @@ -1321,10 +1321,10 @@ class mlawAnIsotropicElecTherMechDG3DMaterialLaw :public dG3DMaterialLaw } virtual materialLaw* clone() const{ return new mlawAnIsotropicElecTherMechDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _lawETM->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawETM!=NULL) - _lawETM->setMacroSolver(sv); + _lawETM->setSolver(sv); } #endif }; @@ -1382,10 +1382,10 @@ class mlawElecSMPDG3DMaterialLaw :public dG3DMaterialLaw } virtual materialLaw* clone() const{ return new mlawElecSMPDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _lawETMSMP->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawETMSMP!=NULL) - _lawETMSMP->setMacroSolver(sv); + _lawETMSMP->setSolver(sv); } #endif }; diff --git a/dG3D/src/dG3DMultiscaleCohesiveMaterialLaw.cpp b/dG3D/src/dG3DMultiscaleCohesiveMaterialLaw.cpp index 2c2406bbc40962215ede0a58023206830ecf59de..8bbf7a8c9f25db26acfcd7ddbf8449fcd142cab0 100644 --- a/dG3D/src/dG3DMultiscaleCohesiveMaterialLaw.cpp +++ b/dG3D/src/dG3DMultiscaleCohesiveMaterialLaw.cpp @@ -129,7 +129,7 @@ void dG3DMultiscaleCohesiveLaw::transferInterfaceDataToBulk(IPVariable* ipv, con nonLinearMechSolver* solver = NULL; if (ipvMultiscale!= NULL){ - solver = ipvMultiscale->getSolver(); + solver = ipvMultiscale->getMicroSolver(); } else { Msg::Error("solver is not available MultiscaleDGCohesive3DLaw::transferInterfaceDataToBulk"); @@ -210,7 +210,7 @@ void dG3DMultiscaleCohesiveLaw::stress(IPVariable* ipv, const IPVariable* ipvpre BulkFollowedCohesive3DIPVariable* cohmipv = dynamic_cast<BulkFollowedCohesive3DIPVariable*>(fipv->getIPvFrac()); const BulkFollowedCohesive3DIPVariable* cohmipvprev = dynamic_cast<const BulkFollowedCohesive3DIPVariable*>(fipvprev->getIPvFrac()); - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); const homogenizedData* homoData = solver->getHomogenizationState(IPStateBase::current); const homogenizedData* homoDataPrev = solver->getHomogenizationState(IPStateBase::previous); @@ -346,7 +346,7 @@ void TwoFieldMultiscaleCohesive3DLaw::stress(IPVariable* ipv, const IPVariable* nonLinearMechSolver* solver = NULL; if (ipvMultiscale!= NULL){ - solver = ipvMultiscale->getSolver(); + solver = ipvMultiscale->getMicroSolver(); } else { Msg::Error("solver is not available MultiscaleDGCohesive3DLaw::transferInterfaceDataToBulk"); @@ -531,7 +531,7 @@ void MultiscaleAdhesive3DLaw::transferInterfaceDataToBulk(IPVariable* ipv, const nonLinearMechSolver* solver = NULL; if (ipvMultiscale!= NULL){ - solver = ipvMultiscale->getSolver(); + solver = ipvMultiscale->getMicroSolver(); } if (solver == NULL){ @@ -608,7 +608,7 @@ void MultiscaleAdhesive3DLaw::stress(IPVariable* ipv, const IPVariable* ipvprev, BulkFollowedCohesive3DIPVariable* cohmipv = dynamic_cast<BulkFollowedCohesive3DIPVariable*>(fipv->getIPvFrac()); const BulkFollowedCohesive3DIPVariable* cohmipvprev = dynamic_cast<const BulkFollowedCohesive3DIPVariable*>(fipvprev->getIPvFrac()); - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); homogenizedData* homoData = solver->getHomogenizationState(IPStateBase::current); const STensor3& P = fipv->getConstRefToFirstPiolaKirchhoffStress(); diff --git a/dG3D/src/dG3DMultiscaleIPVariable.cpp b/dG3D/src/dG3DMultiscaleIPVariable.cpp index f35716656f5de744a76dc9c4ad695a2e9e4b3c2b..f37616faa94bdee1f1a43aad9aba162eb255ac1e 100644 --- a/dG3D/src/dG3DMultiscaleIPVariable.cpp +++ b/dG3D/src/dG3DMultiscaleIPVariable.cpp @@ -10,16 +10,16 @@ void dG3DMultiscaleIPVariable::brokenSolver(const bool bl){ dG3DIPVariable::brokenSolver(bl); _solverBroken = bl; - if (this->getSolver()!= NULL){ - this->getSolver()->brokenSolver(_solverBroken); + if (this->getMicroSolver()!= NULL){ + this->getMicroSolver()->brokenSolver(_solverBroken); } }; void dG3DMultiscaleIPVariable::blockDissipation(const bool bl){ dG3DIPVariable::blockDissipation(bl); _dissipationBlocked = bl; - if (this->getSolver()!= NULL) { - this->getSolver()->blockDissipation(IPStateBase::current,_dissipationBlocked); + if (this->getMicroSolver()!= NULL) { + this->getMicroSolver()->blockDissipation(IPStateBase::current,_dissipationBlocked); } } @@ -225,22 +225,22 @@ void dG3DMultiscaleIPVariable::setReceivedMicroDataToMacroProblem(const double* double MultiscaleThermoMechanicsDG3DIPVariable::defoEnergy() const{ double energ = 0.; - if (getSolver() != NULL){ - energ = getSolver()->getHomogenizationState(IPStateBase::current)->getDeformationEnergy(); + if (getMicroSolver() != NULL){ + energ = getMicroSolver()->getHomogenizationState(IPStateBase::current)->getDeformationEnergy(); } return energ; }; double MultiscaleThermoMechanicsDG3DIPVariable::getInternalEnergyExtraDofDiffusion() const{ double energ = 0.; - if (getSolver() != NULL){ - energ = getSolver()->getHomogenizationState(IPStateBase::current)->getHomogenizedConstitutiveExtraDofInternalEnergy(0); + if (getMicroSolver() != NULL){ + energ = getMicroSolver()->getHomogenizationState(IPStateBase::current)->getHomogenizedConstitutiveExtraDofInternalEnergy(0); } return energ; }; double MultiscaleThermoMechanicsDG3DIPVariable::plasticEnergy() const{ double energ = 0.; - if (getSolver() != NULL){ - energ = getSolver()->getHomogenizationState(IPStateBase::current)->getPlasticEnergy(); + if (getMicroSolver() != NULL){ + energ = getMicroSolver()->getHomogenizationState(IPStateBase::current)->getPlasticEnergy(); } return energ; }; diff --git a/dG3D/src/dG3DMultiscaleMaterialLaw.cpp b/dG3D/src/dG3DMultiscaleMaterialLaw.cpp index f4986926ac77482b29064b6458c7fe2e67d879aa..76a11cd13b8e08de8d16e6cf7a0e9a03840eb18a 100644 --- a/dG3D/src/dG3DMultiscaleMaterialLaw.cpp +++ b/dG3D/src/dG3DMultiscaleMaterialLaw.cpp @@ -10,24 +10,19 @@ #include "nonLinearMechSolver.h" #include "dG3DMultiscaleCohesiveMaterialLaw.h" -void dG3DMultiscaleMaterialLawBase::setViewInterfaceElement(const int em, const int ep, const int gp){ - TwoNum tn(em,ep); - std::set<int>& gpToView = _interfaceElementsToView[tn]; - gpToView.insert(gp); -}; +bool dG3DMultiscaleMaterialLawBase::withEnergyDissipation() const {return _microSolver->withEnergyDissipation();}; -void dG3DMultiscaleMaterialLawBase::setViewAllInterfaceElements(const bool fl, const int gp){ - _allInterfacesAreViewed = fl; - if (_allInterfacesAreViewed){ - _interfaceGPsToAllView.insert(gp); - } -}; dG3DMultiscaleMaterialLawBase::dG3DMultiscaleMaterialLawBase(const int lnum, const int tag) - : dG3DMaterialLaw(lnum,0,false),numericalMaterial(tag), - _blockDamageAfterFailureOnset(false),_lostSolutionUniquenssTolerance(-1.e10), - _failureCrFollowingInterfaceNormal(true),_allInterfacesAreViewed(false){} - + : dG3DMaterialLaw(lnum,0,false),numericalMaterial(tag){} + +dG3DMultiscaleMaterialLawBase::dG3DMultiscaleMaterialLawBase(const dG3DMultiscaleMaterialLawBase& src) + : dG3DMaterialLaw(src),numericalMaterial(src){}; +bool dG3DMultiscaleMaterialLawBase::withEnergyDissipation() const; +void dG3DMultiscaleMaterialLawBase::setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _macroSolver = sv; +}; void dG3DMultiscaleMaterialLawBase::fillElasticStiffness(double & rho, STensor43& L){ printf("get elastic properties\n"); @@ -47,6 +42,16 @@ dG3DElasticMultiscaleMaterialLaw::dG3DElasticMultiscaleMaterialLaw(const int lnu dG3DMultiscaleMaterialLawBase(lnum,tag),_elasticPotential(NULL){ }; +dG3DElasticMultiscaleMaterialLaw::dG3DElasticMultiscaleMaterialLaw(const dG3DElasticMultiscaleMaterialLaw& src) + : dG3DMultiscaleMaterialLawBase(src) +{ + if (src._elasticPotential) _elasticPotential = src._elasticPotential->clone(); + else _elasticPotential = NULL; +}; +dG3DElasticMultiscaleMaterialLaw::~dG3DElasticMultiscaleMaterialLaw(){ + if (_elasticPotential) delete _elasticPotential; +}; + void dG3DElasticMultiscaleMaterialLaw::initLaws(const std::map<int,materialLaw*> &maplaw){ if (!_initialized){ this->fillElasticStiffness(_rho,elasticStiffness); @@ -107,7 +112,15 @@ double dG3DElasticMultiscaleMaterialLaw::soundSpeed() const }; dG3DMultiscaleMaterialLaw::dG3DMultiscaleMaterialLaw(const int lnum, const int tag) - : dG3DMultiscaleMaterialLawBase(lnum,tag){}; + : dG3DMultiscaleMaterialLawBase(lnum,tag), + _blockDamageAfterFailureOnset(false), + _lostSolutionUniquenssTolerance(-1.e10){}; + +dG3DMultiscaleMaterialLaw::dG3DMultiscaleMaterialLaw(const dG3DMultiscaleMaterialLaw& src) + : dG3DMultiscaleMaterialLawBase(src), + _blockDamageAfterFailureOnset(src._blockDamageAfterFailureOnset), + _lostSolutionUniquenssTolerance(src._lostSolutionUniquenssTolerance){}; + void dG3DMultiscaleMaterialLaw::initLaws(const std::map<int,materialLaw*> &maplaw){ if (!_initialized){ @@ -177,7 +190,7 @@ void dG3DMultiscaleMaterialLaw::createIPState(const bool isSolve, IPStateBase* & solver->setCheckFailureOnset(false,false); } solver->initMicroSolver(); - ips->setSolver(solver); + ips->setMicroSolver(solver); } }; @@ -207,7 +220,7 @@ void dG3DMultiscaleMaterialLaw::stress(IPVariable* ipv, const IPVariable* ipvpre mipvprev = dynamic_cast<const dG3DMultiscaleIPVariable*>(ipvprev); } - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); // set kinematics input const STensor3& F = mipv->getConstRefToDeformationGradient(); @@ -284,6 +297,10 @@ void MultiscaleThermoMechanicsDG3DMaterialLaw::initLaws(const std::map<int,mater } }; +bool MultiscaleThermoMechanicsDG3DMaterialLaw::withEnergyDissipation() const { + return _microSolver->withEnergyDissipation(); +} + void MultiscaleThermoMechanicsDG3DMaterialLaw::createIPState(IPStateBase* &ips,const bool* state_,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const{ this->createIPState(true,ips,state_,ele,nbFF_,GP,gpt); }; @@ -305,7 +322,7 @@ void MultiscaleThermoMechanicsDG3DMaterialLaw::createIPState(const bool isSolve, int el = ele->getNum(); nonLinearMechSolver* solver = this->createMicroSolver(el,gpt); solver->initMicroSolver(); - ips->setSolver(solver); + ips->setMicroSolver(solver); } }; @@ -330,7 +347,7 @@ void MultiscaleThermoMechanicsDG3DMaterialLaw::stress(IPVariable* ipv, const IPV const double T = mipv->getConstRefToField(0); const double T0 = mipvprev->getConstRefToField(0); // set to solver - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); solver->getMicroBC()->setDeformationGradient(F); solver->getMicroBC()->setConstitutiveExtraDofDiffusionGradient(0,gradT); solver->getMicroBC()->setConstitutiveExtraDofDiffusionValue(0,T); diff --git a/dG3D/src/dG3DMultiscaleMaterialLaw.h b/dG3D/src/dG3DMultiscaleMaterialLaw.h index 2168331cde231ae397608908764952efdd1acdd4..704eb9eab3789c9a1d9095b063bebcb543890382 100644 --- a/dG3D/src/dG3DMultiscaleMaterialLaw.h +++ b/dG3D/src/dG3DMultiscaleMaterialLaw.h @@ -18,72 +18,30 @@ class dG3DMultiscaleMaterialLawBase : public dG3DMaterialLaw, public numericalMa #ifndef SWIG protected: virtual void fillElasticStiffness(double & rho, STensor43& L); - - protected: - std::map<TwoNum, std::set<int> > _interfaceElementsToView; - bool _allInterfacesAreViewed; - std::set<int> _interfaceGPsToAllView; - - + public: dG3DMultiscaleMaterialLawBase(const int lnum, const int tag); - dG3DMultiscaleMaterialLawBase(const dG3DMultiscaleMaterialLawBase& src) - : dG3DMaterialLaw(src),numericalMaterial(src), - _blockDamageAfterFailureOnset(src._blockDamageAfterFailureOnset), - _lostSolutionUniquenssTolerance(src._lostSolutionUniquenssTolerance), - _failureCrFollowingInterfaceNormal(src._failureCrFollowingInterfaceNormal), - _allInterfacesAreViewed(src._allInterfacesAreViewed), - _interfaceElementsToView(src._interfaceElementsToView), - _interfaceGPsToAllView(src._interfaceGPsToAllView) {}; - - virtual bool withEnergyDissipation() const { - for (int i=0; i< _allMaterialLaw.size(); i++){ - if (_allMaterialLaw[i]->withEnergyDissipation()){ - return true; - } - } - return false; - } - + dG3DMultiscaleMaterialLawBase(const dG3DMultiscaleMaterialLawBase& src); virtual ~dG3DMultiscaleMaterialLawBase(){}; - + + virtual bool withEnergyDissipation() const; + virtual void setSolver(const nonLinearMechSolver* sv); virtual void createIPState(const bool isSolve, IPStateBase* &ips,const bool* state =NULL, const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt=0) const=0; - - const std::map<TwoNum, std::set<int> >& getInterfaceElementsToView() const {return _interfaceElementsToView;}; - const std::set<int> getInterfaceGPsToAllView() const {return _interfaceGPsToAllView;}; - bool allInterfacesAreViewed() const {return _allInterfacesAreViewed;} - #endif //SWIG - protected: - bool _blockDamageAfterFailureOnset; // true if failure is blocked after failure onset - double _lostSolutionUniquenssTolerance; - bool _failureCrFollowingInterfaceNormal; // true if failure is checked based on interface normal - - public: - void setBlockDamageAfterFailureOnset(const bool flg){ _blockDamageAfterFailureOnset = flg;}; - void setBlockDamageAfterFailureOnsetTolerance(const double tol){ _lostSolutionUniquenssTolerance = tol;}; - void setFailureCheckFollowingInterfaceNormal(const bool fl){_failureCrFollowingInterfaceNormal = fl;}; - bool getBlockDamageAfterFailureOnset() const {return _blockDamageAfterFailureOnset;}; - double getBlockDamageAfterFailureOnsetTolerance() const{return _lostSolutionUniquenssTolerance;} - bool getFailureCheckFollowingInterfaceNormal() const{return _blockDamageAfterFailureOnset;}; - void setViewInterfaceElement(const int em, const int ep, const int gp); - void setViewAllInterfaceElements(const bool fl, const int gp=0); + virtual materialLaw* clone() const = 0; + #endif //SWIG }; class dG3DElasticMultiscaleMaterialLaw : public dG3DMultiscaleMaterialLawBase{ - protected: +protected: + #ifndef SWIG elasticPotential* _elasticPotential; // - + #endif //SWIG public: dG3DElasticMultiscaleMaterialLaw(const int lnum, const int tag); #ifndef SWIG - dG3DElasticMultiscaleMaterialLaw(const dG3DElasticMultiscaleMaterialLaw& src) - : dG3DMultiscaleMaterialLawBase(src){ - if (src._elasticPotential) _elasticPotential = src._elasticPotential->clone(); - }; - virtual ~dG3DElasticMultiscaleMaterialLaw(){ - if (_elasticPotential) delete _elasticPotential; - }; + dG3DElasticMultiscaleMaterialLaw(const dG3DElasticMultiscaleMaterialLaw& src); + virtual ~dG3DElasticMultiscaleMaterialLaw(); virtual materialLaw::matname getType() const {return materialLaw::linearElastic;} virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const; @@ -106,16 +64,23 @@ class dG3DElasticMultiscaleMaterialLaw : public dG3DMultiscaleMaterialLawBase{ class dG3DMultiscaleMaterialLaw : public dG3DMultiscaleMaterialLawBase{ + protected: + bool _blockDamageAfterFailureOnset; // true if failure is blocked after failure onset + double _lostSolutionUniquenssTolerance; + public: dG3DMultiscaleMaterialLaw(const int lnum, const int tag); + void setBlockDamageAfterFailureOnset(const bool flg){ _blockDamageAfterFailureOnset = flg;}; + void setBlockDamageAfterFailureOnsetTolerance(const double tol){ _lostSolutionUniquenssTolerance = tol;}; #ifndef SWIG - dG3DMultiscaleMaterialLaw(const dG3DMultiscaleMaterialLaw& src) - : dG3DMultiscaleMaterialLawBase(src){}; + dG3DMultiscaleMaterialLaw(const dG3DMultiscaleMaterialLaw& src); virtual ~dG3DMultiscaleMaterialLaw(){}; - virtual matname getType() const{return materialLaw::numeric;}; + + bool getBlockDamageAfterFailureOnset() const {return _blockDamageAfterFailureOnset;}; + double getBlockDamageAfterFailureOnsetTolerance() const{return _lostSolutionUniquenssTolerance;} + virtual matname getType() const{return materialLaw::numeric;}; virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const; - virtual void createIPState(const bool isSolve, IPStateBase* &ips,const bool* state =NULL, const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt=0) const; // To allow initialization of bulk ip in case of fracture @@ -134,9 +99,7 @@ class dG3DMultiscaleMaterialLaw : public dG3DMultiscaleMaterialLawBase{ virtual void setElasticStiffness(IPVariable* ipv) const; virtual bool isNumeric() const{return true;} virtual void initialIPVariable(IPVariable* ipv, bool stiff); - virtual bool brokenCheck(const IPVariable* ipv) const; - virtual materialLaw* clone() const {return new dG3DMultiscaleMaterialLaw(*this);}; #endif // SWIG }; @@ -148,6 +111,7 @@ class MultiscaleThermoMechanicsDG3DMaterialLaw : public dG3DMaterialLaw, public STensor3 Stiff_alphaDilatation; virtual void fillElasticStiffness(double & rho, STensor43& L){ Msg::Error("MultiscaleThermoMechanicsDG3DMaterialLaw::fillElasticStiffness should not be used"); + Msg::Exit(0); }; virtual void fillElasticStiffness(double& rho, STensor43& L, STensor3& Klinear, STensor3& alphaDilatation); @@ -162,14 +126,7 @@ class MultiscaleThermoMechanicsDG3DMaterialLaw : public dG3DMaterialLaw, public virtual ~MultiscaleThermoMechanicsDG3DMaterialLaw(){} virtual matname getType() const{return materialLaw::numeric;}; - virtual bool withEnergyDissipation() const { - for (int i=0; i< _allMaterialLaw.size(); i++){ - if (_allMaterialLaw[i]->withEnergyDissipation()){ - return true; - } - } - return false; - } + virtual bool withEnergyDissipation() const; virtual void createIPState(IPStateBase* &ips,const bool* state_=NULL,const MElement *ele=NULL, const int nbFF_=0, const IntPt *GP=NULL, const int gpt = 0) const; virtual void createIPState(const bool isSolve, IPStateBase* &ips,const bool* state =NULL, @@ -191,6 +148,10 @@ class MultiscaleThermoMechanicsDG3DMaterialLaw : public dG3DMaterialLaw, public virtual bool isNumeric() const{return true;} virtual void initialIPVariable(IPVariable* ipv, bool stiff); virtual materialLaw* clone() const {return new MultiscaleThermoMechanicsDG3DMaterialLaw(*this);}; + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _macroSolver = sv; + }; #endif //SWIG }; diff --git a/dG3D/src/dG3DTerms.cpp b/dG3D/src/dG3DTerms.cpp index 2d931636fd3cd717589abd3e925cf65eee4e7f50..be5e4d7edb66b7f1a4c74337b97eced8b0da45e5 100644 --- a/dG3D/src/dG3DTerms.cpp +++ b/dG3D/src/dG3DTerms.cpp @@ -949,9 +949,10 @@ void dG3DStiffnessBulk::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> Msg::Error("Your material law uses more constitutive extra dof variables than your domain dG3DStiffnessBulk::get"); for (int nlk = 0; nlk < vipv[i]->getNumberNonLocalVariable(); nlk++){ - const STensor3 *dpds = &vipv[i]->getConstRefToDLocalVariableDStrain()[nlk]; - const STensor3 *dsdp = &vipv[i]->getConstRefToDStressDNonLocalVariable()[nlk]; - const STensor3 *cg = &vipv[i]->getConstRefToCharacteristicLengthMatrix(nlk); // by Wu Ling + const STensor3 *dpds = &vipv[i]->getConstRefToDLocalVariableDStrain()[nlk]; + const STensor3 *dpdsBtB = &vipv[i]->getConstRefToDGradLocalVariableDStrain()[nlk]; + const STensor3 *dsdp = &vipv[i]->getConstRefToDStressDNonLocalVariable()[nlk]; + const STensor3 *cg = &vipv[i]->getConstRefToCharacteristicLengthMatrix(nlk); // by Wu Ling for(int j=0;j<nbFF; j++){ @@ -994,6 +995,8 @@ void dG3DStiffnessBulk::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> { mStiff(j+nlk*nbFF+threeTimesNbFF,k+kk*nbFF) -= getNonLocalEqRatio()*ratio*(Vals[j+nlk*nbFF+threeTimesNbFF]* dpds->operator()(ii,p)*dBarFdu[i][k](ii,p,kk)); + mStiff(j+nlk*nbFF+threeTimesNbFF,k+kk*nbFF) -= getNonLocalEqRatio()*ratio*( + BtB*dpdsBtB->operator()(ii,p)*dBarFdu[i][k](ii,p,kk)); //to check } } } @@ -1003,6 +1006,8 @@ void dG3DStiffnessBulk::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> { mStiff(j+nlk*nbFF+threeTimesNbFF,k+kk*nbFF) -= getNonLocalEqRatio()*ratio*(Vals[j+nlk*nbFF+threeTimesNbFF]* dpds->operator()(kk,m)*Grads[k+kk*nbFF](m)); + mStiff(j+nlk*nbFF+threeTimesNbFF,k+kk*nbFF) -= getNonLocalEqRatio()*ratio*( + BtB*dpdsBtB->operator()(kk,m)*Grads[k+kk*nbFF](m)); //to check } } } @@ -1012,9 +1017,18 @@ void dG3DStiffnessBulk::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> for (int mlk = 0; mlk < vipv[i]->getNumberNonLocalVariable(); mlk++){ double SpBar = vipv[i]->getConstRefToDLocalVariableDNonLocalVariable()(nlk,mlk); + double SGradpBar = vipv[i]->getConstRefToDLocalVariableDGradNonLocalVariable()(nlk,mlk); + for(int j=0;j<nbFF; j++){ for(int k=0;k<nbFF;k++){ + double BtB = 0.; + for(int m=0; m<3; m++){ + for(int n=0; n<3; n++){ + BtB += Grads[j+nlk*nbFF+threeTimesNbFF](m)*(cg->operator()(m,n))*Grads[k+mlk*nbFF+threeTimesNbFF](n); + } + } mStiff(j+nlk*nbFF+threeTimesNbFF,k+mlk*nbFF+threeTimesNbFF) -= getNonLocalEqRatio()*ratio*(Vals[j+nlk*nbFF+threeTimesNbFF]*SpBar*Vals[k+mlk*nbFF+threeTimesNbFF]); + mStiff(j+nlk*nbFF+threeTimesNbFF,k+mlk*nbFF+threeTimesNbFF) -= getNonLocalEqRatio()*ratio*(BtB*SGradpBar*Vals[k+mlk*nbFF+threeTimesNbFF]); } } } diff --git a/dG3D/src/hoDGMaterialLaw.cpp b/dG3D/src/hoDGMaterialLaw.cpp index a0b5b3219950c9b9367afe9f4b4f0fcbdeed0f9a..a2e8463379ed8eca361062bef4fbe0e523e4ac52 100644 --- a/dG3D/src/hoDGMaterialLaw.cpp +++ b/dG3D/src/hoDGMaterialLaw.cpp @@ -360,10 +360,10 @@ void hoDGMultiscaleMaterialLaw::initLaws(const std::map<int,materialLaw*> &mapla }; bool hoDGMultiscaleMaterialLaw::isHighOrder() const { - if (_microBC->getOrder() ==1){ + if (_microSolver->getMicroBC()->getOrder() ==1){ return false; } - else if (_microBC->getOrder()==2){ + else if (_microSolver->getMicroBC()->getOrder()==2){ return true; } else{ @@ -380,7 +380,7 @@ void hoDGMultiscaleMaterialLaw::fillElasticStiffness(double & rho, STensor43& LF solver->initMicroSolver(); LF = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_F(); - if (_microBC->getOrder() == 2){ + if (_microSolver->getMicroBC()->getOrder() == 2){ LG = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_G(); JF = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_G_F(); JG = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_G_G(); @@ -409,7 +409,7 @@ void hoDGMultiscaleMaterialLaw::createIPState(const bool isSolve, IPStateBase* & int el = ele->getNum(); nonLinearMechSolver* solver = this->createMicroSolver(el,gpt); solver->initMicroSolver(); - ips->setSolver(solver); + ips->setMicroSolver(solver); } }; @@ -423,11 +423,11 @@ void hoDGMultiscaleMaterialLaw::createIPVariable(IPVariable* &ipv,const MElement void hoDGMultiscaleMaterialLaw::stress(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac){ hoDGMultiscaleIPVariable* mipv = static_cast<hoDGMultiscaleIPVariable*>(ipv); const hoDGMultiscaleIPVariable* mipvprev = static_cast<const hoDGMultiscaleIPVariable*>(ipvprev); - nonLinearMechSolver* solver = mipv->getSolver(); + nonLinearMechSolver* solver = mipv->getMicroSolver(); // set kinematics input const STensor3& F = mipv->getConstRefToDeformationGradient(); solver->getMicroBC()->setDeformationGradient(F); - if (_microBC->getOrder() ==2){ + if (solver->getMicroBC()->getOrder() ==2){ const STensor33& G = mipv->getConstRefToGradientOfDeformationGradient(); solver->getMicroBC()->setGradientOfDeformationGradient(G); }; @@ -443,7 +443,7 @@ void hoDGMultiscaleMaterialLaw::stress(IPVariable* ipv, const IPVariable* ipvpre mipv->setRefToDGElasticTangentModuli(elasticStiffness); - if (_microBC->getOrder() ==2){ + if (solver->getMicroBC()->getOrder() ==2){ mipv->getRefToSecondOrderStress() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedSecondOrderStress(); if (stiff){ @@ -490,3 +490,7 @@ void hoDGMultiscaleMaterialLaw::initialIPVariable(IPVariable* ipv, bool stiff){ } }; + +bool hoDGMultiscaleMaterialLaw::withEnergyDissipation() const { + return _microSolver->withEnergyDissipation(); +} \ No newline at end of file diff --git a/dG3D/src/hoDGMaterialLaw.h b/dG3D/src/hoDGMaterialLaw.h index 2cf5c21ff08c2cc879cd6c485863a84a8f7f4ece..249eab771d9c98757c9d727d4a7313ab673e6ff5 100644 --- a/dG3D/src/hoDGMaterialLaw.h +++ b/dG3D/src/hoDGMaterialLaw.h @@ -132,14 +132,11 @@ class hoDGMultiscaleMaterialLaw : public dG3DMaterialLaw, virtual void initialIPVariable(IPVariable* ipv, bool stiff); virtual materialLaw* clone() const {return new hoDGMultiscaleMaterialLaw(*this);} virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvp) const{}; // do nothing - virtual bool withEnergyDissipation() const { - for (int i=0; i< _allMaterialLaw.size(); i++){ - if (_allMaterialLaw[i]->withEnergyDissipation()){ - return true; - } - } - return false; - } + virtual bool withEnergyDissipation() const; + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _macroSolver = sv; + }; #endif }; diff --git a/dG3D/src/nonLocalDamageDG3DIPVariable.cpp b/dG3D/src/nonLocalDamageDG3DIPVariable.cpp index 357ca887cc7c83a3831bb20db331b9ad2a6df080..6f3893ef6c6e7782956e6c35744cdb4cb3b27fa9 100644 --- a/dG3D/src/nonLocalDamageDG3DIPVariable.cpp +++ b/dG3D/src/nonLocalDamageDG3DIPVariable.cpp @@ -152,7 +152,7 @@ void virtualNonLocalDamageDG3DIPVariable::restart(){ }; // -nonLocalDamageDG3DIPVariable::nonLocalDamageDG3DIPVariable(int _nsdv, const bool oninter) : dG3DIPVariable(oninter,1) +nonLocalDamageDG3DIPVariable::nonLocalDamageDG3DIPVariable(int _nsdv, int _nlVar, const bool oninter) : dG3DIPVariable(oninter,_nlVar) { _nldipv = new IPNonLocalDamage(_nsdv); } @@ -193,9 +193,9 @@ nonLocalDamageDG3DIPVariable& nonLocalDamageDG3DIPVariable::operator=(const IPVa } double nonLocalDamageDG3DIPVariable::get(const int i) const { - double val = dG3DIPVariable::get(i); - if (val == 0) - val = getIPNonLocalDamage()->get(i); + double val = getIPNonLocalDamage()->get(i); + if (val == 0.) + val = dG3DIPVariable::get(i); return val; } double nonLocalDamageDG3DIPVariable::defoEnergy() const @@ -210,6 +210,8 @@ double nonLocalDamageDG3DIPVariable::plasticEnergy() const double nonLocalDamageDG3DIPVariable::getConstRefToLocalVariable(const int idex) const { if (idex == 0) return getIPNonLocalDamage()->_nldCurrentPlasticStrain; + else if (idex == 1) + return getIPNonLocalDamage()->_nlFiber_loc; //change here and below else{ Msg::Error("the non-local variable %d is not defined",idex); } @@ -217,6 +219,8 @@ double nonLocalDamageDG3DIPVariable::getConstRefToLocalVariable(const int idex) double& nonLocalDamageDG3DIPVariable::getRefToLocalVariable(const int idex) { if (idex == 0) return getIPNonLocalDamage()->_nldCurrentPlasticStrain; + else if (idex == 1) + return getIPNonLocalDamage()->_nlFiber_loc; else{ Msg::Error("the non-local variable %d is not defined",idex); } @@ -225,6 +229,8 @@ double& nonLocalDamageDG3DIPVariable::getRefToLocalVariable(const int idex) { double nonLocalDamageDG3DIPVariable::getConstRefToNonLocalVariable(const int idex) const{ if (idex == 0) return getIPNonLocalDamage()->_nldEffectivePlasticStrain; + else if (idex == 1) + return getIPNonLocalDamage()->_nlFiber_d_bar; else{ Msg::Error("the non-local variable %d is not defined",idex); } @@ -232,6 +238,8 @@ double nonLocalDamageDG3DIPVariable::getConstRefToNonLocalVariable(const int ide double& nonLocalDamageDG3DIPVariable::getRefToNonLocalVariable(const int idex) { if (idex == 0) return getIPNonLocalDamage()->_nldEffectivePlasticStrain; + else if (idex == 1) + return getIPNonLocalDamage()->_nlFiber_d_bar; else{ Msg::Error("the non-local variable %d is not defined",idex); } @@ -592,6 +600,13 @@ double nonLocalPorosityDG3DIPVariable::get(const int i) const else if (i == IPField::SHAPE_FACTOR){ return getIPNonLocalPorosity()->getConstRefToIPVoidState().getVoidShapeFactor(); } + else if (i == IPField::COALESCENCE_ACTIVE) + { + if (getIPNonLocalPorosity()->getConstRefToIPCoalescence().getCoalescenceActiveFlag()){ + return 1.; + } + else return 0.; + } else if ( i == IPField::COALESCENCE){ if (getIPNonLocalPorosity()->getConstRefToIPCoalescence().getCoalescenceOnsetFlag()){ return 1.; diff --git a/dG3D/src/nonLocalDamageDG3DIPVariable.h b/dG3D/src/nonLocalDamageDG3DIPVariable.h index 626749943a783567c2d76072650b56f8f2416441..21a367fa686382253a25e381f6f33d1ae27bee31 100644 --- a/dG3D/src/nonLocalDamageDG3DIPVariable.h +++ b/dG3D/src/nonLocalDamageDG3DIPVariable.h @@ -65,9 +65,9 @@ class virtualNonLocalDamageDG3DIPVariable : public dG3DIPVariableBase{ dG3DIPVariableBase::setLocation(loc); _ipvBase->setLocation(loc); }; - virtual void setSolver(nonLinearMechSolver* s) { - dG3DIPVariableBase::setSolver(s); - _ipvBase->setSolver(s); + virtual void setMicroSolver(nonLinearMechSolver* s) { + dG3DIPVariableBase::setMicroSolver(s); + _ipvBase->setMicroSolver(s); }; virtual bool dissipationIsActive() const {return _ipvBase->dissipationIsActive();}; @@ -134,12 +134,19 @@ class virtualNonLocalDamageDG3DIPVariable : public dG3DIPVariableBase{ virtual const std::vector<STensor3> &getConstRefToDLocalVariableDStrain() const {return _nonlocalData.dLocalVariableDStrain;} virtual std::vector<STensor3> &getRefToDLocalVariableDStrain() {return _nonlocalData.dLocalVariableDStrain;} + virtual const std::vector<STensor3> &getConstRefToDGradLocalVariableDStrain() const {return _nonlocalData.dGradLocalVariableDStrain;} + virtual std::vector<STensor3> &getRefToDGradLocalVariableDStrain() {return _nonlocalData.dGradLocalVariableDStrain;} + virtual const std::vector<STensor3> &getConstRefToDStressDNonLocalVariable() const {return _nonlocalData.dStressDNonLocalVariable;} virtual std::vector<STensor3> &getRefToDStressDNonLocalVariable() {return _nonlocalData.dStressDNonLocalVariable;} virtual const fullMatrix<double> &getConstRefToDLocalVariableDNonLocalVariable() const {return _nonlocalData.dLocalVariableDNonLocalVariable;} virtual fullMatrix<double> &getRefToDLocalVariableDNonLocalVariable() {return _nonlocalData.dLocalVariableDNonLocalVariable;} + virtual const fullMatrix<double> &getConstRefToDLocalVariableDGradNonLocalVariable() const {return _nonlocalData.dLocalVariableDGradNonLocalVariable;} + virtual fullMatrix<double> &getRefToDLocalVariableDGradNonLocalVariable() {return _nonlocalData.dLocalVariableDGradNonLocalVariable;} + + virtual const fullVector<double> &getConstRefToNonLocalJump() const {return _nonlocalData.nonLocalJump;} virtual fullVector<double> &getRefToNonLocalJump() {return _nonlocalData.nonLocalJump;} @@ -157,8 +164,10 @@ class virtualNonLocalDamageDG3DIPVariable : public dG3DIPVariableBase{ virtual const STensor3 &getConstRefToFirstPiolaKirchhoffStressb4AV() const {return _ipvBase->getConstRefToFirstPiolaKirchhoffStressb4AV();}; virtual STensor3 &getRefToFirstPiolaKirchhoffStressb4AV() {return _ipvBase->getRefToFirstPiolaKirchhoffStressb4AV();}; - virtual void setBulkCriticalDamage(const double DT){_ipvBase->setBulkCriticalDamage(DT);}; // set critical damage value - virtual double getBulkCriticalDamage() const {return _ipvBase->getBulkCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idx){_ipvBase->setBulkCriticalDamage(DT,idx);}; // set critical damage value + virtual double getBulkCriticalDamage(int idx) const {return _ipvBase->getBulkCriticalDamage(idx);}; + virtual double getDamageIndicator(int idx) const { return _ipvBase->getDamageIndicator(idx);}; + virtual void setNonLocalToLocal(const bool fl){_ipvBase->setNonLocalToLocal(fl);}; virtual bool getNonLocalToLocal() const {return _ipvBase->getNonLocalToLocal();}; @@ -728,7 +737,7 @@ class nonLocalDamageDG3DIPVariable : public dG3DIPVariable IPNonLocalDamage *_nldipv; public: - nonLocalDamageDG3DIPVariable(int _nsdv, const bool oninter=false); + nonLocalDamageDG3DIPVariable(int _nsdv, int _nlVar, const bool oninter=false); nonLocalDamageDG3DIPVariable(const nonLocalDamageDG3DIPVariable &source); virtual nonLocalDamageDG3DIPVariable& operator=(const IPVariable &source); @@ -772,12 +781,71 @@ class nonLocalDamageDG3DIPVariable : public dG3DIPVariable { if (idex == 0) return getIPNonLocalDamage()->_nldCharacteristicLengthMatrix; + else if (idex == 1) + return getIPNonLocalDamage()->_nldCharacteristicLengthFiber; else Msg::Error("the non-local variable %d is not defined",idex); } + virtual void setBulkCriticalDamage(const double DT, int idex){ + if(_nldipv->getPosIncMaxD()>0) //use MFH + { + if(idex == 0) + _nldipv->setMtxMaxD(DT); + else if (idex == 1) + _nldipv->setIncMaxD(DT); + else + Msg::Error("the non-local variable %d is not defined",idex); + } + else //no MFH + { + if(idex == 0) + _nldipv->setMaxD(DT); + else + Msg::Error("the non-local variable %d is not defined",idex); + } + } // set critical damage value + virtual double getBulkCriticalDamage(int idex) const { + if(_nldipv->getPosIncMaxD()>0) //use MFH + { + if(idex == 0) + return _nldipv->getMtxMaxD(); + else if (idex == 1) + return _nldipv->getIncMaxD(); + else + Msg::Error("the non-local variable %d is not defined",idex); + } + else //no MFH + { + if(idex == 0) + _nldipv->getMaxD(); + else + Msg::Error("the non-local variable %d is not defined",idex); + } + }; + virtual double getDamageIndicator(int idex) const + { + if(_nldipv->getPosIncMaxD()>0) //use MFH + { + if(idex == 0) + return _nldipv->get(IPField::MTX_DAMAGE); + else if (idex == 1) + return _nldipv->get(IPField::INC_DAMAGE); + else return 1.; + } + else //no MFH + { + if(idex == 0) + return _nldipv->get(IPField::DAMAGE); + else return 1.; + } + }; + virtual IPVariable* clone() const {return new nonLocalDamageDG3DIPVariable(*this);}; virtual void restart(); + private: + nonLocalDamageDG3DIPVariable(int _nsdv, const bool oninter=false) {Msg::Error("Cannot build nonLocalDamageDG3DIPVariable without giving the nb non local Var");}; + }; class nonLocalDamageIsotropicElasticityDG3DIPVariable : public dG3DIPVariable @@ -822,8 +890,23 @@ class nonLocalDamageIsotropicElasticityDG3DIPVariable : public dG3DIPVariable else return false; } - virtual void setBulkCriticalDamage(const double DT){_nldIsotropicElasticityipv->setCriticalDamage(DT);}; // set critical damage value - virtual double getBulkCriticalDamage() const {return _nldIsotropicElasticityipv->getCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idex){ + if(idex == 0) + _nldIsotropicElasticityipv->setCriticalDamage(DT); + } // set critical damage value + virtual double getBulkCriticalDamage(int idex) const { + if(idex == 0) + return _nldIsotropicElasticityipv->getCriticalDamage(); + } + virtual double getDamageIndicator(int idex) const + { + if(idex == 0) + return get(IPField::DAMAGE); + else + return 1.; + } + + virtual void setNonLocalToLocal(const bool fl){_nldIsotropicElasticityipv->setNonLocalToLocal(fl);}; virtual bool getNonLocalToLocal() const {return _nldIsotropicElasticityipv->getNonLocalToLocal();}; @@ -915,8 +998,21 @@ class nonLocalDamageJ2HyperDG3DIPVariable : public dG3DIPVariable virtual bool dissipationIsActive() const {return _nldJ2Hyperipv->dissipationIsActive();}; - virtual void setBulkCriticalDamage(const double DT){_nldJ2Hyperipv->setCriticalDamage(DT);}; // set critical damage value - virtual double getBulkCriticalDamage() const {return _nldJ2Hyperipv->getCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idex){ + if(idex == 0) + _nldJ2Hyperipv->setCriticalDamage(DT); + } // set critical damage value + virtual double getBulkCriticalDamage(int idex) const { + if(idex == 0) + return _nldJ2Hyperipv->getCriticalDamage(); + } + virtual double getDamageIndicator(int idex) const + { + if(idex == 0) + return get(IPField::DAMAGE); + else + return 1.; + } virtual void setNonLocalToLocal(const bool fl){_nldJ2Hyperipv->setNonLocalToLocal(fl);}; virtual bool getNonLocalToLocal() const {return _nldJ2Hyperipv->getNonLocalToLocal();}; diff --git a/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp b/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp index f21a1dc16d92954cbaec5deb0fe1f6771ba5cf7e..ef80dd9a954eeb03047b2409cf11787e58fb3610 100644 --- a/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp +++ b/dG3D/src/nonLocalDamageDG3DMaterialLaw.cpp @@ -155,7 +155,7 @@ NonLocalDamageDG3DMaterialLaw::NonLocalDamageDG3DMaterialLaw(const NonLocalDamag { _nldlaw = NULL; if (source._nldlaw != NULL){ - _nldlaw = dynamic_cast<materialLawWithDamage*>(source._nldlaw->clone()); + _nldlaw = dynamic_cast<mlawNonLocalDamage*>(source._nldlaw->clone()); } } @@ -178,9 +178,10 @@ void NonLocalDamageDG3DMaterialLaw::createIPState(IPStateBase* &ips,const bool* if(iele==NULL) inter=false; int nsdv = _nldlaw->getNsdv(); - IPVariable* ipvi = new nonLocalDamageDG3DIPVariable(nsdv,inter); - IPVariable* ipv1 = new nonLocalDamageDG3DIPVariable(nsdv,inter); - IPVariable* ipv2 = new nonLocalDamageDG3DIPVariable(nsdv,inter); + int nlVar= _nldlaw->getNbNonLocalVariables(); + IPVariable* ipvi = new nonLocalDamageDG3DIPVariable(nsdv,nlVar,inter); + IPVariable* ipv1 = new nonLocalDamageDG3DIPVariable(nsdv,nlVar,inter); + IPVariable* ipv2 = new nonLocalDamageDG3DIPVariable(nsdv,nlVar,inter); if(ips != NULL) delete ips; ips = new IP3State(state_,ipvi,ipv1,ipv2); @@ -197,7 +198,7 @@ void NonLocalDamageDG3DMaterialLaw::createIPVariable(IPVariable* &ipv,const MEle const MInterfaceElement *iele = dynamic_cast<const MInterfaceElement*>(ele); if(iele == NULL) inter=false; - ipv = new nonLocalDamageDG3DIPVariable(_nldlaw->getNsdv(),inter); + ipv = new nonLocalDamageDG3DIPVariable(_nldlaw->getNsdv(),_nldlaw->getNbNonLocalVariables(),inter); IPNonLocalDamage * ipvnl = static_cast <nonLocalDamageDG3DIPVariable*>(ipv)->getIPNonLocalDamage(); _nldlaw->createIPVariable(ipvnl,ele,nbFF_,GP,gpt); @@ -257,9 +258,16 @@ void NonLocalDamageDG3DMaterialLaw::stress(IPVariable* ipv, const IPVariable* ip const IPNonLocalDamage* q0 = ipvprev->getIPNonLocalDamage(); /* compute stress */ - _nldlaw->constitutive(F0,F1,ipvcur->getRefToFirstPiolaKirchhoffStress(),q0,q1,ipvcur->getRefToTangentModuli(), - ipvcur->getRefToDLocalVariableDStrain()[0],ipvcur->getRefToDStressDNonLocalVariable()[0], - ipvcur->getRefToDLocalVariableDNonLocalVariable()(0,0),stiff); + if(ipvcur-> getNumberNonLocalVariable()>0) + _nldlaw->constitutive(F0,F1,ipvcur->getRefToFirstPiolaKirchhoffStress(),q0,q1,ipvcur->getRefToTangentModuli(), + ipvcur->getRefToDLocalVariableDStrain(),ipvcur->getRefToDGradLocalVariableDStrain(), + ipvcur->getRefToDStressDNonLocalVariable(), + ipvcur->getRefToDLocalVariableDNonLocalVariable(), + ipvcur->getRefToDLocalVariableDGradNonLocalVariable(), stiff); + else + _nldlaw->constitutive(F0,F1,ipvcur->getRefToFirstPiolaKirchhoffStress(),q0,q1,ipvcur->getRefToTangentModuli(), + stiff); + ipvcur->setRefToDGElasticTangentModuli(this->elasticStiffness); @@ -267,10 +275,10 @@ void NonLocalDamageDG3DMaterialLaw::stress(IPVariable* ipv, const IPVariable* ip double NonLocalDamageDG3DMaterialLaw::scaleFactor() const{return _nldlaw->scaleFactor();}; -void NonLocalDamageDG3DMaterialLaw::setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); +void NonLocalDamageDG3DMaterialLaw::setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nldlaw != NULL){ - _nldlaw->setMacroSolver(sv); + _nldlaw->setSolver(sv); } }; @@ -323,9 +331,10 @@ void NonLocalDamageDG3DMaterialLaw_Stoch::createIPState(IPStateBase* &ips,const SVector3 GaussP(pt_Global); int nsdv = _nldlaw->getNsdv(); - IPVariable* ipvi = new nonLocalDamageDG3DIPVariable(nsdv,inter); - IPVariable* ipv1 = new nonLocalDamageDG3DIPVariable(nsdv,inter); - IPVariable* ipv2 = new nonLocalDamageDG3DIPVariable(nsdv,inter); + int nlVar= _nldlaw->getNbNonLocalVariables(); + IPVariable* ipvi = new nonLocalDamageDG3DIPVariable(nsdv,nlVar, inter); + IPVariable* ipv1 = new nonLocalDamageDG3DIPVariable(nsdv,nlVar, inter); + IPVariable* ipv2 = new nonLocalDamageDG3DIPVariable(nsdv,nlVar, inter); if(ips != NULL) delete ips; ips = new IP3State(state_,ipvi,ipv1,ipv2); @@ -345,7 +354,7 @@ void NonLocalDamageDG3DMaterialLaw_Stoch::createIPVariable(IPVariable* &ipv,cons ele->pnt(GP->pt[0],GP->pt[1],GP->pt[2],pt_Global); SVector3 GaussP(pt_Global); - ipv = new nonLocalDamageDG3DIPVariable(_nldlaw->getNsdv(),inter); + ipv = new nonLocalDamageDG3DIPVariable(_nldlaw->getNsdv(),_nldlaw->getNbNonLocalVariables(),inter); IPNonLocalDamage * ipvnl = static_cast <nonLocalDamageDG3DIPVariable*>(ipv)->getIPNonLocalDamage(); static_cast<mlawNonLocalDamage_Stoch*>(_nldlaw)->createIPVariable(GaussP, ipvnl,ele,nbFF_,GP,gpt); diff --git a/dG3D/src/nonLocalDamageDG3DMaterialLaw.h b/dG3D/src/nonLocalDamageDG3DMaterialLaw.h index e5bb362f3d16e7ed9f576c96dfd841e1f37e59f0..acecc83b313079a459d16cc932937545b1589846 100644 --- a/dG3D/src/nonLocalDamageDG3DMaterialLaw.h +++ b/dG3D/src/nonLocalDamageDG3DMaterialLaw.h @@ -70,10 +70,10 @@ class virtualNonLocalDamageDG3DMaterialLaw : public dG3DMaterialLaw{ virtual double getCharacteristicLength() const {return _lawBase->getCharacteristicLength();}; virtual materialLaw* clone() const{ return new virtualNonLocalDamageDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _lawBase->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_lawBase != NULL){ - _lawBase->setMacroSolver(sv); + _lawBase->setSolver(sv); } } virtual bool brokenCheck(const IPVariable* ipv) const{return _lawBase->brokenCheck(ipv);}; @@ -83,12 +83,13 @@ class virtualNonLocalDamageDG3DMaterialLaw : public dG3DMaterialLaw{ class NonLocalDamageDG3DMaterialLaw : public dG3DMaterialLaw{ protected: #ifndef SWIG - materialLawWithDamage *_nldlaw; // pointer to allow to choose between LLN style or Gmsh Style. The choice is performed by the constructor (2 constructors with != arguments) + mlawNonLocalDamage *_nldlaw; // pointer to allow to choose between LLN style or Gmsh Style. The choice is performed by the constructor (2 constructors with != arguments) #endif //SWIG public: NonLocalDamageDG3DMaterialLaw(const int num, const double rho, const char *propName); + void setNumberOfNonLocalVariables(int nb) {_nldlaw->setNumberOfNonLocalVariables(nb);} #ifndef SWIG NonLocalDamageDG3DMaterialLaw(const NonLocalDamageDG3DMaterialLaw &source); virtual ~NonLocalDamageDG3DMaterialLaw(); @@ -105,7 +106,7 @@ class NonLocalDamageDG3DMaterialLaw : public dG3DMaterialLaw{ virtual double scaleFactor() const; virtual materialLaw* clone() const{return new NonLocalDamageDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const; - virtual void setMacroSolver(const nonLinearMechSolver* sv); + virtual void setSolver(const nonLinearMechSolver* sv); #endif }; @@ -160,9 +161,9 @@ class NonLocalDamageHyperelasticDG3DMaterialLaw: public dG3DMaterialLaw{ virtual double scaleFactor() const {return _nlLaw->scaleFactor();} virtual materialLaw* clone() const{return new NonLocalDamageHyperelasticDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _nlLaw->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); - _nlLaw->setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); + _nlLaw->setSolver(sv); }; #endif }; @@ -207,10 +208,10 @@ class NonLocalDamageIsotropicElasticityDG3DMaterialLaw : public dG3DMaterialLaw virtual double scaleFactor() const {return _nldIsotropicElasticitylaw->scaleFactor();} virtual materialLaw* clone() const{return new NonLocalDamageIsotropicElasticityDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _nldIsotropicElasticitylaw->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nldIsotropicElasticitylaw != NULL){ - _nldIsotropicElasticitylaw->setMacroSolver(sv); + _nldIsotropicElasticitylaw->setSolver(sv); } }; #endif // SWIG @@ -243,10 +244,10 @@ class NonLocalDamageJ2SmallStrainDG3DMaterialLaw : public dG3DMaterialLaw virtual double scaleFactor() const{return _nldJ2smallStrain->scaleFactor();}; virtual materialLaw* clone() const{ return new NonLocalDamageJ2SmallStrainDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _nldJ2smallStrain->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nldJ2smallStrain != NULL){ - _nldJ2smallStrain->setMacroSolver(sv); + _nldJ2smallStrain->setSolver(sv); } } #endif @@ -281,10 +282,10 @@ class NonLocalDamageJ2HyperDG3DMaterialLaw : public dG3DMaterialLaw virtual double scaleFactor() const{return _nldJ2Hyperlaw->scaleFactor();}; virtual materialLaw* clone() const{ return new NonLocalDamageJ2HyperDG3DMaterialLaw(*this);}; virtual bool withEnergyDissipation() const {return _nldJ2Hyperlaw->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nldJ2Hyperlaw != NULL){ - _nldJ2Hyperlaw->setMacroSolver(sv); + _nldJ2Hyperlaw->setSolver(sv); } } #endif @@ -324,10 +325,10 @@ class NonLocalPorousDuctileDamageDG3DMaterialLaw : public dG3DMaterialLaw{ virtual double scaleFactor() const {return _nldPorous->scaleFactor();} virtual bool withEnergyDissipation() const {return _nldPorous->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nldPorous != NULL){ - _nldPorous->setMacroSolver(sv); + _nldPorous->setSolver(sv); } } virtual void stress(IPVariable*ipv, const IPVariable*ipvprev, const bool stiff=true, const bool checkfrac=true); @@ -628,10 +629,10 @@ class NonLocalPorousDuctileDamageWithCleavageDG3DMaterialLaw : public dG3DMateri virtual double scaleFactor() const {return _nlPorousWithCleavage->scaleFactor();} virtual bool withEnergyDissipation() const {return _nlPorousWithCleavage->withEnergyDissipation();}; - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dG3DMaterialLaw::setSolver(sv); if (_nlPorousWithCleavage != NULL){ - _nlPorousWithCleavage->setMacroSolver(sv); + _nlPorousWithCleavage->setSolver(sv); } } virtual void stress(IPVariable*ipv, const IPVariable*ipvprev, const bool stiff=true, const bool checkfrac=true); diff --git a/dG3D/src/nonLocalDamageHyperelasticDG3DIPVariable.h b/dG3D/src/nonLocalDamageHyperelasticDG3DIPVariable.h index bc9e80becfd6806549012882bb9ce09e1ab61834..6ca49c8657aa544ac44908099c9e2c962f674946 100644 --- a/dG3D/src/nonLocalDamageHyperelasticDG3DIPVariable.h +++ b/dG3D/src/nonLocalDamageHyperelasticDG3DIPVariable.h @@ -46,9 +46,22 @@ class nonLocalDamageHyperelasticDG3DIPVariable: public dG3DIPVariable{ virtual void blockDissipation(const bool fl){ _nldHyperipv->blockDissipation(fl);} virtual bool dissipationIsBlocked() const { return _nldHyperipv->dissipationIsBlocked();} - //---get effective data when using coupled damage model - virtual void setBulkCriticalDamage(const double DT){_nldHyperipv->setCriticalDamage(DT);}; - virtual double getBulkCriticalDamage() const {return _nldHyperipv->getCriticalDamage();}; + //---get effective data when using coupled damage model + virtual void setBulkCriticalDamage(const double DT, int idex){ + if(idex == 0) + _nldHyperipv->setCriticalDamage(DT); + } // set critical damage value + virtual double getBulkCriticalDamage(int idex) const { + if(idex == 0) + return _nldHyperipv->getCriticalDamage(); + } + virtual double getDamageIndicator(int idex) const + { + if(idex == 0) + return get(IPField::DAMAGE); + else + return 1.; + } virtual double getConstRefToLocalVariable(const int idex) const; virtual double& getRefToLocalVariable(const int idex); @@ -131,8 +144,23 @@ class localDamageHyperelasticDG3DIPVariableWithFailure : public dG3DIPVariable{ virtual void blockDissipation(const bool fl){ _localIPv->blockDissipation(fl);} virtual bool dissipationIsBlocked() const { return _localIPv->dissipationIsBlocked();} - virtual void setBulkCriticalDamage(const double DT){_localIPv->setCriticalDamage(DT);}; // set critical damage value - virtual double getBulkCriticalDamage() const {return _localIPv->getCriticalDamage();}; + virtual void setBulkCriticalDamage(const double DT, int idex){ + if(idex == 0) + _localIPv->setCriticalDamage(DT); + } // set critical damage value + virtual double getBulkCriticalDamage(int idex) const { + if(idex == 0) + return _localIPv->getCriticalDamage(); + } + virtual double getDamageIndicator(int idex) const + { + if(idex == 0) + return get(IPField::DAMAGE); + else + return 1.; + } + + virtual double get(const int i) const; virtual double defoEnergy() const {return _localIPv->defoEnergy();} @@ -183,9 +211,23 @@ class nonLocalDamageHyperelasticDG3DIPVariableWithFailure: public dG3DIPVariable virtual void blockDissipation(const bool fl){ _nldHyperipv->blockDissipation(fl);} virtual bool dissipationIsBlocked() const { return _nldHyperipv->dissipationIsBlocked();} - //---get effective data when using coupled damage model - virtual void setBulkCriticalDamage(const double DT){_nldHyperipv->setCriticalDamage(DT);}; - virtual double getBulkCriticalDamage() const {return _nldHyperipv->getCriticalDamage();}; + //---get effective data when using coupled damage model + virtual void setBulkCriticalDamage(const double DT, int idex){ + if(idex == 0) + _nldHyperipv->setCriticalDamage(DT); + } // set critical damage value + virtual double getBulkCriticalDamage(int idex) const { + if(idex == 0) + return _nldHyperipv->getCriticalDamage(); + } + virtual double getDamageIndicator(int idex) const + { + if(idex == 0) + return get(IPField::DAMAGE); + else + return 1.; + } + virtual double getConstRefToLocalVariable(const int idex) const; virtual double& getRefToLocalVariable(const int idex); diff --git a/dgshell/benchmarks/multiBeam/beam.py b/dgshell/benchmarks/multiBeam/beam.py index 2c61adb4c4ca2bea991a611c43a323f8c1f6cf38..b0ddfcf4368acb8d7020a96ce22af196c2246914 100644 --- a/dgshell/benchmarks/multiBeam/beam.py +++ b/dgshell/benchmarks/multiBeam/beam.py @@ -76,13 +76,13 @@ mysolver.solve() # perform the check by reading the files try: import linecache - linedisp = linecache.getline('NodalDisplacementPhysical22Num2comp2.csv',23) - linevelo = linecache.getline('NodalVelocityPhysical22Num2comp0.csv',395) + linedisp = linecache.getline('NodalDisplacementPhysical22Num2comp2.csv',24) + linevelo = linecache.getline('NodalVelocityPhysical22Num2comp0.csv',24) except: print('Cannot read the results in the files') import os os._exit(1) else: check = TestCheck() - check.equal(3.722723e-01,float(linedisp.split(';')[1])) + check.equal(3.891784e-01,float(linedisp.split(';')[1])) check.equal(1.152648e+00,float(linevelo.split(';')[1])) diff --git a/dgshell/benchmarks/multiBeamMPI/beam.py b/dgshell/benchmarks/multiBeamMPI/beam.py index fe710538ce4c6780903c5a21a1c8998a3099a1e2..a031636230c9eeaa574f8d01d6bb99f8ae8456b2 100644 --- a/dgshell/benchmarks/multiBeamMPI/beam.py +++ b/dgshell/benchmarks/multiBeamMPI/beam.py @@ -76,13 +76,13 @@ mysolver.solve() # perform some check (pay attention that only rank 0 really perform the check) try: import linecache - linedisp = linecache.getline('NodalDisplacementPhysical22Num2comp2_part1.csv',23) - linevelo = linecache.getline('NodalVelocityPhysical22Num2comp0_part1.csv',395) + linedisp = linecache.getline('NodalDisplacementPhysical22Num2comp2_part1.csv',24) + linevelo = linecache.getline('NodalVelocityPhysical22Num2comp0_part1.csv',24) except: print('Cannot read the results in the files') import os os._exit(1) else: check = TestCheck() - check.equal(3.795185e-01,float(linedisp.split(';')[1])) + check.equal(3.967536e-01,float(linedisp.split(';')[1])) check.equal(1.152648e+00,float(linevelo.split(';')[1])) diff --git a/dgshell/src/dgNonLinearShellMaterial.h b/dgshell/src/dgNonLinearShellMaterial.h index 9dfae5fe9c427038b44aa3e4880dfc1da9947f45..7d29f2f40d1aba602f35803df8ce6dce25d8491f 100644 --- a/dgshell/src/dgNonLinearShellMaterial.h +++ b/dgshell/src/dgNonLinearShellMaterial.h @@ -119,9 +119,9 @@ class J2linearShellLaw : public dgNonLinearShellMaterialLaw virtual materialLaw* clone() const {return new J2linearShellLaw(*this);}; virtual void checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const{}; // do nothing virtual bool withEnergyDissipation() const {return _j2law.withEnergyDissipation();} - virtual void setMacroSolver(const nonLinearMechSolver* sv){ - dgNonLinearShellMaterialLaw::setMacroSolver(sv); - _j2law.setMacroSolver(sv); + virtual void setSolver(const nonLinearMechSolver* sv){ + dgNonLinearShellMaterialLaw::setSolver(sv); + _j2law.setSolver(sv); } #endif // SWIG };