From: David Wells Date: Tue, 19 Jan 2021 13:05:27 +0000 (-0500) Subject: Merge pull request #11572 from peterrum/simplex_get_position_vector X-Git-Tag: v9.3.0-rc1~597 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5342dfd36fdec09c000dae7ea2a5f8c5ac444223;p=dealii.git Merge pull request #11572 from peterrum/simplex_get_position_vector Generalize VectorTools::get_position_vector for simplex meshes --- 5342dfd36fdec09c000dae7ea2a5f8c5ac444223 diff --cc source/grid/reference_cell.cc index 54ee83ba0a,68a599be18..8ae0afa4f4 --- a/source/grid/reference_cell.cc +++ b/source/grid/reference_cell.cc @@@ -105,7 -102,32 +105,33 @@@ namespace ReferenceCel } + + template + std::unique_ptr> + get_default_mapping(const Type &reference_cell, const unsigned int degree) + { + AssertDimension(dim, get_dimension(reference_cell)); + + if (reference_cell == get_hypercube(dim)) + return std::make_unique>(degree); + else if (reference_cell == Type::Tri || reference_cell == Type::Tet) + return std::make_unique>( + Simplex::FE_P(degree)); + else if (reference_cell == Type::Pyramid) + return std::make_unique>( + Simplex::FE_PyramidP(degree)); + else if (reference_cell == Type::Wedge) + return std::make_unique>( + Simplex::FE_WedgeP(degree)); + else + { + Assert(false, ExcNotImplemented()); + } + + return std::make_unique>(degree); + } + + template const Mapping & get_default_linear_mapping(const Type &reference_cell)