Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dorie
dorie
Commits
d3f42c97
Commit
d3f42c97
authored
Feb 14, 2019
by
Lukas Riedel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update initial condition unit test
Add test case for initial condition from H5 data file
parent
c1585d84
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
dune/dorie/test/test-initial-condition.cc
dune/dorie/test/test-initial-condition.cc
+9
-0
dune/dorie/test/test-initial-condition.mini.in
dune/dorie/test/test-initial-condition.mini.in
+8
-2
No files found.
dune/dorie/test/test-initial-condition.cc
View file @
d3f42c97
...
...
@@ -72,6 +72,15 @@ void test_ic_base (const std::shared_ptr<typename T::Grid> grid,
};
test_ic_against_function
(
grid
,
ic
,
test_f
);
}
else
if
(
type
==
"file"
)
{
// define testing function
auto
test_f
=
[](
const
auto
e
,
const
auto
x
){
using
Range
=
typename
T
::
Scalar
;
Range
y
=
2.0
;
return
y
;
};
test_ic_against_function
(
grid
,
ic
,
test_f
);
}
}
int
main
(
int
argc
,
char
**
argv
)
...
...
dune/dorie/test/test-initial-condition.mini.in
View file @
d3f42c97
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
__name = ic
_initial_type = linear, data | expand
__name = {_initial_type}
_asset_path = "${PROJECT_SOURCE_DIR}/test"
[grid]
...
...
@@ -14,7 +15,12 @@ extensions = 1 1
file = none
[richards.initial]
type = linear
type = {_initial_type}
quantity = matricHead
headLower = -1.0
headGradient = 2.0
file = ${CMAKE_CURRENT_LIST_DIR}/scaling.h5
dataset = twos
interpolation = nearest
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