Block-Structured AMR Software Framework
amrex::NonLocalBC::MultiBlockIndexMapping Struct Reference

This struct describes an affine index transformation for two coordinate systems. More...

#include <AMReX_NonLocalBC.H>

Public Member Functions

AMREX_GPU_HOST_DEVICE Dim3 operator() (Dim3 i) const noexcept
 Applies this mapping on the index from destination space and returns an index in the source space. More...
 
AMREX_GPU_HOST_DEVICE Dim3 Inverse (Dim3 i) const noexcept
 The inverse function is given by rearringing all above terms. More...
 
IndexType operator() (IndexType it) const noexcept
 
IndexType Inverse (IndexType it) const noexcept
 

Public Attributes

IntVect permutation {AMREX_D_DECL(0, 1, 2)}
 This vector needs to be a valid permutation. More...
 
IntVect offset {AMREX_D_DECL(0, 0, 0)}
 The offset in the source index space. More...
 
IntVect sign {AMREX_D_DECL(1, 1, 1)}
 A vector of 1 and -1 describing the orientation in each component. More...
 

Detailed Description

This struct describes an affine index transformation for two coordinate systems.

This DTOS is used to map indices from one block to another. It respects a permutation of (x,y,z) coordinates, an offset and a change in orientation.

Member Function Documentation

◆ Inverse() [1/2]

AMREX_GPU_HOST_DEVICE Dim3 amrex::NonLocalBC::MultiBlockIndexMapping::Inverse ( Dim3  i) const
inlinenoexcept

The inverse function is given by rearringing all above terms.

Parameters
[in]iThe index that lives in the source space.
Returns
Returns an index in the destination space that is given by this affine transformation.

◆ Inverse() [2/2]

IndexType amrex::NonLocalBC::MultiBlockIndexMapping::Inverse ( IndexType  it) const
inlinenoexcept

◆ operator()() [1/2]

AMREX_GPU_HOST_DEVICE Dim3 amrex::NonLocalBC::MultiBlockIndexMapping::operator() ( Dim3  i) const
inlinenoexcept

Applies this mapping on the index from destination space and returns an index in the source space.

Parameters
[in]iThe index that lives in the destination space.
Returns
Returns an index in the source space that is given by this affine transformation.

◆ operator()() [2/2]

IndexType amrex::NonLocalBC::MultiBlockIndexMapping::operator() ( IndexType  it) const
inlinenoexcept

Member Data Documentation

◆ offset

IntVect amrex::NonLocalBC::MultiBlockIndexMapping::offset {AMREX_D_DECL(0, 0, 0)}

The offset in the source index space.

◆ permutation

IntVect amrex::NonLocalBC::MultiBlockIndexMapping::permutation {AMREX_D_DECL(0, 1, 2)}

This vector needs to be a valid permutation.

◆ sign

IntVect amrex::NonLocalBC::MultiBlockIndexMapping::sign {AMREX_D_DECL(1, 1, 1)}

A vector of 1 and -1 describing the orientation in each component.


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