diff --git a/NonLinearSolver/Domain/partDomain.cpp b/NonLinearSolver/Domain/partDomain.cpp index 31653d8a55d4a9e76b8433a7b422ee09485a959b..c50a2c01b38b361447503cf6c8b63d5c96ad2c25 100644 --- a/NonLinearSolver/Domain/partDomain.cpp +++ b/NonLinearSolver/Domain/partDomain.cpp @@ -822,11 +822,7 @@ scalarTermPFBound(NULL), linearTermPFBound(NULL), _interByPert(false), _virtByPert(false), -_multipleFieldFormulation(false), -_multiFieldMethod(ONEFIELD), -_enrichedUnknownLocation(UNDEFINED), -_averageStrainBased(false), -_brokenIPFromBeginning(false) +_averageStrainBased(false) { gi = new elementGroup(); gib = new elementGroup(); @@ -842,12 +838,7 @@ 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) +_averageStrainBased(source._averageStrainBased) { gi = new elementGroup(); gib = new elementGroup(); @@ -868,32 +859,6 @@ dgPartDomain::~dgPartDomain(){ } void dgPartDomain::averageStrainBased(const bool flg){_averageStrainBased = flg;}; -void dgPartDomain::setMultipleFieldFormulation(const bool flag, const int method, const int loc) { - _multipleFieldFormulation = flag; - _multiFieldMethod = (MultiFieldMethod)method; - _enrichedUnknownLocation = (EnrichedUnknownLocation)loc; - - if (_multipleFieldFormulation){ - if (_multiFieldMethod == dgPartDomain::TWOFIELD){ - Msg::Info("Full twofield is used"); - } - else{ - Msg::Error("Twofield method %d is not considered",_multiFieldMethod); - } - - if (_enrichedUnknownLocation == partDomain::NODE){ - Msg::Info("enrich Dofs at nodes"); - } - else if (_enrichedUnknownLocation == partDomain::GP){ - Msg::Info("enrich Dofs at GPs"); - } - else{ - Msg::Error("enriched location %d is not considered",loc); - } - } -}; -void dgPartDomain::fixInterfaceDofComponent(const int comp){_fixInterfaceDofComp.push_back(comp);}; -void dgPartDomain::breakAllInterfaceIPsFromBeginning(const bool broken){ _brokenIPFromBeginning = broken;}; #if defined(HAVE_MPI) void dgPartDomain::createIPMap(){ @@ -1293,7 +1258,47 @@ void dgPartDomain::createIPState(AllIPState::ipstateContainer& map, const bool * } }; -void dgPartDomain::initiallyBreakAllInterfaceIP(AllIPState *aips) const{ +void dgPartDomain::numberValuesToTransfertMPI(AllIPState *aips,int* sizeeachrank)const +{ + #if defined(HAVE_MPI) + IntPt *GP; + for(elementGroup::elementContainer::const_iterator ite=gi->begin(); ite!=gi->end(); ++ite) + { + MElement* ele = ite->second; + MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(ele); + int rankminus = iele->getElem(0)->getPartition()-1; + int rankplus = iele->getElem(1)->getPartition()-1; + int rankcomm=-1; + if(rankminus != Msg::GetCommRank()) + { + rankcomm = rankminus; + } + else if(rankplus !=Msg::GetCommRank()) + { + rankcomm = rankplus; + } + if(rankcomm!=-1) + { + int npts=integBound->getIntPoints(ite->second,&GP); + AllIPState::ipstateElementContainer *vips = aips->getIPstate(ele->getNum()); + int nvc=0; + for(int j=0;j<npts;j++) + { + IPStateBase* ipsm = (*vips)[j]; + // take initial but supposed same value to transfert for all (so transfert only once) + IPVariable *ipvm = static_cast<IPVariableMechanics*>(ipsm->getState(IPStateBase::initial)); + //Msg::Error("numberValuesToTransfertMPI %d",ipvm->numberValuesToCommunicateMPI()); + nvc += ipvm->numberValuesToCommunicateMPI(); + } + if(nvc!=0) // otherwise no value to communicate + sizeeachrank[rankcomm] += (2+nvc); // as the numbers of element minus and plus have to be communicate + } + } + #endif // HAVE_MPI +} + +void dgPartDomain::initiallyBreakAllInterfaceIP(AllIPState *aips) const +{ const materialLaw* mlawMinus = this->getMaterialLawMinus(); const materialLaw* mlawPlus = this->getMaterialLawPlus(); const materialLaw2LawsInitializer* fracMinus = dynamic_cast<const materialLaw2LawsInitializer*>(mlawMinus); @@ -1342,46 +1347,6 @@ void dgPartDomain::initiallyBreakAllInterfaceIP(AllIPState *aips) const{ #endif // HAVE_MPI }; - -void dgPartDomain::numberValuesToTransfertMPI(AllIPState *aips,int* sizeeachrank)const -{ - #if defined(HAVE_MPI) - IntPt *GP; - for(elementGroup::elementContainer::const_iterator ite=gi->begin(); ite!=gi->end(); ++ite) - { - MElement* ele = ite->second; - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(ele); - int rankminus = iele->getElem(0)->getPartition()-1; - int rankplus = iele->getElem(1)->getPartition()-1; - int rankcomm=-1; - if(rankminus != Msg::GetCommRank()) - { - rankcomm = rankminus; - } - else if(rankplus !=Msg::GetCommRank()) - { - rankcomm = rankplus; - } - if(rankcomm!=-1) - { - int npts=integBound->getIntPoints(ite->second,&GP); - AllIPState::ipstateElementContainer *vips = aips->getIPstate(ele->getNum()); - int nvc=0; - for(int j=0;j<npts;j++) - { - IPStateBase* ipsm = (*vips)[j]; - // take initial but supposed same value to transfert for all (so transfert only once) - IPVariable *ipvm = static_cast<IPVariableMechanics*>(ipsm->getState(IPStateBase::initial)); - //Msg::Error("numberValuesToTransfertMPI %d",ipvm->numberValuesToCommunicateMPI()); - nvc += ipvm->numberValuesToCommunicateMPI(); - } - if(nvc!=0) // otherwise no value to communicate - sizeeachrank[rankcomm] += (2+nvc); // as the numbers of element minus and plus have to be communicate - } - } - #endif // HAVE_MPI -} - void dgPartDomain::fillArrayIPvariableMPI(AllIPState *aips,const int rank,double* arrayMPI) const { #if defined(HAVE_MPI) diff --git a/NonLinearSolver/Domain/partDomain.h b/NonLinearSolver/Domain/partDomain.h index f4d029f741870e228d0321a7628a0d780e969c24..4466bdcc821004965327189f42c9f85547160f5f 100644 --- a/NonLinearSolver/Domain/partDomain.h +++ b/NonLinearSolver/Domain/partDomain.h @@ -30,9 +30,6 @@ class dgPartDomain; class partDomain { #ifndef SWIG - public : - enum EnrichedUnknownLocation{UNDEFINED=0,NODE=1,GP=2}; - protected : int _tag; // tag for the dofManager int _phys; @@ -226,9 +223,6 @@ class partDomain 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 @@ -284,11 +278,6 @@ class partDomain class dgPartDomain : public partDomain { #ifndef SWIG - public: - enum MultiFieldMethod{ - ONEFIELD=0, - TWOFIELD=1, // full - }; // protected : BilinearTermBase* btermBound; LinearTermBase<double>* ltermBound; @@ -303,15 +292,7 @@ class dgPartDomain : public partDomain // 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 - + bool _averageStrainBased; // interface law evaluated with average strains #if defined(HAVE_MPI) std::set<int> _domainIPInterfacePlus, // plus intergration points lie on this domain _domainIPInterfaceMinus; // minus integration points lie on this domain @@ -333,9 +314,6 @@ class dgPartDomain : public partDomain #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: @@ -357,18 +335,12 @@ class dgPartDomain : public partDomain 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, + fullVector<double> &dispp, 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;}; @@ -384,9 +356,6 @@ class dgPartDomain : public partDomain virtual FunctionSpaceBase* getFunctionSpace() =0; virtual const FunctionSpaceBase* getFunctionSpace() 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;} diff --git a/NonLinearSolver/clusterScript/dragon1taylor.sh b/NonLinearSolver/clusterScript/dragon1taylorSingle.sh similarity index 89% rename from NonLinearSolver/clusterScript/dragon1taylor.sh rename to NonLinearSolver/clusterScript/dragon1taylorSingle.sh index 2b8af95bc84ff9ef0d6bbe93f78be59c65e9f591..3ae3bd24c16c88717c74e0ce885a16e3aaac1ce7 100644 --- a/NonLinearSolver/clusterScript/dragon1taylor.sh +++ b/NonLinearSolver/clusterScript/dragon1taylorSingle.sh @@ -10,7 +10,7 @@ #SBATCH --time=0:20:0 -module load openmpi/2.1.2/GCC-4.9.2-gpu +module load OpenMPI/3.1.1-GCC-7.3.0-2.30 SUBDIR=$HOME/cm3Libraries/dG3D/benchmarks/taylor echo "subdir=" $SUBDIR @@ -32,16 +32,18 @@ srun cp $SUBDIR/$mshfile $SCRATCH/ || exit $? cd $SCRATCH # needed to work in the tmpscrach dir otherwise work on home !! #ls -artl -export PETSC_DIR=$HOME/local/petsc-3.9.1 -export PETSC_ARCH=linux-gnu-c-opt + +export PETSC_DIR=$HOME/local/petsc-3.13.2 +export PETSC_ARCH=arch-linux-cxx-opt export PATH=$HOME/local/bin:$PATH -export PATH=$PATH:$HOME/cm3Libraries/dG3D/release + export PATH=$PATH:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh export PYTHONPATH=$PYTHONPATH:$HOME/cm3Libraries/dG3D/release:$HOME/cm3Libraries/dG3D/debug:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers/gmshpy:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers/gmshpy + mpirun python $SCRATCH/$pyfile >& $SCRATCH/output.txt echo -e "\n" diff --git a/NonLinearSolver/clusterScript/dragon2taylorMPI.sh b/NonLinearSolver/clusterScript/dragon2taylorMPI.sh new file mode 100644 index 0000000000000000000000000000000000000000..accc7bbdc3788cbfea4414341488468337723b74 --- /dev/null +++ b/NonLinearSolver/clusterScript/dragon2taylorMPI.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# script example for dragon2 +#SBATCH --job-name taylorMPI +#SBATCH --mail-user=l.noels@ulg.ac.be +#SBATCH --mail-type=ALL +#SBATCH --output="out.txt" +#SBATCH --ntasks=4 +#SBATCH --mem-per-cpu=800 +#SBATCH --time=0:20:0 + + +module load OpenMPI/3.1.1-GCC-7.3.0-2.30 + +SUBDIR=$HOME/cm3Libraries/dG3D/benchmarks/taylorMPI +echo "subdir=" $SUBDIR + +SCRATCH=$GLOBALSCRATCH/${USER}_$SLURM_JOB_ID +echo "workdir=" $SCRATCH + + +pyfile=taylorCG.py +mshfile=taylor.msh +echo "node list of job" >> $SUBDIR/output.po$SLURM_JOB_ID + +hostname >> $SUBDIR/output.po$SLURM_JOB_ID + +cd $GLOBALSCRATCH +mkdir -p ${USER}_$SLURM_JOB_ID || exit $? +cp $SUBDIR/$pyfile $SCRATCH/ || exit $? +cp $SUBDIR/$mshfile $SCRATCH/ || exit $? + +cd $SCRATCH # needed to work in the tmpscrach dir otherwise work on home !! +#ls -artl + +export PETSC_DIR=$HOME/local/petsc-3.13.2 +export PETSC_ARCH=arch-linux-cxx-opt + +export PATH=$HOME/local/bin:$PATH + +export PATH=$PATH:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh + + +export PYTHONPATH=$PYTHONPATH:$HOME/cm3Libraries/dG3D/release:$HOME/cm3Libraries/dG3D/debug:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers/gmshpy:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers/gmshpy + + +mpirun -np 4 python $SCRATCH/$pyfile >& $SCRATCH/output.txt + +echo -e "\n" + +sleep 5 + +cp -f $SCRATCH/* $SUBDIR/ || exit $? +rm -rf $SCRATCH || exit $? +echo -e "\n" + + + + diff --git a/NonLinearSolver/clusterScript/dragon2taylorSingle.sh b/NonLinearSolver/clusterScript/dragon2taylorSingle.sh new file mode 100644 index 0000000000000000000000000000000000000000..795b2054dd02f17486960511467ce0d67f6ab62d --- /dev/null +++ b/NonLinearSolver/clusterScript/dragon2taylorSingle.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# script example for dragon2 +#SBATCH --job-name taylorMPI +#SBATCH --mail-user=l.noels@ulg.ac.be +#SBATCH --mail-type=ALL +#SBATCH --output="out.txt" +#SBATCH --ntasks=1 +#SBATCH --mem-per-cpu=800 +#SBATCH --time=0:20:0 + + +module load OpenMPI/3.1.1-GCC-7.3.0-2.30 + +SUBDIR=$HOME/cm3Libraries/dG3D/benchmarks/taylor +echo "subdir=" $SUBDIR + +SCRATCH=$GLOBALSCRATCH/${USER}_$SLURM_JOB_ID +echo "workdir=" $SCRATCH + + +pyfile=taylorTetDGDyn.py +mshfile=taylor.msh +echo "node list of job" >> $SUBDIR/output.po$SLURM_JOB_ID + +hostname >> $SUBDIR/output.po$SLURM_JOB_ID + +cd $GLOBALSCRATCH +mkdir -p ${USER}_$SLURM_JOB_ID || exit $? +cp $SUBDIR/$pyfile $SCRATCH/ || exit $? +cp $SUBDIR/$mshfile $SCRATCH/ || exit $? + +cd $SCRATCH # needed to work in the tmpscrach dir otherwise work on home !! +#ls -artl + +export PETSC_DIR=$HOME/local/petsc-3.13.2 +export PETSC_ARCH=arch-linux-cxx-opt + +export PATH=$HOME/local/bin:$PATH + +export PATH=$PATH:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh + + +export PYTHONPATH=$PYTHONPATH:$HOME/cm3Libraries/dG3D/release:$HOME/cm3Libraries/dG3D/debug:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers/gmshpy:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers/gmshpy + + +mpirun python $SCRATCH/$pyfile >& $SCRATCH/output.txt + +echo -e "\n" + +sleep 5 + +srun cp -f $SCRATCH/* $SUBDIR/ || exit $? +srun rm -rf $SCRATCH || exit $? +echo -e "\n" + + + + diff --git a/NonLinearSolver/contact/contactDomain.cpp b/NonLinearSolver/contact/contactDomain.cpp index 12120e0c32e90abc224a2e3080fb77a804d1bb83..410374a3ab57cc9dfe181787216b7b35559b9527 100644 --- a/NonLinearSolver/contact/contactDomain.cpp +++ b/NonLinearSolver/contact/contactDomain.cpp @@ -363,7 +363,7 @@ rigidConeContactDomain::rigidConeContactDomain(const int tag, const int dimMaste gSlave = new elementGroup(); #if defined(HAVE_MPI) if(Msg::GetCommSize()>1){ - if(_filterSlave == NULL) + if(filSlave == NULL) _filterSlave = new elementFilterMPITrivial(); else _filterSlave = new elementFilterMPIUntrivial(filSlave); diff --git a/NonLinearSolver/contact/contactDomain.h b/NonLinearSolver/contact/contactDomain.h index 364fb47a12c49af2731fb93dbf1a0aa33d7f4be1..308431883ad9f29759c72d50273975528b24f49a 100644 --- a/NonLinearSolver/contact/contactDomain.h +++ b/NonLinearSolver/contact/contactDomain.h @@ -212,7 +212,14 @@ class rigidPlaneContactDomain : public contactDomain{ rigidPlaneContactDomain(const rigidPlaneContactDomain& src): contactDomain(src), _vergc(src._vergc),_normal(src._normal), _density(src._density),_thickness(src._thickness){}; - virtual ~rigidPlaneContactDomain(){} + virtual ~rigidPlaneContactDomain() + { + #if defined(HAVE_MPI) + if(Msg::GetCommSize()>1 and _filterSlave!=NULL) delete _filterSlave; + #endif // HAVE_MPI + } + + virtual MVertex* getGC()const {return _vergc;}; virtual void setDomainAndFunctionSpace(partDomain *dom)=0; virtual void initializeTerms(const unknownField *ufield); diff --git a/NonLinearSolver/internalPoints/ipField.cpp b/NonLinearSolver/internalPoints/ipField.cpp index fd4074f950a491b3f3dc0c15ad74a7625aae1d31..48d4e3c9ca26e933c0318fa28f752acfaebb464b 100644 --- a/NonLinearSolver/internalPoints/ipField.cpp +++ b/NonLinearSolver/internalPoints/ipField.cpp @@ -752,9 +752,10 @@ void IPField::checkActiveDissipation(){ } }; -void IPField::initialBroken(MElement *iele, materialLaw* mlaw ){ +void IPField::initialBroken(MElement *iele, materialLaw* mlaw ) +{ #ifdef _DEBUG - Msg::Error("Interface element %d is broken at initialization on rank %d",iele->getNum(),Msg::GetCommRank()); + Msg::Info("Interface element %d is broken at initialization on rank %d",iele->getNum(),Msg::GetCommRank()); #else Msg::Info("Interface element %d is broken at initialization",iele->getNum()); #endif // _DEBUG @@ -767,14 +768,65 @@ void IPField::initialBroken(MElement *iele, materialLaw* mlaw ){ ips = (*vips)[i]; mflaw->initialBroken(ips); } -} +}; -void IPField::initialBroken(GModel* pModel, std::vector<int> &vnumphys){ +void IPField::initialBrokenDomain(GModel* pModel, std::vector<std::pair<int,int> > &twoPhys) +{ + std::vector<partDomain*>& domainVector = *(_solver->getDomainVector()); + for(int i=0;i<twoPhys.size();i++) + { + int firstNum = twoPhys[i].first; + int secondNum = twoPhys[i].second; + dgPartDomain* dgdomFound = NULL; + for (int idom = 0; idom < domainVector.size(); idom++) + { + partDomain* dom = domainVector[idom]; + if (dom->IsInterfaceTerms()) + { + dgPartDomain* dgdom = static_cast<dgPartDomain*>(dom); + if (((dgdom->getPlusDomain()->getPhysical() == firstNum) && (dgdom->getMinusDomain()->getPhysical() == secondNum)) || + ((dgdom->getPlusDomain()->getPhysical() == secondNum) && (dgdom->getMinusDomain()->getPhysical() == firstNum))) + { + // found + dgdomFound = dgdom; + break; + } + } + } + if (dgdomFound == NULL) + { + if (firstNum ==secondNum) + { + Msg::Warning("domain %d cannot be found for initially broken !!!",firstNum); + } + else + { + Msg::Warning("interdomain between phys %d and phys %d cannot be found for initially broken !!!",firstNum,secondNum); + } + } + else + { + if (firstNum ==secondNum) + { + Msg::Info("domain %d is initially broken !!!",firstNum); + } + else + { + Msg::Info("interdomain between phys %d and phys %d is initially broken !!!",firstNum,secondNum); + } + // + dgdomFound->initiallyBreakAllInterfaceIP(getAips()); + } + }; +}; + +void IPField::initialBroken(GModel* pModel, std::vector<std::pair<int,int> > &vnumphys) +{ std::vector<partDomain*>* domainVector = _solver->getDomainVector(); std::vector<MVertex*> vv; for(int i=0;i<vnumphys.size();i++){ // get the vertex associated to the physical entities LINES ONLY !! - pModel->getMeshVerticesForPhysicalGroup(1,vnumphys[i],vv); + pModel->getMeshVerticesForPhysicalGroup(vnumphys[i].first,vnumphys[i].second,vv); // find the InterfaceElement associated to these vertex (identify interior node as degree 2 min) for(std::vector<partDomain*>::iterator itfield = domainVector->begin(); itfield != domainVector->end(); ++itfield){ if((*itfield)->IsInterfaceTerms()) diff --git a/NonLinearSolver/internalPoints/ipField.h b/NonLinearSolver/internalPoints/ipField.h index 99eb737745d5502a7cf2ea4d3772efffc8a9ac60..6111331d61545d39f3356f27bac7fabd847240cc 100644 --- a/NonLinearSolver/internalPoints/ipField.h +++ b/NonLinearSolver/internalPoints/ipField.h @@ -403,7 +403,8 @@ class IPField : public elementsField { void checkActiveDissipation(); // initial broken - void initialBroken(GModel* pModel, std::vector<int> &vnumphys); + void initialBroken(GModel* pModel, std::vector<std::pair<int,int> > &vnumphys); + void initialBrokenDomain(GModel* pModel, std::vector<std::pair<int,int> > &twoPhys); void initialBroken(MElement *iele, materialLaw *mlaw); void setFactorOnArchivingFiles(const int fact); diff --git a/NonLinearSolver/nlTerms/nlTerms.cpp b/NonLinearSolver/nlTerms/nlTerms.cpp index edf130ec7560f811a99976935fc8d6223a551ea6..10808d61295fcdff4b6e725adf019941ad025cce 100644 --- a/NonLinearSolver/nlTerms/nlTerms.cpp +++ b/NonLinearSolver/nlTerms/nlTerms.cpp @@ -229,10 +229,6 @@ template<> void BilinearTermPerturbation<double>::get(MElement *ele,int npts,Int if(iele->getElem(0) != iele->getElem(1)) space2.getKeys(iele->getElem(1),R); - if (dgdom->IsMultipleFieldFormulation()){ - dgdom->getInterfaceFunctionSpace()->getKeys(ele,R); - } - disp.resize(R.size()); _ufield->get(R,disp); @@ -251,14 +247,7 @@ template<> void BilinearTermPerturbation<double>::get(MElement *ele,int npts,Int for(int i=0;i<nbdof_p;i++) dispp(i) = disp(i+nbdof_m); - if (dgdom->IsMultipleFieldFormulation()){ - nbdof_extra = dgdom->getInterfaceFunctionSpace()->getNumKeys(ele); - dispExtra.resize(nbdof_extra); - for(int i=0;i<nbdof_extra;i++) - dispExtra(i) = disp(i+nbdof_m+nbdof_p); - } - - m.resize(nbdof_m+nbdof_p+nbdof_extra,nbdof_m+nbdof_p+nbdof_extra); + m.resize(nbdof_m+nbdof_p,nbdof_m+nbdof_p); } else m.resize(nbdof_m,nbdof_m,false); @@ -271,13 +260,13 @@ template<> void BilinearTermPerturbation<double>::get(MElement *ele,int npts,Int disp(i)+=_eps; dispm(i)+=_eps; dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,false,false); // 0 for - elem and npts for + elem + dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,virt,false,false); // 0 for - elem and npts for + elem _nlterm->get(ele,npts,GP,fp); // dof perturbation - disp(i)-=_twoeps; dispm(i)-=_twoeps; dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,false,false); // 0 for - elem and npts for + elem + dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,virt,false,false); // 0 for - elem and npts for + elem _nlterm->get(ele,npts,GP,fm); disp(i)+=_eps; dispm(i)+=_eps; @@ -286,7 +275,7 @@ template<> void BilinearTermPerturbation<double>::get(MElement *ele,int npts,Int } // restore ipv value dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(), dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,true,false); // 0 for - elem and npts for + elem + dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,virt,true,false); // 0 for - elem and npts for + elem if(!virt){ // Otherwise virtual interface element // Perturbation on plus element for(int i=0;i<nbdof_p;i++){ @@ -294,45 +283,22 @@ template<> void BilinearTermPerturbation<double>::get(MElement *ele,int npts,Int disp(i+nbdof_m)+=_eps; dispp(i)+=_eps; dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,false,false); // 0 for - elem and npts for + elem + dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,virt,false,false); // 0 for - elem and npts for + elem _nlterm->get(ele,npts,GP,fp); // dof perturbation + disp(i+nbdof_m)-=_twoeps; dispp(i)-=_twoeps; dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(), dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,false,false); // 0 for - elem and npts for + elem + dgdom->getMaterialLawMinus(), dgdom->getMaterialLawPlus(),dispm,dispp,virt,false,false); // 0 for - elem and npts for + elem _nlterm->get(ele,npts,GP,fm); disp(i+nbdof_m)+=_eps; dispp(i)+=_eps; fp.axpy(fm,-1); m.copyOneColumn(fp,i+nbdof_m); // divide by 1/(2eps) at the end } - - // - if (dgdom->IsMultipleFieldFormulation()){ - for(int i=0;i<nbdof_extra;i++){ - // dof perturbation + - disp(i+nbdof_m+nbdof_p)+=_eps; - dispExtra(i)+=_eps; - dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,false,false); // 0 for - elem and npts for + elem - _nlterm->get(ele,npts,GP,fp); - // dof perturbation + - disp(i+nbdof_m+nbdof_p)-=_twoeps; - dispExtra(i)-=_twoeps; - dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(), dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,false,false); // 0 for - elem and npts for + elem - _nlterm->get(ele,npts,GP,fm); - disp(i+nbdof_m+nbdof_p)+=_eps; - dispExtra(i)+=_eps; - fp.axpy(fm,-1); - m.copyOneColumn(fp,i+nbdof_m+nbdof_p); // divide by 1/(2eps) at the end - } - } - // restore ipv values dgdom->computeIpv(_ipf->getAips(),iele,GP,IPStateBase::current,dgdom->getMinusDomain(),dgdom->getPlusDomain(), - dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,dispExtra,virt,true, false); + dgdom->getMaterialLawMinus(),dgdom->getMaterialLawPlus(),dispm,dispp,virt,true, false); } } // divide all components by 1/2eps diff --git a/NonLinearSolver/nlTerms/nlTerms.h b/NonLinearSolver/nlTerms/nlTerms.h index 0540c2b8c505a598d81470f776f30a13f41945f7..39447bbb9c31f4882809eb4ba1be3da74966a6ba 100644 --- a/NonLinearSolver/nlTerms/nlTerms.h +++ b/NonLinearSolver/nlTerms/nlTerms.h @@ -90,7 +90,6 @@ template <class T2=double> class BilinearTermPerturbation : public BilinearTermB private: mutable fullVector<double> dispm; mutable fullVector<double> dispp; - mutable fullVector<double> dispExtra; mutable fullVector<double> disp; mutable fullVector<double> fm; mutable fullVector<double> fp; diff --git a/NonLinearSolver/nlsolver/nlsolAlgorithms.h b/NonLinearSolver/nlsolver/nlsolAlgorithms.h index b229bd87eb46e88bdc6fe42e85f37d86751e2afe..128ce6803fbe25015138468e9b5822f37e2797d3 100644 --- a/NonLinearSolver/nlsolver/nlsolAlgorithms.h +++ b/NonLinearSolver/nlsolver/nlsolAlgorithms.h @@ -465,22 +465,6 @@ void AssembleMass(BilinearTermBase *term, rigidContactSpaceBase *space,Assembler expAss->assemble(R, localMatrix,nonLinearSystem<double>::mass); } -template<class Iterator,class Assembler> void FixInterfaceNodalDofs(FunctionSpaceBase *space,Iterator itbegin,Iterator itend,Assembler &assembler, - FilterDof &filter){ - for (Iterator it=itbegin;it!=itend;++it){ - MElement* e = it->second; - std::vector<Dof> R; - space->getKeys(e,R); - for (std::vector<Dof>::iterator itd=R.begin();itd!=R.end();++itd){ - Dof& key=*itd; - if (filter(key)){ - assembler.fixDof(key, 0.); - } - } - - } -} - template<class Assembler> void FixNodalDofs(FunctionSpaceBase *space,MElement *e,Assembler &assembler,simpleFunction<typename Assembler::dataVec> &fct,FilterDof &filter,bool fullDg, mixedFunctionSpaceBase::DofType dofType) { @@ -849,25 +833,6 @@ template<class Iterator, class Assembler> void SparsityDofs(FunctionSpaceBase &s return; } -template<class Iterator, class Assembler> void SparsityDofsInterface(FunctionSpaceBase &extraSpace, - FunctionSpaceBase &space, - Iterator itbegin, Iterator itend, Assembler &assembler) -{ - - for (Iterator it = itbegin; it != itend; ++it){ - MElement *e = it->second; - - MInterfaceElement* ie = dynamic_cast<MInterfaceElement*>(e); - if (ie){ - std::vector<Dof> R; - space.getKeys(e, R); - extraSpace.getKeys(e,R); - assembler.sparsityDof(R); - } - } - -} - // Function Numbering Dof for rigid contact (Create Three Dofs for GC of rigid bodies) template<class Assembler> void NumberDofs(rigidContactSpaceBase &space, Assembler &assembler){ diff --git a/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp b/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp index 2fa3c3ec6c578d0e2cfa1448b3034327f7d1549c..bf193ddc3ec75a0e07c1b2de9b5a02576980eb6b 100644 --- a/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp +++ b/NonLinearSolver/nlsolver/nonLinearMechSolver.cpp @@ -1312,6 +1312,7 @@ void nonLinearMechSolver::copyOptionsToOtherSolver(nonLinearMechSolver* sv) cons /*FOR CRACK*/ // physical entities that are initialy broken sv->initbrokeninter = initbrokeninter; + sv->initbrokeninterInDomains = initbrokeninterInDomains; /* crack tracking */ //FILE *_crackTrackingFile; // name of files for crack tracking no name == NULL and no track if (_crackTrackingFile!=NULL) @@ -2936,21 +2937,11 @@ void nonLinearMechSolver::init2() _ipf->compute1state(IPStateBase::initial,stiffcomputation); _ipf->initialBroken(pModel, initbrokeninter); + _ipf->initialBrokenDomain(pModel,initbrokeninterInDomains); // starting state _ipf->copy(IPStateBase::initial,IPStateBase::previous); _ipf->copy(IPStateBase::initial,IPStateBase::current); - // initially broken on whole domain - for (int idom=0; idom< domainVector.size(); idom++){ - dgPartDomain* dgdom = dynamic_cast<dgPartDomain*>(domainVector[idom]); - if (dgdom != NULL) { - if (dgdom->allInterfaceIPsAreBrokenFromBeginning()){ - dgdom->initiallyBreakAllInterfaceIP(_ipf->getAips()); - } - - } - } - if(_energField) delete _energField; _energField = new energeticField(this, energyView,_energyComputation,_fractureEnergyComputation,getScheme()); @@ -4441,22 +4432,6 @@ void nonLinearMechSolver::fixNodalDofs(){ } FixNodalDofs(rcbc->space,*rcbc->_f,*(rcbc->_filter),*pAssembler); } - - - for (int i =0; i< domainVector.size(); i++){ - partDomain* dom = domainVector[i]; - if (dom->IsMultipleFieldFormulation()){ - dgPartDomain* dgdom = dynamic_cast<dgPartDomain*>(dom); - const std::vector<int>& fixComp = dgdom->getFixedInterfaceDofComponent(); - for (int j=0; j< fixComp.size(); j++){ - FilterDof* filter = dgdom->createFilterDof(fixComp[j]); - FixInterfaceNodalDofs(dgdom->getInterfaceFunctionSpace(),dgdom->gi->begin(), dgdom->gi->end(),*pAssembler,*filter); - delete filter; - } - - } - - } } void nonLinearMechSolver::updateDataFromPreviousSolver() @@ -4504,15 +4479,6 @@ void nonLinearMechSolver::numberDofs(){ } } #endif // HAVE_MPI - - // number extra DOfs when considering twofield formulation - if (dom->IsMultipleFieldFormulation()){ - dgPartDomain *dgdom = dynamic_cast<dgPartDomain*>(dom); - if(dgdom->gi->size() > 0){ - NumberDofsByVector(*(dgdom->getInterfaceFunctionSpace()), dgdom->gi->begin(), dgdom->gi->end(),*pAssembler); - } - } - } if(whatScheme!=StaticLinear and whatScheme != Eigen) { @@ -4604,12 +4570,6 @@ void nonLinearMechSolver::numberDofs(){ #endif SparsityDofs(*(dgdom->getFunctionSpace()), dgdom->gi->begin(), dgdom->gi->end(),*sAssembler); } - - if (dom->IsMultipleFieldFormulation()){ - SparsityDofsInterface(*(dgdom->getInterfaceFunctionSpace()),*(dgdom->getFunctionSpace()), - dgdom->gi->begin(), dgdom->gi->end(),*sAssembler); - } - } #if defined(HAVE_MPI) // MPI interface sparsity @@ -4649,16 +4609,6 @@ void nonLinearMechSolver::numberDofs(){ if(dom->elementGroupSize() > 0){ SparsityDofs(*(dom->getFunctionSpace()), dom->element_begin(), dom->element_end(),*pAssembler); } - // account also interface - dgPartDomain *dgdom = dynamic_cast<dgPartDomain*>(dom); - if (dgdom){ - SparsityDofs(*(dgdom->getFunctionSpace()), dgdom->gi->begin(), dgdom->gi->end(),*pAssembler); - if (dom->IsMultipleFieldFormulation()){ - SparsityDofsInterface(*(dgdom->getInterfaceFunctionSpace()),*(dgdom->getFunctionSpace()), - dgdom->gi->begin(), dgdom->gi->end(),*pAssembler); - } - - } } } @@ -5046,8 +4996,17 @@ void nonLinearMechSolver::insertTheta(const int numphys, elementGroup *goe){ neu._f = new simpleFunctionTimeWithConstant<double>(0.); } -void nonLinearMechSolver::physInitBroken(const int numphys){ - initbrokeninter.push_back(numphys); +void nonLinearMechSolver::physInitBroken(const int dim, const int numphys){ + initbrokeninter.push_back(std::pair<int,int>(dim,numphys)); +}; + +void nonLinearMechSolver::initialBrokenDomain(const int phys) +{ + initbrokeninterInDomains.push_back(std::pair<int,int>(phys,phys)); +} +void nonLinearMechSolver::initialBrokenInterfaceDomain(const int physMinus, const int phyPlus) +{ + initbrokeninterInDomains.push_back(std::pair<int,int>(physMinus,phyPlus)); } void nonLinearMechSolver::createInterfaceElement(){ @@ -8902,17 +8861,8 @@ void nonLinearMechSolver::computeInternalForces(){ dgPartDomain *dgdom = static_cast<dgPartDomain*>(dom); if(whatScheme!=Multi) { - // Assembling loop on elementary interface terms - if (dom->IsMultipleFieldFormulation()){ - Assemble(*(dgdom->getInterfaceFunctionSpace()),dgdom->getLinearInterfaceTerm(),*(dgdom->getFunctionSpace()),dgdom->gi->begin(),dgdom->gi->end(),*(dgdom->getInterfaceGaussIntegrationRule()), + Assemble(dgdom->getLinearInterfaceTerm(),*(dgdom->getFunctionSpace()),dgdom->gi->begin(),dgdom->gi->end(),*(dgdom->getInterfaceGaussIntegrationRule()), _ufield,*nlAssembler,nonLinearSystem<double>::Fint,_elementErosionFilter); // Use the same GaussQuadrature rule than on the boundary - } - else{ - - Assemble(dgdom->getLinearInterfaceTerm(),*(dgdom->getFunctionSpace()),dgdom->gi->begin(),dgdom->gi->end(),*(dgdom->getInterfaceGaussIntegrationRule()), - _ufield,*nlAssembler,nonLinearSystem<double>::Fint,_elementErosionFilter); // Use the same GaussQuadrature rule than on the boundary - } - } else { @@ -9000,16 +8950,9 @@ void nonLinearMechSolver::computeStiffMatrix(){ dgPartDomain *dgdom = static_cast<dgPartDomain*>(dom); if(whatScheme!=Multi) { - if (dgdom->IsMultipleFieldFormulation()){ - Assemble(*(dgdom->getInterfaceFunctionSpace()),*(dgdom->getBilinearInterfaceTerm()),*(dom->getFunctionSpace()),dgdom->gi->begin(),dgdom->gi->end(), - *(dgdom->getInterfaceGaussIntegrationRule()),*pAssembler,_elementErosionFilter); - - } - else{ - // Assembling loop on elementary interface terms - AssembleItMap(*(dgdom->getBilinearInterfaceTerm()),*(dom->getFunctionSpace()),dgdom->gi->begin(),dgdom->gi->end(), + // Assembling loop on elementary interface terms + AssembleItMap(*(dgdom->getBilinearInterfaceTerm()),*(dom->getFunctionSpace()),dgdom->gi->begin(),dgdom->gi->end(), *(dgdom->getInterfaceGaussIntegrationRule()),*pAssembler,_elementErosionFilter); - } } else { @@ -14052,16 +13995,7 @@ void nonLinearMechSolver::init2Micro(){ _ipf->copy(IPStateBase::current,IPStateBase::initial); _ipf->initialBroken(pModel, initbrokeninter); - // initially broken on whole domain - for (int idom=0; idom< domainVector.size(); idom++){ - dgPartDomain* dgdom = dynamic_cast<dgPartDomain*>(domainVector[idom]); - if (dgdom != NULL) { - if (dgdom->allInterfaceIPsAreBrokenFromBeginning()){ - dgdom->initiallyBreakAllInterfaceIP(_ipf->getAips()); - } - - } - } + _ipf->initialBrokenDomain(pModel,initbrokeninterInDomains); } else{ _ipf->copy(IPStateBase::current,IPStateBase::initial); diff --git a/NonLinearSolver/nlsolver/nonLinearMechSolver.h b/NonLinearSolver/nlsolver/nonLinearMechSolver.h index 1da3f8d50855c97607cdaa2c65925d847133f666..c8fe1fd6082e230cd0c2b7f724f722e1282262d2 100644 --- a/NonLinearSolver/nlsolver/nonLinearMechSolver.h +++ b/NonLinearSolver/nlsolver/nonLinearMechSolver.h @@ -736,7 +736,8 @@ class nonLinearMechSolver /*FOR CRACK*/ // physical entities that are initialy broken - std::vector<int> initbrokeninter; + std::vector<std::pair<int, int> > initbrokeninter; + std::vector<std::pair<int, int> > initbrokeninterInDomains; /* crack tracking */ std::string _crackTrackingName; FILE *_crackTrackingFile; // name of files for crack tracking no name == NULL and no track @@ -1300,7 +1301,10 @@ class nonLinearMechSolver void archivingIPShellOnPhysicalGroup(int loc,std::string onwhat, const int numphys, const int ipval, const int elemval, const int nstep=1); - void physInitBroken(const int phys); + void physInitBroken(const int dim, const int phys); + void initialBrokenDomain(const int phys); + void initialBrokenInterfaceDomain(const int physMinus, const int phyPlus); + // void setInitOrRestartFileName(const std::string fname); void contactInteraction(contactDomain *cdom); void defoDefoContactInteraction(defoDefoContactDomain *cdom); diff --git a/NonLinearSolver/space/ThreeDHierarchicalFunctionSpace.cpp b/NonLinearSolver/space/ThreeDHierarchicalFunctionSpace.cpp index b928c7147e61f55eee298897466a1825055772a8..72fa5ffa38864dfc3e8921e73c9786bd9371234c 100644 --- a/NonLinearSolver/space/ThreeDHierarchicalFunctionSpace.cpp +++ b/NonLinearSolver/space/ThreeDHierarchicalFunctionSpace.cpp @@ -76,13 +76,13 @@ void HierarchicalFunctionSpace::setOrder(int cc, int order) { found = true; _orderBasis[i] = order; - Msg::Info("Use order %d for comp %d in %s",order,cc,getFunctionSpaceName().c_str()); + Msg::Info("Order %d is used for comp %d in %s",order,cc,getFunctionSpaceName().c_str()); break; } } if (!found) { - Msg::Error("comp %d does not exist in %s",cc,getFunctionSpaceName().c_str()); + Msg::Error("comp %d does not exist in %s !!!",cc,getFunctionSpaceName().c_str()); } }; diff --git a/NonLinearSolver/space/ThreeDLagrangeFunctionSpace.h b/NonLinearSolver/space/ThreeDLagrangeFunctionSpace.h index b48ca73b394b370666419bef186fe42eb79f6e39..15bd028e4ad045c6883a632e03d24bfb524914e1 100644 --- a/NonLinearSolver/space/ThreeDLagrangeFunctionSpace.h +++ b/NonLinearSolver/space/ThreeDLagrangeFunctionSpace.h @@ -56,7 +56,7 @@ class VertexBasedLagrangeFunctionSpace : public nlsFunctionSpace<double> virtual void usePrimaryShapeFunction(int c) { - Msg::Info("use comp %d with primary shape function in %s !!!",c, getFunctionSpaceName().c_str()); + Msg::Info("Field %d is considered with primary shape function in %s",c, getFunctionSpaceName().c_str()); _usePrimaryShapeFunctions.insert(c); } virtual bool withPrimaryShapeFunction(int c) const diff --git a/cm3apps/install.txt b/cm3apps/install.txt index 3d170f3446ddf82f1cf43a7d4076f06c87e3739e..8ef26effff5660b5a00783e263d53dc6434c7460 100644 --- a/cm3apps/install.txt +++ b/cm3apps/install.txt @@ -119,6 +119,8 @@ A) The packages needed to install gmsh are (gmsh has to be install to use cm3app 4) close your terminal and open it (to reload your bashrc) 5) Go to your petsc installation folder and type the following command (you have to use this configuration for hmem server): + For 3.13 on dragon1, dragon2: + ./configure --with-debugging=0 --download-fblaslapack=yes --download-mumps=yes --download-scalapack=yes --download-blacs=yes --with-mpi-dir=$MPI_HOME --with-pic --with-fpic --with-shared-libraries=1 --with-clanguage=cxx --known-mpi-shared-libraries=0 --download-parmetis=yes --download-metis=yes --download-superlu_dist=yes For 3.10, without superlu ./configure -configModules=PETSc.Configure --optionsModule=config.compilerOptions --with-debugging=0 --download-fblaslapack=yes --download-mumps=yes --download-scalapack=yes --download-mpich=yes --with-shared-libraries=yes --known-mpi-shared-libraries=0 --download-parmetis=yes --download-metis=yes @@ -151,13 +153,6 @@ A) The packages needed to install gmsh are (gmsh has to be install to use cm3app in case of error "MPI wrappers do not work, use --with-mpi-compilers=0 - for dragon - version >=3.7 - ./configure --with-debugging=0 --download-fblaslapack=yes --download-mumps=yes --download-scalapack=yes --download-blacs=yes --with-mpi-dir=$MPI_HOME --with-pic --with-fpic --with-shared-libraries=1 --with-clanguage=cxx --known-mpi-shared-libraries=0 --download-parmetis=yes --download-metis=yes --download-superlu_dist=yes - - version <3.7 - ./configure --with-debugging=0 --download-fblaslapack=yes --download-mumps=yes --download-scalapack=yes --download-blacs=yes --with-mpi-dir=$MPI_HOME --with-pic --with-shared-libraries=0 --with-clanguage=cxx --with-batch --known-mpi-shared-libraries=0 --download-parmetis=yes --download-metis=yes --download-superlu_dist=yes - on hydra (there is a conmflict with metis if downloaded from petsc) -petsc 3.8. ./configure --with-debugging=0 --with-scalapack-lib=$SCALAPACKDIR/lib$SCALAPACKLIB.so --download-mumps=yes --with-blas-lib=$BLASDIR/lib$BLASLIB.so --with-lapack-lib=$LAPACKDIR/lib$LAPACKLIB.so --with-mpi-dir=$MPI_HOME --with-pic --with-shared-libraries=1 --with-clanguage=cxx --with-batch --known-mpi-shared-libraries=1 @@ -182,44 +177,76 @@ Then wait until the job end (the last line of the created file "petsc-install.ou 5c) This is a macro that load all the required module on ceci cluster. Be aware that the macro is cluster dependant as the version of the mpackages var from one cluster to others. "module avail" will list all the available modules (including different compiler and MPI versions) so you may change this macro to fit your needs. You can put it on your .bashrc and then bash; load_module will load the required module - dragon1: - function load_module() - { - module purge - module load GCC/4.7.3 - module load CMake/2.8.11.1-GCC-4.7.3 - module load lapack/gcc/3.4.2 - # hack as the load of module lapack export BLASDIR??? - export LAPACKDIR=$BLASDIR - export LAPACKLIB=$BLASLIB - # then load blas - module load blas/gcc/3.4.2 - module load openmpi/1.6.1/gnu64-4.7.3 - echo "List of loaded modules:" - module list - } - new one on dragon 1 function load_module() { module purge - module load GCC/4.9.2 - module load CMake/3.10.2-GCC-4.9.2 - #module load lapack/3.5.0/gcc/4.7.3 - #module load blas/3.5.0/gcc/4.7.3 - module load openmpi/2.1.2/GCC-4.9.2-gpu - module load python/2.7.13 - export MPI_HOME=/usr/local/openmpi/2.1.2/GCC-4.9.2 + module load GCC/7.3.0-2.30 + module load CMake/3.11.4-GCCcore-7.3.0 + module load OpenMPI/3.1.1-GCC-7.3.0-2.30 + module load Python/2.7.15-GCCcore-7.3.0-bare + export MPI_HOME=/usr/local/Software/.local/easybuild/software/OpenMPI/3.1.1-GCC-7.3.0-2.30/ export MPI_RUN=$MPI_HOME/bin/mpirun - #export BLASDIR=$BLAS - #export BLASLIB=blas - #export LAPACKDIR=$LAPACK - #export LAPACKLIB=lapack echo "List of loaded modules:" module list + } + load_module + + export PETSC_DIR=$HOME/local/petsc-3.13.2 + export PETSC_ARCH=arch-linux-cxx-opt + export SLEPC_DIR=$HOME/local/slepc-3.13.3 + export SLEPC_ARCH=linux-gnu-c-opt + export BLASDIR=$PETSC_DIR/$PETSC_ARCH/lib + export BLASLIB=fblas + export LAPACKDIR=$PETSC_DIR/$PETSC_ARCH/lib + export LAPACKLIB=flapack + export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib:$LD_LIBRARY_PATH + + export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib:$LD_LIBRARY_PATH + + export PATH=$HOME/local/swig/bin:$HOME/local/bin:$PATH + export PATH=$PATH:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh + + export PYTHONPATH=$PYTHONPATH:$HOME/cm3Libraries/dG3D/release:$HOME/cm3Libraries/dG3D/debug:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers/gmshpy:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers/gmshpy + +unset SSH_ASKPASS + + + + + - dragon 2 + function load_module() + { + module purge + module load GCC/7.3.0-2.30 + module load CMake/3.9.6 + module load OpenMPI/3.1.1-GCC-7.3.0-2.30 + module load Python/2.7.15-GCCcore-7.3.0-bare + export MPI_HOME=/opt/cecisw/arch/easybuild/2018b/software/OpenMPI/3.1.1-GCC-7.3.0-2.30 + export MPI_RUN=$MPI_HOME/bin/mpirun + echo "List of loaded modules:" + module list } load_module - with dragon, when doing ccmake .., you need to specify the locations /home/ulg/cmmm/lnoels/local/petsc-3.9.1/linux-gnu-c-opt/lib/libfblas.a and /home/ulg/cmmm/lnoels/local/petsc-3.9.1/linux-gnu-c-opt/lib/libflapack.a using toggle - also you need to compile without gmm fltk and without metis + export PETSC_DIR=$HOME/local/petsc-3.13.2 + export PETSC_ARCH=arch-linux-cxx-opt + export SLEPC_DIR=$HOME/local/slepc-3.13.3 + export SLEPC_ARCH=arch-linux-cxx-opt + export BLASDIR=$PETSC_DIR/$PETSC_ARCH/lib + export BLASLIB=fblas + export LAPACKDIR=$PETSC_DIR/$PETSC_ARCH/lib + export LAPACKLIB=flapack + export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib:$LD_LIBRARY_PATH + + export PATH=$HOME/local/swig/bin:$PATH + export PATH=$HOME/local/bin:$PATH + export PATH=$PATH:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh + export PYTHONPATH=$PYTHONPATH:$HOME/cm3Libraries/dG3D/release:$HOME/cm3Libraries/dG3D/debug:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/debug/NonLinearSolver/gmsh/utils/wrappers/gmshpy:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers:$HOME/cm3Libraries/dG3D/release/NonLinearSolver/gmsh/utils/wrappers/gmshpy + + unset SSH_ASKPASS + + with dragon 1 and dragon 2, when doing ccmake .., you need to specify the locations /home/ulg/cmmm/lnoels/local/petsc-3.13.2/arch-linux-cxx-opt/lib//libfblas.a and /home/ulg/cmmm/lnoels/local/petsc-3.13.2/arch-linux-cxx-opt/lib//libflapack.a using toggle + also you need to compile without gmm fltk numpy and without metis #load_module #do not load it if you want to use scratchcopy etc diff --git a/dG3D/benchmarks/CMakeLists.txt b/dG3D/benchmarks/CMakeLists.txt index 59413fc80c708df21c29cfff66c11c1da21bb32e..671a905268e142621bbe38f37201ca953d86553a 100644 --- a/dG3D/benchmarks/CMakeLists.txt +++ b/dG3D/benchmarks/CMakeLists.txt @@ -70,7 +70,6 @@ add_subdirectory(restartNonLocalJ2) add_subdirectory(restartNonLocalJ2MPI) add_subdirectory(nonLocalLemaitreChabocheCube) add_subdirectory(multiscaleAdhesiveTest2D) -add_subdirectory(multiscaleCohesiveTest2D) add_subdirectory(DG_TET4) add_subdirectory(DG_PRI6) add_subdirectory(DG_PRI18) @@ -79,7 +78,6 @@ add_subdirectory(DG_HEX8_PRI6) add_subdirectory(DG_HEX8_PRI6_hierarchical) add_subdirectory(DG_HEX8_PRI6_Lobatto) add_subdirectory(DG_PRI6_smallStrain) -add_subdirectory(fullTwoField_PRI6) add_subdirectory(CrackCompositeFailurePRI6MPI) add_subdirectory(microNonLocalDamage) add_subdirectory(multiscale_2order_3Dsimple) @@ -127,7 +125,6 @@ add_subdirectory(pathFollowing_snapback) add_subdirectory(pathFollowing_TrueSnapback) add_subdirectory(pathFollowing_cohesive) add_subdirectory(pathFollowingMultiscale) -add_subdirectory(multiscaleCohesiveTest2D_mixedMode) add_subdirectory(multiscaleCohesiveTest2D_fullDG) add_subdirectory(compRVE) add_subdirectory(voidedRVE) @@ -137,7 +134,6 @@ add_subdirectory(smpT58) add_subdirectory(smpPhenomenological_Mech) add_subdirectory(smpPhenomenological_Thermo) add_subdirectory(multiscaleCohesiveTest2D_fullDG_rotateRVE) -add_subdirectory(multiscaleEnhanceStrain) add_subdirectory(nonLinearMixedBC_2D_DirectionFollowing) add_subdirectory(interpolationPBC_2DShifted) add_subdirectory(DG_PRI6_resetBC) diff --git a/dG3D/benchmarks/Gurson_Cube_OnsetByThomason/cube.py b/dG3D/benchmarks/Gurson_Cube_OnsetByThomason/cube.py index c39d3e91a8328ab52eb54a26835036f5b8d0e68b..7941e7e8fa732cb2300b6e9e735edae6337c0c01 100755 --- a/dG3D/benchmarks/Gurson_Cube_OnsetByThomason/cube.py +++ b/dG3D/benchmarks/Gurson_Cube_OnsetByThomason/cube.py @@ -63,7 +63,7 @@ nstep = 400 # Number of step ftime =1.0 # Final time tol=1.e-6 # Relative tolerance for NR scheme tolAbs = 1.e-16 # Absolute tolerance for NR scheme -nstepArch=nstep/250 # Number of step between 2 archiving +nstepArch=int(nstep/250) # Number of step between 2 archiving nstepArchEnergy = 1 # Number of step between 2 energy computation and archiving nstepArchForce = 1 # Number of step between 2 force archiving MaxIter = 25 # Maximum number of iterations diff --git a/dG3D/benchmarks/fullTwoField_PRI6/CMakeLists.txt b/dG3D/benchmarks/fullTwoField_PRI6/CMakeLists.txt deleted file mode 100644 index 48186feaa6d963aae1518803c078d1075f3e0edb..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/fullTwoField_PRI6/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# test file - -set(PYFILE twoHole.py) - -set(FILES2DELETE - *.csv - disp* - stress* -) - -add_cm3python_test(${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/fullTwoField_PRI6/twoHole.geo b/dG3D/benchmarks/fullTwoField_PRI6/twoHole.geo deleted file mode 100644 index 9b42aefe356d6eff249f6f74ccae56f8f5f0ae66..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/fullTwoField_PRI6/twoHole.geo +++ /dev/null @@ -1,72 +0,0 @@ - -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{2}; Recombine; -} - -//+ -Physical Volume(83) = {1}; -//+ -Physical Surface(84) = {37}; -//+ -Physical Surface(85) = {45}; diff --git a/dG3D/benchmarks/fullTwoField_PRI6/twoHole.msh b/dG3D/benchmarks/fullTwoField_PRI6/twoHole.msh deleted file mode 100644 index 95ed2265b5426fd06bc563d9e0f98a490b892835..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/fullTwoField_PRI6/twoHole.msh +++ /dev/null @@ -1,1043 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -378 -1 0 0 0 -2 0.02 0 0 -3 0.02 0.04 0 -4 0 0.04 0 -5 0.004 0.016 0 -6 0.006 0.018 0 -7 0.008 0.016 0 -8 0.006 0.014 0 -9 0.012 0.024 0 -10 0.014 0.026 0 -11 0.016 0.024 0 -12 0.014 0.022 0 -13 0 0 0.001 -14 0.02 0 0.001 -15 0.02 0.04 0.001 -16 0 0.04 0.001 -17 0.004 0.016 0.001 -18 0.006 0.014 0.001 -19 0.008 0.016 0.001 -20 0.006 0.018 0.001 -21 0.012 0.024 0.001 -22 0.014 0.022 0.001 -23 0.016 0.024 0.001 -24 0.014 0.026 0.001 -25 0.003999999999991045 0 0 -26 0.007999999999979423 0 0 -27 0.01199999999997901 0 0 -28 0.01599999999998917 0 0 -29 0.02 0.003999999999992779 0 -30 0.02 0.007999999999982091 0 -31 0.02 0.0119999999999705 0 -32 0.02 0.01599999999995885 0 -33 0.02 0.01999999999994786 0 -34 0.02 0.02399999999995802 0 -35 0.02 0.02799999999996886 0 -36 0.02 0.03199999999997834 0 -37 0.02 0.03599999999998998 0 -38 0.01600000000001043 0.04 0 -39 0.01200000000002099 0.04 0 -40 0.008000000000021266 0.04 0 -41 0.004000000000010967 0.04 0 -42 0 0.0360000000000088 0 -43 0 0.03200000000002086 0 -44 0 0.02800000000003047 0 -45 0 0.02400000000004199 0 -46 0 0.02000000000005283 0 -47 0 0.01600000000004253 0 -48 0 0.01200000000003156 0 -49 0 0.008000000000021934 0 -50 0 0.004000000000010155 0 -51 0.004585786437623847 0.01741421356237004 0 -52 0.007414213562370057 0.01741421356237614 0 -53 0.007414213562374714 0.01458578643762852 0 -54 0.004585786437629543 0.01458578643762427 0 -55 0.01258578643762438 0.02541421356237057 0 -56 0.01541421356237008 0.02541421356237611 0 -57 0.01541421356237474 0.02258578643762854 0 -58 0.01258578643763034 0.02258578643762347 0 -59 0.003999999999991045 0 0.001 -60 0.007999999999979423 0 0.001 -61 0.01199999999997901 0 0.001 -62 0.01599999999998917 0 0.001 -63 0.02 0.003999999999992779 0.001 -64 0.02 0.007999999999982091 0.001 -65 0.02 0.0119999999999705 0.001 -66 0.02 0.01599999999995885 0.001 -67 0.02 0.01999999999994786 0.001 -68 0.02 0.02399999999995802 0.001 -69 0.02 0.02799999999996886 0.001 -70 0.02 0.03199999999997834 0.001 -71 0.02 0.03599999999998998 0.001 -72 0.01600000000001043 0.04 0.001 -73 0.01200000000002099 0.04 0.001 -74 0.008000000000021266 0.04 0.001 -75 0.004000000000010967 0.04 0.001 -76 0 0.0360000000000088 0.001 -77 0 0.03200000000002086 0.001 -78 0 0.02800000000003047 0.001 -79 0 0.02400000000004199 0.001 -80 0 0.02000000000005283 0.001 -81 0 0.01600000000004253 0.001 -82 0 0.01200000000003156 0.001 -83 0 0.008000000000021934 0.001 -84 0 0.004000000000010155 0.001 -85 0.004585786437629543 0.01458578643762427 0.001 -86 0.007414213562374714 0.01458578643762852 0.001 -87 0.007414213562370057 0.01741421356237614 0.001 -88 0.004585786437623847 0.01741421356237004 0.001 -89 0.01258578643763034 0.02258578643762347 0.001 -90 0.01541421356237474 0.02258578643762854 0.001 -91 0.01541421356237008 0.02541421356237611 0.001 -92 0.01258578643762438 0.02541421356237057 0.001 -93 0 0 0.0005 -94 0.02 0 0.0005 -95 0.02 0.04 0.0005 -96 0 0.04 0.0005 -97 0.004 0.016 0.0005 -98 0.006 0.014 0.0005 -99 0.008 0.016 0.0005 -100 0.006 0.018 0.0005 -101 0.012 0.024 0.0005 -102 0.014 0.022 0.0005 -103 0.016 0.024 0.0005 -104 0.014 0.026 0.0005 -105 0.01240255270529311 0.02732675097662648 0 -106 0.007602929996242948 0.0126769968980255 0 -107 0.01145241865303966 0.0225358999868025 0 -108 0.008995736333442091 0.01715566889250189 0 -109 0.01199999999997341 0.003999999999993982 0 -110 0.006996397469390378 0.03556710200130172 0 -111 0.01617280765931338 0.01211332162976193 0 -112 0.003999999999988486 0.02800000000003047 0 -113 0.007205004488034424 0.01911648239619825 0 -114 0.004047412876024088 0.007212957566615201 0 -115 0.01599999999999025 0.03199999999998022 0 -116 0.0154222970883304 0.0267067873814801 0 -117 0.00464847850874156 0.01331153113206086 0 -118 0.004999999999996941 0.01915445242381804 0 -119 0.01552342791862798 0.02106235851900055 0 -120 0.01600000000001114 0.003999999999993225 0 -121 0.003479852029457915 0.03600042446216749 0 -122 0.01200000000002099 0.03600000000001055 0 -123 0.00771839852067624 0.003677000596647123 0 -124 0.00315470053838726 0.00315470053838726 0 -125 0.01600000000000027 0.03600000000000025 0 -126 0.002992116473831556 0.01443472436917375 0 -127 0.01714955414333775 0.02539567082466886 0 -128 0.002824474693490734 0.01649520805016745 0 -129 0.01702550787977496 0.02242913086876914 0 -130 0.01258018396895024 0.02134686103960659 0 -131 0.009198652336442875 0.01522551897910665 0 -132 0.003891961890701049 0.02355020456101364 0 -133 0.0110688253168347 0.02503860894646169 0 -134 0.0160698560070648 0.01632548963537167 0 -135 0.01069098423278593 0.02680290088734016 0 -136 0.00933437977246065 0.01340029840953839 0 -137 0.01081514713499126 0.0165492480725308 0 -138 0.0109132511189457 0.02106041907783507 0 -139 0.007647305110115904 0.00818423911045516 0 -140 0.01284067545273365 0.0322550844007268 0 -141 0.008974134474271457 0.01873988524253016 0 -142 0.007143664753862652 0.02689538032614615 0 -143 0.006826666675583362 0.0206099818648135 0 -144 0.01550933979881433 0.008122270507054311 0 -145 0.004439886343719907 0.03243988634370228 0 -146 0.0129757170251299 0.01304492157977256 0 -147 0.002953288207580717 0.0207610905084825 0 -148 0.01372125624720542 0.02055333382294737 0 -149 0.005881039147303106 0.01205707007658361 0 -150 0.01413192694006548 0.02794670903416576 0 -151 0.01684529946162967 0.0191547005383295 0 -152 0.01647016304037077 0.02858109254121668 0 -153 0.00363689412792006 0.01153535809035796 0 -154 0.002544470555998267 0.01862710231925095 0 -155 0.01209419041535445 0.0196803536426357 0 -156 0.009061305735835416 0.01193448069134191 0 -157 0.01036851360063574 0.02821054886703228 0 -158 0.006388649420866375 0.02448879130113983 0 -159 0.009745787555423036 0.02254567011498262 0 -160 0.01041700109106571 0.007066133576883037 0 -161 0.009931842038272243 0.03317339893285465 0 -162 0.008799970627692437 0.02061240491943806 0 -163 0.01331233028690373 0.01562691665003972 0 -164 0.01117023751174337 0.01444769068226164 0 -165 0.01064488274798664 0.01836069851075955 0 -166 0.01413228062890869 0.01869840562005761 0 -167 0.00538878838173712 0.02179886163059895 0 -168 0.009009524594861469 0.02488363376499974 0 -169 0.01231626109746884 0.02929897563342893 0 -170 0.007673440628370724 0.01079971796544068 0 -171 0.0126576099041479 0.009983293187604254 0 -172 0.007496446017083054 0.02901160532224953 0 -173 0.0143518053061258 0.03001637232190368 0 -174 0.005928288004999152 0.00993343832793776 0 -175 0.01219976624282895 0.01778312449920468 0 -176 0.007486994255728132 0.02236193559116424 0 -177 0.01028528587685014 0.01969075227863971 0 -178 0.008843546198684781 0.0271004590451919 0 -179 0.01082694358836647 0.01214136923319773 0 -180 0.01065531122403177 0.02380076256264931 0 -181 0.007583207023124131 0.03208157906342547 0 -182 0.009762411580881602 0.01003753084866764 0 -183 0.01008949087155294 0.03067186536995294 0 -184 0.01304936258751566 0.006641566401220849 0 -185 0.003999999999991045 0 0.0005 -186 0.007999999999979423 0 0.0005 -187 0.01199999999997901 0 0.0005 -188 0.01599999999998917 0 0.0005 -189 0.02 0.003999999999992779 0.0005 -190 0.02 0.007999999999982091 0.0005 -191 0.02 0.0119999999999705 0.0005 -192 0.02 0.01599999999995885 0.0005 -193 0.02 0.01999999999994786 0.0005 -194 0.02 0.02399999999995802 0.0005 -195 0.02 0.02799999999996886 0.0005 -196 0.02 0.03199999999997834 0.0005 -197 0.02 0.03599999999998998 0.0005 -198 0.01600000000001043 0.04 0.0005 -199 0.01200000000002099 0.04 0.0005 -200 0.008000000000021266 0.04 0.0005 -201 0.004000000000010967 0.04 0.0005 -202 0 0.0360000000000088 0.0005 -203 0 0.03200000000002086 0.0005 -204 0 0.02800000000003047 0.0005 -205 0 0.02400000000004199 0.0005 -206 0 0.02000000000005283 0.0005 -207 0 0.01600000000004253 0.0005 -208 0 0.01200000000003156 0.0005 -209 0 0.008000000000021934 0.0005 -210 0 0.004000000000010155 0.0005 -211 0.004585786437629543 0.01458578643762427 0.0005 -212 0.007414213562374714 0.01458578643762852 0.0005 -213 0.007414213562370057 0.01741421356237614 0.0005 -214 0.004585786437623847 0.01741421356237004 0.0005 -215 0.01258578643763034 0.02258578643762347 0.0005 -216 0.01541421356237474 0.02258578643762854 0.0005 -217 0.01541421356237008 0.02541421356237611 0.0005 -218 0.01258578643762438 0.02541421356237057 0.0005 -219 0.01240255270529311 0.02732675097662648 0.001 -220 0.007602929996242948 0.0126769968980255 0.001 -221 0.01145241865303966 0.0225358999868025 0.001 -222 0.008995736333442091 0.01715566889250189 0.001 -223 0.01199999999997341 0.003999999999993982 0.001 -224 0.006996397469390378 0.03556710200130172 0.001 -225 0.01617280765931338 0.01211332162976193 0.001 -226 0.003999999999988486 0.02800000000003047 0.001 -227 0.007205004488034424 0.01911648239619825 0.001 -228 0.004047412876024088 0.007212957566615201 0.001 -229 0.01599999999999025 0.03199999999998022 0.001 -230 0.0154222970883304 0.0267067873814801 0.001 -231 0.00464847850874156 0.01331153113206086 0.001 -232 0.004999999999996941 0.01915445242381804 0.001 -233 0.01552342791862798 0.02106235851900055 0.001 -234 0.01600000000001114 0.003999999999993225 0.001 -235 0.003479852029457915 0.03600042446216749 0.001 -236 0.01200000000002099 0.03600000000001055 0.001 -237 0.00771839852067624 0.003677000596647123 0.001 -238 0.00315470053838726 0.00315470053838726 0.001 -239 0.01600000000000027 0.03600000000000025 0.001 -240 0.002992116473831556 0.01443472436917375 0.001 -241 0.01714955414333775 0.02539567082466886 0.001 -242 0.002824474693490734 0.01649520805016745 0.001 -243 0.01702550787977496 0.02242913086876914 0.001 -244 0.01258018396895024 0.02134686103960659 0.001 -245 0.009198652336442875 0.01522551897910665 0.001 -246 0.003891961890701049 0.02355020456101364 0.001 -247 0.0110688253168347 0.02503860894646169 0.001 -248 0.0160698560070648 0.01632548963537167 0.001 -249 0.01069098423278593 0.02680290088734016 0.001 -250 0.00933437977246065 0.01340029840953839 0.001 -251 0.01081514713499126 0.0165492480725308 0.001 -252 0.0109132511189457 0.02106041907783507 0.001 -253 0.007647305110115904 0.00818423911045516 0.001 -254 0.01284067545273365 0.0322550844007268 0.001 -255 0.008974134474271457 0.01873988524253016 0.001 -256 0.007143664753862652 0.02689538032614615 0.001 -257 0.006826666675583362 0.0206099818648135 0.001 -258 0.01550933979881433 0.008122270507054311 0.001 -259 0.004439886343719907 0.03243988634370228 0.001 -260 0.0129757170251299 0.01304492157977256 0.001 -261 0.002953288207580717 0.0207610905084825 0.001 -262 0.01372125624720542 0.02055333382294737 0.001 -263 0.005881039147303106 0.01205707007658361 0.001 -264 0.01413192694006548 0.02794670903416576 0.001 -265 0.01684529946162967 0.0191547005383295 0.001 -266 0.01647016304037077 0.02858109254121668 0.001 -267 0.00363689412792006 0.01153535809035796 0.001 -268 0.002544470555998267 0.01862710231925095 0.001 -269 0.01209419041535445 0.0196803536426357 0.001 -270 0.009061305735835416 0.01193448069134191 0.001 -271 0.01036851360063574 0.02821054886703228 0.001 -272 0.006388649420866375 0.02448879130113983 0.001 -273 0.009745787555423036 0.02254567011498262 0.001 -274 0.01041700109106571 0.007066133576883037 0.001 -275 0.009931842038272243 0.03317339893285465 0.001 -276 0.008799970627692437 0.02061240491943806 0.001 -277 0.01331233028690373 0.01562691665003972 0.001 -278 0.01117023751174337 0.01444769068226164 0.001 -279 0.01064488274798664 0.01836069851075955 0.001 -280 0.01413228062890869 0.01869840562005761 0.001 -281 0.00538878838173712 0.02179886163059895 0.001 -282 0.009009524594861469 0.02488363376499974 0.001 -283 0.01231626109746884 0.02929897563342893 0.001 -284 0.007673440628370724 0.01079971796544068 0.001 -285 0.0126576099041479 0.009983293187604254 0.001 -286 0.007496446017083054 0.02901160532224953 0.001 -287 0.0143518053061258 0.03001637232190368 0.001 -288 0.005928288004999152 0.00993343832793776 0.001 -289 0.01219976624282895 0.01778312449920468 0.001 -290 0.007486994255728132 0.02236193559116424 0.001 -291 0.01028528587685014 0.01969075227863971 0.001 -292 0.008843546198684781 0.0271004590451919 0.001 -293 0.01082694358836647 0.01214136923319773 0.001 -294 0.01065531122403177 0.02380076256264931 0.001 -295 0.007583207023124131 0.03208157906342547 0.001 -296 0.009762411580881602 0.01003753084866764 0.001 -297 0.01008949087155294 0.03067186536995294 0.001 -298 0.01304936258751566 0.006641566401220849 0.001 -299 0.01240255270529311 0.02732675097662648 0.0005 -300 0.007602929996242948 0.0126769968980255 0.0005 -301 0.01145241865303966 0.0225358999868025 0.0005 -302 0.008995736333442091 0.01715566889250189 0.0005 -303 0.01199999999997341 0.003999999999993982 0.0005 -304 0.006996397469390378 0.03556710200130172 0.0005 -305 0.01617280765931338 0.01211332162976193 0.0005 -306 0.003999999999988486 0.02800000000003047 0.0005 -307 0.007205004488034424 0.01911648239619825 0.0005 -308 0.004047412876024088 0.007212957566615201 0.0005 -309 0.01599999999999025 0.03199999999998022 0.0005 -310 0.0154222970883304 0.0267067873814801 0.0005 -311 0.00464847850874156 0.01331153113206086 0.0005 -312 0.004999999999996941 0.01915445242381804 0.0005 -313 0.01552342791862798 0.02106235851900055 0.0005 -314 0.01600000000001114 0.003999999999993225 0.0005 -315 0.003479852029457915 0.03600042446216749 0.0005 -316 0.01200000000002099 0.03600000000001055 0.0005 -317 0.00771839852067624 0.003677000596647123 0.0005 -318 0.00315470053838726 0.00315470053838726 0.0005 -319 0.01600000000000027 0.03600000000000025 0.0005 -320 0.002992116473831556 0.01443472436917375 0.0005 -321 0.01714955414333775 0.02539567082466886 0.0005 -322 0.002824474693490734 0.01649520805016745 0.0005 -323 0.01702550787977496 0.02242913086876914 0.0005 -324 0.01258018396895024 0.02134686103960659 0.0005 -325 0.009198652336442875 0.01522551897910665 0.0005 -326 0.003891961890701049 0.02355020456101364 0.0005 -327 0.0110688253168347 0.02503860894646169 0.0005 -328 0.0160698560070648 0.01632548963537167 0.0005 -329 0.01069098423278593 0.02680290088734016 0.0005 -330 0.00933437977246065 0.01340029840953839 0.0005 -331 0.01081514713499126 0.0165492480725308 0.0005 -332 0.0109132511189457 0.02106041907783507 0.0005 -333 0.007647305110115904 0.00818423911045516 0.0005 -334 0.01284067545273365 0.0322550844007268 0.0005 -335 0.008974134474271457 0.01873988524253016 0.0005 -336 0.007143664753862652 0.02689538032614615 0.0005 -337 0.006826666675583362 0.0206099818648135 0.0005 -338 0.01550933979881433 0.008122270507054311 0.0005 -339 0.004439886343719907 0.03243988634370228 0.0005 -340 0.0129757170251299 0.01304492157977256 0.0005 -341 0.002953288207580717 0.0207610905084825 0.0005 -342 0.01372125624720542 0.02055333382294737 0.0005 -343 0.005881039147303106 0.01205707007658361 0.0005 -344 0.01413192694006548 0.02794670903416576 0.0005 -345 0.01684529946162967 0.0191547005383295 0.0005 -346 0.01647016304037077 0.02858109254121668 0.0005 -347 0.00363689412792006 0.01153535809035796 0.0005 -348 0.002544470555998267 0.01862710231925095 0.0005 -349 0.01209419041535445 0.0196803536426357 0.0005 -350 0.009061305735835416 0.01193448069134191 0.0005 -351 0.01036851360063574 0.02821054886703228 0.0005 -352 0.006388649420866375 0.02448879130113983 0.0005 -353 0.009745787555423036 0.02254567011498262 0.0005 -354 0.01041700109106571 0.007066133576883037 0.0005 -355 0.009931842038272243 0.03317339893285465 0.0005 -356 0.008799970627692437 0.02061240491943806 0.0005 -357 0.01331233028690373 0.01562691665003972 0.0005 -358 0.01117023751174337 0.01444769068226164 0.0005 -359 0.01064488274798664 0.01836069851075955 0.0005 -360 0.01413228062890869 0.01869840562005761 0.0005 -361 0.00538878838173712 0.02179886163059895 0.0005 -362 0.009009524594861469 0.02488363376499974 0.0005 -363 0.01231626109746884 0.02929897563342893 0.0005 -364 0.007673440628370724 0.01079971796544068 0.0005 -365 0.0126576099041479 0.009983293187604254 0.0005 -366 0.007496446017083054 0.02901160532224953 0.0005 -367 0.0143518053061258 0.03001637232190368 0.0005 -368 0.005928288004999152 0.00993343832793776 0.0005 -369 0.01219976624282895 0.01778312449920468 0.0005 -370 0.007486994255728132 0.02236193559116424 0.0005 -371 0.01028528587685014 0.01969075227863971 0.0005 -372 0.008843546198684781 0.0271004590451919 0.0005 -373 0.01082694358836647 0.01214136923319773 0.0005 -374 0.01065531122403177 0.02380076256264931 0.0005 -375 0.007583207023124131 0.03208157906342547 0.0005 -376 0.009762411580881602 0.01003753084866764 0.0005 -377 0.01008949087155294 0.03067186536995294 0.0005 -378 0.01304936258751566 0.006641566401220849 0.0005 -$EndNodes -$Elements -656 -1 15 2 20 1 1 -2 15 2 19 4 4 -3 1 2 17 1 1 25 -4 1 2 17 1 25 26 -5 1 2 17 1 26 27 -6 1 2 17 1 27 28 -7 1 2 17 1 28 2 -8 1 2 18 3 3 38 -9 1 2 18 3 38 39 -10 1 2 18 3 39 40 -11 1 2 18 3 40 41 -12 1 2 18 3 41 4 -13 2 2 16 11 112 132 158 -14 2 2 16 11 111 134 163 -15 2 2 16 11 116 127 152 -16 2 2 16 11 112 172 145 -17 2 2 16 11 138 162 177 -18 2 2 16 11 158 167 176 -19 2 2 16 11 7 131 108 -20 2 2 16 11 111 171 144 -21 2 2 16 11 159 168 176 -22 2 2 16 11 134 166 163 -23 2 2 16 11 138 159 162 -24 2 2 16 11 114 124 123 -25 2 2 16 11 119 151 129 -26 2 2 16 11 45 147 132 -27 2 2 16 11 50 124 114 -28 2 2 16 11 159 180 168 -29 2 2 16 11 108 131 137 -30 2 2 16 11 137 163 175 -31 2 2 16 11 115 173 152 -32 2 2 16 11 114 174 153 -33 2 2 16 11 25 123 124 -34 2 2 16 11 111 163 146 -35 2 2 16 11 112 158 142 -36 2 2 16 11 159 176 162 -37 2 2 16 11 32 151 134 -38 2 2 16 11 30 111 144 -39 2 2 16 11 43 112 145 -40 2 2 16 11 48 153 126 -41 2 2 16 11 35 152 127 -42 2 2 16 11 137 164 163 -43 2 2 16 11 140 161 183 -44 2 2 16 11 139 160 182 -45 2 2 16 11 132 167 158 -46 2 2 16 11 110 181 161 -47 2 2 16 11 133 168 180 -48 2 2 16 11 134 151 166 -49 2 2 16 11 140 183 169 -50 2 2 16 11 139 182 170 -51 2 2 16 11 158 176 168 -52 2 2 16 11 171 179 182 -53 2 2 16 11 36 115 152 -54 2 2 16 11 49 114 153 -55 2 2 16 11 112 142 172 -56 2 2 16 11 119 166 151 -57 2 2 16 11 157 172 178 -58 2 2 16 11 141 177 162 -59 2 2 16 11 114 123 139 -60 2 2 16 11 30 144 120 -61 2 2 16 11 43 145 121 -62 2 2 16 11 45 132 112 -63 2 2 16 11 140 169 173 -64 2 2 16 11 139 170 174 -65 2 2 16 11 32 134 111 -66 2 2 16 11 109 160 123 -67 2 2 16 11 110 161 122 -68 2 2 16 11 113 162 143 -69 2 2 16 11 6 113 118 -70 2 2 16 11 115 125 140 -71 2 2 16 11 117 126 153 -72 2 2 16 11 51 118 154 -73 2 2 16 11 45 46 147 -74 2 2 16 11 110 145 181 -75 2 2 16 11 157 183 172 -76 2 2 16 11 122 140 125 -77 2 2 16 11 34 35 127 -78 2 2 16 11 47 48 126 -79 2 2 16 11 109 120 184 -80 2 2 16 11 33 34 129 -81 2 2 16 11 115 140 173 -82 2 2 16 11 114 139 174 -83 2 2 16 11 48 49 153 -84 2 2 16 11 35 36 152 -85 2 2 16 11 138 177 155 -86 2 2 16 11 110 121 145 -87 2 2 16 11 113 141 162 -88 2 2 16 11 105 150 169 -89 2 2 16 11 106 149 170 -90 2 2 16 11 116 152 150 -91 2 2 16 11 117 153 149 -92 2 2 16 11 160 171 182 -93 2 2 16 11 46 47 154 -94 2 2 16 11 32 33 151 -95 2 2 16 11 145 172 181 -96 2 2 16 11 146 179 171 -97 2 2 16 11 146 163 164 -98 2 2 16 11 142 158 168 -99 2 2 16 11 156 182 179 -100 2 2 16 11 122 161 140 -101 2 2 16 11 123 160 139 -102 2 2 16 11 9 180 107 -103 2 2 16 11 108 165 141 -104 2 2 16 11 118 143 167 -105 2 2 16 11 172 183 181 -106 2 2 16 11 109 184 160 -107 2 2 16 11 155 177 165 -108 2 2 16 11 119 148 166 -109 2 2 16 11 27 109 123 -110 2 2 16 11 40 110 122 -111 2 2 16 11 7 53 131 -112 2 2 16 11 5 51 128 -113 2 2 16 11 28 120 109 -114 2 2 16 11 41 121 110 -115 2 2 16 11 53 106 136 -116 2 2 16 11 52 141 113 -117 2 2 16 11 52 108 141 -118 2 2 16 11 30 31 111 -119 2 2 16 11 31 32 111 -120 2 2 16 11 43 44 112 -121 2 2 16 11 44 45 112 -122 2 2 16 11 37 125 115 -123 2 2 16 11 33 129 151 -124 2 2 16 11 55 105 135 -125 2 2 16 11 53 136 131 -126 2 2 16 11 105 169 157 -127 2 2 16 11 106 170 156 -128 2 2 16 11 111 146 171 -129 2 2 16 11 55 135 133 -130 2 2 16 11 27 28 109 -131 2 2 16 11 40 41 110 -132 2 2 16 11 38 122 125 -133 2 2 16 11 36 37 115 -134 2 2 16 11 49 50 114 -135 2 2 16 11 155 165 175 -136 2 2 16 11 26 27 123 -137 2 2 16 11 25 26 123 -138 2 2 16 11 39 40 122 -139 2 2 16 11 38 39 122 -140 2 2 16 11 120 144 184 -141 2 2 16 11 46 154 147 -142 2 2 16 11 2 120 28 -143 2 2 16 11 2 29 120 -144 2 2 16 11 29 30 120 -145 2 2 16 11 4 121 41 -146 2 2 16 11 4 42 121 -147 2 2 16 11 42 43 121 -148 2 2 16 11 160 184 171 -149 2 2 16 11 108 137 165 -150 2 2 16 11 47 126 128 -151 2 2 16 11 3 125 37 -152 2 2 16 11 3 38 125 -153 2 2 16 11 34 127 129 -154 2 2 16 11 6 52 113 -155 2 2 16 11 141 165 177 -156 2 2 16 11 1 124 50 -157 2 2 16 11 1 25 124 -158 2 2 16 11 156 170 182 -159 2 2 16 11 157 169 183 -160 2 2 16 11 107 138 130 -161 2 2 16 11 58 107 130 -162 2 2 16 11 9 107 58 -163 2 2 16 11 12 58 130 -164 2 2 16 11 150 152 173 -165 2 2 16 11 149 153 174 -166 2 2 16 11 107 180 159 -167 2 2 16 11 118 147 154 -168 2 2 16 11 7 108 52 -169 2 2 16 11 144 171 184 -170 2 2 16 11 150 173 169 -171 2 2 16 11 149 174 170 -172 2 2 16 11 133 135 168 -173 2 2 16 11 118 167 147 -174 2 2 16 11 56 127 116 -175 2 2 16 11 155 175 166 -176 2 2 16 11 5 128 126 -177 2 2 16 11 10 150 105 -178 2 2 16 11 8 149 106 -179 2 2 16 11 107 159 138 -180 2 2 16 11 130 138 155 -181 2 2 16 11 142 168 178 -182 2 2 16 11 131 164 137 -183 2 2 16 11 135 178 168 -184 2 2 16 11 10 105 55 -185 2 2 16 11 8 106 53 -186 2 2 16 11 11 127 56 -187 2 2 16 11 143 162 176 -188 2 2 16 11 9 55 133 -189 2 2 16 11 10 116 150 -190 2 2 16 11 8 117 149 -191 2 2 16 11 12 130 148 -192 2 2 16 11 136 179 164 -193 2 2 16 11 131 136 164 -194 2 2 16 11 105 157 135 -195 2 2 16 11 106 156 136 -196 2 2 16 11 6 118 51 -197 2 2 16 11 10 56 116 -198 2 2 16 11 8 54 117 -199 2 2 16 11 161 181 183 -200 2 2 16 11 135 157 178 -201 2 2 16 11 51 154 128 -202 2 2 16 11 11 129 127 -203 2 2 16 11 130 155 148 -204 2 2 16 11 136 156 179 -205 2 2 16 11 12 119 57 -206 2 2 16 11 137 175 165 -207 2 2 16 11 148 155 166 -208 2 2 16 11 146 164 179 -209 2 2 16 11 47 128 154 -210 2 2 16 11 143 176 167 -211 2 2 16 11 5 126 54 -212 2 2 16 11 12 148 119 -213 2 2 16 11 11 57 129 -214 2 2 16 11 54 126 117 -215 2 2 16 11 142 178 172 -216 2 2 16 11 57 119 129 -217 2 2 16 11 9 133 180 -218 2 2 16 11 132 147 167 -219 2 2 16 11 163 166 175 -220 2 2 16 11 113 143 118 -221 3 2 84 37 1 25 185 93 -222 3 2 84 37 93 185 59 13 -223 3 2 84 37 25 26 186 185 -224 3 2 84 37 185 186 60 59 -225 3 2 84 37 26 27 187 186 -226 3 2 84 37 186 187 61 60 -227 3 2 84 37 27 28 188 187 -228 3 2 84 37 187 188 62 61 -229 3 2 84 37 28 2 94 188 -230 3 2 84 37 188 94 14 62 -231 3 2 85 45 3 38 198 95 -232 3 2 85 45 95 198 72 15 -233 3 2 85 45 38 39 199 198 -234 3 2 85 45 198 199 73 72 -235 3 2 85 45 39 40 200 199 -236 3 2 85 45 199 200 74 73 -237 3 2 85 45 40 41 201 200 -238 3 2 85 45 200 201 75 74 -239 3 2 85 45 41 4 96 201 -240 3 2 85 45 201 96 16 75 -241 6 2 83 1 112 132 158 306 326 352 -242 6 2 83 1 306 326 352 226 246 272 -243 6 2 83 1 111 134 163 305 328 357 -244 6 2 83 1 305 328 357 225 248 277 -245 6 2 83 1 116 127 152 310 321 346 -246 6 2 83 1 310 321 346 230 241 266 -247 6 2 83 1 112 172 145 306 366 339 -248 6 2 83 1 306 366 339 226 286 259 -249 6 2 83 1 138 162 177 332 356 371 -250 6 2 83 1 332 356 371 252 276 291 -251 6 2 83 1 158 167 176 352 361 370 -252 6 2 83 1 352 361 370 272 281 290 -253 6 2 83 1 7 131 108 99 325 302 -254 6 2 83 1 99 325 302 19 245 222 -255 6 2 83 1 111 171 144 305 365 338 -256 6 2 83 1 305 365 338 225 285 258 -257 6 2 83 1 159 168 176 353 362 370 -258 6 2 83 1 353 362 370 273 282 290 -259 6 2 83 1 134 166 163 328 360 357 -260 6 2 83 1 328 360 357 248 280 277 -261 6 2 83 1 138 159 162 332 353 356 -262 6 2 83 1 332 353 356 252 273 276 -263 6 2 83 1 114 124 123 308 318 317 -264 6 2 83 1 308 318 317 228 238 237 -265 6 2 83 1 119 151 129 313 345 323 -266 6 2 83 1 313 345 323 233 265 243 -267 6 2 83 1 45 147 132 205 341 326 -268 6 2 83 1 205 341 326 79 261 246 -269 6 2 83 1 50 124 114 210 318 308 -270 6 2 83 1 210 318 308 84 238 228 -271 6 2 83 1 159 180 168 353 374 362 -272 6 2 83 1 353 374 362 273 294 282 -273 6 2 83 1 108 131 137 302 325 331 -274 6 2 83 1 302 325 331 222 245 251 -275 6 2 83 1 137 163 175 331 357 369 -276 6 2 83 1 331 357 369 251 277 289 -277 6 2 83 1 115 173 152 309 367 346 -278 6 2 83 1 309 367 346 229 287 266 -279 6 2 83 1 114 174 153 308 368 347 -280 6 2 83 1 308 368 347 228 288 267 -281 6 2 83 1 25 123 124 185 317 318 -282 6 2 83 1 185 317 318 59 237 238 -283 6 2 83 1 111 163 146 305 357 340 -284 6 2 83 1 305 357 340 225 277 260 -285 6 2 83 1 112 158 142 306 352 336 -286 6 2 83 1 306 352 336 226 272 256 -287 6 2 83 1 159 176 162 353 370 356 -288 6 2 83 1 353 370 356 273 290 276 -289 6 2 83 1 32 151 134 192 345 328 -290 6 2 83 1 192 345 328 66 265 248 -291 6 2 83 1 30 111 144 190 305 338 -292 6 2 83 1 190 305 338 64 225 258 -293 6 2 83 1 43 112 145 203 306 339 -294 6 2 83 1 203 306 339 77 226 259 -295 6 2 83 1 48 153 126 208 347 320 -296 6 2 83 1 208 347 320 82 267 240 -297 6 2 83 1 35 152 127 195 346 321 -298 6 2 83 1 195 346 321 69 266 241 -299 6 2 83 1 137 164 163 331 358 357 -300 6 2 83 1 331 358 357 251 278 277 -301 6 2 83 1 140 161 183 334 355 377 -302 6 2 83 1 334 355 377 254 275 297 -303 6 2 83 1 139 160 182 333 354 376 -304 6 2 83 1 333 354 376 253 274 296 -305 6 2 83 1 132 167 158 326 361 352 -306 6 2 83 1 326 361 352 246 281 272 -307 6 2 83 1 110 181 161 304 375 355 -308 6 2 83 1 304 375 355 224 295 275 -309 6 2 83 1 133 168 180 327 362 374 -310 6 2 83 1 327 362 374 247 282 294 -311 6 2 83 1 134 151 166 328 345 360 -312 6 2 83 1 328 345 360 248 265 280 -313 6 2 83 1 140 183 169 334 377 363 -314 6 2 83 1 334 377 363 254 297 283 -315 6 2 83 1 139 182 170 333 376 364 -316 6 2 83 1 333 376 364 253 296 284 -317 6 2 83 1 158 176 168 352 370 362 -318 6 2 83 1 352 370 362 272 290 282 -319 6 2 83 1 171 179 182 365 373 376 -320 6 2 83 1 365 373 376 285 293 296 -321 6 2 83 1 36 115 152 196 309 346 -322 6 2 83 1 196 309 346 70 229 266 -323 6 2 83 1 49 114 153 209 308 347 -324 6 2 83 1 209 308 347 83 228 267 -325 6 2 83 1 112 142 172 306 336 366 -326 6 2 83 1 306 336 366 226 256 286 -327 6 2 83 1 119 166 151 313 360 345 -328 6 2 83 1 313 360 345 233 280 265 -329 6 2 83 1 157 172 178 351 366 372 -330 6 2 83 1 351 366 372 271 286 292 -331 6 2 83 1 141 177 162 335 371 356 -332 6 2 83 1 335 371 356 255 291 276 -333 6 2 83 1 114 123 139 308 317 333 -334 6 2 83 1 308 317 333 228 237 253 -335 6 2 83 1 30 144 120 190 338 314 -336 6 2 83 1 190 338 314 64 258 234 -337 6 2 83 1 43 145 121 203 339 315 -338 6 2 83 1 203 339 315 77 259 235 -339 6 2 83 1 45 132 112 205 326 306 -340 6 2 83 1 205 326 306 79 246 226 -341 6 2 83 1 140 169 173 334 363 367 -342 6 2 83 1 334 363 367 254 283 287 -343 6 2 83 1 139 170 174 333 364 368 -344 6 2 83 1 333 364 368 253 284 288 -345 6 2 83 1 32 134 111 192 328 305 -346 6 2 83 1 192 328 305 66 248 225 -347 6 2 83 1 109 160 123 303 354 317 -348 6 2 83 1 303 354 317 223 274 237 -349 6 2 83 1 110 161 122 304 355 316 -350 6 2 83 1 304 355 316 224 275 236 -351 6 2 83 1 113 162 143 307 356 337 -352 6 2 83 1 307 356 337 227 276 257 -353 6 2 83 1 6 113 118 100 307 312 -354 6 2 83 1 100 307 312 20 227 232 -355 6 2 83 1 115 125 140 309 319 334 -356 6 2 83 1 309 319 334 229 239 254 -357 6 2 83 1 117 126 153 311 320 347 -358 6 2 83 1 311 320 347 231 240 267 -359 6 2 83 1 51 118 154 214 312 348 -360 6 2 83 1 214 312 348 88 232 268 -361 6 2 83 1 45 46 147 205 206 341 -362 6 2 83 1 205 206 341 79 80 261 -363 6 2 83 1 110 145 181 304 339 375 -364 6 2 83 1 304 339 375 224 259 295 -365 6 2 83 1 157 183 172 351 377 366 -366 6 2 83 1 351 377 366 271 297 286 -367 6 2 83 1 122 140 125 316 334 319 -368 6 2 83 1 316 334 319 236 254 239 -369 6 2 83 1 34 35 127 194 195 321 -370 6 2 83 1 194 195 321 68 69 241 -371 6 2 83 1 47 48 126 207 208 320 -372 6 2 83 1 207 208 320 81 82 240 -373 6 2 83 1 109 120 184 303 314 378 -374 6 2 83 1 303 314 378 223 234 298 -375 6 2 83 1 33 34 129 193 194 323 -376 6 2 83 1 193 194 323 67 68 243 -377 6 2 83 1 115 140 173 309 334 367 -378 6 2 83 1 309 334 367 229 254 287 -379 6 2 83 1 114 139 174 308 333 368 -380 6 2 83 1 308 333 368 228 253 288 -381 6 2 83 1 48 49 153 208 209 347 -382 6 2 83 1 208 209 347 82 83 267 -383 6 2 83 1 35 36 152 195 196 346 -384 6 2 83 1 195 196 346 69 70 266 -385 6 2 83 1 138 177 155 332 371 349 -386 6 2 83 1 332 371 349 252 291 269 -387 6 2 83 1 110 121 145 304 315 339 -388 6 2 83 1 304 315 339 224 235 259 -389 6 2 83 1 113 141 162 307 335 356 -390 6 2 83 1 307 335 356 227 255 276 -391 6 2 83 1 105 150 169 299 344 363 -392 6 2 83 1 299 344 363 219 264 283 -393 6 2 83 1 106 149 170 300 343 364 -394 6 2 83 1 300 343 364 220 263 284 -395 6 2 83 1 116 152 150 310 346 344 -396 6 2 83 1 310 346 344 230 266 264 -397 6 2 83 1 117 153 149 311 347 343 -398 6 2 83 1 311 347 343 231 267 263 -399 6 2 83 1 160 171 182 354 365 376 -400 6 2 83 1 354 365 376 274 285 296 -401 6 2 83 1 46 47 154 206 207 348 -402 6 2 83 1 206 207 348 80 81 268 -403 6 2 83 1 32 33 151 192 193 345 -404 6 2 83 1 192 193 345 66 67 265 -405 6 2 83 1 145 172 181 339 366 375 -406 6 2 83 1 339 366 375 259 286 295 -407 6 2 83 1 146 179 171 340 373 365 -408 6 2 83 1 340 373 365 260 293 285 -409 6 2 83 1 146 163 164 340 357 358 -410 6 2 83 1 340 357 358 260 277 278 -411 6 2 83 1 142 158 168 336 352 362 -412 6 2 83 1 336 352 362 256 272 282 -413 6 2 83 1 156 182 179 350 376 373 -414 6 2 83 1 350 376 373 270 296 293 -415 6 2 83 1 122 161 140 316 355 334 -416 6 2 83 1 316 355 334 236 275 254 -417 6 2 83 1 123 160 139 317 354 333 -418 6 2 83 1 317 354 333 237 274 253 -419 6 2 83 1 9 180 107 101 374 301 -420 6 2 83 1 101 374 301 21 294 221 -421 6 2 83 1 108 165 141 302 359 335 -422 6 2 83 1 302 359 335 222 279 255 -423 6 2 83 1 118 143 167 312 337 361 -424 6 2 83 1 312 337 361 232 257 281 -425 6 2 83 1 172 183 181 366 377 375 -426 6 2 83 1 366 377 375 286 297 295 -427 6 2 83 1 109 184 160 303 378 354 -428 6 2 83 1 303 378 354 223 298 274 -429 6 2 83 1 155 177 165 349 371 359 -430 6 2 83 1 349 371 359 269 291 279 -431 6 2 83 1 119 148 166 313 342 360 -432 6 2 83 1 313 342 360 233 262 280 -433 6 2 83 1 27 109 123 187 303 317 -434 6 2 83 1 187 303 317 61 223 237 -435 6 2 83 1 40 110 122 200 304 316 -436 6 2 83 1 200 304 316 74 224 236 -437 6 2 83 1 7 53 131 99 212 325 -438 6 2 83 1 99 212 325 19 86 245 -439 6 2 83 1 5 51 128 97 214 322 -440 6 2 83 1 97 214 322 17 88 242 -441 6 2 83 1 28 120 109 188 314 303 -442 6 2 83 1 188 314 303 62 234 223 -443 6 2 83 1 41 121 110 201 315 304 -444 6 2 83 1 201 315 304 75 235 224 -445 6 2 83 1 53 106 136 212 300 330 -446 6 2 83 1 212 300 330 86 220 250 -447 6 2 83 1 52 141 113 213 335 307 -448 6 2 83 1 213 335 307 87 255 227 -449 6 2 83 1 52 108 141 213 302 335 -450 6 2 83 1 213 302 335 87 222 255 -451 6 2 83 1 30 31 111 190 191 305 -452 6 2 83 1 190 191 305 64 65 225 -453 6 2 83 1 31 32 111 191 192 305 -454 6 2 83 1 191 192 305 65 66 225 -455 6 2 83 1 43 44 112 203 204 306 -456 6 2 83 1 203 204 306 77 78 226 -457 6 2 83 1 44 45 112 204 205 306 -458 6 2 83 1 204 205 306 78 79 226 -459 6 2 83 1 37 125 115 197 319 309 -460 6 2 83 1 197 319 309 71 239 229 -461 6 2 83 1 33 129 151 193 323 345 -462 6 2 83 1 193 323 345 67 243 265 -463 6 2 83 1 55 105 135 218 299 329 -464 6 2 83 1 218 299 329 92 219 249 -465 6 2 83 1 53 136 131 212 330 325 -466 6 2 83 1 212 330 325 86 250 245 -467 6 2 83 1 105 169 157 299 363 351 -468 6 2 83 1 299 363 351 219 283 271 -469 6 2 83 1 106 170 156 300 364 350 -470 6 2 83 1 300 364 350 220 284 270 -471 6 2 83 1 111 146 171 305 340 365 -472 6 2 83 1 305 340 365 225 260 285 -473 6 2 83 1 55 135 133 218 329 327 -474 6 2 83 1 218 329 327 92 249 247 -475 6 2 83 1 27 28 109 187 188 303 -476 6 2 83 1 187 188 303 61 62 223 -477 6 2 83 1 40 41 110 200 201 304 -478 6 2 83 1 200 201 304 74 75 224 -479 6 2 83 1 38 122 125 198 316 319 -480 6 2 83 1 198 316 319 72 236 239 -481 6 2 83 1 36 37 115 196 197 309 -482 6 2 83 1 196 197 309 70 71 229 -483 6 2 83 1 49 50 114 209 210 308 -484 6 2 83 1 209 210 308 83 84 228 -485 6 2 83 1 155 165 175 349 359 369 -486 6 2 83 1 349 359 369 269 279 289 -487 6 2 83 1 26 27 123 186 187 317 -488 6 2 83 1 186 187 317 60 61 237 -489 6 2 83 1 25 26 123 185 186 317 -490 6 2 83 1 185 186 317 59 60 237 -491 6 2 83 1 39 40 122 199 200 316 -492 6 2 83 1 199 200 316 73 74 236 -493 6 2 83 1 38 39 122 198 199 316 -494 6 2 83 1 198 199 316 72 73 236 -495 6 2 83 1 120 144 184 314 338 378 -496 6 2 83 1 314 338 378 234 258 298 -497 6 2 83 1 46 154 147 206 348 341 -498 6 2 83 1 206 348 341 80 268 261 -499 6 2 83 1 2 120 28 94 314 188 -500 6 2 83 1 94 314 188 14 234 62 -501 6 2 83 1 2 29 120 94 189 314 -502 6 2 83 1 94 189 314 14 63 234 -503 6 2 83 1 29 30 120 189 190 314 -504 6 2 83 1 189 190 314 63 64 234 -505 6 2 83 1 4 121 41 96 315 201 -506 6 2 83 1 96 315 201 16 235 75 -507 6 2 83 1 4 42 121 96 202 315 -508 6 2 83 1 96 202 315 16 76 235 -509 6 2 83 1 42 43 121 202 203 315 -510 6 2 83 1 202 203 315 76 77 235 -511 6 2 83 1 160 184 171 354 378 365 -512 6 2 83 1 354 378 365 274 298 285 -513 6 2 83 1 108 137 165 302 331 359 -514 6 2 83 1 302 331 359 222 251 279 -515 6 2 83 1 47 126 128 207 320 322 -516 6 2 83 1 207 320 322 81 240 242 -517 6 2 83 1 3 125 37 95 319 197 -518 6 2 83 1 95 319 197 15 239 71 -519 6 2 83 1 3 38 125 95 198 319 -520 6 2 83 1 95 198 319 15 72 239 -521 6 2 83 1 34 127 129 194 321 323 -522 6 2 83 1 194 321 323 68 241 243 -523 6 2 83 1 6 52 113 100 213 307 -524 6 2 83 1 100 213 307 20 87 227 -525 6 2 83 1 141 165 177 335 359 371 -526 6 2 83 1 335 359 371 255 279 291 -527 6 2 83 1 1 124 50 93 318 210 -528 6 2 83 1 93 318 210 13 238 84 -529 6 2 83 1 1 25 124 93 185 318 -530 6 2 83 1 93 185 318 13 59 238 -531 6 2 83 1 156 170 182 350 364 376 -532 6 2 83 1 350 364 376 270 284 296 -533 6 2 83 1 157 169 183 351 363 377 -534 6 2 83 1 351 363 377 271 283 297 -535 6 2 83 1 107 138 130 301 332 324 -536 6 2 83 1 301 332 324 221 252 244 -537 6 2 83 1 58 107 130 215 301 324 -538 6 2 83 1 215 301 324 89 221 244 -539 6 2 83 1 9 107 58 101 301 215 -540 6 2 83 1 101 301 215 21 221 89 -541 6 2 83 1 12 58 130 102 215 324 -542 6 2 83 1 102 215 324 22 89 244 -543 6 2 83 1 150 152 173 344 346 367 -544 6 2 83 1 344 346 367 264 266 287 -545 6 2 83 1 149 153 174 343 347 368 -546 6 2 83 1 343 347 368 263 267 288 -547 6 2 83 1 107 180 159 301 374 353 -548 6 2 83 1 301 374 353 221 294 273 -549 6 2 83 1 118 147 154 312 341 348 -550 6 2 83 1 312 341 348 232 261 268 -551 6 2 83 1 7 108 52 99 302 213 -552 6 2 83 1 99 302 213 19 222 87 -553 6 2 83 1 144 171 184 338 365 378 -554 6 2 83 1 338 365 378 258 285 298 -555 6 2 83 1 150 173 169 344 367 363 -556 6 2 83 1 344 367 363 264 287 283 -557 6 2 83 1 149 174 170 343 368 364 -558 6 2 83 1 343 368 364 263 288 284 -559 6 2 83 1 133 135 168 327 329 362 -560 6 2 83 1 327 329 362 247 249 282 -561 6 2 83 1 118 167 147 312 361 341 -562 6 2 83 1 312 361 341 232 281 261 -563 6 2 83 1 56 127 116 217 321 310 -564 6 2 83 1 217 321 310 91 241 230 -565 6 2 83 1 155 175 166 349 369 360 -566 6 2 83 1 349 369 360 269 289 280 -567 6 2 83 1 5 128 126 97 322 320 -568 6 2 83 1 97 322 320 17 242 240 -569 6 2 83 1 10 150 105 104 344 299 -570 6 2 83 1 104 344 299 24 264 219 -571 6 2 83 1 8 149 106 98 343 300 -572 6 2 83 1 98 343 300 18 263 220 -573 6 2 83 1 107 159 138 301 353 332 -574 6 2 83 1 301 353 332 221 273 252 -575 6 2 83 1 130 138 155 324 332 349 -576 6 2 83 1 324 332 349 244 252 269 -577 6 2 83 1 142 168 178 336 362 372 -578 6 2 83 1 336 362 372 256 282 292 -579 6 2 83 1 131 164 137 325 358 331 -580 6 2 83 1 325 358 331 245 278 251 -581 6 2 83 1 135 178 168 329 372 362 -582 6 2 83 1 329 372 362 249 292 282 -583 6 2 83 1 10 105 55 104 299 218 -584 6 2 83 1 104 299 218 24 219 92 -585 6 2 83 1 8 106 53 98 300 212 -586 6 2 83 1 98 300 212 18 220 86 -587 6 2 83 1 11 127 56 103 321 217 -588 6 2 83 1 103 321 217 23 241 91 -589 6 2 83 1 143 162 176 337 356 370 -590 6 2 83 1 337 356 370 257 276 290 -591 6 2 83 1 9 55 133 101 218 327 -592 6 2 83 1 101 218 327 21 92 247 -593 6 2 83 1 10 116 150 104 310 344 -594 6 2 83 1 104 310 344 24 230 264 -595 6 2 83 1 8 117 149 98 311 343 -596 6 2 83 1 98 311 343 18 231 263 -597 6 2 83 1 12 130 148 102 324 342 -598 6 2 83 1 102 324 342 22 244 262 -599 6 2 83 1 136 179 164 330 373 358 -600 6 2 83 1 330 373 358 250 293 278 -601 6 2 83 1 131 136 164 325 330 358 -602 6 2 83 1 325 330 358 245 250 278 -603 6 2 83 1 105 157 135 299 351 329 -604 6 2 83 1 299 351 329 219 271 249 -605 6 2 83 1 106 156 136 300 350 330 -606 6 2 83 1 300 350 330 220 270 250 -607 6 2 83 1 6 118 51 100 312 214 -608 6 2 83 1 100 312 214 20 232 88 -609 6 2 83 1 10 56 116 104 217 310 -610 6 2 83 1 104 217 310 24 91 230 -611 6 2 83 1 8 54 117 98 211 311 -612 6 2 83 1 98 211 311 18 85 231 -613 6 2 83 1 161 181 183 355 375 377 -614 6 2 83 1 355 375 377 275 295 297 -615 6 2 83 1 135 157 178 329 351 372 -616 6 2 83 1 329 351 372 249 271 292 -617 6 2 83 1 51 154 128 214 348 322 -618 6 2 83 1 214 348 322 88 268 242 -619 6 2 83 1 11 129 127 103 323 321 -620 6 2 83 1 103 323 321 23 243 241 -621 6 2 83 1 130 155 148 324 349 342 -622 6 2 83 1 324 349 342 244 269 262 -623 6 2 83 1 136 156 179 330 350 373 -624 6 2 83 1 330 350 373 250 270 293 -625 6 2 83 1 12 119 57 102 313 216 -626 6 2 83 1 102 313 216 22 233 90 -627 6 2 83 1 137 175 165 331 369 359 -628 6 2 83 1 331 369 359 251 289 279 -629 6 2 83 1 148 155 166 342 349 360 -630 6 2 83 1 342 349 360 262 269 280 -631 6 2 83 1 146 164 179 340 358 373 -632 6 2 83 1 340 358 373 260 278 293 -633 6 2 83 1 47 128 154 207 322 348 -634 6 2 83 1 207 322 348 81 242 268 -635 6 2 83 1 143 176 167 337 370 361 -636 6 2 83 1 337 370 361 257 290 281 -637 6 2 83 1 5 126 54 97 320 211 -638 6 2 83 1 97 320 211 17 240 85 -639 6 2 83 1 12 148 119 102 342 313 -640 6 2 83 1 102 342 313 22 262 233 -641 6 2 83 1 11 57 129 103 216 323 -642 6 2 83 1 103 216 323 23 90 243 -643 6 2 83 1 54 126 117 211 320 311 -644 6 2 83 1 211 320 311 85 240 231 -645 6 2 83 1 142 178 172 336 372 366 -646 6 2 83 1 336 372 366 256 292 286 -647 6 2 83 1 57 119 129 216 313 323 -648 6 2 83 1 216 313 323 90 233 243 -649 6 2 83 1 9 133 180 101 327 374 -650 6 2 83 1 101 327 374 21 247 294 -651 6 2 83 1 132 147 167 326 341 361 -652 6 2 83 1 326 341 361 246 261 281 -653 6 2 83 1 163 166 175 357 360 369 -654 6 2 83 1 357 360 369 277 280 289 -655 6 2 83 1 113 143 118 307 337 312 -656 6 2 83 1 307 337 312 227 257 232 -$EndElements diff --git a/dG3D/benchmarks/fullTwoField_PRI6/twoHole.py b/dG3D/benchmarks/fullTwoField_PRI6/twoHole.py deleted file mode 100644 index 4a9b8b8da0b4a05e8d54adf4ba323a0c78919df4..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/fullTwoField_PRI6/twoHole.py +++ /dev/null @@ -1,83 +0,0 @@ -#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 -sy0 = 150.e6 -h = young/50. - - -# geometry -meshfile="twoHole.msh" # name of mesh file - -# solver -sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 -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-6 # relative tolerance for NR scheme (used only if soltype=1) -nstepArch=1 # Number of step between 2 archiving (used only if soltype=1) - - - -harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) -law1 = J2LinearDG3DMaterialLaw(lawnum1,rho,young,nu,harden) - - -# creation of ElasticField -beta1 = 1.e3 -fullDG = True; -averageStrainBased = False - -myfield1 = dG3DDomain(1000,83,0,lawnum1,fullDG,3) -myfield1.stabilityParameters(beta1) -myfield1.averageStrainBased(averageStrainBased) -myfield1.setMultipleFieldFormulation(True,1) -myfield1.setMultipleFieldEqRatio(1e3) - -# 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.stepBetweenArchiving(nstepArch) -mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_shift_type NONZERO -pc_factor_mat_solver_package petsc") - - -# 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.internalPointBuildView("svm",IPField.SVM, 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("epl",IPField.PLASTICSTRAIN, 1, 1) -mysolver.internalPointBuildView("Damage",IPField.DAMAGE, 1, 1) - -mysolver.archivingForceOnPhysicalGroup("Face", 84, 1) -mysolver.archivingNodeDisplacement(19,1,1) - -mysolver.solve() - -check = TestCheck() -check.equal(-2.841726e+03,mysolver.getArchivedForceOnPhysicalGroup("Face", 84, 1),1.e-4) diff --git a/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py b/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py index 2ff5c5a99e8f56003e5e813b9c6469b4b161cce4..4a61aa6a442690b55750c3e61cb5415d23c578fc 100644 --- a/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py +++ b/dG3D/benchmarks/multiscaleAdhesiveTest2D/model.py @@ -119,7 +119,7 @@ dim =2 beta1 = 50; fullDG = False; -averageStrainBased = True +averageStrainBased = False # non DG domain nfield1 = 11 @@ -137,7 +137,6 @@ interdomain1.stabilityParameters(beta1) interdomain1.averageStrainBased(averageStrainBased) interdomain1.setDistributedOtherRanks(True) interdomain1.distributeOnRootRank(False) -interdomain1.breakAllInterfaceIPsFromBeginning(True) # creation of Solver mysolver = nonLinearMechSolver(1000) @@ -153,6 +152,9 @@ mysolver.Solver(sol) mysolver.snlData(nstep,ftime,tol) mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_shift_type NONZERO -pc_factor_mat_solver_package petsc") +# break all interface for adhesive cohesive model +mysolver.initialBrokenInterfaceDomain(nfield1,nfield2) # between two field + # boundary condition mysolver.displacementBC("Face",11,2,0.0) mysolver.displacementBC("Face",12,2,0.0) diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/CMakeLists.txt b/dG3D/benchmarks/multiscaleCohesiveTest2D/CMakeLists.txt deleted file mode 100644 index cbbd67f8dcae9f9a89fbe648697446d192383882..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# test file - -set(PYFILE model.py) - -set(FILES2DELETE - E_*.msh - *.txt - *.csv - disp* - stress* -) - -add_cm3python_mpi_test(4 ${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/micro.geo b/dG3D/benchmarks/multiscaleCohesiveTest2D/micro.geo deleted file mode 100644 index 5e0b62d6d05215e12989e4cd6bfebc54d1a5517e..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/micro.geo +++ /dev/null @@ -1,45 +0,0 @@ -mm = 1.; -L = 1.*mm; -R = 0.15*L; -lsca1 = 0.2*L; -lsca2 = 0.4*lsca1; - -Point(1) = {0,0,0,lsca1}; -Point(2) = {-R,0,0,lsca2}; -Point(3) = {-0.5*L,0,0,lsca2}; -Point(4) = {-0.5*L,-0.5*L,0,lsca1}; -Point(5) = {0,-0.5*L,0,lsca2}; -Point(6) = {0,-R,0,lsca2}; - - -Line(1) = {2, 3}; -Line(2) = {3, 4}; -Line(3) = {4, 5}; -Line(4) = {5, 6}; -Circle(5) = {2, 1, 6}; -Line Loop(6) = {2, 3, 4, -5, 1}; -Plane Surface(7) = {6}; -Symmetry {1, 0, 0, 0} { - Duplicata { Surface{7}; } -} -Symmetry {0, 1, 0, 0} { - Duplicata { Surface{7, 8}; } -} - -//Recombine Surface{14, 20, 8, 7}; -Physical Line(1) = {3, 10}; -Physical Line(2) = {9, 21}; -Physical Line(3) = {22, 16}; -Physical Line(4) = {15, 2}; -Physical Surface(11) = {14, 20, 8, 7}; - - -/* -Translate {0.1, 0, 0} { - Line{17, 24, 18, 5, 12, 4}; -} - -Translate {0, 0.1, 0} { - Line{18, 24, 13, 12, 5, 1}; -} -*/ diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/micro.msh b/dG3D/benchmarks/multiscaleCohesiveTest2D/micro.msh deleted file mode 100644 index c6acd5b31b792077590d064be2f4fe7779b47c89..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/micro.msh +++ /dev/null @@ -1,787 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -512 -1 -0.15 0 0 -2 -0.5 0 0 -3 -0.5 -0.5 0 -4 0 -0.5 0 -5 0 -0.15 0 -6 0.5 0 0 -7 0.5 -0.5 0 -8 0.15 0 0 -9 -0.5 0.5 0 -10 0 0.5 0 -11 0 0.15 0 -12 0.5 0.5 0 -13 -0.2199999999998429 0 0 -14 -0.2899999999995946 0 0 -15 -0.3599999999995793 0 0 -16 -0.4299999999997463 0 0 -17 -0.1849999999999308 0 0 -18 -0.2549999999996413 0 0 -19 -0.3249999999994754 0 0 -20 -0.3949999999996151 0 0 -21 -0.4649999999998321 0 0 -22 -0.5 -0.08581116126524545 0 -23 -0.5 -0.1937129562906754 0 -24 -0.5 -0.3293922803425093 0 -25 -0.5 -0.04290558063262855 0 -26 -0.5 -0.1397620587779604 0 -27 -0.5 -0.261552618316445 0 -28 -0.5 -0.4146961401712547 0 -29 -0.329392280343592 -0.5 0 -30 -0.1937129562919624 -0.5 0 -31 -0.08581116126571686 -0.5 0 -32 -0.4146961401717154 -0.5 0 -33 -0.2615526183179323 -0.5 0 -34 -0.1397620587788396 -0.5 0 -35 -0.04290558063285843 -0.5 0 -36 0 -0.4300000000001734 0 -37 0 -0.3600000000003685 0 -38 0 -0.2900000000003252 0 -39 0 -0.2200000000001519 0 -40 0 -0.4650000000000867 0 -41 0 -0.3950000000003007 0 -42 0 -0.3250000000004448 0 -43 0 -0.2550000000002834 0 -44 0 -0.1850000000000817 0 -45 -0.1299038105677715 -0.07499999999981691 0 -46 -0.07500000000016267 -0.1299038105675719 0 -47 -0.1448888739433795 -0.03882285676530619 0 -48 -0.106066017178175 -0.1060660171777893 0 -49 -0.03882285676546777 -0.1448888739433362 0 -50 0.5 -0.08581116126524545 0 -51 0.5 -0.1937129562906754 0 -52 0.5 -0.3293922803425093 0 -53 0.5 -0.04290558063262855 0 -54 0.5 -0.1397620587779604 0 -55 0.5 -0.261552618316445 0 -56 0.5 -0.4146961401712547 0 -57 0.329392280343592 -0.5 0 -58 0.1937129562919624 -0.5 0 -59 0.08581116126571686 -0.5 0 -60 0.4146961401717154 -0.5 0 -61 0.2615526183179323 -0.5 0 -62 0.1397620587788396 -0.5 0 -63 0.04290558063285843 -0.5 0 -64 0.07499999999980624 -0.1299038105677777 0 -65 0.12990381056752 -0.07500000000025255 0 -66 0.03882285676529234 -0.1448888739433832 0 -67 0.1060660171777162 -0.1060660171782481 0 -68 0.1448888739433208 -0.03882285676552522 0 -69 0.2199999999998429 0 0 -70 0.2899999999995946 0 0 -71 0.3599999999995793 0 0 -72 0.4299999999997463 0 0 -73 0.1849999999999308 0 0 -74 0.2549999999996413 0 0 -75 0.3249999999994754 0 0 -76 0.3949999999996151 0 0 -77 0.4649999999998321 0 0 -78 -0.5 0.08581116126524545 0 -79 -0.5 0.1937129562906754 0 -80 -0.5 0.3293922803425093 0 -81 -0.5 0.04290558063262855 0 -82 -0.5 0.1397620587779604 0 -83 -0.5 0.261552618316445 0 -84 -0.5 0.4146961401712547 0 -85 -0.329392280343592 0.5 0 -86 -0.1937129562919624 0.5 0 -87 -0.08581116126571686 0.5 0 -88 -0.4146961401717154 0.5 0 -89 -0.2615526183179323 0.5 0 -90 -0.1397620587788396 0.5 0 -91 -0.04290558063285843 0.5 0 -92 0 0.4300000000001734 0 -93 0 0.3600000000003685 0 -94 0 0.2900000000003252 0 -95 0 0.2200000000001519 0 -96 0 0.4650000000000867 0 -97 0 0.3950000000003007 0 -98 0 0.3250000000004448 0 -99 0 0.2550000000002834 0 -100 0 0.1850000000000817 0 -101 -0.07499999999980624 0.1299038105677777 0 -102 -0.12990381056752 0.07500000000025255 0 -103 -0.03882285676529234 0.1448888739433832 0 -104 -0.1060660171777162 0.1060660171782481 0 -105 -0.1448888739433208 0.03882285676552522 0 -106 0.5 0.08581116126524545 0 -107 0.5 0.1937129562906754 0 -108 0.5 0.3293922803425093 0 -109 0.5 0.04290558063262855 0 -110 0.5 0.1397620587779604 0 -111 0.5 0.261552618316445 0 -112 0.5 0.4146961401712547 0 -113 0.329392280343592 0.5 0 -114 0.1937129562919624 0.5 0 -115 0.08581116126571686 0.5 0 -116 0.4146961401717154 0.5 0 -117 0.2615526183179323 0.5 0 -118 0.1397620587788396 0.5 0 -119 0.04290558063285843 0.5 0 -120 0.07499999999980624 0.1299038105677777 0 -121 0.12990381056752 0.07500000000025255 0 -122 0.03882285676529234 0.1448888739433832 0 -123 0.1060660171777162 0.1060660171782481 0 -124 0.1448888739433208 0.03882285676552522 0 -125 -0.1632048750113544 -0.1232644810194541 0 -126 -0.2185144679483137 -0.3801534959448527 0 -127 -0.05089028167349786 -0.3584631613501202 0 -128 -0.06084793484707645 -0.1951430174291601 0 -129 -0.3999414826379826 -0.2373669670280938 0 -130 -0.3599999999994629 -0.06999999999986822 0 -131 -0.3654446467373357 -0.3654437046554025 0 -132 -0.4395424499711516 -0.06153088004804232 0 -133 -0.07529335399327118 -0.4336732331852045 0 -134 -0.281150983089465 -0.07390248292404106 0 -135 -0.2004047094340141 -0.06731430289221857 0 -136 -0.2306851351003935 -0.1453676244057918 0 -137 -0.07468286925234641 -0.2723686030373706 0 -138 -0.1452917775342399 -0.193626272412306 0 -139 -0.2595592816824605 -0.2528029361930984 0 -140 -0.1622839878484807 -0.2944285423531688 0 -141 -0.3285804443445061 -0.150165777374023 0 -142 -0.1292296528346454 -0.3731811726451194 0 -143 -0.4267159830345902 -0.1297998703416353 0 -144 -0.3297503821602216 -0.2450849516105961 0 -145 -0.2940698630134833 -0.2014843567835607 0 -146 -0.3642609634912444 -0.1937663722010584 0 -147 -0.1345031551426168 -0.4668366165926022 0 -148 -0.1022615034139583 -0.4034272029151619 0 -149 -0.1614713045633039 -0.4365905863225597 0 -150 -0.1969450050558739 -0.134316052712623 0 -151 -0.1879884563173167 -0.1694969484090489 0 -152 -0.1542483262727972 -0.1584453767158801 0 -153 -0.1191024375057585 -0.126584145793513 0 -154 -0.1101458887672013 -0.1617650414899389 0 -155 -0.245122208391427 -0.1990852802994451 0 -156 -0.2024255296083502 -0.2232146043027022 0 -157 -0.4327223233686679 -0.3474179924989559 0 -158 -0.3826930646876592 -0.3014053358417482 0 -159 -0.4499707413189913 -0.2833796236853016 0 -160 -0.2739533741459528 -0.4400767479724264 0 -161 -0.2919795573428247 -0.3727986003001276 0 -162 -0.3474184635404639 -0.4327218523277012 0 -163 -0.08055225762949403 -0.4668366165926022 0 -164 -0.1465543427895629 -0.09913224050963552 0 -165 -0.1738720603914795 -0.3766673342949861 0 -166 -0.206113712120138 -0.4400767479724264 0 -167 -0.1903992278983972 -0.3372910191490107 0 -168 -0.2109216347654706 -0.2736157392731336 0 -169 -0.239036874815387 -0.3164782160689755 0 -170 -0.06278657546292213 -0.3154158821937454 0 -171 -0.1019562610434959 -0.322774887841245 0 -172 -0.09005996725407162 -0.3658221669976198 0 -173 -0.1184834285504136 -0.2833985726952697 0 -174 -0.145756820341563 -0.3338048574991441 0 -175 -0.4327223233686679 -0.4327218523277012 0 -176 -0.4499707413189913 -0.2155399616593846 0 -177 -0.4133287328362865 -0.1835834186848646 0 -178 -0.4633579915172951 -0.1617564133161554 0 -179 -0.250575491544654 -0.03695124146202053 0 -180 -0.2407778462617395 -0.07060839290812981 0 -181 -0.2102023547169285 -0.03365715144610928 0 -182 -0.0373414346261732 -0.2811843015188479 0 -183 -0.02544514083674893 -0.3242315806752227 0 -184 -0.2796327897224498 -0.1477667008899074 0 -185 -0.4633579915172951 -0.1078055158034404 0 -186 -0.4697712249855758 -0.07367102065664388 0 -187 -0.4697712249855758 -0.03076544002402116 0 -188 -0.03764667699663559 -0.4668366165926022 0 -189 -0.2559180590949293 -0.1096350536649164 0 -190 -0.2155449222672038 -0.1063409636490052 0 -191 -0.1537878826913603 -0.2440274073827374 0 -192 -0.434771224985449 -0.03076544002402116 0 -193 -0.06792396742361956 -0.162523413998366 0 -194 -0.03042396742353823 -0.17257150871458 0 -195 -0.03764667699663559 -0.4318366165926889 0 -196 -0.175202354717007 -0.03365715144610928 0 -197 -0.1651542600008928 -0.07115715144601774 0 -198 -0.3442902221719845 -0.1100828886869456 0 -199 -0.3048657137169856 -0.112034130149032 0 -200 -0.320575491544464 -0.07195124146195464 0 -201 -0.3933579915170266 -0.09989993517075177 0 -202 -0.3776482136895482 -0.1399828238578292 0 -203 -0.3997712249853073 -0.06576544002395526 0 -204 -0.3949999999996046 -0.03499999999993411 0 -205 -0.02544514083674893 -0.3942315806751467 0 -206 -0.06309181783338452 -0.3960681972676623 0 -207 -0.1030698561906582 -0.194384644920733 0 -208 -0.1099873233932932 -0.2329974377248383 0 -209 -0.06776540204971143 -0.2337558102332654 0 -210 -0.2855754915445298 -0.03695124146202053 0 -211 -0.03042396742353823 -0.207571508714656 0 -212 -0.0373414346261732 -0.2461843015187613 0 -213 -0.3599999999995211 -0.03499999999993411 0 -214 -0.3249999999995288 -0.03499999999993411 0 -215 -0.02544514083674893 -0.3592315806752443 0 -216 -0.433129216502871 -0.09566537519483881 0 -217 -0.1818047922226842 -0.09528939195583636 0 -218 -0.3125019642098981 -0.3091233204242504 0 -219 0.1224866355280155 -0.1629072024975547 0 -220 0.3808849436885997 -0.210277224031109 0 -221 0.206743501399355 -0.07464099728276744 0 -222 0.3593515291260043 -0.06361416849824304 0 -223 0.2373889375053712 -0.4000946023341276 0 -224 0.05600596672534444 -0.3582026903534058 0 -225 0.3654446467373352 -0.3654437046554016 0 -226 0.07667776057372377 -0.4233233779044261 0 -227 0.4334916324593139 -0.06393052432330396 0 -228 0.07179343033759225 -0.2810845082405963 0 -229 0.06810735186864317 -0.2009476328841135 0 -230 0.1441955258379768 -0.2303966446545607 0 -231 0.2844391541799908 -0.07552818560281363 0 -232 0.1883841865915948 -0.1499536144563917 0 -233 0.2533917520134046 -0.2547236322031965 0 -234 0.2785219510541916 -0.1476215722506409 0 -235 0.1425674588596785 -0.3441671146532657 0 -236 0.3629155847584906 -0.1147592360453619 0 -237 0.1472316548992905 -0.4335170189783639 0 -238 0.4354584321812809 -0.1336982203911391 0 -239 0.1899781981825249 -0.3721308584936966 0 -240 0.1979796054365416 -0.2994453734282311 0 -241 0.2453903447593879 -0.3274091172686621 0 -242 0.1554354110598052 -0.1564304084769732 0 -243 0.1662898562147858 -0.1901751295554762 0 -244 0.1333410806829962 -0.1966519235760577 0 -245 0.1261952230477678 -0.1189536012489036 0 -246 0.09874331776391088 -0.1464055065326662 0 -247 0.2208879693024997 -0.2023386233297941 0 -248 0.1987936389256907 -0.2425601384288786 0 -249 0.1591439985795574 -0.1124768072283221 0 -250 0.2833906089244816 -0.4500473011670638 0 -251 0.3014167921213532 -0.3827691534947646 0 -252 0.3474184635404636 -0.4327218523277008 0 -253 0.4327223233686676 -0.3474179924989554 0 -254 0.3731647952129674 -0.2878604643432553 0 -255 0.4404424718442999 -0.2698347521868091 0 -256 0.3171383478510021 -0.2325004281171527 0 -257 0.2659568515337981 -0.2011726022269187 0 -258 0.3297034473713957 -0.178949398140875 0 -259 0.3207187679063411 -0.1311904041480014 0 -260 0.3719002642235452 -0.1625182300382355 0 -261 0.4327223233686676 -0.4327218523277008 0 -262 0.1704723055956265 -0.466758509489182 0 -263 0.1923102962023309 -0.4168058106562458 0 -264 0.2155509468986668 -0.4500473011670638 0 -265 0.4404424718442999 -0.2019950901608922 0 -266 0.4081716879349403 -0.1719877222111241 0 -267 0.4677292160906404 -0.1637055883409073 0 -268 0.03405367593432158 -0.2104738164421327 0 -269 0.06995039110311771 -0.2410160705623549 0 -270 0.03589671516879613 -0.2505422541203741 0 -271 0.1433814923488277 -0.2872818796539132 0 -272 0.4677292160906404 -0.1097546908281923 0 -273 0.1165214080825037 -0.466758509489182 0 -274 0.2522195770899168 -0.03776409280140682 0 -275 0.2455913277896729 -0.07508459144279053 0 -276 0.213371750699599 -0.03732049864138372 0 -277 0.4344750323202974 -0.09881437235722154 0 -278 0.3991870084698858 -0.1242287282182505 0 -279 0.3982036086089022 -0.08934488018433293 0 -280 0.2334530688228932 -0.1487875933535163 0 -281 0.03833888028686189 -0.461661688952213 0 -282 0.08124446091972032 -0.461661688952213 0 -283 0.4667458162296569 -0.07487084279427469 0 -284 0.4667458162296569 -0.03196526216165198 0 -285 0.10615143885331 -0.2156721387693371 0 -286 0.1079944780877845 -0.2557405764475785 0 -287 0.2814805526170912 -0.1115748789267273 0 -288 0.2426327262267733 -0.1111312847667042 0 -289 0.1783717506996775 -0.03732049864138372 0 -290 0.1683236559834375 -0.07482049864151 0 -291 0.3236773694692406 -0.09514371082408776 0 -292 0.03833888028686189 -0.4266616889522997 0 -293 0.4317458162295301 -0.03196526216165198 0 -294 0.2872195770897927 -0.03776409280140682 0 -295 0.07155367593422471 -0.1654257217259456 0 -296 0.03405367593432158 -0.1754738164420568 0 -297 0.1975638439954749 -0.1122973058695796 0 -298 0.06389969853146835 -0.319643599297001 0 -299 0.1071804445986354 -0.312625811446931 0 -300 0.09928671279251149 -0.3511849025033358 0 -301 0.1096226097167012 -0.3837452462788459 0 -302 0.06634186364953411 -0.3907630341289159 0 -303 0.1448995568794845 -0.3888420668158148 0 -304 0.1119547077365072 -0.428420198441395 0 -305 0.02800298336267222 -0.3941013451767896 0 -306 0.3964215807926591 -0.06377234641077351 0 -307 0.3946757645628752 -0.03180708424912152 0 -308 0.3246757645627995 -0.03180708424912152 0 -309 0.3218953416529975 -0.06957117705052834 0 -310 0.03589671516879613 -0.2855422541204607 0 -311 0.02800298336267222 -0.3241013451768655 0 -312 0.02800298336267222 -0.3591013451768871 0 -313 0.3596757645627918 -0.03180708424912152 0 -314 0.09529699369832934 -0.1819274176908341 0 -315 0.3611335569422474 -0.08918670227180248 0 -316 0.3094181993753699 -0.310083668429299 0 -317 -0.1224866355280155 0.1629072024975547 0 -318 -0.3808849436885997 0.210277224031109 0 -319 -0.206743501399355 0.07464099728276744 0 -320 -0.3593515291260043 0.06361416849824304 0 -321 -0.2373889375053712 0.4000946023341276 0 -322 -0.05600596672534444 0.3582026903534058 0 -323 -0.3654446467373352 0.3654437046554016 0 -324 -0.07667776057372377 0.4233233779044261 0 -325 -0.4334916324593139 0.06393052432330396 0 -326 -0.07179343033759225 0.2810845082405963 0 -327 -0.06810735186864317 0.2009476328841135 0 -328 -0.1441955258379768 0.2303966446545607 0 -329 -0.2844391541799908 0.07552818560281363 0 -330 -0.1883841865915948 0.1499536144563917 0 -331 -0.2533917520134046 0.2547236322031965 0 -332 -0.2785219510541917 0.1476215722506409 0 -333 -0.1425674588596785 0.3441671146532657 0 -334 -0.3629155847584906 0.1147592360453619 0 -335 -0.1472316548992905 0.4335170189783639 0 -336 -0.4354584321812809 0.1336982203911391 0 -337 -0.1899781981825249 0.3721308584936966 0 -338 -0.1979796054365416 0.2994453734282311 0 -339 -0.2453903447593879 0.3274091172686621 0 -340 -0.1554354110598052 0.1564304084769732 0 -341 -0.1662898562147858 0.1901751295554762 0 -342 -0.1333410806829962 0.1966519235760577 0 -343 -0.1261952230477678 0.1189536012489036 0 -344 -0.09874331776391088 0.1464055065326662 0 -345 -0.2208879693024997 0.2023386233297941 0 -346 -0.1987936389256907 0.2425601384288786 0 -347 -0.1591439985795574 0.1124768072283221 0 -348 -0.2833906089244816 0.4500473011670638 0 -349 -0.3014167921213532 0.3827691534947646 0 -350 -0.3474184635404636 0.4327218523277008 0 -351 -0.4327223233686676 0.3474179924989554 0 -352 -0.3731647952129674 0.2878604643432553 0 -353 -0.4404424718442999 0.2698347521868091 0 -354 -0.3171383478510021 0.2325004281171527 0 -355 -0.2659568515337981 0.2011726022269187 0 -356 -0.3297034473713957 0.178949398140875 0 -357 -0.3207187679063411 0.1311904041480014 0 -358 -0.3719002642235452 0.1625182300382355 0 -359 -0.4327223233686676 0.4327218523277008 0 -360 -0.1704723055956265 0.466758509489182 0 -361 -0.1923102962023309 0.4168058106562458 0 -362 -0.2155509468986668 0.4500473011670638 0 -363 -0.4404424718442999 0.2019950901608922 0 -364 -0.4081716879349403 0.1719877222111241 0 -365 -0.4677292160906404 0.1637055883409073 0 -366 -0.03405367593432158 0.2104738164421327 0 -367 -0.06995039110311771 0.2410160705623549 0 -368 -0.03589671516879613 0.2505422541203741 0 -369 -0.1433814923488277 0.2872818796539132 0 -370 -0.4677292160906404 0.1097546908281923 0 -371 -0.1165214080825037 0.466758509489182 0 -372 -0.2522195770899168 0.03776409280140682 0 -373 -0.2455913277896729 0.07508459144279053 0 -374 -0.213371750699599 0.03732049864138372 0 -375 -0.4344750323202974 0.09881437235722154 0 -376 -0.3991870084698858 0.1242287282182505 0 -377 -0.3982036086089022 0.08934488018433293 0 -378 -0.2334530688228932 0.1487875933535163 0 -379 -0.03833888028686189 0.461661688952213 0 -380 -0.08124446091972032 0.461661688952213 0 -381 -0.4667458162296569 0.07487084279427469 0 -382 -0.4667458162296569 0.03196526216165198 0 -383 -0.10615143885331 0.2156721387693371 0 -384 -0.1079944780877845 0.2557405764475785 0 -385 -0.2814805526170913 0.1115748789267273 0 -386 -0.2426327262267734 0.1111312847667042 0 -387 -0.1783717506996775 0.03732049864138372 0 -388 -0.1683236559834375 0.07482049864151 0 -389 -0.3236773694692406 0.09514371082408776 0 -390 -0.03833888028686189 0.4266616889522997 0 -391 -0.4317458162295301 0.03196526216165198 0 -392 -0.2872195770897927 0.03776409280140682 0 -393 -0.07155367593422471 0.1654257217259456 0 -394 -0.03405367593432158 0.1754738164420568 0 -395 -0.1975638439954749 0.1122973058695796 0 -396 -0.06389969853146835 0.319643599297001 0 -397 -0.1071804445986354 0.312625811446931 0 -398 -0.09928671279251149 0.3511849025033358 0 -399 -0.1096226097167012 0.3837452462788459 0 -400 -0.06634186364953411 0.3907630341289159 0 -401 -0.1448995568794845 0.3888420668158148 0 -402 -0.1119547077365072 0.428420198441395 0 -403 -0.02800298336267222 0.3941013451767896 0 -404 -0.3964215807926591 0.06377234641077351 0 -405 -0.3946757645628753 0.03180708424912152 0 -406 -0.3246757645627995 0.03180708424912152 0 -407 -0.3218953416529975 0.06957117705052834 0 -408 -0.03589671516879613 0.2855422541204607 0 -409 -0.02800298336267222 0.3241013451768655 0 -410 -0.02800298336267222 0.3591013451768871 0 -411 -0.3596757645627918 0.03180708424912152 0 -412 -0.09529699369832934 0.1819274176908341 0 -413 -0.3611335569422475 0.08918670227180248 0 -414 -0.3094181993753699 0.310083668429299 0 -415 0.1224866355280155 0.1629072024975547 0 -416 0.3808849436885997 0.210277224031109 0 -417 0.206743501399355 0.07464099728276744 0 -418 0.3593515291260043 0.06361416849824304 0 -419 0.2373889375053712 0.4000946023341276 0 -420 0.05600596672534444 0.3582026903534058 0 -421 0.3654446467373352 0.3654437046554016 0 -422 0.07667776057372377 0.4233233779044261 0 -423 0.4334916324593139 0.06393052432330396 0 -424 0.07179343033759224 0.2810845082405963 0 -425 0.06810735186864313 0.2009476328841135 0 -426 0.1441955258379768 0.2303966446545607 0 -427 0.2844391541799908 0.07552818560281363 0 -428 0.1883841865915948 0.1499536144563917 0 -429 0.2533917520134046 0.2547236322031965 0 -430 0.2785219510541916 0.1476215722506409 0 -431 0.1425674588596785 0.3441671146532657 0 -432 0.3629155847584906 0.1147592360453619 0 -433 0.1472316548992905 0.4335170189783639 0 -434 0.4354584321812809 0.1336982203911391 0 -435 0.1899781981825249 0.3721308584936966 0 -436 0.1979796054365416 0.2994453734282311 0 -437 0.2453903447593879 0.3274091172686621 0 -438 0.1554354110598052 0.1564304084769732 0 -439 0.1662898562147858 0.1901751295554762 0 -440 0.1333410806829962 0.1966519235760577 0 -441 0.1261952230477678 0.1189536012489036 0 -442 0.09874331776391088 0.1464055065326662 0 -443 0.2208879693024997 0.2023386233297941 0 -444 0.1987936389256907 0.2425601384288786 0 -445 0.1591439985795574 0.1124768072283221 0 -446 0.2833906089244816 0.4500473011670638 0 -447 0.3014167921213532 0.3827691534947646 0 -448 0.3474184635404636 0.4327218523277008 0 -449 0.4327223233686676 0.3474179924989554 0 -450 0.3731647952129674 0.2878604643432553 0 -451 0.4404424718442999 0.2698347521868091 0 -452 0.3171383478510021 0.2325004281171527 0 -453 0.2659568515337981 0.2011726022269187 0 -454 0.3297034473713957 0.178949398140875 0 -455 0.3207187679063411 0.1311904041480014 0 -456 0.3719002642235452 0.1625182300382355 0 -457 0.4327223233686676 0.4327218523277008 0 -458 0.1704723055956265 0.466758509489182 0 -459 0.1923102962023309 0.4168058106562458 0 -460 0.2155509468986668 0.4500473011670638 0 -461 0.4404424718442999 0.2019950901608922 0 -462 0.4081716879349403 0.1719877222111241 0 -463 0.4677292160906404 0.1637055883409073 0 -464 0.03405367593432156 0.2104738164421327 0 -465 0.06995039110311768 0.2410160705623549 0 -466 0.03589671516879612 0.2505422541203741 0 -467 0.1433814923488277 0.2872818796539132 0 -468 0.4677292160906404 0.1097546908281923 0 -469 0.1165214080825037 0.466758509489182 0 -470 0.2522195770899168 0.03776409280140682 0 -471 0.2455913277896729 0.07508459144279053 0 -472 0.213371750699599 0.03732049864138372 0 -473 0.4344750323202974 0.09881437235722154 0 -474 0.3991870084698858 0.1242287282182505 0 -475 0.3982036086089022 0.08934488018433294 0 -476 0.2334530688228932 0.1487875933535163 0 -477 0.03833888028686189 0.461661688952213 0 -478 0.08124446091972032 0.461661688952213 0 -479 0.4667458162296569 0.07487084279427469 0 -480 0.4667458162296569 0.03196526216165198 0 -481 0.10615143885331 0.2156721387693371 0 -482 0.1079944780877845 0.2557405764475785 0 -483 0.2814805526170912 0.1115748789267273 0 -484 0.2426327262267733 0.1111312847667042 0 -485 0.1783717506996775 0.03732049864138372 0 -486 0.1683236559834375 0.07482049864151 0 -487 0.3236773694692406 0.09514371082408778 0 -488 0.03833888028686189 0.4266616889522997 0 -489 0.4317458162295301 0.03196526216165198 0 -490 0.2872195770897927 0.03776409280140682 0 -491 0.07155367593422468 0.1654257217259456 0 -492 0.03405367593432156 0.1754738164420567 0 -493 0.1975638439954749 0.1122973058695796 0 -494 0.06389969853146835 0.319643599297001 0 -495 0.1071804445986354 0.312625811446931 0 -496 0.09928671279251149 0.3511849025033358 0 -497 0.1096226097167012 0.3837452462788459 0 -498 0.06634186364953411 0.3907630341289159 0 -499 0.1448995568794845 0.3888420668158148 0 -500 0.1119547077365072 0.428420198441395 0 -501 0.02800298336267222 0.3941013451767896 0 -502 0.3964215807926591 0.06377234641077351 0 -503 0.3946757645628752 0.03180708424912152 0 -504 0.3246757645627995 0.03180708424912152 0 -505 0.3218953416529975 0.06957117705052834 0 -506 0.03589671516879612 0.2855422541204607 0 -507 0.02800298336267222 0.3241013451768655 0 -508 0.02800298336267222 0.3591013451768871 0 -509 0.3596757645627918 0.03180708424912152 0 -510 0.09529699369832932 0.1819274176908341 0 -511 0.3611335569422474 0.08918670227180248 0 -512 0.3094181993753699 0.310083668429299 0 -$EndNodes -$Elements -266 -1 8 2 4 2 2 22 25 -2 8 2 4 2 22 23 26 -3 8 2 4 2 23 24 27 -4 8 2 4 2 24 3 28 -5 8 2 1 3 3 29 32 -6 8 2 1 3 29 30 33 -7 8 2 1 3 30 31 34 -8 8 2 1 3 31 4 35 -9 8 2 2 9 6 50 53 -10 8 2 2 9 50 51 54 -11 8 2 2 9 51 52 55 -12 8 2 2 9 52 7 56 -13 8 2 1 10 7 57 60 -14 8 2 1 10 57 58 61 -15 8 2 1 10 58 59 62 -16 8 2 1 10 59 4 63 -17 8 2 4 15 2 78 81 -18 8 2 4 15 78 79 82 -19 8 2 4 15 79 80 83 -20 8 2 4 15 80 9 84 -21 8 2 3 16 9 85 88 -22 8 2 3 16 85 86 89 -23 8 2 3 16 86 87 90 -24 8 2 3 16 87 10 91 -25 8 2 2 21 6 106 109 -26 8 2 2 21 106 107 110 -27 8 2 2 21 107 108 111 -28 8 2 2 21 108 12 112 -29 8 2 3 22 12 113 116 -30 8 2 3 22 113 114 117 -31 8 2 3 22 114 115 118 -32 8 2 3 22 115 10 119 -33 9 2 11 7 129 139 141 144 145 146 -34 9 2 11 7 30 133 142 147 148 149 -35 9 2 11 7 125 136 138 150 151 152 -36 9 2 11 7 46 125 138 153 152 154 -37 9 2 11 7 136 139 138 155 156 151 -38 9 2 11 7 24 131 129 157 158 159 -39 9 2 11 7 29 126 131 160 161 162 -40 9 2 11 7 30 31 133 34 163 147 -41 9 2 11 7 45 125 46 164 153 48 -42 9 2 11 7 30 142 126 149 165 166 -43 9 2 11 7 126 140 139 167 168 169 -44 9 2 11 7 127 137 142 170 171 172 -45 9 2 11 7 137 140 142 173 174 171 -46 9 2 11 7 3 131 24 175 157 28 -47 9 2 11 7 3 29 131 32 162 175 -48 9 2 11 7 23 129 143 176 177 178 -49 9 2 11 7 23 24 129 27 159 176 -50 9 2 11 7 13 134 135 179 180 181 -51 9 2 11 7 29 30 126 33 166 160 -52 9 2 11 7 38 137 127 182 170 183 -53 9 2 11 7 136 141 139 184 145 155 -54 9 2 11 7 22 23 143 26 178 185 -55 9 2 11 7 126 142 140 165 174 167 -56 9 2 11 7 2 22 132 25 186 187 -57 9 2 11 7 4 133 31 188 163 35 -58 9 2 11 7 134 136 135 189 190 180 -59 9 2 11 7 138 139 140 156 168 191 -60 9 2 11 7 2 132 16 187 192 21 -61 9 2 11 7 5 46 128 49 193 194 -62 9 2 11 7 4 36 133 40 195 188 -63 9 2 11 7 1 135 45 196 197 47 -64 9 2 11 7 130 141 134 198 199 200 -65 9 2 11 7 130 143 141 201 202 198 -66 9 2 11 7 16 132 130 192 203 204 -67 9 2 11 7 36 127 133 205 206 195 -68 9 2 11 7 128 138 137 207 208 209 -69 9 2 11 7 137 138 140 208 191 173 -70 9 2 11 7 134 141 136 199 184 189 -71 9 2 11 7 46 138 128 154 207 193 -72 9 2 11 7 13 14 134 18 210 179 -73 9 2 11 7 5 128 39 194 211 44 -74 9 2 11 7 1 13 135 17 181 196 -75 9 2 11 7 38 39 137 43 212 182 -76 9 2 11 7 14 15 130 19 213 214 -77 9 2 11 7 15 16 130 20 204 213 -78 9 2 11 7 37 38 127 42 183 215 -79 9 2 11 7 36 37 127 41 215 205 -80 9 2 11 7 130 132 143 203 216 201 -81 9 2 11 7 125 135 136 217 190 150 -82 9 2 11 7 129 141 143 146 202 177 -83 9 2 11 7 39 128 137 211 209 212 -84 9 2 11 7 14 130 134 214 200 210 -85 9 2 11 7 22 143 132 185 216 186 -86 9 2 11 7 45 135 125 197 217 164 -87 9 2 11 7 127 142 133 172 148 206 -88 9 2 11 7 126 139 131 169 218 161 -89 9 2 11 7 129 131 139 158 218 144 -90 9 2 11 8 223 235 233 239 240 241 -91 9 2 11 8 219 232 230 242 243 244 -92 9 2 11 8 64 65 219 67 245 246 -93 9 2 11 8 230 232 233 243 247 248 -94 9 2 11 8 65 232 219 249 242 245 -95 9 2 11 8 57 223 225 250 251 252 -96 9 2 11 8 52 225 220 253 254 255 -97 9 2 11 8 220 233 234 256 257 258 -98 9 2 11 8 220 234 236 258 259 260 -99 9 2 11 8 7 225 52 261 253 56 -100 9 2 11 8 7 57 225 60 252 261 -101 9 2 11 8 58 237 223 262 263 264 -102 9 2 11 8 57 58 223 61 264 250 -103 9 2 11 8 51 220 238 265 266 267 -104 9 2 11 8 51 52 220 55 255 265 -105 9 2 11 8 39 229 228 268 269 270 -106 9 2 11 8 230 233 235 248 240 271 -107 9 2 11 8 50 51 238 54 267 272 -108 9 2 11 8 58 59 237 62 273 262 -109 9 2 11 8 69 231 221 274 275 276 -110 9 2 11 8 227 238 236 277 278 279 -111 9 2 11 8 232 234 233 280 257 247 -112 9 2 11 8 4 226 59 281 282 63 -113 9 2 11 8 6 50 227 53 283 284 -114 9 2 11 8 228 229 230 269 285 286 -115 9 2 11 8 221 231 234 275 287 288 -116 9 2 11 8 8 221 65 289 290 68 -117 9 2 11 8 231 236 234 291 259 287 -118 9 2 11 8 4 36 226 40 292 281 -119 9 2 11 8 6 227 72 284 293 77 -120 9 2 11 8 69 70 231 74 294 274 -121 9 2 11 8 5 64 229 66 295 296 -122 9 2 11 8 221 234 232 288 280 297 -123 9 2 11 8 220 236 238 260 278 266 -124 9 2 11 8 224 228 235 298 299 300 -125 9 2 11 8 224 235 226 300 301 302 -126 9 2 11 8 226 235 237 301 303 304 -127 9 2 11 8 36 224 226 305 302 292 -128 9 2 11 8 72 227 222 293 306 307 -129 9 2 11 8 70 222 231 308 309 294 -130 9 2 11 8 8 69 221 73 276 289 -131 9 2 11 8 228 230 235 286 271 299 -132 9 2 11 8 38 39 228 43 270 310 -133 9 2 11 8 65 221 232 290 297 249 -134 9 2 11 8 5 229 39 296 268 44 -135 9 2 11 8 37 38 224 42 311 312 -136 9 2 11 8 36 37 224 41 312 305 -137 9 2 11 8 70 71 222 75 313 308 -138 9 2 11 8 71 72 222 76 307 313 -139 9 2 11 8 219 230 229 244 285 314 -140 9 2 11 8 223 237 235 263 303 239 -141 9 2 11 8 38 228 224 310 298 311 -142 9 2 11 8 222 236 231 315 291 309 -143 9 2 11 8 50 238 227 272 277 283 -144 9 2 11 8 59 226 237 282 304 273 -145 9 2 11 8 64 219 229 246 314 295 -146 9 2 11 8 222 227 236 306 279 315 -147 9 2 11 8 220 225 233 254 316 256 -148 9 2 11 8 223 233 225 241 316 251 -149 9 2 11 14 321 333 331 337 338 339 -150 9 2 11 14 317 330 328 340 341 342 -151 9 2 11 14 101 102 317 104 343 344 -152 9 2 11 14 328 330 331 341 345 346 -153 9 2 11 14 102 330 317 347 340 343 -154 9 2 11 14 85 321 323 348 349 350 -155 9 2 11 14 80 323 318 351 352 353 -156 9 2 11 14 318 331 332 354 355 356 -157 9 2 11 14 318 332 334 356 357 358 -158 9 2 11 14 9 323 80 359 351 84 -159 9 2 11 14 9 85 323 88 350 359 -160 9 2 11 14 86 335 321 360 361 362 -161 9 2 11 14 85 86 321 89 362 348 -162 9 2 11 14 79 318 336 363 364 365 -163 9 2 11 14 79 80 318 83 353 363 -164 9 2 11 14 95 327 326 366 367 368 -165 9 2 11 14 328 331 333 346 338 369 -166 9 2 11 14 78 79 336 82 365 370 -167 9 2 11 14 86 87 335 90 371 360 -168 9 2 11 14 13 329 319 372 373 374 -169 9 2 11 14 325 336 334 375 376 377 -170 9 2 11 14 330 332 331 378 355 345 -171 9 2 11 14 10 324 87 379 380 91 -172 9 2 11 14 2 78 325 81 381 382 -173 9 2 11 14 326 327 328 367 383 384 -174 9 2 11 14 319 329 332 373 385 386 -175 9 2 11 14 1 319 102 387 388 105 -176 9 2 11 14 329 334 332 389 357 385 -177 9 2 11 14 10 92 324 96 390 379 -178 9 2 11 14 2 325 16 382 391 21 -179 9 2 11 14 13 14 329 18 392 372 -180 9 2 11 14 11 101 327 103 393 394 -181 9 2 11 14 319 332 330 386 378 395 -182 9 2 11 14 318 334 336 358 376 364 -183 9 2 11 14 322 326 333 396 397 398 -184 9 2 11 14 322 333 324 398 399 400 -185 9 2 11 14 324 333 335 399 401 402 -186 9 2 11 14 92 322 324 403 400 390 -187 9 2 11 14 16 325 320 391 404 405 -188 9 2 11 14 14 320 329 406 407 392 -189 9 2 11 14 1 13 319 17 374 387 -190 9 2 11 14 326 328 333 384 369 397 -191 9 2 11 14 94 95 326 99 368 408 -192 9 2 11 14 102 319 330 388 395 347 -193 9 2 11 14 11 327 95 394 366 100 -194 9 2 11 14 93 94 322 98 409 410 -195 9 2 11 14 92 93 322 97 410 403 -196 9 2 11 14 14 15 320 19 411 406 -197 9 2 11 14 15 16 320 20 405 411 -198 9 2 11 14 317 328 327 342 383 412 -199 9 2 11 14 321 335 333 361 401 337 -200 9 2 11 14 94 326 322 408 396 409 -201 9 2 11 14 320 334 329 413 389 407 -202 9 2 11 14 78 336 325 370 375 381 -203 9 2 11 14 87 324 335 380 402 371 -204 9 2 11 14 101 317 327 344 412 393 -205 9 2 11 14 320 325 334 404 377 413 -206 9 2 11 14 318 323 331 352 414 354 -207 9 2 11 14 321 331 323 339 414 349 -208 9 2 11 20 419 431 429 435 436 437 -209 9 2 11 20 415 428 426 438 439 440 -210 9 2 11 20 120 121 415 123 441 442 -211 9 2 11 20 426 428 429 439 443 444 -212 9 2 11 20 121 428 415 445 438 441 -213 9 2 11 20 113 419 421 446 447 448 -214 9 2 11 20 108 421 416 449 450 451 -215 9 2 11 20 416 429 430 452 453 454 -216 9 2 11 20 416 430 432 454 455 456 -217 9 2 11 20 12 421 108 457 449 112 -218 9 2 11 20 12 113 421 116 448 457 -219 9 2 11 20 114 433 419 458 459 460 -220 9 2 11 20 113 114 419 117 460 446 -221 9 2 11 20 107 416 434 461 462 463 -222 9 2 11 20 107 108 416 111 451 461 -223 9 2 11 20 95 425 424 464 465 466 -224 9 2 11 20 426 429 431 444 436 467 -225 9 2 11 20 106 107 434 110 463 468 -226 9 2 11 20 114 115 433 118 469 458 -227 9 2 11 20 69 427 417 470 471 472 -228 9 2 11 20 423 434 432 473 474 475 -229 9 2 11 20 428 430 429 476 453 443 -230 9 2 11 20 10 422 115 477 478 119 -231 9 2 11 20 6 106 423 109 479 480 -232 9 2 11 20 424 425 426 465 481 482 -233 9 2 11 20 417 427 430 471 483 484 -234 9 2 11 20 8 417 121 485 486 124 -235 9 2 11 20 427 432 430 487 455 483 -236 9 2 11 20 10 92 422 96 488 477 -237 9 2 11 20 6 423 72 480 489 77 -238 9 2 11 20 69 70 427 74 490 470 -239 9 2 11 20 11 120 425 122 491 492 -240 9 2 11 20 417 430 428 484 476 493 -241 9 2 11 20 416 432 434 456 474 462 -242 9 2 11 20 420 424 431 494 495 496 -243 9 2 11 20 420 431 422 496 497 498 -244 9 2 11 20 422 431 433 497 499 500 -245 9 2 11 20 92 420 422 501 498 488 -246 9 2 11 20 72 423 418 489 502 503 -247 9 2 11 20 70 418 427 504 505 490 -248 9 2 11 20 8 69 417 73 472 485 -249 9 2 11 20 424 426 431 482 467 495 -250 9 2 11 20 94 95 424 99 466 506 -251 9 2 11 20 121 417 428 486 493 445 -252 9 2 11 20 11 425 95 492 464 100 -253 9 2 11 20 93 94 420 98 507 508 -254 9 2 11 20 92 93 420 97 508 501 -255 9 2 11 20 70 71 418 75 509 504 -256 9 2 11 20 71 72 418 76 503 509 -257 9 2 11 20 415 426 425 440 481 510 -258 9 2 11 20 419 433 431 459 499 435 -259 9 2 11 20 94 424 420 506 494 507 -260 9 2 11 20 418 432 427 511 487 505 -261 9 2 11 20 106 434 423 468 473 479 -262 9 2 11 20 115 422 433 478 500 469 -263 9 2 11 20 120 415 425 442 510 491 -264 9 2 11 20 418 423 432 502 475 511 -265 9 2 11 20 416 421 429 450 512 452 -266 9 2 11 20 419 429 421 437 512 447 -$EndElements diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.geo b/dG3D/benchmarks/multiscaleCohesiveTest2D/model.geo deleted file mode 100644 index 749b6aba041e1ad158114d6cef79ffeecbbd02d0..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.geo +++ /dev/null @@ -1,59 +0,0 @@ - -mm=1.0; -L=1.*mm; -H = 1*mm; -sl1=0.5*L; -Point(1)={0,0,0,sl1}; -Point(2)={0.5*L,0,0,sl1}; -Point(3)={0.5*L,H,0,sl1}; -Point(4)={0,H,0,sl1}; -Line(1)={1,2}; -Line(2)={2,3}; -Line(3)={3,4}; -Line(4)={4,1}; - -l[0]=newreg; -Line Loop(l[0])={1,2,3,4}; -Plane Surface(11)={l[0]}; - -Transfinite Line {4, 2} = 2 Using Progression 1; -Transfinite Line {3, 1} = 2 Using Progression 1; -Transfinite Surface {11}; -Recombine Surface {11}; - -Extrude {0.5*L, 0, 0} { - Line{2}; Layers{1}; Recombine; -} - -//+ -Extrude {L, 0, 0} { - Line{12}; Layers{1}; Recombine; -} -//+ -Extrude {-L, 0, 0} { - Line{4}; Layers{1}; Recombine; -} -//+ -Physical Surface(11) = {11}; -//+ -Physical Surface(12) = {15}; -//+ -Physical Surface(13) = {23}; -//+ -Physical Surface(14) = {19}; -//+ -Physical Line(1) = {22, 1, 13, 17}; -//+ -Physical Line(2) = {16}; -//+ -Physical Line(3) = {18, 14, 3, 21}; -//+ -Physical Line(4) = {20}; -//+ -Physical Point(1) = {10}; -//+ -Physical Point(2) = {7}; -//+ -Physical Point(3) = {8}; -//+ -Physical Point(4) = {9}; diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.msh b/dG3D/benchmarks/multiscaleCohesiveTest2D/model.msh deleted file mode 100644 index ad2a92d31a5f48bcc6a7f4c8bb5d93667b7f9093..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.msh +++ /dev/null @@ -1,37 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -10 -1 0 0 0 -2 0.5 0 0 -3 0.5 1 0 -4 0 1 0 -5 1 0 0 -6 1 1 0 -7 2 0 0 -8 2 1 0 -9 -1 1 0 -10 -1 0 0 -$EndNodes -$Elements -18 -1 15 2 2 7 7 -2 15 2 3 8 8 -3 15 2 4 9 9 -4 15 2 1 10 10 -5 1 2 1 1 1 2 -6 1 2 3 3 3 4 -7 1 2 1 13 2 5 -8 1 2 3 14 3 6 -9 1 2 2 16 7 8 -10 1 2 1 17 5 7 -11 1 2 3 18 6 8 -12 1 2 4 20 9 10 -13 1 2 3 21 4 9 -14 1 2 1 22 1 10 -15 3 2 11 11 1 2 3 4 -16 3 2 12 15 2 3 6 5 -17 3 2 14 19 5 6 8 7 -18 3 2 13 23 4 1 10 9 -$EndElements diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py deleted file mode 100644 index e28c56701ed8ab006768c0b25cdb355a85a3d34e..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D/model.py +++ /dev/null @@ -1,210 +0,0 @@ -#coding-Utf-8-*- -from gmshpy import * -from dG3Dpy import* - -#script to launch PBC problem with a python script - -#DEFINE MICRO PROBLEM - -# micro-material law -lawnum1 = 11 # unique number of law - - -rho = 7850e-9 -young = 28.9e3 -nu = 0.3 -sy0 = 99. -h = young/20. - -harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) -cl = IsotropicCLengthLaw(1, 1e-2) -damlaw = SimpleSaturateDamageLaw(1, 50.,1.,0.,1.) -law1 = NonLocalDamageJ2HyperDG3DMaterialLaw(lawnum1,rho,young,nu,harden,cl,damlaw) - - -micromeshfile="micro.msh" # name of mesh file - -# creation of part Domain -nfield = 11 # number of the field (physical number of entity) -myfield1 = dG3DDomain(1000,nfield,0,lawnum1,0,2,1) -#myfield1.setNonLocalStabilityParameters(beta1,True) -myfield1.setNonLocalEqRatio(1.e3) - -microBC = nonLinearPeriodicBC(1000,2) -microBC.setOrder(1) -microBC.setBCPhysical(1,4,3,2) -# periodiodic BC -method = 0 # Periodic mesh = 0 Langrange interpolation = 1 Cubic spline interpolation =2 -degree = 5 -addvertex = False -microBC.setPeriodicBCOptions(method, degree,addvertex) - -# DEFINE MACROPROBLEM -matnum1 = 1; -macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -macromat1.setViewAllMicroProblems(False,1) -macromat1.setBlockDamageAfterFailureOnset(True) -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) - -lcohNum = 3 -lawCoh = TwoFieldMultiscaleCohesive3DLaw(lcohNum) -lawCoh.setCharacteristicLength(1.) -lawCoh.setLostSolutionUniquenssTolerance(0.01) -lawCoh.setPenaltyParameter(1e8) - -macromeshfile="model.msh" # name of mesh file - -# solver -sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 -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=3 # Number of step between 2 archiving (used only if soltype=1) - - -# creation of macro part Domain -# non DG domain -macrodomain3 = dG3DDomain(10,13,0,matnum2,0,2) -macrodomain4 = dG3DDomain(11,14,0,matnum2,0,2) - -macrodomain1 = dG3DDomain(10,11,0,matnum1,0,2) -macrodomain1.setDistributedOtherRanks(True) -macrodomain1.distributeOnRootRank(False) - -macrodomain2 = dG3DDomain(11,12,0,matnum1,0,2) -macrodomain2.setDistributedOtherRanks(True) -macrodomain2.distributeOnRootRank(False) - -# interface domain -beta1 = 100; -interdomain1 = interDomainBetween3D(12,macrodomain1,macrodomain2,lcohNum,matnum1) -interdomain1.stabilityParameters(beta1) -interdomain1.setMultipleFieldFormulation(True,1,2) -interdomain1.averageStrainBased(True) -interdomain1.setDistributedOtherRanks(True) -interdomain1.distributeOnRootRank(False) -interdomain1.fixInterfaceDofComponent(2) -interdomain1.setBulkDamageBlockedMethod(1) - -# creation of Solver -mysolver = nonLinearMechSolver(1000) -mysolver.loadModel(macromeshfile) -mysolver.addDomain(macrodomain1) -mysolver.addDomain(macrodomain2) -mysolver.addDomain(macrodomain3) -mysolver.addDomain(macrodomain4) -mysolver.addDomain(interdomain1) -mysolver.addMaterialLaw(macromat1) -mysolver.addMaterialLaw(macromat2) -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") - - -# boundary condition -mysolver.displacementBC("Face",11,2,0.0) -mysolver.displacementBC("Face",12,2,0.0) -mysolver.displacementBC("Face",13,2,0.0) -mysolver.displacementBC("Face",14,2,0.0) - -mysolver.displacementBC("Edge",1,1,0.0) -mysolver.displacementBC("Edge",3,1,0.0) -mysolver.displacementBC("Edge",4,0,0.0) - -umax = 0.015 -fct = PiecewiseLinearFunction() -fct.put(0.,0.) -fct.put(0.4,0.9*umax) -fct.put(0.6,-0.2*umax) -fct.put(1.,umax) - -mysolver.displacementBC("Edge",2,0,fct) - - -# archivage -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("Green-Lagrange equivalent strain",IPField.GL_EQUIVALENT_STRAIN, 1, 1); -mysolver.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN, 1, 1); -mysolver.internalPointBuildView("Damage",IPField.DAMAGE,1,1); - -mysolver.archivingForceOnPhysicalGroup("Edge",4,0) -mysolver.archivingNodeDisplacement(2,0) - -# solve -mysolver.solve() - -check = TestCheck() -check.equal(-1.767756e+01,mysolver.getArchivedForceOnPhysicalGroup("Edge", 4, 0),1.e-4) - diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/CMakeLists.txt b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/CMakeLists.txt deleted file mode 100644 index cbbd67f8dcae9f9a89fbe648697446d192383882..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# test file - -set(PYFILE model.py) - -set(FILES2DELETE - E_*.msh - *.txt - *.csv - disp* - stress* -) - -add_cm3python_mpi_test(4 ${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/micro.geo b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/micro.geo deleted file mode 100644 index 5e0b62d6d05215e12989e4cd6bfebc54d1a5517e..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/micro.geo +++ /dev/null @@ -1,45 +0,0 @@ -mm = 1.; -L = 1.*mm; -R = 0.15*L; -lsca1 = 0.2*L; -lsca2 = 0.4*lsca1; - -Point(1) = {0,0,0,lsca1}; -Point(2) = {-R,0,0,lsca2}; -Point(3) = {-0.5*L,0,0,lsca2}; -Point(4) = {-0.5*L,-0.5*L,0,lsca1}; -Point(5) = {0,-0.5*L,0,lsca2}; -Point(6) = {0,-R,0,lsca2}; - - -Line(1) = {2, 3}; -Line(2) = {3, 4}; -Line(3) = {4, 5}; -Line(4) = {5, 6}; -Circle(5) = {2, 1, 6}; -Line Loop(6) = {2, 3, 4, -5, 1}; -Plane Surface(7) = {6}; -Symmetry {1, 0, 0, 0} { - Duplicata { Surface{7}; } -} -Symmetry {0, 1, 0, 0} { - Duplicata { Surface{7, 8}; } -} - -//Recombine Surface{14, 20, 8, 7}; -Physical Line(1) = {3, 10}; -Physical Line(2) = {9, 21}; -Physical Line(3) = {22, 16}; -Physical Line(4) = {15, 2}; -Physical Surface(11) = {14, 20, 8, 7}; - - -/* -Translate {0.1, 0, 0} { - Line{17, 24, 18, 5, 12, 4}; -} - -Translate {0, 0.1, 0} { - Line{18, 24, 13, 12, 5, 1}; -} -*/ diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/micro.msh b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/micro.msh deleted file mode 100644 index 75cb75aa0fc7676a0819e11620ec3022b8f5d830..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/micro.msh +++ /dev/null @@ -1,525 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -176 -1 -0.15 0 0 -2 -0.5 0 0 -3 -0.5 -0.5 0 -4 0 -0.5 0 -5 0 -0.15 0 -6 0.5 0 0 -7 0.5 -0.5 0 -8 0.15 0 0 -9 -0.5 0.5 0 -10 0 0.5 0 -11 0 0.15 0 -12 0.5 0.5 0 -13 -0.2199999999998429 0 0 -14 -0.2899999999995946 0 0 -15 -0.3599999999995793 0 0 -16 -0.4299999999997463 0 0 -17 -0.5 -0.08581116126524545 0 -18 -0.5 -0.1937129562906754 0 -19 -0.5 -0.3293922803425093 0 -20 -0.329392280343592 -0.5 0 -21 -0.1937129562919624 -0.5 0 -22 -0.08581116126571686 -0.5 0 -23 0 -0.4300000000001734 0 -24 0 -0.3600000000003685 0 -25 0 -0.2900000000003252 0 -26 0 -0.2200000000001519 0 -27 -0.1299038105677715 -0.07499999999981691 0 -28 -0.07500000000016267 -0.1299038105675719 0 -29 0.5 -0.08581116126524545 0 -30 0.5 -0.1937129562906754 0 -31 0.5 -0.3293922803425093 0 -32 0.329392280343592 -0.5 0 -33 0.1937129562919624 -0.5 0 -34 0.08581116126571686 -0.5 0 -35 0.07499999999980624 -0.1299038105677777 0 -36 0.12990381056752 -0.07500000000025255 0 -37 0.2199999999998429 0 0 -38 0.2899999999995946 0 0 -39 0.3599999999995793 0 0 -40 0.4299999999997463 0 0 -41 -0.5 0.08581116126524545 0 -42 -0.5 0.1937129562906754 0 -43 -0.5 0.3293922803425093 0 -44 -0.329392280343592 0.5 0 -45 -0.1937129562919624 0.5 0 -46 -0.08581116126571686 0.5 0 -47 0 0.4300000000001734 0 -48 0 0.3600000000003685 0 -49 0 0.2900000000003252 0 -50 0 0.2200000000001519 0 -51 -0.07499999999980624 0.1299038105677777 0 -52 -0.12990381056752 0.07500000000025255 0 -53 0.5 0.08581116126524545 0 -54 0.5 0.1937129562906754 0 -55 0.5 0.3293922803425093 0 -56 0.329392280343592 0.5 0 -57 0.1937129562919624 0.5 0 -58 0.08581116126571686 0.5 0 -59 0.07499999999980624 0.1299038105677777 0 -60 0.12990381056752 0.07500000000025255 0 -61 -0.2893623551474053 -0.2158648299719694 0 -62 -0.1544991327027354 -0.3194605177254818 0 -63 -0.3807608623485343 -0.1232387117726204 0 -64 -0.2549999999997187 -0.1050739099681566 0 -65 -0.1072301497385734 -0.2441278523483062 0 -66 -0.309246844761247 -0.3550606630923944 0 -67 -0.1058163751590665 -0.3890272269035377 0 -68 -0.1861028478717106 -0.1542246806614924 0 -69 -0.4046662899457935 -0.2087211251758206 0 -70 -0.0654724935147956 -0.3218022281397898 0 -71 -0.3215060504706371 -0.06687193764219072 0 -72 -0.188163951204031 -0.2413447012048376 0 -73 -0.1934422488806149 -0.3998774762144867 0 -74 -0.3917727199796642 -0.4104374779427945 0 -75 -0.199334443073127 -0.0635010525835531 0 -76 -0.3949999999996626 -0.05747192954496657 0 -77 -0.05811507824657242 -0.1954775870584857 0 -78 -0.04616354429998829 -0.2542815335094117 0 -79 -0.2269429065392067 -0.306321637641834 0 -80 -0.3188104425914374 -0.137782990682286 0 -81 -0.2571680987085841 -0.04708938003878008 0 -82 -0.4439149143162368 -0.12467742925584 0 -83 -0.05856034051061341 -0.4439735409611574 0 -84 -0.2615526183177772 -0.4453754496679412 0 -85 -0.379009641966822 -0.3038952753050976 0 -86 -0.4537829828631292 -0.05359210401321042 0 -87 -0.1218091458902911 -0.1734857017242453 0 -88 -0.0459698418368951 -0.3889605992010054 0 -89 -0.1274686164215948 -0.4465756488158363 0 -90 0.2893623551474729 -0.2158648299719101 0 -91 0.1544991327027339 -0.3194605177254982 0 -92 0.3807608623485683 -0.1232387117725652 0 -93 0.2549999999997187 -0.1050739099681284 0 -94 0.1072301497384974 -0.2441278523483495 0 -95 0.3092468447613587 -0.3550606630923431 0 -96 0.105816375159063 -0.3890272269035477 0 -97 0.1861028478717421 -0.1542246806616533 0 -98 0.4046662899458383 -0.2087211251758025 0 -99 0.0654724935147787 -0.3218022281397998 0 -100 0.3215060504706437 -0.06687193764217621 0 -101 0.1881639512038895 -0.2413447012049137 0 -102 0.1934422488806415 -0.3998774762144767 0 -103 0.3917727199797149 -0.4104374779428011 0 -104 0.1993344430730904 -0.06350105258364523 0 -105 0.3949999999996627 -0.05747192954493312 0 -106 0.0581150782464979 -0.1954775870585255 0 -107 0.0461635442999548 -0.2542815335094304 0 -108 0.2269429065392193 -0.3063216376418283 0 -109 0.3188104425914543 -0.1377829906822998 0 -110 0.2571680987085781 -0.04708938003878998 0 -111 0.4439149143162497 -0.1246774292558273 0 -112 0.0585603405106121 -0.4439735409611602 0 -113 0.2615526183177773 -0.4453754496679624 0 -114 0.3790096419668769 -0.3038952753050732 0 -115 0.4537829828631317 -0.05359210401320117 0 -116 0.1218091458901927 -0.1734857017243569 0 -117 0.04596984183689076 -0.3889605992010099 0 -118 0.1274686164215992 -0.4465756488158369 0 -119 -0.289362355147473 0.21586482997191 0 -120 -0.1544991327027339 0.3194605177254982 0 -121 -0.3807608623485683 0.1232387117725651 0 -122 -0.2549999999997187 0.1050739099681284 0 -123 -0.1072301497384974 0.2441278523483495 0 -124 -0.3092468447613587 0.3550606630923431 0 -125 -0.105816375159063 0.3890272269035477 0 -126 -0.1861028478717421 0.1542246806616533 0 -127 -0.4046662899458382 0.2087211251758025 0 -128 -0.06547249351477868 0.3218022281397998 0 -129 -0.3215060504706437 0.06687193764217618 0 -130 -0.1881639512038895 0.2413447012049137 0 -131 -0.1934422488806415 0.3998774762144767 0 -132 -0.3917727199797149 0.4104374779428011 0 -133 -0.1993344430730904 0.06350105258364522 0 -134 -0.3949999999996626 0.05747192954493307 0 -135 -0.0581150782464979 0.1954775870585255 0 -136 -0.04616354429995479 0.2542815335094303 0 -137 -0.2269429065392193 0.3063216376418283 0 -138 -0.3188104425914543 0.1377829906822998 0 -139 -0.2571680987085781 0.04708938003878996 0 -140 -0.4439149143162496 0.1246774292558273 0 -141 -0.05856034051061208 0.4439735409611601 0 -142 -0.2615526183177773 0.4453754496679624 0 -143 -0.3790096419668769 0.3038952753050732 0 -144 -0.4537829828631318 0.05359210401320117 0 -145 -0.1218091458901927 0.1734857017243569 0 -146 -0.04596984183689075 0.3889605992010099 0 -147 -0.1274686164215992 0.446575648815837 0 -148 0.2893623551474729 0.2158648299719101 0 -149 0.1544991327027339 0.3194605177254982 0 -150 0.3807608623485683 0.1232387117725652 0 -151 0.2549999999997187 0.1050739099681284 0 -152 0.1072301497384974 0.2441278523483494 0 -153 0.3092468447613587 0.3550606630923431 0 -154 0.105816375159063 0.3890272269035477 0 -155 0.1861028478717421 0.1542246806616533 0 -156 0.4046662899458383 0.2087211251758026 0 -157 0.0654724935147787 0.3218022281397998 0 -158 0.3215060504706437 0.06687193764217619 0 -159 0.1881639512038895 0.2413447012049137 0 -160 0.1934422488806414 0.3998774762144767 0 -161 0.3917727199797149 0.4104374779428011 0 -162 0.1993344430730904 0.06350105258364523 0 -163 0.3949999999996626 0.05747192954493312 0 -164 0.0581150782464979 0.1954775870585255 0 -165 0.0461635442999548 0.2542815335094304 0 -166 0.2269429065392193 0.3063216376418284 0 -167 0.3188104425914542 0.1377829906822997 0 -168 0.2571680987085781 0.04708938003878997 0 -169 0.4439149143162497 0.1246774292558273 0 -170 0.0585603405106121 0.4439735409611601 0 -171 0.2615526183177773 0.4453754496679624 0 -172 0.3790096419668769 0.3038952753050732 0 -173 0.4537829828631317 0.05359210401320117 0 -174 0.1218091458901927 0.1734857017243569 0 -175 0.04596984183689076 0.3889605992010099 0 -176 0.1274686164215992 0.4465756488158369 0 -$EndNodes -$Elements -340 -1 1 2 4 2 2 17 -2 1 2 4 2 17 18 -3 1 2 4 2 18 19 -4 1 2 4 2 19 3 -5 1 2 1 3 3 20 -6 1 2 1 3 20 21 -7 1 2 1 3 21 22 -8 1 2 1 3 22 4 -9 1 2 2 9 6 29 -10 1 2 2 9 29 30 -11 1 2 2 9 30 31 -12 1 2 2 9 31 7 -13 1 2 1 10 7 32 -14 1 2 1 10 32 33 -15 1 2 1 10 33 34 -16 1 2 1 10 34 4 -17 1 2 4 15 2 41 -18 1 2 4 15 41 42 -19 1 2 4 15 42 43 -20 1 2 4 15 43 9 -21 1 2 3 16 9 44 -22 1 2 3 16 44 45 -23 1 2 3 16 45 46 -24 1 2 3 16 46 10 -25 1 2 2 21 6 53 -26 1 2 2 21 53 54 -27 1 2 2 21 54 55 -28 1 2 2 21 55 12 -29 1 2 3 22 12 56 -30 1 2 3 22 56 57 -31 1 2 3 22 57 58 -32 1 2 3 22 58 10 -33 2 2 11 7 61 68 64 -34 2 2 11 7 61 69 85 -35 2 2 11 7 61 85 66 -36 2 2 11 7 61 66 79 -37 2 2 11 7 61 72 68 -38 2 2 11 7 24 25 70 -39 2 2 11 7 27 75 68 -40 2 2 11 7 66 73 79 -41 2 2 11 7 62 70 65 -42 2 2 11 7 63 69 80 -43 2 2 11 7 24 70 88 -44 2 2 11 7 27 68 87 -45 2 2 11 7 18 19 69 -46 2 2 11 7 27 87 28 -47 2 2 11 7 64 68 75 -48 2 2 11 7 76 86 82 -49 2 2 11 7 62 79 73 -50 2 2 11 7 66 74 84 -51 2 2 11 7 66 84 73 -52 2 2 11 7 61 80 69 -53 2 2 11 7 62 65 72 -54 2 2 11 7 62 67 70 -55 2 2 11 7 74 20 84 -56 2 2 11 7 65 87 72 -57 2 2 11 7 68 72 87 -58 2 2 11 7 61 64 80 -59 2 2 11 7 14 15 71 -60 2 2 11 7 1 13 75 -61 2 2 11 7 1 75 27 -62 2 2 11 7 62 73 67 -63 2 2 11 7 3 74 19 -64 2 2 11 7 3 20 74 -65 2 2 11 7 67 88 70 -66 2 2 11 7 20 21 84 -67 2 2 11 7 19 85 69 -68 2 2 11 7 17 82 86 -69 2 2 11 7 63 82 69 -70 2 2 11 7 4 83 22 -71 2 2 11 7 21 22 89 -72 2 2 11 7 4 23 83 -73 2 2 11 7 61 79 72 -74 2 2 11 7 2 17 86 -75 2 2 11 7 17 18 82 -76 2 2 11 7 63 76 82 -77 2 2 11 7 25 78 70 -78 2 2 11 7 18 69 82 -79 2 2 11 7 15 76 71 -80 2 2 11 7 15 16 76 -81 2 2 11 7 14 71 81 -82 2 2 11 7 5 28 77 -83 2 2 11 7 65 70 78 -84 2 2 11 7 25 26 78 -85 2 2 11 7 5 77 26 -86 2 2 11 7 65 78 77 -87 2 2 11 7 26 77 78 -88 2 2 11 7 13 14 81 -89 2 2 11 7 64 81 71 -90 2 2 11 7 16 86 76 -91 2 2 11 7 63 71 76 -92 2 2 11 7 65 77 87 -93 2 2 11 7 2 86 16 -94 2 2 11 7 23 24 88 -95 2 2 11 7 62 72 79 -96 2 2 11 7 21 89 73 -97 2 2 11 7 67 73 89 -98 2 2 11 7 66 85 74 -99 2 2 11 7 13 81 75 -100 2 2 11 7 64 71 80 -101 2 2 11 7 19 74 85 -102 2 2 11 7 28 87 77 -103 2 2 11 7 63 80 71 -104 2 2 11 7 21 73 84 -105 2 2 11 7 64 75 81 -106 2 2 11 7 23 88 83 -107 2 2 11 7 67 89 83 -108 2 2 11 7 22 83 89 -109 2 2 11 7 67 83 88 -110 2 2 11 8 90 97 93 -111 2 2 11 8 90 98 114 -112 2 2 11 8 90 114 95 -113 2 2 11 8 90 95 108 -114 2 2 11 8 90 101 97 -115 2 2 11 8 24 25 99 -116 2 2 11 8 36 104 97 -117 2 2 11 8 95 102 108 -118 2 2 11 8 91 99 94 -119 2 2 11 8 92 98 109 -120 2 2 11 8 24 99 117 -121 2 2 11 8 36 97 116 -122 2 2 11 8 30 31 98 -123 2 2 11 8 35 36 116 -124 2 2 11 8 93 97 104 -125 2 2 11 8 105 115 111 -126 2 2 11 8 91 108 102 -127 2 2 11 8 95 103 113 -128 2 2 11 8 95 113 102 -129 2 2 11 8 90 109 98 -130 2 2 11 8 91 94 101 -131 2 2 11 8 91 96 99 -132 2 2 11 8 103 32 113 -133 2 2 11 8 94 116 101 -134 2 2 11 8 97 101 116 -135 2 2 11 8 90 93 109 -136 2 2 11 8 38 39 100 -137 2 2 11 8 8 37 104 -138 2 2 11 8 8 104 36 -139 2 2 11 8 91 102 96 -140 2 2 11 8 7 103 31 -141 2 2 11 8 7 32 103 -142 2 2 11 8 96 117 99 -143 2 2 11 8 32 33 113 -144 2 2 11 8 31 114 98 -145 2 2 11 8 29 111 115 -146 2 2 11 8 92 111 98 -147 2 2 11 8 4 112 34 -148 2 2 11 8 33 34 118 -149 2 2 11 8 4 23 112 -150 2 2 11 8 90 108 101 -151 2 2 11 8 6 29 115 -152 2 2 11 8 29 30 111 -153 2 2 11 8 92 105 111 -154 2 2 11 8 25 107 99 -155 2 2 11 8 30 98 111 -156 2 2 11 8 39 105 100 -157 2 2 11 8 39 40 105 -158 2 2 11 8 38 100 110 -159 2 2 11 8 5 35 106 -160 2 2 11 8 94 99 107 -161 2 2 11 8 25 26 107 -162 2 2 11 8 5 106 26 -163 2 2 11 8 94 107 106 -164 2 2 11 8 26 106 107 -165 2 2 11 8 37 38 110 -166 2 2 11 8 93 110 100 -167 2 2 11 8 40 115 105 -168 2 2 11 8 92 100 105 -169 2 2 11 8 94 106 116 -170 2 2 11 8 6 115 40 -171 2 2 11 8 23 24 117 -172 2 2 11 8 91 101 108 -173 2 2 11 8 33 118 102 -174 2 2 11 8 96 102 118 -175 2 2 11 8 95 114 103 -176 2 2 11 8 37 110 104 -177 2 2 11 8 93 100 109 -178 2 2 11 8 31 103 114 -179 2 2 11 8 35 116 106 -180 2 2 11 8 92 109 100 -181 2 2 11 8 33 102 113 -182 2 2 11 8 93 104 110 -183 2 2 11 8 23 117 112 -184 2 2 11 8 96 118 112 -185 2 2 11 8 34 112 118 -186 2 2 11 8 96 112 117 -187 2 2 11 14 119 126 122 -188 2 2 11 14 119 127 143 -189 2 2 11 14 119 143 124 -190 2 2 11 14 119 124 137 -191 2 2 11 14 119 130 126 -192 2 2 11 14 48 49 128 -193 2 2 11 14 52 133 126 -194 2 2 11 14 124 131 137 -195 2 2 11 14 120 128 123 -196 2 2 11 14 121 127 138 -197 2 2 11 14 48 128 146 -198 2 2 11 14 52 126 145 -199 2 2 11 14 42 43 127 -200 2 2 11 14 51 52 145 -201 2 2 11 14 122 126 133 -202 2 2 11 14 134 144 140 -203 2 2 11 14 120 137 131 -204 2 2 11 14 124 132 142 -205 2 2 11 14 124 142 131 -206 2 2 11 14 119 138 127 -207 2 2 11 14 120 123 130 -208 2 2 11 14 120 125 128 -209 2 2 11 14 132 44 142 -210 2 2 11 14 123 145 130 -211 2 2 11 14 126 130 145 -212 2 2 11 14 119 122 138 -213 2 2 11 14 14 15 129 -214 2 2 11 14 1 13 133 -215 2 2 11 14 1 133 52 -216 2 2 11 14 120 131 125 -217 2 2 11 14 9 132 43 -218 2 2 11 14 9 44 132 -219 2 2 11 14 125 146 128 -220 2 2 11 14 44 45 142 -221 2 2 11 14 43 143 127 -222 2 2 11 14 41 140 144 -223 2 2 11 14 121 140 127 -224 2 2 11 14 10 141 46 -225 2 2 11 14 45 46 147 -226 2 2 11 14 10 47 141 -227 2 2 11 14 119 137 130 -228 2 2 11 14 2 41 144 -229 2 2 11 14 41 42 140 -230 2 2 11 14 121 134 140 -231 2 2 11 14 49 136 128 -232 2 2 11 14 42 127 140 -233 2 2 11 14 15 134 129 -234 2 2 11 14 15 16 134 -235 2 2 11 14 14 129 139 -236 2 2 11 14 11 51 135 -237 2 2 11 14 123 128 136 -238 2 2 11 14 49 50 136 -239 2 2 11 14 11 135 50 -240 2 2 11 14 123 136 135 -241 2 2 11 14 50 135 136 -242 2 2 11 14 13 14 139 -243 2 2 11 14 122 139 129 -244 2 2 11 14 16 144 134 -245 2 2 11 14 121 129 134 -246 2 2 11 14 123 135 145 -247 2 2 11 14 2 144 16 -248 2 2 11 14 47 48 146 -249 2 2 11 14 120 130 137 -250 2 2 11 14 45 147 131 -251 2 2 11 14 125 131 147 -252 2 2 11 14 124 143 132 -253 2 2 11 14 13 139 133 -254 2 2 11 14 122 129 138 -255 2 2 11 14 43 132 143 -256 2 2 11 14 51 145 135 -257 2 2 11 14 121 138 129 -258 2 2 11 14 45 131 142 -259 2 2 11 14 122 133 139 -260 2 2 11 14 47 146 141 -261 2 2 11 14 125 147 141 -262 2 2 11 14 46 141 147 -263 2 2 11 14 125 141 146 -264 2 2 11 20 148 155 151 -265 2 2 11 20 148 156 172 -266 2 2 11 20 148 172 153 -267 2 2 11 20 148 153 166 -268 2 2 11 20 148 159 155 -269 2 2 11 20 48 49 157 -270 2 2 11 20 60 162 155 -271 2 2 11 20 153 160 166 -272 2 2 11 20 149 157 152 -273 2 2 11 20 150 156 167 -274 2 2 11 20 48 157 175 -275 2 2 11 20 60 155 174 -276 2 2 11 20 54 55 156 -277 2 2 11 20 59 60 174 -278 2 2 11 20 151 155 162 -279 2 2 11 20 163 173 169 -280 2 2 11 20 149 166 160 -281 2 2 11 20 153 161 171 -282 2 2 11 20 153 171 160 -283 2 2 11 20 148 167 156 -284 2 2 11 20 149 152 159 -285 2 2 11 20 149 154 157 -286 2 2 11 20 161 56 171 -287 2 2 11 20 152 174 159 -288 2 2 11 20 155 159 174 -289 2 2 11 20 148 151 167 -290 2 2 11 20 38 39 158 -291 2 2 11 20 8 37 162 -292 2 2 11 20 8 162 60 -293 2 2 11 20 149 160 154 -294 2 2 11 20 12 161 55 -295 2 2 11 20 12 56 161 -296 2 2 11 20 154 175 157 -297 2 2 11 20 56 57 171 -298 2 2 11 20 55 172 156 -299 2 2 11 20 53 169 173 -300 2 2 11 20 150 169 156 -301 2 2 11 20 10 170 58 -302 2 2 11 20 57 58 176 -303 2 2 11 20 10 47 170 -304 2 2 11 20 148 166 159 -305 2 2 11 20 6 53 173 -306 2 2 11 20 53 54 169 -307 2 2 11 20 150 163 169 -308 2 2 11 20 49 165 157 -309 2 2 11 20 54 156 169 -310 2 2 11 20 39 163 158 -311 2 2 11 20 39 40 163 -312 2 2 11 20 38 158 168 -313 2 2 11 20 11 59 164 -314 2 2 11 20 152 157 165 -315 2 2 11 20 49 50 165 -316 2 2 11 20 11 164 50 -317 2 2 11 20 152 165 164 -318 2 2 11 20 50 164 165 -319 2 2 11 20 37 38 168 -320 2 2 11 20 151 168 158 -321 2 2 11 20 40 173 163 -322 2 2 11 20 150 158 163 -323 2 2 11 20 152 164 174 -324 2 2 11 20 6 173 40 -325 2 2 11 20 47 48 175 -326 2 2 11 20 149 159 166 -327 2 2 11 20 57 176 160 -328 2 2 11 20 154 160 176 -329 2 2 11 20 153 172 161 -330 2 2 11 20 37 168 162 -331 2 2 11 20 151 158 167 -332 2 2 11 20 55 161 172 -333 2 2 11 20 59 174 164 -334 2 2 11 20 150 167 158 -335 2 2 11 20 57 160 171 -336 2 2 11 20 151 162 168 -337 2 2 11 20 47 175 170 -338 2 2 11 20 154 176 170 -339 2 2 11 20 58 170 176 -340 2 2 11 20 154 170 175 -$EndElements diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.geo b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.geo deleted file mode 100644 index 56408d10fc53fa46f8e3e630def7c31819e3305b..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.geo +++ /dev/null @@ -1,37 +0,0 @@ - -mm=1.0; -L=1.*mm; -H = 1*mm; -sl1=0.5*L; -Point(1)={0,0,0,sl1}; -Point(2)={L,0,0,sl1}; -Point(3)={L,H,0,sl1}; -Point(4)={0,H,0,sl1}; -Line(1)={1,2}; -Line(2)={2,3}; -Line(3)={3,4}; -Line(4)={4,1}; - -l[0]=newreg; -Line Loop(l[0])={1,2,3,4}; -Plane Surface(11)={l[0]}; - -Physical Surface(11)={11}; -Physical Point(1)={1}; -Physical Point(2)={2}; -Physical Point(3)={3}; -Physical Point(4)={4}; - -Transfinite Line {4, 2} = 2 Using Progression 1; -Transfinite Line {3, 1} = 2 Using Progression 1; -Transfinite Surface {11}; -Recombine Surface {11}; - -Extrude {L, 0, 0} { - Line{2}; Layers{1}; Recombine; -} -Physical Surface(12) = {15}; -Physical Line(1) = {13, 1}; -Physical Line(2) = {12}; -Physical Line(3) = {14, 3}; -Physical Line(4) = {4}; diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.msh b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.msh deleted file mode 100644 index c22f61026117245f6f0ca4e94bd600b5e6438bb1..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.msh +++ /dev/null @@ -1,27 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -6 -1 0 0 0 -2 1 0 0 -3 1 1 0 -4 0 1 0 -5 2 0 0 -6 2 1 0 -$EndNodes -$Elements -12 -1 15 2 1 1 1 -2 15 2 2 2 2 -3 15 2 3 3 3 -4 15 2 4 4 4 -5 1 2 1 1 1 2 -6 1 2 3 3 3 4 -7 1 2 4 4 4 1 -8 1 2 2 12 5 6 -9 1 2 1 13 2 5 -10 1 2 3 14 3 6 -11 3 2 11 11 1 2 3 4 -12 3 2 12 15 2 3 6 5 -$EndElements diff --git a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py b/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py deleted file mode 100644 index 8156b7a42ad258fc33e5d9ec2279d57cd8918285..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleCohesiveTest2D_mixedMode/model.py +++ /dev/null @@ -1,201 +0,0 @@ -#coding-Utf-8-*- -from gmshpy import * -from dG3Dpy import* - -#script to launch PBC problem with a python script - -#DEFINE MICRO PROBLEM - -# micro-material law -lawnum1 = 11 # unique number of law - - -rho = 7850e-9 -young = 28.9e3 -nu = 0.3 -sy0 = 99. -h = young/20. - -harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) -cl = IsotropicCLengthLaw(1, 1e-2) -damlaw = SimpleSaturateDamageLaw(1, 50.,1.,0.,1.) -law1 = NonLocalDamageJ2HyperDG3DMaterialLaw(lawnum1,rho,young,nu,harden,cl,damlaw) - - -micromeshfile="micro.msh" # name of mesh file -#micromeshfile="square.msh" # name of mesh file - -# creation of part Domain -nfield = 11 # number of the field (physical number of entity) -myfield1 = dG3DDomain(1000,nfield,0,lawnum1,0,2,1) -#myfield1.setNonLocalStabilityParameters(beta1,True) -myfield1.setNonLocalEqRatio(1.e3) - -microBC = nonLinearPeriodicBC(1000,2) -microBC.setOrder(1) -microBC.setBCPhysical(1,4,3,2) -# periodiodic BC -method = 0 # Periodic mesh = 0 Langrange interpolation = 1 Cubic spline interpolation =2 -degree = 5 -addvertex = False -microBC.setPeriodicBCOptions(method, degree,addvertex) - -# DEFINE MACROPROBLEM -matnum1 = 1; -macromat1 = dG3DMultiscaleMaterialLaw(matnum1, 1000) -#for i in range(0,1): -macromat1.setViewAllMicroProblems(True,0) - -macromat1.setBlockDamageAfterFailureOnset(True) -macromat1.setBlockDamageAfterFailureOnsetTolerance(0.001) - -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 -lawCoh = TwoFieldMultiscaleCohesive3DLaw(lcohNum) -lawCoh.setCharacteristicLength(1.) -lawCoh.setLostSolutionUniquenssTolerance(0.05) - -macromeshfile="model.msh" # name of mesh file - -# solver -sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 -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) - - -# creation of macro part Domain - -dim =2 -beta1 = 50; -fullDG = False; - -averageStrainBased = True - -# non DG domain -nfield1 = 11 -macrodomain1 = dG3DDomain(10,nfield1,0,matnum1,fullDG,dim) -macrodomain1.stabilityParameters(beta1) -macrodomain1.setDistributedOtherRanks(True) -macrodomain1.distributeOnRootRank(False) - -nfield2 = 12 -macrodomain2 = dG3DDomain(11,nfield2,0,matnum1,fullDG,dim) -macrodomain2.stabilityParameters(beta1) -macrodomain2.setDistributedOtherRanks(True) -macrodomain2.distributeOnRootRank(False) - -# interface domain -beta1 = 1e-2; -interdomain1 = interDomainBetween3D(12,macrodomain1,macrodomain2,lcohNum,matnum1) -interdomain1.stabilityParameters(beta1) -interdomain1.setMultipleFieldFormulation(True,1) -interdomain1.averageStrainBased(averageStrainBased) -interdomain1.setDistributedOtherRanks(True) -interdomain1.distributeOnRootRank(False) -interdomain1.fixInterfaceDofComponent(2) -interdomain1.setBulkDamageBlockedMethod(1) - -# creation of Solver -mysolver = nonLinearMechSolver(1000) -mysolver.loadModel(macromeshfile) -mysolver.addDomain(macrodomain1) -mysolver.addDomain(macrodomain2) -mysolver.addDomain(interdomain1) -mysolver.addMaterialLaw(macromat1) - -mysolver.addMaterialLaw(lawCoh) -mysolver.setMultiscaleFlag(True) -mysolver.Scheme(soltype) -mysolver.Solver(sol) -mysolver.snlData(nstep,ftime,tol) -mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_shift_type NONZERO -pc_factor_mat_solver_package petsc") - - -# boundary condition -mysolver.displacementBC("Face",11,2,0.0) -mysolver.displacementBC("Face",12,2,0.0) - -mysolver.periodicBC("Edge",1,3,1,4,0) -mysolver.periodicBC("Edge",1,3,1,4,1) - -mysolver.displacementBC("Edge",2,0,0.02) -mysolver.displacementBC("Edge",2,1,0.02) -mysolver.displacementBC("Edge",4,0,0.0) -mysolver.displacementBC("Edge",4,1,0.0) - - -# archivage -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("Green-Lagrange equivalent strain",IPField.GL_EQUIVALENT_STRAIN, 1, 1); -mysolver.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN, 1, 1); - -mysolver.archivingForceOnPhysicalGroup("Edge",4,0) - - -# solve -mysolver.solve() - -check = TestCheck() -check.equal(-2.816914e+01,mysolver.getArchivedForceOnPhysicalGroup("Edge", 4, 0),5.e-3) - diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/CMakeLists.txt b/dG3D/benchmarks/multiscaleEnhanceStrain/CMakeLists.txt deleted file mode 100644 index cbbd67f8dcae9f9a89fbe648697446d192383882..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# test file - -set(PYFILE model.py) - -set(FILES2DELETE - E_*.msh - *.txt - *.csv - disp* - stress* -) - -add_cm3python_mpi_test(4 ${PYFILE} "${FILES2DELETE}") diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/micro.geo b/dG3D/benchmarks/multiscaleEnhanceStrain/micro.geo deleted file mode 100644 index 5e0b62d6d05215e12989e4cd6bfebc54d1a5517e..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/micro.geo +++ /dev/null @@ -1,45 +0,0 @@ -mm = 1.; -L = 1.*mm; -R = 0.15*L; -lsca1 = 0.2*L; -lsca2 = 0.4*lsca1; - -Point(1) = {0,0,0,lsca1}; -Point(2) = {-R,0,0,lsca2}; -Point(3) = {-0.5*L,0,0,lsca2}; -Point(4) = {-0.5*L,-0.5*L,0,lsca1}; -Point(5) = {0,-0.5*L,0,lsca2}; -Point(6) = {0,-R,0,lsca2}; - - -Line(1) = {2, 3}; -Line(2) = {3, 4}; -Line(3) = {4, 5}; -Line(4) = {5, 6}; -Circle(5) = {2, 1, 6}; -Line Loop(6) = {2, 3, 4, -5, 1}; -Plane Surface(7) = {6}; -Symmetry {1, 0, 0, 0} { - Duplicata { Surface{7}; } -} -Symmetry {0, 1, 0, 0} { - Duplicata { Surface{7, 8}; } -} - -//Recombine Surface{14, 20, 8, 7}; -Physical Line(1) = {3, 10}; -Physical Line(2) = {9, 21}; -Physical Line(3) = {22, 16}; -Physical Line(4) = {15, 2}; -Physical Surface(11) = {14, 20, 8, 7}; - - -/* -Translate {0.1, 0, 0} { - Line{17, 24, 18, 5, 12, 4}; -} - -Translate {0, 0.1, 0} { - Line{18, 24, 13, 12, 5, 1}; -} -*/ diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/micro.msh b/dG3D/benchmarks/multiscaleEnhanceStrain/micro.msh deleted file mode 100644 index c6acd5b31b792077590d064be2f4fe7779b47c89..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/micro.msh +++ /dev/null @@ -1,787 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -512 -1 -0.15 0 0 -2 -0.5 0 0 -3 -0.5 -0.5 0 -4 0 -0.5 0 -5 0 -0.15 0 -6 0.5 0 0 -7 0.5 -0.5 0 -8 0.15 0 0 -9 -0.5 0.5 0 -10 0 0.5 0 -11 0 0.15 0 -12 0.5 0.5 0 -13 -0.2199999999998429 0 0 -14 -0.2899999999995946 0 0 -15 -0.3599999999995793 0 0 -16 -0.4299999999997463 0 0 -17 -0.1849999999999308 0 0 -18 -0.2549999999996413 0 0 -19 -0.3249999999994754 0 0 -20 -0.3949999999996151 0 0 -21 -0.4649999999998321 0 0 -22 -0.5 -0.08581116126524545 0 -23 -0.5 -0.1937129562906754 0 -24 -0.5 -0.3293922803425093 0 -25 -0.5 -0.04290558063262855 0 -26 -0.5 -0.1397620587779604 0 -27 -0.5 -0.261552618316445 0 -28 -0.5 -0.4146961401712547 0 -29 -0.329392280343592 -0.5 0 -30 -0.1937129562919624 -0.5 0 -31 -0.08581116126571686 -0.5 0 -32 -0.4146961401717154 -0.5 0 -33 -0.2615526183179323 -0.5 0 -34 -0.1397620587788396 -0.5 0 -35 -0.04290558063285843 -0.5 0 -36 0 -0.4300000000001734 0 -37 0 -0.3600000000003685 0 -38 0 -0.2900000000003252 0 -39 0 -0.2200000000001519 0 -40 0 -0.4650000000000867 0 -41 0 -0.3950000000003007 0 -42 0 -0.3250000000004448 0 -43 0 -0.2550000000002834 0 -44 0 -0.1850000000000817 0 -45 -0.1299038105677715 -0.07499999999981691 0 -46 -0.07500000000016267 -0.1299038105675719 0 -47 -0.1448888739433795 -0.03882285676530619 0 -48 -0.106066017178175 -0.1060660171777893 0 -49 -0.03882285676546777 -0.1448888739433362 0 -50 0.5 -0.08581116126524545 0 -51 0.5 -0.1937129562906754 0 -52 0.5 -0.3293922803425093 0 -53 0.5 -0.04290558063262855 0 -54 0.5 -0.1397620587779604 0 -55 0.5 -0.261552618316445 0 -56 0.5 -0.4146961401712547 0 -57 0.329392280343592 -0.5 0 -58 0.1937129562919624 -0.5 0 -59 0.08581116126571686 -0.5 0 -60 0.4146961401717154 -0.5 0 -61 0.2615526183179323 -0.5 0 -62 0.1397620587788396 -0.5 0 -63 0.04290558063285843 -0.5 0 -64 0.07499999999980624 -0.1299038105677777 0 -65 0.12990381056752 -0.07500000000025255 0 -66 0.03882285676529234 -0.1448888739433832 0 -67 0.1060660171777162 -0.1060660171782481 0 -68 0.1448888739433208 -0.03882285676552522 0 -69 0.2199999999998429 0 0 -70 0.2899999999995946 0 0 -71 0.3599999999995793 0 0 -72 0.4299999999997463 0 0 -73 0.1849999999999308 0 0 -74 0.2549999999996413 0 0 -75 0.3249999999994754 0 0 -76 0.3949999999996151 0 0 -77 0.4649999999998321 0 0 -78 -0.5 0.08581116126524545 0 -79 -0.5 0.1937129562906754 0 -80 -0.5 0.3293922803425093 0 -81 -0.5 0.04290558063262855 0 -82 -0.5 0.1397620587779604 0 -83 -0.5 0.261552618316445 0 -84 -0.5 0.4146961401712547 0 -85 -0.329392280343592 0.5 0 -86 -0.1937129562919624 0.5 0 -87 -0.08581116126571686 0.5 0 -88 -0.4146961401717154 0.5 0 -89 -0.2615526183179323 0.5 0 -90 -0.1397620587788396 0.5 0 -91 -0.04290558063285843 0.5 0 -92 0 0.4300000000001734 0 -93 0 0.3600000000003685 0 -94 0 0.2900000000003252 0 -95 0 0.2200000000001519 0 -96 0 0.4650000000000867 0 -97 0 0.3950000000003007 0 -98 0 0.3250000000004448 0 -99 0 0.2550000000002834 0 -100 0 0.1850000000000817 0 -101 -0.07499999999980624 0.1299038105677777 0 -102 -0.12990381056752 0.07500000000025255 0 -103 -0.03882285676529234 0.1448888739433832 0 -104 -0.1060660171777162 0.1060660171782481 0 -105 -0.1448888739433208 0.03882285676552522 0 -106 0.5 0.08581116126524545 0 -107 0.5 0.1937129562906754 0 -108 0.5 0.3293922803425093 0 -109 0.5 0.04290558063262855 0 -110 0.5 0.1397620587779604 0 -111 0.5 0.261552618316445 0 -112 0.5 0.4146961401712547 0 -113 0.329392280343592 0.5 0 -114 0.1937129562919624 0.5 0 -115 0.08581116126571686 0.5 0 -116 0.4146961401717154 0.5 0 -117 0.2615526183179323 0.5 0 -118 0.1397620587788396 0.5 0 -119 0.04290558063285843 0.5 0 -120 0.07499999999980624 0.1299038105677777 0 -121 0.12990381056752 0.07500000000025255 0 -122 0.03882285676529234 0.1448888739433832 0 -123 0.1060660171777162 0.1060660171782481 0 -124 0.1448888739433208 0.03882285676552522 0 -125 -0.1632048750113544 -0.1232644810194541 0 -126 -0.2185144679483137 -0.3801534959448527 0 -127 -0.05089028167349786 -0.3584631613501202 0 -128 -0.06084793484707645 -0.1951430174291601 0 -129 -0.3999414826379826 -0.2373669670280938 0 -130 -0.3599999999994629 -0.06999999999986822 0 -131 -0.3654446467373357 -0.3654437046554025 0 -132 -0.4395424499711516 -0.06153088004804232 0 -133 -0.07529335399327118 -0.4336732331852045 0 -134 -0.281150983089465 -0.07390248292404106 0 -135 -0.2004047094340141 -0.06731430289221857 0 -136 -0.2306851351003935 -0.1453676244057918 0 -137 -0.07468286925234641 -0.2723686030373706 0 -138 -0.1452917775342399 -0.193626272412306 0 -139 -0.2595592816824605 -0.2528029361930984 0 -140 -0.1622839878484807 -0.2944285423531688 0 -141 -0.3285804443445061 -0.150165777374023 0 -142 -0.1292296528346454 -0.3731811726451194 0 -143 -0.4267159830345902 -0.1297998703416353 0 -144 -0.3297503821602216 -0.2450849516105961 0 -145 -0.2940698630134833 -0.2014843567835607 0 -146 -0.3642609634912444 -0.1937663722010584 0 -147 -0.1345031551426168 -0.4668366165926022 0 -148 -0.1022615034139583 -0.4034272029151619 0 -149 -0.1614713045633039 -0.4365905863225597 0 -150 -0.1969450050558739 -0.134316052712623 0 -151 -0.1879884563173167 -0.1694969484090489 0 -152 -0.1542483262727972 -0.1584453767158801 0 -153 -0.1191024375057585 -0.126584145793513 0 -154 -0.1101458887672013 -0.1617650414899389 0 -155 -0.245122208391427 -0.1990852802994451 0 -156 -0.2024255296083502 -0.2232146043027022 0 -157 -0.4327223233686679 -0.3474179924989559 0 -158 -0.3826930646876592 -0.3014053358417482 0 -159 -0.4499707413189913 -0.2833796236853016 0 -160 -0.2739533741459528 -0.4400767479724264 0 -161 -0.2919795573428247 -0.3727986003001276 0 -162 -0.3474184635404639 -0.4327218523277012 0 -163 -0.08055225762949403 -0.4668366165926022 0 -164 -0.1465543427895629 -0.09913224050963552 0 -165 -0.1738720603914795 -0.3766673342949861 0 -166 -0.206113712120138 -0.4400767479724264 0 -167 -0.1903992278983972 -0.3372910191490107 0 -168 -0.2109216347654706 -0.2736157392731336 0 -169 -0.239036874815387 -0.3164782160689755 0 -170 -0.06278657546292213 -0.3154158821937454 0 -171 -0.1019562610434959 -0.322774887841245 0 -172 -0.09005996725407162 -0.3658221669976198 0 -173 -0.1184834285504136 -0.2833985726952697 0 -174 -0.145756820341563 -0.3338048574991441 0 -175 -0.4327223233686679 -0.4327218523277012 0 -176 -0.4499707413189913 -0.2155399616593846 0 -177 -0.4133287328362865 -0.1835834186848646 0 -178 -0.4633579915172951 -0.1617564133161554 0 -179 -0.250575491544654 -0.03695124146202053 0 -180 -0.2407778462617395 -0.07060839290812981 0 -181 -0.2102023547169285 -0.03365715144610928 0 -182 -0.0373414346261732 -0.2811843015188479 0 -183 -0.02544514083674893 -0.3242315806752227 0 -184 -0.2796327897224498 -0.1477667008899074 0 -185 -0.4633579915172951 -0.1078055158034404 0 -186 -0.4697712249855758 -0.07367102065664388 0 -187 -0.4697712249855758 -0.03076544002402116 0 -188 -0.03764667699663559 -0.4668366165926022 0 -189 -0.2559180590949293 -0.1096350536649164 0 -190 -0.2155449222672038 -0.1063409636490052 0 -191 -0.1537878826913603 -0.2440274073827374 0 -192 -0.434771224985449 -0.03076544002402116 0 -193 -0.06792396742361956 -0.162523413998366 0 -194 -0.03042396742353823 -0.17257150871458 0 -195 -0.03764667699663559 -0.4318366165926889 0 -196 -0.175202354717007 -0.03365715144610928 0 -197 -0.1651542600008928 -0.07115715144601774 0 -198 -0.3442902221719845 -0.1100828886869456 0 -199 -0.3048657137169856 -0.112034130149032 0 -200 -0.320575491544464 -0.07195124146195464 0 -201 -0.3933579915170266 -0.09989993517075177 0 -202 -0.3776482136895482 -0.1399828238578292 0 -203 -0.3997712249853073 -0.06576544002395526 0 -204 -0.3949999999996046 -0.03499999999993411 0 -205 -0.02544514083674893 -0.3942315806751467 0 -206 -0.06309181783338452 -0.3960681972676623 0 -207 -0.1030698561906582 -0.194384644920733 0 -208 -0.1099873233932932 -0.2329974377248383 0 -209 -0.06776540204971143 -0.2337558102332654 0 -210 -0.2855754915445298 -0.03695124146202053 0 -211 -0.03042396742353823 -0.207571508714656 0 -212 -0.0373414346261732 -0.2461843015187613 0 -213 -0.3599999999995211 -0.03499999999993411 0 -214 -0.3249999999995288 -0.03499999999993411 0 -215 -0.02544514083674893 -0.3592315806752443 0 -216 -0.433129216502871 -0.09566537519483881 0 -217 -0.1818047922226842 -0.09528939195583636 0 -218 -0.3125019642098981 -0.3091233204242504 0 -219 0.1224866355280155 -0.1629072024975547 0 -220 0.3808849436885997 -0.210277224031109 0 -221 0.206743501399355 -0.07464099728276744 0 -222 0.3593515291260043 -0.06361416849824304 0 -223 0.2373889375053712 -0.4000946023341276 0 -224 0.05600596672534444 -0.3582026903534058 0 -225 0.3654446467373352 -0.3654437046554016 0 -226 0.07667776057372377 -0.4233233779044261 0 -227 0.4334916324593139 -0.06393052432330396 0 -228 0.07179343033759225 -0.2810845082405963 0 -229 0.06810735186864317 -0.2009476328841135 0 -230 0.1441955258379768 -0.2303966446545607 0 -231 0.2844391541799908 -0.07552818560281363 0 -232 0.1883841865915948 -0.1499536144563917 0 -233 0.2533917520134046 -0.2547236322031965 0 -234 0.2785219510541916 -0.1476215722506409 0 -235 0.1425674588596785 -0.3441671146532657 0 -236 0.3629155847584906 -0.1147592360453619 0 -237 0.1472316548992905 -0.4335170189783639 0 -238 0.4354584321812809 -0.1336982203911391 0 -239 0.1899781981825249 -0.3721308584936966 0 -240 0.1979796054365416 -0.2994453734282311 0 -241 0.2453903447593879 -0.3274091172686621 0 -242 0.1554354110598052 -0.1564304084769732 0 -243 0.1662898562147858 -0.1901751295554762 0 -244 0.1333410806829962 -0.1966519235760577 0 -245 0.1261952230477678 -0.1189536012489036 0 -246 0.09874331776391088 -0.1464055065326662 0 -247 0.2208879693024997 -0.2023386233297941 0 -248 0.1987936389256907 -0.2425601384288786 0 -249 0.1591439985795574 -0.1124768072283221 0 -250 0.2833906089244816 -0.4500473011670638 0 -251 0.3014167921213532 -0.3827691534947646 0 -252 0.3474184635404636 -0.4327218523277008 0 -253 0.4327223233686676 -0.3474179924989554 0 -254 0.3731647952129674 -0.2878604643432553 0 -255 0.4404424718442999 -0.2698347521868091 0 -256 0.3171383478510021 -0.2325004281171527 0 -257 0.2659568515337981 -0.2011726022269187 0 -258 0.3297034473713957 -0.178949398140875 0 -259 0.3207187679063411 -0.1311904041480014 0 -260 0.3719002642235452 -0.1625182300382355 0 -261 0.4327223233686676 -0.4327218523277008 0 -262 0.1704723055956265 -0.466758509489182 0 -263 0.1923102962023309 -0.4168058106562458 0 -264 0.2155509468986668 -0.4500473011670638 0 -265 0.4404424718442999 -0.2019950901608922 0 -266 0.4081716879349403 -0.1719877222111241 0 -267 0.4677292160906404 -0.1637055883409073 0 -268 0.03405367593432158 -0.2104738164421327 0 -269 0.06995039110311771 -0.2410160705623549 0 -270 0.03589671516879613 -0.2505422541203741 0 -271 0.1433814923488277 -0.2872818796539132 0 -272 0.4677292160906404 -0.1097546908281923 0 -273 0.1165214080825037 -0.466758509489182 0 -274 0.2522195770899168 -0.03776409280140682 0 -275 0.2455913277896729 -0.07508459144279053 0 -276 0.213371750699599 -0.03732049864138372 0 -277 0.4344750323202974 -0.09881437235722154 0 -278 0.3991870084698858 -0.1242287282182505 0 -279 0.3982036086089022 -0.08934488018433293 0 -280 0.2334530688228932 -0.1487875933535163 0 -281 0.03833888028686189 -0.461661688952213 0 -282 0.08124446091972032 -0.461661688952213 0 -283 0.4667458162296569 -0.07487084279427469 0 -284 0.4667458162296569 -0.03196526216165198 0 -285 0.10615143885331 -0.2156721387693371 0 -286 0.1079944780877845 -0.2557405764475785 0 -287 0.2814805526170912 -0.1115748789267273 0 -288 0.2426327262267733 -0.1111312847667042 0 -289 0.1783717506996775 -0.03732049864138372 0 -290 0.1683236559834375 -0.07482049864151 0 -291 0.3236773694692406 -0.09514371082408776 0 -292 0.03833888028686189 -0.4266616889522997 0 -293 0.4317458162295301 -0.03196526216165198 0 -294 0.2872195770897927 -0.03776409280140682 0 -295 0.07155367593422471 -0.1654257217259456 0 -296 0.03405367593432158 -0.1754738164420568 0 -297 0.1975638439954749 -0.1122973058695796 0 -298 0.06389969853146835 -0.319643599297001 0 -299 0.1071804445986354 -0.312625811446931 0 -300 0.09928671279251149 -0.3511849025033358 0 -301 0.1096226097167012 -0.3837452462788459 0 -302 0.06634186364953411 -0.3907630341289159 0 -303 0.1448995568794845 -0.3888420668158148 0 -304 0.1119547077365072 -0.428420198441395 0 -305 0.02800298336267222 -0.3941013451767896 0 -306 0.3964215807926591 -0.06377234641077351 0 -307 0.3946757645628752 -0.03180708424912152 0 -308 0.3246757645627995 -0.03180708424912152 0 -309 0.3218953416529975 -0.06957117705052834 0 -310 0.03589671516879613 -0.2855422541204607 0 -311 0.02800298336267222 -0.3241013451768655 0 -312 0.02800298336267222 -0.3591013451768871 0 -313 0.3596757645627918 -0.03180708424912152 0 -314 0.09529699369832934 -0.1819274176908341 0 -315 0.3611335569422474 -0.08918670227180248 0 -316 0.3094181993753699 -0.310083668429299 0 -317 -0.1224866355280155 0.1629072024975547 0 -318 -0.3808849436885997 0.210277224031109 0 -319 -0.206743501399355 0.07464099728276744 0 -320 -0.3593515291260043 0.06361416849824304 0 -321 -0.2373889375053712 0.4000946023341276 0 -322 -0.05600596672534444 0.3582026903534058 0 -323 -0.3654446467373352 0.3654437046554016 0 -324 -0.07667776057372377 0.4233233779044261 0 -325 -0.4334916324593139 0.06393052432330396 0 -326 -0.07179343033759225 0.2810845082405963 0 -327 -0.06810735186864317 0.2009476328841135 0 -328 -0.1441955258379768 0.2303966446545607 0 -329 -0.2844391541799908 0.07552818560281363 0 -330 -0.1883841865915948 0.1499536144563917 0 -331 -0.2533917520134046 0.2547236322031965 0 -332 -0.2785219510541917 0.1476215722506409 0 -333 -0.1425674588596785 0.3441671146532657 0 -334 -0.3629155847584906 0.1147592360453619 0 -335 -0.1472316548992905 0.4335170189783639 0 -336 -0.4354584321812809 0.1336982203911391 0 -337 -0.1899781981825249 0.3721308584936966 0 -338 -0.1979796054365416 0.2994453734282311 0 -339 -0.2453903447593879 0.3274091172686621 0 -340 -0.1554354110598052 0.1564304084769732 0 -341 -0.1662898562147858 0.1901751295554762 0 -342 -0.1333410806829962 0.1966519235760577 0 -343 -0.1261952230477678 0.1189536012489036 0 -344 -0.09874331776391088 0.1464055065326662 0 -345 -0.2208879693024997 0.2023386233297941 0 -346 -0.1987936389256907 0.2425601384288786 0 -347 -0.1591439985795574 0.1124768072283221 0 -348 -0.2833906089244816 0.4500473011670638 0 -349 -0.3014167921213532 0.3827691534947646 0 -350 -0.3474184635404636 0.4327218523277008 0 -351 -0.4327223233686676 0.3474179924989554 0 -352 -0.3731647952129674 0.2878604643432553 0 -353 -0.4404424718442999 0.2698347521868091 0 -354 -0.3171383478510021 0.2325004281171527 0 -355 -0.2659568515337981 0.2011726022269187 0 -356 -0.3297034473713957 0.178949398140875 0 -357 -0.3207187679063411 0.1311904041480014 0 -358 -0.3719002642235452 0.1625182300382355 0 -359 -0.4327223233686676 0.4327218523277008 0 -360 -0.1704723055956265 0.466758509489182 0 -361 -0.1923102962023309 0.4168058106562458 0 -362 -0.2155509468986668 0.4500473011670638 0 -363 -0.4404424718442999 0.2019950901608922 0 -364 -0.4081716879349403 0.1719877222111241 0 -365 -0.4677292160906404 0.1637055883409073 0 -366 -0.03405367593432158 0.2104738164421327 0 -367 -0.06995039110311771 0.2410160705623549 0 -368 -0.03589671516879613 0.2505422541203741 0 -369 -0.1433814923488277 0.2872818796539132 0 -370 -0.4677292160906404 0.1097546908281923 0 -371 -0.1165214080825037 0.466758509489182 0 -372 -0.2522195770899168 0.03776409280140682 0 -373 -0.2455913277896729 0.07508459144279053 0 -374 -0.213371750699599 0.03732049864138372 0 -375 -0.4344750323202974 0.09881437235722154 0 -376 -0.3991870084698858 0.1242287282182505 0 -377 -0.3982036086089022 0.08934488018433293 0 -378 -0.2334530688228932 0.1487875933535163 0 -379 -0.03833888028686189 0.461661688952213 0 -380 -0.08124446091972032 0.461661688952213 0 -381 -0.4667458162296569 0.07487084279427469 0 -382 -0.4667458162296569 0.03196526216165198 0 -383 -0.10615143885331 0.2156721387693371 0 -384 -0.1079944780877845 0.2557405764475785 0 -385 -0.2814805526170913 0.1115748789267273 0 -386 -0.2426327262267734 0.1111312847667042 0 -387 -0.1783717506996775 0.03732049864138372 0 -388 -0.1683236559834375 0.07482049864151 0 -389 -0.3236773694692406 0.09514371082408776 0 -390 -0.03833888028686189 0.4266616889522997 0 -391 -0.4317458162295301 0.03196526216165198 0 -392 -0.2872195770897927 0.03776409280140682 0 -393 -0.07155367593422471 0.1654257217259456 0 -394 -0.03405367593432158 0.1754738164420568 0 -395 -0.1975638439954749 0.1122973058695796 0 -396 -0.06389969853146835 0.319643599297001 0 -397 -0.1071804445986354 0.312625811446931 0 -398 -0.09928671279251149 0.3511849025033358 0 -399 -0.1096226097167012 0.3837452462788459 0 -400 -0.06634186364953411 0.3907630341289159 0 -401 -0.1448995568794845 0.3888420668158148 0 -402 -0.1119547077365072 0.428420198441395 0 -403 -0.02800298336267222 0.3941013451767896 0 -404 -0.3964215807926591 0.06377234641077351 0 -405 -0.3946757645628753 0.03180708424912152 0 -406 -0.3246757645627995 0.03180708424912152 0 -407 -0.3218953416529975 0.06957117705052834 0 -408 -0.03589671516879613 0.2855422541204607 0 -409 -0.02800298336267222 0.3241013451768655 0 -410 -0.02800298336267222 0.3591013451768871 0 -411 -0.3596757645627918 0.03180708424912152 0 -412 -0.09529699369832934 0.1819274176908341 0 -413 -0.3611335569422475 0.08918670227180248 0 -414 -0.3094181993753699 0.310083668429299 0 -415 0.1224866355280155 0.1629072024975547 0 -416 0.3808849436885997 0.210277224031109 0 -417 0.206743501399355 0.07464099728276744 0 -418 0.3593515291260043 0.06361416849824304 0 -419 0.2373889375053712 0.4000946023341276 0 -420 0.05600596672534444 0.3582026903534058 0 -421 0.3654446467373352 0.3654437046554016 0 -422 0.07667776057372377 0.4233233779044261 0 -423 0.4334916324593139 0.06393052432330396 0 -424 0.07179343033759224 0.2810845082405963 0 -425 0.06810735186864313 0.2009476328841135 0 -426 0.1441955258379768 0.2303966446545607 0 -427 0.2844391541799908 0.07552818560281363 0 -428 0.1883841865915948 0.1499536144563917 0 -429 0.2533917520134046 0.2547236322031965 0 -430 0.2785219510541916 0.1476215722506409 0 -431 0.1425674588596785 0.3441671146532657 0 -432 0.3629155847584906 0.1147592360453619 0 -433 0.1472316548992905 0.4335170189783639 0 -434 0.4354584321812809 0.1336982203911391 0 -435 0.1899781981825249 0.3721308584936966 0 -436 0.1979796054365416 0.2994453734282311 0 -437 0.2453903447593879 0.3274091172686621 0 -438 0.1554354110598052 0.1564304084769732 0 -439 0.1662898562147858 0.1901751295554762 0 -440 0.1333410806829962 0.1966519235760577 0 -441 0.1261952230477678 0.1189536012489036 0 -442 0.09874331776391088 0.1464055065326662 0 -443 0.2208879693024997 0.2023386233297941 0 -444 0.1987936389256907 0.2425601384288786 0 -445 0.1591439985795574 0.1124768072283221 0 -446 0.2833906089244816 0.4500473011670638 0 -447 0.3014167921213532 0.3827691534947646 0 -448 0.3474184635404636 0.4327218523277008 0 -449 0.4327223233686676 0.3474179924989554 0 -450 0.3731647952129674 0.2878604643432553 0 -451 0.4404424718442999 0.2698347521868091 0 -452 0.3171383478510021 0.2325004281171527 0 -453 0.2659568515337981 0.2011726022269187 0 -454 0.3297034473713957 0.178949398140875 0 -455 0.3207187679063411 0.1311904041480014 0 -456 0.3719002642235452 0.1625182300382355 0 -457 0.4327223233686676 0.4327218523277008 0 -458 0.1704723055956265 0.466758509489182 0 -459 0.1923102962023309 0.4168058106562458 0 -460 0.2155509468986668 0.4500473011670638 0 -461 0.4404424718442999 0.2019950901608922 0 -462 0.4081716879349403 0.1719877222111241 0 -463 0.4677292160906404 0.1637055883409073 0 -464 0.03405367593432156 0.2104738164421327 0 -465 0.06995039110311768 0.2410160705623549 0 -466 0.03589671516879612 0.2505422541203741 0 -467 0.1433814923488277 0.2872818796539132 0 -468 0.4677292160906404 0.1097546908281923 0 -469 0.1165214080825037 0.466758509489182 0 -470 0.2522195770899168 0.03776409280140682 0 -471 0.2455913277896729 0.07508459144279053 0 -472 0.213371750699599 0.03732049864138372 0 -473 0.4344750323202974 0.09881437235722154 0 -474 0.3991870084698858 0.1242287282182505 0 -475 0.3982036086089022 0.08934488018433294 0 -476 0.2334530688228932 0.1487875933535163 0 -477 0.03833888028686189 0.461661688952213 0 -478 0.08124446091972032 0.461661688952213 0 -479 0.4667458162296569 0.07487084279427469 0 -480 0.4667458162296569 0.03196526216165198 0 -481 0.10615143885331 0.2156721387693371 0 -482 0.1079944780877845 0.2557405764475785 0 -483 0.2814805526170912 0.1115748789267273 0 -484 0.2426327262267733 0.1111312847667042 0 -485 0.1783717506996775 0.03732049864138372 0 -486 0.1683236559834375 0.07482049864151 0 -487 0.3236773694692406 0.09514371082408778 0 -488 0.03833888028686189 0.4266616889522997 0 -489 0.4317458162295301 0.03196526216165198 0 -490 0.2872195770897927 0.03776409280140682 0 -491 0.07155367593422468 0.1654257217259456 0 -492 0.03405367593432156 0.1754738164420567 0 -493 0.1975638439954749 0.1122973058695796 0 -494 0.06389969853146835 0.319643599297001 0 -495 0.1071804445986354 0.312625811446931 0 -496 0.09928671279251149 0.3511849025033358 0 -497 0.1096226097167012 0.3837452462788459 0 -498 0.06634186364953411 0.3907630341289159 0 -499 0.1448995568794845 0.3888420668158148 0 -500 0.1119547077365072 0.428420198441395 0 -501 0.02800298336267222 0.3941013451767896 0 -502 0.3964215807926591 0.06377234641077351 0 -503 0.3946757645628752 0.03180708424912152 0 -504 0.3246757645627995 0.03180708424912152 0 -505 0.3218953416529975 0.06957117705052834 0 -506 0.03589671516879612 0.2855422541204607 0 -507 0.02800298336267222 0.3241013451768655 0 -508 0.02800298336267222 0.3591013451768871 0 -509 0.3596757645627918 0.03180708424912152 0 -510 0.09529699369832932 0.1819274176908341 0 -511 0.3611335569422474 0.08918670227180248 0 -512 0.3094181993753699 0.310083668429299 0 -$EndNodes -$Elements -266 -1 8 2 4 2 2 22 25 -2 8 2 4 2 22 23 26 -3 8 2 4 2 23 24 27 -4 8 2 4 2 24 3 28 -5 8 2 1 3 3 29 32 -6 8 2 1 3 29 30 33 -7 8 2 1 3 30 31 34 -8 8 2 1 3 31 4 35 -9 8 2 2 9 6 50 53 -10 8 2 2 9 50 51 54 -11 8 2 2 9 51 52 55 -12 8 2 2 9 52 7 56 -13 8 2 1 10 7 57 60 -14 8 2 1 10 57 58 61 -15 8 2 1 10 58 59 62 -16 8 2 1 10 59 4 63 -17 8 2 4 15 2 78 81 -18 8 2 4 15 78 79 82 -19 8 2 4 15 79 80 83 -20 8 2 4 15 80 9 84 -21 8 2 3 16 9 85 88 -22 8 2 3 16 85 86 89 -23 8 2 3 16 86 87 90 -24 8 2 3 16 87 10 91 -25 8 2 2 21 6 106 109 -26 8 2 2 21 106 107 110 -27 8 2 2 21 107 108 111 -28 8 2 2 21 108 12 112 -29 8 2 3 22 12 113 116 -30 8 2 3 22 113 114 117 -31 8 2 3 22 114 115 118 -32 8 2 3 22 115 10 119 -33 9 2 11 7 129 139 141 144 145 146 -34 9 2 11 7 30 133 142 147 148 149 -35 9 2 11 7 125 136 138 150 151 152 -36 9 2 11 7 46 125 138 153 152 154 -37 9 2 11 7 136 139 138 155 156 151 -38 9 2 11 7 24 131 129 157 158 159 -39 9 2 11 7 29 126 131 160 161 162 -40 9 2 11 7 30 31 133 34 163 147 -41 9 2 11 7 45 125 46 164 153 48 -42 9 2 11 7 30 142 126 149 165 166 -43 9 2 11 7 126 140 139 167 168 169 -44 9 2 11 7 127 137 142 170 171 172 -45 9 2 11 7 137 140 142 173 174 171 -46 9 2 11 7 3 131 24 175 157 28 -47 9 2 11 7 3 29 131 32 162 175 -48 9 2 11 7 23 129 143 176 177 178 -49 9 2 11 7 23 24 129 27 159 176 -50 9 2 11 7 13 134 135 179 180 181 -51 9 2 11 7 29 30 126 33 166 160 -52 9 2 11 7 38 137 127 182 170 183 -53 9 2 11 7 136 141 139 184 145 155 -54 9 2 11 7 22 23 143 26 178 185 -55 9 2 11 7 126 142 140 165 174 167 -56 9 2 11 7 2 22 132 25 186 187 -57 9 2 11 7 4 133 31 188 163 35 -58 9 2 11 7 134 136 135 189 190 180 -59 9 2 11 7 138 139 140 156 168 191 -60 9 2 11 7 2 132 16 187 192 21 -61 9 2 11 7 5 46 128 49 193 194 -62 9 2 11 7 4 36 133 40 195 188 -63 9 2 11 7 1 135 45 196 197 47 -64 9 2 11 7 130 141 134 198 199 200 -65 9 2 11 7 130 143 141 201 202 198 -66 9 2 11 7 16 132 130 192 203 204 -67 9 2 11 7 36 127 133 205 206 195 -68 9 2 11 7 128 138 137 207 208 209 -69 9 2 11 7 137 138 140 208 191 173 -70 9 2 11 7 134 141 136 199 184 189 -71 9 2 11 7 46 138 128 154 207 193 -72 9 2 11 7 13 14 134 18 210 179 -73 9 2 11 7 5 128 39 194 211 44 -74 9 2 11 7 1 13 135 17 181 196 -75 9 2 11 7 38 39 137 43 212 182 -76 9 2 11 7 14 15 130 19 213 214 -77 9 2 11 7 15 16 130 20 204 213 -78 9 2 11 7 37 38 127 42 183 215 -79 9 2 11 7 36 37 127 41 215 205 -80 9 2 11 7 130 132 143 203 216 201 -81 9 2 11 7 125 135 136 217 190 150 -82 9 2 11 7 129 141 143 146 202 177 -83 9 2 11 7 39 128 137 211 209 212 -84 9 2 11 7 14 130 134 214 200 210 -85 9 2 11 7 22 143 132 185 216 186 -86 9 2 11 7 45 135 125 197 217 164 -87 9 2 11 7 127 142 133 172 148 206 -88 9 2 11 7 126 139 131 169 218 161 -89 9 2 11 7 129 131 139 158 218 144 -90 9 2 11 8 223 235 233 239 240 241 -91 9 2 11 8 219 232 230 242 243 244 -92 9 2 11 8 64 65 219 67 245 246 -93 9 2 11 8 230 232 233 243 247 248 -94 9 2 11 8 65 232 219 249 242 245 -95 9 2 11 8 57 223 225 250 251 252 -96 9 2 11 8 52 225 220 253 254 255 -97 9 2 11 8 220 233 234 256 257 258 -98 9 2 11 8 220 234 236 258 259 260 -99 9 2 11 8 7 225 52 261 253 56 -100 9 2 11 8 7 57 225 60 252 261 -101 9 2 11 8 58 237 223 262 263 264 -102 9 2 11 8 57 58 223 61 264 250 -103 9 2 11 8 51 220 238 265 266 267 -104 9 2 11 8 51 52 220 55 255 265 -105 9 2 11 8 39 229 228 268 269 270 -106 9 2 11 8 230 233 235 248 240 271 -107 9 2 11 8 50 51 238 54 267 272 -108 9 2 11 8 58 59 237 62 273 262 -109 9 2 11 8 69 231 221 274 275 276 -110 9 2 11 8 227 238 236 277 278 279 -111 9 2 11 8 232 234 233 280 257 247 -112 9 2 11 8 4 226 59 281 282 63 -113 9 2 11 8 6 50 227 53 283 284 -114 9 2 11 8 228 229 230 269 285 286 -115 9 2 11 8 221 231 234 275 287 288 -116 9 2 11 8 8 221 65 289 290 68 -117 9 2 11 8 231 236 234 291 259 287 -118 9 2 11 8 4 36 226 40 292 281 -119 9 2 11 8 6 227 72 284 293 77 -120 9 2 11 8 69 70 231 74 294 274 -121 9 2 11 8 5 64 229 66 295 296 -122 9 2 11 8 221 234 232 288 280 297 -123 9 2 11 8 220 236 238 260 278 266 -124 9 2 11 8 224 228 235 298 299 300 -125 9 2 11 8 224 235 226 300 301 302 -126 9 2 11 8 226 235 237 301 303 304 -127 9 2 11 8 36 224 226 305 302 292 -128 9 2 11 8 72 227 222 293 306 307 -129 9 2 11 8 70 222 231 308 309 294 -130 9 2 11 8 8 69 221 73 276 289 -131 9 2 11 8 228 230 235 286 271 299 -132 9 2 11 8 38 39 228 43 270 310 -133 9 2 11 8 65 221 232 290 297 249 -134 9 2 11 8 5 229 39 296 268 44 -135 9 2 11 8 37 38 224 42 311 312 -136 9 2 11 8 36 37 224 41 312 305 -137 9 2 11 8 70 71 222 75 313 308 -138 9 2 11 8 71 72 222 76 307 313 -139 9 2 11 8 219 230 229 244 285 314 -140 9 2 11 8 223 237 235 263 303 239 -141 9 2 11 8 38 228 224 310 298 311 -142 9 2 11 8 222 236 231 315 291 309 -143 9 2 11 8 50 238 227 272 277 283 -144 9 2 11 8 59 226 237 282 304 273 -145 9 2 11 8 64 219 229 246 314 295 -146 9 2 11 8 222 227 236 306 279 315 -147 9 2 11 8 220 225 233 254 316 256 -148 9 2 11 8 223 233 225 241 316 251 -149 9 2 11 14 321 333 331 337 338 339 -150 9 2 11 14 317 330 328 340 341 342 -151 9 2 11 14 101 102 317 104 343 344 -152 9 2 11 14 328 330 331 341 345 346 -153 9 2 11 14 102 330 317 347 340 343 -154 9 2 11 14 85 321 323 348 349 350 -155 9 2 11 14 80 323 318 351 352 353 -156 9 2 11 14 318 331 332 354 355 356 -157 9 2 11 14 318 332 334 356 357 358 -158 9 2 11 14 9 323 80 359 351 84 -159 9 2 11 14 9 85 323 88 350 359 -160 9 2 11 14 86 335 321 360 361 362 -161 9 2 11 14 85 86 321 89 362 348 -162 9 2 11 14 79 318 336 363 364 365 -163 9 2 11 14 79 80 318 83 353 363 -164 9 2 11 14 95 327 326 366 367 368 -165 9 2 11 14 328 331 333 346 338 369 -166 9 2 11 14 78 79 336 82 365 370 -167 9 2 11 14 86 87 335 90 371 360 -168 9 2 11 14 13 329 319 372 373 374 -169 9 2 11 14 325 336 334 375 376 377 -170 9 2 11 14 330 332 331 378 355 345 -171 9 2 11 14 10 324 87 379 380 91 -172 9 2 11 14 2 78 325 81 381 382 -173 9 2 11 14 326 327 328 367 383 384 -174 9 2 11 14 319 329 332 373 385 386 -175 9 2 11 14 1 319 102 387 388 105 -176 9 2 11 14 329 334 332 389 357 385 -177 9 2 11 14 10 92 324 96 390 379 -178 9 2 11 14 2 325 16 382 391 21 -179 9 2 11 14 13 14 329 18 392 372 -180 9 2 11 14 11 101 327 103 393 394 -181 9 2 11 14 319 332 330 386 378 395 -182 9 2 11 14 318 334 336 358 376 364 -183 9 2 11 14 322 326 333 396 397 398 -184 9 2 11 14 322 333 324 398 399 400 -185 9 2 11 14 324 333 335 399 401 402 -186 9 2 11 14 92 322 324 403 400 390 -187 9 2 11 14 16 325 320 391 404 405 -188 9 2 11 14 14 320 329 406 407 392 -189 9 2 11 14 1 13 319 17 374 387 -190 9 2 11 14 326 328 333 384 369 397 -191 9 2 11 14 94 95 326 99 368 408 -192 9 2 11 14 102 319 330 388 395 347 -193 9 2 11 14 11 327 95 394 366 100 -194 9 2 11 14 93 94 322 98 409 410 -195 9 2 11 14 92 93 322 97 410 403 -196 9 2 11 14 14 15 320 19 411 406 -197 9 2 11 14 15 16 320 20 405 411 -198 9 2 11 14 317 328 327 342 383 412 -199 9 2 11 14 321 335 333 361 401 337 -200 9 2 11 14 94 326 322 408 396 409 -201 9 2 11 14 320 334 329 413 389 407 -202 9 2 11 14 78 336 325 370 375 381 -203 9 2 11 14 87 324 335 380 402 371 -204 9 2 11 14 101 317 327 344 412 393 -205 9 2 11 14 320 325 334 404 377 413 -206 9 2 11 14 318 323 331 352 414 354 -207 9 2 11 14 321 331 323 339 414 349 -208 9 2 11 20 419 431 429 435 436 437 -209 9 2 11 20 415 428 426 438 439 440 -210 9 2 11 20 120 121 415 123 441 442 -211 9 2 11 20 426 428 429 439 443 444 -212 9 2 11 20 121 428 415 445 438 441 -213 9 2 11 20 113 419 421 446 447 448 -214 9 2 11 20 108 421 416 449 450 451 -215 9 2 11 20 416 429 430 452 453 454 -216 9 2 11 20 416 430 432 454 455 456 -217 9 2 11 20 12 421 108 457 449 112 -218 9 2 11 20 12 113 421 116 448 457 -219 9 2 11 20 114 433 419 458 459 460 -220 9 2 11 20 113 114 419 117 460 446 -221 9 2 11 20 107 416 434 461 462 463 -222 9 2 11 20 107 108 416 111 451 461 -223 9 2 11 20 95 425 424 464 465 466 -224 9 2 11 20 426 429 431 444 436 467 -225 9 2 11 20 106 107 434 110 463 468 -226 9 2 11 20 114 115 433 118 469 458 -227 9 2 11 20 69 427 417 470 471 472 -228 9 2 11 20 423 434 432 473 474 475 -229 9 2 11 20 428 430 429 476 453 443 -230 9 2 11 20 10 422 115 477 478 119 -231 9 2 11 20 6 106 423 109 479 480 -232 9 2 11 20 424 425 426 465 481 482 -233 9 2 11 20 417 427 430 471 483 484 -234 9 2 11 20 8 417 121 485 486 124 -235 9 2 11 20 427 432 430 487 455 483 -236 9 2 11 20 10 92 422 96 488 477 -237 9 2 11 20 6 423 72 480 489 77 -238 9 2 11 20 69 70 427 74 490 470 -239 9 2 11 20 11 120 425 122 491 492 -240 9 2 11 20 417 430 428 484 476 493 -241 9 2 11 20 416 432 434 456 474 462 -242 9 2 11 20 420 424 431 494 495 496 -243 9 2 11 20 420 431 422 496 497 498 -244 9 2 11 20 422 431 433 497 499 500 -245 9 2 11 20 92 420 422 501 498 488 -246 9 2 11 20 72 423 418 489 502 503 -247 9 2 11 20 70 418 427 504 505 490 -248 9 2 11 20 8 69 417 73 472 485 -249 9 2 11 20 424 426 431 482 467 495 -250 9 2 11 20 94 95 424 99 466 506 -251 9 2 11 20 121 417 428 486 493 445 -252 9 2 11 20 11 425 95 492 464 100 -253 9 2 11 20 93 94 420 98 507 508 -254 9 2 11 20 92 93 420 97 508 501 -255 9 2 11 20 70 71 418 75 509 504 -256 9 2 11 20 71 72 418 76 503 509 -257 9 2 11 20 415 426 425 440 481 510 -258 9 2 11 20 419 433 431 459 499 435 -259 9 2 11 20 94 424 420 506 494 507 -260 9 2 11 20 418 432 427 511 487 505 -261 9 2 11 20 106 434 423 468 473 479 -262 9 2 11 20 115 422 433 478 500 469 -263 9 2 11 20 120 415 425 442 510 491 -264 9 2 11 20 418 423 432 502 475 511 -265 9 2 11 20 416 421 429 450 512 452 -266 9 2 11 20 419 429 421 437 512 447 -$EndElements diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/model.geo b/dG3D/benchmarks/multiscaleEnhanceStrain/model.geo deleted file mode 100644 index 5caeb00744a8b19b16659c8476dc0be94235cb44..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/model.geo +++ /dev/null @@ -1,29 +0,0 @@ - -mm=1.0; -L=6.*mm; -H = 1*mm; -sl1=0.5*L; -Point(1)={0,0,0,sl1}; -Point(2)={L,0,0,sl1}; -Point(3)={L,H,0,sl1}; -Point(4)={0,H,0,sl1}; -Line(1)={1,2}; -Line(2)={2,3}; -Line(3)={3,4}; -Line(4)={4,1}; - -l[0]=newreg; -Line Loop(l[0])={1,2,3,4}; -Plane Surface(11)={l[0]}; - -Physical Surface(11)={11}; -Physical Line(1)={1}; -Physical Line(2)={2}; -Physical Line(3)={3}; -Physical Line(4)={4}; - -Transfinite Surface{11}; -//+ -Transfinite Line {3, 1} = 3 Using Progression 1; -//+ -Transfinite Line {4, 2} = 2 Using Progression 1; diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/model.msh b/dG3D/benchmarks/multiscaleEnhanceStrain/model.msh deleted file mode 100644 index 5e17961bc16527a2472fc1d059f1be30886f43ab..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/model.msh +++ /dev/null @@ -1,25 +0,0 @@ -$MeshFormat -2.2 0 8 -$EndMeshFormat -$Nodes -6 -1 0 0 0 -2 6 0 0 -3 6 1 0 -4 0 1 0 -5 2.999999999988572 0 0 -6 3.000000000008324 1 0 -$EndNodes -$Elements -10 -1 1 2 1 1 1 5 -2 1 2 1 1 5 2 -3 1 2 2 2 2 3 -4 1 2 3 3 3 6 -5 1 2 3 3 6 4 -6 1 2 4 4 4 1 -7 2 2 11 11 1 5 4 -8 2 2 11 11 4 5 6 -9 2 2 11 11 5 2 6 -10 2 2 11 11 6 2 3 -$EndElements diff --git a/dG3D/benchmarks/multiscaleEnhanceStrain/model.py b/dG3D/benchmarks/multiscaleEnhanceStrain/model.py deleted file mode 100644 index 84375902e16bb88aad0ebcda12b774f248c70927..0000000000000000000000000000000000000000 --- a/dG3D/benchmarks/multiscaleEnhanceStrain/model.py +++ /dev/null @@ -1,188 +0,0 @@ -#coding-Utf-8-*- -from gmshpy import * -from dG3Dpy import* - -#script to launch PBC problem with a python script - -#DEFINE MICRO PROBLEM - -# micro-material law -lawnum1 = 11 # unique number of law - - -rho = 7850e-9 -young = 28.9e3 -nu = 0.3 -sy0 = 99. -h = young/20. - -harden = LinearExponentialJ2IsotropicHardening(1, sy0, h, 0., 10.) -cl = IsotropicCLengthLaw(1, 1e-2) -damlaw = SimpleSaturateDamageLaw(1, 50.,1.,0.,1.) -law1 = NonLocalDamageJ2HyperDG3DMaterialLaw(lawnum1,rho,young,nu,harden,cl,damlaw) - - -harden = LinearExponentialJ2IsotropicHardening(1, sy0*0.5, h, 0., 10.) -cl = IsotropicCLengthLaw(1, 1e-2) -damlaw = SimpleSaturateDamageLaw(1, 50.,1.,0.,1.) -law2 = NonLocalDamageJ2HyperDG3DMaterialLaw(lawnum1,rho,young,nu,harden,cl,damlaw) - - -micromeshfile="micro.msh" # name of mesh file -#micromeshfile="square.msh" # name of mesh file - -# creation of part Domain -nfield = 11 # number of the field (physical number of entity) -myfield1 = dG3DDomain(1000,nfield,0,lawnum1,0,2,1) -myfield1.setNonLocalEqRatio(1.e3) - - -microBC = nonLinearPeriodicBC(1000,2) -microBC.setOrder(1) -microBC.setBCPhysical(1,4,3,2) -# periodiodic BC -method = 0 # Periodic mesh = 0 Langrange interpolation = 1 Cubic spline interpolation =2 -degree = 5 -addvertex = False -microBC.setPeriodicBCOptions(method, degree,addvertex) - -# DEFINE MACROPROBLEM -matnum1 = 1; -macromat1 = enhancedStraindG3DMultiscaleMaterialLaw(matnum1, 1000) -#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); - -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.) - - - -macromeshfile="model.msh" # name of mesh file - -# solver -sol = 2 # Gmm=0 (default) Taucs=1 PETsc=2 -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) - - -# creation of macro part Domain - -# non DG domain -nfield1 = 11 -beta1 = 1e2 -macrodomain1 = dG3DEnhancedDomain(10,nfield1,0,matnum1,0,2) -macrodomain1.stabilityParameters(beta1) -macrodomain1.setDistributedOtherRanks(True) -macrodomain1.distributeOnRootRank(False) - - -# creation of Solver -mysolver = nonLinearMechSolver(1000) -mysolver.loadModel(macromeshfile) -mysolver.addDomain(macrodomain1) -mysolver.addMaterialLaw(macromat1) -mysolver.Scheme(soltype) -mysolver.Solver(sol) -mysolver.snlData(nstep,ftime,tol) - -# boundary condition -mysolver.displacementBC("Face",11,2,0.0) -mysolver.displacementBC("Face",11,1,0.0) -mysolver.displacementBC("Edge",1,1,0.0) -mysolver.displacementBC("Edge",2,0,0.04) -mysolver.displacementBC("Edge",4,0,0.0) - -mysolver.options("-ksp_type preonly -pc_type lu -pc_factor_mat_solver_package petsc -pc_factor_shift_type NONZERO") - -# archivage -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("Green-Lagrange equivalent strain",IPField.GL_EQUIVALENT_STRAIN, 1, 1); -mysolver.internalPointBuildView("Equivalent plastic strain",IPField.PLASTICSTRAIN, 1, 1); -mysolver.internalPointBuildView("Damage",IPField.DAMAGE,1,1); - -mysolver.internalPointBuildView("ExtraField Norm",IPField.EXTRAFIELD_NORM, 1, 1) -mysolver.internalPointBuildView("ExtraField 1",IPField.EXTRAFIELD_1, 1, 1) -mysolver.internalPointBuildView("ExtraField 2",IPField.EXTRAFIELD_2, 1, 1) -mysolver.internalPointBuildView("ExtraField 3",IPField.EXTRAFIELD_3, 1, 1) -mysolver.internalPointBuildView("ExtraField 4",IPField.EXTRAFIELD_4, 1, 1) -mysolver.internalPointBuildView("ExtraField 5",IPField.EXTRAFIELD_5, 1, 1) -mysolver.internalPointBuildView("ExtraField 6",IPField.EXTRAFIELD_6, 1, 1) -mysolver.internalPointBuildView("ExtraField 7",IPField.EXTRAFIELD_7, 1, 1) -mysolver.internalPointBuildView("ExtraField 8",IPField.EXTRAFIELD_8, 1, 1) -mysolver.internalPointBuildView("ExtraField 9",IPField.EXTRAFIELD_9, 1, 1) - -mysolver.archivingForceOnPhysicalGroup("Edge",4,0) - - -# solve -mysolver.solve() - -check = TestCheck() -check.equal(-4.573813e+01,mysolver.getArchivedForceOnPhysicalGroup("Edge", 4, 0),1.e-4) - diff --git a/dG3D/src/CMakeLists.txt b/dG3D/src/CMakeLists.txt index 06dd5728e4bd8f534f9c426309cf21d758661455..4f9572a3a64cd384a129e9ef230a0f7e7d988248 100644 --- a/dG3D/src/CMakeLists.txt +++ b/dG3D/src/CMakeLists.txt @@ -19,7 +19,6 @@ set(SRC dG3DCohesiveBandIPVariable.cpp dG3DCohesiveBandMaterialLaw.cpp dG3DMultiscaleMaterialLaw.cpp - multipleFieldDG3DTerms.cpp dG3DMultiscaleIPVariable.cpp hoDGPartDomain.cpp hoDGMaterialLaw.cpp @@ -33,11 +32,7 @@ set(SRC dG3DFilterDofComponent.h dG3DFunctionSpace.h dG3DDof3IntType.h - # inlined other extension ?? - dG3DEnhancedStrainIPVariable.cpp - dG3DEnhancedDomain.cpp - dG3DEnhancedStrainMaterialLaw.cpp - embeddedLocalizationBand.cpp + # axisymmetricDG3DDomain.cpp axisymmetricDG3DTerms.cpp axisymmetricDG3DPathFollowingTerms.cpp diff --git a/dG3D/src/axisymmetricDG3DDomain.cpp b/dG3D/src/axisymmetricDG3DDomain.cpp index 84b2127d0d4bb65b238b71ddabe1637637f8c631..9d21b5d5ba1c1ae1eb4b4593a616935cd097f1d0 100644 --- a/dG3D/src/axisymmetricDG3DDomain.cpp +++ b/dG3D/src/axisymmetricDG3DDomain.cpp @@ -12,15 +12,12 @@ #include "axisymmetricDG3DDomain.h" #include "STensorOperations.h" #include "axisymmetricDG3DTerms.h" -#include "multipleFieldDG3DTerms.h" #include "nonLinearMechSolver.h" #include "dG3DHomogenizedTangentTerms.h" #include "pathFollowingTerms.h" #include "nonLocalDamageDG3DIPVariable.h" #include "axisymmetricDG3DPathFollowingTerms.h" #include "FractureCohesiveDG3DMaterialLaw.h" -#include "extraFieldFunctionSpace.h" - #ifndef M_PI #define M_PI 3.14159265358979323846 @@ -150,7 +147,7 @@ void axisymmetricDG3DDomain::computeStrain(MElement *e, const int npts_bulk, Int void axisymmetricDG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt, bool useBarF) + fullVector<double> &dispp, const bool virt, bool useBarF) { // Compute strain at the interface element // get element @@ -548,8 +545,8 @@ void axisymmetricDG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *i // Compute spatial gradient of jump on interface at interface IP if (cohipvfm->withJumpGradient() and cohipvfp->withJumpGradient()){ // get shape function values and gradients at the IP - const std::vector<TensorialTraits<double>::ValType>& Val = ipvm->f(_extraSpace,ie,GP[j]); - const std::vector<TensorialTraits<double>::GradType>& gradVal = ipvm->gradf(_extraSpace,ie,GP[j]); + const std::vector<TensorialTraits<double>::ValType>& Val = ipvm->f(_spaceminus,ie,GP[j]); + const std::vector<TensorialTraits<double>::GradType>& gradVal = ipvm->gradf(_spaceminus,ie,GP[j]); STensor3& Gradjumpm = cohipvfm->getRefToJumpGradient(); STensorOperation::zero(Gradjumpm); @@ -567,53 +564,8 @@ void axisymmetricDG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *i cohipvfp->getRefToJumpGradient() = Gradjumpm; }; } - - if (IsMultipleFieldFormulation()) - { - // compute extra field at gauss points - const std::vector<TensorialTraits<double>::ValType>& Vals = ipvm->f(_extraSpace,ie,GP[j]); - extraFieldFunctionSpace* extraStp = static_cast<extraFieldFunctionSpace*>(_extraSpace); - int numExtraKey = extraStp->getNumExtraKeysPerVertex(); - fullVector<double> extraVal; - extraVal.resize(numExtraKey,true); - for (int id = 0; id < numExtraKey; id++){ - if (this->getEnrichedUnknownLocation() == partDomain::NODE){ - for (int i=0; i< nbvertexInter; i++){ - extraVal(id) += Vals[i]*dispExtra(i+id*nbvertexInter); - } - } - else if (this->getEnrichedUnknownLocation() == partDomain::GP){ - extraVal(id) = dispExtra(j+id*npts); - } - } - - double hs = ie->getCharacteristicSize(); - if (this->getMultipleFieldMethod() == dgPartDomain::TWOFIELD){ - SVector3& iJump = ipvm->getRefToIncompatibleJump(); - iJump(0) = extraVal(0)/(_beta1*hs); - iJump(1) = extraVal(1)/(_beta1*hs); - iJump(2) = extraVal(2)/(_beta1*hs); - ipvp->getRefToIncompatibleJump() = iJump; - - // full two field - static SVector3 refN; - refN = ipvm->getConstRefToReferenceOutwardNormal(); - refN.normalize(); - // update interface deformation gradients with incompatible strain field - for (int p=0; p<3; p++){ - for (int q=0; q<3; q++){ - Fm(p,q) += (iJump(p)*refN(q)); - Fp(p,q) += (iJump(p)*refN(q)); - } - } - } - else{ - Msg::Error("two field method %d is not correctly defined",this->getMultipleFieldMethod()); - } - } } } - }; @@ -666,59 +618,50 @@ void axisymmetricDG3DDomain::createTerms(unknownField *uf,IPField*ip) } // DG terms - if(_fullDg){ - // Optionnal MultipleFieldFormulation - if (IsMultipleFieldFormulation()){ - Msg::Error("axisymmetricDG3DDomain::createTerms MultipleFieldFormulation has not been verified in axisymmetricDG3DDomain"); + if(_fullDg) + { + ltermBound = new axisymmetricDG3DForceInter(*dgspace,dgspace,_mlaw,_mlaw,_interQuad,_beta1,_fullDg,ip,_incrementNonlocalBased); + dG3DLinearTerm<double>* gltermBound = static_cast<dG3DLinearTerm<double>*>(ltermBound); + if( getNumNonLocalVariable() >0) + { + gltermBound->setNonLocalEqRatio(getNonLocalEqRatio()); + gltermBound->setNumNonLocalVariable(getNumNonLocalVariable()); + gltermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + gltermBound->setNonLocalContinuity(getNonLocalContinuity()); } - else{ - ltermBound = new axisymmetricDG3DForceInter(*dgspace,dgspace,_mlaw,_mlaw,_interQuad,_beta1,_fullDg,ip,_incrementNonlocalBased); - dG3DLinearTerm<double>* gltermBound = static_cast<dG3DLinearTerm<double>*>(ltermBound); - if( getNumNonLocalVariable() >0) - { - gltermBound->setNonLocalEqRatio(getNonLocalEqRatio()); - gltermBound->setNumNonLocalVariable(getNumNonLocalVariable()); - gltermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - gltermBound->setNonLocalContinuity(getNonLocalContinuity()); - } - if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ - gltermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - gltermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - gltermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - gltermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - gltermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - gltermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - gltermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - } + if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ + gltermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + gltermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + gltermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + gltermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + gltermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + gltermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + gltermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); } // Stiffness computation if(_interByPert){ btermBound = new BilinearTermPerturbation<double>(ltermBound,*dgspace,*dgspace,uf,ip,this,_eps); } - else{ - if (IsMultipleFieldFormulation()){ - Msg::Error("axisymmetricDG3DDomain::createTerms MultipleFieldFormulation has not been verified in axisymmetricDG3DDomain"); + else + { + btermBound = new axisymmetricDG3DStiffnessInter(*dgspace,*dgspace,_mlaw,_mlaw,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased); + dG3DBilinearTerm<double,double>* gbtermBound = static_cast<dG3DBilinearTerm<double,double>*>(btermBound); + if( getNumNonLocalVariable() >0) + { + gbtermBound->setNonLocalEqRatio(getNonLocalEqRatio()); + gbtermBound->setNumNonLocalVariable(getNumNonLocalVariable()); + gbtermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + gbtermBound->setNonLocalContinuity(getNonLocalContinuity()); } - else{ - btermBound = new axisymmetricDG3DStiffnessInter(*dgspace,*dgspace,_mlaw,_mlaw,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased); - dG3DBilinearTerm<double,double>* gbtermBound = static_cast<dG3DBilinearTerm<double,double>*>(btermBound); - if( getNumNonLocalVariable() >0) - { - gbtermBound->setNonLocalEqRatio(getNonLocalEqRatio()); - gbtermBound->setNumNonLocalVariable(getNumNonLocalVariable()); - gbtermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - gbtermBound->setNonLocalContinuity(getNonLocalContinuity()); - } - if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ - gbtermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - gbtermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - gbtermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - gbtermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - gbtermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - gbtermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - gbtermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - } + if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ + gbtermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + gbtermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + gbtermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + gbtermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + gbtermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + gbtermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + gbtermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); } } } @@ -1031,29 +974,23 @@ void axisymmetricInterDomainBetween3D::createTerms(unknownField *uf,IPField*ip) this->massterm = new BiNonLinearTermVoid(); // DG terms - // Optionnal MultipleFieldFormulation - if (IsMultipleFieldFormulation()){ - Msg::Error("axisymmetricDG3DDomain::createTerms MultipleFieldFormulation has not been verified in axisymmetricDG3DDomain"); + ltermBound = new axisymmetricDG3DForceInter(*spMinus,spPlus,_mlawMinus,_mlawPlus,_interQuad,_beta1,_fullDg,ip,_incrementNonlocalBased); + dG3DLinearTerm<double>* gltermBound = static_cast<dG3DLinearTerm<double>*>(ltermBound); + if( getNumNonLocalVariable() >0) + { + gltermBound->setNonLocalEqRatio(getNonLocalEqRatio()); + gltermBound->setNumNonLocalVariable(getNumNonLocalVariable()); + gltermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + gltermBound->setNonLocalContinuity(getNonLocalContinuity()); } - else{ - ltermBound = new axisymmetricDG3DForceInter(*spMinus,spPlus,_mlawMinus,_mlawPlus,_interQuad,_beta1,_fullDg,ip,_incrementNonlocalBased); - dG3DLinearTerm<double>* gltermBound = static_cast<dG3DLinearTerm<double>*>(ltermBound); - if( getNumNonLocalVariable() >0) - { - gltermBound->setNonLocalEqRatio(getNonLocalEqRatio()); - gltermBound->setNumNonLocalVariable(getNumNonLocalVariable()); - gltermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - gltermBound->setNonLocalContinuity(getNonLocalContinuity()); - } - if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ - gltermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - gltermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - gltermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - gltermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - gltermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - gltermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - gltermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - } + if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ + gltermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + gltermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + gltermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + gltermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + gltermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + gltermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + gltermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); } // Stiffness computation @@ -1061,28 +998,23 @@ void axisymmetricInterDomainBetween3D::createTerms(unknownField *uf,IPField*ip) btermBound = new BilinearTermPerturbation<double>(ltermBound,*spMinus,*spPlus,uf,ip,this,_eps); } else{ - if (IsMultipleFieldFormulation()){ - Msg::Error("axisymmetricDG3DDomain::createTerms MultipleFieldFormulation has not been verified in axisymmetricDG3DDomain"); + btermBound = new axisymmetricDG3DStiffnessInter(*spMinus,*spPlus,_mlawMinus,_mlawPlus,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased); + dG3DBilinearTerm<double,double>* gbtermBound = static_cast<dG3DBilinearTerm<double,double>*>(btermBound); + if( getNumNonLocalVariable() >0) + { + gbtermBound->setNonLocalEqRatio(getNonLocalEqRatio()); + gbtermBound->setNumNonLocalVariable(getNumNonLocalVariable()); + gbtermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + gbtermBound->setNonLocalContinuity(getNonLocalContinuity()); } - else{ - btermBound = new axisymmetricDG3DStiffnessInter(*spMinus,*spPlus,_mlawMinus,_mlawPlus,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased); - dG3DBilinearTerm<double,double>* gbtermBound = static_cast<dG3DBilinearTerm<double,double>*>(btermBound); - if( getNumNonLocalVariable() >0) - { - gbtermBound->setNonLocalEqRatio(getNonLocalEqRatio()); - gbtermBound->setNumNonLocalVariable(getNumNonLocalVariable()); - gbtermBound->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - gbtermBound->setNonLocalContinuity(getNonLocalContinuity()); - } - if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ - gbtermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - gbtermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - gbtermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - gbtermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - gbtermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - gbtermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - gbtermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - } + if (getNumConstitutiveExtraDofDiffusionVariable() > 0){ + gbtermBound->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + gbtermBound->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + gbtermBound->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + gbtermBound->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + gbtermBound->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + gbtermBound->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + gbtermBound->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); } } @@ -1113,107 +1045,6 @@ void axisymmetricInterDomainBetween3D::createTerms(unknownField *uf,IPField*ip) btermElasticTangent = new BiNonLinearTermVoid(); } -void axisymmetricInterDomainBetween3D::initializeTerms(unknownField *uf,IPField*ip) -{ - - createTerms(uf,ip); - initializeFractureBase(uf,ip, gi, integBound); -} - -void axisymmetricInterDomainBetween3D::computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF ){ - IntPt *GP; - fullVector<double> dispm; - fullVector<double> dispp; - fullVector<double> dispExtra; - std::vector<Dof> R; - - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it){ - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(it->second); - R.clear(); - this->getMinusDomain()->getFunctionSpace()->getKeys(iele->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - this->getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeStrain(aips,iele,GP,ws,_domMinus,_domPlus,dispm,dispp,dispExtra,virt, useBarF); - } -}; - -void axisymmetricInterDomainBetween3D::computeIPVariable(AllIPState *aips,const unknownField *ufield, - const IPStateBase::whichState ws, bool stiff) -{ - _evalStiff = false; - if (ws == IPStateBase::initial) - { - this->initialIPVariable(aips,ufield,ws,stiff); - } - else - { - - #if defined(HAVE_MPI) - if ((this->getMaterialLawMinus()->isNumeric() or this->getMaterialLawPlus()->isNumeric()) and this->_otherRanks.size()>0){ - dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawMinus()); - dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawPlus()); - if (mlawMinus->getUseBarF()!=mlawPlus->getUseBarF()) - Msg::Error("axisymmetricInterDomainBetween3D::computeIpv All the constitutive laws need to use Fbar or not"); - bool useBarF=mlawMinus->getUseBarF(); - this->computeIPVariableMPI(aips,ufield,ws,stiff, useBarF); - } - else - #endif //HAVE_MPI - { - dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawMinus()); - dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawPlus()); - if (mlawMinus->getUseBarF()!=mlawPlus->getUseBarF()) - Msg::Error("axisymmetricInterDomainBetween3D::computeIpv All the constitutive laws need to use Fbar or not"); - bool useBarF=mlawMinus->getUseBarF(); - this->computeAllIPStrain(aips,ufield,ws,false, useBarF); - IntPt *GP; - fullVector<double> dispm; - fullVector<double> dispp; - fullVector<double> dispExtra; - std::vector<Dof> R; - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it){ - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(it->second); - int npts_inter= integBound->getIntPoints(it->second,&GP); - R.clear(); - this->getMinusDomain()->getFunctionSpace()->getKeys(iele->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - this->getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,dispExtra,false,stiff); - } - } - } - _evalStiff = true; -} void axisymmetricInterDomainBetween3D::setMaterialLaw(const std::map<int,materialLaw*> &maplaw) { diff --git a/dG3D/src/axisymmetricDG3DDomain.h b/dG3D/src/axisymmetricDG3DDomain.h index e7160222d3dcdb5d7ae7b98ec868ad07fd1b44bf..b4ae91335a89bcd348cda9477b204073a0b10d53 100644 --- a/dG3D/src/axisymmetricDG3DDomain.h +++ b/dG3D/src/axisymmetricDG3DDomain.h @@ -32,7 +32,7 @@ class axisymmetricDG3DDomain : public dG3DDomain{ IPStateBase::whichState ws, fullVector<double> &disp, bool useBarF) const; virtual void computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt, bool useBarF); + fullVector<double> &dispp, const bool virt, bool useBarF); virtual void createTerms(unknownField *uf,IPField*ip); virtual LinearTermBase<double>* createNeumannTerm(FunctionSpace<double> *spneu, const elementGroup* g, @@ -71,11 +71,6 @@ class axisymmetricInterDomainBetween3D : public interDomainBase, public axisymme axisymmetricInterDomainBetween3D(const axisymmetricInterDomainBetween3D &source); virtual ~axisymmetricInterDomainBetween3D(){} - //virtual void setGaussIntegrationRule(); - virtual void computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF); - virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, - bool stiff=true); - virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw); // FOLLOWING FUNCTION SHOULD STAY HERE BECAUSE OF THE DOUBLE DERIVATION virtual materialLaw* getMaterialLaw(){return _mlaw;} @@ -92,7 +87,6 @@ class axisymmetricInterDomainBetween3D : public interDomainBase, public axisymme virtual const partDomain* getPlusDomain() const{return _domPlus;} virtual partDomain* getMinusDomain(){return _domMinus;} virtual partDomain* getPlusDomain() {return _domPlus;} - void initializeTerms(unknownField *uf,IPField *ip); virtual void createTerms(unknownField *uf,IPField*ip); // as there is no elerment on a interDomain empty function. The interface element on an interDomain diff --git a/dG3D/src/dG3D1DDomain.cpp b/dG3D/src/dG3D1DDomain.cpp index 13ab07594b89439d6ee0d9bffaba0ec76a6de75c..ea5beff3a1b8f39a1d311cf5538400b599f575c1 100644 --- a/dG3D/src/dG3D1DDomain.cpp +++ b/dG3D/src/dG3D1DDomain.cpp @@ -134,14 +134,8 @@ void dG3D1DDomain::createTerms(unknownField *uf,IPField*ip) linearTermPFBound = new nonLinearTermVoid(); } else{ - if (this->IsMultipleFieldFormulation()){ - scalarTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } - else{ - scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } + scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); + linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); } } else{ @@ -177,14 +171,8 @@ void dG3D1DDomain::createTerms(unknownField *uf,IPField*ip) linearTermPFBound = new nonLinearTermVoid(); } else{ - if (this->IsMultipleFieldFormulation()){ - scalarTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } - else{ - scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } + scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); + linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); } } else{ diff --git a/dG3D/src/dG3D1DDomain.h b/dG3D/src/dG3D1DDomain.h index 73080ffc87764a5df34292a3c265098c70289e62..6be47fc70e36b7e65df26135ba52942db563f758 100644 --- a/dG3D/src/dG3D1DDomain.h +++ b/dG3D/src/dG3D1DDomain.h @@ -40,7 +40,7 @@ class dG3D1DDomain : public dG3DDomain{ 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){ + fullVector<double> &dispp, const bool virt, bool stiff,const bool checkfrac=true){ Msg::Error("dG3D1DDomain::computeIpv has not been implemented"); }; diff --git a/dG3D/src/dG3DDomain.cpp b/dG3D/src/dG3DDomain.cpp index e66310a383bceafde0802a091b8126070307e3f6..52e06f40cc68896c42a1142ad04d0899b603a352 100644 --- a/dG3D/src/dG3DDomain.cpp +++ b/dG3D/src/dG3DDomain.cpp @@ -19,8 +19,6 @@ #include "MInterfaceLine.h" #include "MInterfacePoint.h" #include "dG3DMultiscaleMaterialLaw.h" -#include "extraFieldFunctionSpace.h" -#include "multipleFieldDG3DTerms.h" #include "terms.h" #include "pathFollowingTerms.h" #include "dG3DHomogenizedTangentTerms.h" @@ -54,7 +52,6 @@ dG3DDomain::dG3DDomain (const int tag,const int phys, const int ws, const int ln _constitutiveCurlAccountMecaSource(false), _incrementNonlocalBased(false), _planeStressState(false), - _extraSpace(NULL), _space(NULL), _gaussorderbulk(-1), _gaussorderbound(-1), @@ -114,7 +111,6 @@ 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); } dG3DDomain::dG3DDomain(const dG3DDomain &source) : dgPartDomain(source), @@ -139,7 +135,6 @@ dG3DDomain::dG3DDomain(const dG3DDomain &source) : dgPartDomain(source), _constitutiveCurlAccountMecaSource(source._constitutiveCurlAccountMecaSource), _incrementNonlocalBased(source._incrementNonlocalBased), _planeStressState(source._planeStressState), - _extraSpace(NULL), _space(NULL), _gaussorderbulk(source._gaussorderbulk), _gaussorderbound(source._gaussorderbound), @@ -200,13 +195,11 @@ dG3DDomain::dG3DDomain(const dG3DDomain &source) : dgPartDomain(source), default: Msg::Error("Function space type is unknown on domain %d",getTag()); } - _extraSpace = new extraFieldFunctionSpace(this,getTag(),3); } dG3DDomain::~dG3DDomain(){ if (_interQuad) {delete _interQuad; _interQuad = NULL;}; if (_space) {delete _space; _space = NULL;}; - if (_extraSpace) {delete _extraSpace; _extraSpace = NULL;} }; void dG3DDomain::setMaterialLaw(const std::map<int,materialLaw*> &maplaw) @@ -278,7 +271,7 @@ void dG3DDomain::usePrimaryShapeFunction(const int comp) { if (comp == 0 || comp==1 || comp ==2) { - Msg::Info("use primary FE approximation for displacement field !!!"); + Msg::Info("Primary FE approximation is used for displacement field"); sp->usePrimaryShapeFunction(0); sp->usePrimaryShapeFunction(1); sp->usePrimaryShapeFunction(2); @@ -286,7 +279,7 @@ void dG3DDomain::usePrimaryShapeFunction(const int comp) else { sp->usePrimaryShapeFunction(comp); - Msg::Info("use primary FE approximation for comp %d !!!",comp); + Msg::Info("Primary FE approximation is used for comp %d",comp); } } else @@ -703,34 +696,14 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) btermElasticBulk = new dG3DElasticStiffnessBulk(*dgspace,_mlaw,_fullDg,ip); - if(_fullDg){ - if (IsMultipleFieldFormulation()){ - if (getMultipleFieldMethod() == dgPartDomain::TWOFIELD){ - ltermBound = new twoFieldDG3DForceInter(this,ip,_EqMultiFieldFactor,_beta1); - } - else{ - Msg::Error("two field method %d has not been correctly defined",getMultipleFieldMethod()); - } - } - else{ - ltermBound = new dG3DForceInter(*dgspace,dgspace,_mlaw,_mlaw,_interQuad,_beta1,_fullDg,ip,_incrementNonlocalBased); - } + if(_fullDg) + { + ltermBound = new dG3DForceInter(*dgspace,dgspace,_mlaw,_mlaw,_interQuad,_beta1,_fullDg,ip,_incrementNonlocalBased); if(_interByPert) btermBound = new BilinearTermPerturbation<double>(ltermBound,*dgspace,*dgspace,uf,ip,this,_eps); - else{ - if (IsMultipleFieldFormulation()){ - if (getMultipleFieldMethod() == dgPartDomain::TWOFIELD){ - btermBound = new twoFieldDG3DStiffnessInter(this,ip,_EqMultiFieldFactor,_beta1); - } - else - { - Msg::Error("two field method %d has not been correctly defined",getMultipleFieldMethod()); - } - } - else - { - btermBound = new dG3DStiffnessInter(*dgspace,*dgspace,_mlaw,_mlaw,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased); - } + else + { + btermBound = new dG3DStiffnessInter(*dgspace,*dgspace,_mlaw,_mlaw,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased); } } else @@ -755,18 +728,15 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) if(_fullDg) { - if(!IsMultipleFieldFormulation()) - { - (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); - (static_cast<dG3DForceInter*>(ltermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); - (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalContinuity(getNonLocalContinuity()); - if (!_interByPert){ - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalContinuity(getNonLocalContinuity()); - } + (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); + (static_cast<dG3DForceInter*>(ltermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); + (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalContinuity(getNonLocalContinuity()); + if (!_interByPert){ + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalContinuity(getNonLocalContinuity()); } } } @@ -787,25 +757,22 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) } if(_fullDg) { - if(!IsMultipleFieldFormulation()) + (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); + if(!_interByPert) { - (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - if(!_interByPert) - { - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - } + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); } } } @@ -824,19 +791,16 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) } if(_fullDg) { - if(!IsMultipleFieldFormulation()) + (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); + if(!_interByPert) { - (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); - if(!_interByPert) - { - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); - } + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); } } } @@ -855,19 +819,15 @@ void dG3DDomain::createTerms(unknownField *uf,IPField*ip) linearTermPF = new dG3DDissipationPathFollowingBulkLinearTerm(this,ip); } - if (getSolver()->getPathFollowingLocation() == pathFollowingManager::BULK){ + if (getSolver()->getPathFollowingLocation() == pathFollowingManager::BULK) + { scalarTermPFBound = new nonLinearScalarTermVoid(); linearTermPFBound = new nonLinearTermVoid(); } - else{ - if (this->IsMultipleFieldFormulation()){ - scalarTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } - else{ - scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } + else + { + scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); + linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); } } else{ @@ -884,32 +844,32 @@ void dG3DDomain::initializeTerms(unknownField *uf,IPField*ip) { createTerms(uf,ip); - /* same value for fracture strength on both side */ - // not very elegant put very efficient to put here - if(_mlaw->getType() == materialLaw::fracture) - { - // loop on ipvariable - IntPt *GP; - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it) - { - MElement *ele = it->second; - int npts_inter=integBound->getIntPoints(ele,&GP); - AllIPState::ipstateElementContainer *vips = ip->getAips()->getIPstate(ele->getNum()); - for(int j=0;j<npts_inter;j++){ // npts_inter points on both sides - IPStateBase* ipsm = (*vips)[j]; - IPStateBase* ipsp = (*vips)[j+npts_inter]; - FractureCohesive3DIPVariable *ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::initial)); - FractureCohesive3DIPVariable *ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::initial)); - ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); - ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::previous)); - ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::previous)); - ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); - ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::current)); - ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::current)); - ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); - } - } - } + /* same value for fracture strength on both side */ + // not very elegant put very efficient to put here + if(getMaterialLawMinus()->getType() == materialLaw::fracture and getMaterialLawPlus()->getType() == materialLaw::fracture) + { + // loop on ipvariable + IntPt *GP; + for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it) + { + MElement *ele = it->second; + int npts_inter=integBound->getIntPoints(ele,&GP); + AllIPState::ipstateElementContainer *vips = ip->getAips()->getIPstate(ele->getNum()); + for(int j=0;j<npts_inter;j++){ // npts_inter points on both sides + IPStateBase* ipsm = (*vips)[j]; + IPStateBase* ipsp = (*vips)[j+npts_inter]; + FractureCohesive3DIPVariable *ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::initial)); + FractureCohesive3DIPVariable *ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::initial)); + ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); + ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::previous)); + ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::previous)); + ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); + ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::current)); + ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::current)); + ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); + } + } + } } LinearTermBase<double>* @@ -1029,49 +989,67 @@ void dG3DDomain::getNoMassDofs(std::set<Dof>& DofVector) const } -void dG3DDomain::computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF){ +void dG3DDomain::computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt){ IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; // interface elements - partDomain *dom = static_cast<partDomain*>(this); - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end();++it){ - MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(it->second); - R.clear(); - this->getMinusDomain()->getFunctionSpace()->getKeys(ie->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - this->getPlusDomain()->getFunctionSpace()->getKeys(ie->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - int npts = integBound->getIntPoints(it->second,&GP); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); + if (gi->size() >0) + { + dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawMinus()); + dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawPlus()); + dG3DMaterialLaw *mlawbulkm; + dG3DMaterialLaw *mlawbulkp; + if(mlawMinus->getType() == materialLaw::fracture) + mlawbulkm = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (mlawMinus) )->getBulkLaw()); + else + mlawbulkm= static_cast<dG3DMaterialLaw*>(mlawMinus); + if(mlawPlus->getType() == materialLaw::fracture) + mlawbulkp = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (mlawPlus) )->getBulkLaw()); + else + mlawbulkp= static_cast<dG3DMaterialLaw*>(mlawPlus); + if (mlawbulkm->getUseBarF()!=mlawbulkp->getUseBarF()) //check with the bulk law + Msg::Error("dG3DDomain::computeIpv All the constitutive laws need to use Fbar or not"); + bool useBarF=mlawbulkm->getUseBarF(); + // + for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end();++it) + { + MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(it->second); R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } + this->getMinusDomain()->getFunctionSpace()->getKeys(ie->getElem(0),R); + dispm.resize(R.size()); + ufield->get(R,dispm); + R.clear(); + this->getPlusDomain()->getFunctionSpace()->getKeys(ie->getElem(1),R); + dispp.resize(R.size()); + ufield->get(R,dispp); + int npts = integBound->getIntPoints(it->second,&GP); + this->computeStrain(aips,ie, GP,ws,getMinusDomain(),getPlusDomain(),dispm,dispp,virt, useBarF); } - - this->computeStrain(aips,ie, GP,ws,dom,dom,dispm,dispp,dispExtra,virt, useBarF); } // bulk - for (elementGroup::elementContainer::const_iterator it = g->begin(); it != g->end(); ++it){ - MElement *e = it->second; - //std::cout << "Elem: " << e->getNum() << std::endl; - R.clear(); - getFunctionSpace()->getKeys(e,R); - dispm.resize(R.size()); - ufield->get(R,dispm); - IntPt *GP; - int npts_bulk=integBulk->getIntPoints(e,&GP); - this->computeStrain(e,npts_bulk,GP,aips->getIPstate(e->getNum()),ws,dispm, useBarF); + if (g->size() > 0) + { + dG3DMaterialLaw *mlaw; + if(_mlaw->getType() == materialLaw::fracture) + mlaw = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (getMaterialLaw()) )->getBulkLaw()); + else{ + mlaw= static_cast<dG3DMaterialLaw*>(getMaterialLaw()); + } + bool useBarF=mlaw->getUseBarF(); + + for (elementGroup::elementContainer::const_iterator it = g->begin(); it != g->end(); ++it){ + MElement *e = it->second; + //std::cout << "Elem: " << e->getNum() << std::endl; + R.clear(); + getFunctionSpace()->getKeys(e,R); + dispm.resize(R.size()); + ufield->get(R,dispm); + IntPt *GP; + int npts_bulk=integBulk->getIntPoints(e,&GP); + this->computeStrain(e,npts_bulk,GP,aips->getIPstate(e->getNum()),ws,dispm, useBarF); + } } }; @@ -1085,38 +1063,24 @@ void dG3DDomain::computeIPVariable(AllIPState *aips,const unknownField *ufield, } else { - #if defined(HAVE_MPI) - if (_mlaw->isNumeric() and _otherRanks.size()>0){ - dG3DMaterialLaw *mlaw; - if(_mlaw->getType() == materialLaw::fracture) - mlaw = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (_mlaw) )->getBulkLaw()); - else{ - mlaw= static_cast<dG3DMaterialLaw*>(_mlaw); - } - bool useBarF=mlaw->getUseBarF(); - this->computeIPVariableMPI(aips,ufield,ws,stiff,useBarF); + if ((this->getMaterialLawMinus()->isNumeric() or this->getMaterialLawPlus()->isNumeric()) and this->_otherRanks.size()>0) + { + this->computeIPVariableMPI(aips,ufield,ws,stiff); } else #endif //HAVE_MPI { - dG3DMaterialLaw *mlaw; - if(_mlaw->getType() == materialLaw::fracture) - mlaw = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (_mlaw) )->getBulkLaw()); - else{ - mlaw= static_cast<dG3DMaterialLaw*>(_mlaw); - } - bool useBarF=mlaw->getUseBarF(); - this->computeAllIPStrain(aips,ufield,ws,false, useBarF); + this->computeAllIPStrain(aips,ufield,ws,false); IntPt *GP; double uem,vem,uep,vep; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; // interface elements - partDomain *dom = static_cast<partDomain*>(this); - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end();++it){ + + for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end();++it) + { MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(it->second); R.clear(); this->getMinusDomain()->getFunctionSpace()->getKeys(ie->getElem(0),R); @@ -1126,28 +1090,18 @@ void dG3DDomain::computeIPVariable(AllIPState *aips,const unknownField *ufield, this->getPlusDomain()->getFunctionSpace()->getKeys(ie->getElem(1),R); dispp.resize(R.size()); ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - int npts = integBound->getIntPoints(it->second,&GP); - this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispp,dispExtra,false,stiff); + this->computeIpv(aips,ie, GP,ws,getMinusDomain(),getPlusDomain(),getMaterialLawMinus(),getMaterialLawPlus(),dispm,dispp,false,stiff); } // bulk - for (elementGroup::elementContainer::const_iterator it = g->begin(); it != g->end(); ++it){ + for (elementGroup::elementContainer::const_iterator it = g->begin(); it != g->end(); ++it) + { MElement *e = it->second; R.clear(); getFunctionSpace()->getKeys(e,R); dispm.resize(R.size()); ufield->get(R,dispm); - this->computeIpv(aips,e,ws,_mlaw,dispm,stiff); + this->computeIpv(aips,e,ws,getMaterialLaw(),dispm,stiff); } } @@ -1495,7 +1449,7 @@ void dG3DDomain::computeIpv(AllIPState *aips,MElement *e, IPStateBase::whichStat void dG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt, + fullVector<double> &dispp, const bool virt, bool useBarF) { MElement *ele = dynamic_cast<MElement*>(ie); @@ -2051,7 +2005,7 @@ void dG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP // Compute spatial gradient of jump on interface at interface IP if (cohipvfm->withJumpGradient() and cohipvfp->withJumpGradient()) { - const std::vector<TensorialTraits<double>::GradType>& gradVal = ipvm->gradf(_extraSpace,ie,GP[j]); + const std::vector<TensorialTraits<double>::GradType>& gradVal = ipvm->gradf(_spaceminus,ie,GP[j]); STensor3& Gradjumpm = cohipvfm->getRefToJumpGradient(); STensorOperation::zero(Gradjumpm); for(int k=0; k<3; k++) @@ -2066,50 +2020,6 @@ void dG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP cohipvfp->getRefToJumpGradient() = Gradjumpm; }; } - - if (IsMultipleFieldFormulation()) - { - // compute extra field at gauss points - const std::vector<TensorialTraits<double>::ValType>& Vals = ipvm->f(_extraSpace,ie,GP[j]); - extraFieldFunctionSpace* extraStp = static_cast<extraFieldFunctionSpace*>(_extraSpace); - int numExtraKey = extraStp->getNumExtraKeysPerVertex(); - fullVector<double> extraVal; - extraVal.resize(numExtraKey,true); - for (int id = 0; id < numExtraKey; id++){ - if (this->getEnrichedUnknownLocation() == partDomain::NODE){ - for (int i=0; i< nbvertexInter; i++){ - extraVal(id) += Vals[i]*dispExtra(i+id*nbvertexInter); - } - } - else if (this->getEnrichedUnknownLocation() == partDomain::GP){ - extraVal(id) = dispExtra(j+id*npts); - } - } - - double hs = ie->getCharacteristicSize(); - if (this->getMultipleFieldMethod() == dgPartDomain::TWOFIELD){ - SVector3& iJump = ipvm->getRefToIncompatibleJump(); - iJump(0) = extraVal(0)/(_beta1*hs); - iJump(1) = extraVal(1)/(_beta1*hs); - iJump(2) = extraVal(2)/(_beta1*hs); - ipvp->getRefToIncompatibleJump() = iJump; - - // full two field - static SVector3 refN; - refN = ipvm->getConstRefToReferenceOutwardNormal(); - refN.normalize(); - // update interface deformation gradients with incompatible strain field - for (int p=0; p<3; p++){ - for (int q=0; q<3; q++){ - Fm(p,q) += (iJump(p)*refN(q)); - Fp(p,q) += (iJump(p)*refN(q)); - } - } - } - else{ - Msg::Error("two field method %d is not correctly defined",this->getMultipleFieldMethod()); - } - } } /*** @@ -2439,7 +2349,7 @@ void dG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP void dG3DDomain::computeIpv(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus,materialLaw *mlawmi, materialLaw *mlawp,fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, + fullVector<double> &dispp, const bool virt, bool stiff,const bool checkfrac) { MElement *ele = dynamic_cast<MElement*>(ie); @@ -2465,7 +2375,7 @@ void dG3DDomain::computeIpv(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,co Msg::Error("dG3DDomain::computeIpv All the constitutive laws need to use Fbar or not"); bool useBarF=mlawbulkm->getUseBarF(); - if(_evalStiff){ this->computeStrain(aips,ie, GP,ws,efMinus,efPlus,dispm,dispp,dispExtra,virt, useBarF);} + if(_evalStiff){ this->computeStrain(aips,ie, GP,ws,efMinus,efPlus,dispm,dispp,virt, useBarF);} int npts=integBound->getIntPoints(ele,&GP); @@ -3158,22 +3068,8 @@ void dG3DDomain::initialIPVariable(AllIPState *aips,const unknownField *ufield, dG3DMaterialLaw* mlawMinus = dynamic_cast<dG3DMaterialLaw*>(this->getMaterialLawMinus()); dG3DMaterialLaw* mlawPlus = dynamic_cast<dG3DMaterialLaw*>(this->getMaterialLawPlus()); - dG3DMaterialLaw *mlawbulkm; - dG3DMaterialLaw *mlawbulkp; - if(mlawMinus->getType() == materialLaw::fracture) - mlawbulkm = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (mlawMinus) )->getBulkLaw()); - else - mlawbulkm= static_cast<dG3DMaterialLaw*>(mlawMinus); - if(mlawPlus->getType() == materialLaw::fracture) - mlawbulkp = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (mlawPlus) )->getBulkLaw()); - else - mlawbulkp= static_cast<dG3DMaterialLaw*>(mlawPlus); - if (mlawbulkm->getUseBarF()!=mlawbulkp->getUseBarF()) //check with the bulk law - Msg::Error("dG3DDomain::computeIpv All the constitutive laws need to use Fbar or not"); - bool useBarF=mlawbulkm->getUseBarF(); - // compute strain - this->computeAllIPStrain(aips,ufield,ws,false,useBarF); + this->computeAllIPStrain(aips,ufield,ws,false); // IntPt *GP; for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it) @@ -4167,12 +4063,12 @@ MElement* dG3DDomain::createInterface(IElement *ie1, IElement *ie2) const #if defined(HAVE_MPI) -void dG3DDomain::computeIPVariableMPI(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff, bool useBarF){ +void dG3DDomain::computeIPVariableMPI(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff){ IntPt *GP; MPI_Status status; if (Msg::GetCommRank() == _rootRank){ // compute all IP strain on root rank - this->computeAllIPStrain(aips,ufield,ws,false, useBarF); + this->computeAllIPStrain(aips,ufield,ws,false); // send strain to other procs // for bulk elements for (std::set<int>::iterator it = _otherRanks.begin(); it!= _otherRanks.end(); it++){ @@ -4512,39 +4408,6 @@ interDomainBase::interDomainBase(const interDomainBase &source) : _domMinus(sour void interDomainBase::setLawFromBulkPartFlag(const bool fl){_lawFromBulkPart = fl;}; -void interDomainBase::initializeFractureBase(unknownField *uf,IPField*ip, - elementGroup *gi, QuadratureBase* integBound) -{ - - // same strength fracture value on both side (to avoid discontinuities) - // no very elegant to put here but very efficient - // take the value of minus element by choice - if(_mlawMinus->getType() == materialLaw::fracture and _mlawPlus->getType() == materialLaw::fracture) - { - // loop on ipvariable - IntPt *GP; - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it) - { - MElement *ele = it->second; - int npts_inter=integBound->getIntPoints(ele,&GP); - AllIPState::ipstateElementContainer *vips = ip->getAips()->getIPstate(ele->getNum()); - for(int j=0;j<npts_inter;j++){ // npts_inter points on both sides - IPStateBase* ipsm = (*vips)[j]; - IPStateBase* ipsp = (*vips)[j+npts_inter]; - FractureCohesive3DIPVariable *ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::initial)); - FractureCohesive3DIPVariable *ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::initial)); - ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); - ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::previous)); - ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::previous)); - ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); - ipvm = static_cast<FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::current)); - ipvp = static_cast<FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::current)); - ipvp->setFractureStrengthFactor(ipvm->fractureStrengthFactor()); - } - } - } -} - interDomainBetween3D::interDomainBetween3D(const int tag, partDomain *dom1,partDomain *dom2,const int lnum, const int bnum) : interDomainBase(dom1,dom2,bnum), @@ -4597,30 +4460,12 @@ void interDomainBetween3D::createTerms(unknownField *uf,IPField*ip) FunctionSpace<double>* dgspace2 = static_cast<FunctionSpace<double>*>(getPlusDomain()->getFunctionSpace()); dG3DDomain* dgldomMinus = static_cast<dG3DDomain*>(_domMinus); dG3DDomain* dgldomPlus = static_cast<dG3DDomain*>(_domPlus); - if (IsMultipleFieldFormulation()){ - if (this->getMultipleFieldMethod() == dgPartDomain::TWOFIELD){ - ltermBound = new twoFieldDG3DForceInter(this,ip,this->_EqMultiFieldFactor,this->_beta1); - } - else{ - Msg::Error("two field method %d has not been correctly defined",getMultipleFieldMethod()); - } - } - else - ltermBound = new dG3DForceInter(*dgspace1,dgspace2,_mlawMinus,_mlawPlus,_interQuad,_beta1,true,ip,_incrementNonlocalBased); + + ltermBound = new dG3DForceInter(*dgspace1,dgspace2,_mlawMinus,_mlawPlus,_interQuad,_beta1,true,ip,_incrementNonlocalBased); if(_interByPert) btermBound = new BilinearTermPerturbation<double>(ltermBound,*dgspace1,*dgspace2,uf,ip,this,_eps); else{ - if (IsMultipleFieldFormulation()){ - if (this->getMultipleFieldMethod() == dgPartDomain::TWOFIELD){ - btermBound = new twoFieldDG3DStiffnessInter(this,ip,this->_EqMultiFieldFactor,this->_beta1); - } - else - { - Msg::Error("two field method %d has not been correctly defined",getMultipleFieldMethod()); - } - } - else - btermBound = new dG3DStiffnessInter(*dgspace1,*dgspace2,_mlawMinus,_mlawPlus,_interQuad,_beta1,ip,uf,true,_incrementNonlocalBased); + btermBound = new dG3DStiffnessInter(*dgspace1,*dgspace2,_mlawMinus,_mlawPlus,_interQuad,_beta1,ip,uf,true,_incrementNonlocalBased); } scalarTermPF = new nonLinearScalarTermVoid(); @@ -4628,59 +4473,51 @@ void interDomainBetween3D::createTerms(unknownField *uf,IPField*ip) if( getNumNonLocalVariable() >0) { - if(!IsMultipleFieldFormulation()) + (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); + (static_cast<dG3DForceInter*>(ltermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); + (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalContinuity(getNonLocalContinuity()); + if(!_interByPert) { - (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); - (static_cast<dG3DForceInter*>(ltermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); - (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - (static_cast<dG3DForceInter*>(ltermBound))->setNonLocalContinuity(getNonLocalContinuity()); - if(!_interByPert) - { - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalContinuity(getNonLocalContinuity()); - } + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalEqRatio(getNonLocalEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumNonLocalVariable(getNumNonLocalVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalStabilityParameter(getNonLocalStabilityParameter()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setNonLocalContinuity(getNonLocalContinuity()); } } if (getNumConstitutiveExtraDofDiffusionVariable()>0) { - if(!IsMultipleFieldFormulation()) + + (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); + if(!_interByPert) { - (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - if(!_interByPert) - { - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); - } + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveExtraDofDiffusionVariable(getNumConstitutiveExtraDofDiffusionVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionEqRatio(getConstitutiveExtraDofDiffusionEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionUseEnergyConjugatedField(getConstitutiveExtraDofDiffusionUseEnergyConjugatedField()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountFieldSource(getConstitutiveExtraDofDiffusionAccountFieldSource()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionAccountMecaSource(getConstitutiveExtraDofDiffusionAccountMecaSource()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionStabilityParameter(getConstitutiveExtraDofDiffusionStabilityParameter()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveExtraDofDiffusionContinuity(getConstitutiveExtraDofDiffusionContinuity()); } } if(getNumConstitutiveCurlVariable() > 0) { - if(!IsMultipleFieldFormulation()) + (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); + (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); + if(!_interByPert) { - (static_cast<dG3DForceInter*>(ltermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); - (static_cast<dG3DForceInter*>(ltermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); - if(!_interByPert) - { - (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); - (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); - } + (static_cast<dG3DStiffnessInter*>(btermBound))->setNumConstitutiveCurlVariable(getNumConstitutiveCurlVariable()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlEqRatio(getConstitutiveCurlEqRatio()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountFieldSource(getConstitutiveCurlAccountFieldSource()); + (static_cast<dG3DStiffnessInter*>(btermBound))->setConstitutiveCurlAccountMecaSource(getConstitutiveCurlAccountMecaSource()); } } if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ @@ -4689,14 +4526,8 @@ void interDomainBetween3D::createTerms(unknownField *uf,IPField*ip) linearTermPFBound = new nonLinearTermVoid(); } else{ - if (this->IsMultipleFieldFormulation()){ - scalarTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new twoFieldDG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } - else{ - scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); - linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); - } + scalarTermPFBound = new dG3DDissipationPathFollowingBoundScalarTerm(this,ip); + linearTermPFBound = new dG3DDissipationPathFollowingBoundLinearTerm(this,ip); } } else{ @@ -4704,115 +4535,6 @@ void interDomainBetween3D::createTerms(unknownField *uf,IPField*ip) linearTermPFBound = new nonLinearTermVoid(); } } -void interDomainBetween3D::initializeTerms(unknownField *uf,IPField*ip) -{ - - createTerms(uf,ip); - initializeFractureBase(uf,ip, gi, integBound); -} - - -void interDomainBetween3D::computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF){ - IntPt *GP; - fullVector<double> dispm; - fullVector<double> dispp; - fullVector<double> dispExtra; - std::vector<Dof> R; - - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it){ - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(it->second); - R.clear(); - this->getMinusDomain()->getFunctionSpace()->getKeys(iele->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - this->getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeStrain(aips,iele,GP,ws,_domMinus,_domPlus,dispm,dispp,dispExtra,virt, useBarF); - } -}; - -void interDomainBetween3D::computeIPVariable(AllIPState *aips,const unknownField *ufield, - const IPStateBase::whichState ws, bool stiff) -{ - _evalStiff = false; - if (ws == IPStateBase::initial) - { - this->initialIPVariable(aips,ufield,ws,stiff); - } - else - { - - dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawMinus()); - dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(this->getMaterialLawPlus()); - dG3DMaterialLaw *mlawbulkm; - dG3DMaterialLaw *mlawbulkp; - if(mlawMinus->getType() == materialLaw::fracture) - mlawbulkm = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (mlawMinus) )->getBulkLaw()); - else - mlawbulkm= static_cast<dG3DMaterialLaw*>(mlawMinus); - if(mlawPlus->getType() == materialLaw::fracture) - mlawbulkp = static_cast< dG3DMaterialLaw* >((static_cast< FractureByCohesive3DLaw* > (mlawPlus) )->getBulkLaw()); - else - mlawbulkp= static_cast<dG3DMaterialLaw*>(mlawPlus); - if (mlawbulkm->getUseBarF()!=mlawbulkp->getUseBarF()) //check with the bulk law - Msg::Error("dG3DDomain::computeIpv All the constitutive laws need to use Fbar or not"); - bool useBarF=mlawbulkm->getUseBarF(); - - #if defined(HAVE_MPI) - if ((this->getMaterialLawMinus()->isNumeric() or this->getMaterialLawPlus()->isNumeric()) and this->_otherRanks.size()>0){ - this->computeIPVariableMPI(aips,ufield,ws,stiff,useBarF); - } - else - #endif //HAVE_MPI - { - - this->computeAllIPStrain(aips,ufield,ws,false, useBarF); - IntPt *GP; - fullVector<double> dispm; - fullVector<double> dispp; - fullVector<double> dispExtra; - std::vector<Dof> R; - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it){ - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(it->second); - int npts_inter= integBound->getIntPoints(it->second,&GP); - R.clear(); - this->getMinusDomain()->getFunctionSpace()->getKeys(iele->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - this->getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,dispExtra,false,stiff); - } - } - } - _evalStiff = true; -} void interDomainBetween3D::setMaterialLaw(const std::map<int,materialLaw*> &maplaw) { @@ -5298,13 +5020,13 @@ ElecTherMechDG3DDomain::ElecTherMechDG3DDomain(const ElecTherMechDG3DDomain &sou /*void ElecTherMechDG3DDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt) + fullVector<double> &dispp, const bool virt) { MElement *ele = dynamic_cast<MElement*>(ie); if (!getElementErosionFilter()(ele)) return; if(!virt){ - dG3DDomain::computeStrain(aips,ie, GP,ws,efMinus,efPlus, dispm,dispp,dispExtra,virt); + dG3DDomain::computeStrain(aips,ie, GP,ws,efMinus,efPlus, dispm,dispp,virt); int npts=integBound->getIntPoints(ele,&GP); // Get Gauss points values on minus and plus elements IntPt *GPm; IntPt *GPp; @@ -5742,7 +5464,6 @@ interDomainBase(source), ElecTherMechDG3DDomain(source) IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; for(elementGroup::elementContainer::iterator it=gi->begin(); it!=gi->end(); ++it){ MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(*it); @@ -5755,17 +5476,7 @@ interDomainBase(source), ElecTherMechDG3DDomain(source) dispp.resize(R.size()); ufield->get(R,dispp); - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(*it,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeStrain(aips,iele,GP,ws,_domMinus,_domPlus,dispm,dispp,dispExtra,virt); + this->computeStrain(aips,iele,GP,ws,_domMinus,_domPlus,dispm,dispp,virt); } };*/ @@ -5792,7 +5503,6 @@ interDomainBase(source), ElecTherMechDG3DDomain(source) IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(_mlawMinus); dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(_mlawPlus); @@ -5807,18 +5517,7 @@ interDomainBase(source), ElecTherMechDG3DDomain(source) this->getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); dispp.resize(R.size()); ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(*it,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,dispExtra,false,stiff); + this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,false,stiff); } } _evalStiff = true; diff --git a/dG3D/src/dG3DDomain.h b/dG3D/src/dG3DDomain.h index 85ed02dc4cfca9f2ba040cba6524f187a3aa3479..99ff87f4a705d7164d844772200ddf976fa8da5f 100644 --- a/dG3D/src/dG3DDomain.h +++ b/dG3D/src/dG3DDomain.h @@ -53,9 +53,6 @@ class dG3DDomain : public dgPartDomain{ // bool _incrementNonlocalBased; bool _planeStressState; // - - // function space manage extra Dof at interface in multifield formulation - FunctionSpaceBase *_extraSpace; // FunctionSpaceBase *_space; // @@ -173,13 +170,13 @@ class dG3DDomain : public dgPartDomain{ materialLaw *mlaw,fullVector<double> &disp, bool stiff); virtual void computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt, + fullVector<double> &dispp, const bool virt, bool useBarF); 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); - virtual void computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF); + fullVector<double> &dispp, const bool virt, bool stiff,const bool checkfrac=true); + virtual void computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt); virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff); virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw); virtual materialLaw* getMaterialLaw(){return _mlaw;} @@ -206,8 +203,6 @@ class dG3DDomain : public dgPartDomain{ virtual double scaleTimeStep() const {return _sts;} virtual FunctionSpaceBase* getFunctionSpace(){return _space;} virtual const FunctionSpaceBase* getFunctionSpace() const {return _space;} - virtual FunctionSpaceBase* getInterfaceFunctionSpace() {return _extraSpace;}; - virtual const FunctionSpaceBase* getInterfaceFunctionSpace() const {return _extraSpace;}; virtual const partDomain* getMinusDomain() const{return this;} virtual const partDomain* getPlusDomain() const{return this;} virtual partDomain* getMinusDomain() {return this;} @@ -239,7 +234,7 @@ class dG3DDomain : public dgPartDomain{ virtual QuadratureBase* getQuadratureRulesForNeumannBC(nonLinearNeumannBC &neu) const; virtual partDomain* clone() const {return new dG3DDomain(*this);}; #if defined(HAVE_MPI) - virtual void computeIPVariableMPI(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff, bool useBarF); + virtual void computeIPVariableMPI(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff); #endif virtual double getNonLocalStabilityParameter() const { return _nonLocalBeta;} virtual bool getNonLocalContinuity() const { return _nonLocalContinuity;} @@ -288,9 +283,6 @@ class interDomainBase{ #ifndef SWIG interDomainBase(const interDomainBase &source); virtual ~interDomainBase(){} - - void initializeFractureBase(unknownField *uf,IPField*ip, - elementGroup *gi, QuadratureBase* integBound); #endif }; @@ -302,11 +294,7 @@ class interDomainBetween3D : public interDomainBase, public dG3DDomain #ifndef SWIG interDomainBetween3D(const interDomainBetween3D &source); virtual ~interDomainBetween3D(){} - - virtual void computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF); - virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, - bool stiff=true); - + virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw); // FOLLOWING FUNCTION SHOULD STAY HERE BECAUSE OF THE DOUBLE DERIVATION virtual materialLaw* getMaterialLaw(){return _mlaw;} @@ -323,7 +311,6 @@ class interDomainBetween3D : public interDomainBase, public dG3DDomain virtual const partDomain* getPlusDomain() const{return _domPlus;} virtual partDomain* getMinusDomain(){return _domMinus;} virtual partDomain* getPlusDomain() {return _domPlus;} - void initializeTerms(unknownField *uf,IPField *ip); virtual void createTerms(unknownField *uf,IPField*ip); // as there is no elerment on a interDomain empty function. The interface element on an interDomain @@ -436,7 +423,7 @@ class ElecTherMechDG3DDomain : public dG3DDomain{ IPStateBase::whichState ws, fullVector<double> &disp) const; virtual void computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt); + fullVector<double> &dispp, const bool virt); virtual void allocateInterfaceMPI(const int rankOtherPart, const elementGroup &groupOtherPart,dgPartDomain** dgdom);*/ diff --git a/dG3D/src/dG3DEnhancedDomain.cpp b/dG3D/src/dG3DEnhancedDomain.cpp deleted file mode 100644 index f16bd56694b3d9cc15e63e6d97ae3832e8af183e..0000000000000000000000000000000000000000 --- a/dG3D/src/dG3DEnhancedDomain.cpp +++ /dev/null @@ -1,143 +0,0 @@ -// -// -// C++ Interface: dG3D domain with enhanced strain -// -// Description: Interface class for dg 3D -// -// Author: <V.-D. NGUYEN>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#include "dG3DEnhancedDomain.h" -#include "multipleFieldDG3DTerms.h" -#include "dG3DEnhancedStrainIPVariable.h" -#include "highOrderTensor.h" -#include "dG3DMultiscaleIPVariable.h" -#include "embeddedLocalizationBand.h" -#include "nonLinearMechSolver.h" -#include "pathFollowingTerms.h" - -dG3DEnhancedDomain::dG3DEnhancedDomain(const int tag, const int phys, const int sp_, const int lnum, const int fdg, const int dim) : -dG3DDomain(tag,phys,sp_,lnum,0,dim){ - if (fdg){ - Msg::Warning("dG3DEnhancedDomain is implemented with CG only"); - } - if(_space!=NULL) delete _space; - switch(_wsp) - { - case functionSpaceType::Lagrange: - _space = new g3DLagrangeFunctionSpace(getTag(),12); - break; - case functionSpaceType::Inter : - // do nohing - break; // InterfaceDomain set function space later - default: - Msg::Error("Function space type is unknown on domain %d",getTag()); - } -}; - -void dG3DEnhancedDomain::createTerms(unknownField *uf,IPField*ip) -{ - FunctionSpace<double>* dgspace = static_cast<FunctionSpace<double>*>(_space); - ltermBulk = new twoFieldDG3DForceBulk(this,ip,_EqMultiFieldFactor); - - if(_bmbp) - btermBulk = new BilinearTermPerturbation<double>(ltermBulk,*dgspace,*dgspace,uf,ip,this,_eps); - else{ - btermBulk = new twoFieldDG3DStiffnessBulk(this,ip,_EqMultiFieldFactor); - } - - ltermBound = new nonLinearTermVoid(); - btermBound = new BiNonLinearTermVoid(); - - this->btermVirtBound = new BiNonLinearTermVoid(); - this->ltermVirtBound = new nonLinearTermVoid(); - - if (getFunctionSpaceType() == functionSpaceType::Lagrange) - { - massterm = new mass3D(*dgspace,_mlaw); - } - else if (getFunctionSpaceType() == functionSpaceType::Hierarchical) - { - massterm = new mass3DHierarchicalFE(*dgspace,_mlaw); - } - else - { - Msg::Error("mass matrix has not implemented for this kind of functions space"); - massterm = new BiNonLinearTermVoid(); - } - - if (this->getSolver()->withPathFollowing() and _accountPathFollowing){ - scalarTermPF = new dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm(this,ip); - linearTermPF = new dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm(this,ip); - } - else{ - scalarTermPF = new nonLinearScalarTermVoid();; - linearTermPF = new nonLinearTermVoid();; - } - - scalarTermPFBound = new nonLinearScalarTermVoid();; - linearTermPFBound = new nonLinearTermVoid(); -}; - -void dG3DEnhancedDomain::computeStrain(MElement *e, const int npts_bulk, IntPt* GP, - AllIPState::ipstateElementContainer *vips, - IPStateBase::whichState ws, fullVector<double> &disp, bool useBarF) const -{ - if (!getElementErosionFilter()(e)) return; - if(useBarF) - Msg::Error("dG3DEnhancedDomain::computeStrain bar F method not implemented"); - int nbFF = e->getNumShapeFunctions(); - for(int i = 0; i<npts_bulk; i++){ - IPStateBase* ips = (*vips)[i]; - - dG3DEnhancedStrainIPVariable *ipv = static_cast<dG3DEnhancedStrainIPVariable*>(ips->getState(ws)); - const dG3DEnhancedStrainIPVariable *ipvprev = static_cast<const dG3DEnhancedStrainIPVariable*>(ips->getState(IPStateBase::previous)); - - // bulk strain - std::vector<TensorialTraits<double>::GradType> &Grads = ipv->gradf(_space,e,GP[i]); - STensor3& Fbulk = ipv->getRefToBulkDeformationGradient(); - STensorOperation::unity(Fbulk); - - for (int j = 0; j < nbFF; j++){ - Fbulk(0,0) += Grads[j+0*nbFF][0]*disp(j); - Fbulk(0,1) += Grads[j+0*nbFF][1]*disp(j); - Fbulk(0,2) += Grads[j+0*nbFF][2]*disp(j); - - Fbulk(1,0) += Grads[j+1*nbFF][0]*disp(j+nbFF); - Fbulk(1,1) += Grads[j+1*nbFF][1]*disp(j+nbFF); - Fbulk(1,2) += Grads[j+1*nbFF][2]*disp(j+nbFF); - - Fbulk(2,0) += Grads[j+2*nbFF][0]*disp(j+2*nbFF); - Fbulk(2,1) += Grads[j+2*nbFF][1]*disp(j+2*nbFF); - Fbulk(2,2) += Grads[j+2*nbFF][2]*disp(j+2*nbFF); - } - if(STensorOperation::determinantSTensor3(Fbulk) < 1.e-15) Msg::Error("Negative Jacobian"); - - ipv->getRefToDeformationGradient() = Fbulk; - - // enhanced strain - std::vector<TensorialTraits<double>::ValType> &Vals = ipv->f(_space,e,GP[i]); - STensor3& enF = ipv->getRefToEnhancedDeformationGradient(); - STensorOperation::zero(enF); - - for (int j=0; j<nbFF; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - int row = Tensor23::getIndex(k,l); - enF(k,l) += disp(j+row*nbFF+3*nbFF)*Vals[j+0*nbFF]; - } - } - } - - - // compute betaE - const double& bandWidth = ipv->getConstRefToBandWidth(); - const SVector3& normal = ipv->getConstRefToLocalizationNormal(); - ipv->getRefToBetaElement() = embeddedFiniteBand(e,GP[i],normal,bandWidth); - //printf("rank %d bandWidth = %e normal = %e %e %e beta e = %e \n",Msg::GetCommRank(), bandWidth,normal[0],normal[1],normal[2],ipv->getConstRefToBetaElement()); - } -} - diff --git a/dG3D/src/dG3DEnhancedDomain.h b/dG3D/src/dG3DEnhancedDomain.h deleted file mode 100644 index c5e934319ce271ca07c48df25ee0ffe3b5959043..0000000000000000000000000000000000000000 --- a/dG3D/src/dG3DEnhancedDomain.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// C++ Interface: dG3D domain with enhanced strain -// -// Description: Interface class for dg 3D -// -// Author: <V.-D. NGUYEN>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef DG3DENHANCEDDOMAIN_H_ -#define DG3DENHANCEDDOMAIN_H_ - -#include "dG3DDomain.h" - -class dG3DEnhancedDomain : public dG3DDomain{ - protected: - - - public: - dG3DEnhancedDomain(const int tag, const int phys, const int sp_, const int lnum, const int fdg, const int dim); - #ifndef SWIG - dG3DEnhancedDomain(const dG3DEnhancedDomain &source): dG3DDomain(source){}; - virtual ~dG3DEnhancedDomain(){}; - - virtual void createTerms(unknownField *uf,IPField*ip); - virtual void computeStrain(MElement *e, const int npts_bulk, IntPt* GP, - AllIPState::ipstateElementContainer *vips, - IPStateBase::whichState ws, fullVector<double> &disp, bool useFBar) const; - - virtual partDomain* clone() const {return new dG3DEnhancedDomain(*this);}; - #endif // SWIG -}; - -#endif // DG3DENHANCEDDOMAIN_H_ diff --git a/dG3D/src/dG3DEnhancedStrainIPVariable.cpp b/dG3D/src/dG3DEnhancedStrainIPVariable.cpp deleted file mode 100644 index 6430e03fa855b3b793334a6d96fdb978a0e911c7..0000000000000000000000000000000000000000 --- a/dG3D/src/dG3DEnhancedStrainIPVariable.cpp +++ /dev/null @@ -1,260 +0,0 @@ -// -// C++ Interface: ipvariable -// -// Description: Class with definition of ipvarible for dG3D -// -// -// Author: <V.D. Nguyen>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include "dG3DEnhancedStrainIPVariable.h" -#include "ipField.h" -#include "highOrderTensor.h" - - - -#if defined(HAVE_MPI) - -int EnhancedStrainIPVariableBase::getMacroNumberElementDataSendToMicroProblem() const{ - // send _enhancedF + _betaEe + Fbuck - return 9+1+9; -}; - // get number of values obtained by microscopic analysis to send to macroscopic analysis -int EnhancedStrainIPVariableBase::getMicroNumberElementDataSendToMacroProblem() const{ - // send _DPDenhanceF _localEnhancedF _DLocalEnhancedFDF _DLocalEnhancedFDEnhancedF - // bandwidth + normal + _DirreversibleEnergyDF - return 81+9+81+81+1+3+9; -}; - // get macroscopic kinematic data to send to microscopic problem -void EnhancedStrainIPVariableBase::getMacroDataSendToMicroProblem(double* val) const{ - const STensor3& eF = this->getConstRefToEnhancedDeformationGradient(); - const STensor3& Fbulk = this->getConstRefToBulkDeformationGradient(); - int row = 0; - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - val[index] = eF(i,j); - } - row+= 9; - - val[row] = _betaElement; - row += 1; - - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - val[index] = Fbulk(i,j); - } - row+= 9; -}; - // get computed data obtaind by microscopic analysis to send to macroscopic analysis -void EnhancedStrainIPVariableBase::getMicroDataToMacroProblem(double* val) const{ - const STensor43& dPdeF = this->getConstRefToEnhancedTangentModuli(); - const STensor3& localEF = this->getConstRefToLocalEnhancedDeformationGradient(); - const STensor43& DlocalEFDF = this->getConstRefToDLocalEnhancedDeformationGradientDDeformationGradient(); - const STensor43& dLocalEFDeF = this->getConstRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient(); - const STensor3& dIrreversibleEnergDeF = this->getConstRefToDIrreversibleEnergyDEnhancedDeformationGradient(); - - int row = 0; - for (int index=row; index< row+81; index++){ - int i,j,k,l; - Tensor43::getIntsFromIndex(index-row,i,j,k,l); - val[index] = dPdeF(i,j,k,l); - } - row+= 81; - - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - val[index] = localEF(i,j); - } - row+= 9; - - for (int index=row; index< row+81; index++){ - int i,j,k,l; - Tensor43::getIntsFromIndex(index-row,i,j,k,l); - val[index] = DlocalEFDF(i,j,k,l); - } - row+= 81; - - for (int index=row; index< row+81; index++){ - int i,j,k,l; - Tensor43::getIntsFromIndex(index-row,i,j,k,l); - val[index] = dLocalEFDeF(i,j,k,l); - } - row+= 81; - - val[row] = _bandWidth; - row+= 1; - - for (int index = row; index < row+3; index++){ - int i; - Tensor13::getIntsFromIndex(index-row,i); - val[index] = _localizationNormal[i]; - } - row+=3; - - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - val[index] = dIrreversibleEnergDeF(i,j); - } - row+= 9; - - -}; - // set the received data from microscopic analysis to microscopic analysis -void EnhancedStrainIPVariableBase::setReceivedMacroDataToMicroProblem(const double* val){ - STensor3& eF = this->getRefToEnhancedDeformationGradient(); - STensor3& Fbulk = this->getRefToBulkDeformationGradient(); - int row = 0; - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - eF(i,j) = val[index]; - } - row+= 9; - - _betaElement = val[row]; - row += 1; - - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - Fbulk(i,j) = val[index]; - } - row+= 9; -}; - // set the received data from microscopic analysis to macroscopic analysis -void EnhancedStrainIPVariableBase::setReceivedMicroDataToMacroProblem(const double* val){ - STensor43& dPdeF = this->getRefToEnhancedTangentModuli(); - STensor3& localEF = this->getRefToLocalEnhancedDeformationGradient(); - STensor43& DlocalEFDF = this->getRefToDLocalEnhancedDeformationGradientDDeformationGradient(); - STensor43& dLocalEFDeF = this->getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient(); - STensor3& dIrreversibleEnergDeF = this->getRefToDIrreversibleEnergyDEnhancedDeformationGradient(); - double& bandWidth = this->getRefToBandWidth(); - SVector3& normal = this->getRefToLocalizationNormal(); - - int row = 0; - for (int index=row; index< row+81; index++){ - int i,j,k,l; - Tensor43::getIntsFromIndex(index-row,i,j,k,l); - dPdeF(i,j,k,l)= val[index]; - } - row+= 81; - - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - localEF(i,j) = val[index]; - } - row+= 9; - - for (int index=row; index< row+81; index++){ - int i,j,k,l; - Tensor43::getIntsFromIndex(index-row,i,j,k,l); - DlocalEFDF(i,j,k,l) = val[index]; - } - row+= 81; - - for (int index=row; index< row+81; index++){ - int i,j,k,l; - Tensor43::getIntsFromIndex(index-row,i,j,k,l); - dLocalEFDeF(i,j,k,l) = val[index]; - } - row+= 81; - - _bandWidth = val[row]; - row+= 1; - - for (int index = row; index < row+3; index++){ - int i; - Tensor13::getIntsFromIndex(index-row,i); - normal[i] = val[index]; - } - row+=3; - - for (int index=row; index < row+9; index ++){ - int i,j; - Tensor23::getIntsFromIndex(index-row,i,j); - dIrreversibleEnergDeF(i,j) = val[index]; - } - row+= 9; -}; - -#endif //HAVE_MPI - -dG3DEnhancedStrainIPVariable::dG3DEnhancedStrainIPVariable() :IPVariable2Enhanced<dG3DIPVariableBase,EnhancedStrainIPVariableBase>(){} -dG3DEnhancedStrainIPVariable::dG3DEnhancedStrainIPVariable(const dG3DEnhancedStrainIPVariable &source) : - IPVariable2Enhanced<dG3DIPVariableBase,EnhancedStrainIPVariableBase>(source){} -dG3DEnhancedStrainIPVariable& dG3DEnhancedStrainIPVariable::operator=(const IPVariable &source) -{ - IPVariable2Enhanced<dG3DIPVariableBase,EnhancedStrainIPVariableBase>::operator=(source); - const dG3DEnhancedStrainIPVariable *src = dynamic_cast<const dG3DEnhancedStrainIPVariable*>(&source); - if(src != NULL){ - - } - return *this; -} - -void dG3DEnhancedStrainIPVariable::dG3DEnhancedStrainIPVariable::restart() -{ - IPVariable2Enhanced<dG3DIPVariableBase,EnhancedStrainIPVariableBase>::restart(); - return; -} - -double dG3DEnhancedStrainIPVariable::get(const int comp) const{ - if (comp == IPField::EXTRAFIELD_1){ - int i,j; - Tensor23::getIntsFromIndex(0,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_2){ - int i,j; - Tensor23::getIntsFromIndex(1,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_3){ - int i,j; - Tensor23::getIntsFromIndex(2,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_4){ - int i,j; - Tensor23::getIntsFromIndex(3,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_5){ - int i,j; - Tensor23::getIntsFromIndex(4,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_6){ - int i,j; - Tensor23::getIntsFromIndex(5,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_7){ - int i,j; - Tensor23::getIntsFromIndex(6,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_8){ - int i,j; - Tensor23::getIntsFromIndex(7,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_9){ - int i,j; - Tensor23::getIntsFromIndex(8,i,j); - return getConstRefToEnhancedDeformationGradient()(i,j); - } - else if (comp == IPField::EXTRAFIELD_NORM){ - const STensor3& extraF = this->getConstRefToEnhancedDeformationGradient(); - return dot(extraF,extraF); - } - else - return _ipvbulk->get(comp); -} \ No newline at end of file diff --git a/dG3D/src/dG3DEnhancedStrainIPVariable.h b/dG3D/src/dG3DEnhancedStrainIPVariable.h deleted file mode 100644 index 9a5e6e6ab29a5f9a6021eb65490ebbd29acf1d3b..0000000000000000000000000000000000000000 --- a/dG3D/src/dG3DEnhancedStrainIPVariable.h +++ /dev/null @@ -1,454 +0,0 @@ -// -// C++ Interface: ipvariable -// -// Description: Class with definition of ipvarible for dG3D -// -// -// Author: <V.D. Nguyen>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef DG3DENHANCEDSTRAINIPVARIABLE_H_ -#define DG3DENHANCEDSTRAINIPVARIABLE_H_ - -#include "dG3DIPVariable.h" - -class EnhancedStrainIPVariableBase : public IPVariable{ - protected: - STensor3 _enhancedF; - STensor43 _DPDenhanceF; - - STensor3 _localEnhancedF; - STensor43 _DLocalEnhancedFDF; - STensor43 _DLocalEnhancedFDEnhancedF; - - STensor3 _DirreversibleEnergyDEnhancedF; - - STensor3 _Fbulk; - - double _betaElement; // from mesh - double _bandWidth; // from microsolver - SVector3 _localizationNormal; - -public: - EnhancedStrainIPVariableBase(): IPVariable(), _enhancedF(0.),_DPDenhanceF(0.),_localEnhancedF(0.),_DLocalEnhancedFDF(0.),_DLocalEnhancedFDEnhancedF(0.), - _betaElement(0.),_bandWidth(0.),_localizationNormal(0.),_Fbulk(1.),_DirreversibleEnergyDEnhancedF(0.){} - EnhancedStrainIPVariableBase(const EnhancedStrainIPVariableBase& src): IPVariable(src),_enhancedF(src._enhancedF),_DPDenhanceF(src._DPDenhanceF), - _localEnhancedF(src._localEnhancedF),_DLocalEnhancedFDF(src._DLocalEnhancedFDF),_DLocalEnhancedFDEnhancedF(src._DLocalEnhancedFDEnhancedF), - _betaElement(src._betaElement),_bandWidth(src._bandWidth),_localizationNormal(src._localizationNormal),_Fbulk(src._Fbulk), - _DirreversibleEnergyDEnhancedF(src._DirreversibleEnergyDEnhancedF){} - - virtual EnhancedStrainIPVariableBase& operator=(const IPVariable& src){ - IPVariable::operator =(src); - const EnhancedStrainIPVariableBase* psrc = dynamic_cast<const EnhancedStrainIPVariableBase*>(&src); - if (psrc != NULL){ - _enhancedF = psrc->_enhancedF; - _DPDenhanceF = psrc->_DPDenhanceF; - _localEnhancedF = psrc->_localEnhancedF; - _DLocalEnhancedFDF = psrc->_DLocalEnhancedFDF; - _DLocalEnhancedFDEnhancedF = psrc->_DLocalEnhancedFDEnhancedF; - _DirreversibleEnergyDEnhancedF = psrc->_DirreversibleEnergyDEnhancedF; - _betaElement = psrc->_betaElement; - _bandWidth = psrc->_bandWidth; - _localizationNormal = psrc->_localizationNormal; - _Fbulk = psrc->_Fbulk; - } - return *this; - }; - virtual ~EnhancedStrainIPVariableBase(){} - - virtual const double& getConstRefToBetaElement() const {return _betaElement;}; - virtual double& getRefToBetaElement() {return _betaElement;}; - - virtual const double& getConstRefToBandWidth() const {return _bandWidth;}; - virtual double& getRefToBandWidth() {return _bandWidth;}; - - virtual const SVector3& getConstRefToLocalizationNormal() const {return _localizationNormal;}; - virtual SVector3& getRefToLocalizationNormal() {return _localizationNormal;}; - - virtual const STensor3& getConstRefToBulkDeformationGradient() const {return _Fbulk;}; - virtual STensor3& getRefToBulkDeformationGradient() {return _Fbulk;}; - - virtual const STensor3& getConstRefToEnhancedDeformationGradient() const {return _enhancedF;}; - virtual STensor3& getRefToEnhancedDeformationGradient() {return _enhancedF;}; - - virtual const STensor43& getConstRefToEnhancedTangentModuli() const {return _DPDenhanceF;}; - virtual STensor43& getRefToEnhancedTangentModuli() {return _DPDenhanceF;}; - - virtual const STensor3& getConstRefToLocalEnhancedDeformationGradient() const {return _localEnhancedF;}; - virtual STensor3& getRefToLocalEnhancedDeformationGradient() {return _localEnhancedF;}; - - virtual const STensor43& getConstRefToDLocalEnhancedDeformationGradientDDeformationGradient() const {return _DLocalEnhancedFDF;}; - virtual STensor43& getRefToDLocalEnhancedDeformationGradientDDeformationGradient() {return _DLocalEnhancedFDF;}; - - virtual const STensor43& getConstRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient() const {return _DLocalEnhancedFDEnhancedF;}; - virtual STensor43& getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient() {return _DLocalEnhancedFDEnhancedF;}; - - virtual const STensor3& getConstRefToDIrreversibleEnergyDEnhancedDeformationGradient() const {return _DirreversibleEnergyDEnhancedF;}; - virtual STensor3& getRefToDIrreversibleEnergyDEnhancedDeformationGradient() {return _DirreversibleEnergyDEnhancedF;}; - - virtual void restart(){ - restartManager::restart(_enhancedF); - restartManager::restart(_DPDenhanceF); - restartManager::restart(_localEnhancedF); - restartManager::restart(_DLocalEnhancedFDF); - restartManager::restart(_DLocalEnhancedFDEnhancedF); - restartManager::restart(_DirreversibleEnergyDEnhancedF); - restartManager::restart(_betaElement); - restartManager::restart(_bandWidth); - restartManager::restart(_localizationNormal); - restartManager::restart(_Fbulk); - } - virtual IPVariable* clone() const {return new EnhancedStrainIPVariableBase(*this);}; - - #if defined(HAVE_MPI) - virtual int getMacroNumberElementDataSendToMicroProblem() const; - // get number of values obtained by microscopic analysis to send to macroscopic analysis - virtual int getMicroNumberElementDataSendToMacroProblem() const; - // get macroscopic kinematic data to send to microscopic problem - virtual void getMacroDataSendToMicroProblem(double* val) const; - // get computed data obtaind by microscopic analysis to send to macroscopic analysis - virtual void getMicroDataToMacroProblem(double* val) const; - // set the received data from microscopic analysis to microscopic analysis - virtual void setReceivedMacroDataToMicroProblem(const double* val); - // set the received data from microscopic analysis to macroscopic analysis - virtual void setReceivedMicroDataToMacroProblem(const double* val); - #endif -}; - - -class dG3DEnhancedStrainIPVariable : public IPVariable2Enhanced<dG3DIPVariableBase,EnhancedStrainIPVariableBase>{ - public: - dG3DEnhancedStrainIPVariable(); - dG3DEnhancedStrainIPVariable(const dG3DEnhancedStrainIPVariable &source); - virtual dG3DEnhancedStrainIPVariable& operator=(const IPVariable &source); - virtual ~dG3DEnhancedStrainIPVariable(){} - - virtual double get(const int i) const; - - virtual IPVariable* getInternalData() {return _ipvbulk->getInternalData();}; - virtual const IPVariable* getInternalData() const {return _ipvbulk->getInternalData();}; - - // access to bulk - virtual const bool isInterface() const{return _ipvbulk->isInterface();} - virtual double vonMises() const{return _ipvbulk->vonMises();} - virtual double defoEnergy() const{return _ipvbulk->defoEnergy();} - virtual double plasticEnergy() const{return _ipvbulk->plasticEnergy();} - virtual double damageEnergy() const {return _ipvbulk->damageEnergy();}; - virtual int fractureEnergy(double* arrayEnergy) const{return _ipvbulk->fractureEnergy(arrayEnergy);} - - virtual void getCauchyStress(STensor3 &cauchy) const { return _ipvbulk->getCauchyStress(cauchy); } - virtual double getJ() const { return _ipvbulk->getJ(); }; - - virtual bool dissipationIsActive() const {return _ipvbulk->dissipationIsActive();}; - - virtual void blockDissipation(const bool fl){_ipvbulk->blockDissipation(fl);}; - virtual bool dissipationIsBlocked() const {return _ipvbulk->dissipationIsBlocked();}; - - virtual const STensor3 &getConstRefToDeformationGradient() const {return _ipvbulk->getConstRefToDeformationGradient();} - virtual STensor3 &getRefToDeformationGradient() {return _ipvbulk->getRefToDeformationGradient();} - - virtual double getBarJ() const {return _ipvbulk->getBarJ();} - virtual double &getRefToBarJ() {return _ipvbulk->getRefToBarJ();} - virtual double getLocalJ() const {return _ipvbulk->getLocalJ();} - virtual double &getRefToLocalJ() {return _ipvbulk->getRefToLocalJ();} - virtual void getBackLocalDeformationGradient(STensor3& localF) const - {_ipvbulk->getBackLocalDeformationGradient(localF);}; - - virtual const STensor3 &getConstRefToFirstPiolaKirchhoffStress() const {return _ipvbulk->getConstRefToFirstPiolaKirchhoffStress();} - virtual STensor3 &getRefToFirstPiolaKirchhoffStress() {return _ipvbulk->getRefToFirstPiolaKirchhoffStress();} - - virtual const STensor43 &getConstRefToTangentModuli() const {return _ipvbulk->getConstRefToTangentModuli();} - virtual STensor43 &getRefToTangentModuli() {return _ipvbulk->getRefToTangentModuli();} - - virtual const STensor43 &getConstRefToElasticTangentModuli() const {return _ipvbulk->getConstRefToElasticTangentModuli();}; - virtual STensor43 &getRefToElasticTangentModuli() {return _ipvbulk->getRefToElasticTangentModuli();}; - - virtual const STensor43 &getConstRefToDGElasticTangentModuli() const {return _ipvbulk->getConstRefToDGElasticTangentModuli();} - virtual void setRefToDGElasticTangentModuli(const STensor43 &eT) {return _ipvbulk->setRefToDGElasticTangentModuli(eT);} - - virtual const SVector3 &getConstRefToReferenceOutwardNormal() const {return _ipvbulk->getConstRefToReferenceOutwardNormal();} - virtual SVector3 &getRefToReferenceOutwardNormal() {return _ipvbulk->getRefToReferenceOutwardNormal();} - - virtual const SVector3 &getConstRefToCurrentOutwardNormal() const {return _ipvbulk->getConstRefToCurrentOutwardNormal();} - virtual SVector3 &getRefToCurrentOutwardNormal() {return _ipvbulk->getRefToCurrentOutwardNormal();} - - virtual const SVector3 &getConstRefToJump() const {return _ipvbulk->getConstRefToJump();} - virtual SVector3 &getRefToJump() {return _ipvbulk->getRefToJump();} - - virtual const SVector3& getConstRefToIncompatibleJump() const {return _ipvbulk->getConstRefToIncompatibleJump();}; - virtual SVector3& getRefToIncompatibleJump() {return _ipvbulk->getRefToIncompatibleJump();}; - - // non local - virtual int getNumberNonLocalVariable() const {return _ipvbulk->getNumberNonLocalVariable();}; - // - virtual double getConstRefToLocalVariable(const int idex) const {return _ipvbulk->getConstRefToLocalVariable(idex);}; - virtual double& getRefToLocalVariable(const int idex) {return _ipvbulk->getRefToLocalVariable(idex);}; - // - virtual double getConstRefToNonLocalVariableInMaterialLaw(const int idex) const {return _ipvbulk->getConstRefToNonLocalVariableInMaterialLaw(idex);}; - virtual double& getRefToNonLocalVariableInMaterialLaw(const int idex) {return _ipvbulk->getRefToNonLocalVariableInMaterialLaw(idex);}; - // - virtual double getConstRefToNonLocalVariable(const int idex) const {return _ipvbulk->getConstRefToNonLocalVariable(idex);}; - virtual double& getRefToNonLocalVariable(const int idex) {return _ipvbulk->getRefToNonLocalVariable(idex);}; - - virtual const std::vector<STensor3> &getConstRefToDLocalVariableDStrain() const {return _ipvbulk->getConstRefToDLocalVariableDStrain();}; - virtual std::vector<STensor3> &getRefToDLocalVariableDStrain() {return _ipvbulk->getRefToDLocalVariableDStrain();}; - - 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 fullVector<double> &getConstRefToNonLocalJump() const {return _ipvbulk->getConstRefToNonLocalJump(); } - virtual fullVector<double> &getRefToNonLocalJump() {return _ipvbulk->getRefToNonLocalJump(); } - - virtual const std::vector<SVector3> &getConstRefToGradNonLocalVariable() const {return _ipvbulk->getConstRefToGradNonLocalVariable();} - virtual std::vector<SVector3> &getRefToGradNonLocalVariable() {return _ipvbulk->getRefToGradNonLocalVariable();} - - virtual const STensor3 &getConstRefToCharacteristicLengthMatrix(const int idx) const {return _ipvbulk->getConstRefToCharacteristicLengthMatrix(idx);}; - //coupling non local with constitutiveExtraDof - virtual const fullMatrix<double> & getConstRefTodLocalVariableDExtraDofDiffusionField() const {return _ipvbulk->getConstRefTodLocalVariableDExtraDofDiffusionField();} - virtual fullMatrix<double> & getRefTodLocalVariableDExtraDofDiffusionField(){return _ipvbulk->getRefTodLocalVariableDExtraDofDiffusionField();} - - // coupling non local with curlData - virtual const std::vector< SVector3 > & getConstRefTodLocalVariabledVectorCurl() const - { - return _ipvbulk->getConstRefTodLocalVariabledVectorCurl(); - } - virtual std::vector< SVector3 > & getRefTodLocalVariabledVectorCurl() - { - return _ipvbulk->getRefTodLocalVariabledVectorCurl(); - } - - // extra dofs - virtual int getNumConstitutiveExtraDofDiffusionVariable() const {return _ipvbulk->getNumConstitutiveExtraDofDiffusionVariable();}; - virtual double getConstRefToField(const int idex) const {return _ipvbulk->getConstRefToField(idex);}; - virtual double&getRefToField(const int idex) {return _ipvbulk->getRefToField(idex);}; - virtual const std::vector<SVector3> &getConstRefToGradField() const {return _ipvbulk->getConstRefToGradField();}; - virtual std::vector<SVector3> &getRefToGradField() {return _ipvbulk->getRefToGradField();}; - virtual const std::vector<SVector3> &getConstRefToFlux() const {return _ipvbulk->getConstRefToFlux();}; - virtual std::vector<SVector3> &getRefToFlux() {return _ipvbulk->getRefToFlux();}; - virtual const std::vector<STensor3> &getConstRefTodPdField() const {return _ipvbulk->getConstRefTodPdField();}; - virtual std::vector<STensor3> &getRefTodPdField() {return _ipvbulk->getRefTodPdField();}; - virtual const std::vector<STensor33> &getConstRefTodPdGradField() const {return _ipvbulk->getConstRefTodPdGradField();}; - virtual std::vector<STensor33> &getRefTodPdGradField() {return _ipvbulk->getRefTodPdGradField();}; - virtual const std::vector<std::vector<STensor3> > &getConstRefTodFluxdGradField() const {return _ipvbulk->getConstRefTodFluxdGradField();}; - virtual std::vector<std::vector<STensor3> > &getRefTodFluxdGradField() {return _ipvbulk->getRefTodFluxdGradField();}; - virtual const std::vector<std::vector<SVector3> > &getConstRefTodFluxdField() const {return _ipvbulk->getConstRefTodFluxdField();}; - virtual std::vector<std::vector<SVector3> > &getRefTodFluxdField() {return _ipvbulk->getRefTodFluxdField();}; - virtual const std::vector<STensor33> &getConstRefTodFluxdF() const {return _ipvbulk->getConstRefTodFluxdF();}; - virtual std::vector<STensor33> &getRefTodFluxdF() {return _ipvbulk->getRefTodFluxdF();}; - virtual const std::vector<std::vector<const STensor3*> > &getConstRefToLinearK() const {return _ipvbulk->getConstRefToLinearK();}; - virtual void setConstRefToLinearK(const STensor3 &eT, int i, int j) {_ipvbulk->setConstRefToLinearK(eT, i, j);}; - virtual const std::vector<std::vector<std::vector<STensor3> > > &getConstRefTodLinearKdField() const {return _ipvbulk->getConstRefTodLinearKdField();}; - virtual std::vector<std::vector<std::vector<STensor3> > > &getRefTodLinearKdField() {return _ipvbulk->getRefTodLinearKdField();}; - virtual const std::vector<std::vector<STensor43>> &getConstRefTodLinearKdF() const {return _ipvbulk->getConstRefTodLinearKdF();}; - virtual std::vector<std::vector<STensor43>> &getRefTodLinearKdF() {return _ipvbulk->getRefTodLinearKdF();}; -/* virtual const std::vector<std::vector<const STensor3*> > &getConstRefToEnergyK() const {return _ipvbulk->getConstRefToEnergyK();}; - virtual void setConstRefToEnergyK(const STensor3 &eT, int i, int j) {_ipvbulk->setConstRefToEnergyK(eT, i, j);}; - virtual const std::vector<std::vector<std::vector<STensor3> > > &getConstRefTodEnergyKdField() const {return _ipvbulk->getConstRefTodEnergyKdField();}; - virtual std::vector<std::vector<std::vector<STensor3> > > &getRefTodEnergyKdField() {return _ipvbulk->getRefTodEnergyKdField();}; - virtual const std::vector<std::vector<STensor43>> &getConstRefTodEnergyKdF() const {return _ipvbulk->getConstRefTodEnergyKdF();}; - virtual std::vector<std::vector<STensor43>> &getRefTodEnergyKdF() {return _ipvbulk->getRefTodEnergyKdF();}; */ - virtual const std::vector<std::vector<std::vector<STensor3> > > &getConstRefTodFluxdGradFielddField() const {return _ipvbulk->getConstRefTodFluxdGradFielddField();}; - virtual std::vector<std::vector<std::vector<STensor3> > > &getRefTodFluxdGradFielddField() {return _ipvbulk->getRefTodFluxdGradFielddField();}; - virtual const std::vector<std::vector<STensor43>> &getConstRefTodFluxdGradFielddF() const {return _ipvbulk->getConstRefTodFluxdGradFielddF();}; - virtual std::vector<std::vector<STensor43>> &getRefTodFluxdGradFielddF() {return _ipvbulk->getRefTodFluxdGradFielddF();}; - virtual const fullVector<double> &getConstRefToFieldSource() const {return _ipvbulk->getConstRefToFieldSource();}; - virtual fullVector<double> &getRefToFieldSource() {return _ipvbulk->getRefToFieldSource();}; - virtual const fullMatrix<double> &getConstRefTodFieldSourcedField() const {return _ipvbulk->getConstRefTodFieldSourcedField();}; - virtual fullMatrix<double> &getRefTodFieldSourcedField() {return _ipvbulk->getRefTodFieldSourcedField();}; - virtual const std::vector<std::vector<SVector3> > &getConstRefTodFieldSourcedGradField() const {return _ipvbulk->getConstRefTodFieldSourcedGradField();}; - virtual std::vector<std::vector<SVector3> > &getRefTodFieldSourcedGradField() {return _ipvbulk->getRefTodFieldSourcedGradField();}; - virtual const std::vector<STensor3> &getConstRefTodFieldSourcedF() const {return _ipvbulk->getConstRefTodFieldSourcedF();}; - virtual std::vector<STensor3> &getRefTodFieldSourcedF() {return _ipvbulk->getRefTodFieldSourcedF();}; - virtual const fullVector<double> &getConstRefToMechanicalSource() const {return _ipvbulk->getConstRefToMechanicalSource();}; - virtual fullVector<double> &getRefToMechanicalSource() {return _ipvbulk->getRefToMechanicalSource();}; - virtual const fullMatrix<double> &getConstRefTodMechanicalSourcedField() const {return _ipvbulk->getConstRefTodMechanicalSourcedField();}; - virtual fullMatrix<double> &getRefTodMechanicalSourcedField() {return _ipvbulk->getRefTodMechanicalSourcedField();}; - virtual const std::vector<std::vector<SVector3> > &getConstRefTodMechanicalSourcedGradField() const {return _ipvbulk->getConstRefTodMechanicalSourcedGradField();}; - virtual std::vector<std::vector<SVector3> > &getRefTodMechanicalSourcedGradField() {return _ipvbulk->getRefTodMechanicalSourcedGradField();}; - virtual const std::vector<STensor3> &getConstRefTodMechanicalSourcedF() const {return _ipvbulk->getConstRefTodMechanicalSourcedF();}; - virtual std::vector<STensor3> &getRefTodMechanicalSourcedF() {return _ipvbulk->getRefTodMechanicalSourcedF();}; - virtual const fullVector<double> &getConstRefToExtraDofFieldCapacityPerUnitField() const {return _ipvbulk->getConstRefToExtraDofFieldCapacityPerUnitField();}; - virtual fullVector<double> &getRefToExtraDofFieldCapacityPerUnitField() {return _ipvbulk->getRefToExtraDofFieldCapacityPerUnitField();}; - virtual const fullVector<double> &getConstRefToFieldJump() const {return _ipvbulk->getConstRefToFieldJump();}; - virtual fullVector<double> &getRefToFieldJump() {return _ipvbulk->getRefToFieldJump();}; - virtual const fullVector<double> &getConstRefToOneOverFieldJump() const {return _ipvbulk->getConstRefToOneOverFieldJump();}; - virtual fullVector<double> &getRefToOneOverFieldJump() {return _ipvbulk->getRefToOneOverFieldJump();}; - virtual const fullMatrix<double> &getConstRefTodOneOverFieldJumpdFieldm() const {return _ipvbulk->getConstRefTodOneOverFieldJumpdFieldm();}; - virtual fullMatrix<double> &getRefTodOneOverFieldJumpdFieldm() {return _ipvbulk->getRefTodOneOverFieldJumpdFieldm() ;}; - virtual const fullMatrix<double> &getConstRefTodOneOverFieldJumpdFieldp() const {return _ipvbulk->getConstRefTodOneOverFieldJumpdFieldp();}; - virtual fullMatrix<double> &getRefTodOneOverFieldJumpdFieldp() {return _ipvbulk->getRefTodOneOverFieldJumpdFieldp();}; - virtual const std::vector<SVector3> &getConstRefToInterfaceFlux() const {return _ipvbulk->getConstRefToInterfaceFlux();}; - virtual std::vector<SVector3> &getRefToInterfaceFlux() {return _ipvbulk->getRefToInterfaceFlux();}; - //coupling constitutive extra dof with nonLocal - virtual const std::vector<std::vector<SVector3> > & getConstRefTodFluxdNonLocalVariable() const {return _ipvbulk->getConstRefTodFluxdNonLocalVariable();} - virtual std::vector<std::vector<SVector3> > & getRefTodFluxdNonLocalVariable(){return _ipvbulk->getRefTodFluxdNonLocalVariable();} - virtual const fullMatrix<double> &getConstRefTodFieldSourcedNonLocalVariable() const{return _ipvbulk->getConstRefTodFieldSourcedNonLocalVariable();} - virtual fullMatrix<double> &getRefTodFieldSourcedNonLocalVariable(){return _ipvbulk->getRefTodFieldSourcedNonLocalVariable();} - virtual const fullMatrix<double> &getConstRefTodMechanicalSourcedNonLocalVariable() const{return _ipvbulk->getConstRefTodMechanicalSourcedNonLocalVariable();} - virtual fullMatrix<double> &getRefTodMechanicalSourcedNonLocalVariable(){return _ipvbulk->getRefTodMechanicalSourcedNonLocalVariable();} - virtual const std::vector<const STensor3*> &getConstRefToLinearSymmetrizationCoupling() const {return _ipvbulk->getConstRefToLinearSymmetrizationCoupling();}; - virtual void setConstRefToLinearSymmetrizationCoupling(const STensor3 &eT, int i) {_ipvbulk->setConstRefToLinearSymmetrizationCoupling(eT,i);}; - - //coupling constitutive extra dof with curl data - virtual const std::vector< std::vector< STensor3 > > & getConstRefTodFluxdVectorCurl() const - { - return _ipvbulk->getConstRefTodFluxdVectorCurl(); - } - virtual const std::vector< std::vector< SVector3 > > & getConstRefTodFieldSourcedVectorCurl() const - { - return _ipvbulk->getConstRefTodFieldSourcedVectorCurl(); - } - virtual const std::vector< std::vector< SVector3 > > & getConstRefTodMechanicalSourcedVectorCurl() const - { - return _ipvbulk->getConstRefTodMechanicalSourcedVectorCurl(); - } - - virtual std::vector< std::vector< STensor3 > > & getRefTodFluxdVectorCurl() - { - return _ipvbulk->getRefTodFluxdVectorCurl(); - } - virtual std::vector< std::vector< SVector3 > > & getRefTodFieldSourcedVectorCurl() - { - return _ipvbulk->getRefTodFieldSourcedVectorCurl(); - } - virtual std::vector< std::vector< SVector3 > > & getRefTodMechanicalSourcedVectorCurl() - { - return _ipvbulk->getRefTodMechanicalSourcedVectorCurl(); - } - -// curl data - virtual int getNumConstitutiveCurlVariable() const { return _ipvbulk->getNumConstitutiveCurlVariable();} - virtual const SVector3 & getConstRefToVectorPotential(const int idex) const { return _ipvbulk->getConstRefToVectorPotential(idex);} - virtual SVector3 & getRefToVectorPotential(const int idex) { return _ipvbulk->getRefToVectorPotential(idex);} - virtual const SVector3 & getConstRefToVectorCurl(const int idex) const { return _ipvbulk->getConstRefToVectorCurl(idex);} - virtual SVector3 & getRefToVectorCurl(const int idex) { return _ipvbulk->getRefToVectorCurl(idex);} - virtual const SVector3 & getConstRefToVectorField(const int idex) const { return _ipvbulk->getConstRefToVectorField(idex);} - virtual SVector3 & getRefToVectorField(const int idex) { return _ipvbulk->getRefToVectorField(idex);} - virtual const SVector3 & getConstRefToSourceVectorField(const int idex) const { return _ipvbulk->getConstRefToSourceVectorField(idex);} - virtual SVector3 & getRefToSourceVectorField(const int idex) { return _ipvbulk->getRefToSourceVectorField(idex);} - virtual const SVector3 & getConstRefToMechanicalFieldSource(const int idex) const { return _ipvbulk->getConstRefToMechanicalFieldSource(idex);} - virtual SVector3 & getRefToMechanicalFieldSource(const int idex) { return _ipvbulk->getRefToMechanicalFieldSource(idex);} - - virtual const std::vector<std::vector< STensor3 > > & getConstRefTodVectorFielddVectorCurl() const { return _ipvbulk->getConstRefTodVectorFielddVectorCurl();} - virtual const std::vector< STensor33 > & getConstRefTodVectorFielddF() const { return _ipvbulk->getConstRefTodVectorFielddF();} - virtual const std::vector<std::vector< SVector3 > > & getConstRefTodVectorFielddExtraDofField() const { return _ipvbulk->getConstRefTodVectorFielddExtraDofField();} - virtual const std::vector<std::vector< STensor3 > > & getConstRefTodVectorFielddGradExtraDofField() const { return _ipvbulk->getConstRefTodVectorFielddGradExtraDofField();} - virtual const std::vector< STensor33 > & getConstRefTodPdVectorCurl() const { return _ipvbulk->getConstRefTodPdVectorCurl();} - - virtual std::vector<std::vector< STensor3 > > & getRefTodVectorFielddVectorCurl() { return _ipvbulk->getRefTodVectorFielddVectorCurl();} - virtual std::vector< STensor33 > & getRefTodVectorFielddF() { return _ipvbulk->getRefTodVectorFielddF();} - virtual std::vector<std::vector< SVector3 > > & getRefTodVectorFielddExtraDofField() { return _ipvbulk->getRefTodVectorFielddExtraDofField();} - virtual std::vector<std::vector< STensor3 > > & getRefTodVectorFielddGradExtraDofField() { return _ipvbulk->getRefTodVectorFielddGradExtraDofField();} - virtual std::vector< STensor33 > & getRefTodPdVectorCurl() { return _ipvbulk->getRefTodPdVectorCurl();} - - virtual const std::vector<std::vector< SVector3 > > & getConstRefTodVectorFielddNonLocalVariable() const { return _ipvbulk->getConstRefTodVectorFielddNonLocalVariable();} - virtual std::vector<std::vector< SVector3 > > & getRefTodVectorFielddNonLocalVariable() { return _ipvbulk->getRefTodVectorFielddNonLocalVariable();} - virtual const std::vector< std::vector< SVector3 > > & getConstRefTodSourceVectorFielddNonLocalVariable() const { return _ipvbulk->getConstRefTodSourceVectorFielddNonLocalVariable();} - virtual std::vector< std::vector< SVector3 > > & getRefTodSourceVectorFielddNonLocalVariable() { return _ipvbulk->getRefTodSourceVectorFielddNonLocalVariable();} - - virtual const std::vector< std::vector< SVector3 > > & getConstRefTodSourceVectorFielddExtraDofField() const { return _ipvbulk->getConstRefTodSourceVectorFielddExtraDofField();} - virtual std::vector< std::vector< SVector3 > > & getRefTodSourceVectorFielddExtraDofField() { return _ipvbulk->getRefTodSourceVectorFielddExtraDofField();} - virtual const std::vector< std::vector< STensor3 > > & getConstRefTodSourceVectorFielddGradExtraDofField() const { return _ipvbulk->getConstRefTodSourceVectorFielddGradExtraDofField();} - virtual std::vector< std::vector< STensor3 > > & getRefTodSourceVectorFielddGradExtraDofField() { return _ipvbulk->getRefTodSourceVectorFielddGradExtraDofField();} - virtual const std::vector< std::vector< STensor3 > > & getConstRefTodMechanicalFieldSourcedVectorCurl() const { return _ipvbulk->getConstRefTodMechanicalFieldSourcedVectorCurl();} - virtual std::vector< std::vector< STensor3 > > & getRefTodMechanicalFieldSourcedVectorCurl() { return _ipvbulk->getRefTodMechanicalFieldSourcedVectorCurl();} - virtual const std::vector< STensor33 > & getConstRefTodSourceVectorFielddF() const { return _ipvbulk->getConstRefTodSourceVectorFielddF();} - virtual std::vector< STensor33 > & getRefTodSourceVectorFielddF() { return _ipvbulk->getRefTodSourceVectorFielddF();} - virtual const std::vector< STensor33 > & getConstRefTodMechanicalFieldSourcedF() const { return _ipvbulk->getConstRefTodMechanicalFieldSourcedF();} - virtual std::vector< STensor33 > & getRefTodMechanicalFieldSourcedF() { return _ipvbulk->getRefTodMechanicalFieldSourcedF();} - virtual const std::vector< std::vector< SVector3 > > & getConstRefTodMechanicalFieldSourcedExtraDofField() const { return _ipvbulk->getConstRefTodMechanicalFieldSourcedExtraDofField();} - virtual std::vector< std::vector< SVector3 > > & getRefTodMechanicalFieldSourcedExtraDofField() { return _ipvbulk->getRefTodMechanicalFieldSourcedExtraDofField();} - virtual const std::vector< std::vector< STensor3 > > & getConstRefTodMechanicalFieldSourcedGradExtraDofField() const { return _ipvbulk->getConstRefTodMechanicalFieldSourcedGradExtraDofField();} - virtual std::vector< std::vector< STensor3 > > & getRefTodMechanicalFieldSourcedGradExtraDofField() { return _ipvbulk->getRefTodMechanicalFieldSourcedGradExtraDofField();} - virtual const std::vector< std::vector< SVector3 > > & getConstRefTodMechanicalFieldSourcedNonLocalVariable() const { return _ipvbulk->getConstRefTodMechanicalFieldSourcedNonLocalVariable();} - virtual std::vector< std::vector< SVector3 > > & getRefTodMechanicalFieldSourcedNonLocalVariable() { return _ipvbulk->getRefTodMechanicalFieldSourcedNonLocalVariable();} - virtual const SVector3 & getConstRefTodSourceVectorFielddt(const int idex) const { return _ipvbulk->getConstRefTodSourceVectorFielddt(idex);} - virtual SVector3 & getRefTodSourceVectorFielddt(const int idex) { return _ipvbulk->getRefTodSourceVectorFielddt(idex);} - - //Energy Conjugated Field (fT & fv) - virtual double getConstRefToEnergyConjugatedField(const int idex) const {return _ipvbulk->getConstRefToEnergyConjugatedField(idex);}; - virtual double &getRefToEnergyConjugatedField(const int idex) {return _ipvbulk->getRefToEnergyConjugatedField(idex);}; - virtual const std::vector<SVector3> &getConstRefToGradEnergyConjugatedField() const {return _ipvbulk->getConstRefToGradEnergyConjugatedField();}; - virtual std::vector<SVector3> &getRefToGradEnergyConjugatedField() {return _ipvbulk->getRefToGradEnergyConjugatedField();}; - virtual const std::vector<std::vector<double>> &getConstRefTodFielddEnergyConjugatedField() const {return _ipvbulk->getConstRefTodFielddEnergyConjugatedField();}; - virtual std::vector<std::vector<double>> &getRefTodFielddEnergyConjugatedField() {return _ipvbulk->getRefTodFielddEnergyConjugatedField();}; - virtual const std::vector<std::vector<SVector3>> &getConstRefTodGradFielddEnergyConjugatedField() const {return _ipvbulk->getConstRefTodGradFielddEnergyConjugatedField();}; - virtual std::vector<std::vector<SVector3>> &getRefTodGradFielddEnergyConjugatedField() {return _ipvbulk->getRefTodGradFielddEnergyConjugatedField();}; - virtual const std::vector<std::vector<STensor3>> &getConstRefTodGradFielddGradEnergyConjugatedField() const {return _ipvbulk->getConstRefTodGradFielddGradEnergyConjugatedField();}; - virtual std::vector<std::vector<STensor3>> &getRefTodGradFielddGradEnergyConjugatedField() {return _ipvbulk->getRefTodGradFielddGradEnergyConjugatedField();}; - virtual const fullVector<double> &getConstRefToEnergyConjugatedFieldJump() const {return _ipvbulk->getConstRefToEnergyConjugatedFieldJump();}; - virtual fullVector<double> &getRefToEnergyConjugatedFieldJump() {return _ipvbulk->getRefToEnergyConjugatedFieldJump();}; - virtual const std::vector<std::vector<double>> &getConstRefTodEnergyConjugatedFieldJumpdFieldm() const {return _ipvbulk->getConstRefTodEnergyConjugatedFieldJumpdFieldm();}; - virtual std::vector<std::vector<double>> &getRefTodEnergyConjugatedFieldJumpdFieldm() {return _ipvbulk->getRefTodEnergyConjugatedFieldJumpdFieldm();}; - virtual const std::vector<std::vector<double>> &getConstRefTodEnergyConjugatedFieldJumpdFieldp() const {return _ipvbulk->getConstRefTodEnergyConjugatedFieldJumpdFieldp();}; - virtual std::vector<std::vector<double>> &getRefTodEnergyConjugatedFieldJumpdFieldp() {return _ipvbulk->getRefTodEnergyConjugatedFieldJumpdFieldp();}; - - - //------------------get 1st piola b4 AV ---------------// - - virtual const STensor3 &getConstRefToFirstPiolaKirchhoffStressb4AV() const {return _ipvbulk->getConstRefToFirstPiolaKirchhoffStressb4AV();} - virtual STensor3 &getRefToFirstPiolaKirchhoffStressb4AV() {return _ipvbulk->getRefToFirstPiolaKirchhoffStressb4AV();} - - - virtual void setNonLocalToLocal(const bool fl){_ipvbulk->setNonLocalToLocal(fl);}; - virtual bool getNonLocalToLocal() const {return _ipvbulk->getNonLocalToLocal();}; - - // for path following based on irreversibe energt - virtual double irreversibleEnergy() const {return _ipvbulk->irreversibleEnergy();}; - virtual double& getRefToIrreversibleEnergy() {return _ipvbulk->getRefToIrreversibleEnergy();}; - // to avoid duplicate allocation - virtual const STensor3& getConstRefToDIrreversibleEnergyDDeformationGradient() const {return _ipvbulk->getConstRefToDIrreversibleEnergyDDeformationGradient();}; - virtual STensor3& getRefToDIrreversibleEnergyDDeformationGradient() {return _ipvbulk->getRefToDIrreversibleEnergyDDeformationGradient();}; - - // irreversible ennergy depend on nonlocal variale - virtual const double& getConstRefToDIrreversibleEnergyDNonLocalVariable(const int index) const {return _ipvbulk->getConstRefToDIrreversibleEnergyDNonLocalVariable(index);}; - virtual double& getRefToDIrreversibleEnergyDDNonLocalVariable(const int index) {return _ipvbulk->getRefToDIrreversibleEnergyDDNonLocalVariable(index);}; - - - - // enhance function - virtual const STensor3& getConstRefToEnhancedDeformationGradient() const {return _ipvfrac->getConstRefToEnhancedDeformationGradient();}; - virtual STensor3& getRefToEnhancedDeformationGradient() {return _ipvfrac->getRefToEnhancedDeformationGradient();}; - - virtual const STensor43& getConstRefToEnhancedTangentModuli() const {return _ipvfrac->getConstRefToEnhancedTangentModuli();}; - virtual STensor43& getRefToEnhancedTangentModuli() {return _ipvfrac->getRefToEnhancedTangentModuli();}; - - virtual const STensor3& getConstRefToLocalEnhancedDeformationGradient() const {return _ipvfrac->getConstRefToLocalEnhancedDeformationGradient();}; - virtual STensor3& getRefToLocalEnhancedDeformationGradient() {return _ipvfrac->getRefToLocalEnhancedDeformationGradient();}; - - virtual const STensor43& getConstRefToDLocalEnhancedDeformationGradientDDeformationGradient() const {return _ipvfrac->getConstRefToDLocalEnhancedDeformationGradientDDeformationGradient();}; - virtual STensor43& getRefToDLocalEnhancedDeformationGradientDDeformationGradient() {return _ipvfrac->getRefToDLocalEnhancedDeformationGradientDDeformationGradient();}; - - virtual const STensor43& getConstRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient() const {return _ipvfrac->getConstRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient();}; - virtual STensor43& getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient() {return _ipvfrac->getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient();}; - - virtual const STensor3& getConstRefToDIrreversibleEnergyDEnhancedDeformationGradient() const {return _ipvfrac->getConstRefToDIrreversibleEnergyDEnhancedDeformationGradient();}; - virtual STensor3& getRefToDIrreversibleEnergyDEnhancedDeformationGradient() {return _ipvfrac->getRefToDIrreversibleEnergyDEnhancedDeformationGradient();}; - - virtual const double& getConstRefToBetaElement() const {return _ipvfrac->getConstRefToBetaElement();}; - virtual double& getRefToBetaElement() {return _ipvfrac->getRefToBetaElement();}; - - virtual const double& getConstRefToBandWidth() const {return _ipvfrac->getConstRefToBandWidth();}; - virtual double& getRefToBandWidth() {return _ipvfrac->getRefToBandWidth();}; - - virtual const SVector3& getConstRefToLocalizationNormal() const {return _ipvfrac->getConstRefToLocalizationNormal();}; - virtual SVector3& getRefToLocalizationNormal() {return _ipvfrac->getRefToLocalizationNormal();}; - - virtual const STensor3& getConstRefToBulkDeformationGradient() const {return _ipvfrac->getConstRefToBulkDeformationGradient();}; - virtual STensor3& getRefToBulkDeformationGradient() {return _ipvfrac->getRefToBulkDeformationGradient();}; - - virtual IPVariable* clone() const {return new dG3DEnhancedStrainIPVariable(*this);}; - virtual void restart(); -}; - - - - - -#endif // DG3DENHANCEDSTRAINIPVARIABLE_H_ diff --git a/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp b/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp deleted file mode 100644 index 67e03e1fbefd9f1066963e9ab33bf721ccbed8f3..0000000000000000000000000000000000000000 --- a/dG3D/src/dG3DEnhancedStrainMaterialLaw.cpp +++ /dev/null @@ -1,335 +0,0 @@ -// -// -// Description: Class of materials for non linear dg -// -// -// Author: <V.D. NGUYEN>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#include "dG3DEnhancedStrainMaterialLaw.h" -#include "dG3DEnhancedStrainIPVariable.h" -#include "embeddedLocalizationBand.h" -#include "dG3DMultiscaleIPVariable.h" -#include "nonLinearMechSolver.h" - -enhancedStrainDG3DLinearElasticMaterialLaw::enhancedStrainDG3DLinearElasticMaterialLaw(const int num, const double rho, const double E, const double nu): - dG3DLinearElasticMaterialLaw(num,rho,E,nu) -{ -} -enhancedStrainDG3DLinearElasticMaterialLaw::enhancedStrainDG3DLinearElasticMaterialLaw(const enhancedStrainDG3DLinearElasticMaterialLaw& src):dG3DLinearElasticMaterialLaw(src){ - -}; - - -void enhancedStrainDG3DLinearElasticMaterialLaw::createIPState(IPStateBase* &ips,const bool* state_,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const -{ - // check interface element - bool inter=true; - const MInterfaceElement *iele = dynamic_cast<const MInterfaceElement*>(ele); - if(iele==NULL) inter=false; - IPVariable* ipvi = new dG3DEnhancedStrainIPVariable(); - IPVariable* ipv1 = new dG3DEnhancedStrainIPVariable(); - IPVariable* ipv2 = new dG3DEnhancedStrainIPVariable(); - - dG3DEnhancedStrainIPVariable *ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipvi); - IPVariable* ipvBulk = new LinearElasticDG3DIPVariable(inter); - IPVariable* ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); - - ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipv1); - ipvBulk = new LinearElasticDG3DIPVariable(inter); - ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); - - ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipv2); - ipvBulk = new LinearElasticDG3DIPVariable(inter); - ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); - - if(ips != NULL) delete ips; - ips = new IP3State(state_,ipvi,ipv1,ipv2); -} - -void enhancedStrainDG3DLinearElasticMaterialLaw::createIPVariable(IPVariable* &ipv,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const -{ - if(ipv !=NULL) delete ipv; - bool inter=true; - const MInterfaceElement *iele = dynamic_cast<const MInterfaceElement*>(ele); - if(iele == NULL){ - inter=false; - } - ipv = new dG3DEnhancedStrainIPVariable(); - dG3DEnhancedStrainIPVariable *ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipv); - IPVariable* ipvBulk = new LinearElasticDG3DIPVariable(inter); - IPVariable* ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); -} - - -void enhancedStrainDG3DLinearElasticMaterialLaw::stress(IPVariable* ipv, const IPVariable* ipvp, const bool stiff, const bool checkfrac, const bool dTangent) -{ - /* get ipvariable */ - dG3DEnhancedStrainIPVariable* ipvcur = static_cast<dG3DEnhancedStrainIPVariable*>(ipv);; - const dG3DEnhancedStrainIPVariable* ipvprev = static_cast<const dG3DEnhancedStrainIPVariable*>(ipvp);; - /* strain xyz */ - const STensor3& F = ipvcur->getConstRefToDeformationGradient(); - STensor3& P = ipvcur->getRefToFirstPiolaKirchhoffStress(); - - static STensor3 Ftotal; - Ftotal=(F); - static STensor43 TangentTotal; - TangentTotal*=(0.); - Ftotal += ipvcur->getConstRefToEnhancedDeformationGradient(); - - _elasticLaw.constitutive(Ftotal,P,stiff,&TangentTotal); - - - ipvcur->getRefToTangentModuli() = TangentTotal; - ipvcur->getRefToEnhancedTangentModuli() = TangentTotal; - - ipvcur->setRefToDGElasticTangentModuli(this->elasticStiffness); -} - - -void enhancedStraindG3DMultiscaleMaterialLaw::fillElasticStiffness(double & rho, STensor43& L){ - printf("get elastic properties\n"); - this->assignMeshId(0,0); - nonLinearMechSolver* solver = this->createMicroSolver(0,0); - solver->tangentAveragingFlag(true); - solver->setExtractCohesiveLawFromMicroDamage(false); - solver->setExtractIrreversibleEnergyFlag(false); - solver->initMicroSolver(); - - L = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_F(); - rho = solver->getHomogenizedDensity(); - delete solver; -}; - -enhancedStraindG3DMultiscaleMaterialLaw::enhancedStraindG3DMultiscaleMaterialLaw(const int lnum, const int tag) - : dG3DMaterialLaw(lnum,0,false),numericalMaterial(tag), - _lostSolutionUniquenssTolerance(0.),_RVELength(0.),_surfaceReductionRatio(0.){}; - -void enhancedStraindG3DMultiscaleMaterialLaw::initLaws(const std::map<int,materialLaw*> &maplaw){ - if (!_initialized){ - this->fillElasticStiffness(_rho,elasticStiffness); - _initialized = true; - } -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::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); -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::createIPState(const bool isSolve, IPStateBase* &ips,const bool* state, - const MElement *ele, const int nbFF, const IntPt *GP, const int gpt) const{ - - IPVariable* ipvi = new dG3DEnhancedStrainIPVariable(); - IPVariable* ipv1 = new dG3DEnhancedStrainIPVariable(); - IPVariable* ipv2 = new dG3DEnhancedStrainIPVariable(); - - bool oninter = true; - const MInterfaceElement* iele = dynamic_cast<const MInterfaceElement*>(ele); - if (iele == NULL) oninter = false; - - dG3DEnhancedStrainIPVariable *ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipvi); - IPVariable* ipvBulk = new dG3DMultiscaleIPVariable(oninter); - IPVariable* ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); - - ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipv1); - ipvBulk = new dG3DMultiscaleIPVariable(oninter); - ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); - - ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipv2); - ipvBulk = new dG3DMultiscaleIPVariable(oninter); - ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); - - - if(ips != NULL) delete ips; - ips = new IP3State(state,ipvi,ipv1,ipv2); - - if (isSolve){ - int el = ele->getNum(); - nonLinearMechSolver* solver = this->createMicroSolver(el,gpt); - solver->setExtractCohesiveLawFromMicroDamage(true); // always extract cohesive law - bool withNormal= false; - solver->setCheckFailureOnset(true,withNormal); - solver->setRVELengthInNormalDirection(_RVELength,_surfaceReductionRatio); - solver->initMicroSolver(); - ips->setMicroSolver(solver); - } -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::createIPVariable(IPVariable* &ipv,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const{ - bool oninter = true; - const MInterfaceElement* iele = dynamic_cast<const MInterfaceElement*>(ele); - if (iele == NULL) oninter = false; - ipv = new dG3DEnhancedStrainIPVariable(); - dG3DEnhancedStrainIPVariable *ipvf = static_cast<dG3DEnhancedStrainIPVariable*>(ipv); - IPVariable* ipvBulk = new dG3DMultiscaleIPVariable(oninter); - IPVariable* ipvExtra= new EnhancedStrainIPVariableBase(); - ipvf->setIPvBulk(ipvBulk); - ipvf->setIPvEnhanced(ipvExtra); -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::checkInternalState(IPVariable* ipv, const IPVariable* ipvprev) const{ - dG3DEnhancedStrainIPVariable* eipv = static_cast<dG3DEnhancedStrainIPVariable*>(ipv); - const dG3DEnhancedStrainIPVariable* eipvprev = static_cast<const dG3DEnhancedStrainIPVariable*>(ipvprev); - - dG3DMultiscaleIPVariable* mipv = static_cast<dG3DMultiscaleIPVariable*>(eipv->getIPvBulk()); - nonLinearMechSolver* solver = mipv->getMicroSolver(); - - // check failure - solver->setLostSolutionUniquenssTolerance(_lostSolutionUniquenssTolerance); - solver->checkFailureOnset(); - mipv->brokenSolver(solver->solverIsBroken()); -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::stress(IPVariable* ipv, const IPVariable* ipvprev, const bool stiff, const bool checkfrac, const bool dTangent){ - - dG3DEnhancedStrainIPVariable* eipv = static_cast<dG3DEnhancedStrainIPVariable*>(ipv); - const dG3DEnhancedStrainIPVariable* eipvprev = static_cast<const dG3DEnhancedStrainIPVariable*>(ipvprev); - - dG3DMultiscaleIPVariable* mipv = static_cast<dG3DMultiscaleIPVariable*>(eipv->getIPvBulk()); - nonLinearMechSolver* solver = mipv->getMicroSolver(); - - const STensor3& Fbulk = eipv->getConstRefToBulkDeformationGradient(); - const STensor3& Fbulkprev= eipvprev->getConstRefToBulkDeformationGradient(); - - const double& betaE = eipvprev->getConstRefToBetaElement(); // avoid derivatives - const STensor3& enhancF = eipv->getConstRefToEnhancedDeformationGradient(); - const STensor3& enhancFprev = eipvprev->getConstRefToEnhancedDeformationGradient(); - - if ((!solver->solverIsBroken()) or mipv->isInterface()){ - // set kinematics input - STensor3& F = eipv->getRefToDeformationGradient(); - F = Fbulk; // F bulk only - F += enhancF; - - solver->getMicroBC()->setDeformationGradient(F); - // set tangent averaging flag - solver->tangentAveragingFlag(stiff); - // solve micro problem - bool success = solver->microSolve(); - // get homogenized properties form solved micro problem - eipv->getRefToFirstPiolaKirchhoffStress() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedStress(); - mipv->getRefToDefoEnergy() = solver->getHomogenizationState(IPStateBase::current)->getDeformationEnergy(); - mipv->getRefToPlasticEnergy() = solver->getHomogenizationState(IPStateBase::current)->getPlasticEnergy(); - eipv->getRefToIrreversibleEnergy() = solver->getHomogenizationState(IPStateBase::current)->getIrreversibleEnergy(); - - - STensorOperation::zero(eipv->getRefToLocalEnhancedDeformationGradient()); - - if (stiff){ - eipv->getRefToTangentModuli() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_F(); - eipv->getRefToDIrreversibleEnergyDDeformationGradient() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_IrreversibleEnergy_F(); - eipv->getRefToDIrreversibleEnergyDEnhancedDeformationGradient() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_IrreversibleEnergy_F(); - - eipv->getRefToEnhancedTangentModuli() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_F(); - STensorOperation::zero(eipv->getRefToDLocalEnhancedDeformationGradientDDeformationGradient()); - STensorOperation::zero(eipv->getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient()); - }; - } - else{ - double beta = solver->getHomogenizationState(IPStateBase::previous)->getActiveDissipationVolume()/solver->getRVEVolume(); - - //printf("computing in failure state beta = %e betE = %e rve vomume = %e \n",beta,betaE,solver->getRVEVolume()); - - STensor3& F = eipv->getRefToDeformationGradient(); - F = eipvprev->getConstRefToDeformationGradient(); - - double factF = 0.; - double factEnhanceF = 1.; - - if (betaE <= 0.999999){ - factF = (1.-beta)/(1.-betaE); - factEnhanceF = (beta-betaE)/(1.-betaE); - } - else{ - printf(" element embeded in localization band beta = %e betaE = %e \n",beta,betaE); - factF = 0.; - factEnhanceF = 1.; - } - for (int i=0; i<3; i++){ - for (int j=0; j<3; j++){ - F(i,j) += factF*(Fbulk(i,j) - Fbulkprev(i,j)) + factEnhanceF*(enhancF(i,j) - enhancFprev(i,j)); - } - } - - solver->getMicroBC()->setDeformationGradient(F); - // set tangent averaging flag - solver->tangentAveragingFlag(stiff); - // solve micro problem - bool success = solver->microSolve(); - // get homogenized properties form solved micro problem - eipv->getRefToFirstPiolaKirchhoffStress() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedStress(); - mipv->getRefToDefoEnergy() = solver->getHomogenizationState(IPStateBase::current)->getDeformationEnergy(); - mipv->getRefToPlasticEnergy() = solver->getHomogenizationState(IPStateBase::current)->getPlasticEnergy(); - eipv->getRefToIrreversibleEnergy() = solver->getHomogenizationState(IPStateBase::current)->getIrreversibleEnergy(); - - eipv->getRefToLocalEnhancedDeformationGradient() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedActiveDissipationDeformationGradient(); - eipv->getRefToLocalEnhancedDeformationGradient() -= solver->getFdamOnset(); - if (stiff){ - eipv->getRefToTangentModuli() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_F(); - eipv->getRefToTangentModuli() *= factF; - - eipv->getRefToDIrreversibleEnergyDDeformationGradient() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_IrreversibleEnergy_F(); - eipv->getRefToDIrreversibleEnergyDDeformationGradient()*= factF; - - eipv->getRefToDIrreversibleEnergyDEnhancedDeformationGradient() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_IrreversibleEnergy_F(); - eipv->getRefToDIrreversibleEnergyDEnhancedDeformationGradient() *= factEnhanceF; - - eipv->getRefToEnhancedTangentModuli() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_F_F(); - eipv->getRefToEnhancedTangentModuli() *= factEnhanceF; - - eipv->getRefToDLocalEnhancedDeformationGradientDDeformationGradient() = solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_ActiveDissipationDeformationGradient_F(); - eipv->getRefToDLocalEnhancedDeformationGradientDDeformationGradient() *= factF; - - eipv->getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient() =solver->getHomogenizationState(IPStateBase::current)->getHomogenizedTangentOperator_ActiveDissipationDeformationGradient_F(); - eipv->getRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient() *= factEnhanceF; - }; - } - - - eipv->getRefToBandWidth() = solver->getHomogenizationState(IPStateBase::current)->getAverageLocalizationBandWidth(); - eipv->getRefToLocalizationNormal() = solver->getLostSolutionUniquenssNormal(); - - mipv->setRefToDGElasticTangentModuli(elasticStiffness); -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::setElasticStiffness(IPVariable* ipv) const{ - dG3DIPVariableBase* dGipv =dynamic_cast<dG3DIPVariableBase*>(ipv); - if (dGipv){ - dGipv->setRefToDGElasticTangentModuli(elasticStiffness); - } - else - Msg::Error("dG3DIPVariableBase must be used"); -}; - -void enhancedStraindG3DMultiscaleMaterialLaw::initialIPVariable(IPVariable* ipv, bool stiff){ - dG3DIPVariableBase* dGipv =dynamic_cast<dG3DIPVariableBase*>(ipv); - if (dGipv){ - dGipv->setRefToDGElasticTangentModuli(elasticStiffness); - dGipv->getRefToTangentModuli() = elasticStiffness; - } - else{ - Msg::Error("dG3DIPVariableBase must be used"); - }; -}; - -bool enhancedStraindG3DMultiscaleMaterialLaw::withEnergyDissipation() const -{ - return _microSolver->withEnergyDissipation(); -}; diff --git a/dG3D/src/dG3DEnhancedStrainMaterialLaw.h b/dG3D/src/dG3DEnhancedStrainMaterialLaw.h deleted file mode 100644 index 7d4a12aebffb721eedfd621b831c88aa186d70e9..0000000000000000000000000000000000000000 --- a/dG3D/src/dG3DEnhancedStrainMaterialLaw.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// -// Description: Class of materials for non linear dg -// -// -// Author: <V.D. NGUYEN>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef _DG3DENHANCEDSTRAINMATERIALLAW_H_ -#define _DG3DENHANCEDSTRAINMATERIALLAW_H_ - -#include "dG3DMaterialLaw.h" -#include "numericalMaterial.h" - - -class enhancedStrainDG3DLinearElasticMaterialLaw : public dG3DLinearElasticMaterialLaw{ - protected: - - public: - enhancedStrainDG3DLinearElasticMaterialLaw(const int num, const double rho, const double E, const double nu); - #ifndef SWIG - enhancedStrainDG3DLinearElasticMaterialLaw(const enhancedStrainDG3DLinearElasticMaterialLaw& src); - virtual ~enhancedStrainDG3DLinearElasticMaterialLaw(){}; - - 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; - // To allow initialization of bulk ip in case of fracture - 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, const bool dTangent =false); - - virtual materialLaw* clone() const {return new enhancedStrainDG3DLinearElasticMaterialLaw(*this);}; - #endif //SWIG -}; - -class enhancedStraindG3DMultiscaleMaterialLaw : public dG3DMaterialLaw, public numericalMaterial{ - protected: - double _lostSolutionUniquenssTolerance; - double _RVELength; - double _surfaceReductionRatio; - #ifndef SWIG - protected: - virtual void fillElasticStiffness(double & rho, STensor43& L); - #endif // SWIG - - - public: - enhancedStraindG3DMultiscaleMaterialLaw(const int lnum, const int tag); - void setLostSolutionUniquenssTolerance(const double tol){ _lostSolutionUniquenssTolerance = tol;}; - void setCharacteristicLength(const double L, const double surf) {_RVELength = L; _surfaceReductionRatio = surf;}; -#ifndef SWIG - enhancedStraindG3DMultiscaleMaterialLaw(const enhancedStraindG3DMultiscaleMaterialLaw& src) - : dG3DMaterialLaw(src),numericalMaterial(src),_RVELength(src._RVELength),_surfaceReductionRatio(src._surfaceReductionRatio){}; - virtual ~enhancedStraindG3DMultiscaleMaterialLaw(){}; - 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 - virtual void createIPVariable(IPVariable* &ipv,const MElement *ele, const int nbFF_, const IntPt *GP, const int gpt) const; - virtual void calledBy2lawFracture(){} - virtual void initLaws(const std::map<int,materialLaw*> &maplaw); - virtual double density() const {return _rho;}; - // As to be defined for explicit scheme. If law for implicit only - // please define this function with return 0 - virtual double soundSpeed() const {return 0;}; - // If law enable fracture the bool checkfrac allow to detect fracture. This bool is unused otherwise - // The bool is necessery for computation of matrix by perturbation in this case the check of fracture - // has not to be performed. - 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, const bool dTangent =false); - virtual void setElasticStiffness(IPVariable* ipv) const; - virtual bool isNumeric() const{return true;} - virtual void initialIPVariable(IPVariable* ipv, bool stiff); - - virtual materialLaw* clone() const {return new enhancedStraindG3DMultiscaleMaterialLaw(*this);}; - virtual bool withEnergyDissipation() const; - virtual void setSolver(const nonLinearMechSolver* sv){ - dG3DMaterialLaw::setSolver(sv); - _macroSolver = sv; - }; - - virtual const materialLaw *getConstNonLinearSolverMaterialLaw() const - { - Msg::Error("getConstNonLinearSolverMaterialLaw in enhancedStraindG3DMultiscaleMaterialLaw does not exist"); - return NULL; - } - virtual materialLaw *getNonLinearSolverMaterialLaw() - { - Msg::Error("getNonLinearSolverMaterialLaw in enhancedStraindG3DMultiscaleMaterialLaw does not exist"); - return NULL; - } - #endif // SWIG -}; - - -#endif // _DG3DENHANCEDSTRAINMATERIALLAW_H_ diff --git a/dG3D/src/dG3Dpy.i b/dG3D/src/dG3Dpy.i index bbd7faaa91b43eb575f0a75c0f468fc6cdef7b65..bba7c036d2559c9dc7f313ccd0076daa5091034a 100644 --- a/dG3D/src/dG3Dpy.i +++ b/dG3D/src/dG3Dpy.i @@ -23,8 +23,6 @@ #include "hoDGPartDomain.h" #include "hoDGMaterialLaw.h" #include "NonLocalDamageHyperelasticDG3DMaterialLaw.h" - #include "dG3DEnhancedDomain.h" - #include "dG3DEnhancedStrainMaterialLaw.h" #include "axisymmetricDG3DDomain.h" #include "dG3D1DDomain.h" #include "computeWithMaterialLaw.h" @@ -54,8 +52,6 @@ %include "hoDGPartDomain.h" %include "hoDGMaterialLaw.h" %include "NonLocalDamageHyperelasticDG3DMaterialLaw.h" -%include "dG3DEnhancedDomain.h" -%include "dG3DEnhancedStrainMaterialLaw.h" %include "axisymmetricDG3DDomain.h" %include "dG3D1DDomain.h" %include "computeWithMaterialLaw.h" diff --git a/dG3D/src/embeddedLocalizationBand.cpp b/dG3D/src/embeddedLocalizationBand.cpp deleted file mode 100644 index 6dd77b19aa9c5313149f99b5a85f119548298d98..0000000000000000000000000000000000000000 --- a/dG3D/src/embeddedLocalizationBand.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// -// C++ Interface: dG3D domain with enhanced strain -// -// Description: Interface class for dg 3D -// -// Author: <V.-D. NGUYEN>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - - -#include "embeddedLocalizationBand.h" -#include "GaussIntegration.h" - -void print(SPoint3 A, std::string str){ - printf("SPoint3 %s [%e %e %e]\n",str.c_str(), A[0],A[1],A[2]); -}; - -double embeddedFiniteBand(MElement* ele, IntPt& GP, const SVector3& normal, const double bandwidth){ - // compute percentage of damage volume over whole volume of element ele - - if (normal.norm() < 1e-8) { - Msg::Warning("zero normal vector has been set"); - return 0.; - } - - double u = GP.pt[0]; double v = GP.pt[1]; double w = GP.pt[2]; - SPoint3 pt; - ele->pnt(u,v,w,pt); - - double beta = 0; - if (ele->getType() == TYPE_TRI){ - std::vector<MVertex*> vv; - ele->getVertices(vv); - - MVertex* A(NULL), *B(NULL), *C(NULL); - - - double v0 = normal[0]*(vv[0]->x() - pt.x()) + normal[1]*(vv[0]->y() - pt.y())+ normal[2]*(vv[0]->z() - pt.z()); - double v1 = normal[0]*(vv[1]->x() - pt.x()) + normal[1]*(vv[1]->y() - pt.y())+ normal[2]*(vv[1]->z() - pt.z()); - double v2 = normal[0]*(vv[2]->x() - pt.x()) + normal[1]*(vv[2]->y() - pt.y())+ normal[2]*(vv[2]->z() - pt.z()); - - - if (v0*v1 >= 0.){ - A = vv[2]; B = vv[0]; C = vv[1]; - } - else if (v0*v2 >= 0.){ - A = vv[1]; B = vv[0]; C = vv[2]; - } - else if (v1*v2 >= 0){ - A = vv[0]; B = vv[1]; C = vv[2]; - } - else{ - Msg::Error("wrong define %e %e %e",v0,v1,v2); - } - - SVector3 AB(A->point(),B->point()); - SVector3 AC(A->point(),C->point()); - - SVector3 faceNormal = crossprod(AB,AC); - faceNormal.normalize(); - - SVector3 dir = crossprod(normal,faceNormal); - dir.normalize(); - - SVector3 nAB = crossprod(faceNormal,AB); - nAB.normalize(); - SVector3 nAC = crossprod(faceNormal,AC); - nAC.normalize(); - - SPoint3 Q(pt), R(pt); - SVector3 PA(pt,A->point()); - double t = dot(nAB,PA)/dot(nAB,dir); - for (int i=0; i<3; i++){ - Q[i] += dir[i]*t; - } - - t = dot(nAC,PA)/dot(nAC,dir); - for (int i=0; i<3; i++){ - R[i] += dir[i]*t; - } - beta = GP.weight*Q.distance(R)*bandwidth/ele->getVolume(); - - /* - printf("rank %d element = %d GP.weight %e bandwidth %e beta = %e volume %e \n",Msg::GetCommRank(),ele->getNum(),GP.weight,bandwidth,beta,ele->getVolume()); - nAC.print("nAC"); - dir.print("dir"); - normal.print("normal"); - print(A->point(),"A"); - print(B->point(),"B"); - print(C->point(),"C"); - print(pt,"P"); - print(Q,"Q"); - print(R,"R"); - */ - } - else{ - Msg::Error("element type %d has not been implemented"); - } - - return beta; -}; - diff --git a/dG3D/src/embeddedLocalizationBand.h b/dG3D/src/embeddedLocalizationBand.h deleted file mode 100644 index 29944ac5e4a04b67b5bce34b2112a5a182d3b67c..0000000000000000000000000000000000000000 --- a/dG3D/src/embeddedLocalizationBand.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// C++ Interface: dG3D domain with enhanced strain -// -// Description: Interface class for dg 3D -// -// Author: <V.-D. NGUYEN>, (C) 2017 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef EMBEDDEDLOCALIZATIONBAND_H_ -#define EMBEDDEDLOCALIZATIONBAND_H_ - -#include "MElement.h" -#include "GmshDefines.h" - -double embeddedFiniteBand(MElement* ele, IntPt& GP, const SVector3& normal, const double bandwidth); - -#endif // EMBEDDEDLOCALIZATIONBAND_H_ diff --git a/dG3D/src/extraFieldFunctionSpace.h b/dG3D/src/extraFieldFunctionSpace.h deleted file mode 100644 index 17ac1193c22d4b0191fc746749d38f7d448cbd43..0000000000000000000000000000000000000000 --- a/dG3D/src/extraFieldFunctionSpace.h +++ /dev/null @@ -1,119 +0,0 @@ -// -// C++ Interface: multiple fields space to generat extra key at interface -//// -// -// Author: Van Dung NGUYEN, (C) 2016 -// -// Copyright: See COPYING file that comes with this distribution -// -// - - -#ifndef EXTRAFIELDFUNCTIONSPACE_H_ -#define EXTRAFIELDFUNCTIONSPACE_H_ - -#include "MInterfaceElement.h" -#include "ThreeDLagrangeFunctionSpace.h" - -class extraFieldFunctionSpace : public ThreeDLagrangeFunctionSpace{ - protected: - virtual void getKeysOnElement(MElement *ele, std::vector<Dof> &keys) const{ - Msg::Error("This function is not implemented"); - } - - protected: - const partDomain* _dom; - - public: - extraFieldFunctionSpace(const partDomain* dom, int id, int ncomp) : ThreeDLagrangeFunctionSpace(id,ncomp,true,true),_dom(dom){}; - extraFieldFunctionSpace(const partDomain* dom, int id, int ncomp, int comp1) : ThreeDLagrangeFunctionSpace(id,ncomp,comp1,true,true),_dom(dom){}; - extraFieldFunctionSpace(const partDomain* dom, int id, int ncomp, int comp1, int comp2) : ThreeDLagrangeFunctionSpace(id,ncomp,comp1,comp2,true,true),_dom(dom){}; - extraFieldFunctionSpace(const partDomain* dom, int id, int ncomp, int comp1, int comp2, int comp3) : ThreeDLagrangeFunctionSpace(id,ncomp,comp1,comp2,comp3,true,true),_dom(dom){}; - - virtual ~extraFieldFunctionSpace(){}; - - virtual FunctionSpaceBase* clone(const int id) const{ - if (_ncomp == 1) return new extraFieldFunctionSpace(_dom,id,1,comp[0]); - else if (_ncomp == 2) return new extraFieldFunctionSpace(_dom,id,2,comp[0],comp[1]); - else if (_ncomp == 3) return new extraFieldFunctionSpace(_dom,id,3,comp[0],comp[1],comp[2]); - else return new extraFieldFunctionSpace(_dom,id,_ncomp); - } - virtual int getNumKeys(MElement *ele) const { - if (_dom->IsMultipleFieldFormulation()){ - if (dynamic_cast<MInterfaceElement*>(ele) == NULL) { - Msg::Error("Multiple fields are now considered for interface element only"); - } - - if (_dom->getEnrichedUnknownLocation() == partDomain::NODE){ - return (_ncomp*ele->getNumVertices()); - } - else if (_dom->getEnrichedUnknownLocation() == partDomain::GP){ - MInterfaceElement* iele = dynamic_cast<MInterfaceElement*>(ele); - - if (iele != NULL){ - // at interface element - const dgPartDomain* dgDom = dynamic_cast<const dgPartDomain*>(_dom); - if (dgDom){ - IntPt* GP = NULL; - int npts = dgDom->getInterfaceGaussIntegrationRule()->getIntPoints(ele,&GP); - return (npts*_ncomp); - } - else{ - Msg::Error("interface elements must be used with dgDom extraFieldFunctionSpace::getNumKeys"); - } - } - else { - // at bulk element - IntPt* GP = NULL; - int npts = _dom->getBulkGaussIntegrationRule()->getIntPoints(ele,&GP); - return (npts*_ncomp); - } - - } - else{ - Msg::Error("encriched location %d is not considered",_dom->getEnrichedUnknownLocation()); - } - - } - else{ - return 0; - } - }; - - virtual void getKeys(MElement *ele, std::vector<Dof> &keys) const{ - if (_dom->IsMultipleFieldFormulation()){ - if (_dom->getEnrichedUnknownLocation() == partDomain::NODE){ - // generate Dof at nodes - for (int j=0;j<_ncomp;++j){ - for (int i=0;i<ele->getNumVertices();i++){ - keys.push_back(Dof(ele->getNum(),dG3DDof3IntType::createTypeWithThreeInts(comp[j],ifield[j],i))); - } - } - } - else if (_dom->getEnrichedUnknownLocation() == partDomain::GP){ - MInterfaceElement* iele = dynamic_cast<MInterfaceElement*>(ele); - int npts = 0; - IntPt* GP; - if (iele != NULL){ - const dgPartDomain* dgDom = static_cast<const dgPartDomain*>(_dom); - npts = dgDom->getInterfaceGaussIntegrationRule()->getIntPoints(ele,&GP); - } - else{ - npts = _dom->getBulkGaussIntegrationRule()->getIntPoints(ele,&GP); - } - // generate dof at GP - for (int j=0;j<_ncomp;++j){ - for (int i=0;i<npts;i++){ - keys.push_back(Dof(ele->getNum(),dG3DDof3IntType::createTypeWithThreeInts(comp[j],ifield[j],i))); - } - } - } - - } - }; - - virtual int getNumExtraKeysPerVertex() const {return _ncomp;}; - -}; - -#endif // EXTRAFIELDFUNCTIONSPACE_H_ diff --git a/dG3D/src/hoDGPartDomain.cpp b/dG3D/src/hoDGPartDomain.cpp index e55e40235eacb167a9793da22330db98f13b8a7c..fd38e152b2eb0e2714666cc4dd95e58b1d651875 100644 --- a/dG3D/src/hoDGPartDomain.cpp +++ b/dG3D/src/hoDGPartDomain.cpp @@ -79,12 +79,12 @@ void hoDGDomain::computeStrain(MElement *e, const int npts_bulk, IntPt *GP, void hoDGDomain::computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt, + fullVector<double> &dispp, const bool virt, bool useBarF){ MElement *ele = dynamic_cast<MElement*>(ie); if (!getElementErosionFilter()(ele)) return; - dG3DDomain::computeStrain(aips,ie,GP,ws,efMinus,efPlus,dispm,dispp,dispExtra,virt, useBarF); + dG3DDomain::computeStrain(aips,ie,GP,ws,efMinus,efPlus,dispm,dispp,virt, useBarF); dG3DMaterialLaw* dgplus = static_cast<dG3DMaterialLaw*>(efPlus->getMaterialLaw()); dG3DMaterialLaw* dgminus = static_cast<dG3DMaterialLaw*>(efMinus->getMaterialLaw()); if (dgplus->isHighOrder() or dgminus->isHighOrder()){ @@ -261,100 +261,6 @@ void hoDGInterDomain::createTerms(unknownField *uf,IPField*ip){ btermBound = new hoDGStiffnessInter(*sp1,*sp2,_mlawMinus, _mlawPlus,_interQuad,_beta1,ip,uf,_fullDg,_incrementNonlocalBased,_eps); }; -void hoDGInterDomain::computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF){ - IntPt *GP; - fullVector<double> dispm; - fullVector<double> dispp; - fullVector<double> dispExtra; - std::vector<Dof> R; - - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it){ - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(it->second); - R.clear(); - getMinusDomain()->getFunctionSpace()->getKeys(iele->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()) - { - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - this->computeStrain(aips,iele,GP,ws,_domMinus,_domPlus,dispm,dispp,dispExtra,virt, useBarF); - } -}; - -void hoDGInterDomain::computeIPVariable(AllIPState *aips,const unknownField *ufield, - const IPStateBase::whichState ws, bool stiff) -{ - _evalStiff = false; - if (ws == IPStateBase::initial) - { - this->initialIPVariable(aips,ufield,ws,stiff); - } - else - { - #if defined(HAVE_MPI) - if ((_mlawMinus->isNumeric() or _mlawPlus->isNumeric()) and this->_otherRanks.size()>0){ - dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(_mlawMinus); - dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(_mlawPlus); - if (mlawMinus->getUseBarF()!=mlawPlus->getUseBarF()) - Msg::Error("hoDGInterDomain::computeIPVariable All the constitutive laws need to use Fbar or not"); - bool useBarF=mlawMinus->getUseBarF(); - this->computeIPVariableMPI(aips,ufield,ws,stiff,useBarF); - } - else - #endif //HAVE_MPI - { - dG3DMaterialLaw *mlawMinus = static_cast<dG3DMaterialLaw*>(_mlawMinus); - dG3DMaterialLaw *mlawPlus = static_cast<dG3DMaterialLaw*>(_mlawPlus); - if (mlawMinus->getUseBarF()!=mlawPlus->getUseBarF()) - Msg::Error("hoDGInterDomain::computeIPVariable All the constitutive laws need to use Fbar or not"); - bool useBarF=mlawMinus->getUseBarF(); - this->computeAllIPStrain(aips,ufield,ws,false,useBarF); - IntPt *GP; - fullVector<double> dispm; - fullVector<double> dispp; - fullVector<double> dispExtra; - std::vector<Dof> R; - for(elementGroup::elementContainer::const_iterator it=gi->begin(); it!=gi->end(); ++it){ - MInterfaceElement *iele = dynamic_cast<MInterfaceElement*>(it->second); - int npts_inter= integBound->getIntPoints(it->second,&GP); - R.clear(); - getMinusDomain()->getFunctionSpace()->getKeys(iele->getElem(0),R); - dispm.resize(R.size()); - ufield->get(R,dispm); - R.clear(); - getPlusDomain()->getFunctionSpace()->getKeys(iele->getElem(1),R); - dispp.resize(R.size()); - ufield->get(R,dispp); - - if (this->IsMultipleFieldFormulation()){ - FunctionSpaceBase* extraSp = this->getInterfaceFunctionSpace(); - R.clear(); - extraSp->getKeys(it->second,R); - if (R.size()>0){ - dispExtra.resize(R.size()); - ufield->get(R,dispExtra); - } - } - - this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,dispExtra,false,stiff); - }; - } - } - _evalStiff = true; -}; - void hoDGInterDomain::stabilityParameters(const double b1){ _beta1 = b1; }; @@ -384,10 +290,6 @@ void hoDGInterDomain::setMaterialLaw(const std::map<int,materialLaw*> &maplaw){ } } -void hoDGInterDomain::initializeTerms(unknownField *uf,IPField*ip){ - createTerms(uf,ip); -}; - diff --git a/dG3D/src/hoDGPartDomain.h b/dG3D/src/hoDGPartDomain.h index 723f7aaec6e505b4580304c309f75caaccc9b46b..b13066855a187dcaa53e7e627b3940c63a5772bf 100644 --- a/dG3D/src/hoDGPartDomain.h +++ b/dG3D/src/hoDGPartDomain.h @@ -26,7 +26,7 @@ class hoDGDomain : public dG3DDomain{ virtual void computeStrain(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, const bool virt, + fullVector<double> &dispp, const bool virt, bool useBarF); virtual void createTerms(unknownField *uf,IPField*ip); @@ -46,10 +46,6 @@ class hoDGInterDomain : public hoDGDomain, public interDomainBase{ virtual void stabilityParameters(const double b1=10.); virtual void matrixByPerturbation(const int iinter, const double eps=1e-8); #ifndef SWIG - virtual void computeAllIPStrain(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, const bool virt, bool useBarF); - - virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, - bool stiff=true); virtual void setMaterialLaw(const std::map<int,materialLaw*> &maplaw); // FOLLOWING FUNCTION SHOULD STAY HERE BECAUSE OF THE DOUBLE DERIVATION @@ -67,7 +63,6 @@ class hoDGInterDomain : public hoDGDomain, public interDomainBase{ virtual const partDomain* getPlusDomain() const{return _domPlus;} virtual partDomain* getMinusDomain(){return _domMinus;} virtual partDomain* getPlusDomain() {return _domPlus;} - virtual void initializeTerms(unknownField *uf,IPField *ip); virtual void createTerms(unknownField *uf,IPField*ip); // as there is no elerment on a interDomain empty function. The interface element on an interDomain // has to be created via its two domains. diff --git a/dG3D/src/multipleFieldDG3DTerms.cpp b/dG3D/src/multipleFieldDG3DTerms.cpp deleted file mode 100644 index 983b9e61b234336e638aff32bdb2db847bda4696..0000000000000000000000000000000000000000 --- a/dG3D/src/multipleFieldDG3DTerms.cpp +++ /dev/null @@ -1,485 +0,0 @@ -// -// C++ Interface: terms -//// -// -// Author: Van Dung NGUYEN, (C) 2016 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#include "multipleFieldDG3DTerms.h" -#include "FractureCohesiveDG3DIPVariable.h" -#include "dG3DEnhancedStrainIPVariable.h" -#include "highOrderTensor.h" - -void twoFieldDG3DForceBulk::get(MElement *ele,int npts,IntPt *GP,fullVector<double> &vFor) const -{ - const FunctionSpaceBase* space = _dom->getFunctionSpace(); - int nbdof = space->getNumKeys(ele); - int nbFF = ele->getNumShapeFunctions(); - - vFor.resize(nbdof); - vFor.setAll(0.); - - const AllIPState::ipstateElementContainer *vips = _ipf->getAips()->getIPstate(ele->getNum()); - - for (int i = 0; i < npts; i++){ - const dG3DEnhancedStrainIPVariable *ipv = static_cast<const dG3DEnhancedStrainIPVariable*>((*vips)[i]->getState(IPStateBase::current)); - - double weight = GP[i].weight; - double & detJ = ipv->getJacobianDeterminant(ele,GP[i]); - double ratio = detJ*weight; - - const std::vector<TensorialTraits<double>::GradType> &Grads = ipv->gradf(space,ele,GP[i]); - const std::vector<TensorialTraits<double>::ValType> &Vals = ipv->f(space,ele,GP[i]); - - const STensor3& P = ipv->getConstRefToFirstPiolaKirchhoffStress(); - for (int j=0; j<nbFF; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - vFor(j+k*nbFF) += P(k,l)*Grads[j+0*nbFF](l)*ratio; - } - } - } - - const STensor3& eF = ipv->getConstRefToEnhancedDeformationGradient(); - const STensor3& eFLocal = ipv->getConstRefToLocalEnhancedDeformationGradient(); - - for (int j=0; j< nbFF; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - int row = Tensor23::getIndex(k,l); - vFor(j+row*nbFF + 3*nbFF) += _eqFactor*(eF(k,l) - eFLocal(k,l))*Vals[j+0*nbFF]*ratio; - } - } - } - } -} - -void twoFieldDG3DStiffnessBulk::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> &mStiff) const -{ - const FunctionSpaceBase* space = _dom->getFunctionSpace(); - int nbdof = space->getNumKeys(ele); - int nbFF = ele->getNumShapeFunctions(); - - mStiff.resize(nbdof,nbdof); - mStiff.setAll(0.); - - const AllIPState::ipstateElementContainer *vips = _ipf->getAips()->getIPstate(ele->getNum()); - - for (int i = 0; i < npts; i++){ - const dG3DEnhancedStrainIPVariable *ipv = static_cast<const dG3DEnhancedStrainIPVariable*>((*vips)[i]->getState(IPStateBase::current)); - double weight = GP[i].weight; - double & detJ = ipv->getJacobianDeterminant(ele,GP[i]); - double ratio = detJ*weight; - - const std::vector<TensorialTraits<double>::GradType> &Grads = ipv->gradf(space,ele,GP[i]); - const std::vector<TensorialTraits<double>::ValType> &Vals = ipv->f(space,ele,GP[i]); - - const STensor43& H = ipv->getConstRefToTangentModuli(); - const STensor43& enH = ipv->getConstRefToEnhancedTangentModuli(); - - for (int j=0; j<nbFF; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - // defo - for (int p=0; p< nbFF; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - mStiff(j+k*nbFF,p+q*nbFF) += H(k,l,q,r)*Grads[j+0*nbFF](l)*Grads[p+0*nbFF](r)*ratio; - } - } - } - // extra dofs - for (int p=0; p< nbFF; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - int col = Tensor23::getIndex(q,r); - mStiff(j+k*nbFF,p+col*nbFF+3*nbFF) += enH(k,l,q,r)*Grads[j+0*nbFF](l)*Vals[p+0*nbFF]*ratio; - } - } - } - } - } - } - - const STensor43& DeFLocalDdefo = ipv->getConstRefToDLocalEnhancedDeformationGradientDDeformationGradient(); - const STensor43& DeFLocalDeF = ipv->getConstRefToDLocalEnhancedDeformationGradientDEnhancedDeformationGradient(); - - static STensor3 I3(1.); - - for (int j=0; j< nbFF; j++){ - for (int k=0; k<3; k++){ - for (int l=0; l<3; l++){ - int row = Tensor23::getIndex(k,l); - // defo - for (int p=0; p< nbFF; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - mStiff(j+row*nbFF + 3*nbFF,p+q*nbFF) -= _eqFactor*DeFLocalDdefo(k,l,q,r)*Vals[j+0*nbFF]*Grads[p+0*nbFF](r)*ratio; - } - } - } - // extra field - for (int p=0; p< nbFF; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - int col = Tensor23::getIndex(q,r); - mStiff(j+row*nbFF + 3*nbFF,p+col*nbFF+3*nbFF) += _eqFactor*(I3(k,q)*I3(l,r) - DeFLocalDeF(k,l,q,r))*Vals[j+0*nbFF]*Vals[p+0*nbFF]*ratio; - } - } - } - } - } - } - } -} - - -void twoFieldDG3DForceInter::get(MElement *ele, int npts, IntPt *GP, fullVector<double> &m)const{ - MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(ele); - const int nbFFm = ie->getElem(0)->getNumVertices(); - const int nbFFp = ie->getElem(1)->getNumVertices(); - const int nbFF = ele->getNumVertices(); - - const FunctionSpaceBase* minusSpace = _dom->getMinusDomain()->getFunctionSpace(); - const FunctionSpaceBase* plusSpace = _dom->getPlusDomain()->getFunctionSpace(); - const FunctionSpaceBase* spaceInter = _dom->getInterfaceFunctionSpace(); - - const int nbdofm = minusSpace->getNumKeys(ie->getElem(0)); - const int nbdofp = plusSpace->getNumKeys(ie->getElem(1)); - const int nextra = spaceInter->getNumKeys(ele); - - m.resize(nbdofm+nbdofp+nextra,true); - - if(_dom->getFormulation()){ - // get value at gauss's point - const AllIPState::ipstateElementContainer *vips = _ipf->getAips()->getIPstate(ele->getNum()); - // Values on minus and plus elements - IntPt *GPm; IntPt *GPp; - _dom->getInterfaceQuadrature()->getIntPoints(ie,GP,&GPm,&GPp); - // loop on Gauss Point - for(int i=0;i<npts; i++) - { - // IP - const IPStateBase *ipsm = (*vips)[i]; - const dG3DIPVariableBase *ipvm = static_cast<const dG3DIPVariableBase*>(ipsm->getState(IPStateBase::current)); - - const IPStateBase *ipsp = (*vips)[i+npts]; - const dG3DIPVariableBase *ipvp = static_cast<const dG3DIPVariableBase*>(ipsp->getState(IPStateBase::current)); - - const std::vector<TensorialTraits<double>::ValType> &Valsm = ipvm->f(minusSpace,ie->getElem(0),GPm[i]); - const std::vector<TensorialTraits<double>::ValType> &Valsp = ipvp->f(plusSpace,ie->getElem(1),GPp[i]); - - const std::vector<TensorialTraits<double>::GradType> &Gradsm = ipvm->gradf(minusSpace,ie->getElem(0),GPm[i]); - const std::vector<TensorialTraits<double>::GradType> &Gradsp = ipvp->gradf(plusSpace,ie->getElem(1),GPp[i]); - - const std::vector<TensorialTraits<double>::ValType>& Vals = ipvm->f(spaceInter,ie,GP[i]); - - const double weight = GP[i].weight; - const double& detJ = ipvm->getJacobianDeterminant(ie,GP[i]); - double wJ = detJ*weight; - - static SVector3 normal; - normal = ipvm->getConstRefToReferenceOutwardNormal(); - normal.normalize(); - - - bool broken = false; - const FractureCohesive3DIPVariable *ipvmf = dynamic_cast<const FractureCohesive3DIPVariable*>(ipvm); - const FractureCohesive3DIPVariable *ipvpf = NULL; - if(ipvmf != NULL){ - broken = ipvmf->isbroken(); - ipvpf = static_cast<const FractureCohesive3DIPVariable*>(ipvp); - } - - // cohesive traction - static SVector3 T; - if (broken){ - T = ipvmf->getConstRefToInterfaceForce(); - T += ipvpf->getConstRefToInterfaceForce(); - T *= 0.5; - } - else{ - // compute from stress tensor - const STensor3& Pm = ipvm->getConstRefToFirstPiolaKirchhoffStress(); - const STensor3& Pp = ipvp->getConstRefToFirstPiolaKirchhoffStress(); - - for (int j=0; j<3; j++){ - T(j) = 0.; - for (int k=0; k<3; k++){ - T(j) += 0.5*(Pm(j,k)+Pp(j,k))*normal(k); - } - } - } - - const SVector3& ujump = ipvm->getConstRefToJump(); - static SVector3 diffJump; - diffJump = ujump; - // if fracture - if (broken){ - static SVector3 cjump; - cjump = ipvmf->getConstRefToCohesiveJump(); - cjump += ipvpf->getConstRefToCohesiveJump(); - cjump *= (0.5); - diffJump -= cjump; - }; - - for(int j=0;j<nbFFm;j++){ - for(int k=0;k<3;k++){ - m(j+k*nbFFm) -= T(k)*(Valsm[j+k*nbFFm]*wJ); - } - } - for(int j=0;j<nbFFp;j++){ - for(int k=0;k<3;k++){ - m(j+k*nbFFp+nbdofm) += T(k)*(Valsp[j+k*nbFFp]*wJ); - } - } - - // constraint part - if (_dom->getEnrichedUnknownLocation() == partDomain::NODE){ - for (int j=0; j< nbFF; j++){ - for (int k=0; k<3; k++){ - m(j+k*nbFF+nbdofm+nbdofp) += _eqFactor*(diffJump(k)*Vals[j+k*nbFF]*wJ); - } - } - - } - else if (_dom->getEnrichedUnknownLocation() == partDomain::GP){ - for (int k=0; k<3; k++){ - m(i+k*npts+nbdofm+nbdofp) += _eqFactor*diffJump(k)*wJ; - } - } - - } - - } -}; - - -void twoFieldDG3DStiffnessInter::get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> &m) const -{ - MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(ele); - const int nbFFm = ie->getElem(0)->getNumVertices(); - const int nbFFp = ie->getElem(1)->getNumVertices(); - const int nbFF = ele->getNumVertices(); - - const FunctionSpaceBase* minusSpace = _dom->getMinusDomain()->getFunctionSpace(); - const FunctionSpaceBase* plusSpace = _dom->getPlusDomain()->getFunctionSpace(); - const FunctionSpaceBase* spaceInter = _dom->getInterfaceFunctionSpace(); - - const int nbdofm = minusSpace->getNumKeys(ie->getElem(0)); - const int nbdofp = plusSpace->getNumKeys(ie->getElem(1)); - const int nextra = spaceInter->getNumKeys(ele); - - m.resize(nbdofm+nbdofp+nextra,nbdofm+nbdofp+nextra,true); - - if(_dom->getFormulation()) - { - // get value at gauss's point - const AllIPState::ipstateElementContainer *vips = _ipf->getAips()->getIPstate(ele->getNum()); - // Values on minus and plus elements - IntPt *GPm; IntPt *GPp; - _dom->getInterfaceQuadrature()->getIntPoints(ie,GP,&GPm,&GPp); - - double hs = ie->getCharacteristicSize(); - - // loop on Gauss Point - for(int i=0;i<npts; i++) - { - // Coordonate of Gauss' point i - - // IP - const IPStateBase *ipsm = (*vips)[i]; - const dG3DIPVariableBase *ipvm = static_cast<const dG3DIPVariableBase*>(ipsm->getState(IPStateBase::current)); - - const IPStateBase *ipsp = (*vips)[i+npts]; - const dG3DIPVariableBase *ipvp = static_cast<const dG3DIPVariableBase*>(ipsp->getState(IPStateBase::current)); - - - const std::vector<TensorialTraits<double>::GradType> &Gradsm = ipvm->gradf(minusSpace,ie->getElem(0),GPm[i]); - const std::vector<TensorialTraits<double>::GradType> &Gradsp = ipvp->gradf(plusSpace,ie->getElem(1),GPp[i]); - - const std::vector<TensorialTraits<double>::ValType> &Valsm = ipvm->f(minusSpace,ie->getElem(0),GPm[i]); - const std::vector<TensorialTraits<double>::ValType> &Valsp = ipvp->f(plusSpace,ie->getElem(1),GPp[i]); - - const std::vector<TensorialTraits<double>::ValType>& Vals = ipvm->f(spaceInter,ie,GP[i]); - - const double weight = GP[i].weight; - const double& detJ = ipvm->getJacobianDeterminant(ie,GP[i]); - double wJ = detJ*weight; - - static SVector3 normal; - normal = ipvm->getConstRefToReferenceOutwardNormal(); - normal.normalize(); - - bool broken = false; - const FractureCohesive3DIPVariable *ipvmf = dynamic_cast<const FractureCohesive3DIPVariable*>(ipvm); - const FractureCohesive3DIPVariable *ipvpf = NULL; - if(ipvmf != NULL){ - broken = ipvmf->isbroken(); - ipvpf = static_cast<const FractureCohesive3DIPVariable*>(ipvp); - } - - // cohesive jump - static STensor3 DdiffJumpDjump; - static STensor3 DdiffJumpDinJump; - STensorOperation::unity(DdiffJumpDjump); - STensorOperation::zero(DdiffJumpDinJump); - if (broken){ - DdiffJumpDinJump = ipvmf->getConstRefToDCohesiveJumpDIncompatibleJump();; - DdiffJumpDinJump += ipvpf->getConstRefToDCohesiveJumpDIncompatibleJump();; - DdiffJumpDinJump *= (-0.5/(_beta*hs)); - } - // cohesive traction - static STensor33 DTDFm; - static STensor33 DTDFp; - static STensor3 DTDinJump; - - if (broken){ - DTDFm = ipvmf->getConstRefToDInterfaceForceDDeformationGradient(); - DTDFp = ipvpf->getConstRefToDInterfaceForceDDeformationGradient(); - DTDinJump = ipvmf->getConstRefToDInterfaceForceDIncompatibleJump(); - DTDinJump += ipvpf->getConstRefToDInterfaceForceDIncompatibleJump(); - DTDinJump *= (0.5/(_beta*hs)); - } - else{ - // computed from bulk law only$ - const STensor43& Hm = ipvm->getConstRefToTangentModuli(); - const STensor43& Hp = ipvp->getConstRefToTangentModuli(); - for (int j=0; j<3; j++){ - for (int p=0; p<3; p++){ - DTDinJump(j,p) = 0.; - for (int q=0; q<3; q++){ - DTDFm(j,p,q) = 0.; - DTDFp(j,p,q) = 0.; - for (int k=0; k<3; k++){ - DTDFm(j,p,q) += Hm(j,k,p,q)*normal(k); - DTDFp(j,p,q) += Hp(j,k,p,q)*normal(k); - DTDinJump(j,p) += 0.5*(Hm(j,k,p,q)+Hp(j,k,p,q))*normal(k)*normal(q)/(_beta*hs); - } - } - } - } - } - - // interface force - // on F - for(int j=0;j<nbFFm;j++){ - for(int k=0;k<3;k++){ - for (int p=0; p<nbFFm; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - m(j+k*nbFFm,p+q*nbFFm) -= 0.5*DTDFm(k,q,r)*Gradsm[p+q*nbFFm](r)*(Valsm[j+k*nbFFm]*wJ); - } - } - } - - for (int p=0; p< nbFFp; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - m(j+k*nbFFm,p+q*nbFFp+nbdofm) -=0.5*DTDFp(k,q,r)*Gradsp[p+q*nbFFp](r)*(Valsm[j+k*nbFFm]*wJ); - } - } - } - - // extra field - if (_dom->getEnrichedUnknownLocation() == partDomain::NODE){ - for (int p=0; p< nbFF; p++){ - for (int q=0; q<3; q++){ - m(j+k*nbFFm, p+q*nbFF+nbdofm+nbdofp) -= DTDinJump(k,q)*Vals[p+q*nbFF]*(Valsm[j+k*nbFFm]*wJ); - } - } - } - else if ( _dom->getEnrichedUnknownLocation() == partDomain::GP){ - for (int q=0; q<3; q++){ - m(j+k*nbFFm, i+q*npts+nbdofm+nbdofp) -= DTDinJump(k,q)*(Valsm[j+k*nbFFm]*wJ); - } - }; - } - } - for(int j=0;j<nbFFp;j++){ - for(int k=0;k<3;k++){ - for (int p=0; p<nbFFm; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - m(j+k*nbFFp+nbdofm,p+q*nbFFm) += 0.5*DTDFm(k,q,r)*Gradsm[p+q*nbFFm](r)*(Valsp[j+k*nbFFp]*wJ); - } - } - } - - for (int p=0; p<nbFFp; p++){ - for (int q=0; q<3; q++){ - for (int r=0; r<3; r++){ - m(j+k*nbFFp+nbdofm,p+q*nbFFp+nbdofm) += 0.5*DTDFp(k,q,r)*Gradsp[p+q*nbFFp](r)*(Valsp[j+k*nbFFp]*wJ); - } - } - } - - if (_dom->getEnrichedUnknownLocation() == partDomain::NODE){ - for (int p=0; p< nbFF; p++){ - for (int q=0; q<3; q++){ - m(j+k*nbFFp+nbdofm, p+q*nbFF+nbdofm+nbdofp) += DTDinJump(k,q)*Vals[p+q*nbFF]*(Valsp[j+k*nbFFp]*wJ); - } - } - } - else if ( _dom->getEnrichedUnknownLocation() == partDomain::GP){ - for (int q=0; q<3; q++){ - m(j+k*nbFFp+nbdofm, i+q*npts+nbdofm+nbdofp) += DTDinJump(k,q)*(Valsp[j+k*nbFFp]*wJ); - } - } - - } - } - - - - if (_dom->getEnrichedUnknownLocation() == partDomain::NODE){ - // constraint part - for (int j=0; j< nbFF; j++){ - for (int k=0; k<3; k++){ - for (int p=0; p<nbFFm; p++){ - for (int q=0; q<3; q++){ - m(j+k*nbFF+nbdofm+nbdofp,p+q*nbFFm) -= _eqFactor*DdiffJumpDjump(k,q)*Valsm[p+q*nbFFm]*Vals[j+k*nbFF]*wJ; - } - } - - for (int p=0; p<nbFFp; p++){ - for (int q=0; q<3; q++){ - m(j+k*nbFF+nbdofm+nbdofp,p+q*nbFFp+nbdofm) += _eqFactor*DdiffJumpDjump(k,q)*Valsp[p+q*nbFFp]*Vals[j+k*nbFF]*wJ; - } - } - - for (int p=0; p<nbFF; p++){ - for (int q=0; q<3; q++){ - m(j+k*nbFF+nbdofm+nbdofp,p+q*nbFF+nbdofm+nbdofp) += _eqFactor*DdiffJumpDinJump(k,q)*Vals[p+q*nbFF]*Vals[j+k*nbFF]*wJ; - } - } - } - } - } - else if (_dom->getEnrichedUnknownLocation() == partDomain::GP){ - for (int k=0; k<3; k++){ - for (int p=0; p<nbFFm; p++){ - for (int q=0; q<3; q++){ - m(i+k*npts+nbdofm+nbdofp,p+q*nbFFm) -= _eqFactor*DdiffJumpDjump(k,q)*Valsm[p+q*nbFFm]*wJ; - } - } - - for (int p=0; p<nbFFp; p++){ - for (int q=0; q<3; q++){ - m(i+k*npts+nbdofm+nbdofp,p+q*nbFFp+nbdofm) += _eqFactor*DdiffJumpDjump(k,q)*Valsp[p+q*nbFFp]*wJ; - } - } - - for (int q=0; q<3; q++){ - m(i+k*npts+nbdofm+nbdofp,i+q*npts+nbdofm+nbdofp) += _eqFactor*DdiffJumpDinJump(k,q)*wJ; - } - - } - } - } - } - //m.print("mf"); -}; \ No newline at end of file diff --git a/dG3D/src/multipleFieldDG3DTerms.h b/dG3D/src/multipleFieldDG3DTerms.h deleted file mode 100644 index 60c569175b6f442e7a426191314fb941bb554c0c..0000000000000000000000000000000000000000 --- a/dG3D/src/multipleFieldDG3DTerms.h +++ /dev/null @@ -1,119 +0,0 @@ -// -// C++ Interface: terms -//// -// -// Author: Van Dung NGUYEN, (C) 2016 -// -// Copyright: See COPYING file that comes with this distribution -// -// - - -#ifndef MULTIPLEFIELDDG3DTERMS_H_ -#define MULTIPLEFIELDDG3DTERMS_H_ - -#include "nlTerms.h" -#include "ipField.h" -#include "partDomain.h" -#include "dG3DTerms.h" - -class twoFieldDG3DForceBulk : public nonLinearTermBase<double>{ - protected: - const partDomain* _dom; - const IPField* _ipf; - double _eqFactor; - - public: - twoFieldDG3DForceBulk(const partDomain* d, const IPField *ip, const double fact) : _dom(d),_ipf(ip),_eqFactor(fact){} - virtual ~twoFieldDG3DForceBulk(){} - virtual void get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m) const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<double> > &mv) const - { - Msg::Error("Define me get by integration point twoFieldDG3DForceBulk"); - } - virtual void set(const fullVector<double> *datafield) {}; - virtual const bool isData() const {return false;}; - - virtual LinearTermBase<double>* clone () const - { - return new twoFieldDG3DForceBulk(_dom,_ipf,_eqFactor); - } -}; - -class twoFieldDG3DStiffnessBulk : public BiNonLinearTermBase { - protected: - const partDomain* _dom; - const IPField* _ipf; - double _eqFactor; - - public: - twoFieldDG3DStiffnessBulk(const partDomain* d, const IPField *ip, const double fact) : _dom(d),_ipf(ip),_eqFactor(fact){} - - virtual void get(MElement *ele,int npts,IntPt *GP,fullMatrix<double> &m) const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullMatrix<double> > &mv) const - { - Msg::Error("Define me get by gauss point twoFieldDG3DStiffnessBulk"); - } - virtual void set(const fullVector<double> *datafield) {}; - virtual const bool isData() const {return false;}; - - virtual BilinearTermBase* clone () const - { - return new twoFieldDG3DStiffnessBulk(_dom,_ipf,_eqFactor); - } - -}; - -class twoFieldDG3DForceInter : public nonLinearTermBase<double>{ - protected: - const dgPartDomain* _dom; - const IPField* _ipf; - double _eqFactor; - double _beta; // stability parameter - - public: - twoFieldDG3DForceInter(const dgPartDomain* dom, const IPField* ip, const double eq, const double b): _dom(dom),_ipf(ip),_eqFactor(eq),_beta(b){} - - virtual ~twoFieldDG3DForceInter() {} - - virtual void get(MElement *ele, int npts, IntPt *GP, fullVector<double> &v)const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<double> > &mv) const - { - Msg::Error("Define me get by integration point twoFieldDG3DForceInter"); - } - - virtual void set(const fullVector<double> *datafield) {}; - virtual const bool isData() const {return false;}; - - virtual LinearTermBase<double>* clone () const - { - return new twoFieldDG3DForceInter(_dom,_ipf,_eqFactor,_beta); - } -}; - -class twoFieldDG3DStiffnessInter : public BiNonLinearTermBase{ - protected: - const dgPartDomain* _dom; - const IPField* _ipf; - double _eqFactor; - double _beta; - - public: - twoFieldDG3DStiffnessInter(const dgPartDomain* dom, const IPField* ip, const double fact, const double b): _dom(dom),_ipf(ip),_eqFactor(fact),_beta(b){} - virtual ~twoFieldDG3DStiffnessInter(){} - virtual void get(MElement *ele,int npts,IntPt *GP, fullMatrix<double> &m)const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullMatrix<double> > &mv) const - { - Msg::Error("Define me ?? get by integration point twoFieldDG3DForceInter"); - } - - virtual void set(const fullVector<double> *datafield) {}; - virtual const bool isData() const {return false;}; - virtual BilinearTermBase* clone () const - { - return new twoFieldDG3DStiffnessInter(_dom,_ipf,_eqFactor,_beta); - } - -}; - -#endif // MULTIPLEFIELDDG3DTERMS_H_ diff --git a/dG3D/src/pathFollowingTerms.cpp b/dG3D/src/pathFollowingTerms.cpp index 1d5f7694d90167491706feb48d75bf7e20add855..75ec371a1234bfff65f16e8a579d5882b704713e 100644 --- a/dG3D/src/pathFollowingTerms.cpp +++ b/dG3D/src/pathFollowingTerms.cpp @@ -10,7 +10,6 @@ #include "pathFollowingTerms.h" #include "FractureCohesiveDG3DIPVariable.h" -#include "dG3DEnhancedStrainIPVariable.h" #include "highOrderTensor.h" void dG3DDissipationPathFollowingBulkScalarTerm::get(MElement *ele, int npts, IntPt *GP, double &val) const{ @@ -68,45 +67,6 @@ void dG3DDissipationPathFollowingBulkLinearTerm::get(MElement *ele,int npts,IntP } }; -void dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm::get(MElement *ele, int npts, IntPt *GP, double &val) const{ - dG3DDissipationPathFollowingBulkScalarTerm::get(ele,npts,GP,val); -}; - -void dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm::get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m) const{ - - dG3DDissipationPathFollowingBulkLinearTerm::get(ele,npts,GP,m); - - const nlsFunctionSpace<double>* sp = dynamic_cast<const nlsFunctionSpace<double>*>(_dom->getFunctionSpace()); - const AllIPState::ipstateElementContainer *vips = _ipf->getAips()->getIPstate(ele->getNum()); - - for (int i = 0; i < npts; i++) - { - const dG3DEnhancedStrainIPVariable* ipv = dynamic_cast<const dG3DEnhancedStrainIPVariable*>((*vips)[i]->getState(IPStateBase::current)); - - double weight = GP[i].weight; - const double & detJ = ipv->getJacobianDeterminant(ele,GP[i]); - const std::vector<TensorialTraits<double>::ValType> &Vals = ipv->f(sp,ele,GP[i]); - - const STensor3& DdissDenhancedF = ipv->getConstRefToDIrreversibleEnergyDEnhancedDeformationGradient(); - for (int l=0; l< 3; l++) - { - for (int p=0; p< 3; p++) - { - int row = Tensor23::getIndex(l,p); - int nbFF = sp->getNumShapeFunctions(ele,3+row); - int nbFFTotalLast = sp->getShapeFunctionsIndex(ele,3+row); - for (int k=0; k< nbFF; k++) - { - m(k+nbFFTotalLast) += (DdissDenhancedF(l,p))*Vals[k+nbFFTotalLast]*detJ*weight; - } - } - } - - } - -}; - - void dG3DDissipationPathFollowingBoundScalarTerm::get(MElement *ele, int npts, IntPt *GP, double &val) const{ val = 0.; MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(ele); @@ -153,7 +113,6 @@ void dG3DDissipationPathFollowingBoundLinearTerm::get(MElement *ele,int npts,Int { const nlsFunctionSpace<double>* spaceMinus = dynamic_cast<const nlsFunctionSpace<double>*>(_dom->getMinusDomain()->getFunctionSpace()); const nlsFunctionSpace<double>* spacePlus = dynamic_cast<const nlsFunctionSpace<double>*>(_dom->getPlusDomain()->getFunctionSpace()); - const nlsFunctionSpace<double>* spaceInter =dynamic_cast<const nlsFunctionSpace<double>*>(_dom->getInterfaceFunctionSpace()); MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(ele); const int nbdofm = spaceMinus->getNumKeys(ie->getElem(0)); @@ -233,7 +192,7 @@ void dG3DDissipationPathFollowingBoundLinearTerm::get(MElement *ele,int npts,Int } if (cipvm->withJumpGradient() and cipvp->withJumpGradient()){ - std::vector<TensorialTraits<double>::GradType>& gradValInt = ipvm->gradf(spaceInter,ie,GP[i]); + std::vector<TensorialTraits<double>::GradType>& gradValInt = ipvm->gradf(spaceMinus,ie,GP[i]); const STensor3& dirrEnergDGradjumpm = cipvm->getConstRefToDIrreversibleEnergyDJumpGradient(); const STensor3& dirrEnergDGradjumpp = cipvp->getConstRefToDIrreversibleEnergyDJumpGradient(); @@ -264,113 +223,4 @@ void dG3DDissipationPathFollowingBoundLinearTerm::get(MElement *ele,int npts,Int } } } -}; - -void twoFieldDG3DDissipationPathFollowingBoundScalarTerm::get(MElement *ele, int npts, IntPt *GP, double &val) const{ - dG3DDissipationPathFollowingBoundScalarTerm::get(ele,npts,GP,val); -}; - -void twoFieldDG3DDissipationPathFollowingBoundLinearTerm::get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m) const{ - if(_dom->getFormulation()) - { - MInterfaceElement *ie = dynamic_cast<MInterfaceElement*>(ele); - - const FunctionSpaceBase* spaceMinus = _dom->getMinusDomain()->getFunctionSpace(); - const FunctionSpaceBase* spacePlus = _dom->getPlusDomain()->getFunctionSpace(); - const FunctionSpaceBase* spaceInter = _dom->getInterfaceFunctionSpace(); - - const int nbFFm = ie->getElem(0)->getNumVertices(); - const int nbFFp = ie->getElem(1)->getNumVertices(); - const int nbFF = ele->getNumVertices(); - const int nbdofm = spaceMinus->getNumKeys(ie->getElem(0)); - const int nbdofp = spacePlus->getNumKeys(ie->getElem(1)); - const int nextra = spaceInter->getNumKeys(ele); - - m.resize(nbdofm+nbdofp+nextra); - - m.scale(0.); - - const AllIPState::ipstateElementContainer *vips = _ipf->getAips()->getIPstate(ele->getNum()); - // Values on minus and plus elements - IntPt *GPm; IntPt *GPp; - _dom->getInterfaceQuadrature()->getIntPoints(ie,GP,&GPm,&GPp); - - for(int i=0;i<npts; i++) - { - const IPStateBase *ipsm = (*vips)[i]; - const FractureCohesive3DIPVariable *ipvm = dynamic_cast<const FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::current)); - const FractureCohesive3DIPVariable *ipvmprev = dynamic_cast<const FractureCohesive3DIPVariable*>(ipsm->getState(IPStateBase::previous)); - - if (ipvm != NULL){ - if (ipvm->isbroken()){ - const IPStateBase *ipsp = (*vips)[i+npts]; - const FractureCohesive3DIPVariable *ipvp = dynamic_cast<const FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::current)); - const FractureCohesive3DIPVariable *ipvpprev = dynamic_cast<const FractureCohesive3DIPVariable*>(ipsp->getState(IPStateBase::previous)); - - - const double weight = GP[i].weight; - double & detJ = ipvm->getJacobianDeterminant(ie,GP[i]); - double wJ = detJ*weight; - - const Cohesive3DIPVariableBase* cipvm = ipvm->getIPvFrac(); - const Cohesive3DIPVariableBase* cipvp = ipvp->getIPvFrac(); - - const std::vector<TensorialTraits<double>::ValType> &Valsm = ipvm->f(spaceMinus,ie->getElem(0),GPm[i]); - const std::vector<TensorialTraits<double>::ValType> &Valsp = ipvp->f(spacePlus,ie->getElem(1),GPp[i]); - - static SVector3 dirrEnergDJump; - dirrEnergDJump = cipvm->getConstRefToDIrreversibleEnergyDJump(); - dirrEnergDJump += cipvp->getConstRefToDIrreversibleEnergyDJump(); - dirrEnergDJump*= 0.5; - for(int j=0;j<nbFFm;j++){ - for(int k=0;k<3;k++){ - m(j+k*nbFFm) -= dirrEnergDJump[k]*(Valsm[j+0*nbFFm]*wJ); - } - } - for(int j=0;j<nbFFp;j++){ - for(int k=0;k<3;k++){ - m(j+k*nbFFp+nbdofm) += dirrEnergDJump[k]*(Valsp[j+0*nbFFp]*wJ); - } - } - - if (cipvm->withDeformationGradient() and cipvp->withDeformationGradient()){ - const STensor3& dirrEnergDFm = cipvm->getConstRefToDIrreversibleEnergyDDeformationGradient(); - const STensor3& dirrEnergDFp = cipvp->getConstRefToDIrreversibleEnergyDDeformationGradient(); - - const std::vector<TensorialTraits<double>::GradType> &Gradsm = ipvm->gradf(spaceMinus,ie->getElem(0),GPm[i]); - const std::vector<TensorialTraits<double>::GradType> &Gradsp = ipvp->gradf(spacePlus,ie->getElem(1),GPp[i]); - - for(int j=0;j<nbFFm;j++){ - for(int k=0;k<3;k++){ - for (int l=0; l<3; l++){ - m(j+k*nbFFm) += 0.5*dirrEnergDFm(k,l)*Gradsm[j+0*nbFFm](l)*wJ; - } - } - } - for(int j=0;j<nbFFp;j++){ - for(int k=0;k<3;k++){ - for (int l=0; l<3; l++){ - m(j+k*nbFFp+nbdofm) += 0.5*dirrEnergDFp(k,l)*Gradsp[j+0*nbFFp](l)*wJ; - } - } - } - } - - if (cipvm->withIncompatibleJump() and cipvp->withIncompatibleJump()){ - const std::vector<TensorialTraits<double>::ValType>& Vals = ipvm->f(spaceInter,ie,GP[i]); - static SVector3 dirrEnergDInJump; - dirrEnergDInJump = cipvm->getConstRefToDIrreversibleEnergyDIncompatibleJump(); - dirrEnergDInJump += cipvp->getConstRefToDIrreversibleEnergyDIncompatibleJump(); - dirrEnergDInJump *= 0.5; - - for (int j=0; j< nbFF; j++){ - for (int k=0; k<3; k++){ - m(j+k*nbFF+nbdofm+nbdofp) += dirrEnergDInJump[k]*Vals[j+0*nbFF]*wJ; - } - } - } - } - } - } - } -}; +}; \ No newline at end of file diff --git a/dG3D/src/pathFollowingTerms.h b/dG3D/src/pathFollowingTerms.h index f190cb140c21c2ebf80b401c4786a3e202f26659..76ed5ec015d332c154a69306d8c844923b63e652 100644 --- a/dG3D/src/pathFollowingTerms.h +++ b/dG3D/src/pathFollowingTerms.h @@ -51,39 +51,6 @@ class dG3DDissipationPathFollowingBulkLinearTerm : public LinearTermBase<double } }; -class dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm : public dG3DDissipationPathFollowingBulkScalarTerm{ - protected: - - - public: - dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm(const partDomain* dom, const IPField* ip):dG3DDissipationPathFollowingBulkScalarTerm(dom,ip){} - virtual ~dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm(){} - virtual void get(MElement *ele, int npts, IntPt *GP, double &val) const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<double> &vval) const { - Msg::Error("dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm::get(MElement *ele, int npts, IntPt *GP, std::vector<T2> &vval) is not defined"); - }; - virtual ScalarTermBase<double>* clone () const {return new dG3DEnhancedStrainDissipationPathFollowingBulkScalarTerm(_dom,_ipf);}; -}; - -class dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm : public dG3DDissipationPathFollowingBulkLinearTerm{ - protected: - - - public: - dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm(const partDomain* dom,const IPField* ip): dG3DDissipationPathFollowingBulkLinearTerm(dom,ip){}; - virtual ~dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm(){} - - virtual void get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m) const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<double> > &mv) const - { - Msg::Error("Define me get by integration point dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm"); - } - - virtual LinearTermBase<double>* clone () const - { - return new dG3DEnhancedStrainDissipationPathFollowingBulkLinearTerm(_dom,_ipf); - } -}; class dG3DDissipationPathFollowingBoundScalarTerm : public ScalarTermBase<double>{ protected: @@ -120,39 +87,4 @@ class dG3DDissipationPathFollowingBoundLinearTerm : public LinearTermBase<doubl return new dG3DDissipationPathFollowingBoundLinearTerm(_dom,_ipf); } }; - -class twoFieldDG3DDissipationPathFollowingBoundScalarTerm : public dG3DDissipationPathFollowingBoundScalarTerm { - - public: - twoFieldDG3DDissipationPathFollowingBoundScalarTerm(const dgPartDomain* dom, const IPField* ip): - dG3DDissipationPathFollowingBoundScalarTerm(dom,ip){} - virtual ~twoFieldDG3DDissipationPathFollowingBoundScalarTerm(){} - virtual void get(MElement *ele, int npts, IntPt *GP, double &val) const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<double> &vval) const { - Msg::Error("twoFieldDG3DDissipationPathFollowingBoundScalarTerm::get(MElement *ele, int npts, IntPt *GP, std::vector<T2> &vval) is not defined"); - }; - virtual ScalarTermBase<double>* clone () const {return new twoFieldDG3DDissipationPathFollowingBoundScalarTerm(_dom,_ipf);}; -}; - -class twoFieldDG3DDissipationPathFollowingBoundLinearTerm : public dG3DDissipationPathFollowingBoundLinearTerm{ - protected: - - public: - twoFieldDG3DDissipationPathFollowingBoundLinearTerm(const dgPartDomain* dom,const IPField* ip): - dG3DDissipationPathFollowingBoundLinearTerm(dom,ip){}; - virtual ~twoFieldDG3DDissipationPathFollowingBoundLinearTerm(){} - - virtual void get(MElement *ele,int npts,IntPt *GP,fullVector<double> &m) const; - virtual void get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<double> > &mv) const - { - Msg::Error("Define me get by integration point twoFieldDG3DDissipationPathFollowingBoundLinearTerm"); - } - - virtual LinearTermBase<double>* clone () const - { - return new twoFieldDG3DDissipationPathFollowingBoundLinearTerm(_dom,_ipf); - } -}; - - #endif // PATHFOLLOWINGTERMS_H_ diff --git a/dgshell/src/dgShellDomain.cpp b/dgshell/src/dgShellDomain.cpp index f5e6048555210ede0ba0d59bf113a9d826fd1002..9653f428e08306e22454fe66228185a196ec94f5 100644 --- a/dgshell/src/dgShellDomain.cpp +++ b/dgshell/src/dgShellDomain.cpp @@ -373,7 +373,6 @@ void dgLinearShellDomain::computeIPVariable(AllIPState *aips,const unknownField IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; // interface elements partDomain *dom = static_cast<partDomain*>(this); @@ -388,7 +387,7 @@ void dgLinearShellDomain::computeIPVariable(AllIPState *aips,const unknownField dispp.resize(R.size()); ufield->get(R,dispp); int npts = integBound->getIntPoints(ie,&GP); - this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispp,dispExtra,false, stiff); + this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispp,false, stiff); } // Virtual interface element for(elementGroup::elementContainer::const_iterator it=gib->begin(); it!=gib->end();++it){ @@ -397,7 +396,7 @@ void dgLinearShellDomain::computeIPVariable(AllIPState *aips,const unknownField _spaceMinus->getKeys(ie->getElem(0),R); dispm.resize(R.size()); ufield->get(R,dispm); - this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispm,dispExtra,true, stiff); + this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispm,true, stiff); } // bulk @@ -415,7 +414,7 @@ void dgLinearShellDomain::computeIpv(AllIPState *aips,MInterfaceElement *ie, Int const IPStateBase::whichState ws,partDomain* efMinus, partDomain *efPlus, materialLaw *mlawmi, materialLaw *mlawp, fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double> &dispExtra, + fullVector<double> &dispp, const bool virt, bool stiff,const bool checkfrac){ MInterfaceLine *ieline = dynamic_cast<MInterfaceLine*>(ie); nlsFunctionSpace<double> *_spaceminus = static_cast<nlsFunctionSpace<double>*>(efMinus->getFunctionSpace()); @@ -877,7 +876,6 @@ void dgNonLinearShellDomain::computeIPVariable(AllIPState *aips,const unknownFie IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; // interface elements partDomain *dom = static_cast<partDomain*>(this); @@ -892,7 +890,7 @@ void dgNonLinearShellDomain::computeIPVariable(AllIPState *aips,const unknownFie dispp.resize(R.size()); ufield->get(R,dispp); int npts = integBound->getIntPoints(ie,&GP); - this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispp,dispExtra,false, stiff); + this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispp,false, stiff); } // Virtual interface element for(elementGroup::elementContainer::const_iterator it=gib->begin(); it!=gib->end();++it){ @@ -901,7 +899,7 @@ void dgNonLinearShellDomain::computeIPVariable(AllIPState *aips,const unknownFie _spaceMinus->getKeys(ie->getElem(0),R); dispm.resize(R.size()); ufield->get(R,dispm); - this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispm,dispExtra,true, stiff); + this->computeIpv(aips,ie, GP,ws,dom,dom,_mlaw,_mlaw,dispm,dispm,true, stiff); } // bulk @@ -950,7 +948,7 @@ void dgNonLinearShellDomain::computeIpv(AllIPState *aips,MElement *e, IPStateBas void dgNonLinearShellDomain::computeIpv(AllIPState *aips,MInterfaceElement *ie, IntPt *GP,const IPStateBase::whichState ws, partDomain* efMinus, partDomain *efPlus,materialLaw *mlawmi, materialLaw *mlawp,fullVector<double> &dispm, - fullVector<double> &dispp, fullVector<double>& dispExtra, + fullVector<double> &dispp, const bool virt, bool stiff,const bool checkfrac) { MInterfaceLine *ieline = dynamic_cast<MInterfaceLine*>(ie); @@ -1694,7 +1692,6 @@ void interDomainBetweenShell::computeIPVariable(AllIPState *aips,const unknownFi IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; shellMaterialLaw *mlawMinus = static_cast<shellMaterialLaw*>(_mlawMinus); shellMaterialLaw *mlawPlus = static_cast<shellMaterialLaw*>(_mlawPlus); @@ -1711,7 +1708,7 @@ void interDomainBetweenShell::computeIPVariable(AllIPState *aips,const unknownFi ufield->get(R,dispp); // shellMaterialLaw* smlawminus = dynamic_cast<shellMaterialLaw*>(_mlawMinus); // shellMaterialLaw* smlawplus = dynamic_cast<shellMaterialLaw*>(_mlawPlus); - this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,dispExtra,false, stiff); + this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,false, stiff); } } diff --git a/dgshell/src/dgShellDomain.h b/dgshell/src/dgShellDomain.h index 38c4d4d03f2c6e42f047fd72f07ccf67811fb271..edd11987d45882e72d071cc3346e686907efc9c1 100644 --- a/dgshell/src/dgShellDomain.h +++ b/dgshell/src/dgShellDomain.h @@ -52,7 +52,7 @@ class dgLinearShellDomain : public dgPartDomain{ 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, + fullVector<double> &dispp, const bool virt, bool stiff, const bool checkfrac=true); virtual void computeIPVariable(AllIPState *aips,const unknownField *ufield,const IPStateBase::whichState ws, bool stiff); virtual void checkFailure(IPField* ipf) const{ @@ -88,14 +88,6 @@ class dgLinearShellDomain : public dgPartDomain{ virtual double scaleTimeStep() const {return _sts;} virtual FunctionSpaceBase* getFunctionSpace(){return _space;} virtual const FunctionSpaceBase* getFunctionSpace() const{return _space;} - virtual FunctionSpaceBase* getInterfaceFunctionSpace() { - Msg::Error("getInterfaceFunctionSpace is not defined"); - return NULL; - } - virtual const FunctionSpaceBase* getInterfaceFunctionSpace() const { - Msg::Error("getInterfaceFunctionSpace is not defined"); - return NULL; - } virtual const partDomain* getMinusDomain() const{return this;} virtual const partDomain* getPlusDomain() const{return this;} virtual partDomain* getMinusDomain() {return this;} @@ -129,7 +121,7 @@ class dgNonLinearShellDomain : public dgLinearShellDomain{ 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, + fullVector<double> &dispp, const bool virt, bool stiff,const bool checkfrac=true); virtual void initializeTerms(unknownField *uf,IPField *ip); virtual void setGaussIntegrationRule(); diff --git a/dgshell/src/nonLinearInterDomainShell.cpp b/dgshell/src/nonLinearInterDomainShell.cpp index a5ea1559e0bd42684a17a7452eecf4d2a1141e46..6a0a961e6fb42bfd7f92b1fb64058c05e87dca0c 100644 --- a/dgshell/src/nonLinearInterDomainShell.cpp +++ b/dgshell/src/nonLinearInterDomainShell.cpp @@ -144,7 +144,6 @@ void nonLinearInterDomainShell::computeIPVariable(AllIPState *aips,const unknown IntPt *GP; fullVector<double> dispm; fullVector<double> dispp; - fullVector<double> dispExtra; std::vector<Dof> R; shellMaterialLaw *mlawMinus = static_cast<shellMaterialLaw*>(_mlawMinus); shellMaterialLaw *mlawPlus = static_cast<shellMaterialLaw*>(_mlawPlus); @@ -159,7 +158,7 @@ void nonLinearInterDomainShell::computeIPVariable(AllIPState *aips,const unknown _spacePlus->getKeys(iele->getElem(1),R); dispp.resize(R.size()); ufield->get(R,dispp); - this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,dispExtra,false, stiff); + this->computeIpv(aips,iele,GP,ws,_domMinus,_domPlus,mlawMinus,mlawPlus,dispm,dispp,false, stiff); // set initial value change this if(ws == IPStateBase::initial) {