Skip to content

Commit

Permalink
Add ParmParse parameters to Tutorials/GPU/Launch (AMReX-Codes#1314)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang authored Aug 26, 2020
1 parent 655f10a commit d48f68f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Tutorials/GPU/Launch/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#include <AMReX.H>
#include <AMReX_MultiFab.H>
#include <AMReX_ParmParse.H>

#include "MyKernel_F.H"

Expand All @@ -20,9 +21,14 @@ void main_main ()
{
BoxArray ba;
{
Box domain_box(IntVect(0), IntVect(127));
int n_cell = 256;
int max_grid_size = 64;
ParmParse pp;
pp.query("n_cell", n_cell);
pp.query("max_grid_size", max_grid_size);
Box domain_box(IntVect(0), IntVect(n_cell-1));
ba.define(domain_box);
ba.maxSize(64);
ba.maxSize(max_grid_size);
}

MultiFab mf(ba,DistributionMapping{ba},1,0);
Expand Down

0 comments on commit d48f68f

Please sign in to comment.