include/deal.II/numerics/data_out_faces.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: data_out_faces.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 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__data_out_faces_h
00013 #define __deal2__data_out_faces_h
00014 
00015 
00016 #include <deal.II/base/config.h>
00017 #include <deal.II/numerics/data_out.h>
00018 
00019 #include <string>
00020 #include <vector>
00021 
00022 DEAL_II_NAMESPACE_OPEN
00023 
00024 
00025 namespace internal
00026 {
00027   namespace DataOutFaces
00028   {
00038     template <int dim, int spacedim>
00039     struct ParallelData : public internal::DataOut::ParallelDataBase<dim,spacedim>
00040     {
00041         template <class FE>
00042         ParallelData (const Quadrature<dim-1> &quadrature,
00043                       const unsigned int n_components,
00044                       const unsigned int n_datasets,
00045                       const unsigned int n_subdivisions,
00046                       const std::vector<unsigned int> &n_postprocessor_outputs,
00047                       const Mapping<dim,spacedim> &mapping,
00048                       const FE &finite_elements,
00049                       const UpdateFlags update_flags);
00050 
00051         const ::hp::QCollection<dim-1> q_collection;
00052         const ::hp::MappingCollection<dim,spacedim> mapping_collection;
00053         ::hp::FEFaceValues<dim> x_fe_values;
00054 
00055         std::vector<Point<dim> > patch_normals;
00056         std::vector<Point<spacedim> > patch_evaluation_points;
00057     };
00058   }
00059 }
00060 
00061 
00118 template <int dim, class DH=DoFHandler<dim> >
00119 class DataOutFaces : public DataOut_DoFData<DH,DH::dimension-1,
00120                                             DH::dimension>
00121 {
00122   public:
00128     typedef typename DataOut_DoFData<DH,DH::dimension-1,
00129                                      DH::dimension>::cell_iterator cell_iterator;
00130 
00137     DataOutFaces (const bool surface_only = true);
00138 
00157     virtual void
00158     build_patches (const unsigned int n_subdivisions = 0);
00159 
00201     virtual void build_patches (const Mapping<DH::dimension> &mapping,
00202                                 const unsigned int n_subdivisions = 0);
00203 
00220     typedef typename std::pair<cell_iterator,unsigned int> FaceDescriptor;
00221 
00222 
00235     virtual FaceDescriptor first_face ();
00236 
00270     virtual FaceDescriptor next_face (const FaceDescriptor &face);
00271 
00275     DeclException1 (ExcInvalidNumberOfSubdivisions,
00276                     int,
00277                     << "The number of subdivisions per patch, " << arg1
00278                     << ", is not valid.");
00279 
00283     DeclException0 (ExcCellNotActiveForCellData);
00284 
00285   private:
00291     const bool surface_only;
00292 
00298     void build_one_patch (const FaceDescriptor *cell_and_face,
00299                           internal::DataOutFaces::ParallelData<DH::dimension, DH::dimension> &data,
00300                           DataOutBase::Patch<DH::dimension-1,DH::space_dimension> &patch);
00301 };
00302 
00303 
00304 DEAL_II_NAMESPACE_CLOSE
00305 
00306 #endif
00307 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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