Skip to content

Commit 3492f59

Browse files
authored
Fixed a bug for DAReg. (#649)
1 parent 304957a commit 3492f59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/adjoint/DARegression/DARegression.C

+3-1
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ label DARegression::compute()
592592
// loop over all cells
593593
forAll(features_[modelName][idxI], cellI)
594594
{
595-
counterI = cellI * nCells + idxI;
595+
counterI = cellI * nInputs + idxI;
596596
featuresFlattenArray_[counterI] = features_[modelName][idxI][cellI];
597597
}
598598
}
@@ -672,10 +672,12 @@ label DARegression::nParameters(word modelName)
672672
else if (modelType_[modelName] == "externalTensorFlow")
673673
{
674674
// do nothing
675+
return 0;
675676
}
676677
else
677678
{
678679
FatalErrorIn("") << "modelType_: " << modelType_[modelName] << " not supported. Options are: neuralNetwork, radialBasisFunction, and externalTensorFlow" << abort(FatalError);
680+
return 0;
679681
}
680682
}
681683

0 commit comments

Comments
 (0)