Skip to content

slightly complicated initial condition #2695

Discussion options

You must be logged in to vote

Well we also don't support string expressions, so that's a happy coincidence ;).

If you've got an analytic expression for an initial condition then the preferred way to set the initial condition is to express that analytic experession in UFL and interpolate that. The key tools you need beyond the usual arithmetic and trig operations are SpatialCoordinate(mymesh) which will return a symbolic vector which you use as the coordinates in your expresion, and ufl.Conditional which you can use for any branches you need.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@markadams
Comment options

Answer selected by markadams
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@markadams
Comment options

@wence-
Comment options

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