SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/AnalyticData/ScalarTensor/ScalarField - Zero.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 6.7 % 15 1
Test Date: 2026-10-22 17:29:42
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 <memory>
       8              : #include <pup.h>
       9              : 
      10              : #include "DataStructures/DataBox/Prefixes.hpp"
      11              : #include "DataStructures/TaggedTuple.hpp"
      12              : #include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
      13              : #include "Options/String.hpp"
      14              : #include "PointwiseFunctions/AnalyticData/ScalarTensor/ScalarField/AnalyticData.hpp"
      15              : #include "Utilities/MakeWithValue.hpp"
      16              : #include "Utilities/Serialization/CharmPupable.hpp"
      17              : #include "Utilities/TMPL.hpp"
      18              : 
      19              : namespace ScalarTensor::AnalyticData::ScalarField {
      20              : 
      21              : /*!
      22              :  * \brief Vanishing profile for the scalar field.
      23              :  */
      24              : template <size_t Dim>
      25            1 : class Zero : public ScalarTensor::AnalyticData::ScalarField::AnalyticData<Dim> {
      26              :  public:
      27            0 :   using options = tmpl::list<>;
      28            0 :   static constexpr Options::String help{
      29              :       "The trivial solution, useful as initial guess."};
      30              : 
      31            0 :   using scalar_field_tags =
      32              :       typename ScalarTensor::AnalyticData::ScalarField::AnalyticData<
      33              :           Dim>::scalar_field_tags;
      34              : 
      35            0 :   Zero() = default;
      36            0 :   Zero(const Zero&) = default;
      37            0 :   Zero& operator=(const Zero&) = default;
      38            0 :   Zero(Zero&&) = default;
      39            0 :   Zero& operator=(Zero&&) = default;
      40            0 :   ~Zero() override = default;
      41              :   std::unique_ptr<ScalarTensor::AnalyticData::ScalarField::AnalyticData<Dim>>
      42            0 :   get_clone() const override;
      43              : 
      44              :   /// \cond
      45              :   explicit Zero(CkMigrateMessage* m)
      46              :       : ScalarTensor::AnalyticData::ScalarField::AnalyticData<Dim>(m) {}
      47              :   using PUP::able::register_constructor;
      48              :   WRAPPED_PUPable_decl_template(Zero);  // NOLINT
      49              :   /// \endcond
      50              : 
      51              :   template <typename... RequestedTags>
      52            0 :   tuples::TaggedTuple<RequestedTags...> variables(
      53              :       const tnsr::I<DataVector, Dim>& x,
      54              :       tmpl::list<RequestedTags...> /*meta*/) const {
      55              :     static_assert(
      56              :         tmpl::size<tmpl::list_difference<tmpl::list<RequestedTags...>,
      57              :                                          scalar_field_tags>>::value == 0,
      58              :         "The requested tag is not supported");
      59              :     return {make_with_value<typename RequestedTags::type>(x, 0.)...};
      60              :   }
      61              : 
      62              :   template <size_t SpatialDim>
      63            0 :   friend bool operator==(const Zero<SpatialDim>& /*lhs*/,
      64              :                          const Zero<SpatialDim>& /*rhs*/);
      65              : };
      66              : 
      67              : template <size_t SpatialDim>
      68            0 : bool operator!=(const Zero<SpatialDim>& lhs, const Zero<SpatialDim>& rhs);
      69              : 
      70              : }  // namespace ScalarTensor::AnalyticData::ScalarField
        

Generated by: LCOV version 2.0-1