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