13 unsigned int face_num,
15 unsigned int angle_num,
22 <<
"HeterogeneousPsiIncoming call made to a heterogeneous boundary "
23 "with that information not yet set up.";
27 const size_t dof_offset =
num_groups_ * angle_num + group_num;
39 local_cell_data_.clear();
40 local_cell_data_.reserve(num_local_cells);
42 std::vector<bool> cell_bndry_flags(num_local_cells,
false);
44 for (
const auto& face : cell.faces_)
45 if (not face.has_neighbor_)
47 cell_bndry_flags[cell.local_id_] =
true;
51 size_t num_angles = quadrature.
omegas_.size();
53 typedef std::pair<double, double> PhiTheta;
55 std::vector<int> angle_indices;
56 std::vector<chi_mesh::Vector3> angle_vectors;
57 std::vector<PhiTheta> phi_theta_angles;
58 std::vector<int> group_indices;
60 angle_indices.reserve(num_angles);
61 angle_vectors.reserve(num_angles);
62 phi_theta_angles.reserve(num_angles);
63 group_indices.reserve(num_groups_);
65 int num_angles_int =
static_cast<int>(num_angles);
66 for (
int n=0; n<num_angles_int; ++n)
67 angle_indices.emplace_back(n);
68 for (
int n=0; n<num_angles_int; ++n)
69 angle_vectors.emplace_back(quadrature.
omegas_[n]);
70 for (
int n=0; n<num_angles_int; ++n)
73 double phi = abscissae.phi;
74 double theta = abscissae.theta;
75 phi_theta_angles.emplace_back(std::make_pair(phi, theta));
77 for (
int g=0; g<static_cast<int>(num_groups_); ++g)
78 group_indices.emplace_back(g);
80 const double eval_time = GetEvaluationTime();
84 if (cell_bndry_flags[cell.local_id_])
86 CellData cell_data(cell.faces_.size());
88 for (
size_t f=0; f<cell.faces_.size(); ++f)
90 auto& face = cell.faces_[f];
91 size_t face_num_nodes = face.vertex_ids_.size();
94 if (not face.has_neighbor_ and face.neighbor_id_ == ref_boundary_id_)
96 face_data.reserve(face_num_nodes);
97 for (
size_t i=0; i<face_num_nodes; ++i)
99 std::vector<double> face_node_data =
100 boundary_function_->Evaluate(cell.global_id_,
111 face_data.push_back(std::move(face_node_data));
115 cell_data[f] = std::move(face_data);
118 local_cell_data_.push_back(std::move(cell_data));
121 local_cell_data_.emplace_back();
std::vector< chi_math::QuadraturePointPhiTheta > abscissae_
std::vector< chi_mesh::Vector3 > omegas_
LocalCellHandler local_cells
std::vector< FaceData > CellData
std::vector< CellData > local_cell_data_
double * HeterogeneousPsiIncoming(uint64_t cell_local_id, unsigned int face_num, unsigned int fi, unsigned int angle_num, int group_num, size_t gs_ss_begin) override
std::vector< FaceNodeData > FaceData
void Setup(const chi_mesh::MeshContinuum &grid, const chi_math::AngularQuadrature &quadrature) override