21 #ifndef _aspect_mesh_deformation_fastscape_h 22 #define _aspect_mesh_deformation_fastscape_h 26 #ifdef ASPECT_WITH_FASTSCAPE 29 #include <deal.II/base/parsed_function.h> 33 namespace MeshDeformation
44 class FastScape :
public Interface<dim>,
public SimulatorAccess<dim>
55 void update()
override;
60 ~FastScape()
override;
70 compute_velocity_constraints_on_boundary(
const DoFHandler<dim> &mesh_deformation_dof_handler,
71 AffineConstraints<double> &mesh_velocity_constraints,
72 const std::set<types::boundary_id> &boundary_id)
const override;
77 bool needs_surface_stabilization ()
const override;
88 void parse_parameters (ParameterHandler &prm)
override;
94 enum class FastscapeOutputVariable
101 FastscapeOutputVariable additional_output_variable;
107 template <
class Archive>
108 void serialize (Archive &ar,
const unsigned int version);
113 void save (std::map<std::string, std::string> &status_strings)
const override;
118 void load (
const std::map<std::string, std::string> &status_strings)
override;
131 void set_ghost_nodes(std::vector<double> &elevation,
132 std::vector<double> &velocity_x,
133 std::vector<double> &velocity_y,
134 std::vector<double> &velocity_z,
135 std::vector<double> &bedrock_transport_coefficient_array,
136 const double &fastscape_timestep_in_years,
137 const bool init)
const;
142 bool is_ghost_node(
const unsigned int &index,
143 const bool &exclude_boundaries)
const;
148 void fill_fastscape_arrays(std::vector<double> &elevation,
149 std::vector<double> &bedrock_transport_coefficient_array,
150 std::vector<double> &bedrock_river_incision_rate_array,
151 std::vector<double> &velocity_x,
152 std::vector<double> &velocity_y,
153 std::vector<double> &velocity_z,
154 std::vector<std::vector<double>> &temporary_variables)
const;
159 std::vector<std::vector<double>> get_aspect_values()
const;
164 void initialize_fastscape(std::vector<double> &elevation,
165 std::vector<double> &basement,
166 std::vector<double> &silt_fraction,
172 void execute_fastscape(std::vector<double> &elevation,
173 std::vector<double> &extra_vtk_field,
174 std::vector<double> &velocity_x,
175 std::vector<double> &velocity_y,
176 std::vector<double> &velocity_z,
177 std::vector<double> &bedrock_transport_coefficient_array,
178 const double &fastscape_timestep_in_years,
179 const unsigned int &fastscape_iterations)
const;
185 void apply_orographic_controls(
const std::vector<double> &elevation,
186 std::vector<double> &bedrock_river_incision_rate_array,
187 std::vector<double> &bedrock_transport_coefficient_array)
const;
192 Table<dim,double> fill_data_table(
const std::vector<double> &values,
193 const TableIndices<dim> &size_idx,
194 const unsigned int &fastscape_nx,
195 const unsigned int &fastscape_ny)
const;
202 unsigned int fastscape_steps_per_aspect_step;
208 double maximum_fastscape_timestep;
223 double fastscape_x_extent;
228 double fastscape_y_extent;
233 double fastscape_y_extent_2d;
238 unsigned int fastscape_nx;
243 unsigned int fastscape_ny;
253 unsigned int additional_refinement_levels;
260 unsigned int maximum_surface_refinement_level;
273 unsigned int surface_refinement_difference;
280 bool average_out_of_plane_surface_topography;
290 std::array<std::pair<double,double>,dim> grid_extent;
295 std::array<unsigned int, dim> table_intervals;
300 bool use_ghost_nodes;
307 double noise_elevation;
313 std::vector<double> sediment_rain_rates;
320 std::vector<double> sediment_rain_times;
327 bool fastscape_advection_uplift;
336 double node_tolerance;
343 double output_interval;
349 mutable double last_output_time;
391 bool topbottom_ghost_nodes_periodic;
392 bool leftright_ghost_nodes_periodic;
397 unsigned int fastscape_boundary_conditions;
430 double drainage_area_exponent_m;
435 double slope_exponent_n;
441 double slope_exponent_p;
447 double bedrock_deposition_g;
454 double sediment_deposition_g;
464 Functions::ParsedFunction<2> kf_distribution_function;
469 bool use_kf_distribution_function;
478 double constant_bedrock_river_incision_rate;
488 double sediment_river_incision_rate;
498 Functions::ParsedFunction<2> kd_distribution_function;
503 bool use_kd_distribution_function;
512 double constant_bedrock_transport_coefficient;
522 double sediment_transport_coefficient;
544 double sea_level_constant_value;
549 Functions::ParsedFunction<1> sea_level_function;
554 bool use_sea_level_function;
560 bool use_fixed_erosional_base;
565 double h_erosional_base;
570 double sand_surface_porosity;
575 double silt_surface_porosity;
580 double sand_efold_depth;
585 double silt_efold_depth;
590 double sand_silt_ratio;
595 double sand_silt_averaging_depth;
600 double sand_transport_coefficient;
605 double silt_transport_coefficient;
610 bool use_marine_component;
631 int wind_barrier_elevation;
636 unsigned int wind_direction;
642 double flat_erosional_factor;
648 double wind_barrier_erosional_factor;
658 bool use_orographic_controls;
void declare_parameters(ParameterHandler &prm)