30 std::vector< std::vector<int> > rFieldMappings,
index_order rIndexOrder,
31 std::vector<adj_map> conv_factor, std::vector<adj_map> norm_val){
62 for(
int i=0;
i<adj.size();
i++){
63 if(adj[
i].variable == var)
72 for(
int map_num = 0; map_num < rFieldMappings.size(); map_num++){
74 if(rFieldMappings[map_num][0] == rSearchField)
75 return rFieldMappings[map_num][1];
89 this->
error = string(
"");
124 if(i_val.size() == 1){
126 p_layout.push_back(atoi(i_val[0].c_str()));
129 error = string(
"Unable to read I value from zone header");
139 if(j_val.size() == 1){
141 p_layout.push_back(atoi(j_val[0].c_str()));
144 error = string(
"Unable to read J value from zone header");
154 if(k_val.size() == 1){
156 p_layout.push_back(atoi(k_val[0].c_str()));
159 error = string(
"Unable to read K value from zone header");
173 std::vector< std::vector<int> > rFieldMappings,
index_order rIndexOrder,
174 std::vector<adj_map> conv_factor, std::vector<adj_map> norm_val){
176 std::stringstream data(std::stringstream::in | std::stringstream::out);
181 for(
int i=0;
i < 3;
i++){
195 for(
int n=0;
n<(num_vars);
n++){
197 long double conv =
get_adj(conv_factor,
n);
203 for(
int y=0;
y<p_layout[ 1 ];
y++){
204 for(
int x=0;
x<p_layout[ 0 ];
x++){
213 long double read = strtold(out.c_str(), NULL);
216 read = read * conv *
norm;
239 string zs_out(
"Extracted ");
240 zs_out +=
itoa(length) +
" datapoints";
255 std::vector<int> point_layout;
266 for(
int j=0;
j < p_layout[1];
j++){
267 for(
int k=0;
k < p_layout[2];
k++){
269 std::vector<int> loc;
289 if(rIndexOrder.
order.size() <= 0 || rIndexOrder.
order.size() > 3){
298 int vars[3] = {
i,
j, k};
299 int layout[3] = {0, 1, 2};
301 for(
int dim = 0; dim < rIndexOrder.
order.size(); dim++){
302 switch( rIndexOrder.
order[dim] ){
334 int index_val = vars[0] *
p_layout[ layout[1] ]
365 if(nodes_str.size() == 1){
367 nodes = atoi(nodes_str[0].c_str());
370 error = string(
"Unable to read Nodes value from zone header");
378 if(elements_str.size() == 1){
380 elements = atoi(elements_str[0].c_str());
383 error = string(
"Unable to read Elements value from zone header");
389 status = string(
"Nodes = ") +
itoa(nodes) + string(
", Elements = ") +
itoa(elements);
399 std::vector< std::vector<int> > rFieldMappings,
index_order rIndexOrder,
400 std::vector<adj_map> conv_factor, std::vector<adj_map> norm_val){
402 std::stringstream data(std::stringstream::in | std::stringstream::out);
406 for(
int i=0;
i < (num_vars - num_dep_vars);
i++){
421 for(
int n=0;
n<num_vars;
n++){
423 long double conv =
get_adj(conv_factor,
n);
437 long double read = strtold(out.c_str(), NULL);
440 read = read * conv *
norm;
448 int first, sec, third, fourth;
455 data >> first >> sec >> third >> fourth;
475 data >> first >> sec >> third >> fourth;
480 string zs_out(
"Extracted ");
481 zs_out +=
itoa(length) +
" datapoints";
void int int REAL REAL * y
void set_num_indep_vars(int indep_vars)
std::vector< int > p_layout
Used to store index order information.
virtual bool parse_data(int num_dep_vars, int num_vars, std::vector< std::vector< int > > rFieldMappings, index_order rIndexOrder, std::vector< adj_map > conv_factor, std::vector< adj_map > norm_val)
void set_index(int point_num, std::vector< int > loc)
tpz_fequad(string *zheader, string *zdata)
T norm(const NVec< DIM, T > &v)
void set_point_val(int point_number, int var, long double val)
void build_point_index(std::vector< std::vector< int > > rFieldMappings)
std::vector< string > readCommaExpression(string rStack, string rNeedle)
double length(Vector3D *const v, int n)
Point object that represents a single point.
void set_num_points(int n)
virtual void parse_layout()
string itoa(int n)
Convert an int to a string.
void int int int REAL REAL REAL * z
int GetFieldMapping(std::vector< std::vector< int > > rFieldMapping, int rSearchField)
virtual void parse_layout()
tpzone(string *zheader, string *zdata)
tpz_ordered(string *zheader, string *zdata)
connect_points * data_pts_local
std::vector< int > get_layout()
virtual void parse_layout()
virtual bool parse_data(int num_dep_vars, int num_vars, std::vector< std::vector< int > > rFieldMappings, index_order rIndexOrder, std::vector< adj_map > conv_factor, std::vector< adj_map > norm_val)
void set_connectivity(int point_num, int c_point)
int get_index_value(int i, int j, int k, index_order rIndexOrder)
long double get_adj(std::vector< adj_map > adj, int var)
void set_layout(std::vector< int > index_layout)
void read(std::istream &is, T &t, const io_Read_write &)
manual_index_pts * data_pts_local
virtual bool parse_data(int num_dep_vars, int num_vars, std::vector< std::vector< int > > rFieldMappings, index_order rIndexOrder, std::vector< adj_map > conv_factor, std::vector< adj_map > norm_val)
bool check_non_numeric_str(string test_str)