33 m_grid =
axis->data( ).vector();
54 m_data.setToValueInFlatRange( 0, a_maxTNSL_index, 0.0 );
67 throw Exception(
"Gridded1d::evaluate: not implement." );
85 std::string attributes;
102 attributes += a_writeInfo.
addAttribute(
"compression",
"flattened" );
105 std::vector<double> doubles;
106 doubles.reserve( m_data.size( ) );
108 for( i1 = 0; i1 < m_data.size( ); ++i1 ) {
109 if( m_data[i1] != 0.0 )
break;
111 for( i2 = m_data.size( ); i2 > i1; --i2 ) {
112 if( m_data[i2-1] != 0.0 )
break;
114 std::size_t start( i1 );
115 if( start == m_data.size( ) ) start = 0;
116 a_writeInfo.
push_back( indent3 +
"<values valueType=\"Integer32\" label=\"starts\">" +
size_t_ToString( start ) +
"</values>" );
117 for( ; i1 < i2; ++i1 ) doubles.push_back( m_data[i1] );
118 a_writeInfo.
push_back( indent3 +
"<values valueType=\"Integer32\" label=\"lengths\">" +
size_t_ToString( doubles.size( ) ) +
"</values>" );
134 std::size_t
index = 0;
135 char const *fmt = a_format.c_str( );
138 fprintf( a_file, fmt, m_grid[
index], m_data[
index] );
140 if( m_data.size( ) > 0 ) printf( fmt, m_grid[
index], m_data[
index-1] );
#define GIDI_outerDomainValueChars
void toXMLList(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent="") const
Gridded1d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Suite *a_parent)
void write(FILE *a_file, std::string const &a_format) const
double evaluate(double a_x1) const
void modifiedMultiGroupElasticForTNSL(std::size_t a_maxTNSL_index)
void toXMLList_func(GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions) const
std::string const & moniker() const
void push_back(std::string const &a_line)
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
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="")
std::string size_t_ToString(std::size_t a_value)
int parseFlattened1d(Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, Vector &data)
std::string intToString(int a_value)
std::string doubleToShortestString(double a_value, int a_significantDigits=15, int a_favorEFormBy=0)
const axis_t axis_to_type< N >::axis