Back to index

salome-med  6.5.0
ICoCoTrioField.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 // ICoCo file common to several codes
00021 // ICoCoTrioField.h
00022 // version 1.2 10/05/2010
00023 
00024 #ifndef _ICoCoTrioField_included_
00025 #define _ICoCoTrioField_included_
00026 
00027 #include <ICoCoField.hxx>
00028 namespace ICoCo {
00029 
00031   //
00032   // .DESCRIPTION 
00033   //     class TrioField, used for coupling Trio codes via the ICoCo interface
00034   //     This structure contains all the necessary information 
00035   //     for constructing a ParaMEDMEM::ParaFIELD (with the addition of the MPI
00036   //     communicator).
00037   //     This structure can either own or not _field values (_has_field_ownership)
00038   //     For _coords, _connectivity and _field, a null pointer means no data allocated.
00039   //     _coords and _connectivity tables, when allocated, are always owned by the TrioField.
00040   //
00042   class TrioField:public Field {
00043   public:
00044     
00045     TrioField();
00046     TrioField(const TrioField& OtherField);
00047     ~TrioField();
00048     void clear();
00049     void set_standalone();
00050     void dummy_geom();
00051     TrioField& operator=(const TrioField& NewField);
00052     void save(std::ostream& os) const;
00053     void restore(std::istream& in);
00054     int nb_values() const ;
00055 
00056   public:
00057     int _type ; // 0 elem 1 nodes
00058     int _mesh_dim;
00059     int _space_dim;
00060     int _nbnodes;
00061     int _nodes_per_elem;
00062     int _nb_elems;
00063     int _itnumber;
00064     int* _connectivity;
00065     double* _coords;
00066     
00067     double _time1,_time2;
00068     int _nb_field_components;
00069     double* _field;
00070     bool _has_field_ownership;
00071   }; 
00072 }
00073 
00074 #endif