# Project name, upper case
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
-SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
#
# Kernel detection comes before user options to be
ELSE(EXISTS ${GUI_ROOT_DIR})
MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR or turn option SALOME_BUILD_GUI to OFF !")
ENDIF(EXISTS ${GUI_ROOT_DIR})
- FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+ FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ ELSE()
+ FIND_PACKAGE(SalomeQt5 REQUIRED)
+ ENDIF()
ENDIF(SALOME_BUILD_GUI)
IF(SALOME_MED_ENABLE_PYTHON)
LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedcouplingcorba paramedmemcompo)
ENDIF()
-LIST(APPEND _${PROJECT_NAME}_exposed_targets
+LIST(APPEND _${PROJECT_NAME}_exposed_targets
medcouplingcorba medcouplingclient medcalculator MEDFactoryEngine)
IF(SALOME_MED_ENABLE_PYTHON)
LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculatorspython)
SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
SET(MEDCOUPLING_ROOT_DIR "${MEDCOUPLING_ROOT_DIR}")
-SET(QT4_ROOT_DIR "${QT4_ROOT_DIR}")
SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}")
SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}")
SET(PTHREAD_ROOT_DIR "${PTHREAD_ROOT_DIR}")
SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}")
SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}")
SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}")
+IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+ SET(QT_ROOT_DIR "${QT4_ROOT_DIR}")
+ELSE()
+ SET(QT_ROOT_DIR "${QT5_ROOT_DIR}")
+ENDIF()
# - in the install tree:
# Get the relative path of the include directory so
SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx
- PThread Python)
+IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+ SALOME_CONFIGURE_PREPARE(MEDCoupling Qt4 MPI omniORB CppUnit Graphviz Doxygen Sphinx
+ PThread Python)
+ ELSE()
+ SALOME_CONFIGURE_PREPARE(MEDCoupling Qt5 MPI omniORB CppUnit Graphviz Doxygen Sphinx
+ PThread Python)
+ENDIF()
CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
- KERNEL_ROOT_DIR GUI_ROOT_DIR MEDCOUPLING_ROOT_DIR QT4_ROOT_DIR MPI_ROOT_DIR
- OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR
+ KERNEL_ROOT_DIR GUI_ROOT_DIR MEDCOUPLING_ROOT_DIR QT_ROOT_DIR MPI_ROOT_DIR
+ OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR
GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR SPHINX_ROOT_DIR)
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
# Install the export set for use with the install-tree
INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
FILE ${PROJECT_NAME}Targets.cmake)
+
+# Application tests
+INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test
+ RENAME CTestTestfile.cmake)
--- /dev/null
+# Copyright (C) 2016 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, or (at your option) any later version.
+#
+# 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
+#
+
+SET(COMPONENT_NAME MEDCalc)
+SET(TIMEOUT 300)
+
+SUBDIRS(MEDCalculator)
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = '@SPHINX_THEME@'
-html_theme_options = {
-}
+#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = ['themes']
Some comments on this code:
* The physical property to be preserved by this interpolation is
- specified using the keyword :tt:`ConservativeVolumic`
+ specified using the keyword :tt:`IntensiveMaximum`
* The parameter :tt:`P0P0` given at the preparation step of the
remapper specifies that the interpolation is done from CELLS (P0) to
CELLS (P0).
Some comments on this code:
* The physical property to be preserved by this interpolation is
- specified using the keyword :tt:`ConservativeVolumic`
+ specified using the keyword :tt:`IntensiveMaximum`
* The parameter :tt:`P0P0` given at the preparation step of the
remapper specifies that the interpolation is done from CELLS (P0) to
CELLS (P0).
-# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2016 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
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2016 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
field=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME)
field.setMesh(m3D)
field.setArray(a)
-field.checkCoherency()
+field.checkConsistencyLight()
field.setName("f")
# Save the field (and associated mesh)
# _T1A
L=0.
arr = field.getArray()
-ids = arr.getIdsInRange(L,1e300)
+ids = arr.findIdsInRange(L,1e300)
m3DSub = field.getMesh()[ids]
skin = m3DSub.computeSkin()
MEDLoader.WriteUMesh("partition_skin.med",skin,True);
# SALOME V650 requires a more complicated syntax.
m2D,desc,descI,revDesc,revDescI=m3DSub.buildDescendingConnectivity()
numberOf3DVolSharing=revDescI.deltaShiftIndex()
-ids2D=numberOf3DVolSharing.getIdsEqual(1)
+ids2D=numberOf3DVolSharing.findIdsEqual(1)
skin_V650=m2D[ids2D]
# We can check if the two skins are identical
print "Are two meshes equal between V660 and V650 ?",skin.isEqual(skin_V650,1e-12)
m=MEDFileMesh.New(fn)
m=m.getMeshAtLevel(0)
m.writeVTK(outs[i])
- mns[i]=m.deepCpy()
+ mns[i]=m.deepCopy()
if splitview:
m.translate([scal*elt for elt in trs[i]])
f=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME)
da=DataArrayDouble.New()
da.alloc(m.getNumberOfCells(),1)
da.fillWithValue(i)
- dds[i]=da.deepCpy()
+ dds[i]=da.deepCopy()
f.setArray(da)
fs[i]=f
i+=1
m=MEDFileMesh.New(fn)
m=m.getMeshAtLevel(0)
m.writeVTK(outs[i])
- mns[i]=m.deepCpy()
+ mns[i]=m.deepCopy()
if splitview:
m.translate([scal*elt for elt in trs[i]])
f=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME)
da=DataArrayDouble.New()
da.alloc(m.getNumberOfCells(),1)
da.fillWithValue(i)
- dds[i]=da.deepCpy()
+ dds[i]=da.deepCopy()
f.setArray(da)
fs[i]=f
i+=1
equation = "319.*cos(((x)*(x)*3+(y-0.52)*(y-0.52)+(z-0.1)*(z-0.1))*7)"
fsource=msource.fillFromAnalytic(ON_CELLS,1,equation)
fsource.setName("Temperature")
-fsource.setNature(ConservativeVolumic)
+fsource.setNature(IntensiveMaximum)
# Read the target mesh
mtarget = MEDLoader.ReadUMeshFromFile("meshtarget.med","meshtarget",0)
# _T1A
from MEDLoader import MEDLoader, ON_CELLS
-from MEDCouplingRemapper import MEDCouplingRemapper, ConservativeVolumic
+from MEDCouplingRemapper import MEDCouplingRemapper, IntensiveMaximum
# Read the source mesh and the source field
it,dt = (-1,-1)
fsource = MEDLoader.ReadField(ON_CELLS,"fieldsource.med","meshsource",0,
"Temperature",it,dt)
fsource.setMesh(msource)
-fsource.setNature(ConservativeVolumic)
+fsource.setNature(IntensiveMaximum)
# Read the target mesh
mtarget = MEDLoader.ReadUMeshFromFile("meshtarget.med","meshtarget",0)
ms=MEDFileMesh.New("MeshSource.med") ; ms=ms.getMeshAtLevel(0)
mt=MEDFileMesh.New("MeshTarget.med") ; mt=mt.getMeshAtLevel(0)
fs=ms.fillFromAnalytic(ON_CELLS,1,"319.*cos(((x)*(x)*3+(y-0.52)*(y-0.52)+(z-0.1)*(z-0.1))*7)")
-fs.setNature(ConservativeVolumic)
+fs.setNature(IntensiveMaximum)
fs.setName("Temperature")
MEDCouplingFieldDouble.WriteVTK("MeshSource.vtu",[fs])
-mt2=mt.deepCpy()
+mt2=mt.deepCopy()
mt2.translate([0.4,0.,0.])
mt2.writeVTK("MeshTarget.vtu")
#
EVENT_CLEAN_WORKSPACE,
EVENT_ADD_DATASOURCE,
EVENT_ADD_PRESENTATION,
+ EVENT_REMOVE_PRESENTATION,
EVENT_UNKNOWN
};
module MEDCALC
{
+ /* Enumerations and constants */
+
enum MEDPresentationViewMode {
VIEW_MODE_OVERLAP,
VIEW_MODE_REPLACE,
VIEW_MODE_SPLIT_VIEW
};
+ enum MEDPresentationColorMap {
+ COLOR_MAP_BLUE_TO_RED_RAINBOW,
+ COLOR_MAP_COOL_TO_WARM
+ };
+
+ struct ScalarBarRange {
+ // (valMin,valMax) defines the scalar bar range from:
+ // (-1,timetep): the field values at the chosen timestep
+ // (-1,-1): the field values across all timesteps
+ // (start,end): a user-input range of values
+ long valMin;
+ long valMax;
+ };
+
+ const string DISPLAY_EUCLIDEAN_NORM = "Euclidean norm";
+
+ enum SliceOrientation {
+ SLICE_NORMAL_TO_X,
+ SLICE_NORMAL_TO_Y,
+ SLICE_NORMAL_TO_Z,
+ SLICE_NORMAL_TO_XY,
+ SLICE_NORMAL_TO_XZ,
+ SLICE_NORMAL_TO_YZ,
+ SLICE_NORMAL_TO_XYZ
+ };
+
+ /* Default values */
+
+ const MEDPresentationViewMode VIEW_MODE_DEFAULT = VIEW_MODE_REPLACE;
+ const MEDPresentationColorMap COLOR_MAP_DEFAULT = COLOR_MAP_BLUE_TO_RED_RAINBOW;
+ //const ScalarBarRange SCALAR_BAR_RANGE_DEFAULT = ;
+ const long SCALAR_BAR_RANGE_VAL_MIN_DEFAULT = -1;
+ const long SCALAR_BAR_RANGE_VAL_MAX_DEFAULT = -1;
+ const string DISPLAY_DEFAULT = DISPLAY_EUCLIDEAN_NORM;
+ const SliceOrientation SLICE_ORIENTATION_DEFAULT = SLICE_NORMAL_TO_Z;
+ const long NB_CONTOURS_DEFAULT = 10;
+ const long NB_SLICES_DEFAULT = 1;
+
+ /* Structs */
+
struct ScalarMapParameters {
long fieldHandlerId;
MEDPresentationViewMode viewMode;
+ string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
+ ScalarBarRange sbRange;
+ MEDPresentationColorMap colorMap;
};
+ // A contour is an isoline in 2D and an isosurface in 3D
+ struct ContourParameters {
+ long fieldHandlerId;
+ MEDPresentationViewMode viewMode;
+ string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
+ ScalarBarRange sbRange;
+ MEDPresentationColorMap colorMap;
+ long nbContours;
+ };
+
+ struct VectorFieldParameters {
+ long fieldHandlerId;
+ MEDPresentationViewMode viewMode;
+ };
+
+ struct SlicesParameters {
+ long fieldHandlerId;
+ MEDPresentationViewMode viewMode;
+ SliceOrientation orientation;
+ long nbSlices;
+ };
+
+ struct DeflectionShapeParameters {
+ long fieldHandlerId;
+ MEDPresentationViewMode viewMode;
+ };
+
+ struct PointSpriteParameters {
+ long fieldHandlerId;
+ MEDPresentationViewMode viewMode;
+ string displayedInfo; // DISPLAY_EUCLIDEAN_NORM or any field name
+ ScalarBarRange sbRange;
+ MEDPresentationColorMap colorMap;
+ };
+
+ /* Functions */
+
interface MEDPresentationManager : SALOME::GenericObj
{
long makeScalarMap(in ScalarMapParameters params);
+ long makeContour(in ContourParameters params);
+ long makeVectorField(in VectorFieldParameters params);
+ long makeSlices(in SlicesParameters params);
+ long makeDeflectionShape(in DeflectionShapeParameters params);
+ long makePointSprite(in PointSpriteParameters params);
+
void setPresentationProperty(in long presId, in string propName, in string propValue);
string getPresentationProperty(in long presId, in string propName);
+ void updateScalarMap(in long presId, in ScalarMapParameters params);
+ void updateContour(in long presId, in ContourParameters params);
+ void updateVectorField(in long presId, in VectorFieldParameters params);
+ void updateSlices(in long presId, in SlicesParameters params);
+ void updateDeflectionShape(in long presId, in DeflectionShapeParameters params);
+ void updatePointSprite(in long presId, in PointSpriteParameters params);
+
+ boolean removePresentation(in long presId);
+
};
};
status registerPresentation(in SALOMEDS::Study study,
in long fieldId,
in string name,
- in string label)
+ in string label,
+ in long presentationId)
+ raises (SALOME::SALOME_Exception);
+
+ status unregisterPresentation(in SALOMEDS::Study study,
+ in long presentationId)
raises (SALOME::SALOME_Exception);
};
};
ADD_SUBDIRECTORY(tui)
ADD_SUBDIRECTORY(exe)
ENDIF()
+
+INSTALL(FILES MEDCalcConstants.hxx DESTINATION ${SALOME_INSTALL_HEADERS})
--- /dev/null
+// Copyright (C) 2007-2016 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, or (at your option) any later version.
+//
+// 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
+//
+
+// This constant strings are used to specify an attribute name for
+// AttributeParameter attributes associated to a SObject
+#define IS_IN_WORKSPACE "isInWorkspace"
+#define SOURCE_ID "sourceId"
+#define MESH_ID "meshId"
+//#define FIELD_SERIES_ID "fieldSeriesId"
+#define FIELD_ID "fieldId"
+#define PRESENTATION_ID "presentationId"
+#define IS_PRESENTATION "isPresentation"
+
+
+static const int NB_TYPE_OF_FIELDS = 4;
+static const char* mapTypeOfFieldLabel[NB_TYPE_OF_FIELDS] =
+ {"ON_CELLS", "ON_NODES", "ON_GAUSS_PT", "ON_GAUSS_NE" };
${PYTHON_INCLUDE_DIRS}
${MEDCOUPLING_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
${PROJECT_BINARY_DIR}/idl
)
MEDCalculator_i.cxx
MEDPresentationManager_i.cxx
MEDPresentation.cxx
+ # presentations
+ MEDPresentationScalarMap.cxx
+ MEDPresentationContour.cxx
+ MEDPresentationVectorField.cxx
+ MEDPresentationSlices.cxx
+ MEDPresentationDeflectionShape.cxx
+ MEDPresentationPointSprite.cxx
)
SET(MEDFactoryEngine_SOURCES
FILE(GLOB MEDCALC_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${MEDCALC_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+FILE(GLOB MEDCALC_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
+INSTALL(FILES ${MEDCALC_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
IF(SALOME_ENABLE_PYTHON)
INSTALL(FILES test_medcalc_components.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed)
//
#include "MED.hxx"
-
#include "MEDFactoryClient.hxx"
+#include <MEDCalcConstants.hxx>
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
#include <SALOMEDS_SObject.hxx>
-
#include <Utils_ExceptHandlers.hxx>
+#include <SALOME_LifeCycleCORBA.hxx>
+#include <SALOME_NamingService.hxx>
#include <string>
+#include <sstream>
/*!
\brief Constructor
// nothing to do
}
-// Duplicate gui/DatasourceConstants
-#define OBJECT_ID "objectid"
-#define OBJECT_IS_IN_WORKSPACE "isInWorkspace"
-
-// Duplicate gui/XmedDataModel
-static const int NB_TYPE_OF_FIELDS = 4;
-static const char* mapTypeOfFieldLabel[NB_TYPE_OF_FIELDS] =
- {"ON_CELLS", "ON_NODES", "ON_GAUSS_PT", "ON_GAUSS_NE" };
-
MED_ORB::status
MED::addDatasourceToStudy(SALOMEDS::Study_ptr study,
const MEDCALC::DatasourceHandler& datasourceHandler)
soDatasource->SetAttrString("AttributePixMap", "ICO_DATASOURCE");
anAttr = studyBuilder->FindOrCreateAttribute(soDatasource, "AttributeParameter");
aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
- aParam->SetInt(OBJECT_ID, datasourceHandler.id);
+ aParam->SetInt(SOURCE_ID, datasourceHandler.id);
useCaseBuilder->AppendTo(soDatasource->GetFather(), soDatasource);
// We can add the meshes as children of the datasource
soMesh->SetAttrString("AttributePixMap", "ICO_DATASOURCE_MESH");
anAttr = studyBuilder->FindOrCreateAttribute(soMesh, "AttributeParameter");
aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
- aParam->SetInt(OBJECT_ID, meshHandler.id);
- anAttr = studyBuilder->FindOrCreateAttribute(soMesh, "AttributeParameter");
- aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
- aParam->SetBool(OBJECT_IS_IN_WORKSPACE, false);
+ aParam->SetInt(MESH_ID, meshHandler.id);
+ aParam->SetBool(IS_IN_WORKSPACE, false);
useCaseBuilder->AppendTo(soMesh->GetFather(), soMesh);
// We add the field timeseries defined on this mesh, as children of the mesh SObject
soFieldseries->SetAttrString("AttributePixMap", "ICO_DATASOURCE_FIELD");
anAttr = studyBuilder->FindOrCreateAttribute(soFieldseries, "AttributeParameter");
aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
- aParam->SetInt(OBJECT_ID, fieldseriesHandler.id);
- anAttr = studyBuilder->FindOrCreateAttribute(soFieldseries, "AttributeParameter");
- aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
- aParam->SetBool(OBJECT_IS_IN_WORKSPACE, false);
+ //aParam->SetInt(FIELD_SERIES_ID, fieldseriesHandler.id);
+ aParam->SetInt(FIELD_ID, fieldseriesHandler.id);
+ aParam->SetBool(IS_IN_WORKSPACE, false);
useCaseBuilder->AppendTo(soFieldseries->GetFather(), soFieldseries);
soFieldseries->UnRegister();
MED::registerPresentation(SALOMEDS::Study_ptr study,
CORBA::Long fieldId,
const char* name,
- const char* label)
+ const char* label,
+ CORBA::Long presentationId)
{
// set exception handler to catch unexpected CORBA exceptions
Unexpect aCatch(SALOME_SalomeException);
soPresentation->SetAttrString("AttributeName", name);
soPresentation->SetAttrString("AttributePixMap", label);
+ SALOMEDS::GenericAttribute_var anAttr;
+ SALOMEDS::AttributeParameter_var aParam;
+ anAttr = studyBuilder->FindOrCreateAttribute(soPresentation, "AttributeParameter");
+ aParam = SALOMEDS::AttributeParameter::_narrow(anAttr);
+ aParam->SetInt(FIELD_ID, fieldId);
+ aParam->SetBool(IS_PRESENTATION, true);
+ aParam->SetInt(PRESENTATION_ID, presentationId);
+
result = MED_ORB::OP_OK;
return result;
}
+MED_ORB::status
+MED::unregisterPresentation(SALOMEDS::Study_ptr study,
+ CORBA::Long presentationId)
+{
+ // set exception handler to catch unexpected CORBA exceptions
+ Unexpect aCatch(SALOME_SalomeException);
+
+ // set result status to error initially
+ MED_ORB::status result = MED_ORB::OP_ERROR;
+
+ SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder();
+ SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder();
+
+ SALOMEDS::GenericAttribute_var anAttribute;
+ SALOMEDS::SComponent_var father = study->FindComponent("MED");
+ SALOMEDS::ChildIterator_var it = study->NewChildIterator(father);
+ for (it->InitEx(true); it->More(); it->Next()) {
+ SALOMEDS::SObject_var child(it->Value());
+
+ if (child->FindAttribute(anAttribute, "AttributeParameter")) {
+ SALOMEDS::AttributeParameter_var attrParam = SALOMEDS::AttributeParameter::_narrow(anAttribute);
+ if (!attrParam->IsSet(IS_PRESENTATION, PT_BOOLEAN) || !attrParam->GetBool(IS_PRESENTATION) || !attrParam->IsSet(PRESENTATION_ID, PT_INTEGER))
+ continue;
+
+ if (presentationId == attrParam->GetInt(PRESENTATION_ID)) {
+ // remove object from study
+ studyBuilder->RemoveObjectWithChildren(child);
+ // remove object from use case tree
+ useCaseBuilder->Remove(child);
+ }
+ }
+ }
+}
+
Engines::TMPFile*
MED::DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean isPublished,
return aStreamFile._retn();
}
+CORBA::Boolean
+MED::hasObjectInfo()
+{
+ return true;
+}
+
+char*
+MED::getObjectInfo(CORBA::Long studyId, const char* entry)
+{
+ SALOME_LifeCycleCORBA lcc;
+ CORBA::Object_var aSMObject = lcc.namingService()->Resolve( "/myStudyManager" );
+ SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
+ SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId );
+ SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( entry );
+ SALOMEDS::SObject_var aResultSObj;
+ if (aSObj->ReferencedObject(aResultSObj))
+ aSObj = aResultSObj;
+
+ if (aSObj->_is_nil())
+ return CORBA::string_dup("unknown");
+
+ SALOMEDS::GenericAttribute_var anAttribute;
+
+ std::string name("unknown");
+ if (aSObj->FindAttribute(anAttribute, "AttributeName")) {
+ SALOMEDS::AttributeName_var attrName = SALOMEDS::AttributeName::_narrow(anAttribute);
+ name = std::string(attrName->Value());
+ }
+
+ bool isInWorkspace = false;
+ //bool isPresentation = false;
+ int sourceId = -1;
+ int meshId = -1;
+ //int fieldSeriesId = -1;
+ int fieldId = -1;
+ int presentationId = -1;
+ if (aSObj->FindAttribute(anAttribute, "AttributeParameter")) {
+ SALOMEDS::AttributeParameter_var attrParam = SALOMEDS::AttributeParameter::_narrow(anAttribute);
+ if (attrParam->IsSet(IS_IN_WORKSPACE, PT_BOOLEAN))
+ isInWorkspace = attrParam->GetBool(IS_IN_WORKSPACE);
+ //if (attrParam->IsSet(IS_PRESENTATION, PT_BOOLEAN))
+ // isPresentation = attrParam->GetBool(IS_PRESENTATION);
+ if (attrParam->IsSet(SOURCE_ID, PT_INTEGER))
+ sourceId = attrParam->GetInt(SOURCE_ID);
+ if (attrParam->IsSet(MESH_ID, PT_INTEGER))
+ meshId = attrParam->GetInt(MESH_ID);
+ //if (attrParam->IsSet(FIELD_SERIES_ID, PT_INTEGER))
+ // fieldSeriesId = attrParam->GetInt(FIELD_SERIES_ID);
+ if (attrParam->IsSet(FIELD_ID, PT_INTEGER))
+ fieldId = attrParam->GetInt(FIELD_ID);
+ if (attrParam->IsSet(PRESENTATION_ID, PT_INTEGER))
+ presentationId = attrParam->GetInt(PRESENTATION_ID);
+ }
+
+ if (!aSObj->_is_nil() )
+ aSObj->UnRegister();
+
+ std::ostringstream oss;
+ if (sourceId > -1)
+ oss << "Source id: " << sourceId << std::endl;
+ if (meshId > -1)
+ oss << "Mesh id: " << meshId << std::endl;
+ //if (fieldSeriesId > -1)
+ // oss << "Field series id: " << fieldSeriesId << std::endl;
+ if (fieldId > -1)
+ oss << "Field id: " << fieldId << std::endl;
+ //oss << "Is presentation: " << isPresentation << std::endl;
+ if (presentationId > -1)
+ oss << "Presentation id: " << presentationId << std::endl;
+ oss << "Is in workspace: " << isInWorkspace << std::endl;
+
+ return CORBA::string_dup(oss.str().c_str());
+}
+
extern "C"
{
/*!
MED_ORB::status registerPresentation(SALOMEDS::Study_ptr study,
CORBA::Long fieldId,
const char* name,
- const char* label);
+ const char* label,
+ CORBA::Long presentationId);
+
+ MED_ORB::status unregisterPresentation(SALOMEDS::Study_ptr study,
+ CORBA::Long presentationId);
/*! Dump the study as a Python file */
virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
CORBA::Boolean isMultiFile,
CORBA::Boolean& isValidScript);
+ // For tooltips
+ virtual CORBA::Boolean hasObjectInfo();
+ virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
+
private:
std::map<long, std::string> _fieldSeriesEntries;
};
#include <string>
#include "MEDCouplingFieldDouble.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCalculator_i * MEDCalculator_i::_instance = NULL;
#include "Basics_Utils.hxx"
#include "MEDLoader.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
#include <string>
#include <vector>
}
// Then we check that the file is readable by MEDLoader
- MEDLoader::CheckFileForRead(filepath);
+ CheckFileForRead(filepath);
// Initialise the datasource handler
MEDCALC::DatasourceHandler * datasourceHandler = new MEDCALC::DatasourceHandler();
_datasourceHandlerMap[datasourceHandler->id] = datasourceHandler;
// We start by read the list of meshes (spatial supports of fields)
- vector<string> meshNames = MEDLoader::GetMeshNames(filepath);
+ vector<string> meshNames = GetMeshNames(filepath);
int nbOfMeshes = meshNames.size();
for (int iMesh = 0; iMesh < nbOfMeshes; iMesh++) {
const char * meshName = meshNames[iMesh].c_str();
// For each mesh, we can read the list of the names of the
// associated fields, i.e. fields whose spatial support is this
// mesh.
- vector<string> fieldNames = MEDLoader::GetAllFieldNamesOnMesh(filepath,
+ vector<string> fieldNames = GetAllFieldNamesOnMesh(filepath,
meshName);
int nbOfFields = fieldNames.size();
for (int iField = 0; iField < nbOfFields; iField++) {
// to determine the types of spatial discretization defined for
// this field and to chooose one.
- vector<TypeOfField> listOfTypes = MEDLoader::GetTypesOfField(filepath,
+ vector<TypeOfField> listOfTypes = GetTypesOfField(filepath,
meshName,
fieldName);
int nbOfTypes = listOfTypes.size();
// Then, we can get the iterations associated to this field on
// this type of spatial discretization:
std::vector< std::pair<int,int> > fieldIterations =
- MEDLoader::GetFieldIterations(listOfTypes[iType],
+ GetFieldIterations(listOfTypes[iType],
filepath,
meshName,
fieldName);
try {
bool writeFromScratch = true;
- MEDLoader::WriteField(filepath, fieldDouble, writeFromScratch);
+ WriteField(filepath, fieldDouble, writeFromScratch);
writeFromScratch = false;
for(CORBA::ULong i=1; i<fieldIdList.length(); i++) {
fieldHandlerId = fieldIdList[i];
fieldHandler = getFieldHandler(fieldHandlerId);
fieldDouble = getFieldDouble(fieldHandler);
- MEDLoader::WriteField(filepath, fieldDouble, writeFromScratch);
+ WriteField(filepath, fieldDouble, writeFromScratch);
}
}
catch (INTERP_KERNEL::Exception &ex) {
std::string filepath(source_to_file((_datasourceHandlerMap[sourceid])->uri));
const char * meshName = _meshHandlerMap[meshHandlerId]->name;
int meshDimRelToMax = 0;
- myMesh = MEDLoader::ReadUMeshFromFile(filepath,meshName,meshDimRelToMax);
+ myMesh = ReadUMeshFromFile(filepath,meshName,meshDimRelToMax);
_meshMap[meshHandlerId] = myMesh;
}
return myMesh;
LOG("getFieldDouble: field "<<fieldHandler->fieldname<<" loaded from file "<<filepath);
TypeOfField type = (TypeOfField)fieldHandler->type;
int meshDimRelToMax = 0;
- MEDCouplingFieldDouble * myField = MEDLoader::ReadField(type,
+ MEDCouplingFieldDouble * myField = ReadField(type,
filepath,
meshName,
meshDimRelToMax,
throw KERNEL::createSalomeException(message.c_str());
}
-ParaMEDMEM::NatureOfField MEDDataManager_i::_getNatureOfField(const char* fieldNature) {
+MEDCoupling::NatureOfField MEDDataManager_i::_getNatureOfField(const char* fieldNature) {
std::string nature(fieldNature);
if (nature == "NoNature") {
return NoNature;
}
- else if (nature == "ConservativeVolumic") {
- return ConservativeVolumic;
+ else if (nature == "IntensiveMaximum") {
+ return IntensiveMaximum;
}
- else if (nature == "Integral") {
- return Integral;
+ else if (nature == "ExtensiveMaximum") {
+ return ExtensiveMaximum;
}
- else if (nature == "IntegralGlobConstraint") {
- return IntegralGlobConstraint;
+ else if (nature == "ExtensiveConservation") {
+ return ExtensiveConservation;
}
- else if (nature == "RevIntegral") {
- return RevIntegral;
+ else if (nature == "IntensiveConservation") {
+ return IntensiveConservation;
}
std::string message("Error when trying to interpolate field: ");
std::string method(params.method);
double defaultValue = params.defaultValue;
bool reverse = params.reverse;
- ParaMEDMEM::NatureOfField nature = this->_getNatureOfField(params.nature);
+ MEDCoupling::NatureOfField nature = this->_getNatureOfField(params.nature);
// 1. Build remapper between sourceMesh and targetMesh (compute interpolation matrix)
MEDCouplingRemapper remapper;
#include "MEDCouplingRemapper.hxx"
#include "MEDCouplingUMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
/*! This map is used for lifecycle management of fields used in this operator */
#include <map>
long getUMeshId(const MEDCouplingMesh * mesh);
INTERP_KERNEL::IntersectionType _getIntersectionType(const char* intersType);
- ParaMEDMEM::NatureOfField _getNatureOfField(const char* fieldNature);
+ MEDCoupling::NatureOfField _getNatureOfField(const char* fieldNature);
};
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// Authors: A Bruneton (CEA), C Aguerre (EdF)
#include "MEDFactoryClient.hxx"
#include "MEDPresentation.hxx"
+#include "MEDPresentationException.hxx"
#include "MEDCouplingRefCountObject.hxx"
#include <iostream>
-MEDPresentation::MEDPresentation(MEDCALC::FieldHandler* fieldHdl, std::string name)
- : _fieldHandler(fieldHdl), _pipeline(0), _display(0), _properties()
+MEDPresentation::MEDPresentation(MEDPresentation::TypeID fieldHandlerId, const std::string& name)
+ : _fieldHandlerId(fieldHandlerId), _pipeline(0), _display(0), _properties()
{
+ MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
+ MEDCALC::FieldHandler* fieldHandler = dataManager->getFieldHandler(fieldHandlerId);
+ MEDCALC::MeshHandler* meshHandler = dataManager->getMesh(fieldHandler->meshid);
+ MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
+
+ _fileName = dataSHandler->uri;
+ _fieldName = fieldHandler->fieldname;
+ _fieldType = getFieldTypeString((MEDCoupling::TypeOfField) fieldHandler->type);
+
+ if (_fileName.substr(0, 7) != std::string("file://")) {
+ const char* msg = "Data source is not a file! Can not proceed.";
+ throw MEDPresentationException(msg);
+ }
+ _fileName = _fileName.substr(7, _fileName.size());
+
setProperty("name", name);
}
-void MEDPresentation::generatePipeline()
+MEDPresentation::~MEDPresentation()
+{
+ std::cout << "###TODO#### ~MEDPresentation: clear pipeline\n";
+ std::cout << "###TODO#### ~MEDPresentation: clear display\n";
+}
+
+void
+MEDPresentation::generatePipeline()
{
// Might be more complicated in the future:
this->internalGeneratePipeline();
}
-void MEDPresentation::pushInternal(PyObject * obj, PyObject * disp)
+void
+MEDPresentation::pushInternal(PyObject* obj, PyObject* disp)
{
_pipeline.push_back(obj);
_display.push_back(disp);
}
-void MEDPresentation::setProperty(const std::string& propName, const std::string& propValue)
+void
+MEDPresentation::setProperty(const std::string& propName, const std::string& propValue)
{
// LIMITED!!! For now switch the first display element to Wireframe
/*
}
const std::string
-MEDPresentation::getProperty(const std::string& propName)
+MEDPresentation::getProperty(const std::string& propName) const
{
- if (_properties.find(propName) != _properties.end()) {
- return _properties[propName];
+ std::map<std::string, std::string>::const_iterator it = _properties.find(propName);
+ if (it != _properties.end()) {
+ return (*it).second;
}
else {
std::cerr << "getProperty(): no property named " << propName << std::endl;
}
}
-PyObject * MEDPresentation::getPythonObjectFromMain(const char * python_var)
+PyObject*
+MEDPresentation::getPythonObjectFromMain(const char* python_var) const
{
// TODO: improve to avoid getting dict at each call
return PyDict_GetItemString(global_dict, python_var);
}
-std::string MEDPresentation::getFieldTypeString()
+std::string
+MEDPresentation::getFieldTypeString(MEDCoupling::TypeOfField fieldType) const
{
- ParaMEDMEM::TypeOfField typ = (ParaMEDMEM::TypeOfField)_fieldHandler->type;
- switch(typ)
+ switch(fieldType)
{
- case ParaMEDMEM::ON_CELLS:
+ case MEDCoupling::ON_CELLS:
return "CELLS";
- case ParaMEDMEM::ON_NODES:
- return "NODES";
+ case MEDCoupling::ON_NODES:
+ return "POINTS";
default:
std::cerr << "MEDPresentation::getFieldTypeString() -- Not implemented ! Gauss points?";
return "";
}
}
+std::string
+MEDPresentation::getRenderViewCommand(MEDCALC::MEDPresentationViewMode viewMode) const
+{
+ std::string cmd = std::string("pvs._DisableFirstRenderCameraReset();");
+ if (viewMode == MEDCALC::VIEW_MODE_OVERLAP) {
+ cmd += std::string("__view1 = pvs.GetActiveViewOrCreate('RenderView');");
+ } else if (viewMode == MEDCALC::VIEW_MODE_REPLACE) {
+ cmd += std::string("__view1 = pvs.GetActiveViewOrCreate('RenderView');");
+ cmd += std::string("pvs.active_objects.source and pvs.Hide(view=__view1);");
+ cmd += std::string("pvs.Render();");
+ } else if (viewMode == MEDCALC::VIEW_MODE_NEW_LAYOUT) {
+ cmd += std::string("__layout1 = pvs.servermanager.misc.ViewLayout(registrationGroup='layouts');");
+ cmd += std::string("__view1 = pvs.CreateView('RenderView');");
+ } else if (viewMode == MEDCALC::VIEW_MODE_SPLIT_VIEW) {
+ cmd += std::string("__view1 = pvs.CreateView('RenderView');");
+ }
+ return cmd;
+}
-void MEDPresentationScalarMap::internalGeneratePipeline()
+std::string
+MEDPresentation::getResetCameraCommand() const
{
- MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
+ return std::string("__view1.ResetCamera();");
+}
- MEDCALC::MeshHandler* meshHandler = dataManager->getMesh(_fieldHandler->meshid);
- MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
- std::string fileName(dataSHandler->uri);
- std::string fieldName(_fieldHandler->fieldname);
- std::string fieldType = getFieldTypeString();
-
- std::cout << "Generating pipeline for SCALAR MAP:" <<std::endl;
- std::cout << "\tfileName: " << fileName << std::endl;
- std::cout << "\tfiedName: " << fieldName << std::endl;
- if (fileName.substr(0, 7) != std::string("file://"))
- {
- std::cerr << "\tData source is not a file! Can not proceed." << std::endl;
- return;
- }
-
- fileName = fileName.substr(7, fileName.size());
- std::cout << "\tfileName: " << fileName << std::endl;
-
- PyGILState_STATE _gil_state = PyGILState_Ensure();
-
- PyRun_SimpleString("print 'hello world'");
- std::string cmd = std::string(
- "import pvsimple as pvs;"
- "__obj1 = pvs.MEDReader(FileName='") + fileName + std::string("');"
- "__disp1 = pvs.Show(__obj1);"
- "pvs.ColorBy(__disp1, ('") + fieldType + std::string("', '") + fieldName + std::string("'));"
- "pvs.GetActiveViewOrCreate('RenderView').ResetCamera()");
-
- std::cerr << "Python command:" << std::endl;
- std::cerr << cmd << std::endl;
- PyRun_SimpleString(cmd.c_str());
- // Retrieve Python object for internal storage:
- PyObject * obj = getPythonObjectFromMain("__obj1");
- PyObject * disp = getPythonObjectFromMain("__disp1");
- pushInternal(obj, disp);
-
- PyGILState_Release(_gil_state);
-}
\ No newline at end of file
+std::string
+MEDPresentation::getColorMapCommand(MEDCALC::MEDPresentationColorMap colorMap) const
+{
+ switch (colorMap) {
+ case MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW: return "Blue to Red Rainbow";
+ case MEDCALC::COLOR_MAP_COOL_TO_WARM: return "Cool to Warm";
+ }
+}
#ifndef SRC_MEDCALC_CMP_MEDPRESENTATION_HXX_
#define SRC_MEDCALC_CMP_MEDPRESENTATION_HXX_
+#include "MEDCouplingRefCountObject.hxx"
#include <Python.h>
#include "MEDCALC.hxx"
public:
- virtual ~MEDPresentation() {}
+ typedef ::CORBA::Long TypeID;
+
+ virtual ~MEDPresentation();
void setProperty(const std::string& propName, const std::string& propValue);
- const std::string getProperty(const std::string& propName);
- std::string getFieldTypeString();
+ const std::string getProperty(const std::string& propName) const;
protected:
- MEDPresentation(MEDCALC::FieldHandler* fieldHdl, std::string name);
+ MEDPresentation(MEDPresentation::TypeID fieldHandlerId, const std::string& name);
+ std::string getRenderViewCommand(MEDCALC::MEDPresentationViewMode viewMode) const;
+ std::string getResetCameraCommand() const;
+ std::string getColorMapCommand(MEDCALC::MEDPresentationColorMap colorMap) const;
- void generatePipeline();
virtual void internalGeneratePipeline() = 0;
- PyObject * getPythonObjectFromMain(const char * var);
- void pushInternal(PyObject * obj, PyObject * disp = NULL);
+ PyObject* getPythonObjectFromMain(const char* var) const;
+ void pushInternal(PyObject* obj, PyObject* disp = NULL);
+
+ MEDPresentation::TypeID getID() const { return _fieldHandlerId; }
+
+private:
+
+ std::string getFieldTypeString(MEDCoupling::TypeOfField fieldType) const;
+
+ // The following functions are reserved to friend class MEDPresentationManager
+ void generatePipeline();
+
+ template<typename PresentationType, typename PresentationParameters>
+ void updatePipeline(PresentationParameters params);
protected:
- ///! field reference - borrowed.
- MEDCALC::FieldHandler* _fieldHandler;
+ std::string _fileName;
+ std::string _fieldName;
+ std::string _fieldType;
+
+private:
+
+ MEDPresentation::TypeID _fieldHandlerId;
///! Pipeline elements
- std::vector< PyObject * > _pipeline;
+ std::vector<PyObject*> _pipeline;
///! Corresponding display object, if any:
- std::vector< PyObject * > _display;
+ std::vector<PyObject*> _display;
///! Presentation properties <key,value>
std::map<std::string, std::string> _properties;
};
-class MEDCALC_EXPORT MEDPresentationScalarMap : public MEDPresentation
-{
-public:
- MEDPresentationScalarMap(MEDCALC::FieldHandler* fieldHdl, bool wireframe) :
- MEDPresentation(fieldHdl, "MEDPresentationScalarMap"),
- _isWireframe(wireframe)
- {}
- virtual ~MEDPresentationScalarMap() {}
-
-protected:
- virtual void internalGeneratePipeline();
-
-private:
- bool _isWireframe;
-};
+#include "MEDPresentation.txx"
#endif /* SRC_MEDCALC_CMP_MEDPRESENTATION_HXX_ */
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 _MED_PRESENTATION_TXX_
+#define _MED_PRESENTATION_TXX_
+
+template<typename PresentationType, typename PresentationParameters>
+void
+MEDPresentation::updatePipeline(PresentationParameters params)
+{
+ static_cast<PresentationType*>(this)->updatePipeline(params);
+}
+
+#endif // _MED_PRESENTATION_TXX_
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "MEDPresentationContour.hxx"
+
+void
+MEDPresentationContour::internalGeneratePipeline()
+{
+ PyGILState_STATE _gil_state = PyGILState_Ensure();
+
+ std::string cmd = std::string("import pvsimple as pvs;");
+ cmd += getRenderViewCommand(_params.viewMode); // define __view1
+
+ cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
+ cmd += std::string("__isovolume1 = pvs.IsoVolume(Input=__obj1);");
+ cmd += std::string("__disp1 = pvs.Show(__isovolume1, __view1);");
+ cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
+ cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
+ cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
+ cmd += std::string("pvs.Render();");
+
+ cmd += getResetCameraCommand();
+
+ //std::cerr << "Python command:" << std::endl;
+ //std::cerr << cmd << std::endl;
+ PyRun_SimpleString(cmd.c_str());
+ // Retrieve Python object for internal storage:
+ PyObject* obj = getPythonObjectFromMain("__isovolume1");
+ PyObject* disp = getPythonObjectFromMain("__disp1");
+ pushInternal(obj, disp);
+
+ PyGILState_Release(_gil_state);
+}
+
+void
+MEDPresentationContour::updatePipeline(const MEDCALC::ContourParameters& params)
+{
+ // :TODO:
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_CONTOUR_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_CONTOUR_HXX_
+
+#include "MEDCALC.hxx"
+#include "MEDPresentation.hxx"
+
+class MEDCALC_EXPORT MEDPresentationContour : public MEDPresentation
+{
+public:
+ MEDPresentationContour(const MEDCALC::ContourParameters& params) :
+ MEDPresentation(params.fieldHandlerId, "MEDPresentationContour"), _params(params)
+ {}
+ virtual ~MEDPresentationContour() {}
+
+ void updatePipeline(const MEDCALC::ContourParameters& params);
+
+protected:
+ virtual void internalGeneratePipeline();
+
+private:
+ MEDCALC::ContourParameters _params;
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "MEDPresentationDeflectionShape.hxx"
+
+void
+MEDPresentationDeflectionShape::internalGeneratePipeline()
+{
+ PyGILState_STATE _gil_state = PyGILState_Ensure();
+
+ std::string cmd = std::string("import pvsimple as pvs;");
+ cmd += getRenderViewCommand(_params.viewMode); // define __view1
+
+ cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
+ cmd += std::string("__warpByVector1 = pvs.WarpByVector(Input=__obj1);");
+ cmd += std::string("__disp1 = pvs.Show(__warpByVector1, __view1);");
+ cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
+ cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
+ cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
+ cmd += std::string("pvs.Render();");
+
+ cmd += getResetCameraCommand();
+
+ //std::cerr << "Python command:" << std::endl;
+ //std::cerr << cmd << std::endl;
+ PyRun_SimpleString(cmd.c_str());
+ // Retrieve Python object for internal storage:
+ PyObject* obj = getPythonObjectFromMain("__warpByVector1");
+ PyObject* disp = getPythonObjectFromMain("__disp1");
+ pushInternal(obj, disp);
+
+ PyGILState_Release(_gil_state);
+}
+
+void
+MEDPresentationDeflectionShape::updatePipeline(const MEDCALC::DeflectionShapeParameters& params)
+{
+ // :TODO:
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_DEFLECTIONSHAPE_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_DEFLECTIONSHAPE_HXX_
+
+#include "MEDCALC.hxx"
+#include "MEDPresentation.hxx"
+
+class MEDCALC_EXPORT MEDPresentationDeflectionShape : public MEDPresentation
+{
+public:
+ MEDPresentationDeflectionShape(const MEDCALC::DeflectionShapeParameters& params) :
+ MEDPresentation(params.fieldHandlerId, "MEDPresentationDeflectionShape"), _params(params)
+ {}
+ virtual ~MEDPresentationDeflectionShape() {}
+
+ void updatePipeline(const MEDCALC::DeflectionShapeParameters& params);
+
+protected:
+ virtual void internalGeneratePipeline();
+
+private:
+ MEDCALC::DeflectionShapeParameters _params;
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2011-2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_EXCEPTION_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_EXCEPTION_HXX_
+
+#include "MEDCALC.hxx"
+#include <iostream>
+#include <sstream>
+#include <exception>
+
+class MEDCALC_EXPORT MEDPresentationException
+ : public std::exception
+{
+public:
+
+ MEDPresentationException(const char* msg) {
+ std::ostringstream oss;
+ oss << "Error: " << msg;
+ this->_msg = oss.str();
+ }
+
+ virtual ~MEDPresentationException() throw() {}
+
+ virtual const char* what() const throw() {
+ return this->_msg.c_str();
+ }
+
+private:
+
+ std::string _msg;
+
+};
+
+#endif /* SRC_MEDCALC_CMP_MEDPRESENTATION_EXCEPTION_HXX_ */
#include "MEDPresentationManager_i.hxx"
#include "MEDFactoryClient.hxx"
-#include "MEDPresentation.hxx"
+
+// presentations
+#include "MEDPresentationScalarMap.hxx"
+#include "MEDPresentationContour.hxx"
+#include "MEDPresentationVectorField.hxx"
+#include "MEDPresentationSlices.hxx"
+#include "MEDPresentationDeflectionShape.hxx"
+#include "MEDPresentationPointSprite.hxx"
+
+#include <iostream>
MEDPresentationManager_i* MEDPresentationManager_i::_instance = NULL;
*/
}
-TypeID MEDPresentationManager_i::GenerateID()
+MEDPresentation::TypeID
+MEDPresentationManager_i::GenerateID()
{
- static TypeID START_ID = -1;
+ static MEDPresentation::TypeID START_ID = -1;
START_ID++;
return START_ID;
}
-#include <iostream>
+MEDPresentation*
+MEDPresentationManager_i::_getPresentation(MEDPresentation::TypeID presentationID) const
+{
+ std::map<MEDPresentation::TypeID, MEDPresentation*>::const_iterator citr = _presentations.find(presentationID);
+ if (citr == _presentations.end())
+ return NULL;
+ return (*citr).second;
+}
void
-MEDPresentationManager_i::setPresentationProperty(TypeID presentationID, const char * propName, const char * propValue)
+MEDPresentationManager_i::setPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue)
{
- if (_presentations.find(presentationID) != _presentations.end())
- {
- MEDPresentation * pres(_presentations[presentationID]);
- pres->setProperty(propName, propValue);
- }
+ MEDPresentation* pres = _getPresentation(presentationID);
+ if (pres)
+ pres->setProperty(propName, propValue);
else
- {
- std::cerr << "setPresentationProperty(): presentation not found!!" << std::endl;
- }
+ std::cerr << "setPresentationProperty(): presentation not found!!" << std::endl;
}
char*
-MEDPresentationManager_i::getPresentationProperty(TypeID presentationID, const char* propName)
+MEDPresentationManager_i::getPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName)
{
- if (_presentations.find(presentationID) != _presentations.end()) {
- MEDPresentation* pres = _presentations[presentationID];
+ MEDPresentation* pres = _getPresentation(presentationID);
+ if (pres) {
return (char*) pres->getProperty(propName).c_str();
}
else {
}
}
-TypeID
+MEDPresentation::TypeID
MEDPresentationManager_i::makeScalarMap(const MEDCALC::ScalarMapParameters& params)
{
- MEDCALC::MEDDataManager_ptr dataManager(MEDFactoryClient::getDataManager());
+ return _makePresentation<MEDPresentationScalarMap>(params);
+}
+
+MEDPresentation::TypeID
+MEDPresentationManager_i::makeContour(const MEDCALC::ContourParameters& params)
+{
+ return _makePresentation<MEDPresentationContour>(params);
+}
+
+MEDPresentation::TypeID
+MEDPresentationManager_i::makeVectorField(const MEDCALC::VectorFieldParameters& params)
+{
+ return _makePresentation<MEDPresentationVectorField>(params);
+}
- TypeID fieldHandlerId = params.fieldHandlerId;
- MEDCALC::MEDPresentationViewMode viewMode = params.viewMode;
+MEDPresentation::TypeID
+MEDPresentationManager_i::makeSlices(const MEDCALC::SlicesParameters& params)
+{
+ return _makePresentation<MEDPresentationSlices>(params);
+}
- MEDCALC::FieldHandler* fieldHandler = dataManager->getFieldHandler(fieldHandlerId);
- MEDCALC::MeshHandler* meshHandler = dataManager->getMesh(fieldHandler->meshid);
- MEDCALC::DatasourceHandler* dataSHandler = dataManager->getDatasourceHandlerFromID(meshHandler->sourceid);
+MEDPresentation::TypeID
+MEDPresentationManager_i::makeDeflectionShape(const MEDCALC::DeflectionShapeParameters& params)
+{
+ return _makePresentation<MEDPresentationDeflectionShape>(params);
+}
- std::cout << "\tfieldHandlerId: " << fieldHandlerId << std::endl;
- std::cout << "\tviewMode: " << viewMode << std::endl;
- std::cout << "\tfileName: " << dataSHandler->uri << std::endl;
- std::cout << "\tfiedName: " << fieldHandler->fieldname << std::endl;
+MEDPresentation::TypeID
+MEDPresentationManager_i::makePointSprite(const MEDCALC::PointSpriteParameters& params)
+{
+ return _makePresentation<MEDPresentationPointSprite>(params);
+}
- // Create a new presentation instance
- TypeID newID = MEDPresentationManager_i::GenerateID();
- MEDPresentationScalarMap * scalarMap = new MEDPresentationScalarMap(fieldHandler, true); // on stack or on heap?? stack for now
- _presentations.insert( std::pair<TypeID, MEDPresentation *>(newID, scalarMap) );
+void
+MEDPresentationManager_i::updateScalarMap(MEDPresentation::TypeID presentationID, const MEDCALC::ScalarMapParameters& params)
+{
+ return _updatePresentation<MEDPresentationScalarMap>(presentationID, params);
+}
- scalarMap->generatePipeline();
+void
+MEDPresentationManager_i::updateContour(MEDPresentation::TypeID presentationID, const MEDCALC::ContourParameters& params)
+{
+ return _updatePresentation<MEDPresentationContour>(presentationID, params);
+}
+
+void
+MEDPresentationManager_i::updateVectorField(MEDPresentation::TypeID presentationID, const MEDCALC::VectorFieldParameters& params)
+{
+ return _updatePresentation<MEDPresentationVectorField>(presentationID, params);
+}
+
+void
+MEDPresentationManager_i::updateSlices(MEDPresentation::TypeID presentationID, const MEDCALC::SlicesParameters& params)
+{
+ return _updatePresentation<MEDPresentationSlices>(presentationID, params);
+}
+
+void
+MEDPresentationManager_i::updateDeflectionShape(MEDPresentation::TypeID presentationID, const MEDCALC::DeflectionShapeParameters& params)
+{
+ return _updatePresentation<MEDPresentationDeflectionShape>(presentationID, params);
+}
+
+void
+MEDPresentationManager_i::updatePointSprite(MEDPresentation::TypeID presentationID, const MEDCALC::PointSpriteParameters& params)
+{
+ return _updatePresentation<MEDPresentationPointSprite>(presentationID, params);
+}
+
+CORBA::Boolean
+MEDPresentationManager_i::removePresentation(MEDPresentation::TypeID presentationID)
+{
+ std::map<MEDPresentation::TypeID, MEDPresentation*>::const_iterator citr = _presentations.find(presentationID);
+ if (citr == _presentations.end()) {
+ std::cerr << "removePresentation(): presentation not found!!" << std::endl;
+ return false;
+ }
+ MEDPresentation* presentation = (*citr).second;
+ if (presentation)
+ delete presentation;
+ _presentations.erase(presentationID);
+ return true;
+}
+
+MEDPresentation::TypeID
+MEDPresentationManager_i::_getActivePresentationId() const
+{
+ // :TODO:
- return newID;
+ return -1;
}
#include "SALOME_GenericObj_i.hh"
#include "MEDDataManager_i.hxx"
+#include "MEDPresentation.hxx"
#include "MEDCALC.hxx"
#include <vector>
#include <string>
-typedef ::CORBA::Long TypeID;
-
-class MEDPresentation;
-
class MEDPresentationManager_i: public POA_MEDCALC::MEDPresentationManager,
public SALOME::GenericObj_i
{
static MEDPresentationManager_i* getInstance();
- MEDCALC_EXPORT TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&);
- MEDCALC_EXPORT void setPresentationProperty(TypeID presentationID, const char * propName, const char * propValue);
- MEDCALC_EXPORT char* getPresentationProperty(TypeID presentationID, const char* propName);
+ MEDCALC_EXPORT MEDPresentation::TypeID makeScalarMap(const MEDCALC::ScalarMapParameters&);
+ MEDCALC_EXPORT MEDPresentation::TypeID makeContour(const MEDCALC::ContourParameters&);
+ MEDCALC_EXPORT MEDPresentation::TypeID makeVectorField(const MEDCALC::VectorFieldParameters&);
+ MEDCALC_EXPORT MEDPresentation::TypeID makeSlices(const MEDCALC::SlicesParameters&);
+ MEDCALC_EXPORT MEDPresentation::TypeID makeDeflectionShape(const MEDCALC::DeflectionShapeParameters&);
+ MEDCALC_EXPORT MEDPresentation::TypeID makePointSprite(const MEDCALC::PointSpriteParameters&);
+
+ MEDCALC_EXPORT void setPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName, const char* propValue);
+ MEDCALC_EXPORT char* getPresentationProperty(MEDPresentation::TypeID presentationID, const char* propName);
+
+ MEDCALC_EXPORT void updateScalarMap(MEDPresentation::TypeID presentationID, const MEDCALC::ScalarMapParameters&);
+ MEDCALC_EXPORT void updateContour(MEDPresentation::TypeID presentationID, const MEDCALC::ContourParameters&);
+ MEDCALC_EXPORT void updateVectorField(MEDPresentation::TypeID presentationID, const MEDCALC::VectorFieldParameters&);
+ MEDCALC_EXPORT void updateSlices(MEDPresentation::TypeID presentationID, const MEDCALC::SlicesParameters&);
+ MEDCALC_EXPORT void updateDeflectionShape(MEDPresentation::TypeID presentationID, const MEDCALC::DeflectionShapeParameters&);
+ MEDCALC_EXPORT void updatePointSprite(MEDPresentation::TypeID presentationID, const MEDCALC::PointSpriteParameters&);
+
+ MEDCALC_EXPORT CORBA::Boolean removePresentation(MEDPresentation::TypeID presentationID);
private:
MEDPresentationManager_i();
virtual ~MEDPresentationManager_i();
+ static MEDPresentation::TypeID GenerateID();
+
+ // Create a new presentation instance and return its unique ID
+ template<typename PresentationType, typename PresentationParameters>
+ MEDPresentation::TypeID _makePresentation(PresentationParameters params);
+
+ // Update presentation
+ template<typename PresentationType, typename PresentationParameters>
+ void _updatePresentation(MEDPresentation::TypeID presentationID, PresentationParameters params);
+
+ MEDPresentation* _getPresentation(MEDPresentation::TypeID) const;
+ MEDPresentation::TypeID _getActivePresentationId() const;
+
private :
// The MEDPresentationManager is a singleton, whose instance can be obtained
// using the getInstance static method.
- static MEDPresentationManager_i * _instance;
- static TypeID GenerateID();
+ static MEDPresentationManager_i* _instance;
// Owns a list of MEDPresentation objects
- std::map< TypeID, MEDPresentation * > _presentations;
+ std::map<MEDPresentation::TypeID, MEDPresentation*> _presentations;
};
+#include "MEDPresentationManager_i.txx"
+
#endif // _MED_PRESENTATION_MANAGER_I_HXX_
--- /dev/null
+// Copyright (C) 2007-2016 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, or (at your option) any later version.
+//
+// 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 _MED_PRESENTATION_MANAGER_I_TXX_
+#define _MED_PRESENTATION_MANAGER_I_TXX_
+
+template<typename PresentationType, typename PresentationParameters>
+MEDPresentation::TypeID
+MEDPresentationManager_i::_makePresentation(PresentationParameters params)
+{
+ // Replace = Remove then add
+ if (params.viewMode == MEDCALC::VIEW_MODE_REPLACE) {
+ MEDPresentation::TypeID currentPresentationId = _getActivePresentationId();
+ if (currentPresentationId > -1)
+ removePresentation(currentPresentationId);
+ }
+
+ // Create a new presentation instance
+ PresentationType* presentation = NULL;
+ try {
+ presentation = new PresentationType(params); // on stack or on heap?? stack for now
+ }
+ catch (const std::exception& e) {
+ std::cerr << e.what() << std::endl;
+ return -1;
+ }
+
+ MEDPresentation::TypeID newID = MEDPresentationManager_i::GenerateID();
+ _presentations.insert( std::pair<MEDPresentation::TypeID, MEDPresentation *>(newID, presentation) );
+ presentation->generatePipeline();
+ return newID;
+}
+
+template<typename PresentationType, typename PresentationParameters>
+void
+MEDPresentationManager_i::_updatePresentation(MEDPresentation::TypeID presentationID, PresentationParameters params)
+{
+ MEDPresentation* presentation = _getPresentation(presentationID);
+ if (!presentation) {
+ std::cerr << "_updatePresentation(): presentation not found!!" << std::endl;
+ return;
+ }
+
+ presentation->updatePipeline<PresentationType>(params);
+}
+
+#endif // _MED_PRESENTATION_MANAGER_I_TXX_
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "MEDPresentationPointSprite.hxx"
+
+void
+MEDPresentationPointSprite::internalGeneratePipeline()
+{
+ PyGILState_STATE _gil_state = PyGILState_Ensure();
+
+ std::string cmd = std::string("import pvsimple as pvs;");
+ cmd += getRenderViewCommand(_params.viewMode); // define __view1
+
+ cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
+ cmd += std::string("__disp1 = pvs.Show(__obj1, __view1);");
+ cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
+ cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
+ cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
+ cmd += std::string("__disp1.SetRepresentationType('Point Sprite');");
+ cmd += std::string("pvs.Render();");
+
+ cmd += getResetCameraCommand();
+
+ //std::cerr << "Python command:" << std::endl;
+ //std::cerr << cmd << std::endl;
+ PyRun_SimpleString(cmd.c_str());
+ // Retrieve Python object for internal storage:
+ PyObject* obj = getPythonObjectFromMain("__obj1");
+ PyObject* disp = getPythonObjectFromMain("__disp1");
+ pushInternal(obj, disp);
+
+ PyGILState_Release(_gil_state);
+}
+
+void
+MEDPresentationPointSprite::updatePipeline(const MEDCALC::PointSpriteParameters& params)
+{
+ // :TODO:
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_POINTSPRITE_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_POINTSPRITE_HXX_
+
+#include "MEDCALC.hxx"
+#include "MEDPresentation.hxx"
+
+class MEDCALC_EXPORT MEDPresentationPointSprite : public MEDPresentation
+{
+public:
+ MEDPresentationPointSprite(const MEDCALC::PointSpriteParameters& params) :
+ MEDPresentation(params.fieldHandlerId, "MEDPresentationPointSprite"), _params(params)
+ {}
+ virtual ~MEDPresentationPointSprite() {}
+
+ void updatePipeline(const MEDCALC::PointSpriteParameters& params);
+
+protected:
+ virtual void internalGeneratePipeline();
+
+private:
+ MEDCALC::PointSpriteParameters _params;
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "MEDPresentationScalarMap.hxx"
+
+void
+MEDPresentationScalarMap::internalGeneratePipeline()
+{
+ PyGILState_STATE _gil_state = PyGILState_Ensure();
+
+ std::string cmd = std::string("import pvsimple as pvs;");
+ cmd += getRenderViewCommand(_params.viewMode); // define __view1
+
+ cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
+ cmd += std::string("__disp1 = pvs.Show(__obj1, __view1);");
+ cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
+ cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
+ cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
+ cmd += std::string("__lut = pvs.GetColorTransferFunction('")+_fieldName+std::string("');");
+ cmd += std::string("__lut.ApplyPreset('")+getColorMapCommand(_params.colorMap)+std::string("',True);");
+ cmd += std::string("pvs.Render();");
+
+ cmd += getResetCameraCommand();
+
+ //std::cerr << "Python command:" << std::endl;
+ //std::cerr << cmd << std::endl;
+ PyRun_SimpleString(cmd.c_str());
+ // Retrieve Python object for internal storage:
+ PyObject* obj = getPythonObjectFromMain("__obj1");
+ PyObject* disp = getPythonObjectFromMain("__disp1");
+ pushInternal(obj, disp);
+
+ PyGILState_Release(_gil_state);
+}
+
+void
+MEDPresentationScalarMap::updatePipeline(const MEDCALC::ScalarMapParameters& params)
+{
+ // :TODO:
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_SCALARMAP_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_SCALARMAP_HXX_
+
+#include "MEDCALC.hxx"
+#include "MEDPresentation.hxx"
+
+class MEDCALC_EXPORT MEDPresentationScalarMap : public MEDPresentation
+{
+public:
+ MEDPresentationScalarMap(const MEDCALC::ScalarMapParameters& params) :
+ MEDPresentation(params.fieldHandlerId, "MEDPresentationScalarMap"), _params(params)
+ {}
+ virtual ~MEDPresentationScalarMap() {}
+
+ void updatePipeline(const MEDCALC::ScalarMapParameters& params);
+
+protected:
+ virtual void internalGeneratePipeline();
+
+private:
+ MEDCALC::ScalarMapParameters _params;
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "MEDPresentationSlices.hxx"
+
+void
+MEDPresentationSlices::internalGeneratePipeline()
+{
+ PyGILState_STATE _gil_state = PyGILState_Ensure();
+
+ std::string cmd = std::string("import pvsimple as pvs;");
+ cmd += getRenderViewCommand(_params.viewMode); // define __view1
+
+ cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
+ cmd += std::string("__slice1 = pvs.Slice(Input=__obj1);");
+ cmd += std::string("__disp1 = pvs.Show(__slice1, __view1);");
+ cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
+ cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
+ cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
+ cmd += std::string("pvs.Render();");
+
+ cmd += getResetCameraCommand();
+
+ //std::cerr << "Python command:" << std::endl;
+ //std::cerr << cmd << std::endl;
+ PyRun_SimpleString(cmd.c_str());
+ // Retrieve Python object for internal storage:
+ PyObject* obj = getPythonObjectFromMain("__slice1");
+ PyObject* disp = getPythonObjectFromMain("__disp1");
+ pushInternal(obj, disp);
+
+ PyGILState_Release(_gil_state);
+}
+
+void
+MEDPresentationSlices::updatePipeline(const MEDCALC::SlicesParameters& params)
+{
+ // :TODO:
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_SLICES_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_SLICES_HXX_
+
+#include "MEDCALC.hxx"
+#include "MEDPresentation.hxx"
+
+class MEDCALC_EXPORT MEDPresentationSlices : public MEDPresentation
+{
+public:
+ MEDPresentationSlices(const MEDCALC::SlicesParameters& params) :
+ MEDPresentation(params.fieldHandlerId, "MEDPresentationSlices"), _params(params)
+ {}
+ virtual ~MEDPresentationSlices() {}
+
+ void updatePipeline(const MEDCALC::SlicesParameters& params);
+
+protected:
+ virtual void internalGeneratePipeline();
+
+private:
+ MEDCALC::SlicesParameters _params;
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "MEDPresentationVectorField.hxx"
+
+void
+MEDPresentationVectorField::internalGeneratePipeline()
+{
+ PyGILState_STATE _gil_state = PyGILState_Ensure();
+
+ std::string cmd = std::string("import pvsimple as pvs;");
+ cmd += getRenderViewCommand(_params.viewMode); // define __view1
+
+ cmd += std::string("__obj1 = pvs.MEDReader(FileName='") + _fileName + std::string("');");
+ cmd += std::string("__disp1 = pvs.Show(__obj1, __view1);");
+ cmd += std::string("pvs.ColorBy(__disp1, ('") + _fieldType + std::string("', '") + _fieldName + std::string("'));");
+ cmd += std::string("__disp1.SetScalarBarVisibility(__view1, True);");
+ cmd += std::string("__disp1.RescaleTransferFunctionToDataRangeOverTime();");
+ cmd += std::string("__disp1.SetRepresentationType('3D Glyphs');");
+ cmd += std::string("pvs.Render();");
+
+ cmd += getResetCameraCommand();
+
+ //std::cerr << "Python command:" << std::endl;
+ //std::cerr << cmd << std::endl;
+ PyRun_SimpleString(cmd.c_str());
+ // Retrieve Python object for internal storage:
+ PyObject* obj = getPythonObjectFromMain("__obj1");
+ PyObject* disp = getPythonObjectFromMain("__disp1");
+ pushInternal(obj, disp);
+
+ PyGILState_Release(_gil_state);
+}
+
+void
+MEDPresentationVectorField::updatePipeline(const MEDCALC::VectorFieldParameters& params)
+{
+ // :TODO:
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 SRC_MEDCALC_CMP_MEDPRESENTATION_VECTORFIELD_HXX_
+#define SRC_MEDCALC_CMP_MEDPRESENTATION_VECTORFIELD_HXX_
+
+#include "MEDCALC.hxx"
+#include "MEDPresentation.hxx"
+
+class MEDCALC_EXPORT MEDPresentationVectorField : public MEDPresentation
+{
+public:
+ MEDPresentationVectorField(const MEDCALC::VectorFieldParameters& params) :
+ MEDPresentation(params.fieldHandlerId, "MEDPresentationVectorField"), _params(params)
+ {}
+ virtual ~MEDPresentationVectorField() {}
+
+ void updatePipeline(const MEDCALC::VectorFieldParameters& params);
+
+protected:
+ virtual void internalGeneratePipeline();
+
+private:
+ MEDCALC::VectorFieldParameters _params;
+};
+
+#endif
#
ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-INCLUDE(${QT_USE_FILE})
SET(QT_LIBS "${QT_LIBRARIES}")
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
ADD_SUBDIRECTORY(dialogs)
-SET(MEDCALCGUI_SOURCES
- XmedConsoleDriver.cxx
- WorkspaceController.cxx
- XmedDataModel.cxx
- MEDEventListener_i.cxx
- MEDModule.cxx
- DatasourceController.cxx
- factory.cxx
-)
+FILE(GLOB MEDCALCGUI_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cxx")
-SET(MEDCALCGUI_HEADERS MEDModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx)
+SET(MEDCALCGUI_HEADERS
+ MEDModule.hxx
+ MEDEventListener_i.hxx
+ WorkspaceController.hxx
+ DatasourceController.hxx
+ PresentationController.hxx
+ ProcessingController.hxx
+ )
+QT_WRAP_MOC(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS})
-QT4_WRAP_CPP(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS})
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${GUI_INCLUDE_DIRS}
+ ${MEDCOUPLING_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/dialogs
${CMAKE_CURRENT_BINARY_DIR}/dialogs
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/../cmp
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDGUI
${PROJECT_BINARY_DIR}/idl
TARGET_LINK_LIBRARIES(MEDCALCGUI ${COMMON_FLAGS})
INSTALL(TARGETS MEDCALCGUI DESTINATION ${SALOME_INSTALL_LIBS})
-QT4_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${MEDCALCGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+++ /dev/null
-// Copyright (C) 2007-2016 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, or (at your option) any later version.
-//
-// 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
-//
-
-// This constant strings are used to specify an attribute name for
-// AttributeParameter attributes associated to a SObject
-#define OBJECT_ID "objectid"
-#define OBJECT_IS_IN_WORKSPACE "isInWorkspace"
// Author : Guillaume Boulant (EDF)
#include "DatasourceController.hxx"
-#include "DatasourceConstants.hxx"
+#include <MEDCalcConstants.hxx>
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
// Datasource controller
// ==============================================================
//
-//DatasourceController::DatasourceController(StandardApp_Module * salomeModule)
-DatasourceController::DatasourceController(MEDModule * salomeModule)
+DatasourceController::DatasourceController(MEDModule* salomeModule)
{
STDLOG("Creating a DatasourceController");
_salomeModule = salomeModule;
- _studyEditor = new SALOME_AppStudyEditor(_salomeModule->getApp());
-
- _dlgChangeUnderlyingMesh = new DlgChangeUnderlyingMesh(_studyEditor);
- connect(_dlgChangeUnderlyingMesh,SIGNAL(inputValidated()),
- this, SLOT(OnChangeUnderlyingMeshInputValidated()));
-
- _dlgInterpolateField = new DlgInterpolateField(_studyEditor);
- connect(_dlgInterpolateField,SIGNAL(inputValidated()),
- this, SLOT(OnInterpolateFieldInputValidated()));
-
+ _studyEditor = _salomeModule->getStudyEditor();
}
DatasourceController::~DatasourceController() {
STDLOG("Deleting the DatasourceController");
- delete _studyEditor;
}
void DatasourceController::createActions() {
- //QWidget* dsk = _salomeModule->getApp()->desktop();
- //SUIT_ResourceMgr* resMgr = _salomeModule->getApp()->resourceMgr();
int toolbarId = _salomeModule->createTool("Datasource", "DatasourceToolbar");
//
QString icon = tr("ICO_DATASOURCE_ADD");
int actionId;
actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddDatasource()),icon,tooltip);
- //_salomeModule->addActionInToolbar(actionId);
_salomeModule->createTool(actionId, toolbarId);
// This action has to be placed in the general file menu with the label "Import MED file"
int menuId = _salomeModule->createMenu( tr( "MEN_FILE" ), -1, 1 );
- //_salomeModule->addActionInMenubar(actionId, menuId);
_salomeModule->action(actionId)->setIconVisibleInMenu(true);
_salomeModule->createMenu(actionId, menuId, 10);
tooltip = tr("TIP_ADD_IMAGE_SOURCE");
icon = tr("ICO_IMAGE_ADD");
actionId = _salomeModule->createStandardAction(label,this, SLOT(OnAddImagesource()),icon,tooltip);
- // _salomeModule->addActionInToolbar(actionId);
_salomeModule->createTool(actionId, toolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, menuId, 20);
//
// Actions for popup menu only
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnExpandField()),icon);
_salomeModule->addActionInPopupMenu(actionId);
- // Create a view submenu with usual visualization functions
- label = tr("LAB_VISUALIZE_SCALARMAP");
- icon = tr("ICO_DATASOURCE_VIEW");
- actionId = _salomeModule->createStandardAction(label,this,SLOT(OnVisualizeScalarMap()),icon);
- _salomeModule->addActionInPopupMenu(actionId, tr("LAB_VISUALIZE"));
-
// Use in workspace
label = tr("LAB_USE_IN_WORKSPACE");
icon = tr("ICO_DATASOURCE_USE");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnUseInWorkspace()),icon);
_salomeModule->addActionInPopupMenu(actionId);
-
- // Change underlying mesh (note that this action creates a new field in
- // the workspace that corresponds to a copy of the selected field
- // modified by the change of the underlying mesh.
- label = tr("LAB_CHANGE_MESH");
- icon = tr("ICO_DATASOURCE_CHANGE_MESH");
- actionId = _salomeModule->createStandardAction(label,this,SLOT(OnChangeUnderlyingMesh()),icon);
- _salomeModule->addActionInPopupMenu(actionId);
-
- label = tr("LAB_INTERPOLATE_FIELD");
- icon = tr("ICO_DATASOURCE_INTERPOLATE_FIELD");
- actionId = _salomeModule->createStandardAction(label,this,SLOT(OnInterpolateField()),icon);
- _salomeModule->addActionInPopupMenu(actionId);
}
/**
_salomeModule->getApp()->updateObjectBrowser(true);
}
-void
-DatasourceController::updateTreeViewWithNewPresentation(long fieldId, long presentationId)
-{
- if (presentationId < 0) {
- std::cerr << "Unknown presentation\n";
- return;
- }
-
- std::string name = MEDFactoryClient::getPresentationManager()->getPresentationProperty(presentationId, "name");
- name = tr(name.c_str()).toStdString();
- std::string label = tr("ICO_MED_PRESENTATION").toStdString();
-
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
- _PTR(Study) studyDS = study->studyDS();
-
- _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId, name.c_str(), label.c_str());
-
- // update Object browser
- _salomeModule->getApp()->updateObjectBrowser(true);
-}
-
void DatasourceController::OnAddDatasource()
{
// Dialog to get the filename where the input data are read from
}
#include "DlgImageToMed.hxx"
-//#include <stdio.h>
-//#include <stdlib.h>
void DatasourceController::OnAddImagesource()
{
_studyEditor->updateActiveStudy();
// Get the selected objects in the study (SObject)
- SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
+ SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soFieldseries = listOfSObject->at(i);
// First retrieve the fieldseries id associated to this study object
- long fieldseriesId = _studyEditor->getParameterInt(soFieldseries,OBJECT_ID);
+ //long fieldseriesId = _studyEditor->getParameterInt(soFieldseries,FIELD_SERIES_ID);
+ long fieldseriesId = _studyEditor->getParameterInt(soFieldseries,FIELD_ID);
STDLOG("Expand the field timeseries "<<fieldseriesId);
// If fieldseriesId equals -1, then it means that it is not a
// contextual menu if the selected object is not conform
// Then retrieve the list of fields in this timeseries
- MEDCALC::FieldHandlerList * fieldHandlerList =
+ MEDCALC::FieldHandlerList* fieldHandlerList =
MEDFactoryClient::getDataManager()->getFieldListInFieldseries(fieldseriesId);
// Finally, create an entry for each of the field
SALOMEDS::SObject_var soField = _studyEditor->newObject(soFieldseries);
std::string label("it="); label += ToString(fieldHandler.iteration);
_studyEditor->setName(soField,label.c_str());
- _studyEditor->setParameterInt(soField, OBJECT_ID, fieldHandler.id);
- _studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,false);
+ _studyEditor->setParameterInt(soField, FIELD_ID, fieldHandler.id);
+ _studyEditor->setParameterBool(soField,IS_IN_WORKSPACE,false);
}
}
_salomeModule->updateObjBrowser(true);
}
-void DatasourceController::visualize(DatasourceEvent::EventType eventType) {
- // We need a _studyEditor updated on the active study
- _studyEditor->updateActiveStudy();
-
- // Get the selected objects in the study (SObject)
- SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
-
- // For each object, emit a signal to the workspace to request a
- // visualisation using the tui command (so that the user can see how
- // to make a view of an object from the tui console).
- for (int i=0; i<listOfSObject->size(); i++) {
- SALOMEDS::SObject_var soField = listOfSObject->at(i);
- int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
- // If fieldId equals -1, then it means that it is not a field
- // managed by the MED module, and we stop this function process.
- if ( fieldId < 0 )
- continue;
-
- MEDCALC::FieldHandler * fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
- if (! fieldHandler) {
- QMessageBox::warning(_salomeModule->getApp()->desktop(),
- tr("Operation not allowed"),
- tr("No field is defined"));
- return;
- }
-
- DatasourceEvent * event = new DatasourceEvent();
- event->eventtype = eventType;
- XmedDataObject * dataObject = new XmedDataObject();
- dataObject->setFieldHandler(*fieldHandler);
- event->objectdata = dataObject;
- emit datasourceSignal(event);
- }
-}
-
-void DatasourceController::OnVisualizeScalarMap() {
- this->visualize(DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP);
-}
-
void DatasourceController::OnUseInWorkspace() {
// We need a studyEditor updated on the active study
_studyEditor->updateActiveStudy();
// Get the selected objects in the study (SObject)
- SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
+ SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
if ( listOfSObject->size() == 1 ) {
// In this case we ask the name of the variable for the python
// console
SALOMEDS::SObject_var soField = listOfSObject->at(0);
- bool isInWorkspace = _studyEditor->getParameterBool(soField,OBJECT_IS_IN_WORKSPACE);
+ bool isInWorkspace = _studyEditor->getParameterBool(soField,IS_IN_WORKSPACE);
if ( isInWorkspace ) {
QMessageBox::warning(_salomeModule->getApp()->desktop(),
tr("Operation not allowed"),
return;
}
- int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
+ int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
// If fieldId equals -1, then it means that it is not a field
// managed by the MED module, and we stop this function process.
return;
}
- MEDCALC::FieldHandler * fieldHandler =
+ MEDCALC::FieldHandler* fieldHandler =
MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
if (! fieldHandler) {
}
alias = dialog.getAlias();
- DatasourceEvent * event = new DatasourceEvent();
+ DatasourceEvent* event = new DatasourceEvent();
event->eventtype = DatasourceEvent::EVENT_USE_OBJECT;
- XmedDataObject * dataObject = new XmedDataObject();
+ XmedDataObject* dataObject = new XmedDataObject();
dataObject->setFieldHandler(*fieldHandler);
event->objectdata = dataObject;
event->objectalias = alias;
emit datasourceSignal(event);
// Tag the item to prevent double import
- // _studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
+ // _studyEditor->setParameterBool(soField,IS_IN_WORKSPACE,true);
// Tag the field as persistent on the server. It means that a
// saving of the workspace will save at least this field (maybe it
// should be an option?)
for (int i=0; i<listOfSObject->size(); i++) {
SALOMEDS::SObject_var soField = listOfSObject->at(i);
- bool isInWorkspace = _studyEditor->getParameterBool(soField,OBJECT_IS_IN_WORKSPACE);
+ bool isInWorkspace = _studyEditor->getParameterBool(soField,IS_IN_WORKSPACE);
if ( !isInWorkspace ) {
- int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
- MEDCALC::FieldHandler * fieldHandler =
+ int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ MEDCALC::FieldHandler* fieldHandler =
MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
- DatasourceEvent * event = new DatasourceEvent();
+ DatasourceEvent* event = new DatasourceEvent();
event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT;
- XmedDataObject * dataObject = new XmedDataObject();
+ XmedDataObject* dataObject = new XmedDataObject();
dataObject->setFieldHandler(*fieldHandler);
event->objectdata = dataObject;
emit datasourceSignal(event);
// Note that this signal is processed by the WorkspaceController
// Tag the item to prevent double import
- // _studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
+ // _studyEditor->setParameterBool(soField,IS_IN_WORKSPACE,true);
// Tag the field as persistent on the server. It means that a
// saving of the workspace will save at least this field (maybe it
// should be an option?)
}
}
-void DatasourceController::OnChangeUnderlyingMesh() {
- // We need a studyEditor updated on the active study
- _studyEditor->updateActiveStudy();
-
- // Get the selected objects in the study (SObject). In cas of a
- // multiple selection, we consider only the first item. At least one
- // item must be selected.
- SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
- if ( listOfSObject->size() > 0 ) {
- SALOMEDS::SObject_var soField = listOfSObject->at(0);
- int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
- // _GBO_ : the dialog should not be modal, so that we can choose a
- // mesh in the browser. Then we have to emit a signal from the
- // dialog.accept, connected to a slot of the DatasourceControler
- _dlgChangeUnderlyingMesh->setFieldId(fieldId);
- Qt::WindowFlags flags = _dlgChangeUnderlyingMesh->windowFlags();
- _dlgChangeUnderlyingMesh->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint);
- _dlgChangeUnderlyingMesh->open();
- }
-}
-
-void DatasourceController::OnChangeUnderlyingMeshInputValidated() {
- int meshId = _dlgChangeUnderlyingMesh->getMeshId();
- STDLOG("meshId = " << ToString(meshId));
- int fieldId = _dlgChangeUnderlyingMesh->getFieldId();
- MEDCALC::FieldHandler * fieldHandler =
- MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
-
- // We don't modify the original field but create first a duplicate
- MEDCALC::FieldHandler * duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler);
- MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId);
-
- // Request once more the duplicate to update the meta-data on this
- // client side
- duplicate = MEDFactoryClient::getDataManager()->getFieldHandler(duplicate->id);
-
- // >>>
- // WARN: the following is a temporary code for test purpose
- // Automatically add in ws
- DatasourceEvent * event = new DatasourceEvent();
- event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT;
- XmedDataObject * dataObject = new XmedDataObject();
- dataObject->setFieldHandler(*duplicate);
- event->objectdata = dataObject;
- emit datasourceSignal(event);
- // Note that this signal is processed by the WorkspaceController
-
- // Tag the item to prevent double import
- //_studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
-}
-
-void DatasourceController::OnInterpolateField() {
- // We need a studyEditor updated on the active study
- _studyEditor->updateActiveStudy();
-
- // Get the selected objects in the study (SObject). In case of a
- // multiple selection, we consider only the first item. At least one
- // item must be selected.
- SALOME_StudyEditor::SObjectList * listOfSObject = _studyEditor->getSelectedObjects();
- if ( listOfSObject->size() > 0 ) {
- SALOMEDS::SObject_var soField = listOfSObject->at(0);
- int fieldId = _studyEditor->getParameterInt(soField,OBJECT_ID);
- // _GBO_ : the dialog should not be modal, so that we can choose a
- // mesh in the browser. Then we have to emit a signal from the
- // dialog.accept, connected to a slot of the DatasourceControler
- _dlgInterpolateField->setFieldId(fieldId);
- Qt::WindowFlags flags = _dlgInterpolateField->windowFlags();
- _dlgInterpolateField->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint);
- _dlgInterpolateField->open();
- }
-}
-
-void DatasourceController::OnInterpolateFieldInputValidated() {
- MEDCALC::InterpolationParameters params;
- params.precision = _dlgInterpolateField->getPrecision();
- STDLOG("precision = " << params.precision);
- params.defaultValue = _dlgInterpolateField->getDefaultValue();
- STDLOG("defaultValue = " << params.defaultValue);
- params.reverse = _dlgInterpolateField->getReverse();
- STDLOG("reverse = " << params.reverse);
- params.intersectionType = _dlgInterpolateField->getIntersectionType().c_str();
- STDLOG("intersectionType = " << params.intersectionType);
- params.method = _dlgInterpolateField->getMethod().c_str();
- STDLOG("method = " << params.method);
- params.nature = _dlgInterpolateField->getFieldNature().c_str();
- STDLOG("nature = " << params.nature);
-
- int meshId = _dlgInterpolateField->getMeshId();
- STDLOG("meshId = " << ToString(meshId));
- int fieldId = _dlgInterpolateField->getFieldId();
- MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
-
- // We don't modify the original field but create first a duplicate
- // MEDCALC::FieldHandler* duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler);
- //MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId);
- MEDCALC::FieldHandler* result = NULL;
- try {
- result = MEDFactoryClient::getDataManager()->interpolateField(fieldId, meshId, params);
- }
- catch(...) {
- STDLOG("Unable to process field interpolation; please check interpolation parameters");
- QMessageBox::critical(_salomeModule->getApp()->desktop(),
- tr("Operation failed"),
- tr("Unable to process field interpolation; please check interpolation parameters"));
- return;
- }
-
- // Request once more the duplicate to update the meta-data on this
- // client side
- // duplicate = MEDFactoryClient::getDataManager()->getFieldHandler(duplicate->id);
-
- // >>>
- // WARN: the following is a temporary code for test purpose
- // Automatically add in ws
- DatasourceEvent * event = new DatasourceEvent();
- event->eventtype = DatasourceEvent::EVENT_IMPORT_OBJECT;
- XmedDataObject * dataObject = new XmedDataObject();
- dataObject->setFieldHandler(*result);
- event->objectdata = dataObject;
- emit datasourceSignal(event);
- // Note that this signal is processed by the WorkspaceController
-
- // // Tag the item to prevent double import
- // //_studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
-}
-
void
DatasourceController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
{
MEDCALC::DatasourceHandler* datasourceHandler = MEDFactoryClient::getDataManager()->getDatasourceHandler(event->filename);
this->updateTreeViewWithNewDatasource(datasourceHandler);
}
- else if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) {
- this->updateTreeViewWithNewPresentation(event->dataId, event->presentationId);
- }
}
#include <MEDPresentation.hxx>
#include "XmedDataModel.hxx"
-#include "DlgChangeUnderlyingMesh.hxx"
-#include "DlgInterpolateField.hxx"
#include "MEDCALCGUI.hxx"
//
// The DatasourceController defines data structures and classes to
EVENT_IMPORT_OBJECT, // Simply import the object in the workspace
EVENT_USE_OBJECT, // Import in the workspace AND define a proxy
// variable in the tui console to use it
+ // presentations
+ EVENT_VIEW_OBJECT_CONTOUR,
+ EVENT_VIEW_OBJECT_DEFLECTION_SHAPE,
+ EVENT_VIEW_OBJECT_POINT_SPRITE,
EVENT_VIEW_OBJECT_SCALAR_MAP,
+ EVENT_VIEW_OBJECT_SLICES,
+ EVENT_VIEW_OBJECT_VECTOR_FIELD,
// these ones forward actions to workspace (and then to python console)
EVENT_ADD_DATASOURCE,
EVENT_ADD_IMAGE_AS_DATASOURCE,
EVENT_ADD_PRESENTATION
};
int eventtype;
- XmedDataObject * objectdata;
+ XmedDataObject* objectdata;
QString objectalias;
} DatasourceEvent;
Q_OBJECT
public:
- DatasourceController(MEDModule * salomeModule);
+ DatasourceController(MEDModule* salomeModule);
~DatasourceController();
void createActions();
public slots:
- // Callback connected to dialog box validation signals
- void OnChangeUnderlyingMeshInputValidated();
- void OnInterpolateFieldInputValidated();
- void processWorkspaceEvent(const MEDCALC::MedEvent * event);
+ void processWorkspaceEvent(const MEDCALC::MedEvent* event);
signals:
- void datasourceSignal(const DatasourceEvent * event);
+ void datasourceSignal(const DatasourceEvent* event);
protected slots:
void OnAddDatasource();
void OnAddImagesource();
void OnExpandField();
- void OnVisualizeScalarMap();
void OnUseInWorkspace();
- void OnChangeUnderlyingMesh();
- void OnInterpolateField();
private:
- void visualize(DatasourceEvent::EventType);
void addDatasource(const char* filename);
void updateTreeViewWithNewDatasource(const MEDCALC::DatasourceHandler*);
- void updateTreeViewWithNewPresentation(long fieldId, long presentationId);
private:
MEDModule* _salomeModule;
- SALOME_AppStudyEditor * _studyEditor;
-
- DlgChangeUnderlyingMesh * _dlgChangeUnderlyingMesh;
- DlgInterpolateField * _dlgInterpolateField;
-
+ SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule
};
#endif
#include "MEDModule.hxx"
#include "QtHelper.hxx"
+#include <MEDCalcConstants.hxx>
#include "SALOME_LifeCycleCORBA.hxx"
#include "QtxPopupMgr.h"
+#include <LightApp_Preferences.h>
#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
+#include <SUIT_DataBrowser.h>
#include <SalomeApp_Study.h>
+#include <SalomeApp_DataObject.h>
+#include <SalomeApp_DataModel.h>
+
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDS_Study.hxx>
#ifndef DISABLE_PVVIEWER
#include "PVViewer_ViewModel.h"
#endif
+#include <sstream>
+
//! The only instance of the reference to engine
MED_ORB::MED_Gen_var MEDModule::myEngine;
MEDModule::MEDModule() :
- SalomeApp_Module("MED")
+ SalomeApp_Module("MED"), _studyEditor(0), _datasourceController(0), _workspaceController(0), _presentationController(0), _processingController(0)
{
// Note also that we can't use the getApp() function here because
// the initialize(...) function has not been called yet.
MEDModule::~MEDModule()
{
- // nothing to do
+ if (_studyEditor)
+ delete _studyEditor;
+ if (_datasourceController)
+ delete _datasourceController;
+ //if (_workspaceController)
+ // delete _workspaceController;
+ if (_presentationController)
+ delete _presentationController;
+ if (_processingController)
+ delete _processingController;
}
MED_ORB::MED_Gen_var
// call the parent implementation
SalomeApp_Module::initialize( app );
+ if (app && app->desktop()) {
+ connect((QObject*) (getApp()->objectBrowser()->treeView()), SIGNAL(doubleClicked(const QModelIndex&)),
+ this, SLOT(onDblClick(const QModelIndex&)));
+ }
+
// The following initializes the GUI widget and associated actions
this->createModuleWidgets();
this->createModuleActions();
#endif
}
+void
+MEDModule::createPreferences()
+{
+ int genTab = addPreference(tr("PREF_TAB_GENERAL"));
+
+ int themeGroup = addPreference(tr("PREF_THEME_GROUP"), genTab);
+ setPreferenceProperty(themeGroup, "columns", 2);
+ int icons = addPreference(tr("PREF_ICONS"), themeGroup, LightApp_Preferences::Selector, "MEDCalc", "icons" );
+ QStringList iconsThemes;
+ iconsThemes.append(tr("PREF_ICON_THEME_MODERN"));
+ iconsThemes.append(tr("PREF_ICON_THEME_CLASSIC"));
+ QList<QVariant> indices;
+ indices.append(0);
+ indices.append(1);
+ setPreferenceProperty(icons, "strings", iconsThemes);
+ setPreferenceProperty(icons, "indexes", indices);
+}
+
bool
MEDModule::activateModule( SUIT_Study* theStudy )
{
//this->createStudyComponent(theStudy);
_workspaceController->showDockWidgets(true);
+ _presentationController->showDockWidgets(true);
//this->setDockLayout(StandardApp_Module::DOCKLAYOUT_LEFT_VLARGE);
// return the activation status
MEDModule::deactivateModule( SUIT_Study* theStudy )
{
_workspaceController->showDockWidgets(false);
+ _presentationController->showDockWidgets(false);
//this->unsetDockLayout();
// hide own menus
*/
void
MEDModule::createModuleWidgets() {
+ _studyEditor = new SALOME_AppStudyEditor(getApp());
_datasourceController = new DatasourceController(this);
_workspaceController = new WorkspaceController(this);
_xmedDataModel = new XmedDataModel();
_workspaceController->setDataModel(_xmedDataModel);
+ _presentationController = new PresentationController(this);
+ _processingController = new ProcessingController(this);
+
+ connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent*)),
+ _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent*)));
- connect(_datasourceController, SIGNAL(datasourceSignal(const DatasourceEvent *)),
- _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent *)));
+ connect(_presentationController, SIGNAL(presentationSignal(const PresentationEvent*)),
+ _workspaceController, SLOT(processPresentationEvent(const PresentationEvent*)));
- connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent *)),
- _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent *)));
+ connect(_processingController, SIGNAL(processingSignal(const ProcessingEvent*)),
+ _workspaceController, SLOT(processProcessingEvent(const ProcessingEvent*)));
+
+ connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
+ _datasourceController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
+
+ connect(_workspaceController, SIGNAL(workspaceSignal(const MEDCALC::MedEvent*)),
+ _presentationController, SLOT(processWorkspaceEvent(const MEDCALC::MedEvent*)));
}
void
MEDModule::createModuleActions() {
- // Creating actions concerning the dataspace
_datasourceController->createActions();
- // Creating actions concerning the workspace
_workspaceController->createActions();
+ _presentationController->createActions();
+ _processingController->createActions();
}
int
MEDModule::createStandardAction(const QString& label,
- QObject * slotobject,
+ QObject* slotobject,
const char* slotmember,
const QString& iconName,
const QString& tooltip)
mgr->insert ( this->action( actionId ), parentId, 0 );
mgr->setRule( this->action( actionId ), rule, QtxPopupMgr::VisibleRule );
}
+
+MEDCALC::MEDPresentationViewMode
+MEDModule::getSelectedViewMode()
+{
+ return _presentationController->getSelectedViewMode();
+}
+
+MEDCALC::MEDPresentationColorMap
+MEDModule::getSelectedColorMap()
+{
+ return _presentationController->getSelectedColorMap();
+}
+
+void
+MEDModule::onDblClick(const QModelIndex& index)
+{
+ DataObjectList dol = getApp()->objectBrowser()->getSelected();
+ if (dol.isEmpty())
+ return;
+ SalomeApp_DataObject* item = dynamic_cast<SalomeApp_DataObject*>(dol[0]);
+ if (!item)
+ return;
+ SalomeApp_DataModel *model = dynamic_cast<SalomeApp_DataModel*>(dataModel());
+ if (!model)
+ return;
+
+ if (item->componentDataType().toStdString() != "MED")
+ return;
+ _PTR(SObject) obj = item->object();
+ _PTR(GenericAttribute) anAttribute;
+
+ if (! obj->FindAttribute(anAttribute, "AttributeName"))
+ return;
+ _PTR(AttributeName) attrName(anAttribute);
+ std::string name = attrName->Value();
+
+ if (! obj->FindAttribute(anAttribute, "AttributeParameter"))
+ return;
+ _PTR(AttributeParameter) attrParam(anAttribute);
+ if (! attrParam->IsSet(IS_PRESENTATION, PT_BOOLEAN)
+ || ! attrParam->GetBool(IS_PRESENTATION)) { // Not a presentation
+ return;
+ }
+ if (!attrParam->IsSet(FIELD_ID, PT_INTEGER))
+ return;
+ int fieldId = attrParam->GetInt(FIELD_ID);
+
+ STDLOG("Presentation edition: NOT IMPLEMENTED YET");
+ STDLOG(" Presention infos:");
+ STDLOG(" - Component: " + item->componentDataType().toStdString());
+ STDLOG(" - Item entry: " + item->entry().toStdString());
+ STDLOG(" - Item name: " + item->name().toStdString());
+ std::ostringstream oss;
+ oss << fieldId;
+ STDLOG(" - Field id: " + oss.str());
+ STDLOG(" - Presentation name: " + name);
+
+ // :TODO:
+ // get edited values from a popup widget
+ // get presentation
+ // call presentation edit function
+
+}
#include "MEDCALCGUI.hxx"
#include <SalomeApp_Module.h>
+#include <SALOME_AppStudyEditor.hxx>
#include "WorkspaceController.hxx"
#include "XmedDataModel.hxx"
#include "DatasourceController.hxx"
+#include "PresentationController.hxx"
+#include "ProcessingController.hxx"
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(MED_Gen)
+#include CORBA_SERVER_HEADER(MEDPresentationManager)
+
+#include <QModelIndex>
class SalomeApp_Application;
static MED_ORB::MED_Gen_var engine();
- virtual void initialize( CAM_Application* app );
- virtual QString engineIOR() const;
+ virtual void initialize(CAM_Application* app);
+ virtual QString engineIOR() const;
+
+ virtual QString iconName() const;
- virtual QString iconName() const;
+ virtual void windows(QMap<int, int>& theMap) const;
+ virtual void viewManagers(QStringList& theList) const;
- virtual void windows( QMap<int, int>& theMap ) const;
- virtual void viewManagers( QStringList& theList ) const;
+ virtual void createPreferences();
int createStandardAction(const QString& label,
- QObject * slotobject,
+ QObject* slotobject,
const char* slotmember,
const QString& iconName,
const QString& tooltip=QString());
- void addActionInPopupMenu(int actionId,const QString& menus="",const QString& rule="client='ObjectBrowser'");
+ void addActionInPopupMenu(int actionId,
+ const QString& menus="",
+ const QString& rule="client='ObjectBrowser'");
+
+ MEDCALC::MEDPresentationViewMode getSelectedViewMode();
+ MEDCALC::MEDPresentationColorMap getSelectedColorMap();
+
+ inline SALOME_AppStudyEditor* getStudyEditor() { return _studyEditor; }
public slots:
- virtual bool activateModule( SUIT_Study* theStudy );
- virtual bool deactivateModule( SUIT_Study* theStudy );
+ virtual bool activateModule(SUIT_Study* theStudy);
+ virtual bool deactivateModule(SUIT_Study* theStudy);
+ virtual void onDblClick(const QModelIndex& index);
private:
void createModuleWidgets();
static void init();
private:
- DatasourceController * _datasourceController;
- WorkspaceController * _workspaceController;
- XmedDataModel * _xmedDataModel;
+ SALOME_AppStudyEditor* _studyEditor;
+ DatasourceController* _datasourceController;
+ WorkspaceController* _workspaceController;
+ XmedDataModel* _xmedDataModel;
+ PresentationController* _presentationController;
+ ProcessingController* _processingController;
static MED_ORB::MED_Gen_var myEngine;
};
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
- <message>
- <source>ICO_MED_PRESENTATION</source>
- <translation>pqAppIcon16.png</translation>
- </message>
<message>
<source>ICO_IMPORT_MED</source>
<translation>datasource_add.png</translation>
<translation>datasource_add.png</translation>
</message>
<message>
- <source>ICO_DATASOURCE_CHANGE_MESH</source>
- <translation>datasource_changeUnderlyingMesh.png</translation>
+ <source>ICO_PROCESSING_CHANGE_MESH</source>
+ <translation>processing_changeUnderlyingMesh.png</translation>
</message>
<message>
- <source>ICO_DATASOURCE_INTERPOLATE_FIELD</source>
- <translation>datasource_interpolateField.png</translation>
+ <source>ICO_PROCESSING_INTERPOLATE_FIELD</source>
+ <translation>processing_interpolateField.png</translation>
</message>
<message>
<source>ICO_DATASOURCE_EXPAND_FIELD</source>
<source>ICO_DATASOURCE_USE</source>
<translation>datasource_use.png</translation>
</message>
- <message>
- <source>ICO_DATASOURCE_VIEW</source>
- <translation>datasource_view.png</translation>
- </message>
<message>
<source>ICO_FOLDER</source>
<translation>folder.png</translation>
<source>ICO_WORKSPACE_SAVE</source>
<translation>workspace_save.png</translation>
</message>
+ <!-- Presentation toolbar icons (default theme)-->
+ <message>
+ <source>ICO_PRESENTATION_SCALAR_MAP_DEFAULT</source>
+ <translation>scalarmap24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_CONTOUR_DEFAULT</source>
+ <translation>pqIsosurface24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_VECTOR_FIELD_DEFAULT</source>
+ <translation>pqGlyph24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_SLICES_DEFAULT</source>
+ <translation>pqSlice24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_DEFLECTION_SHAPE_DEFAULT</source>
+ <translation>pqWarp24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_POINT_SPRITE_DEFAULT</source>
+ <translation>pqNodeMapData24.png</translation>
+ </message>
+ <!-- Presentation tree icons (default theme)-->
+ <message>
+ <source>ICO_MEDPresentationScalarMap_DEFAULT</source>
+ <translation>scalarmap16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationContour_DEFAULT</source>
+ <translation>pqIsosurface16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationVectorField_DEFAULT</source>
+ <translation>pqGlyph16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationSlices_DEFAULT</source>
+ <translation>pqSlice16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationDeflectionShape_DEFAULT</source>
+ <translation>pqWarp16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationPointSprite_DEFAULT</source>
+ <translation>pqNodeMapData16.png</translation>
+ </message>
+ <!-- Presentation toolbar icons (modern theme)-->
+ <message>
+ <source>ICO_PRESENTATION_SCALAR_MAP_MODERN</source>
+ <translation>scalarmap24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_CONTOUR_MODERN</source>
+ <translation>pqIsosurface24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_VECTOR_FIELD_MODERN</source>
+ <translation>pqGlyph24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_SLICES_MODERN</source>
+ <translation>pqSlice24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_DEFLECTION_SHAPE_MODERN</source>
+ <translation>pqWarp24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_POINT_SPRITE_MODERN</source>
+ <translation>pqNodeMapData24.png</translation>
+ </message>
+ <!-- Presentation tree icons (modern theme)-->
+ <message>
+ <source>ICO_MEDPresentationScalarMap_MODERN</source>
+ <translation>scalarmap16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationContour_MODERN</source>
+ <translation>pqIsosurface16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationVectorField_MODERN</source>
+ <translation>pqGlyph16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationSlices_MODERN</source>
+ <translation>pqSlice16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationDeflectionShape_MODERN</source>
+ <translation>pqWarp16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationPointSprite_MODERN</source>
+ <translation>pqNodeMapData16.png</translation>
+ </message>
+ <!-- Presentation toolbar icons (classic theme)-->
+ <message>
+ <source>ICO_PRESENTATION_SCALAR_MAP_CLASSIC</source>
+ <translation>visu_scalars24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_CONTOUR_CLASSIC</source>
+ <translation>visu_isosurfaces24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_VECTOR_FIELD_CLASSIC</source>
+ <translation>visu_vectors24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_SLICES_CLASSIC</source>
+ <translation>visu_cutplanes24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_DEFLECTION_SHAPE_CLASSIC</source>
+ <translation>visu_deformed24.png</translation>
+ </message>
+ <message>
+ <source>ICO_PRESENTATION_POINT_SPRITE_CLASSIC</source>
+ <translation>visu_points24.png</translation>
+ </message>
+ <!-- Presentation tree icons (classic theme)-->
+ <message>
+ <source>ICO_MEDPresentationScalarMap_CLASSIC</source>
+ <translation>visu_scalars16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationContour_CLASSIC</source>
+ <translation>visu_isosurfaces16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationVectorField_CLASSIC</source>
+ <translation>visu_vectors16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationSlices_CLASSIC</source>
+ <translation>visu_cutplanes16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationDeflectionShape_CLASSIC</source>
+ <translation>visu_deformed16.png</translation>
+ </message>
+ <message>
+ <source>ICO_MEDPresentationPointSprite_CLASSIC</source>
+ <translation>visu_points16.png</translation>
+ </message>
</context>
</TS>
<!DOCTYPE TS>
<TS version="2.0">
<context>
- <name>DatasourceController</name>
+ <name>PresentationController</name>
+ <message>
+ <source>TITLE_PRESENTATION_PARAMETERS</source>
+ <translation>Presentation parameters</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_SCALAR_MAP</source>
+ <translation>Scalar map</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_SCALAR_MAP</source>
+ <translation>Scalar map</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Vector field</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Vector field</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_SLICES</source>
+ <translation>Slices</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_SLICES</source>
+ <translation>Slices</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Deflection shape</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Deflection shape</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
+ </message>
+ <message>
+ <source>MENU_PRESENTATIONS</source>
+ <translation>Presentations</translation>
+ </message>
<message>
<source>MEDPresentationScalarMap</source>
- <translation>Scalar Map</translation>
+ <translation>Scalar map</translation>
+ </message>
+ <message>
+ <source>MEDPresentationContour</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>MEDPresentationVectorField</source>
+ <translation>Vector field</translation>
+ </message>
+ <message>
+ <source>MEDPresentationSlices</source>
+ <translation>Slices</translation>
+ </message>
+ <message>
+ <source>MEDPresentationDeflectionShape</source>
+ <translation>Deflection shape</translation>
+ </message>
+ <message>
+ <source>MEDPresentationPointSprite</source>
+ <translation>Point sprite</translation>
+ </message>
+ </context>
+ <context>
+ <name>ProcessingController</name>
+ <message>
+ <source>MENU_PROCESSING</source>
+ <translation>Processing</translation>
+ </message>
+ <message>
+ <source>LAB_PROCESSING_CHANGE_MESH</source>
+ <translation>Change underlying mesh</translation>
+ </message>
+ <message>
+ <source>LAB_PROCESSING_INTERPOLATE_FIELD</source>
+ <translation>Interpolate field</translation>
</message>
+ </context>
+ <context>
+ <name>DatasourceController</name>
<message>
<location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
<source>LAB_ADD_DATA_SOURCE</source>
<source>LAB_EXPAND_FIELD</source>
<translation>Expand field timeseries</translation>
</message>
- <message>
- <source>LAB_VISUALIZE_SCALARMAP</source>
- <translation>Scalar map</translation>
- </message>
- <message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="69"/>
- <source>LAB_VISUALIZE</source>
- <translation>Visualize</translation>
- </message>
<message>
<location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
<source>LAB_USE_IN_WORKSPACE</source>
<translation>Use in workspace</translation>
</message>
- <message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="83"/>
- <source>LAB_CHANGE_MESH</source>
- <translation>Change underlying mesh</translation>
- </message>
- <message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="113"/>
- <source>LAB_INTERPOLATE_FIELD</source>
- <translation>Interpolate field</translation>
- </message>
<message>
<location filename="MEDCALC/gui/DatasourceController.cxx" line="157"/>
<source>IMPORT_MED_FIELDS</source>
<translation>This field is already defined in the workspace</translation>
</message>
</context>
+ <context>
+ <name>WidgetPresentationParameters</name>
+ <message>
+ <source>LAB_DISP_COMP</source>
+ <translation>Displayed component:</translation>
+ </message>
+ <message>
+ <source>LAB_EUCLIDEAN_NORM</source>
+ <translation>Euclidean norm</translation>
+ </message>
+ <message>
+ <source>LAB_SCALARBAR</source>
+ <translation>Scalar bar:</translation>
+ </message>
+ <message>
+ <source>LAB_RANGE</source>
+ <translation>Range:</translation>
+ </message>
+ <message>
+ <source>LAB_ALL_TIMESTEPS</source>
+ <translation>All timesteps</translation>
+ </message>
+ <message>
+ <source>LAB_ONE_TIMESTEP</source>
+ <translation>Selected timestep</translation>
+ </message>
+ <message>
+ <source>LAB_USER_RANGE</source>
+ <translation>User-specified</translation>
+ </message>
+ <message>
+ <source>LAB_TIMESTEP</source>
+ <translation>Timestep:</translation>
+ </message>
+ <message>
+ <source>LAB_MIN_VALUE</source>
+ <translation>Min value:</translation>
+ </message>
+ <message>
+ <source>LAB_MAX_VALUE</source>
+ <translation>Max value:</translation>
+ </message>
+ <message>
+ <source>LAB_COLOR_MAP</source>
+ <translation>Color map:</translation>
+ </message>
+ </context>
<context>
<name>DlgAlias</name>
<message>
<source>MEN_FILE</source>
<translation>&File</translation>
</message>
+ <message>
+ <source>PREF_TAB_GENERAL</source>
+ <translation>General</translation>
+ </message>
+ <message>
+ <source>PREF_THEME_GROUP</source>
+ <translation>Theme</translation>
+ </message>
+ <message>
+ <source>PREF_ICONS</source>
+ <translation>Icons</translation>
+ </message>
+ <message>
+ <source>PREF_ICON_THEME_MODERN</source>
+ <translation>Modern</translation>
+ </message>
+ <message>
+ <source>PREF_ICON_THEME_CLASSIC</source>
+ <translation>Classic</translation>
+ </message>
</context>
<context>
<name>WorkspaceController</name>
<source>FILE_FILTER_ALL</source>
<translation>All files (*.*)</translation>
</message>
+ <message>
+ <source>LAB_VIEW_MODE</source>
+ <translation>View mode:</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_REPLACE</source>
+ <translation>Replace</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_OVERLAP</source>
+ <translation>Overlap</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_NEW_LAYOUT</source>
+ <translation>New layout</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_SPLIT_VIEW</source>
+ <translation>Split</translation>
+ </message>
+ <message>
+ <source>LAB_BLUE_TO_RED</source>
+ <translation>Blue to red rainbow</translation>
+ </message>
+ <message>
+ <source>LAB_COOL_TO_WARM</source>
+ <translation>Cool to warm</translation>
+ </message>
</context>
</TS>
<!DOCTYPE TS>
<TS version="2.0">
<context>
- <name>DatasourceController</name>
+ <name>PresentationController</name>
+ <message>
+ <source>TITLE_PRESENTATION_PARAMETERS</source>
+ <translation>Paramètres de presentation</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_SCALAR_MAP</source>
+ <translation>Carte scalaire</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_SCALAR_MAP</source>
+ <translation>Carte scalaire</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_CONTOUR</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Champ de vecteurs</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_VECTOR_FIELD</source>
+ <translation>Champ de vecteurs</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_SLICES</source>
+ <translation>Coupes</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_SLICES</source>
+ <translation>Coupes</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Déformée</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_DEFLECTION_SHAPE</source>
+ <translation>Déformée</translation>
+ </message>
+ <message>
+ <source>LAB_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
+ </message>
+ <message>
+ <source>TIP_PRESENTATION_POINT_SPRITE</source>
+ <translation>Point sprite</translation>
+ </message>
+ <message>
+ <source>MENU_PRESENTATIONS</source>
+ <translation>Présentations</translation>
+ </message>
<message>
<source>MEDPresentationScalarMap</source>
<translation>Carte scalaire</translation>
</message>
+ <message>
+ <source>MEDPresentationContour</source>
+ <translation>Contour</translation>
+ </message>
+ <message>
+ <source>MEDPresentationVectorField</source>
+ <translation>Champ de vecteurs</translation>
+ </message>
+ <message>
+ <source>MEDPresentationSlices</source>
+ <translation>Coupes</translation>
+ </message>
+ <message>
+ <source>MEDPresentationDeflectionShape</source>
+ <translation>Déformée</translation>
+ </message>
+ <message>
+ <source>MEDPresentationPointSprite</source>
+ <translation>Point sprite</translation>
+ </message>
+ </context>
+ <context>
+ <name>ProcessingController</name>
+ <message>
+ <source>MENU_PROCESSING</source>
+ <translation>Traitement</translation>
+ </message>
+ <message>
+ <source>LAB_PROCESSING_CHANGE_MESH</source>
+ <translation>Changer le maillage sous-jacent</translation>
+ </message>
+ <message>
+ <source>LAB_PROCESSING_INTERPOLATE_FIELD</source>
+ <translation>Interpoler le champ</translation>
+ </message>
+ </context>
+ <context>
+ <name>DatasourceController</name>
<message>
<location filename="MEDCALC/gui/DatasourceController.cxx" line="45"/>
<source>LAB_ADD_DATA_SOURCE</source>
<source>LAB_EXPAND_FIELD</source>
<translation>Étendre les series temporelles du champ</translation>
</message>
- <message>
- <source>LAB_VISUALIZE_SCALARMAP</source>
- <translation>Carte scalaire</translation>
- </message>
- <message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="69"/>
- <source>LAB_VISUALIZE</source>
- <translation>Visualiser</translation>
- </message>
<message>
<location filename="MEDCALC/gui/DatasourceController.cxx" line="75"/>
<source>LAB_USE_IN_WORKSPACE</source>
<translation>Utiliser dans l'espace de travail</translation>
</message>
- <message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="83"/>
- <source>LAB_CHANGE_MESH</source>
- <translation>Changer le maillage sous-jacent</translation>
- </message>
- <message>
- <location filename="MEDCALC/gui/DatasourceController.cxx" line="113"/>
- <source>LAB_INTERPOLATE_FIELD</source>
- <translation>Interpoler le champ</translation>
- </message>
<message>
<location filename="MEDCALC/gui/DatasourceController.cxx" line="157"/>
<source>IMPORT_MED_FIELDS</source>
<translation>Ce champ est déjà défini dans l'espace de travail</translation>
</message>
</context>
+ <context>
+ <name>WidgetPresentationParameters</name>
+ <message>
+ <source>LAB_DISP_COMP</source>
+ <translation>Composante affichée :</translation>
+ </message>
+ <message>
+ <source>LAB_EUCLIDEAN_NORM</source>
+ <translation>Norme euclidienne</translation>
+ </message>
+ <message>
+ <source>LAB_SCALARBAR</source>
+ <translation>Echelle de valeurs :</translation>
+ </message>
+ <message>
+ <source>LAB_RANGE</source>
+ <translation>Intervalle :</translation>
+ </message>
+ <message>
+ <source>LAB_ALL_TIMESTEPS</source>
+ <translation>Tous les pas de temps</translation>
+ </message>
+ <message>
+ <source>LAB_ONE_TIMESTEP</source>
+ <translation>Pas de temps sélectionné</translation>
+ </message>
+ <message>
+ <source>LAB_USER_RANGE</source>
+ <translation>Personnalisé :</translation>
+ </message>
+ <message>
+ <source>LAB_TIMESTEP</source>
+ <translation>Pas de temps :</translation>
+ </message>
+ <message>
+ <source>LAB_MIN_VALUE</source>
+ <translation>Valeur min :</translation>
+ </message>
+ <message>
+ <source>LAB_MAX_VALUE</source>
+ <translation>Valeur max :</translation>
+ </message>
+ <message>
+ <source>LAB_COLOR_MAP</source>
+ <translation>Table de couleurs :</translation>
+ </message>
+ <message>
+ <source>LAB_BLUE_TO_RED</source>
+ <translation>Arc-en-ciel blue vers rouge</translation>
+ </message>
+ <message>
+ <source>LAB_COOL_TO_WARM</source>
+ <translation>Froid vers chaud</translation>
+ </message>
+ </context>
<context>
<name>DlgAlias</name>
<message>
<source>MEN_FILE</source>
<translation>&Fichier</translation>
</message>
+ <message>
+ <source>PREF_TAB_GENERAL</source>
+ <translation>Général</translation>
+ </message>
+ <message>
+ <source>PREF_THEME_GROUP</source>
+ <translation>Thème</translation>
+ </message>
+ <message>
+ <source>PREF_ICONS</source>
+ <translation>Icones</translation>
+ </message>
+ <message>
+ <source>PREF_ICON_THEME_MODERN</source>
+ <translation>Moderne</translation>
+ </message>
+ <message>
+ <source>PREF_ICON_THEME_CLASSIC</source>
+ <translation>Classique</translation>
+ </message>
</context>
<context>
<name>WorkspaceController</name>
<source>FILE_FILTER_ALL</source>
<translation>Tous les fichiers (*.*)</translation>
</message>
+ <message>
+ <source>LAB_VIEW_MODE</source>
+ <translation>Mode de rendu :</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_REPLACE</source>
+ <translation>Remplacer</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_OVERLAP</source>
+ <translation>Superposer</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_NEW_LAYOUT</source>
+ <translation>Nouvel onglet</translation>
+ </message>
+ <message>
+ <source>LAB_VIEW_MODE_SPLIT_VIEW</source>
+ <translation>Scinder</translation>
+ </message>
</context>
</TS>
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "PresentationController.hxx"
+#include <MEDCalcConstants.hxx>
+#include "MEDModule.hxx"
+#include "Basics_Utils.hxx"
+#include "QtxActionGroup.h"
+#include "QtxActionToolMgr.h"
+#include "MEDFactoryClient.hxx"
+
+#include <SalomeApp_Application.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_DataObject.h>
+
+#include <SALOMEDS_SObject.hxx>
+#include <SALOMEDS_Study.hxx>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+#include <QMessageBox>
+
+static const int OPTIONS_VIEW_MODE_ID = 943;
+static const int OPTIONS_VIEW_MODE_REPLACE_ID = 944;
+static const int OPTIONS_VIEW_MODE_OVERLAP_ID = 945;
+static const int OPTIONS_VIEW_MODE_NEW_LAYOUT_ID = 946;
+static const int OPTIONS_VIEW_MODE_SPLIT_VIEW_ID = 947;
+
+PresentationController::PresentationController(MEDModule* salomeModule)
+{
+ STDLOG("Creating a PresentationController");
+ _salomeModule = salomeModule;
+ _studyEditor = _salomeModule->getStudyEditor();
+
+ _widgetPresentationParameters = new WidgetPresentationParameters();
+
+ QMainWindow* parent = salomeModule->getApp()->desktop();
+ _dockWidget = new QDockWidget(parent);
+ _dockWidget->setVisible(false);
+ _dockWidget->setWindowTitle(tr("TITLE_PRESENTATION_PARAMETERS"));
+ _dockWidget->setObjectName(tr("TITLE_PRESENTATION_PARAMETERS"));
+ _dockWidget->setFeatures(QDockWidget::AllDockWidgetFeatures);
+ _dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
+ _dockWidget->setWidget(_widgetPresentationParameters);
+ parent->addDockWidget(Qt::LeftDockWidgetArea, _dockWidget);
+ //_dockWidget->show();
+}
+
+PresentationController::~PresentationController()
+{
+ STDLOG("Deleting the PresentationController");
+}
+
+std::string
+PresentationController::_getIconName(const std::string& name)
+{
+ SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
+ if (!mgr)
+ return name;
+
+ // Read value from preferences and suffix name to select icon theme
+ int theme = mgr->integerValue("MEDCalc", "icons");
+ if (theme == 0) {
+ return name + "_MODERN";
+ } else if (theme == 1) {
+ return name + "_CLASSIC";
+ }
+ return name + "_DEFAULT";
+}
+
+void
+PresentationController::createActions()
+{
+ STDLOG("Creating PresentationController actions");
+
+ // View Mode
+ int viewModeToolbarId = _salomeModule->createTool("View Mode", "ViewModeToolbar");
+ QtxActionGroup* ag = _salomeModule->createActionGroup(OPTIONS_VIEW_MODE_ID, true);
+ ag->setText("View mode");
+ ag->setUsesDropDown(true);
+ QString label = tr("LAB_VIEW_MODE_REPLACE");
+ QString tooltip = tr("TIP_VIEW_MODE_REPLACE");
+ QAction* a = _salomeModule->createAction(OPTIONS_VIEW_MODE_REPLACE_ID,label,QIcon(),label,tooltip,0);
+ a->setCheckable(true);
+ a->setChecked(true);
+ ag->add(a);
+
+ label = tr("LAB_VIEW_MODE_OVERLAP");
+ tooltip = tr("TIP_VIEW_MODE_OVERLAP");
+ a = _salomeModule->createAction(OPTIONS_VIEW_MODE_OVERLAP_ID,label,QIcon(),label,tooltip,0);
+ a->setCheckable(true);
+ ag->add(a);
+
+ label = tr("LAB_VIEW_MODE_NEW_LAYOUT");
+ tooltip = tr("TIP_VIEW_MODE_NEW_LAYOUT");
+ a = _salomeModule->createAction(OPTIONS_VIEW_MODE_NEW_LAYOUT_ID,label,QIcon(),label,tooltip,0);
+ a->setCheckable(true);
+ ag->add(a);
+
+ label = tr("LAB_VIEW_MODE_SPLIT_VIEW");
+ tooltip = tr("TIP_VIEW_MODE_SPLIT_VIEW");
+ a = _salomeModule->createAction(OPTIONS_VIEW_MODE_SPLIT_VIEW_ID,label,QIcon(),label,tooltip,0);
+ a->setCheckable(true);
+ ag->add(a);
+
+ _salomeModule->createTool(OPTIONS_VIEW_MODE_ID, viewModeToolbarId);
+
+ // Presentations
+ int presentationToolbarId = _salomeModule->createTool("Presentations", "PresentationToolbar");
+ int presentationMenuId = _salomeModule->createMenu(tr("MENU_PRESENTATIONS"), -1, 1);
+
+ label = tr("LAB_PRESENTATION_SCALAR_MAP");
+ tooltip = tr("TIP_PRESENTATION_SCALAR_MAP");
+ QString icon = tr(_getIconName("ICO_PRESENTATION_SCALAR_MAP").c_str());
+ int actionId;
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeScalarMap()),icon,tooltip);
+ _salomeModule->createTool(actionId, presentationToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, presentationMenuId);
+
+ label = tr("LAB_PRESENTATION_CONTOUR");
+ tooltip = tr("TIP_PRESENTATION_CONTOUR");
+ icon = tr(_getIconName("ICO_PRESENTATION_CONTOUR").c_str());
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeContour()),icon,tooltip);
+ _salomeModule->createTool(actionId, presentationToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, presentationMenuId);
+
+ label = tr("LAB_PRESENTATION_VECTOR_FIELD");
+ tooltip = tr("TIP_PRESENTATION_VECTOR_FIELD");
+ icon = tr(_getIconName("ICO_PRESENTATION_VECTOR_FIELD").c_str());
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeVectorField()),icon,tooltip);
+ _salomeModule->createTool(actionId, presentationToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, presentationMenuId);
+
+ label = tr("LAB_PRESENTATION_SLICES");
+ tooltip = tr("TIP_PRESENTATION_SLICES");
+ icon = tr(_getIconName("ICO_PRESENTATION_SLICES").c_str());
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeSlices()),icon,tooltip);
+ _salomeModule->createTool(actionId, presentationToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, presentationMenuId);
+
+ label = tr("LAB_PRESENTATION_DEFLECTION_SHAPE");
+ tooltip = tr("TIP_PRESENTATION_DEFLECTION_SHAPE");
+ icon = tr(_getIconName("ICO_PRESENTATION_DEFLECTION_SHAPE").c_str());
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizeDeflectionShape()),icon,tooltip);
+ _salomeModule->createTool(actionId, presentationToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, presentationMenuId);
+
+ label = tr("LAB_PRESENTATION_POINT_SPRITE");
+ tooltip = tr("TIP_PRESENTATION_POINT_SPRITE");
+ icon = tr(_getIconName("ICO_PRESENTATION_POINT_SPRITE").c_str());
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnVisualizePointSprite()),icon,tooltip);
+ _salomeModule->createTool(actionId, presentationToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, presentationMenuId);
+}
+
+MEDCALC::MEDPresentationViewMode
+PresentationController::getSelectedViewMode()
+{
+ if (_salomeModule->action(OPTIONS_VIEW_MODE_REPLACE_ID)->isChecked()) {
+ return MEDCALC::VIEW_MODE_REPLACE;
+ }
+ else if (_salomeModule->action(OPTIONS_VIEW_MODE_OVERLAP_ID)->isChecked()) {
+ return MEDCALC::VIEW_MODE_OVERLAP;
+ }
+ else if (_salomeModule->action(OPTIONS_VIEW_MODE_NEW_LAYOUT_ID)->isChecked()) {
+ return MEDCALC::VIEW_MODE_NEW_LAYOUT;
+ }
+ else if (_salomeModule->action(OPTIONS_VIEW_MODE_SPLIT_VIEW_ID)->isChecked()) {
+ return MEDCALC::VIEW_MODE_SPLIT_VIEW;
+ }
+ // Should not happen
+ STDLOG("Strange!! No matching view mode found - returning VIEW_MODE_REPLACE.");
+ return MEDCALC::VIEW_MODE_REPLACE;
+}
+
+MEDCALC::MEDPresentationColorMap
+PresentationController::getSelectedColorMap()
+{
+ return _widgetPresentationParameters->getColorMap();
+}
+
+void
+PresentationController::visualize(PresentationEvent::EventType eventType)
+{
+ // We need a _studyEditor updated on the active study
+ _studyEditor->updateActiveStudy();
+
+ // Get the selected objects in the study (SObject)
+ SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
+
+ // For each object, emit a signal to the workspace to request a
+ // visualisation using the tui command (so that the user can see how
+ // to make a view of an object from the tui console).
+ for (int i=0; i<listOfSObject->size(); i++) {
+ SALOMEDS::SObject_var soField = listOfSObject->at(i);
+ int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ // If fieldId equals -1, then it means that it is not a field
+ // managed by the MED module, and we stop this function process.
+ if ( fieldId < 0 )
+ continue;
+
+ MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
+ if (! fieldHandler) {
+ QMessageBox::warning(_salomeModule->getApp()->desktop(),
+ tr("Operation not allowed"),
+ tr("No field is defined"));
+ return;
+ }
+
+ PresentationEvent* event = new PresentationEvent();
+ event->eventtype = eventType;
+ XmedDataObject* dataObject = new XmedDataObject();
+ dataObject->setFieldHandler(*fieldHandler);
+ event->objectdata = dataObject;
+ emit presentationSignal(event); // --> WorkspaceController::processPresentationEvent
+ }
+}
+
+void
+PresentationController::OnVisualizeScalarMap()
+{
+ this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP);
+}
+
+void
+PresentationController::OnVisualizeContour()
+{
+ this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR);
+}
+
+void
+PresentationController::OnVisualizeVectorField()
+{
+ this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD);
+}
+
+void
+PresentationController::OnVisualizeSlices()
+{
+ this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_SLICES);
+}
+
+void
+PresentationController::OnVisualizeDeflectionShape()
+{
+ this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE);
+}
+
+void
+PresentationController::OnVisualizePointSprite()
+{
+ this->visualize(PresentationEvent::EVENT_VIEW_OBJECT_POINT_SPRITE);
+}
+
+void
+PresentationController::updateTreeViewWithNewPresentation(long fieldId, long presentationId)
+{
+ if (presentationId < 0) {
+ std::cerr << "Unknown presentation\n";
+ return;
+ }
+
+ std::string name = MEDFactoryClient::getPresentationManager()->getPresentationProperty(presentationId, "name");
+ std::string icon = std::string("ICO_") + name;
+ icon = _getIconName(icon);
+ name = tr(name.c_str()).toStdString();
+ std::string label = tr(icon.c_str()).toStdString();
+
+ SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
+ _PTR(Study) studyDS = study->studyDS();
+
+ _salomeModule->engine()->registerPresentation(_CAST(Study, studyDS)->GetStudy(), fieldId, name.c_str(), label.c_str(), presentationId);
+
+ // update Object browser
+ _salomeModule->getApp()->updateObjectBrowser(true);
+}
+
+void
+PresentationController::updateTreeViewForPresentationRemoval(long presentationId)
+{
+ if (presentationId < 0) {
+ std::cerr << "Unknown presentation\n";
+ return;
+ }
+
+ SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(_salomeModule->application()->activeStudy());
+ _PTR(Study) studyDS = study->studyDS();
+
+ _salomeModule->engine()->unregisterPresentation(_CAST(Study, studyDS)->GetStudy(), presentationId);
+
+ // update Object browser
+ _salomeModule->getApp()->updateObjectBrowser(true);
+}
+
+void
+PresentationController::processWorkspaceEvent(const MEDCALC::MedEvent* event)
+{
+ if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) {
+ this->updateTreeViewWithNewPresentation(event->dataId, event->presentationId);
+ }
+ else if ( event->type == MEDCALC::EVENT_REMOVE_PRESENTATION ) {
+ this->updateTreeViewForPresentationRemoval(event->presentationId);
+ }
+}
+
+void
+PresentationController::showDockWidgets(bool isVisible)
+{
+ STDLOG("Switching PresentationController visibility to: " << isVisible);
+ _dockWidget->setVisible(isVisible);
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 PRESENTATION_CONTROLLER_HXX
+#define PRESENTATION_CONTROLLER_HXX
+
+#include <QObject>
+#include "MEDCALCGUI.hxx"
+
+#include "MEDEventListener_i.hxx"
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(MEDPresentationManager)
+#include CORBA_CLIENT_HEADER(MEDDataManager)
+
+#include "XmedDataModel.hxx"
+#include <SALOME_AppStudyEditor.hxx>
+#include "WidgetPresentationParameters.hxx"
+
+typedef struct {
+ enum EventType {
+ EVENT_VIEW_OBJECT_CONTOUR,
+ EVENT_VIEW_OBJECT_DEFLECTION_SHAPE,
+ EVENT_VIEW_OBJECT_POINT_SPRITE,
+ EVENT_VIEW_OBJECT_SCALAR_MAP,
+ EVENT_VIEW_OBJECT_SLICES,
+ EVENT_VIEW_OBJECT_VECTOR_FIELD
+ };
+ int eventtype;
+ XmedDataObject* objectdata;
+} PresentationEvent;
+
+class MEDModule;
+class QDockWidget;
+
+class MEDCALCGUI_EXPORT PresentationController : public QObject {
+ Q_OBJECT
+
+public:
+ PresentationController(MEDModule* salomeModule);
+ ~PresentationController();
+
+ void createActions();
+
+ MEDCALC::MEDPresentationViewMode getSelectedViewMode();
+ MEDCALC::MEDPresentationColorMap getSelectedColorMap();
+
+ void showDockWidgets(bool isVisible);
+
+signals:
+ void presentationSignal(const PresentationEvent*);
+
+protected slots:
+ void OnVisualizeScalarMap();
+ void OnVisualizeContour();
+ void OnVisualizeVectorField();
+ void OnVisualizeSlices();
+ void OnVisualizeDeflectionShape();
+ void OnVisualizePointSprite();
+ void processWorkspaceEvent(const MEDCALC::MedEvent*);
+
+private:
+ void visualize(PresentationEvent::EventType);
+ void updateTreeViewWithNewPresentation(long, long);
+ void updateTreeViewForPresentationRemoval(long);
+ std::string _getIconName(const std::string&);
+
+private:
+ MEDModule* _salomeModule;
+ SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule
+ QDockWidget *_dockWidget;
+ WidgetPresentationParameters* _widgetPresentationParameters;
+};
+
+#endif /* PRESENTATION_CONTROLLER_HXX */
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "ProcessingController.hxx"
+#include <MEDCalcConstants.hxx>
+
+#include "MEDFactoryClient.hxx"
+#include "MEDModule.hxx"
+#include "Basics_Utils.hxx"
+
+#include <SUIT_Desktop.h>
+#include <QMessageBox>
+
+ProcessingController::ProcessingController(MEDModule* salomeModule)
+{
+ STDLOG("Creating a ProcessingController");
+ _salomeModule = salomeModule;
+ _studyEditor = _salomeModule->getStudyEditor();
+
+ _dlgChangeUnderlyingMesh = new DlgChangeUnderlyingMesh(_studyEditor);
+ connect(_dlgChangeUnderlyingMesh,SIGNAL(inputValidated()),
+ this, SLOT(OnChangeUnderlyingMeshInputValidated()));
+
+ _dlgInterpolateField = new DlgInterpolateField(_studyEditor);
+ connect(_dlgInterpolateField,SIGNAL(inputValidated()),
+ this, SLOT(OnInterpolateFieldInputValidated()));
+}
+
+ProcessingController::~ProcessingController()
+{
+ STDLOG("Deleting the ProcessingController");
+}
+
+void
+ProcessingController::createActions()
+{
+ STDLOG("Creating ProcessingController actions");
+
+ int processingToolbarId = _salomeModule->createTool("Processing", "ProcessingToolbar");
+ int processingMenuId = _salomeModule->createMenu(tr("MENU_PROCESSING"), -1, 1);
+
+ // Change underlying mesh (note that this action creates a new field in
+ // the workspace that corresponds to a copy of the selected field
+ // modified by the change of the underlying mesh.
+ QString label = tr("LAB_PROCESSING_CHANGE_MESH");
+ QString icon = tr("ICO_PROCESSING_CHANGE_MESH");
+ int actionId;
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnChangeUnderlyingMesh()),icon,label);
+ _salomeModule->createTool(actionId, processingToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, processingMenuId);
+
+ label = tr("LAB_PROCESSING_INTERPOLATE_FIELD");
+ icon = tr("ICO_PROCESSING_INTERPOLATE_FIELD");
+ actionId = _salomeModule->createStandardAction(label,this, SLOT(OnInterpolateField()),icon,label);
+ _salomeModule->createTool(actionId, processingToolbarId);
+ _salomeModule->action(actionId)->setIconVisibleInMenu(true);
+ _salomeModule->createMenu(actionId, processingMenuId);
+}
+
+void
+ProcessingController::OnChangeUnderlyingMesh()
+{
+ // We need a studyEditor updated on the active study
+ _studyEditor->updateActiveStudy();
+
+ // Get the selected objects in the study (SObject). In cas of a
+ // multiple selection, we consider only the first item. At least one
+ // item must be selected.
+ SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
+ if ( listOfSObject->size() > 0 ) {
+ SALOMEDS::SObject_var soField = listOfSObject->at(0);
+ //int fieldId = _studyEditor->getParameterInt(soField,FIELD_SERIES_ID);
+ int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ // _GBO_ : the dialog should not be modal, so that we can choose a
+ // mesh in the browser. Then we have to emit a signal from the
+ // dialog.accept, connected to a slot of the DatasourceControler
+ _dlgChangeUnderlyingMesh->setFieldId(fieldId);
+ Qt::WindowFlags flags = _dlgChangeUnderlyingMesh->windowFlags();
+ _dlgChangeUnderlyingMesh->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint);
+ _dlgChangeUnderlyingMesh->open();
+ }
+}
+
+void
+ProcessingController::OnChangeUnderlyingMeshInputValidated()
+{
+ int meshId = _dlgChangeUnderlyingMesh->getMeshId();
+ STDLOG("meshId = " << ToString(meshId));
+ int fieldId = _dlgChangeUnderlyingMesh->getFieldId();
+ MEDCALC::FieldHandler* fieldHandler =
+ MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
+
+ // We don't modify the original field but create first a duplicate
+ MEDCALC::FieldHandler* duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler);
+ MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId);
+
+ // Request once more the duplicate to update the meta-data on this
+ // client side
+ duplicate = MEDFactoryClient::getDataManager()->getFieldHandler(duplicate->id);
+
+ // >>>
+ // WARN: the following is a temporary code for test purpose
+ // Automatically add in ws
+ ProcessingEvent* event = new ProcessingEvent();
+ event->eventtype = ProcessingEvent::EVENT_IMPORT_OBJECT;
+ XmedDataObject* dataObject = new XmedDataObject();
+ dataObject->setFieldHandler(*duplicate);
+ event->objectdata = dataObject;
+ emit processingSignal(event);
+ // Note that this signal is processed by the WorkspaceController
+
+ // Tag the item to prevent double import
+ //_studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
+}
+
+void
+ProcessingController::OnInterpolateField()
+{
+ // We need a studyEditor updated on the active study
+ _studyEditor->updateActiveStudy();
+
+ // Get the selected objects in the study (SObject). In case of a
+ // multiple selection, we consider only the first item. At least one
+ // item must be selected.
+ SALOME_StudyEditor::SObjectList* listOfSObject = _studyEditor->getSelectedObjects();
+ if ( listOfSObject->size() > 0 ) {
+ SALOMEDS::SObject_var soField = listOfSObject->at(0);
+ int fieldId = _studyEditor->getParameterInt(soField,FIELD_ID);
+ // _GBO_ : the dialog should not be modal, so that we can choose a
+ // mesh in the browser. Then we have to emit a signal from the
+ // dialog.accept, connected to a slot of the DatasourceControler
+ _dlgInterpolateField->setFieldId(fieldId);
+ Qt::WindowFlags flags = _dlgInterpolateField->windowFlags();
+ _dlgInterpolateField->setWindowFlags(flags | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint);
+ _dlgInterpolateField->open();
+ }
+}
+
+void
+ProcessingController::OnInterpolateFieldInputValidated()
+{
+ MEDCALC::InterpolationParameters params;
+ params.precision = _dlgInterpolateField->getPrecision();
+ STDLOG("precision = " << params.precision);
+ params.defaultValue = _dlgInterpolateField->getDefaultValue();
+ STDLOG("defaultValue = " << params.defaultValue);
+ params.reverse = _dlgInterpolateField->getReverse();
+ STDLOG("reverse = " << params.reverse);
+ params.intersectionType = _dlgInterpolateField->getIntersectionType().c_str();
+ STDLOG("intersectionType = " << params.intersectionType);
+ params.method = _dlgInterpolateField->getMethod().c_str();
+ STDLOG("method = " << params.method);
+ params.nature = _dlgInterpolateField->getFieldNature().c_str();
+ STDLOG("nature = " << params.nature);
+
+ int meshId = _dlgInterpolateField->getMeshId();
+ STDLOG("meshId = " << ToString(meshId));
+ int fieldId = _dlgInterpolateField->getFieldId();
+ MEDCALC::FieldHandler* fieldHandler = MEDFactoryClient::getDataManager()->getFieldHandler(fieldId);
+
+ // We don't modify the original field but create first a duplicate
+ // MEDCALC::FieldHandler* duplicate = MEDFactoryClient::getCalculator()->dup(*fieldHandler);
+ //MEDFactoryClient::getDataManager()->changeUnderlyingMesh(duplicate->id, meshId);
+ MEDCALC::FieldHandler* result = NULL;
+ try {
+ result = MEDFactoryClient::getDataManager()->interpolateField(fieldId, meshId, params);
+ }
+ catch(...) {
+ STDLOG("Unable to process field interpolation; please check interpolation parameters");
+ QMessageBox::critical(_salomeModule->getApp()->desktop(),
+ tr("Operation failed"),
+ tr("Unable to process field interpolation; please check interpolation parameters"));
+ return;
+ }
+
+ // Request once more the duplicate to update the meta-data on this
+ // client side
+ // duplicate = MEDFactoryClient::getDataManager()->getFieldHandler(duplicate->id);
+
+ // >>>
+ // WARN: the following is a temporary code for test purpose
+ // Automatically add in ws
+ ProcessingEvent* event = new ProcessingEvent();
+ event->eventtype = ProcessingEvent::EVENT_IMPORT_OBJECT;
+ XmedDataObject* dataObject = new XmedDataObject();
+ dataObject->setFieldHandler(*result);
+ event->objectdata = dataObject;
+ emit processingSignal(event);
+ // Note that this signal is processed by the WorkspaceController
+
+ // // Tag the item to prevent double import
+ // //_studyEditor->setParameterBool(soField,OBJECT_IS_IN_WORKSPACE,true);
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 PROCESSING_CONTROLLER_HXX
+#define PROCESSING_CONTROLLER_HXX
+
+#include "MEDCALCGUI.hxx"
+
+#include "MEDEventListener_i.hxx"
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(MEDDataManager)
+
+#include <QObject>
+#include <SalomeApp_Module.h>
+#include <SALOME_AppStudyEditor.hxx>
+
+#include "XmedDataModel.hxx"
+#include "DlgChangeUnderlyingMesh.hxx"
+#include "DlgInterpolateField.hxx"
+
+typedef struct {
+ enum EventType {
+ EVENT_IMPORT_OBJECT,
+ EVENT_PROCESS_INTERPOLATE_FIELD,
+ EVENT_PROCESS_CHANGE_UNDERLYING_MESH
+ };
+ int eventtype;
+ XmedDataObject* objectdata;
+} ProcessingEvent;
+
+class MEDModule;
+
+class MEDCALCGUI_EXPORT ProcessingController : public QObject {
+ Q_OBJECT
+
+public:
+ ProcessingController(MEDModule* salomeModule);
+ ~ProcessingController();
+
+ void createActions();
+
+public slots:
+ // Callback connected to dialog box validation signals
+ void OnChangeUnderlyingMeshInputValidated();
+ void OnInterpolateFieldInputValidated();
+
+protected slots:
+ void OnChangeUnderlyingMesh();
+ void OnInterpolateField();
+
+signals:
+ void processingSignal(const ProcessingEvent*);
+
+private:
+ MEDModule* _salomeModule;
+ SALOME_AppStudyEditor* _studyEditor; // borrowed to MEDModule
+ DlgChangeUnderlyingMesh* _dlgChangeUnderlyingMesh;
+ DlgInterpolateField* _dlgInterpolateField;
+};
+
+#endif /* PROCESSING_CONTROLLER_HXX */
* and containing a tree view for rendering a hierarchical data
* model. This datamodel contains the objects used in the workspace.
*/
-//WorkspaceController::WorkspaceController(StandardApp_Module * salomeModule)
-WorkspaceController::WorkspaceController(MEDModule * salomeModule)
+WorkspaceController::WorkspaceController(MEDModule* salomeModule)
: TreeGuiManager(salomeModule->getApp(), "Workspace")
{
_salomeModule = salomeModule;
// with other parts of the application, in particular the python
// console that could retrieve this IOR using the
// getEventListenerIOR() function of the MEDDataManager.
- SalomeApp_Application * salomeApp = salomeModule->getApp();
- const char * medEventListenerIOR =
+ SalomeApp_Application* salomeApp = salomeModule->getApp();
+ const char* medEventListenerIOR =
salomeApp->orb()->object_to_string(medEventListenerServant);
MEDFactoryClient::getDataManager()->setEventListenerIOR(medEventListenerIOR);
}
WorkspaceController::~WorkspaceController() {
- std::cout << "WorkspaceController::~WorkspaceController()\n";
+ STDLOG("WorkspaceController::~WorkspaceController()");
MEDEventListener_i::release();
}
QString tooltip = tr("TIP_SAVE_WORKSPACE");
QString icon = tr("ICO_WORKSPACE_SAVE");
int actionId = _salomeModule->createStandardAction(label,this,SLOT(OnSaveWorkspace()),icon,tooltip);
- //_salomeModule->addActionInToolbar(actionId);
_salomeModule->createTool(actionId, toolbarId);
label = tr("LAB_CLEAN_WORKSPACE");
tooltip = tr("TIP_CLEAN_WORKSPACE");
icon = tr("ICO_WORKSPACE_CLEAN");
actionId = _salomeModule->createStandardAction(label,this,SLOT(OnCleanWorkspace()),icon,tooltip);
-//_salomeModule->addActionInToolbar(actionId);
_salomeModule->createTool(actionId, toolbarId);
}
* console (see _importItemList).
*/
void WorkspaceController::_importItem(QString itemNameId) {
- XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
if ( dataModel == NULL ) {
LOG("No data model associated to this tree view");
return;
// We can request the dataModel to obtain the dataObject associated
// to this item (iteNameId is a TreeView id, Qt stuff only).
- XmedDataObject * dataObject =
- (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+ XmedDataObject* dataObject =
+ (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
if ( dataObject == NULL ) {
LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
// Then, we can request this data object to obtain the associated
// FieldHandler.
- MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
STDLOG("Field: mesh="<<fieldHandler->meshname<<" name="<<fieldHandler->fieldname);
// Finally, we can import the field
* options or simply specify the alias (i.e. the name of the python
* variable).
*/
-void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler,
+void WorkspaceController::_importFieldIntoConsole(MEDCALC::FieldHandler* fieldHandler,
bool askForOptions,
- const char * alias)
+ const char* alias)
{
STDLOG("alias="<<alias);
// By default, the alias is the name of the field
- QString *effectiveAlias;
+ QString*effectiveAlias;
if ( alias == NULL ) {
effectiveAlias = new QString(fieldHandler->fieldname);
}
* emitted from the MEDEventListener. It processes events coming from
* the python console.
*/
-void WorkspaceController::processMedEvent(const MEDCALC::MedEvent * event) {
+void WorkspaceController::processMedEvent(const MEDCALC::MedEvent* event) {
STDLOG("WorkspaceController::processMedEvent");
STDLOG("dataId :"<<event->dataId);
- XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
if ( dataModel == NULL ) {
STDLOG("No data model associated to this tree view");
return;
}
else if ( event->type == MEDCALC::EVENT_PUT_IN_WORKSPACE ) {
STDLOG("add new field");
- MEDCALC::FieldHandler * fieldHandler =
+ MEDCALC::FieldHandler* fieldHandler =
MEDFactoryClient::getDataManager()->getFieldHandler(event->dataId);
- XmedDataObject * dataObject = (XmedDataObject *)dataModel->newDataObject();
+ XmedDataObject* dataObject = (XmedDataObject*)dataModel->newDataObject();
dataObject->setFieldHandler(*fieldHandler);
this->getDataTreeModel()->addData(dataObject);
}
else if ( event->type == MEDCALC::EVENT_REMOVE_FROM_WORKSPACE ) {
STDLOG("remove field");
- std::map<string, DataObject *>::iterator itr = dataModel->begin();
+ std::map<string, DataObject*>::iterator itr = dataModel->begin();
for ( ; itr != dataModel->end(); ++itr) {
XmedDataObject* obj = dynamic_cast<XmedDataObject*>(itr->second);
if (obj->getFieldHandler()->id == event->dataId) {
}
else if ( event->type == MEDCALC::EVENT_CLEAN_WORKSPACE ) {
STDLOG("clean workspace");
- std::map<string, DataObject *>::iterator itr = dataModel->begin();
+ std::map<string, DataObject*>::iterator itr = dataModel->begin();
for ( ; itr != dataModel->end(); ++itr) {
XmedDataObject* obj = dynamic_cast<XmedDataObject*>(itr->second);
std::string itemNameId = obj->getNameId();
emit workspaceSignal(event); // forward to DatasourceController
}
else if ( event->type == MEDCALC::EVENT_ADD_PRESENTATION ) {
- emit workspaceSignal(event); // forward to DatasourceController
+ emit workspaceSignal(event); // forward to PresentationController
+ }
+ else if ( event->type == MEDCALC::EVENT_REMOVE_PRESENTATION ) {
+ emit workspaceSignal(event); // forward to PresentationController
}
}
* name is requested to the user using a file chooser dialog box
*/
void WorkspaceController::_saveItemList(QStringList itemNameIdList) {
- XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel());
+ XmedDataProcessor* dataProcessor = new XmedDataProcessor(this->getDataModel());
dataProcessor->process(itemNameIdList);
MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList();
delete dataProcessor;
* This function remove the selected item from workspace.
*/
void WorkspaceController::_removeItemList(QStringList itemNameIdList) {
- XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
if ( dataModel == NULL ) {
LOG("No data model associated to this tree view");
return;
// We can request the dataModel to obtain the dataObject associated
// to this item (iteNameId is a TreeView id, Qt stuff only).
- XmedDataObject * dataObject =
- (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+ XmedDataObject* dataObject =
+ (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
if ( dataObject == NULL ) {
LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
// Then, we can request this data object to obtain the associated
// FieldHandler.
- MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
STDLOG("Field: mesh="<<fieldHandler->meshname<<" name="<<fieldHandler->fieldname);
// Remove the field variable from console
* scalar map of the first item to start the job.
*/
void WorkspaceController::_exportItemList(QStringList itemNameIdList) {
- XmedDataProcessor * dataProcessor = new XmedDataProcessor(this->getDataModel());
+ XmedDataProcessor* dataProcessor = new XmedDataProcessor(this->getDataModel());
dataProcessor->process(itemNameIdList);
MEDCALC::FieldIdList_var fieldIdList = dataProcessor->getResultingFieldIdList();
delete dataProcessor;
// _GBO_ We use a temporary file to proceed with this export to
// paravis. I'm sure it could be better in a futur version or when I
// will get a better understanding of paravis API.
- const char * tmpfilename = "/tmp/medcalc_export2paravis.med";
+ const char* tmpfilename = "/tmp/medcalc_export2paravis.med";
MEDFactoryClient::getDataManager()->saveFields(tmpfilename, fieldIdList);
// We import the whole file but create a scalar map for the first
// selected field only (it's just an export to continue the job in
// paravis)
- XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
if ( dataModel == NULL ) {
STDLOG("No data model associated to this tree view");
return;
}
QString itemNameId = itemNameIdList[0];
- XmedDataObject * dataObject = (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+ XmedDataObject* dataObject = (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
if ( dataObject == NULL ) {
LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
return;
}
- MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
QStringList commands;
/*
commands+=QString("from xmed.driver_pvis import pvis_scalarmap");
// __GBO__: In this version, we consider only the first field in the selection
QString itemNameId = itemNameIdList[0];
- XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
if ( dataModel == NULL ) {
LOG("No data model associated to this tree view");
return;
// We can request the dataModel to obtain the dataObject associated
// to this item (iteNameId is a TreeView id, Qt stuff only).
- XmedDataObject * dataObject =
- (XmedDataObject *)dataModel->getDataObject(QS2S(itemNameId));
+ XmedDataObject* dataObject =
+ (XmedDataObject*)dataModel->getDataObject(QS2S(itemNameId));
if ( dataObject == NULL ) {
LOG("WorkspaceController: WARN! No data object associated to the item "<<itemNameId);
return;
// Then, we can request this data object to obtain the associated
// FieldHandler.
- MEDCALC::FieldHandler * fieldHandler = dataObject->getFieldHandler();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
// And finally, we can create the set of medcalc instructions to
// generate the scalar map on this field.
* DatasourceController. The connection between the datasource signal
* and this slot is realized by the main class MEDModule.
*/
-void WorkspaceController::processDatasourceEvent(const DatasourceEvent * event) {
- XmedDataModel * dataModel = (XmedDataModel *)this->getDataModel();
+void WorkspaceController::processDatasourceEvent(const DatasourceEvent* event) {
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
if ( dataModel == NULL ) {
STDLOG("No data model associated to this tree view");
return;
// options such that "change the underlying mesh".
// <<<
- XmedDataObject * dataObject = event->objectdata;
+ XmedDataObject* dataObject = event->objectdata;
if ( event->eventtype == DatasourceEvent::EVENT_IMPORT_OBJECT ) {
std::cout << "IMPORT object in workspace: " << dataObject->toString() << std::endl;
askForOptions,
QCHARSTAR(event->objectalias));
}
- else if ( event->eventtype == DatasourceEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) {
+ else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) {
+ QStringList commands;
+ commands += QString("source_id = medcalc.LoadDataSource('%1')").arg(event->objectalias);
+ commands += QString("source_id");
+ _consoleDriver->exec(commands);
+ }
+ else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) {
QStringList commands;
+ commands += QString("source_id = medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias);
+ commands += QString("source_id");
+ _consoleDriver->exec(commands);
+ }
+ else {
+ STDLOG("The event "<<event->eventtype<<" is not implemented yet");
+ }
+}
+
+QString
+WorkspaceController::_getViewMode()
+{
+ MEDCALC::MEDPresentationViewMode viewMode = _salomeModule->getSelectedViewMode();
+ switch(viewMode) {
+ case MEDCALC::VIEW_MODE_REPLACE: return "MEDCALC.VIEW_MODE_REPLACE";
+ case MEDCALC::VIEW_MODE_OVERLAP: return "MEDCALC.VIEW_MODE_OVERLAP";
+ case MEDCALC::VIEW_MODE_NEW_LAYOUT: return "MEDCALC.VIEW_MODE_NEW_LAYOUT";
+ case MEDCALC::VIEW_MODE_SPLIT_VIEW: return "MEDCALC.VIEW_MODE_SPLIT_VIEW";
+ }
+ return QString();
+}
-#define stringify( name ) # name
- QString viewMode = stringify(MEDCALC::VIEW_MODE_NEW_LAYOUT); // :TODO: change this (get value from dedicated dialog)
- viewMode.replace("::", ".");
+QString
+WorkspaceController::_getColorMap()
+{
+ MEDCALC::MEDPresentationColorMap colorMap = _salomeModule->getSelectedColorMap();
+ switch(colorMap) {
+ case MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW: return "MEDCALC.COLOR_MAP_BLUE_TO_RED_RAINBOW";
+ case MEDCALC::COLOR_MAP_COOL_TO_WARM: return "MEDCALC.COLOR_MAP_COOL_TO_WARM";
+ }
+ return QString();
+}
+/**
+ * This slot can process the event coming from the
+ * DatasourceController. The connection between the datasource signal
+ * and this slot is realized by the main class MEDModule.
+ */
+void WorkspaceController::processPresentationEvent(const PresentationEvent* event) {
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
+ if ( dataModel == NULL ) {
+ STDLOG("No data model associated to this tree view");
+ return;
+ }
+
+ // >>>
+ // __GBO__ To know what to do we should test the type, because the
+ // object could be a mesh, a timeseries or a single field. We test
+ // here the case of a single field. Moreover, there could have
+ // options such that "change the underlying mesh".
+ // <<<
+
+ XmedDataObject* dataObject = event->objectdata;
+
+ // --> Send commands to SALOME Python console
+ if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SCALAR_MAP ) {
+ QString viewMode = _getViewMode();
+ //QString displayedInfo = ; // from PresentationController combobox
+ //QString scalarBarRange = ; // from PresentationController spinbox
+ QString colorMap = _getColorMap();
MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
- commands += QString("medcalc.MakeScalarMap(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
+ QStringList commands;
+ commands += QString("presentation_id = medcalc.MakeScalarMap(accessField(%1), %2, colorMap=%3)").arg(fieldHandler->id).arg(viewMode).arg(colorMap);
+ commands += QString("presentation_id");
_consoleDriver->exec(commands);
}
- else if ( event->eventtype == DatasourceEvent::EVENT_ADD_DATASOURCE ) {
+ else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_CONTOUR ) {
+ QString viewMode = _getViewMode();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
QStringList commands;
- commands += QString("medcalc.LoadDataSource('%1')").arg(event->objectalias);
+ commands += QString("presentation_id = medcalc.MakeContour(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
+ commands += QString("presentation_id");
_consoleDriver->exec(commands);
}
- else if ( event->eventtype == DatasourceEvent::EVENT_ADD_IMAGE_AS_DATASOURCE ) {
+ else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_VECTOR_FIELD ) {
+ QString viewMode = _getViewMode();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
+ QStringList commands;
+ commands += QString("presentation_id = medcalc.MakeVectorField(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
+ commands += QString("presentation_id");
+ _consoleDriver->exec(commands);
+ }
+ else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_SLICES ) {
+ QString viewMode = _getViewMode();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
QStringList commands;
- commands += QString("medcalc.LoadImageAsDataSource('%1')").arg(event->objectalias);
+ commands += QString("presentation_id = medcalc.MakeSlices(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
+ commands += QString("presentation_id");
+ _consoleDriver->exec(commands);
+ }
+ else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_DEFLECTION_SHAPE ) {
+ QString viewMode = _getViewMode();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
+ QStringList commands;
+ commands += QString("presentation_id = medcalc.MakeDeflectionShape(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
+ commands += QString("presentation_id");
+ _consoleDriver->exec(commands);
+ }
+ else if ( event->eventtype == PresentationEvent::EVENT_VIEW_OBJECT_POINT_SPRITE ) {
+ QString viewMode = _getViewMode();
+ MEDCALC::FieldHandler* fieldHandler = dataObject->getFieldHandler();
+ QStringList commands;
+ commands += QString("presentation_id = medcalc.MakePointSprite(accessField(%1), %2)").arg(fieldHandler->id).arg(viewMode);
+ commands += QString("presentation_id");
_consoleDriver->exec(commands);
}
else {
STDLOG("The event "<<event->eventtype<<" is not implemented yet");
}
+}
+
+void
+WorkspaceController::processProcessingEvent(const ProcessingEvent* event)
+{
+ XmedDataModel* dataModel = (XmedDataModel*)this->getDataModel();
+ if ( dataModel == NULL ) {
+ STDLOG("No data model associated to this tree view");
+ return;
+ }
+
+ // >>>
+ // __GBO__ To know what to do we should test the type, because the
+ // object could be a mesh, a timeseries or a single field. We test
+ // here the case of a single field. Moreover, there could have
+ // options such that "change the underlying mesh".
+ // <<<
+ XmedDataObject* dataObject = event->objectdata;
+
+ if ( event->eventtype == ProcessingEvent::EVENT_IMPORT_OBJECT ) {
+ std::cout << "IMPORT object in workspace: " << dataObject->toString() << std::endl;
+ STDLOG("IMPORT object in workspace:\n"<<dataObject->toString());
+ // _GBO_ QUESTION: tag automatically the object as a peristant object ??
+ // We first add the data object to the internal data model
+ dataModel->addDataObject(dataObject);
+ // Then we request the tree view to consider this new object
+ this->getDataTreeModel()->addData(dataObject);
+ }
}
void WorkspaceController::OnSaveWorkspace() {
#include "MEDEventListener_i.hxx"
#include "XmedConsoleDriver.hxx"
#include "DatasourceController.hxx"
+#include "PresentationController.hxx"
+#include "ProcessingController.hxx"
#include "MEDCALCGUI.hxx"
#include <SALOMEconfig.h>
Q_OBJECT
public:
- WorkspaceController(MEDModule * salomeModule);
+ WorkspaceController(MEDModule* salomeModule);
~WorkspaceController();
void createActions();
void processItemList(QStringList itemNameIdList, int actionId);
// Internal slots
- void processMedEvent(const MEDCALC::MedEvent * event);
- void processDatasourceEvent(const DatasourceEvent * event);
+ void processMedEvent(const MEDCALC::MedEvent* event);
+ void processDatasourceEvent(const DatasourceEvent* event);
+ void processPresentationEvent(const PresentationEvent* event);
+ void processProcessingEvent(const ProcessingEvent* event);
void OnSaveWorkspace();
void OnCleanWorkspace();
signals:
- void workspaceSignal(const MEDCALC::MedEvent * event);
+ void workspaceSignal(const MEDCALC::MedEvent* event);
private:
void _importItem(QString itemNameId);
void _importItemList(QStringList itemNameIdList);
- void _importFieldIntoConsole(MEDCALC::FieldHandler * fieldHandler,
+ void _importFieldIntoConsole(MEDCALC::FieldHandler* fieldHandler,
bool askForOptions,
- const char * alias=NULL);
+ const char* alias=NULL);
void _exportItemList(QStringList itemNameIdList);
void _saveItemList(QStringList itemNameIdList);
void _removeItemList(QStringList itemNameIdList);
void _viewItemList(QStringList itemNameIdList);
+ QString _getViewMode();
+ QString _getColorMap();
private:
- XmedConsoleDriver * _consoleDriver;
- MEDModule * _salomeModule;
- MEDEventListener_i * _medEventListener;
+ XmedConsoleDriver* _consoleDriver;
+ MEDModule* _salomeModule;
+ MEDEventListener_i* _medEventListener;
// This structure is intended to memorized in a bundle the whole set
// of integers identifying the actions of the popup menu associated
#include "XmedDataModel.hxx"
#include <Basics_Utils.hxx>
+#include "MEDCalcConstants.hxx"
//
// =================================================================
return &_fieldHandler;
}
-const char * XmedDataObject::mapTypeOfFieldLabel[XmedDataObject::NB_TYPE_OF_FIELDS] =
- {"ON_CELLS", "ON_NODES", "ON_GAUSS_PT", "ON_GAUSS_NE" };
/*!
* This function implements the convention for displaying a fieldname
* characterized by its spatial discretisation type.
// 2 = ON_GAUSS_PT
// 3 = ON_GAUSS_NE
if ( _fieldHandler.type < 0 ||
- _fieldHandler.type >= XmedDataObject::NB_TYPE_OF_FIELDS ) {
+ _fieldHandler.type >= NB_TYPE_OF_FIELDS ) {
return string("UNKNOWN");
}
string label(_fieldHandler.fieldname);
void setFieldHandler(MEDCALC::FieldHandler fieldHandler);
MEDCALC::FieldHandler * getFieldHandler();
- static const int NB_TYPE_OF_FIELDS = 4;
- static const char * mapTypeOfFieldLabel[NB_TYPE_OF_FIELDS];
-
private:
MEDCALC::FieldHandler _fieldHandler;
string _getTypedFieldLabel();
ADD_DEFINITIONS(${OMNIORB_DEFINITIONS})
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
-SET(MEDCALCGUI_dialogs_FORMS
- GenericDialog.ui
- DlgAlias.ui
- DlgUseInWorkspace.ui
- DlgChangeUnderlyingMesh.ui
- DlgInterpolateField.ui
- DlgImageToMed.ui
-)
-QT4_WRAP_UI(MEDCALCGUI_dialogs_FORMS_HEADERS ${MEDCALCGUI_dialogs_FORMS})
+FILE(GLOB MEDCALCGUI_dialogs_FORMS "${CMAKE_CURRENT_SOURCE_DIR}/*.ui")
+QT_WRAP_UIC(MEDCALCGUI_dialogs_FORMS_HEADERS ${MEDCALCGUI_dialogs_FORMS})
SET(MEDCALCGUI_dialogs_FILES
GenericDialog.hxx
DlgChangeUnderlyingMesh.hxx
DlgInterpolateField.hxx
DlgImageToMed.hxx
+ WidgetPresentationParameters.hxx
)
-QT4_WRAP_CPP(MEDCALCGUI_dialogs_HEADERS_MOC ${MEDCALCGUI_dialogs_FILES})
+QT_WRAP_MOC(MEDCALCGUI_dialogs_HEADERS_MOC ${MEDCALCGUI_dialogs_FILES})
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${GUI_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/..
- ${QT4_INCLUDE_DIRECTORY}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../..
+ ${PROJECT_BINARY_DIR}/idl
)
SET(MEDCALCGUI_dialogs_SOURCES
DlgChangeUnderlyingMesh.cxx
DlgInterpolateField.cxx
DlgImageToMed.cxx
+ WidgetPresentationParameters.cxx
)
ADD_LIBRARY(MEDCALCGUI_dialogs SHARED ${MEDCALCGUI_dialogs_SOURCES} ${MEDCALCGUI_dialogs_HEADERS_MOC} ${MEDCALCGUI_dialogs_FORMS_HEADERS})
-TARGET_LINK_LIBRARIES(MEDCALCGUI_dialogs ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel}
+TARGET_LINK_LIBRARIES(MEDCALCGUI_dialogs SalomeIDLMED ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel}
${GUI_SalomeGuiHelpers} ${OMNIORB_LIBRARIES} ${GUI_qtx} ${GUI_suit} ${PLATFORM_LIBRARIES}
${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} ${GUI_SalomeGuiHelpers})
INSTALL(TARGETS MEDCALCGUI_dialogs DESTINATION ${SALOME_INSTALL_LIBS})
//
#include "DlgChangeUnderlyingMesh.hxx"
-#include "DatasourceConstants.hxx"
+#include <MEDCalcConstants.hxx>
#include <QString>
#include <QMessageBox>
SALOMEDS::SObject_var soMesh = listOfSObject->at(0);
// _GBO_ TODO: we should test here if it is a mesh (attribute in
// the sobject)
- _meshId = _studyEditor->getParameterInt(soMesh,OBJECT_ID);
+ _meshId = _studyEditor->getParameterInt(soMesh,MESH_ID);
const char * meshname = _studyEditor->getName(soMesh);
this->ui.txtMesh->setText(QString(meshname));
}
//
#include "DlgInterpolateField.hxx"
-#include "DatasourceConstants.hxx"
+#include <MEDCalcConstants.hxx>
#include <QString>
#include <QMessageBox>
this->ui.comboBoxMethod->addItems(methods);
QStringList natures;
- natures << "NoNature" << "ConservativeVolumic" << "Integral" << "IntegralGlobConstraint" << "RevIntegral";
+ natures << "NoNature" << "IntensiveMaximum" << "ExtensiveMaximum" << "ExtensiveConservation" << "IntensiveConservation";
this->ui.comboBoxNature->addItems(natures);
connect(this->ui.btnSelectMesh, SIGNAL(clicked()), this, SLOT(OnSelectMesh()));
SALOMEDS::SObject_var soMesh = listOfSObject->at(0);
// _GBO_ TODO: we should test here if it is a mesh (attribute in
// the sobject)
- _meshId = _studyEditor->getParameterInt(soMesh,OBJECT_ID);
+ _meshId = _studyEditor->getParameterInt(soMesh,MESH_ID);
const char * meshname = _studyEditor->getName(soMesh);
this->ui.txtMesh->setText(QString(meshname));
}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 "WidgetPresentationParameters.hxx"
+#include <Basics_Utils.hxx>
+
+WidgetPresentationParameters::WidgetPresentationParameters(QWidget* parent)
+ : QWidget(parent)
+{
+ ui.setupUi(this); // To be done first
+}
+
+std::string
+WidgetPresentationParameters::getField()
+{
+ return this->ui.comboBoxField->currentText().toStdString();
+}
+
+std::string
+WidgetPresentationParameters::getScalarBarRange()
+{
+ return this->ui.comboBoxScalarBarRange->currentText().toStdString();
+}
+
+double
+WidgetPresentationParameters::getScalarBarTimestep()
+{
+ return this->ui.doubleSpinBoxTimeStep->value();
+}
+
+double
+WidgetPresentationParameters::getScalarBarMinVal()
+{
+ return this->ui.doubleSpinBoxMinVal->value();
+}
+
+double
+WidgetPresentationParameters::getScalarBarMaxVal()
+{
+ return this->ui.doubleSpinBoxMaxVal->value();
+}
+
+MEDCALC::MEDPresentationColorMap
+WidgetPresentationParameters::getColorMap()
+{
+ QString colorMap = this->ui.comboBoxColorMap->currentText();
+ if (colorMap == tr("LAB_BLUE_TO_RED")) {
+ return MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW;
+ }
+ else if (colorMap == tr("LAB_COOL_TO_WARM")) {
+ return MEDCALC::COLOR_MAP_COOL_TO_WARM;
+ }
+ // Should not happen
+ STDLOG("Strange!! No matching color map found - returning blue to red.");
+ return MEDCALC::COLOR_MAP_BLUE_TO_RED_RAINBOW;
+}
--- /dev/null
+// Copyright (C) 2016 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, or (at your option) any later version.
+//
+// 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 WIDGET_PRESENTATION_PARAMETERS_HXX
+#define WIDGET_PRESENTATION_PARAMETERS_HXX
+
+#include "MEDCALCGUIdialogs.hxx"
+
+#include "ui_WidgetPresentationParameters.h"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(MEDPresentationManager)
+
+#include <QObject>
+
+class WidgetPresentationParameters : public QWidget
+{
+ Q_OBJECT
+public:
+ WidgetPresentationParameters(QWidget* parent = 0);
+ virtual ~WidgetPresentationParameters() {}
+
+ std::string getField();
+ std::string getScalarBarRange();
+ double getScalarBarTimestep();
+ double getScalarBarMinVal();
+ double getScalarBarMaxVal();
+ MEDCALC::MEDPresentationColorMap getColorMap();
+
+ private:
+ Ui_WidgetPresentationParameters ui; // instance of the class defined in ui_WidgetPresentationParameters.h
+};
+
+
+#endif
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WidgetPresentationParameters</class>
+ <widget class="QWidget" name="WidgetPresentationParameters">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>404</width>
+ <height>200</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>200</height>
+ </size>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>LAB_DISP_COMP</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="comboBoxField">
+ <item>
+ <property name="text">
+ <string>LAB_EUCLIDEAN_NORM</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="labelTimeStep">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>LAB_TIMESTEP</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QDoubleSpinBox" name="doubleSpinBoxTimeStep">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="labelMinVal">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>LAB_MIN_VALUE</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QDoubleSpinBox" name="doubleSpinBoxMinVal">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="labelMaxVal">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>LAB_MAX_VALUE</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QDoubleSpinBox" name="doubleSpinBoxMaxVal">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>LAB_COLOR_MAP</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1">
+ <widget class="QComboBox" name="comboBoxColorMap">
+ <item>
+ <property name="text">
+ <string>LAB_BLUE_TO_RED</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>LAB_COOL_TO_WARM</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="comboBoxScalarBarRange">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string>LAB_ALL_TIMESTEPS</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>LAB_ONE_TIMESTEP</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>LAB_USER_RANGE</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>LAB_SCALARBAR</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>LAB_RANGE</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
#
ADD_SUBDIRECTORY(testfiles)
+ADD_SUBDIRECTORY(presentations)
+
+FILE(GLOB MED_RESOURCES_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
-SET(MED_RESOURCES_FILES
- datasource_add.png
- datasource_changeUnderlyingMesh.png
- datasource_interpolateField.png
- datasource_expandfield.png
- datasource_field.png
- datasource_mesh.png
- datasource.png
- datasource_use.png
- datasource_view.png
- fileimport-32.png
- folder.png
- image_add.png
- MEDCalc.png
- MEDCalc_small.png
- workspace_clean.png
- workspace_save.png
- pqAppIcon16.png
- )
INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA})
--- /dev/null
+# Copyright (C) 2016 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, or (at your option) any later version.
+#
+# 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
+#
+
+ADD_SUBDIRECTORY(modern)
+ADD_SUBDIRECTORY(classic)
--- /dev/null
+# Copyright (C) 2016 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, or (at your option) any later version.
+#
+# 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
+#
+
+FILE(GLOB MED_RESOURCES_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
+
+INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA})
--- /dev/null
+# Copyright (C) 2016 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, or (at your option) any later version.
+#
+# 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
+#
+
+FILE(GLOB MED_RESOURCES_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
+
+INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA})
# Presentations
from medpresentation import MakeScalarMap
-from medpresentation import MakeIsoSurface
+from medpresentation import MakeContour
from medpresentation import MakeVectorField
from medpresentation import MakeSlices
from medpresentation import MakeDeflectionShape
from medpresentation import MakePointSprite
+from medpresentation import RemovePresentation
# Console commands
import medconsole
def notifyGui_cleanWorkspace():
__notifyGui(MEDCALC.EVENT_CLEAN_WORKSPACE)
#
-def notifyGui_addDatasource(filename):
- __notifyGui(MEDCALC.EVENT_ADD_DATASOURCE, filename=filename)
+def notifyGui_addDatasource(handlerId, filename):
+ __notifyGui(MEDCALC.EVENT_ADD_DATASOURCE, dataId=handlerId, filename=filename)
#
def notifyGui_addPresentation(fieldId, presId):
__notifyGui(MEDCALC.EVENT_ADD_PRESENTATION, dataId=fieldId, presentationId=presId)
#
+def notifyGui_removePresentation(presId):
+ __notifyGui(MEDCALC.EVENT_REMOVE_PRESENTATION, presentationId=presId)
+#
def LoadDataSource(filename):
dataManager = medcalc.medcorba.factory.getDataManager()
- dataManager.loadDatasource(filename)
+ handler = dataManager.loadDatasource(filename)
from medcalc.medevents import notifyGui_addDatasource
- notifyGui_addDatasource(filename)
+ notifyGui_addDatasource(handler.id, filename)
+ return handler.id
#
def LoadImageAsDataSource(filename):
from medimages import FieldBuilder
builder = FieldBuilder()
builder.image2med(filename, medfilename)
- LoadDataSource(medfilename)
+ return LoadDataSource(medfilename)
#
import medcalc
import MEDCALC
-from medcalc.medevents import notifyGui_addPresentation
+from medcalc.medevents import notifyGui_addPresentation, notifyGui_removePresentation
__manager = medcalc.medcorba.factory.getPresentationManager()
-def MakeScalarMap(proxy, viewMode=MEDCALC.VIEW_MODE_REPLACE):
+def MakeScalarMap(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT,
+ displayedInfo=MEDCALC.DISPLAY_DEFAULT,
+ scalarBarRange=MEDCALC.ScalarBarRange(MEDCALC.SCALAR_BAR_RANGE_VAL_MIN_DEFAULT,
+ MEDCALC.SCALAR_BAR_RANGE_VAL_MAX_DEFAULT),
+ colorMap=MEDCALC.COLOR_MAP_DEFAULT
+ ):
# Create the presentation instance in CORBA engine
# The engine in turn creates the ParaView pipeline elements
-
- print "In MakeScalarMap (Python)"
-
- print "viewMode:", viewMode, " [", type(viewMode), "]"
-
- params = MEDCALC.ScalarMapParameters(proxy.id, viewMode)
+ params = MEDCALC.ScalarMapParameters(proxy.id, viewMode, displayedInfo, scalarBarRange, colorMap)
presentation_id = __manager.makeScalarMap(params)
notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
+#
+
+def MakeContour(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT,
+ displayedInfo=MEDCALC.DISPLAY_DEFAULT,
+ scalarBarRange=MEDCALC.ScalarBarRange(MEDCALC.SCALAR_BAR_RANGE_VAL_MIN_DEFAULT,
+ MEDCALC.SCALAR_BAR_RANGE_VAL_MAX_DEFAULT),
+ colorMap=MEDCALC.COLOR_MAP_DEFAULT,
+ nbContours=MEDCALC.NB_CONTOURS_DEFAULT
+ ):
+ params = MEDCALC.ContourParameters(proxy.id, viewMode, displayedInfo, scalarBarRange, colorMap, nbContours)
+ presentation_id = __manager.makeContour(params)
+ notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
#
-def MakeIsoSurface():
- print "Not implemented yet"
+def MakeVectorField(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT
+ ):
+ params = MEDCALC.VectorFieldParameters(proxy.id, viewMode)
+ presentation_id = __manager.makeVectorField(params)
+ notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
#
-def MakeVectorField():
- print "Not implemented yet"
+def MakeSlices(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT,
+ orientation=MEDCALC.SLICE_ORIENTATION_DEFAULT,
+ nbSlices=MEDCALC.NB_SLICES_DEFAULT
+ ):
+ params = MEDCALC.SlicesParameters(proxy.id, viewMode, orientation, nbSlices)
+ presentation_id = __manager.makeSlices(params)
+ notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
#
-def MakeSlices():
- print "Not implemented yet"
+def MakeDeflectionShape(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT
+ ):
+ params = MEDCALC.DeflectionShapeParameters(proxy.id, viewMode)
+ presentation_id = __manager.makeDeflectionShape(params)
+ notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
#
-def MakeDeflectionShape():
- print "Not implemented yet"
+def MakePointSprite(proxy,
+ viewMode=MEDCALC.VIEW_MODE_DEFAULT,
+ displayedInfo=MEDCALC.DISPLAY_DEFAULT,
+ scalarBarRange=MEDCALC.ScalarBarRange(MEDCALC.SCALAR_BAR_RANGE_VAL_MIN_DEFAULT,
+ MEDCALC.SCALAR_BAR_RANGE_VAL_MAX_DEFAULT),
+ colorMap=MEDCALC.COLOR_MAP_DEFAULT,
+ ):
+ params = MEDCALC.PointSpriteParameters(proxy.id, viewMode, displayedInfo, scalarBarRange, colorMap)
+ presentation_id = __manager.makePointSprite(params)
+ notifyGui_addPresentation(proxy.id, presentation_id)
+ return presentation_id
#
-def MakePointSprite():
- print "Not implemented yet"
+def RemovePresentation(presentation_id):
+ ok = __manager.removePresentation(presentation_id)
+ if ok:
+ notifyGui_removePresentation(presentation_id)
#
#include <algorithm>
#include <functional>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
// Default constructor
// Set field name to nm and selection to flase
// Then, read the Med structur to fill time steps, components and meshes
MEDCalculatorBrowserField::MEDCalculatorBrowserField(const char *fname, const char *fieldName) : _name(fieldName), _file_name(fname), _selection(false)
{
- std::vector< std::string > meshNames=MEDLoader::GetMeshNamesOnField(fname,fieldName);
- std::vector< std::pair< std::pair<int,int>, double > > dtits=MEDLoader::GetAllFieldIterations(fname, fieldName);
+ std::vector< std::string > meshNames=GetMeshNamesOnField(fname,fieldName);
+ std::vector< std::pair< std::pair<int,int>, double > > dtits=GetAllFieldIterations(fname, fieldName);
for(std::vector<std::pair< std::pair<int,int>, double > >::const_iterator iter=dtits.begin();iter!=dtits.end();iter++)
{
_steps.push_back(MEDCalculatorBrowserStep((*iter).first.first,(*iter).first.second,(*iter).second,meshNames[0]));
}
- std::vector<TypeOfField> types=MEDLoader::GetTypesOfField(fname,meshNames[0].c_str(),fieldName);
+ std::vector<TypeOfField> types=GetTypesOfField(fname,meshNames[0].c_str(),fieldName);
if(types.empty())
throw INTERP_KERNEL::Exception("MEDCalculatorBrowserField::MEDCalculatorBrowserField : the file is not loadable using MED File 3 API ! Problably presence of field on edges faces...");
_type=types[0];//To improve
MEDCouplingFieldDouble *tmpf=0;
try
{
- tmpf=MEDLoader::ReadField(_type,fname,meshNames[0].c_str(),0,fieldName,dtits[0].first.first,dtits[0].first.second);
+ tmpf=ReadField(_type,fname,meshNames[0].c_str(),0,fieldName,dtits[0].first.first,dtits[0].first.second);
}
catch(INTERP_KERNEL::Exception& e)
{
if(_type==ON_CELLS)
- tmpf=MEDLoader::ReadField(_type,fname,meshNames[0].c_str(),-1,fieldName,dtits[0].first.first,dtits[0].first.second);
+ tmpf=ReadField(_type,fname,meshNames[0].c_str(),-1,fieldName,dtits[0].first.first,dtits[0].first.second);
else
throw e;
}
_components.push_back(c);
}
tmpf->decrRef();
- _corresponding_meshes=MEDLoader::GetMeshNamesOnField(fname,fieldName);
+ _corresponding_meshes=GetMeshNamesOnField(fname,fieldName);
}
// Equal to string operator,
// This class correspond to a MED field of a file
// It contains the field name, the components, the time steps and selection methods
// It's used to select a field, it's components and time steps
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCalculatorBrowserStep;// top prevent cross include
class MEDCALCULATOR_EXPORT MEDCalculatorBrowserField
#include <deque>
#include <string>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
// Default constructor
MEDCalculatorBrowserLiteStruct::MEDCalculatorBrowserLiteStruct() : _any_selection(false)
MEDCalculatorBrowserLiteStruct::MEDCalculatorBrowserLiteStruct(const char *f) : _file(f), _any_selection(false)
{
computeBaseName();
- std::vector<std::string> meshNames=MEDLoader::GetMeshNames(_file.c_str());
+ std::vector<std::string> meshNames=GetMeshNames(_file.c_str());
for(std::vector<std::string>::const_iterator iter=meshNames.begin();iter!=meshNames.end();iter++)
_meshes.push_back(MEDCalculatorBrowserMesh((*iter).c_str()));
- std::vector<std::string> fieldNames=MEDLoader::GetAllFieldNames(_file.c_str());
+ std::vector<std::string> fieldNames=GetAllFieldNames(_file.c_str());
for(std::vector<std::string>::const_iterator iter=fieldNames.begin();iter!=fieldNames.end();iter++)
_fields.push_back(MEDCalculatorBrowserField(_file.c_str(),(*iter).c_str()));
}
// This class correspond to a MED File
// It contains fields and meshes from a file
// It also has methods for selecting/unselecting meshes, field and components from fields
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCALCULATOR_EXPORT MEDCalculatorBrowserLiteStruct
{
#include <sstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
// Default constructor
MEDCalculatorBrowserMesh::MEDCalculatorBrowserMesh() : _selection(false)
// This class corresponds to a MED mesh of a file
// It contains the mesh name and a flag to know if it's selected or not
// It's used only for selecting mesh, out of all fields.
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCALCULATOR_EXPORT MEDCalculatorBrowserMesh
{
#include <sstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCalculatorBrowserStep::~MEDCalculatorBrowserStep()
{
// This class corresponds to a time step (dt,it) of a field
// It contains the time step (dt) and the corresponding time value
// It also contains methods for selecting or unselecting this time step and it hold the name of the supporting mesh.
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCALCULATOR_EXPORT MEDCalculatorBrowserStep
{
#include <cmath>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCalculatorDBFieldReal *MEDCalculatorDBField::New(const MEDCalculatorBrowserField& ls)
{
MEDCalculatorDBField *MEDCalculatorDBField::operator+(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)+(*par2);
}
MEDCalculatorDBField *MEDCalculatorDBField::operator-(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)-(*par2);
}
MEDCalculatorDBField *MEDCalculatorDBField::operator*(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)*(*par2);
}
MEDCalculatorDBField *MEDCalculatorDBField::operator/(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)/(*par2);
}
int status=MEDLoaderBase::getStatusOfFile(fName);
if(!writeFromScratch && status==MEDLoaderBase::EXIST_RW)
{
- std::vector<std::string> ms=MEDLoader::GetMeshNames(fName);
+ std::vector<std::string> ms=GetMeshNames(fName);
if(std::find(ms.begin(),ms.end(),mesh->getName())!=ms.end())
{
std::ostringstream oss; oss << "In file \"" << fName << "\" the mesh with name \"" << mesh->getName() << "\" already exists !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
- std::vector<std::string> fs=MEDLoader::GetAllFieldNames(fName);
+ std::vector<std::string> fs=GetAllFieldNames(fName);
if(std::find(fs.begin(),fs.end(),field->getName())!=fs.end())
{
std::ostringstream oss; oss << "In file \"" << fName << "\" the field with name \"" << field->getName() << "\" already exists !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
}
- MEDLoader::WriteUMesh(fName,mesh,writeFromScratch);
+ WriteUMesh(fName,mesh,writeFromScratch);
for(std::vector<int>::const_iterator iter=ids.begin();iter!=ids.end();iter++)
_time_steps[*iter]->write(fName,_name,_description);
}
{
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> > fs2(ids.size());
+ std::vector< MCAuto<MEDCouplingFieldDouble> > fs2(ids.size());
int ii=0;
for(std::vector<int>::const_iterator iter=ids.begin();iter!=ids.end();iter++)
fs2[ii++]=_time_steps[*iter]->getFieldWithoutQuestion(_c_labels.size(),_c);
std::vector<MEDCouplingFieldDouble *> fs(fs2.size());
std::copy(fs2.begin(),fs2.end(),fs.begin());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldOverTime> fot=MEDCouplingFieldOverTime::New(fs);
+ MCAuto<MEDCouplingFieldOverTime> fot=MEDCouplingFieldOverTime::New(fs);
//
int argc=0;
CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
int sz=steps.size();
for(int i=0;i<sz;i++)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> elt(new MEDCalculatorDBSliceField(steps[i].getTimeStep(),steps[i].getOrder()));
+ MCAuto<MEDCalculatorDBSliceField> elt(new MEDCalculatorDBSliceField(steps[i].getTimeStep(),steps[i].getOrder()));
_time_steps.push_back(elt);
}
}
const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(const MEDCalculatorDBFieldReal& other) throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
+ checkConsistencyLight(other);
std::vector<int> ids=_t.getIds(_time_steps.size());
std::vector<int> ids2=other._t.getIds(other._time_steps.size());
unsigned int sz=ids.size();
const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(double val) throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> other=buildCstFieldFromThis(val);
+ MCAuto<MEDCalculatorDBFieldReal> other=buildCstFieldFromThis(val);
return (*this)=*other;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=add(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::add(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
bool ret=isEqualSameType(*othercr,precM,precF);
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=substract(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::substract(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=multiply(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::multiply(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=divide(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::divide(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
MEDCalculatorDBField *MEDCalculatorDBFieldReal::dot(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
MEDCalculatorDBField *MEDCalculatorDBFieldReal::crossProduct(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
MEDCalculatorDBField *MEDCalculatorDBFieldReal::doublyContractedProduct() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::determinant() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenValues() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenVectors() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::inverse() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::trace() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::deviator() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::magnitude() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBFieldReal *MEDCalculatorDBFieldReal::buildCstFieldFromThis(double val) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
ret->_p=_p;
ret->_c_labels.resize(_c.getSize(_c_labels.size()));
std::vector<int> stps=_t.getIds(_time_steps.size());
return ret;
}
-void MEDCalculatorDBFieldReal::checkCoherency(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
+void MEDCalculatorDBFieldReal::checkConsistencyLight(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
if(_type!=other._type)
throw INTERP_KERNEL::Exception("Types of field mismatch !");
std::vector<int> idsInGlobalToFetch;
for(int i=0;i<sz;i++)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> elt=_time_steps[ids[i]];
+ MCAuto<MEDCalculatorDBSliceField> elt=_time_steps[ids[i]];
if(!elt->isFetched())
{
int dt,it;
idsInGlobalToFetch.push_back(ids[i]);
}
}
- std::vector<MEDCouplingFieldDouble *> fs=MEDLoader::ReadFieldsOnSameMesh(_type,_file_name.c_str(),_mesh_name.c_str(),0,_field_name.c_str(),idstoFetch);
+ std::vector<MEDCouplingFieldDouble *> fs=ReadFieldsOnSameMesh(_type,_file_name.c_str(),_mesh_name.c_str(),0,_field_name.c_str(),idstoFetch);
sz=fs.size();
for(int i=0;i<sz;i++)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> elt=_time_steps[idsInGlobalToFetch[i]];
+ MCAuto<MEDCalculatorDBSliceField> elt=_time_steps[idsInGlobalToFetch[i]];
elt->setField(fs[i]);
}
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val+otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)+other;
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val-otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)-other;
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val*otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)*other;
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val/otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)/other;
return ret;
}
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
bool ret=thisr->isEqual(other,precM,precF);
return ret;
}
#include "MEDCalculatorDBRangeSelection.hxx"
#include "MEDCouplingRefCountObject.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
#include "InterpKernelException.hxx"
#include <string>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCalculatorBrowserField;
class MEDCalculatorDBFieldReal;
bool isEqual(const MEDCalculatorDBField& other, double precM, double precF) const;
bool isEqualSameType(const MEDCalculatorDBFieldReal& other, double precM, double precF) const;
MEDCalculatorDBFieldReal *buildCstFieldFromThis(double val) const;
- void checkCoherency(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception);
+ void checkConsistencyLight(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception);
void fetchData() const throw(INTERP_KERNEL::Exception);
TypeOfField getType() const { return _type; }
int getNumberOfSteps() const;
MEDCalculatorDBRangeSelection _p;
std::vector<std::string> _c_labels;
MEDCalculatorDBRangeSelection _c;
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> > _time_steps;
+ std::vector< MCAuto<MEDCalculatorDBSliceField> > _time_steps;
};
class MEDCALCULATOR_EXPORT MEDCalculatorDBFieldCst : public MEDCalculatorDBField
#include <limits>
#include <sstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
const char MEDCalculatorDBRangeSelection::ALL_ELTS[]=":";
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCALCULATOR_EXPORT MEDCalculatorDBRangeSelection
{
#include "MEDLoader.hxx"
#include "MEDCouplingFieldDouble.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCalculatorDBSliceField::MEDCalculatorDBSliceField(int iter, int order):_iteration(iter),_order(order),_field(0),_work(0)
{
MEDCouplingFieldDouble *myF=const_cast<MEDCouplingFieldDouble *>(_field);
myF->setName(n.c_str());
myF->setDescription(d.c_str());
- MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fName,_field);
+ WriteFieldUsingAlreadyWrittenMesh(fName,_field);
myF->setName(kn.c_str());
myF->setDescription(kd.c_str());
}
MEDCouplingFieldDouble *MEDCalculatorDBSliceField::getField(TypeOfField type, const std::string& fname, const std::string& mname, const std::string& fieldName) const
{
if(!_field)
- _field=MEDLoader::ReadField(type,fname.c_str(),mname.c_str(),0,fieldName.c_str(),_iteration,_order);
+ _field=ReadField(type,fname.c_str(),mname.c_str(),0,fieldName.c_str(),_iteration,_order);
return _field;
}
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=other->_field->keepSelectedComponents(oIds);
_field->setSelectedComponents(f1,tIds);
}
throw INTERP_KERNEL::Exception("Slice::add : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)+(*f2);
return new MEDCalculatorDBSliceField(f3);
throw INTERP_KERNEL::Exception("Slice::substract : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)-(*f2);
return new MEDCalculatorDBSliceField(f3);
throw INTERP_KERNEL::Exception("Slice::multiply : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)*(*f2);
return new MEDCalculatorDBSliceField(f3);
throw INTERP_KERNEL::Exception("Slice::divide : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)/(*f2);
return new MEDCalculatorDBSliceField(f3);
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=f1->dot(*f2);
return new MEDCalculatorDBSliceField(f3);
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=f1->crossProduct(*f2);
return new MEDCalculatorDBSliceField(f3);
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::doublyContractedProduct(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->doublyContractedProduct();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::determinant(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->determinant();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenValues(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->eigenValues();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenVectors(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->eigenVectors();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::inverse(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->inverse();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::trace(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->trace();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::deviator(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->deviator();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::magnitude(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->magnitude();
return new MEDCalculatorDBSliceField(f2);
}
void MEDCalculatorDBSliceField::applyFunc(const char *func, int sizeCThis, const MEDCalculatorDBRangeSelection& thisC)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
f1->applyFunc(func);
_field->setSelectedComponents(f1,tIds);
}
throw INTERP_KERNEL::Exception("Slice::isEqual : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
return f1->isEqualWithoutConsideringStr(f2,0,prec);
}
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingFieldDouble;
class MEDCouplingMesh;
#include "MEDCalculatorDBField.hxx"
#include "MEDCalculatorTypemaps.i"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
using namespace INTERP_KERNEL;
%}
-%typemap(out) ParaMEDMEM::MEDCalculatorDBField*
+%typemap(out) MEDCoupling::MEDCalculatorDBField*
{
$result=convertMEDCalculatorDBField($1,$owner);
}
-%newobject ParaMEDMEM::MEDCalculatorDBField::operator+;
-%newobject ParaMEDMEM::MEDCalculatorDBField::operator-;
-%newobject ParaMEDMEM::MEDCalculatorDBField::operator*;
-%newobject ParaMEDMEM::MEDCalculatorDBField::operator/;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::__radd__;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::__rsub__;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::__rmul__;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::__rdiv__;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::__getitem__;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::__setitem__;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::operator();
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::buildCstFieldFromThis;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::dot;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::operator^;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::crossProduct;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::doublyContractedProduct;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::determinant;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::eigenValues;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::eigenVectors;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::inverse;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::trace;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::deviator;
-%newobject ParaMEDMEM::MEDCalculatorDBFieldReal::magnitude;
+%newobject MEDCoupling::MEDCalculatorDBField::operator+;
+%newobject MEDCoupling::MEDCalculatorDBField::operator-;
+%newobject MEDCoupling::MEDCalculatorDBField::operator*;
+%newobject MEDCoupling::MEDCalculatorDBField::operator/;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::__radd__;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::__rsub__;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::__rmul__;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::__rdiv__;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::__getitem__;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::__setitem__;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::operator();
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::buildCstFieldFromThis;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::dot;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::operator^;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::crossProduct;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::doublyContractedProduct;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::determinant;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::eigenValues;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::eigenVectors;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::inverse;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::trace;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::deviator;
+%newobject MEDCoupling::MEDCalculatorDBFieldReal::magnitude;
%feature("unref") MEDCalculatorDBField "$this->decrRef();"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCalculatorBrowserLiteStruct
{
MEDCalculatorDBFieldReal(const MEDCalculatorBrowserField& ls);
~MEDCalculatorDBFieldReal();
MEDCalculatorDBFieldReal *buildCstFieldFromThis(double val) const;
- ParaMEDMEM::TypeOfField getType() const;
+ MEDCoupling::TypeOfField getType() const;
void fetchData() const throw(INTERP_KERNEL::Exception);
int getNumberOfSteps() const;
int getNumberOfFetchedSteps() const;
PyObject *obj2=PyTuple_GetItem(obj,2);
convertPyObjToRS2(obj2,cr,"for 3rd tuple element for components of field");
}
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=self->operator()(tr,pr,cr);
+ MCAuto<MEDCalculatorDBFieldReal> ret=self->operator()(tr,pr,cr);
if(PyInt_Check(val))
{
(*ret)=double(PyInt_AS_LONG(val));
return ret;
}
void *argp;
- int status=SWIG_ConvertPtr(val,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCalculatorDBFieldReal,0|0);
+ int status=SWIG_ConvertPtr(val,&argp,SWIGTYPE_p_MEDCoupling__MEDCalculatorDBFieldReal,0|0);
if(!SWIG_IsOK(status))
{
throw INTERP_KERNEL::Exception("For setting only float, int or DBFieldReal supported !");
}
- const ParaMEDMEM::MEDCalculatorDBFieldReal *arg=reinterpret_cast< const ParaMEDMEM::MEDCalculatorDBFieldReal * >(argp);
+ const MEDCoupling::MEDCalculatorDBFieldReal *arg=reinterpret_cast< const MEDCoupling::MEDCalculatorDBFieldReal * >(argp);
(*ret)=*arg;
ret->incrRef();
return ret;
for(unsigned int i=0;i<r.size();i++)
{
MEDCouplingFieldDouble *tmp=r[i];
- PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
+ PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(tmp),SWIGTYPE_p_MEDCoupling__MEDCouplingFieldDouble, SWIG_POINTER_OWN | 0 ));
}
return ret;
}
}
%pythoncode %{
-def ParaMEDMEMDataArrayDoublenew(cls,*args):
+def MEDCouplingDataArrayDoublenew(cls,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDouble____new___(cls,args)
-def ParaMEDMEMDataArrayDoubleIadd(self,*args):
+def MEDCouplingDataArrayDoubleIadd(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDouble____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIsub(self,*args):
+def MEDCouplingDataArrayDoubleIsub(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDouble____isub___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleImul(self,*args):
+def MEDCouplingDataArrayDoubleImul(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDouble____imul___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
+def MEDCouplingDataArrayDoubleIdiv(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDouble____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIpow(self,*args):
+def MEDCouplingDataArrayDoubleIpow(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDouble____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIadd(self,*args):
+def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDoubleTuple____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIsub(self,*args):
+def MEDCouplingDataArrayDoubleTupleIsub(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDoubleTuple____isub___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleImul(self,*args):
+def MEDCouplingDataArrayDoubleTupleImul(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDoubleTuple____imul___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIdiv(self,*args):
+def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayDoubleTuple____idiv___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoublenew(cls,*args):
+def MEDCouplingFieldDoublenew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingFieldDouble____new___(cls,args)
-def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
+def MEDCouplingFieldDoubleIadd(self,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingFieldDouble____iadd___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIsub(self,*args):
+def MEDCouplingFieldDoubleIsub(self,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingFieldDouble____isub___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
+def MEDCouplingFieldDoubleImul(self,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingFieldDouble____imul___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
+def MEDCouplingFieldDoubleIdiv(self,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingFieldDouble____idiv___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args):
+def MEDCouplingFieldDoubleIpow(self,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayIntnew(cls,*args):
+def MEDCouplingDataArrayIntnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____new___(cls,args)
-def ParaMEDMEMDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayIntIadd(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayIntIsub(self,*args):
+def MEDCouplingDataArrayIntIsub(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____isub___(self, self, *args)
-def ParaMEDMEMDataArrayIntImul(self,*args):
+def MEDCouplingDataArrayIntImul(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____imul___(self, self, *args)
-def ParaMEDMEMDataArrayIntIdiv(self,*args):
+def MEDCouplingDataArrayIntIdiv(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntImod(self,*args):
+def MEDCouplingDataArrayIntImod(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____imod___(self, self, *args)
-def ParaMEDMEMDataArrayIntIpow(self,*args):
+def MEDCouplingDataArrayIntIpow(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayInt____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayIntTupleIadd(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayIntTuple____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIsub(self,*args):
+def MEDCouplingDataArrayIntTupleIsub(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayIntTuple____isub___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleImul(self,*args):
+def MEDCouplingDataArrayIntTupleImul(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayIntTuple____imul___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIdiv(self,*args):
+def MEDCouplingDataArrayIntTupleIdiv(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayIntTuple____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleImod(self,*args):
+def MEDCouplingDataArrayIntTupleImod(self,*args):
import _MEDCalculator
return _MEDCalculator.DataArrayIntTuple____imod___(self, self, *args)
def ParaMEDMEMDenseMatrixIadd(self,*args):
def ParaMEDMEMDenseMatrixIsub(self,*args):
import _MEDCalculator
return _MEDCalculator.DenseMatrix____isub___(self, self, *args)
-def ParaMEDMEMMEDCouplingUMeshnew(cls,*args):
+def MEDCouplingUMeshnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingUMesh____new___(cls,args)
-def ParaMEDMEMMEDCoupling1DGTUMeshnew(cls,*args):
+def MEDCoupling1DGTUMeshnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCoupling1DGTUMesh____new___(cls,args)
-def ParaMEDMEMMEDCoupling1SGTUMeshnew(cls,*args):
+def MEDCoupling1SGTUMeshnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCoupling1SGTUMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingCurveLinearMeshnew(cls,*args):
+def MEDCouplingCurveLinearMeshnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingCurveLinearMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingCMeshnew(cls,*args):
+def MEDCouplingCMeshnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingCMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingIMeshnew(cls,*args):
+def MEDCouplingIMeshnew(cls,*args):
import _MEDCalculator
return _MEDCalculator.MEDCouplingIMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingExtrudedMeshnew(cls,*args):
+def MEDCouplingExtrudedMeshnew(cls,*args):
import _MEDCalculator
- return _MEDCalculator.MEDCouplingExtrudedMesh____new___(cls,args)
+ return _MEDCalculator.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%pythoncode %{
#include <limits>
-static PyObject* convertMEDCalculatorDBField(ParaMEDMEM::MEDCalculatorDBField *f, int owner)
+static PyObject* convertMEDCalculatorDBField(MEDCoupling::MEDCalculatorDBField *f, int owner)
{
PyObject *ret=0;
- if(dynamic_cast<ParaMEDMEM::MEDCalculatorDBFieldReal *>(f))
- ret=SWIG_NewPointerObj((void*)f,SWIGTYPE_p_ParaMEDMEM__MEDCalculatorDBFieldReal,owner);
- if(dynamic_cast<ParaMEDMEM::MEDCalculatorDBFieldCst *>(f))
- ret=SWIG_NewPointerObj((void*)f,SWIGTYPE_p_ParaMEDMEM__MEDCalculatorDBFieldCst,owner);
+ if(dynamic_cast<MEDCoupling::MEDCalculatorDBFieldReal *>(f))
+ ret=SWIG_NewPointerObj((void*)f,SWIGTYPE_p_MEDCoupling__MEDCalculatorDBFieldReal,owner);
+ if(dynamic_cast<MEDCoupling::MEDCalculatorDBFieldCst *>(f))
+ ret=SWIG_NewPointerObj((void*)f,SWIGTYPE_p_MEDCoupling__MEDCalculatorDBFieldCst,owner);
return ret;
}
-void convertPyObjToRS(PyObject *o, ParaMEDMEM::MEDCalculatorDBRangeSelection& rs)
+void convertPyObjToRS(PyObject *o, MEDCoupling::MEDCalculatorDBRangeSelection& rs)
{
if(PyInt_Check(o))
{
PyErr_SetString(PyExc_TypeError,"Range selection must be an integer or a string !");
}
-void convertPyObjToRS2(PyObject *o, ParaMEDMEM::MEDCalculatorDBRangeSelection& rs, const char *msg)
+void convertPyObjToRS2(PyObject *o, MEDCoupling::MEDCalculatorDBRangeSelection& rs, const char *msg)
{
if(PyInt_Check(o))
{
#include <sstream>
#include <algorithm>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
const char *SPythonInterpreter::INDENT_TOKEN[]={"def","class","for","if","while","try","except"};
#include <vector>
#include <set>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCALCULATORSPYTHON_EXPORT SPythonInterpreter
{
#include <algorithm>
#include <sstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
const char SPythonPredParser::FIELD_TYPE_STR[]="MEDCalculatorDBField";
#include <string>
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
typedef enum
{
std::ifstream ifs(fileName);
ifs.exceptions( std::ifstream::badbit );
char *line=new char[MAX_LINE+1];
- ParaMEDMEM::SPythonInterpreter interp(glob,loc);
+ MEDCoupling::SPythonInterpreter interp(glob,loc);
bool isspython;
while(!ifs.eof())
{
{
std::string s;
char *line=new char[MAX_LINE+1];
- ParaMEDMEM::SPythonInterpreter interp(glob,loc);
+ MEDCoupling::SPythonInterpreter interp(glob,loc);
bool isInterp=true;
while(true)
{
# Application tests
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDCoupling/MEDCalculator)
+SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDCalculator)
INSTALL(TARGETS TestMEDCalculator DESTINATION ${TEST_INSTALL_DIRECTORY})
INSTALL(FILES CTestTestfileInstall.cmake
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-ADD_TEST(TestMEDCalculator TestMEDCalculator)
-SET_TESTS_PROPERTIES(TestMEDCalculator PROPERTIES LABELS "${COMPONENT_NAME}")
+SET(TEST_NAMES
+ TestMEDCalculator
+)
+
+FOREACH(tfile ${TEST_NAMES})
+ SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ ADD_TEST(${TEST_NAME} ${tfile})
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ TIMEOUT ${TIMEOUT}
+ )
+ENDFOREACH()
#include <iostream>
-void ParaMEDMEM::MEDCalculatorBasicsTest::testLightStruct1()
+void MEDCoupling::MEDCalculatorBasicsTest::testLightStruct1()
{
const char fname[]="/export/home/geay/MEDStdAlone/Salome5/V5_1_main/MED/MED_INSTALL_DEBUG/share/salome/resources/med/TimeStamps_import22.med";
MEDCalculatorBrowserLiteStruct lt(fname);
//std::cout << lt.str() << std::endl;
}
-void ParaMEDMEM::MEDCalculatorBasicsTest::testRangeSelection1()
+void MEDCoupling::MEDCalculatorBasicsTest::testRangeSelection1()
{
MEDCalculatorDBRangeSelection sel1(":");
std::vector<int> v=sel1.getIds(6);
CPPUNIT_ASSERT(exc); exc=false;
}
-void ParaMEDMEM::MEDCalculatorBasicsTest::testDBField1()
+void MEDCoupling::MEDCalculatorBasicsTest::testDBField1()
{
const char fName[]="hfile1.med";
generateAFile1(fName);
Power->decrRef();
}
-void ParaMEDMEM::MEDCalculatorBasicsTest::generateAFile1(const char *fName)
+void MEDCoupling::MEDCalculatorBasicsTest::generateAFile1(const char *fName)
{
double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
m->setCoords(myCoords);
myCoords->decrRef();
//
- MEDLoader::WriteUMesh(fName,m,true);
+ WriteUMesh(fName,m,true);
static const int nbOfTimeSteps=10;
static const int nbOfComponents=7;
MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
da->setInfoOnComponent(0,"aaa [a]"); da->setInfoOnComponent(1,"bbb [b]"); da->setInfoOnComponent(2,"ccc [c]");
da->setInfoOnComponent(3,"ddd [d]"); da->setInfoOnComponent(4,"eee [e]"); da->setInfoOnComponent(5,"fff [f]");
da->setInfoOnComponent(6,"ggg [g]");
- f->checkCoherency();
+ f->checkConsistencyLight();
for(int i=0;i<nbOfTimeSteps;i++)
{
double *pt=da->getPointer();
for(int k=0;k<nbOfComponents;k++,pt++)
*pt=(i+1)*100.+(j+1)*10.+k+1;
f->setTime(i*0.1,i,-i);
- MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fName,f);
+ WriteFieldUsingAlreadyWrittenMesh(fName,f);
}
da->decrRef();
f->decrRef();
m->decrRef();
}
-void ParaMEDMEM::MEDCalculatorBasicsTest::testSPython1()
+void MEDCoupling::MEDCalculatorBasicsTest::testSPython1()
{
std::string s1,s2;
bool b;
s1="12:3";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,s1);
s1="12:";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,s1);
s1="12";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(b);
CPPUNIT_ASSERT_EQUAL(s2,s1);
s1="";
- CPPUNIT_ASSERT(!ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(!MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
s1=" ";
- CPPUNIT_ASSERT(!ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(!MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
s1=":";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,s1);
s1=":12";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,s1);
s1=":12:";
- CPPUNIT_ASSERT(!ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(!MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
s1=":12 23";
- CPPUNIT_ASSERT(!ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(!MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
// some ' ' char
s1=" 12 : 3 ";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,std::string("12:3"));
s1=" 12 : 3";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,std::string("12:3"));
s1=" 12 :3 ";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,std::string("12:3"));
s1=" 12: 3 ";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,std::string("12:3"));
s1="12 : 3 ";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isElementInParenthesisMatching(s1,s2,b));
CPPUNIT_ASSERT(!b);
CPPUNIT_ASSERT_EQUAL(s2,std::string("12:3"));
}
-void ParaMEDMEM::MEDCalculatorBasicsTest::testSPython2()
+void MEDCoupling::MEDCalculatorBasicsTest::testSPython2()
{
std::string s1,s2;
s1=" 12:3 , : ,4 ";
- CPPUNIT_ASSERT(ParaMEDMEM::SPythonParser::isParenthesisMatching(s1,s2));
+ CPPUNIT_ASSERT(MEDCoupling::SPythonParser::isParenthesisMatching(s1,s2));
CPPUNIT_ASSERT_EQUAL(s2,std::string("\"12:3\",\":\",4"));
}
-void ParaMEDMEM::MEDCalculatorBasicsTest::testSPython3()
+void MEDCoupling::MEDCalculatorBasicsTest::testSPython3()
{
std::string s1,s2;
s1="( 12:3 , : ,4 )";
- s2=ParaMEDMEM::SPythonInterpreter::strip(s1);
+ s2=MEDCoupling::SPythonInterpreter::strip(s1);
CPPUNIT_ASSERT_EQUAL(s2,std::string("(12:3,:,4)"));
s1=" ( 12:3 , : ,4 ) ";
- s2=ParaMEDMEM::SPythonInterpreter::strip(s1);
+ s2=MEDCoupling::SPythonInterpreter::strip(s1);
CPPUNIT_ASSERT_EQUAL(s2,std::string("(12:3,:,4)"));
}
#include <cppunit/extensions/HelperMacros.h>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCalculatorBasicsTest : public CppUnit::TestFixture
{
#include "CppUnitTest.hxx"
#include "MEDCalculatorBasicsTest.hxx"
-CPPUNIT_TEST_SUITE_REGISTRATION( ParaMEDMEM::MEDCalculatorBasicsTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( MEDCoupling::MEDCalculatorBasicsTest );
#include "BasicMainTest.hxx"
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
DataArrayDouble *DataArrayDoubleClient::New(SALOME_MED::DataArrayDoubleCorbaInterface_ptr dadPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayDouble;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
DataArrayInt *DataArrayIntClient::New(SALOME_MED::DataArrayIntCorbaInterface_ptr dadPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayInt;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCoupling1DGTUMesh *MEDCoupling1DGTUMeshClient::New(SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCoupling1DGTUMesh;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCoupling1SGTUMesh *MEDCoupling1SGTUMeshClient::New(SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCoupling1SGTUMesh;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingCMesh *MEDCouplingCMeshClient::New(SALOME_MED::MEDCouplingCMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingCMesh;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingCurveLinearMesh *MEDCouplingCurveLinearMeshClient::New(SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingCurveLinearMesh;
#include "MEDCouplingExtrudedMeshClient.hxx"
#include "MEDCouplingMeshClient.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingMemArray.hxx"
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
-MEDCouplingExtrudedMesh *MEDCouplingExtrudedMeshClient::New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr)
+MEDCouplingMappedExtrudedMesh *MEDCouplingExtrudedMeshClient::New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr)
{
- MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMesh::New();
+ MEDCouplingMappedExtrudedMesh *ret=MEDCouplingMappedExtrudedMesh::New();
MEDCouplingMeshClient::fillMeshFromCorbaData(ret,meshPtr);
return ret;
}
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
- class MEDCouplingExtrudedMesh;
+ class MEDCouplingMappedExtrudedMesh;
class MEDCOUPLINGCLIENT_EXPORT MEDCouplingExtrudedMeshClient
{
public:
- static MEDCouplingExtrudedMesh *New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr mesh);
+ static MEDCouplingMappedExtrudedMesh *New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr mesh);
};
}
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldDouble *MEDCouplingFieldDoubleClient::New(SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr)
{
#include "MEDCouplingClient.hxx"
#include "MEDCouplingFieldDouble.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingFieldDoubleClient : public MEDCouplingFieldDouble
{
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldOverTimeClient::MEDCouplingFieldOverTimeClient(SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface_ptr field):_df(0)
{
#include "MEDCouplingClient.hxx"
#include "MEDCouplingFieldOverTime.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingDefinitionTime;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldTemplate *MEDCouplingFieldTemplateClient::New(SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr fieldPtr)
{
#include "MEDCouplingClient.hxx"
#include "MEDCouplingFieldTemplate.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingFieldTemplateClient : public MEDCouplingFieldTemplate
{
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingIMesh *MEDCouplingIMeshClient::New(SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingIMesh;
#include "MEDCoupling1SGTUMeshClient.hxx"
#include "MEDCoupling1DGTUMeshClient.hxx"
#include "MEDCouplingExtrudedMeshClient.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingCMeshClient.hxx"
#include "MEDCouplingCurveLinearMeshClient.hxx"
#include "MEDCouplingIMeshClient.hxx"
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingMesh *MEDCouplingMeshClient::New(SALOME_MED::MEDCouplingMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingMesh;
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingMultiFields *MEDCouplingMultiFieldsClient::New(SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr fieldPtr)
{
#include "MEDCouplingClient.hxx"
#include "MEDCouplingMultiFields.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingMultiFieldsClient : public MEDCouplingMultiFields
{
#include <vector>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingUMesh *MEDCouplingUMeshClient::New(SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr)
{
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingClient.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
#include "DataArrayDoubleServant.hxx"
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
DataArrayDoubleServant::DataArrayDoubleServant(const DataArrayDouble *cppPointer):DataArrayServant(cppPointer)
{
#include "MEDCouplingCorba.hxx"
#include "DataArrayServant.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayDouble;
typedef DataArrayDouble CppType;
DataArrayDoubleServant(const DataArrayDouble *cppPointer);
protected:
- const DataArrayDouble *getPointer() const { return (const DataArrayDouble *)(_cpp_pointer); }
SALOME::StringSeq *GetExportableFormats();
CORBA::Boolean ExportDataAs(const char *format, SALOME::GenericObj_out exporter);
public:
+ const DataArrayDouble *getPointer() const { return (const DataArrayDouble *)(_cpp_pointer); }
void getTinyInfo(SALOME_TYPES::ListOfLong_out la, SALOME_TYPES::ListOfString_out sa);
void getSerialisationData(SALOME_TYPES::ListOfDouble_out da);
};
#include "DataArrayIntServant.hxx"
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
DataArrayIntServant::DataArrayIntServant(const DataArrayInt *cppPointer):DataArrayServant(cppPointer)
{
#include "MEDCouplingCorba.hxx"
#include "DataArrayServant.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayInt;
typedef DataArrayInt CppType;
DataArrayIntServant(const DataArrayInt *cppPointer);
protected:
- const DataArrayInt *getPointer() const { return (const DataArrayInt *)(_cpp_pointer); }
SALOME::StringSeq *GetExportableFormats();
CORBA::Boolean ExportDataAs(const char *format, SALOME::GenericObj_out exporter);
public:
+ const DataArrayInt *getPointer() const { return (const DataArrayInt *)(_cpp_pointer); }
void getTinyInfo(SALOME_TYPES::ListOfLong_out la, SALOME_TYPES::ListOfString_out sa);
void getSerialisationData(SALOME_TYPES::ListOfLong_out da);
};
#include "DataArrayServant.hxx"
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
DataArrayServant::DataArrayServant(const DataArray *cppPointer):MEDCouplingRefCountServant(cppPointer,cppPointer)
{
#include "MEDCouplingCorba.hxx"
#include "MEDCouplingRefCountServant.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArray;
DataArrayServant(const DataArray *cppPointer);
char *getName();
SALOME_TYPES::ListOfString *getInfoOnComponents();
- protected:
+ public:
const DataArray *getPointer() const { return (const DataArray *)(_cpp_pointer); }
};
}
#include "MEDCoupling1DGTUMeshServant.hxx"
#include "MEDCoupling1GTUMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCoupling1DGTUMeshServant::MEDCoupling1DGTUMeshServant(const MEDCoupling1DGTUMesh *cppPointerOfMesh):MEDCoupling1GTUMeshServant(cppPointerOfMesh)
{
#include "MEDCoupling1GTUMeshServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCoupling1DGTUMesh;
public:
typedef MEDCoupling1DGTUMesh CppType;
MEDCoupling1DGTUMeshServant(const MEDCoupling1DGTUMesh *cppPointerOfMesh);
- protected:
+ public:
const MEDCoupling1DGTUMesh *getPointer() const { return (const MEDCoupling1DGTUMesh *)_cpp_pointer; }
};
}
#include "MEDCoupling1GTUMeshServant.hxx"
#include "MEDCoupling1GTUMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCoupling1GTUMeshServant::MEDCoupling1GTUMeshServant(const MEDCoupling1GTUMesh *cppPointerOfMesh):MEDCouplingPointSetServant(cppPointerOfMesh)
{
#include "MEDCouplingPointSetServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCoupling1GTUMesh;
public:
typedef MEDCoupling1GTUMesh CppType;
MEDCoupling1GTUMeshServant(const MEDCoupling1GTUMesh *cppPointerOfMesh);
- protected:
+ public:
const MEDCoupling1GTUMesh *getPointer() const { return (const MEDCoupling1GTUMesh *)_cpp_pointer; }
};
}
#include "MEDCoupling1SGTUMeshServant.hxx"
#include "MEDCoupling1GTUMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCoupling1SGTUMeshServant::MEDCoupling1SGTUMeshServant(const MEDCoupling1SGTUMesh *cppPointerOfMesh):MEDCoupling1GTUMeshServant(cppPointerOfMesh)
{
#include "MEDCoupling1GTUMeshServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCoupling1SGTUMesh;
public:
typedef MEDCoupling1SGTUMesh CppType;
MEDCoupling1SGTUMeshServant(const MEDCoupling1SGTUMesh *cppPointerOfMesh);
- protected:
+ public:
const MEDCoupling1SGTUMesh *getPointer() const { return (const MEDCoupling1SGTUMesh *)_cpp_pointer; }
};
}
#include "MEDCouplingCMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingCMeshServant::MEDCouplingCMeshServant(const MEDCouplingCMesh *cppPointerOfMesh):MEDCouplingStructuredMeshServant(cppPointerOfMesh)
{
#include "MEDCouplingStructuredMeshServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingCMesh;
typedef MEDCouplingCMesh CppType;
MEDCouplingCMeshServant(const MEDCouplingCMesh *cppPointerOfMesh);
~MEDCouplingCMeshServant();
- private:
+ public:
const MEDCouplingCMesh *getPointer() const { return (const MEDCouplingCMesh *)(_cpp_pointer); }
};
}
#include "MEDCouplingCurveLinearMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingCurveLinearMeshServant::MEDCouplingCurveLinearMeshServant(const MEDCouplingCurveLinearMesh *cppPointerOfMesh):MEDCouplingStructuredMeshServant(cppPointerOfMesh)
{
#include "MEDCouplingStructuredMeshServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingCurveLinearMesh;
typedef MEDCouplingCurveLinearMesh CppType;
MEDCouplingCurveLinearMeshServant(const MEDCouplingCurveLinearMesh *cppPointerOfMesh);
~MEDCouplingCurveLinearMeshServant();
- private:
+ public:
const MEDCouplingCurveLinearMesh *getPointer() const { return (const MEDCouplingCurveLinearMesh *)(_cpp_pointer); }
};
}
#include "MEDCouplingExtrudedMeshServant.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
-MEDCouplingExtrudedMeshServant::MEDCouplingExtrudedMeshServant(const MEDCouplingExtrudedMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh)
+MEDCouplingExtrudedMeshServant::MEDCouplingExtrudedMeshServant(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh)
{
}
#include "MEDCouplingMeshServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
- class MEDCouplingExtrudedMesh;
+ class MEDCouplingMappedExtrudedMesh;
class MEDCOUPLINGCORBA_EXPORT MEDCouplingExtrudedMeshServant : MEDCouplingMeshServant, public virtual POA_SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface
{
public:
- typedef MEDCouplingExtrudedMesh CppType;
- MEDCouplingExtrudedMeshServant(const MEDCouplingExtrudedMesh *cppPointerOfMesh);
+ typedef MEDCouplingMappedExtrudedMesh CppType;
+ MEDCouplingExtrudedMeshServant(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh);
~MEDCouplingExtrudedMeshServant();
- private:
- const MEDCouplingExtrudedMesh *getPointer() const { return (const MEDCouplingExtrudedMesh *)(_cpp_pointer); }
+ public:
+ const MEDCouplingMappedExtrudedMesh *getPointer() const { return (const MEDCouplingMappedExtrudedMesh *)(_cpp_pointer); }
};
}
#include "MEDCouplingFieldDoubleServant.hxx"
#include "MEDCouplingFieldDouble.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldDoubleServant::MEDCouplingFieldDoubleServant(const MEDCouplingFieldDouble *cppPointerOfMesh):MEDCouplingFieldServant(cppPointerOfMesh)
{
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class RefCountObject;
class MEDCouplingFieldDouble;
public:
typedef MEDCouplingFieldDouble CppType;
MEDCouplingFieldDoubleServant(const MEDCouplingFieldDouble *cppPointerOfMesh);
- protected:
+ public:
const MEDCouplingFieldDouble *getPointer() const { return (const MEDCouplingFieldDouble *)(_cpp_pointer); }
protected:
char *getName();
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldOverTimeServant::MEDCouplingFieldOverTimeServant(const MEDCouplingFieldOverTime *cppPointer):MEDCouplingMultiFieldsServant(cppPointer)
{
#include "MEDCouplingMultiFieldsServant.hxx"
#include "MEDCouplingFieldOverTime.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCOUPLINGCORBA_EXPORT MEDCouplingFieldOverTimeServant : public MEDCouplingMultiFieldsServant,
public virtual POA_SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface
public:
typedef MEDCouplingFieldOverTime CppType;
MEDCouplingFieldOverTimeServant(const MEDCouplingFieldOverTime *cppPointer);
- protected:
+ public:
const MEDCouplingFieldOverTime *getPointer() const { return (const MEDCouplingFieldOverTime *)(_cpp_pointer); }
protected:
void getTinyInfoAboutTimeDefinition(SALOME_TYPES::ListOfLong_out la, SALOME_TYPES::ListOfDouble_out da);
#include "MEDCouplingCMesh.hxx"
#include "MEDCouplingIMesh.hxx"
#include "MEDCouplingCurveLinearMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCoupling1GTUMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldServant::MEDCouplingFieldServant(const MEDCouplingField *cppPointerOfMesh):MEDCouplingRefCountServant(cppPointerOfMesh,cppPointerOfMesh)
{
SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr ret=retServ->_this();//let this line even if it seems fool
return ret;
}
- const MEDCouplingExtrudedMesh *eMesh=dynamic_cast<const MEDCouplingExtrudedMesh *>(mesh);
+ const MEDCouplingMappedExtrudedMesh *eMesh=dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(mesh);
if(eMesh)
{
MEDCouplingExtrudedMeshServant *retServ=new MEDCouplingExtrudedMeshServant(eMesh);
#include "MEDCouplingCorba.hxx"
#include "MEDCouplingRefCountServant.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingMesh;
class MEDCouplingField;
{
protected:
MEDCouplingFieldServant(const MEDCouplingField *cppPointerOfMesh);
- const MEDCouplingField *getPointer() const { return (const MEDCouplingField *)(_cpp_pointer); }
public:
+ const MEDCouplingField *getPointer() const { return (const MEDCouplingField *)(_cpp_pointer); }
static SALOME_MED::MEDCouplingMeshCorbaInterface_ptr BuildCorbaRefFromCppPointer(const MEDCouplingMesh *mesh);
protected:
SALOME_MED::MEDCouplingMeshCorbaInterface_ptr getMesh();
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingFieldTemplateServant::MEDCouplingFieldTemplateServant(const MEDCouplingFieldTemplate *cppPointerOfMesh):MEDCouplingFieldServant(cppPointerOfMesh)
{
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class RefCountObject;
class MEDCouplingFieldTemplate;
public:
typedef MEDCouplingFieldTemplate CppType;
MEDCouplingFieldTemplateServant(const MEDCouplingFieldTemplate *cppPointerOfMesh);
- protected:
+ public:
const MEDCouplingFieldTemplate *getPointer() const { return (const MEDCouplingFieldTemplate *)(_cpp_pointer); }
protected:
void getTinyInfo(SALOME_TYPES::ListOfLong_out la, SALOME_TYPES::ListOfDouble_out da, SALOME_TYPES::ListOfString_out sa);
#include "MEDCouplingIMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingIMeshServant::MEDCouplingIMeshServant(const MEDCouplingIMesh *cppPointerOfMesh):MEDCouplingStructuredMeshServant(cppPointerOfMesh)
{
#include "MEDCouplingStructuredMeshServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingIMesh;
typedef MEDCouplingIMesh CppType;
MEDCouplingIMeshServant(const MEDCouplingIMesh *cppPointerOfMesh);
~MEDCouplingIMeshServant();
- private:
+ public:
const MEDCouplingIMesh *getPointer() const { return (const MEDCouplingIMesh *)(_cpp_pointer); }
};
}
#include "MEDCouplingMesh.hxx"
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingMeshServant::MEDCouplingMeshServant(const MEDCouplingMesh *cppPointerOfMesh):MEDCouplingRefCountServant(cppPointerOfMesh,cppPointerOfMesh)
{
#include "MEDCouplingRefCountServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingMesh;
{
protected:
MEDCouplingMeshServant(const MEDCouplingMesh *cppPointerOfMesh);
+ public:
const MEDCouplingMesh *getPointer() const { return (const MEDCouplingMesh *)(_cpp_pointer); }
protected:
char *getName();
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMemArray.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingMultiFieldsServant::MEDCouplingMultiFieldsServant(const MEDCouplingMultiFields *cppPointer):MEDCouplingRefCountServant(cppPointer,cppPointer)
{
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class RefCountObject;
class MEDCouplingMultiFields;
public:
typedef MEDCouplingMultiFields CppType;
MEDCouplingMultiFieldsServant(const MEDCouplingMultiFields *cppPointer);
- protected:
+ public:
const MEDCouplingMultiFields *getPointer() const { return (const MEDCouplingMultiFields *)(_cpp_pointer); }
protected:
char *getName();
#include "MEDCouplingPointSet.hxx"
#include "DataArrayDoubleServant.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingPointSetServant::MEDCouplingPointSetServant(const MEDCouplingPointSet *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh)
{
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingPointSet;
class DataArrayInt;
MEDCouplingPointSetServant(const MEDCouplingPointSet *cppPointerOfMesh);
~MEDCouplingPointSetServant();
SALOME_MED::DataArrayDoubleCorbaInterface_ptr getCoords();
- private:
+ public:
const MEDCouplingPointSet *getPointer() const { return (const MEDCouplingPointSet *)(_cpp_pointer); }
};
}
#include <iostream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingRefCountServant::MEDCouplingRefCountServant(const RefCountObject *pointer, const TimeLabel *pointer2):_ref_counter(1),
_cpp_pointer(pointer),
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServant)
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class TimeLabel;
class RefCountObject;
#include "MEDCouplingStructuredMeshServant.hxx"
#include "MEDCouplingStructuredMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingStructuredMeshServant::MEDCouplingStructuredMeshServant(const MEDCouplingStructuredMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh)
{
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingStructuredMesh;
class DataArrayInt;
protected:
MEDCouplingStructuredMeshServant(const MEDCouplingStructuredMesh *cppPointerOfMesh);
~MEDCouplingStructuredMeshServant();
- private:
+ public:
const MEDCouplingStructuredMesh *getPointer() const { return (const MEDCouplingStructuredMesh *)(_cpp_pointer); }
};
}
#include "MEDCouplingUMeshServant.hxx"
#include "MEDCouplingUMesh.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
MEDCouplingUMeshServant::MEDCouplingUMeshServant(const MEDCouplingUMesh *cppPointerOfMesh):MEDCouplingPointSetServant(cppPointerOfMesh)
{
#include "MEDCouplingPointSetServant.hxx"
#include "MEDCouplingCorba.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
public:
typedef MEDCouplingUMesh CppType;
MEDCouplingUMeshServant(const MEDCouplingUMesh *cppPointerOfMesh);
- protected:
+ public:
const MEDCouplingUMesh *getPointer() const { return (const MEDCouplingUMesh *)_cpp_pointer; }
};
}
// Author : Anthony Geay (CEA/DEN)
#include "MEDCouplingMeshFieldFactoryComponent.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMultiFields.hxx"
namespace SALOME_TEST
{
- ParaMEDMEM::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build1DMesh()
+ MEDCoupling::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build1DMesh()
{
double coords[4]={ 0.0, 0.3, 0.75, 1.0 };
int conn[2*3]={ 0,1, 1,2, 2,3 };
- ParaMEDMEM::MEDCouplingUMesh *mesh=ParaMEDMEM::MEDCouplingUMesh::New("1DMeshForCorba",1);
+ MEDCoupling::MEDCouplingUMesh *mesh=MEDCoupling::MEDCouplingUMesh::New("1DMeshForCorba",1);
mesh->setDescription("build1DMesh");
mesh->allocateCells(3);
mesh->setTime(5.6,7,8);
mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+2);
mesh->insertNextCell(INTERP_KERNEL::NORM_SEG2,2,conn+4);
mesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(4,1);
std::copy(coords,coords+4,myCoords->getPointer());
mesh->setCoords(myCoords);
return mesh;
}
- ParaMEDMEM::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build2DMesh()
+ MEDCoupling::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build2DMesh()
{
double targetCoords[18]={-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 };
int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
- ParaMEDMEM::MEDCouplingUMesh *targetMesh=ParaMEDMEM::MEDCouplingUMesh::New();
+ MEDCoupling::MEDCouplingUMesh *targetMesh=MEDCoupling::MEDCouplingUMesh::New();
targetMesh->setMeshDimension(2);
targetMesh->setName("MyMesh2D");
targetMesh->setDescription("build2DMesh");
targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10);
targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14);
targetMesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(9,2);
std::copy(targetCoords,targetCoords+18,myCoords->getPointer());
targetMesh->setCoords(myCoords);
return targetMesh;
}
- ParaMEDMEM::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build3DMesh()
+ MEDCoupling::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build3DMesh()
{
double targetCoords[81]={ 0., 0., 0., 50., 0., 0. , 200., 0., 0. , 0., 50., 0., 50., 50., 0. , 200., 50., 0., 0., 200., 0., 50., 200., 0. , 200., 200., 0. ,
0., 0., 50., 50., 0., 50. , 200., 0., 50. , 0., 50., 50., 50., 50., 50. , 200., 50., 50., 0., 200., 50., 50., 200., 50. , 200., 200., 50. ,
0., 0., 200., 50., 0., 200. , 200., 0., 200. , 0., 50., 200., 50., 50., 200. , 200., 50., 200., 0., 200., 200., 50., 200., 200. , 200., 200., 200. };
int targetConn[64]={0,1,4,3,9,10,13,12, 1,2,5,4,10,11,14,13, 3,4,7,6,12,13,16,15, 4,5,8,7,13,14,17,16,
9,10,13,12,18,19,22,21, 10,11,14,13,19,20,23,22, 12,13,16,15,21,22,25,24, 13,14,17,16,22,23,26,25};
- ParaMEDMEM::MEDCouplingUMesh *targetMesh=ParaMEDMEM::MEDCouplingUMesh::New();
+ MEDCoupling::MEDCouplingUMesh *targetMesh=MEDCoupling::MEDCouplingUMesh::New();
targetMesh->setMeshDimension(3);
targetMesh->setName("MyMesh3D");
targetMesh->setDescription("build3DMesh");
for(int i=0;i<8;i++)
targetMesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,targetConn+8*i);
targetMesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(27,3);
std::copy(targetCoords,targetCoords+81,myCoords->getPointer());
targetMesh->setCoords(myCoords);
return targetMesh;
}
- ParaMEDMEM::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build3DSurfMesh()
+ MEDCoupling::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build3DSurfMesh()
{
double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5};
int targetConn[18]={0,3,4,1, 1,4,2, 4,5,2, 6,7,4,3, 7,8,5,4};
- ParaMEDMEM::MEDCouplingUMesh *targetMesh=ParaMEDMEM::MEDCouplingUMesh::New();
+ MEDCoupling::MEDCouplingUMesh *targetMesh=MEDCoupling::MEDCouplingUMesh::New();
targetMesh->setMeshDimension(2);
targetMesh->setName("MyMesh3DSurf");
targetMesh->setDescription("build3DSurfMesh");
targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+10);
targetMesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,targetConn+14);
targetMesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(9,3);
std::copy(targetCoords,targetCoords+27,myCoords->getPointer());
targetMesh->setCoords(myCoords);
return targetMesh;
}
- ParaMEDMEM::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build0DMesh()
+ MEDCoupling::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::build0DMesh()
{
double targetCoords[27]={-0.3,-0.3,0.5, 0.2,-0.3,1., 0.7,-0.3,1.5, -0.3,0.2,0.5, 0.2,0.2,1., 0.7,0.2,1.5, -0.3,0.7,0.5, 0.2,0.7,1., 0.7,0.7,1.5};
const int targetConn[]={0,1,2,3,4,5,7,6};
- ParaMEDMEM::MEDCouplingUMesh *targetMesh=ParaMEDMEM::MEDCouplingUMesh::New();
+ MEDCoupling::MEDCouplingUMesh *targetMesh=MEDCoupling::MEDCouplingUMesh::New();
targetMesh->setMeshDimension(0);
targetMesh->allocateCells(8);
targetMesh->setName("Wonderfull 0D mesh");
targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT1,1,targetConn+6);
targetMesh->insertNextCell(INTERP_KERNEL::NORM_POINT1,1,targetConn+7);
targetMesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(9,3);
std::copy(targetCoords,targetCoords+27,myCoords->getPointer());
targetMesh->setCoords(myCoords);
myCoords->setInfoOnComponent(2,"ZZZ [m]");
myCoords->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
return targetMesh;
}
- ParaMEDMEM::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::buildM1DMesh()
+ MEDCoupling::MEDCouplingUMesh *MEDCouplingCorbaServBasicsTest::buildM1DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *meshM1D=ParaMEDMEM::MEDCouplingUMesh::New("wonderfull -1 D mesh",-1);
+ MEDCoupling::MEDCouplingUMesh *meshM1D=MEDCoupling::MEDCouplingUMesh::New("wonderfull -1 D mesh",-1);
meshM1D->setDescription("buildM1DMesh");
- meshM1D->checkCoherency();
+ meshM1D->checkConsistencyLight();
return meshM1D;
}
- ParaMEDMEM::MEDCouplingExtrudedMesh *MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(ParaMEDMEM::MEDCouplingUMesh *&m2D)
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D)
{
m2D=build2DMesh();
m2D->changeSpaceDimension(3);
- ParaMEDMEM::MEDCouplingUMesh *m1D=build1DMesh();
- ParaMEDMEM::MEDCouplingUMesh *retu=m2D->buildExtrudedMesh(m1D,0);
+ MEDCoupling::MEDCouplingUMesh *m1D=build1DMesh();
+ MEDCoupling::MEDCouplingUMesh *retu=m2D->buildExtrudedMesh(m1D,0);
m1D->decrRef();
- ParaMEDMEM::MEDCouplingExtrudedMesh *ret=ParaMEDMEM::MEDCouplingExtrudedMesh::New(retu,m2D,2);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *ret=MEDCoupling::MEDCouplingMappedExtrudedMesh::New(retu,m2D,2);
ret->setName("ExtrudedTestForCorbaTest");
ret->setDescription("buildExtrudedMesh");
retu->decrRef();
return ret;
}
- ParaMEDMEM::MEDCouplingCMesh *MEDCouplingCorbaServBasicsTest::buildCMesh()
+ MEDCoupling::MEDCouplingCMesh *MEDCouplingCorbaServBasicsTest::buildCMesh()
{
- ParaMEDMEM::MEDCouplingCMesh *targetMesh=ParaMEDMEM::MEDCouplingCMesh::New();
+ MEDCoupling::MEDCouplingCMesh *targetMesh=MEDCoupling::MEDCouplingCMesh::New();
targetMesh->setTime(2.3,4,5);
targetMesh->setTimeUnit("us");
targetMesh->setName("Example of CMesh");
targetMesh->setDescription("buildCMesh");
- ParaMEDMEM::DataArrayDouble *a1=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *a1=MEDCoupling::DataArrayDouble::New();
a1->alloc(5,1);
a1->setInfoOnComponent(0,"SmthX");
const double a1Data[5]={3.,4.,5.,6.,7.};
std::copy(a1Data,a1Data+5,a1->getPointer());
- ParaMEDMEM::DataArrayDouble *a2=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *a2=MEDCoupling::DataArrayDouble::New();
a2->alloc(6,1);
a2->setInfoOnComponent(0,"SmthZ");
const double a2Data[6]={2.78,3.,4.,5.,6.,7.};
a1->decrRef();
a2->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
- ParaMEDMEM::MEDCouplingIMesh *MEDCouplingCorbaServBasicsTest::buildIMesh()
+ MEDCoupling::MEDCouplingIMesh *MEDCouplingCorbaServBasicsTest::buildIMesh()
{
- ParaMEDMEM::MEDCouplingIMesh *targetMesh(ParaMEDMEM::MEDCouplingIMesh::New());
+ MEDCoupling::MEDCouplingIMesh *targetMesh(MEDCoupling::MEDCouplingIMesh::New());
targetMesh->setTime(2.3,4,5);
targetMesh->setTimeUnit("us");
targetMesh->setName("Example of IMesh");
return targetMesh;
}
- ParaMEDMEM::MEDCouplingCurveLinearMesh *MEDCouplingCorbaServBasicsTest::buildCLMesh()
+ MEDCoupling::MEDCouplingCurveLinearMesh *MEDCouplingCorbaServBasicsTest::buildCLMesh()
{
- ParaMEDMEM::MEDCouplingCurveLinearMesh *targetMesh=ParaMEDMEM::MEDCouplingCurveLinearMesh::New();
+ MEDCoupling::MEDCouplingCurveLinearMesh *targetMesh=MEDCoupling::MEDCouplingCurveLinearMesh::New();
targetMesh->setTime(2.3,4,5);
targetMesh->setTimeUnit("us");
targetMesh->setName("Example of Cuve linear mesh");
targetMesh->setDescription("buildCLMesh");
- ParaMEDMEM::DataArrayDouble *a1=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *a1=MEDCoupling::DataArrayDouble::New();
a1->alloc(3*20,1);
a1->iota(7.);
a1->rearrange(3);
int structure[2]={4,5};
targetMesh->setNodeGridStructure(structure,structure+2);
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
- ParaMEDMEM::MEDCoupling1SGTUMesh *MEDCouplingCorbaServBasicsTest::build1SGTUMesh()
+ MEDCoupling::MEDCoupling1SGTUMesh *MEDCouplingCorbaServBasicsTest::build1SGTUMesh()
{
- ParaMEDMEM::MEDCoupling1SGTUMesh *targetMesh=ParaMEDMEM::MEDCoupling1SGTUMesh::New("Mesh1SGT",INTERP_KERNEL::NORM_QUAD4);
+ MEDCoupling::MEDCoupling1SGTUMesh *targetMesh=MEDCoupling::MEDCoupling1SGTUMesh::New("Mesh1SGT",INTERP_KERNEL::NORM_QUAD4);
targetMesh->setTime(2.3,44,-55);
targetMesh->setTimeUnit("us");
targetMesh->setDescription("My Description of 1SGTU");
- ParaMEDMEM::DataArrayDouble *a1=ParaMEDMEM::DataArrayDouble::New(); a1->alloc(10,3); a1->setInfoOnComponent(0,"X1 [m]"); a1->setInfoOnComponent(1,"YY2 [km]"); a1->setInfoOnComponent(2,"ZZZ3 [km]");
+ MEDCoupling::DataArrayDouble *a1=MEDCoupling::DataArrayDouble::New(); a1->alloc(10,3); a1->setInfoOnComponent(0,"X1 [m]"); a1->setInfoOnComponent(1,"YY2 [km]"); a1->setInfoOnComponent(2,"ZZZ3 [km]");
const double coords[30]={1.,1.,0.,2.,1.,0.,3.,1.,0.,1.,0.,0.,2.,0.,0.,0.,0.,0.,0.,1.,0.,3.,0.,0.,4.,0.,0.,4.,1.,0.};
const int conn[16]={6,0,3,5,3,0,1,4,1,2,7,4,8,7,2,9};
std::copy(coords,coords+30,a1->getPointer()); targetMesh->setCoords(a1); a1->decrRef();
- ParaMEDMEM::DataArrayInt *a2(ParaMEDMEM::DataArrayInt::New()); a2->alloc(4*4,1);
+ MEDCoupling::DataArrayInt *a2(MEDCoupling::DataArrayInt::New()); a2->alloc(4*4,1);
std::copy(conn,conn+16,a2->getPointer());
targetMesh->setNodalConnectivity(a2); a2->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
- ParaMEDMEM::MEDCoupling1DGTUMesh *MEDCouplingCorbaServBasicsTest::build1DGTUMesh()
+ MEDCoupling::MEDCoupling1DGTUMesh *MEDCouplingCorbaServBasicsTest::build1DGTUMesh()
{
- ParaMEDMEM::MEDCoupling1DGTUMesh *targetMesh=ParaMEDMEM::MEDCoupling1DGTUMesh::New("Mesh1DGT",INTERP_KERNEL::NORM_POLYGON);
+ MEDCoupling::MEDCoupling1DGTUMesh *targetMesh=MEDCoupling::MEDCoupling1DGTUMesh::New("Mesh1DGT",INTERP_KERNEL::NORM_POLYGON);
targetMesh->setTime(2.3,55,-66);
targetMesh->setTimeUnit("us");
targetMesh->setDescription("My Description of 1DGTU");
- ParaMEDMEM::DataArrayDouble *a1=ParaMEDMEM::DataArrayDouble::New(); a1->alloc(10,3); a1->setInfoOnComponent(0,"X1 [m]"); a1->setInfoOnComponent(1,"YY2 [km]"); a1->setInfoOnComponent(2,"ZZZ3 [km]");
+ MEDCoupling::DataArrayDouble *a1=MEDCoupling::DataArrayDouble::New(); a1->alloc(10,3); a1->setInfoOnComponent(0,"X1 [m]"); a1->setInfoOnComponent(1,"YY2 [km]"); a1->setInfoOnComponent(2,"ZZZ3 [km]");
const double coords[30]={1.,1.,0.,2.,1.,0.,3.,1.,0.,1.,0.,0.,2.,0.,0.,0.,0.,0.,0.,1.,0.,3.,0.,0.,4.,0.,0.,4.,1.,0.};
const int conn[15]={6,0,3,5,3,0,1,4,1,2,7,4,8,7,2};
const int conni[5]={0,4,8,12,15};
std::copy(coords,coords+30,a1->getPointer()); targetMesh->setCoords(a1); a1->decrRef();
- ParaMEDMEM::DataArrayInt *a2(ParaMEDMEM::DataArrayInt::New()); a2->alloc(15,1);
+ MEDCoupling::DataArrayInt *a2(MEDCoupling::DataArrayInt::New()); a2->alloc(15,1);
std::copy(conn,conn+15,a2->getPointer());
- ParaMEDMEM::DataArrayInt *a3(ParaMEDMEM::DataArrayInt::New()); a3->alloc(5,1);
+ MEDCoupling::DataArrayInt *a3(MEDCoupling::DataArrayInt::New()); a3->alloc(5,1);
std::copy(conni,conni+5,a3->getPointer());
targetMesh->setNodalConnectivity(a2,a3); a2->decrRef(); a3->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT()
{
- ParaMEDMEM::MEDCouplingUMesh *mesh=build2DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldOnCells=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::NO_TIME);
+ MEDCoupling::MEDCouplingUMesh *mesh=build2DMesh();
+ MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::NO_TIME);
fieldOnCells->setTimeUnit("ms");
fieldOnCells->setName("toto");
fieldOnCells->setMesh(mesh);
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(mesh->getNumberOfCells(),6);
fieldOnCells->setArray(array);
double *tmp=array->getPointer();
array->decrRef();
std::fill(tmp,tmp+mesh->getNumberOfCells()*6,7.);
mesh->decrRef();
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT()
{
- ParaMEDMEM::MEDCouplingUMesh *mesh=build2DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldOnNodes=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES,ParaMEDMEM::NO_TIME);
+ MEDCoupling::MEDCouplingUMesh *mesh=build2DMesh();
+ MEDCoupling::MEDCouplingFieldDouble *fieldOnNodes=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_NODES,MEDCoupling::NO_TIME);
fieldOnNodes->setName("toto2");
fieldOnNodes->setTimeUnit("s");
fieldOnNodes->setDescription("my wonderful field toto2");
fieldOnNodes->setMesh(mesh);
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(mesh->getNumberOfNodes(),5);
fieldOnNodes->setArray(array);
double *tmp=array->getPointer();
array->decrRef();
std::fill(tmp,tmp+mesh->getNumberOfNodes()*5,7.1234);
mesh->decrRef();
- fieldOnNodes->checkCoherency();
+ fieldOnNodes->checkConsistencyLight();
return fieldOnNodes;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT()
{
- ParaMEDMEM::MEDCouplingUMesh *mesh=build3DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldOnCells=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::NO_TIME);
- fieldOnCells->setNature(ParaMEDMEM::ConservativeVolumic);
+ MEDCoupling::MEDCouplingUMesh *mesh=build3DMesh();
+ MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::NO_TIME);
+ fieldOnCells->setNature(MEDCoupling::IntensiveMaximum);
fieldOnCells->setName("toto");
fieldOnCells->setDescription("my wonderful 3D field toto2");
fieldOnCells->setMesh(mesh);
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(mesh->getNumberOfCells(),6);
fieldOnCells->setArray(array);
double *tmp=array->getPointer();
array->decrRef();
std::fill(tmp,tmp+mesh->getNumberOfCells()*6,7.);
mesh->decrRef();
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT()
{
- ParaMEDMEM::MEDCouplingUMesh *mesh=build3DSurfMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldOnCells=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingUMesh *mesh=build3DSurfMesh();
+ MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
fieldOnCells->setName("toto25");
fieldOnCells->setDescription("my wonderful 3D surf field toto25");
fieldOnCells->setTimeUnit("us");
fieldOnCells->setMesh(mesh);
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(mesh->getNumberOfCells(),3);
array->setInfoOnComponent(0,"aaa"); array->setInfoOnComponent(1,"bbbb"); array->setInfoOnComponent(2,"ccccc");
fieldOnCells->setArray(array);
std::fill(tmp,tmp+mesh->getNumberOfCells()*3,7.);
mesh->decrRef();
fieldOnCells->setTime(6.7,1,4);
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI()
{
- ParaMEDMEM::MEDCouplingUMesh *mesh=build3DSurfMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldOnCells=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::CONST_ON_TIME_INTERVAL);
+ MEDCoupling::MEDCouplingUMesh *mesh=build3DSurfMesh();
+ MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::CONST_ON_TIME_INTERVAL);
fieldOnCells->setName("toto26");
fieldOnCells->setDescription("my wonderful 3D surf field toto26");
fieldOnCells->setTimeUnit("us");
fieldOnCells->setMesh(mesh);
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(mesh->getNumberOfCells(),3);
fieldOnCells->setArray(array);
double *tmp=array->getPointer();
mesh->decrRef();
fieldOnCells->setStartTime(6.7,1,4);
fieldOnCells->setEndTime(7.2,2,8);
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT()
{
- ParaMEDMEM::MEDCouplingUMesh *mesh=build2DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldOnCells=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::LINEAR_TIME);
+ MEDCoupling::MEDCouplingUMesh *mesh=build2DMesh();
+ MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::LINEAR_TIME);
fieldOnCells->setName("toto27");
fieldOnCells->setDescription("my wonderful 2D field toto27");
fieldOnCells->setTimeUnit("ms");
fieldOnCells->setMesh(mesh);
- ParaMEDMEM::DataArrayDouble *array1=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array1=MEDCoupling::DataArrayDouble::New();
array1->alloc(mesh->getNumberOfCells(),4);
fieldOnCells->setArray(array1);
double *tmp=array1->getPointer();
array1->decrRef();
const double arr1[20]={1.2,1.02,1.002,1.0002, 3.4,3.04,3.004,3.0004, 5.6,5.06,5.006,5.0006, 7.8,7.08,7.008,7.0008, 9.1,9.01,9.001,9.0001};
std::copy(arr1,arr1+20,tmp);
- ParaMEDMEM::DataArrayDouble *array2=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array2=MEDCoupling::DataArrayDouble::New();
array2->alloc(mesh->getNumberOfCells(),4);
fieldOnCells->setEndArray(array2);
tmp=array2->getPointer();
std::copy(arr2,arr2+20,tmp);
fieldOnCells->setStartTime(6.7,25,26);
fieldOnCells->setEndTime(17.2,125,126);
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT()
{
const double _a=0.446948490915965;
const double _b=0.091576213509771;
std::vector<double> _refCoo1(refCoo1,refCoo1+6);
std::vector<double> _gsCoo1(gsCoo1,gsCoo1+12);
std::vector<double> _wg1(wg1,wg1+6);
- ParaMEDMEM::MEDCouplingUMesh *m=build2DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *f=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_GAUSS_PT,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingUMesh *m=build2DMesh();
+ MEDCoupling::MEDCouplingFieldDouble *f=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_GAUSS_PT,MEDCoupling::ONE_TIME);
f->setTime(6.7,1,4);
f->setMesh(m);
m->decrRef();
std::vector<double> _refCoo2(refCoo2,refCoo2+8);
_gsCoo1.resize(4); _wg1.resize(2);
f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_QUAD4,_refCoo2,_gsCoo1,_wg1);
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(18,2);
array->setInfoOnComponent(0,"Power [MW]");
array->setInfoOnComponent(1,"Density [kg/m^3]");
f->setTimeUnit("ms");
f->setDescription("mmmmmmmmmmmm");
array->decrRef();
- f->checkCoherency();
+ f->checkConsistencyLight();
return f;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT()
{
- ParaMEDMEM::MEDCouplingUMesh *m=build2DMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *f=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_GAUSS_NE,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingUMesh *m=build2DMesh();
+ MEDCoupling::MEDCouplingFieldDouble *f=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_GAUSS_NE,MEDCoupling::ONE_TIME);
f->setTime(6.8,11,8);
f->setMesh(m);
f->setTimeUnit("ms");
f->setName("MyFirstFieldOnNE");
f->setDescription("MyDescriptionNE");
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
array->alloc(18,2);
array->setInfoOnComponent(0,"Power [MW]");
array->setInfoOnComponent(1,"Density [kg/m^3]");
f->setArray(array);
array->decrRef();
//
- f->checkCoherency();
+ f->checkConsistencyLight();
m->decrRef();
return f;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT()
{
- ParaMEDMEM::MEDCouplingUMesh *m2D=0;
- ParaMEDMEM::MEDCouplingExtrudedMesh *ext=buildExtrudedMesh(m2D);
+ MEDCoupling::MEDCouplingUMesh *m2D=0;
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *ext=buildExtrudedMesh(m2D);
//
- ParaMEDMEM::MEDCouplingFieldDouble *f=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f->setTime(6.8,11,8);
f->setMesh(ext);
f->setName("MyFieldOnExtruM");
f->setDescription("desc of MyFiOnExtruM");
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
int nbOfCells=ext->getNumberOfCells();
array->alloc(nbOfCells,2);
array->setInfoOnComponent(0,"Power [MW]");
f->setArray(array);
array->decrRef();
//
- f->checkCoherency();
+ f->checkConsistencyLight();
//
m2D->decrRef();
ext->decrRef();
return f;
}
- ParaMEDMEM::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT()
+ MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT()
{
- ParaMEDMEM::MEDCouplingCMesh *m=buildCMesh();
- ParaMEDMEM::MEDCouplingFieldDouble *f=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingCMesh *m=buildCMesh();
+ MEDCoupling::MEDCouplingFieldDouble *f=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f->setTime(6.8,11,8);
f->setMesh(m);
m->decrRef();
f->setName("MyFieldOnCMesh");
f->setDescription("desc of MyFiOnCMesh");
- ParaMEDMEM::DataArrayDouble *array=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *array=MEDCoupling::DataArrayDouble::New();
int nbOfCells=m->getNumberOfCells();
array->alloc(nbOfCells,2);
array->setInfoOnComponent(0,"Power [GW]");
f->setArray(array);
array->decrRef();
//
- f->checkCoherency();
+ f->checkConsistencyLight();
//
return f;
}
- ParaMEDMEM::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D()
+ MEDCoupling::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D()
{
- ParaMEDMEM::MEDCouplingFieldDouble *f1=buildFieldScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldTemplate *f2=ParaMEDMEM::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(ParaMEDMEM::NoNature);
+ MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldScalarOn2DNT();
+ MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
+ f2->setNature(MEDCoupling::NoNature);
f1->decrRef();
return f2;
}
- ParaMEDMEM::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D()
+ MEDCoupling::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D()
{
- ParaMEDMEM::MEDCouplingFieldDouble *f1=buildFieldNodeScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldTemplate *f2=ParaMEDMEM::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(ParaMEDMEM::ConservativeVolumic);
+ MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldNodeScalarOn2DNT();
+ MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
+ f2->setNature(MEDCoupling::IntensiveMaximum);
f1->decrRef();
return f2;
}
- ParaMEDMEM::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D()
+ MEDCoupling::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D()
{
- ParaMEDMEM::MEDCouplingFieldDouble *f1=buildFieldGaussPt2DWT();
- ParaMEDMEM::MEDCouplingFieldTemplate *f2=ParaMEDMEM::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(ParaMEDMEM::Integral);
+ MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldGaussPt2DWT();
+ MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
+ f2->setNature(MEDCoupling::ExtensiveMaximum);
f1->decrRef();
return f2;
}
- ParaMEDMEM::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D()
+ MEDCoupling::MEDCouplingFieldTemplate *MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D()
{
- ParaMEDMEM::MEDCouplingFieldDouble *f1=buildFieldGaussPtNE2DWT();
- ParaMEDMEM::MEDCouplingFieldTemplate *f2=ParaMEDMEM::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(ParaMEDMEM::IntegralGlobConstraint);
+ MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldGaussPtNE2DWT();
+ MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
+ f2->setNature(MEDCoupling::ExtensiveConservation);
f1->decrRef();
return f2;
}
- ParaMEDMEM::MEDCouplingMultiFields *MEDCouplingCorbaServBasicsTest::buildMultiFields1()
+ MEDCoupling::MEDCouplingMultiFields *MEDCouplingCorbaServBasicsTest::buildMultiFields1()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=build2DMesh();
+ MEDCoupling::MEDCouplingUMesh *m1=build2DMesh();
m1->setName("m1");
- ParaMEDMEM::MEDCouplingUMesh *m2=build2DMesh();
+ MEDCoupling::MEDCouplingUMesh *m2=build2DMesh();
m2->setName("m2");
const double vals0[]={-0.7,-1.,-2.,-3.,-4.};
const double vals1[]={0.,1.,2.,3.,4.,0.1,0.2,0.3,0.4};
const double vals2[]={5.,6.,7.,8.,9.};
const double vals4[]={15.,16.,17.,18.,19.};
//
- ParaMEDMEM::DataArrayDouble *d0=ParaMEDMEM::DataArrayDouble::New(); d0->alloc(5,1); std::copy(vals0,vals0+5,d0->getPointer());
- ParaMEDMEM::DataArrayDouble *d1=ParaMEDMEM::DataArrayDouble::New(); d1->alloc(9,1); std::copy(vals1,vals1+9,d1->getPointer());
- ParaMEDMEM::DataArrayDouble *d1_1=ParaMEDMEM::DataArrayDouble::New(); d1_1->alloc(9,1); std::copy(vals1_1,vals1_1+9,d1_1->getPointer());
- ParaMEDMEM::DataArrayDouble *d2=ParaMEDMEM::DataArrayDouble::New(); d2->alloc(5,1); std::copy(vals2,vals2+5,d2->getPointer());
- ParaMEDMEM::DataArrayDouble *d4=ParaMEDMEM::DataArrayDouble::New(); d4->alloc(5,1); std::copy(vals4,vals4+5,d4->getPointer());
+ MEDCoupling::DataArrayDouble *d0=MEDCoupling::DataArrayDouble::New(); d0->alloc(5,1); std::copy(vals0,vals0+5,d0->getPointer());
+ MEDCoupling::DataArrayDouble *d1=MEDCoupling::DataArrayDouble::New(); d1->alloc(9,1); std::copy(vals1,vals1+9,d1->getPointer());
+ MEDCoupling::DataArrayDouble *d1_1=MEDCoupling::DataArrayDouble::New(); d1_1->alloc(9,1); std::copy(vals1_1,vals1_1+9,d1_1->getPointer());
+ MEDCoupling::DataArrayDouble *d2=MEDCoupling::DataArrayDouble::New(); d2->alloc(5,1); std::copy(vals2,vals2+5,d2->getPointer());
+ MEDCoupling::DataArrayDouble *d4=MEDCoupling::DataArrayDouble::New(); d4->alloc(5,1); std::copy(vals4,vals4+5,d4->getPointer());
//
d0->setName("d0"); d1->setName("d1"); d1_1->setName("d1_1"); d2->setName("d2"); d4->setName("d4");
d0->setInfoOnComponent(0,"c1");
d2->setInfoOnComponent(0,"c5");
d4->setInfoOnComponent(0,"c7");
//
- ParaMEDMEM::MEDCouplingFieldDouble *f0=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f0=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f0->setMesh(m1);
f0->setArray(d0);
f0->setTime(0.2,5,6);
f0->setName("f0");
- ParaMEDMEM::MEDCouplingFieldDouble *f1=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES,ParaMEDMEM::LINEAR_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f1=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_NODES,MEDCoupling::LINEAR_TIME);
f1->setMesh(m1);
- std::vector<ParaMEDMEM::DataArrayDouble *> d1s(2); d1s[0]=d1; d1s[1]=d1_1;
+ std::vector<MEDCoupling::DataArrayDouble *> d1s(2); d1s[0]=d1; d1s[1]=d1_1;
f1->setArrays(d1s);
f1->setStartTime(0.7,7,8);
f1->setEndTime(1.2,9,10);
f1->setName("f1");
- ParaMEDMEM::MEDCouplingFieldDouble *f2=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::CONST_ON_TIME_INTERVAL);
+ MEDCoupling::MEDCouplingFieldDouble *f2=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::CONST_ON_TIME_INTERVAL);
f2->setMesh(m2);
f2->setArray(d2);
f2->setTime(1.2,11,12);
f2->setEndTime(1.5,13,14);
f2->setName("f2");
- ParaMEDMEM::MEDCouplingFieldDouble *f3=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f3=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f3->setMesh(m1);
f3->setArray(d2);
f3->setTime(1.7,15,16);
f3->setName("f3");
- ParaMEDMEM::MEDCouplingFieldDouble *f4=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::NO_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f4=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::NO_TIME);
f4->setMesh(m2);
f4->setArray(d4);
f4->setName("f4");
//
- std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> fs(5);
+ std::vector<MEDCoupling::MEDCouplingFieldDouble *> fs(5);
fs[0]=f0; fs[1]=f1; fs[2]=f2; fs[3]=f3; fs[4]=f4;
- ParaMEDMEM::MEDCouplingMultiFields *ret=ParaMEDMEM::MEDCouplingMultiFields::New(fs);
+ MEDCoupling::MEDCouplingMultiFields *ret=MEDCoupling::MEDCouplingMultiFields::New(fs);
//
m1->decrRef();
m2->decrRef();
return ret;
}
- ParaMEDMEM::DataArrayDouble *MEDCouplingCorbaServBasicsTest::buildArrayDouble1()
+ MEDCoupling::DataArrayDouble *MEDCouplingCorbaServBasicsTest::buildArrayDouble1()
{
- ParaMEDMEM::DataArrayDouble *ret=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *ret=MEDCoupling::DataArrayDouble::New();
ret->alloc(4,3);
const double vals[12]={2.4,3.2,5.6,9.6,47.6,20.4,24.6,278.1,2.01,3.3,2.4,9.4};
std::copy(vals,vals+12,ret->getPointer());
return ret;
}
- ParaMEDMEM::DataArrayDouble *MEDCouplingCorbaServBasicsTest::buildArrayDouble2()
+ MEDCoupling::DataArrayDouble *MEDCouplingCorbaServBasicsTest::buildArrayDouble2()
{
- ParaMEDMEM::DataArrayDouble *ret=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *ret=MEDCoupling::DataArrayDouble::New();
ret->setName("titi");
return ret;
}
- ParaMEDMEM::DataArrayDouble *MEDCouplingCorbaServBasicsTest::buildArrayDouble3()
+ MEDCoupling::DataArrayDouble *MEDCouplingCorbaServBasicsTest::buildArrayDouble3()
{
- ParaMEDMEM::DataArrayDouble *ret=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *ret=MEDCoupling::DataArrayDouble::New();
ret->setName("titi");
ret->alloc(0,3);
ret->setInfoOnComponent(0,"sss");
return ret;
}
- ParaMEDMEM::DataArrayInt *MEDCouplingCorbaServBasicsTest::buildArrayInt1()
+ MEDCoupling::DataArrayInt *MEDCouplingCorbaServBasicsTest::buildArrayInt1()
{
- ParaMEDMEM::DataArrayInt *ret=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt *ret=MEDCoupling::DataArrayInt::New();
ret->alloc(4,3);
const int vals[12]={2,3,5,9,47,20,24,278,2,3,2,9};
std::copy(vals,vals+12,ret->getPointer());
return ret;
}
- ParaMEDMEM::DataArrayInt *MEDCouplingCorbaServBasicsTest::buildArrayInt2()
+ MEDCoupling::DataArrayInt *MEDCouplingCorbaServBasicsTest::buildArrayInt2()
{
- ParaMEDMEM::DataArrayInt *ret=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt *ret=MEDCoupling::DataArrayInt::New();
ret->setName("titi");
return ret;
}
- ParaMEDMEM::DataArrayInt *MEDCouplingCorbaServBasicsTest::buildArrayInt3()
+ MEDCoupling::DataArrayInt *MEDCouplingCorbaServBasicsTest::buildArrayInt3()
{
- ParaMEDMEM::DataArrayInt *ret=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt *ret=MEDCoupling::DataArrayInt::New();
ret->setName("titi");
ret->alloc(0,3);
ret->setInfoOnComponent(0,"sss");
return ret;
}
- ParaMEDMEM::MEDCouplingFieldOverTime *MEDCouplingCorbaServBasicsTest::buildMultiFields2()
+ MEDCoupling::MEDCouplingFieldOverTime *MEDCouplingCorbaServBasicsTest::buildMultiFields2()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=build2DMesh();
+ MEDCoupling::MEDCouplingUMesh *m1=build2DMesh();
m1->setName("m1");
- ParaMEDMEM::MEDCouplingUMesh *m2=build2DMesh();
+ MEDCoupling::MEDCouplingUMesh *m2=build2DMesh();
m2->setName("m2");
const double vals0[]={-0.7,-1.,-2.,-3.,-4.};
const double vals1[]={0.,1.,2.,3.,4.};
const double vals2[]={5.,6.,7.,8.,9.};
const double vals4[]={15.,16.,17.,18.,19.};
//
- ParaMEDMEM::DataArrayDouble *d0=ParaMEDMEM::DataArrayDouble::New(); d0->alloc(5,1); std::copy(vals0,vals0+5,d0->getPointer());
- ParaMEDMEM::DataArrayDouble *d1=ParaMEDMEM::DataArrayDouble::New(); d1->alloc(5,1); std::copy(vals1,vals1+5,d1->getPointer());
- ParaMEDMEM::DataArrayDouble *d1_1=ParaMEDMEM::DataArrayDouble::New(); d1_1->alloc(5,1); std::copy(vals1_1,vals1_1+5,d1_1->getPointer());
- ParaMEDMEM::DataArrayDouble *d2=ParaMEDMEM::DataArrayDouble::New(); d2->alloc(5,1); std::copy(vals2,vals2+5,d2->getPointer());
- ParaMEDMEM::DataArrayDouble *d4=ParaMEDMEM::DataArrayDouble::New(); d4->alloc(5,1); std::copy(vals4,vals4+5,d4->getPointer());
+ MEDCoupling::DataArrayDouble *d0=MEDCoupling::DataArrayDouble::New(); d0->alloc(5,1); std::copy(vals0,vals0+5,d0->getPointer());
+ MEDCoupling::DataArrayDouble *d1=MEDCoupling::DataArrayDouble::New(); d1->alloc(5,1); std::copy(vals1,vals1+5,d1->getPointer());
+ MEDCoupling::DataArrayDouble *d1_1=MEDCoupling::DataArrayDouble::New(); d1_1->alloc(5,1); std::copy(vals1_1,vals1_1+5,d1_1->getPointer());
+ MEDCoupling::DataArrayDouble *d2=MEDCoupling::DataArrayDouble::New(); d2->alloc(5,1); std::copy(vals2,vals2+5,d2->getPointer());
+ MEDCoupling::DataArrayDouble *d4=MEDCoupling::DataArrayDouble::New(); d4->alloc(5,1); std::copy(vals4,vals4+5,d4->getPointer());
//
d0->setName("d0"); d1->setName("d1"); d1_1->setName("d1_1"); d2->setName("d2"); d4->setName("d4");
d0->setInfoOnComponent(0,"c1");
d2->setInfoOnComponent(0,"c5");
d4->setInfoOnComponent(0,"c7");
//
- ParaMEDMEM::MEDCouplingFieldDouble *f0=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f0=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f0->setMesh(m1);
f0->setArray(d0);
f0->setTime(0.2,5,6);
f0->setName("f0");
- ParaMEDMEM::MEDCouplingFieldDouble *f1=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::LINEAR_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f1=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::LINEAR_TIME);
f1->setMesh(m1);
- std::vector<ParaMEDMEM::DataArrayDouble *> d1s(2); d1s[0]=d1; d1s[1]=d1_1;
+ std::vector<MEDCoupling::DataArrayDouble *> d1s(2); d1s[0]=d1; d1s[1]=d1_1;
f1->setArrays(d1s);
f1->setStartTime(0.7,7,8);
f1->setEndTime(1.2,9,10);
f1->setName("f1");
- ParaMEDMEM::MEDCouplingFieldDouble *f2=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::CONST_ON_TIME_INTERVAL);
+ MEDCoupling::MEDCouplingFieldDouble *f2=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::CONST_ON_TIME_INTERVAL);
f2->setMesh(m2);
f2->setArray(d2);
f2->setTime(1.2,11,12);
f2->setEndTime(1.5,13,14);
f2->setName("f2");
- ParaMEDMEM::MEDCouplingFieldDouble *f3=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f3=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f3->setMesh(m1);
f3->setArray(d2);
f3->setTime(1.7,15,16);
f3->setName("f3");
- ParaMEDMEM::MEDCouplingFieldDouble *f4=ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS,ParaMEDMEM::ONE_TIME);
+ MEDCoupling::MEDCouplingFieldDouble *f4=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f4->setMesh(m2);
f4->setArray(d4);
f4->setName("f4");
f4->setTime(2.7,25,26);
//
- std::vector<ParaMEDMEM::MEDCouplingFieldDouble *> fs(5);
+ std::vector<MEDCoupling::MEDCouplingFieldDouble *> fs(5);
fs[0]=f0; fs[1]=f1; fs[2]=f2; fs[3]=f3; fs[4]=f4;
- ParaMEDMEM::MEDCouplingFieldOverTime *ret=ParaMEDMEM::MEDCouplingFieldOverTime::New(fs);
- ret->checkCoherency();
+ MEDCoupling::MEDCouplingFieldOverTime *ret=MEDCoupling::MEDCouplingFieldOverTime::New(fs);
+ ret->checkConsistencyLight();
//
m1->decrRef();
m2->decrRef();
#include <string>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
class MEDCouplingFieldDouble;
class MEDCouplingFieldTemplate;
- class MEDCouplingExtrudedMesh;
+ class MEDCouplingMappedExtrudedMesh;
class MEDCoupling1DGTUMesh;
class MEDCoupling1SGTUMesh;
class MEDCouplingCMesh;
class MEDCouplingCorbaServBasicsTest
{
public:
- static ParaMEDMEM::MEDCouplingUMesh *build1DMesh();
- static ParaMEDMEM::MEDCouplingUMesh *build2DMesh();
- static ParaMEDMEM::MEDCouplingUMesh *build3DMesh();
- static ParaMEDMEM::MEDCouplingUMesh *build3DSurfMesh();
- static ParaMEDMEM::MEDCouplingUMesh *build0DMesh();
- static ParaMEDMEM::MEDCouplingUMesh *buildM1DMesh();
- static ParaMEDMEM::MEDCouplingExtrudedMesh *buildExtrudedMesh(ParaMEDMEM::MEDCouplingUMesh *&m2D);
- static ParaMEDMEM::MEDCouplingCMesh *buildCMesh();
- static ParaMEDMEM::MEDCouplingIMesh *buildIMesh();
- static ParaMEDMEM::MEDCouplingCurveLinearMesh *buildCLMesh();
- static ParaMEDMEM::MEDCoupling1SGTUMesh *build1SGTUMesh();
- static ParaMEDMEM::MEDCoupling1DGTUMesh *build1DGTUMesh();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldScalarOn2DNT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldNodeScalarOn2DNT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldScalarOn3DNT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldScalarOn3DSurfWT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldScalarOn3DSurfCOTI();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldScalarOn2DLT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldGaussPt2DWT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldGaussPtNE2DWT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldVectorOnExtrudedWT();
- static ParaMEDMEM::MEDCouplingFieldDouble *buildFieldVectorOnCMeshWT();
- static ParaMEDMEM::MEDCouplingFieldTemplate *buildFieldTemplateCellOn2D();
- static ParaMEDMEM::MEDCouplingFieldTemplate *buildFieldTemplateNodeOn2D();
- static ParaMEDMEM::MEDCouplingFieldTemplate *buildFieldTemplateGaussPtOn2D();
- static ParaMEDMEM::MEDCouplingFieldTemplate *buildFieldTemplateGaussNEOn2D();
- static ParaMEDMEM::MEDCouplingMultiFields *buildMultiFields1();
- static ParaMEDMEM::DataArrayDouble *buildArrayDouble1();
- static ParaMEDMEM::DataArrayDouble *buildArrayDouble2();
- static ParaMEDMEM::DataArrayDouble *buildArrayDouble3();
- static ParaMEDMEM::DataArrayInt *buildArrayInt1();
- static ParaMEDMEM::DataArrayInt *buildArrayInt2();
- static ParaMEDMEM::DataArrayInt *buildArrayInt3();
- static ParaMEDMEM::MEDCouplingFieldOverTime *buildMultiFields2();
+ static MEDCoupling::MEDCouplingUMesh *build1DMesh();
+ static MEDCoupling::MEDCouplingUMesh *build2DMesh();
+ static MEDCoupling::MEDCouplingUMesh *build3DMesh();
+ static MEDCoupling::MEDCouplingUMesh *build3DSurfMesh();
+ static MEDCoupling::MEDCouplingUMesh *build0DMesh();
+ static MEDCoupling::MEDCouplingUMesh *buildM1DMesh();
+ static MEDCoupling::MEDCouplingMappedExtrudedMesh *buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D);
+ static MEDCoupling::MEDCouplingCMesh *buildCMesh();
+ static MEDCoupling::MEDCouplingIMesh *buildIMesh();
+ static MEDCoupling::MEDCouplingCurveLinearMesh *buildCLMesh();
+ static MEDCoupling::MEDCoupling1SGTUMesh *build1SGTUMesh();
+ static MEDCoupling::MEDCoupling1DGTUMesh *build1DGTUMesh();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldScalarOn2DNT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldNodeScalarOn2DNT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldScalarOn3DNT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldScalarOn3DSurfWT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldScalarOn3DSurfCOTI();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldScalarOn2DLT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldGaussPt2DWT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldGaussPtNE2DWT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldVectorOnExtrudedWT();
+ static MEDCoupling::MEDCouplingFieldDouble *buildFieldVectorOnCMeshWT();
+ static MEDCoupling::MEDCouplingFieldTemplate *buildFieldTemplateCellOn2D();
+ static MEDCoupling::MEDCouplingFieldTemplate *buildFieldTemplateNodeOn2D();
+ static MEDCoupling::MEDCouplingFieldTemplate *buildFieldTemplateGaussPtOn2D();
+ static MEDCoupling::MEDCouplingFieldTemplate *buildFieldTemplateGaussNEOn2D();
+ static MEDCoupling::MEDCouplingMultiFields *buildMultiFields1();
+ static MEDCoupling::DataArrayDouble *buildArrayDouble1();
+ static MEDCoupling::DataArrayDouble *buildArrayDouble2();
+ static MEDCoupling::DataArrayDouble *buildArrayDouble3();
+ static MEDCoupling::DataArrayInt *buildArrayInt1();
+ static MEDCoupling::DataArrayInt *buildArrayInt2();
+ static MEDCoupling::DataArrayInt *buildArrayInt3();
+ static MEDCoupling::MEDCouplingFieldOverTime *buildMultiFields2();
static std::string buildFileNameForIOR();
};
}
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCoupling1SGTUMeshClient.hxx"
#include "MEDCoupling1DGTUMeshClient.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingExtrudedMeshClient.hxx"
#include "MEDCouplingCMesh.hxx"
#include "MEDCouplingCMeshClient.hxx"
SALOME_TEST::MEDCouplingMeshFieldFactory_ptr SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::_objC;
-ParaMEDMEM::MEDCouplingUMesh *SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::_mesh_from_distant=0;
+MEDCoupling::MEDCouplingUMesh *SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::_mesh_from_distant=0;
int SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::_argc=0;
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkContentOfFetched1DMesh()
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->get1DMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
char *meshName=meshPtr->getName();
std::string meshNameCpp(meshName);
CPPUNIT_ASSERT(meshNameCpp=="1DMeshForCorba");
CORBA::release(meshPtr);
CPPUNIT_ASSERT_EQUAL(3,_mesh_from_distant->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(1,_mesh_from_distant->getMeshDimension());
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1DMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1DMesh();
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
meshRef->decrRef();
_mesh_from_distant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching2D()
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->get2DMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
CPPUNIT_ASSERT_EQUAL(2,_mesh_from_distant->getSpaceDimension());
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkContentOfFetched2DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build2DMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build2DMesh();
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
meshRef->decrRef();
_mesh_from_distant->decrRef();
for(int i=0;i<1000;i++)
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->get2DMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build2DMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build2DMesh();
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
meshRef->decrRef();
_mesh_from_distant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching3D()
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->get3DMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
CPPUNIT_ASSERT_EQUAL(3,_mesh_from_distant->getSpaceDimension());
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkContentOfFetched3DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build3DMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build3DMesh();
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
meshRef->decrRef();
_mesh_from_distant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching3DSurf()
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->get3DSurfMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
CPPUNIT_ASSERT_EQUAL(3,_mesh_from_distant->getSpaceDimension());
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkContentOfFetched3DSurfMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
meshRef->decrRef();
_mesh_from_distant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching0D()
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->get0DMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build0DMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build0DMesh();
CPPUNIT_ASSERT_EQUAL(3,_mesh_from_distant->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(0,_mesh_from_distant->getMeshDimension());
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingM1D()
{
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr meshPtr=_objC->getM1DMesh();
- _mesh_from_distant=ParaMEDMEM::MEDCouplingUMeshClient::New(meshPtr);
+ _mesh_from_distant=MEDCoupling::MEDCouplingUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildM1DMesh();
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildM1DMesh();
CPPUNIT_ASSERT_EQUAL(-1,_mesh_from_distant->getMeshDimension());
CPPUNIT_ASSERT(_mesh_from_distant->isEqual(meshRef,1e-12));
meshRef->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingExtruded()
{
SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr=_objC->getExtrudedMesh();
- ParaMEDMEM::MEDCouplingExtrudedMesh *meshFromDistant=ParaMEDMEM::MEDCouplingExtrudedMeshClient::New(meshPtr);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *meshFromDistant=MEDCoupling::MEDCouplingExtrudedMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingUMesh *meshRef2;
- ParaMEDMEM::MEDCouplingExtrudedMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(meshRef2);
+ MEDCoupling::MEDCouplingUMesh *meshRef2;
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(meshRef2);
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
CPPUNIT_ASSERT(meshFromDistant->getMesh2D()->isEqual(meshRef2,1e-12));
meshRef2->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingCMesh()
{
SALOME_MED::MEDCouplingCMeshCorbaInterface_ptr meshPtr=_objC->getCMesh();
- ParaMEDMEM::MEDCouplingCMesh *meshFromDistant=ParaMEDMEM::MEDCouplingCMeshClient::New(meshPtr);
+ MEDCoupling::MEDCouplingCMesh *meshFromDistant=MEDCoupling::MEDCouplingCMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingCMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildCMesh();
+ MEDCoupling::MEDCouplingCMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildCMesh();
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
meshRef->decrRef();
meshFromDistant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingIMesh()
{
SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr meshPtr=_objC->getIMesh();
- ParaMEDMEM::MEDCouplingIMesh *meshFromDistant=ParaMEDMEM::MEDCouplingIMeshClient::New(meshPtr);
+ MEDCoupling::MEDCouplingIMesh *meshFromDistant=MEDCoupling::MEDCouplingIMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingIMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildIMesh();
+ MEDCoupling::MEDCouplingIMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildIMesh();
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
meshRef->decrRef();
meshFromDistant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingCurveLinearMesh()
{
SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_ptr meshPtr=_objC->getCLMesh();
- ParaMEDMEM::MEDCouplingCurveLinearMesh *meshFromDistant=ParaMEDMEM::MEDCouplingCurveLinearMeshClient::New(meshPtr);
+ MEDCoupling::MEDCouplingCurveLinearMesh *meshFromDistant=MEDCoupling::MEDCouplingCurveLinearMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCouplingCurveLinearMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildCLMesh();
+ MEDCoupling::MEDCouplingCurveLinearMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildCLMesh();
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
meshRef->decrRef();
meshFromDistant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching1SGTUMesh()
{
SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_ptr meshPtr=_objC->get1SGTUMesh();
- ParaMEDMEM::MEDCoupling1SGTUMesh *meshFromDistant=ParaMEDMEM::MEDCoupling1SGTUMeshClient::New(meshPtr);
+ MEDCoupling::MEDCoupling1SGTUMesh *meshFromDistant=MEDCoupling::MEDCoupling1SGTUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCoupling1SGTUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1SGTUMesh();
+ MEDCoupling::MEDCoupling1SGTUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1SGTUMesh();
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
meshRef->decrRef();
meshFromDistant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching1DGTUMesh()
{
SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_ptr meshPtr=_objC->get1DGTUMesh();
- ParaMEDMEM::MEDCoupling1DGTUMesh *meshFromDistant=ParaMEDMEM::MEDCoupling1DGTUMeshClient::New(meshPtr);
+ MEDCoupling::MEDCoupling1DGTUMesh *meshFromDistant=MEDCoupling::MEDCoupling1DGTUMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::MEDCoupling1DGTUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1DGTUMesh();
+ MEDCoupling::MEDCoupling1DGTUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1DGTUMesh();
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
meshRef->decrRef();
meshFromDistant->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaField2DNTFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
CPPUNIT_ASSERT_THROW(fieldCpp->setTime(1.23,4,5),INTERP_KERNEL::Exception);
refField->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaField2DNTMultiFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp2=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp2=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
CPPUNIT_ASSERT(fieldCpp->isEqual(fieldCpp2,1.e-12,1.e-15));
char *stackS=(char *)stack;
CORBA::Object_var obj=_orb->string_to_object(stackS);
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=SALOME_MED::MEDCouplingFieldDoubleCorbaInterface::_narrow(obj);
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
CORBA::release(fieldPtr);
return fieldCpp;
}
//doing nbOfThreads-1 Register.
char *ior=_orb->object_to_string(fieldPtr);
pthread_t threads[nbOfThreads];
- ParaMEDMEM::MEDCouplingFieldDouble *rets[nbOfThreads];
+ MEDCoupling::MEDCouplingFieldDouble *rets[nbOfThreads];
for(int i=0;i<nbOfThreads;i++)
pthread_create(&threads[i],0,checkCorbaField2DNTMultiFetchingMTStatic,ior);
for(int i=0;i<nbOfThreads;i++)
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldNode2DNTFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldNodeScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
CPPUNIT_ASSERT_THROW(fieldCpp->setTime(1.23,4,5),INTERP_KERNEL::Exception);
refField->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaField3DNTFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldScalarOn3DNT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
CPPUNIT_ASSERT_THROW(fieldCpp->setTime(1.23,4,5),INTERP_KERNEL::Exception);
refField->decrRef();
CPPUNIT_ASSERT(std::string((*comps)[2])=="ccccc");
delete comps;
//
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
int dt,it;
fieldCpp->getTime(dt,it);
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaField3DSurfCOTIFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldScalarOn3DSurfCOTI();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
int dt,it;
fieldCpp->getStartTime(dt,it);
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaField2DLTFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldScalarOn2DLT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
double res[4];
CPPUNIT_ASSERT_DOUBLES_EQUAL(25.04,res[1],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(25.004,res[2],1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(25.0004,res[3],1e-12);
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
int dt,it;
CPPUNIT_ASSERT_DOUBLES_EQUAL(6.7,fieldCpp->getStartTime(dt,it),1e-14);
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldGaussPt2DWTFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldGaussPt2DWT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldGaussPtNE2DWTFetching()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldGaussPtNE2DWT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldVectorOnExtrudedWT()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldVectorOnExtrudedWT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldVectorOnCMeshWT()
{
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldVectorOnCMeshWT();
- ParaMEDMEM::MEDCouplingFieldDouble *fieldCpp=ParaMEDMEM::MEDCouplingFieldDoubleClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldDouble *fieldCpp=MEDCoupling::MEDCouplingFieldDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT();
+ MEDCoupling::MEDCouplingFieldDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldTemplateCellOn2D()
{
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr fieldPtr=_objC->getFieldTemplateCellOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplate *fieldCpp=ParaMEDMEM::MEDCouplingFieldTemplateClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldTemplate *fieldCpp=MEDCoupling::MEDCouplingFieldTemplateClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D();
+ MEDCoupling::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldTemplateNodeOn2D()
{
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr fieldPtr=_objC->getFieldTemplateNodeOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplate *fieldCpp=ParaMEDMEM::MEDCouplingFieldTemplateClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldTemplate *fieldCpp=MEDCoupling::MEDCouplingFieldTemplateClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D();
+ MEDCoupling::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldTemplateGaussPtOn2D()
{
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr fieldPtr=_objC->getFieldTemplateGaussPtOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplate *fieldCpp=ParaMEDMEM::MEDCouplingFieldTemplateClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldTemplate *fieldCpp=MEDCoupling::MEDCouplingFieldTemplateClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D();
+ MEDCoupling::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFieldTemplateGaussNEOn2D()
{
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr fieldPtr=_objC->getFieldTemplateGaussNEOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplate *fieldCpp=ParaMEDMEM::MEDCouplingFieldTemplateClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingFieldTemplate *fieldCpp=MEDCoupling::MEDCouplingFieldTemplateClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D();
+ MEDCoupling::MEDCouplingFieldTemplate *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaMultiFields1()
{
SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr fieldPtr=_objC->getMultiFields1();
- ParaMEDMEM::MEDCouplingMultiFields *fieldCpp=ParaMEDMEM::MEDCouplingMultiFieldsClient::New(fieldPtr);
+ MEDCoupling::MEDCouplingMultiFields *fieldCpp=MEDCoupling::MEDCouplingMultiFieldsClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::MEDCouplingMultiFields *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildMultiFields1();
+ MEDCoupling::MEDCouplingMultiFields *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildMultiFields1();
CPPUNIT_ASSERT(fieldCpp->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
fieldCpp->decrRef();
CPPUNIT_ASSERT(std::string((*comps)[2])=="ttt");
delete comps;
//
- ParaMEDMEM::DataArrayDouble *fieldCpp=ParaMEDMEM::DataArrayDoubleClient::New(fieldPtr);
+ MEDCoupling::DataArrayDouble *fieldCpp=MEDCoupling::DataArrayDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::DataArrayDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayDouble1();
+ MEDCoupling::DataArrayDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayDouble1();
CPPUNIT_ASSERT(fieldCpp->isEqual(*refField,1.e-12));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaArrayDouble2()
{
SALOME_MED::DataArrayDoubleCorbaInterface_ptr fieldPtr=_objC->getArrayDouble2();
- ParaMEDMEM::DataArrayDouble *fieldCpp=ParaMEDMEM::DataArrayDoubleClient::New(fieldPtr);
+ MEDCoupling::DataArrayDouble *fieldCpp=MEDCoupling::DataArrayDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::DataArrayDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayDouble2();
+ MEDCoupling::DataArrayDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayDouble2();
CPPUNIT_ASSERT(fieldCpp->isEqual(*refField,1.e-12));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaArrayDouble3()
{
SALOME_MED::DataArrayDoubleCorbaInterface_ptr fieldPtr=_objC->getArrayDouble3();
- ParaMEDMEM::DataArrayDouble *fieldCpp=ParaMEDMEM::DataArrayDoubleClient::New(fieldPtr);
+ MEDCoupling::DataArrayDouble *fieldCpp=MEDCoupling::DataArrayDoubleClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::DataArrayDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayDouble3();
+ MEDCoupling::DataArrayDouble *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayDouble3();
CPPUNIT_ASSERT(fieldCpp->isEqual(*refField,1.e-12));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaArrayInt1()
{
SALOME_MED::DataArrayIntCorbaInterface_ptr fieldPtr=_objC->getArrayInt1();
- ParaMEDMEM::DataArrayInt *fieldCpp=ParaMEDMEM::DataArrayIntClient::New(fieldPtr);
+ MEDCoupling::DataArrayInt *fieldCpp=MEDCoupling::DataArrayIntClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::DataArrayInt *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayInt1();
+ MEDCoupling::DataArrayInt *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayInt1();
CPPUNIT_ASSERT(fieldCpp->isEqual(*refField));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaArrayInt2()
{
SALOME_MED::DataArrayIntCorbaInterface_ptr fieldPtr=_objC->getArrayInt2();
- ParaMEDMEM::DataArrayInt *fieldCpp=ParaMEDMEM::DataArrayIntClient::New(fieldPtr);
+ MEDCoupling::DataArrayInt *fieldCpp=MEDCoupling::DataArrayIntClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::DataArrayInt *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayInt2();
+ MEDCoupling::DataArrayInt *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayInt2();
CPPUNIT_ASSERT(fieldCpp->isEqual(*refField));
refField->decrRef();
fieldCpp->decrRef();
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaArrayInt3()
{
SALOME_MED::DataArrayIntCorbaInterface_ptr fieldPtr=_objC->getArrayInt3();
- ParaMEDMEM::DataArrayInt *fieldCpp=ParaMEDMEM::DataArrayIntClient::New(fieldPtr);
+ MEDCoupling::DataArrayInt *fieldCpp=MEDCoupling::DataArrayIntClient::New(fieldPtr);
fieldPtr->UnRegister();
CORBA::release(fieldPtr);
//
- ParaMEDMEM::DataArrayInt *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayInt3();
+ MEDCoupling::DataArrayInt *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildArrayInt3();
CPPUNIT_ASSERT(fieldCpp->isEqual(*refField));
refField->decrRef();
fieldCpp->decrRef();
SALOME_MED::DataArrayDoubleCorbaInterface_ptr cooPtr=meshPtr->getCoords();
meshPtr->UnRegister();
CORBA::release(meshPtr);
- ParaMEDMEM::DataArrayDouble *cooCpp=ParaMEDMEM::DataArrayDoubleClient::New(cooPtr);
- ParaMEDMEM::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
+ MEDCoupling::DataArrayDouble *cooCpp=MEDCoupling::DataArrayDoubleClient::New(cooPtr);
+ MEDCoupling::MEDCouplingUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
//
CPPUNIT_ASSERT(meshRef->getCoords()->isEqual(*cooCpp,1e-12));
//
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaMultiFields2()
{
SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface_ptr fotPtr=_objC->getMultiFields2();
- ParaMEDMEM::MEDCouplingFieldOverTimeClient *fotc=ParaMEDMEM::MEDCouplingFieldOverTimeClient::New(fotPtr);
+ MEDCoupling::MEDCouplingFieldOverTimeClient *fotc=MEDCoupling::MEDCouplingFieldOverTimeClient::New(fotPtr);
fotPtr->UnRegister();
CORBA::release(fotPtr);
//
- ParaMEDMEM::MEDCouplingFieldOverTime *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildMultiFields2();
+ MEDCoupling::MEDCouplingFieldOverTime *refField=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildMultiFields2();
CPPUNIT_ASSERT(fotc->isEqual(refField,1.e-12,1.e-15));
refField->decrRef();
std::vector<double> ts=fotc->getTimeSteps();
#include <cppunit/extensions/HelperMacros.h>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
}
static void *checkCorbaField2DNTMultiFetchingMTStatic(void *stack);
private:
static SALOME_TEST::MEDCouplingMeshFieldFactory_ptr _objC;
- static ParaMEDMEM::MEDCouplingUMesh *_mesh_from_distant;
+ static MEDCoupling::MEDCouplingUMesh *_mesh_from_distant;
public:
static int _argc;
static char **_argv;
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMultiFields.hxx"
#include "MEDCouplingFieldOverTime.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingCurveLinearMesh.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingUMesh.hxx"
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get1DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build1DMesh();
- ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
+ MEDCoupling::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build1DMesh();
+ MEDCoupling::MEDCouplingUMeshServant *m=new MEDCoupling::MEDCouplingUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get2DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build2DMesh();
- ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
+ MEDCoupling::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build2DMesh();
+ MEDCoupling::MEDCouplingUMeshServant *m=new MEDCoupling::MEDCouplingUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get3DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build3DMesh();
- ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
+ MEDCoupling::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build3DMesh();
+ MEDCoupling::MEDCouplingUMeshServant *m=new MEDCoupling::MEDCouplingUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get3DSurfMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
- ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
+ MEDCoupling::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build3DSurfMesh();
+ MEDCoupling::MEDCouplingUMeshServant *m=new MEDCoupling::MEDCouplingUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get0DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build0DMesh();
- ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
+ MEDCoupling::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::build0DMesh();
+ MEDCoupling::MEDCouplingUMeshServant *m=new MEDCoupling::MEDCouplingUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getM1DMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::buildM1DMesh();
- ParaMEDMEM::MEDCouplingUMeshServant *m=new ParaMEDMEM::MEDCouplingUMeshServant(m1);
+ MEDCoupling::MEDCouplingUMesh *m1=MEDCouplingCorbaServBasicsTest::buildM1DMesh();
+ MEDCoupling::MEDCouplingUMeshServant *m=new MEDCoupling::MEDCouplingUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getExtrudedMesh()
{
- ParaMEDMEM::MEDCouplingUMesh *m2D;
- ParaMEDMEM::MEDCouplingExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D);
+ MEDCoupling::MEDCouplingUMesh *m2D;
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D);
m2D->decrRef();
- ParaMEDMEM::MEDCouplingExtrudedMeshServant *m=new ParaMEDMEM::MEDCouplingExtrudedMeshServant(m1);
+ MEDCoupling::MEDCouplingExtrudedMeshServant *m=new MEDCoupling::MEDCouplingExtrudedMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingCMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getCMesh()
{
- ParaMEDMEM::MEDCouplingCMesh *m1=MEDCouplingCorbaServBasicsTest::buildCMesh();
- ParaMEDMEM::MEDCouplingCMeshServant *m=new ParaMEDMEM::MEDCouplingCMeshServant(m1);
+ MEDCoupling::MEDCouplingCMesh *m1=MEDCouplingCorbaServBasicsTest::buildCMesh();
+ MEDCoupling::MEDCouplingCMeshServant *m=new MEDCoupling::MEDCouplingCMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingCMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getIMesh()
{
- ParaMEDMEM::MEDCouplingIMesh *m1=MEDCouplingCorbaServBasicsTest::buildIMesh();
- ParaMEDMEM::MEDCouplingIMeshServant *m=new ParaMEDMEM::MEDCouplingIMeshServant(m1);
+ MEDCoupling::MEDCouplingIMesh *m1=MEDCouplingCorbaServBasicsTest::buildIMesh();
+ MEDCoupling::MEDCouplingIMeshServant *m=new MEDCoupling::MEDCouplingIMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getCLMesh()
{
- ParaMEDMEM::MEDCouplingCurveLinearMesh *m1=MEDCouplingCorbaServBasicsTest::buildCLMesh();
- ParaMEDMEM::MEDCouplingCurveLinearMeshServant *m=new ParaMEDMEM::MEDCouplingCurveLinearMeshServant(m1);
+ MEDCoupling::MEDCouplingCurveLinearMesh *m1=MEDCouplingCorbaServBasicsTest::buildCLMesh();
+ MEDCoupling::MEDCouplingCurveLinearMeshServant *m=new MEDCoupling::MEDCouplingCurveLinearMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get1SGTUMesh()
{
- ParaMEDMEM::MEDCoupling1SGTUMesh *m1=MEDCouplingCorbaServBasicsTest::build1SGTUMesh();
- ParaMEDMEM::MEDCoupling1SGTUMeshServant *m=new ParaMEDMEM::MEDCoupling1SGTUMeshServant(m1);
+ MEDCoupling::MEDCoupling1SGTUMesh *m1=MEDCouplingCorbaServBasicsTest::build1SGTUMesh();
+ MEDCoupling::MEDCoupling1SGTUMeshServant *m=new MEDCoupling::MEDCoupling1SGTUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::get1DGTUMesh()
{
- ParaMEDMEM::MEDCoupling1DGTUMesh *m1=MEDCouplingCorbaServBasicsTest::build1DGTUMesh();
- ParaMEDMEM::MEDCoupling1DGTUMeshServant *m=new ParaMEDMEM::MEDCoupling1DGTUMeshServant(m1);
+ MEDCoupling::MEDCoupling1DGTUMesh *m1=MEDCouplingCorbaServBasicsTest::build1DGTUMesh();
+ MEDCoupling::MEDCoupling1DGTUMeshServant *m=new MEDCoupling::MEDCoupling1DGTUMeshServant(m1);
m1->decrRef();
SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn2DNT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DNT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldNodeScalarOn2DNT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldNodeScalarOn2DNT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn3DNT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DNT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn3DSurfWT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfWT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn3DSurfCOTI()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn3DSurfCOTI();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldScalarOn2DLT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldScalarOn2DLT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldGaussPt2DWT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldGaussPt2DWT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldGaussPtNE2DWT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldGaussPtNE2DWT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldVectorOnExtrudedWT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldVectorOnCMeshWT()
{
- ParaMEDMEM::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT();
- ParaMEDMEM::MEDCouplingFieldDoubleServant *m=new ParaMEDMEM::MEDCouplingFieldDoubleServant(field);
+ MEDCoupling::MEDCouplingFieldDouble *field=MEDCouplingCorbaServBasicsTest::buildFieldVectorOnCMeshWT();
+ MEDCoupling::MEDCouplingFieldDoubleServant *m=new MEDCoupling::MEDCouplingFieldDoubleServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateCellOn2D()
{
- ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
+ MEDCoupling::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateCellOn2D();
+ MEDCoupling::MEDCouplingFieldTemplateServant *m=new MEDCoupling::MEDCouplingFieldTemplateServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateNodeOn2D()
{
- ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
+ MEDCoupling::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateNodeOn2D();
+ MEDCoupling::MEDCouplingFieldTemplateServant *m=new MEDCoupling::MEDCouplingFieldTemplateServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateGaussPtOn2D()
{
- ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
+ MEDCoupling::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussPtOn2D();
+ MEDCoupling::MEDCouplingFieldTemplateServant *m=new MEDCoupling::MEDCouplingFieldTemplateServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getFieldTemplateGaussNEOn2D()
{
- ParaMEDMEM::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D();
- ParaMEDMEM::MEDCouplingFieldTemplateServant *m=new ParaMEDMEM::MEDCouplingFieldTemplateServant(field);
+ MEDCoupling::MEDCouplingFieldTemplate *field=MEDCouplingCorbaServBasicsTest::buildFieldTemplateGaussNEOn2D();
+ MEDCoupling::MEDCouplingFieldTemplateServant *m=new MEDCoupling::MEDCouplingFieldTemplateServant(field);
field->decrRef();
SALOME_MED::MEDCouplingFieldTemplateCorbaInterface_ptr ret=m->_this();
return ret;
SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getMultiFields1()
{
- ParaMEDMEM::MEDCouplingMultiFields *fields=MEDCouplingCorbaServBasicsTest::buildMultiFields1();
- ParaMEDMEM::MEDCouplingMultiFieldsServant *s=new ParaMEDMEM::MEDCouplingMultiFieldsServant(fields);
+ MEDCoupling::MEDCouplingMultiFields *fields=MEDCouplingCorbaServBasicsTest::buildMultiFields1();
+ MEDCoupling::MEDCouplingMultiFieldsServant *s=new MEDCoupling::MEDCouplingMultiFieldsServant(fields);
fields->decrRef();
SALOME_MED::MEDCouplingMultiFieldsCorbaInterface_ptr ret=s->_this();
return ret;
SALOME_MED::DataArrayDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayDouble1()
{
- ParaMEDMEM::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble1();
- ParaMEDMEM::DataArrayDoubleServant *retServ=new ParaMEDMEM::DataArrayDoubleServant(retCpp);
+ MEDCoupling::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble1();
+ MEDCoupling::DataArrayDoubleServant *retServ=new MEDCoupling::DataArrayDoubleServant(retCpp);
retCpp->decrRef();
return retServ->_this();
}
SALOME_MED::DataArrayDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayDouble2()
{
- ParaMEDMEM::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble2();
- ParaMEDMEM::DataArrayDoubleServant *retServ=new ParaMEDMEM::DataArrayDoubleServant(retCpp);
+ MEDCoupling::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble2();
+ MEDCoupling::DataArrayDoubleServant *retServ=new MEDCoupling::DataArrayDoubleServant(retCpp);
retCpp->decrRef();
return retServ->_this();
}
SALOME_MED::DataArrayDoubleCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayDouble3()
{
- ParaMEDMEM::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble3();
- ParaMEDMEM::DataArrayDoubleServant *retServ=new ParaMEDMEM::DataArrayDoubleServant(retCpp);
+ MEDCoupling::DataArrayDouble *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayDouble3();
+ MEDCoupling::DataArrayDoubleServant *retServ=new MEDCoupling::DataArrayDoubleServant(retCpp);
retCpp->decrRef();
return retServ->_this();
}
SALOME_MED::DataArrayIntCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayInt1()
{
- ParaMEDMEM::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt1();
- ParaMEDMEM::DataArrayIntServant *retServ=new ParaMEDMEM::DataArrayIntServant(retCpp);
+ MEDCoupling::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt1();
+ MEDCoupling::DataArrayIntServant *retServ=new MEDCoupling::DataArrayIntServant(retCpp);
retCpp->decrRef();
return retServ->_this();
}
SALOME_MED::DataArrayIntCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayInt2()
{
- ParaMEDMEM::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt2();
- ParaMEDMEM::DataArrayIntServant *retServ=new ParaMEDMEM::DataArrayIntServant(retCpp);
+ MEDCoupling::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt2();
+ MEDCoupling::DataArrayIntServant *retServ=new MEDCoupling::DataArrayIntServant(retCpp);
retCpp->decrRef();
return retServ->_this();
}
SALOME_MED::DataArrayIntCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getArrayInt3()
{
- ParaMEDMEM::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt3();
- ParaMEDMEM::DataArrayIntServant *retServ=new ParaMEDMEM::DataArrayIntServant(retCpp);
+ MEDCoupling::DataArrayInt *retCpp=MEDCouplingCorbaServBasicsTest::buildArrayInt3();
+ MEDCoupling::DataArrayIntServant *retServ=new MEDCoupling::DataArrayIntServant(retCpp);
retCpp->decrRef();
return retServ->_this();
}
SALOME_MED::MEDCouplingFieldOverTimeCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getMultiFields2()
{
- ParaMEDMEM::MEDCouplingFieldOverTime *fot=MEDCouplingCorbaServBasicsTest::buildMultiFields2();
- ParaMEDMEM::MEDCouplingFieldOverTimeServant *retServ=new ParaMEDMEM::MEDCouplingFieldOverTimeServant(fot);
+ MEDCoupling::MEDCouplingFieldOverTime *fot=MEDCouplingCorbaServBasicsTest::buildMultiFields2();
+ MEDCoupling::MEDCouplingFieldOverTimeServant *retServ=new MEDCoupling::MEDCouplingFieldOverTimeServant(fot);
fot->decrRef();
return retServ->_this();
}
#endif
#include CORBA_SERVER_HEADER(MEDCouplingCorbaServantTest)
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingUMesh;
}
#include <iostream>
#include <fstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
CPPUNIT_TEST_SUITE_REGISTRATION( SALOME_TEST::MEDCouplingCorbaServBasicsTestClt );
#include <iostream>
#include <fstream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
int mainCorbaServ(int argc, char **argv);
#include <iostream>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
%}
%include "MEDCouplingCommon.i"
-%newobject ParaMEDMEM::MEDCouplingFieldDoubleClient::New;
-%newobject ParaMEDMEM::MEDCouplingFieldTemplateClient::New;
-%newobject ParaMEDMEM::MEDCouplingUMeshClient::New;
-%newobject ParaMEDMEM::MEDCoupling1SGTUMeshClient::New;
-%newobject ParaMEDMEM::MEDCoupling1DGTUMeshClient::New;
-%newobject ParaMEDMEM::MEDCouplingExtrudedMeshClient::New;
-%newobject ParaMEDMEM::MEDCouplingCMeshClient::New;
-%newobject ParaMEDMEM::MEDCouplingIMeshClient::New;
-%newobject ParaMEDMEM::MEDCouplingCurveLinearMeshClient::New;
-%newobject ParaMEDMEM::MEDCouplingMultiFieldsClient::New;
-%newobject ParaMEDMEM::MEDCouplingFieldOverTimeClient::New;
-%newobject ParaMEDMEM::DataArrayDoubleClient::New;
-%newobject ParaMEDMEM::DataArrayIntClient::New;
+%newobject MEDCoupling::MEDCouplingFieldDoubleClient::New;
+%newobject MEDCoupling::MEDCouplingFieldTemplateClient::New;
+%newobject MEDCoupling::MEDCouplingUMeshClient::New;
+%newobject MEDCoupling::MEDCoupling1SGTUMeshClient::New;
+%newobject MEDCoupling::MEDCoupling1DGTUMeshClient::New;
+%newobject MEDCoupling::MEDCouplingExtrudedMeshClient::New;
+%newobject MEDCoupling::MEDCouplingCMeshClient::New;
+%newobject MEDCoupling::MEDCouplingIMeshClient::New;
+%newobject MEDCoupling::MEDCouplingCurveLinearMeshClient::New;
+%newobject MEDCoupling::MEDCouplingMultiFieldsClient::New;
+%newobject MEDCoupling::MEDCouplingFieldOverTimeClient::New;
+%newobject MEDCoupling::DataArrayDoubleClient::New;
+%newobject MEDCoupling::DataArrayIntClient::New;
%nodefaultctor;
%nodefaultdtor;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingFieldDoubleClient
{
public:
%extend
{
- static MEDCouplingExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
+ static MEDCouplingMappedExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
{
PyObject* pdict=PyDict_New();
PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingExtrudedMeshInterface_ptr !");
Py_DECREF(pdict);
Py_DECREF(iorMesh);
- MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
+ MEDCouplingMappedExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
return ret;
}
}
}
%pythoncode %{
-def ParaMEDMEMDataArrayDoublenew(cls,*args):
+def MEDCouplingDataArrayDoublenew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDouble____new___(cls,args)
-def ParaMEDMEMDataArrayDoubleIadd(self,*args):
+def MEDCouplingDataArrayDoubleIadd(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDouble____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIsub(self,*args):
+def MEDCouplingDataArrayDoubleIsub(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDouble____isub___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleImul(self,*args):
+def MEDCouplingDataArrayDoubleImul(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDouble____imul___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
+def MEDCouplingDataArrayDoubleIdiv(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDouble____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIpow(self,*args):
+def MEDCouplingDataArrayDoubleIpow(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDouble____ipow___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoublenew(cls,*args):
+def MEDCouplingFieldDoublenew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingFieldDouble____new___(cls,args)
-def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
+def MEDCouplingFieldDoubleIadd(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingFieldDouble____iadd___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIsub(self,*args):
+def MEDCouplingFieldDoubleIsub(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingFieldDouble____isub___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
+def MEDCouplingFieldDoubleImul(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingFieldDouble____imul___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
+def MEDCouplingFieldDoubleIdiv(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingFieldDouble____idiv___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args):
+def MEDCouplingFieldDoubleIpow(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayIntnew(cls,*args):
+def MEDCouplingDataArrayIntnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____new___(cls,args)
-def ParaMEDMEMDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayIntIadd(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayIntIsub(self,*args):
+def MEDCouplingDataArrayIntIsub(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____isub___(self, self, *args)
-def ParaMEDMEMDataArrayIntImul(self,*args):
+def MEDCouplingDataArrayIntImul(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____imul___(self, self, *args)
-def ParaMEDMEMDataArrayIntIdiv(self,*args):
+def MEDCouplingDataArrayIntIdiv(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntImod(self,*args):
+def MEDCouplingDataArrayIntImod(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____imod___(self, self, *args)
-def ParaMEDMEMDataArrayIntIpow(self,*args):
+def MEDCouplingDataArrayIntIpow(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayInt____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIadd(self,*args):
+def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDoubleTuple____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIsub(self,*args):
+def MEDCouplingDataArrayDoubleTupleIsub(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDoubleTuple____isub___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleImul(self,*args):
+def MEDCouplingDataArrayDoubleTupleImul(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDoubleTuple____imul___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIdiv(self,*args):
+def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayDoubleTuple____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayIntTupleIadd(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayIntTuple____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIsub(self,*args):
+def MEDCouplingDataArrayIntTupleIsub(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayIntTuple____isub___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleImul(self,*args):
+def MEDCouplingDataArrayIntTupleImul(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayIntTuple____imul___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIdiv(self,*args):
+def MEDCouplingDataArrayIntTupleIdiv(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayIntTuple____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleImod(self,*args):
+def MEDCouplingDataArrayIntTupleImod(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DataArrayIntTuple____imod___(self, self, *args)
def ParaMEDMEMDenseMatrixIadd(self,*args):
def ParaMEDMEMDenseMatrixIsub(self,*args):
import _MEDCouplingClient
return _MEDCouplingClient.DenseMatrix____isub___(self, self, *args)
-def ParaMEDMEMMEDCouplingUMeshnew(cls,*args):
+def MEDCouplingUMeshnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingUMesh____new___(cls,args)
-def ParaMEDMEMMEDCoupling1DGTUMeshnew(cls,*args):
+def MEDCoupling1DGTUMeshnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCoupling1DGTUMesh____new___(cls,args)
-def ParaMEDMEMMEDCoupling1SGTUMeshnew(cls,*args):
+def MEDCoupling1SGTUMeshnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCoupling1SGTUMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingCurveLinearMeshnew(cls,*args):
+def MEDCouplingCurveLinearMeshnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingCurveLinearMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingCMeshnew(cls,*args):
+def MEDCouplingCMeshnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingCMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingIMeshnew(cls,*args):
+def MEDCouplingIMeshnew(cls,*args):
import _MEDCouplingClient
return _MEDCouplingClient.MEDCouplingIMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingExtrudedMeshnew(cls,*args):
+def MEDCouplingExtrudedMeshnew(cls,*args):
import _MEDCouplingClient
- return _MEDCouplingClient.MEDCouplingExtrudedMesh____new___(cls,args)
+ return _MEDCouplingClient.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%include "MEDCouplingFinalize.i"
#include "DataArrayIntServant.hxx"
#include "MEDCouplingCorbaTypemaps.i"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
%}
%include "MEDCouplingCommon.i"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingFieldDoubleServant
{
return buildServantAndActivate<MEDCoupling1SGTUMeshServant>(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh))
return buildServantAndActivate<MEDCoupling1DGTUMeshServant>(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh));
- if(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh))
- return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh));
+ if(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh))
+ return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh))
return buildServantAndActivate<MEDCouplingCMeshServant>(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingIMesh *>(cppPointerOfMesh))
return buildServantAndActivate2<MEDCoupling1SGTUMeshServant>(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh))
return buildServantAndActivate2<MEDCoupling1DGTUMeshServant>(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh));
- if(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh))
- return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh));
+ if(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh))
+ return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh))
return buildServantAndActivate2<MEDCouplingCMeshServant>(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingIMesh *>(cppPointerOfMesh))
public:
%extend
{
- static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+ static PyObject *_this(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
{
return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
}
- static PyObject *_this2(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+ static PyObject *_this2(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
{
return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
}
}
%pythoncode %{
-def ParaMEDMEMDataArrayDoublenew(cls,*args):
+def MEDCouplingDataArrayDoublenew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDouble____new___(cls,args)
-def ParaMEDMEMDataArrayDoubleIadd(self,*args):
+def MEDCouplingDataArrayDoubleIadd(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDouble____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIsub(self,*args):
+def MEDCouplingDataArrayDoubleIsub(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDouble____isub___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleImul(self,*args):
+def MEDCouplingDataArrayDoubleImul(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDouble____imul___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
+def MEDCouplingDataArrayDoubleIdiv(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDouble____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleIpow(self,*args):
+def MEDCouplingDataArrayDoubleIpow(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDouble____ipow___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoublenew(cls,*args):
+def MEDCouplingFieldDoublenew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingFieldDouble____new___(cls,args)
-def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
+def MEDCouplingFieldDoubleIadd(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingFieldDouble____iadd___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIsub(self,*args):
+def MEDCouplingFieldDoubleIsub(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingFieldDouble____isub___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
+def MEDCouplingFieldDoubleImul(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingFieldDouble____imul___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
+def MEDCouplingFieldDoubleIdiv(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingFieldDouble____idiv___(self, self, *args)
-def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args):
+def MEDCouplingFieldDoubleIpow(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingFieldDouble____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayIntnew(cls,*args):
+def MEDCouplingDataArrayIntnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____new___(cls,args)
-def ParaMEDMEMDataArrayIntIadd(self,*args):
+def MEDCouplingDataArrayIntIadd(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayIntIsub(self,*args):
+def MEDCouplingDataArrayIntIsub(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____isub___(self, self, *args)
-def ParaMEDMEMDataArrayIntImul(self,*args):
+def MEDCouplingDataArrayIntImul(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____imul___(self, self, *args)
-def ParaMEDMEMDataArrayIntIdiv(self,*args):
+def MEDCouplingDataArrayIntIdiv(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntImod(self,*args):
+def MEDCouplingDataArrayIntImod(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____imod___(self, self, *args)
-def ParaMEDMEMDataArrayIntIpow(self,*args):
+def MEDCouplingDataArrayIntIpow(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayInt____ipow___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIadd(self,*args):
+def MEDCouplingDataArrayDoubleTupleIadd(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDoubleTuple____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIsub(self,*args):
+def MEDCouplingDataArrayDoubleTupleIsub(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDoubleTuple____isub___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleImul(self,*args):
+def MEDCouplingDataArrayDoubleTupleImul(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDoubleTuple____imul___(self, self, *args)
-def ParaMEDMEMDataArrayDoubleTupleIdiv(self,*args):
+def MEDCouplingDataArrayDoubleTupleIdiv(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayDoubleTuple____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIadd(self,*args):
+def MEDCouplingDataArrayIntTupleIadd(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayIntTuple____iadd___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIsub(self,*args):
+def MEDCouplingDataArrayIntTupleIsub(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayIntTuple____isub___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleImul(self,*args):
+def MEDCouplingDataArrayIntTupleImul(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayIntTuple____imul___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleIdiv(self,*args):
+def MEDCouplingDataArrayIntTupleIdiv(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayIntTuple____idiv___(self, self, *args)
-def ParaMEDMEMDataArrayIntTupleImod(self,*args):
+def MEDCouplingDataArrayIntTupleImod(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DataArrayIntTuple____imod___(self, self, *args)
def ParaMEDMEMDenseMatrixIadd(self,*args):
def ParaMEDMEMDenseMatrixIsub(self,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.DenseMatrix____isub___(self, self, *args)
-def ParaMEDMEMMEDCouplingUMeshnew(cls,*args):
+def MEDCouplingUMeshnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingUMesh____new___(cls,args)
-def ParaMEDMEMMEDCoupling1DGTUMeshnew(cls,*args):
+def MEDCoupling1DGTUMeshnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCoupling1DGTUMesh____new___(cls,args)
-def ParaMEDMEMMEDCoupling1SGTUMeshnew(cls,*args):
+def MEDCoupling1SGTUMeshnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCoupling1SGTUMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingCurveLinearMeshnew(cls,*args):
+def MEDCouplingCurveLinearMeshnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingCurveLinearMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingCMeshnew(cls,*args):
+def MEDCouplingCMeshnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingCMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingIMeshnew(cls,*args):
+def MEDCouplingIMeshnew(cls,*args):
import _MEDCouplingCorba
return _MEDCouplingCorba.MEDCouplingIMesh____new___(cls,args)
-def ParaMEDMEMMEDCouplingExtrudedMeshnew(cls,*args):
+def MEDCouplingExtrudedMeshnew(cls,*args):
import _MEDCouplingCorba
- return _MEDCouplingCorba.MEDCouplingExtrudedMesh____new___(cls,args)
+ return _MEDCouplingCorba.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%include "MEDCouplingFinalize.i"
myCoords.setInfoOnComponent(0,"X [m]");
myCoords.setInfoOnComponent(1,"YY [Pm]");
myCoords.setInfoOnComponent(2,"ZZZ [m]");
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
return targetMesh;
def buildM1DMesh(self):
meshM1D=MEDCouplingUMesh.New("wonderfull -1 D mesh",-1);
meshM1D.setDescription("buildM1DMesh");
- meshM1D.checkCoherency();
+ meshM1D.checkConsistencyLight();
return meshM1D;
def buildExtrudedMesh(self):
m2D.changeSpaceDimension(3);
m1D=self.build1DMesh();
retu=m2D.buildExtrudedMesh(m1D,0);
- ret=MEDCouplingExtrudedMesh.New(retu,m2D,2);
+ ret=MEDCouplingMappedExtrudedMesh.New(retu,m2D,2);
ret.setName("ExtrudedTestForCorbaTest");
ret.setDescription("buildExtrudedMesh");
return ret;
targetMesh.setCoordsAt(1,a2);
#
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
targetMesh.setCoords(a1);
targetMesh.setNodeGridStructure([4,5]);
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
a2=DataArrayInt([6,0,3,5,3,0,1,4,1,2,7,4,8,7,2,9],4*4,1)
targetMesh.setNodalConnectivity(a2)
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
a3=DataArrayInt([0,4,8,12,15],5,1)
targetMesh.setNodalConnectivity(a2,a3)
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
tmp=mesh.getNumberOfCells()*6*[7.]
array.setValues(tmp,mesh.getNumberOfCells(),6);
fieldOnCells.setArray(array)
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldNodeScalarOn2DNT(self):
tmp=mesh.getNumberOfNodes()*5*[7.1234]
array.setValues(tmp,mesh.getNumberOfNodes(),5);
fieldOnNodes.setArray(array);
- fieldOnNodes.checkCoherency();
+ fieldOnNodes.checkConsistencyLight();
return fieldOnNodes;
def buildFieldScalarOn3DNT(self):
mesh=self.build3DMesh();
fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
- fieldOnCells.setNature(ConservativeVolumic);
+ fieldOnCells.setNature(IntensiveMaximum);
fieldOnCells.setName("toto");
fieldOnCells.setDescription("my wonderful 3D field toto2");
fieldOnCells.setMesh(mesh);
tmp=mesh.getNumberOfCells()*6*[7.]
array.setValues(tmp,mesh.getNumberOfCells(),6);
fieldOnCells.setArray(array);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldScalarOn3DSurfWT(self):
array.setInfoOnComponents(["aaa","bbbb","ccccc"])
fieldOnCells.setArray(array);
fieldOnCells.setTime(6.7,1,4);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldScalarOn3DSurfCOTI(self):
fieldOnCells.setArray(array);
fieldOnCells.setStartTime(6.7,1,4);
fieldOnCells.setEndTime(7.2,2,8);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldScalarOn2DLT(self):
fieldOnCells.setEndArray(array)
fieldOnCells.setStartTime(6.7,25,26);
fieldOnCells.setEndTime(17.2,125,126);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldGaussPt2DWT(self):
f.setName("MyFirstFieldOnGaussPoint");
f.setTimeUnit("ms");
f.setDescription("mmmmmmmmmmmm");
- f.checkCoherency();
+ f.checkConsistencyLight();
return f;
def buildFieldGaussPtNE2DWT(self):
array.setInfoOnComponent(1,"Density [kg/m^3]");
f.setArray(array);
#
- f.checkCoherency();
+ f.checkConsistencyLight();
return f;
def buildFieldVectorOnExtrudedWT(self):
array.setInfoOnComponent(1,"Density [kg/m^3]");
f.setArray(array);
#
- f.checkCoherency();
+ f.checkConsistencyLight();
return f
def buildFieldVectorOnCMeshWT(self):
array.setInfoOnComponent(1,"Density [kg/m^3]");
f.setArray(array);
#
- f.checkCoherency();
+ f.checkConsistencyLight();
return f
def buildFieldTemplateCellOn2D(self):
def buildFieldTemplateNodeOn2D(self):
f1=self.buildFieldNodeScalarOn2DNT();
f2=MEDCouplingFieldTemplate.New(f1);
- f2.setNature(ConservativeVolumic);
+ f2.setNature(IntensiveMaximum);
return f2
def buildFieldTemplateGaussPtOn2D(self):
f1=self.buildFieldGaussPt2DWT();
f2=MEDCouplingFieldTemplate.New(f1);
- f2.setNature(Integral);
+ f2.setNature(ExtensiveMaximum);
return f2
def buildFieldTemplateGaussNEOn2D(self):
f1=self.buildFieldGaussPtNE2DWT();
f2=MEDCouplingFieldTemplate.New(f1);
- f2.setNature(IntegralGlobConstraint);
+ f2.setNature(ExtensiveConservation);
return f2
def buildMultiFields1(self):
f4.setName("f4");
f4.setTime(2.7,25,26);
ret=MEDCouplingFieldOverTime.New([f0,f1,f2,f3,f4]);
- ret.checkCoherency();
+ ret.checkConsistencyLight();
return ret;
def buildFileNameForIOR(self):
myCoords=DataArrayDouble.New()
myCoords.setValues(coords,nbOfNodes,3);
mesh.setCoords(myCoords);
- mesh.checkCoherency();
+ mesh.checkConsistencyLight();
myFalseConn=DataArrayInt.New()
myFalseConn.setValues(tab4,6,4)
return mesh
nbOfCells=mesh.getNumberOfCells()
field=MEDCouplingFieldDouble.New(ON_CELLS)
field.setMesh(mesh)
- field.setNature(Integral)
+ field.setNature(ExtensiveMaximum)
myCoords=DataArrayDouble.New()
sampleTab=[]
for i in range(nbOfCells*9):
ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
-INCLUDE(${QT_USE_FILE})
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
SET(MEDGUI_SOURCES
MEDGUIFileContentDial.cxx
SET(MEDGUI_FORMS MEDGUIFileContentDial.ui MEDGUISelectComponents.ui)
#SET(MEDGUI_RESOURCES images.qrc)
-QT4_WRAP_CPP(MEDGUI_HEADERS_MOC ${MEDGUI_HEADERS})
-QT4_WRAP_UI(MEDGUI_FORMS_HEADERS ${MEDGUI_FORMS})
-#QT4_ADD_RESOURCES(MEDGUI_RESOURCES_RCC ${MEDGUI_RESOURCES})
+QT_WRAP_MOC(MEDGUI_HEADERS_MOC ${MEDGUI_HEADERS})
+QT_WRAP_UIC(MEDGUI_FORMS_HEADERS ${MEDGUI_FORMS})
+#QT_ADD_RESOURCES(MEDGUI_RESOURCES_RCC ${MEDGUI_RESOURCES})
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
ADD_LIBRARY(MEDGUI SHARED ${MEDGUI_SOURCES} ${MEDGUI_HEADERS_MOC} ${MEDGUI_FORMS_HEADERS})
TARGET_LINK_LIBRARIES(MEDGUI medcalculator ${QT_MT_LIBS} ${CAS_KERNEL} ${BOOST_LIBRARIES} ${GUI_LDFLAGS} ${SalomeApp} ${CAM} ${LightApp} ${qtx} ${suit} ${SalomeObject} ${PLATFORM_LIBS} ${SalomeLifeCycleCORBA})
INSTALL(TARGETS MEDGUI DESTINATION ${SALOME_INSTALL_LIBS})
-QT4_INSTALL_TS_RESOURCES("${MEDGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${MEDGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
#include <QCheckBox>
#include <QLineEdit>
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
// Constructor
// Initialize qt part and private var part
#include "ParaMEDCouplingFieldDoubleServant.hxx"
#include "utilities.h"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
ParaMEDCouplingFieldDoubleServant::ParaMEDCouplingFieldDoubleServant(CORBA::ORB_ptr orb,MEDCouplingFieldDouble* field):MEDCouplingFieldDoubleServant(field)
{
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldDoubleServant.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaMEDCouplingFieldDoubleServant : public virtual POA_SALOME_MED::ParaMEDCouplingFieldDoubleCorbaInterface,
public MEDCouplingFieldDoubleServant,
#include "ParaMEDCouplingUMeshServant.hxx"
#include "utilities.h"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
ParaMEDCouplingUMeshServant::ParaMEDCouplingUMeshServant(CORBA::ORB_ptr orb,MEDCouplingUMesh* mesh):MEDCouplingUMeshServant(mesh),MPIObject_i()
{
#include "MPIObject_i.hxx"
#include "MEDCouplingUMeshServant.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaMEDCouplingUMeshServant : public virtual POA_SALOME_MED::ParaMEDCouplingUMeshCorbaInterface,
public MEDCouplingUMeshServant,
#include "MPIMEDCouplingFieldDoubleServant.hxx"
#include "utilities.h"
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
typedef struct
{
void * th_getdatabympi(void *st);
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MPIMEDCouplingFieldDoubleServant : public virtual POA_SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface,
public ParaMEDCouplingFieldDoubleServant
#include "utilities.h"
#include "Utils_SALOME_Exception.hxx"
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
typedef struct
{
SALOME_MED::ParaMEDMEMComponent_ptr compo;
} thread_st;
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class ParaMEDMEMComponent_i : public virtual POA_SALOME_MED::ParaMEDMEMComponent, public Engines_Component_i, public MPIObject_i
{