Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cm3Libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm3
cm3Libraries
Commits
98aaab97
Commit
98aaab97
authored
8 years ago
by
Van Dung NGUYEN
Browse files
Options
Downloads
Plain Diff
Merge branch 'vdg-cm3'
parents
056d4691
e0158a33
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NonLinearSolver/materialLaw/numericalMaterial.cpp
+25
-11
25 additions, 11 deletions
NonLinearSolver/materialLaw/numericalMaterial.cpp
NonLinearSolver/materialLaw/numericalMaterial.h
+5
-2
5 additions, 2 deletions
NonLinearSolver/materialLaw/numericalMaterial.h
with
30 additions
and
13 deletions
NonLinearSolver/materialLaw/numericalMaterial.cpp
+
25
−
11
View file @
98aaab97
...
@@ -155,17 +155,25 @@ nonLinearMechSolver* numericalMaterial::createMicroSolver(const int ele, const i
...
@@ -155,17 +155,25 @@ nonLinearMechSolver* numericalMaterial::createMicroSolver(const int ele, const i
std
::
map
<
int
,
int
>::
const_iterator
itm
=
_meshIdMap
.
find
(
type
);
std
::
map
<
int
,
int
>::
const_iterator
itm
=
_meshIdMap
.
find
(
type
);
if
(
itm
==
_meshIdMap
.
end
()
or
_allPertMesh
.
size
()
==
0
){
if
(
itm
==
_meshIdMap
.
end
()
or
_allPertMesh
.
size
()
==
0
){
/**load model**/
/**load model**/
if
(
_microMeshFile
.
length
()
>
0
){
std
::
map
<
int
,
std
::
string
>::
const_iterator
itMestConstraint
=
_meshOnIP
.
find
(
type
);
Msg
::
Info
(
"create model from mesh file %s"
,
_microMeshFile
.
c_str
());
if
(
itMestConstraint
==
_meshOnIP
.
end
()){
solver
->
loadModel
(
_microMeshFile
);
if
(
_microMeshFile
.
length
()
>
0
){
}
Msg
::
Info
(
"create model from mesh file %s"
,
_microMeshFile
.
c_str
());
else
if
(
_microGeoFile
.
length
()
>
0
){
solver
->
loadModel
(
_microMeshFile
);
Msg
::
Info
(
"create model from geometry file %s"
,
_microGeoFile
.
c_str
());
}
solver
->
createMicroModel
(
_microGeoFile
,
_meshDim
,
_meshOrder
,
_meshIncomplete
);
else
if
(
_microGeoFile
.
length
()
>
0
){
}
Msg
::
Info
(
"create model from geometry file %s"
,
_microGeoFile
.
c_str
());
else
{
solver
->
createMicroModel
(
_microGeoFile
,
_meshDim
,
_meshOrder
,
_meshIncomplete
);
Msg
::
Fatal
(
"micro model file must be provided: proc %d, ele %d, GP %d"
,
Msg
::
GetCommRank
(),
ele
,
gpt
);
}
}
else
{
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
{
else
{
std
::
map
<
int
,
std
::
string
>::
const_iterator
itstr
=
_allPertMesh
.
find
(
itm
->
second
);
std
::
map
<
int
,
std
::
string
>::
const_iterator
itstr
=
_allPertMesh
.
find
(
itm
->
second
);
...
@@ -329,6 +337,12 @@ void numericalMaterial::addMaterialLaw(materialLaw* mlaw){
...
@@ -329,6 +337,12 @@ void numericalMaterial::addMaterialLaw(materialLaw* mlaw){
_allMaterialLaw
.
push_back
(
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
){
void
numericalMaterial
::
setPerturbationMaterialLawIP
(
const
int
ele
,
const
int
ip
){
int
num
=
numericalMaterial
::
createTypeWithTwoInts
(
ele
,
ip
);
int
num
=
numericalMaterial
::
createTypeWithTwoInts
(
ele
,
ip
);
_pertMaterialLawIP
.
insert
(
num
);
_pertMaterialLawIP
.
insert
(
num
);
...
...
This diff is collapsed.
Click to expand it.
NonLinearSolver/materialLaw/numericalMaterial.h
+
5
−
2
View file @
98aaab97
...
@@ -125,6 +125,8 @@ class numericalMaterial : public numericalMaterialBase{
...
@@ -125,6 +125,8 @@ class numericalMaterial : public numericalMaterialBase{
std
::
map
<
int
,
int
>
_meshIdMap
;
// mesh id map,
std
::
map
<
int
,
int
>
_meshIdMap
;
// mesh id map,
std
::
map
<
int
,
std
::
string
>::
iterator
_idIterator
;
// iterator to acces meshes
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
>
_allPertMesh
;
// all perturbed meshes
std
::
map
<
int
,
std
::
string
>
_meshOnIP
;
// constraint mesh on each ip
std
::
string
_microMeshFile
;
// micro meshfile
std
::
string
_microMeshFile
;
// micro meshfile
std
::
string
_microGeoFile
;
// micro geometry
std
::
string
_microGeoFile
;
// micro geometry
...
@@ -183,7 +185,7 @@ class numericalMaterial : public numericalMaterialBase{
...
@@ -183,7 +185,7 @@ class numericalMaterial : public numericalMaterialBase{
virtual
~
numericalMaterial
();
virtual
~
numericalMaterial
();
// create micro solver
// 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
#endif
// set micro meshes
// set micro meshes
...
@@ -196,7 +198,8 @@ class numericalMaterial : public numericalMaterialBase{
...
@@ -196,7 +198,8 @@ class numericalMaterial : public numericalMaterialBase{
virtual
void
addDomain
(
partDomain
*
domain
);
virtual
void
addDomain
(
partDomain
*
domain
);
// set micro material law
// set micro material law
virtual
void
addMaterialLaw
(
materialLaw
*
mlaw
);
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
setPerturbationMaterialLawIP
(
const
int
ele
,
const
int
ip
);
virtual
void
addPerturbationMaterialLaw
(
materialLaw
*
mlaw
);
virtual
void
addPerturbationMaterialLaw
(
materialLaw
*
mlaw
);
// set micro periodicity
// set micro periodicity
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment