1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
28 #include <utilities.h>
32 using namespace MEDMEM;
33 using namespace MED_EN;
35 Compo2::Compo2() : _F(NULL)
44 std::string Compo2::Calcul(const MESH &M)
46 const char* LOC = "std::string Compo2::Calcul(MESH &M)";
49 MESSAGE("type virtuel : MESH");
50 MESSAGE("type reel : " << typeid(M).name());
52 std::string name = M.getName();
57 std::cerr << M << std::endl;
60 std::cerr << "erreur Compo2::Calcul" << std::endl;
67 const FAMILY * Compo2::Calcul2(const MESH &M)
69 const char* LOC = "const FAMILY * Compo2::Calcul2(const MESH &M)";
72 const FAMILY * F = M.getFamily(MED_CELL, 1);
73 std::cerr << "ok ici 2" << std::endl;
75 std::cout << F << std::endl;
78 std::cerr << "erreur Compo2::Calcul2" << std::endl;
85 void Compo2::Calcul3(const FIELD<double> &F)
87 const char* LOC = "void Compo2::Calcul3(const FIELD<double> *)";
90 const double *v = F.getValue();
91 long i, n = F.getSupport()->getNumberOfElements(MED_CELL);
92 int j, m = F.getNumberOfComponents();
95 std::cout << i << " : ";
97 std::cout << v[j + i*m];
98 std::cout << std::endl;