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

Better type checks for differential operator composition #3

Open
AlePalu opened this issue Aug 10, 2023 · 0 comments
Open

Better type checks for differential operator composition #3

AlePalu opened this issue Aug 10, 2023 · 0 comments

Comments

@AlePalu
Copy link
Member

AlePalu commented Aug 10, 2023

Thanks to #2, we can compose differential operators as

auto L = -laplacian<FEM>() + advection<FEM>(b);

which also adds the possibility to compose operators not FE-based. For instance, we could define a 1D diffusion-reaction problem using 1D splines as

auto L = -laplacian<SPLINE>() + reaction<SPLINE>(1.0);

This mechanism opens the possibility to assemble ill-formed operators as -laplacian<FEM>() + reaction<SPLINE>(1.0).
In this case, even if the compilation stops (because of different layouts in the mem_buffer tuple required by FE operators) it would be preferrable to trigger a more understandable static_assert to notify the ill-formness of the operator.

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