-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verification tests of the multigroup table
- Loading branch information
Showing
4 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* @brief Verify the multigroup data | ||
* | ||
* The following verification tests are performed: | ||
* - the number of groups accross the data is consistent | ||
*/ | ||
void verify() { | ||
|
||
// consistent group structure | ||
const auto groups = this->metadata().numberGroups().value(); | ||
if ( ( this->structure().numberGroups() != groups ) || | ||
( this->flux().numberGroups() != groups ) || | ||
( this->reactionCrossSections().numberGroups() != groups ) ) { | ||
|
||
Log::error( "Found inconsistent number of primary groups across the table" ); | ||
Log::info( "Number of primary groups in the metadata: {}", this->metadata().numberGroups().value() ); | ||
Log::info( "Number of primary groups in the structure: {}", this->structure().numberGroups() ); | ||
Log::info( "Number of primary groups in the flux weights: {}", this->flux().numberGroups() ); | ||
Log::info( "Number of primary groups in the reaction cross section data: {}", | ||
this->reactionCrossSections().numberGroups() ); | ||
throw std::exception(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters