From daba5c7521eb9e6d6194865b1f25e1c3aece6b4a Mon Sep 17 00:00:00 2001 From: James McClure Date: Sat, 18 Sep 2021 16:33:26 -0400 Subject: [PATCH] extend doxygen support --- analysis/ElectroChemistry.cpp | 1 + analysis/FreeEnergy.h | 8 ++++++ analysis/GreyPhase.h | 16 +++++++++++ analysis/Minkowski.cpp | 2 +- analysis/Minkowski.h | 50 ++++++++++++++++++++++++++++++++++ doxygen/DoxygenMainpage.h | 11 ++++++-- tests/test_dcel_tri_normal.cpp | 2 +- 7 files changed, 85 insertions(+), 5 deletions(-) diff --git a/analysis/ElectroChemistry.cpp b/analysis/ElectroChemistry.cpp index dc932f91..a762fd82 100644 --- a/analysis/ElectroChemistry.cpp +++ b/analysis/ElectroChemistry.cpp @@ -1,5 +1,6 @@ #include "analysis/ElectroChemistry.h" + ElectroChemistryAnalyzer::ElectroChemistryAnalyzer(std::shared_ptr dm): Dm(dm) { diff --git a/analysis/FreeEnergy.h b/analysis/FreeEnergy.h index fbb1ba31..75e6aef6 100644 --- a/analysis/FreeEnergy.h +++ b/analysis/FreeEnergy.h @@ -19,6 +19,14 @@ #include "IO/Writer.h" #include "models/FreeLeeModel.h" +/** + * \class FreeEnergyAnalyzer + * + * @brief + * The FreeEnergyAnalyzer class is constructed to analyze the LBPM free energy model for liquid-gas systems + * + */ + class FreeEnergyAnalyzer{ public: std::shared_ptr Dm; diff --git a/analysis/GreyPhase.h b/analysis/GreyPhase.h index 3ab46752..b2632a70 100644 --- a/analysis/GreyPhase.h +++ b/analysis/GreyPhase.h @@ -15,6 +15,14 @@ #include "IO/Reader.h" #include "IO/Writer.h" + +/** + * \class GreyPhase + * + * @brief + * The GreyPhase class tracks pressure, mass and momentum within a grey phase + * + */ class GreyPhase{ public: double p; @@ -26,6 +34,14 @@ class GreyPhase{ private: }; + +/** + * \class GreyPhaseAnalysis + * + * @brief + * The GreyPhaseAnalysis class is constructed to analyze the LBPM greyscale model + * + */ class GreyPhaseAnalysis{ public: std::shared_ptr Dm; diff --git a/analysis/Minkowski.cpp b/analysis/Minkowski.cpp index 9dfff477..5e2e28da 100644 --- a/analysis/Minkowski.cpp +++ b/analysis/Minkowski.cpp @@ -50,7 +50,7 @@ void Minkowski::ComputeScalar(const DoubleArray& Field, const double isovalue) { PROFILE_START("ComputeScalar"); Xi = Ji = Ai = 0.0; - DECL object; + DCEL object; int e1,e2,e3; double s,s1,s2,s3; double a1,a2,a3; diff --git a/analysis/Minkowski.h b/analysis/Minkowski.h index 6cf2673a..e408fceb 100644 --- a/analysis/Minkowski.h +++ b/analysis/Minkowski.h @@ -18,6 +18,14 @@ #include "IO/Reader.h" #include "IO/Writer.h" +/** + * \class Minkowski + * + * @brief + * The Minkowski class is constructed to analyze the geometric properties of structures based on the Minkowski functionals + * + */ + class Minkowski{ //........................................................................... @@ -45,6 +53,7 @@ public: int n_connected_components; //........................................................................... int Nx,Ny,Nz; + double V(){ return Vi; } @@ -59,15 +68,56 @@ public: } //.......................................................................... + /** + * \brief Null constructor + */ Minkowski(){};//NULL CONSTRUCTOR + + /** + * \brief Constructor based on an existing Domain + * @param Dm - Domain structure + */ Minkowski(std::shared_ptr Dm); ~Minkowski(); + + /** + * \brief Compute scalar minkowski functionals + * step 1. compute the distance to an object + * step 2. construct dcel to represent the isosurface + * step 3. compute the scalar Minkowski functionals + * THIS ALGORITHM ASSUMES THAT id() is populated with phase id to distinguish objects + * 0 - labels the object + * 1 - labels everything else + */ void MeasureObject(); + void MeasureObject(double factor, const DoubleArray &Phi); + + /** + * \details Compute scalar minkowski functionals for connected part of a structure + * step 1. compute connected components and extract largest region by volume + * step 2. compute the distance to the connected part of the structure + * step 3. construct dcel to represent the isosurface + * step 4. compute the scalar Minkowski functionals + * THIS ALGORITHM ASSUMES THAT id() is populated with phase id to distinguish objects + * 0 - labels the object + * 1 - labels everything else + */ int MeasureConnectedPathway(); + int MeasureConnectedPathway(double factor, const DoubleArray &Phi); + + /** + * \brief Compute scalar minkowski functionals + * \details Construct an isosurface and return the geometric invariants based on the triangulated list + * @param isovalue - threshold value to use to determine iso-surface + * @param Field - DoubleArray containing the field to threshold + */ void ComputeScalar(const DoubleArray& Field, const double isovalue); + /** + * \brief print the scalar invariants + */ void PrintAll(); }; diff --git a/doxygen/DoxygenMainpage.h b/doxygen/DoxygenMainpage.h index 1e369ff8..4f1687b5 100644 --- a/doxygen/DoxygenMainpage.h +++ b/doxygen/DoxygenMainpage.h @@ -1,12 +1,17 @@ /** \mainpage LBPM * - * This is the documentation for LBPM + * C/C++ routines * * - \ref IO "IO routines" * - \ref analysis "Analysis routines" - * - \ref FlowAdaptor "Flow adaptor" + * - \ref FlowAdaptor "FlowAdaptor" + * - \ref DCEL "Doubly connected edge list" + * - \ref Minkowski "Minkowski functionals" * - \ref models "Lattice Boltzmann models" - * - \ref ScaLBL "Lattice Boltzmann building blocks" + * - \ref ScaLBL "Scalable Lattice Boltzmann Library (ScaLBL)" + * - \ref cpu "cpu implementation for library routines" + * - \ref cuda "CUDA implementation for library routines" + * - \ref hip "HIP implementation for library routines" * - \ref tests "Unit tests" * - \ref Utilities "Utility routines" * diff --git a/tests/test_dcel_tri_normal.cpp b/tests/test_dcel_tri_normal.cpp index 622c9fa8..53a42977 100644 --- a/tests/test_dcel_tri_normal.cpp +++ b/tests/test_dcel_tri_normal.cpp @@ -54,7 +54,7 @@ int main(int argc, char **argv) } pmmc_MeshGradient(SDs,SDs_x,SDs_y,SDs_z,Nx,Ny,Nz); - DECL object; + DCEL object; Point P1,P2,P3; Point U,V,W; int e1,e2,e3;