-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Level set: composition (II) #26
Conversation
template <int dim> | ||
void | ||
compute_cell_diameters(const MatrixFree<dim, double> & matrix_free, | ||
const unsigned int dof_index, | ||
AlignedVector<VectorizedArray<double>> &cell_diameters, | ||
double & cell_diameter_min, | ||
double & cell_diameter_max) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mschreter FYI :)
17d5f1b
to
e5dc601
Compare
@mschreter Note that I have rebased to incorporate your changes. |
template void | ||
initialize_projection_matrix<1, double, VectorizedArray<double>>( | ||
const MatrixFree<1, double, VectorizedArray<double>> &matrix_free, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx!
…into ls_composition_2
@@ -346,5 +364,6 @@ LevelSetOKZSolverReinitialization<dim>::reinitialize(const double dt, | |||
this->time_stepping.next(); | |||
} | |||
|
|||
template class LevelSetOKZSolverReinitialization<1>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @mschreter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @mschreter
@@ -76,7 +75,6 @@ class LevelSetOKZSolverComputeCurvature | |||
{ | |||
public: | |||
LevelSetOKZSolverComputeCurvature( | |||
LevelSetOKZSolverComputeNormal<dim> & normal_operator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The curvature operator does not need the normal operator anymore.
source/level_set_okz.cc
Outdated
TimerOutput::Scope timer(*this->timer, "LS compute curvature."); | ||
curvatur_operator->compute_curvature(diffuse_large_values); | ||
// This function computes the curvature from the normal field. Could also | ||
// compute the curvature directly from C, but that is less accurate. TODO: | ||
// include that variant by a parameter | ||
{ | ||
TimerOutput::Scope timer(*this->timer, "LS compute normal."); | ||
this->compute_normal(false); | ||
} | ||
{ | ||
TimerOutput::Scope timer(*this->timer, "LS compute curvature."); | ||
curvatur_operator->compute_curvature(diffuse_large_values); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... instead we need to call the normal operator ourselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will follow the same strategy in meltpool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mschreter I have tried also to eliminate the normal operator from the reinitialization operator. It is significantly more complicated...
@@ -68,7 +68,6 @@ class LevelSetOKZSolverReinitialization | |||
using BlockVectorType = LinearAlgebra::distributed::BlockVector<double>; | |||
|
|||
LevelSetOKZSolverReinitialization( | |||
LevelSetOKZSolverComputeNormal<dim> & normal_operator, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to pass the normal operator to the constructor.
reinitialize(const double dt, | ||
const unsigned int stab_steps, | ||
const unsigned int diff_steps = 0, | ||
const std::function<void(bool)> &compute_normal = [](const bool) {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead a lambda with the effect.
@kronbichler This PR should be good to be merged. We have adjusted the interface so that they can be better be used from external. Furthermore, we have enabled that parts of the code can be compiled for 1D. |
Follow up PR to #14.