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 <string>
9 : #include <vector>
10 :
11 : #include "DataStructures/ComplexDataVector.hpp"
12 : #include "DataStructures/Tensor/TypeAliases.hpp"
13 : #include "Elliptic/BoundaryConditions/BoundaryCondition.hpp"
14 : #include "Elliptic/BoundaryConditions/BoundaryConditionType.hpp"
15 : #include "Options/String.hpp"
16 : #include "Utilities/Gsl.hpp"
17 : #include "Utilities/TMPL.hpp"
18 :
19 : namespace ScalarSelfForce::BoundaryConditions {
20 :
21 : /*!
22 : * \brief Applies no boundary condition at all. Used to impose nothing but
23 : * regularity at the horizon in horizon-penetrating coordinates or at
24 : * angular boundaries.
25 : */
26 1 : class None : public elliptic::BoundaryConditions::BoundaryCondition<2> {
27 : private:
28 0 : using Base = elliptic::BoundaryConditions::BoundaryCondition<2>;
29 :
30 : public:
31 0 : static constexpr Options::String help =
32 : "Applies no boundary condition at all. Used to impose nothing but "
33 : "regularity at the horizon in horizon-penetrating coordinates.";
34 0 : using options = tmpl::list<>;
35 :
36 0 : None() = default;
37 0 : None(const None&) = default;
38 0 : None& operator=(const None&) = default;
39 0 : None(None&&) = default;
40 0 : None& operator=(None&&) = default;
41 0 : ~None() override = default;
42 :
43 : /// \cond
44 : explicit None(CkMigrateMessage* m);
45 : using PUP::able::register_constructor;
46 : WRAPPED_PUPable_decl_template(None);
47 : /// \endcond
48 :
49 0 : std::unique_ptr<domain::BoundaryConditions::BoundaryCondition> get_clone()
50 : const override;
51 :
52 0 : std::vector<elliptic::BoundaryConditionType> boundary_condition_types()
53 : const override {
54 : return {elliptic::BoundaryConditionType::Neumann};
55 : }
56 :
57 0 : using argument_tags = tmpl::list<>;
58 0 : using volume_tags = tmpl::list<>;
59 :
60 0 : void apply(gsl::not_null<Scalar<ComplexDataVector>*> field,
61 : gsl::not_null<Scalar<ComplexDataVector>*> n_dot_field_gradient,
62 : const tnsr::i<ComplexDataVector, 2>& deriv_field) const;
63 :
64 0 : using argument_tags_linearized = tmpl::list<>;
65 0 : using volume_tags_linearized = tmpl::list<>;
66 :
67 0 : void apply_linearized(
68 : gsl::not_null<Scalar<ComplexDataVector>*> field_correction,
69 : gsl::not_null<Scalar<ComplexDataVector>*> n_dot_field_gradient_correction,
70 : const tnsr::i<ComplexDataVector, 2>& deriv_field_correction) const;
71 :
72 : private:
73 0 : friend bool operator==(const None& lhs, const None& rhs);
74 : };
75 :
76 0 : bool operator!=(const None& lhs, const None& rhs);
77 :
78 : } // namespace ScalarSelfForce::BoundaryConditions
|