Skip to content

Commit

Permalink
Merge Pull Request #13466 from DrBooom/Trilinos/cbl_pamgen_block_leng…
Browse files Browse the repository at this point in the history
…th_nonneg

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'Pamgen: block length nonneg'
PR Author: DrBooom
  • Loading branch information
trilinos-autotester authored Sep 23, 2024
2 parents 9d1d85c + 9f18ff8 commit 4098d16
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions packages/pamgen/src/parse_routines.C
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,13 @@ namespace PAMGEN_NEVADA {
ss << "Zblock index out of range, should run from 1 to " << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = token_stream->Parse_Real();
Real val = token_stream->Parse_Real();
if(val <= 0.){
std::stringstream ss;
ss << "Block size must be positive." << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = val;
break;}
case P_RBLOCK:{
block_index = token_stream->Parse_Integer()-1;
Expand All @@ -670,7 +676,13 @@ namespace PAMGEN_NEVADA {
ss << "Rblock/Xblock index out of range, should run from 1 to " << Inline_Mesh_Desc::im_static_storage->inline_b[0] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = token_stream->Parse_Real();
Real val = token_stream->Parse_Real();
if(val <= 0.){
std::stringstream ss;
ss << "Block size must be positive." << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = val;
break;}
case P_ABLOCK:{
block_index = token_stream->Parse_Integer()-1;
Expand All @@ -679,7 +691,13 @@ namespace PAMGEN_NEVADA {
ss << "Ablock/Yblock index out of range, should run from 1 to " << Inline_Mesh_Desc::im_static_storage->inline_b[1] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = token_stream->Parse_Real();
Real val = token_stream->Parse_Real();
if(val <= 0.){
std::stringstream ss;
ss << "Block size must be positive." << Inline_Mesh_Desc::im_static_storage->inline_b[2] << ".";
token_stream->Semantics_Error(ss.str());
}
Inline_Mesh_Desc::im_static_storage->block_dist[cubit_axis][block_index] = val;
break;}


Expand Down

0 comments on commit 4098d16

Please sign in to comment.