Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "Evolution/Systems/Cce/Components/WorldtubeBoundary.hpp"
7 : #include "Evolution/Systems/Cce/Initialize/InitializeJ.hpp"
8 : #include "Utilities/Serialization/RegisterDerivedClassesWithCharm.hpp"
9 :
10 : namespace Cce {
11 : /// A function for registering all of the InitializeJ derived classes with
12 : /// charm, including the ones not intended to be directly option-creatable.
13 : /// `LinearizedBondiSachs` is registered through
14 : /// `InitializeJ<false>::creatable_classes` (it sets `factory_creatable = false`
15 : /// so it stays out of the option factory).
16 : template <bool EvolveCcm, typename BoundaryComponent>
17 1 : void register_initialize_j_with_charm() {
18 : if constexpr (tt::is_a_v<AnalyticWorldtubeBoundary, BoundaryComponent>) {
19 : register_derived_classes_with_charm<Cce::InitializeJ::InitializeJ<false>>();
20 : } else {
21 : register_derived_classes_with_charm<
22 : Cce::InitializeJ::InitializeJ<EvolveCcm>>();
23 : }
24 : }
25 : } // namespace Cce
|