else
{//polyedron
const int *where=nodalConn;
- for(int i=0;i<sonId;i++)
+ for(unsigned int i=0;i<sonId;i++)
{
where=std::find(where,nodalConn+lgth,-1);
where++;
/*!
* This class descibes all static elements (different from polygons and polyhedron) 3D, 2D and 1D.
*/
- class INTERPKERNEL_EXPORT CellModel
+ class CellModel
{
public:
static const unsigned MAX_NB_OF_SONS=6;
CellModel(NormalizedCellType type);
static void buildUniqueInstance();
public:
- static const CellModel& getCellModel(NormalizedCellType type);
- bool isDynamic() const { return _dyn; }
- bool isQuadratic() const { return _quadratic; }
- unsigned getDimension() const { return _dim; }
- bool isCompatibleWith(NormalizedCellType type) const;
+ INTERPKERNEL_EXPORT static const CellModel& getCellModel(NormalizedCellType type);
+ INTERPKERNEL_EXPORT bool isDynamic() const { return _dyn; }
+ INTERPKERNEL_EXPORT bool isQuadratic() const { return _quadratic; }
+ INTERPKERNEL_EXPORT unsigned getDimension() const { return _dim; }
+ INTERPKERNEL_EXPORT bool isCompatibleWith(NormalizedCellType type) const;
//! sonId is in C format.
- const unsigned *getNodesConstituentTheSon(unsigned sonId) const { return _sons_con[sonId]; }
- unsigned getNumberOfNodes() const { return _nb_of_pts; }
- unsigned getNumberOfSons() const { return _nb_of_sons; }
- unsigned getNumberOfSons2(const int *conn, int lgth) const;
- unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; }
- unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const;
- NormalizedCellType getExtrudedType() const { return _extruded_type; }
- NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; }
- NormalizedCellType getSonType2(unsigned sonId) const;
- unsigned fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const;
- unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const;
+ INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheSon(unsigned sonId) const { return _sons_con[sonId]; }
+ INTERPKERNEL_EXPORT unsigned getNumberOfNodes() const { return _nb_of_pts; }
+ INTERPKERNEL_EXPORT unsigned getNumberOfSons() const { return _nb_of_sons; }
+ INTERPKERNEL_EXPORT unsigned getNumberOfSons2(const int *conn, int lgth) const;
+ INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; }
+ INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const int *nodalConn, int lgth) const;
+ INTERPKERNEL_EXPORT NormalizedCellType getExtrudedType() const { return _extruded_type; }
+ INTERPKERNEL_EXPORT NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; }
+ INTERPKERNEL_EXPORT NormalizedCellType getSonType2(unsigned sonId) const;
+ INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity(int sonId, const int *nodalConn, int *sonNodalConn) const;
+ INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2(int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType& typeOfSon) const;
private:
bool _dyn;
bool _quadratic;
// loop on unstructured tgt cells
- for(int iT=0; iT<tgtu_nb_cells; iT++)
+ for(unsigned int iT=0; iT<tgtu_nb_cells; iT++)
{
result[ iT ].clear();
int min_i = coo_ind->second;
std::vector< std::vector< CConnType > > newStructIndices;
- for ( int iInd = 0; iInd < structIndices.size(); ++iInd )
+ for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd )
{
for ( int i = min_i; i < max_i; ++i )
{
// perform intersection
- for ( int iInd = 0; iInd < structIndices.size(); ++iInd )
+ for ( unsigned int iInd = 0; iInd < structIndices.size(); ++iInd )
intersector->intersectCells( iT, structIndices[iInd], result );
}
delete intersector;
}
else if(key==DO_ROTATE_STR)
{
- setDoRotate(value);
+ setDoRotate(value != 0);
return true;
}
else if(key==ORIENTATION_STR)
// intersect a cartesian 3d cell with tetra
_uHexMesh->setHexa( _FMIC(icellS[0]),_FMIC(icellS[1]),_FMIC(icellS[2])); // set cell at i,j,k
double res = 0;
- for ( int t = 0; t < tetra.size(); ++t )
+ for ( unsigned int t = 0; t < tetra.size(); ++t )
{
res += tetra[t]->intersectSourceCell( 0 );
delete tetra[t];
std::vector<ConnType> candidates;
_tree->getElementsAroundPoint(x,candidates);
std::list<ConnType> retlist;
- for(int i=0; i< candidates.size(); i++)
+ for(unsigned int i=0; i< candidates.size(); i++)
{
int ielem=candidates[i];
if (elementContainsPoint(ielem,x,eps))
{
// free potential sub-mesh nodes that have been allocated
typename MyMeshTypeT::MyConnType nbOfNodesT = _node_ids.size();// Issue 0020634.
- if(_nodes.size()>=/*8*/nbOfNodesT)
+ if((int)_nodes.size()>=/*8*/nbOfNodesT)
{
std::vector<const double*>::iterator iter = _nodes.begin() + /*8*/nbOfNodesT;
while(iter != _nodes.end())
* If OPTIMIZE is defined, a large number of methods will be prefixed with inline and some optimizations concerning the tests
* with zero double products will be used.
*/
- class INTERPKERNEL_EXPORT TransformedTriangle
+ class TransformedTriangle
{
/// NB : order corresponds to TetraEdges (Grandy, table III)
enum DoubleProduct { C_YZ = 0, C_ZX, C_XY, C_ZH, C_XH, C_YH, C_01, C_10, NO_DP };
- TransformedTriangle(double* p, double* q, double* r);
- ~TransformedTriangle();
+ INTERPKERNEL_EXPORT TransformedTriangle(double* p, double* q, double* r);
+ INTERPKERNEL_EXPORT ~TransformedTriangle();
- double calculateIntersectionVolume();
+ INTERPKERNEL_EXPORT double calculateIntersectionVolume();
- void dumpCoords() const;
+ INTERPKERNEL_EXPORT void dumpCoords() const;
// Queries of member values used by UnitTetraIntersectionBary
- const double* getCorner(TriCorner corner) const { return _coords + 5*corner; }
+ INTERPKERNEL_EXPORT const double* getCorner(TriCorner corner) const { return _coords + 5*corner; }
- const std::vector<double*>& getPolygonA() const { return _polygonA; }
+ INTERPKERNEL_EXPORT const std::vector<double*>& getPolygonA() const { return _polygonA; }
- double getVolume() const { return _volume; }
+ INTERPKERNEL_EXPORT double getVolume() const { return _volume; }
protected:
for ( int j = 0; j < 3 && !sideAdded[j]; ++j )
{
if ( epsilonEqual( coordSum[j], 0.0 ))
- sideAdded[j] = bool( ++nbAddedSides );
+ sideAdded[j] = ++nbAddedSides != 0 ;
}
if ( !sideAdded[3] &&
( epsilonEqual( (coordSum[0]+coordSum[1]+coordSum[2]) / polygon.size(), 1. )))
- sideAdded[3] = bool( ++nbAddedSides );
+ sideAdded[3] = ++nbAddedSides != 0 ;
}
if ( nbAddedSides == NB_TETRA_SIDES )
return nbAddedSides;
// at least 3 segments - all corners of a side are cut off
for (int cutIndex = 0; cutIndex < NB_TETRA_NODES; ++cutIndex )
if ( cutIndex != i+1 && !passedCorners[ cutIndex ] && !cutOffCorners[ cutIndex ])
- cutOffCorners[ cutIndex ] = bool ( ++nbCutOffCorners );
+ cutOffCorners[ cutIndex ] = ++nbCutOffCorners != 0 ;
}
}
{
for (int cutIndex = 1; cutIndex < NB_TETRA_NODES; ++cutIndex )
if ( !passedCorners[ cutIndex ] && !cutOffCorners[ cutIndex ])
- cutOffCorners[ cutIndex ] = bool ( ++nbCutOffCorners );
+ cutOffCorners[ cutIndex ] = ++nbCutOffCorners != 0 ;
}
// Add to faces on tetra sides the corners not cut off by segments of intersection polygons
namespace INTERP_KERNEL
{
- class INTERPKERNEL_EXPORT UnitTetraIntersectionBary : protected TransformedTriangle
+ class UnitTetraIntersectionBary : protected TransformedTriangle
{
public:
- UnitTetraIntersectionBary(bool isTetraInversed=false);
+ INTERPKERNEL_EXPORT UnitTetraIntersectionBary(bool isTetraInversed=false);
- void init(bool isTetraInversed=false);
+ INTERPKERNEL_EXPORT void init(bool isTetraInversed=false);
/*!
* \brief Stores a part of triangle common with the unit tetrahedron
* \param triangle - triangle side of other cell, whose calculateIntersectionVolume()
* must have already been called
*/
- void addSide(const TransformedTriangle& triangle);
+ INTERPKERNEL_EXPORT void addSide(const TransformedTriangle& triangle);
/*!
* \brief Computes and return coordinates of barycentre
*/
- bool getBary(double* baryCenter);
+ INTERPKERNEL_EXPORT bool getBary(double* baryCenter);
/*!
* \brief Returns volume of intersection
* \retval double -
*/
- inline double getVolume() const { return _int_volume; }
+ INTERPKERNEL_EXPORT inline double getVolume() const { return _int_volume; }
- virtual ~UnitTetraIntersectionBary();
+ INTERPKERNEL_EXPORT virtual ~UnitTetraIntersectionBary();
private: