Skip to content

Commit

Permalink
Fixed a bug for DAReg-checkOutput in parallel (#572)
Browse files Browse the repository at this point in the history
* Deleted the files for dym.

* Fixed a bug for checkOutput in parallel.
  • Loading branch information
friedenhe authored Jan 20, 2024
1 parent e8fbdb6 commit 54e1dc4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 508 deletions.
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

0 comments on commit 54e1dc4

Please sign in to comment.