Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/GIDI.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002 # <<BEGIN-copyright>>
0003 # Copyright 2019, Lawrence Livermore National Security, LLC.
0004 # This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
0005 # gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
0006 # SPDX-License-Identifier: MIT
0007 # <<END-copyright>>
0008 */
0009 
0010 #ifndef GIDI_hpp_included
0011 #define GIDI_hpp_included 1
0012 
0013 #include <string>
0014 #include <vector>
0015 #include <set>
0016 #include <map>
0017 #include <list>
0018 #include <iostream>
0019 #include <stdexcept>
0020 #include <regex>
0021 
0022 #include <GUPI.hpp>
0023 #include <RISI.hpp>
0024 #include <PoPI.hpp>
0025 
0026 #include <nf_utilities.h>
0027 #include <nf_buffer.h>
0028 #include <ptwXY.h>
0029 
0030 #include "GIDI_data.hpp"
0031 
0032 namespace GIDI {
0033 
0034 class SetupInfo;
0035 class Form;
0036 class Suite;
0037 class FissionFragmentData;
0038 class OutputChannel;
0039 class Protare;
0040 class ProtareSingle;
0041 class ParticleInfo;
0042 class MultiGroupCalulationInformation;
0043 namespace  GRIN {
0044 class GRIN_continuumGammas;
0045 }
0046 
0047 typedef std::set<std::size_t> ExcludeReactionsSet;
0048 
0049 namespace Functions {
0050     class XYs1d;
0051     class Xs_pdf_cdf1d;
0052     class Branching1d;
0053     class Function2dForm;
0054 }                   // End namespace Functions.
0055 
0056 namespace Map {
0057     class ProtareBase;
0058     class TNSL;
0059     class Map;
0060 }                   // End of namespace Map.
0061 
0062 typedef bool (*MapWalkCallBack)( Map::ProtareBase const *a_protareEntry, std::string const &a_library, void *a_userData, int a_level );
0063 
0064 namespace Construction {
0065     class Settings;
0066 }                   // End of namespace Construction.
0067 
0068 namespace Documentation_1_10 {
0069     class Suite;
0070 }                   // End of namespace Documentation_1_10.
0071 
0072 namespace ExternalFiles {
0073     class Suite;
0074 }                   // End of namespace ExternalFiles
0075 
0076 namespace Table {
0077     class Column;
0078 }                   // End of namespace Table
0079 
0080 namespace Styles {
0081     class Suite;
0082     class MultiGroup;
0083     class HeatedMultiGroup;
0084 }                   // End of namespace Styles.
0085 
0086 typedef Form *(*parseSuite)( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo,
0087         PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles );
0088 
0089 enum class GNDS_FileType { uninitialized, unknown, pops, protare, covarianceSuite, map };
0090 
0091 class GNDS_FileTypeInfo {
0092 
0093     private:
0094         GNDS_FileType m_GNDS_fileType;
0095         std::string m_projectileID;
0096         std::string m_targetID;
0097         std::string m_evaluation;
0098         std::string m_interaction;
0099 
0100     public:
0101         GNDS_FileTypeInfo( );
0102         GNDS_FileTypeInfo( GNDS_FileType a_GNDS_fileType, std::string const &a_projectileID = "", 
0103                 std::string const &a_targetID = "", std::string const &a_evaluation = "", 
0104                 std::string const &a_interaction = "" );
0105         GNDS_FileTypeInfo( GNDS_FileTypeInfo const &a_GNDS_fileTypeInfo );
0106         GNDS_FileTypeInfo &operator=( GNDS_FileTypeInfo const &a_rhs );
0107 
0108         GNDS_FileType GNDS_fileType( ) const { return( m_GNDS_fileType ); }
0109         void setGNDS_fileType( GNDS_FileType a_GNDS_fileType ) { m_GNDS_fileType = a_GNDS_fileType; }
0110         std::string const &projectileID( ) const { return( m_projectileID ); }
0111         std::string const &targetID( ) const { return( m_targetID ); }
0112         std::string const &evaluation( ) const { return( m_evaluation ); }
0113         std::string const &interaction( ) const { return( m_interaction ); }
0114 };
0115 
0116 enum class ProtareType { single, composite, TNSL };
0117 
0118 enum class FormType { generic, lazyParsingHelperForm, group, groups, transportable, flux, fluxes, externalFile, style,
0119                 reaction, product, delayedNeutron, fissionFragmentData, rate,
0120                 physicalQuantity, axisDomain, axis, grid, axes,
0121                 flattenedArrayData, array3d, array,
0122                     // 1d functions.
0123                 constant1d, XYs1d, Ys1d, polynomial1d, Legendre1d, gridded1d, reference1d, xs_pdf_cdf1d, regions1d, 
0124                 resonancesWithBackground1d, resonanceBackground1d, resonanceBackgroundRegion1d, URR_probabilityTables1d,
0125                 fissionEnergyRelease1d, branching1d, branching1dPids, thermalNeutronScatteringLaw1d, unspecified1d,
0126                     // 2d functions.
0127                 XYs2d, recoil2d, isotropic2d, discreteGamma2d, primaryGamma2d, regions2d, gridded2d,
0128                 generalEvaporation2d, simpleMaxwellianFission2d, evaporation2d, Watt2d, MadlandNix2d, 
0129                 weighted_function2d, weightedFunctionals2d, NBodyPhaseSpace2d,
0130                     // 3d functions.
0131                 XYs3d, regions3d, gridded3d,
0132                     // distributions.
0133                 angularTwoBody, KalbachMann, uncorrelated, unspecified, reference3d, multiGroup3d, 
0134                 energyAngular, energyAngularMC, angularEnergy, angularEnergyMC, LLNL_angularEnergy,
0135                 coherentPhotonScattering, incoherentPhotonScattering, incoherentBoundToFreePhotonScattering, thermalNeutronScatteringLaw, branching3d,
0136                 coherentElastic, incoherentElastic, incoherentInelastic, CoulombPlusNuclearElastic3d, LLNLLegendre,
0137                     // Sums stuff.
0138                 crossSectionSum, multiplicitySum, summands,
0139                     // ACE style URR stuff currently in the applicationData node.
0140                 ACE_URR_probabilityTable, ACE_URR_incidentEnergy,
0141                     // Table stuff.
0142                 table, columnHeaders, column,
0143                     // Non-GNDS compliant GRIN forms.
0144                 GRIN_inelasticIncidentEnergy, GRIN_captureLevelProbability };
0145 
0146 enum class Frame { lab, centerOfMass };
0147 enum class TransportCorrectionType { None, Pendlebury, LLNL, Ferguson };
0148 enum class FileType { XML, HDF };
0149 
0150 #define GIDI_emptyFileNameChars ""
0151 
0152 #define GIDI_mapFormatVersion_0_1Chars "0.1"
0153 #define GIDI_mapFormatVersion_0_2Chars "0.2"
0154 
0155 #define GIDI_LLNL_Chars "LLNL"
0156 #define GIDI_LLNL_multiGroupReactions_Chars "LLNL::multiGroupReactions"
0157 #define GIDI_LLNL_multiGroupDelayedNeutrons_Chars "LLNL::multiGroupDelayedNeutrons"
0158 #define GIDI_LLNL_URR_probability_tables_Chars "LLNL::URR_probability_tables"
0159 #define GIDI_LLNL_pointwiseAverageProductEnergies "LLNL::pointwiseAverageProductEnergies"
0160 #define GIDI_LLNL_GRIN_continuumGammas "LLNL::GRIN_continuumGammas"
0161 
0162 #define GIDI_mapChars "map"
0163 #define GIDI_importChars "import"
0164 #define GIDI_protareChars "protare"
0165 #define GIDI_TNSLChars "TNSL"
0166 
0167 #define GIDI_formatChars "format"
0168 
0169 #define GIDI_topLevelChars "reactionSuite"
0170 #define GIDI_covarianceSuiteChars "covarianceSuite"
0171 
0172 #define GIDI_externalFilesChars "externalFiles"
0173 #define GIDI_externalFileChars "externalFile"
0174 
0175 #define GIDI_documentationChars "documentation"
0176 #define GIDI_documentations_1_10_Chars "documentations"
0177 #define GIDI_stylesChars "styles"
0178 #define GIDI_PoPsChars "PoPs"
0179 #define GIDI_reactionsChars "reactions"
0180 #define GIDI_reactionChars "reaction"
0181 #define GIDI_orphanProductsChars "orphanProducts"
0182 #define GIDI_orphanProductChars "orphanProduct"
0183 #define GIDI_incompleteReactionsChars "incompleteReactions"
0184 #define GIDI_fissionComponentsChars "fissionComponents"
0185 #define GIDI_fissionComponentChars "fissionComponent"
0186 #define GIDI_ACE_URR_probabilityTablesChars "probabilityTables"
0187 #define GIDI_ACE_URR_probabilityTableChars "probabilityTable"
0188 #define GIDI_LLNL_photoAtomicIncoherentDoppler_Chars "LLNL::photoAtomicIncoherentDoppler"
0189 
0190 #define GIDI_tableChars "table"
0191 #define GIDI_rowsChars "rows"
0192 #define GIDI_columnsChars "columns"
0193 #define GIDI_columnHeadersChars "columnHeaders"
0194 #define GIDI_columnChars "column"
0195 #define GIDI_nameChars "name"
0196 #define GIDI_typesChars "types"
0197 #define GIDI_dataChars "data"
0198 #define GIDI_sepChars "sep"
0199 
0200 #define GIDI_applicationDataChars "applicationData"
0201 #define GIDI_institutionChars "institution"
0202 #define GIDI_nuclearPlusCoulombInterferenceChars "nuclearPlusCoulombInterference"
0203 
0204 #define GIDI_sumsChars "sums"
0205 #define GIDI_sumsCrossSectionsChars "crossSections"
0206 #define GIDI_sumsMultiplicitiesChars "multiplicities"
0207 #define GIDI_sumsAddChars "add"
0208 #define GIDI_sumsSummandsChars "summands"
0209 #define GIDI_crossSectionSumsChars "crossSectionSums"
0210 #define GIDI_crossSectionSumChars "crossSectionSum"
0211 #define GIDI_multiplicitySumsChars "multiplicitySums"
0212 #define GIDI_multiplicitySumChars "multiplicitySum"
0213 
0214 #define GIDI_doubleDifferentialCrossSectionChars "doubleDifferentialCrossSection"
0215 #define GIDI_crossSectionChars "crossSection"
0216 #define GIDI_availableEnergyChars "availableEnergy"
0217 #define GIDI_availableMomentumChars "availableMomentum"
0218 
0219 #define GIDI_QChars "Q"
0220 #define GIDI_productsChars "products"
0221 #define GIDI_productChars "product"
0222 
0223 #define GIDI_multiplicityChars "multiplicity"
0224 #define GIDI_distributionChars "distribution"
0225 #define GIDI_averageEnergyChars "averageProductEnergy"
0226 #define GIDI_averageMomentumChars "averageProductMomentum"
0227 #define GIDI_outputChannelChars "outputChannel"
0228 
0229 #define GIDI_fissionFragmentDataChars "fissionFragmentData"
0230 #define GIDI_delayedNeutronsChars "delayedNeutrons"
0231 #define GIDI_delayedNeutronChars "delayedNeutron"
0232 #define GIDI_fissionEnergyReleasesChars "fissionEnergyReleases"
0233 #define GIDI_fissionEnergyReleaseChars "fissionEnergyRelease"
0234 #define GIDI_rateChars "rate"
0235 
0236 #define GIDI_groupsChars "groups"
0237 #define GIDI_groupChars "group"
0238 #define GIDI_fluxesChars "fluxes"
0239 
0240 #define GIDI_evaluatedStyleChars "evaluated"
0241 #define GIDI_crossSectionReconstructedStyleChars "crossSectionReconstructed"
0242 #define GIDI_angularDistributionReconstructedStyleChars "angularDistributionReconstructed"
0243 #define GIDI_CoulombPlusNuclearElasticMuCutoffStyleChars "CoulombPlusNuclearElasticMuCutoff"
0244 #define GIDI_averageProductDataStyleChars "averageProductData"
0245 #define GIDI_MonteCarlo_cdfStyleChars "MonteCarlo_cdf"
0246 #define GIDI_multiGroupStyleChars "multiGroup"
0247 #define GIDI_transportablesChars "transportables"
0248 #define GIDI_transportableChars "transportable"
0249 #define GIDI_realizationChars "realization"
0250 #define GIDI_heatedStyleChars "heated"
0251 #define GIDI_griddedCrossSectionStyleChars "griddedCrossSection"
0252 #define GIDI_URR_probabilityTablesStyleChars "URR_probabilityTables"
0253 #define GIDI_heatedMultiGroupStyleChars "heatedMultiGroup"
0254 #define GIDI_SnElasticUpScatterStyleChars "SnElasticUpScatter"
0255 #define GIDI_projectileEnergyDomainChars "projectileEnergyDomain"
0256 
0257 // array monikers and allowed values.
0258 #define GIDI_arrayChars "array"
0259 #define GIDI_noneChars "none"
0260 #define GIDI_valuesChars "values"
0261 #define GIDI_shapeChars "shape"
0262 
0263 #define GIDI_compressionChars "compression"
0264 #define GIDI_diagonalChars "diagonal"
0265 #define GIDI_startingIndices "startingIndices"
0266 #define GIDI_flattenedChars "flattened"
0267 #define GIDI_startsChars "starts"
0268 #define GIDI_lengthsChars "lengths"
0269 #define GIDI_embeddedChars "embedded"
0270 
0271 #define GIDI_symmetryChars "symmetry"
0272 #define GIDI_lowerChars "lower"
0273 #define GIDI_upperChars "upper"
0274 
0275 #define GIDI_permutationChars "permutation"
0276 #define GIDI_plusOneChars "+1"
0277 #define GIDI_minusOneChars "-1"
0278 
0279 #define GIDI_storageOrderChars "storageOrder"
0280 #define GIDI_rowMajorChars "rowMajor"
0281 #define GIDI_columnMajorChars "columnMajor"
0282 
0283 #define GIDI_offsetChars "offset"
0284 #define GIDI_startIndexChars "startIndex"
0285 
0286 // 1d Function monikers.
0287 #define GIDI_constant1dChars "constant1d"
0288 #define GIDI_XYs1dChars "XYs1d"
0289 #define GIDI_Ys1dChars "Ys1d"
0290 #define GIDI_polynomial1dChars "polynomial1d"
0291 #define GIDI_LegendreChars "Legendre"
0292 #define GIDI_regions1dChars "regions1d"
0293 #define GIDI_gridded1dChars "gridded1d"
0294 #define GIDI_referenceChars "reference"
0295 #define GIDI_xs_pdf_cdf1dChars "xs_pdf_cdf1d"
0296 #define GIDI_branching1dChars "branching1d"
0297 #define GIDI_TNSL1dChars "thermalNeutronScatteringLaw1d"
0298 
0299 // 2d Function monikers.
0300 #define GIDI_XYs2dChars "XYs2d"
0301 #define GIDI_recoilChars "recoil"
0302 #define GIDI_isotropic2dChars "isotropic2d"
0303 #define GIDI_discreteGammaChars "discreteGamma"
0304 #define GIDI_primaryGammaChars "primaryGamma"
0305 #define GIDI_generalEvaporationChars "generalEvaporation"
0306 #define GIDI_simpleMaxwellianFissionChars "simpleMaxwellianFission"
0307 #define GIDI_evaporationChars "evaporation"
0308 #define GIDI_WattChars "Watt"
0309 #define GIDI_MadlandNixChars "MadlandNix"
0310 #define GIDI_weightedFunctionalsChars "weightedFunctionals"
0311 #define GIDI_NBodyPhaseSpaceChars "NBodyPhaseSpace"
0312 #define GIDI_regions2dChars "regions2d"
0313 #define GIDI_gridded2dChars "gridded2d"
0314 
0315 // 3d Function monikers.
0316 #define GIDI_XYs3dChars "XYs3d"
0317 #define GIDI_gridded3dChars "gridded3d"
0318 
0319 // Double differentials
0320 #define GIDI_optionsChars "options"
0321 #define GIDI_S_alpha_betaChars "S_alpha_beta"
0322 #define GIDI_S_tableChars "S_table"
0323 #define GIDI_formFactorChars "formFactor"
0324 #define GIDI_realAnomalousFactorChars "realAnomalousFactor"
0325 #define GIDI_imaginaryAnomalousFactorChars "imaginaryAnomalousFactor"
0326 #define GIDI_scatteringFactorChars "scatteringFactor"
0327 #define GIDI_ComptonProfileChars "ComptonProfile"
0328 #define GIDI_boundAtomCrossSectionChars "boundAtomCrossSection"
0329 #define GIDI_characteristicCrossSectionChars "characteristicCrossSection"
0330 #define GIDI_DebyeWallerIntegralChars "DebyeWallerIntegral"
0331 #define GIDI_DebyeWallerChars "DebyeWaller"
0332 #define GIDI_massChars "mass"
0333 #define GIDI_freeAtomCrossSectionChars "freeAtomCrossSection"
0334 #define GIDI_e_criticalChars "e_critical"
0335 #define GIDI_e_maxChars "e_max"
0336 #define GIDI_T_effectiveChars "T_effective"
0337 #define GIDI_UChars "U"
0338 #define GIDI_thetaChars "theta"
0339 #define GIDI_gChars "g"
0340 
0341 // Distribution forms.
0342 #define GIDI_multiGroup3dChars "multiGroup3d"
0343 #define GIDI_angularTwoBodyChars "angularTwoBody"
0344 #define GIDI_uncorrelatedChars "uncorrelated"
0345 #define GIDI_angularChars "angular"
0346 #define GIDI_energyChars "energy"
0347 #define GIDI_KalbachMannChars "KalbachMann"
0348 #define GIDI_energyAngularChars "energyAngular"
0349 #define GIDI_energyAngularMCChars "energyAngularMC"
0350 #define GIDI_angularEnergyChars "angularEnergy"
0351 #define GIDI_angularEnergyMCChars "angularEnergyMC"
0352 #define GIDI_LLNLAngularEnergyChars "LLNLAngularEnergy"
0353 #define GIDI_LLNLAngularOfAngularEnergyChars "LLNLAngularOfAngularEnergy"
0354 #define GIDI_LLNLAngularEnergyOfAngularEnergyChars "LLNLAngularEnergyOfAngularEnergy"
0355 #define GIDI_coherentPhotonScatteringChars "coherentPhotonScattering"
0356 #define GIDI_incoherentPhotonScatteringChars "incoherentPhotonScattering"
0357 #define GIDI_incoherentBoundToFreePhotonScatteringChars "incoherentBoundToFreePhotonScattering"
0358 #define GIDI_TNSL_coherentElasticChars "thermalNeutronScatteringLaw_coherentElastic"
0359 #define GIDI_TNSL_incoherentElasticChars "thermalNeutronScatteringLaw_incoherentElastic"
0360 #define GIDI_TNSL_incoherentInelasticChars "thermalNeutronScatteringLaw_incoherentInelastic"
0361 #define GIDI_thermalNeutronScatteringLawChars "thermalNeutronScatteringLaw"
0362 #define GIDI_branching3dChars "branching3d"
0363 #define GIDI_unspecifiedChars "unspecified"
0364 
0365 #define GIDI_scatteringAtomsChars "scatteringAtoms"
0366 #define GIDI_scatteringAtomChars "scatteringAtom"
0367 
0368 #define GIDI_resonancesWithBackgroundChars "resonancesWithBackground"
0369 #define GIDI_resonancesChars "resonances"
0370 #define GIDI_resonanceBackground1dChars   "background"
0371 #define GIDI_resolvedRegionChars "resolvedRegion"
0372 #define GIDI_unresolvedRegionChars "unresolvedRegion"
0373 #define GIDI_fastRegionChars "fastRegion"
0374 
0375 #define GIDI_CoulombPlusNuclearElasticChars "CoulombPlusNuclearElastic"
0376 #define GIDI_RutherfordScatteringChars "RutherfordScattering"
0377 #define GIDI_nuclearPlusInterferenceChars "nuclearPlusInterference"
0378 
0379 #define GIDI_URR_probabilityTables1dChars "URR_probabilityTables1d"
0380 #define GIDI_LLNLLegendreChars "LLNLLegendre"
0381 
0382 #define GIDI_axesChars "axes"
0383 #define GIDI_axisChars "axis"
0384 #define GIDI_gridChars "grid"
0385 #define GIDI_fluxNodeChars "flux"
0386 
0387 #define GIDI_function1dsChars "function1ds"
0388 #define GIDI_function2dsChars "function2ds"
0389 #define GIDI_uncertaintyChars "uncertainty"
0390 #define GIDI_fChars "f"
0391 #define GIDI_rChars "r"
0392 #define GIDI_aChars "a"
0393 #define GIDI_bChars "b"
0394 #define GIDI_EFL_Chars "EFL"
0395 #define GIDI_EFH_Chars "EFH"
0396 #define GIDI_T_M_Chars "T_M"
0397 #define GIDI_weightedChars "weighted"
0398 
0399 #define GIDI_promptProductKEChars "promptProductKE"
0400 #define GIDI_promptNeutronKEChars "promptNeutronKE"
0401 #define GIDI_delayedNeutronKEChars  "delayedNeutronKE"
0402 #define GIDI_promptGammaEnergyChars "promptGammaEnergy"
0403 #define GIDI_delayedGammaEnergyChars "delayedGammaEnergy"
0404 #define GIDI_delayedBetaEnergyChars "delayedBetaEnergy"
0405 #define GIDI_neutrinoEnergyChars "neutrinoEnergy"
0406 #define GIDI_nonNeutrinoEnergyChars "nonNeutrinoEnergy"
0407 #define GIDI_totalEnergyChars "totalEnergy"
0408 
0409 #define GIDI_trueChars "true"
0410 #define GIDI_fissionGenreChars "fissionGenre"
0411 #define GIDI_libraryChars "library"
0412 #define GIDI_startChars "start"
0413 #define GIDI_projectileChars "projectile"
0414 #define GIDI_targetChars "target"
0415 #define GIDI_evaluationChars "evaluation"
0416 #define GIDI_interactionChars "interaction"
0417 #define GIDI_standardTargetChars "standardTarget"
0418 #define GIDI_standardEvaluationChars "standardEvaluation"
0419 #define GIDI_projectileFrameChars "projectileFrame"
0420 #define GIDI_ENDF_MT_Chars "ENDF_MT"
0421 #define GIDI_dateChars "date"
0422 #define GIDI_derivedFromChars "derivedFrom"
0423 #define GIDI_versionChars "version"
0424 #define GIDI_temperatureChars "temperature"
0425 #define GIDI_muCutoffChars "muCutoff"
0426 #define GIDI_lMaxChars "lMax"
0427 #define GIDI_parametersChars "parameters"
0428 #define GIDI_upperCalculatedGroupChars "upperCalculatedGroup"
0429 #define GIDI_calculatedAtThermalChars "calculatedAtThermal"
0430 #define GIDI_asymmetricChars "asymmetric"
0431 #define GIDI_valueTypeChars "valueType"
0432 
0433 #define GIDI_productFrameChars "productFrame"
0434 #define GIDI_interpolationChars "interpolation"
0435 #define GIDI_interpolationQualifierChars "interpolationQualifier"
0436 #define GIDI_outerDomainValueChars "outerDomainValue"
0437 #define GIDI_indexChars "index"
0438 #define GIDI_labelChars "label"
0439 #define GIDI_unitChars "unit"
0440 #define GIDI_hrefChars "href"
0441 #define GIDI_initialChars "initial"
0442 #define GIDI_finalChars "final"
0443 #define GIDI_minChars "min"
0444 #define GIDI_maxChars "max"
0445 #define GIDI_valueChars "value"
0446 #define GIDI_domainMinChars "domainMin"
0447 #define GIDI_domainMaxChars "domainMax"
0448 #define GIDI_finalStateChars "finalState"
0449 #define GIDI_numberOfProductsChars "numberOfProducts"
0450 #define GIDI_pathChars "path"
0451 #define GIDI_styleChars "style"
0452 #define GIDI_genreChars "genre"
0453 #define GIDI_processChars "process"
0454 #define GIDI_pidChars "pid"
0455 #define GIDI_countChars "count"
0456 
0457 #define GIDI_inverseSpeedChars "inverseSpeed"
0458 
0459 #define GIDI_centerOfMassChars "centerOfMass"
0460 #define GIDI_labChars "lab"
0461 #define GIDI_twoBodyChars "twoBody"
0462 #define GIDI_NBodyChars "NBody"
0463 
0464 // Allowed values for the 'conserve' attribute
0465 #define GIDI_conserveNumberChars "number"
0466 #define GIDI_conserveEnergyOutChars "energyOut"
0467 
0468 // TargetInfo.
0469 #define GIDI_targetInfoChars "targetInfo"
0470 #define GIDI_atomFractionChars "atomFraction"
0471 #define GIDI_isotopicAbundancesChars "isotopicAbundances"
0472 
0473 // GRIN.
0474 #define GIDI_GRIN_continuumGammasChars "GRIN_continuumGammas"
0475 #define GIDI_captureNeutronSeparationEnergyChars "captureNeutronSeparationEnergy"
0476 #define GIDI_maximumIncidentEnergyChars "maximumIncidentEnergy"
0477 #define GIDI_inelasticIncidentEnergiesChars "inelasticIncidentEnergies"
0478 #define GIDI_inelasticIncidentEnergyChars "inelasticIncidentEnergy"
0479 #define GIDI_captureLevelProbabilitiesChars "captureLevelProbabilities"
0480 #define GIDI_captureLevelProbabilityChars "captureLevelProbability"
0481 #define GIDI_probabilityChars "probability"
0482 #define GIDI_spinUnitChars "spinUnit"
0483 #define GIDI_capturePrimaryToContinuaChars "capturePrimaryToContinua"
0484 
0485 typedef std::pair<std::string, double> stringAndDoublePair;
0486 typedef std::vector<stringAndDoublePair> stringAndDoublePairs;
0487 typedef std::map<std::string, ParticleInfo> ParticleSubstitution;
0488 
0489 #ifdef _WIN32
0490 #define GIDI_FILE_SEPARATOR   "\\"
0491 #else
0492 #define GIDI_FILE_SEPARATOR   "/"
0493 #endif
0494 
0495 std::vector<std::string> vectorOfStrings( std::string const &a_string );
0496 
0497 /*
0498 ============================================================
0499 ========================= Exception ========================
0500 ============================================================
0501 */
0502 class Exception : public std::runtime_error {
0503 
0504     public :
0505         explicit Exception( std::string const &a_message );
0506 };
0507 
0508 namespace Construction {
0509 
0510 /* *********************************************************************************************************
0511  * This enum allows a user to limit the data read in by various constructors. Limiting the data speeds up the reading
0512  * and parsing, and uses less memory.
0513  ***********************************************************************************************************/
0514 
0515 enum class ParseMode : int { all,                             /**< Read and parse all data. */
0516                              multiGroupOnly,                  /**< Only read and parse data needed for multi-group transport. */
0517                              MonteCarloContinuousEnergy,      /**< Only read and parse data needed for continuous energy Monte Carlo. */
0518                              excludeProductMatrices,          /**< Read and parse all data but multi-group product matrices. */
0519                              readOnly,                        /**< Only read and parse all the data but do no calculations. Useful for reading an incomplete GNDS file. */
0520                              outline,                         /**< Does parse any component data (e.g., cross section, multiplicity, distribution). */
0521                              noParsing                        /**< Only timing development, must be used with caution. The mode allows one to test the io time without any parsing of the **HAPI::File**. */ };
0522 
0523 enum class PhotoMode : int { nuclearAndAtomic,                /**< Instructs method Map::protare to create a Protare with both photo-nuclear and photo-atomic data when the projectile is photon. */
0524                              nuclearOnly,                     /**< Instructs method Map::protare to create a Protare with only photo-nuclear data when the projectile is photon. */
0525                              atomicOnly                       /**< Instructs method Map::protare to create a Protare with only photo-atomic data when the projectile is photon. */ };
0526 
0527 /* *********************************************************************************************************
0528  * This enum specifies what fission redisual products will be added to the list of products produced in a fission reaction.
0529  ***********************************************************************************************************/
0530 
0531 enum class FissionResiduals : int {
0532         none,               /**< No additional product is produced to the fission reaction. */
0533         ENDL99120,          /**< A LLNL ENDL 99120 fission product will be produced with multiplicity 2. */
0534         ENDL99125           /**< A LLNL ENDL 99125 fission product will be produced with multiplicity 2. */ };
0535 
0536 /*
0537 ============================================================
0538 ========================= Settings =========================
0539 ============================================================
0540 */
0541 class Settings {
0542 
0543     private:
0544         ParseMode m_parseMode;                                      /**< Parameter used by various constructors to limit data read into. */
0545         PhotoMode m_photoMode;                                      /**< Determines whether photo-nuclear and/or photo-atomic are included a Protare when the projectile is photon. */
0546         int m_useSystem_strtod;                                     /**< Flag passed to the function nfu_stringToListOfDoubles of the numericalFunctions library. */
0547         bool m_lazyParsing;                                         /**< It **true**, **Component** suites are lazy parsed. */
0548         bool m_decayPositronium;                                    /**< If **true**, whenever a positron is created, it is assumed to immediately form positronium and decay into 2 511 KeV photons. Ergo, the photons are produced in the reaction and not a positron. */
0549         bool m_usePhotoAtomicIncoherentDoppler;
0550         FissionResiduals m_fissionResiduals;                        /**< This member specifies what fission redisual products will be added to the list of products produced in a fission reaction. */
0551         bool m_GRIN_continuumGammas;                                /**< If true and institution/LLNL::GRIN_continuumGammas are loaded and used in MCGIDI. */
0552 
0553     public:
0554         Settings( ParseMode a_parseMode, PhotoMode a_photoMode );
0555         Settings( Settings const &a_settings );
0556 
0557         ParseMode parseMode( ) const { return( m_parseMode ); }             /**< Returns the value of the *m_parseMode* member. */
0558 
0559         PhotoMode photoMode( ) const { return( m_photoMode ); }             /**< Returns the value of the *m_photoMode* member. */
0560         void setPhotoMode( PhotoMode a_photoMode ) { m_photoMode = a_photoMode; }
0561                                                                             /**< Set the *m_photoMode* member to *a_photoMode*. */
0562 
0563         bool lazyParsing( ) const { return( m_lazyParsing ); }              /**< Returns the value of the *m_lazyParsing* member. */
0564         void setLazyParsing( bool a_lazyParsing ) { m_lazyParsing = a_lazyParsing; }
0565                                                                             /**< Set the *m_lazyParsing* member to *a_lazyParsing*. */
0566 
0567         bool decayPositronium( ) const { return( m_decayPositronium ); }    /**< Returns the value of the *m_decayPositronium* member. */
0568         void setDecayPositronium( bool a_decayPositronium ) { m_decayPositronium = a_decayPositronium; }
0569                                                                             /**< Set the *m_decayPositronium* member to *a_decayPositronium*. */
0570 
0571         FissionResiduals fissionResiduals( ) const { return( m_fissionResiduals ); }    /**< Returns the value of the *m_fissionResiduals* member. */
0572         void setFissionResiduals( FissionResiduals a_fissionResiduals ) { m_fissionResiduals = a_fissionResiduals ; }
0573                                                                             /**< Set the *m_fissionResiduals* member to *a_fissionResiduals*. */
0574 
0575         bool GRIN_continuumGammas( void ) const { return( m_GRIN_continuumGammas ); }   /**< Returns the value of the *m_GRIN_continuumGammas* member. */
0576         void setGRIN_continuumGammas( bool a_GRIN_continuumGammas ) { m_GRIN_continuumGammas = a_GRIN_continuumGammas; }
0577                                                                             /**< Set the *m_GRIN_continuumGammas* member to *a_GRIN_continuumGammas*. */
0578 
0579         int useSystem_strtod( ) const { return( m_useSystem_strtod ); }     /**< Returns the value of the *m_useSystem_strtod* member. */
0580         void setUseSystem_strtod( bool a_useSystem_strtod ) { m_useSystem_strtod = a_useSystem_strtod ? 1 : 0; }
0581                                                                             /**< Set the *m_useSystem_strtod* member to *a_useSystem_strtod*. */
0582 
0583         bool usePhotoAtomicIncoherentDoppler( ) const { return( m_usePhotoAtomicIncoherentDoppler ); }
0584         void setUsePhotoAtomicIncoherentDoppler( bool a_usePhotoAtomicIncoherentDoppler ) { m_usePhotoAtomicIncoherentDoppler = a_usePhotoAtomicIncoherentDoppler; }
0585 };
0586 
0587 }               // End namespace Construction.
0588 
0589 /*
0590 ============================================================
0591 ========================= SetupInfo ========================
0592 ============================================================
0593 */
0594 class SetupInfo {
0595 
0596     public:
0597         ProtareSingle *m_protare;
0598         ParticleSubstitution *m_particleSubstitution;
0599         LUPI::FormatVersion m_formatVersion;
0600         Styles::MultiGroup *m_multiGroup;
0601         Styles::HeatedMultiGroup *m_heatedMultiGroup;
0602         bool m_isENDL_C_9;
0603         int m_outputChannelLevel;
0604         std::string m_initialState;
0605 
0606         SetupInfo( ProtareSingle *a_protare ) :
0607                 m_protare( a_protare ),
0608                 m_particleSubstitution( nullptr ),
0609                 m_formatVersion( ),
0610                 m_multiGroup( nullptr ),
0611                 m_heatedMultiGroup( nullptr ),
0612                 m_isENDL_C_9( false ),
0613                 m_outputChannelLevel( 0 ),
0614                 m_initialState( "" ) {
0615 
0616         }
0617 
0618         SetupInfo( SetupInfo const &a_setupInfo ) :
0619                 m_protare( a_setupInfo.m_protare ),
0620                 m_particleSubstitution( a_setupInfo.m_particleSubstitution ),
0621                 m_formatVersion( a_setupInfo.m_formatVersion ),
0622                 m_multiGroup( a_setupInfo.m_multiGroup ),
0623                 m_heatedMultiGroup( a_setupInfo.m_heatedMultiGroup ),
0624                 m_isENDL_C_9( a_setupInfo.m_isENDL_C_9 ),
0625                 m_outputChannelLevel( a_setupInfo.m_outputChannelLevel ),
0626                 m_initialState( a_setupInfo.m_initialState ) {
0627 
0628         }
0629         ~SetupInfo( ) { }
0630 };
0631 
0632 /*
0633 ============================================================
0634 =========================== Form ===========================
0635 ============================================================
0636 */
0637 class Form : public GUPI::Ancestry {
0638 
0639     friend class Table::Column;
0640 
0641     private:
0642         Suite *m_parent;                        /**< The parent for the form. */
0643         FormType m_type;                        /**< The type of the form. */
0644         std::string m_keyName;                  /**< The key name used when the **Form** resides in a **Suite**. */
0645         mutable std::string m_keyValue;         /**< The value associated with the key. */
0646         std::string m_label;                    /**< The label for the form. */
0647 
0648     public:
0649         Form( FormType a_type );
0650         Form( std::string const &a_moniker, FormType a_type, std::string const &a_label );
0651         Form( HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite = nullptr );
0652         Form( Form const &a_form );
0653         virtual ~Form( );
0654         Form &operator=( Form const &a_rhs );
0655 
0656         Suite *parent( ) const { return( m_parent ); }                                          /**< Returns the value of the *m_parent* member. */
0657 
0658         std::string const &label( ) const { return( m_label ); }                                /**< Returns the value of the *m_label* member. */
0659         void setLabel( std::string const &a_label );
0660         virtual std::string actualMoniker( ) const { return( moniker( ) ); }                    /**< Returns the value of the moniker. */
0661 
0662         std::string const &keyName( ) const ;
0663         void setKeyName( std::string const &a_keyName );
0664         std::string const &keyValue( ) const ;
0665         virtual void setKeyValue( std::string const &a_keyName ) const ;
0666 
0667         FormType type( ) const { return( m_type ); }                                            /**< Returns the value of the *m_type* member. */
0668         Form const *sibling( std::string a_label ) const ;
0669 
0670         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
0671         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
0672         std::string xlinkItemKey( ) const {
0673 
0674             if( m_label == "" ) return( "" );
0675             return( buildXLinkItemKey( GIDI_labelChars, m_label ) );
0676         }                                                                                       /**< Returns the value of *this*'s key. */
0677 };
0678 
0679 /*
0680 ============================================================
0681 ================== LazyParsingHelperForm ===================
0682 ============================================================
0683 */
0684 class LazyParsingHelperForm : public Form {
0685 
0686     private:
0687         Construction::Settings m_construction;
0688         HAPI::Node const m_node;
0689         SetupInfo m_setupInfo;
0690         PoPI::Database const *m_pops;
0691         PoPI::Database const *m_internalPoPs;
0692         std::string m_name;
0693         Styles::Suite const *m_styles;
0694         parseSuite m_parser;
0695 
0696     public:
0697         LazyParsingHelperForm( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node,
0698                 SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, std::string const &a_name,
0699                 Styles::Suite const *a_styles, parseSuite a_parser );
0700         ~LazyParsingHelperForm( );
0701 
0702         std::string actualMoniker( ) const { return( m_name ); }        /**< Returns the value of the *m_name* member which is the moniker of the actual form. */
0703 
0704         Form *parse( );
0705 };
0706 
0707 /*
0708 ============================================================
0709 ===================== PhysicalQuantity =====================
0710 ============================================================
0711 */
0712 class PhysicalQuantity : public Form {
0713 
0714     private:
0715         double m_value;                                                 /**< The value for the physical quantity. */
0716         std::string m_unit;                                             /**< The unit for the physical quantity. */
0717 
0718     public:
0719         PhysicalQuantity( HAPI::Node const &a_node, SetupInfo &a_setupInfo );
0720         PhysicalQuantity( double a_value, std::string const &a_unit );
0721         PhysicalQuantity( PhysicalQuantity const &a_physicalQuantity ) : 
0722                 Form( FormType::physicalQuantity ),
0723                 m_value( a_physicalQuantity.value( ) ),
0724                 m_unit( a_physicalQuantity.unit( ) ) { }
0725         ~PhysicalQuantity( );
0726         PhysicalQuantity &operator=( PhysicalQuantity const &a_rhs );
0727 
0728         double value( ) const { return( m_value ); }                    /**< Returns the value of the *m_value* member. */
0729         std::string const &unit( ) const { return( m_unit ); }          /**< Returns the value of the *m_unit* member. */
0730 
0731         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
0732 
0733         friend std::ostream &operator<<( std::ostream& a_os, PhysicalQuantity const &a_physicalQuantity );
0734 };
0735 
0736 /*
0737 ============================================================
0738 ======================= ParticleInfo =======================
0739 ============================================================
0740 */
0741 class ParticleInfo {
0742 
0743     public:
0744         static std::string const IDPortion( std::string const &a_id );
0745         static std::string const qualifierPortion( std::string const &a_id );
0746 
0747     private:
0748         std::string m_id;                                       /**< The particle's PoPs id. */
0749         std::string m_qualifier;                                /**< The particle's qualifier. For example the "1s1/2" in "Th{1s1/2}". */
0750         std::string m_pid;                                      /**< The same as *m_id* unless particle is an alias, then the final particle's id. */
0751         PhysicalQuantity m_mass;                                /**< The mass of the particle including nuclear excitation energy. */
0752         PhysicalQuantity m_excitationEnergy;                    /**< If the particle is a PoPI::Nuclide or PoPI::Nucleus, this is it nuclear excitation energy. Otherwise, it is 0. */
0753 
0754     public:
0755         ParticleInfo( std::string const &a_id, std::string const &a_pid, double a_mass, double a_excitationEnergy = 0.0 );
0756         ParticleInfo( std::string const &a_id, PoPI::Database const &a_globalPoPs, PoPI::Database const &a_internalPoPs, bool a_requiredInGlobalPoPs );
0757         ParticleInfo( ParticleInfo const &a_particleInfo );
0758         ParticleInfo &operator=( ParticleInfo const &a_rhs );
0759 
0760         std::string const &ID( ) const { return( m_id  ); }                     /**< Returns a const reference to *m_id* member. */
0761         std::string const &qualifier( ) const { return( m_qualifier ); }        /**< Returns a const reference to *m_qualifier**. */
0762         std::string const &pid( ) const { return( m_pid  ); }                   /**< Returns a const reference to *m_pid* member. */
0763         bool isAlias( ) const { return( m_pid != "" ); }                        /**< Returns true if particle id is an alias and false otherwise. */
0764 
0765         PhysicalQuantity const &mass( ) const { return( m_mass ); }             /**< Returns a const reference to *m_mass* member. */
0766         PhysicalQuantity const &excitationEnergy( ) const { return( m_excitationEnergy ); }     /**< Returns a const reference to *m_excitationEnergy* member. */
0767         double mass( std::string const &a_unit ) const ;
0768 };
0769 
0770 /*
0771 ============================================================
0772 ======================== AxisDomain ========================
0773 ============================================================
0774 */
0775 class AxisDomain : public Form {
0776 
0777     private:
0778         double m_minimum;                                           /**< The minimum value for the domain. */
0779         double m_maximum;                                           /**< The maximum value for the domain. */
0780         std::string m_unit;                                         /**< The unit for the domain. */
0781 
0782     public:
0783         AxisDomain( HAPI::Node const &a_node, SetupInfo &a_setupInfo );
0784         AxisDomain( double m_minimum, double m_maximum, std::string const &a_unit );
0785         ~AxisDomain( );
0786 
0787         double minimum( ) const { return( m_minimum ); }            /**< Returns the value of the *m_minimum* member. */
0788         double maximum( ) const { return( m_maximum ); }            /**< Returns the value of the *m_maximum* member. */
0789         std::string const &unit( ) const { return( m_unit ); }      /**< Returns the value of the *m_unit* member. */
0790 
0791         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
0792 };
0793 
0794 /*
0795 ============================================================
0796 =========================== Axis ===========================
0797 ============================================================
0798 */
0799 class Axis : public Form {
0800 
0801     private:
0802         int m_index;                                                            /**< The index for the axis. */
0803         std::string m_unit;                                                     /**< The unit for the axis. */
0804         std::string m_href;                                                     /**< The **GNDS**'s href if instance points to another Axis or Grid instance. */
0805 
0806     public:
0807         Axis( HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type = FormType::axis );
0808         Axis( int a_index, std::string const &a_label, std::string const &a_unit, FormType a_type = FormType::axis );
0809         Axis( Axis const &a_axis );
0810         virtual ~Axis( );
0811 
0812         int index( ) const { return( m_index ); }                               /**< Returns the value of the *m_index* member. */
0813         std::string const &unit( ) const { return( m_unit ); }                  /**< Returns the value of the *m_unit* member. */
0814 
0815         std::string const &href( ) const { return( m_href ); }                  /**< Returns the value of the *m_href* member. */
0816 
0817         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
0818 };
0819 
0820 /*
0821 ============================================================
0822 =========================== Grid ===========================
0823 ============================================================
0824 */
0825 class Grid : public Axis {
0826 
0827     private:
0828         std::string m_style;                                                        /**< The **GNDS grid**'s style. */
0829         std::string m_keyName;                                                      /**< **FIXME**. */
0830         std::string m_keyValue;                                                     /**< **FIXME**. */
0831         std::string m_valueType;                                                    /**< The type of data in m_values. Can be "Integer32". */
0832         std::string m_interpolation;
0833         nf_Buffer<double> m_values;                                                 /**< The **GNDS grid**'s values. */
0834 
0835     public:
0836         Grid( HAPI::Node const &a_node, SetupInfo &a_setupInfo, int a_useSystem_strtod );
0837         Grid( Grid const &a_grid );
0838 
0839         std::size_t size( ) const { return( m_values.size( ) ); }                   /**< Returns the number of values in the *m_values* member. */
0840         inline double &operator[]( std::size_t a_index ) noexcept { return( m_values[a_index] ); }  /**< Returns the value at m_values[a_index]. */
0841 
0842         std::string const &style( ) const { return( m_style ); }                    /**< Returns the value of the *m_style* member. */
0843         std::string keyName( ) const { return( m_keyName ); }                       /**< Returns the value of the *m_keyName* member. */
0844         std::string keyValue( ) const { return( m_keyValue ); }                     /**< Returns the value of the *m_keyValue* member. */
0845         std::string valueType( ) const { return( m_valueType ); }                     /**< Returns the value of the *m_valueType* member. */
0846 
0847         std::string const &interpolation( ) const { return( m_interpolation ); }
0848 
0849         nf_Buffer<double> const &values( ) const { return( m_values ); }          /**< Returns the value of the *m_values* member. */
0850         nf_Buffer<double> const &data( ) const { return( m_values ); }            /**< Returns the value of the *m_values* member. */
0851 
0852         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
0853 };
0854 
0855 /*
0856 ============================================================
0857 =========================== Axes ===========================
0858 ============================================================
0859 */
0860 class Axes : public Form {
0861 
0862     private:
0863         std::vector<Axis *> m_axes;                                                 /**< Stores the list of Axis nodes. */
0864 
0865     public:
0866         Axes( );
0867         Axes( HAPI::Node const &a_node, SetupInfo &a_setupInfo, int a_useSystem_strtod );
0868         Axes( Axes const &a_axes );
0869         ~Axes( );
0870         Axes &operator=( Axes const &a_rhs );
0871 
0872         std::size_t size( ) const { return( m_axes.size( ) ); }                     /**< Returns the number of *Axis* instances in *this*. */
0873         Axis const *operator[]( std::size_t a_index ) const { return( (m_axes[a_index]) ); }    /**< Returns m_axes[a_index]. */
0874         std::size_t dimension( ) const { return( m_axes.size( ) - 1 ); }            /**< Returns the dimension of the instance. */
0875 
0876         void append( Axis *a_axis ) { m_axes.push_back( a_axis ); }                 /**< Appends *a_axis* to the* list of *Axis* nodes. */
0877         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
0878 
0879         static Axes makeAxes( std::vector<std::pair<std::string, std::string>> const &a_labelsAndUnits );
0880 };
0881 
0882 namespace Array {
0883 
0884 /*
0885 ============================================================
0886 ========================= FullArray ========================
0887 ============================================================
0888 */
0889 
0890 class FullArray {
0891 
0892     public:
0893         FullArray( std::vector<std::size_t> const &a_shape );
0894         FullArray( std::vector<std::size_t> const &a_shape, std::vector<double> const &a_flattenedValues );
0895         ~FullArray( ) {}
0896 
0897         std::vector<std::size_t> m_shape;                           /**< The shape of the array. */
0898         std::vector<double> m_flattenedValues;              /**< A *std::vector<double>* representing the flattened arrary. */
0899 
0900         std::size_t size( ) const { return( m_flattenedValues.size( ) ); }
0901 };
0902 
0903 /*
0904 ============================================================
0905 =========================== Array ==========================
0906 ============================================================
0907 */
0908 
0909 class Array : public Form {
0910 
0911     private:
0912         std::vector<std::size_t> m_shape;       /**< The shape of the array. */
0913         std::string m_compression;              /**< The compression of the array. Allowed values are *none*, *diagonal*, *flattened* or *embedded*. */
0914         std::string m_symmetry;                 /**< The symmetry of the array. Allowed values are *none*, *lower* or *upper*. */
0915         std::string m_permutation;              /**< The permutation of the array. Allowed values are *none*, *-1*, and *1*. */
0916         std::string m_storageOrder;             /**< The storage order of the array. Allowed values are *row-major* or *colunn-major*. */
0917         nf_Buffer<double> m_values;             /**< The list of *values* of the array. */
0918         nf_Buffer<int> m_starts;                /**< If *compression* is *flattened*, this is the *starts* node. If *compression* is *diagonal* this is the *startingIndices* node. Otherwise, this member is not used. */
0919         nf_Buffer<int> m_length;                /**< If *compression* is *flattened*, this is the *lengths* node, otherwise, not used. */
0920         nf_Buffer<int> m_offset;                /**< The offset of the array. Only used if *this* array is embedded into another array. */
0921         std::vector<Array *> m_array;           /**< The list of embedded arrays. This is only used if *compression* is *embedded*. */
0922 
0923     public:
0924         Array( HAPI::Node const &a_node, SetupInfo &a_setupInfo, int a_useSystem_strtod );
0925         ~Array( );
0926 
0927         std::size_t dimension( ) const { return( m_shape.size( ) ); }                   /**< Returns the dimension of the array. */
0928         std::size_t size( ) const ;
0929         std::vector<std::size_t> const &shape( ) const { return( m_shape ); }           /**< Returns a const reference to member *m_shape*. */
0930         FullArray constructArray( ) const ;
0931 
0932         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
0933 };
0934 
0935 }               // End namespace Array.
0936 
0937 /*
0938 ============================================================
0939 ====================== FlattenedArrayData ==================
0940 ============================================================
0941 */
0942 class FlattenedArrayData : public Form {
0943 
0944     public:
0945         std::vector<std::size_t> m_shape;                                       /**< The shape of the flattened array. */
0946         std::size_t m_numberOfStarts;                                           /**< The number of start values. */
0947         std::size_t m_numberOfLengths;                                          /**< The number of length values. */
0948         nf_Buffer<int> m_starts;                                                /**< The start values. */
0949         nf_Buffer<int> m_lengths;                                               /**< The length values. */
0950         nf_Buffer<double> m_dValues;                                            /**< The given array data. */
0951 
0952         FlattenedArrayData( HAPI::Node const &a_node, SetupInfo &a_setupInfo, int a_dimensions, int a_useSystem_strtod );
0953         ~FlattenedArrayData( );
0954 
0955         std::vector<std::size_t> const &shape( ) const { return( m_shape ); }
0956         void setToValueInFlatRange( std::size_t a_start, std::size_t a_end, double a_value );
0957         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
0958 };
0959 
0960 /*
0961 ============================================================
0962 ========================= Array3d ==========================
0963 ============================================================
0964 */
0965 class Array3d : public Form {
0966 
0967     private:
0968         FlattenedArrayData m_array;                                             /**< The 3d array as a FlattenedArrayData instance. */
0969 
0970     public:
0971         Array3d( HAPI::Node const &a_node, SetupInfo &a_setupInfo, int a_useSystem_strtod );
0972         ~Array3d( );
0973 
0974         std::size_t size( ) const { return( m_array.m_shape.back( ) ); }        /**< The length of the 3d diminsion. */
0975 
0976         Matrix matrix( std::size_t a_index ) const ;
0977 
0978         void modifiedMultiGroupElasticForTNSL( std::size_t maxTNSL_index );
0979         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const { m_array.toXMLList( a_writeInfo, a_indent ); }
0980 };
0981 
0982 namespace Functions {
0983 
0984 /*
0985 ============================================================
0986 ====================== FunctionForm ======================
0987 ============================================================
0988 */
0989 class FunctionForm : public Form {
0990 
0991     private:
0992         int m_dimension;                                    /**< The dimension of the function (i.e., the number of independent axes. */
0993         Axes m_axes;                                        /**< The axes node for the function. */
0994         ptwXY_interpolation m_interpolation;                /**< The interpolation for functions highest independent axis and its dependent axis. */
0995         std::string m_interpolationString;                  /**< The interpolation for functions highest independent axis and its dependent axis. */
0996         int m_index;                                        /**< Currently not used. */
0997         double m_outerDomainValue;                          /**< If function is part of a higher dimensional function, this is the next higher dimensions domain value. */
0998 
0999     public:
1000         FunctionForm( std::string const &a_moniker, FormType a_type, int a_dimension, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1001         FunctionForm( std::string const &a_moniker, FormType a_type, int a_dimension, Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1002         FunctionForm( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, int a_dimension, Suite *a_suite = nullptr );
1003         FunctionForm( FunctionForm const &a_form );
1004         ~FunctionForm( );
1005         FunctionForm &operator=( FunctionForm const &a_rhs );
1006 
1007         int dimension( ) const { return( m_dimension ); }                                       /**< Returns the value of the *m_dimension* member. */
1008 
1009         int index( ) const { return( m_index ); }                                               /**< Returns the value of the *m_index* member. */
1010         double outerDomainValue( ) const { return( m_outerDomainValue ); }                      /**< Returns the value of the *m_outerDomainValue* member. */
1011         void setOuterDomainValue( double a_outerDomainValue ) { m_outerDomainValue = a_outerDomainValue; }
1012         Axes const &axes( ) const { return( m_axes ); }                                         /**< Returns a const reference to the *m_axes* member. */
1013         Axes &axes( ) { return( m_axes ); }                                                     /**< Returns a reference to the *m_axes* member. */
1014 
1015         ptwXY_interpolation interpolation( ) const { return( m_interpolation ); }               /**< Returns the value of the *m_interpolation* member. */
1016         void setInterpolation( ptwXY_interpolation a_interpolation );
1017         std::string interpolationString( ) const { return( m_interpolationString ); }           /**< Returns the value of the *m_interpolationString* member. */
1018 
1019         virtual double domainMin( ) const = 0;
1020         virtual double domainMax( ) const = 0;
1021 
1022         virtual void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1023         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const { toXMLList_func( a_writeInfo, a_indent, false, false ); }
1024 };
1025 
1026 /*
1027 ============================================================
1028 ======================= Function1dForm =====================
1029 ============================================================
1030 */
1031 class Function1dForm : public FunctionForm {
1032 
1033     public:
1034         Function1dForm( std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1035         Function1dForm( std::string const &a_moniker, FormType a_type, Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1036         Function1dForm( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite = nullptr );
1037         Function1dForm( Function1dForm const &a_form );
1038         ~Function1dForm( );
1039         Function1dForm &operator=( Function1dForm const &a_rhs );
1040 
1041         virtual double evaluate( double a_x1 ) const = 0;
1042         virtual void mapToXsAndAdd( std::size_t a_offset, std::vector<double> const &a_Xs, std::vector<double> &a_results, double a_scaleFactor ) const ;
1043         virtual XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1044 
1045         virtual void write( FILE *a_file, std::string const &a_format ) const ;
1046         void print( std::string const &a_format ) const ;
1047 };
1048 
1049 /*
1050 ============================================================
1051 ========================= Constant1d =======================
1052 ============================================================
1053 */
1054 class Constant1d : public Function1dForm {
1055 
1056     private:
1057         double m_value;                                                 /**< The constant value of the function. */
1058         double m_domainMin;                                             /**< The minimum domain value the function is valid. */
1059         double m_domainMax;                                             /**< The maximum domain value the function is valid. */
1060 
1061     public:
1062         Constant1d( Axes const &a_axes, double value, double a_domainMin, double a_domainMax, int a_index = 0, double a_outerDomainValue = 0.0 );
1063         Constant1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1064         ~Constant1d( );
1065 
1066         double value( ) const { return( m_value ); }                    /**< Returns the value of the *m_value* member. */
1067         double domainMin( ) const { return( m_domainMin ); }            /**< Returns the value of the *m_domainMin* member. */
1068         double domainMax( ) const { return( m_domainMax ); }            /**< Returns the value of the *m_domainMax* member. */
1069 
1070         double evaluate( double a_x1 ) const ;
1071         void mapToXsAndAdd( std::size_t a_offset, std::vector<double> const &a_Xs, std::vector<double> &a_results, double a_scaleFactor ) const ;
1072         XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1073 
1074         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1075 };
1076 
1077 /*
1078 ============================================================
1079 ========================== XYs1d ===========================
1080 ============================================================
1081 */
1082 class XYs1d : public Function1dForm {
1083 
1084     private:
1085         mutable ptwXYPoints *m_ptwXY;                                               /**< The ptwXYPoints instance that stores points and is used to do calculations. */
1086 
1087     public:
1088         XYs1d( );
1089         XYs1d( Axes const &a_axes, ptwXY_interpolation m_interpolation, int a_index = 0, double a_outerDomainValue = 0.0 );
1090         XYs1d( Axes const &a_axes, ptwXY_interpolation m_interpolation, std::vector<double> const &a_values, int a_index = 0, 
1091                 double a_outerDomainValue = 0.0 );
1092         XYs1d( Axes const &a_axes, ptwXY_interpolation m_interpolation, std::vector<double> const &a_xs, 
1093                 std::vector<double> const &a_ys, int a_index = 0, double a_outerDomainValue = 0.0 );
1094         XYs1d( Axes const &a_axes, ptwXYPoints *a_ptwXY, int a_index = 0, double a_outerDomainValue = 0.0 );
1095         XYs1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1096         XYs1d( XYs1d const &a_XYs1d );
1097         ~XYs1d( );
1098         XYs1d &operator=( XYs1d const &a_rhs );
1099 
1100         std::size_t size( ) const { return( static_cast<std::size_t>( ptwXY_length( nullptr, m_ptwXY ) ) ); }   /**< Returns the number of points (i.e., x,y pairs) in this. */
1101         ptwXYPoints const *ptwXY( ) const { return( m_ptwXY ); }                    /**< Returns the value of the *m_ptwXY* member. */
1102         ptwXYPoints *ptwXY( ) { return( m_ptwXY ); }                                /**< Returns the value of the *m_ptwXY* member. */
1103 
1104         std::pair<double, double> operator[]( std::size_t a_index ) const ;
1105         XYs1d operator+( XYs1d const &a_XYs1d ) const ;
1106         XYs1d &operator+=( XYs1d const &a_XYs1d );
1107         XYs1d operator-( XYs1d const &a_XYs1d ) const ;
1108         XYs1d &operator-=( XYs1d const &a_XYs1d );
1109         XYs1d operator*( double a_value ) const ;
1110         XYs1d operator*( XYs1d const &a_XYs1d ) const ;
1111         XYs1d &operator*=( double a_value );
1112         XYs1d &operator*=( XYs1d const &a_XYs1d );
1113 
1114         double domainMin( ) const { return( (*this)[0].first ); }                   /**< Returns first x1 value of this. */
1115         double domainMax( ) const { return( (*this)[size( )-1].first ); }           /**< Returns last x1 value of this. */
1116         std::vector<double> xs( ) const ;
1117         std::vector<double> ys( ) const ;
1118         std::vector<double> ysMappedToXs( std::vector<double> const &a_xs, std::size_t *a_offset ) const ;
1119         XYs1d domainSlice( double a_domainMin, double a_domainMax, bool a_fill ) const ;
1120         XYs1d domainSliceMax( double a_domainMax ) const ;
1121 
1122         double evaluate( double a_x1 ) const ;
1123         void mapToXsAndAdd( std::size_t a_offset, std::vector<double> const &a_Xs, std::vector<double> &a_results, double a_scaleFactor ) const ;
1124         XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1125 
1126         double integrate( double a_dommainMin, double a_dommainMax );
1127         double normalize( );
1128         Xs_pdf_cdf1d toXs_pdf_cdf1d( );
1129 
1130         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1131         void write( FILE *a_file, std::string const &a_format ) const ;
1132 
1133         static XYs1d *makeConstantXYs1d( Axes const &a_axes, double a_domainMin, double a_domainMax, double a_value );
1134 };
1135 
1136 /*
1137 ============================================================
1138 =========================== Ys1d ===========================
1139 ============================================================
1140 */
1141 class Ys1d : public Function1dForm {
1142 
1143     private:
1144         std::size_t m_start;                                /**< The index in the grid for the x1 value for the first y value in *m_Ys*. */
1145         std::vector<double> m_Ys;                           /**< This list of y values. */
1146 
1147     public:
1148         Ys1d( Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index = 0, double a_outerDomainValue = 0.0 );
1149         Ys1d( Axes const &a_axes, ptwXY_interpolation a_interpolation, std::size_t a_start, std::vector<double> const &a_Ys, int a_index = 0, double a_outerDomainValue = 0.0 );
1150         Ys1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1151         Ys1d( Ys1d const &a_Ys1d );
1152         ~Ys1d( );
1153 
1154         std::size_t size( ) const { return( m_Ys.size( ) ); }                           /**< Returns the number of values in *m_Ys*. */
1155 
1156         double operator[]( std::size_t a_index ) const { return( m_Ys[a_index] ); }     /**< Returns the y value at *m_Ys*[a_index]. */
1157         void push_back( double a_y ) { m_Ys.push_back( a_y ); }
1158         Ys1d operator+( Ys1d const &a_Ys1d ) const ;
1159         Ys1d &operator+=( Ys1d const &a_Ys1d );
1160 
1161         double domainMin( ) const ;
1162         double domainMax( ) const ;
1163         std::size_t start( ) const { return( m_start ); }                               /**< Returns the value of the *m_start* member. */
1164         void setStart( std::size_t a_start ) { m_start = a_start; }                     /**< Sets the *m_start* member to *a_start. */
1165         std::size_t length( ) const { return( m_start + m_Ys.size( ) ); }               /**< Returns the sum of m_start and size( ). */
1166         std::vector<double> const &Ys( ) const { return( m_Ys ); }                      /**< Returns a reference to the list of y-values. */
1167         std::vector<double> &Ys( ) { return( m_Ys ); }                                  /**< Returns a reference to the list of y-values. */
1168 
1169         double evaluate( double a_x1 ) const ;
1170         void set( std::size_t a_index, double a_value ) { m_Ys[a_index] = a_value; }    /**< Set the value at *m_Ys*[a_index] to a_value. */
1171 
1172         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1173         void write( FILE *a_file, std::string const &a_format ) const ;
1174 };
1175 
1176 /*
1177 ============================================================
1178 ======================= Polynomial1d =======================
1179 ============================================================
1180 */
1181 class Polynomial1d : public Function1dForm {
1182 
1183     private:
1184         double m_domainMin;                                             /**< The minimum domain value the function is valid. */
1185         double m_domainMax;                                             /**< The maximum domain value the function is valid. */
1186         std::vector<double> m_coefficients;                             /**< The coefficients of the polynomial. */
1187 
1188     public:
1189         Polynomial1d( Axes const &a_axes, double a_domainMin, double a_domainMax, std::vector<double> const &a_coefficients, int a_index = 0, double a_outerDomainValue = 0.0 );
1190         Polynomial1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1191         Polynomial1d( Polynomial1d const &a_polynomial1d );
1192         ~Polynomial1d( );
1193 
1194         double domainMin( ) const { return( m_domainMin ); }                                /**< Returns the value of the *m_domainMin* member. */
1195         double domainMax( ) const { return( m_domainMax ); }                                /**< Returns the value of the *m_domainMax* member. */
1196 
1197         std::vector<double> const &coefficients( ) const { return( m_coefficients ); }      /**< Returns the value of the *m_coefficients* member. */
1198 
1199         double evaluate( double a_x1 ) const ;
1200         void mapToXsAndAdd( std::size_t a_offset, std::vector<double> const &a_Xs, std::vector<double> &a_results, double a_scaleFactor ) const ;
1201         XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1202 
1203         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1204 };
1205 
1206 /*
1207 ============================================================
1208 ========================= Legendre1d =======================
1209 ============================================================
1210 */
1211 class Legendre1d : public Function1dForm {
1212 
1213     private:
1214         std::vector<double> m_coefficients;                                             /**< The Legendre coefficients. */
1215 
1216     public:
1217         Legendre1d( Axes const &a_axes, int a_index = 0, double a_outerDomainValue = 0.0 );
1218         Legendre1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1219         Legendre1d( Legendre1d const &a_Legendre1d );
1220         ~Legendre1d( );
1221 
1222         double domainMin( ) const { return( -1.0 ); }                                   /**< Returns the value of the *domainMin* which is always -1.0. */
1223         double domainMax( ) const { return( 1.0 ); }                                    /**< Returns the value of the *domainMax* which is always 1.0. */
1224 
1225         std::vector<double> const &coefficients( ) const { return( m_coefficients ); }  /**< Returns the value of the *m_coefficients* member. */
1226         std::vector<double> &coefficients( ) { return( m_coefficients ); }              /**< Returns the value of the *m_coefficients* member. */
1227 
1228         double evaluate( double a_x1 ) const ;
1229         XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1230 
1231         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1232 };
1233 
1234 /*
1235 ============================================================
1236 ========================== Gridded1d =======================
1237 ============================================================
1238 */
1239 class Gridded1d : public Function1dForm {
1240 
1241     private:
1242         Vector m_grid;                                                          /**< The grid for the gridded 1d function. Can be a link. */
1243         Vector m_data;                                                          /**< The value of the function on the grid. */
1244 // BRB should have <array compression="flattened"> ... instead of m_data.
1245 
1246     public:
1247         Gridded1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1248         ~Gridded1d( );
1249 
1250         double domainMin( ) const { return( m_grid[0] ); }                      /**< Returns the value of the *domainMin*. */
1251         double domainMax( ) const { return( m_grid[m_grid.size( )-1] ); }       /**< Returns the value of the *domainMax*. */
1252 
1253         Vector const &grid( ) const { return( m_grid ); }                       /**< Returns the value of the *m_grid* member. */
1254         Vector const &data( ) const { return( m_data ); }                       /**< Returns the value of the *m_data* member. */
1255         void setData( Vector const &a_data ) { m_data = a_data; }               /**< Sets the *m_data* member to *a_data*. */
1256 
1257         void modifiedMultiGroupElasticForTNSL( std::size_t a_maxTNSL_index );
1258         double evaluate( double a_x1 ) const ;
1259 
1260         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1261         void write( FILE *a_file, std::string const &a_format ) const ;
1262 };
1263 
1264 /*
1265 ============================================================
1266 ======================== Reference1d =======================
1267 ============================================================
1268 */
1269 class Reference1d : public Function1dForm {
1270 
1271     private:
1272         std::string m_xlink;                                                    /**< Link to the other function. */
1273 
1274     public:
1275         Reference1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1276         ~Reference1d( );
1277 
1278         double domainMin( ) const ;
1279         double domainMax( ) const ;
1280 
1281         std::string const &xlink( ) const { return( m_xlink ); }                /**< Returns the value of the *m_xlink* member. */
1282         double evaluate( double a_x1 ) const ;
1283 
1284         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
1285 };
1286 
1287 /*
1288 ============================================================
1289 ======================= Xs_pdf_cdf1d =======================
1290 ============================================================
1291 */
1292 class Xs_pdf_cdf1d : public Function1dForm {
1293 
1294     private:
1295         std::vector<double> m_xs;                                               /**< List of x1 values. */
1296         std::vector<double> m_pdf;                                              /**< The pdf evaluated at the x1 values. */
1297         std::vector<double> m_cdf;                                              /**< The cdf evaluated at the x1 values. */
1298 // BRB m_xs, m_pdf and m_cdf need to be a class like ListOfDoubles.
1299 
1300     public:
1301         Xs_pdf_cdf1d( );
1302         Xs_pdf_cdf1d( Axes const &a_axes, ptwXY_interpolation a_interpolation, std::vector<double> const &a_Xs, 
1303                 std::vector<double> const &a_pdf, std::vector<double> const &a_cdf, int a_index = 0, double a_outerDomainValue = 0.0 );
1304         Xs_pdf_cdf1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1305         ~Xs_pdf_cdf1d( );
1306         Xs_pdf_cdf1d &operator=( Xs_pdf_cdf1d const &a_rhs );
1307 
1308         double domainMin( ) const { return( m_xs[0] ); }                        /**< Returns the value of the *domainMin*. */
1309         double domainMax( ) const { return( m_xs[m_xs.size( )-1] ); }           /**< Returns the value of the *domainMax*. */
1310 
1311         std::vector<double> const &Xs( ) const { return( m_xs ); }              /**< Returns the value of the *m_xs* member. */
1312         std::vector<double> const &pdf( ) const { return( m_pdf ); }            /**< Returns the value of the *m_pdf* member. */
1313         std::vector<double> const &cdf( ) const { return( m_cdf ); }            /**< Returns the value of the *m_cdf* member. */
1314         double evaluate( double a_x1 ) const ;
1315         XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1316 
1317         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1318 };
1319 
1320 /*
1321 ============================================================
1322 ========================== Regions1d =======================
1323 ============================================================
1324 */
1325 class Regions1d : public Function1dForm {
1326 
1327     private:
1328         std::vector<double> m_Xs;                                               /**< List of *x1* domain values that bounds each region. */
1329         std::vector<Function1dForm *> m_function1ds;                            /**< List of regions. */
1330 
1331     public:
1332         Regions1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1333         ~Regions1d( );
1334 
1335         std::size_t size( ) const { return( m_function1ds.size( ) ); }                          /**< Returns number of regions. */
1336         Function1dForm const *operator[]( std::size_t a_index ) const { return( m_function1ds[a_index] ); } /**< Returns the region at index *a_index* - 1. */
1337 
1338         double domainMin( ) const ;
1339         double domainMax( ) const ;
1340 
1341         void append( Function1dForm *a_function );
1342         double evaluate( double a_x1 ) const ;
1343         void mapToXsAndAdd( std::size_t a_offset, std::vector<double> const &a_Xs, std::vector<double> &a_results, double a_scaleFactor ) const ;
1344         XYs1d *asXYs1d( bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps ) const ;
1345 
1346         std::vector<double> const &Xs( ) const { return( m_Xs ); }                              /**< Returns the value of the *m_Xs* member. */
1347         std::vector<Function1dForm *> const &function1ds( ) const { return( m_function1ds ); }  /**< Returns the value of the *m_function1ds* member. */
1348         std::vector<Function1dForm *> &function1ds( ) { return( m_function1ds ); }              /**< Returns the value of the *m_function1ds* member. */
1349 
1350         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1351         void write( FILE *a_file, std::string const &a_format ) const ;
1352 };
1353 
1354 /*
1355 ============================================================
1356 ========================= Branching1d ======================
1357 ============================================================
1358 */
1359 class Branching1d : public Function1dForm {
1360 
1361     private:
1362         std::string m_initialState;                                         /**< The nuclide level that decays, emitting a photon. */
1363         double m_multiplicity;                                              /**< The average number of photons emitted when transitioning from the initial to the final state. */
1364 
1365     public:
1366         Branching1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1367         ~Branching1d( );
1368 
1369         std::string const &initialState( ) const { return( m_initialState ); }      /**< Returns the value of the *m_initialState* member. */
1370 
1371         double multiplicity( ) const { return( m_multiplicity ); }                  /**< Returns the value of the *m_multiplicity* member. */
1372         double domainMin( ) const ;
1373         double domainMax( ) const ;
1374 
1375         double evaluate( double a_x1 ) const ;
1376 };
1377 
1378 /*
1379 ============================================================
1380 ================ ResonanceBackgroundRegion1d ===============
1381 ============================================================
1382 */
1383 
1384 class ResonanceBackgroundRegion1d : public Function1dForm {
1385 
1386     private:
1387         Function1dForm *m_function1d;                                           /**< The 1-d function representing *this*. */
1388 
1389     public:
1390         ResonanceBackgroundRegion1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1391         ~ResonanceBackgroundRegion1d( );
1392 
1393         double domainMin( ) const ;
1394         double domainMax( ) const ;
1395 
1396         double evaluate( double a_x1 ) const ;
1397 
1398         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1399 };
1400 
1401 /*
1402 ============================================================
1403 =================== ResonanceBackground1d ==================
1404 ============================================================
1405 */
1406 class ResonanceBackground1d : public Function1dForm {
1407 
1408     private:
1409         ResonanceBackgroundRegion1d *m_resolvedRegion;                      /**< The 1-d function for the resolved region. */
1410         ResonanceBackgroundRegion1d *m_unresolvedRegion;                    /**< The 1-d function for the unresolved region. */
1411         ResonanceBackgroundRegion1d *m_fastRegion;                          /**< The 1-d function for the fast region. */
1412 
1413     public:
1414         ResonanceBackground1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1415         ~ResonanceBackground1d( );
1416 
1417         Function1dForm const *resolvedRegion( ) const { return( m_resolvedRegion ); }       /**< Returns the value of the *m_resolvedRegion* member. */
1418         Function1dForm const *unresolvedRegion( ) const { return( m_unresolvedRegion ); }   /**< Returns the value of the *m_unresolvedRegion* member. */
1419         Function1dForm const *fastRegion( ) const { return( m_fastRegion ); }               /**< Returns the value of the *m_fastRegion* member. */
1420 
1421         double domainMin( ) const ;
1422         double domainMax( ) const ;
1423 
1424         double evaluate( double a_x1 ) const ;
1425 
1426         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1427 };
1428 
1429 /*
1430 ============================================================
1431 ================= ResonancesWithBackground1d ===============
1432 ============================================================
1433 */
1434 class ResonancesWithBackground1d : public Function1dForm {
1435 
1436     private:
1437         std::string m_resonances;                                                           /**< The reference to the resonance data for *this*.*/
1438         ResonanceBackground1d m_background;                                                 /**< The background .*/
1439 
1440     public:
1441         ResonancesWithBackground1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1442         ~ResonancesWithBackground1d( );
1443 
1444         double domainMin( ) const { return( m_background.domainMin( ) ); }                  /**< Returns *this* function's domain mimimun value. */
1445         double domainMax( ) const { return( m_background.domainMax( ) ); }                  /**< Returns *this* function's domain mimimun value. */
1446 
1447         double evaluate( double a_x1 ) const { return( m_background.evaluate( a_x1 ) ); }   /**< Returns the value *this* evaluated at *a_x1*. */
1448 
1449         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1450 };
1451 
1452 /*
1453 ============================================================
1454 ================= URR_probabilityTables1d ==================
1455 ============================================================
1456 */
1457 class URR_probabilityTables1d : public Function1dForm {
1458 
1459     private:
1460         Function2dForm *m_function2d;                                                       /**< The URR probability tables. */
1461 
1462     public:
1463         URR_probabilityTables1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1464         ~URR_probabilityTables1d( );
1465 
1466         Function2dForm const *function2d( ) const { return( m_function2d ); }               /**< Returns the pointer to the *m_function2d* member. */
1467 
1468         double domainMin( ) const ;
1469         double domainMax( ) const ;
1470 
1471         double evaluate( double a_x1 ) const ;
1472 
1473         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1474 };
1475 
1476 /*
1477 ============================================================
1478 =============== ThermalNeutronScatteringLaw1d ================
1479 ============================================================
1480 */
1481 class ThermalNeutronScatteringLaw1d : public Function1dForm {
1482 
1483     private:
1484         std::string m_href;                                                 /**< xlink to the IncoherentPhotoAtomicScattering instance under the *m_doubleDifferentialCrossSection* node. */
1485 
1486     public:
1487         ThermalNeutronScatteringLaw1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1488         ~ThermalNeutronScatteringLaw1d( );
1489 
1490         std::string const &href( ) const { return( m_href ); }              /**< Returns the value of the *m_href* member. */
1491 
1492         double domainMin( ) const ;
1493         double domainMax( ) const ;
1494 
1495         double evaluate( double a_x1 ) const ;
1496 };
1497 
1498 /*
1499 ============================================================
1500 ====================== Unspecified1d =======================
1501 ============================================================
1502 */
1503 class Unspecified1d : public Function1dForm {
1504 
1505     public:
1506         Unspecified1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1507         ~Unspecified1d( );
1508 
1509         double domainMin( ) const ;
1510         double domainMax( ) const ;
1511 
1512         double evaluate( double a_x1 ) const ;
1513 
1514         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1515 };
1516 
1517 /*
1518 ============================================================
1519 ======================= Function2dForm =====================
1520 ============================================================
1521 */
1522 class Function2dForm : public FunctionForm {
1523 
1524     public:
1525         Function2dForm( std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1526         Function2dForm( std::string const &a_moniker, FormType a_type, Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1527         Function2dForm( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite = nullptr );
1528         Function2dForm( Function2dForm const &a_form );
1529         ~Function2dForm( );
1530 
1531         virtual double evaluate( double a_x2, double a_x1 ) const = 0;
1532 };
1533 
1534 /*
1535 ============================================================
1536 =========================== XYs2d ==========================
1537 ============================================================
1538 */
1539 class XYs2d : public Function2dForm {
1540 
1541     private:
1542         std::string m_interpolationQualifier;                       /**< The interpolation qualifier for *this*. */
1543         std::vector<double> m_Xs;                                   /**< The list of *x2* values for each function. */
1544         std::vector<Function1dForm *> m_function1ds;                /**< The list of 1d functions. */
1545 
1546     public:
1547         XYs2d( Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index = 0, double a_outerDomainValue = 0.0 );
1548         XYs2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1549         ~XYs2d( );
1550 
1551         std::string interpolationQualifier( ) const { return( m_interpolationQualifier ); }         /**< Returns the value of the *m_interpolationQualifier* member. */
1552         void setInterpolationQualifier( std::string a_interpolationQualifier ) { m_interpolationQualifier = a_interpolationQualifier; }
1553                                                                                                     /**< Sets the *m_interpolationQualifier* member to *a_interpolationQualifier*. */
1554 
1555         double domainMin( ) const ;
1556         double domainMax( ) const ;
1557         double evaluate( double a_x2, double a_x1 ) const ;
1558 
1559         std::vector<double> const &Xs( ) const { return( m_Xs ); }                                  /**< Returns the value of the *m_Xs* member. */
1560         std::vector<Function1dForm *> const &function1ds( ) const { return( m_function1ds ); }      /**< Returns the value of the *m_function1ds* member. */
1561         std::vector<Function1dForm *>       &function1ds( )       { return( m_function1ds ); }      /**< Returns the value of the *m_function1ds* member. */
1562         void append( Function1dForm *a_function1d );
1563 
1564         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1565 };
1566 
1567 /*
1568 ============================================================
1569 ========================= Recoil2d =========================
1570 ============================================================
1571 */
1572 class Recoil2d : public Function2dForm {
1573 
1574     private:
1575         std::string m_xlink;                                        /**< Link to the recoil product. */
1576 
1577     public:
1578         Recoil2d( std::string const &a_label, std::string const &a_href );
1579         Recoil2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1580         ~Recoil2d( );
1581 
1582         double domainMin( ) const ;
1583         double domainMax( ) const ;
1584 
1585         std::string const &xlink( ) const { return( m_xlink ); }    /**< Returns the value of the *m_xlink* member. */
1586         double evaluate( double a_x2, double a_x1 ) const ;
1587         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1588 };
1589 
1590 /*
1591 ============================================================
1592 ========================= Isotropic2d ======================
1593 ============================================================
1594 */
1595 class Isotropic2d : public Function2dForm {
1596 
1597     public:
1598         Isotropic2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1599         ~Isotropic2d( );
1600 
1601         double domainMin( ) const ;
1602         double domainMax( ) const ;
1603 
1604         double evaluate( double a_x2, double a_x1 ) const ;
1605         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, LUPI_maybeUnused bool a_embedded, LUPI_maybeUnused bool a_inRegions ) const { 
1606                 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ) ); }
1607 };
1608 
1609 /*
1610 ============================================================
1611 ======================= DiscreteGamma2d ====================
1612 ============================================================
1613 */
1614 class DiscreteGamma2d : public Function2dForm {
1615 
1616     private:
1617         double m_domainMin;                                             /**< The minimum domain value the function is valid. */
1618         double m_domainMax;                                             /**< The maximum domain value the function is valid. */
1619         double m_value;                                                 /**< The energy of the discrete gamma. */
1620 
1621     public:
1622         DiscreteGamma2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1623         ~DiscreteGamma2d( );
1624 
1625         double domainMin( ) const { return( m_domainMin ); }            /**< Returns the value of the *m_domainMin* member. */
1626         double domainMax( ) const { return( m_domainMax ); }            /**< Returns the value of the *m_domainMax* member. */
1627         double value( ) const { return( m_value ); }                    /**< Returns the value of the *m_value* member. */
1628 
1629         double evaluate( double a_x2, double a_x1 ) const ;
1630         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1631 };
1632 
1633 /*
1634 ============================================================
1635 ======================= PrimaryGamma2d ====================
1636 ============================================================
1637 */
1638 class PrimaryGamma2d : public Function2dForm {
1639 
1640     private:
1641         double m_domainMin;                                             /**< The minimum domain value the function is valid. */
1642         double m_domainMax;                                             /**< The maximum domain value the function is valid. */
1643         double m_value;                                                 /**< The binding energy needed to calculate the energy of the primary gamma. */
1644         std::string m_finalState;                                       /**< The nuclear state the compound is in after the primary photon (gamma) is emitted. */
1645 
1646     public:
1647         PrimaryGamma2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1648         ~PrimaryGamma2d( );
1649 
1650         double domainMin( ) const { return( m_domainMin ); }            /**< Returns the value of the *m_domainMin* member. */
1651         double domainMax( ) const { return( m_domainMax ); }            /**< Returns the value of the *m_domainMax* member. */
1652         double value( ) const { return( m_value ); }                    /**< Returns the value of the *m_value* member. */
1653         std::string const &finalState( ) const { return( m_finalState ); }  /**< Returns a reference to the *m_finalState* member. */
1654 
1655         double evaluate( double a_x2, double a_x1 ) const ;
1656         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1657 };
1658 
1659 /*
1660 ============================================================
1661 =================== GeneralEvaporation2d ===================
1662 ============================================================
1663 */
1664 class GeneralEvaporation2d : public Function2dForm {
1665 
1666     private:
1667         PhysicalQuantity m_U;                                           /**< The *U* value for the general evaporation function. */
1668         Function1dForm *m_theta;                                        /**< The *theta* function for the general evaporation function. */
1669         Function1dForm *m_g;                                            /**< The *g* function for the general evaporation function. */
1670 
1671     public:
1672         GeneralEvaporation2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1673         ~GeneralEvaporation2d( );
1674 
1675         double U( ) const { return( m_U.value( ) ); }                   /**< Returns the GNDS *U* value for *this*. */
1676         Function1dForm const *theta( ) const { return( m_theta ); }     /**< Returns the value of the *m_theta* member. */
1677         Function1dForm const *g( ) const { return( m_g ); }             /**< Returns the value of the *m_g* member. */
1678 
1679         double domainMin( ) const ;
1680         double domainMax( ) const ;
1681 
1682         double evaluate( double a_x2, double a_x1 ) const ;
1683         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1684 };
1685 
1686 /*
1687 ============================================================
1688 ================= SimpleMaxwellianFission2d ================
1689 ============================================================
1690 */
1691 class SimpleMaxwellianFission2d : public Function2dForm {
1692 
1693     private:
1694         PhysicalQuantity m_U;                                           /**< The *U* value for the simple Maxwellian function. */
1695         Function1dForm *m_theta;                                        /**< The *theta* function for the simple Maxwellian function. */
1696 
1697     public:
1698         SimpleMaxwellianFission2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1699         ~SimpleMaxwellianFission2d( );
1700 
1701         double U( ) const { return( m_U.value( ) ); }                   /**< Returns the GNDS *U* value for *this*. */
1702         Function1dForm const *theta( ) const { return( m_theta ); }     /**< Returns the value of the *m_theta* member. */
1703 
1704         double domainMin( ) const ;
1705         double domainMax( ) const ;
1706 
1707         double evaluate( double a_x2, double a_x1 ) const ;
1708         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1709 };
1710 
1711 /*
1712 ============================================================
1713 ====================== Evaporation2d =======================
1714 ============================================================
1715 */
1716 class Evaporation2d : public Function2dForm {
1717 
1718     private:
1719         PhysicalQuantity m_U;                                           /**< The *U* value for the evaporation function. */
1720         Function1dForm *m_theta;                                        /**< The *theta* function for the evaporation function. */
1721 
1722     public:
1723         Evaporation2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1724         ~Evaporation2d( );
1725 
1726         double U( ) const { return( m_U.value( ) ); }                   /**< Returns the *m_U* value for *this*. */
1727         Function1dForm const *theta( ) const { return( m_theta ); }     /**< Returns the value of the *m_theta* member. */
1728 
1729         double domainMin( ) const ;
1730         double domainMax( ) const ;
1731 
1732         double evaluate( double a_x2, double a_x1 ) const ;
1733         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1734 };
1735 
1736 /*
1737 ============================================================
1738 ========================== Watt2d ==========================
1739 ============================================================
1740 */
1741 class Watt2d : public Function2dForm {
1742 
1743     private:
1744         PhysicalQuantity m_U;                                           /**< The *U* value for the Watt function. */
1745         Function1dForm *m_a;                                            /**< The *a* function for the Watt function. */
1746         Function1dForm *m_b;                                            /**< The *b* function for the Watt function. */
1747 
1748     public:
1749         Watt2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1750         ~Watt2d( );
1751 
1752         double U( ) const { return( m_U.value( ) ); }                   /**< Returns the GNDS *U* value for *this*. */
1753         Function1dForm const *a( ) const { return( m_a ); }             /**< Returns the value of the *m_a* member. */
1754         Function1dForm const *b( ) const { return( m_b ); }             /**< Returns the value of the *m_b* member. */
1755 
1756         double domainMin( ) const ;
1757         double domainMax( ) const ;
1758 
1759         double evaluate( double a_x2, double a_x1 ) const ;
1760         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1761 };
1762 
1763 /*
1764 ============================================================
1765 ======================= MadlandNix2d =======================
1766 ============================================================
1767 */
1768 class MadlandNix2d : public Function2dForm {
1769 
1770     private:
1771         PhysicalQuantity m_EFL;                                         /**< The *EFL* value for the Madland/Nix function. */
1772         PhysicalQuantity m_EFH;                                         /**< The *EFH* value for the Madland/Nix function. */
1773         Function1dForm *m_T_M;                                          /**< The *T_M* function for the Madland/Nix function. */
1774 
1775     public:
1776         MadlandNix2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1777         ~MadlandNix2d( );
1778 
1779         double EFL( ) const { return( m_EFL.value( ) ); }               /**< Returns the GNDS *EFL* value for *this*. */
1780         double EFH( ) const { return( m_EFH.value( ) ); }               /**< Returns the GNDS *EFH* value for *this*. */
1781         Function1dForm const *T_M( ) const { return( m_T_M ); }         /**< Returns the value of the *m_T_M* member. */
1782 
1783 
1784         double domainMin( ) const ;
1785         double domainMax( ) const ;
1786 
1787         double evaluate( double a_x2, double a_x1 ) const ;
1788         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1789 };
1790 
1791 /*
1792 ============================================================
1793 =================== Weighted_function2d ====================
1794 ============================================================
1795 */
1796 class Weighted_function2d : public Function2dForm {
1797 
1798     private:
1799         Function1dForm *m_weight;                                       /**< The weight for this function. */
1800         Function2dForm *m_energy;                                       /**< The energy functional. */
1801 
1802     public:
1803         Weighted_function2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1804         ~Weighted_function2d( );
1805 
1806         double domainMin( ) const ;
1807         double domainMax( ) const ;
1808 
1809         Function1dForm const *weight( ) const { return( m_weight ); }       /**< Returns the value of the *m_weight* member. */
1810         Function2dForm const *energy( ) const { return( m_energy ); }       /**< Returns the value of the *m_energy* member. */
1811         double evaluate( double a_x2, double a_x1 ) const ;
1812 };
1813 
1814 /*
1815 ============================================================
1816 ================== WeightedFunctionals2d ===================
1817 ============================================================
1818 */
1819 class WeightedFunctionals2d : public Function2dForm {
1820 
1821     private:
1822         std::vector<Weighted_function2d *> m_weighted_function2d;       /**< The list of Weighted_function2d. */
1823 
1824     public:
1825         WeightedFunctionals2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1826         ~WeightedFunctionals2d( );
1827 
1828         double domainMin( ) const ;
1829         double domainMax( ) const ;
1830 
1831         std::vector<Weighted_function2d *> const &weighted_function2d( ) const { return( m_weighted_function2d ); } /**< Returns the value of the *m_weighted_function2d* member. */
1832         double evaluate( double a_x2, double a_x1 ) const ;
1833 };
1834 
1835 /*
1836 ============================================================
1837 ==================== NBodyPhaseSpace2d =====================
1838 ============================================================
1839 */
1840 class NBodyPhaseSpace2d : public Function2dForm {
1841 
1842     private:
1843         int m_numberOfProducts;                                         /**< The number of products for the NBodyPhaseSpace function. */
1844         PhysicalQuantity m_mass;                                        /**< The mass for the NBodyPhaseSpace function. */
1845 
1846     public:
1847         NBodyPhaseSpace2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1848         ~NBodyPhaseSpace2d( );
1849 
1850         double domainMin( ) const ;
1851         double domainMax( ) const ;
1852 
1853         int numberOfProducts( ) const { return( m_numberOfProducts ); }     /**< Returns the value of the *m_numberOfProducts* member. */
1854         PhysicalQuantity const &mass( ) const { return( m_mass ); }         /**< Returns the value of the *m_mass* member. */
1855 
1856         double evaluate( double a_x2, double a_x1 ) const ;
1857 };
1858 
1859 /*
1860 ============================================================
1861 ========================== Regions2d =======================
1862 ============================================================
1863 */
1864 class Regions2d : public Function2dForm {
1865 
1866     private:
1867         std::vector<double> m_Xs;                                           /**< List of *x2* domain values that bounds each region. */
1868         std::vector<Function2dForm *> m_function2ds;                        /**< List of 2d regions. */
1869 
1870     public:
1871         Regions2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1872         ~Regions2d( );
1873 
1874         double domainMin( ) const ;
1875         double domainMax( ) const ;
1876 
1877         void append( Function2dForm *a_function );
1878         double evaluate( double a_x2, double a_x1 ) const ;
1879 
1880         std::vector<double> const &Xs( ) const { return( m_Xs ); }                                  /**< Returns the value of the *m_Xs* member. */
1881         std::vector<Function2dForm *> const &function2ds( ) const { return( m_function2ds ); }      /**< Returns the value of the *m_function2ds* member. */
1882         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1883 };
1884 
1885 /*
1886 ============================================================
1887 ========================== Gridded2d =======================
1888 ============================================================
1889 */
1890 class Gridded2d : public Function2dForm {
1891 
1892     private:
1893         Array::Array m_array;                                                               /**< The multi-group transfer matrix. */
1894 
1895     public:
1896         Gridded2d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1897         ~Gridded2d( );
1898 
1899         double domainMin( ) const { return( 0.0 ); }                                        /**< Not properly implemented. */
1900         double domainMax( ) const { return( 0.0 ); }                                        /**< Not properly implemented. */
1901         double evaluate( LUPI_maybeUnused double a_x2, LUPI_maybeUnused double a_x1 ) const { return( 0.0 ); }                /**< Not properly implemented. */
1902 
1903         Array::Array const &array( ) const { return( m_array ); }                           /**< Returns the value of the *m_array* member. */
1904 
1905         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
1906 };
1907 
1908 /*
1909 ============================================================
1910 ======================= Function3dForm =====================
1911 ============================================================
1912 */
1913 class Function3dForm : public FunctionForm {
1914 
1915     public:
1916         Function3dForm( std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1917         Function3dForm( std::string const &a_moniker, FormType a_type, Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue );
1918         Function3dForm( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite = nullptr );
1919         Function3dForm( Function3dForm const &a_form );
1920         ~Function3dForm( );
1921 
1922         virtual double evaluate( double a_x3, double a_x2, double a_x1 ) const = 0;
1923 };
1924 
1925 /*
1926 ============================================================
1927 =========================== XYs3d ==========================
1928 ============================================================
1929 */
1930 class XYs3d : public Function3dForm {
1931 
1932     private:
1933         std::string m_interpolationQualifier;                       /**< The interpolation qualifier for *this*. */
1934         std::vector<double> m_Xs;                                   /**< The list of *x3* values for each function. */
1935         std::vector<Function2dForm *> m_function2ds;                /**< The list of 2d functions. */
1936 
1937     public:
1938         XYs3d( Axes const &a_axes, ptwXY_interpolation a_interpolation = ptwXY_interpolationLinLin, int a_index = 0, double a_outerDomainValue = 0.0 );
1939         XYs3d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
1940         ~XYs3d( );
1941 
1942         std::string interpolationQualifier( ) const { return( m_interpolationQualifier ); }         /**< Returns the value of the *m_interpolationQualifier* member. */
1943         void setInterpolationQualifier( std::string a_interpolationQualifier ) { m_interpolationQualifier = a_interpolationQualifier; }
1944                                                                                                     /**< Sets the *m_interpolationQualifier* member to *a_interpolationQualifier*. */
1945 
1946         double domainMin( ) const ;
1947         double domainMax( ) const ;
1948         double evaluate( double a_x3, double a_x2, double a_x1 ) const ;
1949 
1950         std::vector<double> const &Xs( ) const { return( m_Xs ); }                                  /**< Returns the value of the *m_Xs* member. */
1951         std::vector<Function2dForm *> const &function2ds( ) const { return( m_function2ds ); }      /**< Returns a const reference to the *m_function2ds* member. */
1952 
1953         void append( Function2dForm *a_function2d );                                                /**< Appends the 2d function *a_function2d* to the end the *this*. */
1954         void toXMLList_func( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions ) const ;
1955 };
1956 
1957 /*
1958 ============================================================
1959 ========================== Gridded3d =======================
1960 ============================================================
1961 */
1962 class Gridded3d : public Function3dForm {
1963 
1964     private:
1965         Array3d m_data;                                                                 /**< The multi-group transfer matrix. */
1966 
1967     public:
1968         Gridded3d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
1969         ~Gridded3d( );
1970 
1971         double domainMin( ) const { return( 0.0 ); }                                        /**< Not properly implemented. */
1972         double domainMax( ) const { return( 0.0 ); }                                        /**< Not properly implemented. */
1973         double evaluate( LUPI_maybeUnused double a_x3, LUPI_maybeUnused double a_x2, LUPI_maybeUnused double a_x1 ) const { return( 0.0 ); }   /**< Not properly implemented. */
1974 
1975         Array3d const &data( ) const { return( m_data ); }                                  /**< Returns the value of the *m_data* member. */
1976 
1977         void modifiedMultiGroupElasticForTNSL( std::size_t maxTNSL_index );
1978         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
1979 };
1980 
1981 }               // End namespace Functions.
1982 
1983 /*
1984 ============================================================
1985 =========== DoubleDifferentialCrossSection stuff ===========
1986 ============================================================
1987 */
1988 namespace DoubleDifferentialCrossSection {
1989 
1990 /*
1991 ============================================================
1992 ============================= Base =========================
1993 ============================================================
1994 */
1995 class Base : public Form {
1996 
1997     public:
1998         Base( HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_parent );
1999 };
2000 
2001 /*
2002 ============================================================
2003 ================ CoherentPhotoAtomicScattering =============
2004 ============================================================
2005 */
2006 class CoherentPhotoAtomicScattering : public Base {
2007 
2008     private:
2009         Functions::Function1dForm *m_formFactor;                                   /**< The form factor for coherent photo-atomic scattering. */
2010         Functions::Function1dForm *m_realAnomalousFactor;                          /**< The real anomalous factor of coherent photo-atomic scattering. */
2011         Functions::Function1dForm *m_imaginaryAnomalousFactor;                     /**< The imaginary anomalous factor of coherent photo-atomic scattering. */
2012 
2013     public:
2014         CoherentPhotoAtomicScattering( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent );
2015         ~CoherentPhotoAtomicScattering( );
2016 
2017         Functions::Function1dForm *formFactor( ) { return( m_formFactor ); }                                            /**< Returns the value of the *m_formFactor* member. */
2018         Functions::Function1dForm const *formFactor( ) const { return( m_formFactor ); }                                /**< Returns the value of the *m_formFactor* member. */
2019         Functions::Function1dForm *realAnomalousFactor( ) { return( m_realAnomalousFactor ); }                          /**< Returns the value of the *m_realAnomalousFactor* member. */
2020         Functions::Function1dForm const *realAnomalousFactor( ) const { return( m_realAnomalousFactor ); }              /**< Returns the value of the *m_realAnomalousFactor* member. */
2021         Functions::Function1dForm *imaginaryAnomalousFactor( ) { return( m_imaginaryAnomalousFactor ); }                /**< Returns the value of the *m_imaginaryAnomalousFactor* member. */
2022         Functions::Function1dForm const *imaginaryAnomalousFactor( ) const { return( m_imaginaryAnomalousFactor ); }    /**< Returns the value of the *m_imaginaryAnomalousFactor* member. */
2023 };
2024 
2025 /*
2026 ============================================================
2027 ============== IncoherentPhotoAtomicScattering =============
2028 ============================================================
2029 */
2030 class IncoherentPhotoAtomicScattering : public Base {
2031 
2032     private:
2033         Functions::Function1dForm *m_scatteringFactor;                          /**< The scattering factor for incoherent photo-atomic scattering. */
2034 
2035     public:
2036         IncoherentPhotoAtomicScattering( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, 
2037                 PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent );
2038         ~IncoherentPhotoAtomicScattering( );
2039 
2040         Functions::Function1dForm const *scatteringFactor( ) const { return( m_scatteringFactor); }     /**< Returns the value of the *m_scatteringFactor* member. */
2041 };
2042 
2043 /*
2044 =======================================================================
2045 ============== IncoherentBoundToFreePhotoAtomicScattering =============
2046 =======================================================================
2047 */
2048 class IncoherentBoundToFreePhotoAtomicScattering : public Base {
2049 
2050     private:
2051         Functions::Function1dForm *m_ComptonProfile;
2052 
2053     public:
2054         IncoherentBoundToFreePhotoAtomicScattering( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo,
2055                 PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent );
2056         ~IncoherentBoundToFreePhotoAtomicScattering( );
2057 
2058         Functions::Function1dForm *ComptonProfile( ) { return( m_ComptonProfile); }
2059         Functions::Function1dForm const *ComptonProfile( ) const { return( m_ComptonProfile); }
2060 };
2061 
2062 namespace n_ThermalNeutronScatteringLaw {
2063 
2064 /*
2065 ============================================================
2066 ========================== S_table =========================
2067 ============================================================
2068 */
2069 class S_table : public Form {
2070 
2071 
2072     private:
2073         Functions::Function2dForm *m_function2d;           /**< The cumulative scattering factor \f$S(T,E)\f$. */
2074 
2075     public:
2076         S_table( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2077         ~S_table( );
2078 
2079         Functions::Function2dForm *function2d( ) { return( m_function2d ); }                /**< Returns the value of the *m_function2d* member. */
2080         Functions::Function2dForm const *function2d( ) const { return( m_function2d ); }    /**< Returns the value of the *m_function2d* member. */
2081 };
2082 
2083 /*
2084 ============================================================
2085 ====================== CoherentElastic =====================
2086 ============================================================
2087 */
2088 class CoherentElastic : public Base {
2089     
2090     private:
2091         S_table m_S_table;                                                  /**< The cumulative scattering factor \f$S(T,E)\f$. */
2092 
2093     public:
2094         CoherentElastic( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent );
2095         ~CoherentElastic( );
2096 
2097         S_table const &s_table( ) const { return( m_S_table ); }            /**< Returns the value of the *m_S_table* member. */
2098 };
2099 
2100 /*
2101 ============================================================
2102 =================== DebyeWallerIntegral ====================
2103 ============================================================
2104 */
2105 class DebyeWallerIntegral : public Form {
2106 
2107 
2108     private:
2109         Functions::Function1dForm *m_function1d;                        /**< The 1-d function representing the Debye-Waller integral function \f$W(T)\f$. */
2110 
2111     public:
2112         DebyeWallerIntegral( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2113         ~DebyeWallerIntegral( );
2114 
2115         Functions::Function1dForm       *function1d( )       { return( m_function1d ); }       /**< Returns the value of the *m_function1d* member. */
2116         Functions::Function1dForm const *function1d( ) const { return( m_function1d ); }       /**< Returns the value of the *m_function1d* member. */
2117 };
2118 
2119 /*
2120 ============================================================
2121 ====================== IncoherentElastic =====================
2122 ============================================================
2123 */
2124 class IncoherentElastic : public Base {
2125 
2126     private:
2127         PhysicalQuantity m_boundAtomCrossSection;                       /**< The characteristic bound cross section. */
2128         DebyeWallerIntegral m_DebyeWallerIntegral;                      /**< The Debye-Waller integral function \f$W(T)\f$. */
2129 
2130     public:
2131         IncoherentElastic( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent );
2132         ~IncoherentElastic( );
2133 
2134         PhysicalQuantity const &boundAtomCrossSection( ) { return( m_boundAtomCrossSection ); }   /**< Returns the value of the *m_boundAtomCrossSection* member. */
2135         DebyeWallerIntegral const &debyeWallerIntegral( ) const { return( m_DebyeWallerIntegral ); }  /**< Returns the value of the *m_DebyeWallerIntegral* member. */
2136 };
2137 
2138 /*
2139 ============================================================
2140 ========================== Options =========================
2141 ============================================================
2142 */
2143 
2144 class Options : public Form {
2145 
2146     private:
2147         bool m_calculatedAtThermal;                                     /**< If *true* calculate at 0.0253 eV/k. */
2148         bool m_asymmetric;                                              /**< If *true* S(alpha,beta) is asymmetric, otherwise it is symmetric. */
2149 
2150     public:
2151         Options( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2152         ~Options( );
2153 
2154         bool calculatedAtThermal( ) { return( m_calculatedAtThermal ); }    /**< Returns the value of the *m_calculatedAtThermal* member. */
2155         bool asymmetric( ) { return( m_asymmetric ); }                      /**< Returns the value of the *m_asymmetric* member. */
2156 };
2157 
2158 /*
2159 ============================================================
2160 ======================== T_effective =======================
2161 ============================================================
2162 */
2163 class T_effective : public Form {
2164 
2165     private:
2166         Functions::Function1dForm *m_function1d;                               /**< The 1-d function representing effective temperature \f$T_{\rm eff}(T)\f$. */
2167 
2168     public:
2169         T_effective( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2170         ~T_effective( );
2171 
2172         Functions::Function1dForm const *function1d( ) const { return( m_function1d ); }   /**< Returns the value of the *m_function1d* member. */
2173 };
2174 
2175 /*
2176 ============================================================
2177 ====================== ScatteringAtom ======================
2178 ============================================================
2179 */
2180 class ScatteringAtom : public Form {
2181 
2182     private:
2183         PhysicalQuantity m_mass;                                /**< The mass of the atom. */
2184         PhysicalQuantity m_freeAtomCrossSection;                /**< The free atom scattering cross section. */
2185         PhysicalQuantity m_e_critical;                          /**< The energy value above which the static model of elastic scattering is adequate. */
2186         PhysicalQuantity m_e_max;                               /**< The upper energy limit for the constant. */
2187         T_effective m_T_effective;                              /**< The effective temperatures for the shortcollision-time approximation given as a function of moderator temperature for the atom. */
2188 
2189     public:
2190         ScatteringAtom( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2191         ~ScatteringAtom( );
2192 
2193         PhysicalQuantity const &mass( ) const { return( m_mass ); }                                     /**< Returns the value of the *m_mass* member. */
2194         PhysicalQuantity const &freeAtomCrossSection( ) const { return( m_freeAtomCrossSection ); }     /**< Returns the value of the *m_freeAtomCrossSection* member. */
2195         PhysicalQuantity const &e_critical( ) const { return( m_e_critical ); }                         /**< Returns the value of the *m_e_critical* member. */
2196         PhysicalQuantity const &e_max( ) const { return( m_e_max ); }                                   /**< Returns the value of the *m_e_max* member. */
2197         T_effective const &t_effective( ) const { return( m_T_effective ); }                            /**< Returns the value of the *m_T_effective* member. */
2198 };
2199 
2200 /*
2201 ============================================================
2202 ======================= S_alpha_beta =======================
2203 ============================================================
2204 */
2205 class S_alpha_beta : public Form {
2206 
2207     private:
2208         Functions::Function3dForm *m_function3d;                           /**< The \f$S(T,\alpha,\beta)\f$ function. */
2209 
2210     public:
2211         S_alpha_beta( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2212         ~S_alpha_beta( );
2213 
2214         Functions::Function3dForm *function3d( ) { return( m_function3d ); }                   /**< Returns the value of the *m_function3d* member. */
2215 };
2216 
2217 }               // End namespace n_ThermalNeutronScatteringLaw.
2218 
2219 }               // End namespace DoubleDifferentialCrossSection.
2220 
2221 namespace Distributions {
2222 
2223 /*
2224 ============================================================
2225 ========================= Distribution =====================
2226 ============================================================
2227 */
2228 class Distribution : public Form {
2229 
2230     private:
2231         Frame m_productFrame;                                                   /**< The product frame for the distribution form. */
2232 
2233     public:
2234         Distribution( std::string const &a_moniker, FormType a_type, std::string const &a_label, Frame a_productFrame );
2235         Distribution( HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_parent );
2236 
2237         Frame productFrame( ) const { return( m_productFrame ); }               /**< Returns the value of the *m_productFrame* member. */
2238         void toXMLNodeStarter( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2239 };
2240 
2241 /*
2242 ============================================================
2243 ======================= AngularTwoBody =====================
2244 ============================================================
2245 */
2246 class AngularTwoBody : public Distribution {
2247 
2248     private:
2249         Functions::Function2dForm *m_angular;                                              /**< The P(mu|E) distribution as a Function2dForm. */
2250 
2251     public:
2252         AngularTwoBody( std::string const &a_label, Frame a_productFrame, Functions::Function2dForm *a_angular = nullptr );
2253         AngularTwoBody( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2254         ~AngularTwoBody( );
2255 
2256         Functions::Function2dForm const *angular( ) const { return( m_angular ); }         /**< Returns the value of the *m_angular* member as a const pointer. */
2257         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2258 };
2259 
2260 /*
2261 ============================================================
2262 ========================= KalbachMann ======================
2263 ============================================================
2264 */
2265 class KalbachMann : public Distribution {
2266 
2267     private:
2268         Functions::Function2dForm *m_f;                                                    /**< The P(E'|E) distribution as a Function2dForm. */
2269         Functions::Function2dForm *m_r;                                                    /**< The Kalbach/Mann r(E,E') function as a Function2dForm. */
2270         Functions::Function2dForm *m_a;                                                    /**< The Kalbach/Mann a(E,E') function as a Function2dForm. */
2271 
2272     public:
2273         KalbachMann( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2274         ~KalbachMann( );
2275 
2276         Functions::Function2dForm const *f( ) const { return( m_f ); }                     /**< Returns the value of the *m_f* member. */
2277         Functions::Function2dForm const *r( ) const { return( m_r ); }                     /**< Returns the value of the *m_r* member. */
2278         Functions::Function2dForm const *a( ) const { return( m_a ); }                     /**< Returns the value of the *m_a* member. */
2279         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2280 };
2281 
2282 /*
2283 ============================================================
2284 ======================== EnergyAngular =====================
2285 ============================================================
2286 */
2287 class EnergyAngular : public Distribution {
2288 
2289     private:
2290         Functions::Function3dForm *m_energyAngular;                                                /**< The P(E',mu|E) distribution as a Function3dForm. */
2291 
2292     public:
2293         EnergyAngular( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2294         ~EnergyAngular( );
2295 
2296         Functions::Function3dForm const *energyAngular( ) const { return( m_energyAngular ); }     /**< Returns the value of the *m_energyAngular* member. */
2297         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2298 };
2299 
2300 /*
2301 ============================================================
2302 ======================= EnergyAngularMC ====================
2303 ============================================================
2304 */
2305 class EnergyAngularMC : public Distribution {
2306 
2307     private:
2308         Functions::Function2dForm *m_energy;                                               /**< The P(E'|E) distribution as a Function2dForm. */
2309         Functions::Function3dForm *m_energyAngular;                                        /**< The P(mu|E,E') distribution as a Function3dForm. */
2310 
2311     public:
2312         EnergyAngularMC( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2313         ~EnergyAngularMC( );
2314 
2315         Functions::Function2dForm const *energy( ) const { return( m_energy ); }                   /**< Returns the value of the *m_energy* member. */
2316         Functions::Function3dForm const *energyAngular( ) const { return( m_energyAngular ); }     /**< Returns the value of the *m_energyAngular* member. */
2317         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2318 };
2319 
2320 /*
2321 ============================================================
2322 ======================== AngularEnergy =====================
2323 ============================================================
2324 */
2325 class AngularEnergy : public Distribution {
2326 
2327     private:
2328         Functions::Function3dForm *m_angularEnergy;                                                /**< The P(mu,E'|E) distribution as a Function3dForm. */
2329 
2330     public:
2331         AngularEnergy( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2332         ~AngularEnergy( );
2333 
2334         Functions::Function3dForm const *angularEnergy( ) const { return( m_angularEnergy ); }     /**< Returns the value of the *m_angularEnergy* member. */
2335         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2336 };
2337 
2338 /*
2339 ============================================================
2340 ======================= AngularEnergyMC ====================
2341 ============================================================
2342 */
2343 class AngularEnergyMC : public Distribution {
2344 
2345     private:
2346         Functions::Function2dForm *m_angular;                                                      /**< The P(mu|E) distribution as a Function2dForm. */
2347         Functions::Function3dForm *m_angularEnergy;                                                /**< The P(E'|E,mu) distribution as a Function3dForm. */
2348 
2349     public:
2350         AngularEnergyMC( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2351         ~AngularEnergyMC( );
2352 
2353         Functions::Function2dForm const *angular( ) const { return( m_angular ); }                 /**< Returns the value of the *m_angular* member. */
2354         Functions::Function3dForm const *angularEnergy( ) const { return( m_angularEnergy ); }     /**< Returns the value of the *m_angularEnergy* member. */
2355         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2356 };
2357 
2358 /*
2359 ============================================================
2360 ========================= Uncorrelated =====================
2361 ============================================================
2362 */
2363 class Uncorrelated : public Distribution {
2364 
2365     private:
2366         Functions::Function2dForm *m_angular;                                              /**< The P(mu|E) distribution as a Function2dForm. */
2367         Functions::Function2dForm *m_energy;                                               /**< The P(E'|E) distribution as a Function2dForm. */
2368 
2369     public:
2370         Uncorrelated( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2371         ~Uncorrelated( );
2372 
2373         Functions::Function2dForm const *angular( ) const { return( m_angular ); }         /**< Returns the value of the *m_angular* member. */
2374         Functions::Function2dForm const *energy( ) const { return( m_energy ); }           /**< Returns the value of the *m_energy* member. */
2375         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2376 };
2377 
2378 /*
2379 ============================================================
2380 ========================= MultiGroup3d =====================
2381 ============================================================
2382 */
2383 class MultiGroup3d : public Distribution {
2384 
2385     private:
2386         Functions::Gridded3d m_gridded3d;                                              /**< The multi-group Legendre distribution as a Gridded3d instance. */
2387 
2388     public:
2389         MultiGroup3d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2390 
2391         Functions::Gridded3d const &data( ) const { return( m_gridded3d ); }           /**< Returns the value of the *m_gridded3d* member. */
2392         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2393 };
2394 
2395 /*
2396 ============================================================
2397 ====================== LLNLAngularEnergy ===================
2398 ============================================================
2399 */
2400 class LLNLAngularEnergy : public Distribution {
2401 
2402     private:
2403         Functions::Function2dForm *m_angular;                                          /**< The P(mu|E) distribution as a Function2dForm. */
2404         Functions::Function3dForm *m_angularEnergy;                                    /**< The P(E'|E,mu) distribution as a Function3dForm. */
2405 
2406     public:
2407         LLNLAngularEnergy( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2408         ~LLNLAngularEnergy( );
2409 
2410         Functions::Function2dForm const *angular( ) const { return( m_angular ); }                 /**< Returns the value of the *m_angular* member. */
2411         Functions::Function3dForm const *angularEnergy( ) const { return( m_angularEnergy ); }     /**< Returns the value of the *m_angularEnergy* member. */
2412         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2413 };
2414 
2415 /*
2416 ============================================================
2417 ============== CoherentPhotoAtomicScattering ===============
2418 ============================================================
2419 */
2420 class CoherentPhotoAtomicScattering : public Distribution {
2421 
2422     private:
2423         std::string m_href;                                                 /**< xlink to the IncoherentPhotoAtomicScattering instance under the *m_doubleDifferentialCrossSection* node. */
2424 
2425     public:
2426         CoherentPhotoAtomicScattering( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2427 
2428         std::string const &href( ) const { return( m_href ); }                          /**< Returns the value of the *m_href* member. */
2429 };
2430 
2431 /*
2432 ============================================================
2433 ============== IncoherentPhotoAtomicScattering =============
2434 ============================================================
2435 */
2436 class IncoherentPhotoAtomicScattering : public Distribution {
2437 
2438     private:
2439         std::string m_href;                                                 /**< xlink to the IncoherentPhotoAtomicScattering instance under the *m_doubleDifferentialCrossSection* node. */
2440 
2441     public:
2442         IncoherentPhotoAtomicScattering( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2443 
2444         std::string const &href( ) const { return( m_href ); }                          /**< Returns the value of the *m_href* member. */
2445 };
2446 
2447 /*
2448 ============================================================
2449 ======== IncoherentBoundToFreePhotoAtomicScattering ========
2450 ============================================================
2451 */
2452 class IncoherentBoundToFreePhotoAtomicScattering : public Distribution {
2453 
2454     private:
2455         std::string m_href;                                                 /**< xlink to the IncoherentPhotoAtomicScattering instance under the *m_doubleDifferentialCrossSection* node. */
2456 
2457     public:
2458         IncoherentBoundToFreePhotoAtomicScattering( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2459 
2460         std::string const &href( ) const { return( m_href ); }                          /**< Returns the value of the *m_href* member. */
2461 };
2462 
2463 /*
2464 ============================================================
2465 =============== ThermalNeutronScatteringLaw ================
2466 ============================================================
2467 */
2468 class ThermalNeutronScatteringLaw : public Distribution {
2469 
2470     private:
2471         std::string m_href;                                                 /**< xlink to the IncoherentPhotoAtomicScattering instance under the *m_doubleDifferentialCrossSection* node. */
2472 
2473     public:
2474         ThermalNeutronScatteringLaw( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2475 
2476         std::string const &href( ) const { return( m_href ); }                          /**< Returns the value of the *m_href* member. */
2477 };
2478 
2479 /*
2480 ============================================================
2481 ======================== Branching3d =======================
2482 ============================================================
2483 */
2484 class Branching3d : public Distribution {
2485 
2486     private:
2487         std::string m_initialState;                                         /**< The nuclide level that decays, emitting a photon. */
2488 
2489     public:
2490         Branching3d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2491 
2492         std::string const &initialState( ) const { return( m_initialState ); }        /**< Returns the value of the *m_initialState* member. */
2493 };
2494 
2495 /*
2496 ============================================================
2497 ======================= Reference3d ========================
2498 ============================================================
2499 */
2500 class Reference3d : public Distribution {
2501 
2502     private:
2503         std::string m_href;                                                     /**< Link to the other function. */
2504 
2505     public:
2506         Reference3d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2507 
2508         std::string const &href( ) const { return( m_href ); }                  /**< Returns the value of the *m_xlink* member. */
2509         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2510 };
2511 
2512 /*
2513 ============================================================
2514 ================ CoulombPlusNuclearElastic =================
2515 ============================================================
2516 */
2517 
2518 class CoulombPlusNuclearElastic : public Distribution {
2519 
2520     private:
2521         std::string m_href;                                                     /**< Link to the other function. */
2522 
2523     public:
2524         CoulombPlusNuclearElastic( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2525 
2526         std::string const &href( ) const { return( m_href ); }                  /**< Returns the value of the *m_xlink* member. */
2527         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2528 };
2529 
2530 /*
2531 ============================================================
2532 ======================= LLNLLegendre =======================
2533 ============================================================
2534 */
2535 
2536 class LLNLLegendre : public Distribution {
2537 //
2538 // This class is woefully inadequate but some form is needed by the method Product::isCompleteParticle.
2539 //
2540 
2541     public:
2542         LLNLLegendre( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2543 
2544         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2545 };
2546 
2547 /*
2548 ============================================================
2549 ========================= Unspecified ======================
2550 ============================================================
2551 */
2552 class Unspecified : public Distribution {
2553 
2554     public:
2555         Unspecified( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2556 
2557         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2558 };
2559 
2560 }                     // End of namespace Distributions.
2561 
2562 /*
2563 ============================================================
2564 =========================== Suite ==========================
2565 ============================================================
2566 */
2567 class Suite : public GUPI::Ancestry {
2568 
2569     public:
2570         typedef std::vector<Form *> Forms;                              /**< The typedef the the *m_forms* member. */
2571 
2572     private:
2573         std::string m_keyName;                                          /**< The name of the key used to look up items in the suite. */
2574         mutable Forms m_forms;                                          /**< The list of nodes stored within *this*. */
2575         std::map<std::string,std::size_t> m_map;                        /**< A map of *this* node labels to their index in *m_forms*. */
2576         Styles::Suite const *m_styles;                                  /**< The Styles::Suite for the Protare that *this* resides in. */
2577         bool m_allowsLazyParsing;                                       /**< If **true**, the suite allows its elements to be lazy parsed. */
2578         std::string m_href;                                             /**< xlink to the to a Suite that has the elements for this Suite. */
2579 
2580             // FIXME should we make public or private copy constructor?
2581 
2582     public:
2583         Suite( std::string const &a_keyName = GIDI_labelChars );
2584         Suite( std::string const &a_moniker, std::string const &a_keyName );
2585         Suite( Construction::Settings const &a_construction, std::string const &a_moniker, std::string const &a_keyName, HAPI::Node const &a_node, 
2586                         SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, parseSuite a_parseSuite, 
2587                         Styles::Suite const *a_styles, bool a_allowsLazyParsing = false );
2588         ~Suite( );
2589 
2590         std::string const &keyName( ) const { return( m_keyName ); }                        /**< Returns a *const* reference to the *m_keyName* member. */
2591         std::size_t size( ) const { return( m_forms.size( ) ); }                            /**< Returns the number of node contained by *this*. */
2592         typedef Forms::iterator iterator;
2593         typedef Forms::const_iterator const_iterator;
2594         iterator begin( ) { return m_forms.begin( ); }                                      /**< The C++ *begin iterator* for *this*. */
2595         const_iterator begin( ) const { return m_forms.begin( ); }                          /**< The C++ const *begin iterator* for *this*. */
2596         iterator end( ) { return m_forms.end( ); }                                          /**< The C++ *end iterator* for *this*. */
2597         const_iterator end( ) const { return m_forms.end( ); }                              /**< The C++ const *end iterator* for *this*. */
2598         std::size_t operator[]( std::string const &a_label ) const ;
2599         template<typename T> T       *get( std::size_t a_Index );
2600         template<typename T> T const *get( std::size_t a_Index ) const ;
2601         template<typename T> T       *get( std::string const &a_label );
2602         template<typename T> T const *get( std::string const &a_label ) const ;
2603         template<typename T> T *getViaLineage( std::string const &a_label );
2604         template<typename T> T *getViaLineage( std::string const &a_label ) const;
2605         template<typename T> T       *pop( std::size_t a_Index );
2606         template<typename T> T       *pop( std::string const &a_label );
2607 
2608         Styles::Suite const *styles( ) { return( m_styles ); }                              /**< Returns the value of the *m_styles* member. */
2609         std::string const &href( ) const { return( m_href ); }                              /**< Returns a reference to the *m_ref* member. */
2610 
2611         void parse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, 
2612                         parseSuite a_parseSuite, Styles::Suite const *a_styles );
2613         void add( Form *a_form );
2614         iterator find( std::string const &a_label, bool a_convertLazyParsingHelperForm = false );
2615         const_iterator find( std::string const &a_label, bool a_convertLazyParsingHelperForm = false ) const ;
2616         bool has( std::string const &a_label ) const { return( find( a_label ) != m_forms.end( ) ); }
2617         Form *checkLazyParsingHelperForm( std::size_t a_index );
2618         Form *checkLazyParsingHelperForm( std::size_t a_index ) const ;
2619         iterator checkLazyParsingHelperFormIterator( iterator a_iter ) ;
2620         const_iterator checkLazyParsingHelperFormIterator( const_iterator a_iter ) const ;
2621 
2622         void modifiedMultiGroupElasticForTNSL( std::map<std::string,std::size_t> const &a_maximumTNSL_MultiGroupIndex );
2623         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
2624         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
2625         std::vector<iterator> findAllOfMoniker( std::string const &a_moniker ) ;
2626         std::vector<const_iterator> findAllOfMoniker( std::string const &a_moniker ) const ;
2627         Form const *findInstanceOfTypeInLineage( std::string const &_label, std::string const &a_moniker ) const ;
2628         Form       *findInstanceOfTypeInLineage( Styles::Suite const &a_styles, std::string const &_label, std::string const &a_moniker ) ;
2629 
2630         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2631         void printFormLabels( std::string const &a_header ) const ;
2632 };
2633 
2634 /* *********************************************************************************************************//**
2635  * Returns the node at index *a_index*.
2636  *
2637  * @param a_index               [in]    The index of the node to return.
2638  *
2639  * @return                              The node at index *a_index*.
2640  ***********************************************************************************************************/
2641 
2642 template<typename T> T *Suite::get( std::size_t a_index ) {
2643 
2644     Form *__form = checkLazyParsingHelperForm( a_index );
2645     T *object = dynamic_cast<T *>( __form );
2646 
2647     if( object == nullptr ) throw Exception( "GIDI::Suite::get( std::size_t ): invalid cast" );
2648 
2649     return( object );
2650 }
2651 
2652 /* *********************************************************************************************************//**
2653  * Returns the node at index *a_index*.
2654  *
2655  * @param a_index               [in]    The index of the node to return.
2656  *
2657  * @return                              The node at index *a_index*.
2658  ***********************************************************************************************************/
2659 
2660 template<typename T> T const *Suite::get( std::size_t a_index ) const {
2661 
2662     Form *__form = checkLazyParsingHelperForm( a_index );
2663     T *object = dynamic_cast<T *>( __form );
2664 
2665     if( object == nullptr ) throw Exception( "GIDI::Suite::get( std::size_t ): invalid cast" );
2666 
2667     return( object );
2668 }
2669 
2670 /* *********************************************************************************************************//**
2671  * Returns the node with label *a_label*.
2672  *
2673  * @param a_label               [in]    The label of the node to return.
2674  *
2675  * @return                              The node with label *a_label*.
2676  ***********************************************************************************************************/
2677 
2678 template<typename T> T *Suite::get( std::string const &a_label ) {
2679 
2680     auto index = (*this)[a_label];
2681     Form *__form = checkLazyParsingHelperForm( index );
2682     T *object = dynamic_cast<T *>( __form );
2683 
2684     if( object == nullptr ) throw Exception( "GIDI::Suite::get( std::string const & ): invalid cast" );
2685 
2686     return( object );
2687 }
2688 
2689 /* *********************************************************************************************************//**
2690  * Returns the node with label *a_label*.
2691  *
2692  * @param a_label               [in]    The label of the node to return.
2693  *
2694  * @return                              The node with label *a_label*.
2695  ***********************************************************************************************************/
2696 
2697 template<typename T> T const *Suite::get( std::string const &a_label ) const {
2698 
2699     auto index = (*this)[a_label];
2700     Form *__form = checkLazyParsingHelperForm( index );
2701     T *object = dynamic_cast<T *>( __form );
2702 
2703     if( object == nullptr ) throw Exception( "GIDI::Suite::get( std::string const & ): invalid cast" );
2704 
2705     return( object );
2706 }
2707 
2708 /* *********************************************************************************************************//**
2709  * Removes the form at index *a_index* and returns it. It is up to the calling function to delete the form,
2710  * otherwise there will be memory leak.
2711  *
2712  * @param a_index               [in]    The index of the node to return.
2713  *
2714  * @return                              The node at index *a_index*.
2715  ***********************************************************************************************************/
2716 
2717 template<typename T> T *Suite::pop( std::size_t a_index ) {
2718 
2719     Form *__form = checkLazyParsingHelperForm( a_index );
2720     T *object = dynamic_cast<T *>( __form );
2721 
2722     if( object == nullptr ) throw Exception( "GIDI::Suite::pop( std::size_t ): invalid cast" );
2723 
2724     for( std::size_t index = a_index + 1; index < m_forms.size( ); ++index ) {
2725         m_forms[index-1] = m_forms[index];
2726         m_map[m_forms[index-1]->label( )] = index - 1;
2727     }
2728     m_forms.resize( m_forms.size( ) - 1 );
2729 
2730     return( object );
2731 }
2732 
2733 /* *********************************************************************************************************//**
2734  * Removes the form with label *a_label* and returns it. It is up to the calling function to delete the form,
2735  * otherwise there will be memory leak.
2736  *
2737  * @param a_label               [in]    The label of the node to return.
2738  *
2739  * @return                              The node at index *a_label*.
2740  ***********************************************************************************************************/
2741 
2742 template<typename T> T *Suite::pop( std::string const &a_label ) {
2743 
2744     auto index = (*this)[a_label];                           // This will throw an exception if *a_label* is not in *this*.
2745     Form *__form = checkLazyParsingHelperForm( index );
2746     T *object = dynamic_cast<T *>( __form );
2747 
2748     if( object == nullptr ) throw Exception( "GIDI::Suite::pop( std::size_t ): invalid cast" );
2749 
2750     for( std::size_t index2 = index + 1; index2 < m_forms.size( ); ++index2 ) {
2751         m_forms[index2-1] = m_forms[index2];
2752         m_map[m_forms[index2-1]->label( )] = index2 - 1;
2753     }
2754     m_forms.resize( m_forms.size( ) - 1 );
2755 
2756     return( object );
2757 
2758 }
2759 
2760 /*
2761 ============================================================
2762 ======================== Component =========================
2763 ============================================================
2764 */
2765 class Component : public Suite {
2766 
2767     public:
2768         Component( Construction::Settings const &a_construction, std::string const &a_moniker, std::string const &a_keyName, 
2769                         HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, 
2770                         parseSuite a_parseSuite, Styles::Suite const *a_styles );
2771         Component( std::string const &a_moniker, std::string const &a_keyName = GIDI_labelChars );
2772 };
2773 
2774 namespace Table {
2775 
2776 /*
2777 ============================================================
2778 ========================== Column ==========================
2779 ============================================================
2780 */
2781 
2782 class Column : public Form {
2783 
2784     private:
2785         std::string m_index;                                                    /**< The index of the column. */
2786         std::string m_name;                                                     /**< The name of the column. */
2787         std::string m_unit;                                                     /**< The unit of the data in the column. */
2788         std::string m_types;                                                    /**< The types of the data in the column. */
2789 
2790     public:
2791         Column( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
2792         ~Column( );
2793 
2794         std::string const &index( ) const { return( m_index ); }                /**< Returns a *const* reference of the *m_index* member. */
2795         std::string const &name( ) const { return( m_name ); }                  /**< Returns a *const* reference of the *m_name* member. */
2796         std::string const &unit( ) const { return( m_unit ); }                  /**< Returns a *const* reference of the *m_unit* member. */
2797         std::string const &types( ) const { return( m_types ); }                /**< Returns a *const* reference of the *m_types* member. */
2798 
2799         void setKeyValue( std::string const &a_keyName ) const ;
2800 
2801         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2802 };
2803 
2804 /*
2805 ============================================================
2806 =========================== Data ===========================
2807 ============================================================
2808 */
2809 
2810 class Data : public GUPI::Ancestry {
2811 
2812     private:
2813         std::string m_sep;
2814         std::string m_body;
2815 
2816     public:
2817         Data( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2818         ~Data( );
2819 
2820         std::string const &sep( ) const { return( m_sep ); }                      /**< Returns a *const* reference of the *m_sep* member. */
2821         std::string const &body( ) const { return( m_body ); }                    /**< Returns a *const* reference of the *m_body* member. */
2822 
2823         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
2824         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
2825 
2826         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2827 };
2828 
2829 /*
2830 ============================================================
2831 =========================== Table ==========================
2832 ============================================================
2833 */
2834 
2835 class Table : public Form {
2836 
2837     private:
2838         std::size_t m_rows;                             /**< The number of rows in the table. */
2839         std::size_t m_columns;                          /**< The number of columns in the table. */
2840         std::string m_storageOrder;                     /**< The storageOrder for the data in the table. */
2841         Suite m_columnHeaders;                          /**< The column header for the table. */
2842         Data m_data;                                    /**< The data for the table. */
2843 
2844     public:
2845         Table( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2846         ~Table( );
2847 
2848         std::size_t rows( ) const { return( m_rows ); }                             /**< Returns the value of the *m_rows* member. */
2849         std::size_t columns( ) const { return( m_columns ); }                       /**< Returns the value of the *m_columns* member. */
2850         std::string const &storageOrder( ) const { return( m_storageOrder ); }      /**< Returns the value of the *m_storageOrder* member. */
2851         Suite const &columnHeaders( ) const { return( m_columnHeaders ); }          /**< Returns the value of the *m_columnHeaders* member. */
2852         Data const &data( ) const { return( m_data ); }                             /**< Returns the value of the *m_data* member. */
2853 
2854         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2855 };
2856 
2857 }               // End Table namespace.
2858 
2859 /*
2860 ============================================================
2861 =========================== Flux ===========================
2862 ============================================================
2863 */
2864 class Flux : public Form {
2865 
2866     private:
2867         Functions::Function2dForm *m_flux;                                          /**< The flux f(E,mu). */
2868 
2869     public:
2870         Flux( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
2871         ~Flux( );
2872 
2873         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2874 };
2875 
2876 /*
2877 ============================================================
2878 ========================== Group ===========================
2879 ============================================================
2880 */
2881 class Group : public Form {
2882 
2883     private:
2884         Grid m_grid;                                                /**< Multi-group boundaries for this Group. */
2885 
2886     public:
2887         Group( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops );
2888         Group( Group const &a_group );
2889 
2890         std::size_t size( ) const { return( m_grid.size( ) ); }                             /**< Returns the number of multi-group boundaries. */
2891         inline double &operator[]( std::size_t a_index ) { return( m_grid[a_index] ); }     /**< Returns the multi-group boundary at index *a_index*. */
2892         std::vector<double> data( ) const { return( m_grid.data().vector() ); }              /**< Returns the multi-group boundaries. */
2893         Grid const &grid( ) const { return( m_grid ); }                                     /**< Returns the value of the *m_grid* member. */
2894         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2895 };
2896 
2897 /*
2898 ============================================================
2899 ====================== Transportable =======================
2900 ============================================================
2901 */
2902 class Transportable : public Form {
2903 
2904     private:
2905         std::string m_conserve;                                     /**< Conservation flag for the transfer matrices for this particle. Currently, only "*number*" is allowed. */
2906         Group m_group;                                              /**< Multi-group boundaries for this Transportable. */
2907 
2908     public:
2909         Transportable( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, Suite *a_parent );
2910         Transportable( Transportable const &a_transportable );
2911 
2912         std::string pid( ) const { return( label( ) ); }                                    /**< Returns the value of the particle id for the *Transportable*. */
2913         std::string const &conserve( ) const { return( m_conserve ); }                      /**< Returns a const reference to member *m_conserve*. */
2914         Group const &group( ) const { return( m_group ); }                                  /**< Returns the value of the *m_group* member. */
2915         std::vector<double> groupBoundaries( ) const { return( m_group.data( ) ); }         /**< Returns the multi-group boundaries for this transportable particle. */
2916         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
2917 };
2918 
2919 namespace TargetInfo {
2920 
2921 /*
2922 ============================================================
2923 =========================  nuclide =========================
2924 ============================================================
2925 */
2926 
2927 class Nuclide : public GUPI::Entry {
2928 
2929     private:
2930         double m_atomFraction;                              /**< The atom fraction for *this* isotope. */
2931 
2932     public:
2933         Nuclide( HAPI::Node const &a_node );
2934         ~Nuclide( );
2935 
2936         std::string const &pid( ) const { return( keyValue( ) ); }      /**< Returns a const reference to the results of the call to the *keyValue()* method. */
2937         double atomFraction( ) const { return( m_atomFraction ); }      /**< Returns the value of the *m_atomFraction* member. */
2938 
2939         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
2940         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
2941 
2942         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2943 };
2944 
2945 /*
2946 ============================================================
2947 ===================== ChemicalElement =====================
2948 ============================================================
2949 */
2950 
2951 class ChemicalElement : public GUPI::Entry {
2952 
2953     private:
2954         GUPI::Suite m_nuclides;                                     /**< The list of nuclies for the chemical element. */
2955 
2956     public:
2957         ChemicalElement( HAPI::Node const &a_node );
2958         ~ChemicalElement( );
2959 
2960         GUPI::Suite &nuclides( ) { return( m_nuclides ); }
2961         GUPI::Suite const &nuclides( ) const { return( m_nuclides ); }
2962 
2963         std::string const &symbol( ) const { return( keyValue( ) ); }      /**< Returns a const reference to the results of the call to the *keyValue()* method. */
2964         Nuclide const *operator[]( std::string const &a_pid ) const ;
2965         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
2966         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
2967 
2968         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2969 };
2970 
2971 /*
2972 ============================================================
2973 ==================== IsotopicAbundances ====================
2974 ============================================================
2975 */
2976 
2977 class IsotopicAbundances : public GUPI::Ancestry {
2978 
2979     private:
2980         GUPI::Suite m_chemicalElements;
2981 
2982     public:
2983         IsotopicAbundances( );
2984         ~IsotopicAbundances( );
2985         void initialize( HAPI::Node const &a_node );
2986 
2987         GUPI::Suite &chemicalElements( ) { return( m_chemicalElements ); }                      /**< Returns a reference to the *m_chemicalElements* member. */
2988         GUPI::Suite const &chemicalElements( ) const { return( m_chemicalElements ); }          /**< Returns a const reference to the *m_chemicalElements* member. */
2989         ChemicalElement const *operator[]( std::string const &a_symbol ) const ;
2990 
2991         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
2992         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
2993 
2994         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
2995 };
2996 
2997 /*
2998 ============================================================
2999 ========================  TargetInfo =======================
3000 ============================================================
3001 */
3002 
3003 class TargetInfo : public GUPI::Ancestry {
3004 
3005     private:
3006         IsotopicAbundances m_isotopicAbundances;            /**< The list of isotopic abundances for a TNSL protare. */
3007 
3008     public:
3009         TargetInfo( );
3010         ~TargetInfo( );
3011         void parseEvaluatedTargetInfo( HAPI::Node const &a_node );
3012 
3013         IsotopicAbundances const &isotopicAbundances( ) const { return( m_isotopicAbundances ); }    /**< Returns a const reference to the *m_isotopicAbundances* member. */
3014 
3015         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
3016         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
3017 
3018         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
3019 };
3020 
3021 }                       // End of namespace targetInfo.
3022 
3023 /*
3024 ============================================================
3025 ======================= ExternalFile =======================
3026 ============================================================
3027 */
3028 
3029 class ExternalFile : public Form {
3030 
3031     private:
3032         std::string m_path;                         /**< The path to the external file. */
3033 
3034     public:
3035         ExternalFile( std::string const &a_label, std::string const &a_path );
3036         ExternalFile( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3037         ~ExternalFile( );
3038 
3039         std::string const &path( ) const { return( m_path ); }
3040 
3041         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
3042 };
3043 
3044 /*
3045 ============================================================
3046 ==================== Documentation_1_10 ====================
3047 ============================================================
3048 */
3049 
3050 namespace Documentation_1_10 {
3051 
3052 class Documentation : public Form {
3053 
3054     private:
3055         std::string m_label;                /**< The label for the documentation. */
3056         std::string m_text;                 /**< The documentation text. */
3057 
3058     public:
3059         Documentation( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3060         ~Documentation( ) { }
3061 
3062         std::string const &label( ) const { return m_label; }       /**< Returns a const reference to the *m_label* member. */
3063         std::string const &text( ) const { return m_text; }         /**< Returns a const reference to the *m_text* member. */
3064 
3065 };
3066 
3067 /*
3068 ============================================================
3069 =========================== Suite ==========================
3070 ============================================================
3071 */
3072 class Suite : public GIDI::Suite {
3073 
3074     public:
3075         Suite( );
3076 
3077         void parse( HAPI::Node const &a_node, SetupInfo &a_setupInfo );
3078 };
3079 
3080 }                     // End of namespace Documentation_1_10.
3081 
3082 /*
3083 ============================================================
3084 ===================== ExternalFiles stuff ==================
3085 ============================================================
3086 */
3087 
3088 namespace ExternalFiles {
3089 
3090 /*
3091 ============================================================
3092 ========================== Suite ===========================
3093 ============================================================
3094 */
3095 class Suite : public GIDI::Suite {
3096 
3097     public:
3098         void registerBinaryFiles( std::string const &a_parentDir, SetupInfo &a_setupInfo );
3099 
3100 };
3101 
3102 }                     // End of namespace ExternalFiles.
3103 
3104 /*
3105 ============================================================
3106 ========================= Styles stuff =====================
3107 ============================================================
3108 */
3109 
3110 namespace Styles {
3111 
3112 /*
3113 ============================================================
3114 ========================== Base ============================
3115 ============================================================
3116 */
3117 class Base : public Form {
3118 
3119     private:
3120         std::string m_date;                     /**< The GNDS <**date**> attribute. */
3121         std::string m_label;                    /**< The GNDS <**label**> attribute. */
3122         std::string m_derivedStyle;             /**< The GNDS <**derivedFrom**> attribute. */
3123         GUPI::Documentation *m_documentation;
3124 
3125     public:
3126         Base( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3127         ~Base( );
3128 
3129         std::string const &date( ) const { return( m_date ); }                      /**< Returns the value of the *m_date* member. */
3130         std::string const &label( ) const { return( m_label ); }                    /**< Returns the value of the *m_label* member. */
3131         std::string const &derivedStyle( ) const { return( m_derivedStyle ); }      /**< Returns the value of the *m_derivedStyle* member. */
3132         bool hasDocumentation( ) { return ( m_documentation != nullptr ); }
3133         GUPI::Documentation *documentation( ) { return ( m_documentation ); }
3134         virtual PhysicalQuantity const &temperature( ) const = 0;
3135         Base const *getDerivedStyle( ) const ;
3136         Base const *getDerivedStyle( std::string const &a_moniker ) const ;
3137 
3138         std::vector<Base const *> chain( ) const ;
3139         bool isStyleInDerivedForm( Base const *a_style ) const ;
3140 
3141         std::string baseXMLAttributes( GUPI::WriteInfo &a_writeInfo ) const ;
3142 };
3143 
3144 /*
3145 ============================================================
3146 ======================== Evaluated =========================
3147 ============================================================
3148 */
3149 class Evaluated : public Base {
3150 
3151     private:
3152         std::string m_library;                      /**< The GNDS <**library**> attribute. */
3153         std::string m_version;                      /**< The GNDS <**version**> attribute. */
3154         PhysicalQuantity m_temperature;             /**< The GNDS <**temperature**> node data. */
3155         AxisDomain m_projectileEnergyDomain;        /**< The GNDS <**projectileEnergyDomain**> node data. */
3156 
3157     public:
3158         Evaluated( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3159 
3160         PhysicalQuantity const &temperature( ) const { return( m_temperature ); }   /**< Returns the value of the *m_temperature* member. */
3161         AxisDomain const &projectileEnergyDomain( ) const { return( m_projectileEnergyDomain ); }
3162         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3163 };
3164 
3165 /*
3166 ============================================================
3167 ================ CrossSectionReconstructed =================
3168 ============================================================
3169 */
3170 class CrossSectionReconstructed : public Base {
3171 
3172     private:
3173         PhysicalQuantity *m_temperature;            /**< The GNDS <**temperature**> node data. */
3174 
3175     public:
3176         CrossSectionReconstructed( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3177         ~CrossSectionReconstructed( );
3178 
3179         PhysicalQuantity const &temperature( ) const ;
3180         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3181 };
3182 
3183 /*
3184 ============================================================
3185 ============= AngularDistributionReconstructed =============
3186 ============================================================
3187 */
3188 class AngularDistributionReconstructed : public Base {
3189 
3190     private:
3191         PhysicalQuantity *m_temperature;            /**< The GNDS <**temperature**> node data. */
3192 
3193     public:
3194         AngularDistributionReconstructed( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3195         ~AngularDistributionReconstructed( );
3196 
3197         PhysicalQuantity const &temperature( ) const ;
3198         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3199 };
3200 
3201 /*
3202 ============================================================
3203 ============= CoulombPlusNuclearElasticMuCutoff ============
3204 ============================================================
3205 */
3206 class CoulombPlusNuclearElasticMuCutoff : public Base {
3207 
3208     private:
3209         double m_muCutoff;                      /**< The GNDS <**muCutoff**> attribute. */
3210 
3211     public:
3212         CoulombPlusNuclearElasticMuCutoff( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3213 
3214         PhysicalQuantity const &temperature( ) const ;
3215         double muCutoff( ) const { return( m_muCutoff ); }          /**< Returns the value of the *m_muCutoff* member. */
3216         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3217 };
3218 
3219 /*
3220 ============================================================
3221 ======================= Realization ========================
3222 ============================================================
3223 */
3224 class Realization : public Base {
3225 
3226     public:
3227         Realization( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3228 
3229         PhysicalQuantity const & temperature( ) const ;
3230         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3231 };
3232 
3233 /*
3234 ============================================================
3235 =================== AverageProductData =====================
3236 ============================================================
3237 */
3238 class AverageProductData : public Base {
3239 
3240     private:
3241         PhysicalQuantity *m_temperature;            /**< The GNDS <**temperature**> node data. */
3242 
3243     public:
3244         AverageProductData( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3245         ~AverageProductData( );
3246 
3247         PhysicalQuantity const &temperature( ) const ;
3248         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3249 };
3250 
3251 /*
3252 ============================================================
3253 ===================== MonteCarlo_cdf =======================
3254 ============================================================
3255 */
3256 class MonteCarlo_cdf : public Base {
3257 
3258     public:
3259         MonteCarlo_cdf( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3260 
3261         PhysicalQuantity const &temperature( ) const ;
3262         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3263 };
3264 
3265 /*
3266 ============================================================
3267 ======================== MultiGroup ========================
3268 ============================================================
3269 */
3270 class MultiGroup : public Base {
3271 
3272     private:
3273         int m_maximumLegendreOrder;         /**< The GNDS <**lMax**> attribute. */
3274         GIDI::Suite m_transportables;       /**< The GNDS <**transportables**> node. */
3275 
3276     public:
3277         MultiGroup( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, GIDI::Suite *a_parent );
3278         ~MultiGroup( );
3279 
3280         int maximumLegendreOrder( ) const { return( m_maximumLegendreOrder ); }     /**< Returns the value of the *m_maximumLegendreOrder* member. */
3281         PhysicalQuantity const &temperature( ) const ;
3282 
3283         std::vector<double> groupBoundaries( std::string const &a_productID ) const ;
3284         GIDI::Suite const &transportables( ) const { return( m_transportables ); }  /**< Returns the value of the *m_transportables* member. */
3285         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3286 };
3287 
3288 /*
3289 ============================================================
3290 ========================= Heated ===========================
3291 ============================================================
3292 */
3293 class Heated : public Base {
3294 
3295     private:
3296         PhysicalQuantity m_temperature;                                 /**< The GNDS <**temperature**> node data. */
3297 
3298     public:
3299         Heated( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent );
3300         PhysicalQuantity const & temperature( ) const { return( m_temperature ); }  /**< Returns the value of the *m_temperature* member. */
3301         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3302 };
3303 
3304 /*
3305 ============================================================
3306 ===================== HeatedMultiGroup =====================
3307 ============================================================
3308 */
3309 class HeatedMultiGroup : public Base {
3310 
3311     private:
3312         GIDI::Suite m_transportables;                   /**< The GNDS <**transportables**> node. For GNDS 2.0 and above. */
3313         Flux m_flux;                                    /**< The GNDS <**flux**> node. */
3314         Functions::Gridded1d m_inverseSpeed;            /**< The GNDS <**inverseSpeed**> node data. */
3315         std::string m_parameters;                       /**< The GNDS <**parameters**> attribute. Only used for GNDS 1.10. */
3316 
3317     public:
3318         HeatedMultiGroup( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent );
3319         ~HeatedMultiGroup( );
3320 
3321         PhysicalQuantity const &temperature( ) const ;
3322 
3323         GIDI::Suite const &transportables( ) const { return( m_transportables ); }   /**< Returns a const reference to *m_transportables*. */
3324         Transportable const &transportable( std::string const &a_ID ) const ;
3325         std::vector<double> groupBoundaries( std::string const &a_ID ) const ;
3326         Flux const &flux( ) const { return( m_flux ); }                         /**< Returns a const reference to member *m_flux*. */
3327         std::string const &parameters( ) const { return( m_parameters ); }      /**< Returns a const reference to member *m_parameters*. Only used for GNDS 1.10. */
3328 
3329         Vector inverseSpeedData( ) const { return( m_inverseSpeed.data( ) ); }      /**< Returns the value of the *m_inverseSpeed* data. */
3330 
3331         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3332 };
3333 
3334 /*
3335 ============================================================
3336 ==================== SnElasticUpScatter ====================
3337 ============================================================
3338 */
3339 class SnElasticUpScatter : public Base {
3340 
3341     private:
3342         int m_upperCalculatedGroup;             /**< The GNDS <**upperCalculatedGroup**> attribute. */
3343 
3344     public:
3345         SnElasticUpScatter( HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent );
3346         ~SnElasticUpScatter( );
3347 
3348         PhysicalQuantity const &temperature( ) const ;
3349         int upperCalculatedGroup( ) const { return( m_upperCalculatedGroup ); }     /**< Returns the value of the *m_upperCalculatedGroup* data. */
3350         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3351 };
3352 
3353 /*
3354 ============================================================
3355 ==================== GriddedCrossSection ===================
3356 ============================================================
3357 */
3358 class GriddedCrossSection : public Base {
3359 
3360     private:
3361         Grid m_grid;                        /**< The GNDS <**grid**> node. */
3362 
3363     public:
3364         GriddedCrossSection( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent );
3365         ~GriddedCrossSection( );
3366 
3367         PhysicalQuantity const &temperature( ) const ;
3368         Grid const &grid( ) const { return( m_grid ); }     /**< Returns the value of the *m_grid*. */
3369         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3370 };
3371 
3372 /*
3373 ============================================================
3374 =================== URR_probabilityTables ==================
3375 ============================================================
3376 */
3377 class URR_probabilityTables : public Base {
3378 
3379     public:
3380         URR_probabilityTables( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent );
3381         ~URR_probabilityTables( );
3382 
3383         PhysicalQuantity const &temperature( ) const ;
3384         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
3385 };
3386 
3387 /*
3388 ============================================================
3389 ========================== Suite ===========================
3390 ============================================================
3391 */
3392 class Suite : public GIDI::Suite {
3393 
3394     private:
3395         std::vector<Base const *> m_chainEnds;                  /**< The list of all the ends of the style chains. */
3396         std::vector<Base const *> m_preProcessingChainEnds;     /**< The list of all the ends of the pre-processed style chains. */
3397 
3398     public:
3399         Suite( );
3400 
3401         std::string const *findLabelInLineage( GIDI::Suite const &a_suite, std::string const &a_label ) const ;
3402         std::vector< std::vector<Base const *> > chains( bool a_ends ) const ;
3403         void updateChainEnds( );
3404         std::vector<Base const *> const &chainEnds( ) const { return( m_chainEnds ); }  /**< Returns a const reference to the **m_chainEnds** member. */
3405         std::vector<Base const *> const &preProcessingChainEnds( ) const { return( m_preProcessingChainEnds ); }
3406                                                                                         /**< Returns a const reference to the **m_preProcessingChainEnds** member. */
3407 };
3408 
3409 /*
3410 ============================================================
3411 ===================== TemperatureInfo ======================
3412 ============================================================
3413 */
3414 
3415 class TemperatureInfo {
3416 
3417     private:
3418         PhysicalQuantity m_temperature;                 /**< The temperature for this TemperatureInfo. */
3419         std::string m_heatedCrossSection;               /**< The label for the *heatedCrossSection* data for this temperature. */
3420         std::string m_griddedCrossSection;              /**< The label for the *griddedCrossSection* data for this temperature. */
3421         std::string m_URR_probabilityTables;            /**< The label for the *URR_probabilityTables* data for this temperature. */
3422         std::string m_heatedMultiGroup;                 /**< The label for the *heatedMultiGroup* data for this temperature. */
3423         std::string m_SnElasticUpScatter;               /**< The label for the *SnElasticUpScatter* data for this temperature. */
3424 
3425     public:
3426         TemperatureInfo( );
3427         TemperatureInfo( PhysicalQuantity const &a_temperature, std::string const &a_heatedCrossSection, std::string const &a_griddedCrossSection,
3428                 std::string const &a_URR_probabilityTables, std::string const &a_heatedMultiGroup, std::string const &a_SnElasticUpScatter );
3429 
3430         PhysicalQuantity const &temperature( ) const { return( m_temperature ); }                   /**< Returns the value of the *m_temperature*. */
3431         std::string const &heatedCrossSection( ) const { return( m_heatedCrossSection ); }          /**< Returns the value of the *m_heatedCrossSection*. */
3432         std::string const &griddedCrossSection( ) const { return( m_griddedCrossSection ); }        /**< Returns the value of the *m_griddedCrossSection*. */
3433         std::string const &URR_probabilityTables( ) const { return( m_URR_probabilityTables ); }    /**< Returns the value of the *m_URR_probabilityTables*. */
3434         std::string const &heatedMultiGroup( ) const { return( m_heatedMultiGroup ); }              /**< Returns the value of the *m_heatedMultiGroup*. */
3435         std::string const &SnElasticUpScatter( ) const { return( m_SnElasticUpScatter ); }          /**< Returns the value of the *m_SnElasticUpScatter*. */
3436 
3437         void print( ) const ;
3438 };
3439 
3440 typedef std::vector<Styles::TemperatureInfo> TemperatureInfos;
3441 
3442 }               // End of namespace Styles.
3443 
3444 /*
3445 =========================================================
3446 */
3447 template<typename T> T *Suite::getViaLineage( std::string const &a_label ) {
3448 
3449     std::string const *label = m_styles->findLabelInLineage( (Styles::Suite &) *this, a_label );
3450 
3451     return( get<T>( *label ) );
3452 }
3453 
3454 /*
3455 =========================================================
3456 */
3457 template<typename T> T *Suite::getViaLineage( std::string const &a_label ) const {
3458 
3459     std::string const *label = m_styles->findLabelInLineage( (Styles::Suite &) *this, a_label );
3460 
3461     return( get<T>( *label ) );
3462 }
3463 
3464 /*
3465 ============================================================
3466 ==================== Transporting stuff ====================
3467 ============================================================
3468 */
3469 
3470 namespace Transporting {
3471 
3472 class ProcessedFlux;
3473 
3474 enum class Mode { multiGroup, multiGroupWithSnElasticUpScatter, MonteCarloContinuousEnergy };
3475 enum class DelayedNeutrons { off, on };
3476 enum class Conserve { number, energyOut };
3477 
3478 /*
3479 ============================================================
3480 ========================== MultiGroup ======================
3481 ============================================================
3482 */
3483 class MultiGroup {
3484 
3485     private:
3486         std::string m_label;                                        /**< The label for the multi-group. */
3487         std::vector<double> m_boundaries;                           /**< The list of boundaries for the multi-group. */
3488 
3489     public:
3490         MultiGroup( );
3491         MultiGroup( std::string const &a_label, int a_length, double const *a_values );
3492         MultiGroup( std::string const &a_label, std::vector<double> const &a_boundaries );
3493         MultiGroup( Group const &a_group );
3494         MultiGroup( MultiGroup const &a_multiGroup );
3495         ~MultiGroup( );
3496         MultiGroup &operator=( MultiGroup const &a_rhs );
3497 
3498         double operator[]( std::size_t const a_index ) const { return( m_boundaries[a_index] ); }           /**< Returns the multi-group boundary at index *a_index*. */
3499         std::size_t size( ) const { return( m_boundaries.size( ) ); }                               /**< Returns the number of multi-group boundaries. */
3500         std::size_t numberOfGroups( ) const { return( ( m_boundaries.size( ) - 1 ) ); }             /**< Returns the number of multi-group groups. */
3501         std::vector<double> const &boundaries( ) const { return( m_boundaries ); }                  /**< Returns the value of the *m_boundaries* member. */
3502         double const *pointer( ) const { return( &(m_boundaries[0]) ); }                            /**< Returns a pointer to the beginning of the multi-group boundaries. */
3503 
3504         void set( std::string const &a_label, std::vector<double> const &a_boundaries );
3505         std::string const &label( ) const { return( m_label ); }                                    /**< Returns the value of the *m_label* member. */
3506         int multiGroupIndexFromEnergy( double a_energy, bool a_encloseOutOfRange ) const ;
3507         void print( std::string const &a_indent, bool a_outline = false, unsigned int a_valuesPerLine = 10 ) const ;
3508 };
3509 
3510 /*
3511 ============================================================
3512 ==================== Groups_from_bdfls =====================
3513 ============================================================
3514 */
3515 class Groups_from_bdfls {
3516 
3517     private:
3518         std::vector<MultiGroup> m_multiGroups;                                          /**< List of MultiGroup's read in from the bdfls file. */
3519 
3520     public:
3521         Groups_from_bdfls( std::string const &a_fileName );
3522         Groups_from_bdfls( char const *a_fileName );
3523         ~Groups_from_bdfls( );
3524 
3525         MultiGroup viaLabel( std::string const &a_label ) const ;
3526         MultiGroup getViaGID( int a_gid ) const;
3527         std::vector<std::string> labels( ) const;
3528         std::vector<int> GIDs( ) const;
3529         void print( bool a_outline = true, unsigned int a_valuesPerLine = 10 ) const;
3530 
3531     private:
3532         void initialize( char const *a_fileName );
3533 };
3534 
3535 /*
3536 ============================================================
3537 ========================= Flux_order =======================
3538 ============================================================
3539 */
3540 class Flux_order {
3541 
3542     private:
3543         std::size_t m_order;                        /**< The Legendre order of the flux. */
3544         std::vector<double> m_energies;     /**< List of flux energies. */
3545         std::vector<double> m_fluxes;       /**< List of flux values - one for each element of m_energies. */
3546 
3547     public:
3548         Flux_order( std::size_t a_order, std::size_t a_length, double const *a_energies, double const *a_fluxes );
3549         Flux_order( std::size_t a_order, std::vector<double> const &a_energies, std::vector<double> const &a_fluxes );
3550         Flux_order( Flux_order const  &a_fluxOrder  );
3551         ~Flux_order( );
3552 
3553         std::size_t order( ) const { return( m_order ); }                                   /**< Returns the value of the *m_order* member. */
3554         std::size_t size( ) const { return( m_energies.size( ) ); }                   /**< Returns the number of energy, flux pairs. */
3555         double const *energies( ) const { return( &(m_energies[0]) ); }             /**< Returns a pointer to the beginning of the energy data. */
3556         std::vector<double> const &v_energies( ) const { return( m_energies ); }    /**< Returns the value of the *m_energies* member. */
3557         double const *fluxes( ) const { return( &(m_fluxes[0]) ); }                 /**< Returns a pointer to the beginning of the flux data. */
3558         std::vector<double> const &v_fluxes( ) const { return( m_fluxes ); }        /**< Returns the value of the *m_fluxes* member. */
3559         void print( unsigned int a_valuesPerLine = 10 ) const;
3560 };
3561 
3562 /*
3563 ============================================================
3564 ============================ Flux ==========================
3565 ============================================================
3566 */
3567 class Flux {
3568 
3569     private:
3570         std::string m_label;                        /**< Label for the flux. */
3571         double m_temperature;                       /**< Temperature of the material that produced this flux. */
3572         std::vector<Flux_order> m_fluxOrders;       /**< List of fluxes for each Legendre order, *l*, sorted by Legendre order starting with *l* = 0. */
3573 
3574     public:
3575         Flux( std::string const &a_label, double a_temperature_MeV );
3576         Flux( char const *a_label, double a_temperature_MeV );
3577         Flux( Flux const &a_flux );
3578         ~Flux( );
3579 
3580         Flux_order const &operator[]( std::size_t a_order ) const { return( m_fluxOrders[a_order] ); }
3581                                                                                                 /**< Returns the Flux_order for Legendre order *a_order*. */
3582         std::size_t maxOrder( ) const { return( m_fluxOrders.size( ) - 1 ); }                     /**< Returns the maximum number of Legendre orders for *this*. */
3583         std::size_t size( ) const { return( m_fluxOrders.size( ) ); }                           /**< Returns the number of stored Legendre orders. */
3584 
3585         std::string const &label( ) const { return( m_label ); }                                /**< Returns the value of the *m_label* member. */
3586         double temperature( ) const { return( m_temperature ); }                                /**< Returns the value of the *m_temperature* member. */
3587         void addFluxOrder( Flux_order const &a_fluxOrder );
3588         ProcessedFlux process( std::vector<double> const &a_multiGroup ) const ;
3589         void print( std::string const &a_indent, bool a_outline = true, unsigned int a_valuesPerLine = 10 ) const ;
3590 };
3591 
3592 /*
3593 ============================================================
3594 ===================== Fluxes_from_bdfls ====================
3595 ============================================================
3596 */
3597 class Fluxes_from_bdfls {
3598 
3599     private:
3600         std::vector<Flux> m_fluxes;                     /**< The list of Flux read in from the *bdfls* file. */
3601 
3602     public:
3603         Fluxes_from_bdfls( std::string const &a_fileName, double a_temperature_MeV );
3604         Fluxes_from_bdfls( char const *a_fileName, double a_temperature_MeV );
3605         ~Fluxes_from_bdfls( );
3606 
3607         Flux getViaFID( int a_fid ) const ;
3608         Functions::XYs3d *get3dViaFID( int a_fid ) const ;
3609         std::vector<std::string> labels( ) const ;
3610         std::vector<int> FIDs( ) const ;
3611         void print( bool a_outline = true, unsigned int a_valuesPerLine = 10 ) const ;
3612 
3613     private:
3614         void initialize( char const *a_fileName, double a_temperature_MeV );
3615 };
3616 
3617 /*
3618 ============================================================
3619 ======================= ProcessedFlux ======================
3620 ============================================================
3621 */
3622 class ProcessedFlux {
3623 
3624     private:
3625         double m_temperature;                                           /**< The temperature of the material that produced the flux. */
3626         std::vector<double> m_multiGroupFlux;                           /**< The Legendre order = 0 multi-grouped flux. */
3627 
3628     public:
3629         ProcessedFlux( double a_temperature, std::vector<double> const &a_multiGroupFlux );
3630         ProcessedFlux( ProcessedFlux const &a_processedFlux );
3631         ~ProcessedFlux( );
3632 
3633         double temperature( ) const { return( m_temperature ); }                            /**< Returns the value of the *m_temperature* member. */
3634         std::vector<double> const &multiGroupFlux( ) const { return( m_multiGroupFlux ); }  /**< Returns the value of the *m_multiGroupFlux* member. */
3635 };
3636 
3637 /*
3638 ============================================================
3639 ========================= Particle =========================
3640 ============================================================
3641 */
3642 class Particle {
3643 
3644     private:
3645         std::string m_pid;                                                  /**< The PoPs id for the particle. */
3646         Transporting::Mode m_mode;                                          /**< Indicates the type of transport the user is likely, but not guaranteed, to do. */
3647         Transporting::Conserve m_conserve;                                  /**< Indicates the conservation option for this transportable. */
3648         MultiGroup m_multiGroup;                                            /**< Coarse multi-group to collapse to. */
3649         MultiGroup m_fineMultiGroup;                                        /**< Fine multi-group to collapse from. For internal use only. */
3650         std::vector<std::size_t> m_collapseIndices;                         /**< Indices for collapsing to m_multiGroup. */
3651         std::vector<Flux> m_fluxes;                                         /**< One flux for each temperature. */
3652         std::vector<ProcessedFlux> m_processedFluxes;                       /**< One processed flux for each temperature. */
3653 
3654     public:
3655         Particle( std::string const &a_pid, MultiGroup const &a_multiGroup, Functions::Function3dForm const &a_fluxes, 
3656                         Transporting::Mode a_mode = Transporting::Mode::multiGroup );
3657         Particle( std::string const &a_pid, Transporting::Mode a_mode = Transporting::Mode::multiGroup );
3658         Particle( std::string const &a_pid, MultiGroup const &a_multiGroup, Transporting::Mode a_mode = Transporting::Mode::multiGroup );
3659         Particle( Particle const &a_particle );
3660         ~Particle( );
3661 
3662         std::string const &pid( ) const { return( m_pid ); }                                /**< Returns the value of the *m_pid* member. */
3663         Transporting::Mode mode( ) const { return( m_mode ); }                              /**< Returns the value of the *m_mode* member. */
3664         Transporting::Conserve conserve( ) const { return( m_conserve ); }                  /**< Returns the value of the *m_conserve* member. */
3665         int multiGroupIndexFromEnergy( double a_e_in, bool a_encloseOutOfRange ) const { return( m_multiGroup.multiGroupIndexFromEnergy( a_e_in, a_encloseOutOfRange ) ); }
3666                                                                                             /**< Returns the coarse multi-group index corresponding to energy *a_e_in*. See MultiGroup::multiGroupIndexFromEnergy. */
3667         std::size_t numberOfGroups( ) const { return( m_multiGroup.numberOfGroups( ) ); }   /**< Returns the number of coarse multi-group groups. */
3668         MultiGroup multiGroup( ) const { return( m_multiGroup ); }                          /**< Returns the value of the *m_multiGroup* member. */
3669         MultiGroup fineMultiGroup( ) const { return( m_fineMultiGroup ); }                  /**< Returns the value of the *m_fineMultiGroup* member. */
3670         int appendFlux( Flux const &a_flux );
3671         ProcessedFlux const *nearestProcessedFluxToTemperature( double a_temperature ) const;
3672         std::vector<std::size_t> const &collapseIndices( ) const { return( m_collapseIndices ); }   /**< Returns the value of the *m_collapseIndices* member. */
3673 
3674         void process( Transportable const &a_transportable, double a_epsilon = 1e-6 );
3675         void print( std::string const &a_indent ) const ;
3676 };
3677 
3678 /*
3679 ============================================================
3680 ======================== Particles =========================
3681 ============================================================
3682 */
3683 class Particles {
3684 
3685     private:
3686         std::map<std::string, Particle> m_particles;
3687 
3688     public:
3689         Particles( );
3690         ~Particles( );
3691 
3692         std::map<std::string, Particle> &particles( ) { return( m_particles ); }                /**< Returns the value of the *m_particles* member. */
3693         std::map<std::string, Particle> const &particles( ) const { return( m_particles ); }    /**< Returns the value of the *m_particles* member. */
3694         Particle const *particle( std::string const &a_particleID ) const;
3695         bool add( Particle const &a_particle );
3696         bool remove( std::string const &a_particleID );
3697         void clear( ) { m_particles.clear( ); }
3698         bool hasParticle( std::string const &a_id ) const ;
3699 
3700         void process( Protare const &a_protare, std::string const &a_label );
3701 
3702         std::vector<std::string> sortedIDs( bool a_orderIsAscending = true ) const ;
3703 
3704         void print( ) const ;
3705 };
3706 
3707 /*
3708 ============================================================
3709 ========================= Settings =========================
3710 ============================================================
3711 */
3712 class Settings {
3713 
3714     private:
3715         std::string m_projectileID;                                 /**< The PoPs id of the projectile. */
3716         DelayedNeutrons m_delayedNeutrons;                          /**< If **true**, include delayed neutrons when returning or setting up data. */
3717         bool m_nuclearPlusCoulombInterferenceOnly;                  /**< If **true**, for charge particle as projectile and elastic scattering, the Rutherford term is excluded from the elastic reaction. */
3718         bool m_throwOnError;                                        /**< For methods that have an argument of type *LUPI:StatusMessageReporting**, if this member is true, an error will cause a thorw; otherwise, the error will be ignored and reported to the *LUPI:StatusMessageReporting** instance. */
3719         bool m_zeroDepositionIfAllProductsTracked;                  /**< For a reaction, if **true* and all products are tracked, then the deposition energy will be set to zero, independent of that the data may yield. Otherwise, the data results are returned. */
3720 
3721     public:
3722         Settings( std::string const &a_projectileID, DelayedNeutrons a_delayedNeutrons );
3723         ~Settings( );
3724 
3725         std::string const &projectileID( ) const { return( m_projectileID ); }                                      /**< Returns the value of the *m_projectileID* member. */
3726 
3727         DelayedNeutrons delayedNeutrons( ) const { return( m_delayedNeutrons ); }                                   /**< Returns the value of the *m_delayedNeutrons* member. */
3728         void setDelayedNeutrons( DelayedNeutrons a_delayedNeutrons ) { m_delayedNeutrons = a_delayedNeutrons; }     /**< Sets the *m_delayedNeutrons* member to *a_delayedNeutrons*. */
3729 
3730         bool nuclearPlusCoulombInterferenceOnly( ) const { return( m_nuclearPlusCoulombInterferenceOnly ); }        /**< Returns the value of the *m_nuclearPlusCoulombInterferenceOnly* member. */
3731         void setNuclearPlusCoulombInterferenceOnly( bool a_nuclearPlusCoulombInterferenceOnly )
3732             { m_nuclearPlusCoulombInterferenceOnly = a_nuclearPlusCoulombInterferenceOnly; }                        /**< Sets the *m_nuclearPlusCoulombInterferenceOnly* to *a_nuclearPlusCoulombInterferenceOnly*. */
3733 
3734         bool zeroDepositionIfAllProductsTracked( ) const { return( m_zeroDepositionIfAllProductsTracked ); }        /**< Returns the value of the *m_zeroDepositionIfAllProductsTracked* member. */
3735         void setZeroDepositionIfAllProductsTracked( bool a_zeroDepositionIfAllProductsTracked ) 
3736             { m_zeroDepositionIfAllProductsTracked = a_zeroDepositionIfAllProductsTracked; }                        /**< Sets the *m_zeroDepositionIfAllProductsTracked* to *a_zeroDepositionIfAllProductsTracked*. */
3737 
3738         bool throwOnError( ) const { return( m_throwOnError ); }
3739         void setThrowOnError( bool a_throwOnError ) { m_throwOnError = a_throwOnError; }
3740 
3741         Vector multiGroupZeroVector( Particles const &a_particles, bool a_collapse = true ) const ;
3742         Matrix multiGroupZeroMatrix( Particles const &a_particles, std::string const &a_particleID, bool a_collapse = true ) const ;
3743 
3744 //        void print( ) const ;
3745 };
3746 
3747 /*
3748 ============================================================
3749 ============================ MG ============================
3750 ============================================================
3751 */
3752 class MG : public Settings {
3753 
3754     private:
3755         Mode m_mode;                                    /**< Specifies the type of data to use or retrieve for transport codes. */
3756         bool m_useMultiGroupSummedData;                 /**< If **true** and multi-grouped summed data available in protare, use it instead of summing data over reactions. */
3757 
3758     public:
3759         MG( std::string const &a_projectileID, Mode a_mode, DelayedNeutrons a_delayedNeutrons );
3760 
3761         Mode mode( ) const { return( m_mode ); }                /**< Returns the value of the *m_mode* member. */
3762         void setMode( Mode a_mode ) { m_mode = a_mode; }        /**< Sets the *m_mode* member to *a_mode*. */
3763 
3764         bool useMultiGroupSummedData( ) const { return( m_useMultiGroupSummedData ); }  /**< Returns the value of the *m_useMultiGroupSummedData* member. */
3765         void setUseMultiGroupSummedData( bool a_useMultiGroupSummedData ) { m_useMultiGroupSummedData = a_useMultiGroupSummedData; }
3766                                                                 /**< Sets the *m_useMultiGroupSummedData* member to *a_useMultiGroupSummedData*. */
3767 
3768         Form const *form( LUPI::StatusMessageReporting &a_smr, GIDI::Suite const &a_suite, Styles::TemperatureInfo const &a_temperatureInfo,
3769                 std::string a_dataType, std::string const &a_label = "" ) const ;
3770 };
3771 
3772 }           // End of namespace Transporting.
3773 
3774 namespace GRIN {
3775 
3776 /*
3777 ============================================================
3778 ================= InelasticIncidentEnergy ==================
3779 ============================================================
3780 */
3781 
3782 class InelasticIncidentEnergy : public Form {
3783 
3784     private:
3785         double m_energy;
3786         std::string m_unit;
3787         Table::Table m_table;
3788 
3789     public:
3790         InelasticIncidentEnergy( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
3791         ~InelasticIncidentEnergy( );
3792 
3793         double energy( ) const { return( m_energy ); }
3794         std::string const &unit( ) const { return( m_unit ); }
3795         Table::Table const &table( ) const { return( m_table ); }
3796 };
3797 
3798 /*
3799 ============================================================
3800 ================= CaptureLevelProbability ==================
3801 ============================================================
3802 */
3803 
3804 class CaptureLevelProbability : public Form {
3805 
3806     private:
3807         double m_probabilty;
3808         double m_spin;
3809         std::string m_spinUnit;
3810         int m_parity;
3811         std::string m_capturePrimaryToContinua;
3812         Table::Table m_table;
3813 
3814     public:
3815         CaptureLevelProbability( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
3816         ~CaptureLevelProbability( );
3817 
3818         double probabilty( ) const { return( m_probabilty ); }
3819         double spin( ) const { return( m_spin ); }
3820         std::string const &spinUnit( ) const { return( m_spinUnit ); }
3821         int parity( ) const { return( m_parity ); }
3822         std::string const &capturePrimaryToContinua( ) const { return( m_capturePrimaryToContinua ); }
3823         Table::Table const &table( ) const { return( m_table ); }
3824 };
3825 
3826 /*
3827 ============================================================
3828 =================== GRIN_continuumGammas ===================
3829 ============================================================
3830 */
3831 
3832 class GRIN_continuumGammas : public GUPI::Ancestry {
3833 
3834     private:
3835         PhysicalQuantity m_captureNeutronSeparationEnergy;
3836         PhysicalQuantity m_maximumCaptureIncidentEnergy;
3837         PoPI::Database m_pops;
3838         Suite m_inelasticIncidentEnergies;
3839         Suite m_captureLevelProbabilities;
3840         std::string m_captureResidualId;                                                /**< The GNDS PoPs' id of the heavy capture residual particle. */
3841         int m_captureResidualIntid;                                                     /**< The intid of the heavy capture residual particle. */
3842         int m_captureResidualIndex;                                                     /**< The PoPI index of the heavy capture residual particle. */
3843         double m_captureResidualMass;                                                   /**< The mass if the heavy capture residual particle. */
3844 
3845     public:
3846         GRIN_continuumGammas( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, 
3847                 PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, ProtareSingle const &a_protare, Styles::Suite const *a_styles );
3848         ~GRIN_continuumGammas( );
3849 
3850         PhysicalQuantity const &captureNeutronSeparationEnergy( ) const { return( m_captureNeutronSeparationEnergy ); }
3851         PhysicalQuantity const &maximumCaptureIncidentEnergy( ) const { return( m_maximumCaptureIncidentEnergy ); }
3852         PoPI::Database const &pops( ) const { return( m_pops ); }
3853         Suite const &inelasticIncidentEnergies( ) const { return( m_inelasticIncidentEnergies ); }
3854         Suite const &captureLevelProbabilities( ) const { return( m_captureLevelProbabilities ); }
3855         std::string captureResidualId( ) const { return( m_captureResidualId ); }       /**< Returns the value of the *m_captureResidualId* member. */
3856         int captureResidualIntid( ) const { return( m_captureResidualIntid ); }         /**< Returns the value of the *m_captureResidualIntid* member. */
3857         int captureResidualIndex( ) const { return( m_captureResidualIndex ); }         /**< Returns the value of the *m_captureResidualIndex* member. */
3858         double captureResidualMass( ) const { return( m_captureResidualMass ); }        /**< Returns the value of the *m_captureResidualMass* member. */
3859 
3860         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
3861         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
3862 };
3863 
3864 }               // End of namespace GRIN.
3865 
3866 /*
3867 ============================================================
3868 ========================= Product ==========================
3869 ============================================================
3870 */
3871 class Product : public Form {
3872 
3873     private:
3874         ParticleInfo m_particle;                    /**< The products *ParticleInfo* data. */
3875         ParticleInfo m_GNDS_particle;               /**< The products *ParticleInfo* data. This is the product's equivalent of the Protare::m_GNDS_target member. */
3876 
3877         int m_productMultiplicity;                  /**< Product integer multiplicity (e.g., 0, 1, 2, ...) or -1 if energy dependent or not an integer. */
3878         bool m_treatProductAsIfInfinityMass;        /**< If **true**, the product is photo-atomic or TNSL target and should be handled as if it has infinite mass. Ths is, energy and momentum data are returned with 0 value. */
3879         Component m_multiplicity;                   /**< The GNDS <**multiplicity**> node. */
3880         Component m_distribution;                   /**< The GNDS <**distribution**> node. */
3881         Component m_averageEnergy;                  /**< The GNDS <**averageEnergy**> node. */
3882         Component m_averageMomentum;                /**< The GNDS <**averageMomentum**> node. */
3883         OutputChannel *m_outputChannel;             /**< The GNDS <**outputChannel**> node if present. */
3884 
3885     public:
3886         Product( PoPI::Database const &a_pops, std::string const &a_productID, std::string const &a_label );
3887         Product( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, 
3888                 PoPI::Database const &a_internalPoPs, Suite *a_parent, Styles::Suite const *a_styles );
3889         ~Product( );
3890 
3891         ParticleInfo const &particle( ) const { return( m_particle ); }                     /**< Returns the value of the *m_particle* member. */
3892         void setParticle( ParticleInfo const &a_particle ) { m_particle = a_particle; }     /**< Sets *m_particle* to *a_particle*. */
3893         std::string pid( ) const { return( m_particle.ID( ) ); }
3894         ParticleInfo const &GNDS_particle( ) const { return( m_GNDS_particle ); }           /**< Returns a const reference to the *m_GNDS_particle* member. */
3895         ParticleInfo &GNDS_particle( ) { return( m_GNDS_particle ); }                       /**< Returns the value of the *m_GNDS_particle* member. */
3896         int depth( ) const ;
3897 
3898         Component &multiplicity( ) { return( m_multiplicity ); }                            /**< Returns a reference to the *m_multiplicity* member. */
3899         Component const &multiplicity( ) const { return( m_multiplicity ); }                /**< Returns a const reference to the *m_multiplicity* member. */
3900         Component &distribution( ) { return( m_distribution ); }                            /**< Returns a reference to the *m_distribution* member. */
3901         Component const &distribution( ) const { return( m_distribution ); }                /**< Returns a reference to the *m_distribution* member. */
3902         Component &averageEnergy( ) { return( m_averageEnergy ); }                          /**< Returns a reference to the *m_averageEnergy* member. */
3903         Component const &averageEnergy( ) const { return( m_averageEnergy ); }              /**< Returns a const reference to the *m_averageEnergy* member. */
3904         Component &averageMomentum( ) { return( m_averageMomentum ); }                      /**< Returns a reference to the *m_averageMomentum* member. */
3905         Component const &averageMomentum( ) const { return( m_averageMomentum ); }          /**< Returns a const reference to the *m_averageMomentum* member. */
3906         OutputChannel *outputChannel( ) const { return( m_outputChannel ); }                /**< Returns a reference to the *m_outputChannel* member. */
3907 
3908         void modifiedMultiGroupElasticForTNSL( std::map<std::string,std::size_t> const &a_maximumTNSL_MultiGroupIndex );
3909 
3910         bool hasFission( ) const ;
3911         bool isDelayedFissionNeutronComplete( bool a_isDelayedNeutron ) const ;
3912         bool areAllProductsTracked( Transporting::Particles const &a_particles ) const ;
3913 
3914         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
3915         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
3916         void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
3917         int productMultiplicity( std::string const &a_productID ) const ;
3918         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
3919                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
3920 
3921         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
3922                         bool a_final ) const ;
3923         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
3924                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
3925         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
3926                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::string const &a_productID, 
3927                         std::size_t a_order ) const ;
3928 
3929         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
3930                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
3931         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
3932                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
3933 
3934         void continuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy, 
3935                 double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles ) const ;
3936         void mapContinuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, 
3937                 std::vector<double> const &a_energies, std::size_t a_offset, std::vector<double> &a_productEnergies, std::vector<double> &a_productMomenta, 
3938                 std::vector<double> &a_productGains, bool a_ignoreIncompleteParticles ) const ;
3939 
3940         bool isCompleteParticle( ) const ;
3941         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
3942         void calculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo, 
3943                 std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, 
3944                 Functions::XYs1d const &a_crossSectionXYs1d );
3945 
3946         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
3947 };
3948 
3949 /*
3950 ============================================================
3951 ====================== DelayedNeutron ======================
3952 ============================================================
3953 */
3954 class DelayedNeutron : public Form {
3955 
3956     private:
3957         int m_delayedNeutronIndex;                  /**< If this is a delayed fission neutron, this is its index. */
3958         Suite m_rate;                               /**< The GNDS <**rate**> node. */
3959         Product m_product;                          /**< The GNDS <**product**> node. */
3960 
3961     public:
3962         DelayedNeutron( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent, Styles::Suite const *a_styles );
3963         ~DelayedNeutron( );
3964 
3965         int delayedNeutronIndex( ) const { return( m_delayedNeutronIndex ); }
3966         void setDelayedNeutronIndex( int a_delayedNeutronIndex ) { m_delayedNeutronIndex = a_delayedNeutronIndex; }
3967         Suite &rate( ) { return( m_rate ); }
3968         Suite const &rate( ) const { return( m_rate ); }
3969         Product &product( ) { return( m_product ); }
3970         Product const &product( ) const { return( m_product ); }
3971 
3972         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
3973         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
3974 
3975         void productIDs( std::set<std::string> &a_indices, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
3976         int productMultiplicity( std::string const &a_productID ) const ;
3977         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
3978                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
3979         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
3980                         std::string const &a_productID ) const ;
3981         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
3982                         Transporting::Particles const &a_particles, std::string const &a_productID, std::size_t a_order ) const ;
3983         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
3984                         std::string const &a_productID ) const ;
3985         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
3986                         std::string const &a_productID ) const ;
3987 
3988         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
3989         void continuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy, 
3990                 double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles ) const ;
3991         void mapContinuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, 
3992                 std::vector<double> const &a_energies, std::size_t a_offset, std::vector<double> &a_productEnergies, std::vector<double> &a_productMomenta, 
3993                 std::vector<double> &a_productGains, bool a_ignoreIncompleteParticles ) const ;
3994         void calculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo, 
3995                 std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, 
3996                 Functions::XYs1d const &a_crossSectionXYs1d );
3997 
3998         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
3999 };
4000 
4001 /*
4002 ============================================================
4003 =================== DelayedNeutronProduct ==================
4004 ============================================================
4005 */
4006 class DelayedNeutronProduct {
4007 
4008     private:
4009         int m_delayedNeutronIndex;                  /**< If this is a delayed fission neutron, this is its index. */
4010         PhysicalQuantity m_rate;
4011         Product const *m_product;
4012 
4013     public:
4014         DelayedNeutronProduct( int a_delayedNeutronIndex, PhysicalQuantity const &a_rate, Product const *a_product ) : 
4015                 m_delayedNeutronIndex( a_delayedNeutronIndex ),
4016                 m_rate( a_rate ),
4017                 m_product( a_product ) {
4018         }
4019         DelayedNeutronProduct( DelayedNeutronProduct const &a_delayedNeutronProduct ) :
4020                 m_delayedNeutronIndex( a_delayedNeutronProduct.delayedNeutronIndex( ) ),
4021                 m_rate( a_delayedNeutronProduct.rate( ) ),
4022                 m_product( a_delayedNeutronProduct.product( ) ) {
4023         }
4024         ~DelayedNeutronProduct( ) {}
4025 
4026         int delayedNeutronIndex( ) const { return( m_delayedNeutronIndex ); }
4027         PhysicalQuantity rate( ) const { return( m_rate ); }
4028         Product const *product( ) const { return( m_product ); }
4029 };
4030 
4031 typedef std::vector<DelayedNeutronProduct> DelayedNeutronProducts;
4032 
4033 /*
4034 ============================================================
4035 ==================== FissionFragmentData ===================
4036 ============================================================
4037 */
4038 class FissionFragmentData : public GUPI::Ancestry {
4039 
4040     private:
4041         Suite m_delayedNeutrons;                            /**< The GNDS <**delayedNeutrons**> node. This members stores a list of DelayedNeutron instances. */
4042         Component m_fissionEnergyReleases;                      /**< The GNDS <**fissionEnergyReleases**> node. */
4043 
4044     public:
4045         FissionFragmentData( );
4046         FissionFragmentData( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Styles::Suite const *a_styles );
4047         ~FissionFragmentData( );
4048 
4049         Suite &delayedNeutrons( ) { return( m_delayedNeutrons ); }
4050         Suite const &delayedNeutrons( ) const { return( m_delayedNeutrons ); }
4051         Component &fissionEnergyReleases( ) { return( m_fissionEnergyReleases ); }
4052         Component const &fissionEnergyReleases( ) const { return( m_fissionEnergyReleases ); }
4053 
4054         bool isDelayedFissionNeutronComplete( ) const ;
4055 
4056         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
4057         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
4058 
4059         void productIDs( std::set<std::string> &a_indices, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
4060         int productMultiplicity( std::string const &a_productID ) const ;
4061         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4062                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
4063         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4064                         bool a_final ) const ;
4065         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4066                         std::string const &a_productID ) const ;
4067         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4068                         Transporting::Particles const &a_particles, std::string const &a_productID, std::size_t a_order ) const ;
4069         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4070                         std::string const &a_productID ) const ;
4071         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4072                         std::string const &a_productID ) const ;
4073 
4074         void delayedNeutronProducts( DelayedNeutronProducts &a_delayedNeutronProducts ) const ;
4075         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
4076         void continuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy, 
4077                 double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles ) const ;
4078         void mapContinuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, 
4079                 std::vector<double> const &a_energies, std::size_t a_offset, std::vector<double> &a_productEnergies, std::vector<double> &a_productMomenta, 
4080                 std::vector<double> &a_productGains, bool a_ignoreIncompleteParticles ) const ;
4081         void calculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo, 
4082                 std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, 
4083                 Functions::XYs1d const &a_crossSectionXYs1d );
4084 
4085         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4086 };
4087 
4088 /*
4089 ============================================================
4090 ======================= OutputChannel ======================
4091 ============================================================
4092 */
4093 class OutputChannel : public GUPI::Ancestry {
4094 
4095     private:
4096         bool m_twoBody;                                     /**< true if the output channel is two-body and false otherwise. */
4097         bool m_fissions;                                    /**< true if the output channel is a fission channel and false otherwise. */
4098         std::string m_process;                              /**< The GNDS *process* attribute for the channel. */
4099 
4100         Component m_Q;                                      /**< The GNDS <**Q**> node. */
4101         Suite m_products;                                   /**< The GNDS <**products**> node. */
4102         FissionFragmentData m_fissionFragmentData;          /**< The GNDS <**fissionFragmentData**> node. */
4103         Construction::FissionResiduals m_fissionResiduals;  /**< This member specifies what fission redisual products will be added to the list of products produced in a fission reaction. */
4104 
4105     public:
4106         OutputChannel( bool a_twoBody, bool a_fissions, std::string const &a_process );
4107         OutputChannel( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
4108                 PoPI::Database const &a_internalPoPs, Styles::Suite const *a_styles, bool a_isFission, bool a_addFissionResiduals );
4109         ~OutputChannel( );
4110 
4111         bool twoBody( ) const { return( m_twoBody ); }                              /**< Returns the value of the *m_twoBody* member. */
4112         std::string process( ) const { return( m_process ); }                       /**< Returns the value of the *m_process* member. */
4113         int depth( ) const ;
4114 
4115         Component &Q( ) { return( m_Q ); }                                          /**< Returns a reference to the *m_Q* member. */
4116         Component const &Q( ) const { return( m_Q ); }                              /**< Returns a reference to the *m_Q* member. */
4117         Suite &products( ) { return( m_products ); }                                /**< Returns a reference to the *m_products* member. */
4118         Suite const &products( ) const { return( m_products ); }                    /**< Returns a reference to the *m_products* member. */
4119         FissionFragmentData &fissionFragmentData( ) { return( m_fissionFragmentData ); }
4120         FissionFragmentData const &fissionFragmentData( ) const { return( m_fissionFragmentData ); }
4121 
4122         Construction::FissionResiduals fissionResiduals( ) const { return( m_fissionResiduals ); }  /**< Returns the value of the *m_fissionResiduals* member. */
4123 
4124         void modifiedMultiGroupElasticForTNSL( std::map<std::string,std::size_t> const &a_maximumTNSL_MultiGroupIndex );
4125         bool areAllProductsTracked( Transporting::Particles const &a_particles ) const ;
4126 
4127         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
4128         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
4129 
4130         bool isFission( ) const { return( m_fissions ); }                           /**< Returns true if the output channel is a fission output channel. */
4131         bool hasFission( ) const ;
4132         bool isDelayedFissionNeutronComplete( ) const ;
4133         void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
4134         int productMultiplicity( std::string const &a_productID ) const ;
4135         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4136                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
4137 
4138         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4139                         bool a_final ) const ;
4140         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4141                         std::string const &a_productID ) const ;
4142         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4143                         Transporting::Particles const &a_particles, std::string const &a_productID, std::size_t a_order ) const ;
4144         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4145                         std::string const &a_productID ) const ;
4146         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4147                         std::string const &a_productID ) const ;
4148 
4149         void delayedNeutronProducts( DelayedNeutronProducts &a_delayedNeutronProducts ) const { m_fissionFragmentData.delayedNeutronProducts( a_delayedNeutronProducts ); }
4150         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
4151         void continuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy, 
4152                 double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles ) const ;
4153         void mapContinuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, 
4154                 std::vector<double> const &a_energies, std::size_t a_offset, std::vector<double> &a_productEnergies, std::vector<double> &a_productMomenta, 
4155                 std::vector<double> &a_productGains, bool a_ignoreIncompleteParticles ) const ;
4156         void calculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo, 
4157                 std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, 
4158                 Functions::XYs1d const &a_crossSectionXYs1d );
4159 
4160         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4161 };
4162 
4163 namespace DoubleDifferentialCrossSection {
4164 
4165 namespace n_ThermalNeutronScatteringLaw {
4166 
4167 /*
4168 ============================================================
4169 ==================== IncoherentInelastic ===================
4170 ============================================================
4171 */
4172 class IncoherentInelastic : public Base {
4173     
4174     private:
4175         Options m_options;                              /**< Options for *this*. */
4176         Suite m_scatteringAtoms;                        /**< The list of atoms and there information. */
4177         S_alpha_beta m_S_alpha_beta;                    /**< The S(alpha,beta,T) function. */
4178     
4179     public:
4180         IncoherentInelastic( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Suite *a_parent );
4181         ~IncoherentInelastic( );
4182         
4183         Options &options( ) { return( m_options ); }                                    /**< Returns the value of the *m_options* */
4184         Suite &scatteringAtoms( ) { return( m_scatteringAtoms ); }                      /**< Returns the value of the *m_scatteringAtoms* */
4185         S_alpha_beta const &s_alpha_beta( ) const { return( m_S_alpha_beta ); }         /**< Returns the value of the *m_S_alpha_beta* */
4186 };
4187 
4188 }               // End namespace n_ThermalNeutronScatteringLaw.
4189 
4190 }               // End namespace DoubleDifferentialCrossSection.
4191 
4192 namespace ACE_URR {
4193 
4194 /*
4195 ============================================================
4196 ====================== IncidentEnergy ======================
4197 ============================================================
4198 */
4199 class IncidentEnergy: public Form {
4200 
4201     private:
4202         double m_value;
4203         std::string m_unit;
4204         Table::Table m_table;
4205 
4206     public:
4207         IncidentEnergy( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
4208         ~IncidentEnergy( );
4209 
4210         double value( ) const { return( m_value ); }      /**< Returns the value of the *m_value* member. */
4211         std::string const &unit( ) const { return( m_unit ); }  /**< Returns a *const* reference to the *m_unit* member. */
4212         Table::Table const &table( ) const { return( m_table ); }            /**< Returns a *const* reference to the *m_table* member. */
4213 
4214         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
4215 };
4216 
4217 /*
4218 ============================================================
4219 ===================== ProbabilityTable =====================
4220 ============================================================
4221 */
4222 class ProbabilityTable : public Form {
4223 
4224     public:
4225         typedef std::vector<IncidentEnergy *> Forms;                              /**< The typedef the the *m_forms* member. */
4226 
4227     private:
4228         mutable Forms m_forms;                                          /**< The list of nodes stored within *this*. */
4229 
4230     public:
4231         ProbabilityTable( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
4232         ~ProbabilityTable( );
4233 
4234         Forms &forms( ) { return( m_forms ); }                          /**< Returns a *const* reference to the *m_forms* member. */
4235         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const ;
4236 };
4237 
4238 }               // End namespace ACE_URR.
4239 
4240 /*
4241 ============================================================
4242 ========================= Reaction =========================
4243 ============================================================
4244 */
4245 class Reaction : public Form {
4246 
4247     friend class ProtareSingle;
4248 
4249     private:
4250         mutable std::size_t m_reactionIndex;                    /**< The index of the reaction in the ProtareSingle. */
4251         bool m_active;                                  /**< If true, this reaction is used for calcualtion (e.g., its cross section is added to the total for its protare), otherwise, this reaction is ignored. */
4252         int m_ENDF_MT;                                  /**< The ENDF MT value for the reaction. */
4253         int m_ENDL_C;                                   /**< The ENDL C value for the reaction. */
4254         int m_ENDL_S;                                   /**< The ENDL S value for the reaction. */
4255         std::string m_fissionGenre;                     /**< If the reaction is fission, this is its genre. */
4256         double m_QThreshold;                            /**< Threshold value calculated from the Q and the protare's m_thresholdFactor. */
4257         double m_crossSectionThreshold;                 /**< Threshold value derived from cross section data via *evaluated* or *griddedCrossSection*. */
4258         double m_twoBodyThreshold;                      /**< This is the T_1 value needed by MCGIDI to do two-body kinematics (i.e., in the equation (K_{com,3_4} = m_2 * (K_1 - T_1) / (m_1 + m_2)). */
4259         bool m_isPairProduction;                        /**< Kludge! Currently needed because GNDS specification unclear about how to specify photo-atomic pair production reaction. */
4260         bool m_isPhotoAtomicIncoherentScattering;       /**< **true** if the reaction is photo-atomic incoherent scattering and **false** otherwise. Helpful for MCGIDI. */
4261         bool m_RutherfordScatteringPresent;             /**> For charged particle elastic scattering, this member is *true* if Rutherford scattering is present and *false* otherwise. */
4262         bool m_onlyRutherfordScatteringPresent;         /**> For charged particle elastic scattering, this member is *true* if only Rutherford scattering is present and *false* otherwise. */
4263         bool m_nuclearPlusInterferencePresent;          /**> For charged particle elastic scattering, this member is *true* if nuclear plus interference is present and *false* otherwise. */
4264         bool m_decayPositronium;                        /**< If **true**, whenever a positron is created, it is assumed to immediately form positronium and decay into 2 511 KeV photons. Ergo, the photons are produced in the reaction and not a positron. */
4265 
4266         Component m_doubleDifferentialCrossSection;     /**< The GNDS <**doubleDifferentialCrossSection**> node. */
4267         Component m_crossSection;                       /**< The GNDS <**crossSection**> node. */
4268         Component m_availableEnergy;                    /**< The GNDS <**availableEnergy**> node. */
4269         Component m_availableMomentum;                  /**< The GNDS <**availableMomentum**> node. */
4270         OutputChannel *m_outputChannel;                 /**< The reaction's output channel. */
4271         void setReactionIndex( std::size_t a_reactionIndex ) const 
4272                 { m_reactionIndex = a_reactionIndex ; } /**< Sets *m_reactionIndex* to *a_reactionIndex*. */
4273 
4274     public:
4275         Reaction( int a_ENDF_MT, std::string const &a_fissionGenre );
4276         Reaction( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, Protare const &a_protare,
4277                         Styles::Suite const *a_styles );
4278         ~Reaction( );
4279 
4280         bool active( ) const { return( m_active ); }                                    /**< Returns the value of the *m_active* member. */
4281         void setActive( bool a_active ) { m_active = a_active; }                        /**< Sets *m_active* to *a_active*. */
4282         std::size_t reactionIndex( ) const { return( m_reactionIndex ); }               /**< Returns the value of the *m_reactionIndex* member. */
4283         int depth( ) const { return( m_outputChannel->depth( ) ); }                     /**< Returns the maximum product depth for this reaction. */
4284         int ENDF_MT( ) const { return( m_ENDF_MT ); }                                   /**< Returns the value of the *m_ENDF_MT* member. */
4285         int ENDL_C( ) const { return( m_ENDL_C ); }                                     /**< Returns the value of the *m_ENDL_C* member. */
4286         int ENDL_S( ) const { return( m_ENDL_S ); }                                     /**< Returns the value of the *m_ENDL_S* member. */
4287         std::string const &fissionGenre( ) const { return( m_fissionGenre ); }
4288         bool isPairProduction( ) const { return( m_isPairProduction ); }                /**< Returns the value of the *m_isPairProduction* member. */
4289         bool isPhotoAtomicIncoherentScattering( ) const { return( m_isPhotoAtomicIncoherentScattering ); }                /**< Returns the value of the *m_isPhotoAtomicIncoherentScattering* member. */
4290         bool RutherfordScatteringPresent( ) const { return( m_RutherfordScatteringPresent ); }
4291                                                                                         /**< Returns the value of *m_RutherfordScatteringPresent* member. */
4292         bool onlyRutherfordScatteringPresent( ) const { return( m_onlyRutherfordScatteringPresent ); }
4293                                                                                         /**< Returns the value of *m_onlyRutherfordScatteringPresent* member. */
4294         bool nuclearPlusInterferencePresent( ) const { return( m_nuclearPlusInterferencePresent ); }
4295                                                                                         /**< Returns the value of *m_nuclearPlusInterferencePresent* member. */
4296 
4297         Component &doubleDifferentialCrossSection( ) { return( m_doubleDifferentialCrossSection ); }    /**< Returns a reference to the *m_doubleDifferentialCrossSection* member. */
4298         Component const &doubleDifferentialCrossSection( ) const { return( m_doubleDifferentialCrossSection ); }    /**< Returns a reference to the *m_doubleDifferentialCrossSection* member. */
4299         Component &crossSection( ) { return( m_crossSection ); }                            /**< Returns a reference to the *m_crossSection* member. */
4300         Component const &crossSection( ) const { return( m_crossSection ); }                            /**< Returns a reference to the *m_crossSection* member. */
4301 
4302         Component &availableEnergy( ) { return( m_availableEnergy ); }                      /**< Returns a reference to the *m_availableEnergy* member. */
4303         Component const &availableEnergy( ) const { return( m_availableEnergy ); }          /**< Returns a reference to the *m_availableEnergy* member. */
4304         Component &availableMomentum( ) { return( m_availableMomentum ); }                  /**< Returns a reference to the *m_availableMomentum* member. */
4305         Component const &availableMomentum( ) const { return( m_availableMomentum ); }      /**< Returns a reference to the *m_availableMomentum* member. */
4306 
4307         OutputChannel *outputChannel( ) const { return( m_outputChannel ); }            /**< Returns a reference to the *m_outputChannel* member. */
4308         void setOutputChannel( OutputChannel *a_outputChannel );
4309 
4310         void modifiedMultiGroupElasticForTNSL( std::map<std::string,std::size_t> const &a_maximumTNSL_MultiGroupIndex );
4311 
4312         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
4313         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
4314         std::string xlinkItemKey( ) const { return( GUPI::Ancestry::buildXLinkItemKey( GIDI_labelChars, label( ) ) ); }   /**< Returns the result of calling "GUPI::Ancestry::buildXLinkItemKey( GIDI_labelChars, label() )". */
4315 
4316         bool hasFission( ) const ;
4317         void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
4318         int productMultiplicity( std::string const &a_productID ) const {
4319                 return( m_outputChannel->productMultiplicity( a_productID ) ); }               /**< Returns the product multiplicity (e.g., 0, 1, 2, ...) or -1 if energy dependent or not an integer. */
4320         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4321                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
4322 
4323         double threshold( ) const { return( m_QThreshold ); }                           /**< Returns the value of the *m_QThreshold* member. */
4324         double crossSectionThreshold( ) const { return( m_crossSectionThreshold ); }    /**< Returns the value of the *m_crossSectionThreshold* member. */
4325         double twoBodyThreshold( ) const { return( m_twoBodyThreshold ); }              /**< Returns the value of the *m_twoBodyThreshold* member. */
4326 
4327         bool areAllProductsTracked( Transporting::Particles const &a_particles ) const ;
4328 
4329         Vector multiGroupCrossSection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4330                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_label = "" ) const ;
4331         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4332                         bool a_final ) const ;
4333         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4334                         std::string const &a_productID ) const ;
4335 
4336         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4337                         Transporting::Particles const &a_particles, std::string const &a_productID, std::size_t a_order ) const ;
4338         Matrix multiGroupFissionMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4339                         Transporting::Particles const &a_particles, std::size_t a_order ) const ;
4340 
4341         Vector multiGroupAvailableEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo ) 
4342                         const ;
4343         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4344                         std::string const &a_productID ) const ;
4345         Vector multiGroupDepositionEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4346                         Transporting::Particles const &a_particles ) const ;
4347 
4348         Vector multiGroupAvailableMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo ) 
4349                         const ;
4350         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4351                         std::string const &a_productID ) const ;
4352         Vector multiGroupDepositionMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4353                         Transporting::Particles const &a_particles ) const ;
4354 
4355         Vector multiGroupGain( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4356                         std::string const &a_productID, std::string const &a_projectileID ) const ;
4357 
4358         void delayedNeutronProducts( DelayedNeutronProducts &a_delayedNeutronProducts ) const ;
4359         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
4360         void continuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, double a_energy, 
4361                 double &a_productEnergy, double &a_productMomentum, double &a_productGain, bool a_ignoreIncompleteParticles ) const ;
4362         void mapContinuousEnergyProductData( Transporting::Settings const &a_settings, std::string const &a_particleID, 
4363                 std::vector<double> const &a_energies, std::size_t a_offset, std::vector<double> &a_productEnergies, std::vector<double> &a_productMomenta, 
4364                 std::vector<double> &a_productGains, bool a_ignoreIncompleteParticles ) const ;
4365 
4366         bool modifyCrossSection( Functions::XYs1d const *a_offset, Functions::XYs1d const *a_slope, bool a_updateMultiGroup = false );
4367         bool modifiedCrossSection( Functions::XYs1d const *a_offset, Functions::XYs1d const *a_slope );
4368         void recalculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo );
4369         void calculateMultiGroupData( ProtareSingle const *a_protare, Styles::TemperatureInfo const &a_temperatureInfo, 
4370                 std::string const &a_heatedMultiGroupLabel, MultiGroupCalulationInformation const &a_multiGroupCalulationInformation );
4371 
4372         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4373 };
4374 
4375 namespace Sums {
4376 
4377 namespace Summand {
4378 
4379 /*
4380 ============================================================
4381 =========================== Base ===========================
4382 ============================================================
4383 */
4384 class Base : public GUPI::Ancestry {
4385 
4386     private:
4387         std::string m_href;                                                     /**< xlink for the summand. */
4388 
4389     public:
4390         Base( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
4391         ~Base( );
4392 
4393         std::string const &href( ) const { return( m_href ); }                  /**< Returns the value of the *m_href* member. */
4394         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }
4395         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }
4396 
4397         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4398 };
4399 
4400 /*
4401 ============================================================
4402 =========================== Add ============================
4403 ============================================================
4404 */
4405 class Add : public Base {
4406 
4407     public:
4408         Add( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
4409 };
4410 
4411 }           // End of namespace Summand.
4412 
4413 /*
4414 ============================================================
4415 ========================= Summands =========================
4416 ============================================================
4417 */
4418 class Summands : public Form {
4419 
4420     private:
4421         std::vector<Summand::Base *> m_summands;                            /**< List of summand for *this*. */
4422 
4423     public:
4424         Summands( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo );
4425         ~Summands( );
4426 
4427         std::size_t size( ) const { return( m_summands.size( ) ); }         /**< Returns the number of summands in *this*. */
4428         Summand::Base const *operator[]( std::size_t a_index ) const { return( m_summands[a_index] ); } /**< Returns the summand at index *a_index*. */
4429 
4430         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4431 };
4432 
4433 /*
4434 ============================================================
4435 =========================== Base ===========================
4436 ============================================================
4437 */
4438 class Base : public Form {
4439 
4440     private:
4441         int m_ENDF_MT;                                                      /**< ENDF MT value for the sum. */
4442         Summands m_summands;                                                /**< List of Summands for *this*. */
4443 
4444     public:
4445         Base( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
4446                 FormType a_type );
4447 
4448         int ENDF_MT( ) const { return( m_ENDF_MT ); }                       /**< Returns the value of the *m_ENDF_MT* member. */
4449         Summands const &summands( ) const { return( m_summands ); }         /**< Returns the value of the *m_summands* member. */
4450 };
4451 
4452 /*          
4453 ============================================================
4454 ====================== CrossSectionSum =====================
4455 ============================================================
4456 */
4457 class CrossSectionSum : public Base {
4458 
4459     private:
4460         Component m_Q;                                                          /**< The GNDS <**Q**> node. */
4461         Component m_crossSection;                                               /**< The GNDS <**crossSection**> node. */
4462 
4463     public:
4464         CrossSectionSum( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs );
4465         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
4466         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
4467 
4468         Component &Q( ) { return( m_Q ); }                                      /**< Returns a reference to the *m_Q* member. */
4469         Component &crossSection( ) { return( m_crossSection ); }                /**< Returns a reference to the *m_crossSection* member. */
4470 
4471         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4472 };
4473 
4474 /*          
4475 ============================================================
4476 ====================== MultiplicitySum =====================
4477 ============================================================
4478 */
4479 class MultiplicitySum : public Base {
4480 
4481     private:
4482         Suite m_multiplicity;                                               /**< The GNDS <**multiplicity**> node. */
4483 
4484     public:
4485         MultiplicitySum( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs );
4486 
4487         Suite &multiplicity( ) { return( m_multiplicity ); }                /**< Returns a reference to the *m_multiplicity* member. */
4488 
4489         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4490 };
4491 
4492 /*
4493 ============================================================
4494 =========================== Sums ===========================
4495 ============================================================
4496 */
4497 class Sums : public GUPI::Ancestry {
4498 
4499     private:
4500         Suite m_crossSectionSums;                                               /**< The GNDS <**crossSectionSums**> node. */
4501         Suite m_multiplicitySums;                                               /**< The GNDS <**multiplicitySums**> node. */
4502 
4503     public:
4504         Sums( );
4505         ~Sums( );
4506 
4507         Suite &crossSectionSums( ) { return( m_crossSectionSums ); }                /**< Returns the value of the *m_crossSectionSums* member. */
4508         Suite const &crossSectionSums( ) const { return( m_crossSectionSums ); }    /**< Returns the value of the *m_crossSectionSums* member. */
4509         Suite &multiplicitySums( ) { return( m_multiplicitySums ); }                /**< Returns the value of the *m_multiplicitySums* member. */
4510         Suite const &multiplicitySums( ) const { return( m_multiplicitySums ); }    /**< Returns the value of the *m_multiplicitySums* member. */
4511 
4512         void parse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs );
4513         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
4514         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
4515 
4516         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4517 };
4518 
4519 }           // End of namespace Sums.
4520 
4521 /*
4522 ============================================================
4523 ========================== Protare =========================
4524 ============================================================
4525 */
4526 class Protare : public GUPI::Ancestry {
4527 
4528     private:
4529         ParticleInfo m_projectile;              /**< Information about the projectile. */
4530         ParticleInfo m_target;                  /**< Information about the target. */
4531         ParticleInfo m_GNDS_target;             /**< Information about the target as specified in the GNDS file. For example, for requested target 'H1' for a photo-atomic GNDS file, the GNDS target will be 'H'. */
4532 
4533     protected:
4534         void initialize( HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, bool a_targetRequiredInGlobalPoPs, 
4535                         bool a_requiredInPoPs = true );
4536 
4537     public:
4538         Protare( );
4539         ~Protare( );
4540 
4541         ParticleInfo const &projectile( ) const { return( m_projectile ); }         /**< Returns the value of the *m_projectile* member. */
4542         void setProjectile( ParticleInfo const &a_projectile ) { m_projectile = a_projectile; }    /**< Sets *m_projectile* to *a_projectile*. */
4543         ParticleInfo const &target( ) const { return( m_target ); }                 /**< Returns the value of the *m_target* member. */
4544         void setTarget( ParticleInfo const &a_target ) { 
4545                 m_target = a_target;
4546                 if( m_GNDS_target.ID( ) == "" ) m_GNDS_target = a_target; }         /**< Sets *m_target* to *a_target* and m_GNDS_target if it is an empty string. */
4547         ParticleInfo const &GNDS_target( ) const { return( m_GNDS_target ); }       /**< Returns the value of the *m_GNDS_target* member. */
4548 
4549         virtual ProtareType protareType( ) const = 0;                               /**< Returns the type of the protare. */
4550         virtual bool isTNSL_ProtareSingle( ) const { return( false ); }             /**< Returns *true* if the instance is a ProtareSingle instance with only TNSL data and *false* otherwise. */
4551         virtual std::size_t numberOfProtares( ) const = 0;                          /**< Returns the number of protares contained in *this*. */
4552         virtual ProtareSingle *protare( std::size_t a_index ) = 0;                  /**< Returns the *a_index* - 1 Protare contained in *this*. */
4553         virtual ProtareSingle const *protare( std::size_t a_index ) const = 0;      /**< Returns the *a_index* - 1 Protare contained in *this*. */
4554 
4555         virtual LUPI::FormatVersion const &formatVersion( std::size_t a_index = 0 ) const = 0;
4556         virtual std::string const &fileName( std::size_t a_index = 0 ) const = 0;
4557         virtual std::string const &realFileName( std::size_t a_index = 0 ) const = 0;
4558 
4559         virtual std::vector<std::string> libraries( std::size_t a_index = 0 ) const = 0;
4560         virtual std::string const &evaluation( std::size_t a_index = 0 ) const = 0;
4561         virtual Frame projectileFrame( std::size_t a_index = 0 ) const = 0;
4562         virtual int numberOfLazyParsingHelperForms( ) const = 0;
4563         virtual int numberOfLazyParsingHelperFormsReplaced( ) const = 0;
4564         virtual double thresholdFactor( ) const = 0;
4565 
4566         virtual Documentation_1_10::Suite &documentations( ) = 0;
4567 
4568         virtual Styles::Base &style( std::string const &a_label ) = 0;
4569         virtual Styles::Suite &styles( ) = 0;
4570         virtual Styles::Suite const &styles( ) const = 0;
4571 
4572         virtual int intid( std::string const &a_id ) const = 0;
4573         virtual void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const = 0;
4574         virtual int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4575                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const = 0;
4576 
4577         virtual Styles::TemperatureInfos temperatures( ) const  = 0;
4578 
4579         virtual std::size_t numberOfReactions( ) const = 0;
4580         virtual Reaction *reaction( std::size_t a_index ) = 0;
4581         virtual Reaction const *reaction( std::size_t a_index ) const = 0;
4582         virtual Reaction const *reaction( std::size_t a_index, Transporting::MG const &a_settings, 
4583                 ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4584         virtual std::size_t numberOfOrphanProducts( ) const = 0;
4585         virtual Reaction *orphanProduct( std::size_t a_index ) = 0;
4586         virtual Reaction const *orphanProduct( std::size_t a_index ) const = 0;
4587         virtual void updateReactionIndices( std::size_t a_offset ) const = 0;
4588 
4589         virtual bool hasFission( ) const = 0;
4590         virtual bool isDelayedFissionNeutronComplete( ) const = 0;
4591 
4592         virtual GUPI::Ancestry *findInAncestry3( std::string const &a_item ) = 0;
4593         virtual GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const = 0;
4594 
4595         virtual std::vector<double> groupBoundaries( Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4596                         std::string const &a_productID ) const = 0;
4597         virtual Vector multiGroupInverseSpeed( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4598                         Styles::TemperatureInfo const &a_temperatureInfo ) const = 0;
4599 
4600         virtual Vector multiGroupCrossSection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4601                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {},
4602                         std::string const &a_label = "" ) const = 0;
4603         virtual Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4604                         Styles::TemperatureInfo const &a_temperatureInfo, bool a_final, bool a_effectivePhotoAtomic = true,
4605                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4606 
4607         virtual Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4608                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4609                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4610         virtual Vector multiGroupFissionNeutronMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4611                         Styles::TemperatureInfo const &a_temperatureInfo,
4612                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4613         virtual Vector multiGroupFissionGammaMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4614                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4615 
4616         virtual Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4617                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, 
4618                         std::string const &a_productID, std::size_t a_order, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4619         virtual Matrix multiGroupFissionMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4620                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order,
4621                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4622         virtual Vector multiGroupTransportCorrection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4623                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order, 
4624                         TransportCorrectionType a_transportCorrectionType, double a_temperature,
4625                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4626 
4627         virtual Vector multiGroupAvailableEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4628                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4629         virtual Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4630                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4631                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4632         virtual Vector multiGroupDepositionEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4633                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
4634                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4635 
4636         virtual Vector multiGroupAvailableMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4637                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4638         virtual Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4639                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4640                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4641         virtual Vector multiGroupDepositionMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4642                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
4643                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4644 
4645         virtual Vector multiGroupGain( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4646                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4647                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const = 0;
4648 
4649         virtual void TNSL_crossSectionSumCorrection( std::string const &a_label, Functions::XYs1d &a_crossSectionSum );
4650         virtual void TNSL_crossSectionSumCorrection( std::string const &a_label, Functions::Ys1d &a_crossSectionSum );
4651         virtual void TNSL_crossSectionSumCorrection( std::string const &a_label, Vector &a_crossSectionSum );
4652 
4653         virtual stringAndDoublePairs muCutoffForCoulombPlusNuclearElastic( ) const = 0;
4654         virtual DelayedNeutronProducts delayedNeutronProducts( ) const = 0;
4655         virtual void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const = 0;
4656         ExcludeReactionsSet reactionIndicesMatchingENDLCValues( std::set<int> const &a_CValues, bool a_checkActiveState = true );
4657 };
4658 
4659 /*
4660 ============================================================
4661 ====================== ProtareSingle =======================
4662 ============================================================
4663 */
4664 class ProtareSingle : public Protare {
4665 
4666     private:
4667         HAPI::File *m_doc;                      /**< If data read from file, this member is a pointer to the opened **HAPI::File** instance. */
4668         HAPI::DataManager *m_dataManager;       /**< If data read from hybrid file, this member is a pointer to the **HAPI::DataManager** instance. */
4669         int m_numberOfLazyParsingHelperForms;   /**< This counts the number of LazyParsingHelperForms instantiated. */
4670         int m_numberOfLazyParsingHelperFormsReplaced;   /**< This counts the number of LazyParsingHelperForms replaced with the appropriate form. */
4671         LUPI::FormatVersion m_formatVersion;    /**< Store the GNDS format version. */
4672         TargetInfo::TargetInfo m_targetInfo;    /**< Information about the target. Currently, the isotopic data for TNSL GNDS 2.1 files as stored in the evaluaed style. */
4673         PoPI::Database m_internalPoPs;          /**< The *PoPs* specified under the protare (e.g., reactionSuite) node. */
4674 
4675         std::vector<std::string> m_libraries;   /**< The list of libraries *this* was found in. */
4676         std::string m_evaluation;               /**< The protare's evaluation string. */
4677         std::string m_interaction;              /**< The protare's interaction string. */
4678         std::string m_fileName;                 /**< The path to the protare's file. May be relative. */
4679         std::string m_realFileName;             /**< The real path to the protare's file. Equivalent to the value returned by the C-function *realpath( m_fileName )* on Unix systems. */
4680         Frame m_projectileFrame;                /**< The frame the projectile data are given in. */
4681         double m_projectileEnergyMin;           /**< The projectile's minimum energy for which data are complete as specified in the evaluated style. */
4682         double m_projectileEnergyMax;           /**< The projectile's maximum energy for which data are complete as specified in the evaluated style. */
4683         bool m_isTNSL_ProtareSingle;            /**< If *this* is a ProtareSingle instance with TNSL data *true* and otherwise *false*. */
4684         bool m_isPhotoAtomic;                   /**< true if photo-atomic protare and false otherwise. */
4685         bool m_decayPositronium;                /**< If **true**, whenever a positron is created, it is assumed to immediately form positronium and decay into 2 511 KeV photons. Ergo, the photons are produced in the reaction and not a positron. */
4686 
4687         double m_thresholdFactor;               /**< The non-relativistic factor that converts a Q-value into a threshold. */
4688 
4689         PoPI::NuclideGammaBranchStateInfos m_nuclideGammaBranchStateInfos;  /**< Simplified list of gamma branching data from nuclide level decays derived from the internal PoPI::Database. */
4690 
4691         ExternalFiles::Suite m_externalFiles;   /**< The GNDS <**externalFiles**> node. */
4692         Styles::Suite m_styles;                 /**< The GNDS <**styles**> node. */
4693         Documentation_1_10::Suite m_documentations;  /**< The GNDS <**documentations**> node. */
4694         Suite m_reactions;                      /**< The GNDS <**reactions**> node. */
4695         Suite m_orphanProducts;                 /**< The GNDS <**orphanProducts**> node. */
4696         Suite m_incompleteReactions;            /**< The GNDS <**incompleteReactions**> node. */
4697 
4698         Sums::Sums m_sums;                      /**< The GNDS <**sums**> node. */
4699         Suite m_fissionComponents;              /**< The GNDS <**fissionComponents**> node. */
4700 
4701         bool m_RutherfordScatteringPresent;     /**> For charged particle elastic scattering, this member is *true* if Rutherford scattering is present and *false* otherwise. */
4702         bool m_onlyRutherfordScatteringPresent; /**> For charged particle elastic scattering, this member is *true* if only Rutherford scattering is present and *false* otherwise. */
4703 
4704 //  The following are non-GNDS 2.0 data types that are stored in the applicationData node.
4705         Reaction *m_nuclearPlusCoulombInterferenceOnlyReaction;     /**< The nuclear + interference (ENDL C=9) reaction in the applicationData node. */
4706         Reaction *m_multiGroupSummedReaction;                       /**< This reaction contains the sum multi-group data from all other reactions. */
4707         OutputChannel *m_multiGroupSummedDelayedNeutrons;           /**< This reaction contains the sum multi-group data from delayed neutrons. */
4708         Suite m_ACE_URR_probabilityTables;                          /**< This suite stores ACE style URR probability tables. */
4709         Suite m_photoAtomicIncoherentDoppler;                       /**< This suite stores the data for the impulse approximation photon doppler broadening reaction (MT 1534-1572) */
4710         Component m_pointwiseAverageProductEnergy;                  /**< This suite stores upscatter model B pointwise energy deposition data for the outgoing neutron. */
4711         GRIN::GRIN_continuumGammas *m_GRIN_continuumGammas;         /**< This stores continuum gamma information from the GRIN project. */
4712 
4713         void initialize( );
4714         void initialize( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
4715                 bool a_targetRequiredInGlobalPoPs, bool a_requiredInPoPs = true );
4716 
4717         bool useMultiGroupSummedData( Transporting::MG const &a_settings, ExcludeReactionsSet const &a_reactionsToExclude ) const ;
4718         bool useMultiGroupSummedDelayedNeutronsData( Transporting::MG const &a_settings ) const ;
4719 
4720     public:
4721         ProtareSingle( PoPI::Database const &a_pops, std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_evaluation,
4722                 std::string const &a_interaction, std::string const &a_formatVersion = GNDS_formatVersion_1_10Chars );
4723         ProtareSingle( Construction::Settings const &a_construction, std::string const &a_fileName, FileType a_fileType, PoPI::Database const &a_pops, 
4724                 ParticleSubstitution const &a_particleSubstitution, std::vector<std::string> const &a_libraries, std::string const &a_interaction,
4725                 bool a_targetRequiredInGlobalPoPs = true, bool a_requiredInPoPs = true );
4726         ProtareSingle( Construction::Settings const &a_construction, HAPI::Node const &a_protare, PoPI::Database const &a_pops, 
4727                 ParticleSubstitution const &a_particleSubstitution, std::vector<std::string> const &a_libraries, std::string const &a_interaction,
4728                 bool a_targetRequiredInGlobalPoPs = true, bool a_requiredInPoPs = true );
4729         ~ProtareSingle( );
4730 
4731         PoPI::NuclideGammaBranchStateInfos const &nuclideGammaBranchStateInfos( ) const { return( m_nuclideGammaBranchStateInfos ); }
4732                                                                                     /**< Returns the value of the *m_nuclideGammaBranchStateInfos* member. */
4733 
4734         HAPI::DataManager *dataManager( ) { return( m_dataManager ); }              /**< Returns the value of the *m_dataManager* member. */
4735         void setDataManager( HAPI::DataManager *a_dataManager ) { m_dataManager = a_dataManager; }
4736                                                                                     /**< Sets the member *m_dataManager* to *a_dataManager*. */
4737         void incrementNumberOfLazyParsingHelperForms( ) { ++m_numberOfLazyParsingHelperForms; }
4738                                                 /**> Increments the *m_numberOfLazyParsingHelperForms* member of this by 1. */
4739         void incrementNumberOfLazyParsingHelperFormsReplaced( ) { ++m_numberOfLazyParsingHelperFormsReplaced; }
4740                                                 /**> Increments the *m_numberOfLazyParsingHelperFormsReplaced* member of this by 1. */
4741 
4742         TargetInfo::TargetInfo const &targetInfo( ) const { return( m_targetInfo ); }                /**< Returns a const reference to the *m_targetInfo* member. */
4743         double projectileEnergyMin( ) const { return( m_projectileEnergyMin ); }
4744         double projectileEnergyMax( ) const { return( m_projectileEnergyMax ); }
4745         bool isTNSL_ProtareSingle( ) const { return( m_isTNSL_ProtareSingle ); }    /**< Returns *true* if the instance is a ProtareSingle instance with only TNSL data and *false* otherwise. */
4746         bool isPhotoAtomic( ) const { return( m_isPhotoAtomic ); }                  /**< Returns the value of the *m_isPhotoAtomic* member. */
4747 
4748         Suite &reactions( ) { return( m_reactions ); }                              /**< Returns a reference to the *m_reactions* member. */
4749         Suite const &reactions( ) const { return( m_reactions ); }                  /**< Returns a *const* reference to the *m_reactions* member. */
4750         Suite &orphanProducts( ) { return( m_orphanProducts ); }                    /**< Returns a reference to the *m_orphanProducts* member. */
4751         Suite const &orphanProducts( ) const { return( m_orphanProducts ); }        /**< Returns a *const* reference to the *m_orphanProducts* member. */
4752         Suite &incompleteReactions( ) { return( m_incompleteReactions ); }          /**< Returns a reference to the *m_incompleteReactions* member. */
4753         Suite const &incompleteReactions( ) const { return( m_incompleteReactions ); }  /**< Returns a *const* reference to the *m_incompleteReactions* member. */
4754 
4755         Sums::Sums &sums( ) { return( m_sums ); }                                   /**< Returns a reference to the *m_sums* member. */
4756         Sums::Sums const &sums( ) const { return( m_sums ); }                       /**< Returns a reference to the *m_sums* member. */
4757         Suite &fissionComponents( ) { return( m_fissionComponents ); }              /**< Returns a reference to the *m_fissionComponents* member. */
4758 
4759         bool RutherfordScatteringPresent( ) const { return( m_RutherfordScatteringPresent ); }
4760                                                                                     /**< Returns the value of *m_RutherfordScatteringPresent*. */
4761         bool onlyRutherfordScatteringPresent( ) const { return( m_onlyRutherfordScatteringPresent ); }
4762                                                                                     /**< Returns the value of *m_onlyRutherfordScatteringPresent*. */
4763         Reaction const *nuclearPlusCoulombInterferenceOnlyReaction( ) const { return( m_nuclearPlusCoulombInterferenceOnlyReaction ); }
4764                                                                                     /**< Returns the *m_nuclearPlusCoulombInterferenceOnlyReaction* member which is a pointer. */
4765         Reaction const *checkIf_nuclearPlusCoulombInterferenceWanted( Transporting::MG const &a_settings, Reaction const *a_reaction ) const ;
4766         Reaction const *reactionToMultiGroup( Transporting::MG const &a_settings, std::size_t a_index,
4767                 ExcludeReactionsSet const &a_reactionsToExclude ) const ;
4768         Reaction const *multiGroupSummedReaction( ) const { return( m_multiGroupSummedReaction ); }     /**< Returns the *m_multiGroupSummedReaction* member which is a pointer. */
4769         OutputChannel const *multiGroupSummedDelayedNeutrons( ) const { return( m_multiGroupSummedDelayedNeutrons ); }  /**< Returns the *m_multiGroupSummedReaction* member which is a pointer. */
4770         Suite const &ACE_URR_probabilityTables( ) const { return( m_ACE_URR_probabilityTables ); }      /**< Returns a *const* reference to the *m_ACE_URR_probabilityTables* member. */
4771         Suite const &photoAtomicIncoherentDoppler( ) const { return( m_photoAtomicIncoherentDoppler ); }
4772         GRIN::GRIN_continuumGammas const *GRIN_continuumGammas2( ) const { return( m_GRIN_continuumGammas ); }    /**< Returns a *const* pointer to the *m_GRIN_continuumGammas* member. */
4773 
4774 // The rest are virtual methods defined in the Protare class.
4775 
4776         ProtareType protareType( ) const { return( ProtareType::single ); }                                 /**< Returns the type of the protare. */
4777         std::size_t numberOfProtares( ) const { return( 1 ); }                                              /**< Returns 1. */
4778         ProtareSingle *protare( std::size_t a_index );
4779         ProtareSingle const *protare( std::size_t a_index ) const ;
4780 
4781         LUPI::FormatVersion const &formatVersion( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_formatVersion ); }  /**< Returns the value of the *m_formatVersion* member. */
4782         std::string const &fileName( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_fileName ); }              /**< Returns the value of the *m_fileName* member. */
4783         std::string const &realFileName( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_realFileName ); }      /**< Returns the value of the *m_realFileName* member. */
4784 
4785         std::vector<std::string> libraries( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_libraries ); }      /**< Returns the libraries that *this* resided in. */
4786         std::string const &evaluation( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_evaluation ); }          /**< Returns the value of the *m_evaluation* member. */
4787         std::string const &interaction( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_interaction ); }        /**< Returns the value of the *m_interaction* member. */
4788         Frame projectileFrame( LUPI_maybeUnused std::size_t a_index = 0 ) const { return( m_projectileFrame ); }             /**< Returns the value of the *m_projectileFrame* member. */
4789         int numberOfLazyParsingHelperForms( ) const { return( m_numberOfLazyParsingHelperForms ); }
4790                                                                                     /**< Returns the value of the *m_numberOfLazyParsingHelperForms* member. */
4791         int numberOfLazyParsingHelperFormsReplaced( ) const { return( m_numberOfLazyParsingHelperFormsReplaced ); }
4792                                                                                     /**< Returns the value of the *m_numberOfLazyParsingHelperFormsReplaced* member. */
4793         double thresholdFactor( ) const { return( m_thresholdFactor ); }                                    /**< Returns the value of the *m_thresholdFactor* member. */
4794 
4795         Documentation_1_10::Suite &documentations( ) { return( m_documentations ); }                        /**< Returns the value of the *m_documentations* member. */
4796 
4797         ExternalFile const &externalFile( std::string const a_label ) const { return( *m_externalFiles.get<ExternalFile>( a_label ) ); }      /**< Returns the external file with label *a_label*. */
4798         ExternalFiles::Suite const &externalFiles( ) const { return( m_externalFiles ); }                   /**< Returns the value of the *m_externalFiles* member. */
4799 
4800         Styles::Base &style( std::string const &a_label ) { return( *m_styles.get<Styles::Base>( a_label ) ); }              /**< Returns the style with label *a_label*. */
4801         Styles::Base const &style( std::string const &a_label ) const { return( *m_styles.get<Styles::Base const>( a_label ) ); }  /**< Returns the const style with label *a_label*. */
4802         Styles::Suite &styles( ) { return( m_styles ); }                                                    /**< Returns the value of the *m_styles* member. */
4803         Styles::Suite const &styles( ) const { return( m_styles ); }                                        /**< Returns a *const* reference to the *m_styles* member. */
4804 
4805         PoPI::Database const &internalPoPs( ) const { return( m_internalPoPs ); }                           /**< Returns a *const* reference to the *m_internalPoPs* member. */
4806         PoPI::Database &internalPoPs( ) { return( m_internalPoPs ); }                                       /**< Returns a reference to the *m_internalPoPs* member. */
4807 
4808         int intid( std::string const &a_id ) const;
4809         void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
4810         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4811                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
4812 
4813         Styles::TemperatureInfos temperatures( ) const ;
4814 
4815         std::size_t numberOfReactions( ) const { return( m_reactions.size( ) ); }                                   /**< Returns the number of reactions in the **Protare**. */
4816         Reaction *reaction( std::size_t a_index ) { return( m_reactions.get<Reaction>( a_index ) ); }               /**< Returns the *a_index* - 1 reaction. */
4817         Reaction const *reaction( std::size_t a_index ) const { return( m_reactions.get<Reaction>( a_index ) ); }   /**< Returns the *a_index* - 1 reaction. */
4818         Reaction const *reaction( std::size_t a_index, Transporting::MG const &a_settings, 
4819                 ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const;
4820         std::size_t numberOfInactiveReactions( ) const ;
4821 
4822         std::size_t numberOfOrphanProducts( ) const { return( m_orphanProducts.size( ) ); }                         /**< Returns the number of orphan product reactions in the **Protare**. */
4823         Reaction *orphanProduct( std::size_t a_index ) { return( m_orphanProducts.get<Reaction>( a_index ) ); }     /**< Returns the *a_index* - 1 orphan product reaction. */
4824         Reaction const *orphanProduct( std::size_t a_index ) const { return( m_orphanProducts.get<Reaction>( a_index ) ); }     /**< Returns the *a_index* - 1 orphan product reaction. */
4825 
4826         std::size_t numberOfIncompleteReactions( ) const { return( m_incompleteReactions.size( ) ); }                                   /**< Returns the number of incomplete reactions in the **Protare**. */
4827         Reaction *incompleteReaction( std::size_t a_index ) { return( m_incompleteReactions.get<Reaction>( a_index ) ); }               /**< Returns the *a_index* - 1 reaction. */
4828         Reaction const *incompleteReaction( std::size_t a_index ) const { return( m_incompleteReactions.get<Reaction>( a_index ) ); }   /**< Returns the *a_index* - 1 reaction. */
4829         void updateReactionIndices( std::size_t a_offset ) const;
4830 
4831         bool hasFission( ) const ;
4832         bool isDelayedFissionNeutronComplete( ) const ;
4833 
4834         GUPI::Ancestry *findInAncestry3( std::string const &a_item );
4835         GUPI::Ancestry const *findInAncestry3( std::string const &a_item ) const ;
4836 
4837         std::vector<double> groupBoundaries( Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4838                         std::string const &a_productID ) const ;
4839         Vector multiGroupInverseSpeed( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4840                         Styles::TemperatureInfo const &a_temperatureInfo ) const ;
4841 
4842         Vector multiGroupCrossSection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4843                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {},
4844                         std::string const &a_label = "" ) const ;
4845         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4846                         Styles::TemperatureInfo const &a_temperatureInfo, bool a_final, bool a_effectivePhotoAtomic = true,
4847                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4848 
4849         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4850                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4851                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4852         Vector multiGroupFissionNeutronMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4853                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4854         Vector multiGroupFissionGammaMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4855                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4856 
4857         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4858                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, 
4859                         std::string const &a_productID, std::size_t a_order, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4860         Matrix multiGroupFissionMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4861                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order,
4862                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4863         Vector multiGroupTransportCorrection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4864                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order, 
4865                         TransportCorrectionType a_transportCorrectionType, double a_temperature,
4866                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4867 
4868         Vector multiGroupAvailableEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4869                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4870         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4871                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4872                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4873         Vector multiGroupDepositionEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4874                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
4875                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4876 
4877         Vector multiGroupAvailableMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4878                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4879         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4880                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4881                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4882         Vector multiGroupDepositionMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4883                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
4884                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4885 
4886         Vector multiGroupGain( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4887                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4888                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4889 
4890         stringAndDoublePairs muCutoffForCoulombPlusNuclearElastic( ) const ;
4891         DelayedNeutronProducts delayedNeutronProducts( ) const ;
4892         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
4893 
4894         void saveAs( std::string const &a_fileName ) const ;
4895         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
4896 
4897         void parseEvaluatedTargetInfo( HAPI::Node const &a_node );
4898 };
4899 
4900 /*
4901 ============================================================
4902 ===================== ProtareComposite =====================
4903 ============================================================
4904 */
4905 class ProtareComposite : public Protare {
4906 
4907     private:
4908         std::vector<Protare *> m_protares;                                      /**< List of protares added to *this* instance. */
4909 
4910     public:
4911         ProtareComposite( Construction::Settings const &a_construction );
4912         ~ProtareComposite( );
4913 
4914         std::vector<Protare *> &protares( ) { return( m_protares ); }           /**< Returns the value of the *m_protares* member. */
4915         void append( Protare *a_protare );
4916 
4917 // The rest are virtual methods defined in the Protare class.
4918 
4919         ProtareType protareType( ) const { return( ProtareType::composite ); }  /**< Returns the type of the protare. */
4920         std::size_t numberOfProtares( ) const ;
4921         ProtareSingle *protare( std::size_t a_index );
4922         ProtareSingle const *protare( std::size_t a_index ) const ;
4923 
4924         LUPI::FormatVersion const &formatVersion( std::size_t a_index = 0 ) const ;
4925         std::string const &fileName( std::size_t a_index = 0 ) const ;
4926         std::string const &realFileName( std::size_t a_index = 0 ) const ;
4927 
4928         std::vector<std::string> libraries( std::size_t a_index = 0 ) const ;
4929         std::string const &evaluation( std::size_t a_index = 0 ) const ;
4930         Frame projectileFrame( std::size_t a_index = 0 ) const ;
4931         int numberOfLazyParsingHelperForms( ) const ;
4932         int numberOfLazyParsingHelperFormsReplaced( ) const ;
4933         double thresholdFactor( ) const ;
4934 
4935         Documentation_1_10::Suite &documentations( );
4936 
4937         Styles::Base &style( std::string const &a_label );
4938         Styles::Suite &styles( );
4939         Styles::Suite const &styles( ) const ;
4940 
4941         int intid( std::string const &a_id ) const;
4942         void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
4943         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4944                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
4945 
4946         Styles::TemperatureInfos temperatures( ) const ;
4947 
4948         std::size_t numberOfReactions( ) const ;
4949         Reaction *reaction( std::size_t a_index );
4950         Reaction const *reaction( std::size_t a_index ) const ;
4951         Reaction const *reaction( std::size_t a_index, Transporting::MG const &a_settings, 
4952                 ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const;
4953         std::size_t numberOfOrphanProducts( ) const ;
4954         Reaction *orphanProduct( std::size_t a_index );
4955         Reaction const *orphanProduct( std::size_t a_index ) const ;
4956         void updateReactionIndices( std::size_t a_offset ) const;
4957 
4958         bool hasFission( ) const ;
4959         bool isDelayedFissionNeutronComplete( ) const ;
4960 
4961         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }  /**< Always returns *nullptr*. */
4962         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }  /**< Always returns *nullptr*. */
4963 
4964         std::vector<double> groupBoundaries( Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
4965                         std::string const &a_productID ) const ;
4966         Vector multiGroupInverseSpeed( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4967                         Styles::TemperatureInfo const &a_temperatureInfo ) const ;
4968 
4969         Vector multiGroupCrossSection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4970                         Styles::TemperatureInfo const &a_temperatureInfo, 
4971                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {},
4972                         std::string const &a_label = "" ) const ;
4973         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4974                         Styles::TemperatureInfo const &a_temperatureInfo, bool a_final, bool a_effectivePhotoAtomic = true,
4975                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4976 
4977         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4978                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
4979                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4980         Vector multiGroupFissionNeutronMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4981                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4982         Vector multiGroupFissionGammaMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4983                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4984 
4985         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4986                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, 
4987                         std::string const &a_productID, std::size_t a_order, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4988         Matrix multiGroupFissionMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4989                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order,
4990                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4991         Vector multiGroupTransportCorrection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4992                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order, 
4993                         TransportCorrectionType a_transportCorrectionType, double a_temperature,
4994                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4995 
4996         Vector multiGroupAvailableEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4997                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
4998         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
4999                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5000                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5001         Vector multiGroupDepositionEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5002                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
5003                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5004 
5005         Vector multiGroupAvailableMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5006                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5007         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5008                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5009                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5010         Vector multiGroupDepositionMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5011                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
5012                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5013 
5014         Vector multiGroupGain( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5015                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5016                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5017 
5018         stringAndDoublePairs muCutoffForCoulombPlusNuclearElastic( ) const ;
5019         DelayedNeutronProducts delayedNeutronProducts( ) const ;
5020         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
5021 };
5022 
5023 /*
5024 ============================================================
5025 ======================= ProtareTNSL ========================
5026 ============================================================
5027 */
5028 class ProtareTNSL : public Protare {
5029 
5030     private:
5031         ProtareSingle *m_protare;                                           /**< Protare with non thermal neutron scattering law data. */
5032         ProtareSingle *m_TNSL;                                              /**< Protare with thermal neutron scattering law data. */
5033         Reaction *m_elasticReaction;                                        /**< The elastic reaction from the non TNSL protare. */
5034         std::map<std::string,std::size_t> m_maximumTNSL_MultiGroupIndex;    /**< For each neutron multi-group data, this the number of valid groups for the TNSL data. */
5035 
5036     public:
5037         ProtareTNSL( Construction::Settings const &a_construction, ProtareSingle *a_protare, ProtareSingle *a_TNSL );
5038         ~ProtareTNSL( );
5039 
5040         ProtareSingle *TNSL( ) { return( m_TNSL ); }                        /**< Returns the *m_TNSL* member. */
5041         ProtareSingle const *TNSL( ) const { return( m_TNSL ); }            /**< Returns the *m_TNSL* member. */
5042         Reaction *elasticReaction( ) { return( m_elasticReaction ); }       /**< Returns the *m_elasticReaction* member. */
5043         std::size_t maximumTNSL_MultiGroupIndex( Styles::TemperatureInfo const &a_temperatureInfo ) const ;
5044         void combineVectors( Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, Vector &a_vector, 
5045                         Vector const &a_vectorElastic, Vector const &a_vectorTNSL ) const ;
5046         void combineMatrices( Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, Matrix &a_matrix, 
5047                         Matrix const &a_matrixElastic, Matrix const &a_matrixTNSL ) const ;
5048 
5049 // The rest are virtual methods defined in the Protare class.
5050 
5051         ProtareType protareType( ) const { return( ProtareType::TNSL ); }   /**< Returns the type of the protare. */
5052         std::size_t numberOfProtares( ) const { return( 2 ); }              /**< Always returns 2. */
5053         ProtareSingle *protare( std::size_t a_index = 0 );
5054         ProtareSingle const *protare( std::size_t a_index = 0 ) const ;
5055 
5056         LUPI::FormatVersion const &formatVersion( std::size_t a_index = 0 ) const ;
5057         std::string const &fileName( std::size_t a_index = 0 ) const ;
5058         std::string const &realFileName( std::size_t a_index = 0 ) const ;
5059 
5060         std::vector<std::string> libraries( std::size_t a_index = 0 ) const ;
5061         std::string const &evaluation( std::size_t a_index = 0 ) const ;
5062         Frame projectileFrame( std::size_t a_index = 0 ) const ;
5063         int numberOfLazyParsingHelperForms( ) const ;
5064         int numberOfLazyParsingHelperFormsReplaced( ) const ;
5065         double thresholdFactor( ) const ;
5066 
5067         Documentation_1_10::Suite &documentations( );
5068 
5069         Styles::Base &style( std::string const &a_label );
5070         Styles::Suite &styles( );
5071         Styles::Suite const &styles( ) const ;
5072 
5073         int intid( std::string const &a_id ) const;
5074         void productIDs( std::set<std::string> &a_ids, Transporting::Particles const &a_particles, bool a_transportablesOnly ) const ;
5075         int maximumLegendreOrder( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5076                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID ) const ;
5077 
5078         Styles::TemperatureInfos temperatures( ) const ;
5079 
5080         std::size_t numberOfReactions( ) const ;
5081         Reaction *reaction( std::size_t a_index );
5082         Reaction const *reaction( std::size_t a_index ) const ;
5083         Reaction const *reaction( std::size_t a_index, Transporting::MG const &a_settings, 
5084                     ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const;
5085         std::size_t numberOfOrphanProducts( ) const ;
5086         Reaction *orphanProduct( std::size_t a_index );
5087         Reaction const *orphanProduct( std::size_t a_index ) const ;
5088         void updateReactionIndices( std::size_t a_offset ) const;
5089 
5090         bool hasFission( ) const ;
5091         bool isDelayedFissionNeutronComplete( ) const ;
5092 
5093         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }                      /**< Always returns *nullptr*. */
5094         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }          /**< Always returns *nullptr*. */
5095 
5096         std::vector<double> groupBoundaries( Transporting::MG const &a_settings, Styles::TemperatureInfo const &a_temperatureInfo, 
5097                         std::string const &a_productID ) const ;
5098         Vector multiGroupInverseSpeed( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5099                         Styles::TemperatureInfo const &a_temperatureInfo ) const ;
5100 
5101         Vector multiGroupCrossSection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5102                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {},
5103                         std::string const &a_label = "" ) const ;
5104         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5105                         Styles::TemperatureInfo const &a_temperatureInfo, bool a_final, bool a_effectivePhotoAtomic = true,
5106                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5107 
5108         Vector multiGroupMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5109                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5110                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5111         Vector multiGroupFissionNeutronMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5112                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5113         Vector multiGroupFissionGammaMultiplicity( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5114                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5115 
5116         Matrix multiGroupProductMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5117                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, 
5118                         std::string const &a_productID, std::size_t a_order, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5119         Matrix multiGroupFissionMatrix( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5120                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order,
5121                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5122         Vector multiGroupTransportCorrection( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5123                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles, std::size_t a_order, 
5124                         TransportCorrectionType a_transportCorrectionType, double a_temperature,
5125                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5126 
5127         Vector multiGroupAvailableEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5128                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5129         Vector multiGroupAverageEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5130                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5131                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5132         Vector multiGroupDepositionEnergy( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5133                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
5134                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5135 
5136         Vector multiGroupAvailableMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5137                         Styles::TemperatureInfo const &a_temperatureInfo, ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5138         Vector multiGroupAverageMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5139                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5140                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5141         Vector multiGroupDepositionMomentum( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5142                         Styles::TemperatureInfo const &a_temperatureInfo, Transporting::Particles const &a_particles,
5143                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5144 
5145         Vector multiGroupGain( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5146                         Styles::TemperatureInfo const &a_temperatureInfo, std::string const &a_productID,
5147                         ExcludeReactionsSet const &a_reactionsToExclude = ExcludeReactionsSet {} ) const ;
5148 
5149         void TNSL_crossSectionSumCorrection( std::string const &a_label, Functions::XYs1d &a_crossSectionSum );
5150         void TNSL_crossSectionSumCorrection( std::string const &a_label, Functions::Ys1d &a_crossSectionSum );
5151         void TNSL_crossSectionSumCorrection( std::string const &a_label, Vector &a_crossSectionSum ) {
5152             return( Protare::TNSL_crossSectionSumCorrection( a_label, a_crossSectionSum ) );
5153         }
5154 
5155         stringAndDoublePairs muCutoffForCoulombPlusNuclearElastic( ) const ;
5156         DelayedNeutronProducts delayedNeutronProducts( ) const { return( m_protare->delayedNeutronProducts( ) ); }
5157         void incompleteParticles( Transporting::Settings const &a_settings, std::set<std::string> &a_incompleteParticles ) const ;
5158 };
5159 
5160 namespace Map {
5161 
5162 enum class EntryType { import, protare, TNSL };
5163 #define GIDI_MapInteractionNuclearChars "nuclear"
5164 #define GIDI_MapInteractionAtomicChars "atomic"
5165 #define GIDI_MapInteractionTNSLChars "thermalNeutronScatteringLaw"
5166 
5167 typedef std::vector<ProtareBase const *> FindProtareEntries;
5168 
5169 /*
5170 ============================================================
5171 ========================= BaseEntry ========================
5172 ============================================================
5173 */
5174 class BaseEntry : public GUPI::Ancestry {
5175 
5176     public:
5177         enum class PathForm { entered, cumulative, real };
5178 
5179     private:
5180         std::string m_name;                                 /**< Designates the entry as either a protare or a map. */
5181         Map const *m_parent;                                /**< Pointer to map containing *this*. */
5182         std::string m_path;                                 /**< Absolute or relative (to map file) path of the protare or map file. */
5183         std::string m_cumulativePath;                       /**< Currently not used. */
5184 
5185     public:
5186         BaseEntry( HAPI::Node const &a_node, std::string const &a_basePath, Map const *a_parent );
5187         virtual ~BaseEntry( ) = 0;
5188 
5189         std::string const &name( ) const { return( m_name ); }              /**< Returns the value of the *m_name* member. */
5190         Map const *parent( ) const { return( m_parent ); }                  /**< Returns the value of the *m_parent* member. */
5191         std::string path( PathForm a_form = PathForm::real ) const ;
5192 
5193         virtual EntryType entryType( ) const = 0;
5194 
5195         void libraries( std::vector<std::string> &a_libraries ) const ;
5196         virtual ProtareBase const *findProtareEntry( std::string const &a_projectileID, std::string const &a_targetID, 
5197                         std::string const &a_library = "", std::string const &a_evaluation = "" ) const = 0 ;
5198         virtual void findProtareEntries( FindProtareEntries &a_protareEntries, std::regex const &a_projectileID,
5199                         std::regex const &a_targetID, std::regex const &a_library = std::regex( ".*" ), 
5200                         std::regex const &a_evaluation = std::regex( ".*" ) ) const = 0 ;
5201 
5202         virtual void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const = 0;
5203 };
5204 
5205 /*
5206 ============================================================
5207 ========================== Import ==========================
5208 ============================================================
5209 */
5210 class Import : public BaseEntry {
5211 
5212     private:
5213         Map *m_map;                                         /**< Map instance for this Import. */
5214 
5215     public:
5216         Import( HAPI::Node const &a_node, PoPI::Database const &a_pops, std::string const &a_basePath, Map const *a_parent );
5217         ~Import( );
5218 
5219         EntryType entryType( ) const { return( EntryType::import ); }   /**< Returns EntryType::import. */
5220 
5221         Map const *map( ) const { return( m_map ); }                    /**< Returns the value of the *m_map* member. */
5222 
5223         ProtareBase const *findProtareEntry( std::string const &a_projectileID, std::string const &a_targetID,
5224                 std::string const &a_library = "", std::string const &a_evaluation = "" ) const ;
5225         void findProtareEntries( FindProtareEntries &a_protareEntries, std::regex const &a_projectileID,
5226                 std::regex const &a_targetID, std::regex const &a_library = std::regex( ".*" ), std::regex const &a_evaluation = std::regex( ".*" ) ) const ;
5227         std::string protareFilename( std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library = "",
5228                 std::string const &a_evaluation = "", PathForm a_form = PathForm::real ) const ;
5229         bool isProtareAvailable( std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library = "",
5230                 std::string const &a_evaluation = "" ) const {
5231             return( protareFilename( a_projectileID, a_targetID, a_library, a_evaluation ) != GIDI_emptyFileNameChars ); }
5232                                                                         /**< Returns the value of the *m_map* member. */
5233         std::vector<std::string> availableEvaluations( std::string const &a_projectileID, std::string const &a_targetID ) const ;
5234 
5235         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }                  /**< Always returns *nullptr*. */
5236         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }      /**< Always returns *nullptr*. */
5237 
5238         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
5239 };
5240 
5241 /*
5242 ============================================================
5243 ======================= ProtareBase ========================
5244 ============================================================
5245 */
5246 class ProtareBase : public BaseEntry {
5247 
5248     private:
5249         std::string m_projectileID;             /**< Projectile id for protare. */
5250         std::string m_targetID;                 /**< Target id for protare. */
5251         std::string m_evaluation;               /**< Evaluation string for protare. */
5252         std::string m_interaction;              /**< The interaction type for the protare. */
5253 
5254     public:
5255         ProtareBase( HAPI::Node const &a_node, std::string const &a_basePath, Map const *const a_map );
5256         ~ProtareBase( );
5257 
5258         std::string const &projectileID( ) const { return( m_projectileID ); }      /**< Returns the value of the *m_projectileID* member. */
5259         std::string const &targetID( ) const { return( m_targetID ); }              /**< Returns the value of the *m_targetID* member. */
5260         std::string const &evaluation( ) const { return( m_evaluation ); }          /**< Returns the value of the *m_evaluation* member. */
5261         std::string const &interaction( ) const { return( m_interaction ); }        /**< Returns the value of the *m_interaction* member. */
5262         void setInteraction( std::string const &a_interaction ) { m_interaction = a_interaction; }  /**< Set the *m_interaction* member to *a_interaction*. */
5263 
5264         bool isMatch( std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_evaluation = "" ) const ;
5265         std::string const &library( ) const ;
5266         std::string const &resolvedLibrary( ) const ;
5267 
5268         ProtareBase const *findProtareEntry( std::string const &a_projectileID, std::string const &a_targetID,
5269                 std::string const &a_library = "", std::string const &a_evaluation = "" ) const ;
5270         void findProtareEntries( FindProtareEntries &a_protareEntries, std::regex const &a_projectileID,
5271                 std::regex const &a_targetID, std::regex const &a_library = std::regex( ".*" ), std::regex const &a_evaluation = std::regex( ".*" ) ) const ;
5272         virtual GIDI::Protare *protare( Construction::Settings const &a_construction, PoPI::Database const &a_pops, 
5273                         ParticleSubstitution const &a_particleSubstitution ) const = 0 ;
5274         virtual GIDI::ProtareSingle *protareSingle( Construction::Settings const &a_construction, PoPI::Database const &a_pops, 
5275                         ParticleSubstitution const &a_particleSubstitution ) const = 0 ;
5276 
5277         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }                  /**< Always returns *nullptr*. */
5278         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }      /**< Always returns *nullptr*. */
5279 };
5280 
5281 /*
5282 ============================================================
5283 ========================= Protare ==========================
5284 ============================================================
5285 */
5286 class Protare : public ProtareBase {
5287 
5288     private:
5289         bool m_isPhotoAtomic;                   /**< true if photo-atomic protare and false otherwise. */
5290 
5291     public:
5292         Protare( HAPI::Node const &a_node, PoPI::Database const &a_pops, std::string const &a_basePath, Map const *const a_parent );
5293         ~Protare( );
5294 
5295         EntryType entryType( ) const { return( EntryType::protare ); }              /**< Returns EntryType::protare. */
5296 
5297         bool isPhotoAtomic( ) const { return( m_isPhotoAtomic ); }                  /**< Returns the value of the *m_isPhotoAtomic* member. */
5298         GIDI::Protare *protare( Construction::Settings const &a_construction, PoPI::Database const &a_pops, ParticleSubstitution const &a_particleSubstitution ) const ;
5299         GIDI::ProtareSingle *protareSingle( Construction::Settings const &a_construction, PoPI::Database const &a_pops, 
5300                 ParticleSubstitution const &a_particleSubstitution ) const ;
5301 
5302         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
5303 };
5304 
5305 /*
5306 ============================================================
5307 =========================== TNSL ===========================
5308 ============================================================
5309 */
5310 class TNSL : public ProtareBase {
5311 
5312     private:
5313         std::string m_standardTarget;                           /**< The non-TNSL target. */
5314         std::string m_standardEvaluation;                       /**< The non-TNSL evaluation. */
5315 
5316     public:
5317         TNSL( HAPI::Node const &a_node, PoPI::Database const &a_pops, std::string const &a_basePath, Map const *const a_parent );
5318         ~TNSL( );
5319 
5320         EntryType entryType( ) const { return( EntryType::TNSL ); }                 /**< Returns EntryType::TNSL. */
5321 
5322         std::string const &standardTarget( ) const { return( m_standardTarget ); }
5323         std::string const &standardEvaluation( ) const { return( m_standardEvaluation ); }
5324         GIDI::Protare *protare( Construction::Settings const &a_construction, PoPI::Database const &a_pops, ParticleSubstitution const &a_particleSubstitution ) const ;
5325         GIDI::ProtareSingle *protareSingle( Construction::Settings const &a_construction, PoPI::Database const &a_pops, 
5326                 ParticleSubstitution const &a_particleSubstitution ) const ;
5327 
5328         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
5329 };
5330 
5331 /*
5332 ============================================================
5333 =========================== Map ============================
5334 ============================================================
5335 */
5336 class Map : public GUPI::Ancestry {
5337 
5338     private:
5339         Map const *m_parent;                            /**< Pointer to map containing *this* if this is an imported map. */
5340         std::string m_fileName;                         /**< Specified path to Map file. */
5341         std::string m_realFileName;                     /**< Absolute, real path to Map file. */
5342         std::string m_library;                          /**< The name of the library. */
5343         std::vector<BaseEntry *> m_entries;             /**< List of Map entries. */
5344         RISI::Projectiles m_projectiles;                /**< **RISI::Projectiles** loaded when method RIS_load is called. */
5345         bool m_projectilesLoaded;                       /**< If **true** data for **m_projectiles** have been read in, otherwise they have not been read in. */
5346 
5347         void initialize( std::string const &a_fileName, PoPI::Database const &a_pops, Map const *a_parent );
5348         void initialize( HAPI::Node const &a_node, std::string const &a_fileName, PoPI::Database const &a_pops, Map const *a_parent );
5349 
5350     public:
5351         Map( std::string const &a_fileName, PoPI::Database const &a_pops, Map const *a_parent = nullptr );
5352         Map( HAPI::Node const &a_node, std::string const &a_fileName, PoPI::Database const &a_pops, Map const *a_parent = nullptr );
5353         ~Map( );
5354 
5355         Map const *parent( ) const { return( m_parent ); }                      /**< Returns the value of the *m_parent* member. */
5356         std::string const &fileName( ) const { return( m_fileName ); }          /**< Returns the value of the *m_fileName* member. */
5357         std::string const &realFileName( ) const { return( m_realFileName ); }  /**< Returns the value of the *m_realFileName* member. */
5358 
5359         std::string const &library( ) const { return( m_library ); }            /**< Returns the value of the *m_library* member. */
5360         std::string const &resolvedLibrary( ) const ;
5361         void libraries( std::vector<std::string> &a_libraries ) const ;
5362 
5363         std::size_t size( ) const { return( m_entries.size( ) ); }              /**< Returns the number of entries in *this*. Does not descend map entries. */
5364         BaseEntry const *operator[]( std::size_t a_index ) const { return( m_entries[a_index] ); }
5365                                                                                 /**< Returns the map entry at index *a_index*. */
5366 
5367         ProtareBase const *findProtareEntry( std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library = "",
5368                 std::string const &a_evaluation = "" ) const ;
5369         void findProtareEntries( FindProtareEntries &a_protareEntries, std::regex const &a_projectileID,
5370                 std::regex const &a_targetID, std::regex const &a_library = std::regex( ".*" ), std::regex const &a_evaluation = std::regex( ".*" ) ) const ;
5371         std::string protareFilename( std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library = "",
5372                 std::string const &a_evaluation = "", BaseEntry::PathForm a_form = BaseEntry::PathForm::real ) const ;
5373 
5374         bool isProtareAvailable( std::string const &a_projectileID, std::string const &a_targetID, std::string const &a_library = "",
5375                 std::string const &a_evaluation = "" ) const {
5376             return( protareFilename( a_projectileID, a_targetID, a_library, a_evaluation, BaseEntry::PathForm::entered ) != GIDI_emptyFileNameChars ); }
5377                                 /**< Returns true if the map contains a Protare matching *a_projectileID*, *a_targetID*, *a_library* and *a_evaluation*, and false otherwise. */
5378         bool isTNSL_target( std::string const &a_targetID ) const ;
5379         std::vector<std::string> availableEvaluations( std::string const &a_projectileID, std::string const &a_targetID ) const ;
5380 
5381         GIDI::Protare *protare(             Construction::Settings const &a_construction, PoPI::Database const &a_pops, std::string const &a_projectileID, 
5382                 std::string const &a_targetID, std::string const &a_library = "", std::string const &a_evaluation = "", 
5383                 bool a_targetRequiredInGlobalPoPs = true, bool a_requiredInPoPs = true ) const ;
5384 
5385         std::vector<ProtareBase const *> directory( std::string const &a_projectileID = "", std::string const &a_targetID = "", 
5386                 std::string const &a_library = "", std::string const &a_evaluation = "" ) const ;
5387         bool walk( MapWalkCallBack a_mapWalkCallBack, void *a_userData, int a_level = 0 ) const ;
5388 
5389         GUPI::Ancestry *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) { return( nullptr ); }                  /**< Always returns *nullptr*. */
5390         GUPI::Ancestry const *findInAncestry3( LUPI_maybeUnused std::string const &a_item ) const { return( nullptr ); }      /**< Always returns *nullptr*. */
5391 
5392         void saveAs( std::string const &a_fileName ) const ;
5393         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
5394 
5395         std::string RIS_fileName( );
5396         bool RIS_fileExist( );
5397         RISI::Projectiles const &RIS_load( std::string const &a_energyUnit );
5398         std::string replacementTarget( PoPI::Database const &a_pops, std::string const &a_projectile, std::string const &a_target );
5399 };
5400 
5401 }           // End of namespace Map.
5402 
5403 namespace Functions {
5404 /*
5405 ============================================================
5406 ================= FissionEnergyRelease ==================
5407 ============================================================
5408 */
5409 class FissionEnergyRelease : public Function1dForm {
5410 
5411     private:
5412         Function1dForm *m_promptProductKE;                  /**< The **ENDF** prompt total product kinetic energy released. */
5413         Function1dForm *m_promptNeutronKE;                  /**< The **ENDF** prompt neutron kinetic energy released. */
5414         Function1dForm *m_delayedNeutronKE;                 /**< The **ENDF** delayed neutron kinetic energy released. */
5415         Function1dForm *m_promptGammaEnergy;                /**< The **ENDF** prompt gamma energy released. */
5416         Function1dForm *m_delayedGammaEnergy;               /**< The **ENDF** delayed gamma energy released. */
5417         Function1dForm *m_delayedBetaEnergy;                /**< The **ENDF** delayed beta kinetic energy released. */
5418         Function1dForm *m_neutrinoEnergy;                   /**< The **ENDF** neutrino energy released. */
5419         Function1dForm *m_nonNeutrinoEnergy;                /**< The **ENDF** non neutrino energy released. */
5420         Function1dForm *m_totalEnergy;                      /**< The **ENDF** total energy released. */
5421 
5422         void energyReleaseToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_moniker, std::string const &a_indent, Function1dForm *a_function1d ) const ;
5423 
5424     public:
5425         FissionEnergyRelease( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
5426         ~FissionEnergyRelease( );
5427 
5428         double domainMin( ) const { return( m_nonNeutrinoEnergy->domainMin( ) ); }                  /**< Returns the minimum domain value for the energy released. */
5429         double domainMax( ) const { return( m_nonNeutrinoEnergy->domainMax( ) ); }                  /**< Returns the maximum domain value for the energy released. */
5430         double evaluate( double a_x1 ) const { return( m_nonNeutrinoEnergy->evaluate( a_x1 ) ); }   /**< Returns the value of *m_nonNeutrinoEnergy* evaluated at *a_x1*. */
5431         Vector multiGroupQ( LUPI::StatusMessageReporting &a_smr, Transporting::MG const &a_settings, 
5432                         Styles::TemperatureInfo const &a_temperatureInfo ) const ;
5433 
5434         Function1dForm const *promptProductKE( ) const { return( m_promptProductKE ); }             /**< Returns the value of the *m_promptProductKE* member. */
5435         Function1dForm       *promptProductKE( )       { return( m_promptProductKE ); }             /**< Returns the value of the *m_promptProductKE* member. */
5436         Function1dForm const *promptNeutronKE( ) const { return( m_promptNeutronKE ); }             /**< Returns the value of the *m_promptNeutronKE* member. */
5437         Function1dForm       *promptNeutronKE( )       { return( m_promptNeutronKE ); }             /**< Returns the value of the *m_promptNeutronKE* member. */
5438         Function1dForm const *delayedNeutronKE( ) const { return( m_delayedNeutronKE ); }           /**< Returns the value of the *m_delayedNeutronKE* member. */
5439         Function1dForm       *delayedNeutronKE( )       { return( m_delayedNeutronKE ); }           /**< Returns the value of the *m_delayedNeutronKE* member. */
5440         Function1dForm const *promptGammaEnergy( ) const { return( m_promptGammaEnergy ); }         /**< Returns the value of the *m_promptGammaEnergy* member. */
5441         Function1dForm       *promptGammaEnergy( )       { return( m_promptGammaEnergy ); }         /**< Returns the value of the *m_promptGammaEnergy* member. */
5442         Function1dForm const *delayedGammaEnergy( ) const { return( m_delayedGammaEnergy ); }       /**< Returns the value of the *m_delayedGammaEnergy* member. */
5443         Function1dForm       *delayedGammaEnergy( )       { return( m_delayedGammaEnergy ); }       /**< Returns the value of the *m_delayedGammaEnergy* member. */
5444         Function1dForm const *delayedBetaEnergy( ) const { return( m_delayedBetaEnergy ); }         /**< Returns the value of the *m_delayedBetaEnergy* member. */
5445         Function1dForm       *delayedBetaEnergy( )       { return( m_delayedBetaEnergy ); }         /**< Returns the value of the *m_delayedBetaEnergy* member. */
5446         Function1dForm const *neutrinoEnergy( ) const { return( m_neutrinoEnergy ); }               /**< Returns the value of the *m_neutrinoEnergy* member. */
5447         Function1dForm       *neutrinoEnergy( )       { return( m_neutrinoEnergy ); }               /**< Returns the value of the *m_neutrinoEnergy* member. */
5448         Function1dForm const *nonNeutrinoEnergy( ) const { return( m_nonNeutrinoEnergy ); }         /**< Returns the value of the *m_neutrinoEnergy* member. */
5449         Function1dForm       *nonNeutrinoEnergy( )       { return( m_nonNeutrinoEnergy ); }         /**< Returns the value of the *m_neutrinoEnergy* member. */
5450         Function1dForm const *totalEnergy( ) const { return( m_totalEnergy ); }                     /**< Returns the value of the *m_totalEnergy* member. */
5451         Function1dForm       *totalEnergy( )       { return( m_totalEnergy ); }                     /**< Returns the value of the *m_totalEnergy* member. */
5452 
5453         void toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent = "" ) const ;
5454 };
5455 
5456 }           // End of namespace Functions.
5457 
5458 /*
5459 ============================================================
5460 ========================== Groups ==========================
5461 ============================================================
5462 */
5463 class Groups : public Suite {
5464 
5465     public:
5466         Groups( );
5467         Groups( std::string const &a_fileName );
5468 
5469         void addFile( std::string const &a_fileName );
5470 };
5471 
5472 /*
5473 ============================================================
5474 ========================== Fluxes ==========================
5475 ============================================================
5476 */
5477 class Fluxes : public Suite {
5478 
5479     public:
5480         Fluxes( );
5481         Fluxes( std::string const &a_fileName );
5482 
5483         void addFile( std::string const &a_fileName );
5484 };
5485 
5486 /*
5487 ============================================================
5488 ============= MultiGroupCalulationInformation ==============
5489 ============================================================
5490 */
5491 
5492 class MultiGroupCalulationInformation {
5493 
5494     public:
5495         Transporting::MultiGroup const &m_multiGroup;       /**< The multi-group boundaries. */
5496         Transporting::Flux const &m_flux;                   /**< The flux weighting. */
5497         ptwXPoints *m_boundaries_xs;                        /**< This is an **ptwXPoints** representation of *m_heatedMultiGroupLabel* as needed by numerical functions. */
5498         ptwXYPoints *m_fluxes_xys;                          /**< This is an **ptwXYPoints** representation of *m_flux* as needed by numerical functions. */
5499         ptwXPoints *m_multiGroupFlux;                       /**< This is the grouped representation of *m_flux* as needed by numerical functions. */
5500 
5501         MultiGroupCalulationInformation( Transporting::MultiGroup const &a_multiGroup, Transporting::Flux const &a_flux );
5502         ~MultiGroupCalulationInformation( );
5503 };
5504 
5505 /*
5506 ============================================================
5507 ========================== others ==========================
5508 ============================================================
5509 */
5510 Form *parseExternalFilesSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5511                 std::string const &a_name, Styles::Suite const *a_styles );
5512 Form *parseStylesSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5513                 std::string const &a_name, Styles::Suite const *a_styles );
5514 Form *parseTransportablesSuite( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5515                 std::string const &a_name, Styles::Suite const *a_styles );
5516 Form *parseReaction( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5517                 std::string const &a_name, Styles::Suite const *a_styles );
5518 Form *parseOrphanProduct( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5519                 std::string const &a_name, Styles::Suite const *a_styles );
5520 Form *parseFissionComponent( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
5521                 PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles );
5522 Form *parseReactionType( std::string const &a_moniker, Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5523                 std::string const &a_name, Styles::Suite const *a_styles );
5524 Form *parseSumsCrossSectionsSuite( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
5525                 PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles );
5526 Form *parseSumsMultiplicitiesSuite( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
5527                 PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles );
5528 Form *parseDoubleDifferentialCrossSectionSuite( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5529                 std::string const &a_name, Styles::Suite const *a_styles );
5530 Form *parseScatteringAtom( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5531                 std::string const &a_name, Styles::Suite const *a_styles );
5532 Form *parseCrossSectionSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5533                 std::string const &a_name, Styles::Suite const *a_styles );
5534 Form *parseDelayedNeutronsSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5535                 std::string const &a_name, Styles::Suite const *a_styles );
5536 Form *parseFissionEnergyReleasesSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5537                 std::string const &a_name, Styles::Suite const *a_styles );
5538 Form *parsePhysicalQuantitySuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5539                 std::string const &a_name, Styles::Suite const *a_styles );
5540 Form *parseAvailableSuite( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs,
5541                 std::string const &a_name, Styles::Suite const *a_styles );
5542 Form *parseQSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5543                 std::string const &a_name, Styles::Suite const *a_styles );
5544 Form *parseProductSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs, 
5545                 std::string const &a_name, Styles::Suite const *a_styles );
5546 Form *parseMultiplicitySuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5547                 std::string const &a_name, Styles::Suite const *a_styles );
5548 Form *parseDistributionSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5549                 std::string const &a_name, Styles::Suite const *a_styles );
5550 Form *parseAverageEnergySuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5551                 std::string const &a_name, Styles::Suite const *a_styles );
5552 Form *parseAverageMomentumSuite( Construction::Settings const &a_construction, Suite *parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pop, PoPI::Database const &a_internalPoPs,
5553                 std::string const &a_name, Styles::Suite const *a_styles );
5554 Form *parseACE_URR_probabilityTables( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo,
5555                 PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles );
5556 Form *parseColumnHeaders( Construction::Settings const &a_construction, Suite *a_parent, HAPI::Node const &a_node, SetupInfo &a_setupInfo,
5557                 PoPI::Database const &a_pops, PoPI::Database const &a_internalPoPs, std::string const &a_name, Styles::Suite const *a_styles );
5558 Functions::Function1dForm *data1dParse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *parent );
5559 Functions::Function1dForm *data1dParseAllowEmpty( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent );
5560 void data1dListParse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::vector<Functions::Function1dForm *> &a_function1ds );
5561 Functions::Function2dForm *data2dParse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *parent );
5562 void data2dListParse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::vector<Functions::Function2dForm *> &a_function2ds );
5563 Functions::Function3dForm *data3dParse( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *parent );
5564 void checkOuterDomainValues1d( std::vector<Functions::Function1dForm *> &a_functions, std::vector<double> &a_Xs );
5565 void checkOuterDomainValues2d( std::vector<Functions::Function2dForm *> &a_functions, std::vector<double> &a_Xs );
5566 void checkSequentialDomainLimits1d( std::vector<Functions::Function1dForm *> &a_functions, std::vector<double> &a_Xs );
5567 void checkSequentialDomainLimits2d( std::vector<Functions::Function2dForm *> &a_functions, std::vector<double> &a_Xs );
5568 
5569 int parseFlattened1d( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Vector &data );
5570 
5571 Vector collapse( Vector const &a_vector, Transporting::Settings const &a_settings, Transporting::Particles const &a_particles, double a_temperature );
5572 Matrix collapse( Matrix const &a_matrix, Transporting::Settings const &a_settings, Transporting::Particles const &a_particles, double a_temperature, 
5573                 std::string const &a_productID );
5574 
5575 Vector transportCorrect( Vector const &a_vector, Vector const &a_transportCorrection );
5576 Matrix transportCorrect( Matrix const &a_matrix, Vector const &a_transportCorrection );
5577 
5578 Vector multiGroupXYs1d( Transporting::MultiGroup const &a_boundaries, Functions::XYs1d const &a_function, Transporting::Flux const &a_flux );
5579 Vector *multiGroupTwoXYs1ds( MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, Functions::XYs1d const &a_function1,
5580                 Functions::XYs1d const &a_function2 );
5581 void calculate1dMultiGroupDataInComponent( ProtareSingle const *a_protare, std::string const &a_heatedMultiGroupLabel,
5582                 MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, Component &a_component, Functions::XYs1d const &a_crossSection );
5583 void calculate1dMultiGroupFissionEnergyRelease( MultiGroupCalulationInformation const &a_multiGroupCalulationInformation, Functions::XYs1d const &a_weight,
5584                 Functions::Function1dForm const *a_evaluated, Functions::Function1dForm *a_gridded1d );
5585 
5586 
5587 int ENDL_CFromENDF_MT( int ENDF_MT, int *ENDL_C, int *ENDL_S );
5588 
5589 GNDS_FileType GNDS_fileType( std::string const &a_fileName, GNDS_FileTypeInfo &a_GNDS_fileTypeInfo );
5590 
5591 /*
5592 *   The following are in the file GIDI_misc.cpp.
5593 */
5594 long binarySearchVector( double a_x, std::vector<double> const &a_Xs );
5595 void intsToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, std::vector<int> const &a_values, std::string const &a_attributes );
5596 void parseValuesOfDoubles( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer<double> &a_vector );
5597 void parseValuesOfDoubles( HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer<double> &a_vector, int a_useSystem_strtod );
5598 void parseValuesOfInts( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::vector<int> &a_vector );
5599 void parseValuesOfInts( HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer<int> &a_vector );
5600 void doublesToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, std::vector<double> const &a_values, std::size_t a_start = 0, bool a_newLine = true,
5601         std::string const &a_valueType = "" );
5602 Frame parseFrame( HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::string const &a_name );
5603 std::string frameToString( Frame a_frame );
5604 std::string intToString( int a_value );
5605 std::string size_t_ToString( std::size_t a_value );
5606 std::string nodeWithValuesToDoubles( GUPI::WriteInfo &a_writeInfo, std::string const &a_nodeName, std::vector<double> const &a_values );
5607 void excludeReactionsSetAdjust( ExcludeReactionsSet &a_excludeReactionsSet, Protare const &a_protare );
5608 
5609 Functions::Ys1d gridded1d2GIDI_Ys1d( Functions::Function1dForm const &a_function1d );
5610 Functions::Ys1d vector2GIDI_Ys1d( Axes const &a_axes, Vector const &a_vector );
5611 
5612 std::string LLNL_gidToLabel( int a_gid );
5613 std::string LLNL_fidToLabel( int a_fid );
5614 
5615 std::vector<std::string> sortedListOfStrings( std::vector<std::string> const &a_strings, bool a_orderIsAscending = true );
5616 
5617 void energy2dToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_moniker, std::string const &a_indent, Functions::Function1dForm *a_function );
5618 
5619 std::vector<Transporting::Flux> settingsFluxesFromFunction3d( Functions::Function3dForm const &a_function3d );
5620 
5621 }           // End of namespace GIDI.
5622 
5623 #endif      // End of GIDI_hpp_included