include/deal.II/base/polynomials_abf.h

00001 //---------------------------------------------------------------------------
00002 //    @f$Id: polynomials_abf.h 25345 2012-03-31 08:37:04Z bangerth @f$
00003 //
00004 //    Copyright (C) 2004, 2005, 2006, 2010, 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__polynomials_abf_h
00013 #define __deal2__polynomials_abf_h
00014 
00015 
00016 #include <deal.II/base/config.h>
00017 #include <deal.II/base/exceptions.h>
00018 #include <deal.II/base/tensor.h>
00019 #include <deal.II/base/point.h>
00020 #include <deal.II/base/polynomial.h>
00021 #include <deal.II/base/polynomial_space.h>
00022 #include <deal.II/base/tensor_product_polynomials.h>
00023 #include <deal.II/base/table.h>
00024 #include <deal.II/base/thread_management.h>
00025 
00026 #include <vector>
00027 
00028 DEAL_II_NAMESPACE_OPEN
00029 
00050 template <int dim>
00051 class PolynomialsABF
00052 {
00053   public:
00065     PolynomialsABF (const unsigned int k);
00066 
00070     ~PolynomialsABF ();
00071 
00096     void compute (const Point<dim>            &unit_point,
00097                   std::vector<Tensor<1,dim> > &values,
00098                   std::vector<Tensor<2,dim> > &grads,
00099                   std::vector<Tensor<3,dim> > &grad_grads) const;
00100 
00104     unsigned int n () const;
00105 
00111     unsigned int degree () const;
00112 
00117     std::string name () const;
00118 
00128     static unsigned int compute_n_pols(unsigned int degree);
00129 
00130   private:
00135     const unsigned int my_degree;
00136 
00144     AnisotropicPolynomials<dim>* polynomial_space;
00145 
00150     unsigned int n_pols;
00151 
00156     mutable Threads::Mutex mutex;
00157 
00161     mutable std::vector<double> p_values;
00162 
00166     mutable std::vector<Tensor<1,dim> > p_grads;
00167 
00171     mutable std::vector<Tensor<2,dim> > p_grad_grads;
00172 };
00173 
00174 
00175 template <int dim>
00176 inline unsigned int
00177 PolynomialsABF<dim>::n() const
00178 {
00179   return n_pols;
00180 }
00181 
00182 
00183 template <int dim>
00184 inline unsigned int
00185 PolynomialsABF<dim>::degree() const
00186 {
00187   return my_degree;
00188 }
00189 
00190 
00191 template <int dim>
00192 inline std::string
00193 PolynomialsABF<dim>::name() const
00194 {
00195   return "ABF";
00196 }
00197 
00198 
00199 DEAL_II_NAMESPACE_CLOSE
00200 
00201 #endif
00202 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Wed May 23 2012 06:07:31 by doxygen 1.7.3