include/deal.II/fe/fe_update_flags.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: fe_update_flags.h 25517 2012-05-18 13:15:47Z bangerth @f$
00003 //
00004 //    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012 by the deal.II authors
00005 //
00006 //    This file is subject to QPL and may not be  distributed
00007 //    without copyright and license information. Please refer
00008 //    to the file deal.II/doc/license.html for the  text  and
00009 //    further information on this license.
00010 //
00011 //---------------------------------------------------------------------------
00012 #ifndef __deal2__fe_update_flags_h
00013 #define __deal2__fe_update_flags_h
00014 
00015 
00016 #include <deal.II/base/config.h>
00017 
00018 DEAL_II_NAMESPACE_OPEN
00019 
00022 
00078 enum UpdateFlags
00079 {
00081       update_default                      = 0,
00083 
00098       update_values                       = 0x0001,
00100 
00106       update_gradients                    = 0x0002,
00108 
00114       update_hessians                     = 0x0004,
00116 
00125       update_boundary_forms               = 0x0008,
00127 
00132       update_quadrature_points            = 0x0010,
00134 
00144       update_JxW_values                   = 0x0020,
00146 
00154       update_normal_vectors               = 0x0040,
00158       update_face_normal_vectors          = update_normal_vectors,
00162       update_cell_normal_vectors          = update_normal_vectors,
00164 
00170       update_jacobians                    = 0x0080,
00172 
00177       update_jacobian_grads               = 0x0100,
00179 
00186       update_inverse_jacobians            = 0x0200,
00188 
00198       update_covariant_transformation     = 0x0400,
00200 
00210       update_contravariant_transformation = 0x0800,
00212 
00217       update_transformation_values        = 0x1000,
00219 
00225       update_transformation_gradients     = 0x2000,
00227 
00231       update_volume_elements              = 0x4000,
00237       update_support_points               = 0x10000,
00243       update_support_jacobians            = 0x20000,
00249       update_support_inverse_jacobians    = 0x40000,
00254       update_q_points = update_quadrature_points,
00259       update_second_derivatives = update_hessians,
00261 
00266       update_piola = update_volume_elements | update_contravariant_transformation
00267 };
00268 
00269 
00275 template <class STREAM>
00276 inline
00277 STREAM& operator << (STREAM& s, UpdateFlags u)
00278 {
00279   s << " UpdateFlags|";
00280   if (u & update_values)                       s << "values|";
00281   if (u & update_gradients)                    s << "gradients|";
00282   if (u & update_hessians)                     s << "hessians|";
00283   if (u & update_quadrature_points)            s << "quadrature_points|";
00284   if (u & update_JxW_values)                   s << "JxW_values|";
00285   if (u & update_normal_vectors)               s << "normal_vectors|";
00286   if (u & update_jacobians)                    s << "jacobians|";
00287   if (u & update_inverse_jacobians)            s << "inverse_jacobians|";
00288   if (u & update_jacobian_grads)               s << "jacobian_grads|";
00289   if (u & update_covariant_transformation)     s << "covariant_transformation|";
00290   if (u & update_contravariant_transformation) s << "contravariant_transformation|";
00291   if (u & update_transformation_values)        s << "transformation_values|";
00292   if (u & update_transformation_gradients)     s << "transformation_gradients|";
00293   if (u & update_support_points)               s << "support_points|";
00294   if (u & update_support_jacobians)            s << "support_jacobians|";
00295   if (u & update_support_inverse_jacobians)    s << "support_inverse_jacobians|";
00296 
00297 //TODO: check that 'u' really only has the flags set that are handled above
00298   return s;
00299 }
00300 
00301 
00312 inline
00313 UpdateFlags
00314 operator | (UpdateFlags f1, UpdateFlags f2)
00315 {
00316   return static_cast<UpdateFlags> (
00317     static_cast<unsigned int> (f1) |
00318     static_cast<unsigned int> (f2));
00319 }
00320 
00321 
00322 
00323 
00330 inline
00331 UpdateFlags &
00332 operator |= (UpdateFlags &f1, UpdateFlags f2)
00333 {
00334   f1 = f1 | f2;
00335   return f1;
00336 }
00337 
00338 
00349 inline
00350 UpdateFlags
00351 operator & (UpdateFlags f1, UpdateFlags f2)
00352 {
00353   return static_cast<UpdateFlags> (
00354     static_cast<unsigned int> (f1) &
00355     static_cast<unsigned int> (f2));
00356 }
00357 
00358 
00365 inline
00366 UpdateFlags &
00367 operator &= (UpdateFlags &f1, UpdateFlags f2)
00368 {
00369   f1 = f1 & f2;
00370   return f1;
00371 }
00372 
00373 
00374 
00385 namespace CellSimilarity
00386 {
00387   enum Similarity
00388     {
00389       none,
00390       translation,
00391       inverted_translation,
00392       invalid_next_cell
00393     };
00394 }
00395 
00396 
00401 DEAL_II_NAMESPACE_CLOSE
00402 
00403 #endif
00404 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Tue May 22 2012 12:06:08 by doxygen 1.7.3