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
Analyze
Contributor 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
gmsh
gmsh
Commits
fdaaf1a8
Commit
fdaaf1a8
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
add an area constraint on the elements in the initial mesh to make the refinement nicer
parent
fd6e1492
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Mesh/2D_Mesh_Triangle.cpp
+9
-9
9 additions, 9 deletions
Mesh/2D_Mesh_Triangle.cpp
benchmarks/misc/bgmesh/proj.geo
+1
-3
1 addition, 3 deletions
benchmarks/misc/bgmesh/proj.geo
with
10 additions
and
12 deletions
Mesh/2D_Mesh_Triangle.cpp
+
9
−
9
View file @
fdaaf1a8
// $Id: 2D_Mesh_Triangle.cpp,v 1.1
0
2004-07-14 22:
42:26
geuzaine Exp $
// $Id: 2D_Mesh_Triangle.cpp,v 1.1
1
2004-07-14 22:
53:50
geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -182,16 +182,16 @@ int Mesh_Triangle(Surface * s)
mid
.
edgemarkerlist
=
NULL
;
// triangulate the points with minimum angle > 20 deg, with no
// boundary breaking,
// TODO:
// and with an area constraint related to the
// boundary breaking, and with an area constraint related to the
// maximum char. length allowed (this last constraint is to avoid an
// extremely coarse initial grid, on which the interpolation of the
// final char. lengths would be awful).
//sprintf(opts, "pqzYa%e", lc_max*lc_max/2.);
strcpy
(
opts
,
"pqzY"
);
double
a
=
lc_max
*
lc_max
/
1.2
;
// FIXME: bof
if
(
a
>
1.e-6
)
sprintf
(
opts
,
"pqzYa%f"
,
a
);
else
strcpy
(
opts
,
"pqzY"
);
if
(
CTX
.
verbosity
<
4
)
strcat
(
opts
,
"Q"
);
triangulate
(
opts
,
&
in
,
&
mid
,
NULL
);
...
...
@@ -226,7 +226,7 @@ int Mesh_Triangle(Surface * s)
Calcule_Z_Plan
(
&
v
,
&
dum
);
Projette_Inverse
(
&
v
,
&
dum
);
val
=
Lc_XYZ
(
v
->
Pos
.
X
,
v
->
Pos
.
Y
,
v
->
Pos
.
Z
,
THEM
);
val
=
val
*
val
/
1.2
;
val
=
val
*
val
/
1.2
;
// FIXME: bof
Free_Vertex
(
&
v
,
0
);
}
else
{
...
...
@@ -236,7 +236,7 @@ int Mesh_Triangle(Surface * s)
val
+=
mid
.
pointattributelist
[
k
];
}
val
/=
mid
.
numberofcorners
;
val
=
val
*
val
/
1.5
;
val
=
val
*
val
/
1.5
;
// FIXME: bof
}
mid
.
trianglearealist
[
i
]
=
val
;
}
...
...
This diff is collapsed.
Click to expand it.
benchmarks/misc/bgmesh/proj.geo
+
1
−
3
View file @
fdaaf1a8
...
...
@@ -9,6 +9,4 @@ Line(4) = {1,4};
Line
Loop
(
5
)
=
{
2
,
3
,
4
,
1
};
Plane
Surface
(
6
)
=
{
5
};
Extrude
Surface
{
6
,
{
0
,
0.0
,
1
}
};
Surface
Loop
(
29
)
=
{
23
,
6
,
15
,
19
,
28
,
27
};
Volume
(
30
)
=
{
29
};
Physical
Volume
(
1
)
=
{
30
};
Physical
Volume
(
1
)
=
{
1
};
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