Changeset 8330


Ignore:
Timestamp:
05/17/11 16:05:50 (14 years ago)
Author:
Eric.Larour
Message:

Serial and parallel runs now running with marshalling routines, more homogeneous

Location:
issm/trunk/src
Files:
8 added
1 deleted
72 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/src/c/Makefile.am

    r8289 r8330  
    467467                                        ./modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp\
    468468                                        ./modules/ModelProcessorx/Balancevelocities/CreateLoadsBalancevelocities.cpp\
     469                                        ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp\
    469470                                        ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\
     471                                        ./modules/ParsePetscOptionsx/ParsePetscOptionsx.h\
     472                                        ./modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp\
    470473                                        ./modules/NodesDofx/NodesDofx.h\
    471474                                        ./modules/NodesDofx/NodesDofx.cpp\
     
    11051108                                        ./modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp\
    11061109                                        ./modules/ModelProcessorx/Balancevelocities/CreateLoadsBalancevelocities.cpp\
     1110                                        ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp\
    11071111                                        ./modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp\
     1112                                        ./modules/ParsePetscOptionsx/ParsePetscOptionsx.h\
     1113                                        ./modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp\
    11081114                                        ./modules/NodesDofx/NodesDofx.h\
    11091115                                        ./modules/NodesDofx/NodesDofx.cpp\
  • TabularUnified issm/trunk/src/c/io/FetchData.cpp

    r7860 r8330  
    571571#endif
    572572
    573 #if defined(_PARALLEL_) && defined(_HAVE_PETSC_)
     573#if defined(_HAVE_PETSC_)
    574574/*FUNCTION FetchData(double** pmatrix, int* pM,int* pN,FILE* fid){{{1*/
    575575void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid){
  • TabularUnified issm/trunk/src/c/io/IoModelFetchData.cpp

    r6412 r8330  
    1111#include "./io.h"
    1212
    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*/
     14void  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);
    2123
    2224}
    2325/*}}}*/
    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*/
     27void  IoModelFetchData(char** pstring,FILE* model_handle,char* data_name){
     28
     29        FILE* fid=NULL;
    2630       
    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);
    2936}
    3037/*}}}*/
    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*/
     39void  IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){
     40
     41        FILE* fid=NULL;
    3342       
    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);
    3648}
    3749/*}}}*/
    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*/
     51void  IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name){
     52
     53        FILE* fid=NULL;
    4054       
    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);
    4360}
    4461/*}}}*/
    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*/
     63FILE* SetFilePointerToData(FILE* model_handle,char* data_name){
    8064
    8165        extern int my_rank;
     
    140124}
    141125/*}}}*/
    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*/
     132void 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*/
     139void IoModelFetchData(double** pmatrix,int* pM,int *pN,ConstDataHandle model_handle,char* data_name){
    144140       
    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*/
     146void IoModelFetchData(Mat* pmatrix,ConstDataHandle model_handle,char* data_name){
    146147       
    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*/
     153void IoModelFetchData(double** pvector,int* pM,ConstDataHandle model_handle,char* data_name){
    149154       
    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*/
     160void IoModelFetchData(Vec* pvector,ConstDataHandle model_handle,char* data_name){
     161       
     162        FetchData(pvector,mxGetAssignedField(model_handle,0,data_name));
    152163
    153164}
    154165/*}}}*/
    155166/*FUNCTION IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){{{1*/
    156 void  IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){
     167void IoModelFetchData(char** pstring,ConstDataHandle model_handle,char* data_name){
     168       
     169        FetchData(pstring,mxGetAssignedField(model_handle,0,data_name));
    157170
    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);
    165171}
    166172/*}}}*/
    167173/*FUNCTION IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){{{1*/
    168 void  IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){
     174void IoModelFetchData(double* pscalar,ConstDataHandle model_handle,char* data_name){
     175       
     176        FetchData(pscalar,mxGetAssignedField(model_handle,0,data_name));
    169177
    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);
    177178}
    178179/*}}}*/
    179180/*FUNCTION IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){{{1*/
    180 void  IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){
     181void IoModelFetchData(int* pinteger,ConstDataHandle model_handle,char* data_name){
    181182
    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));
    189184}
    190185/*}}}*/
  • TabularUnified issm/trunk/src/c/io/io.h

    r7860 r8330  
    1515FILE* pfopen(char* filename,char* format);
    1616void  pfclose(FILE* fid,char* filename);
     17
     18
     19void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid);
     20void FetchData(char** pstring,FILE* fid);
     21void FetchData(double* pscalar,FILE* fid);
     22void FetchData(int* pinteger,FILE* fid);
     23void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name);
     24void  IoModelFetchData(char** pstring,FILE* model_handle,char* data_name);
     25void  IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name);
     26void  IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name);
     27FILE* SetFilePointerToData(FILE* model_handle,char* data_name);
     28
    1729
    1830#ifdef _SERIAL_
     
    7587
    7688#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);
    8189
    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);
    8890
    8991void WriteData(int* pdummy,void* data,char* data_type);
    9092void WriteDataToDisk(void* data,int* pM,int* pN,char* datatype,FILE* fid);
    9193
    92 /*petsc options: */
    93 void ParsePetscOptions(Parameters* parameters, char* filename);
    9494
    9595#endif
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp

    r8288 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsBalancethickness(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsBalancethickness(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp

    r8288 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesBalancethickness(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesBalancethickness(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp

    r8288 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsBalancethickness(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsBalancethickness(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsBalancevelocities(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsBalancevelocities(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateLoadsBalancevelocities.cpp

    r8288 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*DataSet*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateNodesBalancevelocities.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesBalancevelocities(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesBalancevelocities(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/UpdateElementsBalancevelocities.cpp

    r8288 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsBalancevelocities(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsBalancevelocities(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp

    r4300 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsBedSlope(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsBedSlope(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Output*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp

    r4300 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*DataSet*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesBedSlope(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesBedSlope(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp

    r4873 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsBedSlope(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsBedSlope(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp

    r8129 r8330  
    1212#include "../ModelProcessorx.h"
    1313
    14 void CreateParametersControl(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,int solution_type,int analysis_type){
     14void CreateParametersControl(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type){
    1515       
    1616        int i;
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp

    r8224 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp

    r8287 r8330  
    1616
    1717
    18 void CreateDataSets(Elements** pelements,Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads,Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,const int solution_type,const int analysis_type,const int nummodels,int analysis_counter){
     18void 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){
    1919
    2020        bool       continuous = true;
     
    114114        UpdateElementsAndMaterialsControl(elements,materials,iomodel,iomodel_handle);
    115115
     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
    116122        /*Generate objects that are not dependent on any analysis_type: */
    117123        CreateParameters(pparameters,iomodel,iomodel_handle,solution_type,analysis_type,analysis_counter);
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp

    r8129 r8330  
    1313#include "./ModelProcessorx.h"
    1414
    15 void    CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,ConstDataHandle iomodel_handle,const int nummodels){
     15void    CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,FILE* iomodel_handle,const int nummodels){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r8319 r8330  
    1212#include "./ModelProcessorx.h"
    1313
    14 void CreateParameters(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,const int solution_type,int analysis_type,int analysis_counter){
     14void CreateParameters(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,const int solution_type,int analysis_type,int analysis_counter){
    1515       
    1616        int i;
     
    9393                parameteroutput=(char**)xmalloc(iomodel->numoutput*sizeof(char*));
    9494
    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                 #else
    10395                tag=(char*)xmalloc((strlen("parameteroutput_i")+1)*sizeof(char));
    10496                for(i=0;i<iomodel->numoutput;i++){
     
    10799                        parameteroutput[i]=descriptor;
    108100                }
    109                 #endif
    110101
    111102                /*Ok, we have all the parameter output  descriptors. Build a parameter with it: */
    112103                parameters->AddObject(new StringArrayParam(ParameterOutputEnum,parameteroutput,iomodel->numoutput));
    113104        }
    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*)); //allocate
    121                 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         #endif
    129105
    130106        /*Free data: {{{1*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsDiagnosticHoriz(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsDiagnosticHoriz(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*DataSets*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesDiagnosticHoriz(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesDiagnosticHoriz(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsDiagnosticHoriz(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsDiagnosticHoriz(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsDiagnosticHutter(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsDiagnosticHutter(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp

    r4236 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*DataSet*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesDiagnosticHutter(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesDiagnosticHutter(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsDiagnosticHutter(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsDiagnosticHutter(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsDiagnosticVert(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsDiagnosticVert(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp

    r4236 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*DataSet*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesDiagnosticVert(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesDiagnosticVert(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp

    r6972 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsDiagnosticVert(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsDiagnosticVert(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp

    r8303 r8330  
    1818#include "../ModelProcessorx/ModelProcessorx.h"
    1919
    20 void  ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle){
     20void  ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, FILE* iomodel_handle){
    2121
    2222        int i;
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp

    r7640 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsHydrology(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsHydrology(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp

    r7640 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsHydrology(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsHydrology(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesHydrology(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesHydrology(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp

    r7640 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsHydrology(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsHydrology(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateConstraintsMelting.cpp

    r4236 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsMelting(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsMelting(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsMelting(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsMelting(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesMelting(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesMelting(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp

    r4441 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsMelting(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsMelting(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.cpp

    r8224 r8330  
    1616#include "../../modules/modules.h"
    1717
    18 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, ConstDataHandle IOMODEL,const int solution_type,const int nummodels,const int* analysis_type_list){
     18void 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){
    1919
    2020        int i;
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h

    r8287 r8330  
    1313#include "../../io/io.h"
    1414
    15 void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, ConstDataHandle iomodel_handle,const int solution_type,const int nummodels,const int* analysis_type_list);
     15void 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);
    1616
    1717/*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,ConstDataHandle 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,ConstDataHandle iomodel_handle,const int nummodels);
    20 void  CreateParameters(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,const int solution_type,int analysis_type,int analysis_counter);
    21 void  CreateParametersControl(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,int solution_type,int analysis_type);
    22 void  CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,int solution_type,int analysis_type);
    23 void  UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel,ConstDataHandle iomodel_handle);
     18void  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);
     19void  CreateElementsVerticesAndMaterials(Elements** pelements,Vertices** pvertices,Materials** pmaterials, IoModel* iomodel,FILE* iomodel_handle,const int nummodels);
     20void  CreateParameters(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,const int solution_type,int analysis_type,int analysis_counter);
     21void  CreateParametersControl(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type);
     22void  CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type);
     23void  UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel,FILE* iomodel_handle);
    2424
    2525/*Creation of fem datasets: specialised drivers: */
    2626
    2727/*diagnostic horizontal*/
    28 void    CreateNodesDiagnosticHoriz(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    29 void    CreateConstraintsDiagnosticHoriz(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    30 void  CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    31 void    UpdateElementsDiagnosticHoriz(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     28void    CreateNodesDiagnosticHoriz(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     29void    CreateConstraintsDiagnosticHoriz(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     30void  CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     31void    UpdateElementsDiagnosticHoriz(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    3232
    3333/*diagnostic vertical*/
    34 void    CreateNodesDiagnosticVert(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    35 void    CreateConstraintsDiagnosticVert(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    36 void  CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    37 void    UpdateElementsDiagnosticVert(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     34void    CreateNodesDiagnosticVert(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     35void    CreateConstraintsDiagnosticVert(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     36void  CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     37void    UpdateElementsDiagnosticVert(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    3838
    3939/*diagnostic hutter*/
    40 void    CreateNodesDiagnosticHutter(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    41 void    CreateConstraintsDiagnosticHutter(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    42 void  CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    43 void    UpdateElementsDiagnosticHutter(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     40void    CreateNodesDiagnosticHutter(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     41void    CreateConstraintsDiagnosticHutter(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     42void  CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     43void    UpdateElementsDiagnosticHutter(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    4444
    4545/*bed slope*/
    46 void    CreateNodesBedSlope(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    47 void    CreateConstraintsBedSlope(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    48 void  CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    49 void    UpdateElementsBedSlope(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     46void    CreateNodesBedSlope(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     47void    CreateConstraintsBedSlope(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     48void  CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     49void    UpdateElementsBedSlope(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    5050
    5151/*surface slope*/
    52 void    CreateNodesSurfaceSlope(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    53 void    CreateConstraintsSurfaceSlope(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    54 void  CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    55 void    UpdateElementsSurfaceSlope(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     52void    CreateNodesSurfaceSlope(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     53void    CreateConstraintsSurfaceSlope(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     54void  CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     55void    UpdateElementsSurfaceSlope(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    5656
    5757/*thermal:*/
    58 void    CreateNodesThermal(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    59 void    CreateConstraintsThermal(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    60 void  CreateLoadsThermal(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    61 void    UpdateElementsThermal(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     58void    CreateNodesThermal(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     59void    CreateConstraintsThermal(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     60void  CreateLoadsThermal(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     61void    UpdateElementsThermal(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    6262
    6363/*hydrology:*/
    64 void    CreateNodesHydrology(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    65 void    CreateConstraintsHydrology(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    66 void  CreateLoadsHydrology(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    67 void    UpdateElementsHydrology(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     64void    CreateNodesHydrology(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     65void    CreateConstraintsHydrology(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     66void  CreateLoadsHydrology(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     67void    UpdateElementsHydrology(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    6868
    6969
    7070/*melting:*/
    71 void    CreateNodesMelting(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    72 void    CreateConstraintsMelting(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    73 void  CreateLoadsMelting(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    74 void    UpdateElementsMelting(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     71void    CreateNodesMelting(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     72void    CreateConstraintsMelting(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     73void  CreateLoadsMelting(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     74void    UpdateElementsMelting(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    7575
    7676/*prognostic:*/
    77 void    CreateNodesPrognostic(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    78 void    CreateConstraintsPrognostic(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    79 void  CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    80 void    UpdateElementsPrognostic(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     77void    CreateNodesPrognostic(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     78void    CreateConstraintsPrognostic(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     79void  CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     80void    UpdateElementsPrognostic(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    8181
    8282/*balancedthickness:*/
    83 void    CreateNodesBalancethickness(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle);
    84 void    CreateConstraintsBalancethickness(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle);
    85 void  CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle);
    86 void    UpdateElementsBalancethickness(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type);
     83void    CreateNodesBalancethickness(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     84void    CreateConstraintsBalancethickness(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     85void  CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     86void    UpdateElementsBalancethickness(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    8787
    8888/*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);
     89void    CreateNodesBalancevelocities(Nodes** pnodes,IoModel* iomodel,FILE* iomodel_handle);
     90void    CreateConstraintsBalancevelocities(Constraints** pconstraints,IoModel* iomodel,FILE* iomodel_handle);
     91void  CreateLoadsBalancevelocities(Loads** ploads, IoModel* iomodel, FILE* iomodel_handle);
     92void    UpdateElementsBalancevelocities(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
     93
     94/*transient: */
     95void    UpdateElementsTransient(Elements* elements,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type);
    9396
    9497/*partitioning: */
    95 void  ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle);
    96 void  NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices,  IoModel* iomodel, ConstDataHandle iomodel_handle,bool continuous);
     98void  ElementsAndVerticesPartitioning(bool** pmy_elements, int** pmy_vertices, IoModel* iomodel, FILE* iomodel_handle);
     99void  NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices,  IoModel* iomodel, FILE* iomodel_handle,bool continuous);
    97100
    98101/*Connectivity*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp

    r6412 r8330  
    1818#include "../ModelProcessorx/ModelProcessorx.h"
    1919
    20 void  DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle);
    21 void  ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle);
     20void  DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle);
     21void  ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle);
    2222
    23 void  NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle,bool continuous){
     23void  NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle,bool continuous){
    2424       
    2525        /*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: */
     
    3333}
    3434
    35 void  ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle){
     35void  ContinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle){
    3636
    3737        /*as many nodes as there are vertices */
     
    4848
    4949
    50 void  DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, ConstDataHandle iomodel_handle){
     50void  DiscontinuousGalerkinNodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, FILE* iomodel_handle){
    5151
    5252        /*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  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsPrognostic(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsPrognostic(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsPrognostic(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediaries*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesPrognostic(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesPrognostic(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp

    r7352 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsPrognostic(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsPrognostic(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,ConstDataHandle iomodel_handle,int solution_type,int analysis_type){
     15void CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,FILE* iomodel_handle,int solution_type,int analysis_type){
    1616
    1717        /*variable declarations: {{{1*/
     
    4949        int      count;
    5050
    51         #ifdef _SERIAL_
    52                 mxArray* pfield=NULL;
    53                 mxArray* pfield2=NULL;
    54         #endif
    5551        /*}}}*/
    5652       
     
    8177                 * the variables are in md.variables(md.ivar), as a strucuture: */
    8278
    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                 #else
    9179                for(i=0;i<iomodel->numvariabledescriptors;i++){
    9280                        sprintf(tag,"%s%i","variabledescriptor",i+1);
     
    9482                        variabledescriptors[i]=descriptor;
    9583                }
    96                 #endif
    9784
    9885                /*Ok, we have all the variable descriptors. Build a parameter with it: */
     
    10491
    10592                /*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                 #else
    11493                for(i=0;i<iomodel->numresponsedescriptors;i++){
    11594                        sprintf(tag,"%s%i","responsedescriptor",i+1);
     
    11796                        responsedescriptors[i]=descriptor;
    11897                }
    119                 #endif
    12098
    12199                /*Ok, we have all the response descriptors. Build a parameter with it: */
     
    182160                        M=iomodel->qmu_mass_flux_num_profiles;
    183161
    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                         #else
    192162                        for(i=0;i<M;i++){
    193163                                sprintf(tag,"%s%i","qmu_mass_flux_segments",i+1); //names were created using Matlab indexing convention
     
    222192                                xfree((void**)&temp_matrix);
    223193                        }
    224                         #endif
    225194
    226195                        /*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  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsSurfaceSlope(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsSurfaceSlope(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Output*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp

    r4301 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*DataSet*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp

    r4441 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsSurfaceSlope(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsSurfaceSlope(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateConstraintsThermal(Constraints** pconstraints, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateConstraintsThermal(Constraints** pconstraints, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r8303 r8330  
    1111#include "../ModelProcessorx.h"
    1212
    13 void    CreateLoadsThermal(Loads** ploads, IoModel* iomodel,ConstDataHandle iomodel_handle){
     13void    CreateLoadsThermal(Loads** ploads, IoModel* iomodel,FILE* iomodel_handle){
    1414
    1515        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp

    r8303 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    CreateNodesThermal(Nodes** pnodes, IoModel* iomodel,ConstDataHandle iomodel_handle){
     15void    CreateNodesThermal(Nodes** pnodes, IoModel* iomodel,FILE* iomodel_handle){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp

    r4474 r8330  
    1313#include "../ModelProcessorx.h"
    1414
    15 void    UpdateElementsThermal(Elements* elements, IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type){
     15void    UpdateElementsThermal(Elements* elements, IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    1717        /*Intermediary*/
  • TabularUnified issm/trunk/src/c/modules/modules.h

    r8224 r8330  
    7171#include "./SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.h"
    7272#include "./ModelProcessorx/ModelProcessorx.h"
     73#include "./ParsePetscOptionsx/ParsePetscOptionsx.h"
    7374#include "./NodeConnectivityx/NodeConnectivityx.h"
    7475#include "./NodesDofx/NodesDofx.h"
  • TabularUnified issm/trunk/src/c/objects/IoModel.cpp

    r8319 r8330  
    121121/*}}}*/
    122122/*FUNCTION IoModel::IoModel(ConstDataHandle iomodel_handle){{{1*/
    123 IoModel::IoModel(ConstDataHandle iomodel_handle){
     123IoModel::IoModel(FILE* iomodel_handle){
    124124       
    125125        int i,j;
  • TabularUnified issm/trunk/src/c/objects/IoModel.h

    r8319 r8330  
    221221                ~IoModel();
    222222                IoModel();
    223                 IoModel(ConstDataHandle iomodel_handle);
     223                IoModel(FILE* iomodel_handle);
    224224                void IoModelInit(void);
    225225                void Echo(int which_part,int rank);
  • TabularUnified issm/trunk/src/c/solutions/issm.cpp

    r8279 r8330  
    1313        /*I/O: */
    1414        FILE     *output_fid       = NULL;
    15         char     *petscoptionsfilename = NULL;
     15        FILE     *petscoptionsfid = NULL;
    1616        char     *lockname         = NULL;
    1717        bool      qmu_analysis     = false;
     
    5252        if(argc<2)_error_("Usage error: no solution requested");
    5353        solution_type=StringToEnumx(argv[1]);
    54         petscoptionsfilename=argv[4];
    5554        lockname=argv[6];
    5655
     
    6968
    7069        /*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]);
    7273
    7374        /*get parameters: */
     
    111112        }
    112113
    113         /*Close output file and write lock file if requested*/
     114        /*Close output and petsc options file and write lock file if requested*/
    114115        pfclose(output_fid,argv[5]);
    115116        if (waitonlock>0){
  • TabularUnified issm/trunk/src/m/classes/model.m

    r8319 r8330  
    303303                 %PETSc and MATLAB solver string
    304304                 petscoptions=NaN;
    305                  petscoptions_analyses=[];
    306                  petscoptions_strings={};
    307305
    308306                 %Analysis
  • TabularUnified issm/trunk/src/m/classes/petscoptions.m

    r6017 r8330  
    4343                 end
    4444                 %}}}
    45                  function [analyses strings]=marshall(o)%{{{1
    46                          %marshall options into analyses and strings
    47                          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                          end
    53                  end
    54                  %}}}
    5545        end
    5646end
  • TabularUnified issm/trunk/src/m/model/presolve.m

    r8298 r8330  
    4545end
    4646
    47 %package together petscoptions for serial runs
    48 [md.petscoptions_analyses md.petscoptions_strings]=marshall(md.petscoptions);
    4947
    50 %write a template file for issm to use, in parallel
    51 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  
    4141end
    4242
     43%Marshall model data into a binary file.
     44marshall(md);
     45
     46%add qmu fields to binary file if running qmu analysis
     47if md.qmu_analysis,
     48        qmumarshall(md,md.variables(options.ivar),md.responses(options.iresp));
     49end
     50
     51%write a template file for issm to use, in parallel
     52PetscOptions2PetscFile(md.petscoptions,[md.name '.petsc']);
     53
    4354%If running in parallel, we have a different way of launching the solution
    4455%sequences.
  • TabularUnified issm/trunk/src/m/model/solveparallel.m

    r8109 r8330  
    1313        %directories, name jobs, etc ...
    1414        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 analysis
    20         if md.qmu_analysis,
    21                 qmumarshall(md,md.variables(options.ivar),md.responses(options.iresp));
    22         end
    2315
    2416        %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  
    1717   femmodel.analysis_type_list=analysis_types;
    1818
    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);
    2121   
    2222        %Initialize some fiels with empty celils
  • TabularUnified issm/trunk/src/m/solutions/issm.m

    r6323 r8330  
    1414        %create finite element model
    1515        femmodel=NewFemModel(md,solution_type,analyses,numanalyses);
     16       
     17        %process petsc options:
     18        femmodel.parameters=ParsePetscOptions(femmodel.parameters,[md.name '.petsc']);
    1619
    1720        %retrieve parameters
  • TabularUnified issm/trunk/src/mex/Makefile.am

    r8284 r8330  
    5252                                OutputRifts\
    5353                                OutputResults\
     54                                ParsePetscOptions\
    5455                                PenaltyConstraints\
    5556                                PointCloudFindNeighbors\
     
    334335                          UpdateVertexPositions/UpdateVertexPositions.h
    335336
     337ParsePetscOptions_SOURCES = ParsePetscOptions/ParsePetscOptions.cpp\
     338                          ParsePetscOptions/ParsePetscOptions.h
     339
     340
    336341VerticesDof_SOURCES = VerticesDof/VerticesDof.cpp\
    337342                          VerticesDof/VerticesDof.h
  • TabularUnified issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp

    r8306 r8330  
    1111
    1212        /*inputs: */
     13        char* inputfilename=NULL;
     14        FILE* IOMODEL;
    1315        int     solution_type;
    1416        double* double_analyses=NULL;
    1517        int*    analyses=NULL;
    1618        int     numanalyses;
    17 
     19       
    1820        /* output datasets: */
    1921        Elements* elements=NULL;
     
    2426        Materials* materials=NULL;
    2527        Parameters* parameters=NULL;
    26 
     28       
    2729        /*Boot module: */
    2830        MODULEBOOT();
     
    3032        /*checks on arguments on the matlab side: */
    3133        CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ModelProcessorUsage);
     34       
     35        /*open file input for reading: */
     36        FetchData(&inputfilename,INPUTFILE);
     37        IOMODEL= pfopen(inputfilename ,"rb");
    3238
     39        /*retrieve solution type and analyses: */
    3340        FetchData(&solution_type,SOLUTIONTYPE);
    34        
    3541        FetchData(&double_analyses,&numanalyses,ANALYSES);
    3642        analyses=(int*)xmalloc(numanalyses*sizeof(int));
    3743        for(i=0;i<numanalyses;i++)analyses[i]=(int)double_analyses[i];
    38 
     44       
    3945        /*call x code ModelProcessorx: */
    40         ModelProcessorx(&elements,&nodes,&vertices,&materials,&constraints, &loads, &parameters, MODEL,solution_type,numanalyses,analyses);
     46        ModelProcessorx(&elements,&nodes,&vertices,&materials,&constraints, &loads, &parameters, IOMODEL,solution_type,numanalyses,analyses);
    4147
    4248        /*Write output data: */
     
    5965        xfree((void**)&analyses);
    6066        xfree((void**)&double_analyses);
     67        xfree((void**)&inputfilename);
     68       
     69        /*Close input file: */
     70        pfclose(IOMODEL,inputfilename);
    6171       
    6272        /*end module: */
     
    6676void ModelProcessorUsage(void) {
    6777        _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");
    6979        _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");
    7081        _printf_(true,"\n");
    7182}
  • TabularUnified issm/trunk/src/mex/ModelProcessor/ModelProcessor.h

    r4236 r8330  
    2323
    2424/* serial input macros: */
    25 #define MODEL (mxArray*)prhs[0]
     25#define INPUTFILE (mxArray*)prhs[0]
    2626#define SOLUTIONTYPE (mxArray*)prhs[1]
    2727#define ANALYSES (mxArray*)prhs[2]
Note: See TracChangeset for help on using the changeset viewer.