Skip to content
Discussion options

You must be logged in to vote

You are constructing an enormous symbolic expression, so I can see why this might crash and be very slow.
You might have more joy doing this numerically instead. mesh.coordinates.dat.data_ro will give you back a numpy array containing the mesh coordinates which you could try using instead of SpatialCoordinates. At the end you can put the resulting array into a Function by passing the val= keyword argument. To speed things up you might find numba helpful here.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cpraveen
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants