41 std::string
const *label = &a_label;
45 if( iter != a_suite.
end( ) )
return( label );
50 if( *label ==
"" )
break;
51 iter = a_suite.
find( *label );
66std::vector< std::vector< Base const * > >
Suite::chains(
bool a_ends )
const {
68 std::vector< std::vector< Base const * > > chains1;
70 for(
auto iter =
begin( ); iter !=
end( ); ++iter ) {
71 Base const *base =
static_cast<Base const *
>( *iter );
72 chains1.push_back( base->
chain( ) );
76 std::vector< std::vector<Base const *> > chains2;
77 for(
auto iter1 = chains1.begin( ); iter1 != chains1.end( ); ++iter1 ) {
78 Base const *head = (*iter1)[0];
80 for(
auto iter2 = chains1.begin( ); iter2 != chains1.end( ); ++iter2 ) {
81 if( (*iter2)[0]->isStyleInDerivedForm( head ) ) {
87 std::vector< Base const * > item;
88 item.push_back( head );
89 chains2.push_back( item );
104 m_chainEnds.clear( );
105 m_preProcessingChainEnds.clear( );
107 auto chains1 =
chains(
true );
108 for(
auto iter = chains1.begin( ); iter != chains1.end( ); ++iter ) m_chainEnds.push_back( (*iter)[0] );
110 chains1 =
chains(
false );
111 std::vector<Base const *> preProcessingChains;
112 for(
auto iter = chains1.begin( ); iter != chains1.end( ); ++iter ) {
113 auto moniker = (*iter)[0]->moniker( );
116 preProcessingChains.push_back( (*iter)[0] );
120 for(
auto iter1 = preProcessingChains.begin( ); iter1 != preProcessingChains.end( ); ++iter1 ) {
122 for(
auto iter2 = preProcessingChains.begin( ); iter2 != preProcessingChains.end( ); ++iter2 ) {
123 if( (*iter2)->isStyleInDerivedForm( *iter1 ) ) {
129 m_preProcessingChainEnds.push_back( *iter1 );
152 m_documentation = nullptr;
154 m_documentation = new GUPI::Documentation( a_node.child( GIDI_documentationChars ) );
160 delete m_documentation;
174 return(
dynamic_cast<Base const *
>( _form ) );
187 Base const *_style =
dynamic_cast<Base const *
>( _form );
189 if( _style ==
nullptr )
return( _style );
202 std::vector<Base const *> chain1;
205 while(
style !=
nullptr ) {
206 chain1.push_back(
style );
225 while(
style !=
nullptr ) {
226 if(
style == a_style )
return(
true );
248 return( attributes );
263 Base( a_node, a_setupInfo, a_parent ),
288 m_temperature.toXMLList( a_writeInfo, indent2 );
289 m_projectileEnergyDomain.toXMLList( a_writeInfo, indent2 );
306 Base( a_node, a_setupInfo, a_parent ),
307 m_temperature( nullptr ) {
310 if( !temperatureNode.
empty( ) ) {
311 m_temperature = new PhysicalQuantity( temperatureNode, a_setupInfo );
320 delete m_temperature;
331 if( m_temperature !=
nullptr )
return( *m_temperature );
335 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
336 return(
style->temperature( ) );
351 if( m_temperature !=
nullptr ) m_temperature->toXMLList( a_writeInfo, indent2 );
367 Base( a_node, a_setupInfo, a_parent ),
368 m_temperature( nullptr ) {
371 if( !temperatureNode.
empty( ) ) {
372 m_temperature = new PhysicalQuantity( temperatureNode, a_setupInfo );
381 delete m_temperature;
392 if( m_temperature !=
nullptr )
return( *m_temperature );
396 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
397 return(
style->temperature( ) );
412 if( m_temperature !=
nullptr ) m_temperature->toXMLList( a_writeInfo, indent2 );
428 Base( a_node, a_setupInfo, a_parent ),
443 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
444 return(
style->temperature( ) );
475 Base( a_node, a_setupInfo, a_parent ) {
489 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
490 return(
style->temperature( ) );
520 Base( a_node, a_setupInfo, a_parent ),
521 m_temperature( nullptr ) {
524 if( !temperatureNode.
empty( ) ) {
525 m_temperature = new PhysicalQuantity( temperatureNode, a_setupInfo );
534 delete m_temperature;
545 if( m_temperature !=
nullptr )
return( *m_temperature );
549 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
550 return(
style->temperature( ) );
565 if( m_temperature !=
nullptr ) m_temperature->toXMLList( a_writeInfo, indent2 );
581 Base( a_node, a_setupInfo, a_parent ),
597 m_temperature.toXMLList( a_writeInfo, indent2 );
614 Base( a_node, a_setupInfo, a_parent ) {
628 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
629 return(
style->temperature( ) );
662 Base( a_node, a_setupInfo, a_parent ),
663 m_maximumLegendreOrder( a_node.attribute_as_int(
GIDI_lMaxChars ) ),
666 m_transportables.setAncestor(
this );
686 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
687 return(
style->temperature( ) );
699 for( std::size_t index = 0; index < m_transportables.size( ); ++index ) {
702 if( transportable1.
pid( ) == a_productID ) {
706 throw Exception(
"MultiGroup::groupBoundaries: product index not found" );
723 m_transportables.toXMLList( a_writeInfo, indent2 );
742 Base( a_node, a_setupInfo, a_parent ),
748 m_transportables.setAncestor(
this );
749 m_flux.setAncestor(
this );
750 m_inverseSpeed.setAncestor(
this );
752 if( m_transportables.size( ) == 0 ) {
753 GIDI::Suite const *transportables1 = nullptr;
754 if( a_setupInfo.m_multiGroup != nullptr ) {
755 transportables1 = &a_setupInfo.m_multiGroup->transportables( ); }
757 transportables1 = &a_setupInfo.m_heatedMultiGroup->transportables( );
759 if( transportables1 !=
nullptr ) {
760 for( std::size_t index = 0; index < transportables1->size( ); ++index ) {
761 Transportable const &transportable = *transportables1->get<Transportable>( index );
763 m_transportables.add( new Transportable( transportable ) );
767 else if( a_setupInfo.m_heatedMultiGroup ==
nullptr ) {
768 a_setupInfo.m_heatedMultiGroup = this;
789 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
790 return(
style->temperature( ) );
835 m_flux.toXMLList( a_writeInfo, indent2 );
838 m_inverseSpeed.toXMLList_func( a_writeInfo, indent3,
false,
false );
856 Base( a_node, a_setupInfo, a_parent ),
878 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
879 return(
style->temperature( ) );
912 Base( a_node, a_setupInfo, a_parent ),
913 m_grid( a_node.child(
GIDI_gridChars ), a_setupInfo, a_construction.useSystem_strtod( ) ) {
934 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
935 return(
style->temperature( ) );
950 m_grid.toXMLList( a_writeInfo, indent2 );
968 Base( a_node, a_setupInfo, a_parent ) {
989 if(
style ==
nullptr )
throw Exception(
"No style with temperature." );
990 return(
style->temperature( ) );
1014 m_temperature( -1.0,
"K" ),
1015 m_heatedCrossSection(
"" ),
1016 m_griddedCrossSection(
"" ),
1017 m_URR_probabilityTables(
"" ),
1018 m_heatedMultiGroup(
"" ),
1019 m_SnElasticUpScatter(
"" ) {
1034 std::string
const &a_URR_probabilityTables, std::string
const &a_heatedMultiGroup, std::string
const &a_SnElasticUpScatter ) :
1035 m_temperature( a_temperature ),
1036 m_heatedCrossSection( a_heatedCrossSection ),
1037 m_griddedCrossSection( a_griddedCrossSection ),
1038 m_URR_probabilityTables( a_URR_probabilityTables ),
1039 m_heatedMultiGroup( a_heatedMultiGroup ),
1040 m_SnElasticUpScatter( a_SnElasticUpScatter ) {
1050 std::cout <<
"temperature = " << m_temperature.value( ) <<
" " << m_temperature.unit( ) <<
" heatedCrossSection = '" << m_heatedCrossSection
1051 <<
"' griddedCrossSection = '" << m_griddedCrossSection <<
"' URR_probabilityTables = '" << m_URR_probabilityTables
1052 <<
"' heatedMultiGroup = '" << m_heatedMultiGroup <<
"' SnElasticUpScatter = '" << m_SnElasticUpScatter << std::endl;
#define GIDI_gridded1dChars
#define GIDI_realizationChars
#define GIDI_versionChars
#define GIDI_fluxNodeChars
#define GIDI_temperatureChars
#define GIDI_muCutoffChars
#define GIDI_inverseSpeedChars
#define GIDI_derivedFromChars
#define GIDI_targetInfoChars
#define GIDI_evaluatedStyleChars
#define GIDI_parametersChars
#define GIDI_transportablesChars
#define GIDI_upperCalculatedGroupChars
#define GIDI_projectileEnergyDomainChars
#define GIDI_libraryChars
#define GIDI_crossSectionReconstructedStyleChars
#define GUPI_documentationChars
void parseEvaluatedTargetInfo(HAPI::Node const &a_node)
ProtareSingle * m_protare
Styles::HeatedMultiGroup * m_heatedMultiGroup
PhysicalQuantity const & temperature() const
AngularDistributionReconstructed(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
~AngularDistributionReconstructed()
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
PhysicalQuantity const & temperature() const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
AverageProductData(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
std::string baseXMLAttributes(GUPI::WriteInfo &a_writeInfo) const
Base const * getDerivedStyle() const
std::vector< Base const * > chain() const
Base(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
bool isStyleInDerivedForm(Base const *a_style) const
std::string const & label() const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
CoulombPlusNuclearElasticMuCutoff(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
PhysicalQuantity const & temperature() const
PhysicalQuantity const & temperature() const
~CrossSectionReconstructed()
CrossSectionReconstructed(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Evaluated(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
PhysicalQuantity const & temperature() const
GriddedCrossSection(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Transportable const & transportable(std::string const &a_ID) const
std::vector< double > groupBoundaries(std::string const &a_ID) const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
PhysicalQuantity const & temperature() const
HeatedMultiGroup(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent)
Heated(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
PhysicalQuantity const & temperature() const
MonteCarlo_cdf(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
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)
PhysicalQuantity const & temperature() const
std::vector< double > groupBoundaries(std::string const &a_productID) const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Realization(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
PhysicalQuantity const & temperature() const
SnElasticUpScatter(HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent)
PhysicalQuantity const & temperature() const
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
std::string const * findLabelInLineage(GIDI::Suite const &a_suite, std::string const &a_label) const
std::vector< std::vector< Base const * > > chains(bool a_ends) const
PhysicalQuantity const & temperature() const
URR_probabilityTables(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops, GIDI::Suite *a_parent)
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
T * get(std::size_t a_Index)
iterator find(std::string const &a_label, bool a_convertLazyParsingHelperForm=false)
Forms::const_iterator const_iterator
std::vector< double > groupBoundaries() const
std::string const & moniker() const
void addNodeStarterEnder(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
void addNodeEnder(std::string const &a_moniker)
std::string incrementalIndent(std::string const &indent)
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Node child(const char *name) const
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, std::string const &a_name, Styles::Suite const *a_styles)
std::string intToString(int a_value)
std::string doubleToShortestString(double a_value, int a_significantDigits=15, int a_favorEFormBy=0)