Skip to content

Commit 3694cfe

Browse files
committed
address comments
1 parent fdff57e commit 3694cfe

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

include/aspect/mesh_deformation/external_tool_interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ namespace aspect
201201
/**
202202
* A struct to map between DoF indices and evaluation points
203203
*/
204-
struct dof_to_eval_point_data
204+
struct DofToEvalPointData
205205
{
206206
types::global_dof_index dof_index;
207207
unsigned int evaluation_point_index;
@@ -221,7 +221,7 @@ namespace aspect
221221
* This map is used in interpolate_external_velocities_to_surface_support_points() to copy
222222
* external velocities to each surface DoF from the closest evaluation point.
223223
*/
224-
std::vector<dof_to_eval_point_data> map_dof_to_eval_point;
224+
std::vector<DofToEvalPointData> map_dof_to_eval_point;
225225
};
226226
}
227227
}

source/mesh_deformation/external_tool_interface.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ namespace aspect
115115
const DoFHandler<dim> &mesh_dof_handler = this->get_mesh_deformation_handler().get_mesh_deformation_dof_handler();
116116

117117
std::vector<double> squared_distances(mesh_dof_handler.locally_owned_dofs().size(), std::numeric_limits<double>::max());
118-
std::vector<dof_to_eval_point_data> closest_evaluation_point_and_component(mesh_dof_handler.locally_owned_dofs().size(),
119-
dof_to_eval_point_data {numbers::invalid_dof_index, numbers::invalid_unsigned_int, numbers::invalid_unsigned_int});
118+
std::vector<DofToEvalPointData> closest_evaluation_point_and_component(mesh_dof_handler.locally_owned_dofs().size(),
119+
DofToEvalPointData {numbers::invalid_dof_index, numbers::invalid_unsigned_int, numbers::invalid_unsigned_int});
120120

121121
// TODO: do we need to support the case of more than one different mesh deformation plugin to be active?
122122
const auto boundary_ids = this->get_mesh_deformation_boundary_indicators();
123123

124-
IndexSet boundary_dofs = DoFTools::extract_boundary_dofs(mesh_dof_handler, ComponentMask(dim, true), boundary_ids);
124+
const IndexSet boundary_dofs = DoFTools::extract_boundary_dofs(mesh_dof_handler, ComponentMask(dim, true), boundary_ids);
125125

126126
const unsigned int dofs_per_cell = mesh_dof_handler.get_fe().dofs_per_cell;
127127
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
@@ -134,7 +134,7 @@ namespace aspect
134134

135135

136136
// Note: We assume that process_and_evaluate() does not call our lambda concurrently, otherwise we would have write
137-
// conflicts when updating vector_with_surface_velocities and one_over_distance_vec.
137+
// conflicts when updating closest_evaluation_point_and_component and squared_distances.
138138

139139
const auto eval_func = [&](const ArrayView<const unsigned int> &values,
140140
const typename Utilities::MPI::RemotePointEvaluation<dim>::CellData &cell_data)
@@ -161,7 +161,7 @@ namespace aspect
161161
squared_distances[cell_dof_indices[j]] = distance_sq;
162162
const unsigned int component = mesh_dof_handler.get_fe().system_to_component_index(j).first;
163163
closest_evaluation_point_and_component[cell_dof_indices[j]] =
164-
dof_to_eval_point_data {cell_dof_indices[j], local_values[i], component};
164+
DofToEvalPointData {cell_dof_indices[j], local_values[i], component};
165165
}
166166
}
167167
}

tests/mesh_deformation_external_01.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ namespace aspect
120120
}
121121
}
122122

123+
// Generate some velocities:
123124
Assert(current_solution_at_points.size() == this->evaluation_points.size(), ExcInternalError());
124125
std::vector<Tensor<1,dim>> velocities(current_solution_at_points.size(), Tensor<1,dim>());
125126
if (velocities.size()>6)

0 commit comments

Comments
 (0)