SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/CurvedScalarWave - PsiSquared.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 2 8 25.0 %
Date: 2024-04-23 20:50:18
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : #include <string>
       8             : 
       9             : #include "DataStructures/DataBox/Tag.hpp"
      10             : #include "DataStructures/DataVector.hpp"
      11             : #include "DataStructures/Tensor/Tensor.hpp"
      12             : #include "Evolution/Systems/CurvedScalarWave/TagsDeclarations.hpp"
      13             : #include "Utilities/Gsl.hpp"
      14             : 
      15             : namespace CurvedScalarWave::Tags {
      16             : /*!
      17             :  * \brief The square of the scalar field \f$\Psi\f$.
      18             :  */
      19           1 : struct PsiSquared : db::SimpleTag {
      20           0 :   using type = Scalar<DataVector>;
      21             : };
      22             : 
      23             : /*!
      24             :  * \brief Compute tag that calculates the square of the scalar field \f$\Psi\f$.
      25             :  */
      26           1 : struct PsiSquaredCompute : PsiSquared, db::ComputeTag {
      27           0 :   using base = PsiSquared;
      28           0 :   using return_type = Scalar<DataVector>;
      29           0 :   using argument_tags = tmpl::list<CurvedScalarWave::Tags::Psi>;
      30           0 :   static void function(const gsl::not_null<Scalar<DataVector>*> psi_squared,
      31             :                        const Scalar<DataVector>& psi) {
      32             :     get(*psi_squared) = get(psi) * get(psi);
      33             :   }
      34             : };
      35             : }  // namespace CurvedScalarWave::Tags

Generated by: LCOV version 1.14