9#include <kernel/trafo/mapping_base.hpp>
10#include <kernel/trafo/isoparam/evaluator.hpp>
11#include <kernel/geometry/mesh_part.hpp>
12#include <kernel/geometry/atlas/chart.hpp>
29 template<
typename Shape_,
int dim_ = Shape_::dimension-1>
30 struct PartChartHelper
32 template<
typename AVC_,
typename Chart_>
33 static void emplace(
const Geometry::TargetSetHolder<Shape_>& tsh, AVC_& v,
const Chart_& chart)
35 PartChartHelper<Shape_, dim_-1>::emplace(tsh, v, chart);
37 const auto& trg = tsh.template get_target_set<dim_>();
38 for(Index i(0); i < trg.get_num_entities(); ++i)
40 v[dim_].at(trg[i]) = &chart;
45 template<
typename Shape_>
46 struct PartChartHelper<Shape_,0>
48 template<
typename AVC_,
typename Chart_>
49 static void emplace(
const Geometry::TargetSetHolder<Shape_>&, AVC_&,
const Chart_&)
82 template<
typename Mesh_,
int degree_>
87 static_assert(degree_ > 0,
"invalid mapping degree");
88 static_assert(degree_ < 4,
"invalid mapping degree");
97 typedef typename MeshType::VertexSetType::CoordType
CoordType;
109 std::array<std::vector<const ChartType*>,
shape_dim+1> _shape_charts;
115 typename CoordType_ =
Real>
140 _shape_charts.at(std::size_t(dim)).resize(mesh.get_num_entities(dim),
nullptr);
155 Intern::PartChartHelper<ShapeType>::emplace(mesh_part.get_target_set_holder(), _shape_charts, chart);
165 for(
auto& x : _shape_charts.at(std::size_t(dim)))
178 return _shape_charts.at(std::size_t(dim));
#define XASSERTM(expr, msg)
Assertion macro definition with custom message.
Class template for partial meshes.
Trafo evaluator class template.
Trafo::Isoparam::Evaluator< Mapping, EvalPolicy, degree_ > Type
evaluator type
Trafo::StandardEvalPolicy< Shape_, CoordType_, MeshType::world_dim > EvalPolicy
evaluation policy
Standard transformation mapping class template.
Shape::FaceTraits< ShapeType, ShapeType::dimension-1 >::ShapeType FacetType
MappingBase< Mesh_ > BaseClass
base-class typedef
Mapping(MeshType &mesh)
Constructor.
const std::vector< const ChartType * > & get_charts_vector(int dim) const
Return the shape-charts vector.
static constexpr int shape_dim
our shape dimension
void clear_charts()
Clears all added mesh-part/chart pairs.
void add_meshpart_chart(const Geometry::MeshPart< MeshType > &mesh_part, const Geometry::Atlas::ChartBase< MeshType > &chart)
Adds a mesh-part and its associated chart to the trafo.
Geometry::Atlas::ChartBase< MeshType > ChartType
chart type
MeshType::VertexSetType::CoordType CoordType
data type
MeshType::ShapeType ShapeType
shape type
Trafo-Mapping base class.
double Real
Real data type.
Face traits tag struct template.
Standard evaluation policy class template.