Function Dune::XT::Common::make_field_container_ptr

Function template Dune::XT::Common::make_field_container_ptr

template<class M>
typename std::enable_if<is_matrix<M>::value && MatrixAbstraction<M>::has_static_size, std::unique_ptr<FieldMatrix<typename MatrixAbstraction<M>::S, MatrixAbstraction<M>::static_rows, MatrixAbstraction<M>::static_cols>>>::type Dune::XT::Common::make_field_container_ptr(const M &mat)

Copies a static-size matrix into a newly allocated XT::Common::FieldMatrix and returns it as a unique_ptr.

Function template Dune::XT::Common::make_field_container_ptr

template<class V>
typename std::enable_if<is_vector<V>::value && VectorAbstraction<V>::has_static_size, std::unique_ptr<FieldVector<typename VectorAbstraction<V>::S, VectorAbstraction<V>::static_size>>>::type Dune::XT::Common::make_field_container_ptr(const V &vec)

Copies a static-size vector into a newly allocated XT::Common::FieldVector and returns it as a unique_ptr.