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 
62  virtual
63  double boundary_composition (const types::boundary_id boundary_indicator,
64  const Point<dim> &position,
65  const unsigned int compositional_field) const override;
66 
71  virtual
72  std::vector<Tensor<1,dim>>
73  compute_updated_velocities_at_points (const std::vector<std::vector<double>> &current_solution_at_points) const override;
74 
78  void
79  evaluate_derived_quantities_at_points (std::vector<std::vector<double>> &variable_data,
80  std::vector<std::string> &variable_names) const;
81 
87  void
89  const DoFHandler<dim> &mesh_deformation_dof_handler,
90  const types::boundary_id boundary_indicator,
91  AffineConstraints<double> &constraints) const override;
92 
96  static
98 
102  void parse_parameters (ParameterHandler &prm) override;
103 
104 #if defined(ASPECT_WITH_LANDLAB)
105  private:
110  unsigned int n_landlab_ranks;
111 
115  MPI_Comm landlab_communicator;
116 
120  bool this_rank_runs_landlab;
121 
125  std::string script_path;
126 
130  std::string script_module_name;
131 
135  bool is_spherical;
136 
140  std::vector<std::string> additional_named_quantities;
141 
145  PyObject *pModule;
146 #endif
147  };
148  }
149 }
150 
151 #endif
void parse_parameters(ParameterHandler &prm) override
virtual double boundary_composition(const types::boundary_id boundary_indicator, const Point< dim > &position, const unsigned int compositional_field) const override
void evaluate_derived_quantities_at_points(std::vector< std::vector< double >> &variable_data, std::vector< std::string > &variable_names) const
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