File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -919,10 +919,17 @@ void FlatSourceDomain::output_to_vtk() const
919919 std::fprintf (plot, " LOOKUP_TABLE default\n " );
920920 for (int i = 0 ; i < Nx * Ny * Nz; i++) {
921921 int64_t fsr = voxel_indices[i];
922+ int mat = source_regions_.material (fsr);
922923 float total_external = 0 .0f ;
923924 if (fsr >= 0 ) {
924925 for (int g = 0 ; g < negroups_; g++) {
925- total_external += source_regions_.external_source (fsr, g);
926+ // External sources are already divided by sigma_t, so we need to
927+ // multiply it back to get the true external source.
928+ double sigma_t = 1.0 ;
929+ if (mat != MATERIAL_VOID) {
930+ sigma_t = sigma_t_[mat * negroups_ + g];
931+ }
932+ total_external += source_regions_.external_source (fsr, g) * sigma_t ;
926933 }
927934 }
928935 total_external = convert_to_big_endian<float >(total_external);
You can’t perform that action at this time.
0 commit comments