Select Git revision
test_ConcatExpressionProcessor.cpp
Connectivity3D.hpp 14.99 KiB
#ifndef CONNECTIVITY_3D_HPP
#define CONNECTIVITY_3D_HPP
#include <Kokkos_Core.hpp>
#include <PastisAssert.hpp>
#include <TinyVector.hpp>
#include <ConnectivityUtils.hpp>
#include <vector>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <RefId.hpp>
#include <RefNodeList.hpp>
#include <RefFaceList.hpp>
#include <tuple>
class Connectivity3D
{
public:
static constexpr size_t dimension = 3;
ConnectivityMatrix m_cell_to_node_matrix;
ConnectivityMatrix m_cell_to_face_matrix;
ConnectivityMatrixShort m_cell_to_face_is_reversed_matrix;
ConnectivityMatrix m_face_to_cell_matrix;
ConnectivityMatrixShort m_face_to_cell_local_face_matrix;
ConnectivityMatrix m_face_to_node_matrix;
ConnectivityMatrix m_node_to_cell_matrix;
ConnectivityMatrixShort m_node_to_cell_local_node_matrix;
private:
std::vector<RefFaceList> m_ref_face_list;
std::vector<RefNodeList> m_ref_node_list;
Kokkos::View<double*> m_inv_cell_nb_nodes;
Kokkos::View<const unsigned short*> m_node_nb_faces;
Kokkos::View<const unsigned int**> m_node_faces;
size_t m_max_nb_node_per_cell;
size_t m_max_nb_face_per_cell;
size_t m_max_nb_node_per_face;
class Face
{
public:
friend struct Hash;
struct Hash {
size_t operator()(const Face& f) const
{
size_t hash = 0;
for (size_t i=0; i<f.m_node_id_list.size(); ++i) {
hash ^= std::hash<unsigned int>()(f.m_node_id_list[i]) >> i;
}
return hash;
}
};
private:
bool m_reversed;
std::vector<unsigned int> m_node_id_list;
public:
friend std::ostream& operator<<(std::ostream& os, const Face& f)
{