Skip to content
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

Use the equivalent formula for the Persson TCI not using log #3

Open
yoonso0-0 opened this issue Sep 8, 2021 · 0 comments
Open

Use the equivalent formula for the Persson TCI not using log #3

yoonso0-0 opened this issue Sep 8, 2021 · 0 comments

Comments

@yoonso0-0
Copy link
Collaborator

yoonso0-0 commented Sep 8, 2021

The TCI-ing criteria of current implementation uses the following lines:

if (l2Norm(*filtered_component) <= zero_cutoff * l2Norm(component)) {
      continue;
}

if (std::log10(l2Norm(*filtered_component) / l2Norm(component)) >
    -alpha * std::log10(static_cast<double>(dg_mesh.extents(d) - 1))) {
  return true;
}

which may be simplified to its equivalent form without using log:

l2_norm_filtered * N ** alpha > l2_norm_component

where N = dg.mesh.extent(d)-1.

This way may have some computational speed-ups (however, up to the cost of pow function) as well as that we do not need the zero_cutoff (persson_epsilon) and the first if branch using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant