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_BASISFAMILYBASE_H
00032 #define SUNDANCE_BASISFAMILYBASE_H
00033
00034 #include "SundanceCellJacobianBatch.hpp"
00035 #include "SundanceDefs.hpp"
00036 #include "SundanceBasisDOFTopologyBase.hpp"
00037 #include "SundanceTensorBasisBase.hpp"
00038 #include "SundanceBasisReferenceEvaluationBase.hpp"
00039 #include "PlayaHandleable.hpp"
00040 #include "SundanceMesh.hpp"
00041 #include "PlayaPrintable.hpp"
00042 #include "SundanceObjectWithVerbosity.hpp"
00043 #include "SundanceTypeUtils.hpp"
00044 #include "Teuchos_XMLObject.hpp"
00045
00046 namespace Sundance {
00047
00048 using namespace Teuchos;
00049
00050
00051
00052
00053
00054 class BasisFamilyBase
00055 : public Playa::Handleable<BasisFamilyBase>,
00056 public Playa::Printable,
00057 public ObjectWithClassVerbosity<BasisFamilyBase>,
00058 public BasisDOFTopologyBase,
00059 public TensorBasisBase,
00060 public BasisReferenceEvaluationBase
00061 {
00062 public:
00063
00064
00065 virtual int order() const = 0 ;
00066
00067
00068 virtual bool lessThan(const BasisDOFTopologyBase* other) const ;
00069
00070
00071
00072 virtual bool requiresBasisTransformation() const { return false; }
00073
00074 virtual void preApplyTransformation( const CellType &maxCellType ,
00075 const Mesh &mesh,
00076 const Array<int> &cellLIDs,
00077 const CellJacobianBatch& JVol,
00078 RCP<Array<double> >& A
00079 ) const {;}
00080
00081 virtual void postApplyTransformation( const CellType &maxCellType ,
00082 const Mesh &mesh,
00083 const Array<int> &cellLIDs,
00084 const CellJacobianBatch& JVol,
00085 RCP<Array<double> >& A
00086 ) const {;}
00087
00088 virtual void preApplyTransformationTranspose( const CellType &maxCellType ,
00089 const Mesh &mesh,
00090 const Array<int> &cellLIDs,
00091 const CellJacobianBatch& JVol,
00092 Array<double>& A ) const {;}
00093
00094 };
00095
00096
00097
00098
00099
00100
00101
00102
00103 class ScalarBasis
00104 : public BasisFamilyBase
00105 {
00106 public:
00107
00108 int tensorOrder() const {return 0;}
00109
00110
00111 bool isScalarBasis() const {return true;}
00112
00113
00114 int dim() const {return 1;}
00115 };
00116
00117
00118 class VectorBasis
00119 : public BasisFamilyBase
00120 {
00121 public:
00122
00123 VectorBasis(int dim) : dim_(dim) {}
00124
00125 int tensorOrder() const {return 1;}
00126
00127
00128 int dim() const {return dim_;}
00129
00130 private:
00131 int dim_;
00132 };
00133
00134
00135
00136
00137
00138 class HDivVectorBasis
00139 : public VectorBasis
00140 {
00141 public:
00142
00143 HDivVectorBasis(int dim) : VectorBasis(dim) {}
00144
00145
00146 bool isHDivBasis() const {return true;}
00147
00148 };
00149
00150
00151
00152
00153 class HCurlVectorBasis
00154 : public VectorBasis
00155 {
00156 public:
00157
00158 HCurlVectorBasis(int dim) : VectorBasis(dim) {}
00159
00160
00161 bool isHCurlBasis() const {return true;}
00162
00163 };
00164
00165
00166
00167
00168 }
00169
00170
00171 #endif