Fixture class for swept face moments computation tests. More...

Inheritance diagram for IntersectSweptBase2D:
IntersectSweptBackward2D IntersectSweptForward2D IntersectSweptOneAxis2D

Public Member Functions

 IntersectSweptBase2D ()=delete
 Disabled default constructor. More...
 
 IntersectSweptBase2D (double x0, double y0, double x1, double y1)
 Setup each test-case. More...
 
std::vector< int > search (int current) const
 Retrieve all cells incident to the faces of a given cell. More...
 

Static Public Member Functions

static double compute_swept_area (std::vector< Wonton::Weights_t > const &moments)
 Compute the total swept faces areas. More...
 
static double compute_contribution (int id, std::vector< Wonton::Weights_t > const &moments)
 Compute the given cell area contribution. More...
 
static Wonton::Point< 2 > deduce_centroid (Wonton::Weights_t const &moment)
 Deduce the centroid coordinates from current cell moments. More...
 

Protected Types

using Intersector = Portage::IntersectSweptFace2D< Wonton::Entity_kind::CELL, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper, Wonton::Jali_Mesh_Wrapper >
 

Protected Attributes

Portage::NumericTolerances_t num_tols
 
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
 
double const unit_face_area = 2.0
 
bool verbose = false
 

Detailed Description

Fixture class for swept face moments computation tests.

Here, we consider a 2D cartesian grid which is advected by a unique displacement vector and we aim to check the volume of each swept face for a given source cell. Notice that mesh topology remains unchanged, hence source and target cells and faces indices are kept.

Member Typedef Documentation

◆ Intersector

using IntersectSweptBase2D::Intersector = Portage::IntersectSweptFace2D<Wonton::Entity_kind::CELL, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper, Wonton::Jali_Mesh_Wrapper>
protected

Constructor & Destructor Documentation

◆ IntersectSweptBase2D() [1/2]

IntersectSweptBase2D::IntersectSweptBase2D ( )
delete

Disabled default constructor.

◆ IntersectSweptBase2D() [2/2]

IntersectSweptBase2D::IntersectSweptBase2D ( double  x0,
double  y0,
double  x1,
double  y1 
)
inline

Setup each test-case.

It initializes both source and target meshes and states, then computes and assigns a density field on source mesh.

Member Function Documentation

◆ compute_contribution()

static double IntersectSweptBase2D::compute_contribution ( int  id,
std::vector< Wonton::Weights_t > const &  moments 
)
inlinestatic

Compute the given cell area contribution.

Parameters
idcell index.
momentslist of previously computed moments.
Returns
the area contribution of the given cell.

◆ compute_swept_area()

static double IntersectSweptBase2D::compute_swept_area ( std::vector< Wonton::Weights_t > const &  moments)
inlinestatic

Compute the total swept faces areas.

Parameters
momentslist of previously computed moments.
Returns
: the total area of all swept faces.

◆ deduce_centroid()

static Wonton::Point<2> IntersectSweptBase2D::deduce_centroid ( Wonton::Weights_t const &  moment)
inlinestatic

Deduce the centroid coordinates from current cell moments.

Parameters
momentcurrent cell moments
Returns
its centroid coordinates

◆ search()

std::vector<int> IntersectSweptBase2D::search ( int  current) const
inline

Retrieve all cells incident to the faces of a given cell.

Parameters
cellthe current cell.
Returns
a list of cell neighbors incident to the faces of that cell.

Member Data Documentation

◆ num_tols

Portage::NumericTolerances_t IntersectSweptBase2D::num_tols
protected

◆ source_mesh

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

◆ source_mesh_wrapper

Wonton::Jali_Mesh_Wrapper IntersectSweptBase2D::source_mesh_wrapper
protected

◆ source_state

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

◆ source_state_wrapper

Wonton::Jali_State_Wrapper IntersectSweptBase2D::source_state_wrapper
protected

◆ target_mesh

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

◆ target_mesh_wrapper

Wonton::Jali_Mesh_Wrapper IntersectSweptBase2D::target_mesh_wrapper
protected

◆ target_state

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

◆ target_state_wrapper

Wonton::Jali_State_Wrapper IntersectSweptBase2D::target_state_wrapper
protected

◆ unit_face_area

double const IntersectSweptBase2D::unit_face_area = 2.0
protected

◆ verbose

bool IntersectSweptBase2D::verbose = false
protected

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