-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// 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
fvm_nodal_t* medmemMeshToFVMMesh(const MEDMEM::MESH* mesh)
{
// create an FVM structure from the paramesh structure
- fvm_nodal_t * fvm_nodal = fvm_nodal_create(mesh->getName().c_str(),mesh->getMeshDimension());
+ std::string meshName(mesh->getName());//this line avoid that mesh->getName() object killed before fvm_nodal_create read the const char *.
+ fvm_nodal_t * fvm_nodal = fvm_nodal_create(meshName.c_str(),mesh->getMeshDimension());
//loop on cell types
int nbtypes = mesh->getNumberOfTypes(MED_EN::MED_CELL);
{
// create an FVM structure from the paramesh structure
- fvm_nodal_t * fvm_nodal = fvm_nodal_create(support->getName().c_str(),1);
+ std::string supportName(support->getName());//this line avoid that support->getName() object killed before fvm_nodal_create read the const char *.
+ fvm_nodal_t * fvm_nodal = fvm_nodal_create(supportName.c_str(),1);
const MEDMEM::MESH* mesh= support->getMesh();