29 #ifndef FUNCTION_DATA_INCLUDED
30 #define FUNCTION_DATA_INCLUDED
32 #define BOUNDARY_CONDITIONS 1
35 #include "PPolynomial.h"
37 template<
int Degree,
class Real>
41 #if BOUNDARY_CONDITIONS
43 #endif // BOUNDARY_CONDITIONS
45 const static int DOT_FLAG = 1;
46 const static int D_DOT_FLAG = 2;
47 const static int D2_DOT_FLAG = 4;
48 const static int VALUE_FLAG = 1;
49 const static int D_VALUE_FLAG = 2;
51 int depth , res , res2;
52 Real *dotTable , *dDotTable , *d2DotTable;
53 Real *valueTables , *dValueTables;
54 #if BOUNDARY_CONDITIONS
56 PPolynomial<Degree-1> dBaseFunction , dLeftBaseFunction , dRightBaseFunction;
57 #else // !BOUNDARY_CONDITIONS
60 #endif // BOUNDARY_CONDITIONS
66 virtual void setDotTables(
const int& flags);
67 virtual void clearDotTables(
const int& flags);
69 virtual void setValueTables(
const int& flags,
const double& smooth=0);
70 virtual void setValueTables(
const int& flags,
const double& valueSmooth,
const double& normalSmooth);
71 virtual void clearValueTables(
void);
87 #if BOUNDARY_CONDITIONS
88 void set(
const int& maxDepth ,
const PPolynomial<Degree>& F ,
const int& normalize ,
bool useDotRatios=
true ,
bool reflectBoundary=
false );
89 #else // !BOUNDARY_CONDITIONS
90 void set(
const int& maxDepth,
const PPolynomial<Degree>& F,
const int& normalize ,
bool useDotRatios=
true );
91 #endif // BOUNDARY_CONDITIONS
93 #if BOUNDARY_CONDITIONS
94 Real dotProduct(
const double& center1 ,
const double& width1 ,
const double& center2 ,
const double& width2 ,
int boundary1 ,
int boundary2 )
const;
95 Real dDotProduct(
const double& center1 ,
const double& width1 ,
const double& center2 ,
const double& width2 ,
int boundary1 ,
int boundary2 )
const;
96 Real d2DotProduct(
const double& center1 ,
const double& width1 ,
const double& center2 ,
const double& width2 ,
int boundary1 ,
int boundary2 )
const;
97 #else // !BOUNDARY_CONDITIONS
98 Real dotProduct(
const double& center1 ,
const double& width1 ,
const double& center2 ,
const double& width2 )
const;
99 Real dDotProduct(
const double& center1 ,
const double& width1 ,
const double& center2 ,
const double& width2 )
const;
100 Real d2DotProduct(
const double& center1 ,
const double& width1 ,
const double& center2 ,
const double& width2 )
const;
101 #endif // BOUNDARY_CONDITIONS
103 static inline int SymmetricIndex(
const int& i1 ,
const int& i2 );
104 static inline int SymmetricIndex(
const int& i1 ,
const int& i2 ,
int& index );
108 #include "FunctionData.inl"
109 #endif // FUNCTION_DATA_INCLUDED