Peano
Loading...
Searching...
No Matches
amr-study Namespace Reference

Functions

 run (str work_directory, int levels, arguments)
 Generate, build and run the benchmark with the given number of AMR levels.
 mesh_over_time (str run_directory)
 Number of leaf cells after each time step.
 final_solution (str run_directory, int volumes_per_axis)
 Last snapshot, injected piecewise constant onto the regular grid.

Variables

 HERE = os.path.dirname(os.path.abspath(__file__))
str SOLVER_NAME = "EulerPointSource"
int VOLUMES_PER_PATCH_AXIS = 9
 parser = argparse.ArgumentParser(description=__doc__.strip().split("\n")[0])
 required
 True
 help
 type
 default
 float
 args = parser.parse_args()
int volumes_per_axis = args.patch_count * VOLUMES_PER_PATCH_AXIS
list extra
 work_directory
 exist_ok
 regular = run(args.work_directory, 0, extra)
 adaptive = run(args.work_directory, args.amr_levels, extra)
int start_cells = args.patch_count**2
 timeline = mesh_over_time(adaptive)
int previous = start_cells
 last_printed = None
int coarsened = 0
tuple delta = (cells - previous) * VOLUMES_PER_PATCH_AXIS**2
 _
 reference
 reference_cells
 time_stamp
 solution
 cells
list failures = []
 difference = np.abs(solution[unknown] - reference[unknown])
 value_range = np.nanmax(reference[unknown]) - np.nanmin(reference[unknown])
 maximum = np.nanmax(difference)
 rms = math.sqrt(np.nanmean(difference**2))

Function Documentation

◆ final_solution()

amr-study.final_solution ( str run_directory,
int volumes_per_axis )

Last snapshot, injected piecewise constant onto the regular grid.

Returns
(float, np.ndarray, int) Time stamp, array [unknown][y][x] and the number of mesh cells of the snapshot.

Definition at line 112 of file amr-study.py.

◆ mesh_over_time()

amr-study.mesh_over_time ( str run_directory)

Number of leaf cells after each time step.

Returns
[(float, int)] Time stamp and number of cells per time step.

Definition at line 88 of file amr-study.py.

References float.

◆ run()

amr-study.run ( str work_directory,
int levels,
arguments )

Generate, build and run the benchmark with the given number of AMR levels.

Parameters
work_directorystr Directory of all runs. The run of the AMR levels lives in a directory of its own.
levelsint Number of AMR levels.
arguments[str] Further arguments of point-source.py.
Returns
str The run directory.

Definition at line 38 of file amr-study.py.

Variable Documentation

◆ _

amr-study._
protected

Definition at line 207 of file amr-study.py.

◆ adaptive

amr-study.adaptive = run(args.work_directory, args.amr_levels, extra)

Definition at line 184 of file amr-study.py.

◆ args

amr-study.args = parser.parse_args()

Definition at line 171 of file amr-study.py.

◆ cells

amr-study.cells

Definition at line 208 of file amr-study.py.

◆ coarsened

int amr-study.coarsened = 0

Definition at line 195 of file amr-study.py.

◆ default

amr-study.default

Definition at line 153 of file amr-study.py.

◆ delta

tuple amr-study.delta = (cells - previous) * VOLUMES_PER_PATCH_AXIS**2

Definition at line 197 of file amr-study.py.

◆ difference

amr-study.difference = np.abs(solution[unknown] - reference[unknown])

Definition at line 224 of file amr-study.py.

◆ exist_ok

amr-study.exist_ok

Definition at line 182 of file amr-study.py.

◆ extra

list amr-study.extra
Initial value:
1= [
2 "--volume-size",
3 str(1.001 / volumes_per_axis),
4 "--end-time",
5 str(args.end_time),
6 "--plots",
7 "5",
8 ]

Definition at line 174 of file amr-study.py.

◆ failures

list amr-study.failures = []

Definition at line 209 of file amr-study.py.

◆ float

amr-study.float

Definition at line 163 of file amr-study.py.

Referenced by mesh_over_time().

◆ help

amr-study.help

Definition at line 148 of file amr-study.py.

◆ HERE

amr-study.HERE = os.path.dirname(os.path.abspath(__file__))

Definition at line 33 of file amr-study.py.

◆ last_printed

amr-study.last_printed = None

Definition at line 194 of file amr-study.py.

◆ maximum

amr-study.maximum = np.nanmax(difference)

Definition at line 226 of file amr-study.py.

◆ parser

amr-study.parser = argparse.ArgumentParser(description=__doc__.strip().split("\n")[0])

Definition at line 146 of file amr-study.py.

◆ previous

amr-study.previous = start_cells

Definition at line 193 of file amr-study.py.

◆ reference

amr-study.reference

Definition at line 207 of file amr-study.py.

◆ reference_cells

amr-study.reference_cells

Definition at line 207 of file amr-study.py.

◆ regular

amr-study.regular = run(args.work_directory, 0, extra)

Definition at line 183 of file amr-study.py.

◆ required

amr-study.required

Definition at line 148 of file amr-study.py.

◆ rms

amr-study.rms = math.sqrt(np.nanmean(difference**2))

Definition at line 227 of file amr-study.py.

◆ solution

amr-study.solution

Definition at line 208 of file amr-study.py.

◆ SOLVER_NAME

str amr-study.SOLVER_NAME = "EulerPointSource"

Definition at line 34 of file amr-study.py.

◆ start_cells

int amr-study.start_cells = args.patch_count**2

Definition at line 186 of file amr-study.py.

◆ time_stamp

amr-study.time_stamp

Definition at line 208 of file amr-study.py.

◆ timeline

amr-study.timeline = mesh_over_time(adaptive)

Definition at line 187 of file amr-study.py.

◆ True

amr-study.True

Definition at line 148 of file amr-study.py.

◆ type

amr-study.type

Definition at line 152 of file amr-study.py.

◆ value_range

amr-study.value_range = np.nanmax(reference[unknown]) - np.nanmin(reference[unknown])

Definition at line 225 of file amr-study.py.

◆ volumes_per_axis

int amr-study.volumes_per_axis = args.patch_count * VOLUMES_PER_PATCH_AXIS

Definition at line 173 of file amr-study.py.

◆ VOLUMES_PER_PATCH_AXIS

int amr-study.VOLUMES_PER_PATCH_AXIS = 9

Definition at line 35 of file amr-study.py.

◆ work_directory

amr-study.work_directory

Definition at line 182 of file amr-study.py.