Go to the documentation of this file.
25 #ifndef SHAPESET_HPP_INCLUDED
26 #define SHAPESET_HPP_INCLUDED
28 #include "../tmp/algorithm.hpp"
29 #include "../tmp/vector.hpp"
30 #include "../util/conditional_precompute.hpp"
31 #include "../util/materialize_sequence.hpp"
37 #include <type_traits>
46 namespace shape_derivative_index
81 template <
class Derived,
unsigned Order>
91 return order == 0 ? 1 : (order == 1 ? dim : dim * (dim + 1) / 2);
95 namespace shape_set_traits
98 template <
class Derived>
105 template <
class Derived>
109 template <
class Derived>
113 template <
class Derived>
123 template <
class Derived>
129 template <
class Derived>
133 template <
class Derived,
unsigned Order>
137 template <
class Derived,
unsigned Order>
140 typedef Eigen::Matrix<
148 template <
class Derived,
unsigned Order>
150 typename shape_complexity<Derived, Order>::type,
151 shape_function<Derived, Order>,
152 typename domain<Derived>::type::xi_t
156 template <
class Derived,
unsigned Order>
163 template <
class Derived>
167 template <
class Derived>
172 >::eigen_vector_t type;
175 template <
class Derived>
179 template <
class Derived>
184 >::eigen_vector_t type;
194 template <
class Derived>
216 typedef typename domain_t::xi_t
xi_t;
218 typedef std::array<xi_t, num_nodes> corners_t;
219 typedef typename corners_t::const_iterator corner_iterator_t;
222 template <
unsigned Order>
225 typedef typename shape_value_type<0>::type shape_t;
226 typedef typename shape_value_type<1>::type dshape_t;
227 typedef typename shape_value_type<2>::type ddshape_t;
229 template <
unsigned Order>
230 static typename shape_set_traits::shape_return_type<Derived, Order>::type
231 eval_shape(
xi_t const &xi)
242 return Derived::corner_begin_impl();
248 return Derived::corner_begin() +
num_nodes;
266 typedef typename shape_set_traits::corner_index_vector_mat<Derived>::type runtime_corner_index_vector_t;
267 static runtime_corner_index_vector_t runtime_corner_index_vector = materialize_sequence(corner_index_vector());
268 int index = runtime_corner_index_vector[idx];
281 typedef typename shape_set_traits::position_dof_vector_mat<Derived>::type runtime_position_dof_vector_t;
282 static runtime_position_dof_vector_t runtime_position_dof_vector = materialize_sequence(position_dof_vector());
283 return runtime_position_dof_vector[idx];
289 template <
class Domain>
292 namespace shape_set_traits
294 template <
class Domain>
297 template <
class Domain>
303 template <
class Domain>
309 template <
class Domain>
315 template <
class Domain>
318 template <
class Domain>
321 template <
class Domain>
324 template <
class Domain>
330 template <
class Domain>
342 template <
class Domain>
352 typedef typename base_t::corners_t corners_t;
353 typedef typename base_t::corner_iterator_t corner_iterator_t;
363 static corners_t
const m_corners = { Domain::get_center() };
365 return m_corners.cbegin();
370 template <
class Domain>
376 static shape_t eval(xi_t
const &)
378 return shape_t::Ones();
382 template <
class Domain>
388 static shape_t eval(xi_t
const &xi)
390 return shape_t::Zero();
394 template <
class Domain>
400 static shape_t eval(xi_t
const &xi)
402 return shape_t::Zero();
408 template <
class Domain>
412 namespace shape_set_traits
414 template <
class Domain>
417 template <
class Domain>
420 enum { value = Domain::num_corners };
423 template <
class Domain>
429 template <
class Domain>
432 num_nodes<isoparam_shape_set<Domain> >::value,
436 template <
class Domain>
438 std::integral_constant<int, 0>,
439 num_nodes<isoparam_shape_set<Domain> >::value,
448 template <
class Domain>
461 typedef typename base_t::corners_t corners_t;
462 typedef typename base_t::corner_iterator_t corner_iterator_t;
469 return domain_t::get_corners().cbegin();
475 #endif // SHAPESET_HPP_INCLUDED
@ dETAXI
index of eta_xi in 2nd derivative matrix
generate a constant sequence
static return_type eval(Args const &...args)
return object computed by the function class
Defines the domain where the shape function set is defined.
static corner_iterator_t corner_begin_impl()
return begin iterator to the corner nodes
static corner_iterator_t corner_begin()
return begin iterator of corner nodes
@ dXIXI
index of xi_xi in 2nd derivative matrix
base_t::domain_t domain_t
the domain type
shape_set_base< isoparam_shape_set< Domain > > base_t
the CRTP base class
defines the nodal degrees of freedoms of the shape functions
Compile time vector with an arbitrary number of arguments.
constexpr unsigned num_derivatives(unsigned order, unsigned dim)
return the number of partial derivatives in dim dimensions In 1D there is one partial derivative and ...
@ jacobian_order
the Jacobian polynomial order
position degree of freedom of a point in the intrinsic domain
static corner_iterator_t corner_end()
return end iterator of corner nodes
functor_ret_type return_type
the return type of the static function eval
static corner_iterator_t corner_begin_impl()
return begin iterator to the corner nodes
@ dETAETA
index of eta_eta in 2nd derivative matrix
Assigns an id to the domain.
static unsigned position_dof(unsigned idx)
assign position dof value to node
base_t::xi_t xi_t
the xi location vector type
Shapeset base class for CRTP.
static const std::string value
the textual name
Constant interpolation functions.
shape_set_traits::domain< Derived >::type domain_t
Domain.
the materialized corner index vector type
Conditionally precompute and store objects.
Defines the polynomial order of the shape set's Jacobian.
static unsigned node_to_domain_corner(unsigned idx)
assign domain corner to node
declaration of CRTP base class NiHu::domain_base
the materialized position vector type
the returned matrix is constant and can be stored
@ polynomial_order
the shape set polynomial order
The shape set's textual id - used for debug information.
base_t::xi_t xi_t
type of the domain variable
domain_t::scalar_t scalar_t
scalar type inherited from the domain
base_t::domain_t domain_t
the domain type
@ dXI
index of xi in 1st derivative matrix
the returned matrix is a zero expression
Defines the return type of the shape function matrix.
@ dXIETA
index of xi_eta in 2nd derivative matrix
@ dETA
index of eta in 1st derivative matrix
Defines the value type of the shape function matrix (and derivatives)
Defines the polynomial order of the shape set.
Isoparametric shape sets.
Defines the factory functor that computes or stores the shape functions.
Defines the number of shape functions in the set.
generate an arithmetic sequence
shape_set_base< constant_shape_set< Domain > > base_t
the CRTP base class type
static const xi_t & corner_at(size_t idx)
return corner at a given node number
Defines the complexity to determine if the shape functions can be precomputed or not.
Assigns an id to the shape set.