Add some documentation about "compute_discrete_gradients()"

This commit is contained in:
Mael Rouxel-Labbé 2024-03-25 10:49:29 +01:00
parent de9c1f3dc9
commit cb1fed2ac8
2 changed files with 8 additions and 3 deletions

View File

@ -89,6 +89,11 @@ void run_dual_contouring(const Grid& grid,
}
}
// If the gradient was not known analytically, we could use:
// - Finite_difference_gradient_3 to use finite difference to compute it from values;
// - the function below to use finite difference _and_ store the values at the grid vertices
// gradients.compute_discrete_gradients(values);
Domain domain { grid, values, gradients };
Point_range points;

View File

@ -62,9 +62,9 @@ public:
m_gradients.resize(nv);
}
// computes and stores gradients at the vertices of the grid
// \tparam ValueField must be a model of `IsosurfacingValueField_3`
// \param values a field of values whose gradient are being computed
/// computes (using finite difference) and stores gradients at the vertices of the grid.
/// \tparam ValueField must be a model of `IsosurfacingValueField_3`
/// \param values a field of values whose gradient are being computed
template <typename ValueField>
void compute_discrete_gradients(const ValueField& values)
{