Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_misc.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 <stdlib.h>
11#include <stdio.h>
12#include <sstream>
13#include <algorithm>
14
15#include "GIDI.hpp"
16#include <HAPI.hpp>
17
18namespace GIDI {
19
20static std::size_t startIndexAttribute( HAPI::Node const &a_node );
21
22/* *********************************************************************************************************//**
23 * This function searchs the list of ascending values *a_Xs* for the two values that bound *a_x* using a bi-section search.
24 * If *a_x* is less than the first value, -2 is returned. If *a_x* is greater than the last value, -1 is returned.
25 * Otherwise, the returned index will be such that *a_Xs*[index] <= *a_x* < *a_Xs*[index+1].
26 *
27 * @param a_x [in] The value to search.
28 * @param a_Xs [in] The list of ascending values to
29 *
30 * @return [in] The index within the *a_Xs* list that bounds *a_x*.
31 ***********************************************************************************************************/
32
33long binarySearchVector( double a_x, std::vector<double> const &a_Xs ) {
34/*
35* Returns -2 is a_x < first point of a_Xs, -1 if > last point of a_Xs, and the lower index of a_Xs otherwise.
36*/
37 std::size_t size = a_Xs.size( );
38 std::size_t imin = 0, imid, imax = size - 1;
39
40 if( a_x < a_Xs[0] ) return( -2 );
41 if( a_x > a_Xs[size-1] ) return( -1 );
42 while( 1 ) {
43 imid = ( imin + imax ) >> 1;
44 if( imid == imin ) break;
45 if( a_x < a_Xs[imid] ) {
46 imax = imid; }
47 else {
48 imin = imid;
49 }
50 }
51 return( static_cast<long>( imin ) );
52}
53
54/* *********************************************************************************************************//**
55 * Adds the list of integers to the list of XML lines in *a_writeInfo*.
56 *
57 * @param a_writeInfo [in/out] Instance containing incremental indentation, values per line and other information and stores the appended lines.
58 * @param a_indent [in] The amount to indent *this* node.
59 * @param a_values [in] The list of integers to convert to strings and add to *a_writeInfo*.
60 * @param a_attributes [in] String representation of the attributes for the GNDS **values** node.
61 ***********************************************************************************************************/
62
63void intsToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, std::vector<int> const &a_values, std::string const &a_attributes ) {
64
65 a_writeInfo.addNodeStarter( a_indent, GIDI_valuesChars, a_attributes );
66
67 std::string intString;
68 std::string sep( "" );
69
70 for( std::size_t i1 = 0; i1 < a_values.size( ); ++i1 ) {
71 intString += sep + intToString( a_values[i1] );
72 if( i1 == 0 ) sep = a_writeInfo.m_sep;
73 }
74
75 a_writeInfo.m_lines.back( ) += intString;
76 a_writeInfo.addNodeEnder( GIDI_valuesChars );
77}
78
79/* *********************************************************************************************************//**
80 * This function converts the text of a **HAPI::Node** into a list of doubles.
81 *
82 * @param a_construction [in] Used to pass user options to the constructor.
83 * @param a_node [in] The **HAPI::Node** node whose text is to be converted into a list of doubles.
84 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
85 * @param a_values [in] The list to fill with the converted values.
86 ***********************************************************************************************************/
87
88void parseValuesOfDoubles( Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo,
89 nf_Buffer<double> &a_values) {
90
91 parseValuesOfDoubles( a_node, a_setupInfo, a_values, a_construction.useSystem_strtod( ) );
92}
93
94/* *********************************************************************************************************//**
95 * This function converts the text of a **HAPI::Node** into a list of doubles.
96 *
97 * @param a_node [in] The **HAPI::Node** node whose text is to be converted into a list of doubles.
98 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
99 * @param a_values [in] The list to fill with the converted values.
100 * @param a_useSystem_strtod [in] Flag passed to the function nfu_stringToListOfDoubles.
101 ***********************************************************************************************************/
102
103void parseValuesOfDoubles( HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer<double> &a_values, LUPI_maybeUnused int a_useSystem_strtod ) {
104
105 std::string href = a_node.attribute_as_string( GIDI_hrefChars );
106
107 if( href != "" ) {
108 std::size_t startIndex = startIndexAttribute( a_node );
109 std::size_t count = static_cast<std::size_t>( a_node.attribute_as_long( GIDI_countChars ) );
110 if( a_setupInfo.m_protare->dataManager( ) == nullptr )
111 throw Exception( "parseValuesOfDoubles: Cannot read from HDF5 file as GIDI+ was compiled without HDF5 support." );
112 a_setupInfo.m_protare->dataManager( )->getDoubles( a_values, startIndex, startIndex + count ); }
113 else {
114 HAPI::Data data = a_node.data( );
115 data.getDoubles( a_values ); // FIXME overload getDoubles() to take std::vector argument, avoid extra copy?
116 }
117/*
118 int64_t numberConverted = p1.size( );
119 a_values.resize( numberConverted );
120 for( int64_t i1 = 0; i1 < numberConverted; ++i1 ) a_values[i1] = p1[i1];
121*/
122}
123
124/* *********************************************************************************************************//**
125 * This function converts the text of a **HAPI::Node** into a list of ints.
126 *
127 * @param a_construction [in] Used to pass user options to the constructor.
128 * @param a_node [in] The **HAPI::Node** node whose text is to be converted into a list of ints.
129 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
130 * @param a_values [in] The list to fill with the converted values.
131 ***********************************************************************************************************/
132
133void parseValuesOfInts( LUPI_maybeUnused Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer<int> &a_values) {
134
135 parseValuesOfInts( a_node, a_setupInfo, a_values );
136}
137
138/* *********************************************************************************************************//**
139 * This function converts the text of a **HAPI::Node** into a list of ints.
140 *
141 * @param a_node [in] The **HAPI::Node** node whoses text is to be converted into a list of ints.
142 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
143 * @param a_values [in] The list to fill with the converted values.
144 ***********************************************************************************************************/
145
146void parseValuesOfInts( HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer<int> &a_values ) {
147
148 std::string href = a_node.attribute_as_string( GIDI_hrefChars );
149
150 if( href != "" ) {
151 std::size_t startIndex = startIndexAttribute( a_node );
152 std::size_t count = static_cast<std::size_t>( a_node.attribute_as_long( GIDI_countChars ) );
153 if( a_setupInfo.m_protare->dataManager( ) == nullptr )
154 throw Exception( "parseValuesOfInts: Cannot read from HDF5 file as GIDI+ was compiled without HDF5 support." );
155 a_setupInfo.m_protare->dataManager( )->getInts( a_values, startIndex, startIndex + count ); }
156 else {
157 HAPI::Data data = a_node.data( );
158 data.getInts( a_values ); // FIXME overload getDoubles() to take std::vector argument, avoid extra copy?
159 }
160
161/*
162 int64_t numberConverted = p1.size( );
163 a_values.resize( numberConverted );
164 for( int64_t i1 = 0; i1 < numberConverted; ++i1 ) a_values[i1] = p1[i1];
165*/
166// a_values.swap( p1 );
167}
168
169/* *********************************************************************************************************//**
170 * Adds the list of doubles to the list of XML lines in *a_writeInfo*.
171 *
172 * @param a_writeInfo [in/out] Instance containing incremental indentation, values per line and other information and stores the appended lines.
173 * @param a_indent [in] The amount to indent *this* node.
174 * @param a_values [in] The list of doubles to convert to strings and add to *a_writeInfo*.
175 * @param a_start [in] The value for the *start* attribute.
176 * @param a_newLine [in] If *false*, the first *a_writeInfo.m_valuesPerLine* values are added to the last line with no indentation; otherwise, they are put on a new line with indentation.
177 * @param a_valueType [in] The value for the *valueType* attribute.
178 ***********************************************************************************************************/
179
180void doublesToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, std::vector<double> const &a_values, std::size_t a_start, bool a_newLine, std::string const &a_valueType ) {
181
182 int valuesPerLine( a_writeInfo.m_valuesPerLine );
183 std::string indent( a_indent );
184 std::string attributes;
185 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
186 std::string XMLLine;
187 std::string sep = "";
188
189 if( !a_newLine ) indent = "";
190 if( a_valueType != "" ) attributes += a_writeInfo.addAttribute( GIDI_valueTypeChars, a_valueType );
191 if( a_start != 0 ) attributes += a_writeInfo.addAttribute( GIDI_startChars, size_t_ToString( a_start ) );
192 XMLLine = a_writeInfo.nodeStarter( indent, GIDI_valuesChars, attributes );
193
194 if( valuesPerLine < 1 ) valuesPerLine = 1;
195 int numberOfValuesInLine = 0;
196 for( std::size_t i1 = 0; i1 < a_values.size( ); ++i1 ) {
197 XMLLine += sep + LUPI::Misc::doubleToShortestString( a_values[i1] );
198 sep = a_writeInfo.m_sep;
199 ++numberOfValuesInLine;
200
201 if( numberOfValuesInLine == valuesPerLine ) {
202 if( a_newLine ) {
203 a_writeInfo.push_back( XMLLine ); }
204 else {
205 a_writeInfo.m_lines.back( ) += XMLLine;
206 }
207 numberOfValuesInLine = 0;
208 XMLLine.clear( );
209 XMLLine = indent2;
210 a_newLine = true;
211 sep = "";
212 }
213 }
214 if( numberOfValuesInLine > 0 ) {
215 if( a_newLine ) {
216 a_writeInfo.push_back( XMLLine ); }
217 else {
218 a_writeInfo.m_lines.back( ) += XMLLine;
219 } }
220 else if( a_values.size( ) == 0 ) {
221 a_writeInfo.push_back( XMLLine );
222 }
223
224 a_writeInfo.addNodeEnder( GIDI_valuesChars );
225}
226
227/* *********************************************************************************************************//**
228 * This function returns an frame enum representing a **HAPI::Node**'s attribute with name *a_name*.
229 *
230 * @param a_node [in] The **HAPI::Node** node whoses attribute named *a_node* is to be parsed to determine the frame.
231 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
232 * @param a_name [in] The name of the attribute to parse.
233 *
234 * @return The *frame* enum representing the node's frame.
235 ***********************************************************************************************************/
236
237Frame parseFrame( HAPI::Node const &a_node, LUPI_maybeUnused SetupInfo &a_setupInfo, std::string const &a_name ) {
238
239 Frame frame = Frame::lab;
240 if( strcmp( a_node.attribute_as_string( a_name.c_str( ) ).c_str( ), GIDI_centerOfMassChars ) == 0 ) frame = Frame::centerOfMass;
241 return( frame );
242}
243
244/* *********************************************************************************************************//**
245 * This function converts the y-values from the Gridded1d into a Ys1d instance.
246 *
247 * @param a_function1d [in] The Gridded1d whoses y-values are converted into a Ys1d instance.
248 *
249 * @return A Ys1d instance of the y-values.
250 ***********************************************************************************************************/
251
253
254 std::vector<double> ys;
255 Functions::Ys1d ys1d( a_function1d.axes( ), ptwXY_interpolationFlat, 0, ys );
256
257 switch( a_function1d.type( ) ) {
259 {
260 Functions::Gridded1d const &gridded1d = static_cast<Functions::Gridded1d const &>( a_function1d );
261 Vector const &data = gridded1d.data( );
262 std::size_t start = 0;
263
264 for( ; start < data.size( ); ++start ) {
265 if( data[start] != 0 ) break;
266 }
267 ys1d.setStart( start );
268
269 for( std::size_t i1 = start; i1 < data.size( ); ++i1 ) ys1d.push_back( data[i1] );
270 }
271 break;
272 default :
273 throw Exception( "gridded1d2GIDI_Ys1d: unsupported 1d function type " + a_function1d.label( ) );
274 }
275
276 return( ys1d );
277}
278
279/* *********************************************************************************************************//**
280 * This function converts the values of a Vector into a Ys1d instance.
281 *
282 * @param a_axes [in] The Axes for the returned Ys1d instance.
283 * @param a_vector [in] The Vector whoses values are converted into a Ys1d instance.
284 *
285 * @return A Ys1d instance of the values.
286 ***********************************************************************************************************/
287
288Functions::Ys1d vector2GIDI_Ys1d( Axes const &a_axes, Vector const &a_vector ) {
289
290 std::size_t start = 0;
291 for( ; start < a_vector.size( ); ++start ) {
292 if( a_vector[start] != 0 ) break;
293 }
294
295 std::vector<double> ys;
296 Functions::Ys1d ys1d( a_axes, ptwXY_interpolationLinLin, start, ys );
297
298 for( std::size_t i1 = start; i1 < a_vector.size( ); ++i1 ) ys1d.push_back( a_vector[i1] );
299
300 return( ys1d );
301}
302
303/* *********************************************************************************************************//**
304 * This function converts an integer gid value (i.e., group id) into the LLNL legacy bdfls label.
305 *
306 * @param a_gid [in] The integer gid used to construct the LLNL legacy bdfls label.
307 *
308 * @return The LLNL legacy bdfls label.
309 ***********************************************************************************************************/
310
311std::string LLNL_gidToLabel( int a_gid ) {
312
313 return( LUPI::Misc::argumentsToString( "LLNL_gid_%d", a_gid ) );
314}
315
316/* *********************************************************************************************************//**
317 * This function converts an integer fid value (i.e., flux id) into the LLNL legacy bdfls label.
318 *
319 * @param a_fid [in] The integer fid used to construct the LLNL legacy bdfls label.
320 *
321 * @return The LLNL legacy bdfls label.
322 ***********************************************************************************************************/
323
324std::string LLNL_fidToLabel( int a_fid ) {
325
326 return( LUPI::Misc::argumentsToString( "LLNL_fid_%d", a_fid ) );
327}
328
329/* *********************************************************************************************************//**
330 * This function returns an instance of *std::vector<std::string>* with only a_string as an item.
331 *
332 * @param a_string [in] The string to add to the returned *std::vector<std::string>* instance.
333 *
334 * @return A *std::vector<std::string>* instance.
335 ***********************************************************************************************************/
336
337std::vector<std::string> vectorOfStrings( std::string const &a_string ) {
338 std::vector<std::string> vectorOfStrings1;
339
340 vectorOfStrings1.push_back( a_string );
341 return( vectorOfStrings1 );
342}
343
344/* *********************************************************************************************************//**
345 * This function returns a sorted instance of the strings in *a_strings*.
346 *
347 * @param a_strings [in] The string to add to the returned *std::vector<std::string>* instance.
348 * @param a_orderIsAscending [in] If *true* the strings are sorted in ascending order; otherwise, descending order.
349 *
350 * @return A *std::vector<std::string>* instance.
351 ***********************************************************************************************************/
352
353std::vector<std::string> sortedListOfStrings( std::vector<std::string> const &a_strings, bool a_orderIsAscending ) {
354
355 std::vector<std::string> keys( a_strings );
356
357 std::sort( keys.begin( ), keys.end( ) );
358
359 if( a_orderIsAscending ) return( keys );
360
361 std::vector<std::string> keys2;
362
363 for( std::vector<std::string>::reverse_iterator iter = keys.rbegin( ); iter != keys.rend( ); ++iter ) keys2.push_back( *iter );
364 return( keys2 );
365}
366
367/* *********************************************************************************************************//**
368 * This function returns a std::string representation of a *frame*.
369 *
370 * @param a_frame [in] The frame to convert to a string.
371 *
372 * @return A *std::string* instance.
373 ***********************************************************************************************************/
374
375std::string frameToString( Frame a_frame ) {
376
377 if( a_frame == Frame::lab ) return( GIDI_labChars );
378 return( GIDI_centerOfMassChars );
379}
380
381/* *********************************************************************************************************//**
382 * Create the XML list for xs, pdf or cdf for an Xs_pdf_cdf1d instance.
383 *
384 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
385 * @param a_nodeName [in] The name of the node (e.g., "xs" );
386 * @param a_values [in] The list of doubles to wrap.
387 *
388 * @return A *std::string* instance.
389 ***********************************************************************************************************/
390
391std::string nodeWithValuesToDoubles( GUPI::WriteInfo &a_writeInfo, std::string const &a_nodeName, std::vector<double> const &a_values ) {
392
393 std::string xml = a_writeInfo.nodeStarter( "", a_nodeName );
394 std::string sep( "" );
395
396 xml += a_writeInfo.nodeStarter( "", GIDI_valuesChars );
397 for( std::size_t i1 = 0; i1 < a_values.size( ); ++i1 ) {
398 xml += sep + LUPI::Misc::doubleToShortestString( a_values[i1] );
399 if( i1 == 0 ) sep = " ";
400 }
401 xml += a_writeInfo.nodeEnder( GIDI_valuesChars );
402 xml += a_writeInfo.nodeEnder( a_nodeName );
403
404 return( xml );
405}
406
407/* *********************************************************************************************************//**
408 * Returns a string representation of int *a_value*.
409 *
410 * @param a_value [in] The int value to convert to a string.
411 *
412 * @return A *std::string* instance.
413 ***********************************************************************************************************/
414
415std::string intToString( int a_value ) {
416
417 return( LUPI::Misc::argumentsToString( "%d", a_value ) );
418}
419
420/* *********************************************************************************************************//**
421 * Returns a string representation of std::size_t *a_value*.
422 *
423 * @param a_value [in] The std::size value to convert to a string.
424 *
425 * @return A *std::string* instance.
426 ***********************************************************************************************************/
427
428std::string size_t_ToString( std::size_t a_value ) {
429
430 return( LUPI::Misc::argumentsToString( "%zu", a_value ) );
431}
432
433/* *********************************************************************************************************//**
434 * Fills the argument *a_writeInfo* with the XML lines that represent *this*. Recursively enters each sub-node.
435 *
436 * @param a_writeInfo [in/out] Instance containing incremental indentation and other information and stores the appended lines.
437 * @param a_moniker [in] The moniker for the energy type.
438 * @param a_indent [in] The amount to indent *this* node.
439 * @param a_function [in] The energy function whose information is converted to XML.
440 ***********************************************************************************************************/
441
442void energy2dToXMLList( GUPI::WriteInfo &a_writeInfo, std::string const &a_moniker, std::string const &a_indent, Functions::Function1dForm *a_function ) {
443
444 std::string indent2 = a_writeInfo.incrementalIndent( a_indent );
445
446 if( a_function == nullptr ) return;
447
448 a_writeInfo.addNodeStarter( a_indent, a_moniker, "" );
449 a_function->toXMLList( a_writeInfo, indent2 );
450 a_writeInfo.addNodeEnder( a_moniker );
451}
452
453/* *********************************************************************************************************//**
454 * Returns a new **ExcludeReactionsSet** with
455 *
456 * @param a_protare [in] The **Protare** instance used to determine the number of reactions to adjust the new indices by.
457 *
458 * @return returns the startIndex attribute of *a_node*.
459 ***********************************************************************************************************/
460
461void excludeReactionsSetAdjust( ExcludeReactionsSet &a_excludeReactionsSet, Protare const &a_protare ) {
462
463 ExcludeReactionsSet excludeReactionsSet;
464
465 for( auto iter = a_excludeReactionsSet.begin( ); iter != a_excludeReactionsSet.end( ); ++iter ) {
466 if( (*iter) >= a_protare.numberOfReactions( ) ) {
467 excludeReactionsSet.insert( (*iter) - a_protare.numberOfReactions( ) );
468 }
469 }
470
471 a_excludeReactionsSet = std::move( excludeReactionsSet );
472}
473
474/* *********************************************************************************************************//**
475 * For internal use only.
476 *
477 * @param a_node [in] The **HAPI::Node** node whose text is to be converted into a list of doubles.
478 *
479 * @return returns the startIndex attribute of *a_node*.
480 ***********************************************************************************************************/
481
482static std::size_t startIndexAttribute( HAPI::Node const &a_node ) {
483
484 std::size_t startIndex = 0;
485
486 std::string attribute = a_node.attribute_as_string( GIDI_startIndexChars );
487 if( attribute != "" ) {
488 startIndex = static_cast<std::size_t>( a_node.attribute_as_long( GIDI_startIndexChars ) ); }
489 else {
490 attribute = a_node.attribute_as_string( GIDI_offsetChars );
491 if( attribute != "" ) startIndex = static_cast<std::size_t>( a_node.attribute_as_long( GIDI_offsetChars ) );
492 }
493
494 return( startIndex );
495}
496
497} // End namespace GIDI.
#define GIDI_hrefChars
Definition GIDI.hpp:440
#define GIDI_labChars
Definition GIDI.hpp:460
#define GIDI_valuesChars
Definition GIDI.hpp:260
#define GIDI_centerOfMassChars
Definition GIDI.hpp:459
#define GIDI_startIndexChars
Definition GIDI.hpp:284
#define GIDI_offsetChars
Definition GIDI.hpp:283
#define GIDI_valueTypeChars
Definition GIDI.hpp:431
#define GIDI_countChars
Definition GIDI.hpp:455
#define GIDI_startChars
Definition GIDI.hpp:412
#define LUPI_maybeUnused
int useSystem_strtod() const
Definition GIDI.hpp:579
std::string const & label() const
Definition GIDI.hpp:658
FormType type() const
Definition GIDI.hpp:667
Axes const & axes() const
Definition GIDI.hpp:1012
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Definition GIDI.hpp:1023
void push_back(double a_y)
Definition GIDI.hpp:1157
void setStart(std::size_t a_start)
Definition GIDI.hpp:1164
HAPI::DataManager * dataManager()
Definition GIDI.hpp:4734
virtual std::size_t numberOfReactions() const =0
ProtareSingle * m_protare
Definition GIDI.hpp:597
std::vector< double > & data()
Definition GIDI_data.hpp:81
std::size_t size() const
Definition GIDI_data.hpp:79
void push_back(std::string const &a_line)
Definition GUPI.hpp:53
std::list< std::string > m_lines
Definition GUPI.hpp:45
void addNodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:59
int m_valuesPerLine
Definition GUPI.hpp:47
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 nodeEnder(std::string const &a_moniker)
Definition GUPI.hpp:64
std::string nodeStarter(std::string const &indent, std::string const &a_moniker, std::string const &a_attributes="")
Definition GUPI.hpp:62
std::string m_sep
Definition GUPI.hpp:48
std::string addAttribute(std::string const &a_name, std::string const &a_value) const
Definition GUPI.hpp:60
virtual void getInts(nf_Buffer< int > &result, size_t startIndex, size_t endIndex)=0
virtual void getDoubles(nf_Buffer< double > &result, size_t startIndex, size_t endIndex)=0
void getDoubles(nf_Buffer< double > &buffer)
Definition HAPI_Data.cc:48
void getInts(nf_Buffer< int > &buffer)
Definition HAPI_Data.cc:55
long attribute_as_long(const char *a_name) const
Definition HAPI.hpp:191
std::string attribute_as_string(const char *a_name) const
Definition HAPI.hpp:179
Data data() const
Definition HAPI_Node.cc:178
Definition GIDI.hpp:32
void parseValuesOfDoubles(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, nf_Buffer< double > &a_vector)
Definition GIDI_misc.cc:88
std::string LLNL_gidToLabel(int a_gid)
Definition GIDI_misc.cc:311
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, std::string const &a_valueType="")
Definition GIDI_misc.cc:180
std::string LLNL_fidToLabel(int a_fid)
Definition GIDI_misc.cc:324
Frame
Definition GIDI.hpp:146
@ centerOfMass
Definition GIDI.hpp:146
void intsToXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, std::vector< int > const &a_values, std::string const &a_attributes)
Definition GIDI_misc.cc:63
void parseValuesOfInts(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::vector< int > &a_vector)
void excludeReactionsSetAdjust(ExcludeReactionsSet &a_excludeReactionsSet, Protare const &a_protare)
Definition GIDI_misc.cc:461
Functions::Ys1d gridded1d2GIDI_Ys1d(Functions::Function1dForm const &a_function1d)
Definition GIDI_misc.cc:252
Functions::Ys1d vector2GIDI_Ys1d(Axes const &a_axes, Vector const &a_vector)
Definition GIDI_misc.cc:288
std::string frameToString(Frame a_frame)
Definition GIDI_misc.cc:375
std::string nodeWithValuesToDoubles(GUPI::WriteInfo &a_writeInfo, std::string const &a_nodeName, std::vector< double > const &a_values)
Definition GIDI_misc.cc:391
std::vector< std::string > sortedListOfStrings(std::vector< std::string > const &a_strings, bool a_orderIsAscending=true)
Definition GIDI_misc.cc:353
std::string size_t_ToString(std::size_t a_value)
Definition GIDI_misc.cc:428
std::set< std::size_t > ExcludeReactionsSet
Definition GIDI.hpp:47
void energy2dToXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_moniker, std::string const &a_indent, Functions::Function1dForm *a_function)
Definition GIDI_misc.cc:442
long binarySearchVector(double a_x, std::vector< double > const &a_Xs)
Definition GIDI_misc.cc:33
Frame parseFrame(HAPI::Node const &a_node, SetupInfo &a_setupInfo, std::string const &a_name)
std::string intToString(int a_value)
Definition GIDI_misc.cc:415
std::vector< std::string > vectorOfStrings(std::string const &a_string)
Definition GIDI_misc.cc:337
std::string doubleToShortestString(double a_value, int a_significantDigits=15, int a_favorEFormBy=0)
Definition LUPI_misc.cc:349
std::string argumentsToString(char const *a_format,...)
Definition LUPI_misc.cc:305
@ ptwXY_interpolationFlat
Definition ptwXY.h:38
@ ptwXY_interpolationLinLin
Definition ptwXY.h:37