diff --git a/include/aspect/mesh_deformation/external_tool_interface.h b/include/aspect/mesh_deformation/external_tool_interface.h new file mode 100644 index 00000000000..9dc98d64b40 --- /dev/null +++ b/include/aspect/mesh_deformation/external_tool_interface.h @@ -0,0 +1,229 @@ +/* + Copyright (C) 2011 - 2024 by the authors of the ASPECT code. + + This file is part of ASPECT. + + ASPECT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + ASPECT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with ASPECT; see the file LICENSE. If not see + . +*/ + + +#ifndef _aspect_mesh_deformation_external_tool_interface_h +#define _aspect_mesh_deformation_external_tool_interface_h + +#include + + +namespace aspect +{ + namespace MeshDeformation + { + /** + * This class provides some support for writing classes derived + * from MeshDeformation::Interface when implementing surface + * deformation models that are based on external tools such as + * Fastscape, Landlab, OpenLEM, etc. The primary complication of + * interacting with these external tools is that they generally + * use their own discretization of surface processes, using a mesh + * that, in most cases, will be different from the one used by + * ASPECT. (Of course, ASPECT's use is a *volume* mesh, whereas + * surface processes use *surface* meshes. ASPECT's own surface + * diffusion, for example, works on the surface faces of ASPECT's + * mesh, but in general, external tools use a mesh that is + * *entirely unrelated* to the surface cells of ASPECT's volume + * mesh.) In these cases, one needs to implement transfer + * operations to take ASPECT's solution and interpolate it to the + * external tool's mesh, run some surface evolution steps, and + * then interpolate back to the surface nodes of ASPECT's + * mesh. These interpolation operations are difficult to implement + * in their own right, but are made particularly cumbersome in + * parallel because then, the points at which the external tool + * wants to know the solution on any given MPI process will, in + * general, not be located on that part of ASPECT's mesh that is + * owned by that MPI process. As a consequence, implementing the + * interpolation requires finding the MPI process that owns the + * cell on which that point is located, and then communication + * back and forth. + * + * @sect3{Helper functions} + * + * This class implements the interpolation functionality for + * derived classes to use. It works through a two-stage approach: + * First, derived classes declare at which points they require + * ASPECT's solution to be evaluated, via the + * set_evaluation_points() function. This function then finds + * which process owns the cell around this point, and sets up + * communication structures that will make later evaluation + * efficient. Second, this class provides the + * evaluate_aspect_variables_at_points() function that uses these + * communication structures to evaluate ASPECT's current solution + * at the points previously set. The class also provides the + * interpolate_vertical_velocities_to_surface_points() function + * that takes a set of (vertical) velocity values at these points + * and uses them to interpolate the information back onto ASPECT's + * mesh. + * + * All three of these functions are `protected` member functions + * of this class, ready to be called by derived classes. + * + * + * @sect3{A high-level function} + * + * All classes derived from Interface need to implement the + * Interface::compute_velocity_constraints_on_boundary() + * function. Because the basic outline of this function looks + * essentially the same for all external tools, this class also + * provides a high-level implementation of this function is also + * provided as part of this class. In essence, it looks as + * follows (pseudo-code), relying on the + * `compute_updated_velocities_at_points()` function that gets + * ASPECT's solution at the evaluation points and returns velocity + * vectors at all of these evaluation points: + * @code + * // Interpolate ASPECT's solution at evaluation points: + * aspect_surface_velocities = evaluate_aspect_variables_at_points(); + * + * // Call derive class's method to compute updated velocities: + * external_surface_velocities = compute_updated_velocities_at_points(aspect_surface_velocities); + * + * // Turn the result into the constraints that + * // compute_velocity_constraints_on_boundary is supposed + * // to return. + * @endcode + */ + template + class ExternalToolInterface : public Interface, public SimulatorAccess + { + public: + /** + * Main routine handling the mesh deformation + */ + virtual + void + compute_velocity_constraints_on_boundary(const DoFHandler &mesh_deformation_dof_handler, + AffineConstraints &mesh_velocity_constraints, + const std::set &boundary_ids) const override; + + /** + * Given all solution variables at each surface point, compute velocities at these points. + * + * This needs to be implemented by the derived class and implement the "surface evolution". + */ + virtual + std::vector> + compute_updated_velocities_at_points (const std::vector> ¤t_solution_at_points) const = 0; + + + protected: + // Helper functions to be used in derived classes: + + /** + * Declare at which points the external tool driven by a class + * derived from the current one needs to evaluate the ASPECT + * solution. Each process will call this function with the points + * it needs. Different processes will, in general, provide + * distinct sets of points. + * + * The points provided here are given in the undeformed + * configuration that corresponds to the initial mesh. For + * example, if the mesh describes a box geometry, then the + * points should like in the $x$-$y$-plane that forms the top + * surface, rather than on the currently deformed top surface + * that describes the current elevation map. + * + * @note This function sets up communication structures that + * encode, among other things, which process owns which + * points. This information becomes outdated when the + * ASPECT mesh changes for mesh refinement. As a + * consequence, the current function sets up a process that + * invalidates the communication structures upon mesh + * refinement. Derived classes therefore have to set up + * their own code to call set_evaluation_points() again when + * the ASPECT mesh changes, or perhaps simply check whether + * the information needs to be updated in an overload of the + * update() function called at the beginning of each time + * step. + */ + void + set_evaluation_points (const std::vector> &evaluation_points); + + /** + * Return the value of the ASPECT solution at the set of points + * previously set via set_evaluation_points(). + * + * For each point, the return object contains a vector with as + * many components as there are ASPECT solution components. + */ + std::vector> + evaluate_aspect_variables_at_points () const; + + /** + * Interpolate from velocities given in the evaluation points + * to ASPECT velocities on the surface in form of a finite + * element field. + * + * The @p velocities, which are typically vertical, were previously + * computed by the external tool and belong to the current process. + * The Output is a (global) finite element field vector that in + * the velocity components of surface nodes corresponds to an + * interpolation of the velocities provided. + * + * The output of this function can then be used as input for a + * function that implements the + * compute_velocity_constraints_on_boundary() function of the + * base class. + */ + LinearAlgebra::Vector + interpolate_external_velocities_to_surface_support_points (const std::vector> &velocities) const; + + /** + * The list of evaluation points owned by the current process. These are the points where the + * external tool will receive the ASPECT solution values and return the updated velocities. + */ + std::vector> evaluation_points; + + /** + * deal.II RemotePointEvaluation object used to do point evaluation in the evaluation points. + */ + std::unique_ptr> remote_point_evaluator; + + /** + * A struct to map between DoF indices and evaluation points + */ + struct DofToEvalPointData + { + types::global_dof_index dof_index; + unsigned int evaluation_point_index; + unsigned int component; + }; + + /** + * A vector to store a map between Dof indices and evaluation points. + * + * The map will contain an entry for each DoF on the surface of the ASPECT mesh and contains + * the index of the evaluation point that is closest to the DoF. As each support point has + * several components (x,y,z velocity), the map contains one entry for each component. + * + * In a parallel computation, this map only contains entries for evaluation points owned by the + * current process. Note that the DoF indices are not necessarily locally owned. + * + * This map is used in interpolate_external_velocities_to_surface_support_points() to copy + * external velocities to each surface DoF from the closest evaluation point. + */ + std::vector map_dof_to_eval_point; + }; + } +} + +#endif diff --git a/source/mesh_deformation/external_tool_interface.cc b/source/mesh_deformation/external_tool_interface.cc new file mode 100644 index 00000000000..eec97508982 --- /dev/null +++ b/source/mesh_deformation/external_tool_interface.cc @@ -0,0 +1,267 @@ +/* + Copyright (C) 2014 - 2024 by the authors of the ASPECT code. + + This file is part of ASPECT. + + ASPECT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + ASPECT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with ASPECT; see the file LICENSE. If not see + . + */ + + +#include +#include + +#include + +/* +TODO: +- initial topography from external tool: for now compute_initial_deformation_on_boundary(), later refactor + to provide FE vector +*/ + +namespace aspect +{ + namespace MeshDeformation + { + + template + void + ExternalToolInterface:: + compute_velocity_constraints_on_boundary(const DoFHandler &mesh_deformation_dof_handler, + AffineConstraints &mesh_velocity_constraints, + const std::set &boundary_ids) const + { + // First compute a (global) vector that has the correct velocities + // set at all boundary nodes: + const std::vector> aspect_surface_velocities = evaluate_aspect_variables_at_points(); + + const std::vector> external_surface_velocities + = compute_updated_velocities_at_points(aspect_surface_velocities); + + const LinearAlgebra::Vector v_interpolated + = interpolate_external_velocities_to_surface_support_points(external_surface_velocities); + + // TODO: need ghost values of v_interpolated? + + // Turn v_interpolated into constraints. For this, loop over all + // boundary DoFs and if a boundary DoF is locally owned, create a + // constraint. We later make that consistent across processors to + // ensure we also know about the locally relevant DoFs' + // constraints: + // now insert the relevant part of the solution into the mesh constraints + const IndexSet constrained_dofs = + DoFTools::extract_boundary_dofs(mesh_deformation_dof_handler, + ComponentMask(dim, true), + boundary_ids); + + for (const types::global_dof_index index : constrained_dofs) + { + if (mesh_velocity_constraints.can_store_line(index)) + if (mesh_velocity_constraints.is_constrained(index)==false) + { +#if DEAL_II_VERSION_GTE(9,6,0) + mesh_velocity_constraints.add_constraint(index, + {}, + v_interpolated(index)); +#else + mesh_velocity_constraints.add_line(index); + mesh_velocity_constraints.set_inhomogeneity(index, v_interpolated(index)); +#endif + } + } + + // TODO: make consistent? + } + + + template + void + ExternalToolInterface:: + set_evaluation_points (const std::vector> &evaluation_points) + { + // First, save a copy of the points at which we need the solution, + // among other reasons so that we can track that input arguments + // for later function calls describe the same number of points. + this->evaluation_points = evaluation_points; + + // Set up RemotePointEvaluation. The evaluation points are given in reference coordinates, + // so we need to use a simple mapping instead of the one stored in the Simulator. The latter + // would produce the deformed mesh. We currently always use a Q1 mapping when mesh deformation + // is enabled, so a Q1 mapping is the right choice. + static MappingQ mapping(1); + remote_point_evaluator = std::make_unique>(); + remote_point_evaluator->reinit(this->evaluation_points, this->get_triangulation(), mapping); + + + // Create a mapping from evaluation points to support points. Note that one evaluation point can map to + // multiple support points. + { + // For now, we only support a single MPI rank for ASPECT and the external mesh deformation class. Because deciding + // which evaluation point is closest to a support point requires somewhat complex MPI communication. + Assert(Utilities::MPI::n_mpi_processes(this->get_mpi_communicator()) == 1, + ExcNotImplemented("This function is not implemented for parallel computations.")); + + const DoFHandler &mesh_dof_handler = this->get_mesh_deformation_handler().get_mesh_deformation_dof_handler(); + + std::vector squared_distances(mesh_dof_handler.locally_owned_dofs().size(), std::numeric_limits::max()); + std::vector closest_evaluation_point_and_component(mesh_dof_handler.locally_owned_dofs().size(), + DofToEvalPointData {numbers::invalid_dof_index, numbers::invalid_unsigned_int, numbers::invalid_unsigned_int}); + + // TODO: do we need to support the case of more than one different mesh deformation plugin to be active? + const auto boundary_ids = this->get_mesh_deformation_boundary_indicators(); + + const IndexSet boundary_dofs = DoFTools::extract_boundary_dofs(mesh_dof_handler, ComponentMask(dim, true), boundary_ids); + + const unsigned int dofs_per_cell = mesh_dof_handler.get_fe().dofs_per_cell; + std::vector local_dof_indices (dofs_per_cell); + + // The remote_point_evaluator will gives us the velocities in all evaluation points that are within one of our locally + // owned cells. The lambda defined below receives a list of points and their velocities for each cell. The coordinates + // are given in coordinates of the unit cell. + // For each support point of the velocity DoFHandler, we will try to find the closest evaluation point. We + // do this by keeping track of the squared distance of the closest evaluation point checked so far. + + + // Note: We assume that process_and_evaluate() does not call our lambda concurrently, otherwise we would have write + // conflicts when updating closest_evaluation_point_and_component and squared_distances. + + const auto eval_func = [&](const ArrayView &values, + const typename Utilities::MPI::RemotePointEvaluation::CellData &cell_data) + { + std::vector cell_dof_indices (dofs_per_cell); + for (const auto cell_index : cell_data.cell_indices()) + { + const auto cell_dofs = + cell_data.get_active_cell_iterator(cell_index)->as_dof_handler_iterator( + mesh_dof_handler); + cell_dofs->get_dof_indices(cell_dof_indices); + + const ArrayView> unit_points = cell_data.get_unit_points(cell_index); + const auto local_values = cell_data.get_data_view(cell_index, values); + + const std::vector< Point< dim >> &support_points = mesh_dof_handler.get_fe().get_unit_support_points(); + for (unsigned int i=0; i indices (evaluation_points.size()); + std::iota(indices.begin(), indices.end(), 0); + this->remote_point_evaluator->template process_and_evaluate(indices, eval_func, /*sort_data*/ true); + + map_dof_to_eval_point.clear(); + for (unsigned int i=0; iget_signals().pre_refinement_store_user_data + .connect([this](typename parallel::distributed::Triangulation &) + { + this->evaluation_points.clear(); + this->remote_point_evaluator.reset(); + }); + } + + + + template + std::vector> + ExternalToolInterface:: + evaluate_aspect_variables_at_points () const + { + Assert (remote_point_evaluator != nullptr, + ExcMessage("You can only call this function if you have previously " + "set the evaluation points by calling set_evaluation_points(), " + "and if the evaluator has not been invalidated by a mesh " + "refinement step.")); + + const unsigned int n_components = this->introspection().n_components; + std::vector> solution_at_points (evaluation_points.size(), std::vector(n_components, 0.0)); + + // VectorTools::point_values can evaluate N components at a time, but this is a template argument and not a + // runtime argument. For now, we just evaluate them one component at the time. Of course it would be more + // efficient to branch and evaluate up to K at a time (for a reasonable number of K, say 10). Maybe something + // to put directly into deal.II... + for (unsigned int c=0; c values = VectorTools::point_values<1>(*this->remote_point_evaluator, + this->get_dof_handler(), + this->get_solution(), + dealii::VectorTools::EvaluationFlags::avg, + c); + for (unsigned int i=0; i + LinearAlgebra::Vector + ExternalToolInterface:: + interpolate_external_velocities_to_surface_support_points (const std::vector> &velocities) const + { + Assert (remote_point_evaluator != nullptr, + ExcMessage("You can only call this function if you have previously " + "set the evaluation points by calling set_evaluation_points(), " + "and if the evaluator has not been invalidated by a mesh " + "refinement step.")); + AssertDimension(velocities.size(), evaluation_points.size()); + + + // Create the output vector. + const DoFHandler &mesh_dof_handler = this->get_mesh_deformation_handler().get_mesh_deformation_dof_handler(); + LinearAlgebra::Vector vector_with_surface_velocities(mesh_dof_handler.locally_owned_dofs(), + this->get_mpi_communicator()); + + for (const auto &entry : map_dof_to_eval_point) + vector_with_surface_velocities[entry.dof_index] = velocities[entry.evaluation_point_index][entry.component]; + + vector_with_surface_velocities.compress(VectorOperation::insert); + + return vector_with_surface_velocities; + } + } + + + + namespace MeshDeformation + { +#define INSTANTIATE(dim) \ + template class ExternalToolInterface; + + ASPECT_INSTANTIATE(INSTANTIATE) + +#undef INSTANTIATE + } +} diff --git a/tests/mesh_deformation_external_01.cc b/tests/mesh_deformation_external_01.cc new file mode 100644 index 00000000000..177136f4182 --- /dev/null +++ b/tests/mesh_deformation_external_01.cc @@ -0,0 +1,163 @@ +/* + Copyright (C) 2025 - 2025 by the authors of the ASPECT code. + + This file is part of ASPECT. + + ASPECT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + ASPECT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with ASPECT; see the file LICENSE. If not see + . +*/ + +#include +#include + +#include + +using namespace aspect; + +#include +#include +#include +#include + + +namespace aspect +{ + namespace MeshDeformation + { + template + class TestExternalDeformation : public ExternalToolInterface + { + public: + TestExternalDeformation() = default; + + void initialize() override + { + this->get_pcout() << "initialize()" << std::endl; + } + + void + update () override + { + this->get_pcout() << "update()" << std::endl; + + if (!this->remote_point_evaluator) + { + std::vector> points; + this->get_pcout() << "\tsetting points" << std::endl; + + if (Utilities::MPI::this_mpi_process(this->get_mpi_communicator())==0) + { + if constexpr (dim == 2) + { + for (unsigned int x=0; x<11; ++x) + points.emplace_back(0.05+x*1.0/11, 1.0); + } + else + { + for (unsigned int x=0; x<5; ++x) + for (unsigned int y=0; y<5; ++y) + points.emplace_back(0.1+x*1.0/5, 0.1+y*1.0/5, 1.0); + } + } + else + Assert(false, ExcNotImplemented()); + + this->set_evaluation_points (points); + + // print all information: + this->get_pcout() << "map_dof_to_eval_point (dof, evaluation_point_index, component): " << std::endl; + for (const auto &dof_to_eval_point : this->map_dof_to_eval_point) + { + this->get_pcout() << "\t" << dof_to_eval_point.dof_index << " " << dof_to_eval_point.evaluation_point_index << " " << dof_to_eval_point.component << std::endl; + } + + } + } + + virtual + std::vector> + compute_updated_velocities_at_points (const std::vector> ¤t_solution_at_points) const override + { + this->get_pcout() << "compute_updated_velocities_at_points()" << std::endl; + + { + // Copy all data to rank 0 to print to the screen. + this->get_pcout() << "Solution at evaluation points:" << std::endl; + + std::vector>> locations_by_rank = Utilities::MPI::gather(this->get_mpi_communicator(), this->evaluation_points); + std::vector>> data_by_rank = Utilities::MPI::gather(this->get_mpi_communicator(), current_solution_at_points); + + const unsigned int rank = Utilities::MPI::this_mpi_process(this->get_mpi_communicator()); + const unsigned int size = Utilities::MPI::n_mpi_processes(this->get_mpi_communicator()); + + if (rank == 0) + { + for (unsigned int r=0; revaluation_points.size(), ExcInternalError()); + std::vector> velocities(current_solution_at_points.size(), Tensor<1,dim>()); + if (velocities.size()>6) + { + velocities[1][dim-1]=30.0; + velocities[4][dim-1]=-5.0; + velocities[6][dim-1]=10.0; + } + return velocities; + } + + + + Tensor<1,dim> + compute_initial_deformation_on_boundary(const types::boundary_id /*boundary_indicator*/, + const Point &position) const override + { + const Tensor<1,dim> gravity = this->get_gravity_model().gravity_vector(position); + Tensor<1,dim> topography_direction; + if (gravity.norm() > 0.0) + topography_direction = -gravity / gravity.norm(); + + const double topography_amplitude = (position[0]>=0.5) ? (0.05 * (1.+std::cos(2.*numbers::PI*position[0]))) : 0.0; + return topography_amplitude * topography_direction; + } + }; + } +} + + +// explicit instantiation of the functions we implement in this file +namespace aspect +{ + namespace MeshDeformation + { + ASPECT_REGISTER_MESH_DEFORMATION_MODEL(TestExternalDeformation, + "external deformation", + "") + } +} diff --git a/tests/mesh_deformation_external_01.prm b/tests/mesh_deformation_external_01.prm new file mode 100644 index 00000000000..9cba69cd6bc --- /dev/null +++ b/tests/mesh_deformation_external_01.prm @@ -0,0 +1,96 @@ +# Test the ExternalToolInterface class for mesh deformation +# derived class written as a plugin, 2d box geometry, initial +# topography coming from the plugin (and not initial topography) +# +# MPI: 1 + +set Dimension = 2 +set Use years instead of seconds = false +set End time = 0.004 +set Maximum time step = 0.0005 +set Nonlinear solver scheme = no Advection, no Stokes +set Pressure normalization = surface +set Surface pressure = 0 + +subsection Geometry model + set Model name = box + + subsection Box + set X extent = 1 + set Y extent = 1 + end +end + +# Temperature effects are ignored +subsection Initial temperature model + set Model name = function + + subsection Function + set Function expression = 100+x + end +end + +subsection Boundary temperature model + set Fixed temperature boundary indicators = bottom, top + set List of model names = initial temperature +end + +# Free slip on all boundaries +subsection Boundary velocity model + set Tangential velocity boundary indicators = left, right, bottom, top +end + +subsection Mesh deformation + set Mesh deformation boundary indicators = top: external deformation + set Additional tangential mesh velocity boundary indicators = left, right +end + +# Vertical gravity +subsection Gravity model + set Model name = vertical + + subsection Vertical + set Magnitude = 1 + end +end + +# One material with unity properties +subsection Material model + set Model name = simple + + subsection Simple model + set Reference density = 1 + set Reference specific heat = 1 + set Reference temperature = 0 + set Thermal conductivity = 1 + set Thermal expansion coefficient = 1 + set Viscosity = 1 + end +end + +# We also have to specify that we want to use the Boussinesq +# approximation (assuming the density in the temperature +# equation to be constant, and incompressibility). +subsection Formulation + set Formulation = Boussinesq approximation +end + +# We here use a globally refined mesh without +# adaptive mesh refinement. +subsection Mesh refinement + set Initial global refinement = 3 + set Initial adaptive refinement = 0 + set Time steps between mesh refinement = 0 +end + +subsection Postprocess + set List of postprocessors = visualization, topography + + subsection Visualization + set Time between graphical output = 0 + set Output mesh velocity = true + set Output mesh displacement = true + set Output undeformed mesh = false + set Interpolate output = false + end +end diff --git a/tests/mesh_deformation_external_01/screen-output b/tests/mesh_deformation_external_01/screen-output new file mode 100644 index 00000000000..a0a7222240c --- /dev/null +++ b/tests/mesh_deformation_external_01/screen-output @@ -0,0 +1,259 @@ +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- + +Loading shared library <./libmesh_deformation_external_01.debug.so> + +initialize() +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- +Number of active cells: 64 (on 4 levels) +Number of degrees of freedom: 948 (578+81+289) + +Number of mesh deformation degrees of freedom: 162 + Solving mesh displacement system... 6 iterations. +*** Timestep 0: t=0 seconds, dt=0 seconds +update() + setting points +map_dof_to_eval_point (dof, evaluation_point_index, component): +110 0 0 +111 0 1 +112 1 0 +113 1 1 +114 2 0 +115 2 1 +116 0 0 +117 0 1 +118 1 0 +119 1 1 +120 2 0 +121 2 1 +122 4 0 +123 4 1 +124 5 0 +125 5 1 +126 4 0 +127 4 1 +128 5 0 +129 5 1 +146 6 0 +147 6 1 +148 8 0 +149 8 1 +150 6 0 +151 6 1 +152 8 0 +153 8 1 +154 9 0 +155 9 1 +156 10 0 +157 10 1 +158 9 0 +159 9 1 +160 10 0 +161 10 1 +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00000 + Topography min/max: 0 m, 0.1 m + +*** Timestep 1: t=0.0005 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00001 + Topography min/max: -0.0025 m, 0.1 m + +*** Timestep 2: t=0.001 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00002 + Topography min/max: -0.005 m, 0.1 m + +*** Timestep 3: t=0.0015 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00003 + Topography min/max: -0.0075 m, 0.1 m + +*** Timestep 4: t=0.002 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00004 + Topography min/max: -0.01 m, 0.1 m + +*** Timestep 5: t=0.0025 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00005 + Topography min/max: -0.0125 m, 0.1 m + +*** Timestep 6: t=0.003 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00006 + Topography min/max: -0.015 m, 0.1 m + +*** Timestep 7: t=0.0035 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00007 + Topography min/max: -0.0175 m, 0.105 m + +*** Timestep 8: t=0.004 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.05 1 0 0 0 100.05 +0.140909 1 0 0 0 100.141 +0.231818 1 0 0 0 100.232 +0.322727 1 0 0 0 100.323 +0.413636 1 0 0 0 100.414 +0.504545 1 0 0 0 100.505 +0.595455 1 0 0 0 100.595 +0.686364 1 0 0 0 100.686 +0.777273 1 0 0 0 100.777 +0.868182 1 0 0 0 100.868 +0.959091 1 0 0 0 100.959 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01/solution/solution-00008 + Topography min/max: -0.02 m, 0.12 m + +Termination requested by criterion: end time + + ++---------------------------------------------+------------+------------+ ++---------------------------------+-----------+------------+------------+ ++---------------------------------+-----------+------------+------------+ + +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- diff --git a/tests/mesh_deformation_external_01/statistics b/tests/mesh_deformation_external_01/statistics new file mode 100644 index 00000000000..74e9abd6681 --- /dev/null +++ b/tests/mesh_deformation_external_01/statistics @@ -0,0 +1,19 @@ +# 1: Time step number +# 2: Time (seconds) +# 3: Time step size (seconds) +# 4: Number of mesh cells +# 5: Number of Stokes degrees of freedom +# 6: Number of temperature degrees of freedom +# 7: Number of nonlinear iterations +# 8: Visualization file name +# 9: Minimum topography (m) +# 10: Maximum topography (m) +0 0.000000000000e+00 0.000000000000e+00 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00000 0.00000000e+00 1.00000000e-01 +1 5.000000000000e-04 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00001 -2.50000000e-03 1.00000000e-01 +2 1.000000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00002 -5.00000000e-03 1.00000000e-01 +3 1.500000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00003 -7.50000000e-03 1.00000000e-01 +4 2.000000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00004 -1.00000000e-02 1.00000000e-01 +5 2.500000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00005 -1.25000000e-02 1.00000000e-01 +6 3.000000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00006 -1.50000000e-02 1.00000000e-01 +7 3.500000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00007 -1.75000000e-02 1.05000000e-01 +8 4.000000000000e-03 5.000000000000e-04 64 659 289 0 output-mesh_deformation_external_01/solution/solution-00008 -2.00000000e-02 1.20000000e-01 diff --git a/tests/mesh_deformation_external_01_3d.cc b/tests/mesh_deformation_external_01_3d.cc new file mode 100644 index 00000000000..23ce928a720 --- /dev/null +++ b/tests/mesh_deformation_external_01_3d.cc @@ -0,0 +1,21 @@ +/* + Copyright (C) 2025 - 2025 by the authors of the ASPECT code. + + This file is part of ASPECT. + + ASPECT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + ASPECT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with ASPECT; see the file LICENSE. If not see + . +*/ + +#include "mesh_deformation_external_01.cc" diff --git a/tests/mesh_deformation_external_01_3d.prm b/tests/mesh_deformation_external_01_3d.prm new file mode 100644 index 00000000000..2de99d4e8df --- /dev/null +++ b/tests/mesh_deformation_external_01_3d.prm @@ -0,0 +1,97 @@ +# Test the ExternalToolInterface class for mesh deformation +# derived class written as a plugin, 3d box geometry, initial +# topography coming from the plugin (and not initial topography) +# +# MPI: 1 + +set Dimension = 3 +set Use years instead of seconds = false +set End time = 0.004 +set Maximum time step = 0.0005 +set Nonlinear solver scheme = no Advection, no Stokes +set Pressure normalization = surface +set Surface pressure = 0 + +subsection Geometry model + set Model name = box + + subsection Box + set X extent = 1 + set Y extent = 1 + set Z extent = 1 + end +end + +# Temperature effects are ignored +subsection Initial temperature model + set Model name = function + + subsection Function + set Function expression = 100*x+y + end +end + +subsection Boundary temperature model + set Fixed temperature boundary indicators = bottom, top + set List of model names = initial temperature +end + +# Free slip on all boundaries +subsection Boundary velocity model + set Tangential velocity boundary indicators = left, right, bottom, top +end + +subsection Mesh deformation + set Mesh deformation boundary indicators = top: external deformation + set Additional tangential mesh velocity boundary indicators = left, right +end + +# Vertical gravity +subsection Gravity model + set Model name = vertical + + subsection Vertical + set Magnitude = 1 + end +end + +# One material with unity properties +subsection Material model + set Model name = simple + + subsection Simple model + set Reference density = 1 + set Reference specific heat = 1 + set Reference temperature = 0 + set Thermal conductivity = 1 + set Thermal expansion coefficient = 1 + set Viscosity = 1 + end +end + +# We also have to specify that we want to use the Boussinesq +# approximation (assuming the density in the temperature +# equation to be constant, and incompressibility). +subsection Formulation + set Formulation = Boussinesq approximation +end + +# We here use a globally refined mesh without +# adaptive mesh refinement. +subsection Mesh refinement + set Initial global refinement = 2 + set Initial adaptive refinement = 0 + set Time steps between mesh refinement = 0 +end + +subsection Postprocess + set List of postprocessors = visualization, topography + + subsection Visualization + set Time between graphical output = 0 + set Output mesh velocity = true + set Output mesh displacement = true + set Output undeformed mesh = false + set Interpolate output = false + end +end diff --git a/tests/mesh_deformation_external_01_3d/screen-output b/tests/mesh_deformation_external_01_3d/screen-output new file mode 100644 index 00000000000..9bc8e35d3e8 --- /dev/null +++ b/tests/mesh_deformation_external_01_3d/screen-output @@ -0,0 +1,499 @@ +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- + +Loading shared library <./libmesh_deformation_external_01_3d.debug.so> + +initialize() +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- +Number of active cells: 64 (on 3 levels) +Number of degrees of freedom: 3,041 (2,187+125+729) + +Number of mesh deformation degrees of freedom: 375 + Solving mesh displacement system... 6 iterations. +*** Timestep 0: t=0 seconds, dt=0 seconds +update() + setting points +map_dof_to_eval_point (dof, evaluation_point_index, component): +225 0 0 +226 0 1 +227 0 2 +228 5 0 +229 5 1 +230 5 2 +231 1 0 +232 1 1 +233 1 2 +234 6 0 +235 6 1 +236 6 2 +237 10 0 +238 10 1 +239 10 2 +240 11 0 +241 11 1 +242 11 2 +243 2 0 +244 2 1 +245 2 2 +246 7 0 +247 7 1 +248 7 2 +249 12 0 +250 12 1 +251 12 2 +252 0 0 +253 0 1 +254 0 2 +255 5 0 +256 5 1 +257 5 2 +258 1 0 +259 1 1 +260 1 2 +261 6 0 +262 6 1 +263 6 2 +264 10 0 +265 10 1 +266 10 2 +267 11 0 +268 11 1 +269 11 2 +270 2 0 +271 2 1 +272 2 2 +273 7 0 +274 7 1 +275 7 2 +276 12 0 +277 12 1 +278 12 2 +279 15 0 +280 15 1 +281 15 2 +282 16 0 +283 16 1 +284 16 2 +285 20 0 +286 20 1 +287 20 2 +288 21 0 +289 21 1 +290 21 2 +291 17 0 +292 17 1 +293 17 2 +294 22 0 +295 22 1 +296 22 2 +297 15 0 +298 15 1 +299 15 2 +300 16 0 +301 16 1 +302 16 2 +303 20 0 +304 20 1 +305 20 2 +306 21 0 +307 21 1 +308 21 2 +309 17 0 +310 17 1 +311 17 2 +312 22 0 +313 22 1 +314 22 2 +315 3 0 +316 3 1 +317 3 2 +318 8 0 +319 8 1 +320 8 2 +321 13 0 +322 13 1 +323 13 2 +324 4 0 +325 4 1 +326 4 2 +327 9 0 +328 9 1 +329 9 2 +330 14 0 +331 14 1 +332 14 2 +333 3 0 +334 3 1 +335 3 2 +336 8 0 +337 8 1 +338 8 2 +339 13 0 +340 13 1 +341 13 2 +342 4 0 +343 4 1 +344 4 2 +345 9 0 +346 9 1 +347 9 2 +348 14 0 +349 14 1 +350 14 2 +351 18 0 +352 18 1 +353 18 2 +354 23 0 +355 23 1 +356 23 2 +357 19 0 +358 19 1 +359 19 2 +360 24 0 +361 24 1 +362 24 2 +363 18 0 +364 18 1 +365 18 2 +366 23 0 +367 23 1 +368 23 2 +369 19 0 +370 19 1 +371 19 2 +372 24 0 +373 24 1 +374 24 2 +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00000 + Topography min/max: 0 m, 0.1 m + +*** Timestep 1: t=0.0005 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00001 + Topography min/max: 0 m, 0.1 m + +*** Timestep 2: t=0.001 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00002 + Topography min/max: 0 m, 0.1 m + +*** Timestep 3: t=0.0015 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00003 + Topography min/max: 0 m, 0.1 m + +*** Timestep 4: t=0.002 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00004 + Topography min/max: 0 m, 0.1 m + +*** Timestep 5: t=0.0025 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00005 + Topography min/max: 0 m, 0.1 m + +*** Timestep 6: t=0.003 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00006 + Topography min/max: 0 m, 0.1 m + +*** Timestep 7: t=0.0035 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00007 + Topography min/max: 0 m, 0.105 m + +*** Timestep 8: t=0.004 seconds, dt=0.0005 seconds +update() +compute_updated_velocities_at_points() +Solution at evaluation points: +rank 0: +0.1 0.1 1 0 0 0 -6.70092e-18 10.1 +0.1 0.3 1 0 0 0 -6.70092e-18 10.3 +0.1 0.5 1 0 0 0 -6.70092e-18 10.5 +0.1 0.7 1 0 0 0 -6.70092e-18 10.7 +0.1 0.9 1 0 0 0 -6.70092e-18 10.9 +0.3 0.1 1 0 0 0 -6.70092e-18 30.1 +0.3 0.3 1 0 0 0 -6.70092e-18 30.3 +0.3 0.5 1 0 0 0 -6.70092e-18 30.5 +0.3 0.7 1 0 0 0 -6.70092e-18 30.7 +0.3 0.9 1 0 0 0 -6.70092e-18 30.9 +0.5 0.1 1 0 0 0 -6.70092e-18 50.1 +0.5 0.3 1 0 0 0 -6.70092e-18 50.3 +0.5 0.5 1 0 0 0 -6.70092e-18 50.5 +0.5 0.7 1 0 0 0 -6.70092e-18 50.7 +0.5 0.9 1 0 0 0 -6.70092e-18 50.9 +0.7 0.1 1 0 0 0 -6.70092e-18 70.1 +0.7 0.3 1 0 0 0 -6.70092e-18 70.3 +0.7 0.5 1 0 0 0 -6.70092e-18 70.5 +0.7 0.7 1 0 0 0 -6.70092e-18 70.7 +0.7 0.9 1 0 0 0 -6.70092e-18 70.9 +0.9 0.1 1 0 0 0 -6.70092e-18 90.1 +0.9 0.3 1 0 0 0 -6.70092e-18 90.3 +0.9 0.5 1 0 0 0 -6.70092e-18 90.5 +0.9 0.7 1 0 0 0 -6.70092e-18 90.7 +0.9 0.9 1 0 0 0 -6.70092e-18 90.9 + Solving mesh displacement system... 4 iterations. + + Postprocessing: + Writing graphical output: output-mesh_deformation_external_01_3d/solution/solution-00008 + Topography min/max: 0 m, 0.12 m + +Termination requested by criterion: end time + + ++---------------------------------------------+------------+------------+ ++---------------------------------+-----------+------------+------------+ ++---------------------------------+-----------+------------+------------+ + +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- diff --git a/tests/mesh_deformation_external_01_3d/statistics b/tests/mesh_deformation_external_01_3d/statistics new file mode 100644 index 00000000000..b51c1014899 --- /dev/null +++ b/tests/mesh_deformation_external_01_3d/statistics @@ -0,0 +1,19 @@ +# 1: Time step number +# 2: Time (seconds) +# 3: Time step size (seconds) +# 4: Number of mesh cells +# 5: Number of Stokes degrees of freedom +# 6: Number of temperature degrees of freedom +# 7: Number of nonlinear iterations +# 8: Visualization file name +# 9: Minimum topography (m) +# 10: Maximum topography (m) +0 0.000000000000e+00 0.000000000000e+00 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00000 0.00000000e+00 1.00000000e-01 +1 5.000000000000e-04 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00001 0.00000000e+00 1.00000000e-01 +2 1.000000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00002 0.00000000e+00 1.00000000e-01 +3 1.500000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00003 0.00000000e+00 1.00000000e-01 +4 2.000000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00004 0.00000000e+00 1.00000000e-01 +5 2.500000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00005 0.00000000e+00 1.00000000e-01 +6 3.000000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00006 0.00000000e+00 1.00000000e-01 +7 3.500000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00007 0.00000000e+00 1.05000000e-01 +8 4.000000000000e-03 5.000000000000e-04 64 2312 729 0 output-mesh_deformation_external_01_3d/solution/solution-00008 0.00000000e+00 1.20000000e-01