Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
ff4f3a97
Commit
ff4f3a97
authored
13 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
d549dbb6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GModel.cpp
+3
-5
3 additions, 5 deletions
Geo/GModel.cpp
Geo/MVertex.cpp
+8
-4
8 additions, 4 deletions
Geo/MVertex.cpp
Mesh/meshGFaceBamg.cpp
+5
-3
5 additions, 3 deletions
Mesh/meshGFaceBamg.cpp
Mesh/meshMetric.cpp
+2
-2
2 additions, 2 deletions
Mesh/meshMetric.cpp
with
18 additions
and
14 deletions
Geo/GModel.cpp
+
3
−
5
View file @
ff4f3a97
...
...
@@ -577,6 +577,7 @@ int GModel::adaptMesh(std::vector<int> technique, std::vector<simpleFunction<dou
nbElemsOld
=
nbElems
;
}
}
//adapt only upper most dimension
else
{
while
(
1
)
{
...
...
@@ -608,9 +609,6 @@ int GModel::adaptMesh(std::vector<int> technique, std::vector<simpleFunction<dou
metric
->
addMetric
(
technique
[
imetric
],
f
[
imetric
],
parameters
[
imetric
]);
}
fields
->
setBackgroundField
(
metric
);
// int id = fields->newId();
// (*fields)[id] = new meshMetric(this, technique, f, parameters);
// fields->background_field = id;
if
(
getDim
()
==
2
){
for
(
fiter
fit
=
firstFace
();
fit
!=
lastFace
();
++
fit
){
...
...
@@ -632,7 +630,7 @@ int GModel::adaptMesh(std::vector<int> technique, std::vector<simpleFunction<dou
nbElems
=
getNumMeshElements
();
if
(
++
ITER
>=
niter
)
break
;
if
(
fabs
((
double
)(
nbElems
-
nbElemsOld
))
<
0.01
*
nbElemsOld
)
break
;
if
(
ITER
>
3
&&
fabs
((
double
)(
nbElems
-
nbElemsOld
))
<
0.01
*
nbElemsOld
)
break
;
nbElemsOld
=
nbElems
;
}
...
...
This diff is collapsed.
Click to expand it.
Geo/MVertex.cpp
+
8
−
4
View file @
ff4f3a97
...
...
@@ -396,6 +396,11 @@ bool reparamMeshVertexOnFace(MVertex *v, const GFace *gf, SPoint2 ¶m,
double
t
;
v
->
getParameter
(
0
,
t
);
param
=
ge
->
reparamOnFace
(
gf
,
t
,
1
);
if
(
!
v
->
getParameter
(
0
,
t
))
{
Msg
::
Error
(
"vertex v %p not MedgeVertex"
,
v
);
Msg
::
Exit
(
1
);
//param = gf->parFromPoint(SPoint3(v->x(), v->y(), v->z()), onSurface);
}
// shout, we are on a seam
if
(
ge
->
isSeam
(
gf
))
...
...
@@ -404,7 +409,6 @@ bool reparamMeshVertexOnFace(MVertex *v, const GFace *gf, SPoint2 ¶m,
else
{
double
uu
,
vv
;
if
(
v
->
onWhat
()
==
gf
&&
v
->
getParameter
(
0
,
uu
)
&&
v
->
getParameter
(
1
,
vv
)){
//printf("%d face %d pos %g %g\n",v->getNum(),gf->tag(),uu,vv);
param
=
SPoint2
(
uu
,
vv
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFaceBamg.cpp
+
5
−
3
View file @
ff4f3a97
...
...
@@ -72,11 +72,12 @@ static void computeMeshMetricsForBamg(GFace *gf, int numV,
void
meshGFaceBamg
(
GFace
*
gf
){
//Replace edges by their compounds
std
::
list
<
GEdge
*>
edges
=
gf
->
edges
();
bool
hasCompounds
=
false
;
//Replace edges by their compounds
std
::
set
<
GEdge
*>
mySet
;
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
bool
hasCompounds
=
false
;
while
(
it
!=
edges
.
end
()){
if
((
*
it
)
->
getCompound
()){
hasCompounds
=
true
;
...
...
@@ -120,6 +121,7 @@ void meshGFaceBamg(GFace *gf){
(
*
it
)
->
setIndex
(
index
++
);
}
}
//exit(1);
int
nbFixedVertices
=
index
;
for
(
std
::
set
<
MVertex
*>::
iterator
it
=
all
.
begin
();
it
!=
all
.
end
();
++
it
){
//FIXME : SEAMS should have to be taken into account here !!!
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshMetric.cpp
+
2
−
2
View file @
ff4f3a97
...
...
@@ -371,8 +371,8 @@ void meshMetric::computeMetric(){
//printf("%d elements are considered in the meshMetric \n",(int)_elements.size());
computeValues
();
//
computeHessian_FE();
computeHessian_LS
();
computeHessian_FE
();
//
computeHessian_LS();
int
metricNumber
=
setOfMetrics
.
size
();
...
...
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