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
2cc1ac29
Commit
2cc1ac29
authored
13 years ago
by
Matti Pellika
Browse files
Options
Downloads
Patches
Plain Diff
Update demo
parent
87cd1c13
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
demos/homology.geo
+37
-29
37 additions, 29 deletions
demos/homology.geo
with
37 additions
and
29 deletions
demos/homology.geo
+
37
−
29
View file @
2cc1ac29
/*********************************************************************
*
* Gmsh tutorial
10
* Gmsh tutorial
*
* Homology computation
* Homology
and cohomology
computation
*
*********************************************************************/
// Homology computation in Gmsh finds representative chains of
// (relative) homology spaces using a mesh of a model. Those
// representatives generate the (relative) homology spaces of the
// model. Alternatively, Gmsh can only look for the ranks of the
// (relative) homology spaces, the Betti numbers of the model.
// The generators chains are stored in a given .msh-file as physical
// groups, whose mesh elements are oriented such that their
// coefficients are 1 in the generator chain.
// (relative) (co)homology space bases using a mesh of a model.
// The representative basis chains are stored in the mesh as
// physical groups of Gmsh, one for each chain.
// Create an example geometry
...
...
@@ -134,27 +129,40 @@ Physical Surface(74) = {46, 18, 20, 52, 22, 50, 24, 48, 66, 63, 60, 58, 56, 54};
Physical
Surface
(
75
)
=
{
46
,
63
,
66
,
52
,
50
,
48
,
54
,
60
,
58
,
56
};
// Create a mesh of the model
Mesh
3
;
// Find generators of relative homology spaces of the domain modulo the
// four terminals.
// Save the generator chains to t10_hom.msh.
HomGen
(
"t10_hom.msh"
)
=
{{
69
},
{
70
,
71
,
72
,
73
}};
// Find bases for relative homology spaces of
// the domain modulo the four terminals.
Homology
{{
69
},
{
70
,
71
,
72
,
73
}};
// Find the corresponding thin cuts,
// generators of relative homology spaces modulo the
// non-terminal domain surface.
// Save the cut chains to t10_hom.msh.
HomGen
(
"t10_hom.msh"
)
=
{{
69
},
{
75
}};
// Find homology space bases isomorphic to the previous bases:
// homology spaces modulo the non-terminal domain surface,
// a.k.a the thin cuts.
Homology
{{
69
},
{
75
}};
// Find the corresponding thick cuts.
// Save the cut chains to t10_hom.msh.
HomCut
(
"t10_hom.msh"
)
=
{{
69
},
{
70
,
71
,
72
,
73
}};
// Find cohomology space bases isomorphic to the previous bases:
// cohomology spaces of the domain modulo the four terminals,
// a.k.a the thick cuts.
Cohomology
{{
69
},
{
70
,
71
,
72
,
73
}};
// More examples (uncomment):
// HomGen("t10_hom.msh") = {{69}, {}};
// HomGen("t10_hom.msh") = {{}, {}};
// HomGen("t10_hom.msh") = {{69}, {74}};
// HomGen("t10_hom.msh") = {{}, {74}};
// Homology = {{69}, {}};
// Homology {{69}, {74}};
// Homology {{74}, {70, 71, 72, 73}};
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