Portage::Part< Mesh, State > Class Template Reference

#include <parts.h>

Public Member Functions

 Part ()=default
 Default constructor. More...
 
 Part (Mesh const &mesh, State &state, std::vector< int > const &cells)
 Construct a mesh part object. More...
 
 ~Part ()=default
 
const Mesh & mesh () const
 Get a constant reference to the underlying mesh. More...
 
const State & state () const
 Get a constant reference to the underlying state. More...
 
State & state ()
 Get a normal reference to the underlying state. More...
 
std::vector< int > const & cells () const
 Get a reference to the cell list. More...
 
bool contains (int id) const
 Check if a given entity is in the part. More...
 
const int & index (int id) const
 Retrieve relative index of given entity. More...
 
const int & size () const
 Get part size. More...
 
const double & volume (int id) const
 Get the volume of the given entity. More...
 
template<Entity_type type = Entity_type::ALL>
std::vector< int > get_neighbors (int entity) const
 Retrieve the neighbors of the given entity on mesh part. More...
 
double total_volume () const
 Compute the total volume of the part. More...
 
double compute_entity_volumes (const int *masks=nullptr)
 Compute and store volumes of each cell of the part. More...
 

Constructor & Destructor Documentation

◆ Part() [1/2]

template<class Mesh, class State>
Portage::Part< Mesh, State >::Part ( )
default

Default constructor.

◆ Part() [2/2]

template<class Mesh, class State>
Portage::Part< Mesh, State >::Part ( Mesh const &  mesh,
State &  state,
std::vector< int > const &  cells 
)
inline

Construct a mesh part object.

Parameters
meshthe mesh wrapper to use
statethe state wrapper to use
entitiesthe list of entities to remap

◆ ~Part()

template<class Mesh, class State>
Portage::Part< Mesh, State >::~Part ( )
default

Member Function Documentation

◆ cells()

template<class Mesh, class State>
std::vector<int> const& Portage::Part< Mesh, State >::cells ( ) const
inline

Get a reference to the cell list.

Returns
a reference to cell list.

◆ compute_entity_volumes()

template<class Mesh, class State>
double Portage::Part< Mesh, State >::compute_entity_volumes ( const int *  masks = nullptr)
inline

Compute and store volumes of each cell of the part.

Parameters
masksentity mask to disable some of them.
Returns
the total volume of the part.

◆ contains()

template<class Mesh, class State>
bool Portage::Part< Mesh, State >::contains ( int  id) const
inline

Check if a given entity is in the part.

Parameters
identity ID
Returns
true if so, false otherwise.

◆ get_neighbors()

template<class Mesh, class State>
template<Entity_type type = Entity_type::ALL>
std::vector<int> Portage::Part< Mesh, State >::get_neighbors ( int  entity) const
inline

Retrieve the neighbors of the given entity on mesh part.

Template Parameters
typethe entity type [ALL|PARALLEL_OWNED]
Parameters
entitythe given entity
Returns
filtered the filtered neighboring entities list.

◆ index()

template<class Mesh, class State>
const int& Portage::Part< Mesh, State >::index ( int  id) const
inline

Retrieve relative index of given entity.

Parameters
identity absolute index in mesh.
Returns
entity relative index in part.

◆ mesh()

template<class Mesh, class State>
const Mesh& Portage::Part< Mesh, State >::mesh ( ) const
inline

Get a constant reference to the underlying mesh.

Returns
a constant reference to the underlying mesh.

◆ size()

template<class Mesh, class State>
const int& Portage::Part< Mesh, State >::size ( ) const
inline

Get part size.

Returns
entities list size

◆ state() [1/2]

template<class Mesh, class State>
const State& Portage::Part< Mesh, State >::state ( ) const
inline

Get a constant reference to the underlying state.

Returns
a constant reference to the underlying state.

◆ state() [2/2]

template<class Mesh, class State>
State& Portage::Part< Mesh, State >::state ( )
inline

Get a normal reference to the underlying state.

Returns
a reference to the underlying state.

◆ total_volume()

template<class Mesh, class State>
double Portage::Part< Mesh, State >::total_volume ( ) const
inline

Compute the total volume of the part.

Returns
the total volume of the part.

◆ volume()

template<class Mesh, class State>
const double& Portage::Part< Mesh, State >::volume ( int  id) const
inline

Get the volume of the given entity.

Parameters
idthe relative index of the entity.
Returns
its volume.

The documentation for this class was generated from the following file:
  • /home/portage/portage/portage/driver/parts.h