aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralAlgorithms
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2020-04-10 15:57:37 -0700
committerGravatar GitHub <noreply@github.com> 2020-04-10 15:57:37 -0700
commit2e1f6348c991c06161c788c04fdb57ee9bc130fe (patch)
tree9876a75d5ab293941a9fba46ef813be9be810aa9 /Source/FieldSolver/SpectralSolver/SpectralAlgorithms
parentf1da608562d32af7345809499f30b05341132afc (diff)
downloadWarpX-2e1f6348c991c06161c788c04fdb57ee9bc130fe.tar.gz
WarpX-2e1f6348c991c06161c788c04fdb57ee9bc130fe.tar.zst
WarpX-2e1f6348c991c06161c788c04fdb57ee9bc130fe.zip
Interpolation with coarsening for general staggering (#853)
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * Capability to select fields in output files * EOL * revert to old inputs * const in right place * avoid brace initializer there * oops, fix logic error in is_in * user can choose flush interval, same behavior as plot_int * Add option to plot raw fields * eol * replace ter flush with dump to avoid confusion * add options * Diagnostics stores a vector of functors to compute diags on the fly * eol * Field gather from diags to sync particle quantities * New diagnostics handle RZ with same behavior as old ones * cleaning and doc * const ref for string * smarter for loop from Axel and typo fix from Reva * Functors to compute some fields * simplify code following Dave's comments * Create subfolders and add more output options (divE etc.) * eol * rename mode_avg to convertRZmodes2cartesian * Update CellCenterFunctor.H * fill varnames and vector of functors at the same time * output rho_new, not rho_old * WarpX instance not needed here * add const * little bit more of reorganization * Apply suggestions from code review Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * add a bunch of const * Move average_down overload used in WarpX to Average::FineToCoarse * Write Average::FineToCoarse for cell-centered and nodal data * Clean up Average::FineToCoarse (WARNING: interface changed) * Small clean-up * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * Small clean-up * Change name from Average::FineToCoarse to Average::Coarsen * Add dcomp to interface of Coarsen (different from scomp in general) * Remove ASSERT (general input and output staggerings will be accepted) * Fix averaging from fine nodal to coarse centered * Clean up Doxygen in old Average::ToCellCenter (likely to be removed) * Intermediate layers Average::CoarsenLoop and Average::CoarsenKernel * Revert "Intermediate layers Average::CoarsenLoop and Average::CoarsenKernel" This reverts commit 91f2beaa20617a3fb25df536472b74899942ffc5. * Clean-up * Implement interpolation with coarsening (remove averaging) * Trigger failing source/style checks on Travis CI * Add ASSERTS to check coarsening ratio and guard cells * Input/output MultiFabs can have different number of components * Use AMReX built-in functions to check if MultiFab is coarsenable * Add Doxygen documentation for new functions * Copy starting from correct component in destination MultiFab * Pass IntVect to BoxArray method 'coarsenable' directly * Improve comments * Rename 'ratio' as 'crse_ratio' * Add _rt suffix when necessary * Improve comments * Use method 'toIntVect' instead of 'ixType' * New names: mf_src, arr_src, stag_src, mf_dst, arr_dst, stag_dst * More clean-up * Replace calls to ToCellCenter and fix bug with staggering of temporary BoxArray * Check if coarsenable on BoxArray with destination staggering * Replace remaining calls to Average::ToCellCenter * Remove Average::ToCellCenter * Use amrex::Gpu::ManagedVector<int> to avoid issues on GPUs * Add default value IntVect(1) for coarsening ratio * Add ngrow to possibly fill guard cells too * Add ngrow to Doxygen documentation * Count number of points outside innermost loop * Add number of guard cells required to previous ASSERT and force ngrow=0 with coarsening Co-authored-by: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralAlgorithms')
0 files changed, 0 insertions, 0 deletions