GenASiS Mathematics: Object-oriented manifolds, operations, and solvers for large-scale physics simulations (version 2)

https://doi.org/10.1016/j.cpc.2022.108518Get rights and content

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.

Section snippets

Acknowledgments

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.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References (0)

Cited by (0)

The review of this paper was arranged by Prof. J. Ballantyne.

1

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).

View full text