Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pamgen: block length nonneg #13466

Merged
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
Loading