-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding wrappers for parmparse get and query for selected types with t…
…ests Co-authored-by: Edoardo Zoni <ezoni@lbl.gov> Co-authored-by: Axel Huebl <axelhuebl@lbl.gov>
- Loading branch information
1 parent
1992c18
commit 39f7f33
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
param.dt = 1.e-5 | ||
param.ncell = 100 | ||
param.do_pml = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import amrex.space3d as amr | ||
|
||
|
||
def test_parmparse(): | ||
dopml = False | ||
ncell = 10 | ||
dt = 0.0 | ||
# Since ParmParse is done in IO Processors, we need amr.initialize first | ||
amr.initialize([]) | ||
pp = amr.ParmParse("") | ||
pp.addfile("./parmparse_inputs") | ||
pp_param = amr.ParmParse("param") | ||
(_, ncell) = pp_param.query_int("ncell") | ||
dt = pp_param.get_real("dt") | ||
dopml = pp_param.get_bool("do_pml") | ||
assert dopml == True | ||
assert dt == 1.0e-5 | ||
assert ncell == 100 | ||
amr.finalize() |