Skip to content

Commit c105fe3

Browse files
authored
Merge pull request #124 from aarontran/hyb_misc_fixes
[hvpic-k-devel] Misc minor fixes
2 parents 521bae5 + b0cd4c2 commit c105fe3

12 files changed

Lines changed: 72 additions & 57 deletions

File tree

examples/iaw/NO-SMOOTH/iaw.cxx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ begin_initialization {
8282
double ny = 1;
8383
double nz = 1;
8484

85-
double nppc = 150000; // Average number of macro particle per cell per species
85+
double nppc = 150000; // Average number of macro particle per cell per species
8686

87-
double topology_x = 8; // Number of domains in x, y, and z
87+
double topology_x = 4; // Number of domains in x, y, and z
8888
double topology_y = 1;
8989
double topology_z = 1;
9090

@@ -159,15 +159,17 @@ begin_initialization {
159159
nx, ny, nz, // Resolution
160160
topology_x, topology_y, topology_z); // Topology
161161

162-
grid->te = Te;
163-
grid->den = 1.0;
162+
// grid->te = Te;
163+
grid->eos_den = 1.0;
164164
grid->eta = eta;
165165
grid->hypereta = hypereta;
166-
grid->gamma = gamma;
166+
grid->eos_gamma = gamma;
167167

168168
grid->nsub = 1; // Number of substeps for field solve.
169169
grid->nsm = 0; // Number of binomial smoothing passes (to fields & moments).
170170
grid->nsmb = 0; // Timesteps between additional smooths of magnetic field (0 is off).
171+
grid->den_floor_ohm = 0.05;
172+
grid->den_floor_pe = 0.05;
171173

172174
// ***** Set Field Boundary Conditions *****
173175
sim_log("Periodic boundaries");
@@ -263,7 +265,7 @@ sim_log( "Loading fields" );
263265
// Note: everywhere is a region that encompasses the entire simulation
264266
// In general, regions are specied as logical equations (i.e. x>0 && x+y<2)
265267
set_region_field( everywhere, 0, 0, 0, 0.0, 0, 0);
266-
268+
set_region_te(everywhere, Te);
267269

268270
// LOAD PARTICLES
269271
sim_log( "Loading particles" );
@@ -440,15 +442,17 @@ sim_log( "Loading fields" );
440442
emat | nmat | fmat | cmat );
441443
442444
output_variables( current_density | charge_density |
443-
momentum_density | ke_density | stress_tensor );
445+
momentum_density | mass_density | stress_tensor );
444446
*/
445447

446448
//global->fdParams.output_variables( electric | magnetic );
447449
global->hedParams.output_variables( current_density | charge_density | stress_tensor );
448450
global->hHdParams.output_variables( current_density | charge_density | stress_tensor );
449451

450452

451-
global->fdParams.output_variables( all );
453+
const uint32_t allfields (0xffffffff);
454+
455+
global->fdParams.output_variables( allfields );
452456
// global->hedParams.output_variables( all );
453457
// global->hHdParams.output_variables( all );
454458

examples/iaw/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
cd iaw
2-
emacs nw iaw.cxx
2+
emacs -nw iaw.cxx
33
make
4-
srun n 8 N 1 ./iaw.Linux 2>&1 | tee hvpic.out (or mpirun np 1 ./iaw..)
5-
ftn o translateIAW translateIAW.f90
4+
srun -n 8 -N 1 ./iaw.Linux 2>&1 | tee hvpic.out (or mpirun -np 1 ./iaw..)
5+
ftn -o translateIAW translateIAW.f90
66
mkdir data
7-
srun n 1 ./translateIAW
7+
srun -n 1 ./translateIAW
88
python ./plotsIAW.py

examples/iaw/iaw.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ begin_initialization {
5656

5757
// Initial conditions for model:
5858
double Ti = 1.0/3.0; // Ion temperature
59-
double gamma = 1.0;//5.0/3.0; // Ratio of specific heats.
59+
double gamma = 5.0/3.0; // Ratio of specific heats.
6060
double c_s = 1.0; // Electron sound speed.
6161
double pert = 0.02; // Size of density perturbation.
6262
double Lx = 16; // Size of domain.
@@ -82,7 +82,7 @@ begin_initialization {
8282
double ny = 1;
8383
double nz = 1;
8484

85-
double nppc = 1500000; // Average number of macro particle per cell per species
85+
double nppc = 150000; // Average number of macro particle per cell per species
8686

8787
double topology_x = 4; // Number of domains in x, y, and z
8888
double topology_y = 1;
@@ -160,14 +160,16 @@ begin_initialization {
160160
topology_x, topology_y, topology_z); // Topology
161161

162162
// grid->te = Te;
163-
// grid->den = 1.0;
163+
grid->eos_den = 1.0;
164164
grid->eta = eta;
165-
// grid->hypereta = hypereta;
166-
// grid->gamma = gamma;
165+
grid->hypereta = hypereta;
166+
grid->eos_gamma = gamma;
167167

168-
// grid->nsub = 1; // Number of substeps for field solve.
169-
// grid->nsm = 2; // Number of binomial smoothing passes (to fields & moments).
170-
// grid->nsmb = 0; // Timesteps between additional smooths of magnetic field (0 is off).
168+
grid->nsub = 1; // Number of substeps for field solve.
169+
grid->nsm = 2; // Number of binomial smoothing passes (to fields & moments).
170+
grid->nsmb = 0; // Timesteps between additional smooths of magnetic field (0 is off).
171+
grid->den_floor_ohm = 0.05;
172+
grid->den_floor_pe = 0.05;
171173

172174
// ***** Set Field Boundary Conditions *****
173175
sim_log("Periodic boundaries");
@@ -440,7 +442,7 @@ sim_log( "Loading fields" );
440442
emat | nmat | fmat | cmat );
441443
442444
output_variables( current_density | charge_density |
443-
momentum_density | mass_density | stress_tensor );
445+
momentum_density | mass_density | stress_tensor );
444446
*/
445447

446448
//global->fdParams.output_variables( electric | magnetic );
@@ -449,7 +451,7 @@ sim_log( "Loading fields" );
449451

450452

451453
const uint32_t allfields (0xffffffff);
452-
454+
453455
global->fdParams.output_variables( allfields );
454456
// global->hedParams.output_variables( all );
455457
// global->hHdParams.output_variables( all );

examples/islands/COLD-ION/islands_hyb.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ begin_initialization {
9595

9696
double nppc = 50; // Average number of macro particle per cell per species
9797

98-
double topology_x = 8; // Number of domains in x, y, and z
98+
double topology_x = 1; // Number of domains in x, y, and z
9999
double topology_y = 1;
100100
double topology_z = 2;
101101

examples/islands/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
cd islands
2-
emacs nw islands.cxx
2+
emacs -nw islands_hyb.cxx
33
make
4-
srun –n 16 –N 1 ./islands.Linux 2>&1 | tee hvpic.out (or mpirun np 16 ./islands..)
5-
ftn o translate_islands translate_islands.f90
4+
srun -n 2 -N 1 ./islands_hyb.Linux 2>&1 | tee hvpic.out (or mpirun -np 16 ./islands..)
5+
ftn -o translate_islands translate_islands.f90
66
mkdir data
7-
srun n 1 ./translate_islands
8-
ftn o ayprog ay_gda_integrate.f90
7+
srun -n 1 ./translate_islands
8+
ftn -o ayprog ay_gda_integrate.f90
99
./ayprog
1010
IDL gui: “module load idl” “idl” “diagnostic”. Python: “mkdir figs” “python plotfigs.py”.
1111
python ./rate.py”, “python opoint.py

examples/pcai/README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
emacs nw pcai_new.cxx
1+
emacs -nw pcai.cxx
22
make
3-
srun n 1 N 1 ./pcai.Linux 2>&1 | tee hvpic.out (or mpirun np 1 ./pcai..)
4-
ftn o translate_pcai translate_pcai.cxx
3+
srun -n 1 -N 1 ./pcai.Linux 2>&1 | tee hvpic.out (or mpirun -np 1 ./pcai..)
4+
ftn -o translate_pcai translate_pcai.f90
55
mkdir data
6-
srun n 1 ./translate_pcai
7-
python ./plotsPCAI.py
6+
srun -n 1 ./translate_pcai
7+
python ./plotsPCAI.py

examples/pcai/plotsPCAI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import matplotlib
44
import matplotlib.pyplot as plt
5-
import pywt
5+
#import pywt
66

77
datadir = "./data/"
88
nx = 64

examples/shock/README

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cd shock
2+
emacs -nw shock-hyb.cxx
3+
make
4+
srun -n 1 -N 1 ./shock-hyb.Linux 2>&1 | tee hvpic.out (or mpirun -np 1 ./shock..)
5+
ftn -o translate_shock translate_shock.f90
6+
mkdir data
7+
srun -n 1 ./translate_shock
8+
ftn -o ayprog ay_gda_integrate.f90
9+
./ayprog
10+
IDL gui: “module load idl” “idl” “diagnostic”. Python: “mkdir figs” “python plotfigs.py”.
11+

src/field_advance/standard/remote.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2673,7 +2673,7 @@ begin_recv_ghost_hyb_ue(field_array* fa,
26732673
*/
26742674
template<typename Face>
26752675
void
2676-
begin_send_ghost_hyb_eu(field_array* fa,
2676+
begin_send_ghost_hyb_ue(field_array* fa,
26772677
const int i, const int j, const int k) {
26782678
int dst = fa->g->bc[BOUNDARY(i,j,k)]; /**< Destination rank */
26792679
// Only send cells if dst is a valid neighbor and not itself

src/field_advance/standard/sfa_private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ hyb_advance_b_kokkos( field_array_t * RESTRICT fa,
7676
void
7777
advance_e( field_array_t * RESTRICT fa,
7878
float frac );
79-
void
80-
79+
80+
void
8181
advance_eue( field_array_t * RESTRICT fa,
8282
float frac );
8383

0 commit comments

Comments
 (0)