|
Peano
|
Variables | |
| parser = argparse.ArgumentParser(description="SPH benchmarking script") | |
| Parse user input. | |
| dest | |
| type | |
| int | |
| default | |
| help | |
| action | |
| choices | |
| args = parser.parse_args() | |
| nneigh = args.nneigh | |
| kernel = args.kernel | |
| h_tol = args.h_tol | |
| list | project_namespace = ["tests", "exaparty", "testSML1D"] |
| Generate ExaParty project. | |
| project | |
| float | cfl_factor = 0.2 |
| float | init_dt = 1.0e-16 |
| list | offset = [0, 0, 0] |
| list | domain_size = [1, 1, 1] |
| list | periodic_boundary_conditions = [False, False, False] |
| str | name = "HydroPart" |
| int | dimensions = 2 |
| int | hydro_dimensions = 1 |
| particle | |
| int | HYDRO_DIMENSIONS = hydro_dimensions |
| Set parameters for the SPH simulation If no parameters are passed to the exaparty project, it initializes with default values. | |
| hfile = h5py.File(args.ic_filename, "r") | |
| header = hfile["Header"] | |
| npart = header.attrs["NumPart_ThisFile"][0] | |
| npart_base = header.attrs["NumPart_base"][0] | |
| HYDRO_PART_NUMBER = npart | |
| float | GLOBAL_TIME_STEP_SIZE = init_dt |
| float | CFL_CONSTANT = cfl_factor |
| list | gamma_hydro_list = [str(5 / 3), str(7 / 5), str(4 / 3), str(2 / 1)] |
| list | gamma_hydro_list_symbols |
| list | GAMMA = gamma_hydro_list[0] |
| list | GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0] |
| KERNEL_SYMBOL = exaparty.api.sphtools.sph_kernel_macro_name[kernel] | |
| list | dx = domain_size[0] / npart_base |
| int | hydro_H_max = 20 * dx |
| hydro_h_max | |
| h_hydro_max | |
| eta_factor | |
| ndim | |
| h_hydro_min | |
| h_max_iterations | |
| h_tolerance | |
| particle_set = project.add_particle_species(particle) | |
| build_mode = peano4.api.output.CompileMode.DEBUG | |
| min_end_time | |
| max_end_time | |
| first_plot_time_stamp | |
| time_in_between_plots | |
| periodic_BC | |
| plotter_precision | |
| particle_plotter | |
| Set up the plotter. | |
| peano4_project = project.generate_Peano4_project(verbose=args.verbose) | |
| Generate plain Peano 4 project. | |
| list | dirs = ["vertexdata/", "repositories/", "globaldata/", "observers/"] |
| Cleanup and compilation. | |
| overwrite | |
| Always | |
| throw_away_data_after_generation | |
| make_clean_first | |
| True | |
| number_of_parallel_builds | |
| list | output_files |
| test_smoothing_length_computation_1D.action |
Definition at line 26 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.Always |
Definition at line 358 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.args = parser.parse_args() |
Definition at line 101 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.build_mode = peano4.api.output.CompileMode.DEBUG |
Definition at line 218 of file test_smoothing_length_computation_1D.py.
| float test_smoothing_length_computation_1D.CFL_CONSTANT = cfl_factor |
Definition at line 167 of file test_smoothing_length_computation_1D.py.
| float test_smoothing_length_computation_1D.cfl_factor = 0.2 |
Definition at line 116 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.choices |
Definition at line 98 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.default |
Definition at line 20 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.dest |
Definition at line 20 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.dimensions = 2 |
Definition at line 130 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.dirs = ["vertexdata/", "repositories/", "globaldata/", "observers/"] |
Cleanup and compilation.
Definition at line 351 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.domain_size = [1, 1, 1] |
Definition at line 120 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.dx = domain_size[0] / npart_base |
Definition at line 184 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.eta_factor |
Definition at line 194 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.first_plot_time_stamp |
Definition at line 231 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.GAMMA = gamma_hydro_list[0] |
Definition at line 177 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.gamma_hydro_list = [str(5 / 3), str(7 / 5), str(4 / 3), str(2 / 1)] |
Definition at line 170 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.gamma_hydro_list_symbols |
Definition at line 171 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0] |
Definition at line 178 of file test_smoothing_length_computation_1D.py.
| float test_smoothing_length_computation_1D.GLOBAL_TIME_STEP_SIZE = init_dt |
Definition at line 166 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.h_hydro_max |
Definition at line 189 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.h_hydro_min |
Definition at line 198 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.h_max_iterations |
Definition at line 199 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.h_tol = args.h_tol |
Definition at line 104 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.h_tolerance |
Definition at line 200 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.header = hfile["Header"] |
Definition at line 159 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.help |
Definition at line 20 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.hfile = h5py.File(args.ic_filename, "r") |
Definition at line 158 of file test_smoothing_length_computation_1D.py.
| int test_smoothing_length_computation_1D.hydro_dimensions = 1 |
Definition at line 131 of file test_smoothing_length_computation_1D.py.
| int test_smoothing_length_computation_1D.HYDRO_DIMENSIONS = hydro_dimensions |
Set parameters for the SPH simulation If no parameters are passed to the exaparty project, it initializes with default values.
The values of the parameters can be modified or retrieved using the set/get methods.
Definition at line 155 of file test_smoothing_length_computation_1D.py.
Definition at line 185 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.hydro_h_max |
Definition at line 186 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.HYDRO_PART_NUMBER = npart |
Definition at line 163 of file test_smoothing_length_computation_1D.py.
| float test_smoothing_length_computation_1D.init_dt = 1.0e-16 |
Definition at line 117 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.int |
Definition at line 20 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.kernel = args.kernel |
Definition at line 103 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.KERNEL_SYMBOL = exaparty.api.sphtools.sph_kernel_macro_name[kernel] |
Definition at line 181 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.make_clean_first |
Definition at line 360 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.max_end_time |
Definition at line 230 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.min_end_time |
Definition at line 229 of file test_smoothing_length_computation_1D.py.
| str test_smoothing_length_computation_1D.name = "HydroPart" |
Definition at line 128 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.ndim |
Definition at line 195 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.nneigh = args.nneigh |
Definition at line 102 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.npart = header.attrs["NumPart_ThisFile"][0] |
Definition at line 160 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.npart_base = header.attrs["NumPart_base"][0] |
Definition at line 161 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.number_of_parallel_builds |
Definition at line 360 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.offset = [0, 0, 0] |
Definition at line 119 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.output_files |
Definition at line 363 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.overwrite |
Definition at line 358 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.parser = argparse.ArgumentParser(description="SPH benchmarking script") |
Parse user input.
Definition at line 18 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.particle |
Definition at line 133 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.particle_plotter |
Set up the plotter.
A plotter has to be told explicitly which data to visualisation. We visualise the velocity here as scalar attribute. To some degree, this is redundant info as we implicitly have the position of the particle and can "see" its velocity when we play through a movie. But the explicit visualisation shows how to handle attributes per particle.
When we create the plotter, we have to inform it how to enumerate the individual snapshots. Obviously, we can just count through the snapshots. In this case, you have to pass the constant peano4.api.toolbox.particles.PlotParticlesInVTKFormat.CountTimeSteps into the field time_stamp_evaluation. You can also define your own time stamp. For this, it is useful to know that each particle definition in the Python script will yield a particle class with the same name in the subnamespace globaldata. Every particle class in return has a class attribute
getSpecies()
which returns an object that holds global information about this particle type.
Definition at line 279 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.particle_set = project.add_particle_species(particle) |
Definition at line 215 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.peano4_project = project.generate_Peano4_project(verbose=args.verbose) |
Generate plain Peano 4 project.
The value of some constants such as the adiabatic index cannot be arbitrary but rather we have a set of pre-defined options. The same happens for some functions, e.g. the SPH smoothing kernel. This allows us to define some symbols and fix the values at compile time.
Definition at line 309 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.periodic_BC |
Definition at line 233 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.periodic_boundary_conditions = [False, False, False] |
Definition at line 121 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.plotter_precision |
Definition at line 234 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.project |
Definition at line 112 of file test_smoothing_length_computation_1D.py.
| list test_smoothing_length_computation_1D.project_namespace = ["tests", "exaparty", "testSML1D"] |
Generate ExaParty project.
Definition at line 110 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.throw_away_data_after_generation |
Definition at line 358 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.time_in_between_plots |
Definition at line 232 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.True |
Definition at line 360 of file test_smoothing_length_computation_1D.py.
| test_smoothing_length_computation_1D.type |
Definition at line 20 of file test_smoothing_length_computation_1D.py.