#include "MEDCouplingTimeDiscretization.hxx"
#include "MEDCouplingFieldDiscretization.hxx"
#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MEDCouplingNatureOfField.hxx"
#include <sstream>
#include <limits>
ret << "Description of field is : \"" << getDescription() << "\"\n";
ret << "FieldDouble space discretization is : " << _type->getStringRepr() << "\n";
ret << "FieldDouble time discretization is : " << _time_discr->getStringRepr() << "\n";
+ ret << "FieldDouble nature of field is : " << MEDCouplingNatureOfField::getRepr(_nature) << "\n";
if(getArray())
ret << "FieldDouble default array has " << getArray()->getNumberOfComponents() << " components and " << getArray()->getNumberOfTuples() << " tuples.\n";
if(_mesh)
--- /dev/null
+// Copyright (C) 2007-2010 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
+//
+
+#include "MEDCouplingNatureOfField.hxx"
+
+#include <algorithm>
+
+namespace ParaMEDMEM
+{
+ const char *MEDCouplingNatureOfField::REPR_OF_NATUREOFFIELD[NB_OF_POSSIBILITIES]=
+ { "NoNature",
+ "ConservativeVolumic",
+ "Integral",
+ "IntegralGlobConstraint",
+ "RevIntegral"};
+
+ const int MEDCouplingNatureOfField::POS_OF_NATUREOFFIELD[NB_OF_POSSIBILITIES]={17,26,32,35,37};
+
+ const char *MEDCouplingNatureOfField::getRepr(NatureOfField nat) throw(INTERP_KERNEL::Exception)
+ {
+ const int *pos=std::find(POS_OF_NATUREOFFIELD,POS_OF_NATUREOFFIELD+NB_OF_POSSIBILITIES,(int)nat);
+ if(pos==POS_OF_NATUREOFFIELD+NB_OF_POSSIBILITIES)
+ throw INTERP_KERNEL::Exception("MEDCouplingNatureOfField::getRepr : Unrecognized nature of field !");
+ int pos2=std::distance(POS_OF_NATUREOFFIELD,pos);
+ return REPR_OF_NATUREOFFIELD[pos2];
+ }
+}
+
#ifndef __PARAMEDMEM_MEDCOUPLINGNATUREOFFIELD_HXX__
#define __PARAMEDMEM_MEDCOUPLINGNATUREOFFIELD_HXX__
+#include "InterpKernelException.hxx"
+
namespace ParaMEDMEM
{
typedef enum
IntegralGlobConstraint = 35,
RevIntegral = 37
} NatureOfField;
+
+ class MEDCouplingNatureOfField
+ {
+ public:
+ static const char *getRepr(NatureOfField nat) throw(INTERP_KERNEL::Exception);
+ private:
+ static const int NB_OF_POSSIBILITIES=5;
+ static const char *REPR_OF_NATUREOFFIELD[NB_OF_POSSIBILITIES];
+ static const int POS_OF_NATUREOFFIELD[NB_OF_POSSIBILITIES];
+ };
}
#endif
MEDCouplingCMesh.cxx MEDCouplingTimeDiscretization.cxx \
MEDCouplingFieldDiscretization.cxx MEDCouplingRefCountObject.cxx \
MEDCouplingPointSet.cxx MEDCouplingUMeshDesc.cxx \
- MEDCouplingExtrudedMesh.cxx MEDCouplingMesh.cxx MEDCouplingGaussLocalization.cxx
+ MEDCouplingExtrudedMesh.cxx MEDCouplingMesh.cxx MEDCouplingGaussLocalization.cxx \
+ MEDCouplingNatureOfField.cxx
libmedcoupling_la_LDFLAGS=