Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
a2d00812
Commit
a2d00812
authored
Sep 06, 2020
by
Praetorius, Simon
Browse files
Add Vtk reader and Gmsh4 reader
parent
b1c86771
Changes
1
Hide whitespace changes
Inline
Side-by-side
amdis/MeshCreator.hpp
View file @
a2d00812
...
...
@@ -12,9 +12,20 @@
#if HAVE_ALBERTA
#include
<dune/grid/albertagrid/albertareader.hh>
#endif
#include
<dune/grid/io/file/gmshreader.hh>
#include
<dune/grid/utility/structuredgridfactory.hh>
#if HAVE_DUNE_VTK
#include
<dune/vtk/vtkreader.hh>
#include
<dune/vtk/gridcreators/lagrangegridcreator.hh>
#endif
#if HAVE_DUNE_GMSH4
#include
<dune/gmsh4/gmsh4reader.hh>
#include
<dune/gmsh4/gridcreators/lagrangegridcreator.hh>
#endif
#include
<amdis/AdaptiveGrid.hpp>
#include
<amdis/Initfile.hpp>
#include
<amdis/Output.hpp>
...
...
@@ -166,7 +177,16 @@ namespace AMDiS
auto
ext
=
fn
.
extension
();
if
(
ext
==
".msh"
)
{
#if HAVE_DUNE_GMSH4
if
(
Dune
::
Gmsh4
::
fileVersion
(
filename
)[
0
]
>=
4
)
return
Dune
::
Gmsh4Reader
<
HostGrid
,
Dune
::
Gmsh4
::
LagrangeGridCreator
<
HostGrid
>>::
createGridFromFile
(
filename
);
else
#else
return
read_gmsh_file
<
HostGrid
>
(
filename
,
Dune
::
PriorityTag
<
42
>
{});
#endif
}
else
if
(
ext
==
".vtu"
)
{
return
Dune
::
VtkReader
<
HostGrid
,
Dune
::
Vtk
::
LagrangeGridCreator
<
HostGrid
>>::
createGridFromFile
(
filename
);
}
else
if
(
ext
==
".1d"
||
ext
==
".2d"
||
ext
==
".3d"
||
ext
==
".amc"
)
{
return
read_alberta_file
<
HostGrid
>
(
filename
,
Dune
::
PriorityTag
<
42
>
{});
...
...
Write
Preview
Supports
Markdown
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