Skip to content

Commit 9179e8b

Browse files
committed
Only consider boundary DoFs for the coupling
1 parent 9f17050 commit 9179e8b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

source/mesh_deformation/external_tool_interface.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,18 @@ namespace aspect
176176
cell_data.reference_point_ptrs[cell_index]));
177177

178178
const std::vector< Point< dim >> &support_points = mesh_dof_handler.get_fe().get_unit_support_points();
179-
for (unsigned int i=0; i<unit_points.size(); ++i)
179+
for (unsigned int j=0; j<support_points.size(); ++j)
180180
{
181-
const unsigned int point_index = local_values[n_components*i];
182-
const unsigned int rank = local_values[n_components*i+1];
181+
// skip all DoFs in the interior
182+
const bool is_boundary_dof = boundary_dofs.is_element(cell_dof_indices[j]);
183+
if (!is_boundary_dof)
184+
continue;
183185

184-
for (unsigned int j=0; j<support_points.size(); ++j)
186+
for (unsigned int i=0; i<unit_points.size(); ++i)
185187
{
188+
const unsigned int point_index = local_values[n_components*i];
189+
const unsigned int rank = local_values[n_components*i+1];
190+
186191
const double distance_sq = unit_points[i].distance_square(support_points[j]);
187192
if (distance_sq < squared_distances[cell_dof_indices[j]])
188193
{

0 commit comments

Comments
 (0)