Skip to content

Commit

Permalink
change uncertainty calcs to store 0.0 for failed subset rather than -1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dicengine committed May 3, 2017
1 parent 36b807f commit 49afd51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/DICe_PostProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,13 @@ Uncertainty_Post_Processor::execute(){
TEUCHOS_TEST_FOR_EXCEPTION(uncertainty_rcp==Teuchos::null || uncertainty_angle_rcp==Teuchos::null, std::runtime_error,"");
for(int_t subset=0;subset<local_num_points_;++subset){
const scalar_t angle = field1_rcp->local_value(subset);
const scalar_t sig = sigma_rcp->local_value(subset);
if(sig < 0.0){ // filter failed subsets
uncertainty_rcp->local_value(subset) = 0.0;
continue;
}
uncertainty_angle_rcp->local_value(subset) = field1_rcp->local_value(subset);
uncertainty_rcp->local_value(subset) = angle == 0.0 ? -1.0 : 1.0 / angle * sigma_rcp->local_value(subset);
uncertainty_rcp->local_value(subset) = angle == 0.0 ? 0.0 : 1.0 / angle * sig;
}
DEBUG_MSG("Uncertainty_Post_Processor::execute(): end");
}
Expand Down

0 comments on commit 49afd51

Please sign in to comment.