OptimalDesignLab / PDESolver.jl

A Julia-based solver for partial-differential equations.
Other
13 stars 5 forks source link

Numbering Nodes not Dofs #19

Open JaredCrean2 opened 9 years ago

JaredCrean2 commented 9 years ago

A simpler and more flexible method for getting DOF numbers would be to not number DOFs themselves, but to number nodes themselves, and whenever the number of dof i on a particular node is needed, to calculated it as nodenum*numdofpernode + i. This has two principle advantages: 1) it reduces memory bandwidth usage and 2) every node now has a unique, unit-stride number assigned to it, which would make some of the bookkeeping associated with sub-triangulation easier.

jehicken commented 9 years ago

This (i.e. numbering nodes rather than variables) is usually how it is done.

FYI: the calculation for the DOF index would be (nodenum-1)*numdofpernode + i