ThunderEgg  1.0.0
ThunderEgg::DomainTools Class Reference

Various tools for filling in values in a domain. More...

#include <DomainTools.h>

Static Public Member Functions

template<int D>
static void GetRealCoord (const PatchInfo< D > &pinfo, const std::array< int, D > &coord, std::array< double, D > &real_coord)
 Given a path info object, get the coordinate from a given index into the patch. More...
 
template<int D>
static void GetRealCoordGhost (const PatchInfo< D > &pinfo, const std::array< int, D > &coord, std::array< double, D > &real_coord)
 Given a path info object, get the coordinate from a given index into the patch. More...
 
template<int D>
static void GetRealCoordBound (const PatchInfo< D > &pinfo, const std::array< int, D - 1 > &coord, Side< D > s, std::array< double, D > &real_coord)
 Given a path info object and a side of the patch, get the coordinate from a given index into the interface of the patch. More...
 
template<int D>
static void SetValues (const Domain< D > &domain, Vector< D > &vec, int component_index, std::function< double(const std::array< double,(int) D > &)> func)
 Set the values for a vector with the given function. More...
 
static void SetValues (const Domain< 3 > &domain, Vector< 3 > &vec, int component_index, std::function< double(double, double, double)> func)
 Set the values for a vector with the given function. More...
 
static void SetValues (const Domain< 2 > &domain, Vector< 2 > &vec, int component_index, std::function< double(double, double)> func)
 Set the values for a vector with the given function. More...
 
static void SetValues (const Domain< 1 > &domain, Vector< 1 > &vec, int component_index, std::function< double(double)> func)
 Set the values for a vector with the given function. More...
 
template<int D, typename... Args>
static void SetValues (const Domain< D > &domain, Vector< D > &vec, std::function< double(const std::array< double, D > &)> func, Args... args)
 Set the values for a vector with the given functions. More...
 
template<int D>
static void SetValuesWithGhost (const Domain< D > &domain, Vector< D > &vec, int component_index, std::function< double(const std::array< double,(int) D > &)> func)
 Set the values (including ghost values) for a vector with the given function. More...
 
static void SetValuesWithGhost (const Domain< 3 > &domain, Vector< 3 > &vec, int component_index, std::function< double(double, double, double)> func)
 Set the values (including ghost values) for a vector with the given function. More...
 
static void SetValuesWithGhost (const Domain< 2 > &domain, Vector< 2 > &vec, int component_index, std::function< double(double, double)> func)
 Set the values (including ghost values) for a vector with the given function. More...
 
static void SetValuesWithGhost (const Domain< 1 > &domain, Vector< 1 > &vec, int component_index, std::function< double(double)> func)
 Set the values (including ghost values) for a vector with the given function. More...
 
template<int D, typename... Args>
static void SetValuesWithGhost (const Domain< D > &domain, Vector< D > &vec, std::function< double(const std::array< double, D > &)> func, Args... args)
 Set the values (including ghost values) for a vector with the given functions. More...
 
template<typename... Args>
static void SetValuesWithGhost (const Domain< 3 > &domain, Vector< 3 > &vec, std::function< double(double, double, double)> func, Args... args)
 Set the values (including ghost values) for a vector with the given functions. More...
 
template<int D>
static double Integrate (const Domain< D > &domain, const Vector< D > &u)
 Integrate a vector over the domain. More...
 

Detailed Description

Various tools for filling in values in a domain.

Member Function Documentation

◆ GetRealCoord()

template<int D>
static void ThunderEgg::DomainTools::GetRealCoord ( const PatchInfo< D > &  pinfo,
const std::array< int, D > &  coord,
std::array< double, D > &  real_coord 
)
inlinestatic

Given a path info object, get the coordinate from a given index into the patch.

If one of the values is -1 or ns[axis] it will give the coordinate of the cooresponding interface

Template Parameters
Dthe number of cartesian dimensions
Parameters
pinfothe patch to get the coordinate for
coordthe index in the patch
real_coord(output) the coordnitate of the index

◆ GetRealCoordBound()

template<int D>
static void ThunderEgg::DomainTools::GetRealCoordBound ( const PatchInfo< D > &  pinfo,
const std::array< int, D - 1 > &  coord,
Side< D >  s,
std::array< double, D > &  real_coord 
)
inlinestatic

Given a path info object and a side of the patch, get the coordinate from a given index into the interface of the patch.

Template Parameters
Dthe number of cartesian dimensions
Parameters
pinfothe patch to get the coordinate for
coordthe index in the patch
sthe side of the patch that the boundary is on
real_coord(output) the coordnitate of the index

◆ GetRealCoordGhost()

template<int D>
static void ThunderEgg::DomainTools::GetRealCoordGhost ( const PatchInfo< D > &  pinfo,
const std::array< int, D > &  coord,
std::array< double, D > &  real_coord 
)
inlinestatic

Given a path info object, get the coordinate from a given index into the patch.

Template Parameters
Dthe number of cartesian dimensions
Parameters
pinfothe patch to get the coordinate for
coordthe index in the patch
real_coord(output) the coordnitate of the index

◆ Integrate()

template<int D>
static double ThunderEgg::DomainTools::Integrate ( const Domain< D > &  domain,
const Vector< D > &  u 
)
inlinestatic

Integrate a vector over the domain.

Parameters
uthe vector
Returns
double the result of the integral

◆ SetValues() [1/5]

static void ThunderEgg::DomainTools::SetValues ( const Domain< 1 > &  domain,
Vector< 1 > &  vec,
int  component_index,
std::function< double(double)>  func 
)
inlinestatic

Set the values for a vector with the given function.

Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValues() [2/5]

static void ThunderEgg::DomainTools::SetValues ( const Domain< 2 > &  domain,
Vector< 2 > &  vec,
int  component_index,
std::function< double(double, double)>  func 
)
inlinestatic

Set the values for a vector with the given function.

Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValues() [3/5]

static void ThunderEgg::DomainTools::SetValues ( const Domain< 3 > &  domain,
Vector< 3 > &  vec,
int  component_index,
std::function< double(double, double, double)>  func 
)
inlinestatic

Set the values for a vector with the given function.

Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValues() [4/5]

template<int D>
static void ThunderEgg::DomainTools::SetValues ( const Domain< D > &  domain,
Vector< D > &  vec,
int  component_index,
std::function< double(const std::array< double,(int) D > &)>  func 
)
inlinestatic

Set the values for a vector with the given function.

Template Parameters
Dthe number of cartesian dimensions
Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValues() [5/5]

template<int D, typename... Args>
static void ThunderEgg::DomainTools::SetValues ( const Domain< D > &  domain,
Vector< D > &  vec,
std::function< double(const std::array< double, D > &)>  func,
Args...  args 
)
inlinestatic

Set the values for a vector with the given functions.

Template Parameters
Dthe number of cartesian dimensions
Argsadditional functions
Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function
argsadditional functions for additional components

◆ SetValuesWithGhost() [1/6]

static void ThunderEgg::DomainTools::SetValuesWithGhost ( const Domain< 1 > &  domain,
Vector< 1 > &  vec,
int  component_index,
std::function< double(double)>  func 
)
inlinestatic

Set the values (including ghost values) for a vector with the given function.

Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValuesWithGhost() [2/6]

static void ThunderEgg::DomainTools::SetValuesWithGhost ( const Domain< 2 > &  domain,
Vector< 2 > &  vec,
int  component_index,
std::function< double(double, double)>  func 
)
inlinestatic

Set the values (including ghost values) for a vector with the given function.

Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValuesWithGhost() [3/6]

static void ThunderEgg::DomainTools::SetValuesWithGhost ( const Domain< 3 > &  domain,
Vector< 3 > &  vec,
int  component_index,
std::function< double(double, double, double)>  func 
)
inlinestatic

Set the values (including ghost values) for a vector with the given function.

Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValuesWithGhost() [4/6]

template<typename... Args>
static void ThunderEgg::DomainTools::SetValuesWithGhost ( const Domain< 3 > &  domain,
Vector< 3 > &  vec,
std::function< double(double, double, double)>  func,
Args...  args 
)
inlinestatic

Set the values (including ghost values) for a vector with the given functions.

Template Parameters
Argsadditional functions
Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function
argsadditional functions for additional components

◆ SetValuesWithGhost() [5/6]

template<int D>
static void ThunderEgg::DomainTools::SetValuesWithGhost ( const Domain< D > &  domain,
Vector< D > &  vec,
int  component_index,
std::function< double(const std::array< double,(int) D > &)>  func 
)
inlinestatic

Set the values (including ghost values) for a vector with the given function.

Template Parameters
Dthe number of cartesian dimensions
Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function

◆ SetValuesWithGhost() [6/6]

template<int D, typename... Args>
static void ThunderEgg::DomainTools::SetValuesWithGhost ( const Domain< D > &  domain,
Vector< D > &  vec,
std::function< double(const std::array< double, D > &)>  func,
Args...  args 
)
inlinestatic

Set the values (including ghost values) for a vector with the given functions.

Template Parameters
Dthe number of cartesian dimensions
Tfunction type
Argsadditional functions
Parameters
domainthe domain that we are setting values for
vecthe vector to set values in
component_indexthe component to set
functhe function
argsadditional functions for additional components

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