Skip to content
Snippets Groups Projects
Commit 98aaab97 authored by Van Dung NGUYEN's avatar Van Dung NGUYEN
Browse files

Merge branch 'vdg-cm3'

parents 056d4691 e0158a33
Branches
Tags
No related merge requests found
......@@ -155,6 +155,8 @@ nonLinearMechSolver* numericalMaterial::createMicroSolver(const int ele, const i
std::map<int,int>::const_iterator itm = _meshIdMap.find(type);
if (itm == _meshIdMap.end() or _allPertMesh.size() ==0){
/**load model**/
std::map<int,std::string>::const_iterator itMestConstraint = _meshOnIP.find(type);
if (itMestConstraint == _meshOnIP.end()){
if (_microMeshFile.length() >0){
Msg::Info("create model from mesh file %s",_microMeshFile.c_str());
solver->loadModel(_microMeshFile);
......@@ -167,6 +169,12 @@ nonLinearMechSolver* numericalMaterial::createMicroSolver(const int ele, const i
Msg::Fatal("micro model file must be provided: proc %d, ele %d, GP %d",Msg::GetCommRank(),ele,gpt);
}
}
else{
std::string mshFile = itMestConstraint->second;
printf("create model from mesh file %s \n",mshFile.c_str());
solver->loadModel(mshFile);
}
}
else{
std::map<int,std::string>::const_iterator itstr = _allPertMesh.find(itm->second);
std::string mshFile = itstr->second;
......@@ -329,6 +337,12 @@ void numericalMaterial::addMaterialLaw(materialLaw* mlaw){
_allMaterialLaw.push_back(mlaw);
};
void numericalMaterial::addPertutationalMeshIP(const int ele, const int ip, const std::string meshfile){
Msg::Info("pert mesh it element %d ip %d",ele,ip);
int type = numericalMaterial::createTypeWithTwoInts(ele,ip);
_meshOnIP[type] = meshfile;
};
void numericalMaterial::setPerturbationMaterialLawIP(const int ele, const int ip){
int num = numericalMaterial::createTypeWithTwoInts(ele,ip);
_pertMaterialLawIP.insert(num);
......
......@@ -126,6 +126,8 @@ class numericalMaterial : public numericalMaterialBase{
std::map<int,std::string>::iterator _idIterator;// iterator to acces meshes
std::map<int,std::string> _allPertMesh; // all perturbed meshes
std::map<int,std::string> _meshOnIP; // constraint mesh on each ip
std::string _microMeshFile; // micro meshfile
std::string _microGeoFile; // micro geometry
int _meshOrder; // mesh ord
......@@ -183,7 +185,7 @@ class numericalMaterial : public numericalMaterialBase{
virtual ~numericalMaterial();
// create micro solver
virtual nonLinearMechSolver* createMicroSolver(const int ele=0, const int gpt=0) const;
virtual nonLinearMechSolver* createMicroSolver(const int ele, const int gpt) const;
#endif
// set micro meshes
......@@ -197,6 +199,7 @@ class numericalMaterial : public numericalMaterialBase{
// set micro material law
virtual void addMaterialLaw(materialLaw* mlaw);
virtual void addPertutationalMeshIP(const int ele, const int ip, const std::string meshfile);
virtual void setPerturbationMaterialLawIP(const int ele, const int ip);
virtual void addPerturbationMaterialLaw(materialLaw* mlaw);
// set micro periodicity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment