1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __PARAFIELD_HXX__
20 #define __PARAFIELD_HXX__
22 #include "ComponentTopology.hxx"
23 #include "ParaMESH.hxx"
24 #include "MEDCouplingFieldDouble.hxx"
25 #include "MEDCouplingUMesh.hxx"
37 ParaFIELD(TypeOfField type, ParaMESH* mesh, const ComponentTopology& component_topology);
40 ParaFIELD(MEDCouplingFieldDouble* field, const ProcessorGroup& group);
43 void synchronizeTarget( ParaMEDMEM::ParaFIELD* source_field);
44 void synchronizeSource( ParaMEDMEM::ParaFIELD* target_field);
45 MEDCouplingFieldDouble* getField() const { return _field; }
46 Topology* getTopology() const { return _topology; }
47 ParaMESH* getSupport() const { return _support; }
48 int nbComponents() const { return _component_topology.nbComponents(); }
49 double getVolumeIntegral(int icomp) const;
50 double getL2Norm()const { return -1; }
52 MEDCouplingFieldDouble* _field;
53 const ParaMEDMEM::ComponentTopology& _component_topology;
57 bool _has_field_ownership;
58 bool _has_support_ownership;