From: eap Date: Wed, 17 Dec 2008 13:39:08 +0000 (+0000) Subject: MEDMEM Industrialization 2008 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10009b6fb49e18b5b0578c9515bd393652e60f17;p=tools%2Fmedcoupling.git MEDMEM Industrialization 2008 + double* baryCentre=0); --- diff --git a/src/INTERP_KERNEL/Geometric2DIntersector.hxx b/src/INTERP_KERNEL/Geometric2DIntersector.hxx index c4d12ee9c..3fd86f96a 100644 --- a/src/INTERP_KERNEL/Geometric2DIntersector.hxx +++ b/src/INTERP_KERNEL/Geometric2DIntersector.hxx @@ -1,3 +1,21 @@ +// 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__ @@ -18,7 +36,8 @@ namespace INTERP_KERNEL 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); diff --git a/src/INTERP_KERNEL/Geometric2DIntersector.txx b/src/INTERP_KERNEL/Geometric2DIntersector.txx index 7f25cb541..6b0b3bf12 100644 --- a/src/INTERP_KERNEL/Geometric2DIntersector.txx +++ b/src/INTERP_KERNEL/Geometric2DIntersector.txx @@ -1,3 +1,21 @@ +// 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__ @@ -30,10 +48,11 @@ namespace INTERP_KERNEL template double Geometric2DIntersector::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); diff --git a/src/INTERP_KERNEL/IntersectorHexa.hxx b/src/INTERP_KERNEL/IntersectorHexa.hxx index 8e96eeb36..3a0725ca4 100644 --- a/src/INTERP_KERNEL/IntersectorHexa.hxx +++ b/src/INTERP_KERNEL/IntersectorHexa.hxx @@ -1,3 +1,21 @@ +// 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__ @@ -26,7 +44,7 @@ namespace INTERP_KERNEL ~IntersectorHexa(); - virtual double intersectSourceCell(typename MyMeshType::MyConnType srcCell); + virtual double intersectSourceCell(typename MyMeshType::MyConnType srcCell, double* baryCentre=0); private: diff --git a/src/INTERP_KERNEL/IntersectorHexa.txx b/src/INTERP_KERNEL/IntersectorHexa.txx index e671b1318..b62ea76f7 100644 --- a/src/INTERP_KERNEL/IntersectorHexa.txx +++ b/src/INTERP_KERNEL/IntersectorHexa.txx @@ -1,3 +1,21 @@ +// 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__ @@ -386,11 +404,12 @@ namespace INTERP_KERNEL * */ template - double IntersectorHexa::intersectSourceCell(typename MyMeshType::MyConnType srcCell) + double IntersectorHexa::intersectSourceCell(typename MyMeshType::MyConnType srcCell, + double* baryCentre) { double volume = 0.0; for(typename std::vector*>::iterator iter = _tetra.begin(); iter != _tetra.end(); ++iter) - volume += (*iter)->intersectSourceCell(srcCell); + volume += (*iter)->intersectSourceCell(srcCell, baryCentre); return volume; } }