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
0ce28743
Commit
0ce28743
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
revert last commit: new code is not ready
parent
ac90dc83
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
+60
-4
60 additions, 4 deletions
tutorial/t13.geo
with
60 additions
and
4 deletions
tutorial/t13.geo
+
60
−
4
View file @
0ce28743
General
.
MeshDiscrete
=
1
;
/*********************************************************************
*
* Gmsh tutorial 13
*
* Remeshing STL with compounds
*
*********************************************************************/
// Since compound geometrical compute a new parametrization, one can also use
// them to remesh STL files, even if in this case there's usually only a single
// elementary geometrical entity per compound.
// Let's merge the mesh that we would like to remesh. This mesh was reclassified
// ("colored") from an initial STL triangulation using the "Reclassify 2D" tool
// in Gmsh, so that we could split it along sharp geometrical features.
Merge
"t13_data.msh"
;
Merge
"t13_data.msh"
;
Mesh
.
Algorithm
=
6
;
Mesh
.
CharacteristicLengthMax
=
1
;
// Since the original mesh is a bit coarse, we refine it once
// Since the original mesh is a bit coarse, we refine it once
RefineMesh
;
RefineMesh
;
CreateTopology
;
\ No newline at end of file
// 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
;
Physical
Line
(
1
)
=
{
26
...
37
};
// element size imposed by a size field
Field
[
1
]
=
MathEval
;
Field
[
1
].
F
=
"2.5"
;
Background
Field
=
1
;
DefineConstant
[
funny
=
{
0
,
Choices
{
0
,
1
},
Name
"Parameters/Apply funny mesh size field?"
},
hide
=
{
Geometry
.
HideCompounds
,
Choices
{
0
,
1
},
AutoCheck
0
,
GmshOption
"Geometry.HideCompounds"
,
Name
"Parameters/Hide compound sub-entities"
}
];
If
(
funny
)
Field
[
1
].
F
=
"2*Sin((x+y)/5) + 3"
;
EndIf
Mesh
.
RemeshAlgorithm
=
1
;
// automatic
Mesh
.
RemeshParametrization
=
7
;
// conformal finite element
Mesh
.
Algorithm
=
6
;
// Frontal
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