Celeritas
0.5.0-56+6b053cd
|
Imported mock optical data. More...
#include <MockImportedData.hh>
Protected Types | |
Type aliases | |
using | Grid = GenericGridRecord |
using | GridId = OpaqueId< Grid > |
using | ImportedMfpTable = std::vector< ImportPhysicsVector > |
using | ImportedModelId = typename ImportedModels::ImportedModelId |
using | SPConstImported = std::shared_ptr< ImportedModels const > |
using | SPConstMaterials = std::shared_ptr< MaterialParams const > |
template<class T > | |
using | Items = Collection< T, Ownership::value, MemSpace::host > |
Protected Member Functions | |
Construct commonly used objects | |
SPConstImported | create_empty_imported_models () const |
Create ImportedModels all with empty MFP grids. More... | |
SPConstImported | create_imported_models () const |
Create ImportedModels from mock data. | |
MfpBuilder | create_mfp_builder () |
Create an MFP builder that uses this object's collections. | |
SPConstMaterials | build_optical_materials () const |
Build optical material parameters from imported data. | |
Check results | |
void | check_mfp (ImportPhysicsVector const &expected, ImportPhysicsVector const &imported) const |
Check that two MFP physics vectors are equal. | |
void | check_built_table_exact (ImportedMfpTable const &expected, ItemRange< Grid > const &table) const |
Check the built physics table with exact equality. | |
void | check_built_table_soft (ImportedMfpTable const &expected, ItemRange< Grid > const &table) const |
Check the built physics table with soft equality. | |
void | check_built_table (ImportedMfpTable const &expected, ItemRange< Grid > const &table, bool soft) const |
Check that the physics table built in the collections matches the imported MFP table it was built from. | |
Protected Attributes | |
Storage data | |
Items< real_type > | reals |
Items< Grid > | grids |
Access mock data | |
static std::vector< ImportOpticalModel > const & | import_models () |
Construct vector of ImportOpticalModel from mock data. More... | |
static std::vector< ImportOpticalMaterial > const & | import_materials () |
Construct vector of ImportOpticalMaterial from mock data. | |
std::shared_ptr< MaterialParams const > const & | optical_materials () const |
Retrieve optical materials constructed from mock imported data. More... | |
Additional Inherited Members | |
Public Member Functions inherited from celeritas::test::Test | |
std::string | make_unique_filename (std::string_view ext={}) |
Generate test-unique filename. | |
Static Public Member Functions inherited from celeritas::test::Test | |
static std::string | test_data_path (std::string_view subdir, std::string_view filename) |
Get the path to a test file at {source}/test/{subdir}/data/{filename} . More... | |
static std::string | genericize_pointers (std::string_view s) |
Replace pointer addresses with 0x0 for improved testability. | |
static bool | strict_testing () |
True if strict testing is required. More... | |
Static Public Attributes inherited from celeritas::test::Test | |
static constexpr double | inf = HUGE_VAL |
static constexpr float | inff = HUGE_VALF |
static constexpr double | coarse_eps = 1e-6 |
Imported mock optical data.
A base class that provides common mock data and functionality for testing optical physics.
|
protected |
Create ImportedModels all with empty MFP grids.
Useful for testing optical models which build their MFPs from material data.
|
staticprotected |
Construct vector of ImportOpticalModel from mock data.
There are 4 imported models, one for each optical model class. All models have MFP grids for 5 materials.
|
protected |
Retrieve optical materials constructed from mock imported data.
Will only construct the materials when called, and only once.