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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
62190bc3
Commit
62190bc3
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
not sure how this was lost?
parent
bd8d36f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tutorial/t13.geo
+50
-18
50 additions, 18 deletions
tutorial/t13.geo
with
50 additions
and
18 deletions
tutorial/t13.geo
+
50
−
18
View file @
62190bc3
cl1
=
0.01
;
/*********************************************************************
Point
(
1
)
=
{
0
,
0
,
0
,
0.01
};
*
Point
(
2
)
=
{
0.1
,
0
,
0
,
0.01
};
* Gmsh tutorial 13
Point
(
3
)
=
{
0.1
,
0.3
,
0
,
0.01
};
*
Point
(
4
)
=
{
0
,
0.3
,
0
,
0.01
};
* Remeshing STL with compounds
Line
(
1
)
=
{
1
,
2
};
*
Line
(
2
)
=
{
3
,
2
};
*********************************************************************/
Line
(
3
)
=
{
3
,
4
};
Line
(
4
)
=
{
4
,
1
};
// Since compound geometrical compute a new parametrization, one can
Line
Loop
(
6
)
=
{
4
,
1
,
-
2
,
3
};
// also use them to remesh STL files, even if in this case there's
Plane
Surface
(
6
)
=
{
6
};
// usually only a single elementary geometrical entity per compound.
Physical
Point
(
1
)
=
{
1
,
2
};
MyLine
=
99
;
// Let's merge the mesh that we would like to remesh. This mesh was
Physical
Line
(
MyLine
)
=
{
1
,
2
,
4
};
// reclassified ("colored") from an initial STL triangulation using
Physical
Surface
(
"My fancy surface label"
)
=
{
6
};
// the "Reclassify 2D" tool in Gmsh, so that we could split it along
Field
[
1
]
=
PostView
;
// sharp geometrical features.
Field
[
1
].
CropNegativeValues
=
1
;
Merge
"t13_data.msh"
;
Field
[
1
].
IView
=
0
;
// Since the original mesh is a bit coarse, we refine it once
RefineMesh
;
// Create the topology of the discrete model
CreateTopology
;
// We can now define a compound line (resp. surface) for each discrete
// line (resp. surface) in the model
ll
[]
=
Line
"*"
;
For
j
In
{
0
:
#
ll
[]
-
1
}
Compound
Line
(
newl
)
=
ll
[
j
];
EndFor
ss
[]
=
Surface
"*"
;
s
=
news
;
For
i
In
{
0
:
#
ss
[]
-
1
}
Compound
Surface
(
s
+
i
)
=
ss
[
i
];
EndFor
// And we can create the volume based on the new compound entities
Surface
Loop
(
1
)
=
{
s
:
s
+
#
ss
[]
-
1
};
Volume
(
1
)
=
{
1
};
Physical
Surface
(
1
)
=
{
s
:
s
+
#
ss
[]
-
1
};
Physical
Volume
(
1
)
=
1
;
// Apply a funny mesh size field, just because we can :-)
Field
[
1
]
=
MathEval
;
Field
[
1
].
F
=
"2*Sin((x+y)/5) + 3"
;
Background
Field
=
1
;
Background
Field
=
1
;
Mesh
.
RemeshAlgorithm
=
1
;
// (0) no split (1) automatic (2) automatic only with metis
Mesh
.
RemeshParametrization
=
7
;
// (0) harmonic (1) conformal spectral (7) conformal finite element
Geometry
.
HideCompounds
=
0
;
// don't hide the compound entities
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