Closed rhk12 closed 5 years ago
@rhk12 : There are a few changes that can be done to the code. Will work on this after few more functionalities are added.
Regarding ndim vs 3 : The broad guideline I follow is, If function is specifically for 3D elements ndim is 3 for sure. So 3 can be used instead of ndim. For a generic function common to 2D and 3D, ndim can be used. The rationale behind this is that using the constant 3 might help compiler perform optimizations on the code. Having said that, you will find lots of places where this is not followed. Regarding, GetForce_3D, I think it can be used for 2D as well. I will modify this and push changes.
@enstrophy https://github.com/PSUCompBio/FemTech/blob/2e9178e3a89e3b1b388fe273fda44b0ddf69488d/src/fem/SolidMechanics/GetForce_3D.cpp#L32