ASPECT
parallel_unstructured_interface.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2026 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_mesh_deformation_parallel_unstructured_interface_h
23 #define _aspect_mesh_deformation_parallel_unstructured_interface_h
24 
26 
27 
28 namespace aspect
29 {
30  namespace MeshDeformation
31  {
90  template <int dim>
91  class ParallelUnstructuredInterface : public Interface<dim>, public SimulatorAccess<dim>
92  {
93  public:
97  virtual
98  void
99  compute_velocity_constraints_on_boundary(const DoFHandler<dim> &mesh_deformation_dof_handler,
100  AffineConstraints<double> &mesh_velocity_constraints,
101  const std::set<types::boundary_id> &boundary_ids) const override;
102 
107  virtual
108  std::vector<Tensor<1,dim>>
109  compute_updated_velocities_at_points (const std::vector<std::vector<double>> &current_solution_at_points) const = 0;
110 
111 
112  protected:
113  // Helper functions to be used in derived classes:
114 
142  void
143  set_evaluation_points (const std::vector<Point<dim>> &evaluation_points);
144 
152  std::vector<std::vector<double>>
154 
172  interpolate_external_velocities_to_surface_support_points (const std::vector<Tensor<1,dim>> &velocities) const;
173 
178  std::vector<Point<dim>> evaluation_points;
179 
183  std::unique_ptr<Utilities::MPI::RemotePointEvaluation<dim, dim>> remote_point_evaluator;
184 
189  {
191  unsigned int evaluation_point_rank;
193  unsigned int component;
195 
196  template <class Archive>
197  void
198  serialize(Archive &ar, const unsigned int /*version*/)
199  {
200  ar &dof_index;
203  ar &component;
204  ar &squared_distance;
205  }
206  };
207 
221  std::vector<DofToEvalPointData> map_dof_to_eval_point;
222  };
223  }
224 }
225 
226 #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_velocities_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)