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
- class amrex.space3d.Config[source]
- amrex_version: ClassVar[str] = '24.05'
- gpu_backend = None
- have_gpu: ClassVar[bool] = False
- have_mpi: ClassVar[bool] = True
- have_omp: ClassVar[bool] = False
- spacedim: ClassVar[int] = 3
- verbose: ClassVar[int] = 1
- amrex.space3d.finalize(*args, **kwds)
Helper for @overload to raise when called.
- amrex.space3d.initialized() bool [source]
Returns true if there are any currently-active and initialized AMReX instances (i.e. one for which amrex::Initialize has been called, and amrex::Finalize has not). Otherwise false.
- class amrex.space3d.Arena[source]
-
- has_free_device_memory(sz: int) bool [source]
Does the device have enough free memory for allocating this much memory? For CPU builds, this always return true.
- property is_device: bool
- property is_device_accessible: bool
- property is_host_accessible: bool
- property is_managed: bool
- property is_pinned: bool
- class amrex.space3d.CoordSys[source]
- class amrex.space3d.CoordSys(arg0: CoordSys)
- class amrex.space3d.DistributionMapping[source]
- class amrex.space3d.DistributionMapping(arg0: DistributionMapping)
- class amrex.space3d.DistributionMapping(arg0: Vector_int)
- class amrex.space3d.DistributionMapping(boxes: BoxArray)
- class amrex.space3d.DistributionMapping(boxes: BoxArray, nprocs: int)
- ProcessorMap() Vector_int [source]
- property capacity: int
- define(boxes: BoxArray) None
- define(boxes: BoxArray, nprocs: int) None
- define(arg0: Vector_int) None
Helper for @overload to raise when called.
- property empty: bool
- property link_count: int
- property size: int
- class amrex.space3d.GeometryData[source]
- CellSize() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
- CellSize(arg0: int) float
Helper for @overload to raise when called.
- ProbHi() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
- ProbHi(arg0: int) float
Helper for @overload to raise when called.
- ProbLo() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
- ProbLo(arg0: int) float
Helper for @overload to raise when called.
- property coord: int
The Coordinates type.
- property dx: list[float]
The cellsize for each coordinate direction.
- isPeriodic() Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)]
- isPeriodic(arg0: int) int
Helper for @overload to raise when called.
- property is_periodic: list[int]
Returns whether the domain is periodic in each coordinate direction.
- class amrex.space3d.Geometry[source]
- class amrex.space3d.Geometry(dom: Box, rb: RealBox, coord: int, is_per: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)])
- ProbHi(dir: int) float
- ProbHi() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
Helper for @overload to raise when called.
- ProbLo(dir: int) float
- ProbLo() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
Helper for @overload to raise when called.
- ResetDefaultPeriodicity() None [source]
Reset default periodicity of Geometry class with an Array of int
- ResetDefaultProbDomain() None [source]
Reset default problem domain of Geometry class with a RealBox
- data() GeometryData [source]
Returns non-static copy of geometry’s stored data
- growNonPeriodicDomain(ngrow: IntVect) Box
- growNonPeriodicDomain(ngrow: int) Box
Helper for @overload to raise when called.
- growPeriodicDomain(ngrow: IntVect) Box
- growPeriodicDomain(ngrow: int) Box
Helper for @overload to raise when called.
- insideRoundOffDomain(x: float, y: float, z: float) bool [source]
Returns true if a point is inside the roundoff domain. All particles with positions inside the roundoff domain are sure to be mapped to cells inside the Domain() box. Note that the same need not be true for all points inside ProbDomain()
- isPeriodic(arg0: int) bool
- isPeriodic() Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)]
Helper for @overload to raise when called.
- outsideRoundOffDomain(x: float, y: float, z: float) bool [source]
Returns true if a point is outside the roundoff domain. All particles with positions inside the roundoff domain are sure to be mapped to cells inside the Domain() box. Note that the same need not be true for all points inside ProbDomain()
- periodicity() Periodicity
- periodicity(b: Box) Periodicity
Helper for @overload to raise when called.
- amrex.space3d.ParallelDescriptor.IOProcessor() bool
- amrex.space3d.ParallelDescriptor.IOProcessorNumber() int
- amrex.space3d.ParallelDescriptor.MyProc() int
- amrex.space3d.ParallelDescriptor.NProcs() int
- class amrex.space3d.Periodicity[source]
- class amrex.space3d.Periodicity(arg0: IntVect)
-
- property is_all_periodic: bool
- property is_any_periodic: bool
- static non_periodic() Periodicity [source]
Return the Periodicity object that is not periodic in any direction
- class amrex.space3d.RealBox[source]
- class amrex.space3d.RealBox(x_lo: float, y_lo: float, z_lo: float, x_hi: float, y_hi: float, z_hi: float)
- class amrex.space3d.RealBox(a_lo: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)], a_hi: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)])
- class amrex.space3d.RealBox(bx: Box, dx: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)], base: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)])
- contains(rb: XDim3, eps: float = 0.0) bool
- contains(rb: RealVect, eps: float = 0.0) bool
- contains(rb: RealBox, eps: float = 0.0) bool
- contains(rb: list[float], eps: float = 0.0) bool
Helper for @overload to raise when called.
- hi(arg0: int) float
- hi() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
Helper for @overload to raise when called.
- lo(arg0: int) float
- lo() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]
Helper for @overload to raise when called.
- setHi(arg0: list[float]) None
- setHi(arg0: int, arg1: float) None
Helper for @overload to raise when called.
- setLo(arg0: list[float]) None
- setLo(arg0: int, arg1: float) None
Helper for @overload to raise when called.
- property xhi: list[float]
- property xlo: list[float]
- amrex.space3d.AlmostEqual(rb1: RealBox, rb2: RealBox, eps: float = 0.0) bool [source]
Determine if two boxes are equal to within a tolerance
Indexing: Box, IntVect and IndexType
Corresponding AMReX documentation.
- class amrex.space3d.IntVect[source]
- class amrex.space3d.IntVect(arg0: int, arg1: int, arg2: int)
- class amrex.space3d.IntVect(arg0: int)
- class amrex.space3d.IntVect(arg0: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)])
-
- property max: int
- property min: int
- property sum: int
- class amrex.space3d.Box(small: IntVect, big: IntVect)[source]
- class amrex.space3d.Box(small: IntVect, big: IntVect, typ: IntVect)
- class amrex.space3d.Box(small: IntVect, big: IntVect, t: IndexType)
- class amrex.space3d.Box(small: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)], big: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)])
- class amrex.space3d.Box(small: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)], big: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)], t: IndexType)
-
- property cell_centered: bool
Returns true if Box is cell-centered in all indexing directions.
- property d_num_pts: float
- enclosed_cells() Box
- enclosed_cells(dir: int) Box
- enclosed_cells(d: Direction) Box
Helper for @overload to raise when called.
- grow(n_cell: int) Box
- grow(n_cells: IntVect) Box
- grow(idir: int, n_cell: int) Box
- grow(d: Direction, n_cell: int) Box
Helper for @overload to raise when called.
- grow_high(idir: int, n_cell: int = 1) Box
- grow_high(d: Direction, n_cell: int = 1) Box
Helper for @overload to raise when called.
- grow_low(idir: int, n_cell: int = 1) Box
- grow_low(d: Direction, n_cell: int = 1) Box
Helper for @overload to raise when called.
- intersects(b: Box) bool [source]
Returns true if Boxes have non-null intersections. It is an error if the Boxes have different types.
- property is_empty: bool
- property is_square: bool
- property num_pts: int
- property ok: bool
- same_size(b: Box) bool [source]
Returns true is Boxes same size, ie translates of each other,. It is an error if they have different types.
- shift(dir: int, nzones: int) Box
- shift(iv: IntVect) Box
Helper for @overload to raise when called.
- strictly_contains(p: IntVect) bool [source]
Returns true if argument is strictly contained within Box.
- surrounding_nodes() Box
- surrounding_nodes(dir: int) Box
- surrounding_nodes(d: Direction) Box
Helper for @overload to raise when called.
- property volume: int
- class amrex.space3d.BoxArray[source]
- class amrex.space3d.BoxArray(arg0: Box)
- class amrex.space3d.BoxArray(arg0: Box, arg1: int)
- property capacity: int
- coarsen(arg0: IntVect) BoxArray
- coarsen(arg0: int) BoxArray
Helper for @overload to raise when called.
- coarsenable(arg0: int, arg1: int) bool
- coarsenable(arg0: IntVect, arg1: int) bool
- coarsenable(arg0: IntVect, arg1: IntVect) bool
Helper for @overload to raise when called.
- property d_numPts: float
- property empty: bool
- max_size(arg0: int) BoxArray
- max_size(arg0: IntVect) BoxArray
Helper for @overload to raise when called.
- property numPts: int
- refine(arg0: int) BoxArray
- refine(arg0: IntVect) BoxArray
Helper for @overload to raise when called.
- property size: int
- class amrex.space3d.XDim3(arg0: float, arg1: float, arg2: float)[source]
- x: float
- y: float
- z: float
- class amrex.space3d.IndexType[source]
- class amrex.space3d.IndexType(arg0: IndexType)
- class amrex.space3d.IndexType(arg0: IndexType.CellIndex, arg1: IndexType.CellIndex, arg2: IndexType.CellIndex)
-
- cell_centered() bool
- cell_centered(arg0: int) bool
Helper for @overload to raise when called.
- ix_type() IntVect
- ix_type(arg0: int) IndexType.CellIndex
Helper for @overload to raise when called.
- node_centered() bool
- node_centered(arg0: int) bool
Helper for @overload to raise when called.
Vectors
- class amrex.space3d.RealVect[source]
- class amrex.space3d.RealVect(arg0: float, arg1: float, arg2: float)
- class amrex.space3d.RealVect(arg0: IntVect)
- class amrex.space3d.RealVect(arg0: list[float])
- class amrex.space3d.RealVect(arg0: float)
-
- ceil() IntVect [source]
Return an
IntVect
whose components are the std::ceil of the vector components
- floor() IntVect [source]
Return an
IntVect
whose components are the std::floor of the vector components
- max(arg0: RealVect) RealVect [source]
Replace vector with the component-wise maxima of this vector and another
- min(arg0: RealVect) RealVect [source]
Replace vector with the component-wise minima of this vector and another
- property product: float
Product of entries of this vector
- property radSquared: float
Length squared of this vector
- round() IntVect [source]
Return an
IntVect
whose components are the std::round of the vector components
- property sum: float
Sum of the components of this vector
- property vectorLength: float
Length or 2-Norm of this vector
amrex::Vector<T>
is implemented for many types, e.g.,
- class amrex.space3d.Vector_Real[source]
- class amrex.space3d.Vector_Real(arg0: Vector_Real)
- class amrex.space3d.Vector_Real(arg0: Iterable)
- class amrex.space3d.Vector_Real
- class amrex.space3d.Vector_Real(arg0: Vector_Real)
-
- extend(L: Vector_Real) None
- extend(L: Iterable) None
Helper for @overload to raise when called.
- pop() float
- pop(i: int) float
Helper for @overload to raise when called.
- class amrex.space3d.Vector_int[source]
- class amrex.space3d.Vector_int(arg0: Vector_int)
- class amrex.space3d.Vector_int(arg0: Iterable)
- class amrex.space3d.Vector_int
- class amrex.space3d.Vector_int(arg0: Vector_int)
-
- extend(L: Vector_int) None
- extend(L: Iterable) None
Helper for @overload to raise when called.
- pop() int
- pop(i: int) int
Helper for @overload to raise when called.
- class amrex.space3d.Vector_string[source]
- class amrex.space3d.Vector_string(arg0: Vector_string)
- class amrex.space3d.Vector_string(arg0: Iterable)
- class amrex.space3d.Vector_string
- class amrex.space3d.Vector_string(arg0: Vector_string)
-
- extend(L: Vector_string) None
- extend(L: Iterable) None
Helper for @overload to raise when called.
- pop() str
- pop(i: int) str
Helper for @overload to raise when called.
Data Containers
amrex::Array4<T>
is implemented for many floating point and integer types, e.g.,
- class amrex.space3d.Array4_double[source]
- class amrex.space3d.Array4_double(arg0: Array4_double)
- class amrex.space3d.Array4_double(arg0: Array4_double, arg1: int)
- class amrex.space3d.Array4_double(arg0: Array4_double, arg1: int, arg2: int)
- class amrex.space3d.Array4_double(arg0: numpy.ndarray[numpy.float64])
-
- property nComp: int
- property num_comp: int
- property size: int
- to_cupy(copy=False, order='F')[source]
Provide a CuPy view into an Array4.
This includes ngrow guard cells of the box.
Note on the order of indices: By default, this is as in AMReX in Fortran contiguous order, indexing as x,y,z. This has performance implications for use in external libraries such as cupy. The order=”C” option will index as z,y,x and perform better with cupy. https://github.com/AMReX-Codes/pyamrex/issues/55#issuecomment-1579610074
Parameters
- selfamrex.Array4_*
An Array4 class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
- orderstring, optional
F order (default) or C. C is faster with external libraries.
Returns
- cupy.array
A cupy n-dimensional array.
Raises
- ImportError
Raises an exception if cupy is not installed
- to_numpy(copy=False, order='F')[source]
Provide a NumPy view into an Array4.
This includes ngrow guard cells of the box.
Note on the order of indices: By default, this is as in AMReX in Fortran contiguous order, indexing as x,y,z. This has performance implications for use in external libraries such as cupy. The order=”C” option will index as z,y,x and perform better with cupy. https://github.com/AMReX-Codes/pyamrex/issues/55#issuecomment-1579610074
Parameters
- selfamrex.Array4_*
An Array4 class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
- orderstring, optional
F order (default) or C. C is faster with external libraries.
Returns
- np.array
A NumPy n-dimensional array.
- to_xp(copy=False, order='F')[source]
Provide a NumPy or CuPy view into an Array4, depending on amr.Config.have_gpu .
This function is similar to CuPy’s xp naming suggestion for CPU/GPU agnostic code: https://docs.cupy.dev/en/stable/user_guide/basic.html#how-to-write-cpu-gpu-agnostic-code
This includes ngrow guard cells of the box.
Note on the order of indices: By default, this is as in AMReX in Fortran contiguous order, indexing as x,y,z. This has performance implications for use in external libraries such as cupy. The order=”C” option will index as z,y,x and perform better with cupy. https://github.com/AMReX-Codes/pyamrex/issues/55#issuecomment-1579610074
Parameters
- selfamrex.Array4_*
An Array4 class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
- orderstring, optional
F order (default) or C. C is faster with external libraries.
Returns
- xp.array
A NumPy or CuPy n-dimensional array.
- class amrex.space3d.BaseFab_Real[source]
- class amrex.space3d.BaseFab_Real(arg0: Arena)
- class amrex.space3d.BaseFab_Real(arg0: Box, arg1: int, arg2: Arena)
- class amrex.space3d.BaseFab_Real(arg0: Box, arg1: int, arg2: float)
- class amrex.space3d.BaseFab_Real(arg0: Box, arg1: int, arg2: float)
- class amrex.space3d.BaseFab_Real(arg0: Array4_double)
- class amrex.space3d.BaseFab_Real(arg0: Array4_double, arg1: IndexType)
- class amrex.space3d.BaseFab_Real(arg0: Array4_double_const)
- class amrex.space3d.BaseFab_Real(arg0: Array4_double_const, arg1: IndexType)
- array() Array4_double [source]
- to_host() BaseFab_Real [source]
- class amrex.space3d.FArrayBox[source]
- class amrex.space3d.FArrayBox(arg0: Arena)
- class amrex.space3d.FArrayBox(arg0: Box, arg1: int, arg2: Arena)
- class amrex.space3d.FArrayBox(arg0: Box, arg1: int, arg2: bool, arg3: bool, arg4: Arena)
- class amrex.space3d.FArrayBox(arg0: Box, arg1: int, arg2: float)
- class amrex.space3d.FArrayBox(arg0: Box, arg1: int, arg2: float)
- class amrex.space3d.FArrayBox(arg0: Array4_double)
- class amrex.space3d.FArrayBox(arg0: Array4_double, arg1: IndexType)
- class amrex.space3d.FArrayBox(arg0: Array4_double_const)
- class amrex.space3d.FArrayBox(arg0: Array4_double_const, arg1: IndexType)
- class amrex.space3d.MultiFab[source]
- class amrex.space3d.MultiFab(a: Arena)
- class amrex.space3d.MultiFab(bxs: BoxArray, dm: DistributionMapping, ncomp: int, ngrow: int, info: MFInfo, factory: FabFactory_FArrayBox)
- class amrex.space3d.MultiFab(bxs: BoxArray, dm: DistributionMapping, ncomp: int, ngrow: int, info: MFInfo)
- class amrex.space3d.MultiFab(bxs: BoxArray, dm: DistributionMapping, ncomp: int, ngrow: int)
- class amrex.space3d.MultiFab(bxs: BoxArray, dm: DistributionMapping, ncomp: int, ngrow: IntVect, info: MFInfo)
- class amrex.space3d.MultiFab(bxs: BoxArray, dm: DistributionMapping, ncomp: int, ngrow: IntVect, info: MFInfo, factory: FabFactory_FArrayBox)
- class amrex.space3d.MultiFab(bxs: BoxArray, dm: DistributionMapping, ncomp: int, ngrow: IntVect)
- static add(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: int) None
- static add(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: IntVect) None
Helper for @overload to raise when called.
- static add_product(dst: MultiFab, src1: MultiFab, comp1: int, src2: MultiFab, comp2: int, dstcomp: int, numcomp: int, nghost: int) None
- static add_product(arg0: MultiFab, arg1: MultiFab, arg2: int, arg3: MultiFab, arg4: int, arg5: int, arg6: int, arg7: IntVect) None
Helper for @overload to raise when called.
- average_sync(arg0: Periodicity) None [source]
- contains_inf(local: bool = False) bool
- contains_inf(scomp: int, ncomp: int, ngrow: int = 0, local: bool = False) bool
- contains_inf(scomp: int, ncomp: int, ngrow: IntVect, local: bool = False) bool
Helper for @overload to raise when called.
- contains_nan(local: bool = False) bool
- contains_nan(scomp: int, ncomp: int, ngrow: int = 0, local: bool = False) bool
- contains_nan(scomp: int, ncomp: int, ngrow: IntVect, local: bool = False) bool
Helper for @overload to raise when called.
- copy()[source]
Create a copy of this MultiFab, using the same Arena.
Parameters
- selfamrex.MultiFab
A MultiFab class in pyAMReX
Returns
- amrex.MultiFab
A copy of this MultiFab.
- divi(mf: MultiFab, strt_comp: int, num_comp: int, nghost: int = 0) None [source]
This function divides the values of the cells in mf from the corresponding cells of this MultiFab. mf is required to have the same BoxArray or “valid region” as this MultiFab. The division is done only to num_comp components, starting with component number strt_comp. The parameter nghost specifies the number of boundary cells that will be modified. If nghost == 0, only the valid region of each FArrayBox will be modified. Note, nothing is done to protect against divide by zero.
- static divide(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: int) None
- static divide(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: IntVect) None
Helper for @overload to raise when called.
- static dot(x: MultiFab, xcomp: int, y: MultiFab, ycomp: int, numcomp: int, nghost: int, local: bool = False) float
- static dot(x: MultiFab, xcomp: int, numcomp: int, nghost: int, local: bool = False) float
Helper for @overload to raise when called.
- invert(numerator: float, nghost: int) None
- invert(numerator: float, comp: int, num_comp: int, nghost: int = 0) None
- invert(numerator: float, region: Box, nghost: int) None
- invert(numerator: float, region: Box, comp: int, num_comp: int, nghost: int = 0) None
Helper for @overload to raise when called.
- static lin_comb(dst: MultiFab, a: float, x: MultiFab, x_comp: int, b: float, y: MultiFab, y_comp: int, dstcomp: int, numcomp: int, nghost: int) None [source]
dst = a*x + b*y
- max(comp: int = 0, nghost: int = 0, local: bool = False) float
- max(region: Box, comp: int = 0, nghost: int = 0, local: bool = False) float
Helper for @overload to raise when called.
- min(comp: int = 0, nghost: int = 0, local: bool = False) float
- min(region: Box, comp: int = 0, nghost: int = 0, local: bool = False) float
Helper for @overload to raise when called.
- minus(mf: MultiFab, strt_comp: int, num_comp: int, nghost: int = 0) None [source]
This function subtracts the values of the cells in mf from the corresponding cells of this MultiFab. mf is required to have the same BoxArray or “valid region” as this MultiFab. The subtraction is done only to num_comp components, starting with component number strt_comp. The parameter nghost specifies the number of boundary cells that will be modified. If nghost == 0, only the valid region of each FArrayBox will be modified.
- mult(val: float, nghost: int = 0) None
- mult(val: float, comp: int, num_comp: int, nghost: int = 0) None
- mult(val: float, region: Box, comp: int, num_comp: int, nghost: int = 0) None
- mult(val: float, region: Box, nghost: int = 0) None
Helper for @overload to raise when called.
- static multiply(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: int) None
- static multiply(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: IntVect) None
Helper for @overload to raise when called.
- property n_comp: int
- property n_grow_vect: IntVect
Return the grow factor (per direction) that defines the region of definition.
- negate(nghost: int = 0) None
- negate(comp: int, num_comp: int, nghost: int = 0) None
- negate(region: Box, nghost: int = 0) None
- negate(region: Box, comp: int, num_comp: int, nghost: int = 0) None
Helper for @overload to raise when called.
- norm1(arg0: int, arg1: Periodicity, arg2: bool) float
- norm1(arg0: int, arg1: int, arg2: bool) float
- norm1(arg0: Vector_int, arg1: int, arg2: bool) Vector_Real
Helper for @overload to raise when called.
- norm2(arg0: int) float
- norm2(arg0: int, arg1: Periodicity) float
- norm2(arg0: Vector_int) Vector_Real
Helper for @overload to raise when called.
- plus(val: float, nghost: int = 0) None
- plus(val: float, comp: int, num_comp: int, nghost: int = 0) None
- plus(val: float, region: Box, nghost: int = 0) None
- plus(val: float, region: Box, comp: int, num_comp: int, nghost: int = 0) None
- plus(mf: MultiFab, strt_comp: int, num_comp: int, nghost: int = 0) None
Helper for @overload to raise when called.
- static saxpy(dst: MultiFab, a: float, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: int) None [source]
dst += a*src
- static subtract(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: int) None
- static subtract(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: IntVect) None
Helper for @overload to raise when called.
- sum(comp: int = 0, local: bool = False) float
- sum(region: Box, comp: int = 0, local: bool = False) float
Helper for @overload to raise when called.
- sum_unique(comp: int = 0, local: bool = False, period: Periodicity = ...) float
- sum_unique(region: Box, comp: int = 0, local: bool = False) float
Helper for @overload to raise when called.
- static swap(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: int) None
- static swap(dst: MultiFab, src: MultiFab, srccomp: int, dstcomp: int, numcomp: int, nghost: IntVect) None
Helper for @overload to raise when called.
- to_cupy(copy=False, order='F')[source]
Provide a CuPy view into a MultiFab.
This includes ngrow guard cells of each box.
Note on the order of indices: By default, this is as in AMReX in Fortran contiguous order, indexing as x,y,z. This has performance implications for use in external libraries such as cupy. The order=”C” option will index as z,y,x and perform better with cupy. https://github.com/AMReX-Codes/pyamrex/issues/55#issuecomment-1579610074
Parameters
- selfamrex.MultiFab
A MultiFab class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
- orderstring, optional
F order (default) or C. C is faster with external libraries.
Returns
- list of cupy.array
A list of CuPy n-dimensional arrays, for each local block in the MultiFab.
Raises
- ImportError
Raises an exception if cupy is not installed
- to_numpy(copy=False, order='F')[source]
Provide a NumPy view into a MultiFab.
This includes ngrow guard cells of each box.
Note on the order of indices: By default, this is as in AMReX in Fortran contiguous order, indexing as x,y,z. This has performance implications for use in external libraries such as cupy. The order=”C” option will index as z,y,x and perform better with cupy. https://github.com/AMReX-Codes/pyamrex/issues/55#issuecomment-1579610074
Parameters
- selfamrex.MultiFab
A MultiFab class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
- orderstring, optional
F order (default) or C. C is faster with external libraries.
Returns
- list of numpy.array
A list of NumPy n-dimensional arrays, for each local block in the MultiFab.
- to_xp(copy=False, order='F')[source]
Provide a NumPy or CuPy view into a MultiFab, depending on amr.Config.have_gpu .
This function is similar to CuPy’s xp naming suggestion for CPU/GPU agnostic code: https://docs.cupy.dev/en/stable/user_guide/basic.html#how-to-write-cpu-gpu-agnostic-code
This includes ngrow guard cells of each box.
Note on the order of indices: By default, this is as in AMReX in Fortran contiguous order, indexing as x,y,z. This has performance implications for use in external libraries such as cupy. The order=”C” option will index as z,y,x and perform better with cupy. https://github.com/AMReX-Codes/pyamrex/issues/55#issuecomment-1579610074
Parameters
- selfamrex.MultiFab
A MultiFab class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
- orderstring, optional
F order (default) or C. C is faster with external libraries.
Returns
- list of xp.array
A list of NumPy or CuPy n-dimensional arrays, for each local block in the MultiFab.
- weighted_sync(arg0: MultiFab, arg1: Periodicity) None [source]
- class amrex.space3d.MFInfo[source]
- alloc: bool
- tags: Vector_string
- class amrex.space3d.MFIter(arg0: FabArrayBase)[source]
- class amrex.space3d.MFIter(arg0: FabArrayBase, arg1: MFItInfo)
- class amrex.space3d.MFIter(arg0: MultiFab)
- class amrex.space3d.MFIter(arg0: MultiFab, arg1: MFItInfo)
-
- grownnodaltilebox(int: int = -1, ng: int = -1000000) Box
- grownnodaltilebox(int: int, ng: IntVect) Box
Helper for @overload to raise when called.
- property index: int
- property is_valid: bool
- property length: int
amrex::PODVector<T, Allocator>
is implemented for many allocators, e.g.,
- class amrex.space3d.PODVector_real_arena[source]
- class amrex.space3d.PODVector_real_arena(size: int)
- class amrex.space3d.PODVector_real_arena(other: PODVector_real_arena)
-
- resize(arg0: int) None
- resize(arg0: int, arg1: float) None
Helper for @overload to raise when called.
- to_cupy(copy=False)[source]
Provide a CuPy view into a PODVector (e.g., RealVector, IntVector).
Parameters
- selfamrex.PODVector_*
A PODVector class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- cupy.array
A 1D cupy array.
Raises
- ImportError
Raises an exception if cupy is not installed
- to_numpy(copy=False)[source]
Provide a NumPy view into a PODVector (e.g., RealVector, IntVector).
Parameters
- selfamrex.PODVector_*
A PODVector class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- np.array
A 1D NumPy array.
- to_xp(copy=False)[source]
Provide a NumPy or CuPy view into a PODVector (e.g., RealVector, IntVector), depending on amr.Config.have_gpu .
This function is similar to CuPy’s xp naming suggestion for CPU/GPU agnostic code: https://docs.cupy.dev/en/stable/user_guide/basic.html#how-to-write-cpu-gpu-agnostic-code
Parameters
- selfamrex.PODVector_*
A PODVector class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- xp.array
A 1D NumPy or CuPy array.
- class amrex.space3d.PODVector_int_pinned[source]
- class amrex.space3d.PODVector_int_pinned(size: int)
- class amrex.space3d.PODVector_int_pinned(other: PODVector_int_pinned)
-
- resize(arg0: int) None
- resize(arg0: int, arg1: int) None
Helper for @overload to raise when called.
- to_cupy(copy=False)[source]
Provide a CuPy view into a PODVector (e.g., RealVector, IntVector).
Parameters
- selfamrex.PODVector_*
A PODVector class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- cupy.array
A 1D cupy array.
Raises
- ImportError
Raises an exception if cupy is not installed
- to_host() PODVector_int_pinned [source]
- to_numpy(copy=False)[source]
Provide a NumPy view into a PODVector (e.g., RealVector, IntVector).
Parameters
- selfamrex.PODVector_*
A PODVector class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- np.array
A 1D NumPy array.
- to_xp(copy=False)[source]
Provide a NumPy or CuPy view into a PODVector (e.g., RealVector, IntVector), depending on amr.Config.have_gpu .
This function is similar to CuPy’s xp naming suggestion for CPU/GPU agnostic code: https://docs.cupy.dev/en/stable/user_guide/basic.html#how-to-write-cpu-gpu-agnostic-code
Parameters
- selfamrex.PODVector_*
A PODVector class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- xp.array
A 1D NumPy or CuPy array.
Utility
- class amrex.space3d.ParmParse(prefix: str = '')[source]
- add(arg0: str, arg1: bool) None
- add(arg0: str, arg1: int) None
- add(arg0: str, arg1: int) None
- add(arg0: str, arg1: int) None
- add(arg0: str, arg1: float) None
- add(arg0: str, arg1: float) None
- add(arg0: str, arg1: str) None
- add(arg0: str, arg1: IntVect) None
- add(arg0: str, arg1: Box) None
Helper for @overload to raise when called.
- addarr(arg0: str, arg1: list[int]) None
- addarr(arg0: str, arg1: list[int]) None
- addarr(arg0: str, arg1: list[int]) None
- addarr(arg0: str, arg1: list[float]) None
- addarr(arg0: str, arg1: list[float]) None
- addarr(arg0: str, arg1: list[str]) None
- addarr(arg0: str, arg1: list[IntVect]) None
- addarr(arg0: str, arg1: list[Box]) None
Helper for @overload to raise when called.
- amrex.space3d.concatenate(root: str, num: int, mindigits: int = 5) str [source]
Builds plotfile name
- amrex.space3d.write_single_level_plotfile(plotfilename: str, mf: MultiFab, varnames: Vector_string, geom: Geometry, time: float, level_step: int, versionName: str = 'HyperCLaw-V1.1', levelPrefix: str = 'Level_', mfPrefix: str = 'Cell', extra_dirs: Vector_string = Ellipsis) None [source]
Writes single level plotfile
AmrCore
- class amrex.space3d.AmrInfo[source]
-
- check_input: bool
- grid_eff: float
- iterate_on_new_grids: bool
- max_level: int
- n_proper: int
- refine_grid_layout: bool
- use_fixed_coarse_grids: bool
- use_fixed_upto_level: int
- use_new_chop: bool
- verbose: int
- class amrex.space3d.AmrMesh[source]
- class amrex.space3d.AmrMesh(rb: RealBox, max_level_in: int, n_cell_in: Vector_int, coord: int, ref_ratios: Vector_IntVect, is_per: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(3)])
- property finest_level: int
- property max_level: int
- ref_ratio() Vector_IntVect
- ref_ratio(arg0: int) IntVect
Helper for @overload to raise when called.
- property verbose: int
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.,
- class amrex.space3d.StructOfArrays_8_0_idcpu_default[source]
-
- get_int_data() Annotated[list[PODVector_int_std], pybind11_stubgen.typing_ext.FixedSize(0)]
- get_int_data(index: int) PODVector_int_std
Helper for @overload to raise when called.
- get_real_data() Annotated[list[PODVector_real_std], pybind11_stubgen.typing_ext.FixedSize(8)]
- get_real_data(index: int) PODVector_real_std
Helper for @overload to raise when called.
- property has_idcpu: bool
In pure SoA particle layout, idcpu is an array in the SoA
- property num_int_comps: int
Get the number of compile-time + runtime Int components
- property num_particles: int
- property num_real_comps: int
Get the number of compile-time + runtime Real components
- property num_real_particles: int
- property num_total_particles: int
- property size: int
Get the number of particles
- soa_int_comps(num_comps)[source]
Name the int components in SoA.
Parameters
- selfSoA Type
maybe unused, depending on implementation
- num_compsint
number of components to generate names for.
Returns
A list of length num_comps with values “i1”, “i2”, “i3”, …
- soa_real_comps(num_comps, spacedim=3, rotate=True)[source]
Name the ParticleReal components in SoA.
Parameters
- selfSoA Type
maybe unused, depending on implementation
- num_compsint
number of components to generate names for.
- spacedimint
AMReX dimensionality
- rotatebool = True
start with “x”, “y”, “z”, “a”, “b”, …
Returns
A list of length num_comps with values rotate=True (for pure SoA layout): - 3D: “x”, “y”, “z”, “a”, “b”, … “w”, “r0”, “r1”, … - 2D: “x”, “y”, “a”, “b”, … “w”, “r0”, “r1”, … - 1D: “x”, “a”, “b”, … “w”, “r0”, “r1”, … rotate=False (for legacy layout): - 1D-3D: “a”, “b”, … “w”, “r0”, “r1”, …
- to_cupy(copy=False)[source]
Provide CuPy views into a StructOfArrays.
Parameters
- selfamrex.StructOfArrays_*
A StructOfArrays class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- namedtuple
A tuple with real and int components that are each dicts of 1D NumPy arrays. The dictionary key order is the same as in the C++ component order. For pure SoA particle layouts, an additional component idcpu with global particle indices is populated.
Raises
- ImportError
Raises an exception if cupy is not installed
- to_numpy(copy=False)[source]
Provide NumPy views into a StructOfArrays.
Parameters
- selfamrex.StructOfArrays_*
A StructOfArrays class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- namedtuple
A tuple with real and int components that are each dicts of 1D NumPy arrays. The dictionary key order is the same as in the C++ component order. For pure SoA particle layouts, an additional component idcpu with global particle indices is populated.
- to_xp(copy=False)[source]
Provide NumPy or CuPy views into a StructOfArrays, depending on amr.Config.have_gpu .
This function is similar to CuPy’s xp naming suggestion for CPU/GPU agnostic code: https://docs.cupy.dev/en/stable/user_guide/basic.html#how-to-write-cpu-gpu-agnostic-code
Parameters
- selfamrex.StructOfArrays_*
A StructOfArrays class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- namedtuple
A tuple with real and int components that are each dicts of 1D NumPy or CuPy arrays. The dictionary key order is the same as in the C++ component order. For pure SoA particle layouts, an additional component idcpu with global particle indices is populated.
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.,
- class amrex.space3d.ParticleTile_pureSoA_8_0_default[source]
- NAI: ClassVar[int] = 0
- NAR: ClassVar[int] = 8
- property empty: bool
- get_particle_tile_data() ParticleTileData_pureSoA_8_0 [source]
- get_struct_of_arrays() StructOfArrays_8_0_idcpu_default [source]
- property num_int_comps: int
- property num_neighbor_particles: int
- property num_particles: int
- property num_real_comps: int
- property num_real_particles: int
- property num_runtime_int_comps: int
- property num_runtime_real_comps: int
- property num_total_particles: int
- push_back_int(arg0: int, arg1: int) None
- push_back_int(arg0: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(0)]) None
- push_back_int(arg0: int, arg1: int, arg2: int) None
Helper for @overload to raise when called.
- push_back_real(arg0: int, arg1: float) None
- push_back_real(arg0: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(8)]) None
- push_back_real(arg0: int, arg1: int, arg2: float) None
Helper for @overload to raise when called.
- property size: int
- swap(arg0: ParticleTile_pureSoA_8_0_default) None [source]
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.,
- class amrex.space3d.ParticleTileData_pureSoA_8_0[source]
-
- property m_num_runtime_int: int
- property m_num_runtime_real: int
- property m_size: int
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.,
- class amrex.space3d.ParticleContainer_2_1_3_1_default[source]
- class amrex.space3d.ParticleContainer_2_1_3_1_default(arg0: Geometry, arg1: DistributionMapping, arg2: BoxArray)
- class amrex.space3d.ParticleContainer_2_1_3_1_default(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_int)
- class amrex.space3d.ParticleContainer_2_1_3_1_default(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_IntVect)
- Define(arg0: Geometry, arg1: DistributionMapping, arg2: BoxArray) None
- Define(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_int) None
- Define(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_IntVect) None
Helper for @overload to raise when called.
- add_particles_at_level(particles: ParticleTile_2_1_3_1_default, level: int, ngrow: int = 0) None [source]
- property byte_spread: list[int]
- const_iterator
alias of
ParConstIter_2_1_3_1_default
- property finest_level: int
- init_one_per_cell(arg0: float, arg1: float, arg2: float, arg3: ParticleInitType_2_1_3_1) None [source]
- init_random(arg0: int, arg1: int, arg2: ParticleInitType_2_1_3_1, arg3: bool, arg4: RealBox) None [source]
- init_random_per_box(arg0: int, arg1: int, arg2: ParticleInitType_2_1_3_1) None [source]
- is_soa_particle: ClassVar[bool] = False
- iterator
alias of
ParIter_2_1_3_1_default
- num_array_int: ClassVar[int] = 1
- num_array_real: ClassVar[int] = 3
- property num_int_comps: int
The number of compile-time and runtime int components in SoA
- property num_position_components: int
- property num_real_comps: int
The number of compile-time and runtime Real components in SoA
- property num_runtime_int_comps: int
The number of runtime Int components in SoA
- property num_runtime_real_comps: int
The number of runtime Real components in SoA
- num_struct_int: ClassVar[int] = 1
- num_struct_real: ClassVar[int] = 2
- number_of_particles_at_level(level: int, only_valid: bool = True, only_local: bool = False) int [source]
- number_of_particles_in_grid(level: int, only_valid: bool = True, only_local: bool = False) Vector_Long [source]
- redistribute(lev_min: int = 0, lev_max: int = -1, nGrow: int = 0, local: int = 0, remove_negative: bool = True) None [source]
- to_df(local=True, comm=None, root_rank=0)[source]
Copy all particles into a pandas.DataFrame
Parameters
- selfamrex.ParticleContainer_*
A ParticleContainer class in pyAMReX
- localbool
MPI rank-local particles only
- commMPI Communicator
if local is False, this defaults to mpi4py.MPI.COMM_WORLD
- root_rankMPI root rank to gather to
if local is False, this defaults to 0
Returns
A concatenated pandas.DataFrame with particles from all levels.
Returns None if no particles were found. If local=False, then all ranks but the root_rank will return None.
- class amrex.space3d.ParticleContainer_pureSoA_8_0_default[source]
- class amrex.space3d.ParticleContainer_pureSoA_8_0_default(arg0: Geometry, arg1: DistributionMapping, arg2: BoxArray)
- class amrex.space3d.ParticleContainer_pureSoA_8_0_default(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_int)
- class amrex.space3d.ParticleContainer_pureSoA_8_0_default(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_IntVect)
- Define(arg0: Geometry, arg1: DistributionMapping, arg2: BoxArray) None
- Define(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_int) None
- Define(arg0: Vector_Geometry, arg1: Vector_DistributionMapping, arg2: Vector_BoxArray, arg3: Vector_IntVect) None
Helper for @overload to raise when called.
- add_particles_at_level(particles: ParticleTile_pureSoA_8_0_default, level: int, ngrow: int = 0) None [source]
- property byte_spread: list[int]
- const_iterator
alias of
ParConstIter_pureSoA_8_0_default
- property finest_level: int
- get_particles(level: int) dict[tuple[int, int], ParticleTile_pureSoA_8_0_default] [source]
- init_random(arg0: int, arg1: int, arg2: ParticleInitType_pureSoA_8_0, arg3: bool, arg4: RealBox) None [source]
- is_soa_particle: ClassVar[bool] = True
- iterator
alias of
ParIter_pureSoA_8_0_default
- num_array_int: ClassVar[int] = 0
- num_array_real: ClassVar[int] = 8
- property num_int_comps: int
The number of compile-time and runtime int components in SoA
- property num_position_components: int
- property num_real_comps: int
The number of compile-time and runtime Real components in SoA
- property num_runtime_int_comps: int
The number of runtime Int components in SoA
- property num_runtime_real_comps: int
The number of runtime Real components in SoA
- num_struct_int: ClassVar[int] = 0
- num_struct_real: ClassVar[int] = 0
- number_of_particles_at_level(level: int, only_valid: bool = True, only_local: bool = False) int [source]
- number_of_particles_in_grid(level: int, only_valid: bool = True, only_local: bool = False) Vector_Long [source]
- redistribute(lev_min: int = 0, lev_max: int = -1, nGrow: int = 0, local: int = 0, remove_negative: bool = True) None [source]
- to_df(local=True, comm=None, root_rank=0)[source]
Copy all particles into a pandas.DataFrame
Parameters
- selfamrex.ParticleContainer_*
A ParticleContainer class in pyAMReX
- localbool
MPI rank-local particles only
- commMPI Communicator
if local is False, this defaults to mpi4py.MPI.COMM_WORLD
- root_rankMPI root rank to gather to
if local is False, this defaults to 0
Returns
A concatenated pandas.DataFrame with particles from all levels.
Returns None if no particles were found. If local=False, then all ranks but the root_rank will return None.
Likewise for other classes accessible and usable on particle containers:
- class amrex.space3d.ParIter_pureSoA_8_0_default(particle_container: ParticleContainer_pureSoA_8_0_default, level: int)[source]
- is_soa_particle: ClassVar[bool] = True
- class amrex.space3d.ParConstIter_pureSoA_8_0_default(particle_container: ParticleContainer_pureSoA_8_0_default, level: int)[source]
- class amrex.space3d.ParticleInitType_2_1_3_1[source]
- int_array_data: list[int]
- int_struct_data: list[int]
- is_soa_particle: ClassVar[bool] = False
- real_array_data: list[float]
- real_struct_data: list[float]
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.,
- class amrex.space3d.ArrayOfStructs_2_1_default[source]
- back() Particle_2_1 [source]
get back member. Problem!!!!! this is perfo
- empty() bool
- empty() bool
Helper for @overload to raise when called.
- push_back(arg0: Particle_2_1) None [source]
- to_cupy(copy=False)[source]
Provide CuPy views into a ArrayOfStructs.
Parameters
- selfamrex.ArrayOfStructs_*
An ArrayOfStructs class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- namedtuple
A tuple with real and int components that are each lists of 1D NumPy arrays.
Raises
- ImportError
Raises an exception if cupy is not installed
- to_numpy(copy=False)[source]
Provide NumPy views into a ArrayOfStructs.
Parameters
- selfamrex.ArrayOfStructs_*
An ArrayOfStructs class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- namedtuple
A tuple with real and int components that are each lists of 1D NumPy arrays.
- to_xp(copy=False)[source]
Provide NumPy or CuPy views into a ArrayOfStructs, depending on amr.Config.have_gpu .
This function is similar to CuPy’s xp naming suggestion for CPU/GPU agnostic code: https://docs.cupy.dev/en/stable/user_guide/basic.html#how-to-write-cpu-gpu-agnostic-code
Parameters
- selfamrex.ArrayOfStructs_*
An ArrayOfStructs class in pyAMReX
- copybool, optional
Copy the data if true, otherwise create a view (default).
Returns
- namedtuple
A tuple with real and int components that are each lists of 1D NumPy or CuPy arrays.
amrex::Particle<T_NReal, T_NInt>
is implemented for many numbers of extra Real and Int arguments, e.g.,
- class amrex.space3d.Particle_2_1[source]
- class amrex.space3d.Particle_2_1(arg0: float, arg1: float, arg2: float)
- class amrex.space3d.Particle_2_1(arg0: float, arg1: float, arg2: float, *args)
- class amrex.space3d.Particle_2_1(arg0: float, arg1: float, arg2: float, **kwargs)
- class amrex.space3d.Particle_2_1(**kwargs)
- NInt: ClassVar[int] = 1
- NReal: ClassVar[int] = 2
- NextID() int
- NextID(arg0: int) None
Helper for @overload to raise when called.
- get_idata(arg0: int) int
- get_idata() Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(1)]
Helper for @overload to raise when called.
- get_rdata(arg0: int) float
- get_rdata() Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(2)]
Helper for @overload to raise when called.
- setPos(arg0: int, arg1: float) None
- setPos(arg0: RealVect) None
- setPos(arg0: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]) None
Helper for @overload to raise when called.
- set_idata(arg0: int, arg1: int) None
- set_idata(arg0: Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(1)]) None
Helper for @overload to raise when called.
- set_rdata(arg0: int, arg1: float) None
- set_rdata(arg0: Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(2)]) None
Helper for @overload to raise when called.
- x: float
- y: float
- z: float