44 #ifndef ROL_USERINPUTGENERATOR_HPP
45 #define ROL_USERINPUTGENERATOR_HPP
61 std::fstream input_pt;
62 input_pt.open(file_pt.c_str(),std::ios::in);
63 std::fstream input_wt;
64 input_wt.open(file_wt.c_str(),std::ios::in);
65 if ( !input_pt.is_open() || !input_wt.is_open() ) {
66 if ( !input_pt.is_open() ) {
67 if ( bman->batchID() == 0 ) {
68 std::cout <<
"CANNOT OPEN " << file_pt.c_str() <<
"\n";
71 if ( !input_wt.is_open() ) {
72 if ( bman->batchID() == 0 ) {
73 std::cout <<
"CANNOT OPEN " << file_wt.c_str() <<
"\n";
78 std::vector<std::vector<Real> > pt(n);
79 std::vector<Real> wt(n,0.0);
80 std::vector<Real> point(dim,0.0);;
81 for (
int i = 0; i < n; i++) {
82 for (
int j = 0; j < dim; j++) {
89 int rank = bman->batchID();
90 int nProc = bman->numBatches();
98 std::vector<std::vector<Real> > my_pt(N);
99 std::vector<Real> my_wt(N,0.0);
101 for (
int i = 0; i < N; i++) {
102 index = i*nProc + rank;
103 my_pt[i] = pt[index];
104 my_wt[i] = wt[index];
void setPoints(std::vector< std::vector< Real > > &p)
void setWeights(std::vector< Real > &w)