Flow123d  release_2.2.0-22-g936454a
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
RefElement< dim > Class Template Reference

#include <ref_element.hh>

Collaboration diagram for RefElement< dim >:
Collaboration graph
[legend]

Public Types

typedef arma::vec::fixed< dim > LocalPoint
 
typedef arma::vec::fixed< dim+1 > BaryPoint
 
typedef arma::vec::fixed< dim > FaceBaryPoint
 
typedef std::vector< BaryPointBarycentricUnitVec
 
typedef const std::vector< LocalPoint > & CentersList
 

Public Member Functions

template<>
const unsigned int side_permutations [][n_nodes_per_side]
 
template<>
const unsigned int side_permutations [][n_nodes_per_side]
 
template<>
const unsigned int side_permutations [][n_nodes_per_side]
 
template<>
const unsigned int side_nodes [][1]
 
template<>
const unsigned int side_nodes [][2]
 
template<>
const unsigned int side_nodes [][3]
 
template<>
const unsigned int side_lines [][3]
 
template<>
const unsigned int line_nodes [][2]
 
template<>
const std::vector< std::vector< std::vector< unsigned int > > > nodes_of_subelements
 
template<>
const std::vector< std::vector< std::vector< unsigned int > > > nodes_of_subelements
 
template<>
const std::vector< std::vector< std::vector< unsigned int > > > nodes_of_subelements
 
template<>
vec::fixed< 1 > normal_vector (unsigned int sid)
 
template<>
vec::fixed< 2 > normal_vector (unsigned int sid)
 
template<>
vec::fixed< 3 > normal_vector (unsigned int sid)
 
template<>
auto clip (const BaryPoint &barycentric) -> BaryPoint
 
template<>
double side_measure (unsigned int sid)
 
template<>
double side_measure (unsigned int sid)
 
template<>
double side_measure (unsigned int sid)
 
template<>
unsigned int line_between_faces (unsigned int f1, unsigned int f2)
 

Static Public Member Functions

static LocalPoint node_coords (unsigned int nid)
 
static BaryPoint node_barycentric_coords (unsigned int nid)
 
static LocalPoint normal_vector (unsigned int sid)
 
static BaryPoint clip (const BaryPoint &barycentric)
 
static double side_measure (unsigned int sid)
 
static unsigned int oposite_node (unsigned int sid)
 
static unsigned int line_between_faces (unsigned int f1, unsigned int f2)
 
static unsigned int permutation_index (unsigned int p[n_nodes_per_side])
 
static BarycentricUnitVec make_bary_unit_vec ()
 
static FaceBaryPoint barycentric_on_face (const BaryPoint &barycentric, unsigned int i_face)
 
static BaryPoint barycentric_from_face (const FaceBaryPoint &face_barycentric, unsigned int i_face)
 
static CentersList centers_of_subelements (unsigned int sub_dim)
 

Static Public Attributes

static const unsigned int n_sides = dim + 1
 
static const unsigned int n_nodes = dim + 1
 
static const unsigned int n_nodes_per_side = dim
 
static const unsigned int n_lines_per_side = ( dim == 3 ? 3 : 0)
 Number of lines on boundary of one side. More...
 
static const unsigned int n_lines = ( dim == 3 ? 6 : 0)
 Number of lines, i.e. object of dimension dim-2 on the boundary of the reference element. More...
 
static const unsigned int side_nodes [n_sides][n_nodes_per_side]
 
static const unsigned int side_lines [n_sides][n_lines_per_side]
 
static const unsigned int line_nodes [n_lines][2]
 
static const std::vector< std::vector< std::vector< unsigned int > > > nodes_of_subelements
 
static const unsigned int n_side_permutations = (dim+1)*(2*dim*dim-5*dim+6)/6
 
static const unsigned int side_permutations [n_side_permutations][n_nodes_per_side]
 

Detailed Description

template<unsigned int dim>
class RefElement< dim >

Definition at line 113 of file ref_element.hh.

Member Typedef Documentation

template<unsigned int dim>
typedef std::vector<BaryPoint> RefElement< dim >::BarycentricUnitVec

Definition at line 222 of file ref_element.hh.

template<unsigned int dim>
typedef arma::vec::fixed<dim+1> RefElement< dim >::BaryPoint

Definition at line 117 of file ref_element.hh.

template<unsigned int dim>
typedef const std::vector<LocalPoint>& RefElement< dim >::CentersList

Definition at line 244 of file ref_element.hh.

template<unsigned int dim>
typedef arma::vec::fixed<dim> RefElement< dim >::FaceBaryPoint

Definition at line 118 of file ref_element.hh.

template<unsigned int dim>
typedef arma::vec::fixed<dim> RefElement< dim >::LocalPoint

Definition at line 116 of file ref_element.hh.

Member Function Documentation

template<unsigned int dim>
auto RefElement< dim >::barycentric_from_face ( const FaceBaryPoint face_barycentric,
unsigned int  i_face 
)
static

For given barycentric coordinates on the face returns barycentric coordinates on the ref. element. Barycentric order: (local_coords, complanatory)

Definition at line 210 of file ref_element.cc.

template<unsigned int dim>
auto RefElement< dim >::barycentric_on_face ( const BaryPoint barycentric,
unsigned int  i_face 
)
static

For given barycentric coordinates on the ref element returns barycentric coordinates on the ref. element of given face. Assumes that the input point is on the face. Barycentric order: (local_coords, complanatory)

Definition at line 196 of file ref_element.cc.

template<unsigned int dim>
auto RefElement< dim >::centers_of_subelements ( unsigned int  sub_dim)
static

Definition at line 277 of file ref_element.cc.

template<unsigned int dim>
auto RefElement< dim >::clip ( const BaryPoint barycentric)
static

If the given barycentric coordinate is in the ref. element, return unchanged. If the given barycentric coordinate is out of the ref. element, project it on the surface of the ref. element.

Definition at line 243 of file ref_element.cc.

Here is the caller graph for this function:

template<>
auto RefElement< 0 >::clip ( const BaryPoint barycentric) -> BaryPoint

Definition at line 223 of file ref_element.cc.

template<unsigned int dim>
static unsigned int RefElement< dim >::line_between_faces ( unsigned int  f1,
unsigned int  f2 
)
static

Return index of 1D line, shared by two faces f1 and f2 of the reference tetrahedron. Implemented only for dim == 3.

Here is the caller graph for this function:

template<>
unsigned int RefElement< 3 >::line_between_faces ( unsigned int  f1,
unsigned int  f2 
)

Definition at line 334 of file ref_element.cc.

template<>
const unsigned int RefElement< 3 >::line_nodes ( )

Definition at line 80 of file ref_element.cc.

template<unsigned int dim>
auto RefElement< dim >::make_bary_unit_vec ( )
static

Used in the clip method.

Definition at line 229 of file ref_element.cc.

template<unsigned int dim>
vec::fixed< dim+1 > RefElement< dim >::node_barycentric_coords ( unsigned int  nid)
static

Return barycentric coordinates of given node.

Parameters
nidNode number.

Definition at line 125 of file ref_element.cc.

template<unsigned int dim>
vec::fixed< dim > RefElement< dim >::node_coords ( unsigned int  nid)
static

Return local coordinates of given node.

Parameters
nidNode number.

Definition at line 110 of file ref_element.cc.

template<>
const std::vector< std::vector< std::vector< unsigned int > > > RefElement< 1 >::nodes_of_subelements ( )

Definition at line 90 of file ref_element.cc.

template<>
const std::vector< std::vector< std::vector< unsigned int > > > RefElement< 2 >::nodes_of_subelements ( )

Definition at line 95 of file ref_element.cc.

template<>
const std::vector< std::vector< std::vector< unsigned int > > > RefElement< 3 >::nodes_of_subelements ( )

Definition at line 101 of file ref_element.cc.

template<unsigned int dim>
static LocalPoint RefElement< dim >::normal_vector ( unsigned int  sid)
static

Compute normal vector to a given side.

Parameters
sidSide number.

Here is the caller graph for this function:

template<>
vec::fixed< 1 > RefElement< 1 >::normal_vector ( unsigned int  sid)

Definition at line 142 of file ref_element.cc.

template<>
vec::fixed< 2 > RefElement< 2 >::normal_vector ( unsigned int  sid)

Definition at line 150 of file ref_element.cc.

template<>
vec::fixed< 3 > RefElement< 3 >::normal_vector ( unsigned int  sid)

Definition at line 172 of file ref_element.cc.

template<unsigned int dim>
unsigned int RefElement< dim >::oposite_node ( unsigned int  sid)
inlinestatic

Returns index of the node that is oposite to side of given index sid. Note: It is dependent on current node and side numbering.

Parameters
sidSide number.

Definition at line 251 of file ref_element.hh.

Here is the caller graph for this function:

template<unsigned int dim>
unsigned int RefElement< dim >::permutation_index ( unsigned int  p[n_nodes_per_side])
static

For a given permutation p of nodes finds its index within side_permutations.

Parameters
pPermutation of nodes.

Definition at line 346 of file ref_element.cc.

Here is the caller graph for this function:

template<>
const unsigned int RefElement< 3 >::side_lines ( )

Definition at line 71 of file ref_element.cc.

template<unsigned int dim>
static double RefElement< dim >::side_measure ( unsigned int  sid)
static

Here is the caller graph for this function:

template<>
double RefElement< 1 >::side_measure ( unsigned int  sid)

Definition at line 305 of file ref_element.cc.

template<>
double RefElement< 2 >::side_measure ( unsigned int  sid)

Definition at line 314 of file ref_element.cc.

template<>
double RefElement< 3 >::side_measure ( unsigned int  sid)

Definition at line 323 of file ref_element.cc.

template<>
const unsigned int RefElement< 1 >::side_nodes ( )

Definition at line 51 of file ref_element.cc.

template<>
const unsigned int RefElement< 2 >::side_nodes ( )

Definition at line 56 of file ref_element.cc.

template<>
const unsigned int RefElement< 3 >::side_nodes ( )

Definition at line 62 of file ref_element.cc.

template<>
const unsigned int RefElement< 1 >::side_permutations ( )

Definition at line 37 of file ref_element.cc.

template<>
const unsigned int RefElement< 2 >::side_permutations ( )

Definition at line 39 of file ref_element.cc.

template<>
const unsigned int RefElement< 3 >::side_permutations ( )

Definition at line 41 of file ref_element.cc.

Member Data Documentation

template<unsigned int dim>
const unsigned int RefElement< dim >::line_nodes[n_lines][2]
static

Nodes of 1D lines of the tetrahedron.

Definition at line 196 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::n_lines = ( dim == 3 ? 6 : 0)
static

Number of lines, i.e. object of dimension dim-2 on the boundary of the reference element.

Definition at line 181 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::n_lines_per_side = ( dim == 3 ? 3 : 0)
static

Number of lines on boundary of one side.

Definition at line 178 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::n_nodes = dim + 1
static

Number of vertices.

Definition at line 170 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::n_nodes_per_side = dim
static

Number of nodes on one side.

Definition at line 175 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::n_side_permutations = (dim+1)*(2*dim*dim-5*dim+6)/6
static

Number of permutations of nodes on sides.

dim value

1 1 2 2 3 6

Definition at line 209 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::n_sides = dim + 1
static

Number of sides.

Definition at line 165 of file ref_element.hh.

template<unsigned int dim>
const std::vector< std::vector< std::vector<unsigned int> > > RefElement< dim >::nodes_of_subelements
static

Definition at line 199 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::side_lines[n_sides][n_lines_per_side]
static

Indices of 1D lines of the 2D sides of an tetrahedron. Nonempty only for dim==3.

Definition at line 191 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::side_nodes[n_sides][n_nodes_per_side]
static

Node numbers for each side.

Definition at line 186 of file ref_element.hh.

template<unsigned int dim>
const unsigned int RefElement< dim >::side_permutations[n_side_permutations][n_nodes_per_side]
static

Permutations of nodes on sides.

Definition at line 214 of file ref_element.hh.


The documentation for this class was generated from the following files: