Efficient and Accurate Coordinate Transform
Show older comments
Hello everyone,
I've been working a adaptive finite difference solving that can handle non-orthogonal meshes for arbitrary dimensions. This is being used to calculate the derivative terms of a set of vector fields for some fluid flow in a steady domain. Because the domain is steady and I'm typically looking at tens or hundreds vector fields. I'm trying to generate a set of coefficients upfront based on the characteristics of the mesh so I create a set of shifted vector fields and sum them together to get derivative of the vector field very cheaply.
Where I'm looking for suggestions is for a coordinate transform. Originally I created this set of functions assuming a 2D vector field. There I explicitly calculated the jacobain inverse upfront since it was only a 2x2 matrix inverse then multiplied it to each of vector field derivative calculated on a 'computational' domain i.e. just a set of index. This worked well because I could calculate the inverse once for a mesh then apply it to all of my flow snapshots. So now extending this now to 3D is causing problem with running into singularities and ill-conditioned matrices. So I know I could always produce the transform by using backslash and avoid essentially all of these problems, but then to my knowledge I would need to do this with very vector field. So is there a more stable means of calculating a 3x3 inverse than inv. While the end goal is to perform the transform, getting the inverse jacobain explicitly allows a massive speedup for my application.
Accepted Answer
More Answers (0)
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!