00001 #ifndef VIENNAFEM_BASES_QUADRILATERAL_HPP
00002 #define VIENNAFEM_BASES_QUADRILATERAL_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <vector>
00018 #include "viennagrid/topology/triangle.hpp"
00019 #include "viennagrid/topology/tetrahedron.hpp"
00020 #include "viennagrid/forwards.h"
00021 #include "viennamath/expression.hpp"
00022 #include "viennafem/forwards.h"
00023
00028 namespace viennafem
00029 {
00030
00031
00032
00033
00034
00035
00036
00037
00039 template <typename InterfaceType, std::size_t order>
00040 struct local_basis <InterfaceType,
00041 viennafem::lagrange_tag<order>,
00042 unit_square,
00043 0,
00044 0>
00045 {
00046 typedef viennamath::rt_expr<InterfaceType> expression_type;
00047
00048
00049 typedef viennamath::ct_binary_expr< viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00050 viennamath::op_minus<viennafem::numeric_type>,
00051 viennamath::ct_variable<0> >,
00052 viennamath::op_mult<viennafem::numeric_type>,
00053 viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00054 viennamath::op_minus<viennafem::numeric_type>,
00055 viennamath::ct_variable<1> >
00056 > type;
00057
00058 static expression_type get() { return expression_type(type()); }
00059 };
00060
00062 template <typename InterfaceType, std::size_t order>
00063 struct local_basis <InterfaceType,
00064 viennafem::lagrange_tag<order>,
00065 unit_square,
00066 0,
00067 1>
00068 {
00069 typedef viennamath::rt_expr<InterfaceType> expression_type;
00070
00071 typedef viennamath::ct_binary_expr< viennamath::ct_variable<0>,
00072 viennamath::op_mult<viennafem::numeric_type>,
00073 viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00074 viennamath::op_minus<viennafem::numeric_type>,
00075 viennamath::ct_variable<1> >
00076 > type;
00077
00078 static expression_type get() { return expression_type(type()); }
00079 };
00080
00081
00083 template <typename InterfaceType, std::size_t order>
00084 struct local_basis <InterfaceType,
00085 viennafem::lagrange_tag<order>,
00086 unit_square,
00087 0,
00088 2>
00089 {
00090 typedef viennamath::rt_expr<InterfaceType> expression_type;
00091
00092 typedef viennamath::ct_binary_expr< viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00093 viennamath::op_minus<viennafem::numeric_type>,
00094 viennamath::ct_variable<0> >,
00095 viennamath::op_mult<viennafem::numeric_type>,
00096 viennamath::ct_variable<1>
00097 > type;
00098
00099 static expression_type get() { return expression_type(type()); }
00100 };
00101
00102
00104 template <typename InterfaceType, std::size_t order>
00105 struct local_basis <InterfaceType,
00106 viennafem::lagrange_tag<order>,
00107 unit_square,
00108 0,
00109 3>
00110 {
00111 typedef viennamath::rt_expr<InterfaceType> expression_type;
00112
00113 typedef viennamath::ct_binary_expr< viennamath::ct_variable<0>,
00114 viennamath::op_mult<viennafem::numeric_type>,
00115 viennamath::ct_variable<1>
00116 > type;
00117
00118 static expression_type get() { return expression_type(type()); }
00119 };
00120
00121
00122
00123
00124
00125
00127 template <typename InterfaceType>
00128 struct local_basis <InterfaceType,
00129 viennafem::lagrange_tag<2>,
00130 unit_square,
00131 1,
00132 0>
00133 {
00134 typedef viennamath::rt_expr<InterfaceType> expression_type;
00135 typedef typename InterfaceType::numeric_type NumericT;
00136
00137 typedef typename local_basis <InterfaceType,
00138 viennafem::lagrange_tag<2>,
00139 unit_square,
00140 0,
00141 0>::type phi_0;
00142
00143 typedef typename local_basis <InterfaceType,
00144 viennafem::lagrange_tag<2>,
00145 unit_square,
00146 0,
00147 1>::type phi_1;
00148
00149 typedef viennamath::ct_binary_expr<phi_0,
00150 viennamath::op_mult<NumericT>,
00151 phi_1
00152 > type;
00153
00154 static expression_type get() { return expression_type(type()); }
00155 };
00156
00158 template <typename InterfaceType>
00159 struct local_basis <InterfaceType,
00160 viennafem::lagrange_tag<2>,
00161 unit_square,
00162 1,
00163 1>
00164 {
00165 typedef viennamath::rt_expr<InterfaceType> expression_type;
00166 typedef typename InterfaceType::numeric_type NumericT;
00167
00168 typedef typename local_basis <InterfaceType,
00169 viennafem::lagrange_tag<2>,
00170 unit_square,
00171 0,
00172 0>::type phi_0;
00173
00174 typedef typename local_basis <InterfaceType,
00175 viennafem::lagrange_tag<2>,
00176 unit_square,
00177 0,
00178 2>::type phi_1;
00179
00180 typedef viennamath::ct_binary_expr<phi_0,
00181 viennamath::op_mult<NumericT>,
00182 phi_1
00183 > type;
00184
00185 static expression_type get() { return expression_type(type()); }
00186 };
00187
00189 template <typename InterfaceType>
00190 struct local_basis <InterfaceType,
00191 viennafem::lagrange_tag<2>,
00192 unit_square,
00193 1,
00194 2>
00195 {
00196 typedef viennamath::rt_expr<InterfaceType> expression_type;
00197 typedef typename InterfaceType::numeric_type NumericT;
00198
00199 typedef typename local_basis <InterfaceType,
00200 viennafem::lagrange_tag<2>,
00201 unit_square,
00202 0,
00203 1>::type phi_0;
00204
00205 typedef typename local_basis <InterfaceType,
00206 viennafem::lagrange_tag<2>,
00207 unit_square,
00208 0,
00209 3>::type phi_1;
00210
00211 typedef viennamath::ct_binary_expr<phi_0,
00212 viennamath::op_mult<NumericT>,
00213 phi_1
00214 > type;
00215
00216 static expression_type get() { return expression_type(type()); }
00217 };
00218
00219
00221 template <typename InterfaceType>
00222 struct local_basis <InterfaceType,
00223 viennafem::lagrange_tag<2>,
00224 unit_square,
00225 1,
00226 3>
00227 {
00228 typedef viennamath::rt_expr<InterfaceType> expression_type;
00229 typedef typename InterfaceType::numeric_type NumericT;
00230
00231 typedef typename local_basis <InterfaceType,
00232 viennafem::lagrange_tag<2>,
00233 unit_square,
00234 0,
00235 2>::type phi_0;
00236
00237 typedef typename local_basis <InterfaceType,
00238 viennafem::lagrange_tag<2>,
00239 unit_square,
00240 0,
00241 3>::type phi_1;
00242
00243 typedef viennamath::ct_binary_expr<phi_0,
00244 viennamath::op_mult<NumericT>,
00245 phi_1
00246 > type;
00247
00248 static expression_type get() { return expression_type(type()); }
00249 };
00250
00251 }
00252
00253 #endif