From 4ed7dac058d98cb6ee71b958baa130e7aa2675c0 Mon Sep 17 00:00:00 2001 From: Drouard <axelle.drouard@orange.fr> Date: Fri, 20 May 2022 16:18:39 +0200 Subject: [PATCH] Add corners to the second member for Neumann boundary conditions --- src/scheme/ScalarNodalScheme.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scheme/ScalarNodalScheme.cpp b/src/scheme/ScalarNodalScheme.cpp index e6f63ccaf..d1aa9d994 100644 --- a/src/scheme/ScalarNodalScheme.cpp +++ b/src/scheme/ScalarNodalScheme.cpp @@ -615,9 +615,13 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand } } else if (node_is_corner[node_id]) { const auto& node_to_face = node_to_face_matrix[node_id]; + const CellId cell_id = node_to_cell[0]; + double sum_mes_l = 0; for (size_t i_face = 0; i_face < node_to_face.size(); ++i_face) { FaceId face_id = node_to_face[i_face]; + sum_mes_l += mes_l[face_id]; } + b[cell_id] += 0.5 * node_boundary_values[node_id] * sum_mes_l; } }; -- GitLab