Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_styles.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include "GIDI.hpp"
11#include <HAPI.hpp>
12
13namespace GIDI {
14
15namespace Styles {
16
17/*! \class Suite
18 * This is essentially the GIDI::Suite class with the addition of the **findLabelInLineage** method.
19 */
20
21/* *********************************************************************************************************//**
22 ***********************************************************************************************************/
23
28
29/* *********************************************************************************************************//**
30 * Searches the Suite *a_suite* for a form with label *a_label* or, if not found, recursively ascends the **derivedFrom** until
31 * a derived form is found. The *this* instance must be an <**styles**> node so that the **derivedFrom**s can be ascended.
32 * If no form is found, an empty string is returned.
33 *
34 * @param a_suite [in] The Suite, typically a component, whose forms are searched for a form with label *a_label* or one of its **derivedFrom**.
35 * @param a_label [in] The label of the form to start the search.
36 * @return The label of the form found or an empty string if none is found.
37 ***********************************************************************************************************/
38
39std::string const *Suite::findLabelInLineage( GIDI::Suite const &a_suite, std::string const &a_label ) const {
40
41 std::string const *label = &a_label;
42 Suite::const_iterator iter = a_suite.find( a_label );
43
44 while( true ) {
45 if( iter != a_suite.end( ) ) return( label );
46
47 Base const *form = get<Base>( *label );
48 form = form->getDerivedStyle( );
49 label = &form->keyValue( );
50 if( *label == "" ) break;
51 iter = a_suite.find( *label );
52 }
53
54 return( label );
55}
56
57/* *********************************************************************************************************//**
58 *
59 *
60 * @param a_ends [in] If **true** only the end of each chain is returned.
61 * @param a_styles [in] The style's suite whose styles are analyzed.
62 *
63 * @return
64 ***********************************************************************************************************/
65
66std::vector< std::vector< Base const * > > Suite::chains( bool a_ends ) const {
67
68 std::vector< std::vector< Base const * > > chains1;
69
70 for( auto iter = begin( ); iter != end( ); ++iter ) {
71 Base const *base = static_cast<Base const *>( *iter );
72 chains1.push_back( base->chain( ) );
73 }
74
75 if( a_ends ) {
76 std::vector< std::vector<Base const *> > chains2;
77 for( auto iter1 = chains1.begin( ); iter1 != chains1.end( ); ++iter1 ) {
78 Base const *head = (*iter1)[0];
79 bool found = false;
80 for( auto iter2 = chains1.begin( ); iter2 != chains1.end( ); ++iter2 ) {
81 if( (*iter2)[0]->isStyleInDerivedForm( head ) ) {
82 found = true;
83 break;
84 }
85 }
86 if( !found ) {
87 std::vector< Base const * > item;
88 item.push_back( head );
89 chains2.push_back( item );
90 }
91 }
92 chains1 = chains2;
93 }
94
95 return( chains1 );
96}
97
98/* *********************************************************************************************************//**
99 * This methods updates the *m_chainEnds* member of *this*.
100 ***********************************************************************************************************/
101
103
104 m_chainEnds.clear( );
105 m_preProcessingChainEnds.clear( );
106
107 auto chains1 = chains( true );
108 for( auto iter = chains1.begin( ); iter != chains1.end( ); ++iter ) m_chainEnds.push_back( (*iter)[0] );
109
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( );
115 || ( moniker == GIDI_realizationChars ) ) {
116 preProcessingChains.push_back( (*iter)[0] );
117 }
118 }
119
120 for( auto iter1 = preProcessingChains.begin( ); iter1 != preProcessingChains.end( ); ++iter1 ) {
121 bool found = false;
122 for( auto iter2 = preProcessingChains.begin( ); iter2 != preProcessingChains.end( ); ++iter2 ) {
123 if( (*iter2)->isStyleInDerivedForm( *iter1 ) ) {
124 found = true;
125 break;
126 }
127 }
128 if( !found ) {
129 m_preProcessingChainEnds.push_back( *iter1 );
130 }
131 }
132}
133
134/*! \class Base
135 * This is the virtual base class inherited by all **style** classes. It handles the *date* and **derivedFrom** members.
136 */
137
138/* *********************************************************************************************************//**
139 *
140 * @param a_node [in] The **HAPI::Node** to be parsed.
141 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
142 * @param a_parent [in] The parent GIDI::Suite.
143 ***********************************************************************************************************/
144
145Base::Base( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent ) :
146 Form( a_node, a_setupInfo, FormType::style, a_parent ),
147 m_date( a_node.attribute_as_string( GIDI_dateChars ) ),
148 m_label( a_node.attribute_as_string( GIDI_labelChars ) ),
149 m_derivedStyle( a_node.attribute_as_string( GIDI_derivedFromChars ) ) {
150
151 if( a_node.child( GUPI_documentationChars ).empty( ) ) {
152 m_documentation = nullptr;
153 } else {
154 m_documentation = new GUPI::Documentation( a_node.child( GIDI_documentationChars ) );
155 }
156}
157
159
160 delete m_documentation;
161
162}
163
164/* *********************************************************************************************************//**
165 * Returns a pointer to the **derivedFrom** style of *this*.
166 *
167 * @return Pointer to the **derivedFrom** style of *this*.
168 ***********************************************************************************************************/
169
171
172 Form const *_form( sibling( m_derivedStyle ) );
173
174 return( dynamic_cast<Base const *>( _form ) );
175}
176
177/* *********************************************************************************************************//**
178 * Starting at *this*'s **derivedFrom** style, and ascending as needed, returns the **derivedFrom** style whose moniker is *a_moniker*.
179 *
180 * @param a_moniker [in] The moniker to search for.
181 * @return The style whose moniker is *a_moniker*.
182 ***********************************************************************************************************/
183
184Base const *Base::getDerivedStyle( std::string const &a_moniker ) const {
185
186 Form const *_form( sibling( m_derivedStyle ) );
187 Base const *_style = dynamic_cast<Base const *>( _form );
188
189 if( _style == nullptr ) return( _style );
190 if( _style->moniker( ) != a_moniker ) _style = _style->getDerivedStyle( a_moniker );
191 return( _style );
192}
193
194/* *********************************************************************************************************//**
195 * Thie method returns the list of self and all its derived from styles in reverse order (i.e, the first style in the list is *this*).
196 *
197 * @return The list of derived styles of *this* (includng *this*) in reverse order.
198 ***********************************************************************************************************/
199
200std::vector<Base const *> Base::chain( ) const {
201
202 std::vector<Base const *> chain1;
203
204 Base const *style = this;
205 while( style != nullptr ) {
206 chain1.push_back( style );
207 style = style->getDerivedStyle( );
208 }
209
210 return( chain1 );
211}
212
213/* *********************************************************************************************************//**
214 * This method returns **true** if *a_style* is in *this* derivedFrom list and **false** otherwise.
215 *
216 * @param a_style [in] The style to check for.
217 *
218 * @return The list of derived styles of *this* (includng *this*) in reverse order.
219 ***********************************************************************************************************/
220
221bool Base::isStyleInDerivedForm( Base const *a_style ) const {
222
223 Base const *style = getDerivedStyle( );
224
225 while( style != nullptr ) {
226 if( style == a_style ) return( true );
227 style = style->getDerivedStyle( );
228 }
229
230 return( false );
231}
232
233/* *********************************************************************************************************//**
234 * Returns the base attributes for *this* as a *std::string* instance.
235 *
236 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
237 *
238 * @return The base attributes as a XML attribute string.
239 ***********************************************************************************************************/
240
241std::string Base::baseXMLAttributes( GUPI::WriteInfo &a_writeInfo ) const {
242
243 std::string attributes( a_writeInfo.addAttribute( GIDI_labelChars, label( ) ) );
244
245 if( m_derivedStyle != "" ) attributes += a_writeInfo.addAttribute( GIDI_derivedFromChars, m_derivedStyle );
246 attributes += a_writeInfo.addAttribute( GIDI_dateChars, m_date );
247
248 return( attributes );
249}
250
251/*! \class Evaluated
252 * This is the **evaluated** style class.
253 */
254
255/* *********************************************************************************************************//**
256 *
257 * @param a_node [in] The **HAPI::Node** to be parsed.
258 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
259 * @param a_parent [in] The parent GIDI::Suite.
260 ***********************************************************************************************************/
261
262Evaluated::Evaluated( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent ) :
263 Base( a_node, a_setupInfo, a_parent ),
264 m_library( a_node.attribute_as_string( GIDI_libraryChars ) ),
265 m_version( a_node.attribute_as_string( GIDI_versionChars ) ),
266 m_temperature( a_node.child( GIDI_temperatureChars ), a_setupInfo ),
267 m_projectileEnergyDomain( a_node.child( GIDI_projectileEnergyDomainChars ), a_setupInfo ) {
268
270}
271
272/* *********************************************************************************************************//**
273 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
274 *
275 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
276 * @param a_indent [in] The amount to indent *this* node.
277 ***********************************************************************************************************/
278
279void Evaluated::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
280
281 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
282 std::string attributes = baseXMLAttributes( a_writeInfo );
283
284 attributes += a_writeInfo.addAttribute( GIDI_libraryChars, m_library );
285 attributes += a_writeInfo.addAttribute( GIDI_versionChars, m_version );
286 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
287
288 m_temperature.toXMLList( a_writeInfo, indent2 );
289 m_projectileEnergyDomain.toXMLList( a_writeInfo, indent2 );
290
291 a_writeInfo.addNodeEnder( moniker( ) );
292}
293
294/*! \class CrossSectionReconstructed
295 * This is the **crossSectionReconstructed** style class.
296 */
297
298/* *********************************************************************************************************//**
299 *
300 * @param a_node [in] The **HAPI::Node** to be parsed.
301 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
302 * @param a_parent [in] The parent GIDI::Suite.
303 ***********************************************************************************************************/
304
306 Base( a_node, a_setupInfo, a_parent ),
307 m_temperature( nullptr ) {
308
309 HAPI::Node const temperatureNode = a_node.child( GIDI_temperatureChars );
310 if( !temperatureNode.empty( ) ) {
311 m_temperature = new PhysicalQuantity( temperatureNode, a_setupInfo );
312 }
313}
314
315/* *********************************************************************************************************//**
316 ***********************************************************************************************************/
317
319
320 delete m_temperature;
321}
322
323/* *********************************************************************************************************//**
324 * Ascends the **derivedFrom** styles until a temperature is found.
325 *
326 * @return Returns the temperature associated with this style.
327 ***********************************************************************************************************/
328
330
331 if( m_temperature != nullptr ) return( *m_temperature );
332
333 Base const *style = getDerivedStyle( );
334
335 if( style == nullptr ) throw Exception( "No style with temperature." );
336 return( style->temperature( ) );
337}
338
339/* *********************************************************************************************************//**
340 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
341 *
342 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
343 * @param a_indent [in] The amount to indent *this* node.
344 ***********************************************************************************************************/
345
346void CrossSectionReconstructed::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
347
348 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
349
350 a_writeInfo.addNodeStarter( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
351 if( m_temperature != nullptr ) m_temperature->toXMLList( a_writeInfo, indent2 );
352 a_writeInfo.addNodeEnder( moniker( ) );
353}
354
355/*! \class AngularDistributionReconstructed
356 * This is the **angularDistributionReconstructed** style class.
357 */
358
359/* *********************************************************************************************************//**
360 *
361 * @param a_node [in] The **HAPI::Node** to be parsed.
362 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
363 * @param a_parent [in] The parent GIDI::Suite.
364 ***********************************************************************************************************/
365
367 Base( a_node, a_setupInfo, a_parent ),
368 m_temperature( nullptr ) {
369
370 HAPI::Node const temperatureNode = a_node.child( GIDI_temperatureChars );
371 if( !temperatureNode.empty( ) ) {
372 m_temperature = new PhysicalQuantity( temperatureNode, a_setupInfo );
373 }
374}
375
376/* *********************************************************************************************************//**
377 ***********************************************************************************************************/
378
383
384/* *********************************************************************************************************//**
385 * Ascends the **derivedFrom** styles until a temperature is found.
386 *
387 * @return Returns the temperature associated with this style.
388 ***********************************************************************************************************/
389
391
392 if( m_temperature != nullptr ) return( *m_temperature );
393
394 Base const *style = getDerivedStyle( );
395
396 if( style == nullptr ) throw Exception( "No style with temperature." );
397 return( style->temperature( ) );
398}
399
400/* *********************************************************************************************************//**
401 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
402 *
403 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
404 * @param a_indent [in] The amount to indent *this* node.
405 ***********************************************************************************************************/
406
407void AngularDistributionReconstructed::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
408
409 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
410
411 a_writeInfo.addNodeStarter( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
412 if( m_temperature != nullptr ) m_temperature->toXMLList( a_writeInfo, indent2 );
413 a_writeInfo.addNodeEnder( moniker( ) );
414}
415
416/*! \class CoulombPlusNuclearElasticMuCutoff
417 * This is the **CoulombPlusNuclearElasticMuCutoff** style class.
418 */
419
420/* *********************************************************************************************************//**
421 *
422 * @param a_node [in] The **HAPI::Node** to be parsed.
423 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
424 * @param a_parent [in] The parent GIDI::Suite.
425 ***********************************************************************************************************/
426
428 Base( a_node, a_setupInfo, a_parent ),
429 m_muCutoff( a_node.attribute_as_double( GIDI_muCutoffChars ) ) {
430
431}
432
433/* *********************************************************************************************************//**
434 * Ascends the **derivedFrom** styles until a temperature is found.
435 *
436 * @return Returns the temperature associated with this style.
437 ***********************************************************************************************************/
438
440
441 Base const *style = getDerivedStyle( );
442
443 if( style == nullptr ) throw Exception( "No style with temperature." );
444 return( style->temperature( ) );
445}
446
447/* *********************************************************************************************************//**
448 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
449 *
450 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
451 * @param a_indent [in] The amount to indent *this* node.
452 ***********************************************************************************************************/
453
454void CoulombPlusNuclearElasticMuCutoff::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
455
456 std::string attributes = baseXMLAttributes( a_writeInfo );
457
458 attributes += a_writeInfo.addAttribute( GIDI_muCutoffChars, LUPI::Misc::doubleToShortestString( m_muCutoff ) );
459 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
460 a_writeInfo.addNodeEnder( moniker( ) );
461}
462
463/*! \class Realization
464 * This is the GNDS **Realization** style class.
465 */
466
467/* *********************************************************************************************************//**
468 *
469 * @param a_node [in] The **HAPI::Node** to be parsed.
470 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
471 * @param a_parent [in] The parent GIDI::Suite.
472 ***********************************************************************************************************/
473
474Realization::Realization( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent ) :
475 Base( a_node, a_setupInfo, a_parent ) {
476
477}
478
479/* *********************************************************************************************************//**
480 * Ascends the **derivedFrom** styles until a temperature is found.
481 *
482 * @return Returns the temperature associated with this style.
483 ***********************************************************************************************************/
484
486
487 Base const *style = getDerivedStyle( );
488
489 if( style == nullptr ) throw Exception( "No style with temperature." );
490 return( style->temperature( ) );
491}
492
493/* *********************************************************************************************************//**
494 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
495 *
496 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
497 * @param a_indent [in] The amount to indent *this* node.
498 ***********************************************************************************************************/
499
500void Realization::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
501
502 std::string attributes = baseXMLAttributes( a_writeInfo );
503
504 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
505 a_writeInfo.addNodeEnder( moniker( ) );
506}
507
508/*! \class AverageProductData
509 * This is the **averageProductData** style class.
510 */
511
512/* *********************************************************************************************************//**
513 *
514 * @param a_node [in] The **HAPI::Node** to be parsed.
515 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
516 * @param a_parent [in] The parent GIDI::Suite.
517 ***********************************************************************************************************/
518
520 Base( a_node, a_setupInfo, a_parent ),
521 m_temperature( nullptr ) {
522
523 HAPI::Node const temperatureNode = a_node.child( GIDI_temperatureChars );
524 if( !temperatureNode.empty( ) ) {
525 m_temperature = new PhysicalQuantity( temperatureNode, a_setupInfo );
526 }
527}
528
529/* *********************************************************************************************************//**
530 ***********************************************************************************************************/
531
533
534 delete m_temperature;
535}
536
537/* *********************************************************************************************************//**
538 * Ascends the **derivedFrom** styles until a temperature is found.
539 *
540 * @return Returns the temperature associated with this style.
541 ***********************************************************************************************************/
542
544
545 if( m_temperature != nullptr ) return( *m_temperature );
546
547 Base const *style = getDerivedStyle( );
548
549 if( style == nullptr ) throw Exception( "No style with temperature." );
550 return( style->temperature( ) );
551}
552
553/* *********************************************************************************************************//**
554 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
555 *
556 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
557 * @param a_indent [in] The amount to indent *this* node.
558 ***********************************************************************************************************/
559
560void AverageProductData::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
561
562 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
563
564 a_writeInfo.addNodeStarter( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
565 if( m_temperature != nullptr ) m_temperature->toXMLList( a_writeInfo, indent2 );
566 a_writeInfo.addNodeEnder( moniker( ) );
567}
568
569/*! \class Heated
570 * This is the **heated** style class.
571 */
572
573/* *********************************************************************************************************//**
574 *
575 * @param a_node [in] The **HAPI::Node** to be parsed.
576 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
577 * @param a_parent [in] The parent GIDI::Suite.
578 ***********************************************************************************************************/
579
580Heated::Heated( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent ) :
581 Base( a_node, a_setupInfo, a_parent ),
582 m_temperature( a_node.child( GIDI_temperatureChars ), a_setupInfo ) {
583}
584
585/* *********************************************************************************************************//**
586 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
587 *
588 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
589 * @param a_indent [in] The amount to indent *this* node.
590 ***********************************************************************************************************/
591
592void Heated::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
593
594 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
595
596 a_writeInfo.addNodeStarter( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
597 m_temperature.toXMLList( a_writeInfo, indent2 );
598 a_writeInfo.addNodeEnder( moniker( ) );
599}
600
601/*! \class MonteCarlo_cdf
602 * This is the **MonteCarlo_cdf** style class.
603 */
604
605/* *********************************************************************************************************//**
606 *
607 * @param a_node [in] The **HAPI::Node** to be parsed.
608 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
609 * @param a_parent [in] The parent GIDI::Suite.
610 * @return
611 ***********************************************************************************************************/
612
613MonteCarlo_cdf::MonteCarlo_cdf( HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent ) :
614 Base( a_node, a_setupInfo, a_parent ) {
615
616}
617
618/* *********************************************************************************************************//**
619 * Ascends the **derivedFrom** styles until a temperature is found.
620 *
621 * @return Returns the temperature associated with this style.
622 ***********************************************************************************************************/
623
625
626 Base const *style = getDerivedStyle( );
627
628 if( style == nullptr ) throw Exception( "No style with temperature." );
629 return( style->temperature( ) );
630}
631
632/* *********************************************************************************************************//**
633 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
634 *
635 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
636 * @param a_indent [in] The amount to indent *this* node.
637 ***********************************************************************************************************/
638
639void MonteCarlo_cdf::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
640
641 a_writeInfo.addNodeStarter( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
642 a_writeInfo.addNodeEnder( moniker( ) );
643}
644
645/*! \class MultiGroup
646 * This is the **multiGroup** style class.
647 */
648
649/* *********************************************************************************************************//**
650 *
651 * @param a_construction [in] Used to pass user options to the constructor.
652 * @param a_node [in] The **HAPI::Node** to be parsed.
653 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
654 * @param a_pops [in] A PoPI::Database instance used to get particle indices and possibly other particle information.
655 * @param a_internalPoPs [in] The *internal* PoPI::Database instance used to get particle indices and possibly other particle information.
656 * This is the <**PoPs**> node under the <**reactionSuite**> node.
657 * @param a_parent [in] The parent GIDI::Suite.
658 ***********************************************************************************************************/
659
660MultiGroup::MultiGroup( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, PoPI::Database const &a_pops,
661 PoPI::Database const &a_internalPoPs, GIDI::Suite *a_parent ) :
662 Base( a_node, a_setupInfo, a_parent ),
663 m_maximumLegendreOrder( a_node.attribute_as_int( GIDI_lMaxChars ) ),
664 m_transportables( a_construction, GIDI_transportablesChars, GIDI_labelChars, a_node, a_setupInfo, a_pops, a_internalPoPs, parseTransportablesSuite, nullptr ) {
665
666 m_transportables.setAncestor( this );
667}
668
669/* *********************************************************************************************************//**
670 ***********************************************************************************************************/
671
675
676/* *********************************************************************************************************//**
677 * Ascends the **derivedFrom** styles until a temperature is found.
678 *
679 * @return Returns the temperature associated with this style.
680 ***********************************************************************************************************/
681
683
684 Base const *style = getDerivedStyle( );
685
686 if( style == nullptr ) throw Exception( "No style with temperature." );
687 return( style->temperature( ) );
688}
689
690/* *********************************************************************************************************//**
691 * Returns the multi-group boundaries for the product with index *a_productID*.
692 *
693 * @param a_productID [in] Particle id for the requested product.
694 * @return The multi-group boundaries.
695 ***********************************************************************************************************/
696
697std::vector<double> MultiGroup::groupBoundaries( std::string const &a_productID ) const {
698
699 for( std::size_t index = 0; index < m_transportables.size( ); ++index ) {
700 Transportable const &transportable1 = *m_transportables.get<Transportable>( index );
701
702 if( transportable1.pid( ) == a_productID ) {
703 return( transportable1.groupBoundaries( ) );
704 }
705 }
706 throw Exception( "MultiGroup::groupBoundaries: product index not found" );
707}
708
709/* *********************************************************************************************************//**
710 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
711 *
712 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
713 * @param a_indent [in] The amount to indent *this* node.
714 ***********************************************************************************************************/
715
716void MultiGroup::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
717
718 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
719 std::string attributes = baseXMLAttributes( a_writeInfo );
720
721 attributes += a_writeInfo.addAttribute( GIDI_lMaxChars, intToString( m_maximumLegendreOrder ) );
722 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
723 m_transportables.toXMLList( a_writeInfo, indent2 );
724 a_writeInfo.addNodeEnder( moniker( ) );
725}
726
727/*! \class HeatedMultiGroup
728 * This is the **neatedMultiGroup** style class.
729 */
730
731/* *********************************************************************************************************//**
732 *
733 * @param a_construction [in] Used to pass user options to the constructor.
734 * @param a_node [in] The **HAPI::Node** to be parsed.
735 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
736 * @param a_pops [in] A PoPI::Database instance used to get particle indices and possibly other particle information.
737 * @param a_parent [in] The parent GIDI::Suite.
738 ***********************************************************************************************************/
739
740HeatedMultiGroup::HeatedMultiGroup( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo,
741 PoPI::Database const &a_pops, GIDI::Suite *a_parent ) :
742 Base( a_node, a_setupInfo, a_parent ),
743 m_transportables( a_construction, GIDI_transportablesChars, GIDI_labelChars, a_node, a_setupInfo, a_pops, a_pops, parseTransportablesSuite, nullptr ),
744 m_flux( a_construction, a_node.child( GIDI_fluxNodeChars ), a_setupInfo ),
745 m_inverseSpeed( a_construction, a_node.child( GIDI_inverseSpeedChars ).child( GIDI_gridded1dChars ), a_setupInfo, nullptr ),
746 m_parameters( a_node.attribute_as_string( GIDI_parametersChars ) ) {
747
748 m_transportables.setAncestor( this );
749 m_flux.setAncestor( this );
750 m_inverseSpeed.setAncestor( this );
751
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( ); }
756 else if( a_setupInfo.m_heatedMultiGroup != nullptr ) {
757 transportables1 = &a_setupInfo.m_heatedMultiGroup->transportables( );
758 }
759 if( transportables1 != nullptr ) {
760 for( std::size_t index = 0; index < transportables1->size( ); ++index ) {
761 Transportable const &transportable = *transportables1->get<Transportable>( index );
762
763 m_transportables.add( new Transportable( transportable ) );
764 }
765
766 } }
767 else if( a_setupInfo.m_heatedMultiGroup == nullptr ) {
768 a_setupInfo.m_heatedMultiGroup = this;
769 }
770}
771
772/* *********************************************************************************************************//**
773 ***********************************************************************************************************/
774
778
779/* *********************************************************************************************************//**
780 * Ascends the **derivedFrom** styles until a temperature is found.
781 *
782 * @return Returns the temperature associated with this style.
783 ***********************************************************************************************************/
784
786
787 Base const *style = getDerivedStyle( );
788
789 if( style == nullptr ) throw Exception( "No style with temperature." );
790 return( style->temperature( ) );
791}
792
793/* *********************************************************************************************************//**
794 * Returns the **Transportable** instance for the particle with id *a_ID* used for processing this **HeatedMultiGroup**.
795 *
796 * @param a_ID [in] Particle id for the requested product.
797 * @return The multi-group boundaries.
798 ***********************************************************************************************************/
799
800Transportable const &HeatedMultiGroup::transportable( std::string const &a_ID ) const {
801
802 return( *m_transportables.get<Transportable>( a_ID ) );
803}
804
805
806/* *********************************************************************************************************//**
807 * Returns the multi-group boundaries for the particle with id *a_ID* used for processing this **HeatedMultiGroup**.
808 *
809 * @param a_ID [in] Particle id for the requested product.
810 * @return The multi-group boundaries.
811 ***********************************************************************************************************/
812
813std::vector<double> HeatedMultiGroup::groupBoundaries( std::string const &a_ID ) const {
814
815 Transportable const &transportable1 = transportable( a_ID );
816
817 return( transportable1.groupBoundaries( ) );
818}
819
820/* *********************************************************************************************************//**
821 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
822 *
823 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
824 * @param a_indent [in] The amount to indent *this* node.
825 ***********************************************************************************************************/
826
827void HeatedMultiGroup::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
828
829 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
830 std::string indent3 = a_writeInfo.incrementalIndent( indent2 );
831 std::string attributes = baseXMLAttributes( a_writeInfo );
832
833 attributes += a_writeInfo.addAttribute( GIDI_parametersChars, m_parameters );
834 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
835 m_flux.toXMLList( a_writeInfo, indent2 );
836
837 a_writeInfo.addNodeStarter( indent2, GIDI_inverseSpeedChars, "" );
838 m_inverseSpeed.toXMLList_func( a_writeInfo, indent3, false, false );
840 a_writeInfo.addNodeEnder( moniker( ) );
841}
842
843/*! \class SnElasticUpScatter
844 * This is the **SnElasticUpScatter** style class.
845 */
846
847/* *********************************************************************************************************//**
848 *
849 * @param a_node [in] The **HAPI::Node** to be parsed.
850 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
851 * @param a_pops [in] A PoPI::Database instance used to get particle indices and possibly other particle information.
852 * @param a_parent [in] The parent GIDI::Suite.
853 ***********************************************************************************************************/
854
856 Base( a_node, a_setupInfo, a_parent ),
857 m_upperCalculatedGroup( a_node.attribute_as_int( GIDI_upperCalculatedGroupChars ) ) {
858
859}
860
861/* *********************************************************************************************************//**
862 ***********************************************************************************************************/
863
867
868/* *********************************************************************************************************//**
869 * Ascends the **derivedFrom** styles until a temperature is found.
870 *
871 * @return Returns the temperature associated with this style.
872 ***********************************************************************************************************/
873
875
876 Base const *style = getDerivedStyle( );
877
878 if( style == nullptr ) throw Exception( "No style with temperature." );
879 return( style->temperature( ) );
880}
881
882/* *********************************************************************************************************//**
883 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
884 *
885 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
886 * @param a_indent [in] The amount to indent *this* node.
887 ***********************************************************************************************************/
888
889void SnElasticUpScatter::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
890
891 std::string attributes = baseXMLAttributes( a_writeInfo );
892
893 attributes += a_writeInfo.addAttribute( GIDI_upperCalculatedGroupChars, intToString( m_upperCalculatedGroup ) );
894 a_writeInfo.addNodeStarter( a_indent, moniker( ), attributes );
895 a_writeInfo.addNodeEnder( moniker( ) );
896}
897
898/*! \class GriddedCrossSection
899 * This is the **griddedCrossSection** style class.
900 */
901
902/* *********************************************************************************************************//**
903 *
904 * @param a_construction [in] Used to pass user options to the constructor.
905 * @param a_node [in] The **HAPI::Node** to be parsed.
906 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
907 * @param a_pops [in] A PoPI::Database instance used to get particle indices and possibly other particle information.
908 * @param a_parent [in] The parent GIDI::Suite.
909 ***********************************************************************************************************/
910
911GriddedCrossSection::GriddedCrossSection( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, LUPI_maybeUnused PoPI::Database const &a_pops, GIDI::Suite *a_parent ) :
912 Base( a_node, a_setupInfo, a_parent ),
913 m_grid( a_node.child( GIDI_gridChars ), a_setupInfo, a_construction.useSystem_strtod( ) ) {
914
915}
916
917/* *********************************************************************************************************//**
918 ***********************************************************************************************************/
919
923
924/* *********************************************************************************************************//**
925 * Ascends the **derivedFrom** styles until a temperature is found.
926 *
927 * @return Returns the temperature associated with this style.
928 ***********************************************************************************************************/
929
931
932 Base const *style = getDerivedStyle( );
933
934 if( style == nullptr ) throw Exception( "No style with temperature." );
935 return( style->temperature( ) );
936}
937
938/* *********************************************************************************************************//**
939 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
940 *
941 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
942 * @param a_indent [in] The amount to indent *this* node.
943 ***********************************************************************************************************/
944
945void GriddedCrossSection::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
946
947 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
948
949 a_writeInfo.addNodeStarter( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
950 m_grid.toXMLList( a_writeInfo, indent2 );
951 a_writeInfo.addNodeEnder( moniker( ) );
952}
953
954/*! \class URR_probabilityTables
955 * This is the **URR_probabilityTables** style class.
956 */
957
958/* *********************************************************************************************************//**
959 *
960 * @param a_construction [in] Used to pass user options to the constructor.
961 * @param a_node [in] The **HAPI::Node** to be parsed.
962 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
963 * @param a_pops [in] A PoPI::Database instance used to get particle indices and possibly other particle information.
964 * @param a_parent [in] The parent GIDI::Suite.
965 ***********************************************************************************************************/
966
968 Base( a_node, a_setupInfo, a_parent ) {
969
970}
971
972/* *********************************************************************************************************//**
973 ***********************************************************************************************************/
974
978
979/* *********************************************************************************************************//**
980 * Ascends the **derivedFrom** styles until a temperature is found.
981 *
982 * @return Returns the temperature associated with this style.
983 ***********************************************************************************************************/
984
986
987 Base const *style = getDerivedStyle( );
988
989 if( style == nullptr ) throw Exception( "No style with temperature." );
990 return( style->temperature( ) );
991}
992
993/* *********************************************************************************************************//**
994 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
995 *
996 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
997 * @param a_indent [in] The amount to indent *this* node.
998 ***********************************************************************************************************/
999
1000void URR_probabilityTables::toXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent ) const {
1001
1002 a_writeInfo.addNodeStarterEnder( a_indent, moniker( ), baseXMLAttributes( a_writeInfo ) );
1003}
1004
1005/*! \class TemperatureInfo
1006 * This class stores the labels for a given temperature for the **heatedCrossSection**, **griddedCrossSection**, **heatedMultiGroup** and
1007 * **SnElasticUpScatter** styles. If no style of a given process (e.g., **heatedCrossSection**) type exists, its label is an empty string.
1008 */
1009
1010/* *********************************************************************************************************//**
1011 ***********************************************************************************************************/
1012
1014 m_temperature( -1.0, "K" ),
1015 m_heatedCrossSection( "" ),
1016 m_griddedCrossSection( "" ),
1017 m_URR_probabilityTables( "" ),
1018 m_heatedMultiGroup( "" ),
1019 m_SnElasticUpScatter( "" ) {
1020
1021}
1022
1023/* *********************************************************************************************************//**
1024 *
1025 * @param a_temperature [in] The temperature.
1026 * @param a_heatedCrossSection [in] The label for the **heatedCrossSection** style.
1027 * @param a_griddedCrossSection [in] The label for the **griddedCrossSection** style.
1028 * @param a_heatedMultiGroup [in] The label for the **heatedMultiGroup** style.
1029 * @param a_URR_probabilityTables [in] The label for the **URR_probabilityTables** style.
1030 * @param a_SnElasticUpScatter [in] The label for the **SnElasticUpScatter** style.
1031 ***********************************************************************************************************/
1032
1033TemperatureInfo::TemperatureInfo( PhysicalQuantity const &a_temperature, std::string const &a_heatedCrossSection, std::string const &a_griddedCrossSection,
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 ) {
1041
1042}
1043
1044/* *********************************************************************************************************//**
1045 * Prints information about *this* to std::cout.
1046 ***********************************************************************************************************/
1047
1049
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;
1053}
1054
1055}
1056
1057}
#define GIDI_gridChars
Definition GIDI.hpp:384
#define GIDI_dateChars
Definition GIDI.hpp:421
#define GIDI_stylesChars
Definition GIDI.hpp:177
#define GIDI_gridded1dChars
Definition GIDI.hpp:293
#define GIDI_realizationChars
Definition GIDI.hpp:249
#define GIDI_versionChars
Definition GIDI.hpp:423
#define GIDI_fluxNodeChars
Definition GIDI.hpp:385
#define GIDI_temperatureChars
Definition GIDI.hpp:424
#define GIDI_muCutoffChars
Definition GIDI.hpp:425
#define GIDI_inverseSpeedChars
Definition GIDI.hpp:457
#define GIDI_derivedFromChars
Definition GIDI.hpp:422
#define GIDI_lMaxChars
Definition GIDI.hpp:426
#define GIDI_targetInfoChars
Definition GIDI.hpp:469
#define GIDI_evaluatedStyleChars
Definition GIDI.hpp:240
#define GIDI_parametersChars
Definition GIDI.hpp:427
#define GIDI_transportablesChars
Definition GIDI.hpp:247
#define GIDI_labelChars
Definition GIDI.hpp:438
#define GIDI_upperCalculatedGroupChars
Definition GIDI.hpp:428
#define GIDI_projectileEnergyDomainChars
Definition GIDI.hpp:255
#define GIDI_libraryChars
Definition GIDI.hpp:411
#define GIDI_crossSectionReconstructedStyleChars
Definition GIDI.hpp:241
#define GUPI_documentationChars
Definition GUPI.hpp:27
#define LUPI_maybeUnused
std::string const & keyValue() const
Definition GIDI_form.cc:149
Form const * sibling(std::string a_label) const
Definition GIDI_form.cc:175
Form(FormType a_type)
Definition GIDI_form.cc:25
void parseEvaluatedTargetInfo(HAPI::Node const &a_node)
ProtareSingle * m_protare
Definition GIDI.hpp:597
Styles::HeatedMultiGroup * m_heatedMultiGroup
Definition GIDI.hpp:601
PhysicalQuantity const & temperature() const
AngularDistributionReconstructed(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
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
Definition GIDI.hpp:3130
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(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
iterator begin()
Definition GIDI.hpp:2594
T * get(std::size_t a_Index)
Definition GIDI.hpp:2642
iterator find(std::string const &a_label, bool a_convertLazyParsingHelperForm=false)
iterator end()
Definition GIDI.hpp:2596
Forms::const_iterator const_iterator
Definition GIDI.hpp:2593
std::string pid() const
Definition GIDI.hpp:2912
std::vector< double > groupBoundaries() const
Definition GIDI.hpp:2915
std::string const & moniker() const
Definition GUPI.hpp:102
void addNodeStarterEnder(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:57
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
std::string incrementalIndent(std::string const &indent)
Definition GUPI.hpp:52
void addNodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:55
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60
bool empty() const
Definition HAPI_Node.cc:150
Node child(const char *name) const
Definition HAPI_Node.cc:72
Definition GIDI.hpp:32
FormType
Definition GIDI.hpp:118
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)
Definition GIDI_misc.cc:415
std::string doubleToShortestString(double a_value, int a_significantDigits=15, int a_favorEFormBy=0)
Definition LUPI_misc.cc:349