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.
-
template<int D>
class ConvolutionOperator : public mrcpp::MWOperator<D>¶ Convolution defined by a Gaussian expansion.
Represents the operator
\[ T = \sum_{m=1}^M \text{sign} (\alpha_m) \bigotimes \limits_{d = 1}^D T_d \left( \beta_m, \sqrt[D]{| \alpha_m |} \right) , \]where each \( T_d \left( \beta, \alpha \right) \) is the convolution operator with one-dimensional Gaussian kernel \( k(x_d) = \alpha \exp \left( - \beta x_d^2 \right) \). Operator \( T \) is obtained from the Gaussian expansion\[ \sum_{m=1}^M \alpha_m \exp \left( - \beta_m |x|^2 \right) \]which is passed as a parameter to the first two constructors.- Todo:
: One may want to change the logic so that \( D \)-root is evaluated on the previous step, namely, when \( \alpha_m, \beta_m \) are calculated.
Note
Every \( T_d \left( \beta_m, \sqrt[D]{| \alpha_m |} \right) \) is the same operator associated with the one-dimensional variable \( x_d \) for \( d = 1, \ldots, D \).
Subclassed by mrcpp::DerivativeConvolution< D >, mrcpp::HeatOperator< D >, mrcpp::IdentityConvolution< D >, mrcpp::TimeEvolutionOperator< D >
Public Functions
-
inline int isreal() const¶
Whether the operator stores real coefficients.
Note
Reports the storage type, not whether the imaginary part vanishes.
-
inline int iscomplex() const¶
Whether the operator stores complex coefficients.
Note
Reports the storage type, not whether any imaginary part is set.
-
OperatorTree<ComplexDouble> &getComponentCplx(int i, int d)¶
Separable term
iin directiondof a complex kernel.Note
Aborts for a real operator; guard with
iscomplex().
-
const BandWidth &getBandWidth(int i, int d) const¶
Band width of separable term
iin directiond.Reads from whichever expansion is populated, so callers that only need the band do not have to know the scalar.
-
inline std::array<OperatorTree<double>*, D> &operator[](int i)¶
Note
Real expansions only; aborts on a complex operator.