Index: ../trunk-jpl/src/c/Container/DataSet.h =================================================================== --- ../trunk-jpl/src/c/Container/DataSet.h (revision 14964) +++ ../trunk-jpl/src/c/Container/DataSet.h (revision 14965) @@ -4,6 +4,7 @@ #include #include #include "../classes/objects/Contour.h" +#include "../shared/Exp/exp.h" /*forward declarations */ class Object; Index: ../trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp =================================================================== --- ../trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp (revision 14964) +++ ../trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp (revision 14965) @@ -1,8 +1,9 @@ /*!\file: WriteLockFile.cpp * \brief */ -#include -#include "../../shared.h" +#include "../../Exceptions/exceptions.h" +#include "../Comm/Comm.h" +#include "../Print/Print.h" void WriteLockFile(char* filename){ Index: ../trunk-jpl/src/c/shared/Exp/exp.h =================================================================== --- ../trunk-jpl/src/c/shared/Exp/exp.h (revision 14964) +++ ../trunk-jpl/src/c/shared/Exp/exp.h (revision 14965) @@ -7,13 +7,14 @@ #include #include "../Numerics/recast.h" -#include "../../toolkits/toolkits.h" +#include "../Exceptions/exceptions.h" +#include "../MemOps/MemOps.h" int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue); int ExpWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,char* domainname); int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue); -template int IsInPoly(IssmSeqVec* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ /*{{{*/ +template int IsInPoly(doubletype* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ /*{{{*/ int i; double x0,y0; @@ -35,7 +36,7 @@ for (i=i0;i do not change it if != 0 - in->GetValue(&value,i); + value=in[i]; if (reCast(value)){ /*this vertex already is inside one of the contours, continue*/ continue; @@ -49,7 +50,7 @@ else{ value=pnpoly(numvertices,xc,yc,x0,y0,edgevalue); } - in->SetValue(i,value,INS_VAL); + in[i]=value; } return 1; }/*}}}*/ Index: ../trunk-jpl/src/c/shared/shared.h =================================================================== --- ../trunk-jpl/src/c/shared/shared.h (revision 14964) +++ ../trunk-jpl/src/c/shared/shared.h (revision 14965) @@ -10,6 +10,7 @@ #include "./Elements/elements.h" #include "./Enum/Enum.h" #include "./Exceptions/exceptions.h" +#include "./io/io.h" #include "./Exp/exp.h" #include "./Matrix/matrix.h" #include "./Numerics/numerics.h" Index: ../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp =================================================================== --- ../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp (revision 14964) +++ ../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp (revision 14965) @@ -24,7 +24,6 @@ double ymin,ymax; /*contours: */ - IssmSeqVec *vec_incontour = NULL; double *incontour = NULL; /*threading: */ @@ -76,8 +75,7 @@ /*Build indices of contour: */ if(numcontours){ - ContourToNodesx( &vec_incontour,x_prime,y_prime,nods_prime,contours,numcontours,1); - incontour=vec_incontour->ToMPISerial(); + ContourToNodesx( &incontour,x_prime,y_prime,nods_prime,contours,numcontours,1); } else{ incontour=xNew(nods_prime); Index: ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h =================================================================== --- ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h (revision 14964) +++ ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h (revision 14965) @@ -9,7 +9,7 @@ #include "../../classes/objects/objects.h" /* local prototypes: */ -int ContourToNodesx(IssmSeqVec** pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue); -int ContourToNodesx(IssmSeqVec** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue); +int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue); +int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue); #endif /* _CONTOURTONODESX_H */ Index: ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp =================================================================== --- ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp (revision 14964) +++ ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp (revision 14965) @@ -3,7 +3,7 @@ #include "./ContourToNodesx.h" -int ContourToNodesx(IssmSeqVec** pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue){ +int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue){ int i; @@ -14,8 +14,8 @@ double* yc=NULL; /*output: */ - IssmSeqVec* flags=NULL; - flags=new IssmSeqVec(nods); + IssmPDouble* flags=NULL; + flags=xNew(nods); /*Loop through all contours: */ for (i=0;iAssemble(); - /*Assign output pointers: */ *pflags=flags; return 1; } -int ContourToNodesx(IssmSeqVec** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){ +int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){ /*Contour:*/ Contour* contouri=NULL; @@ -42,8 +39,8 @@ double* yc=NULL; /*output: */ - IssmSeqVec* flags=NULL; - flags=new IssmSeqVec(nods); + IssmPDouble* flags=NULL; + flags=xNew(nods); /*Loop through all contours: */ if(contours){ @@ -53,9 +50,6 @@ } } - /*Assemble vector: */ - flags->Assemble(); - /*Assign output pointers: */ *pflags=flags; return 1; Index: ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp =================================================================== --- ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp (revision 14964) +++ ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp (revision 14965) @@ -9,10 +9,9 @@ #include "./ContourToMeshx.h" -int ContourToMeshx(IssmSeqVec** pin_nod,IssmSeqVec** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) { +int ContourToMeshx(double** pin_nod,double** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) { /*Contour:*/ - double* in_nod_serial; double value; /*threading: */ @@ -23,10 +22,10 @@ #endif /*output: */ - IssmSeqVec* in_nod=NULL; - IssmSeqVec* in_elem=NULL; - in_nod = new IssmSeqVec(nods); - in_elem = new IssmSeqVec(nel); + double* in_nod; + double* in_elem; + in_nod = xNew(nods); + in_elem = xNew(nel); /*initialize thread parameters: */ gate.contours=contours; @@ -39,30 +38,18 @@ /*launch the thread manager with ContourToMeshxt as a core: */ LaunchThread(ContourToMeshxt,(void*)&gate,num); - /*Assemble in_nod: */ - in_nod->Assemble(); - - /*Get in_nod serialised for next operation: */ - in_nod_serial=in_nod->ToMPISerial(); - /*Take care of the case where an element interpolation has been requested: */ if ((strcmp(interptype,"element")==0) || (strcmp(interptype,"element and node")==0)){ for(int n=0;nSetValue(n,value,INS_VAL); + if ( (in_nod[ (int)*(index+3*n+0) -1] == 1) && (in_nod[ (int)*(index+3*n+1) -1] == 1) && (in_nod[ (int)*(index+3*n+2) -1] == 1) ){ + value=1; in_elem[n]=value; } } } - /*Assemble vectors: */ - in_elem->Assemble(); - /*Assign output pointers: */ *pin_nod=in_nod; *pin_elem=in_elem; - /*Free ressources:*/ - xDelete(in_nod_serial); - return 1; } Index: ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp =================================================================== --- ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp (revision 14964) +++ ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp (revision 14965) @@ -32,7 +32,7 @@ int edgevalue; double* x=NULL; double* y=NULL; - IssmSeqVec* in_nod=NULL; + double* in_nod=NULL; /*recover handle and gate: */ handle=(pthread_handle*)vpthread_handle; Index: ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h =================================================================== --- ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h (revision 14964) +++ ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h (revision 14965) @@ -14,14 +14,14 @@ DataSet *contours; int nods; int edgevalue; - IssmSeqVec *in_nod; + double* in_nod; double *x; double *y; } ContourToMeshxThreadStruct; /* local prototypes: */ -int ContourToMeshx(IssmSeqVec** pin_nods,IssmSeqVec** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue); +int ContourToMeshx(double** pin_nods,double** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue); void* ContourToMeshxt(void* vContourToMeshxThreadStruct); Index: ../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp =================================================================== --- ../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp (revision 14964) +++ ../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp (revision 14965) @@ -5,7 +5,6 @@ #include #include #include "../../../shared/shared.h" -#include "../../../shared/Numerics/types.h" int DetermineLocalSize(int global_size,COMM comm){ Index: ../trunk-jpl/src/wrappers/python/io/WritePythonData.cpp =================================================================== --- ../trunk-jpl/src/wrappers/python/io/WritePythonData.cpp (revision 14964) +++ ../trunk-jpl/src/wrappers/python/io/WritePythonData.cpp (revision 14965) @@ -14,7 +14,7 @@ #include "./pythonio.h" #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" /*Primitive data types*/ /*FUNCTION WriteData(PyObject* py_tuple,int index,int integer){{{*/ Index: ../trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h =================================================================== --- ../trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h (revision 14964) +++ ../trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h (revision 14965) @@ -27,7 +27,7 @@ #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" #include "../../c/shared/io/io.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" #ifdef _HAVE_MATLAB_MODULES_ /* serial input macros: */ Index: ../trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp =================================================================== --- ../trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp (revision 14964) +++ ../trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp (revision 14965) @@ -24,7 +24,7 @@ DataSet *contours = NULL; /* output: */ - IssmSeqVec *flags = NULL; + double *flags = NULL; /*Boot module: */ MODULEBOOT(); @@ -42,7 +42,7 @@ ContourToNodesx(&flags,x,y,nods,contours,edgevalue); /* output: */ - WriteData(FLAGS,flags); + WriteData(FLAGS,flags,nods); /*end module: */ MODULEEND(); Index: ../trunk-jpl/src/wrappers/EdgeDetection/EdgeDetection.h =================================================================== --- ../trunk-jpl/src/wrappers/EdgeDetection/EdgeDetection.h (revision 14964) +++ ../trunk-jpl/src/wrappers/EdgeDetection/EdgeDetection.h (revision 14965) @@ -24,7 +24,7 @@ #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" #include "../../c/shared/io/io.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" #undef __FUNCT__ #define __FUNCT__ "EdgeDetection" Index: ../trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h =================================================================== --- ../trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h (revision 14964) +++ ../trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h (revision 14965) @@ -24,7 +24,7 @@ #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" #include "../../c/shared/io/io.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" #undef __FUNCT__ #define __FUNCT__ "ElementConnectivity" Index: ../trunk-jpl/src/wrappers/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h =================================================================== --- ../trunk-jpl/src/wrappers/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h (revision 14964) +++ ../trunk-jpl/src/wrappers/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h (revision 14965) @@ -24,7 +24,7 @@ #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" #include "../../c/shared/io/io.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" #undef __FUNCT__ #define __FUNCT__ "InterpFromMeshToMesh2d" Index: ../trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.h =================================================================== --- ../trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.h (revision 14964) +++ ../trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.h (revision 14965) @@ -24,7 +24,7 @@ #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" #include "../../c/shared/io/io.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" #undef __FUNCT__ #define __FUNCT__ "ContourToMesh" Index: ../trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp =================================================================== --- ../trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp (revision 14964) +++ ../trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp (revision 14965) @@ -39,8 +39,8 @@ DataSet *contours = NULL; /* output: */ - IssmSeqVec *in_nod = NULL; - IssmSeqVec *in_elem = NULL; + double *in_nod = NULL; + double *in_elem = NULL; /*Boot module: */ MODULEBOOT(); @@ -71,16 +71,16 @@ /* output: */ if (strcmp(interptype,"node")==0){ - WriteData(PLHS0,in_nod); + WriteData(PLHS0,in_nod,nods); WriteData(PLHS1); } else if (strcmp(interptype,"element")==0){ - WriteData(PLHS0,in_elem); + WriteData(PLHS0,in_elem,nel); WriteData(PLHS1); } else if (strcmp(interptype,"element and node")==0){ - WriteData(PLHS0,in_nod); - WriteData(PLHS1,in_elem); + WriteData(PLHS0,in_nod,nods); + WriteData(PLHS1,in_elem,nel); } else _error_("wrong interpolation type"); Index: ../trunk-jpl/src/wrappers/TriMesh/TriMesh.h =================================================================== --- ../trunk-jpl/src/wrappers/TriMesh/TriMesh.h (revision 14964) +++ ../trunk-jpl/src/wrappers/TriMesh/TriMesh.h (revision 14965) @@ -24,7 +24,7 @@ #include "../../c/Container/Container.h" #include "../../c/shared/shared.h" #include "../../c/shared/io/io.h" -#include "../../c/EnumDefinitions/EnumDefinitions.h" +#include "../../c/shared/Enum/Enum.h" #undef __FUNCT__ #define __FUNCT__ "TriMesh"