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

Lowest order integration rules for tets #1110

Closed
kinnala opened this issue Mar 23, 2024 · 5 comments · Fixed by #1130
Closed

Lowest order integration rules for tets #1110

kinnala opened this issue Mar 23, 2024 · 5 comments · Fixed by #1130

Comments

@kinnala
Copy link
Owner

kinnala commented Mar 23, 2024

Right now the lowest order integration rule for tets has 4 points. The following rule is suitable for P1 Laplacian though:

quadrature=(np.array([[.25],[.25],[.25]]), np.array([1/6]))

It should be added to get_quadrature.

@adtzlr
Copy link
Contributor

adtzlr commented Jun 5, 2024

Great, this saves some computation time and memory for linear elasticity.

The only downside (if it is really considered to be one) of it is that projections do not work with this lowest-order quadrature. But it is so obvious that this should not be a problem. I think a typical scikit-fem user has enough knowledge.

@kinnala
Copy link
Owner Author

kinnala commented Jun 6, 2024

I think it won't be a problem since usually it would not enabled by default, user has to write Basis(..., intorder=1). Perhaps it will be enabled by default if initializing a basis for Basis(..., ElementTetP0())). I will need to check this.

@kinnala
Copy link
Owner Author

kinnala commented Jun 6, 2024

So basically, before this change, if user initializes Basis(mesh, ElementTetP0()) it chose automatically the rule with 4 integration points while, after the change, it would automatically choose the rule with 1 integration point. So there might be some surprises involved if a user relied on this kind of behaviour.

@kinnala
Copy link
Owner Author

kinnala commented Jun 6, 2024

I am considering of circumventing the aforementioned issue by increasing ElementTetP0.maxdeg from 0 to 1.

@kinnala
Copy link
Owner Author

kinnala commented Jun 6, 2024

Nah, I will let the speed benefit show there.

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

Successfully merging a pull request may close this issue.

2 participants