Skip to content

Commit

Permalink
Fix normalization with custom source
Browse files Browse the repository at this point in the history
  • Loading branch information
tobre1 committed Jun 24, 2024
1 parent d9e6964 commit 225313a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
13 changes: 0 additions & 13 deletions format-project.sh

This file was deleted.

5 changes: 3 additions & 2 deletions include/viennaray/rayTrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,14 @@ template <class NumericType, int D> class Trace {
case NormalizationType::SOURCE: {
if (!pSource_) {
Logger::getInstance()
.addWarning("No source was specified in for the normalization.")
.addWarning(
"No source was specified in rayTrace for the normalization.")
.print();
break;
}
NumericType sourceArea = pSource_->getSourceArea();
auto numTotalRays = numberOfRaysFixed_ == 0
? flux.size() * numberOfRaysPerPoint_
? pSource_->getNumPoints() * numberOfRaysPerPoint_
: numberOfRaysFixed_;
NumericType normFactor = sourceArea / numTotalRays;
#pragma omp parallel for
Expand Down

0 comments on commit 225313a

Please sign in to comment.