+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#ifndef __GEOMETRIC2DINTERSECTOR_HXX__
#define __GEOMETRIC2DINTERSECTOR_HXX__
public:
Geometric2DIntersector(const MyMeshType& mesh_A, const MyMeshType& mesh_B,
double dimCaracteristic, double precision);
- double intersectCells(ConnType icell_A, ConnType icell_B, int nb_NodesA, int nb_NodesB);
+ double intersectCells(ConnType icell_A, ConnType icell_B, int nb_NodesA, int nb_NodesB,
+ double* baryCentre=0);
private:
QuadraticPolygon *buildPolygonAFrom(ConnType cell, int nbOfPoints, NormalizedCellType type);
QuadraticPolygon *buildPolygonBFrom(ConnType cell, int nbOfPoints, NormalizedCellType type);
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#ifndef __GEOMETRIC2DINTERSECTOR_TXX__
#define __GEOMETRIC2DINTERSECTOR_TXX__
template<class MyMeshType>
double Geometric2DIntersector<MyMeshType>::intersectCells(ConnType icell_A, ConnType icell_B,
- int nb_NodesA, int nb_NodesB)
+ int nb_NodesA, int nb_NodesB,
+ double* /*baryCentre*/)
{
NormalizedCellType tA=_meshA.getTypeOfElement(icell_A);
- NormalizedCellType tB=_meshA.getTypeOfElement(icell_B);
+ NormalizedCellType tB=_meshB.getTypeOfElement(icell_B);
QuadraticPolygon *p1=buildPolygonAFrom(icell_A,nb_NodesA,tA);
QuadraticPolygon *p2=buildPolygonBFrom(icell_B,nb_NodesB,tB);
double ret=p1->intersectWith(*p2);
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#ifndef __INTERSECTORHEXA_HXX__
#define __INTERSECTORHEXA_HXX__
~IntersectorHexa();
- virtual double intersectSourceCell(typename MyMeshType::MyConnType srcCell);
+ virtual double intersectSourceCell(typename MyMeshType::MyConnType srcCell, double* baryCentre=0);
private:
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#ifndef __INTERSECTORHEXA_TXX__
#define __INTERSECTORHEXA_TXX__
*
*/
template<class MyMeshType>
- double IntersectorHexa<MyMeshType>::intersectSourceCell(typename MyMeshType::MyConnType srcCell)
+ double IntersectorHexa<MyMeshType>::intersectSourceCell(typename MyMeshType::MyConnType srcCell,
+ double* baryCentre)
{
double volume = 0.0;
for(typename std::vector<IntersectorTetra<MyMeshType>*>::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter)
- volume += (*iter)->intersectSourceCell(srcCell);
+ volume += (*iter)->intersectSourceCell(srcCell, baryCentre);
return volume;
}
}