Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Karsten Rink
ogs
Commits
4792e6c5
Commit
4792e6c5
authored
Nov 04, 2020
by
Karsten Rink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switching to gmsh vtk output when creating geometry surfaces
parent
84367096
Pipeline
#1956
passed with stages
in 49 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
Applications/FileIO/Legacy/createSurface.cpp
Applications/FileIO/Legacy/createSurface.cpp
+5
-7
No files found.
Applications/FileIO/Legacy/createSurface.cpp
View file @
4792e6c5
...
...
@@ -18,7 +18,6 @@
#include "filesystem.h"
#include "Applications/FileIO/Gmsh/GMSHInterface.h"
#include "Applications/FileIO/Gmsh/GmshReader.h"
#include "BaseLib/StringTools.h"
...
...
@@ -28,6 +27,7 @@
#include "GeoLib/Polyline.h"
#include "GeoLib/Surface.h"
#include "MeshLib/IO/readMeshFromFile.h"
#include "MeshLib/convertMeshToGeo.h"
#include "MeshLib/Mesh.h"
...
...
@@ -83,11 +83,10 @@ bool createSurface(GeoLib::Polyline const& ply,
auto
msh_file
=
fs
::
temp_directory_path
()
/=
BaseLib
::
randomString
(
32
);
gmsh_io
.
writeToFile
(
geo_file
.
string
());
// Newer gmsh versions write a newer file format for meshes per default. At
// the moment we can't read this new format. This is a switch for gmsh to
// write the 'old' file format.
// Using GMSH's vtk output here so we don't have to deal with GMSH and it's
// various file format versions here
std
::
string
gmsh_command
=
"
\"
"
+
gmsh_binary
+
"
\"
-2 -algo meshadapt -format
msh22
-o "
"
\"
"
+
gmsh_binary
+
"
\"
-2 -algo meshadapt -format
vtk
-o "
+
msh_file
.
string
()
+
" "
+
geo_file
.
string
();
int
const
gmsh_return_value
=
std
::
system
(
gmsh_command
.
c_str
());
...
...
@@ -96,8 +95,7 @@ bool createSurface(GeoLib::Polyline const& ply,
WARN
(
"Call to '{:s}' returned non-zero value {:d}."
,
gmsh_command
,
gmsh_return_value
);
}
auto
surface_mesh
=
FileIO
::
GMSH
::
readGMSHMesh
(
msh_file
.
string
());
auto
surface_mesh
=
MeshLib
::
IO
::
readMeshFromFile
(
msh_file
.
string
());
if
(
!
surface_mesh
)
{
WARN
(
"The surface mesh could not be created."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment