Skip to content
Open
Changes from 1 commit
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
42a27b3
add fastscapelib cmake config
benbovy Jan 15, 2025
14087d8
Add fastscapelib xtensor xtl to contrib and Cmakelist
Minerallo Jul 8, 2023
bb2724b
add interface fastcapecc.cc .h and prm in cookbook
Minerallo Jul 14, 2023
cceca11
replaced hard variables back
Minerallo Jul 14, 2023
2cc8d89
add test case fastscape_eroding_box_cc.prm
Minerallo Jul 14, 2023
557cffd
add test repository and output_screen
Minerallo Jul 14, 2023
efa08cf
correction of V in m/s
Minerallo Jul 20, 2023
9c1047c
add mpi communication
Minerallo Jul 21, 2023
c73469c
add trimesh and spherical geometry
Minerallo Apr 7, 2024
e25afd9
reactivate box geometry
Minerallo Apr 8, 2024
a7611ec
rebased ASPECT and remove std::cout messages
Minerallo Oct 18, 2024
55514ab
update fastscapelib
Minerallo Oct 18, 2024
7995eb2
update with Healpix
Minerallo Oct 18, 2024
bdc2c0c
add healpix_cxx library
Minerallo Oct 24, 2024
0998c50
Healpix library with box coupling
Minerallo Oct 24, 2024
7876461
error correction and grid_box = std::make_unique to figure out
Minerallo Oct 25, 2024
6a31835
add modules cmake healpix brew
Minerallo Oct 25, 2024
1217b44
add assert if box of shell
Minerallo Oct 25, 2024
97dccf2
setting index nsides
Minerallo Oct 25, 2024
2dc4619
array size
Minerallo Oct 25, 2024
d6041bd
no mst sink
MFraters Oct 25, 2024
5b16c19
timestep to test
Minerallo Oct 25, 2024
4ae27d7
If you read this please send help
MFraters Oct 25, 2024
2a369ba
add mpirun path and addtional modelule to load
Minerallo Oct 28, 2024
cb01fbd
use radial velocity
Minerallo Oct 28, 2024
b0466c0
Add initial fastscape dealii adapter.
MFraters Jan 16, 2025
c2a90c5
indent
MFraters Jan 16, 2025
2e99573
remove fastscapelib, xtensor and healpix sources
benbovy Jan 16, 2025
bdeb3d2
cmake: remove fastscapelib xtensor included from contrib
benbovy Jan 16, 2025
caf31fc
cmake: remove healpix support
benbovy Jan 16, 2025
fb094f6
cleanup and fixes (fastscapelib stable version)
benbovy Jan 16, 2025
df7a739
clean-up (remove healpix)
benbovy Jan 16, 2025
433eddb
add back fastscape (fortran) python VTK script
benbovy Jan 16, 2025
a37729e
update and resolve conflicts
Minerallo Jan 16, 2025
a49d70f
indent + some cleanup
benbovy Jan 16, 2025
569433a
temp link error dirty fix
benbovy Jan 16, 2025
0fff693
add temporary instructions to install fastsacpelib
benbovy Jan 17, 2025
b82cf34
nit
benbovy Jan 17, 2025
b4997af
make fastscapelib grid adapater more agnostic
benbovy Jan 22, 2025
113a73b
clean-up
benbovy Jan 22, 2025
e0d2f56
refactor init surface mesh
benbovy Jan 23, 2025
29fbbc4
remove GeometryType
benbovy Jan 23, 2025
86fe4d7
C++14 support
benbovy Jan 23, 2025
4b936a2
Restore fastscapecc_adapter.h from fastscape adapter commit
Minerallo Jun 4, 2025
a0a51ff
Restore latest fastscapecc_adapter.h from commit 9745776 (refactor in…
Minerallo Jun 4, 2025
8338271
updated Benoit Branch
Minerallo Jun 7, 2025
bb7b926
add fastscape iteration and support for 2D in adapter.h
Minerallo Jun 10, 2025
7f385aa
change back to dynamic cast for model geonetry
Minerallo Jun 11, 2025
ded3ebd
address benoit comment fixed value and flow graph
Minerallo Jun 11, 2025
9414548
add init surface mesh for box
Minerallo Jun 11, 2025
0b3da11
add back condition for box or sphere geometry
Minerallo Jun 11, 2025
962ee9b
correct elevation init
Minerallo Jun 12, 2025
8348a7d
Also make sure the XTL headers can be found.
bangerth Jun 11, 2025
1a32cab
Fix the copyright header.
bangerth Jun 11, 2025
4dfa1ca
add copyright to adapter and remove pout messages
Minerallo Jun 12, 2025
ba9edb7
update h _vz problem
Minerallo Jun 12, 2025
83320b0
push to make PR WIP
Minerallo Jun 12, 2025
d36e812
Deal with the fact that Xtensor moved all of its header files.
bangerth Jun 12, 2025
a7656b3
Account for the fact that FastScape has removed some files after 0.2.2.
bangerth Jun 12, 2025
4385cb8
add projected velocity and radial velocity to projected_solution_surf…
Minerallo Jun 12, 2025
bf08ae3
added mapping for vertex_index for spherical
Minerallo Jun 12, 2025
98e9c06
change back to surface_solution projection and add additional refinement
Minerallo Jun 13, 2025
c85282b
fixed surface_elevation
Minerallo Jun 13, 2025
9f57401
fix model extent and repetition for topography calculation
Minerallo Jun 13, 2025
619c3b4
removed not used variables
Minerallo Jun 13, 2025
ce51b13
Avoid the use of a deprecated function.
bangerth Jun 13, 2025
d459e20
Add a set of necessary braces.
bangerth Jun 13, 2025
87b99ce
Slightly improve the documentation of the FastScapeCC couplers.
bangerth Jun 13, 2025
3969d51
Convert the 'surface_fe' variable into a non-pointer.
bangerth Jun 13, 2025
4fe148d
Merge the init_surface_mesh() functions into one.
bangerth Jun 14, 2025
c39320e
Move common code out of the if-else branches.
bangerth Jun 14, 2025
326ce9c
Add an assertion.
bangerth Jun 14, 2025
7431ca7
Leave a TODO.
bangerth Jun 14, 2025
d38a49d
Minor edits + some TODOs for project_surface_solution().
bangerth Jun 14, 2025
98db3bc
Limit the scope of some variables.
bangerth Jun 14, 2025
c53574b
Add documentation and a TODO.
bangerth Jun 14, 2025
7189a6d
Leave several more TODOs.
bangerth Jun 14, 2025
89ec826
change for n_used_vertices
Minerallo Jun 14, 2025
0740232
made surface_velocity_solution and surface_height local variables for…
Minerallo Jun 14, 2025
74abd77
Use the gravity model to obtain a vertical direction
Minerallo Jun 14, 2025
c1524c4
Use parallel distributed Triangulation for surface mesh
Minerallo Jun 14, 2025
d711623
Query the velocity from Dofs using introspection
Minerallo Jun 14, 2025
6344e5b
remove to do distributed triangulation
Minerallo Jun 14, 2025
b1d6fdb
fixed dx dy calculation
Minerallo Jun 16, 2025
c8c0002
Remove two unused variables.
bangerth Jun 16, 2025
8cdd327
tried debugging and print statement
Minerallo Jun 16, 2025
6dbbcf5
indent
Minerallo Jun 16, 2025
6dc999a
indent and back to old picking value for interpolation
Minerallo Jun 16, 2025
3c4e1dc
add back height variable missing
Minerallo Jun 16, 2025
6935a41
format Fastscape variable with mesh grid.shape
Minerallo Jun 16, 2025
54d607f
fastscape working but error when solving mesh displacement
Minerallo Jun 17, 2025
094d001
add visualization for fastscape
Minerallo Jun 17, 2025
a37293f
add fastscape visualisation repository for 1 aspect timestep test
Minerallo Jun 17, 2025
406678f
correction fastscape visualisation for timestep 0
Minerallo Jun 17, 2025
b0c85fc
add sinker resolver
Minerallo Jun 17, 2025
0af1910
add diffusion_eroder but doesn't seems usefull with dealii grid adapter
Minerallo Jun 17, 2025
031bfb5
Remove unused variables.
bangerth Jun 17, 2025
4cde447
Remove comment that is no longer needed.
bangerth Jun 17, 2025
cf9bbf4
Only compile files when with FastScape++.
bangerth Jun 17, 2025
77b4607
Also export whether we are building with FastScape++.
bangerth Jun 17, 2025
0afabff
deactivate error OFF message during cmake
Minerallo Jun 17, 2025
58c55cf
Merge branch 'main' into add-fastscapelib-cpp-integration_copy
Minerallo Jun 17, 2025
2453282
Leave more TODOs.
bangerth Jun 17, 2025
115881f
correct V unit to m/s and rename grid_extent to Box grid_extent
bangerth Jun 17, 2025
11ccf3e
declare box_grid_extent and rename cell to volume_cell
Minerallo Jun 17, 2025
6a4d926
rename cell
Minerallo Jun 17, 2025
316bbf8
uplift rate in m/s for Fastscape
Minerallo Jun 18, 2025
4186fe0
box working with brut values in flow function
Minerallo Jun 18, 2025
9d00b91
corrected visualisation and made elevation mutable
Minerallo Jun 18, 2025
47151ba
rename variable m and n
Minerallo Jun 18, 2025
4ea2cb1
based node fixed thought function, uplift rate corrected for xt::array
Minerallo Jun 18, 2025
7841b4c
add visu function for later commented
Minerallo Jun 18, 2025
97123f7
MPI send the data place before receiving them
Minerallo Jun 18, 2025
d8a8f6c
Use deal.II's send/receive functionality over MPI's.
bangerth Jun 18, 2025
1b66e0b
Make sure we can actually query the compile guards.
bangerth Jun 18, 2025
0997f1f
Leave more comments and TODOs.
bangerth Jun 18, 2025
aa074f6
Address some comments.
bangerth Jun 18, 2025
e6fee9a
Indent according to our usual scheme.
bangerth Jun 19, 2025
41c579f
Add some compatibility classes.
bangerth Jun 19, 2025
ce49957
Ensure we use the vertical direction, not the z-direction.
bangerth Jun 19, 2025
4f8f097
Merge pull request #1 from bangerth/add-fastscapelib-cpp-integration_…
Minerallo Jun 19, 2025
8666176
tried adding multimap
Minerallo Jun 19, 2025
a8ea6ea
make multimap with isend working
Minerallo Jun 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 5 additions & 108 deletions source/mesh_deformation/fastscapecc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ namespace aspect
fastscapelib::spl_eroder<FlowGraphType> spl_eroder
=
// fastscapelib::make_spl_eroder(flow_graph, kff, n, m, 1e-5)
fastscapelib::make_spl_eroder(flow_graph, kff, n, m, 1e-5);
fastscapelib::make_spl_eroder(flow_graph, 1e-6, 0.4, 1, 1e-5);
Copy link

@benbovy benbovy Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values make more sense than the variables, m (area exponent) and n (slope exponent) were flipped. The right order is:

fastscapelib::make_spl_eroder(flow_graph, kff, m, n, 1e-5);

(side note: this is also why I prefer the names area_exp / slope_exp over m / n to avoid confusion and one character variable names).

std::cout << "KFF : " << kff<< std::endl;


Expand Down Expand Up @@ -528,113 +528,10 @@ namespace aspect
// the other plugins where we don't output information in *every* time step, but only
// when requested.

// Create output directory
// const std::string output_directory = (this->get_output_directory() + "/fastscapeCC");
// if (!std::filesystem::exists(output_directory))
// std::filesystem::create_directories(output_directory);

// // Vector to track output files
// std::vector<std::string> vtu_filenames;

// const auto write_output = [&](const unsigned int step_index,
// const xt::xarray<double> &elevation,
// const xt::xarray<double> &uplift_rate,
// const xt::xarray<double> &erosion,
// const xt::xarray<double> &drainage_area)
// {
// dealii::Vector<double> elevation_output(n_grid_nodes);
// dealii::Vector<double> uplift_rate_output(n_grid_nodes);
// dealii::Vector<double> erosion_output(n_grid_nodes);
// dealii::Vector<double> drainage_area_output(n_grid_nodes);

// for (unsigned int j = 0; j < n_grid_nodes; ++j)
// {
// elevation_output[j] = elevation[j];
// uplift_rate_output[j] = uplift_rate[j];
// erosion_output[j] = erosion[j];
// drainage_area_output[j] = drainage_area[j];
// }

// dealii::DataOut<dim-1, dim> data_out;
// data_out.attach_dof_handler(surface_mesh_dof_handler);
// data_out.add_data_vector(elevation_output, "Elevation");
// data_out.add_data_vector(uplift_rate_output, "UpliftRate");
// data_out.add_data_vector(erosion_output, "Erosion");
// data_out.add_data_vector(drainage_area_output, "DrainageArea");
// data_out.build_patches();

// const std::string filename = output_directory + "/fastscape_surface_iteration_" +
// Utilities::int_to_string(step_index, 4) + ".vtu";
// std::ofstream output(filename);
// data_out.write_vtu(output);
// this->get_pcout() << "➤ Wrote VTK file: " << filename << std::endl;

// vtu_filenames.push_back(filename);
// };

// // Output initial state
// if (output_internal_fastscape_steps)
// write_output(0, elevation, uplift_rate, xt::zeros<double>({n_grid_nodes}), xt::zeros<double>({n_grid_nodes}));

// // === FASTSCAPE LOOP ===
// for (unsigned int i = 1; i <= fastscape_iterations; ++i)
// {
// std::cout << "\nFastScape iteration " << i << "/" << fastscape_iterations << std::endl;

// xt::xarray<double> uplifted_elevation = elevation + fastscape_timestep_in_years * uplift_rate;

// std::cout << "[DEBUG] uplifted_elevation max = " << xt::amax(uplifted_elevation)()
// << ", min = " << xt::amin(uplifted_elevation)() << std::endl;

// flow_graph.update_routes(uplifted_elevation);
// flow_graph.accumulate(drainage_area, 1.0);

// std::cout << "[DEBUG] drainage_area max = " << xt::amax(drainage_area)()
// << ", min = " << xt::amin(drainage_area)() << std::endl;

// auto spl_erosion = spl_eroder.erode(uplifted_elevation, drainage_area, fastscape_timestep_in_years);

// std::cout << "[DEBUG] spl_erosion max = " << xt::amax(spl_erosion)()
// << ", min = " << xt::amin(spl_erosion)() << std::endl;

// //Working for raster grid only
// // auto diff_erosion = diffusion_eroder.erode(uplifted_elevation - spl_erosion, fastscape_timestep_in_years);

// sediment_flux = flow_graph.accumulate(spl_erosion);
// elevation = uplifted_elevation - spl_erosion ; //- diff_erosion for raster grid

// std::cout << "[DEBUG] updated elevation max = " << xt::amax(elevation)()
// << ", min = " << xt::amin(elevation)() << std::endl;

// if (output_internal_fastscape_steps)
// write_output(i, elevation, uplift_rate, spl_erosion, drainage_area);
// }

// // Final output (even if internal output was disabled)
// if (!output_internal_fastscape_steps)
// write_output(fastscape_iterations, elevation, uplift_rate, xt::zeros<double>({n_grid_nodes}), drainage_area);

// // === WRITE PVD FILE ===
// {
// const std::string pvd_filename = output_directory + "/fastscape_iterations.pvd";
// std::ofstream pvd_file(pvd_filename);

// pvd_file << "<?xml version=\"1.0\"?>\n"
// << "<VTKFile type=\"Collection\" version=\"0.1\" byte_order=\"LittleEndian\">\n"
// << " <Collection>\n";

// for (unsigned int i = 0; i < vtu_filenames.size(); ++i)
// {
// pvd_file << " <DataSet timestep=\"" << i << "\" group=\"\" part=\"0\"\n"
// << " file=\""
// << "fastscape_surface_iteration_" << Utilities::int_to_string(i, 4) << ".vtu\"/>\n";
// }

// pvd_file << " </Collection>\n"
// << "</VTKFile>\n";

// this->get_pcout() << "➤ Wrote PVD file: " << pvd_filename << std::endl;
// }
// Read parameter





// Create output directory
Expand Down