|
WarpX
|
#include <MultiFabRegister.H>
Public Member Functions | |
| MultiFabRegister ()=default | |
| MultiFabRegister (MultiFabRegister const &)=delete | |
| MultiFabRegister (MultiFabRegister &&)=delete | |
| MultiFabRegister & | operator= (MultiFabRegister const &)=delete |
| MultiFabRegister & | operator= (MultiFabRegister &&)=delete |
| ~MultiFabRegister ()=default | |
| template<typename T> | |
| amrex::MultiFab * | alloc_init (T name, int level, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm, int ncomp, amrex::IntVect const &ngrow, std::optional< amrex::Real const > initial_value=std::nullopt, bool remake=true, bool redistribute_on_remake=true) |
| template<typename T> | |
| amrex::MultiFab * | alloc_init (T name, Direction dir, int level, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm, int ncomp, amrex::IntVect const &ngrow, std::optional< amrex::Real const > initial_value=std::nullopt, bool remake=true, bool redistribute_on_remake=true) |
| template<typename N, typename A> | |
| amrex::MultiFab * | alias_init (N new_name, A alias_name, int level, std::optional< amrex::Real const > initial_value=std::nullopt) |
| template<typename N, typename A> | |
| amrex::MultiFab * | alias_init (N new_name, A alias_name, Direction dir, int level, std::optional< amrex::Real const > initial_value=std::nullopt) |
| template<typename T> | |
| bool | has (T name, int level) const |
| template<typename T> | |
| bool | has (T name, Direction dir, int level) const |
| template<typename T> | |
| bool | has_vector (T name, int level) const |
| template<typename T> | |
| amrex::MultiFab * | get (T name, int level) |
| template<typename T> | |
| amrex::MultiFab * | get (T name, Direction dir, int level) |
| template<typename T> | |
| amrex::MultiFab const * | get (T name, int level) const |
| template<typename T> | |
| amrex::MultiFab const * | get (T name, Direction dir, int level) const |
| template<typename T> | |
| MultiLevelScalarField | get_mr_levels (T name, int finest_level, bool skip_level_0=false) |
| template<typename T> | |
| ConstMultiLevelScalarField | get_mr_levels (T name, int finest_level, bool skip_level_0=false) const |
| template<typename T> | |
| VectorField | get_alldirs (T name, int level) |
| template<typename T> | |
| ConstVectorField | get_alldirs (T name, int level) const |
| template<typename T> | |
| MultiLevelVectorField | get_mr_levels_alldirs (T name, int finest_level, bool skip_level_0=false) |
| template<typename T> | |
| ConstMultiLevelVectorField | get_mr_levels_alldirs (T name, int finest_level, bool skip_level_0=false) const |
| std::vector< std::string > | list () const |
| template<typename T> | |
| void | erase (T name, int level) |
| template<typename T> | |
| void | erase (T name, Direction dir, int level) |
| void | clear_level (int level) |
| void | remake_level (int other_level, amrex::DistributionMapping const &new_dm) |
| std::string | mf_name (std::string name, int level) const |
| std::string | mf_name (std::string name, Direction dir, int level) const |
| bool | internal_has (std::string const &internal_name) |
| amrex::MultiFab * | internal_get (std::string const &internal_name) |
Static Public Attributes | |
| static std::vector< Direction > | m_all_dirs |
Private Member Functions | |
| amrex::MultiFab const * | internal_get (std::string const &internal_name) const |
| amrex::MultiFab * | internal_alloc_init (std::string const &name, int level, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm, int ncomp, amrex::IntVect const &ngrow, std::optional< amrex::Real const > initial_value=std::nullopt, bool remake=true, bool redistribute_on_remake=true) |
| amrex::MultiFab * | internal_alloc_init (std::string const &name, Direction dir, int level, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm, int ncomp, amrex::IntVect const &ngrow, std::optional< amrex::Real const > initial_value=std::nullopt, bool remake=true, bool redistribute_on_remake=true) |
| amrex::MultiFab * | internal_alias_init (std::string const &new_name, std::string const &alias_name, int level, std::optional< amrex::Real const > initial_value=std::nullopt) |
| amrex::MultiFab * | internal_alias_init (std::string const &new_name, std::string const &alias_name, Direction dir, int level, std::optional< amrex::Real const > initial_value=std::nullopt) |
| bool | internal_has (std::string const &name, int level) const |
| bool | internal_has (std::string const &name, Direction dir, int level) const |
| bool | internal_has_vector (std::string const &name, int level) const |
| amrex::MultiFab * | internal_get (std::string const &name, int level) |
| amrex::MultiFab const * | internal_get (std::string const &name, int level) const |
| amrex::MultiFab * | internal_get (std::string const &name, Direction dir, int level) |
| amrex::MultiFab const * | internal_get (std::string const &name, Direction dir, int level) const |
| MultiLevelScalarField | internal_get_mr_levels (std::string const &name, int finest_level, bool skip_level_0) |
| ConstMultiLevelScalarField | internal_get_mr_levels (std::string const &name, int finest_level, bool skip_level_0) const |
| VectorField | internal_get_alldirs (std::string const &name, int level) |
| ConstVectorField | internal_get_alldirs (std::string const &name, int level) const |
| MultiLevelVectorField | internal_get_mr_levels_alldirs (std::string const &name, int finest_level, bool skip_level_0) |
| ConstMultiLevelVectorField | internal_get_mr_levels_alldirs (std::string const &name, int finest_level, bool skip_level_0) const |
| void | internal_erase (std::string const &name, int level) |
| void | internal_erase (std::string const &name, Direction dir, int level) |
Private Attributes | |
| std::map< std::string, MultiFabOwner > | m_mf_register |
This is a register of fields aka amrex::MultiFabs.
This is owned by a simulation instance. All used fields should be registered here. Internally, this contains
|
default |
|
delete |
|
delete |
|
default |
|
inline |
Create an alias of a MultiFab (field)
Registers a new name for an existing MultiFab (field) and optionally assigning a value.
| new_name | new name |
| alias_name | owner name to alias |
| dir | the field component for vector fields ("direction" of the unit vector) both in the alias and aliased |
| level | the MR level to represent |
| initial_value | the optional value to assign |
|
inline |
Create an alias of a MultiFab (field)
Registers a new name for an existing MultiFab (field) and optionally assigning a value.
| new_name | new name |
| alias_name | owner name to alias |
| level | the MR level to represent |
| initial_value | the optional value to assign |
|
inline |
Allocate and optionally initialize a MultiFab (field)
This registers a new MultiFab under a unique name, allocates it and optionally assigns it an initial value.
| name | a unique name for this field |
| dir | the field component for vector fields ("direction" of the unit vector) |
| level | the MR level to represent |
| ba | the list of boxes to cover the field |
| dm | the distribution mapping for load balancing with MPI |
| ncomp | the number of components of the field (all with the same staggering) |
| ngrow | the number of guard (ghost, halo) cells |
| initial_value | the optional initial value |
| remake | follow the default domain decomposition of the simulation |
| redistribute_on_remake | redistribute on |
|
inline |
Allocate and optionally initialize a MultiFab (field)
This registers a new MultiFab under a unique name, allocates it and optionally assigns it an initial value.
| name | a unique name for this field |
| level | the MR level to represent |
| ba | the list of boxes to cover the field |
| dm | the distribution mapping for load balancing with MPI |
| ncomp | the number of components of the field (all with the same staggering) |
| ngrow | the number of guard (ghost, halo) cells |
| initial_value | the optional initial value |
| remake | follow the default domain decomposition of the simulation |
| redistribute_on_remake | redistribute on |
| void ablastr::fields::MultiFabRegister::clear_level | ( | int | level | ) |
Erase all MultiFabs on a specific MR level.
Calls
| level | the MR level to erase all MultiFabs from |
|
inline |
Deallocate and remove a vector field component.
| name | the name of the field |
| dir | the field component for vector fields ("direction" of the unit vector) |
| level | the MR level |
|
inline |
Deallocate and remove a scalar field.
| name | the name of the field |
| level | the MR level |
|
inlinenodiscard |
Return a MultiFab that is part of a vector/tensor field.
This throws a runtime error if the requested field is not present.
| name | the name of the field |
| dir | the field component for vector fields ("direction" of the unit vector) |
| level | the MR level |
|
inlinenodiscard |
Return a MultiFab that is part of a vector/tensor field.
This throws a runtime error if the requested field is not present.
| name | the name of the field |
| dir | the field component for vector fields ("direction" of the unit vector) |
| level | the MR level |
|
inlinenodiscard |
Return a scalar MultiFab (field).
This throws a runtime error if the requested field is not present.
| name | the name of the field |
| level | the MR level |
|
inlinenodiscard |
Return a scalar MultiFab (field).
This throws a runtime error if the requested field is not present.
| name | the name of the field |
| level | the MR level |
|
inlinenodiscard |
title
Same as get above, but returns all levels for a name.
| name | the name of the field |
| level | the MR level |
|
inlinenodiscard |
|
inlinenodiscard |
Return the MultiFab of a scalar field on all MR levels.
This throws a runtime error if the requested field is not present.
| name | the name of the field |
| finest_level | the highest MR level to return |
| skip_level_0 | return a nullptr for level 0 |
|
inlinenodiscard |
|
inlinenodiscard |
Return a vector field on all MR levels.
Out loop: MR levels. Inner loop: directions (components).
| name | the name of the field |
| finest_level | the highest MR level to return |
| skip_level_0 | return a nullptr for level 0 |
|
inlinenodiscard |
|
inlinenodiscard |
Check if a MultiFab that is part of a vector/tensor field is registered.
| name | the name to check if registered |
| dir | the field component for vector fields ("direction" of the unit vector) |
| level | the MR level to check |
|
inlinenodiscard |
Check if a scalar MultiFab (field) is registered.
| name | the name to check if registered |
| level | the MR level to check |
|
inlinenodiscard |
Check if a MultiFab vector field is registered.
| name | the name to check if registered |
| level | the MR level to check |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
nodiscard |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscard |
Temporary test function for legacy Python bindings
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscardprivate |
|
nodiscard |
List the internal names of all registered fields.
|
nodiscard |
Create the register name of vector field, component direction and MR level
| name | the name of the field |
| dir | the field component for vector fields ("direction" of the unit vector) |
| level | the MR level |
|
nodiscard |
Create the register name of scalar field and MR level
| name | the name of the field |
| level | the MR level |
|
delete |
|
delete |
| void ablastr::fields::MultiFabRegister::remake_level | ( | int | other_level, |
| amrex::DistributionMapping const & | new_dm ) |
Remake all (i)MultiFab with a new distribution mapping.
If redistribute is true, we also copy from the old data into the new.
| other_level | the MR level to erase all MultiFabs from |
| new_dm | new distribution mapping |
|
inlinestatic |
The directions of a vector field as stored in the simulation.
Cartesian: always x,y,z in any ND RZ: r,t(heta),z (r,z over azimuthal modes) RCylinder: r,t(heta),z RSphere: r,t(heta),p(hi)
|
private |
data storage: ownership and lifetime control