Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuhao Liu
ogs
Commits
dd88ec04
Commit
dd88ec04
authored
4 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[web] GMSH2OGS documentation for -e and -b.
parent
2453d1e2
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
web/content/docs/tools/fileio/GMSH2OGS/extract_boundary.png
+0
-0
0 additions, 0 deletions
web/content/docs/tools/fileio/GMSH2OGS/extract_boundary.png
web/content/docs/tools/fileio/GMSH2OGS/index.md
+67
-0
67 additions, 0 deletions
web/content/docs/tools/fileio/GMSH2OGS/index.md
with
67 additions
and
0 deletions
web/content/docs/tools/fileio/GMSH2OGS/extract_boundary.png
0 → 100644
+
0
−
0
View file @
dd88ec04
38.8 KiB
This diff is collapsed.
Click to expand it.
web/content/docs/tools/fileio/GMSH2OGS/index.md
0 → 100644
+
67
−
0
View file @
dd88ec04
+++
date = "2021-03-06T00:00:00+01:00"
title = "GMSH2OGS"
author = "Dmitri Naumov"
[menu]
[menu.tools]
parent = "Data Import/Export"
+++
## Introduction
Meshes generated with Gmsh can be converted to OGS meshes, in particular to VTU
file format.
Currently, the only supported Gmsh format is 2.1, which can be specified for
example with the command line flag
`-format msh2`
when executing
`gmsh`
.
## Usage
Gmsh writes all elements (unless specified otherwise) including the lower
dimensional elements, usually model boundaries.
Whereas for OGS we separate the so called "bulk" mesh and the boundary (or
subdomain) meshes.
`GMSH2OGS`
options
`-e`
(
`--exclude-lines`
) and
`-b`
(
`--boundaries`
) control
whether the line elements are removed or written in separate files.
## Example
A 2D-mesh with two physical groups (MaterialIDs) was generated with Gmsh.
It also includes the outer boundary and inner boundary line elements.
### Input files and results
All files are stored in
[
Tests/Data/MeshLib/
](
https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/MeshLib
)
:
-
the Gmsh generated mesh
[
A2-gmsh.msh
](
https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/MeshLib/A2-gmsh.msh
)
,
-
and the corresponding result files
[
A2.vtu
](
https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/MeshLib/A2.vtu
)
,
and the boundary meshes
[
A2_0.vtu
](
https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/MeshLib/A2_0.vtu
)
to
[
A2_7.vtu
](
https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/Tests/Data/MeshLib/A2_7.vtu
)
.
### Running GMSH2OGS
`GMSH2OGS`
creates different meshes from the same input depending on the
`-e`
and
`-b`
flags; the results are shown (z-translated) in the figure below.
```
bash
GMSH2OGS
-i
A2-gmsh.msh
-o
A2.vtu
```
-
Conversion without any additional flags yields a single VTU file with
outer and inner boundaries (line elements) included, shown in the very
bottom.
-
Adding only a
`-e`
flag results in a single VTU file, now without the line
elements.
-
Adding only a
`-b`
flag gives a single VTU file as in the first case
*and*
additional eight files, each containing a line-element mesh corresponding to
the physical groups;
these are the white lines in the figure, shown again z-translated.
-
Finally specifying both flags (
`-e`
and
`-b`
) produces a single VTU file
without the line elements and additional eight boundary (subdomain) files.

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