Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::NonLocalBC::SwapComponents< CompI, CompJ > 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 CompI and CompJ.
 

Detailed Description

template<int CompI, int CompJ>
struct amrex::NonLocalBC::SwapComponents< CompI, CompJ >

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 CompI, CompJ 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 CompI, int CompJ>
constexpr int amrex::NonLocalBC::SwapComponents< CompI, CompJ >::operator() ( int  i) const
inlineconstexprnoexcept

Swaps indices CompI and CompJ.

Returns
If i == CompI then return CompJ. If i == CompJ then return CompI. Otherwise returns i.

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