18 Chi::log.
Log() <<
"Initializing spatial discretization_.\n";
42 "InitializeSpatialDiscretization : "
43 <<
"invalid geometry, static_cast<int>(type) = "
77 "InitializeSpatialDiscretization : "
78 <<
"invalid geometry, static_cast<int>(type) = "
85 SDM_PWLD::New(*
grid_ptr_, qorder, system);
92 Chi::log.
Log() <<
"Computing RZ secondary unit integrals.\n";
100 auto ComputeCellUnitIntegrals =
103 const auto& cell_mapping = sdm.GetCellMapping(cell);
105 const size_t cell_num_nodes = cell_mapping.NumNodes();
106 const auto vol_qp_data = cell_mapping.MakeVolumetricQuadraturePointData();
108 MatDbl IntV_shapeI_shapeJ(cell_num_nodes,
VecDbl(cell_num_nodes));
111 for (
unsigned int i = 0; i < cell_num_nodes; ++i)
113 for (
unsigned int j = 0; j < cell_num_nodes; ++j)
115 for (
const auto& qp : vol_qp_data.QuadraturePointIndices())
117 IntV_shapeI_shapeJ[i][j] +=
118 swf(vol_qp_data.QPointXYZ(qp)) * vol_qp_data.ShapeValue(i, qp) *
119 vol_qp_data.ShapeValue(j, qp) * vol_qp_data.JxW(qp);
134 const size_t num_local_cells =
grid_ptr_->local_cells.size();
137 for (
const auto& cell :
grid_ptr_->local_cells)
139 ComputeCellUnitIntegrals(cell);
143 <<
"Secondary Cell matrices computed. Process memory = "
static void Exit(int error_code)
static chi::MPI_Info & mpi
LogStream Log(LOG_LVL level=LOG_0)
static double GetMemoryUsageInMB()
Get current memory usage in Megabytes.
static double CylindricalRZSpatialWeightFunction(const chi_mesh::Vector3 &point)
void ComputeSecondaryUnitIntegrals()
void InitializeSpatialDiscretization() override
std::shared_ptr< chi_math::SpatialDiscretization > discretization_secondary_
std::vector< lbs::UnitCellMatrices > secondary_unit_cell_matrices_
chi_mesh::MeshContinuumPtr grid_ptr_
std::shared_ptr< chi_math::SpatialDiscretization > discretization_
void ComputeUnitIntegrals()
std::vector< VecDbl > MatDbl
std::vector< double > VecDbl
GeometryType geometry_type