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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
3b24fbfc
Commit
3b24fbfc
authored
5 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
work on tutorials
parent
44c0ffb0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.txt
+2
-2
2 additions, 2 deletions
CHANGELOG.txt
tutorial/c++/t8.cpp
+2
-1
2 additions, 1 deletion
tutorial/c++/t8.cpp
tutorial/python/t14.py
+22
-18
22 additions, 18 deletions
tutorial/python/t14.py
with
26 additions
and
21 deletions
CHANGELOG.txt
+
2
−
2
View file @
3b24fbfc
4.5.6 (Work-in-progress): small bug fixes.
4.5.6 (Work-in-progress):
API tutorials;
small bug fixes.
4.5.5 (March 21, 2020): tooltips in GUI to help discovery of scripting options;
4.5.5 (March 21, 2020): tooltips in GUI to help discovery of scripting options;
fixed MED IO of high-order elements; fixed OCC attribute search by bounding box;
fixed MED IO of high-order elements; fixed OCC attribute search by bounding box;
...
@@ -6,7 +6,7 @@ fix parsing of mac-encoded scripts; new RecombineMesh command; added support for
...
@@ -6,7 +6,7 @@ fix parsing of mac-encoded scripts; new RecombineMesh command; added support for
extrusion of mixed-dimension entities with OCC; small bug fixes.
extrusion of mixed-dimension entities with OCC; small bug fixes.
4.5.4 (February 29, 2020): periodic mesh optimization now ensures that the
4.5.4 (February 29, 2020): periodic mesh optimization now ensures that the
master mesh is not modified; code cleanup;
API tutorials;
small bug fixes.
master mesh is not modified; code cleanup; small bug fixes.
4.5.3 (February 22, 2020): improved positioning of corresponding nodes on
4.5.3 (February 22, 2020): improved positioning of corresponding nodes on
periodic entities; improved LaTeX output; improved curve splitting in
periodic entities; improved LaTeX output; improved curve splitting in
...
...
This diff is collapsed.
Click to expand it.
tutorial/c++/t8.cpp
+
2
−
1
View file @
3b24fbfc
...
@@ -11,7 +11,7 @@ int main(int argc, char **argv)
...
@@ -11,7 +11,7 @@ int main(int argc, char **argv)
gmsh
::
initialize
();
gmsh
::
initialize
();
gmsh
::
option
::
setNumber
(
"General.Terminal"
,
1
);
gmsh
::
option
::
setNumber
(
"General.Terminal"
,
1
);
model
::
add
(
"t
7
"
);
model
::
add
(
"t
8
"
);
// Copied from t1.cpp...
// Copied from t1.cpp...
double
lc
=
1e-2
;
double
lc
=
1e-2
;
...
@@ -35,6 +35,7 @@ int main(int argc, char **argv)
...
@@ -35,6 +35,7 @@ int main(int argc, char **argv)
}
}
catch
(...)
{
catch
(...)
{
gmsh
::
logger
::
write
(
"Could not load post-processing views: bye!"
);
gmsh
::
logger
::
write
(
"Could not load post-processing views: bye!"
);
gmsh
::
finalize
();
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
tutorial/python/t14.py
+
22
−
18
View file @
3b24fbfc
# This file reimplements gmsh/tutorial/t14.geo in Python.
# This file reimplements gmsh/tutorial/t14.geo in Python.
# /*********************************************************************
# *
# * Gmsh tutorial 14
# *
# * Homology and cohomology computation
# *
# *********************************************************************/
# Homology computation in Gmsh finds representative chains of (relative)
# Homology computation in Gmsh finds representative chains of (relative)
# (co)homology space bases using a mesh of a model. The representative basis
# (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.
# chains are stored in the mesh as physical groups of Gmsh, one for each chain.
...
@@ -90,32 +82,44 @@ for tag in terminal_tags:
...
@@ -90,32 +82,44 @@ for tag in terminal_tags:
# Whole domain surface
# Whole domain surface
boundary_physical_tag
=
2002
boundary_physical_tag
=
2002
gmsh
.
model
.
addPhysicalGroup
(
dim
=
2
,
tags
=
boundary_tags
,
tag
=
boundary_physical_tag
)
gmsh
.
model
.
addPhysicalGroup
(
dim
=
2
,
tags
=
boundary_tags
,
gmsh
.
model
.
setPhysicalName
(
dim
=
2
,
tag
=
boundary_physical_tag
,
name
=
"
Boundary
"
)
tag
=
boundary_physical_tag
)
gmsh
.
model
.
setPhysicalName
(
dim
=
2
,
tag
=
boundary_physical_tag
,
name
=
"
Boundary
"
)
# Complement of the domain surface respect to the four terminals
# Complement of the domain surface respect to the four terminals
complement_physical_tag
=
2003
complement_physical_tag
=
2003
gmsh
.
model
.
addPhysicalGroup
(
dim
=
2
,
tags
=
complement_tags
,
tag
=
complement_physical_tag
)
gmsh
.
model
.
addPhysicalGroup
(
dim
=
2
,
tags
=
complement_tags
,
gmsh
.
model
.
setPhysicalName
(
dim
=
2
,
tag
=
complement_physical_tag
,
name
=
"
Complement
"
)
tag
=
complement_physical_tag
)
gmsh
.
model
.
setPhysicalName
(
dim
=
2
,
tag
=
complement_physical_tag
,
name
=
"
Complement
"
)
gmsh
.
model
.
geo
.
synchronize
()
gmsh
.
model
.
geo
.
synchronize
()
# Find bases for relative homology spaces of the domain modulo the four
# Find bases for relative homology spaces of the domain modulo the four
# terminals.
# terminals.
gmsh
.
model
.
mesh
.
computeHomology
(
domainTags
=
[
domain_physical_tag
],
subdomainTags
=
[
terminals_physical_tag
],
dims
=
[
0
,
1
,
2
,
3
])
gmsh
.
model
.
mesh
.
computeHomology
(
domainTags
=
[
domain_physical_tag
],
subdomainTags
=
[
terminals_physical_tag
],
dims
=
[
0
,
1
,
2
,
3
])
# Find homology space bases isomorphic to the previous bases: homology spaces
# Find homology space bases isomorphic to the previous bases: homology spaces
# modulo the non-terminal domain surface, a.k.a the thin cuts.
# modulo the non-terminal domain surface, a.k.a the thin cuts.
gmsh
.
model
.
mesh
.
computeHomology
(
domainTags
=
[
domain_physical_tag
],
subdomainTags
=
[
complement_physical_tag
],
dims
=
[
0
,
1
,
2
,
3
])
gmsh
.
model
.
mesh
.
computeHomology
(
domainTags
=
[
domain_physical_tag
],
subdomainTags
=
[
complement_physical_tag
],
dims
=
[
0
,
1
,
2
,
3
])
# Find cohomology space bases isomorphic to the previous bases: cohomology
# Find cohomology space bases isomorphic to the previous bases: cohomology
# spaces of the domain modulo the four terminals, a.k.a the thick cuts.
# spaces of the domain modulo the four terminals, a.k.a the thick cuts.
gmsh
.
model
.
mesh
.
computeCohomology
(
domainTags
=
[
domain_physical_tag
],
subdomainTags
=
[
terminals_physical_tag
],
dims
=
[
0
,
1
,
2
,
3
])
gmsh
.
model
.
mesh
.
computeCohomology
(
domainTags
=
[
domain_physical_tag
],
subdomainTags
=
[
terminals_physical_tag
],
dims
=
[
0
,
1
,
2
,
3
])
# more examples
# more examples
#gmsh.model.mesh.computeHomology()
# gmsh.model.mesh.computeHomology()
#gmsh.model.mesh.computeHomology(domainTags=[domain_physical_tag])
# gmsh.model.mesh.computeHomology(domainTags=[domain_physical_tag])
#gmsh.model.mesh.computeHomology(domainTags=[domain_physical_tag], subdomainTags=[boundary_physical_tag], dims=[0,1,2,3])
# gmsh.model.mesh.computeHomology(domainTags=[domain_physical_tag],
# subdomainTags=[boundary_physical_tag],
# dims=[0,1,2,3])
# Generate the mesh and perform the requested homology computations
# Generate the mesh and perform the requested homology computations
gmsh
.
model
.
mesh
.
generate
(
3
)
gmsh
.
model
.
mesh
.
generate
(
3
)
...
...
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