measur-tools-suite 1.0.11-beta.95 → 1.0.11-beta.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +104 -135
- package/EMSCRIPTEN_BINDINGS_CHANGES.md +8 -12
- package/README.md +38 -95
- package/bin/client.js +1 -1
- package/bin/client.wasm +0 -0
- package/bin/package.json +1 -1
- package/contributing/documentation.md +94 -107
- package/docs/mainpage.dox +21 -24
- package/package.json +1 -1
- package/DoxygenLayout.xml +0 -269
- package/docs/calculators/wall_heat_loss_calculator.dox +0 -90
- package/docs/references.bib +0 -19
package/CONTRIBUTING.md
CHANGED
|
@@ -58,13 +58,9 @@ Use Conventional Commits to structure your commit messages. This helps maintain
|
|
|
58
58
|
- [How to Format Code](#how-to-format-code)
|
|
59
59
|
- [Best Practices](#best-practices)
|
|
60
60
|
- [Documentation](#documentation)
|
|
61
|
-
- [Doxygen
|
|
62
|
-
- [Doxygen
|
|
61
|
+
- [Common Doxygen Tags](#common-doxygen-tags)
|
|
62
|
+
- [How to Generate Doxygen Documentation](#how-to-generate-doxygen-documentation)
|
|
63
63
|
- [Documenting Code](#documenting-code)
|
|
64
|
-
- [Math](#math)
|
|
65
|
-
- [Units](#units)
|
|
66
|
-
- [Formulas](#formulas)
|
|
67
|
-
- [Symbols](#symbols)
|
|
68
64
|
- [Files](#files-1)
|
|
69
65
|
- [Namespaces](#namespaces-2)
|
|
70
66
|
- [Classes \& Structs](#classes--structs)
|
|
@@ -72,8 +68,9 @@ Use Conventional Commits to structure your commit messages. This helps maintain
|
|
|
72
68
|
- [Member Variables](#member-variables-1)
|
|
73
69
|
- [Constants](#constants)
|
|
74
70
|
- [Enums](#enums)
|
|
75
|
-
- [
|
|
76
|
-
|
|
71
|
+
- [Formulas](#formulas)
|
|
72
|
+
- [Units](#units)
|
|
73
|
+
- [Modules](#modules)
|
|
77
74
|
- [Conventional Commits](#conventional-commits)
|
|
78
75
|
- [Commit Format](#commit-format)
|
|
79
76
|
- [Commit Types](#commit-types)
|
|
@@ -701,7 +698,7 @@ If you have questions about the formatting rules or need help configuring your e
|
|
|
701
698
|
|
|
702
699
|
# Documentation
|
|
703
700
|
|
|
704
|
-
This project uses [Doxygen](https://www.doxygen.nl/) to generate documentation from annotated source code. Doxygen comments are used to describe the purpose, behavior, and usage of classes, functions, and other entities in the codebase. Follow these guidelines to ensure your code is well-documented and easy to understand. Always use `@` for Doxygen commands.
|
|
701
|
+
This project uses [Doxygen](https://www.doxygen.nl/) to generate documentation from annotated source code. Doxygen comments are used to describe the purpose, behavior, and usage of classes, functions, and other entities in the codebase. Follow these guidelines to ensure your code is well-documented and easy to understand. Always use `@` for Doxygen commands and tags, as this is the standard convention in this project.
|
|
705
702
|
|
|
706
703
|
<!-- START mdsplit-ignore -->
|
|
707
704
|
<a id="documentation-index"></a>
|
|
@@ -709,13 +706,9 @@ This project uses [Doxygen](https://www.doxygen.nl/) to generate documentation f
|
|
|
709
706
|
<summary><Strong>Index</Strong></summary>
|
|
710
707
|
|
|
711
708
|
- [Documentation](#documentation)
|
|
712
|
-
- [Doxygen
|
|
713
|
-
- [Doxygen
|
|
709
|
+
- [Common Doxygen Tags](#common-doxygen-tags)
|
|
710
|
+
- [How to Generate Doxygen Documentation](#how-to-generate-doxygen-documentation)
|
|
714
711
|
- [Documenting Code](#documenting-code)
|
|
715
|
-
- [Math](#math)
|
|
716
|
-
- [Units](#units)
|
|
717
|
-
- [Formulas](#formulas)
|
|
718
|
-
- [Symbols](#symbols)
|
|
719
712
|
- [Files](#files-1)
|
|
720
713
|
- [Namespaces](#namespaces-2)
|
|
721
714
|
- [Classes \& Structs](#classes--structs)
|
|
@@ -723,53 +716,68 @@ This project uses [Doxygen](https://www.doxygen.nl/) to generate documentation f
|
|
|
723
716
|
- [Member Variables](#member-variables-1)
|
|
724
717
|
- [Constants](#constants)
|
|
725
718
|
- [Enums](#enums)
|
|
726
|
-
- [
|
|
727
|
-
|
|
719
|
+
- [Formulas](#formulas)
|
|
720
|
+
- [Units](#units)
|
|
721
|
+
- [Modules](#modules)
|
|
728
722
|
|
|
729
723
|
</details>
|
|
730
724
|
<!-- END mdsplit-ignore -->
|
|
731
725
|
|
|
732
726
|
## Doxygen Commands
|
|
733
727
|
|
|
734
|
-
All commands
|
|
728
|
+
All commands start with `@`.
|
|
735
729
|
|
|
736
|
-
|
|
730
|
+
Some commands have one or more arguments. Each argument has a certain range:
|
|
731
|
+
- If `<sharp>` braces are used the argument is a single word.
|
|
732
|
+
- If `(round)` braces are used the argument extends until the end of the line on which the command was found.
|
|
733
|
+
- If `{curly}` braces are used the argument extends until the next paragraph. Paragraphs are delimited by a blank line or by a section indicator.
|
|
734
|
+
|
|
735
|
+
Commands:
|
|
737
736
|
- `@file <name>`
|
|
738
|
-
- `@authors
|
|
739
|
-
- `@ingroup <group-name
|
|
740
|
-
- `@defgroup <name>
|
|
737
|
+
- `@authors { list of authors }`
|
|
738
|
+
- `@ingroup (<group-name>)`
|
|
739
|
+
- `@defgroup <name> (group title)`
|
|
741
740
|
- `@namespace <name>`
|
|
742
741
|
- `@class <name>`
|
|
743
742
|
- `@struct <name>`
|
|
744
743
|
- `@enum <name>`
|
|
745
|
-
- `@brief
|
|
746
|
-
- `@details
|
|
747
|
-
- `@param[<
|
|
748
|
-
- `@tparam <template-parameter-name>
|
|
749
|
-
- `@return
|
|
750
|
-
- `@throws <exception-object>
|
|
751
|
-
- `@note
|
|
752
|
-
- `@bug
|
|
753
|
-
- `@see
|
|
754
|
-
- `@
|
|
755
|
-
- `@
|
|
756
|
-
- `@ref <reference> <display-text>`
|
|
744
|
+
- `@brief { brief description }`
|
|
745
|
+
- `@details { detailed description }`
|
|
746
|
+
- `@param[<dir>] <parameter-name> { parameter description }`
|
|
747
|
+
- `@tparam <template-parameter-name> { description }`
|
|
748
|
+
- `@return { description of the return value }`
|
|
749
|
+
- `@throws <exception-object> { exception description }`
|
|
750
|
+
- `@note { text }`
|
|
751
|
+
- `@bug { bug description }`
|
|
752
|
+
- `@see { references }`
|
|
753
|
+
- `@def <name>`
|
|
754
|
+
- `@copyright { copyright description }`
|
|
757
755
|
|
|
758
756
|
<!-- START mdsplit-ignore -->
|
|
759
757
|
**[Return to Index](#documentation-index)**
|
|
760
758
|
<!-- END mdsplit-ignore -->
|
|
761
759
|
|
|
762
|
-
##
|
|
760
|
+
## Custom Commands
|
|
763
761
|
|
|
764
|
-
The following Doxygen aliases are defined in the `Doxyfile` to simplify common documentation tasks:
|
|
765
762
|
- `@math{<math expression>}`
|
|
766
|
-
- `@
|
|
767
|
-
- `@unitb{<unit expression>}`
|
|
768
|
-
- `@unitp{<unit expression>}`
|
|
763
|
+
- `@unit{<unit expression>}`
|
|
769
764
|
- `@formula{<label>; <equation>}`
|
|
770
|
-
-
|
|
771
|
-
|
|
772
|
-
-
|
|
765
|
+
- `symbol{<symbol>; <description>}`
|
|
766
|
+
|
|
767
|
+
<!-- START mdsplit-ignore -->
|
|
768
|
+
**[Return to Index](#documentation-index)**
|
|
769
|
+
<!-- END mdsplit-ignore -->
|
|
770
|
+
|
|
771
|
+
## Generating Doxygen Documentation
|
|
772
|
+
|
|
773
|
+
1. Ensure [Doxygen](https://www.doxygen.nl/) is installed on your system.
|
|
774
|
+
2. From the project root, run:
|
|
775
|
+
```bash
|
|
776
|
+
doxygen Doxyfile
|
|
777
|
+
```
|
|
778
|
+
3. The generated HTML and/or LaTeX documentation will appear in the output directory specified in your `Doxyfile`.
|
|
779
|
+
|
|
780
|
+
For more details on configuring or customizing Doxygen output, see the official [Doxygen manual](https://www.doxygen.nl/manual/index.html) or review the `Doxyfile` in the project root.
|
|
773
781
|
|
|
774
782
|
<!-- START mdsplit-ignore -->
|
|
775
783
|
**[Return to Index](#documentation-index)**
|
|
@@ -801,13 +809,13 @@ Use the `@math{<math expression>}` command to to write LaTeX-style mathematical
|
|
|
801
809
|
|
|
802
810
|
### Units
|
|
803
811
|
|
|
804
|
-
Use the `@
|
|
812
|
+
Use the `@unit{<unit expression>}` command to document units. The `@unit{}` command uses the siunitx package to format units in LaTeX.
|
|
805
813
|
|
|
806
814
|
#### Example
|
|
807
815
|
|
|
808
816
|
```cpp
|
|
809
817
|
/**
|
|
810
|
-
* The speed of light in water is often denoted as @math{C_w} and is approximately 2.25 @
|
|
818
|
+
* The speed of light in water is often denoted as @math{C_w} and is approximately 2.25 @unit{\meter\per\second}.
|
|
811
819
|
*/
|
|
812
820
|
```
|
|
813
821
|
|
|
@@ -818,7 +826,7 @@ Use the `@unitb{<unit expression>}` command to document units. The `@unitb{}` co
|
|
|
818
826
|
### Formulas
|
|
819
827
|
|
|
820
828
|
Use the `@formula{<label>; <equation>}` command to document formulas. The command takes 2 arguments, separated by `;`:
|
|
821
|
-
1. A label for the formula, which can be used to reference the formula in the documentation by using `\eqref{eq
|
|
829
|
+
1. A label for the formula, which can be used to reference the formula in the documentation by using `\eqref{eq:formula-label}`.
|
|
822
830
|
- All labels are automatically prefixed with `eq:` to avoid conflicts.
|
|
823
831
|
2. The formula itself, written in LaTeX syntax.
|
|
824
832
|
|
|
@@ -841,10 +849,9 @@ Use the `@formula{<label>; <equation>}` command to document formulas. The comman
|
|
|
841
849
|
|
|
842
850
|
### Symbols
|
|
843
851
|
|
|
844
|
-
Use the
|
|
852
|
+
Use the `symbol{<symbol>; <description>}` command to document mathematical symbols. This command takes two arguments, separated by `;`:
|
|
845
853
|
1. The symbol itself, written in LaTeX syntax.
|
|
846
854
|
2. A description of the symbol.
|
|
847
|
-
3. The unit of the symbol, written in LaTeX syntax and formatted using the siunitx package.
|
|
848
855
|
|
|
849
856
|
#### Example
|
|
850
857
|
|
|
@@ -853,11 +860,9 @@ Use the `@symtable` and `@endsymtable` commands to create a table of symbols use
|
|
|
853
860
|
* The area of a circle can be computed using the formula:
|
|
854
861
|
* @formula{circle-area; A = \pi r^2}
|
|
855
862
|
* where:
|
|
856
|
-
* @
|
|
857
|
-
* @
|
|
858
|
-
* @
|
|
859
|
-
* @symrow{r; is the radius of the circle; \meter}
|
|
860
|
-
* @endsymtable
|
|
863
|
+
* - @symbol{A; is the area of the circle}
|
|
864
|
+
* - @symbol{\pi; is the mathematical constant pi}
|
|
865
|
+
* - @symbol{r; is the radius of the circle}
|
|
861
866
|
*/
|
|
862
867
|
```
|
|
863
868
|
|
|
@@ -869,27 +874,25 @@ Use the `@symtable` and `@endsymtable` commands to create a table of symbols use
|
|
|
869
874
|
|
|
870
875
|
Use a **Doxygen block** at the very top of each header file to document the file's purpose, authors, and any relevant notes.
|
|
871
876
|
|
|
872
|
-
####
|
|
877
|
+
#### Required tags
|
|
878
|
+
|
|
879
|
+
`@file`, `@authors`, `@ingroup`, `@brief`
|
|
873
880
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
- `@brief`
|
|
878
|
-
- `@details`
|
|
879
|
-
- `@note`
|
|
880
|
-
- `@see`
|
|
881
|
-
- `@copyright`
|
|
881
|
+
#### Optional tags
|
|
882
|
+
|
|
883
|
+
`@details`, `@note`, `@bug`, `@see`, `@copyright`
|
|
882
884
|
|
|
883
885
|
#### Example
|
|
884
886
|
|
|
885
887
|
```cpp
|
|
886
888
|
/**
|
|
887
|
-
* @ingroup geometry
|
|
888
889
|
* @file polygon.h
|
|
889
890
|
* @authors Alice Brown, Carlos Diaz
|
|
891
|
+
* @ingroup geometry
|
|
890
892
|
* @brief Defines the Polygon class for representing simple 2-D polygons.
|
|
891
893
|
* @details This file contains the Polygon class, which provides methods for adding vertices, computing area, and checking point containment.
|
|
892
894
|
* @note The Polygon class assumes vertices are provided in counter-clockwise order.
|
|
895
|
+
* @bug Self-intersection checks are not implemented.
|
|
893
896
|
* @see https://en.wikipedia.org/wiki/Polygon
|
|
894
897
|
* @copyright 2025 Geometry Toolkit
|
|
895
898
|
*/
|
|
@@ -903,21 +906,20 @@ Use a **Doxygen block** at the very top of each header file to document the file
|
|
|
903
906
|
|
|
904
907
|
Use a **Doxygen block** above each namespace declaration in header files to document the namespace's purpose and contents.
|
|
905
908
|
|
|
906
|
-
####
|
|
909
|
+
#### Required tags
|
|
910
|
+
|
|
911
|
+
`@namespace`, `@ingroup`, `@brief`
|
|
907
912
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
- `@details`
|
|
912
|
-
- `@note`
|
|
913
|
-
- `@see`
|
|
913
|
+
#### Optional tags
|
|
914
|
+
|
|
915
|
+
`@details`, `@note`, `@see`
|
|
914
916
|
|
|
915
917
|
#### Example
|
|
916
918
|
|
|
917
919
|
```cpp
|
|
918
920
|
/**
|
|
919
|
-
* @ingroup math
|
|
920
921
|
* @namespace constants
|
|
922
|
+
* @ingroup math
|
|
921
923
|
* @brief Defines mathematical constants used throughout the project.
|
|
922
924
|
*/
|
|
923
925
|
namespace constants {}
|
|
@@ -931,24 +933,20 @@ namespace constants {}
|
|
|
931
933
|
|
|
932
934
|
Use a **Doxygen block** above each class or struct declaration in header files to document its purpose, behavior, and any important details. This applies to both classes and structs.
|
|
933
935
|
|
|
934
|
-
####
|
|
936
|
+
#### Required tags
|
|
935
937
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
- `@tparam`
|
|
942
|
-
- `@note`
|
|
943
|
-
- `@bug`
|
|
944
|
-
- `@see`
|
|
938
|
+
`@class` **or** `@struct`, `@ingroup`, `@brief`
|
|
939
|
+
|
|
940
|
+
#### Optional tags
|
|
941
|
+
|
|
942
|
+
`@details`, `@tparam`, `@note`, `@bug`, `@see`
|
|
945
943
|
|
|
946
944
|
#### Example
|
|
947
945
|
|
|
948
946
|
```cpp
|
|
949
947
|
/**
|
|
950
|
-
* @ingroup geometry
|
|
951
948
|
* @struct Point2
|
|
949
|
+
* @ingroup geometry
|
|
952
950
|
* @brief Lightweight 2-D point with double precision.
|
|
953
951
|
*/
|
|
954
952
|
struct Point2 {
|
|
@@ -957,8 +955,8 @@ struct Point2 {
|
|
|
957
955
|
};
|
|
958
956
|
|
|
959
957
|
/**
|
|
960
|
-
* @ingroup geometry
|
|
961
958
|
* @class Polygon
|
|
959
|
+
* @ingroup geometry
|
|
962
960
|
* @brief Simple 2-D polygon representation.
|
|
963
961
|
* @details Stores vertices in counter-clockwise order.
|
|
964
962
|
* @note Capacity is fixed at construction.
|
|
@@ -986,12 +984,9 @@ public:
|
|
|
986
984
|
* @details Uses the Shoelace formula to compute the area:
|
|
987
985
|
* @formula{polygon-area; A = \frac{1}{2} \sum_{i=1}^{n} (x_i y_{i+1} - x_{i+1} y_i)}
|
|
988
986
|
* where:
|
|
989
|
-
* @
|
|
990
|
-
* @
|
|
991
|
-
* @
|
|
992
|
-
* @symrow{x_i, y_i; are the coordinates of vertex i; \meter}
|
|
993
|
-
* @symrow{x_{n+1}, y_{n+1}; are the coordinates of vertex 1 (wrap-around); \meter}
|
|
994
|
-
* @endsymtable
|
|
987
|
+
* - @symbol{A; is the signed area}
|
|
988
|
+
* - @symbol{x_i \& y_i; are the coordinates of the i-th vertex}
|
|
989
|
+
* - @symbol{n; is the number of vertices}
|
|
995
990
|
* @note The area is positive if vertices are in counter-clockwise order.
|
|
996
991
|
* @return The signed area of the polygon.
|
|
997
992
|
*/
|
|
@@ -1010,17 +1005,13 @@ private:
|
|
|
1010
1005
|
|
|
1011
1006
|
Use a **Doxygen block** above each public function or method declaration in header files. This applies to both free functions and member functions of classes or structs.
|
|
1012
1007
|
|
|
1013
|
-
####
|
|
1008
|
+
#### Required tags
|
|
1009
|
+
|
|
1010
|
+
`@brief`, `@param[in]` **or** `param[out]` **or** `param[in,out]`, `@return` (if applicable)
|
|
1014
1011
|
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
- `@details`
|
|
1019
|
-
- `@tparam`
|
|
1020
|
-
- `@throws`
|
|
1021
|
-
- `@note`
|
|
1022
|
-
- `@bug`
|
|
1023
|
-
- `@see`
|
|
1012
|
+
#### Optional tags
|
|
1013
|
+
|
|
1014
|
+
`@details`, `@tparam`, `@throws`, `@note`, `@bug`, `@see`
|
|
1024
1015
|
|
|
1025
1016
|
#### Example
|
|
1026
1017
|
|
|
@@ -1059,7 +1050,7 @@ Use inline comments with `///<` to document constants and their purpose.
|
|
|
1059
1050
|
#### Example
|
|
1060
1051
|
|
|
1061
1052
|
```cpp
|
|
1062
|
-
constexpr double kPi = 3.141592653589793; ///< Circle ratio @
|
|
1053
|
+
constexpr double kPi = 3.141592653589793; ///< Circle ratio @unit{radians}.
|
|
1063
1054
|
inline constexpr Point2 kOrigin {0.0, 0.0}; ///< Reference point (0,0).
|
|
1064
1055
|
```
|
|
1065
1056
|
|
|
@@ -1071,22 +1062,20 @@ inline constexpr Point2 kOrigin {0.0, 0.0}; ///< Reference point (0,0).
|
|
|
1071
1062
|
|
|
1072
1063
|
Use a **Doxygen block** above each enum declaration in header files to document the enum type and its enumerators. Each enumerator should have an inline comment describing its purpose.
|
|
1073
1064
|
|
|
1074
|
-
####
|
|
1065
|
+
#### Required tags
|
|
1066
|
+
|
|
1067
|
+
`@enum`, `@ingroup`, `@brief`
|
|
1075
1068
|
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
- `@details`
|
|
1080
|
-
- `@note`
|
|
1081
|
-
- `@bug`
|
|
1082
|
-
- `@see`
|
|
1069
|
+
#### Optional tags
|
|
1070
|
+
|
|
1071
|
+
`@details`, `@note`, `@bug`, `@see`
|
|
1083
1072
|
|
|
1084
1073
|
#### Example
|
|
1085
1074
|
|
|
1086
1075
|
```cpp
|
|
1087
1076
|
/**
|
|
1088
|
-
* @ingroup geometry
|
|
1089
1077
|
* @enum Axis
|
|
1078
|
+
* @ingroup geometry
|
|
1090
1079
|
* @brief Principal 3-D axes.
|
|
1091
1080
|
*/
|
|
1092
1081
|
enum class Axis {
|
|
@@ -1104,23 +1093,21 @@ enum class Axis {
|
|
|
1104
1093
|
|
|
1105
1094
|
Use **Doxygen groups** to organize related namespaces, classes, and functions into logical modules.
|
|
1106
1095
|
|
|
1107
|
-
|
|
1096
|
+
Place a **Doxygen block** in a central location (e.g., `mainpage.dox`) to define the group and provide an overview. Each related code element should reference the group using the `@ingroup` command in its own documentation block.
|
|
1097
|
+
|
|
1098
|
+
#### Required tags
|
|
1099
|
+
|
|
1100
|
+
`@defgroup`, `@brief`
|
|
1108
1101
|
|
|
1109
|
-
####
|
|
1102
|
+
#### Optional tags
|
|
1110
1103
|
|
|
1111
|
-
|
|
1112
|
-
- `ingroup`
|
|
1113
|
-
- `@brief`
|
|
1114
|
-
- `@details`
|
|
1115
|
-
- `@copydoc`
|
|
1116
|
-
- `@see`
|
|
1104
|
+
`@details`, `@note`, `@see`
|
|
1117
1105
|
|
|
1118
1106
|
#### Example
|
|
1119
1107
|
|
|
1120
1108
|
```cpp
|
|
1121
1109
|
/**
|
|
1122
1110
|
* @defgroup geometry Geometry
|
|
1123
|
-
* @ingroup math
|
|
1124
1111
|
* @brief Geometry module for 2D and 3D shapes.
|
|
1125
1112
|
*/
|
|
1126
1113
|
```
|
|
@@ -1129,24 +1116,6 @@ Large groups must be defined in their own file (e.g., `math.dox`, `geometry.dox`
|
|
|
1129
1116
|
**[Return to Index](#documentation-index)**
|
|
1130
1117
|
<!-- END mdsplit-ignore -->
|
|
1131
1118
|
|
|
1132
|
-
<!-- START mdsplit-ignore -->
|
|
1133
|
-
## Generating Doxygen Documentation
|
|
1134
|
-
|
|
1135
|
-
Use the `Doxyfile` to configure Doxygen settings like input/output directories, file patterns, and more.
|
|
1136
|
-
|
|
1137
|
-
Use the `DoxygenLayout.xml` file to customize the layout of the generated documentation.
|
|
1138
|
-
|
|
1139
|
-
To generate the documentation, follow these steps:
|
|
1140
|
-
1. Ensure [Doxygen](https://www.doxygen.nl/) is installed.
|
|
1141
|
-
2. From the project root, run:
|
|
1142
|
-
```bash
|
|
1143
|
-
doxygen Doxyfile
|
|
1144
|
-
```
|
|
1145
|
-
3. The generated HTML and/or LaTeX documentation will appear in the output directory specified in the `Doxyfile`.
|
|
1146
|
-
|
|
1147
|
-
**[Return to Index](#documentation-index)**
|
|
1148
|
-
<!-- END mdsplit-ignore -->
|
|
1149
|
-
|
|
1150
1119
|
# Conventional Commits
|
|
1151
1120
|
|
|
1152
1121
|
This project follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for commit messages to ensure clarity, consistency, and automation in version control. This helps in generating changelogs, automating releases, and improving collaboration among contributors.
|
|
@@ -4,16 +4,12 @@ The following table summarizes the changes made to the Emscripten bindings in th
|
|
|
4
4
|
|
|
5
5
|
## WallLosses class
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
| Previous Signature | Updated Signature |
|
|
8
|
+
| ------------------ | --------------------- |
|
|
9
|
+
| getConditionFactor | shapeFactor |
|
|
10
|
+
| getID | id |
|
|
11
|
+
| getHeatLoss | totalHeatLoss |
|
|
12
|
+
| getSurface | surfaceDescription |
|
|
13
|
+
| setConditionFactor | setShapeFactor |
|
|
14
|
+
| setSurface | setSurfaceDescription |
|
|
8
15
|
|
|
9
|
-
| Current Signature | Previous Signature | Notes |
|
|
10
|
-
| -------------------------------- | ------------------ | --------------------------------------------------------------------- |
|
|
11
|
-
| totalHeatLoss | getHeatLoss | Renamed |
|
|
12
|
-
| convectiveHeatLoss | --- | New standalone method to calculate convective heat loss. |
|
|
13
|
-
| radiativeHeatLoss | --- | New standalone method to calculate radiative heat loss. |
|
|
14
|
-
| ShapeFactor | --- | New Struct that holds shape factor data (description & factor value). |
|
|
15
|
-
| ShapeFactor.surfaceConfiguration | surfaceDescription | New field in ShapeFactor struct that holds the description. |
|
|
16
|
-
| ShapeFactor.value | shapeFactor | New field in ShapeFactor struct that holds the factor value. |
|
|
17
|
-
| shapeFactors | --- | New method that returns a vector of ShapeFactor structs. |
|
|
18
|
-
|
|
19
|
-
See `wasm_wall_heat_loss.test.js` for usage examples.
|
package/README.md
CHANGED
|
@@ -26,130 +26,73 @@ The npm packages can be downloaded and install from [registry](https://www.npmjs
|
|
|
26
26
|
|
|
27
27
|
#### Web Assembly Compilation SDK
|
|
28
28
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
```bash
|
|
36
|
-
./emsdk activate latest
|
|
37
|
-
```
|
|
38
|
-
```bash
|
|
39
|
-
source ./emsdk_env.sh
|
|
40
|
-
```
|
|
41
|
-
> This sets up the current terminal session to use the Emscripten tools. On Windows use `emsdk_env.bat`.
|
|
42
|
-
|
|
43
|
-
> [!NOTE]
|
|
44
|
-
> This needs to be done each time a new terminal session is started, or add the command to your shell profile script (e.g. .bashrc, .zshrc, etc.)
|
|
29
|
+
- Emscripten (emsdk) - Follow instructions for install https://emscripten.org/docs/getting_started/downloads.html
|
|
30
|
+
- From the emsdk directory run `./emsdk install latest`
|
|
31
|
+
- Then run `./emsdk activate latest`
|
|
32
|
+
- Then run `source ./emsdk_env.sh` to set the environment variables in the current terminal session.
|
|
33
|
+
- On Windows use `emsdk_env.bat`
|
|
45
34
|
|
|
46
|
-
|
|
35
|
+
> [!NOTE]
|
|
36
|
+
> This needs to be done each time a new terminal session is started, or add the command to your shell profile script (e.g. .bashrc, .zshrc, etc.)
|
|
47
37
|
|
|
38
|
+
#### Node
|
|
48
39
|
- Node LTS [https://nodejs.org/en/](https://nodejs.org/en/)
|
|
49
40
|
|
|
50
41
|
### Build Web Assembly Module
|
|
51
42
|
|
|
52
|
-
- Ensure
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
emcmake cmake -DBUILD_WASM=ON
|
|
57
|
-
```
|
|
58
|
-
> If multiple compilers are present and default environment is not used, use `-G "<XXX> Makefiles"`. On Windows using MinGW: `emcmake cmake -D BUILD_WASM=ON .. -G "MinGW Makefiles"`
|
|
59
|
-
```bash
|
|
60
|
-
emmake make
|
|
61
|
-
```
|
|
43
|
+
- Ensure you have followed the "Install and Activate Emscripten" steps above
|
|
44
|
+
- From the root directory of the MEASUR Tools Suite repository run `emcmake cmake -DBUILD_WASM=ON`
|
|
45
|
+
> If multiple compilers are present and default environment is not used, use `-G "<XXX> Makefiles"`. For example, on Windows using MinGW: `emcmake cmake -D BUILD_WASM=ON .. -G "MinGW Makefiles"`
|
|
46
|
+
- Then run `emmake make`
|
|
62
47
|
> This will create the build artifacts `client.js` and `client.wasm` in the `/bin` directory. `client.js` is the glue code for initializing the WASM module. Place the two files in the same directory within your project and execute the `client.js` script.
|
|
63
48
|
|
|
64
49
|
### WASM Initialization Example
|
|
65
50
|
|
|
66
|
-
MEASUR Tools Suite is distributed as a modularized WebAssembly Module.
|
|
51
|
+
MEASUR Tools Suite is distributed as a modularized WebAssembly Module.
|
|
52
|
+
Below is an illustration of the WASM initialization and usage process:
|
|
67
53
|
|
|
68
|
-
<!-- TODO: Replace with updated code snippet -->
|
|
69
54
|

|
|
70
55
|
|
|
71
56
|
### WASM Unit Tests
|
|
72
57
|
|
|
73
|
-
- Ensure
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
> This will install the node dependencies.
|
|
80
|
-
```bash
|
|
81
|
-
npm run test:browser
|
|
82
|
-
```
|
|
83
|
-
> All mocha tests found under `tests/wasm-mocha/` will be executed. Migration of unit tests to the mocha framework is a WIP.
|
|
58
|
+
- Ensure you have followed the "Build WebAssembly Module" steps above
|
|
59
|
+
- From the root directory of the MEASUR Tools Suite repository run `npm install` to install node dependencies
|
|
60
|
+
- Then run `npm run test-wasm-mocha`
|
|
61
|
+
> All mocha tests found under `tests/wasm-mocha/` will be executed.
|
|
62
|
+
> Migration of unit tests to the mocha framework is a WIP.
|
|
84
63
|
|
|
85
64
|
### C++ Unit Tests
|
|
86
65
|
|
|
87
|
-
- Ensure the
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
cd build-cpp
|
|
95
|
-
```
|
|
96
|
-
```bash
|
|
97
|
-
cmake ..
|
|
98
|
-
```
|
|
99
|
-
> If multiple compilers are present and default environment is not used, use `-G "XXX Makefiles"`. For windows using MinGW => `cmake .. -G "MinGW Makefiles"`
|
|
100
|
-
```bash
|
|
101
|
-
cmake --build .
|
|
102
|
-
```
|
|
103
|
-
```bash
|
|
104
|
-
cd bin
|
|
105
|
-
```
|
|
66
|
+
- Ensure the `BUILD_TESTING` flag is set (which is default) when running CMake
|
|
67
|
+
- From the root directory of the MEASUR Tools Suite repository, run `mkdir build-cpp` and `cd build-cpp`
|
|
68
|
+
- Then run `cmake ..`
|
|
69
|
+
> If multiple compilers are present and default environment is not used, use `-G "XXX Makefiles"`. For example for windows using MinGW => `cmake .. -G "MinGW Makefiles"`
|
|
70
|
+
- Then run `cmake --build .`
|
|
71
|
+
- Then run `cd bin` and `./cpp_tests` to execute the tests
|
|
106
72
|
> On Windows, the executable can be found under either the `Debug` or `Release` directories, depending on CMake configuration
|
|
107
|
-
```bash
|
|
108
|
-
./cpp_tests
|
|
109
|
-
```
|
|
110
|
-
|
|
111
73
|
|
|
112
74
|
### Packaging
|
|
113
75
|
|
|
114
76
|
- Enable the `BUILD_PACKAGE` flag in the CMakeCache, then `cmake ./` then `make package`
|
|
115
77
|
- Or use this directly for Windows: `cmake -D BUILD_TESTING:BOOL=OFF ./` and `cmake --build . --config Release --target PACKAGE`
|
|
116
|
-
- To make package on Linux or Mac, run `ccmake.` and set
|
|
78
|
+
- To make package on Linux or Mac, run `ccmake.` and set BUILD_TESTING OFF, BUILD_PACKAGE ON, then configure and generate. Then `make package`.
|
|
117
79
|
|
|
118
80
|
### Generate Documentation Locally
|
|
119
81
|
|
|
120
|
-
- Ensure Doxygen (v 1.14.0 or later) is installed
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
doxygen Doxyfile
|
|
125
|
-
```
|
|
126
|
-
> The documentation will be generated in the `/docs/html` directory.
|
|
82
|
+
- Ensure Doxygen (v 1.14.0 or later) is installed
|
|
83
|
+
- From the root directory of the MEASUR Tools Suite repository run `doxygen Doxyfile`
|
|
84
|
+
> The documentation will be generated in the `/docs/html` directory
|
|
127
85
|
|
|
128
86
|
### Dockerizing
|
|
129
87
|
|
|
130
88
|
To make it easy for developers local building and testing, it is dockerized. To run it in docker follow these steps.
|
|
131
89
|
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- To run the unit tests (both WASM and C++):
|
|
142
|
-
- WASM: In a browser, launch [http://localhost:3000/](http://localhost:3000/)
|
|
143
|
-
- C++: Run the following commands in order:
|
|
144
|
-
```bash
|
|
145
|
-
docker exec -it measur-tools-suite-build /bin/bash
|
|
146
|
-
```
|
|
147
|
-
```bash
|
|
148
|
-
cd /usr/src/app/build-cpp/bin
|
|
149
|
-
```
|
|
150
|
-
```bash
|
|
151
|
-
./cpp_tests
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
> [!NOTE]
|
|
155
|
-
> Every time the container is started it will rebuild the application. To check status run: `docker compose logs --tail 5`.
|
|
90
|
+
- Download the repository
|
|
91
|
+
- Open command line tool, change directory to the repository run `docker compose up -d`
|
|
92
|
+
- To stop the running container run `docker compose down`
|
|
93
|
+
- Running Unit Tests
|
|
94
|
+
- WASM: in a browser, launch [http://localhost:3000/](http://localhost:3000/)
|
|
95
|
+
- C++: run `docker exec -it measur-tools-suite-build /bin/bash` and run the executable `/home/MEASUR-Tools-Suite/build-cpp/cpp_tests`
|
|
96
|
+
- Note:
|
|
97
|
+
- Every time the container is started it will rebuild the application, to check status run `docker compose logs --tail 5`
|
|
98
|
+
- **This is not a tutorial for docker, assumption is made the user is knowledgeable.**
|