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

Inheritance diagram for IntersectSweptBase3D:
IntersectSweptBackward3D IntersectSweptForward3D IntersectSweptOneAxis3D

Public Member Functions

 IntersectSweptBase3D ()=delete
 Disabled default constructor. More...
 
 IntersectSweptBase3D (double x0, double y0, double z0, double x1, double y1, double z1)
 Setup each test-case. More...
 
std::vector< int > search (int current) const
 Retrieve all cells incident to the faces of a given cell. More...
 
double compute_swept_volume (std::vector< Wonton::Weights_t > const &moments) const
 Compute the total swept region volume. More...
 

Static Public Member Functions

static double compute_contribution (int id, std::vector< Wonton::Weights_t > const &moments)
 Compute the given cell volume contribution. More...
 
static Wonton::Point< 3 > deduce_centroid (Wonton::Weights_t const &moment)
 Deduce the centroid coordinates from current cell moments. More...
 

Protected Types

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

Protected Attributes

Portage::NumericTolerances_t num_tols
 
double const epsilon = 1.E-14
 
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_region_volume = 4.0
 
int const nb_hex_faces = 6
 
bool verbose = false
 

Detailed Description

Fixture class for swept volume moments computation tests.

Here, we consider a 3D cartesian grid which is advected by a unique displacement vector and we aim to check the volume of each swept region 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 IntersectSweptBase3D::Intersector = Portage::IntersectSweptFace3D<Wonton::Entity_kind::CELL, Wonton::Jali_Mesh_Wrapper, Wonton::Jali_State_Wrapper, Wonton::Jali_Mesh_Wrapper>
protected

Constructor & Destructor Documentation

◆ IntersectSweptBase3D() [1/2]

IntersectSweptBase3D::IntersectSweptBase3D ( )
delete

Disabled default constructor.

◆ IntersectSweptBase3D() [2/2]

IntersectSweptBase3D::IntersectSweptBase3D ( double  x0,
double  y0,
double  z0,
double  x1,
double  y1,
double  z1 
)
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 IntersectSweptBase3D::compute_contribution ( int  id,
std::vector< Wonton::Weights_t > const &  moments 
)
inlinestatic

Compute the given cell volume contribution.

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

◆ compute_swept_volume()

double IntersectSweptBase3D::compute_swept_volume ( std::vector< Wonton::Weights_t > const &  moments) const
inline

Compute the total swept region volume.

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

◆ deduce_centroid()

static Wonton::Point<3> IntersectSweptBase3D::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> IntersectSweptBase3D::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

◆ epsilon

double const IntersectSweptBase3D::epsilon = 1.E-14
protected

◆ nb_hex_faces

int const IntersectSweptBase3D::nb_hex_faces = 6
protected

◆ num_tols

Portage::NumericTolerances_t IntersectSweptBase3D::num_tols
protected

◆ source_mesh

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

◆ source_mesh_wrapper

Wonton::Jali_Mesh_Wrapper IntersectSweptBase3D::source_mesh_wrapper
protected

◆ source_state

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

◆ source_state_wrapper

Wonton::Jali_State_Wrapper IntersectSweptBase3D::source_state_wrapper
protected

◆ target_mesh

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

◆ target_mesh_wrapper

Wonton::Jali_Mesh_Wrapper IntersectSweptBase3D::target_mesh_wrapper
protected

◆ target_state

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

◆ target_state_wrapper

Wonton::Jali_State_Wrapper IntersectSweptBase3D::target_state_wrapper
protected

◆ unit_region_volume

double const IntersectSweptBase3D::unit_region_volume = 4.0
protected

◆ verbose

bool IntersectSweptBase3D::verbose = false
protected

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