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

Check meshes for coarsening #26

Open
mknaranja opened this issue Apr 3, 2023 · 1 comment
Open

Check meshes for coarsening #26

mknaranja opened this issue Apr 3, 2023 · 1 comment
Labels
enhancement Improvement of current functionality good first issue Good for newcomers

Comments

@mknaranja
Copy link
Member

If the number of grid points in e.g. r is even, standard coarsening would result in two consecutive coarse circles. If we want to allow that, specialized cases had to be implemented for e.g. prolongation and restriction operators.

The code relies all the time on the fact that nr is odd, and thus nr_int (int for intervals) is even. We should exclude meshes not respecting that. We are checking nr and ntheta for the coarser grids, but we should check it also upon the grid creation; see https://github.com/mknaranja/GMGPolar/blob/main/src/define_coarse_nodes.cpp#L68

@mknaranja mknaranja added enhancement Improvement of current functionality good first issue Good for newcomers labels Apr 3, 2023
@mknaranja
Copy link
Member Author

=> One could add on line 58 of create_grid_polar:

if (v_level[0]->ntheta % 2 != 0 || v_level[0]->nr % 2 != 1) throw std::runtime_error("nr and ntheta must be resp. odd and even for the standard coarsening to work.");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of current functionality good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant