SpECTRE Documentation Coverage Report
 Current view: top level - PointwiseFunctions/MathFunctions - TensorProduct.hpp Hit Total Coverage Commit: 2ae2b99409ac582030d56a4560a92a3e066a7e54 Lines: 5 13 38.5 % Date: 2022-01-15 08:40:38 Legend: Lines: hit not hit
 ` Line data Source code` ``` 1 1 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : /// \file 5 : /// Defines a tensor product of one-dimensional MathFunctions 6 : 7 : #pragma once 8 : 9 : #include 10 : #include 11 : #include 12 : 13 : #include "DataStructures/Tensor/TypeAliases.hpp" 14 : #include "PointwiseFunctions/MathFunctions/MathFunction.hpp" 15 : 16 : namespace MathFunctions { 17 : 18 : /// \ingroup MathFunctionsGroup 19 : /// \brief a tensor product of one-dimensional MathFunctions 20 : template 21 1 : class TensorProduct { 22 : public: 23 0 : TensorProduct(double scale, 24 : std::array>, 25 : Dim>&& functions); 26 : 27 0 : TensorProduct(const TensorProduct&) = delete; 28 0 : TensorProduct(TensorProduct&&) = default; 29 0 : TensorProduct& operator=(const TensorProduct&) = delete; 30 0 : TensorProduct& operator=(TensorProduct&&) = default; 31 0 : ~TensorProduct() = default; 32 : 33 : /// The value of the function 34 : template 35 1 : Scalar operator()(const tnsr::I& x) const; 36 : 37 : /// The partial derivatives of the function 38 : template 39 1 : tnsr::i first_derivatives(const tnsr::I& x) const; 40 : 41 : /// The second partial derivatives of the function 42 : template 43 1 : tnsr::ii second_derivatives(const tnsr::I& x) const; 44 : 45 : private: 46 0 : double scale_{1.0}; 47 0 : std::array>, Dim> functions_; 48 : }; 49 : } // namespace MathFunctions ```

 Generated by: LCOV version 1.14