SundanceVectorBasisComponent.hpp
Go to the documentation of this file.
00001 /* @HEADER@ */
00002 // ************************************************************************
00003 // 
00004 //                              Sundance
00005 //                 Copyright (2005) Sandia Corporation
00006 // 
00007 // Copyright (year first published) Sandia Corporation.  Under the terms 
00008 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government 
00009 // retains certain rights in this software.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //                                                                                 
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA                                                                                
00025 // Questions? Contact Kevin Long (krlong@sandia.gov), 
00026 // Sandia National Laboratories, Livermore, California, USA
00027 // 
00028 // ************************************************************************
00029 /* @HEADER@ */
00030 
00031 #ifndef SUNDANCE_VECTORBASISCOMPONENT_H
00032 #define SUNDANCE_VECTORBASISCOMPONENT_H
00033 
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceBasisFamily.hpp"
00036 
00037 namespace Sundance {
00038 
00039 using namespace Teuchos;
00040 
00041 /** 
00042  * This class is for the representation of a single component
00043  * of a vector-valued basis family. 
00044  */
00045 class VectorBasisComponent : public BasisFamilyBase
00046 {
00047 public:
00048   /** */
00049   VectorBasisComponent(const BasisFamily& master, int direction);
00050 
00051   /** */
00052   bool lessThan(const BasisFamilyBase* other) const ;
00053 
00054   /** */
00055   int order() const {return master_.order();}
00056 
00057   /** */
00058   int dim() const 
00059     {return master_.dim();}
00060 
00061   /** */
00062   bool isCovariantBasis() const 
00063     {return master_.isCovariantBasis();}
00064 
00065   /** */
00066   bool isContravariantBasis() const 
00067     {return master_.isContravariantBasis();}
00068 
00069   /** */
00070   int direction() const {return direction_;}
00071 
00072   /** */
00073   bool supportsCellTypePair(
00074     const CellType& maximalCellType,
00075     const CellType& cellType
00076     ) const
00077     {
00078       return master_.ptr()->supportsCellTypePair(maximalCellType, 
00079         cellType);
00080     }
00081 
00082 
00083   /** */
00084   void getReferenceDOFs(
00085     const CellType& maximalCellType,
00086     const CellType& cellType,
00087     Array<Array<Array<int> > >& dofs
00088     ) const 
00089     {
00090       master_.ptr()->getReferenceDOFs(maximalCellType, 
00091         cellType, dofs);
00092     }
00093 
00094 
00095   /** */
00096   int nReferenceDOFsWithFacets(
00097     const CellType& maximalCellType,
00098     const CellType& cellType
00099     ) const
00100     {
00101       return master_.ptr()->nReferenceDOFsWithFacets(maximalCellType, 
00102         cellType);
00103     }
00104 
00105   /** */
00106   int nReferenceDOFsWithoutFacets(
00107     const CellType& maximalCellType,
00108     const CellType& cellType
00109     ) const
00110     {
00111       return master_.ptr()->nReferenceDOFsWithoutFacets(maximalCellType, 
00112         cellType);
00113     }
00114 
00115   /** */
00116   void refEval(
00117     const CellType& maximalCellType,
00118     const CellType& cellType,
00119     const Array<Point>& pts,
00120     const MultiIndex& deriv,
00121     Array<Array<Array<double> > >& result
00122     ) const
00123     {
00124       master_.ptr()->refEval(maximalCellType, cellType,
00125         pts, deriv, result);
00126     }
00127 
00128 
00129 private:
00130   BasisFamily master_;
00131   int direction_;
00132 };
00133 
00134 
00135 } // namespace Sundance
00136 
00137 
00138 #endif

Site Contact