Skip to content

Libmesh error when developing a custom auxkernel to solve for the flux of atoms & defects in a binary alloy #29003

Answered by GiudGiud
swonner asked this question in Q&A General
Discussion options

You must be logged in to vote

Hello

So this expression as a whole seems to evaluate to an ADVector.
This makes sense because k, T are ADReal, then the Ls are Real and finially the gradients are vectors.

So this makes for an ADVector.
But the return type is a Real, so it is both:

  • not AD
  • a scalar not a vector.

To turn an AD number into a regular number you can use: Real a = MetaPhysicL::raw_value(b);

to turn a vector into a number, you need to either:

  • take a dot product
  • choose a component
    Which one fits here?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@swonner
Comment options

@GiudGiud
Comment options

GiudGiud Nov 6, 2024
Collaborator

@swonner
Comment options

Answer selected by swonner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants