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
fe02a5a4
Commit
fe02a5a4
authored
Feb 03, 2020
by
Müller, Felix
Committed by
Praetorius, Simon
Feb 03, 2020
Browse files
Add unused examples to CMakeLists
parent
62bae90e
Changes
6
Hide whitespace changes
Inline
Side-by-side
examples/CMakeLists.txt
View file @
fe02a5a4
add_custom_target
(
examples
)
add_amdis_executable
(
NAME ellipt.2d SOURCES ellipt.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME ellipt.3d SOURCES ellipt.cc DIM 3 DOW 3
)
add_dependencies
(
examples
ellipt.2d
ellipt.3d
)
file
(
MAKE_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/output
)
file
(
COPY
${
CMAKE_CURRENT_SOURCE_DIR
}
/macro DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_amdis_executable
(
NAME heat.2d SOURCES heat.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME heat.3d SOURCES heat.cc DIM 3 DOW 3
)
add_dependencies
(
examples
heat.2d
heat.3d
)
add_custom_target
(
examples
)
add_amdis_executable
(
NAME vecellipt.2d SOURCES vecellipt.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME stokes0.2d SOURCES stokes0.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME stokes1.2d SOURCES stokes1.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME stokes3.2d SOURCES stokes3.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME navier_stokes.2d SOURCES navier_stokes.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME boundary.2d SOURCES boundary.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME convection_diffusion.2d SOURCES convection_diffusion.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME ellipt.2d SOURCES ellipt.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME ellipt.3d SOURCES ellipt.cc DIM 3 DOW 3
)
add_amdis_executable
(
NAME heat.2d SOURCES heat.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME heat.3d SOURCES heat.cc DIM 3 DOW 3
)
add_amdis_executable
(
NAME navier_stokes.2d SOURCES navier_stokes.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME neumann SOURCES neumann.cc
)
add_amdis_executable
(
NAME periodic.2d SOURCES periodic.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME stokes0.2d SOURCES stokes0.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME stokes1.2d SOURCES stokes1.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME stokes3.2d SOURCES stokes3.cc DIM 2 DOW 2
)
add_amdis_executable
(
NAME traversal SOURCES traversal.cc
)
add_amdis_executable
(
NAME treecontainer SOURCES treecontainer.cc
)
add_amdis_executable
(
NAME vecellipt.2d SOURCES vecellipt.cc DIM 2 DOW 2
)
add_dependencies
(
examples
vecellipt.2d
boundary.2d
convection_diffusion.2d
ellipt.2d
ellipt.3d
heat.2d
heat.3d
navier_stokes.2d
neumann
periodic.2d
stokes0.2d
stokes1.2d
stokes3.2d
navier_stokes.2d
convection_diffusion.2d
)
traversal
treecontainer
vecellipt.2d
)
if
(
ALBERTA_FOUND
)
add_amdis_executable
(
NAME cahn_hilliard.2d SOURCES cahn_hilliard.cc DIM 2 DOW 2 ALBERTA_GRID
)
...
...
examples/boundary.cc
View file @
fe02a5a4
...
...
@@ -23,7 +23,7 @@ void run(SetBoundary setBoundary)
{
ElliptProblem
prob
(
"ellipt"
);
prob
.
initialize
(
INIT_ALL
);
setBoundary
(
prob
.
boundaryManager
());
setBoundary
(
*
prob
.
boundaryManager
());
auto
opL
=
makeOperator
(
tag
::
gradtest_gradtrial
{},
1.0
);
prob
.
addMatrixOperator
(
opL
);
...
...
@@ -61,10 +61,10 @@ void run_periodic()
using
Grid
=
Dune
::
YaspGrid
<
2
>
;
#endif
using
Traits
=
LagrangeBasis
<
typename
Grid
::
LeafGridView
,
2
>
;
using
Traits
=
LagrangeBasis
<
Grid
,
2
>
;
ProblemStat
<
Traits
>
prob
(
"ellipt"
,
grid
);
prob
.
initialize
(
INIT_ALL
);
prob
.
boundaryManager
()
.
setBoxBoundary
({
-
1
,
-
1
,
1
,
1
});
prob
.
boundaryManager
()
->
setBoxBoundary
({
-
1
,
-
1
,
1
,
1
});
auto
opL
=
makeOperator
(
tag
::
gradtest_gradtrial
{},
1.0
);
prob
.
addMatrixOperator
(
opL
);
...
...
examples/periodic.cc
View file @
fe02a5a4
...
...
@@ -57,12 +57,12 @@ void run(Grid& grid)
ProblemStat
<
Traits
>
prob
(
"ellipt"
,
grid
);
prob
.
initialize
(
INIT_ALL
);
prob
.
boundaryManager
()
.
setBoxBoundary
({
-
1
,
-
1
,
1
,
1
});
prob
.
boundaryManager
()
->
setBoxBoundary
({
-
1
,
-
1
,
1
,
1
});
print
(
grid
);
using
BC
=
PeriodicBC
<
FieldVector
<
double
,
2
>
,
typename
Traits
::
GlobalBasis
::
MultiIndex
>
;
BC
periodicBC
(
prob
.
boundaryManager
Ptr
(),
-
1
,{{{
1.0
,
0.0
},
{
0.0
,
1.0
}},
{
1.0
,
0.0
}});
BC
periodicBC
(
prob
.
boundaryManager
(),
-
1
,{{{
1.0
,
0.0
},
{
0.0
,
1.0
}},
{
1.0
,
0.0
}});
periodicBC
.
init
(
*
prob
.
globalBasis
(),
*
prob
.
globalBasis
());
std
::
cout
<<
"periodicNodes:
\n
"
;
...
...
examples/surface.cc
View file @
fe02a5a4
...
...
@@ -12,7 +12,7 @@
using
namespace
AMDiS
;
using
Grid
=
Dune
::
FoamGrid
<
2
,
3
>
;
using
Grid
=
Dune
::
FoamGrid
<
GRIDDIM
,
WORLDDIM
>
;
using
Basis
=
LagrangeBasis
<
Grid
,
1
>
;
struct
UnitRadius
...
...
@@ -33,7 +33,7 @@ int main(int argc, char** argv)
std
::
string
gridName
=
Parameters
::
get
<
std
::
string
>
(
"surface->mesh"
).
value
();
std
::
string
gridFileName
=
Parameters
::
get
<
std
::
string
>
(
gridName
+
"->macro file name"
).
value
();
using
Param
=
Parametrization
<
Grid
,
SphereMapping
<
2
,
3
,
UnitRadius
>>
;
using
Param
=
Parametrization
<
Grid
,
SphereMapping
<
GRIDDIM
,
WORLDDIM
,
UnitRadius
>>
;
Dune
::
GridFactory
<
Param
>
gridFactory
;
Dune
::
AlbertaReader
<
Param
>
().
readGrid
(
gridFileName
,
gridFactory
);
std
::
unique_ptr
<
Grid
>
grid
(
gridFactory
.
create
());
...
...
examples/traversal.cc
View file @
fe02a5a4
...
...
@@ -7,8 +7,11 @@
#include <dune/functions/functionspacebases/lagrangebasis.hh>
using
namespace
AMDiS
;
int
main
()
int
main
(
int
argc
,
char
**
argv
)
{
Environment
env
(
argc
,
argv
);
// create grid
Dune
::
YaspGrid
<
2
>
grid
({
1.0
,
1.0
},
{
1
,
1
});
auto
gridView
=
grid
.
leafGridView
();
...
...
@@ -24,6 +27,6 @@ int main()
for_each_leaf_node
(
localView
.
tree
(),
[](
auto
const
&
node
,
auto
const
&
tp
)
{
std
::
cout
<<
node
.
tp
()
<<
std
::
endl
;
std
::
cout
<<
tp
<<
std
::
endl
;
});
}
\ No newline at end of file
}
examples/treecontainer.cc
View file @
fe02a5a4
...
...
@@ -7,8 +7,11 @@
#include <dune/functions/functionspacebases/lagrangebasis.hh>
using
namespace
AMDiS
;
int
main
()
int
main
(
int
argc
,
char
**
argv
)
{
Environment
env
(
argc
,
argv
);
// create grid
Dune
::
YaspGrid
<
2
>
grid
({
1.0
,
1.0
},
{
1
,
1
});
auto
gridView
=
grid
.
leafGridView
();
...
...
@@ -25,4 +28,4 @@ int main()
auto
container
=
makeTreeContainer
<
double
>
(
localView
.
tree
());
auto
container2
=
makeTreeContainer
(
localView
.
tree
(),
[
&
](
auto
const
&
node
)
{
return
makeTreeContainer
<
double
>
(
localView
.
tree
());
});
}
\ No newline at end of file
}
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