Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
feelpoly/context.hpp
1 /* -*- mode: c++; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; show-trailing-whitespace: t -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2 
3  This file is part of the Feel library
4 
5  Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
6  Date: 2005-07-19
7 
8  Copyright (C) 2005,2006 EPFL
9 
10  This library is free software; you can redistribute it and/or
11  modify it under the terms of the GNU Lesser General Public
12  License as published by the Free Software Foundation; either
13  version 3.0 of the License, or (at your option) any later version.
14 
15  This library is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public
21  License along with this library; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */
29 #ifndef __FEM_Context_HPP
30 #define __FEM_Context_HPP 1
31 
32 #include <feel/feelcore/context.hpp>
33 #include <boost/mpl/vector_c.hpp>
34 
35 namespace Feel
36 {
37 namespace vm
38 {
39 
40 const size_type JACOBIAN = ( 1<<0 );
41 const size_type KB = ( 1<<1 );
42 const size_type KB2 = ( 1<<2 );
43 const size_type FIRST_DERIVATIVE = ( 1<<3 );
44 const size_type GRAD = ( 1<<4 );
45 const size_type SECOND_DERIVATIVE = ( 1<<5 );
46 const size_type HESSIAN = ( 1<<6 );
47 const size_type MEASURE = ( 1<<7 );
48 const size_type NORMAL = ( 1<<8 );
49 const size_type TANGENT = ( 1<<9 );
50 const size_type FIRST_DERIVATIVE_NORMAL = ( 1<<10 );
51 const size_type POINT = ( 1<<11 );
52 const size_type SYMM = ( 1<<12 );
53 const size_type UNSYMM = ( 1<<13 );
54 const size_type DIV = ( 1<<14 );
55 const size_type CURL = ( 1<<15 );
56 const size_type MASS = ( 1<<20 );
57 const size_type STIFFNESS = ( 1<<21 );
58 
59 
60 typedef mpl::vector_c<size_type,
61  JACOBIAN, KB, KB2, FIRST_DERIVATIVE, GRAD, SECOND_DERIVATIVE, HESSIAN,
62  MEASURE, NORMAL, TANGENT, FIRST_DERIVATIVE_NORMAL, POINT,
63  SYMM, UNSYMM,
64  DIV,CURL,
65  MASS, STIFFNESS> contexts;
66 
67 template<size_type Context>
68 struct has_jacobian
69 {
70  static const bool value = has_value<Context, JACOBIAN>::value;
71 };
72 template<size_type Context>
73 struct has_kb
74 {
75  static const bool value = has_value<Context, KB>::value;
76 };
77 template<size_type Context>
78 struct has_kb2
79 {
80  static const bool value = has_value<Context, KB2>::value;
81 };
82 template<size_type Context>
83 struct has_first_derivative
84 {
85  static const bool value = has_value<Context, FIRST_DERIVATIVE>::value;
86 };
87 template<size_type Context>
88 struct has_grad
89 {
90  static const bool value = has_value<Context, GRAD>::value;
91 };
92 template<size_type Context>
93 struct has_second_derivative
94 {
95  static const bool value = has_value<Context, SECOND_DERIVATIVE>::value;
96 };
97 template<size_type Context>
98 struct has_hessian
99 {
100  static const bool value = has_value<Context, HESSIAN>::value;
101 };
102 template<size_type Context>
103 struct has_normal
104 {
105  static const bool value = has_value<Context, NORMAL>::value;
106 };
107 template<size_type Context>
108 struct has_tangent
109 {
110  static const bool value = has_value<Context, TANGENT>::value;
111 };
112 
113 template<size_type Context>
114 struct has_first_derivative_normal
115 {
116  static const bool value = has_value<Context, FIRST_DERIVATIVE_NORMAL>::value;
117 };
118 
119 template<size_type Context>
120 struct has_point
121 {
122  static const bool value = has_value<Context, POINT>::value;
123 };
124 template<size_type Context>
125 struct has_symm
126 {
127  static const bool value = has_value<Context, SYMM>::value;
128 };
129 template<size_type Context>
130 struct has_unsymm
131 {
132  static const bool value = has_value<Context, UNSYMM>::value;
133 };
134 template<size_type Context>
135 struct has_div
136 {
137  static const bool value = has_value<Context, DIV>::value;
138 };
139 template<size_type Context>
140 struct has_curl
141 {
142  static const bool value = has_value<Context, CURL>::value;
143 };
144 
145 template<size_type Context>
146 struct has_mass
147 {
148  static const bool value = has_value<Context, MASS>::value;
149 };
150 template<size_type Context>
151 struct has_stifness
152 {
153  static const bool value = has_value<Context, STIFFNESS>::value;
154 };
155 
156 } // vm
157 } // Feel
158 #endif /* __FEM_Context_HPP */

Generated on Fri Oct 25 2013 14:24:05 for Feel++ by doxygen 1.8.4