1#ifndef SPATIAL_DISCRETIZATION_H
2#define SPATIAL_DISCRETIZATION_H
25 std::pair<std::set<uint32_t>, std::set<uint32_t>>
45 std::vector<int64_t>& nodal_nnz_off_diag,
53 unsigned int unknown_id,
54 unsigned int component)
const = 0;
61 unsigned int unknown_id,
62 unsigned int component)
const = 0;
68 unsigned int node)
const = 0;
73 unsigned int node)
const = 0;
89 virtual std::vector<int64_t>
102 const std::vector<chi_mesh::Vector3>&
107 std::vector<std::vector<std::vector<int>>>
114 std::vector<double>& to_vector,
116 unsigned int from_vec_uk_id,
118 unsigned int to_vec_uk_id)
const;
124 std::vector<double>& local_vector,
131 std::vector<double>& local_vector,
virtual std::vector< int64_t > GetGhostDOFIndices(const UnknownManager &unknown_manager) const =0
std::function< double(const chi_mesh::Vector3 &)> SpatialWeightFunction
size_t GetNumLocalAndGhostDOFs(const UnknownManager &unknown_manager) const
SpatialDiscretizationType Type() const
const CellMapping & GetCellMapping(const chi_mesh::Cell &cell) const
static double CylindricalRZSpatialWeightFunction(const chi_mesh::Vector3 &point)
static double Spherical1DSpatialWeightFunction(const chi_mesh::Vector3 &point)
static double CartesianSpatialWeightFunction(const chi_mesh::Vector3 &point)
std::vector< std::unique_ptr< CellMapping > > cell_mappings_
virtual int64_t MapDOF(const chi_mesh::Cell &cell, unsigned int node) const =0
std::vector< uint64_t > locJ_block_size_
size_t GetNumGlobalDOFs(const UnknownManager &unknown_manager) const
virtual ~SpatialDiscretization()=default
uint64_t globl_base_block_size_
CoordinateSystemType GetCoordinateSystemType() const
const chi_mesh::MeshContinuum & Grid() const
SpatialDiscretizationType SDMType
virtual int64_t MapDOF(const chi_mesh::Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const =0
virtual void BuildSparsityPattern(std::vector< int64_t > &nodal_nnz_in_diag, std::vector< int64_t > &nodal_nnz_off_diag, const UnknownManager &unknown_manager) const =0
void CopyVectorWithUnknownScope(const std::vector< double > &from_vector, std::vector< double > &to_vector, const UnknownManager &from_vec_uk_structure, unsigned int from_vec_uk_id, const UnknownManager &to_vec_uk_structure, unsigned int to_vec_uk_id) const
std::map< uint64_t, std::shared_ptr< CellMapping > > nb_cell_mappings_
size_t GetNumLocalDOFs(const UnknownManager &unknown_manager) const
uint64_t local_base_block_size_
SpatialWeightFunction GetSpatialWeightingFunction() const
const SpatialDiscretizationType type_
virtual int64_t MapDOFLocal(const chi_mesh::Cell &cell, unsigned int node) const =0
uint64_t local_block_address_
std::pair< std::set< uint32_t >, std::set< uint32_t > > MakeCellInternalAndBndryNodeIDs(const chi_mesh::Cell &cell) const
virtual int64_t MapDOFLocal(const chi_mesh::Cell &cell, unsigned int node, const UnknownManager &unknown_manager, unsigned int unknown_id, unsigned int component) const =0
const UnknownManager UNITARY_UNKNOWN_MANAGER
virtual void LocalizePETScVectorWithGhosts(Vec petsc_vector, std::vector< double > &local_vector, const UnknownManager &unknown_manager) const
virtual void LocalizePETScVector(Vec petsc_vector, std::vector< double > &local_vector, const UnknownManager &unknown_manager) const
const std::vector< chi_mesh::Vector3 > & GetCellNodeLocations(const chi_mesh::Cell &cell) const
size_t GetCellNumNodes(const chi_mesh::Cell &cell) const
std::vector< std::vector< std::vector< int > > > MakeInternalFaceNodeMappings(double tolerance=1.0e-12) const
For each local cell, for each face, for each face-node, provides a mapping to the adjacent cell's nod...
virtual size_t GetNumGhostDOFs(const UnknownManager &unknown_manager) const =0
std::vector< uint64_t > locJ_block_address_
const CoordinateSystemType coord_sys_type_
SpatialDiscretization(const chi_mesh::MeshContinuum &grid, CoordinateSystemType cs_type, SDMType sdm_type)
const chi_mesh::MeshContinuum & ref_grid_
SpatialDiscretizationType