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

Correction Dirichlet node boundary values

parent 1a66c65f
Branches
No related tags found
No related merge requests found
......@@ -370,14 +370,14 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand
for (size_t i_node = 0; i_node < face_nodes.size(); ++i_node) {
const NodeId node_id = face_nodes[i_node];
if (node_is_dirichlet[node_id] == false) {
if (not node_is_dirichlet[node_id]) {
compute_node_boundary_values[node_id] += value_list[i_face] * mes_l[face_id];
sum_mes_l[node_id] += mes_l[face_id];
}
}
}
for (NodeId node_id = 0; node_id < mesh->numberOfNodes(); ++node_id) {
if (not node_is_dirichlet[node_id]) {
if ((not node_is_dirichlet[node_id]) && (node_is_neumann[node_id])) {
compute_node_boundary_values[node_id] /= sum_mes_l[node_id];
}
}
......@@ -391,13 +391,19 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand
for (size_t i_node = 0; i_node < face_nodes.size(); ++i_node) {
const NodeId node_id = face_nodes[i_node];
if (node_is_neumann[node_id] == false) {
compute_node_boundary_values[node_id] += 0.5 * value_list[i_face] * mes_l[face_id];
if (not node_is_neumann[node_id]) {
compute_node_boundary_values[node_id] += value_list[i_face] * mes_l[face_id];
sum_mes_l[node_id] += mes_l[face_id];
} else {
compute_node_boundary_values[node_id] = value_list[i_face] * mes_l[face_id];
compute_node_boundary_values[node_id] = value_list[i_face];
}
}
}
for (NodeId node_id = 0; node_id < mesh->numberOfNodes(); ++node_id) {
if ((not node_is_neumann[node_id]) && (node_is_dirichlet[node_id])) {
compute_node_boundary_values[node_id] /= sum_mes_l[node_id];
}
}
}
},
boundary_condition);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment