Abstract
GENASIS Mathematics provides modern Fortran classes furnishing extensible object-oriented functionality for the solution of fields governed by selected partial differential equations. The initial release included extensible object-oriented implementations of simple meshes and the evolution of generic conserved currents thereon. This revision—Version 2 of Mathematics—includes significant reorganization and streamlining of these classes, higher-order reconstruction by a different method, a Poisson solver, coarsening to avoid Courant time step limitations near coordinate singularities, and the offloading of computational kernels to GPUs. New version program summary: Program Title: HomogeneousSpheroid, RectangularContraction, RectangularExpansion, SphericalContraction, SphericalExpansion (example problems illustrating GENASIS Mathematics) CPC Library link to program files: https://doi.org/10.17632/mzvxngwtw6.2 Developer's repository link: https://github.com/GenASiS Code Ocean capsule: https://codeocean.com/capsule/4106782 Licensing provisions: GPLv3 Programming language: Modern Fortran; OpenMP (tested with recent versions of GNU Compiler Collection (GCC), Cray Compiler Environment (CCE), IBM XL Fortran compiler) Journal reference of previous version: Computer Physics Communications 222 (2018) 384 Does the new version supersede the previous version?: Yes Reasons for the new version: This version includes significant reorganization and streamlining, higher-order reconstruction by a different method, a Poisson solver, coarsening to avoid Courant time step limitations near coordinate singularities, and the offloading of computational kernels to GPUs. Summary of revisions: The left part of Fig. 1 shows the revised structure of GENASIS Mathematics. The Algebra and Calculus divisions contain relatively simple stand-alone functionality for such tasks as root finding, interpolation, numerical integration, and the solution of ordinary differential equations. The major functionality currently provided in Mathematics, which focuses on the solution of selected classes of partial differential equations, is now collected in the CauchyProblems division. The structure of CauchyProblems is displayed in the right part of Fig. 1. The solution of partial differential equations presumes the existence of Manifolds (or ‘spaces’) and Fields thereon whose configuration we seek. The two basic types of Cauchy problems are boundary value problems, or Constraints; and initial value problems, or Evolutions. The structures of Manifolds, Fields, Constraints, and Evolutions are displayed in Fig. 2. Individual coordinate patches or Charts are combined into Atlases in order to represent Manifolds. As for Fields, the most basic functionality for a set of fields on a manifold (including I/O) is represented by classes in FieldSets. Specialized sets of fields needed for Cauchy problems are Geometries, including coarsening functionality to avoid Courant time step limitations near coordinate singularities; and CurrentSets, which represent ‘conserved’—or more properly, when source terms are present, ‘balanced’—currents, that is, densities and their corresponding fluxes. CalculusFields provides integrals of fields on manifolds, including volume and surface integrals used to tally conserved and balanced quantities, as well as spherical and azimuthal averaging. New to this version of Mathematics is the solution of PoissonEquations via multipole expansion, the first capability for Constraints or boundary value problems.The solution of balance equations is the type of initial value problem currently handled by Evolutions. As in Version 1, finite-volume discretization results in a large set of ordinary differential equations solved by the Runge-Kutta method. Now however, the right-hand sides, or Slopes, are handled by variations of a recursive class that allows the construction of hierarchies of terms. Thus complicated equations can be computed and included in I/O in pieces representing various terms, with results assembled in an extensible and quasi-automated fashion. For example, the partial derivatives, and geometric source terms from connection coefficients, can be computed and visualized separately, while being automatically combined to give the full divergence of an energy-momentum tensor. Third-order reconstruction (with limiting) to discretize cell interfaces is now included. Multi-stage Runge-Kutta Steps are then taken by Integrators in order to advance the solution of fields from their initial condition. Relative to Version 1 of Mathematics, the Manifolds and Fields classes are significantly reorganized and streamlined. Previously, classes for fields, geometry, and I/O were interleaved with those of charts and atlases. This provided for chart and atlas classes with self-contained geometry and I/O functionality, but in a manner that proved unwieldy and indeed unnecessary. This has now been disentangled: classes for fields, geometry and I/O are built entirely on top of full manifolds (i.e. classes for atlases). All computational kernels (except those specifically needed for checkpointing, that is, I/O) are coded for offloading to GPUs via OpenMP. Nature of problem: By way of illustrating GENASIS Mathematics functionality, solve an example potential problem and imposed advection problems. Solution method: Multipole expansion for solution of the Poisson equation; finite-volume discretization; second- and third-order reconstruction with limiting; HLL Riemann Solver; Runge-Kutta integration. Additional comments including restrictions and unusual features: Uses the MPI [1] and Silo [2] libraries. The example problems named above are not ends in themselves, but serve to illustrate the functionality available though GENASIS Mathematics. In addition to these more substantial examples, we provide individual unit test programs for the classes comprised by GENASIS Mathematics. GENASIS Mathematics is available in the CPC Program Library and also at https://github.com/GenASiS. References: [1] https://www.mpi-forum.org. [2] https://wci.llnl.gov/simulation/computer-codes/silo.
Original language | English |
---|---|
Article number | 108518 |
Journal | Computer Physics Communications |
Volume | 282 |
DOIs | |
State | Published - Jan 2023 |
Funding
This manuscript has been authored by UT-Battelle, LLC under Contract No. DE-AC05-00OR22725 with the U.S. Department of Energy. The United States Government retains and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes. The Department of Energy will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (http://energy.gov/downloads/doe-public-access-plan).This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Nuclear Physics under Contract No. DE-AC05-00OR22725 and the National Science Foundation under Grant No. 1535130. This research used resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract No. DE-AC05-00OR22725. This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Nuclear Physics under Contract No. DE-AC05-00OR22725 and the National Science Foundation under Grant No. 1535130 . This research used resources of the Oak Ridge Leadership Computing Facility, which is a DOE Office of Science User Facility supported under Contract No. DE-AC05-00OR22725 .
Funders | Funder number |
---|---|
DOE Public Access Plan | |
United States Government | |
National Science Foundation | 1535130 |
U.S. Department of Energy | |
Office of Science | |
Nuclear Physics | DE-AC05-00OR22725 |
Keywords
- Conservation laws
- GPU-accelerated simulation
- Meshing
- Modern fortran
- Object-oriented programming
- OpenMP offload
- Partial differential equations
- Simulation framework