ASPECT
landlab.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2025 - 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_landlab_h
23 #define _aspect_mesh_deformation_landlab_h
24 
28 
29 #include <aspect/python_helper.h>
30 
31 namespace aspect
32 {
33  namespace MeshDeformation
34  {
43  template <int dim>
45  {
46  public:
51  void initialize() override;
52 
57  void update() override;
58 
63  virtual
64  std::vector<Tensor<1,dim>>
65  compute_updated_velocities_at_points (const std::vector<std::vector<double>> &current_solution_at_points) const override;
66 
72  void
74  const DoFHandler<dim> &mesh_deformation_dof_handler,
75  const types::boundary_id boundary_indicator,
76  AffineConstraints<double> &constraints) const override;
77 
81  static
83 
87  void parse_parameters (ParameterHandler &prm) override;
88 
89 #if defined(ASPECT_WITH_LANDLAB)
90  private:
95  unsigned int n_landlab_ranks;
96 
100  MPI_Comm landlab_communicator;
101 
105  bool this_rank_runs_landlab;
106 
110  std::string script_path;
111 
115  std::string script_module_name;
116 
120  bool is_spherical;
121 
125  PyObject *pModule;
126 #endif
127  };
128  }
129 }
130 
131 #endif
void parse_parameters(ParameterHandler &prm) override
static void declare_parameters(ParameterHandler &prm)
void compute_initial_deformation_as_constraints(const Mapping< dim > &mapping, const DoFHandler< dim > &mesh_deformation_dof_handler, const types::boundary_id boundary_indicator, AffineConstraints< double > &constraints) const override
virtual std::vector< Tensor< 1, dim > > compute_updated_velocities_at_points(const std::vector< std::vector< double >> &current_solution_at_points) const override