Efficient and Accurate Coordinate Transform
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!