SpECTRE
v2024.05.11

A class for an elementwise complex multiplier of modal coefficients. More...
#include <ComplexDiagonalModalOperator.hpp>
Public Types  
using  BaseType = VectorImpl< std::complex< double >, ComplexDiagonalModalOperator > 
Public Member Functions  
ComplexDiagonalModalOperator (const ComplexDiagonalModalOperator &)=default  
ComplexDiagonalModalOperator (ComplexDiagonalModalOperator &&)=default  
ComplexDiagonalModalOperator &  operator= (const ComplexDiagonalModalOperator &)=default 
ComplexDiagonalModalOperator &  operator= (ComplexDiagonalModalOperator &&)=default 
A class for an elementwise complex multiplier of modal coefficients.
A ComplexDiagonalModalOperator
holds an array of factors to multiply by spectral coefficients, and can be either owning (the array is deleted when the ComplexDiagonalModalOperator
goes out of scope) or nonowning, meaning it just has a pointer to an array.
ComplexDiagonalModalOperator
s are intended to represent a diagonal matrix that can operate (via the *
operator) on spectral coefficients represented by ComplexModalVector
s easily. Only basic mathematical operations are supported with ComplexDiagonalModalOperator
s. ComplexDiagonalModalOperator
s may be added, subtracted, multiplied, or divided, and all arithmetic operations are similarly supported between ComplexDiagonalModalOperator
s and DiagonalModalOperator
s. In addition, the following operations with modal data structures are supported:
ComplexDiagonalModalOperator
and a ComplexModalVector
resulting in a ComplexModalVector
ComplexDiagonalModalOperator
and a ModalVector
resulting in a ComplexModalVector
DiagonalModalOperator
and a ComplexModalVector
resulting in a ComplexModalVector
All of these multiplication operations are commutative, supporting the interpretation of the modal data structure as either a 'row' or a 'column' vector.The following unary operations are supported with ComplexDiagonalModalOperator
s:
DiagonalModalOperator
)DiagonalModalOperator
)Also, addition, subtraction, multiplication and division of DiagonalModalOperator
s with std::complex<double>
s or double
s is supported.