Rheolef  7.1
an efficient C++ finite element environment
P1_symbolic.cc
Go to the documentation of this file.
1 //
22 // P1 approximation
23 //
24 #include "basis_symbolic.h"
25 using namespace rheolef;
26 using namespace std;
27 
28 class P1_symbolic : public basis_symbolic_nodal
29 {
30 public:
31  P1_symbolic ();
32 };
33 P1_symbolic::P1_symbolic ()
34 : basis_symbolic_nodal("P1",1)
35 {
39  on('p') << node(0) << poly (1) << end;
40  on('e') << node (0)
41  << node (1)
42  << poly (1)
43  << poly (x)
44  << end;
45  on('t') << node (0, 0)
46  << node (1, 0)
47  << node (0, 1)
48  << poly (1)
49  << poly (x)
50  << poly (y)
51  << end;
52  on('q') << node (-1, -1)
53  << node ( 1, -1)
54  << node ( 1, 1)
55  << node (-1, 1)
56  << poly (1)
57  << poly (x)
58  << poly (y)
59  << poly (x*y)
60  << end;
61  on('T') << node (0, 0, 0)
62  << node (1, 0, 0)
63  << node (0, 1, 0)
64  << node (0, 0, 1)
65  << poly (1)
66  << poly (x)
67  << poly (y)
68  << poly (z)
69  << end;
70  on('P') << node(0, 0,-1)
71  << node(1, 0,-1)
72  << node(0, 1,-1)
73  << node(0, 0, 1)
74  << node(1, 0, 1)
75  << node(0, 1, 1)
76  << poly (1)
77  << poly (x)
78  << poly (y)
79  << poly (z)
80  << poly (x*z)
81  << poly (y*z)
82  << end;
83  on('H') << node(-1,-1,-1)
84  << node( 1,-1,-1)
85  << node( 1, 1,-1)
86  << node(-1, 1,-1)
87  << node(-1,-1, 1)
88  << node( 1,-1, 1)
89  << node( 1, 1, 1)
90  << node(-1, 1, 1)
91  << poly (1)
92  << poly (x)
93  << poly (y)
94  << poly (z)
95  << poly (x*y)
96  << poly (y*z)
97  << poly (z*x)
98  << poly (x*y*z)
99  << end;
100 }
101 int main (int argc, char **argv) {
102  P1_symbolic P1;
103  P1.put_cxx_main (argc,argv);
104 }
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
main
int main(int argc, char **argv)
Definition: P1_symbolic.cc:101
rheolef::basis_symbolic_nodal::set_continuous_feature
void set_continuous_feature(bool cf=true)
Definition: basis_symbolic.h:174
basis_symbolic.h
rheolef::basis_symbolic_nodal::set_degree_parameter
void set_degree_parameter(bool dp=true)
Definition: basis_symbolic.h:173
rheolef::basis_symbolic_nodal::_family_name
std::string _family_name
Definition: basis_symbolic.h:195
rheolef::basis_symbolic_nodal
Definition: basis_symbolic.h:118
rheolef::std
Definition: vec_expr_v2.h:402