diff options
Diffstat (limited to 'Examples/Tests')
35 files changed, 15 insertions, 657 deletions
diff --git a/Examples/Tests/Langmuir/langmuir2d_PICMI.py b/Examples/Tests/Langmuir/PICMI_inputs_langmuir2d.py index 8cbc63e50..cd33d20f0 100644 --- a/Examples/Tests/Langmuir/langmuir2d_PICMI.py +++ b/Examples/Tests/Langmuir/PICMI_inputs_langmuir2d.py @@ -40,5 +40,5 @@ sim.add_species(electrons, layout=picmi.GriddedLayout(n_macroparticle_per_cell=[ sim.write_input_file(file_name='inputs2d_from_PICMI') # Alternatively, sim.step will run WarpX, controlling it from Python -#sim.step() +sim.step() diff --git a/Examples/Tests/Langmuir/langmuir_PICMI_rt.py b/Examples/Tests/Langmuir/PICMI_inputs_langmuir_rt.py index ae6731c05..ae6731c05 100644 --- a/Examples/Tests/Langmuir/langmuir_PICMI_rt.py +++ b/Examples/Tests/Langmuir/PICMI_inputs_langmuir_rt.py diff --git a/Examples/Tests/Langmuir/langmuir_PICMI_rz.py b/Examples/Tests/Langmuir/PICMI_inputs_langmuir_rz.py index 699b7e3d9..699b7e3d9 100644 --- a/Examples/Tests/Langmuir/langmuir_PICMI_rz.py +++ b/Examples/Tests/Langmuir/PICMI_inputs_langmuir_rz.py diff --git a/Examples/Tests/Langmuir/langmuir_PICMI_rz_multimode_analyze.py b/Examples/Tests/Langmuir/PICMI_inputs_langmuir_rz_multimode_analyze.py index 7f853a1f5..00e54be3e 100644 --- a/Examples/Tests/Langmuir/langmuir_PICMI_rz_multimode_analyze.py +++ b/Examples/Tests/Langmuir/PICMI_inputs_langmuir_rz_multimode_analyze.py @@ -79,7 +79,7 @@ sim = picmi.Simulation(solver = solver, verbose = 1, warpx_plot_int = 40, warpx_current_deposition_algo = 'esirkepov', - warpx_field_gathering_algo = 'standard', + warpx_field_gathering_algo = 'energy-conserving', warpx_particle_pusher_algo = 'boris') sim.add_species(electrons, layout=picmi.GriddedLayout(n_macroparticle_per_cell=[2,16,2], grid=grid)) diff --git a/Examples/Tests/Langmuir/langmuir_analysis.py b/Examples/Tests/Langmuir/analysis_langmuir.py index 2ffb7f56b..2ffb7f56b 100755 --- a/Examples/Tests/Langmuir/langmuir_analysis.py +++ b/Examples/Tests/Langmuir/analysis_langmuir.py diff --git a/Examples/Tests/Langmuir/langmuir2d_analysis.py b/Examples/Tests/Langmuir/analysis_langmuir2d.py index d43134115..d43134115 100755 --- a/Examples/Tests/Langmuir/langmuir2d_analysis.py +++ b/Examples/Tests/Langmuir/analysis_langmuir2d.py diff --git a/Examples/Tests/Langmuir/langmuir_multi_analysis.py b/Examples/Tests/Langmuir/analysis_langmuir_multi.py index 890320be8..890320be8 100755 --- a/Examples/Tests/Langmuir/langmuir_multi_analysis.py +++ b/Examples/Tests/Langmuir/analysis_langmuir_multi.py diff --git a/Examples/Tests/Langmuir/langmuir_multi_2d_analysis.py b/Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py index 169c56e7b..169c56e7b 100755 --- a/Examples/Tests/Langmuir/langmuir_multi_2d_analysis.py +++ b/Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py diff --git a/Examples/Tests/Langmuir/langmuir_multi_rz_analysis.py b/Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py index 2ff30eb5e..2ff30eb5e 100755 --- a/Examples/Tests/Langmuir/langmuir_multi_rz_analysis.py +++ b/Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py diff --git a/Examples/Tests/Langmuir/inputs.2d.rz b/Examples/Tests/Langmuir/inputs.2d.rz deleted file mode 100644 index 70850eea6..000000000 --- a/Examples/Tests/Langmuir/inputs.2d.rz +++ /dev/null @@ -1,55 +0,0 @@ -# Maximum number of time steps -max_step = 100 - -# number of grid points -amr.n_cell = 64 64 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 32 -amr.blocking_factor = 32 32 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 - -amr.plot_int = 1 # How often to write plotfiles. "<= 0" means no plotfiles. - -# Geometry -geometry.coord_sys = 1 # 1: RZ -geometry.is_periodic = 0 1 -geometry.prob_lo = 0.e0 -2e-05 # physical domain, rmin zmin -geometry.prob_hi = 2e-05 2e-05 # rmax zmax - -# Verbosity -warpx.verbose = 1 -warpx.do_moving_window = 0 -warpx.moving_window_dir = z -warpx.moving_window_v = 0.0 # in units of the speed of light - -# Algorithms -algo.current_deposition = direct -interpolation.nox = 1 -interpolation.noy = 1 -interpolation.noz = 1 - -# CFL -warpx.cfl = 1.0 - -particles.nspecies = 1 -particles.species_names = electrons - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "NUniformPerCell" -electrons.num_particles_per_cell_each_dim = 2 1 2 - -electrons.zmax = 0.0 - -electrons.profile = constant -electrons.density = 1.e25 # number of electrons per m^3 - -electrons.momentum_distribution_type = "constant" -electrons.ux = 0.0 -electrons.uy = 0.0 -electrons.uz = 0.1 -electrons.radially_weighted = true # Only true is supported diff --git a/Examples/Tests/Langmuir/inputs.lb b/Examples/Tests/Langmuir/inputs.lb deleted file mode 100644 index 73ededb23..000000000 --- a/Examples/Tests/Langmuir/inputs.lb +++ /dev/null @@ -1,59 +0,0 @@ -# Maximum number of time steps -max_step = 400 -max_step = 10 - -# number of grid points -amr.n_cell = 16 16 8 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 8 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 - -amr.plot_int = 1 # How often to write plotfiles. "<= 0" means no plotfiles. -amr.check_int = -1 # How often to write checkpoint files. "<= 0" means no plotfiles. - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 1 # Is periodic? -geometry.prob_lo = -20.e-6 -20.e-6 -20.e-6 # physical domain -geometry.prob_hi = 20.e-6 20.e-6 20.e-6 - -# Verbosity -warpx.verbose = 1 - -warpx.do_moving_window = 0 -warpx.moving_window_dir = 0 -warpx.moving_window_v = 0.0 # in units of the speed of light - -# Dynamic Load Balancing -warpx.regrid_int = 1 - -# Algorithms -algo.current_deposition = direct - -# CFL -warpx.cfl = 1.0 - -particles.nspecies = 1 -particles.species_names = electrons - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "NUniformPerCell" -electrons.num_particles_per_cell_each_dim = 2 2 2 - -electrons.xmin = -20.e-6 -electrons.xmax = 0.e-6 -electrons.ymin = -20.e-6 -electrons.ymax = 20.e-6 -electrons.zmin = -20.e-6 -electrons.zmax = 20.e-6 - -electrons.profile = constant -electrons.density = 1.e25 # number of electrons per m^3 - -electrons.momentum_distribution_type = "constant" -electrons.ux = 1.0 # ux = gamma*beta_x diff --git a/Examples/Tests/Langmuir/inputs.multi.2d.rt b/Examples/Tests/Langmuir/inputs.multi.2d.rt index 54d4e2c16..c0b0b1286 100644 --- a/Examples/Tests/Langmuir/inputs.multi.2d.rt +++ b/Examples/Tests/Langmuir/inputs.multi.2d.rt @@ -25,7 +25,7 @@ warpx.serialize_ics = 1 warpx.verbose = 1 # Algorithms -algo.field_gathering = standard +algo.field_gathering = energy-conserving # Interpolation interpolation.nox = 1 diff --git a/Examples/Tests/Langmuir/inputs.multi.rt b/Examples/Tests/Langmuir/inputs.multi.rt index 0dd0da3b8..00d82cc3b 100644 --- a/Examples/Tests/Langmuir/inputs.multi.rt +++ b/Examples/Tests/Langmuir/inputs.multi.rt @@ -27,7 +27,7 @@ warpx.verbose = 1 # Algorithms algo.current_deposition = direct -algo.field_gathering = standard +algo.field_gathering = energy-conserving # Interpolation interpolation.nox = 1 diff --git a/Examples/Tests/Langmuir/inputs.multi.rz.rt b/Examples/Tests/Langmuir/inputs.multi.rz.rt index c2d5de756..9e76d4b26 100644 --- a/Examples/Tests/Langmuir/inputs.multi.rz.rt +++ b/Examples/Tests/Langmuir/inputs.multi.rz.rt @@ -26,7 +26,7 @@ warpx.serialize_ics = 1 warpx.verbose = 1 # Algorithms -algo.field_gathering = standard +algo.field_gathering = energy-conserving algo.current_deposition = esirkepov # Interpolation diff --git a/Examples/Tests/Langmuir/inputs.nolb b/Examples/Tests/Langmuir/inputs.nolb deleted file mode 100644 index 6ac0629cb..000000000 --- a/Examples/Tests/Langmuir/inputs.nolb +++ /dev/null @@ -1,59 +0,0 @@ -# Maximum number of time steps -max_step = 400 -max_step = 10 - -# number of grid points -amr.n_cell = 16 16 8 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 8 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 - -amr.plot_int = 1 # How often to write plotfiles. "<= 0" means no plotfiles. -amr.check_int = -1 # How often to write checkpoint files. "<= 0" means no plotfiles. - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 1 # Is periodic? -geometry.prob_lo = -20.e-6 -20.e-6 -20.e-6 # physical domain -geometry.prob_hi = 20.e-6 20.e-6 20.e-6 - -# Verbosity -warpx.verbose = 1 - -warpx.do_moving_window = 0 -warpx.moving_window_dir = 0 -warpx.moving_window_v = 0.0 # in units of the speed of light - -# Dynamic Load Balancing -warpx.regrid_int = -1 - -# Algorithms -algo.current_deposition = direct - -# CFL -warpx.cfl = 1.0 - -particles.nspecies = 1 -particles.species_names = electrons - -electrons.charge = -q_e -electrons.mass = m_e -electrons.injection_style = "NUniformPerCell" -electrons.num_particles_per_cell_each_dim = 2 2 2 - -electrons.xmin = -20.e-6 -electrons.xmax = 0.e-6 -electrons.ymin = -20.e-6 -electrons.ymax = 20.e-6 -electrons.zmin = -20.e-6 -electrons.zmax = 20.e-6 - -electrons.profile = constant -electrons.density = 1.e25 # number of electrons per m^3 - -electrons.momentum_distribution_type = "constant" -electrons.ux = 1.0 # ux = gamma*beta_x diff --git a/Examples/Tests/Langmuir/inputs.rt b/Examples/Tests/Langmuir/inputs.rt index 28602f758..bd1162972 100644 --- a/Examples/Tests/Langmuir/inputs.rt +++ b/Examples/Tests/Langmuir/inputs.rt @@ -25,7 +25,7 @@ warpx.serialize_ics = 1 warpx.verbose = 1 # Algorithms -algo.field_gathering = standard +algo.field_gathering = energy-conserving algo.particle_pusher = "higuera" # Interpolation diff --git a/Examples/Tests/Langmuir/langmuir_PICMI.py b/Examples/Tests/Langmuir/langmuir_PICMI.py deleted file mode 100644 index ea1c93ba3..000000000 --- a/Examples/Tests/Langmuir/langmuir_PICMI.py +++ /dev/null @@ -1,52 +0,0 @@ -# --- Simple example of Langmuir oscillations in a uniform plasma - -import numpy as np -from pywarpx import picmi - -constants = picmi.constants - -nx = 64 -ny = 64 -nz = 64 - -xmin = -20.e-6 -ymin = -20.e-6 -zmin = -20.e-6 -xmax = +20.e-6 -ymax = +20.e-6 -zmax = +20.e-6 - -uniform_plasma = picmi.UniformDistribution(density = 1.e25, - upper_bound = [0., None, None], - directed_velocity = [0.1*constants.c, 0., 0.]) - -electrons = picmi.Species(particle_type='electron', name='electrons', initial_distribution=uniform_plasma) - -grid = picmi.Cartesian3DGrid(number_of_cells = [nx, ny, nz], - lower_bound = [xmin, ymin, zmin], - upper_bound = [xmax, ymax, zmax], - lower_boundary_conditions = ['periodic', 'periodic', 'periodic'], - upper_boundary_conditions = ['periodic', 'periodic', 'periodic'], - moving_window_velocity = [0., 0., 0.], - warpx_max_grid_size=32) - -solver = picmi.ElectromagneticSolver(grid=grid, cfl=1.) - -sim = picmi.Simulation(solver = solver, - max_steps = 40, - verbose = 1, - warpx_plot_int = 1, - warpx_current_deposition_algo = 'direct', - warpx_charge_deposition_algo = 'standard', - warpx_field_gathering_algo = 'standard', - warpx_particle_pusher_algo = 'boris') - -sim.add_species(electrons, layout=picmi.GriddedLayout(n_macroparticle_per_cell=[2,2,2], grid=grid)) - -# write_inputs will create an inputs file that can be used to run -# with the compiled version. -sim.write_input_file(file_name='inputs_from_PICMI') - -# Alternatively, sim.step will run WarpX, controlling it from Python -sim.step() - diff --git a/Examples/Tests/Larmor/inputs b/Examples/Tests/Larmor/inputs deleted file mode 100644 index d7c66477c..000000000 --- a/Examples/Tests/Larmor/inputs +++ /dev/null @@ -1,77 +0,0 @@ -# Maximum number of time steps -max_step = 200 - -# number of grid points -amr.n_cell = 32 32 - -# The lo and hi ends of grids are multipliers of blocking factor -amr.blocking_factor = 16 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 64 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 0 - -warpx.fine_tag_lo = -0.8 -0.8 -warpx.fine_tag_hi = 0.8 0.8 - -amr.plot_int = 1 # How often to write plotfiles. "<= 0" means no plotfiles. - -warpx.plot_raw_fields = 1 -warpx.plot_finepatch = 1 -warpx.plot_crsepatch = 1 -warpx.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz part_per_cell divE divB - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 0 0 0 # Is periodic? -geometry.prob_lo = -2.0 -2.0 # physical domain -geometry.prob_hi = 2.0 2.0 - -# PML -warpx.do_pml = 1 -warpx.pml_ncell = 10 - -warpx.B_external_particle = 0.0 0.00078110417851950768 0.0 - -# Verbosity -warpx.verbose = 1 - -# Algorithms - -# CFL -warpx.cfl = 1.0 - -# particles -particles.nspecies = 2 -particles.species_names = electron positron - -particles.nspecies = 1 -particles.species_names = electron - -electron.charge = -q_e -electron.mass = m_e -electron.injection_style = "SingleParticle" -electron.single_particle_pos = 0.0 0.0 -1.25 -electron.single_particle_vel = -0.45825756949558416 0.0 0.0 # gamma*beta - -positron.charge = q_e -positron.mass = m_e -positron.injection_style = "SingleParticle" -positron.single_particle_pos = 0.0 0.0 -1.25 -positron.single_particle_vel = 0.45825756949558416 0.0 0.0 # gamma*beta - -electron.single_particle_weight = 1.0e12 -positron.single_particle_weight = 1.0e12 - -# interpolation -interpolation.nox = 3 -interpolation.noy = 3 -interpolation.noz = 3 - -# Moving window -warpx.do_moving_window = 0 - -warpx.do_dive_cleaning = 1 diff --git a/Examples/Tests/Larmor/inputs.ml b/Examples/Tests/Larmor/inputs.mr index c3ddf597d..30166a3d6 100644 --- a/Examples/Tests/Larmor/inputs.ml +++ b/Examples/Tests/Larmor/inputs.mr @@ -48,9 +48,6 @@ warpx.cfl = 1.0 particles.nspecies = 2 particles.species_names = electron positron -particles.nspecies = 1 -particles.species_names = electron - electron.charge = -q_e electron.mass = m_e electron.injection_style = "SingleParticle" diff --git a/Examples/Tests/Larmor/plot_particle_path.py b/Examples/Tests/Larmor/plot_particle_path.py deleted file mode 100644 index ef52b4f4b..000000000 --- a/Examples/Tests/Larmor/plot_particle_path.py +++ /dev/null @@ -1,144 +0,0 @@ -import numpy as np - -class AMReXParticleHeader(object): - ''' - - This class is designed to parse and store the information - contained in an AMReX particle header file. - - Usage: - - header = AMReXParticleHeader("plt00000/particle0/Header") - print(header.num_particles) - print(header.version_string) - - etc... - - ''' - - def __init__(self, header_filename): - - self.real_component_names = [] - self.int_component_names = [] - with open(header_filename, "r") as f: - self.version_string = f.readline().strip() - - particle_real_type = self.version_string.split('_')[-1] - particle_real_type = self.version_string.split('_')[-1] - if particle_real_type == 'double': - self.real_type = np.float64 - elif particle_real_type == 'single': - self.real_type = np.float32 - else: - raise RuntimeError("Did not recognize particle real type.") - self.int_type = np.int32 - - self.dim = int(f.readline().strip()) - self.num_int_base = 2 - self.num_real_base = self.dim - self.num_real_extra = int(f.readline().strip()) - for i in range(self.num_real_extra): - self.real_component_names.append(f.readline().strip()) - self.num_int_extra = int(f.readline().strip()) - for i in range(self.num_int_extra): - self.int_component_names.append(f.readline().strip()) - self.num_int = self.num_int_base + self.num_int_extra - self.num_real = self.num_real_base + self.num_real_extra - self.is_checkpoint = bool(int(f.readline().strip())) - self.num_particles = int(f.readline().strip()) - self.max_next_id = int(f.readline().strip()) - self.finest_level = int(f.readline().strip()) - self.num_levels = self.finest_level + 1 - - if not self.is_checkpoint: - self.num_int_base = 0 - self.num_int_extra = 0 - self.num_int = 0 - - self.grids_per_level = np.zeros(self.num_levels, dtype='int64') - self.grids = [] - for level_num in range(self.num_levels): - self.grids_per_level[level_num] = int(f.readline().strip()) - self.grids.append([]) - - for level_num in range(self.num_levels): - for grid_num in range(self.grids_per_level[level_num]): - entry = [int(val) for val in f.readline().strip().split()] - self.grids[level_num].append(tuple(entry)) - - -def read_particle_data(fn, ptype="particle0"): - ''' - - This function returns the particle data stored in a particular - plot file and particle type. It returns two numpy arrays, the - first containing the particle integer data, and the second the - particle real data. For example, if a dataset has 3000 particles, - which have two integer and five real components, this function will - return two numpy arrays, one with the shape (3000, 2) and the other - with the shape (3000, 5). - - Usage: - - idata, rdata = read_particle_data("plt00000", "particle0") - - ''' - base_fn = fn + "/" + ptype - header = AMReXParticleHeader(base_fn + "/Header") - - idtype = "(%d,)i4" % header.num_int - if header.real_type == np.float64: - fdtype = "(%d,)f8" % header.num_real - elif header.real_type == np.float32: - fdtype = "(%d,)f4" % header.num_real - - idata = np.empty((header.num_particles, header.num_int )) - rdata = np.empty((header.num_particles, header.num_real)) - - ip = 0 - for lvl, level_grids in enumerate(header.grids): - for (which, count, where) in level_grids: - if count == 0: continue - fn = base_fn + "/Level_%d/DATA_%04d" % (lvl, which) - - with open(fn, 'rb') as f: - f.seek(where) - ints = np.fromfile(f, dtype = idtype, count=count) - floats = np.fromfile(f, dtype = fdtype, count=count) - - idata[ip:ip+count] = ints - rdata[ip:ip+count] = floats - ip += count - - return idata, rdata - - -if __name__ == "__main__": - import pylab as plt - import glob - - x0 = [] - y0 = [] - x1 = [] - y1 = [] - - fn_list = glob.glob("plt?????") - fn_list.sort() - - for fn in fn_list: - idata, rdata = read_particle_data(fn, ptype="particle0") - x0.append(rdata[0][0]) - y0.append(rdata[0][1]) - idata, rdata = read_particle_data(fn, ptype="particle1") - x1.append(rdata[0][0]) - y1.append(rdata[0][1]) - - fig = plt.gcf() - fig.set_size_inches(8, 8) - plt.plot(x0, y0, 'r.') - plt.plot(x1, y1, 'b.') - plt.axis((-2., 2., -2., 2.)) - ax = plt.gca() - ax.set_xlabel(r'$x$') - ax.set_ylabel(r'$y$') - plt.savefig('particles.png') diff --git a/Examples/Tests/PML/inputs2d b/Examples/Tests/PML/inputs.2d index c6abe2b88..c6abe2b88 100644 --- a/Examples/Tests/PML/inputs2d +++ b/Examples/Tests/PML/inputs.2d diff --git a/Examples/Tests/SingleParticle/bilinear_filter_analysis.py b/Examples/Tests/SingleParticle/analysis_bilinear_filter.py index 494434279..494434279 100755 --- a/Examples/Tests/SingleParticle/bilinear_filter_analysis.py +++ b/Examples/Tests/SingleParticle/analysis_bilinear_filter.py diff --git a/Examples/Tests/SingleParticle/inputs b/Examples/Tests/SingleParticle/inputs index 548848d79..4db020065 100644 --- a/Examples/Tests/SingleParticle/inputs +++ b/Examples/Tests/SingleParticle/inputs @@ -10,7 +10,7 @@ geometry.prob_lo = -8 -12 geometry.prob_hi = 8 12 warpx.do_pml = 0 algo.charge_deposition = standard -algo.field_gathering = standard +algo.field_gathering = energy-conserving warpx.cfl = 1.0 particles.nspecies = 1 diff --git a/Examples/Tests/gpu_test/inputs b/Examples/Tests/gpu_test/inputs index e4ae27469..9cb6b819b 100644 --- a/Examples/Tests/gpu_test/inputs +++ b/Examples/Tests/gpu_test/inputs @@ -25,7 +25,7 @@ warpx.verbose = 1 # Algorithms algo.current_deposition = direct -algo.field_gathering = standard +algo.field_gathering = energy-conserving interpolation.nox = 1 interpolation.noy = 1 diff --git a/Examples/Tests/gpu_test/script_profiling.sh b/Examples/Tests/gpu_test/script_profiling.sh deleted file mode 100755 index cd6b0eadd..000000000 --- a/Examples/Tests/gpu_test/script_profiling.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -#BSUB -P GEN109 -#BSUB -W 0:10 -#BSUB -nnodes 1 -#BSUB -J WarpX -#BSUB -o WarpXo.%J -#BSUB -e WarpXe.%J - -module load pgi -module load cuda/9.1.85 -module list -set -x - -omp=1 -export OMP_NUM_THREADS=${omp} -#EXE="../main3d.pgi.DEBUG.TPROF.MPI.ACC.CUDA.ex" -EXE="../main3d.pgi.TPROF.MPI.ACC.CUDA.ex" -#JSRUN="jsrun -n 4 -a 1 -g 1 -c 1 --bind=packed:${omp} " -#JSRUN="jsrun -n 1 -a 4 -g 4 -c 4 --bind=packed:${omp} " -JSRUN="jsrun -n 1 -a 1 -g 1 -c 1 --bind=packed:${omp} " - -rundir="${LSB_JOBNAME}-${LSB_JOBID}" -mkdir $rundir -cp $0 $rundir -cp inputs $rundir -cd $rundir - -# 1. Run normally -${JSRUN} --smpiargs="-gpu" ${EXE} inputs - -# 2. Run under cuda-memcheck -# ${JSRUN} --smpiargs="-gpu" cuda-memcheck ${EXE} inputs &> memcheck.txt - -# 3. Run under nvprof and direct all stdout and stderr to nvprof.txt -#${JSRUN} --smpiargs="-gpu" nvprof --profile-child-processes ${EXE} inputs &> nvprof.txt - -# 4. Run under nvprof and store performance data in a nvvp file -# Can be converted to text using nvprof -i nvprof-timeline-%p.nvvp -#${JSRUN} --smpiargs="-gpu" nvprof --profile-child-processes -o nvprof-timeline-%p.nvvp ${EXE} inputs - -# COLLECT PERFORMANCE METRICS - THIS IS MUCH SLOWER. Set nsteps=2 in the inputs files -# 5. Run under nvprof and collect metrics for a subset of kernels -#${JSRUN} --smpiargs="-gpu" nvprof --profile-child-processes --kernels '(deposit_current|gather_\w+_field|push_\w+_boris)' --analysis-metrics -o nvprof-metrics-kernel-%p.nvvp ${EXE} inputs - -# 6. Run under nvprof and collect metrics for all kernels -- much slower! -#${JSRUN} --smpiargs="-gpu" nvprof --profile-child-processes --analysis-metrics -o nvprof-metrics-%p.nvvp ${EXE} inputs - -cp ../WarpX*.${LSB_JOBID} . diff --git a/Examples/Tests/laser_on_fine/inputs b/Examples/Tests/laser_on_fine/inputs deleted file mode 100644 index 83d70e6a1..000000000 --- a/Examples/Tests/laser_on_fine/inputs +++ /dev/null @@ -1,73 +0,0 @@ -# Maximum number of time steps -max_step = 500 - -# number of grid points -amr.n_cell = 64 64 64 - -# The lo and hi ends of grids are multipliers of blocking factor -amr.blocking_factor = 32 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 64 - -# Maximum level in hierarchy (for now must be 0, i.e., one level in total) -amr.max_level = 1 - -warpx.fine_tag_lo = -10.e-6 -10.e-6 -0.4e-6 -warpx.fine_tag_hi = 10.e-6 10.e-6 0.4e-6 - -amr.plot_int = 10 # How often to write plotfiles. "<= 0" means no plotfiles. - -warpx.plot_raw_fields = 1 -warpx.plot_finepatch = 1 -warpx.plot_crsepatch = 1 -warpx.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz part_per_cell divB - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 1 1 0 # Is periodic? -geometry.prob_lo = -30.e-6 -30.e-6 -1.25e-6 # physical domain -geometry.prob_hi = 30.e-6 30.e-6 1.25e-6 - -# PML -warpx.do_pml = 1 -warpx.pml_ncell = 10 - -# Verbosity -warpx.verbose = 1 - -# Algorithms -algo.current_deposition = esirkepov -algo.charge_deposition = standard -algo.field_gathering = standard - -# CFL -warpx.cfl = 1.0 -particles.nspecies = 0 - -# interpolation -interpolation.nox = 1 -interpolation.noy = 1 -interpolation.noz = 1 - -# Moving window -warpx.do_moving_window = 0 -warpx.moving_window_dir = z -warpx.moving_window_v = 1.0 # in units of the speed of light - -# Laser -lasers.nlasers = 1 -lasers.names = laser1 -laser1.prob_lo = -12.e-6 -12.e-6 -5.e-6 -laser1.prob_hi = 12.e-6 12.e-6 5.e-6 -laser1.profile = Gaussian -laser1.position = 0. 0. 0.e-6 # This point is on the laser plane -laser1.direction = 0. 0. 1. # The plane normal direction -laser1.polarization = 1. 0. 0. # The main polarization vector -laser1.e_max = 16.e12 # Maximum amplitude of the laser field (in V/m) -laser1.profile_waist = 3.e-6 # The waist of the laser (in meters) -laser1.profile_duration = 15.e-15 # The duration of the laser (in seconds) -laser1.profile_t_peak = 30.e-15 # The time at which the laser reaches its peak (in seconds) -laser1.profile_focal_distance = 100.e-6 # Focal distance from the antenna (in meters) -laser1.wavelength = 0.8e-6 # The wavelength of the laser (in meters) diff --git a/Examples/Tests/laser_on_fine/inputs.2d b/Examples/Tests/laser_on_fine/inputs.2d index 6919bac64..5ae4237d6 100644 --- a/Examples/Tests/laser_on_fine/inputs.2d +++ b/Examples/Tests/laser_on_fine/inputs.2d @@ -2,7 +2,7 @@ max_step = 500 # number of grid points -amr.n_cell = 64 64 64 +amr.n_cell = 64 64 # The lo and hi ends of grids are multipliers of blocking factor amr.blocking_factor = 32 @@ -40,7 +40,7 @@ warpx.verbose = 1 # Algorithms algo.current_deposition = esirkepov algo.charge_deposition = standard -algo.field_gathering = standard +algo.field_gathering = energy-conserving # CFL warpx.cfl = 1.0 @@ -53,8 +53,6 @@ interpolation.noz = 1 # Moving window warpx.do_moving_window = 0 -warpx.moving_window_dir = z -warpx.moving_window_v = 1.0 # in units of the speed of light # Laser lasers.nlasers = 1 diff --git a/Examples/Tests/particle_pusher/inputs b/Examples/Tests/particle_pusher/inputs index 5bf0330f8..45ba7fa70 100755 --- a/Examples/Tests/particle_pusher/inputs +++ b/Examples/Tests/particle_pusher/inputs @@ -21,7 +21,7 @@ warpx.do_pml = 0 # Algorithms algo.charge_deposition = standard -algo.field_gathering = standard +algo.field_gathering = energy-conserving algo.particle_pusher = "higuera" # CFL diff --git a/Examples/Tests/particles_in_PML/analysis.py b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py index 96406d717..96406d717 100755 --- a/Examples/Tests/particles_in_PML/analysis.py +++ b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py diff --git a/Examples/Tests/particles_in_PML/inputs2d b/Examples/Tests/particles_in_PML/inputs.2d index 9c5a64921..9c5a64921 100644 --- a/Examples/Tests/particles_in_PML/inputs2d +++ b/Examples/Tests/particles_in_PML/inputs.2d diff --git a/Examples/Tests/photon_pusher/check.py b/Examples/Tests/photon_pusher/analysis_photon_pusher.py index 3e6873842..d0986de48 100755 --- a/Examples/Tests/photon_pusher/check.py +++ b/Examples/Tests/photon_pusher/analysis_photon_pusher.py @@ -112,7 +112,7 @@ def generate(): f.write("geometry.prob_hi = 0.5e-6 0.5e-6 0.5e-6\n") f.write("warpx.do_pml = 0\n") f.write("algo.charge_deposition = standard\n") - f.write("algo.field_gathering = standard\n") + f.write("algo.field_gathering = energy-conserving\n") f.write("warpx.cfl = 1.0\n") f.write("\nparticles.nspecies = {}\n".format(len(spec_names))) diff --git a/Examples/Tests/photon_pusher/inputs b/Examples/Tests/photon_pusher/inputs index 751eb2a6e..1d61d76b4 100644 --- a/Examples/Tests/photon_pusher/inputs +++ b/Examples/Tests/photon_pusher/inputs @@ -14,7 +14,7 @@ geometry.prob_lo = -0.5e-6 -0.5e-6 -0.5e-6 geometry.prob_hi = 0.5e-6 0.5e-6 0.5e-6 warpx.do_pml = 0 algo.charge_deposition = standard -algo.field_gathering = standard +algo.field_gathering = energy-conserving warpx.cfl = 1.0 particles.nspecies = 16 diff --git a/Examples/Tests/radiation_reaction/test_const_B_analytical/check.py b/Examples/Tests/radiation_reaction/test_const_B_analytical/analysis_classicalRR.py index 616fa930a..b4f17cf7c 100755 --- a/Examples/Tests/radiation_reaction/test_const_B_analytical/check.py +++ b/Examples/Tests/radiation_reaction/test_const_B_analytical/analysis_classicalRR.py @@ -149,7 +149,7 @@ def generate(): f.write("geometry.prob_hi = {} {} {}\n".format(sim_size, sim_size, sim_size)) f.write("warpx.do_pml = 0\n") f.write("algo.charge_deposition = standard\n") - f.write("algo.field_gathering = standard\n") + f.write("algo.field_gathering = energy-conserving\n") f.write("warpx.cfl = 1.0\n") f.write("warpx.serialize_ics = 1\n") diff --git a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs index d57770812..e8fdbe984 100644 --- a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs +++ b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs @@ -13,7 +13,7 @@ geometry.prob_lo = -8e-07 -8e-07 -8e-07 geometry.prob_hi = 8e-07 8e-07 8e-07 warpx.do_pml = 0 algo.charge_deposition = standard -algo.field_gathering = standard +algo.field_gathering = energy-conserving warpx.cfl = 1.0 warpx.serialize_ics = 1 diff --git a/Examples/Tests/self_force_test/inputs b/Examples/Tests/self_force_test/inputs deleted file mode 100644 index 5e7bcc4f8..000000000 --- a/Examples/Tests/self_force_test/inputs +++ /dev/null @@ -1,70 +0,0 @@ -# Maximum number of time steps -max_step = 50000 - -# number of grid points -amr.n_cell = 64 64 64 - -# The lo and hi ends of grids are multipliers of blocking factor -amr.blocking_factor = 16 - -# Maximum allowable size of each subdomain in the problem domain; -# this is used to decompose the domain for parallel calculations. -amr.max_grid_size = 64 - -# Maximum level in hierarchy -amr.max_level = 1 - -warpx.fine_tag_lo = -0.5e-5 -0.5e-5 -0.5e-5 -warpx.fine_tag_hi = 0.5e-5 0.5e-5 0.5e-5 - -warpx.do_electrostatic = 1 -warpx.n_buffer = 4 -warpx.const_dt = 1.0e-10; - -amr.plot_int = -1 # How often to write plotfiles. "<= 0" means no plotfiles. - -warpx.plot_raw_fields = 0 -warpx.plot_divb = 0 -warpx.plot_finepatch = 0 -warpx.plot_crsepatch = 0 - -# Geometry -geometry.coord_sys = 0 # 0: Cartesian -geometry.is_periodic = 0 0 0 # Is periodic? -geometry.prob_lo = -2.0e-5 -2.0e-5 -2.0e-5 # physical domain -geometry.prob_hi = 2.0e-5 2.0e-5 2.0e-5 - -# PML -warpx.do_pml = 0 -warpx.pml_ncell = 10 - -# Verbosity -warpx.verbose = 1 - -# Algorithms -algo.current_deposition = esirkepov -algo.charge_deposition = standard -algo.field_gathering = standard - -# CFL -warpx.cfl = 1.0 - -# particles -particles.nspecies = 1 -particles.species_names = electron - -electron.charge = -q_e -electron.mass = m_e -electron.injection_style = "SingleParticle" -electron.single_particle_pos = -2.5e-6 0.0 0.0 -electron.single_particle_vel = 0.0 0.0 0.0 # gamma*beta - -electron.single_particle_weight = 1.0 - -# interpolation -interpolation.nox = 1 -interpolation.noy = 1 -interpolation.noz = 1 - -# Moving window -warpx.do_moving_window = 0 |