-
Notifications
You must be signed in to change notification settings - Fork 54
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
Skip adaption if error is small #256
Comments
This is a reasonable idea at a high level... I just don't know how to define "a lot" in preconditioner terms, and even one small adaptation can remove or add a row to the matrix, so I'm not sure what the best procedure is for updating a preconditioner just enough to be compatible with the new mesh... |
Well, let me clarify my question:
Now, what I want to do is:
So, if |
An alternative approach that I use in other code to avoid adapting too often is to have "trigger" quality and length definitions: AdaptOpts opts(&mesh);
auto trigger_quality = opts.min_quality_desired - 0.02;
auto trigger_length_ratio = opts.max_length_allowed * 0.9); Then only adapt if the quality or length goes below the trigger: while (t < t_end) {
t += 1;
// interpolate, solve etc...
set_metric_based_on_result(mesh, new_result);
auto minqual = mesh.min_quality();
auto maxlen = mesh.max_length();
if (minqual < trigger_quality || maxlen > trigger_length_ratio) {
// adapt, re-init, etc...
}
} |
Mhh, that sounds interesting! What is |
@bonh that is a placeholder for your own code that computes a metric field based on the current simulation state |
As one can see from the following output, the meshes before and after the adaption step are virtually the same. Nevertheless, I assume, that the mesh is updated inside Omega_h. Now, if the mesh changes, I have to reconstruct my preconditioner - even, if the mesh does not really change. And this steps takes a lot of time...
Now my question:
Is it possible to introduce some kind of feedback from Omega_h's
adapt
if the mesh has changed "a lot", e.g., a boolean. Then I could use this boolean to skip the recreation of my preconditioner.@ibaned or do you have a different solution?
The text was updated successfully, but these errors were encountered: