ASPECT
landlab.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) 2025-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_landlab_h
17 #define _aspect_mesh_deformation_landlab_h
18 
22 
23 #include <aspect/python_helper.h>
24 
25 namespace aspect
26 {
27  namespace MeshDeformation
28  {
37  template <int dim>
39  {
40  public:
45  void initialize() override;
46 
51  void update() override;
52 
56  virtual
57  double boundary_composition (const types::boundary_id boundary_indicator,
58  const Point<dim> &position,
59  const unsigned int compositional_field) const override;
60 
65  virtual
66  std::vector<Tensor<1,dim>>
67  compute_updated_velocities_at_points (const std::vector<std::vector<double>> &current_solution_at_points) const override;
68 
72  void
73  evaluate_derived_quantities_at_points (std::vector<std::vector<double>> &variable_data,
74  std::vector<std::string> &variable_names) const;
75 
81  void
83  const DoFHandler<dim> &mesh_deformation_dof_handler,
84  const types::boundary_id boundary_indicator,
85  AffineConstraints<double> &constraints) const override;
86 
90  static
92 
96  void parse_parameters (ParameterHandler &prm) override;
97 
98 #if defined(ASPECT_WITH_LANDLAB)
99  private:
104  unsigned int n_landlab_ranks;
105 
109  MPI_Comm landlab_communicator;
110 
114  bool this_rank_runs_landlab;
115 
119  std::string script_path;
120 
124  std::string script_module_name;
125 
129  bool is_spherical;
130 
134  std::vector<std::string> additional_named_quantities;
135 
139  PyObject *pModule;
140 #endif
141  };
142  }
143 }
144 
145 #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