NONREP unktype FOO localmax globalparam ioformat
the following will be placed into Flash.h:
Descriptions of arguments to the above macros:
Config:
NONREP MASS_SCALAR FOO 3 numFoo foo?
flash.par:
meshCopyCount = 3 numFoo = 8
Fortran 90:
#include "Flash.h"
! this shows how to iterate over the UNKs corresponding to this ! processor's subset of FOO integer :: nfooglob, nfooloc ! number of foo vars, global and local integer :: mesh, nmesh ! this mesh number, and total number of meshes integer :: fooloc, fooglob ! local and global foo indices integer :: unk
call Driver_getMype(MESH_ACROSS_COMM, mesh) call Driver_getNumProcs(MESH_ACROSS_COMM, nmesh) call RuntimeParameters_get(FOO_NONREP_RPCOUNT, nfooglob) nfooloc = NONREP_NLOCS(mesh, nmesh, nfooglob)
! iterate over the local subset for this mesh do fooloc=1, nfooloc ! get the location in UNK unk = FOO_NONREP_LOC2UNK(fooloc) ! get the global index fooglob = NONREP_LOC2GLOB(fooloc, mesh, nmesh)
! you have what you need, do your worst... end do