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 #ifndef __INTERPKERNELGAUSS_HXX__
00021 #define __INTERPKERNELGAUSS_HXX__
00022
00023 #include "NormalizedUnstructuredMesh.hxx"
00024 #include "InterpKernelException.hxx"
00025
00026 #include <vector>
00027
00028 namespace INTERP_KERNEL
00029 {
00030 typedef std::vector<double> DataVector;
00031 typedef std::vector<int> IndexVector;
00032
00033
00034 class GaussInfo
00035 {
00036 public:
00037 GaussInfo( NormalizedCellType theGeometry,
00038 const DataVector& theGaussCoord,
00039 int theNbGauss,
00040 const DataVector& theReferenceCoord,
00041 int theNbRef
00042 );
00043 ~GaussInfo();
00044
00045 NormalizedCellType getCellType() const;
00046
00047 int getGaussCoordDim() const;
00048 int getReferenceCoordDim() const;
00049
00050 int getNbGauss() const;
00051 int getNbRef() const;
00052
00053 const double* getFunctionValues( const int theGaussId ) const;
00054
00055 void initLocalInfo() throw (INTERP_KERNEL::Exception);
00056
00057 protected:
00058
00059 bool isSatisfy();
00060
00061
00062 void seg2Init();
00063 void seg3Init();
00064
00065
00066 void tria3aInit();
00067 void tria3bInit();
00068 void tria6aInit();
00069 void tria6bInit();
00070
00071 void quad4aInit();
00072 void quad4bInit();
00073 void quad8aInit();
00074 void quad8bInit();
00075
00076
00077 void tetra4aInit();
00078 void tetra4bInit();
00079 void tetra10aInit();
00080 void tetra10bInit();
00081
00082 void pyra5aInit();
00083 void pyra5bInit();
00084 void pyra13aInit();
00085 void pyra13bInit();
00086
00087 void penta6aInit();
00088 void penta6bInit();
00089 void penta15aInit();
00090 void penta15bInit();
00091
00092 void hexa8aInit();
00093 void hexa8bInit();
00094 void hexa20aInit();
00095 void hexa20bInit();
00096
00097
00098 private:
00099
00100 NormalizedCellType _my_geometry;
00101
00102 int _my_nb_gauss;
00103 DataVector _my_gauss_coord;
00104
00105 int _my_nb_ref;
00106
00107
00108
00109
00110
00111 DataVector _my_reference_coord;
00112
00113
00114 DataVector _my_local_reference_coord;
00115 int _my_local_ref_dim;
00116
00117
00118
00119 int _my_local_nb_ref;
00120
00121 DataVector _my_function_value;
00122 };
00123
00124
00125
00126 class GaussCoords
00127 {
00128 public:
00129
00130 GaussCoords();
00131 ~GaussCoords();
00132
00133 void addGaussInfo( NormalizedCellType theGeometry,
00134 int coordDim,
00135 const double* theGaussCoord,
00136 int theNbGauss,
00137 const double* theReferenceCoord,
00138 int theNbRef) throw (INTERP_KERNEL::Exception);
00139
00140 double* calculateCoords( NormalizedCellType theGeometry,
00141 const double* theNodeCoords,
00142 const int theSpaceDim,
00143 const int* theIndex) throw(INTERP_KERNEL::Exception);
00144
00145 void calculateCoords( NormalizedCellType theGeometry,
00146 const double* theNodeCoords,
00147 const int theSpaceDim,
00148 const int* theIndex,
00149 double *result) throw(INTERP_KERNEL::Exception);
00150 private:
00151 const GaussInfo *getInfoGivenCellType(NormalizedCellType cellType);
00152 void calculateCoordsAlg(const GaussInfo *info, const double* theNodeCoords, const int theSpaceDim, const int *theIndex,
00153 double *result);
00154 private:
00155 typedef std::vector<GaussInfo*> GaussInfoVector;
00156 GaussInfoVector _my_gauss_info;
00157 };
00158 }
00159 #endif //INTERPKERNELGAUSS