41 #ifndef __H__UG__PLUGINS__ELECTROMAGNETISM__ROT_ROT_ASS__
42 #define __H__UG__PLUGINS__ELECTROMAGNETISM__ROT_ROT_ASS__
52 namespace Electromagnetism{
83 template <
typename TDomain,
typename TElem>
110 static const size_t numEdges = ref_elem_type::numEdges;
120 const TDomain * domain,
127 UG_THROW (
"Whitney-1 (Nedelec) shapes not implemented for roid " << ref_elem_type::REFERENCE_OBJECT_ID <<
".");
133 const TDomain * domain,
139 UG_THROW (
"Whitney-1 (Nedelec) shapes not implemented for roid " << ref_elem_type::REFERENCE_OBJECT_ID <<
".");
145 const TDomain * domain,
151 UG_THROW (
"Whitney-1 (Nedelec) shapes not implemented for roid " << ref_elem_type::REFERENCE_OBJECT_ID <<
".");
157 const TDomain * domain,
164 UG_THROW (
"Whitney-1 (Nedelec) shapes not implemented for roid " << ref_elem_type::REFERENCE_OBJECT_ID <<
".");
170 const TDomain * domain,
179 UG_THROW (
"Whitney-1 (Nedelec) shapes not implemented for roid " << ref_elem_type::REFERENCE_OBJECT_ID <<
".");
185 const TDomain * domain,
192 UG_THROW (
"Whitney-1 (Nedelec) shapes not implemented for roid " << ref_elem_type::REFERENCE_OBJECT_ID <<
".");
254 template <
typename TDomain,
typename TElem>
281 static const size_t numEdges = ref_elem_type::numEdges;
298 const TDomain * domain,
308 const TDomain * domain,
318 const TDomain * domain,
327 const TDomain * domain,
336 const TDomain * domain,
346 const TDomain * domain,
358 const TDomain * domain,
371 template <
typename TDomain>
381 template <
typename TDomain>
397 template <
typename TDomain,
int refDim,
int WDim = TDomain::dim>
412 const TDomain * domain,
421 UG_THROW (
"NedelecInterpolation::value: No implementation of the Nedelec elements for "
423 " of reference dim. " << refDim <<
" in a " << WDim <<
"d domain.");
435 const TDomain * domain,
442 UG_THROW (
"NedelecInterpolation::curl: No implementation of the Nedelec elements for "
444 " of reference dim. " << refDim <<
" in a " << WDim <<
"d domain.");
458 const TDomain * domain,
467 UG_THROW (
"NedelecInterpolation::curl_flux: No implementation of the Nedelec elements for "
469 " of reference dim. " << refDim <<
" in a " << WDim <<
"d domain.");
475 template <
typename TDomain>
490 const TDomain * domain,
500 UG_THROW (
"No implementation of the Nedelec elements for "
502 " of reference dim. 2 in a 2d domain. (This must be a triangle.)");
504 (domain, (
Triangle *) elem, corners, dofs,
local, n_pnt, values);
516 const TDomain * domain,
524 UG_THROW (
"No implementation of the Nedelec elements for "
526 " of reference dim. 2 in a 2d domain. (This must be a triangle.)");
528 (domain, (
Triangle *) elem, corners, dofs, curl_vec);
542 const TDomain * domain,
551 UG_THROW (
"NedelecInterpolation::curl_flux: No implementation of the Nedelec elements for "
553 " of reference dim. 3 in a 3d domain.");
559 template <
typename TDomain>
574 const TDomain * domain,
584 UG_THROW (
"No implementation of the Nedelec elements for "
586 " of reference dim. 3 in a 3d domain. (This must be a tetrahedron.)");
599 const TDomain * domain,
607 UG_THROW (
"No implementation of the Nedelec elements for "
609 " of reference dim. 3 in a 3d domain. (This must be a tetrahedron.)");
611 (domain, (
Tetrahedron *) elem, corners, dofs, curl_vec);
625 const TDomain * domain,
647 for (
size_t i = 0; i < n_vec; i++) ave += vec [i];
static void curl(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], MathVector< 2 > &curl_vec)
computes curl of the function
Definition: nedelec_local_ass.h:515
static void value(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], const MathVector< 2 > local[], const size_t n_pnt, MathVector< 2 > values[])
computes the values at given points
Definition: nedelec_local_ass.h:489
static number curl_flux(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], const MathVector< 2 > &normal, const position_type pnt, number &flux)
computes flux of the curl through a given plane in an element
Definition: nedelec_local_ass.h:541
TDomain::position_type position_type
type of the geometric positions (WDim-vectors)
Definition: nedelec_local_ass.h:481
TDomain::position_type position_type
type of the geometric positions (WDim-vectors)
Definition: nedelec_local_ass.h:565
static void value(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], const MathVector< 3 > local[], const size_t n_pnt, MathVector< 3 > values[])
computes the values at given points
Definition: nedelec_local_ass.h:573
static void curl(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], MathVector< 3 > &curl_vec)
computes curl of the function
Definition: nedelec_local_ass.h:598
Interpolation of the Nedelec dofs and their curls.
Definition: nedelec_local_ass.h:399
TDomain::position_type position_type
type of the geometric positions (WDim-vectors)
Definition: nedelec_local_ass.h:403
static number curl_flux(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], const MathVector< WDim > &normal, const position_type pnt, number &flux)
computes flux of the curl through a given plane in an element
Definition: nedelec_local_ass.h:457
static void curl(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], MathVector< WDim > &curl_vec)
computes curl of the function
Definition: nedelec_local_ass.h:434
static const size_t maxNumEdges
max. number of the edges of the full-dimensional elements in the domain
Definition: nedelec_local_ass.h:406
static void value(const TDomain *domain, GridObject *elem, const position_type corners[], const number dofs[], const MathVector< refDim > local[], const size_t n_pnt, MathVector< WDim > values[])
computes the values at given points
Definition: nedelec_local_ass.h:411
Helper class for the specialization of NedelecT1_LDisc for simplices (triangles and tetrahedrons)
Definition: nedelec_local_ass.h:256
static const size_t maxNumEdges
max. number of the edges of the full-dimensional elements in the domain
Definition: nedelec_local_ass.h:284
LagrangeP1< ref_elem_type > W0_shapes_type
shapes and derivatives of the Whitney-0 (Lagrange P1) shape functions
Definition: nedelec_local_ass.h:272
static void local_mass(const TDomain *domain, TElem *elem, const position_type *corners, number M[maxNumEdges][maxNumEdges])
assembles the local mass matrix of the Nedelec elements
Definition: nedelec_local_ass_impl.h:238
static void interpolate(const TDomain *domain, TElem *elem, const position_type *corners, const number dofs[], const MathVector< dim > local[], const size_t n_pnt, MathVector< WDim > values[])
computes of the values of the grid functions
Definition: nedelec_local_ass_impl.h:398
TDomain::position_type position_type
type of the geometric positions (WDim-vectors)
Definition: nedelec_local_ass.h:266
static const size_t numCorners
total number of the corners
Definition: nedelec_local_ass.h:278
static void local_div_matrix(const TDomain *domain, TElem *elem, const position_type *corners, number B[][numEdges])
assembles the discrete weak div operator
Definition: nedelec_local_ass_impl.h:321
static void compute_W0_grads(const position_type *corners, MathVector< WDim > grad[numCorners])
computes the gradients of the Whitney-0 (Lagrange P1) shape functions
Definition: nedelec_local_ass_impl.h:56
static void get_shapes(const TDomain *domain, TElem *elem, const position_type *corners, const MathVector< dim > local, MathVector< WDim > shapes[])
computes the Nedelec shapes at a given point
Definition: nedelec_local_ass_impl.h:362
static void curl(const TDomain *domain, TElem *elem, const position_type *corners, const number dofs[], MathVector< WDim > &curl_vec)
computes the curl of the grid functions (in 2d represented as instead of )
Definition: nedelec_local_ass_impl.h:449
static const size_t numEdges
total number of the edges
Definition: nedelec_local_ass.h:281
static void local_stiffness_and_mass(const TDomain *domain, TElem *elem, const position_type *corners, number S[maxNumEdges][maxNumEdges], number M[maxNumEdges][maxNumEdges])
assembles the local stiffness and mass matrices of the rot-rot operator
Definition: nedelec_local_ass_impl.h:145
static void get_edge_corners(const TDomain *domain, TElem *elem, size_t edge_corner[numEdges][2])
gets the correspondence between the edge dof indices and the corners of the element
Definition: nedelec_local_ass_impl.h:97
reference_element_traits< TElem >::reference_element_type ref_elem_type
type of reference element
Definition: nedelec_local_ass.h:269
TDomain::grid_type grid_type
type of the grid
Definition: nedelec_local_ass.h:263
static const int dim
dimension of reference element
Definition: nedelec_local_ass.h:275
static const int WDim
world dimention
Definition: nedelec_local_ass.h:260
Tool kit for the Whitney-1 (Nedelec) based FE discretization of the rot-rot operators.
Definition: nedelec_local_ass.h:85
static void get_shapes(const TDomain *domain, TElem *elem, const position_type *corners, const MathVector< dim > local, MathVector< WDim > shapes[])
computes the Nedelec shapes at a given point
Definition: nedelec_local_ass.h:156
static void interpolate(const TDomain *domain, TElem *elem, const position_type *corners, const number dofs[], const MathVector< dim > local[], const size_t n_pnt, MathVector< WDim > values[])
computes of the values of the grid functions
Definition: nedelec_local_ass.h:169
static void local_stiffness_and_mass(const TDomain *domain, TElem *elem, const position_type *corners, number S[maxNumEdges][maxNumEdges], number M[maxNumEdges][maxNumEdges])
assembles the local stiffness and the mass matrices of the rot-rot operator
Definition: nedelec_local_ass.h:119
reference_element_traits< TElem >::reference_element_type ref_elem_type
type of reference element
Definition: nedelec_local_ass.h:98
TDomain::grid_type grid_type
type of the grid
Definition: nedelec_local_ass.h:92
LagrangeP1< ref_elem_type > W0_shapes_type
shapes and derivatives of the Whitney-0 (Lagrange P1) shape functions
Definition: nedelec_local_ass.h:101
static const int dim
dimension of reference element
Definition: nedelec_local_ass.h:104
static void local_mass(const TDomain *domain, TElem *elem, const position_type *corners, number M[maxNumEdges][maxNumEdges])
assembles the local mass matrix of the Nedelec elements
Definition: nedelec_local_ass.h:132
TDomain::position_type position_type
type of the geometric positions (WDim-vectors)
Definition: nedelec_local_ass.h:95
static const size_t maxNumEdges
max. number of the edges of the full-dimensional elements in the domain
Definition: nedelec_local_ass.h:113
static void curl(const TDomain *domain, TElem *elem, const position_type *corners, const number dofs[], MathVector< WDim > &curl_vec)
computes the curl of the grid functions (in 2d represented as instead of )
Definition: nedelec_local_ass.h:184
static const size_t numCorners
total number of the corners
Definition: nedelec_local_ass.h:107
static const int WDim
world dimention
Definition: nedelec_local_ass.h:89
static void local_div_matrix(const TDomain *domain, TElem *elem, const position_type *corners, number B[][numEdges])
assembles the discrete weak div operator
Definition: nedelec_local_ass.h:144
static const size_t numEdges
total number of the edges
Definition: nedelec_local_ass.h:110
virtual ReferenceObjectID reference_object_id() const=0
MathVector< dim > position_type
void get_ave_vector(const size_t n_vec, const MathVector< dim > *vec, MathVector< dim > &ave)
Definition: nedelec_local_ass.h:640
int local(bglp_vertex_descriptor p)