X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD%2FHOMARD_DriverTools.cxx;h=b95893e8d2cbaa246223950c78f2e01e8d39108d;hb=refs%2Ftags%2FV9_13_0b1;hp=6f1c9a3b8bb7d5a95b7c8b671cc360f7f68535e7;hpb=f6f5fc5a139003866577563125e8acbc6ec3f42c;p=modules%2Fhomard.git diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx index 6f1c9a3b..b95893e8 100644 --- a/src/HOMARD/HOMARD_DriverTools.cxx +++ b/src/HOMARD/HOMARD_DriverTools.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// Copyright (C) 2011-2024 CEA, EDF // // 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 @@ -112,6 +112,7 @@ namespace HOMARD os << cas.GetName(); os << separator() << cas.GetDirName(); os << separator() << cas.GetConfType(); + os << separator() << cas.GetExtType(); std::vector coor = cas.GetBoundingBox(); os << separator() << coor.size(); @@ -230,7 +231,7 @@ namespace HOMARD for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; - ListString = hypothesis.GetListFieldInterp(); + ListString = hypothesis.GetFieldInterps(); os << separator() << ListString.size(); for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; @@ -238,7 +239,7 @@ namespace HOMARD os << separator() << hypothesis.GetNivMax(); os << separator() << hypothesis.GetDiamMin(); os << separator() << hypothesis.GetAdapInit(); - os << separator() << hypothesis.GetLevelOutput(); + os << separator() << hypothesis.GetExtraOutput(); saux = os.str(); // MESSAGE( ". Fin avec "< coor = boundary.GetCoords() ; @@ -380,6 +385,10 @@ namespace HOMARD if ( !ok ) return false; cas.SetConfType( atoi( chunk.c_str() ) ); + chunk = getNextChunk( stream, start, ok ); + if ( !ok ) return false; + cas.SetExtType( atoi( chunk.c_str() ) ); + chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; @@ -616,7 +625,11 @@ namespace HOMARD for ( int i = 0; i < size; i++ ) { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - hypothesis.AddFieldInterp( chunk.c_str() ); + i++; + chunkNext = getNextChunk( stream, start, ok ); + int TypeInterp = atoi( chunkNext.c_str() ); + if ( !ok ) return false; + hypothesis.AddFieldInterpType( chunk.c_str(), TypeInterp ); } chunk = getNextChunk( stream, start, ok ); @@ -633,7 +646,7 @@ namespace HOMARD chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - hypothesis.SetLevelOutput( strtod( chunk.c_str(), 0 ) ); + hypothesis.SetExtraOutput( strtod( chunk.c_str(), 0 ) ); return true; } @@ -665,10 +678,10 @@ namespace HOMARD // Les coordonnees des zones : le nombre depend du type std::vector coords; int lgcoords ; - if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) { lgcoords = 6 ; } + if ( ZoneType == 2 || ( ZoneType >= 11 && ZoneType <= 13 ) ) { lgcoords = 6 ; } else if ( ZoneType == 4 ) { lgcoords = 4 ; } - else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) { lgcoords = 8 ; } - else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) { lgcoords = 9 ; } + else if ( ZoneType == 5 || ( ZoneType >= 31 && ZoneType <= 33 ) ) { lgcoords = 8 ; } + else if ( ZoneType == 7 || ( ZoneType >= 61 && ZoneType <= 63 ) ) { lgcoords = 9 ; } else return false; coords.resize( lgcoords ); for ( int i = 0; i < lgcoords; i++ ) { @@ -676,13 +689,13 @@ namespace HOMARD if ( !ok ) return false; coords[i] = strtod( chunk.c_str(), 0 ); } - if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) + if ( ZoneType == 2 || ( ZoneType >= 11 && ZoneType <= 13 ) ) { zone.SetBox( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5] ); } else if ( ZoneType == 4 ) { zone.SetSphere( coords[0], coords[1], coords[2], coords[3] ); } - else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) + else if ( ZoneType == 5 || ( ZoneType >= 31 && ZoneType <= 33 ) ) { zone.SetCylinder( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7] ); } - else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) + else if ( ZoneType == 7 || ( ZoneType >= 61 && ZoneType <= 63 ) ) { zone.SetPipe( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7], coords[8] ); } // Remarque : la taille de coords est suffisante pour les limites for ( int i = 0; i < 3; i++ ) { @@ -735,12 +748,20 @@ namespace HOMARD // Si analytique, les coordonnees des frontieres : le nombre depend du type // Si discret, le maillage + // Si CAO, la géométrie int lgcoords ; - if ( BoundaryType == 1 ) { lgcoords = 7 ; } + if ( BoundaryType == -1 ) { lgcoords = -1 ; } + else if ( BoundaryType == 1 ) { lgcoords = 7 ; } else if ( BoundaryType == 2 ) { lgcoords = 4 ; } else { lgcoords = 0 ; } // - if ( lgcoords == 0 ) + if ( lgcoords == -1 ) + { + chunk = getNextChunk( stream, start, ok ); + if ( !ok ) return false; + boundary.SetDataFile( chunk.c_str() ); + } + else if ( lgcoords == 0 ) { chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; @@ -748,7 +769,7 @@ namespace HOMARD chunk = getNextChunk( stream, start, ok ); if ( !ok ) return false; - boundary.SetMeshFile( chunk.c_str() ); + boundary.SetDataFile( chunk.c_str() ); } else { std::vector coords;