void EdgeArcCircle::tesselate(const int *conn, int offset, double eps, std::vector<int>& newConn, std::vector<double>& addCoo) const
{
newConn.push_back(INTERP_KERNEL::NORM_POLYL);
- int nbOfSubDiv=fabs(_angle)/eps;
+ int nbOfSubDiv=(int)(fabs(_angle)/eps);
if(nbOfSubDiv<=2)
{
newConn.push_back(conn[0]); newConn.push_back(conn[2]); newConn.push_back(conn[1]);
* It retrieves the same cell with a potentially different type (in return) whose connectivity is defined by (retConn,retLgth)
* \b WARNING for optimization reason the arrays 'retConn' and 'conn' can overlapped !
*/
-INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
- int *retConn, int& retLgth) throw(INTERP_KERNEL::Exception)
+INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, int *retConn, int& retLgth)
{
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
std::set<int> c(conn,conn+lgth);
class INTERPKERNEL_EXPORT CellSimplify
{
public:
- static INTERP_KERNEL::NormalizedCellType simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
- int *retConn, int& retLgth) throw(INTERP_KERNEL::Exception);
+ static INTERP_KERNEL::NormalizedCellType simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth, int *retConn, int& retLgth);
static int *getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
int& retNbOfFaces, int& retLgth);
static INTERP_KERNEL::NormalizedCellType tryToUnPoly2D(bool isQuad, const int *conn, int lgth, int *retConn, int& retLgth);
int fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const char *method) { return fromToIntegralUniform(false,meshT,result,method); }
template<class MyMeshType, class MatrixType>
int toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const char *method) { return fromToIntegralUniform(true,meshS,result,method); }
- static void CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth);
template<class MyMeshType>
static double CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel);
protected:
return ret;
}
- template<class TrueMainInterpolator>
- void Interpolation<TrueMainInterpolator>::CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth)
- {
- const int NB_OF_METH_MANAGED=4;
- const char *METH_MANAGED[NB_OF_METH_MANAGED]={"P0P0","P0P1","P1P0","P1P1"};
- std::string methodC(method);
- bool found=false;
- for(int i=0;i<NB_OF_METH_MANAGED && !found;i++)
- found=(methodC==METH_MANAGED[i]);
- if(!found)
- {
- std::string msg("The interpolation method : \'"); msg+=method; msg+="\' not managed by INTERP_KERNEL interpolators ! Supported are \"P0P0\", \"P0P1\", \"P1P0\" and \"P1P1\".";
- throw INTERP_KERNEL::Exception(msg.c_str());
- }
- srcMeth=methodC.substr(0,2);
- trgMeth=methodC.substr(2);
- }
-
template<class TrueMainInterpolator>
template<class MyMeshType>
double Interpolation<TrueMainInterpolator>::CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel)
// Author : Anthony Geay (CEA/DEN)
#include "InterpolationOptions.hxx"
+#include "InterpKernelException.hxx"
#include <sstream>
oss << "****************************" << std::endl;
return oss.str();
}
+
+void INTERP_KERNEL::InterpolationOptions::CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth)
+{
+ const int NB_OF_METH_MANAGED=4;
+ const char *METH_MANAGED[NB_OF_METH_MANAGED]={"P0P0","P0P1","P1P0","P1P1"};
+ std::string methodC(method);
+ bool found=false;
+ for(int i=0;i<NB_OF_METH_MANAGED && !found;i++)
+ found=(methodC==METH_MANAGED[i]);
+ if(!found)
+ {
+ std::string msg("The interpolation method : \'"); msg+=method; msg+="\' not managed by INTERP_KERNEL interpolators ! Supported are \"P0P0\", \"P0P1\", \"P1P0\" and \"P1P1\".";
+ throw INTERP_KERNEL::Exception(msg.c_str());
+ }
+ srcMeth=methodC.substr(0,2);
+ trgMeth=methodC.substr(2);
+}
bool setOptionInt(const std::string& key, int value);
bool setOptionString(const std::string& key, const std::string& value);
std::string printOptions() const;
+ public:
+ static void CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth);
private:
static const double DFT_MEDIAN_PLANE;
static const double DFT_SURF3D_ADJ_EPS;