36 #ifndef NEKTAR_LIB_LIBUTILITIES_DBUTILS_HPP
37 #define NEKTAR_LIB_LIBUTILITIES_DBUTILS_HPP
45 using namespace Nektar;
48 template<
class T>
void Output1DArray(
const Array<OneD, const T> &in,
const int start = 0,
53 ASSERTL1(start < in.num_elements(),
"Start value is outside array range ");
58 for(i = start; i < in.num_elements(); ++i)
60 cout << in[i] << endl;
65 ASSERTL1(stop <= in.num_elements(),
"Stop value is outside array range ");
67 for(i = start; i < stop; ++i)
69 cout << in[i] << endl;
74 template<
class T>
void Output1DArray(
const Array<OneD, const T> &in, std::string outfile,
80 ASSERTL1(start < in.num_elements(),
"Start value is outside array range ");
82 ofstream ofile(outfile.c_str());
87 for(i = start; i < in.num_elements(); ++i)
89 ofile << in[i] << endl;
94 ASSERTL1(stop <= in.num_elements(),
"Stop value is outside array range ");
96 for(i = start; i < stop; ++i)
98 ofile << in[i] << endl;
104 template<
class T>
void Output1DArray(
const Array<OneD, const T> &in, ofstream &ofile,
110 ASSERTL1(start < in.num_elements(),
"Start value is outside array range ");
115 for(i = start; i < in.num_elements(); ++i)
117 ofile << in[i] << endl;
122 ASSERTL1(stop <= in.num_elements(),
"Stop value is outside array range ");
124 for(i = start; i < stop; ++i)
126 ofile << in[i] << endl;
145 ofile << in[i] << endl;
152 for(i = start; i < stop; ++i)
154 ofile << in[i] << endl;
161 Array<OneD, const T> &in,
165 Array<OneD, NekDouble> vExchange(1);
166 Array<OneD, int> m_map = map->GetGlobalToUniversalMapUnique();
169 out <<
"Norm: " << vExchange[0] << endl;