Skip to content

Commit

Permalink
resolve unit confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
schuhmaj committed Mar 26, 2024
1 parent 26102a9 commit d8a50fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/api/util.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ sugar for using the thrird party dependency :code:`thrust`.
Documentation
-------------

.. doxygennamespace:: polyhedralGravity::util
.. doxygennamespace:: polyhedralGravity::util
11 changes: 7 additions & 4 deletions src/polyhedralGravity/calculation/GravityEvaluable.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace polyhedralGravity {
/** The constant density polyhedron consisting of vertices and triangular faces */
const Polyhedron _polyhedron;

/** The constant density of the polyhedron in @f$[kg/m^3]@f$ */
/** The constant density of the polyhedron (the unit must match to the mesh, e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$) */
const double _density;

/** Cache for the segment vectors (segments between vertices of a polyhedral face) */
Expand All @@ -45,7 +45,8 @@ namespace polyhedralGravity {
/**
* Instantiates a GravityEvaluable with a given constant density polyhedron.
* @param polyhedron the polyhedron
* @param density the constant density in @f$[kg/m^3]@f$
* @param density the constant density (the unit must match to the mesh,
* e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$)
*
* @note This is a separate constructor since the polyhedron as a class it not exposed to the user via
* the Python Interface. Thus, this constructor is only available via the C++ interface.
Expand All @@ -57,7 +58,8 @@ namespace polyhedralGravity {
/**
* Instantiates a GravityEvaluable with a given constant density polyhedron.
* @param polyhedralSource the vertices & faces of the polyhedron as tuple or the filenames of the files
* @param density the constant density in @f$[kg/m^3]@f$
* @param density the constant density (the unit must match to the mesh,
* e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$)
*/
GravityEvaluable(const PolyhedralSource &polyhedralSource, double density) : _polyhedron{
std::holds_alternative<std::tuple<std::vector<Array3>, std::vector<IndexArray3>>>(polyhedralSource)
Expand All @@ -71,7 +73,8 @@ namespace polyhedralGravity {
* Instantiates a GravityEvaluable with a given constant density polyhedron and caches.
* This is for restoring a GravityEvaluable from a previous state.
* @param polyhedron the polyhedron
* @param density the constant density in @f$[kg/m^3]@f$
* @param density the constant density (the unit must match to the mesh,
* e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$)
* @param segmentVectors the segment vectors
* @param planeUnitNormals the plane unit normals
* @param segmentUnitNormals the segment unit normals
Expand Down
6 changes: 4 additions & 2 deletions src/polyhedralGravity/calculation/GravityModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace polyhedralGravity::GravityModel {
* Evaluates the polyhedrale gravity model for a given constant density polyhedron at computation
* point P.
* @param polyhedron the polyhedron consisting of vertices and triangular faces
* @param density the constant density in @f$@f$[kg/m^3]@f$@f$
* @param density the constant density (the unit must match to the mesh,
* e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$)
* @param computationPoint the computation Point P
* @param parallel whether to evaluate in parallel or serial
* @return the GravityModelResult containing the potential, the acceleration and the change of acceleration
Expand All @@ -34,7 +35,8 @@ namespace polyhedralGravity::GravityModel {
* Evaluates the polyhedral gravity model for a given constant density polyhedron at multiple computation
* points.
* @param polyhedron the polyhedron consisting of vertices and triangular faces
* @param density the constant density in @f$[kg/m^3]@f$
* @param density the constant density (the unit must match to the mesh,
* e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$)
* @param computationPoints vector of computation points
* @param parallel whether to evaluate in parallel or serial
* @return the GravityModelResult containing the potential, the acceleration and the change of acceleration
Expand Down
3 changes: 2 additions & 1 deletion src/polyhedralGravity/input/ConfigSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ namespace polyhedralGravity {
virtual std::string getOutputFileName() = 0;

/**
* Returns the constant density rho of the given polyhedron in @f$[kg/m^3]@f$.
* Returns the constant density rho of the given polyhedron.
* The unit must match to the mesh, e.g., mesh in @f$[m]@f$ requires density in @f$[kg/m^3]@f$.
* The density is required for the calculation.
* @return density as double
*/
Expand Down

0 comments on commit d8a50fe

Please sign in to comment.