Block-Structured AMR Software Framework
amrex::NonLocalBC::SwapComponents< I, J > Struct Template Reference

This is a permutation where only two components are swapped. More...

#include <AMReX_NonLocalBC.H>

Public Member Functions

constexpr int operator() (int i) const noexcept
 Swaps indices I and J. More...
 

Detailed Description

template<int I, int J>
struct amrex::NonLocalBC::SwapComponents< I, J >

This is a permutation where only two components are swapped.

This class is used with MapComponents to define fab projections that swap components on FABs, e.g. for velocity components. The template arguments I, J should be greater or equal to -1. The value -1 indicates run-time values and increase the object size of this function object.

Member Function Documentation

◆ operator()()

template<int I, int J>
constexpr int amrex::NonLocalBC::SwapComponents< I, J >::operator() ( int  i) const
inlineconstexprnoexcept

Swaps indices I and J.

Returns
If i == I then return J. If i == J then return I. Otherwise returns i.

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