Skip to content

Commit ae89b6a

Browse files
committed
Remove redundant return type from doxygen return commands
1 parent b3d279e commit ae89b6a

33 files changed

+245
-241
lines changed

python/elasticity/potentials.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def codegen(fpsi, energy_name: str):
135135
* @param F Deformation gradient
136136
* @param mu First Lame coefficient
137137
* @param lambda Second Lame coefficient
138-
* @return ScalarType Energy
138+
* @return Energy
139139
*/
140140
template <math::linalg::mini::CReadableVectorizedMatrix TMatrix>
141141
PBAT_HOST_DEVICE
@@ -152,7 +152,7 @@ def codegen(fpsi, energy_name: str):
152152
* @param F Deformation gradient
153153
* @param mu First Lame coefficient
154154
* @param lambda Second Lame coefficient
155-
* @return ScalarType Energy gradient
155+
* @return Energy gradient
156156
*/
157157
template <math::linalg::mini::CReadableVectorizedMatrix TMatrix>
158158
PBAT_HOST_DEVICE
@@ -169,7 +169,7 @@ def codegen(fpsi, energy_name: str):
169169
* @param F Deformation gradient
170170
* @param mu First Lame coefficient
171171
* @param lambda Second Lame coefficient
172-
* @return ScalarType Energy hessian
172+
* @return Energy hessian
173173
*/
174174
template <math::linalg::mini::CReadableVectorizedMatrix TMatrix>
175175
PBAT_HOST_DEVICE
@@ -187,7 +187,7 @@ def codegen(fpsi, energy_name: str):
187187
* @param mu First Lame coefficient
188188
* @param lambda Second Lame coefficient
189189
* @param gF Gradient w.r.t. F
190-
* @return ScalarType Energy and its gradient
190+
* @return Energy and its gradient
191191
*/
192192
template <
193193
math::linalg::mini::CReadableVectorizedMatrix TMatrix,
@@ -210,7 +210,7 @@ def codegen(fpsi, energy_name: str):
210210
* @param lambda Second Lame coefficient
211211
* @param gF Gradient w.r.t. F
212212
* @param HF Hessian w.r.t. F
213-
* @return ScalarType Energy and its gradient and hessian
213+
* @return Energy and its gradient and hessian
214214
*/
215215
template <
216216
math::linalg::mini::CReadableVectorizedMatrix TMatrix,

source/pbat/common/ArgSort.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace common {
2626
* @tparam FLess Callable with signature `bool(TIndex, TIndex)`
2727
* @param n Number of elements
2828
* @param less Less-than comparison function object
29-
* @return Eigen::Vector<TIndex, Eigen::Dynamic>
29+
* @return `|n|` array of indices that would sort the input array
3030
*/
3131
template <std::integral TIndex, class FLess>
3232
auto ArgSort(TIndex n, FLess less) -> Eigen::Vector<TIndex, Eigen::Dynamic>

source/pbat/common/Hash.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void HashCombineAccumulate(std::size_t& seed, T const& val)
3737
*
3838
* @tparam Types Hashable types
3939
* @param args Arguments to hash
40-
* @return std::size_t Hash value
40+
* @return Hash value
4141
*/
4242
template <typename... Types>
4343
std::size_t HashCombine(const Types&... args)
@@ -61,7 +61,7 @@ struct hash<pair<pbat::Index, pbat::Index>>
6161
/**
6262
* @brief Hash function for pair of Index
6363
* @param inds Pair of indices
64-
* @return std::size_t Hash value
64+
* @return Hash value
6565
*/
6666
[[maybe_unused]] std::size_t operator()(pair<pbat::Index, pbat::Index> const& inds) const
6767
{
@@ -78,7 +78,7 @@ struct hash<tuple<pbat::Index, pbat::Index>>
7878
/**
7979
* @brief Hash function for 2-tuple of Index
8080
* @param inds 2-tuple of indices
81-
* @return std::size_t Hash value
81+
* @return Hash value
8282
*/
8383
[[maybe_unused]] std::size_t operator()(tuple<pbat::Index, pbat::Index> const& inds) const
8484
{
@@ -95,7 +95,7 @@ struct hash<tuple<pbat::Index, pbat::Index, pbat::Index>>
9595
/**
9696
* @brief Hash function for 3-tuple of Index
9797
* @param inds 3-tuple of indices
98-
* @return std::size_t Hash value
98+
* @return Hash value
9999
*/
100100
[[maybe_unused]] std::size_t
101101
operator()(tuple<pbat::Index, pbat::Index, pbat::Index> const& inds) const
@@ -113,7 +113,7 @@ struct hash<pbat::IndexVector<2>>
113113
/**
114114
* @brief Hash function for pbat::IndexVector<2>
115115
* @param inds Index vector
116-
* @return std::size_t Hash value
116+
* @return Hash value
117117
*/
118118
[[maybe_unused]] std::size_t operator()(pbat::IndexVector<2> const& inds) const
119119
{
@@ -130,7 +130,7 @@ struct hash<pbat::IndexVector<3>>
130130
/**
131131
* @brief Hash function for pbat::IndexVector<3>
132132
* @param inds Index vector
133-
* @return std::size_t Hash value
133+
* @return Hash value
134134
*/
135135
[[maybe_unused]] std::size_t operator()(pbat::IndexVector<3> const& inds) const
136136
{

source/pbat/common/Indexing.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace common {
2828
* @tparam R Integer range type
2929
* @tparam TIndex Type of the integers
3030
* @param sizes Range of integers
31-
* @return Eigen::Vector<TIndex, Eigen::Dynamic> Cumulative sum of the range
31+
* @return Cumulative sum of the range
3232
*/
3333
template <CIndexRange R, std::integral TIndex = std::ranges::range_value_t<R>>
3434
auto CumSum(R&& sizes) -> Eigen::Vector<TIndex, Eigen::Dynamic>
@@ -51,7 +51,7 @@ auto CumSum(R&& sizes) -> Eigen::Vector<TIndex, Eigen::Dynamic>
5151
* @param begin Range begin
5252
* @param end Range end (exclusive)
5353
* @param ncounts Upper bound on values in range
54-
* @return Eigen::Vector<TIndex, Eigen::Dynamic> Counts of each integer in the range
54+
* @return Counts of each integer in the range
5555
*/
5656
template <std::integral TIndex>
5757
auto Counts(auto begin, auto end, TIndex ncounts) -> Eigen::Vector<TIndex, Eigen::Dynamic>
@@ -70,7 +70,7 @@ auto Counts(auto begin, auto end, TIndex ncounts) -> Eigen::Vector<TIndex, Eigen
7070
* @tparam TIndex Integer type of the range
7171
* @param begin Start of the range (inclusive)
7272
* @param end End of the range (exclusive)
73-
* @return Eigen::Vector<TIndex, Eigen::Dynamic> Shuffled range of integers
73+
* @return Shuffled range of integers
7474
*/
7575
template <std::integral TIndex>
7676
auto Shuffle(TIndex begin, TIndex end) -> Eigen::Vector<TIndex, Eigen::Dynamic>
@@ -94,7 +94,7 @@ auto Shuffle(TIndex begin, TIndex end) -> Eigen::Vector<TIndex, Eigen::Dynamic>
9494
* @param begin Start of the range (inclusive)
9595
* @param end End of the range (exclusive)
9696
* @param f Predicate function to filter the range
97-
* @return Eigen::Vector<TIndex, Eigen::Dynamic> Filtered range of integers
97+
* @return Filtered range of integers
9898
*/
9999
template <
100100
std::integral TIndexB,
@@ -122,7 +122,7 @@ auto Filter(TIndexB begin, TIndexE end, Func&& f) -> Eigen::Vector<TIndex, Eigen
122122
* @tparam TIndex Integer type of the repetition vector
123123
* @param x Values to repeat
124124
* @param r Repetition vector
125-
* @return Eigen::Vector<TScalar, Eigen::Dynamic> Vector with repeated elements
125+
* @return Vector with repeated elements
126126
*/
127127
template <
128128
class TDerivedX,

source/pbat/common/Queue.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class Queue
3131
PBAT_HOST_DEVICE Queue() : queue{}, begin{0}, end{0}, n{0} {}
3232
/**
3333
* @brief Add element to the queue
34-
*
3534
* @param value Element to add
35+
* @pre The queue is not full
3636
*/
3737
PBAT_HOST_DEVICE void Push(T value)
3838
{
@@ -42,12 +42,13 @@ class Queue
4242
}
4343
/**
4444
* @brief Get the next element in the queue
45-
*
46-
* @return const& T Next element in the queue
45+
* @return Next element in the queue
46+
* @pre The queue is not empty
4747
*/
4848
PBAT_HOST_DEVICE T const& Top() const { return queue[begin]; }
4949
/**
5050
* @brief Remove the next element in the queue
51+
* @pre The queue is not empty
5152
*/
5253
PBAT_HOST_DEVICE void Pop()
5354
{
@@ -57,19 +58,19 @@ class Queue
5758
/**
5859
* @brief Check if the queue is full
5960
*
60-
* @return bool True if the queue is full
61+
* @return True if the queue is full
6162
*/
6263
PBAT_HOST_DEVICE bool IsFull() const { return n == Capacity(); }
6364
/**
6465
* @brief Check if the queue is empty
6566
*
66-
* @return bool True if the queue is empty
67+
* @return True if the queue is empty
6768
*/
6869
PBAT_HOST_DEVICE bool IsEmpty() const { return n == 0; }
6970
/**
7071
* @brief Get the number of elements in the queue
7172
*
72-
* @return auto Number of elements in the queue
73+
* @return Number of elements in the queue
7374
*/
7475
PBAT_HOST_DEVICE auto Size() const { return n; }
7576
/**
@@ -79,7 +80,7 @@ class Queue
7980
/**
8081
* @brief Get the maximum number of elements in the queue
8182
*
82-
* @return constexpr auto Maximum number of elements in the queue
83+
* @return Maximum number of elements in the queue
8384
*/
8485
PBAT_HOST_DEVICE constexpr auto Capacity() const { return kCapacity; }
8586

source/pbat/common/Stack.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ class Stack
3838
/**
3939
* @brief Remove the top element from the stack
4040
*
41-
* @return T Top element of the stack
41+
* @return Top element of the stack
4242
*/
4343
PBAT_HOST_DEVICE T Pop() { return stack[--size]; }
4444
/**
4545
* @brief Get the top element of the stack
4646
*
47-
* @return const& T Top element of the stack
47+
* @return Top element of the stack
4848
*/
4949
PBAT_HOST_DEVICE T const& Top() const { return stack[size - 1]; }
5050
/**
5151
* @brief Get the number of elements in the stack
5252
*
53-
* @return auto Number of elements in the stack
53+
* @return Number of elements in the stack
5454
*/
5555
PBAT_HOST_DEVICE auto Size() const { return size; }
5656
/**
@@ -73,30 +73,30 @@ class Stack
7373
* @brief Access element at index i
7474
*
7575
* @note No bounds checking
76-
* @pre i < size and i >= 0
76+
* @pre `i < size` and `i >= 0`
7777
* @param i Index of the element
78-
* @return T& Reference to the element at index i
78+
* @return Reference to the element at index i
7979
*/
8080
PBAT_HOST_DEVICE T& operator[](auto i) { return stack[i]; }
8181
/**
8282
* @brief Read-only access element at index i
8383
*
8484
* @note No bounds checking
85-
* @pre i < size and i >= 0
85+
* @pre `i < size` and `i >= 0`
8686
* @param i Index of the element
87-
* @return const& T Reference to the element at index i
87+
* @return Reference to the element at index i
8888
*/
8989
PBAT_HOST_DEVICE T const& operator[](auto i) const { return stack[i]; }
9090
/**
9191
* @brief Pointer to the beginning of the stack
9292
*
93-
* @return T* Pointer to the beginning of the stack
93+
* @return Pointer to the beginning of the stack
9494
*/
9595
PBAT_HOST_DEVICE T* begin() { return stack; }
9696
/**
9797
* @brief Pointer to the end of the stack
9898
*
99-
* @return T* Pointer to the end of the stack
99+
* @return Pointer to the end of the stack
100100
*/
101101
PBAT_HOST_DEVICE T* end() { return stack + size; }
102102

source/pbat/fem/Gradient.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace fem {
4949
* \f]
5050
*
5151
* where \f$ g \f$ is the number of evaluation points.
52-
*
52+
*
5353
* @note Link to my higher-level FEM crash course doc.
5454
*
5555
* @tparam TMesh
@@ -93,20 +93,18 @@ struct Gradient
9393

9494
/**
9595
* @brief Transforms this matrix-free Gradient operator into sparse compressed format.
96-
* @return CSCMatrix Sparse compressed column matrix representation of the Gradient operator
96+
* @return Sparse compressed column matrix representation of the Gradient operator
9797
*/
9898
CSCMatrix ToMatrix() const;
9999

100100
/**
101-
* @brief
102-
*
103-
* @return Index
101+
* @brief Returns the number columns
102+
* @return Number of columns
104103
*/
105104
Index InputDimensions() const { return mesh.X.cols(); }
106105
/**
107-
* @brief
108-
*
109-
* @return Index
106+
* @brief Returns the number of rows
107+
* @return Number of rows
110108
*/
111109
Index OutputDimensions() const { return kDims * eg.size(); }
112110

@@ -118,8 +116,8 @@ struct Gradient
118116
MeshType const& mesh; ///< The finite element mesh
119117

120118
Eigen::Ref<IndexVectorX const>
121-
eg; ///< |# quad.pts.|x1 array of element indices corresponding to quadrature points
122-
Eigen::Ref<MatrixX const> GNeg; ///< |# element nodes|x|# dims * # quad.pts. * # elements|
119+
eg; ///< `|# quad.pts.|x1` array of element indices corresponding to quadrature points
120+
Eigen::Ref<MatrixX const> GNeg; ///< `|# element nodes|x|# dims * # quad.pts. * # elements|`
123121
///< matrix of element shape function gradients at quadrature
124122
///< points. See ShapeFunctionGradients().
125123
};

source/pbat/fem/HyperElasticPotential.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,36 +196,36 @@ struct HyperElasticPotential
196196
/**
197197
* @brief Transforms this matrix-free hessian matrix representation into sparse compressed
198198
* column format.
199-
* @return CSCMatrix Sparse compressed column matrix representation of the hessian operator
199+
* @return Sparse compressed column matrix representation of the hessian operator
200200
*/
201201
CSCMatrix ToMatrix() const;
202202

203203
/**
204204
* @brief Transforms this per quadrature point gradient representation into the global gradient.
205-
* @return VectorX Global gradient
205+
* @return Global gradient
206206
*/
207207
VectorX ToVector() const;
208208

209209
/**
210210
* @brief Computes the total elastic potential
211-
* @return Scalar Total elastic potential
211+
* @return Total elastic potential
212212
*/
213213
Scalar Eval() const;
214214

215215
/**
216-
* @brief Number of input dimensions
216+
* @brief Number of columns
217217
*
218218
* Effectively the number of nodes in the system
219219
*
220-
* @return Index
220+
* @return Number of columns
221221
*/
222222
Index InputDimensions() const;
223223
/**
224-
* @brief Number of output dimensions
224+
* @brief Number of rows
225225
*
226226
* Effectively the number of nodes in the system
227227
*
228-
* @return Index
228+
* @return Number of rows
229229
*/
230230
Index OutputDimensions() const;
231231
/**

0 commit comments

Comments
 (0)