SpECTRE  v2021.11.01
domain::creators::time_dependence::Composition< TimeDependenceCompTag0, TimeDependenceCompTags > Class Template Referencefinal

A TimeDependence that is a composition of various other TimeDependences. More...

#include <Composition.hpp>

Public Types

using CoordMap = detail::generate_coordinate_map_t< tmpl::flatten< tmpl::list< typename TimeDependenceCompTag0::time_dependence::MapForComposition::maps_list, typename TimeDependenceCompTags::time_dependence::MapForComposition::maps_list... > > >
 
using maps_list = tmpl::list< CoordMap >
 
using options = tmpl::list< TimeDependenceCompTag0, TimeDependenceCompTags... >
 
- Public Types inherited from domain::creators::time_dependence::TimeDependence< TimeDependenceCompTag0::mesh_dim >
using creatable_classes = tmpl::append< creatable_classes_any_dim, tmpl::conditional_t< MeshDim==1, creatable_classes_1d, tmpl::conditional_t< MeshDim==2, creatable_classes_2d, creatable_classes_3d > > >
 

Public Member Functions

 Composition (const Composition &)=default
 
Compositionoperator= (const Composition &)=default
 
 Composition (Composition &&)=default
 
Compositionoperator= (Composition &&)=default
 
 Composition (tmpl::type_from< TimeDependenceCompTag0 > first_time_dep, tmpl::type_from< TimeDependenceCompTags >... rest_time_dep)
 
 Composition (CoordMap coord_map, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time)
 Constructor for copying the composition time dependence. Internally performs all the copying necessary to deal with the functions of time.
 
auto get_clone () const -> std::unique_ptr< TimeDependence< mesh_dim > > override
 Returns a std::unique_ptr pointing to a copy of the TimeDependence. More...
 
auto block_maps (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, mesh_dim > > > override
 Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block. More...
 
auto functions_of_time () const -> std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > override
 Returns the functions of time for the domain. More...
 
- Public Member Functions inherited from domain::creators::time_dependence::TimeDependence< TimeDependenceCompTag0::mesh_dim >
 TimeDependence (const TimeDependence &)=default
 
 TimeDependence (TimeDependence &&)=default
 
TimeDependenceoperator= (const TimeDependence &)=default
 
TimeDependenceoperator= (TimeDependence &&)=default
 
virtual auto get_clone () const -> std::unique_ptr< TimeDependence >=0
 Returns a std::unique_ptr pointing to a copy of the TimeDependence. More...
 
virtual auto block_maps (size_t number_of_blocks) const -> std::vector< std::unique_ptr< domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, MeshDim > > >=0
 Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block. More...
 
virtual auto functions_of_time () const -> std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > >=0
 Returns the functions of time for the domain. More...
 
bool is_none () const
 Returns true if the instance is None, meaning no time dependence.
 

Static Public Attributes

static constexpr Options::String help = {"A composition of TimeDependences."}
 
static constexpr size_t mesh_dim = TimeDependenceCompTag0::mesh_dim
 

Detailed Description

template<typename TimeDependenceCompTag0, typename... TimeDependenceCompTags>
class domain::creators::time_dependence::Composition< TimeDependenceCompTag0, TimeDependenceCompTags >

A TimeDependence that is a composition of various other TimeDependences.

To create a new Composition TimeDependence you must create an explicit instantiation of the Composition<Tags...> TimeDependence in a .cpp file. You must add the Composition to the creatable_classes list of TimeDependence in order for the new Composition to be factory creatable.

The tags in the template parameters must be TimeDependenceCompositionTags. See the documentation of the TimeDependenceCompositionTag class for details on the tags.

Member Function Documentation

◆ block_maps()

template<typename TimeDependenceCompTag0 , typename... TimeDependenceCompTags>
auto domain::creators::time_dependence::Composition< TimeDependenceCompTag0, TimeDependenceCompTags >::block_maps ( size_t  number_of_blocks) const -> std::vector<std::unique_ptr<domain::CoordinateMapBase< Frame::Grid, Frame::Inertial, mesh_dim>>>
overridevirtual

Returns the coordinate maps from the Frame::Grid to the Frame::Inertial frame for each block.

Implements domain::creators::time_dependence::TimeDependence< TimeDependenceCompTag0::mesh_dim >.

◆ functions_of_time()

template<typename TimeDependenceCompTag0 , typename... TimeDependenceCompTags>
auto domain::creators::time_dependence::Composition< TimeDependenceCompTag0, TimeDependenceCompTags >::functions_of_time ( ) const -> std::unordered_map< std::string, std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>
overridevirtual

Returns the functions of time for the domain.

Implements domain::creators::time_dependence::TimeDependence< TimeDependenceCompTag0::mesh_dim >.

◆ get_clone()

template<typename TimeDependenceCompTag0 , typename... TimeDependenceCompTags>
auto domain::creators::time_dependence::Composition< TimeDependenceCompTag0, TimeDependenceCompTags >::get_clone ( ) const -> std::unique_ptr<TimeDependence<mesh_dim>>
overridevirtual

The documentation for this class was generated from the following file: