ASPECT
parallel_unstructured_interface.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2011-2026 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 
16 #ifndef _aspect_mesh_deformation_parallel_unstructured_interface_h
17 #define _aspect_mesh_deformation_parallel_unstructured_interface_h
18 
20 
21 
22 namespace aspect
23 {
24  namespace MeshDeformation
25  {
84  template <int dim>
85  class ParallelUnstructuredInterface : public Interface<dim>, public SimulatorAccess<dim>
86  {
87  public:
91  virtual
92  void
93  compute_velocity_constraints_on_boundary(const DoFHandler<dim> &mesh_deformation_dof_handler,
94  AffineConstraints<double> &mesh_velocity_constraints,
95  const std::set<types::boundary_id> &boundary_ids) const override;
96 
101  virtual
102  std::vector<Tensor<1,dim>>
103  compute_updated_velocities_at_points (const std::vector<std::vector<double>> &current_solution_at_points) const = 0;
104 
105 
106  protected:
107  // Helper functions to be used in derived classes:
108 
136  void
137  set_evaluation_points (const std::vector<Point<dim>> &evaluation_points);
138 
146  std::vector<std::vector<double>>
148 
166  interpolate_external_vector_field_to_surface_support_points (const std::vector<Tensor<1,dim>> &velocities) const;
167 
172  std::vector<Point<dim>> evaluation_points;
173 
177  std::unique_ptr<Utilities::MPI::RemotePointEvaluation<dim, dim>> remote_point_evaluator;
178 
183  {
185  unsigned int evaluation_point_rank;
187  unsigned int component;
189 
190  template <class Archive>
191  void
192  serialize(Archive &ar, const unsigned int /*version*/)
193  {
194  ar &dof_index;
197  ar &component;
198  ar &squared_distance;
199  }
200  };
201 
215  std::vector<DofToEvalPointData> map_dof_to_eval_point;
216  };
217  }
218 }
219 
220 #endif
std::unique_ptr< Utilities::MPI::RemotePointEvaluation< dim, dim > > remote_point_evaluator
virtual std::vector< Tensor< 1, dim > > compute_updated_velocities_at_points(const std::vector< std::vector< double >> &current_solution_at_points) const =0
LinearAlgebra::Vector interpolate_external_vector_field_to_surface_support_points(const std::vector< Tensor< 1, dim >> &velocities) const
virtual void compute_velocity_constraints_on_boundary(const DoFHandler< dim > &mesh_deformation_dof_handler, AffineConstraints< double > &mesh_velocity_constraints, const std::set< types::boundary_id > &boundary_ids) const override
std::vector< std::vector< double > > evaluate_aspect_solution_at_points() const
void set_evaluation_points(const std::vector< Point< dim >> &evaluation_points)