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

Template NEML objects on number type #17

Open
dschwen opened this issue Feb 19, 2019 · 2 comments
Open

Template NEML objects on number type #17

dschwen opened this issue Feb 19, 2019 · 2 comments

Comments

@dschwen
Copy link
Contributor

dschwen commented Feb 19, 2019

For integration with MOOSE it would be nice to be able to create NEML classes templated on either regular floating point numbers as well as dual numbers (to compute derivatives using forward mode automatic differentiation).

I guess this would make NEML a largely header only library which might no be ideal for other users though :-/

Just throwing this out.

@reverendbedford
Copy link
Collaborator

So to resurrect this very dead issue:

Would being able to compile alternate versions of the library by doing something like:

#define Scalar double

be enough? Or do you really want the ability to template on the scalar type?

I intend to have everything done by the end of the summer where you can swap the scalar real type in a couple of places (the history/internal state system and the tensor math classes) and have that change propagate to the entirety of the library. We can think on what to do once that's done.

@dschwen
Copy link
Contributor Author

dschwen commented May 19, 2022

Hm. I suspect we might only need dual numbers in very few places, with the mechanics Jacobians all being implemented fully. Let me think about this some more.

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

2 participants