00001 #ifndef VIENNAFEM_BASES_HEXAHEDRON_HPP
00002 #define VIENNAFEM_BASES_HEXAHEDRON_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 #include "viennafem/bases/quadrilateral.hpp"
00024
00029 namespace viennafem
00030 {
00031
00032
00033
00034
00035
00036
00037
00038
00040 template <typename InterfaceType, std::size_t order>
00041 struct local_basis <InterfaceType,
00042 viennafem::lagrange_tag<order>,
00043 unit_cube,
00044 0,
00045 0>
00046 {
00047 typedef viennamath::rt_expr<InterfaceType> expression_type;
00048
00049 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00050 unit_square, 0, 0>::type,
00051 viennamath::op_mult<viennafem::numeric_type>,
00052 viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00053 viennamath::op_minus<viennafem::numeric_type>,
00054 viennamath::ct_variable<2> >
00055 > type;
00056
00057 static expression_type get() { return expression_type(type()); }
00058 };
00059
00061 template <typename InterfaceType, std::size_t order>
00062 struct local_basis <InterfaceType,
00063 viennafem::lagrange_tag<order>,
00064 unit_cube,
00065 0,
00066 1>
00067 {
00068 typedef viennamath::rt_expr<InterfaceType> expression_type;
00069
00070 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00071 unit_square, 0, 1>::type,
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<2> >
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_cube,
00087 0,
00088 2>
00089 {
00090 typedef viennamath::rt_expr<InterfaceType> expression_type;
00091
00092 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00093 unit_square, 0, 2>::type,
00094 viennamath::op_mult<viennafem::numeric_type>,
00095 viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00096 viennamath::op_minus<viennafem::numeric_type>,
00097 viennamath::ct_variable<2> >
00098 > type;
00099
00100 static expression_type get() { return expression_type(type()); }
00101 };
00102
00103
00105 template <typename InterfaceType, std::size_t order>
00106 struct local_basis <InterfaceType,
00107 viennafem::lagrange_tag<order>,
00108 unit_cube,
00109 0,
00110 3>
00111 {
00112 typedef viennamath::rt_expr<InterfaceType> expression_type;
00113
00114 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00115 unit_square, 0, 3>::type,
00116 viennamath::op_mult<viennafem::numeric_type>,
00117 viennamath::ct_binary_expr< viennamath::ct_constant<1>,
00118 viennamath::op_minus<viennafem::numeric_type>,
00119 viennamath::ct_variable<2> >
00120 > type;
00121
00122 static expression_type get() { return expression_type(type()); }
00123 };
00124
00125
00127 template <typename InterfaceType, std::size_t order>
00128 struct local_basis <InterfaceType,
00129 viennafem::lagrange_tag<order>,
00130 unit_cube,
00131 0,
00132 4>
00133 {
00134 typedef viennamath::rt_expr<InterfaceType> expression_type;
00135
00136 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00137 unit_square, 0, 0>::type,
00138 viennamath::op_mult<viennafem::numeric_type>,
00139 viennamath::ct_variable<2>
00140 > type;
00141
00142 static expression_type get() { return expression_type(type()); }
00143 };
00144
00146 template <typename InterfaceType, std::size_t order>
00147 struct local_basis <InterfaceType,
00148 viennafem::lagrange_tag<order>,
00149 unit_cube,
00150 0,
00151 5>
00152 {
00153 typedef viennamath::rt_expr<InterfaceType> expression_type;
00154
00155 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00156 unit_square, 0, 1>::type,
00157 viennamath::op_mult<viennafem::numeric_type>,
00158 viennamath::ct_variable<2>
00159 > type;
00160
00161 static expression_type get() { return expression_type(type()); }
00162 };
00163
00164
00166 template <typename InterfaceType, std::size_t order>
00167 struct local_basis <InterfaceType,
00168 viennafem::lagrange_tag<order>,
00169 unit_cube,
00170 0,
00171 6>
00172 {
00173 typedef viennamath::rt_expr<InterfaceType> expression_type;
00174
00175 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00176 unit_square, 0, 2>::type,
00177 viennamath::op_mult<viennafem::numeric_type>,
00178 viennamath::ct_variable<2>
00179 > type;
00180
00181 static expression_type get() { return expression_type(type()); }
00182 };
00183
00184
00186 template <typename InterfaceType, std::size_t order>
00187 struct local_basis <InterfaceType,
00188 viennafem::lagrange_tag<order>,
00189 unit_cube,
00190 0,
00191 7>
00192 {
00193 typedef viennamath::rt_expr<InterfaceType> expression_type;
00194
00195 typedef viennamath::ct_binary_expr< typename local_basis<InterfaceType, viennafem::lagrange_tag<order>,
00196 unit_square, 0, 3>::type,
00197 viennamath::op_mult<viennafem::numeric_type>,
00198 viennamath::ct_variable<2>
00199 > type;
00200
00201 static expression_type get() { return expression_type(type()); }
00202 };
00203
00204
00205
00206
00207
00208
00210 template <typename InterfaceType>
00211 struct local_basis <InterfaceType,
00212 viennafem::lagrange_tag<2>,
00213 unit_cube,
00214 1,
00215 0>
00216 {
00217 typedef viennamath::rt_expr<InterfaceType> expression_type;
00218 typedef typename InterfaceType::numeric_type NumericT;
00219
00220 typedef typename local_basis <InterfaceType,
00221 viennafem::lagrange_tag<2>,
00222 unit_cube,
00223 0,
00224 0>::type phi_0;
00225
00226 typedef typename local_basis <InterfaceType,
00227 viennafem::lagrange_tag<2>,
00228 unit_cube,
00229 0,
00230 1>::type phi_1;
00231
00232 typedef viennamath::ct_binary_expr<phi_0,
00233 viennamath::op_mult<NumericT>,
00234 phi_1
00235 > type;
00236
00237 static expression_type get() { return expression_type(type()); }
00238 };
00239
00241 template <typename InterfaceType>
00242 struct local_basis <InterfaceType,
00243 viennafem::lagrange_tag<2>,
00244 unit_cube,
00245 1,
00246 1>
00247 {
00248 typedef viennamath::rt_expr<InterfaceType> expression_type;
00249 typedef typename InterfaceType::numeric_type NumericT;
00250
00251 typedef typename local_basis <InterfaceType,
00252 viennafem::lagrange_tag<2>,
00253 unit_cube,
00254 0,
00255 0>::type phi_0;
00256
00257 typedef typename local_basis <InterfaceType,
00258 viennafem::lagrange_tag<2>,
00259 unit_cube,
00260 0,
00261 2>::type phi_1;
00262
00263 typedef viennamath::ct_binary_expr<phi_0,
00264 viennamath::op_mult<NumericT>,
00265 phi_1
00266 > type;
00267
00268 static expression_type get() { return expression_type(type()); }
00269 };
00270
00272 template <typename InterfaceType>
00273 struct local_basis <InterfaceType,
00274 viennafem::lagrange_tag<2>,
00275 unit_cube,
00276 1,
00277 2>
00278 {
00279 typedef viennamath::rt_expr<InterfaceType> expression_type;
00280 typedef typename InterfaceType::numeric_type NumericT;
00281
00282 typedef typename local_basis <InterfaceType,
00283 viennafem::lagrange_tag<2>,
00284 unit_cube,
00285 0,
00286 0>::type phi_0;
00287
00288 typedef typename local_basis <InterfaceType,
00289 viennafem::lagrange_tag<2>,
00290 unit_cube,
00291 0,
00292 4>::type phi_1;
00293
00294 typedef viennamath::ct_binary_expr<phi_0,
00295 viennamath::op_mult<NumericT>,
00296 phi_1
00297 > type;
00298
00299 static expression_type get() { return expression_type(type()); }
00300 };
00301
00302
00304 template <typename InterfaceType>
00305 struct local_basis <InterfaceType,
00306 viennafem::lagrange_tag<2>,
00307 unit_cube,
00308 1,
00309 3>
00310 {
00311 typedef viennamath::rt_expr<InterfaceType> expression_type;
00312 typedef typename InterfaceType::numeric_type NumericT;
00313
00314 typedef typename local_basis <InterfaceType,
00315 viennafem::lagrange_tag<2>,
00316 unit_cube,
00317 0,
00318 1>::type phi_0;
00319
00320 typedef typename local_basis <InterfaceType,
00321 viennafem::lagrange_tag<2>,
00322 unit_cube,
00323 0,
00324 3>::type phi_1;
00325
00326 typedef viennamath::ct_binary_expr<phi_0,
00327 viennamath::op_mult<NumericT>,
00328 phi_1
00329 > type;
00330
00331 static expression_type get() { return expression_type(type()); }
00332 };
00333
00334
00336 template <typename InterfaceType>
00337 struct local_basis <InterfaceType,
00338 viennafem::lagrange_tag<2>,
00339 unit_cube,
00340 1,
00341 4>
00342 {
00343 typedef viennamath::rt_expr<InterfaceType> expression_type;
00344 typedef typename InterfaceType::numeric_type NumericT;
00345
00346 typedef typename local_basis <InterfaceType,
00347 viennafem::lagrange_tag<2>,
00348 unit_cube,
00349 0,
00350 1>::type phi_0;
00351
00352 typedef typename local_basis <InterfaceType,
00353 viennafem::lagrange_tag<2>,
00354 unit_cube,
00355 0,
00356 5>::type phi_1;
00357
00358 typedef viennamath::ct_binary_expr<phi_0,
00359 viennamath::op_mult<NumericT>,
00360 phi_1
00361 > type;
00362
00363 static expression_type get() { return expression_type(type()); }
00364 };
00365
00366
00368 template <typename InterfaceType>
00369 struct local_basis <InterfaceType,
00370 viennafem::lagrange_tag<2>,
00371 unit_cube,
00372 1,
00373 5>
00374 {
00375 typedef viennamath::rt_expr<InterfaceType> expression_type;
00376 typedef typename InterfaceType::numeric_type NumericT;
00377
00378 typedef typename local_basis <InterfaceType,
00379 viennafem::lagrange_tag<2>,
00380 unit_cube,
00381 0,
00382 2>::type phi_0;
00383
00384 typedef typename local_basis <InterfaceType,
00385 viennafem::lagrange_tag<2>,
00386 unit_cube,
00387 0,
00388 3>::type phi_1;
00389
00390 typedef viennamath::ct_binary_expr<phi_0,
00391 viennamath::op_mult<NumericT>,
00392 phi_1
00393 > type;
00394
00395 static expression_type get() { return expression_type(type()); }
00396 };
00397
00398
00400 template <typename InterfaceType>
00401 struct local_basis <InterfaceType,
00402 viennafem::lagrange_tag<2>,
00403 unit_cube,
00404 1,
00405 6>
00406 {
00407 typedef viennamath::rt_expr<InterfaceType> expression_type;
00408 typedef typename InterfaceType::numeric_type NumericT;
00409
00410 typedef typename local_basis <InterfaceType,
00411 viennafem::lagrange_tag<2>,
00412 unit_cube,
00413 0,
00414 2>::type phi_0;
00415
00416 typedef typename local_basis <InterfaceType,
00417 viennafem::lagrange_tag<2>,
00418 unit_cube,
00419 0,
00420 6>::type phi_1;
00421
00422 typedef viennamath::ct_binary_expr<phi_0,
00423 viennamath::op_mult<NumericT>,
00424 phi_1
00425 > type;
00426
00427 static expression_type get() { return expression_type(type()); }
00428 };
00429
00430
00432 template <typename InterfaceType>
00433 struct local_basis <InterfaceType,
00434 viennafem::lagrange_tag<2>,
00435 unit_cube,
00436 1,
00437 7>
00438 {
00439 typedef viennamath::rt_expr<InterfaceType> expression_type;
00440 typedef typename InterfaceType::numeric_type NumericT;
00441
00442 typedef typename local_basis <InterfaceType,
00443 viennafem::lagrange_tag<2>,
00444 unit_cube,
00445 0,
00446 3>::type phi_0;
00447
00448 typedef typename local_basis <InterfaceType,
00449 viennafem::lagrange_tag<2>,
00450 unit_cube,
00451 0,
00452 7>::type phi_1;
00453
00454 typedef viennamath::ct_binary_expr<phi_0,
00455 viennamath::op_mult<NumericT>,
00456 phi_1
00457 > type;
00458
00459 static expression_type get() { return expression_type(type()); }
00460 };
00461
00462
00464 template <typename InterfaceType>
00465 struct local_basis <InterfaceType,
00466 viennafem::lagrange_tag<2>,
00467 unit_cube,
00468 1,
00469 8>
00470 {
00471 typedef viennamath::rt_expr<InterfaceType> expression_type;
00472 typedef typename InterfaceType::numeric_type NumericT;
00473
00474 typedef typename local_basis <InterfaceType,
00475 viennafem::lagrange_tag<2>,
00476 unit_cube,
00477 0,
00478 4>::type phi_0;
00479
00480 typedef typename local_basis <InterfaceType,
00481 viennafem::lagrange_tag<2>,
00482 unit_cube,
00483 0,
00484 5>::type phi_1;
00485
00486 typedef viennamath::ct_binary_expr<phi_0,
00487 viennamath::op_mult<NumericT>,
00488 phi_1
00489 > type;
00490
00491 static expression_type get() { return expression_type(type()); }
00492 };
00493
00494
00496 template <typename InterfaceType>
00497 struct local_basis <InterfaceType,
00498 viennafem::lagrange_tag<2>,
00499 unit_cube,
00500 1,
00501 9>
00502 {
00503 typedef viennamath::rt_expr<InterfaceType> expression_type;
00504 typedef typename InterfaceType::numeric_type NumericT;
00505
00506 typedef typename local_basis <InterfaceType,
00507 viennafem::lagrange_tag<2>,
00508 unit_cube,
00509 0,
00510 4>::type phi_0;
00511
00512 typedef typename local_basis <InterfaceType,
00513 viennafem::lagrange_tag<2>,
00514 unit_cube,
00515 0,
00516 6>::type phi_1;
00517
00518 typedef viennamath::ct_binary_expr<phi_0,
00519 viennamath::op_mult<NumericT>,
00520 phi_1
00521 > type;
00522
00523 static expression_type get() { return expression_type(type()); }
00524 };
00525
00527 template <typename InterfaceType>
00528 struct local_basis <InterfaceType,
00529 viennafem::lagrange_tag<2>,
00530 unit_cube,
00531 1,
00532 10>
00533 {
00534 typedef viennamath::rt_expr<InterfaceType> expression_type;
00535 typedef typename InterfaceType::numeric_type NumericT;
00536
00537 typedef typename local_basis <InterfaceType,
00538 viennafem::lagrange_tag<2>,
00539 unit_cube,
00540 0,
00541 5>::type phi_0;
00542
00543 typedef typename local_basis <InterfaceType,
00544 viennafem::lagrange_tag<2>,
00545 unit_cube,
00546 0,
00547 7>::type phi_1;
00548
00549 typedef viennamath::ct_binary_expr<phi_0,
00550 viennamath::op_mult<NumericT>,
00551 phi_1
00552 > type;
00553
00554 static expression_type get() { return expression_type(type()); }
00555 };
00556
00557
00559 template <typename InterfaceType>
00560 struct local_basis <InterfaceType,
00561 viennafem::lagrange_tag<2>,
00562 unit_cube,
00563 1,
00564 11>
00565 {
00566 typedef viennamath::rt_expr<InterfaceType> expression_type;
00567 typedef typename InterfaceType::numeric_type NumericT;
00568
00569 typedef typename local_basis <InterfaceType,
00570 viennafem::lagrange_tag<2>,
00571 unit_cube,
00572 0,
00573 6>::type phi_0;
00574
00575 typedef typename local_basis <InterfaceType,
00576 viennafem::lagrange_tag<2>,
00577 unit_cube,
00578 0,
00579 7>::type phi_1;
00580
00581 typedef viennamath::ct_binary_expr<phi_0,
00582 viennamath::op_mult<NumericT>,
00583 phi_1
00584 > type;
00585
00586 static expression_type get() { return expression_type(type()); }
00587 };
00588
00589
00590 }
00591
00592 #endif