00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
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 
00043 
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 } 
00136 
00137 
00138 #endif