Changeset 8330
- Timestamp:
- 05/17/11 16:05:50 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 8 added
- 1 deleted
- 72 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/Makefile.am ¶
r8289 r8330 467 467 ./modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp\ 468 468 ./modules/ModelProcessorx/Balancevelocities/CreateLoadsBalancevelocities.cpp\ 469 ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp\ 469 470 ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\ 471 ./modules/ParsePetscOptionsx/ParsePetscOptionsx.h\ 472 ./modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp\ 470 473 ./modules/NodesDofx/NodesDofx.h\ 471 474 ./modules/NodesDofx/NodesDofx.cpp\ … … 1105 1108 ./modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp\ 1106 1109 ./modules/ModelProcessorx/Balancevelocities/CreateLoadsBalancevelocities.cpp\ 1110 ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp\ 1107 1111 ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\ 1112 ./modules/ParsePetscOptionsx/ParsePetscOptionsx.h\ 1113 ./modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp\ 1108 1114 ./modules/NodesDofx/NodesDofx.h\ 1109 1115 ./modules/NodesDofx/NodesDofx.cpp\ -
TabularUnified issm/trunk/src/c/io/FetchData.cpp ¶
r7860 r8330 571 571 #endif 572 572 573 #if defined(_ PARALLEL_) && defined(_HAVE_PETSC_)573 #if defined(_HAVE_PETSC_) 574 574 /*FUNCTION FetchData(double** pmatrix, int* pM,int* pN,FILE* fid){{{1*/ 575 575 void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid){ -
TabularUnified issm/trunk/src/c/io/IoModelFetchData.cpp ¶
r6412 r8330 11 11 #include "./io.h" 12 12 13 #ifdef _SERIAL_ 14 /***************** **************** **************** **************** **************** **************** **************** **************** **************** **************** 15 Serial IoModelFetch Data Routines, all overloaded. 16 **************** **************** **************** **************** **************** **************** **************** **************** **************** *****************/ 17 /*FUNCTION IoModelFetchData(DataSet** pdataset,ConstDataHandle model_handle,char* data_name){{{1*/ 18 void IoModelFetchData(DataSet** pdataset,ConstDataHandle model_handle,char* data_name){ 19 20 FetchData(pdataset,mxGetAssignedField(model_handle,0,data_name)); 13 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name){{{1*/ 14 void IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name){ 15 16 FILE* fid=NULL; 17 18 /*Set file pointer to beginning of the data: */ 19 fid=SetFilePointerToData(model_handle,data_name); 20 21 /*Now fetch: */ 22 FetchData(pmatrix,pM,pN,fid); 21 23 22 24 } 23 25 /*}}}*/ 24 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int *pN,ConstDataHandle model_handle,char* data_name){{{1*/ 25 void IoModelFetchData(double** pmatrix,int* pM,int *pN,ConstDataHandle model_handle,char* data_name){ 26 /*FUNCTION IoModelFetchData(char** pstring,FILE* model_handle,char* data_name){{{1*/ 27 void IoModelFetchData(char** pstring,FILE* model_handle,char* data_name){ 28 29 FILE* fid=NULL; 26 30 27 FetchData(pmatrix,pM,pN,mxGetAssignedField(model_handle,0,data_name)); 28 31 /*Set file pointer to beginning of the data: */ 32 fid=SetFilePointerToData(model_handle,data_name); 33 34 /*Now fetch: */ 35 FetchData(pstring,fid); 29 36 } 30 37 /*}}}*/ 31 /*FUNCTION IoModelFetchData(Mat* pmatrix,ConstDataHandle model_handle,char* data_name){{{1*/ 32 void IoModelFetchData(Mat* pmatrix,ConstDataHandle model_handle,char* data_name){ 38 /*FUNCTION IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){{{1*/ 39 void IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){ 40 41 FILE* fid=NULL; 33 42 34 FetchData(pmatrix,mxGetAssignedField(model_handle,0,data_name)); 35 43 /*Set file pointer to beginning of the data: */ 44 fid=SetFilePointerToData(model_handle,data_name); 45 46 /*Now fetch: */ 47 FetchData(pscalar,fid); 36 48 } 37 49 /*}}}*/ 38 /*FUNCTION IoModelFetchData(double** pvector,int* pM,ConstDataHandle model_handle,char* data_name){{{1*/ 39 void IoModelFetchData(double** pvector,int* pM,ConstDataHandle model_handle,char* data_name){ 50 /*FUNCTION IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name){{{1*/ 51 void IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name){ 52 53 FILE* fid=NULL; 40 54 41 FetchData(pvector,pM,mxGetAssignedField(model_handle,0,data_name)); 42 55 /*Set file pointer to beginning of the data: */ 56 fid=SetFilePointerToData(model_handle,data_name); 57 58 /*Now fetch: */ 59 FetchData(pinteger,fid); 43 60 } 44 61 /*}}}*/ 45 /*FUNCTION IoModelFetchData(Vec* pvector,ConstDataHandle model_handle,char* data_name){{{1*/ 46 void IoModelFetchData(Vec* pvector,ConstDataHandle model_handle,char* data_name){ 47 48 FetchData(pvector,mxGetAssignedField(model_handle,0,data_name)); 49 50 } 51 /*}}}*/ 52 /*FUNCTION IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){{{1*/ 53 void IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){ 54 55 FetchData(pstring,mxGetAssignedField(model_handle,0,data_name)); 56 57 } 58 /*}}}*/ 59 /*FUNCTION IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){{{1*/ 60 void IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){ 61 62 FetchData(pscalar,mxGetAssignedField(model_handle,0,data_name)); 63 64 } 65 /*}}}*/ 66 /*FUNCTION IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){{{1*/ 67 void IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){ 68 69 FetchData(pinteger,mxGetAssignedField(model_handle,0,data_name)); 70 } 71 /*}}}*/ 72 #endif 73 74 #ifdef _PARALLEL_ 75 /***************** **************** **************** **************** **************** **************** **************** **************** **************** **************** 76 Parallel IoModelFetch Data Routines, all overloaded. 77 **************** **************** **************** **************** **************** **************** **************** **************** **************** *****************/ 78 /*FUNCTION SetFilePointerToData(ConstDataHandle model_handle,char* data_name){{{1*/ 79 FILE* SetFilePointerToData(ConstDataHandle model_handle,char* data_name){ 62 /*FUNCTION SetFilePointerToData(FILE* model_handle,char* data_name){{{1*/ 63 FILE* SetFilePointerToData(FILE* model_handle,char* data_name){ 80 64 81 65 extern int my_rank; … … 140 124 } 141 125 /*}}}*/ 142 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,ConstDataHandle model_handle,char* data_name){{{1*/ 143 void IoModelFetchData(double** pmatrix,int* pM,int* pN,ConstDataHandle model_handle,char* data_name){ 126 127 #ifdef _SERIAL_ 128 /***************** **************** **************** **************** **************** **************** **************** **************** **************** **************** 129 Serial IoModelFetch Data Routines, all overloaded. 130 **************** **************** **************** **************** **************** **************** **************** **************** **************** *****************/ 131 /*FUNCTION IoModelFetchData(DataSet** pdataset,ConstDataHandle model_handle,char* data_name){{{1*/ 132 void IoModelFetchData(DataSet** pdataset,ConstDataHandle model_handle,char* data_name){ 133 134 FetchData(pdataset,mxGetAssignedField(model_handle,0,data_name)); 135 136 } 137 /*}}}*/ 138 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int *pN,ConstDataHandle model_handle,char* data_name){{{1*/ 139 void IoModelFetchData(double** pmatrix,int* pM,int *pN,ConstDataHandle model_handle,char* data_name){ 144 140 145 FILE* fid=NULL; 141 FetchData(pmatrix,pM,pN,mxGetAssignedField(model_handle,0,data_name)); 142 143 } 144 /*}}}*/ 145 /*FUNCTION IoModelFetchData(Mat* pmatrix,ConstDataHandle model_handle,char* data_name){{{1*/ 146 void IoModelFetchData(Mat* pmatrix,ConstDataHandle model_handle,char* data_name){ 146 147 147 /*Set file pointer to beginning of the data: */ 148 fid=SetFilePointerToData(model_handle,data_name); 148 FetchData(pmatrix,mxGetAssignedField(model_handle,0,data_name)); 149 150 } 151 /*}}}*/ 152 /*FUNCTION IoModelFetchData(double** pvector,int* pM,ConstDataHandle model_handle,char* data_name){{{1*/ 153 void IoModelFetchData(double** pvector,int* pM,ConstDataHandle model_handle,char* data_name){ 149 154 150 /*Now fetch: */ 151 FetchData(pmatrix,pM,pN,fid); 155 FetchData(pvector,pM,mxGetAssignedField(model_handle,0,data_name)); 156 157 } 158 /*}}}*/ 159 /*FUNCTION IoModelFetchData(Vec* pvector,ConstDataHandle model_handle,char* data_name){{{1*/ 160 void IoModelFetchData(Vec* pvector,ConstDataHandle model_handle,char* data_name){ 161 162 FetchData(pvector,mxGetAssignedField(model_handle,0,data_name)); 152 163 153 164 } 154 165 /*}}}*/ 155 166 /*FUNCTION IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){{{1*/ 156 void IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){ 167 void IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){ 168 169 FetchData(pstring,mxGetAssignedField(model_handle,0,data_name)); 157 170 158 FILE* fid=NULL;159 160 /*Set file pointer to beginning of the data: */161 fid=SetFilePointerToData(model_handle,data_name);162 163 /*Now fetch: */164 FetchData(pstring,fid);165 171 } 166 172 /*}}}*/ 167 173 /*FUNCTION IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){{{1*/ 168 void IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){ 174 void IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){ 175 176 FetchData(pscalar,mxGetAssignedField(model_handle,0,data_name)); 169 177 170 FILE* fid=NULL;171 172 /*Set file pointer to beginning of the data: */173 fid=SetFilePointerToData(model_handle,data_name);174 175 /*Now fetch: */176 FetchData(pscalar,fid);177 178 } 178 179 /*}}}*/ 179 180 /*FUNCTION IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){{{1*/ 180 void 181 void IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){ 181 182 182 FILE* fid=NULL; 183 184 /*Set file pointer to beginning of the data: */ 185 fid=SetFilePointerToData(model_handle,data_name); 186 187 /*Now fetch: */ 188 FetchData(pinteger,fid); 183 FetchData(pinteger,mxGetAssignedField(model_handle,0,data_name)); 189 184 } 190 185 /*}}}*/ -
TabularUnified issm/trunk/src/c/io/io.h ¶
r7860 r8330 15 15 FILE* pfopen(char* filename,char* format); 16 16 void pfclose(FILE* fid,char* filename); 17 18 19 void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid); 20 void FetchData(char** pstring,FILE* fid); 21 void FetchData(double* pscalar,FILE* fid); 22 void FetchData(int* pinteger,FILE* fid); 23 void IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name); 24 void IoModelFetchData(char** pstring,FILE* model_handle,char* data_name); 25 void IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name); 26 void IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name); 27 FILE* SetFilePointerToData(FILE* model_handle,char* data_name); 28 17 29 18 30 #ifdef _SERIAL_ … … 75 87 76 88 #ifdef _PARALLEL_ 77 void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid);78 void FetchData(char** pstring,FILE* fid);79 void FetchData(double* pscalar,FILE* fid);80 void FetchData(int* pinteger,FILE* fid);81 89 82 83 FILE* SetFilePointerToData(ConstDataHandle model_handle,char* data_name);84 void IoModelFetchData(double** pmatrix,int* pM,int* pN,ConstDataHandle model_handle,char* data_name);85 void IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name);86 void IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name);87 void IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name);88 90 89 91 void WriteData(int* pdummy,void* data,char* data_type); 90 92 void WriteDataToDisk(void* data,int* pM,int* pN,char* datatype,FILE* fid); 91 93 92 /*petsc options: */93 void ParsePetscOptions(Parameters* parameters, char* filename);94 94 95 95 #endif -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp ¶
r8288 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsBalancethickness(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsBalancethickness(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp ¶
r8288 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesBalancethickness(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesBalancethickness(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp ¶
r8288 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsBalancethickness(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsBalancethickness(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsBalancevelocities(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsBalancevelocities(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateLoadsBalancevelocities.cpp ¶
r8288 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*DataSet*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateNodesBalancevelocities.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesBalancevelocities(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesBalancevelocities(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/UpdateElementsBalancevelocities.cpp ¶
r8288 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsBalancevelocities(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsBalancevelocities(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp ¶
r4300 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsBedSlope(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsBedSlope(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Output*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp ¶
r4300 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*DataSet*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesBedSlope(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesBedSlope(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp ¶
r4873 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsBedSlope(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsBedSlope(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp ¶
r8129 r8330 12 12 #include "../ModelProcessorx.h" 13 13 14 void CreateParametersControl(Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,int solution_type,int analysis_type){14 void CreateParametersControl(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type){ 15 15 16 16 int i; -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp ¶
r8224 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp ¶
r8287 r8330 16 16 17 17 18 void CreateDataSets(Elements** pelements,Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads,Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,const int solution_type,const int analysis_type,const int nummodels,int analysis_counter){18 void CreateDataSets(Elements** pelements,Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads,Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,const int solution_type,const int analysis_type,const int nummodels,int analysis_counter){ 19 19 20 20 bool continuous = true; … … 114 114 UpdateElementsAndMaterialsControl(elements,materials,iomodel,iomodel_handle); 115 115 116 /*Update Elements in case we are running a transient solution: */ 117 if(analysis_counter==nummodels && (solution_type==Transient2DSolutionEnum | solution_type==Transient3DSolutionEnum)){ 118 UpdateElementsTransient(elements,iomodel,iomodel_handle,analysis_counter,analysis_type); 119 } 120 121 116 122 /*Generate objects that are not dependent on any analysis_type: */ 117 123 CreateParameters(pparameters,iomodel,iomodel_handle,solution_type,analysis_type,analysis_counter); -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp ¶
r8129 r8330 13 13 #include "./ModelProcessorx.h" 14 14 15 void CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel, ConstDataHandleiomodel_handle,const int nummodels){15 void CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,FILE* iomodel_handle,const int nummodels){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp ¶
r8319 r8330 12 12 #include "./ModelProcessorx.h" 13 13 14 void CreateParameters(Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,const int solution_type,int analysis_type,int analysis_counter){14 void CreateParameters(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,const int solution_type,int analysis_type,int analysis_counter){ 15 15 16 16 int i; … … 93 93 parameteroutput=(char**)xmalloc(iomodel->numoutput*sizeof(char*)); 94 94 95 #ifdef _SERIAL_96 pfield=mxGetAssignedField(iomodel_handle,0,"parameteroutput");97 for(i=0;i<iomodel->numoutput;i++){98 pfield2=mxGetCell(pfield,i);99 FetchData(&descriptor,pfield2);100 parameteroutput[i]=descriptor;101 }102 #else103 95 tag=(char*)xmalloc((strlen("parameteroutput_i")+1)*sizeof(char)); 104 96 for(i=0;i<iomodel->numoutput;i++){ … … 107 99 parameteroutput[i]=descriptor; 108 100 } 109 #endif110 101 111 102 /*Ok, we have all the parameter output descriptors. Build a parameter with it: */ 112 103 parameters->AddObject(new StringArrayParam(ParameterOutputEnum,parameteroutput,iomodel->numoutput)); 113 104 } 114 115 /*Deal with petsc options: */116 #ifdef _SERIAL_117 pfield=mxGetAssignedField(iomodel_handle,0,"petscoptions_analyses");118 FetchData(&analyses,&numpetscoptions,pfield);119 pfield=mxGetAssignedField(iomodel_handle,0,"petscoptions_strings");120 petscstrings=(char**)xmalloc(numpetscoptions*sizeof(char*)); //allocate121 for (i=0;i<numpetscoptions;i++){122 pfield2=mxGetCell(pfield,i);123 FetchData(&descriptor,pfield2);124 petscstrings[i]=descriptor;125 }126 parameters->AddObject(new StringArrayParam(PetscOptionsStringsEnum,petscstrings,numpetscoptions));127 parameters->AddObject(new DoubleVecParam(PetscOptionsAnalysesEnum,analyses,numpetscoptions));128 #endif129 105 130 106 /*Free data: {{{1*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsDiagnosticHoriz(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsDiagnosticHoriz(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*DataSets*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesDiagnosticHoriz(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesDiagnosticHoriz(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsDiagnosticHoriz(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsDiagnosticHoriz(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsDiagnosticHutter(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsDiagnosticHutter(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp ¶
r4236 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*DataSet*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesDiagnosticHutter(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesDiagnosticHutter(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsDiagnosticHutter(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsDiagnosticHutter(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsDiagnosticVert(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsDiagnosticVert(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp ¶
r4236 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*DataSet*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesDiagnosticVert(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesDiagnosticVert(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp ¶
r6972 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsDiagnosticVert(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsDiagnosticVert(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp ¶
r8303 r8330 18 18 #include "../ModelProcessorx/ModelProcessorx.h" 19 19 20 void ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle){20 void ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, FILE* iomodel_handle){ 21 21 22 22 int i; -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp ¶
r7640 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsHydrology(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsHydrology(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp ¶
r7640 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsHydrology(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsHydrology(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesHydrology(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesHydrology(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp ¶
r7640 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsHydrology(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsHydrology(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateConstraintsMelting.cpp ¶
r4236 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsMelting(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsMelting(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsMelting(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsMelting(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesMelting(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesMelting(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp ¶
r4441 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsMelting(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsMelting(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp ¶
r8224 r8330 16 16 #include "../../modules/modules.h" 17 17 18 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, ConstDataHandleIOMODEL,const int solution_type,const int nummodels,const int* analysis_type_list){18 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, FILE* IOMODEL,const int solution_type,const int nummodels,const int* analysis_type_list){ 19 19 20 20 int i; -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h ¶
r8287 r8330 13 13 #include "../../io/io.h" 14 14 15 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, ConstDataHandleiomodel_handle,const int solution_type,const int nummodels,const int* analysis_type_list);15 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, FILE* iomodel_handle,const int solution_type,const int nummodels,const int* analysis_type_list); 16 16 17 17 /*Creation of fem datasets: general drivers*/ 18 void CreateDataSets(Elements** pelements,Nodes** pnodes,Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads,Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,const int solution_type,int analysis_type,const int nummodels,int analysis_counter);19 void CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel, ConstDataHandleiomodel_handle,const int nummodels);20 void CreateParameters(Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,const int solution_type,int analysis_type,int analysis_counter);21 void CreateParametersControl(Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,int solution_type,int analysis_type);22 void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,int solution_type,int analysis_type);23 void UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel, ConstDataHandleiomodel_handle);18 void CreateDataSets(Elements** pelements,Nodes** pnodes,Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads,Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,const int solution_type,int analysis_type,const int nummodels,int analysis_counter); 19 void CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,FILE* iomodel_handle,const int nummodels); 20 void CreateParameters(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,const int solution_type,int analysis_type,int analysis_counter); 21 void CreateParametersControl(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type); 22 void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type); 23 void UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel,FILE* iomodel_handle); 24 24 25 25 /*Creation of fem datasets: specialised drivers: */ 26 26 27 27 /*diagnostic horizontal*/ 28 void CreateNodesDiagnosticHoriz(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);29 void CreateConstraintsDiagnosticHoriz(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);30 void CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);31 void UpdateElementsDiagnosticHoriz(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);28 void CreateNodesDiagnosticHoriz(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 29 void CreateConstraintsDiagnosticHoriz(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 30 void CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 31 void UpdateElementsDiagnosticHoriz(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 32 32 33 33 /*diagnostic vertical*/ 34 void CreateNodesDiagnosticVert(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);35 void CreateConstraintsDiagnosticVert(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);36 void CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);37 void UpdateElementsDiagnosticVert(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);34 void CreateNodesDiagnosticVert(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 35 void CreateConstraintsDiagnosticVert(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 36 void CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 37 void UpdateElementsDiagnosticVert(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 38 38 39 39 /*diagnostic hutter*/ 40 void CreateNodesDiagnosticHutter(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);41 void CreateConstraintsDiagnosticHutter(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);42 void CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);43 void UpdateElementsDiagnosticHutter(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);40 void CreateNodesDiagnosticHutter(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 41 void CreateConstraintsDiagnosticHutter(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 42 void CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 43 void UpdateElementsDiagnosticHutter(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 44 44 45 45 /*bed slope*/ 46 void CreateNodesBedSlope(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);47 void CreateConstraintsBedSlope(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);48 void CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);49 void UpdateElementsBedSlope(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);46 void CreateNodesBedSlope(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 47 void CreateConstraintsBedSlope(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 48 void CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 49 void UpdateElementsBedSlope(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 50 50 51 51 /*surface slope*/ 52 void CreateNodesSurfaceSlope(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);53 void CreateConstraintsSurfaceSlope(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);54 void CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);55 void UpdateElementsSurfaceSlope(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);52 void CreateNodesSurfaceSlope(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 53 void CreateConstraintsSurfaceSlope(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 54 void CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 55 void UpdateElementsSurfaceSlope(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 56 56 57 57 /*thermal:*/ 58 void CreateNodesThermal(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);59 void CreateConstraintsThermal(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);60 void CreateLoadsThermal(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);61 void UpdateElementsThermal(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);58 void CreateNodesThermal(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 59 void CreateConstraintsThermal(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 60 void CreateLoadsThermal(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 61 void UpdateElementsThermal(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 62 62 63 63 /*hydrology:*/ 64 void CreateNodesHydrology(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);65 void CreateConstraintsHydrology(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);66 void CreateLoadsHydrology(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);67 void UpdateElementsHydrology(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);64 void CreateNodesHydrology(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 65 void CreateConstraintsHydrology(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 66 void CreateLoadsHydrology(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 67 void UpdateElementsHydrology(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 68 68 69 69 70 70 /*melting:*/ 71 void CreateNodesMelting(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);72 void CreateConstraintsMelting(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);73 void CreateLoadsMelting(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);74 void UpdateElementsMelting(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);71 void CreateNodesMelting(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 72 void CreateConstraintsMelting(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 73 void CreateLoadsMelting(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 74 void UpdateElementsMelting(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 75 75 76 76 /*prognostic:*/ 77 void CreateNodesPrognostic(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);78 void CreateConstraintsPrognostic(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);79 void CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);80 void UpdateElementsPrognostic(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);77 void CreateNodesPrognostic(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 78 void CreateConstraintsPrognostic(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 79 void CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 80 void UpdateElementsPrognostic(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 81 81 82 82 /*balancedthickness:*/ 83 void CreateNodesBalancethickness(Nodes** pnodes,IoModel* iomodel, ConstDataHandleiomodel_handle);84 void CreateConstraintsBalancethickness(Constraints** pconstraints,IoModel* iomodel, ConstDataHandleiomodel_handle);85 void CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle);86 void UpdateElementsBalancethickness(Elements* elements,IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type);83 void CreateNodesBalancethickness(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 84 void CreateConstraintsBalancethickness(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 85 void CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 86 void UpdateElementsBalancethickness(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 87 87 88 88 /*balancedvelocities:*/ 89 void CreateNodesBalancevelocities(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle); 90 void CreateConstraintsBalancevelocities(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle); 91 void CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle); 92 void UpdateElementsBalancevelocities(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type); 89 void CreateNodesBalancevelocities(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle); 90 void CreateConstraintsBalancevelocities(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle); 91 void CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle); 92 void UpdateElementsBalancevelocities(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 93 94 /*transient: */ 95 void UpdateElementsTransient(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type); 93 96 94 97 /*partitioning: */ 95 void ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle);96 void NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle,bool continuous);98 void ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, FILE* iomodel_handle); 99 void NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle,bool continuous); 97 100 98 101 /*Connectivity*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp ¶
r6412 r8330 18 18 #include "../ModelProcessorx/ModelProcessorx.h" 19 19 20 void DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle);21 void ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle);20 void DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle); 21 void ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle); 22 22 23 void NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle,bool continuous){23 void NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle,bool continuous){ 24 24 25 25 /*First thing, this is a new partition for a new analysis_type, therefore, to avoid a leak, erase the nodes partition that might come through pmy_nodes: */ … … 33 33 } 34 34 35 void ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle){35 void ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle){ 36 36 37 37 /*as many nodes as there are vertices */ … … 48 48 49 49 50 void DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandleiomodel_handle){50 void DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle){ 51 51 52 52 /*each element has it own nodes (as many as vertices) + additional nodes from neighbouring elements for each edge. This yields to a very different partition for -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp ¶
r6237 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsPrognostic(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsPrognostic(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediaries*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesPrognostic(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesPrognostic(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp ¶
r7352 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsPrognostic(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsPrognostic(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel, ConstDataHandleiomodel_handle,int solution_type,int analysis_type){15 void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type){ 16 16 17 17 /*variable declarations: {{{1*/ … … 49 49 int count; 50 50 51 #ifdef _SERIAL_52 mxArray* pfield=NULL;53 mxArray* pfield2=NULL;54 #endif55 51 /*}}}*/ 56 52 … … 81 77 * the variables are in md.variables(md.ivar), as a strucuture: */ 82 78 83 #ifdef _SERIAL_84 pfield=mxGetAssignedField(iomodel_handle,0,"variabledescriptors");85 for(i=0;i<iomodel->numvariabledescriptors;i++){86 pfield2=mxGetCell(pfield,i);87 FetchData(&descriptor,pfield2);88 variabledescriptors[i]=descriptor;89 }90 #else91 79 for(i=0;i<iomodel->numvariabledescriptors;i++){ 92 80 sprintf(tag,"%s%i","variabledescriptor",i+1); … … 94 82 variabledescriptors[i]=descriptor; 95 83 } 96 #endif97 84 98 85 /*Ok, we have all the variable descriptors. Build a parameter with it: */ … … 104 91 105 92 /*Fetch descriptors: */ 106 #ifdef _SERIAL_107 pfield=mxGetAssignedField(iomodel_handle,0,"responsedescriptors");108 for(i=0;i<iomodel->numresponsedescriptors;i++){109 pfield2=mxGetCell(pfield,i);110 FetchData(&descriptor,pfield2);111 responsedescriptors[i]=descriptor;112 }113 #else114 93 for(i=0;i<iomodel->numresponsedescriptors;i++){ 115 94 sprintf(tag,"%s%i","responsedescriptor",i+1); … … 117 96 responsedescriptors[i]=descriptor; 118 97 } 119 #endif120 98 121 99 /*Ok, we have all the response descriptors. Build a parameter with it: */ … … 182 160 M=iomodel->qmu_mass_flux_num_profiles; 183 161 184 #ifdef _SERIAL_185 pfield=mxGetAssignedField(iomodel_handle,0,"qmu_mass_flux_segments");186 for(i=0;i<M;i++){187 pfield2=mxGetCell(pfield,i);188 FetchData(&matrix,mdims_array+i,ndims_array+i,pfield2);189 array[i]=matrix;190 }191 #else192 162 for(i=0;i<M;i++){ 193 163 sprintf(tag,"%s%i","qmu_mass_flux_segments",i+1); //names were created using Matlab indexing convention … … 222 192 xfree((void**)&temp_matrix); 223 193 } 224 #endif225 194 226 195 /*Ok, we have an array of segments, different on every cpu. Create a DoubleMatArrayParam object with it: */ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp ¶
r4301 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsSurfaceSlope(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsSurfaceSlope(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Output*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp ¶
r4301 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*DataSet*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp ¶
r4441 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsSurfaceSlope(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsSurfaceSlope(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateConstraintsThermal(Constraints** pconstraints, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateConstraintsThermal(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp ¶
r8303 r8330 11 11 #include "../ModelProcessorx.h" 12 12 13 void CreateLoadsThermal(Loads** ploads, IoModel* iomodel, ConstDataHandleiomodel_handle){13 void CreateLoadsThermal(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){ 14 14 15 15 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp ¶
r8303 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void CreateNodesThermal(Nodes** pnodes, IoModel* iomodel, ConstDataHandleiomodel_handle){15 void CreateNodesThermal(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp ¶
r4474 r8330 13 13 #include "../ModelProcessorx.h" 14 14 15 void UpdateElementsThermal(Elements* elements, IoModel* iomodel, ConstDataHandleiomodel_handle,int analysis_counter,int analysis_type){15 void UpdateElementsThermal(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){ 16 16 17 17 /*Intermediary*/ -
TabularUnified issm/trunk/src/c/modules/modules.h ¶
r8224 r8330 71 71 #include "./SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.h" 72 72 #include "./ModelProcessorx/ModelProcessorx.h" 73 #include "./ParsePetscOptionsx/ParsePetscOptionsx.h" 73 74 #include "./NodeConnectivityx/NodeConnectivityx.h" 74 75 #include "./NodesDofx/NodesDofx.h" -
TabularUnified issm/trunk/src/c/objects/IoModel.cpp ¶
r8319 r8330 121 121 /*}}}*/ 122 122 /*FUNCTION IoModel::IoModel(ConstDataHandle iomodel_handle){{{1*/ 123 IoModel::IoModel( ConstDataHandleiomodel_handle){123 IoModel::IoModel(FILE* iomodel_handle){ 124 124 125 125 int i,j; -
TabularUnified issm/trunk/src/c/objects/IoModel.h ¶
r8319 r8330 221 221 ~IoModel(); 222 222 IoModel(); 223 IoModel( ConstDataHandleiomodel_handle);223 IoModel(FILE* iomodel_handle); 224 224 void IoModelInit(void); 225 225 void Echo(int which_part,int rank); -
TabularUnified issm/trunk/src/c/solutions/issm.cpp ¶
r8279 r8330 13 13 /*I/O: */ 14 14 FILE *output_fid = NULL; 15 char *petscoptionsfilename= NULL;15 FILE *petscoptionsfid = NULL; 16 16 char *lockname = NULL; 17 17 bool qmu_analysis = false; … … 52 52 if(argc<2)_error_("Usage error: no solution requested"); 53 53 solution_type=StringToEnumx(argv[1]); 54 petscoptionsfilename=argv[4];55 54 lockname=argv[6]; 56 55 … … 69 68 70 69 /*add petsc options to parameters: */ 71 ParsePetscOptions(femmodel->parameters,petscoptionsfilename); 70 petscoptionsfid=pfopen(argv[4],"r"); 71 ParsePetscOptionsx(femmodel->parameters,petscoptionsfid); 72 pfclose(petscoptionsfid,argv[4]); 72 73 73 74 /*get parameters: */ … … 111 112 } 112 113 113 /*Close output file and write lock file if requested*/114 /*Close output and petsc options file and write lock file if requested*/ 114 115 pfclose(output_fid,argv[5]); 115 116 if (waitonlock>0){ -
TabularUnified issm/trunk/src/m/classes/model.m ¶
r8319 r8330 303 303 %PETSc and MATLAB solver string 304 304 petscoptions=NaN; 305 petscoptions_analyses=[];306 petscoptions_strings={};307 305 308 306 %Analysis -
TabularUnified issm/trunk/src/m/classes/petscoptions.m ¶
r6017 r8330 43 43 end 44 44 %}}} 45 function [analyses strings]=marshall(o)%{{{146 %marshall options into analyses and strings47 analyses=zeros(size(o.options,1),1);48 strings=cell(size(o.options,1),1);49 for i=1:size(o.options,1),50 analyses(i)=o.options{i,1};51 strings{i}=petscoptiontostring(o.options{i,2});52 end53 end54 %}}}55 45 end 56 46 end -
TabularUnified issm/trunk/src/m/model/presolve.m ¶
r8298 r8330 45 45 end 46 46 47 %package together petscoptions for serial runs48 [md.petscoptions_analyses md.petscoptions_strings]=marshall(md.petscoptions);49 47 50 %write a template file for issm to use, in parallel51 if ~strcmpi(md.cluster.name,'none'),52 PetscOptions2PetscFile(md.petscoptions,[md.name '.petsc']);53 end -
TabularUnified issm/trunk/src/m/model/solve.m ¶
r8296 r8330 41 41 end 42 42 43 %Marshall model data into a binary file. 44 marshall(md); 45 46 %add qmu fields to binary file if running qmu analysis 47 if md.qmu_analysis, 48 qmumarshall(md,md.variables(options.ivar),md.responses(options.iresp)); 49 end 50 51 %write a template file for issm to use, in parallel 52 PetscOptions2PetscFile(md.petscoptions,[md.name '.petsc']); 53 43 54 %If running in parallel, we have a different way of launching the solution 44 55 %sequences. -
TabularUnified issm/trunk/src/m/model/solveparallel.m ¶
r8109 r8330 13 13 %directories, name jobs, etc ... 14 14 c=clock; md.runtimename=sprintf('%s-%i-%i-%i-%i-%i-%i-%i',md.name,c(2),c(3),c(1),c(4),c(5),floor(c(6)),GetPId()); 15 16 %Marshall model data into a binary file.17 marshall(md);18 19 %add qmu fields to binary file if running qmu analysis20 if md.qmu_analysis,21 qmumarshall(md,md.variables(options.ivar),md.responses(options.iresp));22 end23 15 24 16 %Now, we need to build the queuing script, used by the cluster to launch the job. -
TabularUnified issm/trunk/src/m/solutions/NewFemModel.m ¶
r6321 r8330 17 17 femmodel.analysis_type_list=analysis_types; 18 18 19 issmprintf(VerboseMProcessor(),'\n reading data from model %s...',md.name);20 [femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.constraints,femmodel.loads,femmodel.materials,femmodel.parameters]=ModelProcessor( md,solution_type,femmodel.analysis_type_list);19 issmprintf(VerboseMProcessor(),'\n reading data from input file %s.bin...',md.name); 20 [femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.constraints,femmodel.loads,femmodel.materials,femmodel.parameters]=ModelProcessor([md.name '.bin'],solution_type,femmodel.analysis_type_list); 21 21 22 22 %Initialize some fiels with empty celils -
TabularUnified issm/trunk/src/m/solutions/issm.m ¶
r6323 r8330 14 14 %create finite element model 15 15 femmodel=NewFemModel(md,solution_type,analyses,numanalyses); 16 17 %process petsc options: 18 femmodel.parameters=ParsePetscOptions(femmodel.parameters,[md.name '.petsc']); 16 19 17 20 %retrieve parameters -
TabularUnified issm/trunk/src/mex/Makefile.am ¶
r8284 r8330 52 52 OutputRifts\ 53 53 OutputResults\ 54 ParsePetscOptions\ 54 55 PenaltyConstraints\ 55 56 PointCloudFindNeighbors\ … … 334 335 UpdateVertexPositions/UpdateVertexPositions.h 335 336 337 ParsePetscOptions_SOURCES = ParsePetscOptions/ParsePetscOptions.cpp\ 338 ParsePetscOptions/ParsePetscOptions.h 339 340 336 341 VerticesDof_SOURCES = VerticesDof/VerticesDof.cpp\ 337 342 VerticesDof/VerticesDof.h -
TabularUnified issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp ¶
r8306 r8330 11 11 12 12 /*inputs: */ 13 char* inputfilename=NULL; 14 FILE* IOMODEL; 13 15 int solution_type; 14 16 double* double_analyses=NULL; 15 17 int* analyses=NULL; 16 18 int numanalyses; 17 19 18 20 /* output datasets: */ 19 21 Elements* elements=NULL; … … 24 26 Materials* materials=NULL; 25 27 Parameters* parameters=NULL; 26 28 27 29 /*Boot module: */ 28 30 MODULEBOOT(); … … 30 32 /*checks on arguments on the matlab side: */ 31 33 CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ModelProcessorUsage); 34 35 /*open file input for reading: */ 36 FetchData(&inputfilename,INPUTFILE); 37 IOMODEL= pfopen(inputfilename ,"rb"); 32 38 39 /*retrieve solution type and analyses: */ 33 40 FetchData(&solution_type,SOLUTIONTYPE); 34 35 41 FetchData(&double_analyses,&numanalyses,ANALYSES); 36 42 analyses=(int*)xmalloc(numanalyses*sizeof(int)); 37 43 for(i=0;i<numanalyses;i++)analyses[i]=(int)double_analyses[i]; 38 44 39 45 /*call x code ModelProcessorx: */ 40 ModelProcessorx(&elements,&nodes,&vertices,&materials,&constraints, &loads, ¶meters, MODEL,solution_type,numanalyses,analyses);46 ModelProcessorx(&elements,&nodes,&vertices,&materials,&constraints, &loads, ¶meters, IOMODEL,solution_type,numanalyses,analyses); 41 47 42 48 /*Write output data: */ … … 59 65 xfree((void**)&analyses); 60 66 xfree((void**)&double_analyses); 67 xfree((void**)&inputfilename); 68 69 /*Close input file: */ 70 pfclose(IOMODEL,inputfilename); 61 71 62 72 /*end module: */ … … 66 76 void ModelProcessorUsage(void) { 67 77 _printf_(true,"\n"); 68 _printf_(true," usage: [elements,vertices,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses )\n");78 _printf_(true," usage: [elements,vertices,constraints,loads,materials,parameters,part,tpart]=ModelProcessor(model,analyses,inputfile)\n"); 69 79 _printf_(true," where: model is an instance of the matlab @model class and analyses is a list of analysis types being performed.\n"); 80 _printf_(true," inputfile is the file holding the marshalled datasets from the model.\n"); 70 81 _printf_(true,"\n"); 71 82 } -
TabularUnified issm/trunk/src/mex/ModelProcessor/ModelProcessor.h ¶
r4236 r8330 23 23 24 24 /* serial input macros: */ 25 #define MODEL(mxArray*)prhs[0]25 #define INPUTFILE (mxArray*)prhs[0] 26 26 #define SOLUTIONTYPE (mxArray*)prhs[1] 27 27 #define ANALYSES (mxArray*)prhs[2]
Note:
See TracChangeset
for help on using the changeset viewer.