Base fixture class for any order part-by-part remap tests. More...

Inheritance diagram for PartBaseTest:
PartOrderOneTest PartOrderTwoTest

Protected Types

using Remapper = Portage::CoreDriver< 2, Wonton::Entity_kind::CELL, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper >
 
using PartPair = Portage::PartPair< 2, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper >
 

Protected Member Functions

template<bool is_source>
void create_partition (double x_min, double x_max, double y_min, double y_max)
 Create a partition based on a threshold value. More...
 
void populate_parts (double x_min, double x_max, double y_min, double y_max)
 Populate the part pairs partition. More...
 
 PartBaseTest ()
 Setup each test-case. More...
 

Protected Attributes

int nb_source_cells = 0
 
int nb_target_cells = 0
 
std::shared_ptr< Jali::Mesh > source_mesh
 
std::shared_ptr< Jali::Mesh > target_mesh
 
std::shared_ptr< Jali::State > source_state
 
std::shared_ptr< Jali::State > target_state
 
Wonton::Jali_Mesh_Wrapper source_mesh_wrapper
 
Wonton::Jali_Mesh_Wrapper target_mesh_wrapper
 
Wonton::Jali_State_Wrapper source_state_wrapper
 
Wonton::Jali_State_Wrapper target_state_wrapper
 
std::vector< PartPairparts
 
std::vector< int > source_cells [nb_parts]
 
std::vector< int > target_cells [nb_parts]
 

Static Protected Attributes

static constexpr double const upper_bound = std::numeric_limits<double>::max()
 
static constexpr double const lower_bound = std::numeric_limits<double>::min()
 
static constexpr double const epsilon = 1.E-10
 
static constexpr int const nb_parts = 2
 
static constexpr auto const CELL = Wonton::Entity_kind::CELL
 

Detailed Description

Base fixture class for any order part-by-part remap tests.

Here, source and target meshes are partitioned into two parts, and each part is remapped independently. Remapped values are then compared to the exact values given by an analytical function. Here source and target parts are perfectly aligned (no mismatch), but the target mesh is twice finer than the source mesh.

Member Typedef Documentation

◆ PartPair

using PartBaseTest::PartPair = Portage::PartPair<2, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper>
protected

◆ Remapper

using PartBaseTest::Remapper = Portage::CoreDriver< 2, Wonton::Entity_kind::CELL, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper >
protected

Constructor & Destructor Documentation

◆ PartBaseTest()

PartBaseTest::PartBaseTest ( )
inlineprotected

Setup each test-case.

It creates both source and target meshes, then computes and assigns a density field on source mesh, then creates parts couples for both source and target meshes.

Member Function Documentation

◆ create_partition()

template<bool is_source>
void PartBaseTest::create_partition ( double  x_min,
double  x_max,
double  y_min,
double  y_max 
)
inlineprotected

Create a partition based on a threshold value.

Template Parameters
is_sourcefor the source mesh?
Parameters
x_minmin centroid x-value threshold for first part.
x_maxmax centroid x-value threshold for first part.
y_minmin centroid y-value threshold for first part.
y_maxmax centroid y-value threshold for first part.

◆ populate_parts()

void PartBaseTest::populate_parts ( double  x_min,
double  x_max,
double  y_min,
double  y_max 
)
inlineprotected

Populate the part pairs partition.

Member Data Documentation

◆ CELL

constexpr auto const PartBaseTest::CELL = Wonton::Entity_kind::CELL
staticprotected

◆ epsilon

constexpr double const PartBaseTest::epsilon = 1.E-10
staticprotected

◆ lower_bound

constexpr double const PartBaseTest::lower_bound = std::numeric_limits<double>::min()
staticprotected

◆ nb_parts

constexpr int const PartBaseTest::nb_parts = 2
staticprotected

◆ nb_source_cells

int PartBaseTest::nb_source_cells = 0
protected

◆ nb_target_cells

int PartBaseTest::nb_target_cells = 0
protected

◆ parts

std::vector<PartPair> PartBaseTest::parts
protected

◆ source_cells

std::vector<int> PartBaseTest::source_cells[nb_parts]
protected

◆ source_mesh

std::shared_ptr<Jali::Mesh> PartBaseTest::source_mesh
protected

◆ source_mesh_wrapper

Wonton::Jali_Mesh_Wrapper PartBaseTest::source_mesh_wrapper
protected

◆ source_state

std::shared_ptr<Jali::State> PartBaseTest::source_state
protected

◆ source_state_wrapper

Wonton::Jali_State_Wrapper PartBaseTest::source_state_wrapper
protected

◆ target_cells

std::vector<int> PartBaseTest::target_cells[nb_parts]
protected

◆ target_mesh

std::shared_ptr<Jali::Mesh> PartBaseTest::target_mesh
protected

◆ target_mesh_wrapper

Wonton::Jali_Mesh_Wrapper PartBaseTest::target_mesh_wrapper
protected

◆ target_state

std::shared_ptr<Jali::State> PartBaseTest::target_state
protected

◆ target_state_wrapper

Wonton::Jali_State_Wrapper PartBaseTest::target_state_wrapper
protected

◆ upper_bound

constexpr double const PartBaseTest::upper_bound = std::numeric_limits<double>::max()
staticprotected

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