Functions
VariablesHelpers.hpp File Reference

Defines helper functions for use with Variables class. More...

#include <boost/range/combine.hpp>
#include <boost/tuple/tuple.hpp>
#include <cstddef>
#include <ostream>
#include <vector>
#include "DataStructures/DataVector.hpp"
#include "DataStructures/SliceIterator.hpp"
#include "ErrorHandling/Assert.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TypeTraits.hpp"

Go to the source code of this file.

Functions

template<std::size_t VolumeDim, typename TagsList >
void add_slice_to_data (const gsl::not_null< Variables< TagsList > *> volume_vars, const Variables< TagsList > &vars_on_slice, const Index< VolumeDim > &extents, const size_t sliced_dim, const size_t fixed_index) noexcept
 Adds data on a codimension 1 slice to a volume quantity. The slice has a constant logical coordinate in direction sliced_dim, slicing the volume at fixed_index in that dimension. For example, to add to the lower boundary of sliced_dim, pass 0 for fixed_index; to add to the upper boundary, pass extents[sliced_dim] - 1. More...
 
template<std::size_t VolumeDim, typename TagsList >
void data_on_slice (const gsl::not_null< Variables< TagsList > *> interface_vars, const Variables< TagsList > &vars, const Index< VolumeDim > &element_extents, const size_t sliced_dim, const size_t fixed_index) noexcept
 Slices the data within vars to a codimension 1 slice. The slice has a constant logical coordinate in direction sliced_dim, slicing the volume at fixed_index in that dimension. For example, to get the lower boundary of sliced_dim, pass 0 for fixed_index; to get the upper boundary, pass extents[sliced_dim] - 1. More...
 
template<std::size_t VolumeDim, typename TagsList >
Variables< TagsList > data_on_slice (const Variables< TagsList > &vars, const Index< VolumeDim > &element_extents, const size_t sliced_dim, const size_t fixed_index) noexcept
 Slices the data within vars to a codimension 1 slice. The slice has a constant logical coordinate in direction sliced_dim, slicing the volume at fixed_index in that dimension. For example, to get the lower boundary of sliced_dim, pass 0 for fixed_index; to get the upper boundary, pass extents[sliced_dim] - 1. More...
 
template<typename... TagsToSlice, size_t VolumeDim>
void data_on_slice (const gsl::not_null< Variables< tmpl::list< TagsToSlice... >> *> interface_vars, const Index< VolumeDim > &element_extents, const size_t sliced_dim, const size_t fixed_index, const typename TagsToSlice::type &... tensors) noexcept
 Slices volume Tensors into a Variables More...
 
template<typename... TagsToSlice, size_t VolumeDim>
Variables< tmpl::list< TagsToSlice... > > data_on_slice (const Index< VolumeDim > &element_extents, const size_t sliced_dim, const size_t fixed_index, const typename TagsToSlice::type &... tensors) noexcept
 Slices volume Tensors into a Variables More...
 
template<size_t VolumeDim, typename TagsList >
Variables< TagsList > orient_variables (const Variables< TagsList > &variables, const Index< VolumeDim > &extents, const OrientationMap< VolumeDim > &orientation_of_neighbor) noexcept
 Orient variables to the data-storage order of a neighbor element with the given orientation.
 
template<size_t VolumeDim, typename TagsList >
Variables< TagsList > orient_variables_on_slice (const Variables< TagsList > &variables_on_slice, const Index< VolumeDim - 1 > &slice_extents, const size_t sliced_dim, const OrientationMap< VolumeDim > &orientation_of_neighbor) noexcept
 Orient variables to the data-storage order of a neighbor element with the given orientation.
 

Detailed Description

Defines helper functions for use with Variables class.