Python API
Imports
pyAMReX provides the public imports amrex.space1d, amrex.space2d and amrex.space3d, mirroring the compile-time option AMReX_SPACEDIM.
Due to limitations in AMReX, currently, only one of the imports can be used at a time in the same Python process. For example:
import amrex.space3d as amr
A 1D or 2D AMReX run needs its own Python process. Another dimensionality cannot be imported into the same Python process after choosing a specific dimensionality for import.
For brevity, below the 3D APIs are shown. pyAMReX classes and functions follow the same structure as the C++ AMReX APIs.
Base
Index Types
Vectors
amrex::Vector<T> is implemented for many types, e.g.,
Data Containers
amrex::Array4<T> is implemented for many floating point and integer types, e.g.,
amrex::PODVector<T, Allocator> is implemented for many allocators, e.g.,
Utility
AmrCore
Particles
Particle support is implemented for both legacy (AoS+SoA) and pure SoA particle memory layouts in AMReX. Additional runtime attributes (Real or Int) are always in SoA memory layout.
amrex::StructOfArrays<NReal, NInt, Allocator> is implemented for many numbers of Real and Int arguments, and allocators, e.g.,
amrex::ParticleTile<T_ParticleType, NArrayReal, NArrayInt, Allocator> is implemented for both legacy (AoS+SoA) and pure SoA particle types, many number of Real and Int arguments, and allocators, e.g.,
amrex::ParticleTileData<T_ParticleType, NArrayReal> is implemented for both legacy (AoS+SoA) and pure SoA particle types, many number of Real and Int arguments, e.g.,
amrex::ParticleContainer_impl<ParticleType, T_NArrayReal, T_NArrayInt, Allocator> is implemented for both legacy (AoS+SoA) and pure SoA particle types, many number of Real and Int arguments, and allocators, e.g.,
Likewise for other classes accessible and usable on particle containers:
AoS
This is for the legacy, AoS + SoA particle containers only:
amrex::ArrayOfStructs<T_ParticleType, Allocator> is implemented for many numbers of extra Real and Int arguments, and allocators, e.g.,
amrex::Particle<T_NReal, T_NInt> is implemented for many numbers of extra Real and Int arguments, e.g.,