Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Public Member Functions | Public Attributes | List of all members
fub::amrex::PatchLevel Struct Reference

The PatchLevel represents a distributed grid containing plain simulation data without a ghost cell layer. More...

#include <PatchHierarchy.hpp>

Public Member Functions

 PatchLevel ()=default
 
 ~PatchLevel () noexcept=default
 
 PatchLevel (const PatchLevel &other)
 Creates a independent copy of the patch level. More...
 
PatchLeveloperator= (const PatchLevel &other)
 Create a copy of the other patch level, deallocate old memory and allocate new memory for the copied data. More...
 
 PatchLevel (int num, Duration tp, const ::amrex::BoxArray &ba, const ::amrex::DistributionMapping &dm, int n_components)
 Allocates arrays with specified box array and distribution mapping. More...
 
 PatchLevel (int num, Duration tp, const ::amrex::BoxArray &ba, const ::amrex::DistributionMapping &dm, const DataDescription &desc)
 Allocates arrays with specified box array and distribution mapping. More...
 
 PatchLevel (int num, Duration tp, const ::amrex::BoxArray &ba, const ::amrex::DistributionMapping &dm, int n_components, const ::amrex::FabFactory<::amrex::FArrayBox > &factory)
 Allocates arrays with specified box array and distribution mapping. More...
 
 PatchLevel (PatchLevel &&other) noexcept=default
 Moves a patch level without any allocations happening. More...
 
PatchLeveloperator= (PatchLevel &&other)=default
 Moves a patch level without any allocations happening. More...
 

Public Attributes

int level_number
 
Duration time_point
 
std::ptrdiff_t cycles
 
::amrex::BoxArray box_array
 
::amrex::DistributionMapping distribution_mapping
 
::amrex::MultiFab data
 
std::unique_ptr<::amrex::MultiFab > nodes
 
std::array< std::unique_ptr<::amrex::MultiFab >, AMREX_SPACEDIM > faces
 

Detailed Description

The PatchLevel represents a distributed grid containing plain simulation data without a ghost cell layer.

Copying a patch level object will deeply copy the data and creates a new independent patch level. This includes making duplicate objects of box array and distribution mapping and modifying the copy will not affect the original patch level in any way.

Constructor & Destructor Documentation

◆ PatchLevel() [1/6]

fub::amrex::PatchLevel::PatchLevel ( )
default

◆ ~PatchLevel()

fub::amrex::PatchLevel::~PatchLevel ( )
defaultnoexcept

◆ PatchLevel() [2/6]

fub::amrex::PatchLevel::PatchLevel ( const PatchLevel other)

Creates a independent copy of the patch level.

◆ PatchLevel() [3/6]

fub::amrex::PatchLevel::PatchLevel ( PatchLevel &&  other)
defaultnoexcept

Moves a patch level without any allocations happening.

◆ PatchLevel() [4/6]

fub::amrex::PatchLevel::PatchLevel ( int  num,
Duration  tp,
const ::amrex::BoxArray &  ba,
const ::amrex::DistributionMapping &  dm,
int  n_components 
)

Allocates arrays with specified box array and distribution mapping.

Parameters
numthe refinement level number
tpthe time point of the simulation
bathe box array of the distributed array
dmthe distribution mapping for the array
n_componentsthe number of components of the array

◆ PatchLevel() [5/6]

fub::amrex::PatchLevel::PatchLevel ( int  num,
Duration  tp,
const ::amrex::BoxArray &  ba,
const ::amrex::DistributionMapping &  dm,
const DataDescription desc 
)

Allocates arrays with specified box array and distribution mapping.

Parameters
numthe refinement level number
tpthe time point of the simulation
bathe box array of the distributed array
dmthe distribution mapping for the array
n_componentsthe number of components of the array

◆ PatchLevel() [6/6]

fub::amrex::PatchLevel::PatchLevel ( int  num,
Duration  tp,
const ::amrex::BoxArray &  ba,
const ::amrex::DistributionMapping &  dm,
int  n_components,
const ::amrex::FabFactory<::amrex::FArrayBox > &  factory 
)

Allocates arrays with specified box array and distribution mapping.

Parameters
numthe refinement level number
tpthe time point of the simulation
bathe box array of the distributed array
dmthe distribution mapping for the array
n_componentsthe number of components of the array
factorythe FAB factory, important with EB.

Member Function Documentation

◆ operator=() [1/2]

PatchLevel& fub::amrex::PatchLevel::operator= ( const PatchLevel other)

Create a copy of the other patch level, deallocate old memory and allocate new memory for the copied data.

◆ operator=() [2/2]

PatchLevel& fub::amrex::PatchLevel::operator= ( PatchLevel &&  other)
default

Moves a patch level without any allocations happening.

Member Data Documentation

◆ box_array

::amrex::BoxArray fub::amrex::PatchLevel::box_array

◆ cycles

std::ptrdiff_t fub::amrex::PatchLevel::cycles

◆ data

::amrex::MultiFab fub::amrex::PatchLevel::data

◆ distribution_mapping

::amrex::DistributionMapping fub::amrex::PatchLevel::distribution_mapping

◆ faces

std::array<std::unique_ptr<::amrex::MultiFab>, AMREX_SPACEDIM> fub::amrex::PatchLevel::faces

◆ level_number

int fub::amrex::PatchLevel::level_number

◆ nodes

std::unique_ptr<::amrex::MultiFab> fub::amrex::PatchLevel::nodes

◆ time_point

Duration fub::amrex::PatchLevel::time_point

The documentation for this struct was generated from the following file: