00001 #ifndef VIENNAFEM_FORWARDS_H
00002 #define VIENNAFEM_FORWARDS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00029 #include "viennadata/api.hpp"
00030 #include "viennagrid/forwards.h"
00031 #include "viennamath/forwards.h"
00032
00038 namespace viennafem
00039 {
00040
00046 typedef double numeric_type;
00047
00048
00053 template <long id>
00054 struct mapping_key_type {};
00055
00056
00057 struct none;
00058
00059
00060
00061
00062
00063
00064
00065 template <typename ElementType, unsigned long order, typename InterfaceType = viennamath::default_interface_type>
00066 struct rt_gauss_quad_element;
00067
00068
00069 template <typename ElementType, unsigned long order, typename InterfaceType = viennamath::default_interface_type>
00070 struct rt_strang_quad_element;
00071
00072
00073
00074 template <typename ElementType, unsigned long order, typename InterfaceType = viennamath::default_interface_type>
00075 struct rt_keast_quad_element;
00076
00077
00078
00079
00080
00081
00085 struct unit_interval {};
00086
00088 struct symmetric_interval {};
00089
00090
00091
00096 struct unit_triangle {};
00097
00102 struct symmetric_triangle {};
00103
00104
00109 struct unit_square {};
00110
00115 struct symmetric_square {};
00116
00117
00118
00123 struct unit_tetrahedron {};
00124
00129 struct symmetric_tetrahedron {};
00130
00131
00136 struct unit_cube {};
00137
00142 struct symmetric_cube {};
00143
00144
00145
00146
00147
00148
00153 template <std::size_t order>
00154 struct lagrange_tag {};
00155
00157 template <typename T>
00158 struct space_to_id {};
00159
00161 template <std::size_t order>
00162 struct space_to_id< lagrange_tag<order> >
00163 {
00164 enum { value = order };
00165 };
00166
00167
00169 template <typename Cell, typename T>
00170 struct reference_cell_for_basis {};
00171
00173 template <std::size_t order>
00174 struct reference_cell_for_basis < viennagrid::line_tag, lagrange_tag<order> >
00175 {
00176 typedef unit_interval type;
00177 };
00178
00180 template <std::size_t order>
00181 struct reference_cell_for_basis < viennagrid::triangle_tag, lagrange_tag<order> >
00182 {
00183 typedef unit_triangle type;
00184 };
00185
00187 template <std::size_t order>
00188 struct reference_cell_for_basis < viennagrid::quadrilateral_tag, lagrange_tag<order> >
00189 {
00190 typedef unit_square type;
00191 };
00192
00193
00195 template <std::size_t order>
00196 struct reference_cell_for_basis < viennagrid::tetrahedron_tag, lagrange_tag<order> >
00197 {
00198 typedef unit_tetrahedron type;
00199 };
00200
00202 template <std::size_t order>
00203 struct reference_cell_for_basis < viennagrid::hexahedron_tag, lagrange_tag<order> >
00204 {
00205 typedef unit_cube type;
00206 };
00207
00208
00209
00210
00219 template <typename InterfaceType,
00220 typename BasisTag,
00221 typename ReferenceCell,
00222 std::size_t TopologyDim,
00223 std::size_t ElementID>
00224 struct local_basis
00225 {
00226 typedef typename BasisTag::ERROR_BASIS_NOT_DEFINED_FOR_THE_PROVIDED_PARAMETER_SET error_type;
00227 };
00228
00229
00230
00232 template <unsigned long local_index,
00233 unsigned long global_index>
00234 struct dt_dx_key {};
00235
00237 template <unsigned long local_index,
00238 unsigned long global_index>
00239 std::ostream & operator<<(std::ostream & stream,
00240 dt_dx_key<local_index, global_index> const & dummy)
00241 {
00242 stream << "dt_dx_key<" << local_index << "," << global_index << ">";
00243 return stream;
00244 }
00245
00246
00248 struct det_dF_dt_key {};
00249
00251 inline std::ostream & operator<<(std::ostream & stream, det_dF_dt_key const & dummy)
00252 {
00253 stream << "det_dF_dt_key";
00254 return stream;
00255 }
00256
00258 template <typename CellTag>
00259 struct dt_dx_handler;
00260
00261
00263 class boundary_key
00264 {
00265 public:
00266 boundary_key(long id) : id_(id) {}
00267
00268 bool operator<(boundary_key const & other) const { return id_ < other.id_; }
00269
00270 private:
00271 long id_;
00272 };
00273
00274
00276 class mapping_key
00277 {
00278 public:
00279 mapping_key(long id) : id_(id) {}
00280
00281 bool operator<(mapping_key const & other) const { return id_ < other.id_; }
00282
00283 private:
00284 long id_;
00285 };
00286
00288 namespace detail {}
00289
00291 namespace io {}
00292
00293 }
00294
00295
00296
00297
00299 namespace viennadata
00300 {
00302 namespace config
00303 {
00305 template <unsigned long local_index,
00306 unsigned long global_index>
00307 struct key_dispatch<viennafem::dt_dx_key<local_index,
00308 global_index>
00309 >
00310 {
00311 typedef type_key_dispatch_tag tag;
00312 };
00313
00315 template <>
00316 struct key_dispatch<viennafem::det_dF_dt_key>
00317 {
00318 typedef type_key_dispatch_tag tag;
00319 };
00320
00321
00323
00325 template <typename ConfigType>
00326 struct object_identifier<viennagrid::element_t<ConfigType, viennagrid::point_tag> >
00327 {
00328 typedef object_provided_id tag;
00329 typedef std::size_t id_type;
00330
00331 static id_type get(viennagrid::element_t<ConfigType, viennagrid::point_tag> const & obj) { return obj.id(); }
00332 };
00333
00335 template <typename ConfigType>
00336 struct object_identifier<viennagrid::element_t<ConfigType, viennagrid::line_tag> >
00337 {
00338 typedef object_provided_id tag;
00339 typedef std::size_t id_type;
00340
00341 static id_type get(viennagrid::element_t<ConfigType, viennagrid::line_tag> const & obj) { return obj.id(); }
00342 };
00343
00344
00346 template <typename ConfigType>
00347 struct object_identifier<viennagrid::element_t<ConfigType, viennagrid::triangle_tag> >
00348 {
00349 typedef object_provided_id tag;
00350 typedef std::size_t id_type;
00351
00352 static id_type get(viennagrid::element_t<ConfigType, viennagrid::triangle_tag> const & obj) { return obj.id(); }
00353 };
00354
00356 template <typename ConfigType>
00357 struct object_identifier<viennagrid::element_t<ConfigType, viennagrid::quadrilateral_tag> >
00358 {
00359 typedef object_provided_id tag;
00360 typedef std::size_t id_type;
00361
00362 static id_type get(viennagrid::element_t<ConfigType, viennagrid::quadrilateral_tag> const & obj) { return obj.id(); }
00363 };
00364
00365
00367 template <typename ConfigType>
00368 struct object_identifier<viennagrid::element_t<ConfigType, viennagrid::hexahedron_tag> >
00369 {
00370 typedef object_provided_id tag;
00371 typedef std::size_t id_type;
00372
00373 static id_type get(viennagrid::element_t<ConfigType, viennagrid::hexahedron_tag> const & obj) { return obj.id(); }
00374 };
00375
00377 template <typename ConfigType>
00378 struct object_identifier<viennagrid::element_t<ConfigType, viennagrid::tetrahedron_tag> >
00379 {
00380 typedef object_provided_id tag;
00381 typedef std::size_t id_type;
00382
00383 static id_type get(viennagrid::element_t<ConfigType, viennagrid::tetrahedron_tag> const & obj) { return obj.id(); }
00384 };
00385
00386
00388
00389
00391 template <typename KeyType, typename ValueType, typename ConfigType>
00392 struct storage<KeyType, ValueType, viennagrid::element_t<ConfigType, viennagrid::point_tag> >
00393 {
00394 typedef dense_data_tag tag;
00395 };
00396
00398 template <typename KeyType, typename ValueType, typename ConfigType>
00399 struct storage<KeyType, ValueType, viennagrid::element_t<ConfigType, viennagrid::line_tag> >
00400 {
00401 typedef dense_data_tag tag;
00402 };
00403
00405 template <typename KeyType, typename ValueType, typename ConfigType>
00406 struct storage<KeyType, ValueType, viennagrid::element_t<ConfigType, viennagrid::quadrilateral_tag> >
00407 {
00408 typedef dense_data_tag tag;
00409 };
00410
00412 template <typename KeyType, typename ValueType, typename ConfigType>
00413 struct storage<KeyType, ValueType, viennagrid::element_t<ConfigType, viennagrid::triangle_tag> >
00414 {
00415 typedef dense_data_tag tag;
00416 };
00417
00419 template <typename KeyType, typename ValueType, typename ConfigType>
00420 struct storage<KeyType, ValueType, viennagrid::element_t<ConfigType, viennagrid::hexahedron_tag> >
00421 {
00422 typedef dense_data_tag tag;
00423 };
00424
00426 template <typename KeyType, typename ValueType, typename ConfigType>
00427 struct storage<KeyType, ValueType, viennagrid::element_t<ConfigType, viennagrid::tetrahedron_tag> >
00428 {
00429 typedef dense_data_tag tag;
00430 };
00431
00432 }
00433 }
00434
00435
00436 #endif