Skip to content

Commit

Permalink
PGAS_SMC: replication for weak scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Nov 27, 2015
1 parent ac08190 commit fc5813e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions MiniApps/PGAS_SMC/SMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ int SMC::nprim = 0;
int SMC::nspec = 0;
int SMC::nplot = 0;
int SMC::ngrow = 0;
Array<int> SMC::ncell (3,256);
Array<int> SMC::max_grid_size (3,128);
Array<int> SMC::ncell (3,128);
Array<int> SMC::max_grid_size (3,64);
int SMC::max_step = 5;
Real SMC::stop_time = 3.e-3;
Array<Real> SMC::prob_lo (3, -0.05);
Array<Real> SMC::prob_hi (3, 0.05);
Array<Real> SMC::prob_lo (3, 0.0);
Array<Real> SMC::prob_hi (3, 0.1);
int SMC::verbose = 2;
int SMC::cfl_int = 10;
Real SMC::cfl = 0.1;
Real SMC::init_shrink = 0.5;
Real SMC::fixed_dt = -1.0e10;
int SMC::plot_int = -1;
int SMC::overlap = 1;
int SMC::overlap = 0;

SMC::SMC ()
{
Expand Down
7 changes: 4 additions & 3 deletions MiniApps/PGAS_SMC/init_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ subroutine init_data_3d(tlo,thi,lo,hi,cons,ng,dx,phlo,phhi) bind(c)

double precision, parameter :: Pi = 3.141592653589793238462643383279502884197d0
double precision, parameter :: rfire = 0.01d0
double precision, parameter :: Lperiodic = 0.1d0

integer :: i,j,k,n
double precision :: x, y, z, r
Expand All @@ -29,11 +30,11 @@ subroutine init_data_3d(tlo,thi,lo,hi,cons,ng,dx,phlo,phhi) bind(c)
kz = 2.d0*Pi/(phhi(3) - phlo(3))

do k=tlo(3),thi(3)
z = phlo(3) + dx(3)*(k + 0.5d0)
z = mod(dx(3)*(k+0.5d0), Lperiodic) - 0.5d0*Lperiodic
do j=tlo(2),thi(2)
y = phlo(2) + dx(2)*(j + 0.5d0)
y = mod(dx(2)*(j+0.5d0), Lperiodic) - 0.5d0*Lperiodic
do i=tlo(1),thi(1)
x = phlo(1) + dx(1)*(i + 0.5d0)
x = mod(dx(1)*(i+0.5d0), Lperiodic) - 0.5d0*Lperiodic

r = sqrt(x**2+y**2+z**2)

Expand Down

0 comments on commit fc5813e

Please sign in to comment.