Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amdis-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amdis
amdis-core
Commits
77862e92
Commit
77862e92
authored
Sep 06, 2020
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/more_file_readers' into 'master'
Add Vtk reader and Gmsh4 reader See merge request
!207
parents
e9783dc3
103e3026
Pipeline
#4711
passed with stage
in 45 minutes and 15 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
amdis/MeshCreator.hpp
amdis/MeshCreator.hpp
+22
-0
No files found.
amdis/MeshCreator.hpp
View file @
77862e92
...
...
@@ -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,8 +177,19 @@ 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
}
#if HAVE_DUNE_VTK
else
if
(
ext
==
".vtu"
)
{
return
Dune
::
VtkReader
<
HostGrid
,
Dune
::
Vtk
::
LagrangeGridCreator
<
HostGrid
>>::
createGridFromFile
(
filename
);
}
#endif
else
if
(
ext
==
".1d"
||
ext
==
".2d"
||
ext
==
".3d"
||
ext
==
".amc"
)
{
return
read_alberta_file
<
HostGrid
>
(
filename
,
Dune
::
PriorityTag
<
42
>
{});
}
...
...
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