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

Fixed a bug for DAReg-checkOutput in parallel #572

Merged
merged 2 commits into from
Jan 20, 2024
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
12 changes: 8 additions & 4 deletions src/adjoint/DARegression/DARegression.C
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ label DARegression::checkOutput(volScalarField& outputField)
Return 1 if there is invalid value in the output. Return 0 if successful
*/

label fail = 0;

// check if the output value is valid.
label isNaN = 0;
label isInf = 0;
Expand Down Expand Up @@ -438,22 +440,24 @@ label DARegression::checkOutput(volScalarField& outputField)
if (isBounded == 1)
{
Info << "************* Warning! output values are bounded between " << outputLowerBound_ << " and " << outputUpperBound_ << endl;
return 1;
fail = 1;
}

if (isNaN == 1)
{
Info << "************* Warning! output values have nan and are set to " << defaultOutputValue_ << endl;
return 1;
fail = 1;
}

if (isInf == 1)
{
Info << "************* Warning! output values have inf and are set to " << defaultOutputValue_ << endl;
return 1;
fail = 1;
}

return 0;
reduce(fail, sumOp<label>());

return fail;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
194 changes: 0 additions & 194 deletions src/adjoint/DASolver/DAPimpleDyMFoam/CorrectPhi/CorrectPhi.C

This file was deleted.

105 changes: 0 additions & 105 deletions src/adjoint/DASolver/DAPimpleDyMFoam/CorrectPhi/CorrectPhi.H

This file was deleted.

Loading
Loading