Skip to content
Snippets Groups Projects
Commit e3d8fa9a authored by Axelle Drouard's avatar Axelle Drouard
Browse files

Add construction normal_base

parent d6c2f98b
Branches
No related tags found
No related merge requests found
...@@ -483,6 +483,22 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand ...@@ -483,6 +483,22 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand
} }
}(); }();
const NodeValue<const TinyVector<Dimension>> normal_base = [&] {
NodeValue<TinyVector<Dimension>> compute_normal_base{mesh->connectivity()};
compute_normal_base.fill(zero);
for (NodeId node_id = 0; node_id < mesh->numberOfNodes(); ++node_id) {
const auto& node_to_face = node_to_face_matrix[node_id];
TinyMatrix<Dimension> A;
for (size_t i_face = 0; i_face < mesh->numberOfFaces(); ++i_face) {
FaceId face_id = node_to_face[i_face];
A(i_face, 0) = nl[face_id][0] * mes_l[face_id];
A(i_face, 1) = nl[face_id][1] * mes_l[face_id];
}
compute_normal_base[node_id] = inverse(A) * exterior_normal[node_id];
}
return compute_normal_base;
}();
const NodeValue<const double> node_boundary_values = [&] { const NodeValue<const double> node_boundary_values = [&] {
NodeValue<double> compute_node_boundary_values{mesh->connectivity()}; NodeValue<double> compute_node_boundary_values{mesh->connectivity()};
NodeValue<double> sum_mes_l{mesh->connectivity()}; NodeValue<double> sum_mes_l{mesh->connectivity()};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment