X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD_I%2FHOMARD_Hypothesis_i.cxx;h=3adc47b8992f2528c2f8791787c38023f7bc6e97;hb=refs%2Ftags%2FV9_13_0b1;hp=f2dd91817b2d4e93de1833d145cb31119a1fb12c;hpb=ca2d4da525577ff4b003a7b873c72e929f8b08d2;p=modules%2Fhomard.git diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx index f2dd9181..3adc47b8 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2011-2014 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 @@ -116,13 +116,14 @@ bool HOMARD_Hypothesis_i::Restore( const std::string& stream ) void HOMARD_Hypothesis_i::SetUnifRefinUnRef( CORBA::Long TypeRaffDera ) { ASSERT( myHomardHypothesis ); + VERIFICATION( (TypeRaffDera==1) || (TypeRaffDera==-1) ); int TypeRaff, TypeDera ; if ( TypeRaffDera == 1 ) { TypeRaff = 1 ; TypeDera = 0 ; } - else + else if ( TypeRaffDera == -1 ) { TypeRaff = 0 ; TypeDera = 1 ; @@ -231,8 +232,11 @@ HOMARD::listeComposantsHypo* HOMARD_Hypothesis_i::GetComps() void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR ) { myHomardHypothesis->SetAdapType( 1 ); - int TypeDera = myHomardHypothesis->GetUnRefType() ; - myHomardHypothesis->SetRefinTypeDera( 1, TypeDera ); + if ( TypeThR > 0 ) + { + int TypeDera = myHomardHypothesis->GetUnRefType() ; + myHomardHypothesis->SetRefinTypeDera( 1, TypeDera ); + } myHomardHypothesis->SetRefinThr( TypeThR, ThreshR ); } //============================================================================= @@ -245,8 +249,11 @@ CORBA::Long HOMARD_Hypothesis_i::GetRefinThrType() void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC ) { myHomardHypothesis->SetAdapType( 1 ); - int TypeRaff = myHomardHypothesis->GetRefinType() ; - myHomardHypothesis->SetRefinTypeDera( TypeRaff, 1 ); + if ( TypeThC > 0 ) + { + int TypeRaff = myHomardHypothesis->GetRefinType() ; + myHomardHypothesis->SetRefinTypeDera( TypeRaff, 1 ); + } myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC ); } //============================================================================= @@ -292,16 +299,16 @@ CORBA::Long HOMARD_Hypothesis_i::GetAdapInit() return myHomardHypothesis->GetAdapInit(); } //============================================================================= -void HOMARD_Hypothesis_i::SetLevelOutput( CORBA::Long LevelOutput ) +void HOMARD_Hypothesis_i::SetExtraOutput( CORBA::Long ExtraOutput ) { ASSERT( myHomardHypothesis ); - myHomardHypothesis->SetLevelOutput( LevelOutput ); + myHomardHypothesis->SetExtraOutput( ExtraOutput ); } //============================================================================= -CORBA::Long HOMARD_Hypothesis_i::GetLevelOutput() +CORBA::Long HOMARD_Hypothesis_i::GetExtraOutput() { ASSERT( myHomardHypothesis ); - return myHomardHypothesis->GetLevelOutput(); + return myHomardHypothesis->GetExtraOutput(); } //============================================================================= void HOMARD_Hypothesis_i::AddGroup( const char* Group) @@ -310,6 +317,18 @@ void HOMARD_Hypothesis_i::AddGroup( const char* Group) myHomardHypothesis->AddGroup( Group ); } //============================================================================= +void HOMARD_Hypothesis_i::SupprGroup( const char* Group ) +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SupprGroup(Group); +} +//============================================================================= +void HOMARD_Hypothesis_i::SupprGroups() +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SupprGroups(); +} +//============================================================================= void HOMARD_Hypothesis_i::SetGroups(const HOMARD::ListGroupType& ListGroup) { ASSERT( myHomardHypothesis ); @@ -434,6 +453,7 @@ void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse ) { MESSAGE ("Dans AddZone pour " << NomZone << " et TypeUse = " << TypeUse ) ; ASSERT( myHomardHypothesis ); + VERIFICATION( (TypeUse==1) || (TypeUse==-1) ); myHomardHypothesis->SetAdapType( 0 ); int TypeRaff, TypeDera ; if ( TypeUse == 1 ) @@ -446,10 +466,6 @@ void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse ) TypeRaff = myHomardHypothesis->GetRefinType() ; TypeDera = 1 ; } - else - { - ASSERT( "TypeUse should be 1 or -1" == 0 ); - } myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera ); char* NomHypo = GetName() ; return _gen_i->AssociateHypoZone(NomHypo, NomZone, TypeUse) ;