-
Notifications
You must be signed in to change notification settings - Fork 291
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
[WIP] Make geometric calculations more generic #2396
Conversation
9cee552
to
6b825db
Compare
"Work in progress" means I can merge #2395 and undercut all your hard work without feeling too guilty? |
Sigh...haha yes go ahead. |
Ouch, I barely changed browser tabs before github started yelling at us here about conflicting files. Sorry about the hassle. On the bright side, the expanded unit test coverage should make it easier to do this work without regressions! |
7bf4306
to
7a3ce50
Compare
@jwpeterson pointed out to me that our _impl.h convention (where most users don't need to include them because we instantiate the common case(s) manually) isn't intuitively obvious. Let's come up with some boilerplate comment to document that convention in the _impl.h headers as part of this PR, then when we're happy with that we can add it to the existing dense_matrix*_impl.h headers too? |
Sounds good to me |
db77e13
to
4305ca5
Compare
So @lindsayad I think you are going to have to template every class in libmesh, like EquationSystems, System, etc.? I'm starting to get scared. |
c91cd08
to
76e8f66
Compare
Haha, this is why I threw this up here (with a WIP label) so that you guys could give your input as I go. So I think that I should only have to class template geometric entities. Algebraic entities should escape relatively unscathed, except that algebraic class methods which include geometric entities in their argument list will probably have to become templated; you can see d2b9728 for an example of this. If an algebraic class has a geometric entity as a data member or a method with a geometric return type that is unrelated to the argument list (e.g. I wouldn't be able to deduce a function template argument from the function args), then I have to get a little more clever. So for the I've been thinking about how to do this with any less work (and any less destruction) than what I've been doing but so far I've yet to have any bright ideas. |
aeddc83
to
571248c
Compare
42cd6c8
to
651e829
Compare
I never thought I'd see the day...my branch compiles!!! Now of course compiling a |
1eef47e
to
730fb93
Compare
Has anyone ever seen an error like this before? In file included from ../include/libmesh/dof_map_impl.h:40, Used but never defined...I don't get it. There's clearly a definition for the template |
13b2d8a
to
13e0dde
Compare
I'm seeing two paths forward with this:
I'm leaning towards 2 because it is more consistent with the current conceptual libMesh model which is that a mesh is paired with an In summary, I think I'm going to need to:
|
13e0dde
to
dcbc7d7
Compare
On second thought, I'm leaning towards not templating algebraic objects at all. You know, Occam's Razor and stuff. Then I'd just have to do something smart for cloning DofObject information on to the displaced mesh's Nodes and Elems |
So that "used but never defined" looks like my bug? At one point I had a KeyType parameter in the push vector specialization, but now it looks like the KeyType parameter exists in the declaration but not in the definition, and so your compiler may rightly be confused by that. Not sure why my compiler and the CI compilers haven't already hit that or how you set it off, though. |
There's got to be a better phrase than "algebraic classes" for System/DofMap/EquationSystems ... if only because I've already abused that vocabulary in the opposite direction in parallel_algebra.h ... let me call them "system classes" for lack of a better word. I agree with your dichotomy, and my vote would be to avoid templating the system classes if possible, and I think it would be possible, if we're willing to allow for a little dynamic_cast hackery in user space to get AD geometry when that's available. |
dcbc7d7
to
dc9097a
Compare
Seemed consistent with algebraic ghosting 😅
Cool 👍 |
Oh, well, see, there's your problem. If you try to come up with your own names then consistency is difficult, but if you try to match my naming schemes then consistency is impossible. |
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This PR has been marked "do not merge" since we are no longer accepting PRs into the |
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
This is a much simpler in terms of lines of code (albeit perhaps slower) implementation of the goal of realizing geometric and finite element basis evaluations with derivative information, which has its usefulness in displaced mesh calculations. Refs libMesh#2121 libMesh#2396
Closing in favor of the research work on #2576 |
Classes that need to be templated:
Other To-Do items:
We'll have to talk about what we want to do for backwards compatability.
Closes #2121