6 #include "../../shared/shared.h"
7 #include "../../toolkits/toolkits.h"
8 #include "../../classes/classes.h"
9 #include "../ContourToNodesx/ContourToNodesx.h"
12 int* index_data,
double* x_data,
double* y_data,
int nods_data,
int nels_data,
double* data,
int data_length,
13 double* x_prime,
double* y_prime,
int nods_prime,
21 int interpolation_type;
27 double *incontour = NULL;
30 if (nels_data<1 || nods_data<3 || nods_prime==0){
31 _error_(
"nothing to be done according to the mesh given in input");
35 debug=(bool)((
double)nels_data*(double)nods_prime >= pow((
double)10,(double)9));
38 if (data_length==nods_data){
41 else if (data_length==nels_data){
45 _error_(
"length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
48 if((numcontours) && (interpolation_type==2)){
49 _error_(
"element interpolation_type with contours not supported yet!");
53 xmin=x_prime[0]; xmax=x_prime[0];ymin=y_prime[0]; ymax=y_prime[0];
54 for (i=1;i<nods_prime;i++){
55 if (x_prime[i]<xmin) xmin=x_prime[i];
56 if (x_prime[i]>xmax) xmax=x_prime[i];
57 if (y_prime[i]<ymin) ymin=y_prime[i];
58 if (y_prime[i]>ymax) ymax=y_prime[i];
63 if(num_default_values){
64 if(num_default_values==1)
for (i=0;i<nods_prime;i++) data_prime->
SetValue(i,default_values[0],
INS_VAL);
65 else for (i=0;i<nods_prime;i++) data_prime->
SetValue(i,default_values[i],
INS_VAL);
70 ContourToNodesx( &incontour,x_prime,y_prime,nods_prime,contours,numcontours,1);
73 incontour=xNew<double>(nods_prime);
74 for (i=0;i<nods_prime;i++) incontour[i]=1.0;
102 xDelete<double>(incontour);
103 *pdata_prime=data_prime;