LifeV
MeshColoring Class Reference

MeshData - class for coloring mesh. More...

#include <MeshColoring.hpp>

+ Collaboration diagram for MeshColoring:

Public Types

typedef RegionMesh< LinearTetramesh_Type
 
typedef std::shared_ptr< mesh_TypemeshPtr_Type
 
typedef Epetra_Comm comm_Type
 
typedef std::shared_ptr< comm_TypecommPtr_Type
 
typedef VectorEpetra vector_Type
 
typedef std::shared_ptr< vector_TypevectorPtr_Type
 

Private Attributes

meshPtr_Type M_mesh
 
commPtr_Type M_comm
 
std::vector< std::vector< UInt > > M_volumesToNodes
 
std::vector< std::vector< UInt > > M_nodesToVolumes
 
std::vector< UIntM_numNeighbors
 
UInt M_maxNumNeighbors
 
UInt M_indexNodeMaxNumNeighbors
 
std::vector< int > M_colors
 
UInt M_numColors
 
std::vector< std::vector< UInt > > M_volumesToVolumes
 
vectorPtr_Type M_vectorColors
 
std::vector< std::vector< UInt > > M_colorsForAssembly
 

Constructors & Destructor

 MeshColoring (const commPtr_Type &communicator)
 Empty Constructor. More...
 
 ~MeshColoring ()
 Destructor. More...
 

Methods

void printNodesToVolumes ()
 Print node to volume connections. More...
 
void printVolumesToNodes ()
 Print volume to node connections. More...
 
void printNumNeighbors ()
 Print number of element neighbors per node. More...
 
void printVolumesToVolumes ()
 Print volume to volume connections. More...
 
void printColors ()
 Print vector of colors. More...
 
int performCheck ()
 Check if colors have been assigned correctly. More...
 
void setup ()
 Initial setup of the class. More...
 
void colorMesh ()
 Perform the coloring of the mesh. More...
 
void colorsForAssembly ()
 Vector of colors for the assembly. More...
 
void printColorsForAssembly ()
 Vector of colors used in the assembly. More...
 
void printInfo ()
 Info about coloring. More...
 

Set Methods

void setMesh (const meshPtr_Type &local_mesh)
 Set the mesh. More...
 

Get Methods

vectorPtr_Type getColors ()
 Get the VectorEpetra with colors. More...
 
std::vector< std::vector< UInt > > getColorsForAssembly ()
 

Detailed Description

MeshData - class for coloring mesh.

Author
D. Forti

The class color the mesh

Definition at line 52 of file MeshColoring.hpp.

Member Typedef Documentation

◆ mesh_Type

Definition at line 56 of file MeshColoring.hpp.

◆ meshPtr_Type

typedef std::shared_ptr<mesh_Type> meshPtr_Type

Definition at line 57 of file MeshColoring.hpp.

◆ comm_Type

typedef Epetra_Comm comm_Type

Definition at line 59 of file MeshColoring.hpp.

◆ commPtr_Type

typedef std::shared_ptr< comm_Type > commPtr_Type

Definition at line 60 of file MeshColoring.hpp.

◆ vector_Type

Definition at line 62 of file MeshColoring.hpp.

◆ vectorPtr_Type

typedef std::shared_ptr< vector_Type > vectorPtr_Type

Definition at line 63 of file MeshColoring.hpp.

Constructor & Destructor Documentation

◆ MeshColoring()

MeshColoring ( const commPtr_Type communicator)

Empty Constructor.

Definition at line 7 of file MeshColoring.cpp.

◆ ~MeshColoring()

Destructor.

Definition at line 12 of file MeshColoring.cpp.

Member Function Documentation

◆ printNodesToVolumes()

void printNodesToVolumes ( )

Print node to volume connections.

Definition at line 172 of file MeshColoring.cpp.

◆ printVolumesToNodes()

void printVolumesToNodes ( )

Print volume to node connections.

Definition at line 185 of file MeshColoring.cpp.

◆ printNumNeighbors()

void printNumNeighbors ( )

Print number of element neighbors per node.

Definition at line 198 of file MeshColoring.cpp.

◆ printVolumesToVolumes()

void printVolumesToVolumes ( )

Print volume to volume connections.

Definition at line 159 of file MeshColoring.cpp.

◆ printColors()

void printColors ( )

Print vector of colors.

Definition at line 206 of file MeshColoring.cpp.

◆ performCheck()

int performCheck ( )

Check if colors have been assigned correctly.

Returns
integer to check if there have been errors

Definition at line 218 of file MeshColoring.cpp.

◆ setup()

void setup ( )

Initial setup of the class.

Definition at line 21 of file MeshColoring.cpp.

◆ colorMesh()

void colorMesh ( )

Perform the coloring of the mesh.

Definition at line 93 of file MeshColoring.cpp.

◆ colorsForAssembly()

void colorsForAssembly ( )

Vector of colors for the assembly.

Definition at line 148 of file MeshColoring.cpp.

+ Here is the caller graph for this function:

◆ printColorsForAssembly()

void printColorsForAssembly ( )

Vector of colors used in the assembly.

Definition at line 247 of file MeshColoring.cpp.

◆ printInfo()

void printInfo ( )

Info about coloring.

Definition at line 264 of file MeshColoring.cpp.

◆ setMesh()

void setMesh ( const meshPtr_Type local_mesh)

Set the mesh.

Parameters
meshmesh to be colored

Definition at line 16 of file MeshColoring.cpp.

◆ getColors()

vectorPtr_Type getColors ( )
inline

Get the VectorEpetra with colors.

Returns
Vector of colors

Definition at line 139 of file MeshColoring.hpp.

◆ getColorsForAssembly()

std::vector<std::vector<UInt> > getColorsForAssembly ( )
inline

Definition at line 141 of file MeshColoring.hpp.

Field Documentation

◆ M_mesh

meshPtr_Type M_mesh
private

Definition at line 148 of file MeshColoring.hpp.

◆ M_comm

commPtr_Type M_comm
private

Definition at line 151 of file MeshColoring.hpp.

◆ M_volumesToNodes

std::vector<std::vector<UInt> > M_volumesToNodes
private

Definition at line 154 of file MeshColoring.hpp.

◆ M_nodesToVolumes

std::vector<std::vector<UInt> > M_nodesToVolumes
private

Definition at line 157 of file MeshColoring.hpp.

◆ M_numNeighbors

std::vector<UInt> M_numNeighbors
private

Definition at line 159 of file MeshColoring.hpp.

◆ M_maxNumNeighbors

UInt M_maxNumNeighbors
private

Definition at line 161 of file MeshColoring.hpp.

◆ M_indexNodeMaxNumNeighbors

UInt M_indexNodeMaxNumNeighbors
private

Definition at line 163 of file MeshColoring.hpp.

◆ M_colors

std::vector<int> M_colors
private

Definition at line 166 of file MeshColoring.hpp.

◆ M_numColors

UInt M_numColors
private

Definition at line 169 of file MeshColoring.hpp.

◆ M_volumesToVolumes

std::vector<std::vector<UInt> > M_volumesToVolumes
private

Definition at line 172 of file MeshColoring.hpp.

◆ M_vectorColors

vectorPtr_Type M_vectorColors
private

Definition at line 175 of file MeshColoring.hpp.

◆ M_colorsForAssembly

std::vector<std::vector<UInt> > M_colorsForAssembly
private

Definition at line 177 of file MeshColoring.hpp.


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