Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculating derivative of quantities in a 2D and 3D meshes

I am new to physics of games. I have a problem where i have a 2D or 3D mesh. The computational cells are triangles or tetrahedrons respectively. Certain physical quantities like density and energy are given at cell centers as cell centered averages. I need to compute the gradient of these quantities at the center of all the cells in the mesh.

I understand that in 1D, the derivative of a quantity in a cell (i) can be calculated by dividing the difference of values of that quantity in the neighboring cells (i+1,i-1) by the distance between them (central difference formula). What i don't understand is to solve this problem on an arbitrary 2D or 3D mesh?

Can i get reference to some literature where i can get such numerical methods/algorithms ?

Thanks in advance.

like image 706
hrs Avatar asked Oct 15 '25 18:10

hrs


1 Answers

This paper is a good place to start when thinking about differential operators on a mesh. It doesn't get into volumetric meshes (if I recall), but it's a good start. In particular, the paper presents a sound choice for assigning gradients at the vertices from a discrete differential geometry point of view (DDG), from which you can use barycentric coordinates to compute a gradient field on the interior of the facets.

like image 122
Codie CodeMonkey Avatar answered Oct 18 '25 11:10

Codie CodeMonkey