From d77ca248294aba6c968154ef429070064d4ca4bb Mon Sep 17 00:00:00 2001 From: edinvay Date: Fri, 18 Oct 2024 19:02:11 +0200 Subject: [PATCH] documentation --- .../ConvolutionOperator.rst | 12 ++++++++ docs/programmers_manual/overview.rst | 1 + src/operators/ConvolutionOperator.h | 30 +++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 docs/programmers_manual/ConvolutionOperator.rst diff --git a/docs/programmers_manual/ConvolutionOperator.rst b/docs/programmers_manual/ConvolutionOperator.rst new file mode 100644 index 000000000..11ac14420 --- /dev/null +++ b/docs/programmers_manual/ConvolutionOperator.rst @@ -0,0 +1,12 @@ +--------------------- +ConvolutionOperator +--------------------- + +This is an introduction to the ConvolutionOperator class. We write a small overarching summary of the class where we define the +algorithm/equation/structure reasoning for having this class or where it fits with the rest of the code. + +.. doxygenclass:: mrcpp::ConvolutionOperator + :members: + :protected-members: + :private-members: + diff --git a/docs/programmers_manual/overview.rst b/docs/programmers_manual/overview.rst index 27f5aa1be..a649c4a1e 100644 --- a/docs/programmers_manual/overview.rst +++ b/docs/programmers_manual/overview.rst @@ -27,3 +27,4 @@ TODO: maybe add some low level theory/figures/algorithms before showing classes, complex_apply HeatOperator HeatKernel + ConvolutionOperator \ No newline at end of file diff --git a/src/operators/ConvolutionOperator.h b/src/operators/ConvolutionOperator.h index b822ec808..c9879d2a2 100644 --- a/src/operators/ConvolutionOperator.h +++ b/src/operators/ConvolutionOperator.h @@ -29,6 +29,36 @@ namespace mrcpp { +/** @class ConvolutionOperator + * + * @brief Convolution defined by a Gaussian expansion + * + * @details Represents the operator + * \f[ + * T = \sum_{m=1}^M + * \text{sign} (\alpha_m) \bigotimes \limits_{d = 1}^D T_d + * \left( \beta_m, \sqrt[D]{| \alpha_m |} \right) + * , + * \f] + * where each + * \f$ T_d \left( \beta, \alpha \right) \f$ + * is the convolution operator with one-dimensional Gaussian kernel + * \f$ k(x_d) = \alpha \exp \left( - \beta x_d^2 \right) \f$. + * Operator + * \f$ T \f$ + * is obtained from the Gaussian expansion + * \f[ + * \sum_{m=1}^M \alpha_m \exp \left( - \beta_m |x|^2 \right) + * \f] + * which is passed as a parameter to the first two constructors. + * + * @note Every \f$ T_d \left( \beta_m, \sqrt[D]{| \alpha_m |} \right) \f$ is the same + * operator associated with the one-dimensional variable \f$ x_d \f$ for \f$ d = 1, \ldots, D \f$. + * + * \todo: One may want to change the logic so that \f$ D \f$-root is evaluated on the previous step, + * namely, when \f$ \alpha_m, \beta_m \f$ are calculated. + * + */ template class ConvolutionOperator : public MWOperator { public: ConvolutionOperator(const MultiResolutionAnalysis &mra, GaussExp<1> &kernel, double prec);