From: eap Date: Tue, 11 Nov 2008 15:38:11 +0000 (+0000) Subject: just fix indentation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f634ae86f55463585f13935c61c64e6c6c9ee587;p=tools%2Fmedcoupling.git just fix indentation --- diff --git a/src/ParaMEDMEM/DEC.cxx b/src/ParaMEDMEM/DEC.cxx index 734e3594a..4e09289bc 100644 --- a/src/ParaMEDMEM/DEC.cxx +++ b/src/ParaMEDMEM/DEC.cxx @@ -53,17 +53,17 @@ namespace ParaMEDMEM // TimeInterpolationMethod DECOptions::_timeInterpolationMethod=WithoutTimeInterp; // bool DECOptions::_asynchronous = false; // bool DECOptions::_forcedRenormalization = false; - + // AllToAllMethod DECOptions::_allToAllMethod = Native; - /*! \addtogroup dec - @{ - */ + /*! \addtogroup dec + @{ + */ DEC::DEC(ProcessorGroup& source_group, ProcessorGroup& target_group):_local_field(0), - _source_group(&source_group), - _target_group(&target_group), - _owns_field(false), - _icoco_field(0) + _source_group(&source_group), + _target_group(&target_group), + _owns_field(false), + _icoco_field(0) { _union_group = source_group.fuse(target_group); } @@ -71,84 +71,84 @@ namespace ParaMEDMEM DEC::~DEC() { // delete _union_group; - if (_owns_field) - delete _local_field; - delete _icoco_field; + if (_owns_field) + delete _local_field; + delete _icoco_field; delete _union_group; } - /*! Attaches a local field to a DEC. -If the processor is on the receiving end of the DEC, the field -will be updated by a recvData() call. -Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side. - */ - void DEC::attachLocalField(const ParaFIELD* field) - { - _local_field=field; - _comm_interface=&(field->getTopology()->getProcGroup()->getCommInterface()); - } - - /*! Attaches a local field to a DEC. The method will test whether the processor -is on the source or the target side and will associate the mesh underlying the -field to the local side. - -If the processor is on the receiving end of the DEC, the field -will be updated by a recvData() call. -Reversely, if the processor is on the sending end, the field will be read, possibly transformed, - and sent appropriately to the other side. - */ - - void DEC::attachLocalField(MEDMEM::FIELD* field) - { - ProcessorGroup* local_group; - if (_source_group->containsMyRank()) - local_group=_source_group; - else if (_target_group->containsMyRank()) - local_group=_target_group; - else - throw MEDMEM::MEDEXCEPTION("Invalid procgroup for field attachment to DEC"); - - _local_field= new ParaFIELD(field, *local_group); - _owns_field=true; - _comm_interface=&(local_group->getCommInterface()); - } - - /*! - Attaches a local field to a DEC. - If the processor is on the receiving end of the DEC, the field - will be updated by a recvData() call. - Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side. - The field type is a generic ICoCo Field, so that the DEC can couple a number of different fields : - - a ICoCo::MEDField, that is created from a MEDMEM structure - - a ICOCo::TrioField, that is created from tables extracted from a TRIO-U structure. - - */ - - void DEC::attachLocalField(const ICoCo::Field* field) - { - const ICoCo::MEDField* medfield =dynamic_cast (field); - if(medfield !=0) - { - attachLocalField(medfield->getField()); - return; - } - const ICoCo::TrioField* triofield=dynamic_cast (field); - if (triofield !=0) - { - ProcessorGroup* localgroup; - if (_source_group->containsMyRank()) localgroup=_source_group; - else localgroup=_target_group; - _icoco_field=new ICoCo::MEDField(*const_cast(triofield), *localgroup); - // _owns_field = true; - attachLocalField(_icoco_field); - return; - } - throw MEDMEM::MEDEXCEPTION("incompatible field type"); - } - - /*! - Computes the field norm over its support - on the source side and renormalizes the field on the target side - so that the norms match. + /*! Attaches a local field to a DEC. + If the processor is on the receiving end of the DEC, the field + will be updated by a recvData() call. + Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side. + */ + void DEC::attachLocalField(const ParaFIELD* field) + { + _local_field=field; + _comm_interface=&(field->getTopology()->getProcGroup()->getCommInterface()); + } + + /*! Attaches a local field to a DEC. The method will test whether the processor + is on the source or the target side and will associate the mesh underlying the + field to the local side. + + If the processor is on the receiving end of the DEC, the field + will be updated by a recvData() call. + Reversely, if the processor is on the sending end, the field will be read, possibly transformed, + and sent appropriately to the other side. + */ + + void DEC::attachLocalField(MEDMEM::FIELD* field) + { + ProcessorGroup* local_group; + if (_source_group->containsMyRank()) + local_group=_source_group; + else if (_target_group->containsMyRank()) + local_group=_target_group; + else + throw MEDMEM::MEDEXCEPTION("Invalid procgroup for field attachment to DEC"); + + _local_field= new ParaFIELD(field, *local_group); + _owns_field=true; + _comm_interface=&(local_group->getCommInterface()); + } + + /*! + Attaches a local field to a DEC. + If the processor is on the receiving end of the DEC, the field + will be updated by a recvData() call. + Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side. + The field type is a generic ICoCo Field, so that the DEC can couple a number of different fields : + - a ICoCo::MEDField, that is created from a MEDMEM structure + - a ICOCo::TrioField, that is created from tables extracted from a TRIO-U structure. + + */ + + void DEC::attachLocalField(const ICoCo::Field* field) + { + const ICoCo::MEDField* medfield =dynamic_cast (field); + if(medfield !=0) + { + attachLocalField(medfield->getField()); + return; + } + const ICoCo::TrioField* triofield=dynamic_cast (field); + if (triofield !=0) + { + ProcessorGroup* localgroup; + if (_source_group->containsMyRank()) localgroup=_source_group; + else localgroup=_target_group; + _icoco_field=new ICoCo::MEDField(*const_cast(triofield), *localgroup); + // _owns_field = true; + attachLocalField(_icoco_field); + return; + } + throw MEDMEM::MEDEXCEPTION("incompatible field type"); + } + + /*! + Computes the field norm over its support + on the source side and renormalizes the field on the target side + so that the norms match. \f[ I_{source}=\sum_{i=1}^{n_{source}}V_{i}.|\Phi^{source}_{i}|^2, @@ -157,34 +157,34 @@ Reversely, if the processor is on the sending end, the field will be read, possi \f[ I_{target}=\sum_{i=1}^{n_{target}}V_{i}.|\Phi^{target}_{i}|^2, \f] - + \f[ \Phi^{target}:=\Phi^{target}.\sqrt{I_{source}/I_{target}}. \f] - */ - void DEC::renormalizeTargetField() - { - if (_source_group->containsMyRank()) - for (int icomp=0; icomp<_local_field->getField()->getNumberOfComponents(); icomp++) - { - double total_norm = _local_field->getVolumeIntegral(icomp+1); - double source_norm = total_norm; - _comm_interface->broadcast(&source_norm, 1, MPI_DOUBLE, 0,* dynamic_cast(_union_group)->getComm()); - - } - if (_target_group->containsMyRank()) - { - for (int icomp=0; icomp<_local_field->getField()->getNumberOfComponents(); icomp++) - { - double total_norm = _local_field->getVolumeIntegral(icomp+1); - double source_norm=total_norm; - _comm_interface->broadcast(&source_norm, 1, MPI_DOUBLE, 0,* dynamic_cast(_union_group)->getComm()); - - if (abs(total_norm)>1e-100) - _local_field->getField()->applyLin(source_norm/total_norm,0.0,icomp+1); - } - } - } - /*! @} */ + */ + void DEC::renormalizeTargetField() + { + if (_source_group->containsMyRank()) + for (int icomp=0; icomp<_local_field->getField()->getNumberOfComponents(); icomp++) + { + double total_norm = _local_field->getVolumeIntegral(icomp+1); + double source_norm = total_norm; + _comm_interface->broadcast(&source_norm, 1, MPI_DOUBLE, 0,* dynamic_cast(_union_group)->getComm()); + + } + if (_target_group->containsMyRank()) + { + for (int icomp=0; icomp<_local_field->getField()->getNumberOfComponents(); icomp++) + { + double total_norm = _local_field->getVolumeIntegral(icomp+1); + double source_norm=total_norm; + _comm_interface->broadcast(&source_norm, 1, MPI_DOUBLE, 0,* dynamic_cast(_union_group)->getComm()); + + if (abs(total_norm)>1e-100) + _local_field->getField()->applyLin(source_norm/total_norm,0.0,icomp+1); + } + } + } + /*! @} */ } diff --git a/src/ParaMEDMEM/InterpolationMatrix.cxx b/src/ParaMEDMEM/InterpolationMatrix.cxx index 8152888ea..cdc3691f9 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.cxx +++ b/src/ParaMEDMEM/InterpolationMatrix.cxx @@ -299,27 +299,27 @@ namespace ParaMEDMEM } } - /*! - \brief returns the volumes of the cells underlying the field \a field - - For 2D geometries, the returned field contains the areas. - For 3D geometries, the returned field contains the volumes. - - \param field field on which cells the volumes are required - \return field containing the volumes - */ - MEDMEM::FIELD* InterpolationMatrix::getSupportVolumes(const MEDMEM::SUPPORT& support) - { - const MEDMEM::MESH* mesh=support.getMesh(); - int dim = mesh->getMeshDimension(); - switch (dim) - { - case 2: - return mesh->getArea(&support); - case 3: - return mesh->getVolume(&support); - default: - throw MEDMEM::MEDEXCEPTION("interpolation is not available for this dimension"); - } - } + /*! + \brief returns the volumes of the cells underlying the field \a field + + For 2D geometries, the returned field contains the areas. + For 3D geometries, the returned field contains the volumes. + + \param field field on which cells the volumes are required + \return field containing the volumes + */ + MEDMEM::FIELD* InterpolationMatrix::getSupportVolumes(const MEDMEM::SUPPORT& support) + { + const MEDMEM::MESH* mesh=support.getMesh(); + int dim = mesh->getMeshDimension(); + switch (dim) + { + case 2: + return mesh->getArea(&support); + case 3: + return mesh->getVolume(&support); + default: + throw MEDMEM::MEDEXCEPTION("interpolation is not available for this dimension"); + } + } } diff --git a/src/ParaMEDMEM/InterpolationMatrix.hxx b/src/ParaMEDMEM/InterpolationMatrix.hxx index ad2610ed6..09cd332f5 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.hxx +++ b/src/ParaMEDMEM/InterpolationMatrix.hxx @@ -14,25 +14,25 @@ namespace ParaMEDMEM public: InterpolationMatrix(const ParaMEDMEM::ParaMESH& source_support, - const ProcessorGroup& local_group, - const ProcessorGroup& distant_group, - const DECOptions& dec_opt, - const InterpolationOptions& i_opt); + const ProcessorGroup& local_group, + const ProcessorGroup& distant_group, + const DECOptions& dec_opt, + const InterpolationOptions& i_opt); virtual ~InterpolationMatrix(); void addContribution(MEDMEM::MESH& distant_support, int iproc_distant, int* distant_elems); void multiply(MEDMEM::FIELD&) const; - void transposeMultiply(MEDMEM::FIELD&)const; + void transposeMultiply(MEDMEM::FIELD&)const; void prepare(); int getNbRows() const {return _row_offsets.size();} - MPI_AccessDEC* getAccessDEC(){return _mapping.getAccessDEC();} + MPI_AccessDEC* getAccessDEC(){return _mapping.getAccessDEC();} private: - MEDMEM::FIELD* getSupportVolumes(const MEDMEM::SUPPORT& field); + MEDMEM::FIELD* getSupportVolumes(const MEDMEM::SUPPORT& field); - private: + private: vector _row_offsets; vector > _col_offsets; const MEDMEM::MESH& _source_support; @@ -41,7 +41,7 @@ namespace ParaMEDMEM const ProcessorGroup& _source_group; const ProcessorGroup& _target_group; vector _target_volume; - vector _source_volume; + vector _source_volume; vector > > _coeffs; }; diff --git a/src/ParaMEDMEM/IntersectionDEC.cxx b/src/ParaMEDMEM/IntersectionDEC.cxx index ad821ea68..45d2f53d3 100644 --- a/src/ParaMEDMEM/IntersectionDEC.cxx +++ b/src/ParaMEDMEM/IntersectionDEC.cxx @@ -228,24 +228,23 @@ It must match a recvData() call on the other side. */ void IntersectionDEC::sendData() { - if (_source_group->containsMyRank()) - { - - _interpolation_matrix->multiply(*_local_field->getField()); - if (getForcedRenormalization()) - renormalizeTargetField(); - - } - else if (_target_group->containsMyRank()) - _interpolation_matrix->transposeMultiply(*_local_field->getField()); + if (_source_group->containsMyRank()) + { + + _interpolation_matrix->multiply(*_local_field->getField()); + if (getForcedRenormalization()) + renormalizeTargetField(); + + } + else if (_target_group->containsMyRank()) + _interpolation_matrix->transposeMultiply(*_local_field->getField()); } - /*! - Sends the data available at time \a time in asynchronous mode. +/*! + Sends the data available at time \a time in asynchronous mode. \param time time at which the value is available \param deltatime time interval between the value presently sent and the next one. - */ - +*/ void IntersectionDEC::sendData( double time , double deltatime ) { diff --git a/src/ParaMEDMEM/ParaMESH.cxx b/src/ParaMEDMEM/ParaMESH.cxx index 15f99ac30..68e72fb2e 100644 --- a/src/ParaMEDMEM/ParaMESH.cxx +++ b/src/ParaMEDMEM/ParaMESH.cxx @@ -18,203 +18,203 @@ namespace ParaMEDMEM ParaMESH::ParaMESH(MEDMEM::driverTypes driver_type, const string& filename, const ProcessorGroup& group) -throw (MEDMEM::MEDEXCEPTION) :_has_mesh_ownership(true) { - +throw (MEDMEM::MEDEXCEPTION) :_has_mesh_ownership(true) +{ const char* LOC = "MEDSPLITTER::MESHCollectionDriver::read()"; BEGIN_OF(LOC); - - + + string meshstring; char file[256]; char meshname[MED_TAILLE_NOM]; int domain_id=group.myRank(); - + // reading ascii master file try{ - MESSAGE("Start reading"); + MESSAGE("Start reading"); ifstream asciiinput(filename.c_str()); char charbuffer[512]; asciiinput.getline(charbuffer,512); - + while (charbuffer[0]=='#') - { - asciiinput.getline(charbuffer,512); - } + { + asciiinput.getline(charbuffer,512); + } //reading number of domains int nbdomain=atoi(charbuffer); cout << "nb domain"<>nbdomain; - + string mesh; - int idomain; - string host; - string medfilename; - + int idomain; + string host; + string medfilename; + for (int i=0; i<=domain_id;i++) + { + //reading information about the domain + + + asciiinput >> mesh >> idomain >> meshstring >> host >> medfilename; + + if (idomain!=i+1) { - //reading information about the domain - - - asciiinput >> mesh >> idomain >> meshstring >> host >> medfilename; - - if (idomain!=i+1) - { - cerr<<"Error : domain must be written from 1 to N in asciifile descriptor"<setName(string(name)); - cz->setDescription(joint_description); - cz->setLocalDomainNumber(domain_id); - cz->setDistantDomainNumber(distant); - //cz->setLocalMesh((m_collection->getMesh())[i]); - //cz->setDistantMesh((m_collection->getMesh())[distant]); - cz->setNodeCorresp(node_corresp,ncouples); - _connect_zone.push_back(cz); - - }//loop on correspondances - }//loop on joints - - // - // Reading global numbering - // - int ncell=_mesh->getNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS); - int * array=new int[ncell]; - int offset=0; - MESSAGE("Reading cell global numbering for mesh "<< domain_id); - MED_EN::MESH_ENTITIES::const_iterator currentEntity; - list::const_iterator iter; - currentEntity = MED_EN::meshEntities.find(MED_EN::MED_CELL); - char meshchar[MED_TAILLE_NOM]; - strcpy(meshchar,_mesh->getName().c_str()); - for (iter = (*currentEntity).second.begin();iter != (*currentEntity).second.end(); iter++) - { - MED_EN::medGeometryElement type=*iter; - if (type/100 != _mesh->getMeshDimension()) continue; - int ntype = _mesh->getNumberOfElements(MED_EN::MED_CELL,type); - if (ntype==0) continue; - med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype, - med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); - offset+=ntype; - } - _cellglobal=array; - - MESSAGE("Reading node global numbering"); - int nnode= _mesh->getNumberOfNodes(); - array=new int[nnode]; - med_2_3::MEDglobalNumLire(fid,meshname, array, nnode, - med_2_3::MED_NOEUD, med_2_3::MED_POINT1); - _nodeglobal=array; - - MESSAGE("Reading face global numbering for mesh "<getNumberOfElements(MED_EN::MED_FACE,MED_EN::MED_ALL_ELEMENTS); - array=new int[nbface]; - currentEntity = MED_EN::meshEntities.find(MED_EN::MED_FACE); - offset=0; - for (iter = (*currentEntity).second.begin();iter != (*currentEntity).second.end(); iter++) - { - MED_EN::medGeometryElement type=*iter; - if (type/100 != _mesh->getMeshDimension()-1) continue; - int ntype = _mesh->getNumberOfElements(MED_EN::MED_FACE,type); - if (ntype==0) continue; - med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype, - med_2_3::MED_FACE, (med_2_3::med_geometrie_element)type); - offset+=ntype; - } - _faceglobal=array; -// faceglobal[i]=0; + /////////////////////////////////////////// + // treatment of the domain that corresponds + // to the local id + /////////////////////////////////////////// + _mesh=new MEDMEM::MESH(driver_type,file, meshname); + + //reading MEDSPLITTER::CONNECTZONEs NODE/NODE and CELL/CELL + med_2_3::med_idt fid = med_2_3::MEDouvrir(file,med_2_3::MED_LECTURE); + med_2_3::med_int njoint = med_2_3::MEDnJoint(fid, meshname); + for (int ijoint=1; ijoint<=njoint; ijoint++) + { + int distant; + char joint_description[MED_TAILLE_DESC]; + char name[MED_TAILLE_NOM]; + char name_distant[MED_TAILLE_NOM]; + // cout << "arguments"<< fid<<" "<setName(string(name)); + cz->setDescription(joint_description); + cz->setLocalDomainNumber(domain_id); + cz->setDistantDomainNumber(distant); + //cz->setLocalMesh((m_collection->getMesh())[i]); + //cz->setDistantMesh((m_collection->getMesh())[distant]); + cz->setNodeCorresp(node_corresp,ncouples); + _connect_zone.push_back(cz); + + }//loop on correspondances + }//loop on joints + + // + // Reading global numbering + // + int ncell=_mesh->getNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS); + int * array=new int[ncell]; + int offset=0; + MESSAGE("Reading cell global numbering for mesh "<< domain_id); + MED_EN::MESH_ENTITIES::const_iterator currentEntity; + list::const_iterator iter; + currentEntity = MED_EN::meshEntities.find(MED_EN::MED_CELL); + char meshchar[MED_TAILLE_NOM]; + strcpy(meshchar,_mesh->getName().c_str()); + for (iter = (*currentEntity).second.begin();iter != (*currentEntity).second.end(); iter++) + { + MED_EN::medGeometryElement type=*iter; + if (type/100 != _mesh->getMeshDimension()) continue; + int ntype = _mesh->getNumberOfElements(MED_EN::MED_CELL,type); + if (ntype==0) continue; + med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype, + med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); + offset+=ntype; + } + _cellglobal=array; + + MESSAGE("Reading node global numbering"); + int nnode= _mesh->getNumberOfNodes(); + array=new int[nnode]; + med_2_3::MEDglobalNumLire(fid,meshname, array, nnode, + med_2_3::MED_NOEUD, med_2_3::MED_POINT1); + _nodeglobal=array; + + MESSAGE("Reading face global numbering for mesh "<getNumberOfElements(MED_EN::MED_FACE,MED_EN::MED_ALL_ELEMENTS); + array=new int[nbface]; + currentEntity = MED_EN::meshEntities.find(MED_EN::MED_FACE); + offset=0; + for (iter = (*currentEntity).second.begin();iter != (*currentEntity).second.end(); iter++) + { + MED_EN::medGeometryElement type=*iter; + if (type/100 != _mesh->getMeshDimension()-1) continue; + int ntype = _mesh->getNumberOfElements(MED_EN::MED_FACE,type); + if (ntype==0) continue; + med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype, + med_2_3::MED_FACE, (med_2_3::med_geometrie_element)type); + offset+=ntype; + } + _faceglobal=array; + // faceglobal[i]=0; med_2_3::MEDfermer(fid); - + _block_topology=new BlockTopology(group,ncell); - - MESSAGE("end of read"); - + + MESSAGE("end of read"); + }//of try catch(...) - { - cerr << "I/O error reading parallel MED file"<setTopology( - // new ParallelTopology((m_collection->getMesh()),(m_collection->getCZ()),cellglobal,nodeglobal,faceglobal) - // ); - - END_OF("MEDSPLITTER::MESHCollectionDriver::read()") -}; + // new ParallelTopology((m_collection->getMesh()),(m_collection->getCZ()),cellglobal,nodeglobal,faceglobal) + // ); + + END_OF(LOC); +} /*! Constructor for creating a ParaMESH from a local mesh and * a processor group. Constructor must be called by all the processors * in the group. */ ParaMESH::ParaMESH(MEDMEM::MESH& subdomain_mesh, const ProcessorGroup& proc_group, const string& name): -_mesh(&subdomain_mesh), -_my_domain_id(proc_group.myRank()), -_block_topology (new BlockTopology(proc_group, subdomain_mesh.getNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS))), -_has_mesh_ownership(false) + _mesh(&subdomain_mesh), + _my_domain_id(proc_group.myRank()), + _block_topology (new BlockTopology(proc_group, subdomain_mesh.getNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS))), + _has_mesh_ownership(false) { - ostringstream stream; - stream<localToGlobal(make_pair(_my_domain_id,0)); for (int i=0; igetProcGroup()->containsMyRank()) return; - - int myrank=_block_topology->getProcGroup()->myRank(); - cout << "Myrank in write " << myrank<getProcGroup()->size(); - vector filename(nbdomains); - - //loop on the domains - for (int i=0; iaddDriver(MEDMEM::MED_DRIVER,filename[myrank],_name); - - MESSAGE("Start writing"); - _mesh->write(id); - _mesh->rmDriver(id); - END_OF("ParaMEDMEM::ParaMESH::write()"); + + if (!_block_topology->getProcGroup()->containsMyRank()) return; + + int myrank=_block_topology->getProcGroup()->myRank(); + cout << "Myrank in write " << myrank<getProcGroup()->size(); + vector filename(nbdomains); + + //loop on the domains + for (int i=0; iaddDriver(MEDMEM::MED_DRIVER,filename[myrank],_name); + + MESSAGE("Start writing"); + _mesh->write(id); + _mesh->rmDriver(id); + END_OF(LOC); }; const int* ParaMESH::getGlobalNumbering(const MED_EN::medEntityMesh entity)const { - switch (entity) - { - case MED_CELL: - return _cellglobal; - case MED_FACE : - return _faceglobal; - case MED_EDGE : - return _edgeglobal; - case MED_NODE: - return _nodeglobal; - default : - return 0; - } + switch (entity) + { + case MED_CELL: + return _cellglobal; + case MED_FACE : + return _faceglobal; + case MED_EDGE : + return _edgeglobal; + case MED_NODE: + return _nodeglobal; + default : + return 0; + } } } diff --git a/src/ParaMEDMEM/ParaMESH.hxx b/src/ParaMEDMEM/ParaMESH.hxx index 1fd303b7b..40b68710f 100644 --- a/src/ParaMEDMEM/ParaMESH.hxx +++ b/src/ParaMEDMEM/ParaMESH.hxx @@ -18,8 +18,8 @@ class ParaMESH { public: ParaMESH(MEDMEM::driverTypes driver_type, const std::string& file_name, - const ProcessorGroup& group) - throw (MEDMEM::MEDEXCEPTION); + const ProcessorGroup& group) + throw (MEDMEM::MEDEXCEPTION); ParaMESH(MEDMEM::MESH& subdomain_mesh, const ProcessorGroup& proc_group, const string& name); void write(MEDMEM::driverTypes driverType, const std::string& fileName="") throw (MEDMEM::MEDEXCEPTION); diff --git a/src/ParaMEDMEM/ParaSUPPORT.cxx b/src/ParaMEDMEM/ParaSUPPORT.cxx index f2e94f0fa..f1687443c 100644 --- a/src/ParaMEDMEM/ParaSUPPORT.cxx +++ b/src/ParaMEDMEM/ParaSUPPORT.cxx @@ -8,35 +8,35 @@ namespace ParaMEDMEM ParaSUPPORT::ParaSUPPORT() { } - + ParaSUPPORT::ParaSUPPORT(const MEDMEM::SUPPORT& support, const ProcessorGroup& proc_group): - _support(&support), - _has_support_ownership(false), - _has_mesh_ownership(true) - { + _support(&support), + _has_support_ownership(false), + _has_mesh_ownership(true) + { _mesh = new ParaMESH(*(support.getMesh()), proc_group, "mesh from support"); } ParaSUPPORT::~ParaSUPPORT() { - if (_has_support_ownership) - { - delete _support; - _support=0; - } + if (_has_support_ownership) + { + delete _support; + _support=0; + } if (_has_mesh_ownership) - { - delete _mesh; - _mesh=0; - } + { + delete _mesh; + _mesh=0; + } } - const int* ParaSUPPORT::getGlobalNumbering() const - { - if (! _support->isOnAllElements()) - throw MEDMEM::MEDEXCEPTION("GlobalNumbering can only be retrieved on supports on all elements"); - return _mesh->getGlobalNumbering(_support->getEntity()); - } + const int* ParaSUPPORT::getGlobalNumbering() const + { + if (! _support->isOnAllElements()) + throw MEDMEM::MEDEXCEPTION("GlobalNumbering can only be retrieved on supports on all elements"); + return _mesh->getGlobalNumbering(_support->getEntity()); + } }