Skip to content
GitLab
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
47282811
Commit
47282811
authored
Jul 27, 2020
by
Praetorius, Simon
Browse files
Merge branch 'issue/neumann_example' into 'master'
reduct compile time in neumann example See merge request
!191
parents
991acbfc
4ae527b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/neumann.cc
View file @
47282811
...
...
@@ -16,6 +16,8 @@
#include
<amdis/ProblemStat.hpp>
#include
<amdis/LocalOperators.hpp>
#define GRID_ID 3
using
namespace
AMDiS
;
template
<
class
Grid
>
...
...
@@ -51,18 +53,19 @@ int main(int argc, char** argv)
{
Environment
env
(
argc
,
argv
);
#if GRID_ID == 0
// 2d grids
Dune
::
YaspGrid
<
2
>
grid0
({
1.0
,
1.0
},{
2
,
2
});
run
(
grid0
);
#endif
#if HAVE_DUNE_SPGRID
#if
GRID_ID == 1 &&
HAVE_DUNE_SPGRID
Dune
::
SPDomain
<
double
,
2
>
domain
({
0.0
,
0.0
},
{
1.0
,
1.0
});
Dune
::
SPGrid
<
double
,
2
>
grid1
(
domain
,
Dune
::
SPMultiIndex
<
2
>
({
2
,
2
}));
run
(
grid1
);
#endif
#if HAVE_DUNE_ALUGRID
#if
GRID_ID == 2 &&
HAVE_DUNE_ALUGRID
using
Grid2
=
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
simplex
,
Dune
::
conforming
>
;
using
Factory2
=
Dune
::
StructuredGridFactory
<
Grid2
>
;
auto
grid2
=
Factory2
::
createSimplexGrid
({
0.0
,
0.0
},
{
1.0
,
1.0
},
...
...
@@ -70,7 +73,7 @@ int main(int argc, char** argv)
run
(
*
grid2
);
#endif
#if HAVE_DUNE_UGGRID
#if
GRID_ID == 3 &&
HAVE_DUNE_UGGRID
using
Grid3
=
Dune
::
UGGrid
<
2
>
;
using
Factory3
=
Dune
::
StructuredGridFactory
<
Grid3
>
;
auto
grid3
=
Factory3
::
createSimplexGrid
({
0.0
,
0.0
},
{
1.0
,
1.0
},
...
...
@@ -78,10 +81,11 @@ int main(int argc, char** argv)
run
(
*
grid3
);
#endif
#if GRID_ID == 4
// 3d grids
Dune
::
YaspGrid
<
3
>
grid4
({
1.0
,
1.0
,
1.0
},{
2
,
2
,
2
});
run
(
grid4
);
#endif
return
0
;
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment