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

Fix egs_cbct and egs_fac compilation errors for v2023 release #968

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions HEN_HOUSE/user_codes/egs_cbct/egs_cbct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1473,8 +1473,8 @@ void EGS_CBCT::initOutput() {
delete bs;
egsFatal(
"\n\n*** Wrong blank scan file size = %d bytes\n"
" It should be %d bytes"
" This is a fatal error.\n\n",
" It should be %d bytes\n"
" Check that the blank scan 'z-rotation' is set to 0\n\n",
fileSize,Nx*Ny*sizeof(float));
}
else{
Expand Down Expand Up @@ -3579,14 +3579,14 @@ void EGS_CBCT::transportSinglePhoton(EGS_CBCT_Photon &p) {
}

bool EGS_CBCT::checkVector(const EGS_Vector &v, const string & msg){
if (isnan(v.x) || isnan(v.y)||isnan(v.z)){
if (std::isnan(v.x) || std::isnan(v.y)||std::isnan(v.z)){
egsWarning("%s \n "
"=> NaN value: case = %d stack position = %d\n"
"x = %g y = %g z = %g\n", msg.c_str(),current_case, the_stack->np-1,
v.x, v.y, v.z);
return false;
}
if (isinf(v.x)||isinf(v.y)||isinf(v.z)){
if (std::isinf(v.x)||std::isinf(v.y)||std::isinf(v.z)){
egsWarning("%s \n"
"=> Infinite value in :\n case = %d stack position = %d\n"
"x = %g y = %g z = %g\n", msg.c_str(), current_case, the_stack->np-1,
Expand Down
2 changes: 1 addition & 1 deletion HEN_HOUSE/user_codes/egs_cbct/example_w5br.egsinp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
:start cbct setup:
orbit = 360.0
step = -45
z-rotation = -90
z-rotation = 0
:stop cbct setup:

:start scoring options:
Expand Down
8 changes: 4 additions & 4 deletions HEN_HOUSE/user_codes/egs_fac/egs_fac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ int EGS_FACApplication::ausgab(int iarg) {
// regions being CV.
EGS_Float dE = (the_stack->E[np]-the_epcont->edep-the_useful->rm)*
the_stack->wt[np];
if( isnan(dE) || isnan(the_extra_stack->expmfp[np]) ||
isinf(dE) || isinf(the_extra_stack->expmfp[np]) )
if( std::isnan(dE) || std::isnan(the_extra_stack->expmfp[np]) ||
std::isinf(dE) || std::isinf(the_extra_stack->expmfp[np]) )
egsInformation("\nAdding a NaN in imbalance: %g %g\n",dE,the_extra_stack->expmfp[np]);
else sim[ig]->addEnergyImbalance(ir,irnew,the_extra_stack->expmfp[np],dE);
}
Expand All @@ -261,7 +261,7 @@ int EGS_FACApplication::ausgab(int iarg) {
the_stack->wt[np],the_stack->iq[np],the_stack->latch[np],the_extra_stack->is_fat[np]);
}
}
if( isnan(edep) || isinf(edep) )
if( std::isnan(edep) || std::isinf(edep) )
egsInformation("\nAdding a NaN in energy: %g %g\n",the_stack->wt[np],the_epcont->edep);
else sim[ig]->addEnergyDeposition(ir,the_stack->latch[np],edep);
}
Expand Down Expand Up @@ -433,7 +433,7 @@ void EGS_FACApplication::getCurrentResult(double &sum, double &sum2, double &nor
count = current_case; double flu = source->getFluence();
norm = flu > 0 ? 1.6022e-10*count/(flu*sim[0]->cmass) : 0;
sum = sim[0]->dose[2]; sum2 = sim[0]->dose2[2];
if( isnan(sum) || isinf(sum) ) egsInformation("\nBad result? sum=%g sum2=%g\n",sum,sum2);
if( std::isnan(sum) || std::isinf(sum) ) egsInformation("\nBad result? sum=%g sum2=%g\n",sum,sum2);
}

void EGS_FACApplication::selectPhotonMFP(EGS_Float &dpmfp) {
Expand Down