Changeset 12470
- Timestamp:
- 06/20/12 08:41:52 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/modules
- Files:
-
- 50 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp
r11679 r12470 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, double kmax){12 void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,IssmDouble kmax){ 13 13 14 14 int i,connectivity; -
issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h
r11679 r12470 10 10 11 11 /* local prototypes: */ 12 void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, double kmax);12 void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,IssmDouble kmax); 13 13 14 14 #endif /* _CREATEJACOBIANMATRIXX_H */ -
issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
r12450 r12470 467 467 len=strlen(EnumToStringx(enum_in)); 468 468 string=xNew<char>(len+1); 469 memcpy(string,EnumToStringx(enum_in),(len+1)*sizeof(char));469 xMemCpy<char>(string,EnumToStringx(enum_in),(len+1)); 470 470 471 471 /*Assign output pointer*/ -
issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
r11695 r12470 41 41 } 42 42 43 void GetVectorFromInputsx( double** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, int name, int type){43 void GetVectorFromInputsx( IssmDouble** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, int name, int type){ 44 44 45 45 /*output: */ 46 double* vector=NULL;46 IssmDouble* vector=NULL; 47 47 48 48 /*intermediary: */ -
issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h
r11695 r12470 10 10 /* local prototypes: */ 11 11 void GetVectorFromInputsx( Vector** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,int name,int type); 12 void GetVectorFromInputsx( double** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,int name,int type);12 void GetVectorFromInputsx( IssmDouble** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,int name,int type); 13 13 14 14 #endif /* _GETVECTORFROMINPUTSXX_H */ -
issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp
r5578 r12470 9 9 #include "../../EnumDefinitions/EnumDefinitions.h" 10 10 11 void InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,int enum_name, double min,double max){11 void InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,int enum_name,IssmDouble min,IssmDouble max){ 12 12 13 13 int i; -
issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h
r5578 r12470 10 10 11 11 /* local prototypes: */ 12 void InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,int enum_name, double min,double max);12 void InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,int enum_name,IssmDouble min,IssmDouble max); 13 13 14 14 #endif /* _UPDATEINPUTSFROMVECTORXX_H */ -
issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
r12450 r12470 9 9 #include "../../EnumDefinitions/EnumDefinitions.h" 10 10 11 bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, double* criterionvalues,int num_criterionenums){11 bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, IssmDouble* criterionvalues,int num_criterionenums){ 12 12 13 13 /*intermediary:*/ … … 16 16 int num_notconverged = 0; 17 17 int total_notconverged; 18 double *eps = NULL;18 IssmDouble *eps = NULL; 19 19 Element *element = NULL; 20 20 21 21 /*allocate dynamic memory: */ 22 eps=xNew< double>(num_criterionenums);22 eps=xNew<IssmDouble>(num_criterionenums); 23 23 24 24 /*Go through elements, and ask them to do the job: */ … … 37 37 38 38 /*Free ressources:*/ 39 xDelete< double>(eps);39 xDelete<IssmDouble>(eps); 40 40 41 41 /*return: */ -
issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h
r4778 r12470 8 8 9 9 /* local prototypes: */ 10 bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, double* criterionvalues,int num_criterionenums);10 bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, IssmDouble* criterionvalues,int num_criterionenums); 11 11 12 12 #endif /* _INPUTCONVERGENCEX_H */ -
issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp
r4573 r12470 9 9 #include "../../EnumDefinitions/EnumDefinitions.h" 10 10 11 void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, double scale_factor){11 void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, IssmDouble scale_factor){ 12 12 13 13 /*intermediary:*/ -
issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.h
r4236 r12470 9 9 10 10 /* local prototypes: */ 11 void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, double scale_factor);11 void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, IssmDouble scale_factor); 12 12 13 13 #endif /* _SCALEINPUTX_H */ -
issm/trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp
r11827 r12470 13 13 /*intermediary:*/ 14 14 int step; 15 double time;15 IssmDouble time; 16 16 Element *element = NULL; 17 17 -
issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp
r4573 r12470 49 49 } 50 50 } 51 void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, double constant, int name){51 void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble constant, int name){ 52 52 53 53 int i; -
issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h
r4236 r12470 12 12 void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters, bool constant, int name); 13 13 void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters, int constant, int name); 14 void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters, double constant, int name);14 void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters, IssmDouble constant, int name); 15 15 16 16 #endif /* _UPDATEINPUTSFROMCONSTANTXX_H */ -
issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp
r12450 r12470 11 11 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* solution){ 12 12 13 double* serial_solution=NULL;13 IssmDouble* serial_solution=NULL; 14 14 15 15 /*Serialize solution, so that elements can index into it on every CPU: */ … … 20 20 21 21 /*Free ressources:*/ 22 xDelete< double>(serial_solution);22 xDelete<IssmDouble>(serial_solution); 23 23 } 24 24 25 25 26 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, double* solution){26 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* solution){ 27 27 28 28 /*Intermediary*/ -
issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h
r11679 r12470 11 11 /* local prototypes: */ 12 12 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,Vector* solution); 13 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, double* solution);13 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* solution); 14 14 15 15 //with timestep 16 16 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,Vector* solution,int timestep); 17 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, double* solution, int timestep);17 void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* solution, int timestep); 18 18 19 19 #endif /* _UPDATEINPUTSFROMSOLUTIONXX_H */ -
issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp
r12450 r12470 11 11 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* vector, int name, int type){ 12 12 13 double* serial_vector=NULL;13 IssmDouble* serial_vector=NULL; 14 14 15 15 serial_vector=vector->ToMPISerial(); … … 18 18 19 19 /*Free ressources:*/ 20 xDelete< double>(serial_vector);20 xDelete<IssmDouble>(serial_vector); 21 21 } 22 22 23 23 24 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, double* vector, int name, int type){24 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* vector, int name, int type){ 25 25 26 26 int i; -
issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h
r11695 r12470 11 11 /* local prototypes: */ 12 12 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,Vector* vector, int name,int type); 13 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters, double* vector, int name,int type);13 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* vector, int name,int type); 14 14 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,int* vector, int name,int type); 15 15 void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters,bool* vector, int name,int type); -
issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
r12442 r12470 22 22 int counter; 23 23 int nods; 24 double* times=NULL;25 double* values=NULL;24 IssmDouble* times=NULL; 25 IssmDouble* values=NULL; 26 26 bool spcpresent=false; 27 27 int count=0; … … 29 29 30 30 /*variables being fetched: */ 31 double *doublevector = NULL;31 IssmDouble *IssmDoublevector = NULL; 32 32 int M,N; 33 33 … … 38 38 fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum); 39 39 40 if(code!=7)_error_("%s%s"," expecting a double vector for constraints with enum ",EnumToStringx(vector_enum));40 if(code!=7)_error_("%s%s"," expecting a IssmDouble vector for constraints with enum ",EnumToStringx(vector_enum)); 41 41 if(vector_layout!=1)_error_("%s%s"," expecting a nodal vector for constraints with enum ",EnumToStringx(vector_enum)); 42 42 43 43 /*Fetch vector:*/ 44 iomodel->FetchData(& doublevector,&M,&N,vector_enum);44 iomodel->FetchData(&IssmDoublevector,&M,&N,vector_enum); 45 45 46 46 /*Transient or static?:*/ … … 55 55 if((iomodel->my_vertices[i])){ 56 56 57 if (!isnan( doublevector[i])){57 if (!isnan(IssmDoublevector[i])){ 58 58 59 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1, doublevector[i],analysis_type));59 constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,IssmDoublevector[i],analysis_type)); 60 60 count++; 61 61 } … … 69 69 70 70 /*figure out times: */ 71 times=xNew< double>(N);71 times=xNew<IssmDouble>(N); 72 72 for(j=0;j<N;j++){ 73 times[j]= doublevector[(M-1)*N+j];73 times[j]=IssmDoublevector[(M-1)*N+j]; 74 74 } 75 75 /*unit conversion: */ … … 83 83 84 84 /*figure out times and values: */ 85 values=xNew< double>(N);85 values=xNew<IssmDouble>(N); 86 86 spcpresent=false; 87 87 for(j=0;j<N;j++){ 88 values[j]= doublevector[i*N+j];88 values[j]=IssmDoublevector[i*N+j]; 89 89 if(!isnan(values[j]))spcpresent=true; //NaN means no spc by default 90 90 } … … 94 94 count++; 95 95 } 96 xDelete< double>(values);96 xDelete<IssmDouble>(values); 97 97 } 98 98 } … … 103 103 104 104 /*Free ressources:*/ 105 xDelete< double>(doublevector);106 xDelete< double>(times);107 xDelete< double>(values);105 xDelete<IssmDouble>(IssmDoublevector); 106 xDelete<IssmDouble>(times); 107 xDelete<IssmDouble>(values); 108 108 } -
issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
r12450 r12470 9 9 #include "../../EnumDefinitions/EnumDefinitions.h" 10 10 11 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes, double* elements,12 int numberofelements2d,int numberofnodes2d, double* elements2d,int numlayers,int elements_width, int dim,int num_procs){11 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,IssmDouble* elements, 12 int numberofelements2d,int numberofnodes2d,IssmDouble* elements2d,int numlayers,int elements_width, int dim,int num_procs){ 13 13 14 14 int noerr=1; -
issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h
r8303 r12470 6 6 #define _MESHPARTITIONX_H 7 7 8 #include "../../include/include.h" 9 8 10 /* local prototypes: */ 9 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes, double* elements,10 int numberofelements2d,int numberofnodes2d, double* elements2d,int numlayers,int elements_width, int dim,int numareas);11 int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,IssmDouble* elements, 12 int numberofelements2d,int numberofnodes2d,IssmDouble* elements2d,int numlayers,int elements_width, int dim,int numareas); 11 13 12 14 #endif /* _MESHPARTITIONX_H */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
r12450 r12470 23 23 int numberofelements; 24 24 int numberofvertices; 25 double* elements=NULL;25 IssmDouble* elements=NULL; 26 26 27 27 /*output*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
r12450 r12470 24 24 int numoutputs; 25 25 Parameters *parameters = NULL; 26 double *requestedoutputs = NULL;26 IssmDouble *requestedoutputs = NULL; 27 27 28 28 if(*pparameters)return; //do not create parameters twice! … … 105 105 parameters->AddObject(new IntParam(DiagnosticNumRequestedOutputsEnum,numoutputs)); 106 106 if(numoutputs)parameters->AddObject(new IntVecParam(DiagnosticRequestedOutputsEnum,requestedoutputs,numoutputs)); 107 xDelete< double>(requestedoutputs);107 xDelete<IssmDouble>(requestedoutputs); 108 108 iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,TransientRequestedOutputsEnum); 109 109 parameters->AddObject(new IntParam(TransientNumRequestedOutputsEnum,numoutputs)); 110 110 if(numoutputs)parameters->AddObject(new IntVecParam(TransientRequestedOutputsEnum,requestedoutputs,numoutputs)); 111 xDelete< double>(requestedoutputs);111 xDelete<IssmDouble>(requestedoutputs); 112 112 iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,SteadystateRequestedOutputsEnum); 113 113 parameters->AddObject(new IntParam(SteadystateNumRequestedOutputsEnum,numoutputs)); 114 114 if(numoutputs)parameters->AddObject(new IntVecParam(SteadystateRequestedOutputsEnum,requestedoutputs,numoutputs)); 115 xDelete< double>(requestedoutputs);115 xDelete<IssmDouble>(requestedoutputs); 116 116 117 117 /*Before returning, create parameters in case we are running Qmu or control types runs: */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
r12450 r12470 23 23 int numberofelements; 24 24 int numberofvertices; 25 double* elements=NULL;25 IssmDouble* elements=NULL; 26 26 27 27 /*output*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
r12450 r12470 7 7 #include "../../EnumDefinitions/EnumDefinitions.h" 8 8 9 void DistributeNumDofs(DofIndexing* index,int analysis_type, double* vertices_type){9 void DistributeNumDofs(DofIndexing* index,int analysis_type,IssmDouble* vertices_type){ 10 10 11 11 /*For now, we distribute by analysis_type, later, we will distribute using the analysis_type, -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
r12450 r12470 42 42 int el1,el2; 43 43 int dim; 44 double* elements=NULL;45 double* elements2d=NULL;46 double* riftinfo=NULL;47 double* vertex_pairing=NULL;44 IssmDouble* elements=NULL; 45 IssmDouble* elements2d=NULL; 46 IssmDouble* riftinfo=NULL; 47 IssmDouble* vertex_pairing=NULL; 48 48 49 49 /*Fetch parameters: */ … … 76 76 77 77 /*Free elements and elements2d: */ 78 xDelete< double>(elements);79 xDelete< double>(elements2d);78 xDelete<IssmDouble>(elements); 79 xDelete<IssmDouble>(elements2d); 80 80 81 81 /*Deal with rifts, they have to be included into one partition only, not several: */ … … 87 87 epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices; 88 88 } 89 xDelete< double>(riftinfo);89 xDelete<IssmDouble>(riftinfo); 90 90 } 91 91 … … 119 119 }//for (i=0;i<numberofelements;i++) 120 120 /*Free data : */ 121 xDelete< double>(elements);121 xDelete<IssmDouble>(elements); 122 122 123 123 /*We might have vertex_pairing in which case, some vertices have to be cloned: … … 130 130 } 131 131 } 132 xDelete< double>(vertex_pairing);132 xDelete<IssmDouble>(vertex_pairing); 133 133 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum); 134 134 for(i=0;i<numvertex_pairing;i++){ … … 137 137 } 138 138 } 139 xDelete< double>(vertex_pairing);139 xDelete<IssmDouble>(vertex_pairing); 140 140 141 141 /*Free ressources:*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
r10576 r12470 108 108 109 109 /*Distribution of dofs: */ 110 void DistributeNumDofs(DofIndexing* index,int analysis_type, double* vertices_type);110 void DistributeNumDofs(DofIndexing* index,int analysis_type,IssmDouble* vertices_type); 111 111 112 112 #endif -
issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
r12450 r12470 71 71 int i1,i2; 72 72 int cols; 73 double e1,e2;73 IssmDouble e1,e2; 74 74 int pos; 75 75 int numberofedges; 76 double* edges=NULL;77 double* elements=NULL;76 IssmDouble* edges=NULL; 77 IssmDouble* elements=NULL; 78 78 79 79 /*Fetch parameters: */ … … 158 158 159 159 /*Free data: */ 160 xDelete< double>(elements);161 xDelete< double>(edges);160 xDelete<IssmDouble>(elements); 161 xDelete<IssmDouble>(edges); 162 162 163 163 /*Assign output pointers:*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
r12450 r12470 61 61 62 62 /*Create Penpair for vertex_pairing: */ 63 double *vertex_pairing=NULL;64 double *nodeonbed=NULL;63 IssmDouble *vertex_pairing=NULL; 64 IssmDouble *nodeonbed=NULL; 65 65 iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum); 66 66 iomodel->FetchData(&nodeonbed,NULL,NULL,MeshVertexonbedEnum); … … 90 90 91 91 /*free ressources: */ 92 xDelete< double>(vertex_pairing);93 xDelete< double>(nodeonbed);92 xDelete<IssmDouble>(vertex_pairing); 93 xDelete<IssmDouble>(nodeonbed); 94 94 95 95 /*Assign output pointer: */ -
issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp
r12102 r12470 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void NodalValuex( double* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units){12 void NodalValuex( IssmDouble* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units){ 13 13 14 14 extern int my_rank; … … 16 16 int index; 17 17 Element* element=NULL; 18 double value;18 IssmDouble value; 19 19 int found; 20 20 int sumfound; -
issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h
r9206 r12470 10 10 11 11 /* local prototypes: */ 12 void NodalValuex( double* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);12 void NodalValuex( IssmDouble* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units); 13 13 14 14 #endif /* _NODALVALUEX_H */ -
issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
r12450 r12470 27 27 28 28 /*intermediary: */ 29 double* analyses=NULL;29 IssmPDouble* analyses=NULL; 30 30 char** strings=NULL; 31 31 int numanalyses; … … 48 48 49 49 /*Now, allocate analyses and strings: */ 50 analyses=xNew< double>(numanalyses);50 analyses=xNew<IssmPDouble>(numanalyses); 51 51 strings=xNew<char*>(numanalyses); 52 52 for(i=0;i<numanalyses;i++)strings[i]=NULL; … … 71 71 if(strings[numanalyses-1]==NULL){ 72 72 string=xNew<char>((strlen(line)+1)); 73 memcpy(string,line,(strlen(line)+1)*sizeof(char));73 xMemCpy<char>(string,line,(strlen(line)+1)); 74 74 75 75 strings[numanalyses-1]=string; … … 78 78 string=strings[numanalyses-1]; 79 79 newstring=xNew<char>((strlen(line)+1)); 80 memcpy(newstring,line,(strlen(line)+1)*sizeof(char));80 xMemCpy<char>(newstring,line,(strlen(line)+1)); 81 81 82 82 /*concatenate:*/ 83 83 catstring=xNew<char>(strlen(string)+1+strlen(newstring)+1+1); //fit in a space " " 84 memcpy(catstring,string,(strlen(string)+1)*sizeof(char));84 xMemCpy<char>(catstring,string,(strlen(string)+1)); 85 85 86 86 strcat(catstring," "); … … 98 98 MPI_Bcast(&numanalyses,1,MPI_INT,0,MPI_COMM_WORLD); 99 99 if(my_rank!=0){ 100 analyses=xNew< double>(numanalyses);100 analyses=xNew<IssmPDouble>(numanalyses); 101 101 strings=xNew<char*>(numanalyses); 102 102 } … … 124 124 for(i=0;i<numanalyses;i++) xDelete<char>(strings[i]); 125 125 xDelete<char*>(strings); 126 xDelete< double>(analyses);126 xDelete<IssmPDouble>(analyses); 127 127 return; 128 128 } -
issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
r12450 r12470 23 23 24 24 int i, it, jj, itm; 25 double DT = 0.02, sigfac, snormfac;26 double signorm = 5.5; // signorm : sigma of the temperature distribution for a normal day27 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm28 double signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day29 double siglimc, siglim0, siglim0c;30 double tstep, tsint, tint, tstepc;25 IssmDouble DT = 0.02, sigfac, snormfac; 26 IssmDouble signorm = 5.5; // signorm : sigma of the temperature distribution for a normal day 27 IssmDouble siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 28 IssmDouble signormc = signorm - 0.5; // sigma of the temperature distribution for cloudy day 29 IssmDouble siglimc, siglim0, siglim0c; 30 IssmDouble tstep, tsint, tint, tstepc; 31 31 int NPDMAX = 1504, NPDCMAX = 1454; 32 // double pdds[NPDMAX]={0};33 // double pds[NPDCMAX]={0};34 double pddt, pd ; // pd : snow/precip fraction, precipitation falling as snow35 double PDup, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)36 double tstar; // monthly mean surface temp32 //IssmDouble pdds[NPDMAX]={0}; 33 //IssmDouble pds[NPDCMAX]={0}; 34 IssmDouble pddt, pd ; // pd : snow/precip fraction, precipitation falling as snow 35 IssmDouble PDup, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 36 IssmDouble tstar; // monthly mean surface temp 37 37 38 double* pdds=NULL;39 double* pds=NULL;38 IssmDouble* pdds=NULL; 39 IssmDouble* pds=NULL; 40 40 Element* element = NULL; 41 41 42 pdds=xNew< double>(NPDMAX+1);43 pds=xNew< double>(NPDCMAX+1);42 pdds=xNew<IssmDouble>(NPDMAX+1); 43 pds=xNew<IssmDouble>(NPDCMAX+1); 44 44 45 45 // initialize PDD (creation of a lookup table) … … 106 106 } 107 107 /*free ressouces: */ 108 xDelete< double>(pdds);109 xDelete< double>(pds);108 xDelete<IssmDouble>(pdds); 109 xDelete<IssmDouble>(pds); 110 110 111 111 } -
issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
r12450 r12470 15 15 int configuration_type; 16 16 int fsize; 17 double* ug_serial=NULL;17 IssmDouble* ug_serial=NULL; 18 18 19 19 /*first figure out fsize: */ … … 51 51 52 52 /*Free ressources:*/ 53 xDelete< double>(ug_serial);53 xDelete<IssmDouble>(ug_serial); 54 54 55 55 /*Assign output pointers:*/ -
issm/trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp
r11827 r12470 13 13 int output_enum; 14 14 int step; 15 double time;16 double output_value;15 IssmDouble time; 16 IssmDouble output_value; 17 17 Element *element = NULL; 18 18 -
issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp
r11202 r12470 16 16 #include "../modules.h" 17 17 18 void Responsex( double* responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index){18 void Responsex(IssmDouble* responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index){ 19 19 20 20 switch (StringToEnumx(response_descriptor)){ -
issm/trunk-jpl/src/c/modules/Responsex/Responsex.h
r11202 r12470 9 9 #include "../../Container/Container.h" 10 10 11 void Responsex( double* presponse,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index);11 void Responsex(IssmDouble* presponse,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index); 12 12 13 13 #endif /* _RESPONSESXX_H */ -
issm/trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp
r12450 r12470 20 20 21 21 int start,end; 22 double* df_local=NULL;22 IssmDouble* df_local=NULL; 23 23 int df_local_size; 24 24 int i; -
issm/trunk-jpl/src/c/modules/Solverx/Solverx.h
r12417 r12470 24 24 #ifdef _HAVE_GSL_ 25 25 void SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf); 26 void SolverxGsl( double** pX,double* A,double* B,int n);26 void SolverxGsl(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n); 27 27 #endif 28 28 -
issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
r12450 r12470 21 21 int M,N,N2,s; 22 22 SeqVec *uf = NULL; 23 double *x = NULL;23 IssmDouble *x = NULL; 24 24 25 25 Kff->GetSize(&M,&N); … … 35 35 *puf=uf; 36 36 }/*}}}*/ 37 void SolverxGsl( double** pX,double* A,double* B,int n){/*{{{*/37 void SolverxGsl(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n){/*{{{*/ 38 38 39 39 /*GSL Matrices and vectors: */ … … 45 45 46 46 /*A will be modified by LU decomposition. Use copy*/ 47 double* Acopy = xNew<double>(n*n);48 memcpy(Acopy,A,n*n*sizeof(double));47 IssmDouble* Acopy = xNew<IssmDouble>(n*n); 48 xMemCpy<IssmDouble>(Acopy,A,n*n); 49 49 50 50 /*Initialize gsl matrices and vectors: */ … … 62 62 63 63 /*Copy result*/ 64 double* X = xNew<double>(n);65 memcpy(X,gsl_vector_ptr(x,0),n*sizeof( double));64 IssmDouble* X = xNew<IssmDouble>(n); 65 memcpy(X,gsl_vector_ptr(x,0),n*sizeof(IssmDouble)); 66 66 67 67 /*Clean up and assign output pointer*/ 68 xDelete< double>(Acopy);68 xDelete<IssmDouble>(Acopy); 69 69 gsl_permutation_free(p); 70 70 gsl_vector_free(x); -
issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp
r12102 r12470 11 11 #include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h" 12 12 13 void SurfaceAreax( double* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters){13 void SurfaceAreax( IssmDouble* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters){ 14 14 15 15 /*Intermediary*/ … … 18 18 19 19 /*output: */ 20 double S=0;21 double S_sum;20 IssmDouble S=0; 21 IssmDouble S_sum; 22 22 23 23 /*Compute gradients: */ -
issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h
r4236 r12470 10 10 11 11 /* local prototypes: */ 12 void SurfaceAreax( double* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters);12 void SurfaceAreax( IssmDouble* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters); 13 13 14 14 #endif /* _SURFACEAREAX_H */ -
issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
r12365 r12470 10 10 #include "../../EnumDefinitions/EnumDefinitions.h" 11 11 12 void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, double* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool kflag,bool pflag,bool penalty_kflag,bool penalty_pflag){12 void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, IssmDouble* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool kflag,bool pflag,bool penalty_kflag,bool penalty_pflag){ 13 13 14 14 /*intermediary: */ … … 25 25 Vector* pf = NULL; 26 26 Vector* df=NULL; 27 double kmax = 0;27 IssmDouble kmax = 0; 28 28 29 29 /*Display message*/ -
issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h
r11679 r12470 10 10 11 11 /* local prototypes: */ 12 void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, double* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,12 void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, IssmDouble* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters, 13 13 bool kflag=true,bool pflag=true,bool penalty_kflag=true,bool penalty_pflag=true); 14 14 -
issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp
r12102 r12470 10 10 #include "../../Container/Container.h" 11 11 12 void TimeAdaptx( double* pdt, Elements* elements, Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters){12 void TimeAdaptx(IssmDouble* pdt, Elements* elements, Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters){ 13 13 14 14 int i; 15 15 16 16 /*output: */ 17 double dt;17 IssmDouble dt; 18 18 19 19 /*intermediary: */ 20 20 Element *element = NULL; 21 double min_dt = 0;22 double node_min_dt = 0;21 IssmDouble min_dt = 0; 22 IssmDouble node_min_dt = 0; 23 23 24 24 /*Go through elements, and figure out the minimum of the time steps for each element (using CFL criterion): */ -
issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h
r6130 r12470 9 9 10 10 /* local prototypes: */ 11 void TimeAdaptx( double* pdt, Elements* elements, Nodes* nodes,Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters);11 void TimeAdaptx(IssmDouble* pdt, Elements* elements, Nodes* nodes,Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters); 12 12 13 13 #endif /* _TIMEADAPTX_H */ -
issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
r9761 r12470 14 14 void UpdateConstraintsx(Nodes* nodes,Constraints* constraints,Parameters* parameters){ 15 15 16 double time;16 IssmDouble time; 17 17 int analysis_type; 18 18 -
issm/trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp
r12450 r12470 13 13 14 14 int configuration_type; 15 double* yg_serial=NULL;15 IssmDouble* yg_serial=NULL; 16 16 17 17 /*Get current configuration*/ … … 34 34 35 35 /*Free ressources:*/ 36 xDelete< double>(yg_serial);36 xDelete<IssmDouble>(yg_serial); 37 37 } -
issm/trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp
r12450 r12470 15 15 Vector* vz = NULL; 16 16 Vertex *vertex = NULL; 17 double *thickness = NULL;18 double *bed = NULL;17 IssmDouble *thickness = NULL; 18 IssmDouble *bed = NULL; 19 19 20 20 /*get vertex vectors for bed and thickness: */ … … 38 38 39 39 /*Free ressources:*/ 40 xDelete< double>(thickness);41 xDelete< double>(bed);40 xDelete<IssmDouble>(thickness); 41 xDelete<IssmDouble>(bed); 42 42 xdelete(&vz); 43 43 return 1; -
issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp
r12450 r12470 15 15 int i; 16 16 int configuration_type; 17 double* uf_serial=NULL;17 IssmDouble* uf_serial=NULL; 18 18 19 19 /*retrieve parameters: */ … … 41 41 } 42 42 /*Free ressources:*/ 43 xDelete< double>(uf_serial);43 xDelete<IssmDouble>(uf_serial); 44 44 45 45 /*Assemble vector: */
Note:
See TracChangeset
for help on using the changeset viewer.