Flow123d  jenkins-Flow123d-windows32-release-multijob-51
mh_fe_values.hh
Go to the documentation of this file.
1 /*
2  * mh_fe_values.hh
3  *
4  * Created on: Jul 2, 2012
5  * Author: jb
6  */
7 
8 #ifndef MH_FE_VALUES_HH_
9 #define MH_FE_VALUES_HH_
10 
11 #include "mesh/mesh_types.hh"
12 #include <armadillo>
13 
14 #include "fields/field.hh"
15 #include "fields/field_values.hh"
16 
19 
20 //declared in system/math_fce.h
21 typedef double SmallVec2_t[2];
23 
24 /**
25  * Temporary class to remove MH calculations (basis functions and leading local matrix) from geometrical mesh.
26  */
27 class MHFEValues {
28 public:
29  MHFEValues();
30  ~MHFEValues();
31  void update(ElementFullIter ele, FieldType &cond_anisothropy, FieldType_Scalar &cross_section, FieldType_Scalar &conductivity);
32  double * local_matrix();
33  double * inv_local_matrix();
34 
35  /**
36  * Temporary hack: returns value of shape function on element 'ele' and its 'face' in 'point' given in global coordinate system.
37  */
38  arma::vec3 RT0_value(ElementFullIter ele, arma::vec3 point, unsigned int face);
39 
40 private:
41  void local_matrix_line(ElementFullIter ele, FieldType &cond_anisothropy, double scale );
42  void local_matrix_triangle(ElementFullIter ele, FieldType &cond_anisothropy, double scale );
43  void local_matrix_tetrahedron(ElementFullIter ele, FieldType &cond_anisothropy, double scale );
44 
45 
46  void node_coordinates_triangle( ElementFullIter ele, double nod[ 3 ][ 2 ] );
47  void side_midpoint_triangle( double nod[ 3 ][ 2 ], double midpoint[ 3 ][ 2 ] );
48  void basis_functions_triangle( double nod[ 3 ][ 2 ], double alfa[],double beta[], double gama[] );
49  void bas_func_0_triangle( double x0, double y0,
50  double x1, double y1,
51  double x2, double y2,
52  double *alfa, double *beta, double *gama);
53  void calc_polynom_triangle( double al_i, double be_i, double al_j, double be_j, arma::mat::fixed<2,2> a, double poly[] );
54  double polynom_value_triangle( double poly[], double point[] );
55  void basis_functions_tetrahedron( ElementFullIter ele, double alfa[], double beta[],double gama[], double delta[]);
56  void calc_polynom_tetrahedron( double al_i, double be_i, double ga_i,
57  double al_j, double be_j, double ga_j,
58  arma::mat::fixed<3,3> a, double poly[] );
59  double polynom_integral_tetrahedron( ElementFullIter ele, double poly[] );
60 
61  double * loc_matrix_;
62  double * inv_loc_matrix_;
63 
64 
65  // Parameters of the basis functions
66  double *bas_alfa; // Parameters alfa
67  double *bas_beta; // Parameters beta
68  double *bas_gama; // Parameters gama
69  double *bas_delta; // Parameters delta
70 };
71 
72 
73 #endif /* MH_FE_VALUES_HH_ */
void calc_polynom_tetrahedron(double al_i, double be_i, double ga_i, double al_j, double be_j, double ga_j, arma::mat::fixed< 3, 3 > a, double poly[])
void node_coordinates_triangle(ElementFullIter ele, double nod[3][2])
double polynom_value_triangle(double poly[], double point[])
void local_matrix_tetrahedron(ElementFullIter ele, FieldType &cond_anisothropy, double scale)
double * bas_gama
Definition: mh_fe_values.hh:68
double polynom_integral_tetrahedron(ElementFullIter ele, double poly[])
void bas_func_0_triangle(double x0, double y0, double x1, double y1, double x2, double y2, double *alfa, double *beta, double *gama)
void basis_functions_triangle(double nod[3][2], double alfa[], double beta[], double gama[])
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:48
void local_matrix_line(ElementFullIter ele, FieldType &cond_anisothropy, double scale)
void basis_functions_tetrahedron(ElementFullIter ele, double alfa[], double beta[], double gama[], double delta[])
double * bas_delta
Definition: mh_fe_values.hh:69
double * inv_loc_matrix_
Definition: mh_fe_values.hh:62
void update(ElementFullIter ele, FieldType &cond_anisothropy, FieldType_Scalar &cross_section, FieldType_Scalar &conductivity)
Definition: mh_fe_values.cc:34
double * inv_local_matrix()
Definition: mh_fe_values.cc:69
Field< 3, FieldValue< 3 >::Scalar > FieldType_Scalar
Definition: mh_fe_values.hh:18
void side_midpoint_triangle(double nod[3][2], double midpoint[3][2])
double * bas_beta
Definition: mh_fe_values.hh:67
double * local_matrix()
Definition: mh_fe_values.cc:63
void calc_polynom_triangle(double al_i, double be_i, double al_j, double be_j, arma::mat::fixed< 2, 2 > a, double poly[])
arma::vec3 RT0_value(ElementFullIter ele, arma::vec3 point, unsigned int face)
Definition: mh_fe_values.cc:75
double SmallVec2_t[2]
Definition: mh_fe_values.hh:21
void local_matrix_triangle(ElementFullIter ele, FieldType &cond_anisothropy, double scale)
SmallVec2_t * SmallMtx2
Definition: mh_fe_values.hh:22
double * bas_alfa
Definition: mh_fe_values.hh:66
double * loc_matrix_
Definition: mh_fe_values.hh:61
Field< 3, FieldValue< 3 >::TensorFixed > FieldType
Definition: mh_fe_values.hh:17