Changeset 3715


Ignore:
Timestamp:
05/11/10 11:10:29 (15 years ago)
Author:
Eric.Larour
Message:

Serial compiles

Location:
issm/trunk/src
Files:
50 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r3703 r3715  
    214214        PenaltyOffsetEnum,
    215215        ConstantEnum,
     216        KflagEnum,
     217        PflagEnum,
    216218        /*}}}*/
    217219        /*Parameters{{{1*/
  • issm/trunk/src/c/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.h

    r3703 r3715  
    33 */
    44
    5 #ifndef _UPDATEINPUTSXX_H
    6 #define _UPDATEINPUTSXX_H
     5#ifndef _UPDATEINPUTSFROMSOLUTIONXX_H
     6#define _UPDATEINPUTSFROMSOLUTIONXX_H
    77
    88#include "../objects/objects.h"
     
    1212void            UpdateInputsFromSolutionx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,Vec solution, int analysis_type, int sub_analysis_type);
    1313
    14 #endif  /* _UPDATEINPUTSXX_H */
     14#endif  /* _UPDATEINPUTSFROMSOLUTIONXX_H */
    1515
  • issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h

    r3703 r3715  
    33 */
    44
    5 #ifndef _UPDATEINPUTSXX_H
    6 #define _UPDATEINPUTSXX_H
     5#ifndef _UPDATEINPUTSFROMVECTORXX_H
     6#define _UPDATEINPUTSFROMVECTORXX_H
    77
    88#include "../objects/objects.h"
     
    1212void    UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials,  Parameters* parameters,double* vector, int NameEnum,int TypeEnum);
    1313
    14 #endif  /* _UPDATEINPUTSXX_H */
     14#endif  /* _UPDATEINPUTSFROMVECTORXX_H */
    1515
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r3707 r3715  
    128128        if (iomodel->dhdt) {
    129129                for(i=0;i<6;i++)nodeinputs[i]=iomodel->dhdt[penta_node_ids[i]-1];
    130                 this->inputs->AddInput(new PentaVertexInput(DhdtEnum,nodeinputs));
     130                this->inputs->AddInput(new PentaVertexInput(DhDtEnum,nodeinputs));
    131131        }
    132132
  • issm/trunk/src/c/objects/Elements/Penta.h

    r3703 r3715  
    141141                void  UpdateInputsFromSolutionBalancedvelocities( double* solution,int analysis_type,int sub_analysis_type);
    142142                void  UpdateInputsFromVector(double* vector, int name, int type);
    143                 void AddInput(double value, int enum_type){ISSMERROR("not supporte yet!");}
     143                void  AddInput(double value, int enum_type){ISSMERROR("not supported yet!");}
    144144
    145145                /*}}}*/
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r3707 r3715  
    117117                if (iomodel->drag_q) this->inputs->AddInput(new DoubleInput(DragQEnum,iomodel->drag_q[index]));
    118118                this->inputs->AddInput(new IntInput(DragTypeEnum,iomodel->drag_type));
    119 s
    120119        }
    121120        if (iomodel->melting_rate) {
  • issm/trunk/src/c/objects/Params/BoolParam.cpp

    r3713 r3715  
    132132}
    133133/*}}}*/
     134/*FUNCTION BoolParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     135void  BoolParam::Process(double* partition,int numberofvertices){
     136}
     137/*}}}*/
    134138/*FUNCTION BoolParam::SetMatlabField(mxArray* dataref);{{{1*/
     139#ifdef _SERIAL_
    135140void  BoolParam::SetMatlabField(mxArray* dataref){
    136141        char* name=NULL;
     
    139144        xfree((void**)&name);
    140145}
     146#endif
    141147/*}}}*/
    142 /*FUNCTION BoolParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    143 void  BoolParam::Process(double* partition,int numberofvertices){
    144 }
    145 /*}}}*/
  • issm/trunk/src/c/objects/Params/BoolParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Mat* pmat){ISSMERROR("Bool param cannot return a Mat");}
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
    5973                /*}}}*/
    6074};
  • issm/trunk/src/c/objects/Params/DoubleMatParam.cpp

    r3713 r3715  
    169169}
    170170/*}}}*/
     171/*FUNCTION DoubleMatParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     172void  DoubleMatParam::Process(double* partition,int numberofvertices){
     173}
     174/*}}}*/
    171175/*FUNCTION DoubleMatParam::SetMatlabField(mxArray* dataref);{{{1*/
     176#ifdef _SERIAL_
    172177void  DoubleMatParam::SetMatlabField(mxArray* dataref){
    173178
     
    194199        xfree((void**)&doublemat);
    195200}
    196 /*}}}*/
    197 /*FUNCTION DoubleMatParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    198 void  DoubleMatParam::Process(double* partition,int numberofvertices){
    199 }
    200 /*}}}*/
     201#endif
     202/*}}}*/
  • issm/trunk/src/c/objects/Params/DoubleMatParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5769                void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleMat param cannot return a Mat");}
    5870                char* GetParameterName(void);
     71                void  Process(double* partition,int numberofvertices);
     72                #ifdef _SERIAL_
    5973                void  SetMatlabField(mxArray* dataref);
    60                 void  Process(double* partition,int numberofvertices);
     74                #endif
     75
    6176                /*}}}*/
    6277};
  • issm/trunk/src/c/objects/Params/DoubleParam.cpp

    r3713 r3715  
    129129}
    130130/*}}}*/
     131/*FUNCTION DoubleParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     132void  DoubleParam::Process(double* partition,int numberofvertices){
     133}
     134/*}}}*/
    131135/*FUNCTION DoubleParam::SetMatlabField(mxArray* dataref);{{{1*/
     136#ifdef _SERIAL_
    132137void  DoubleParam::SetMatlabField(mxArray* dataref){
    133138
     
    137142        xfree((void**)&name);
    138143}
     144#endif
    139145/*}}}*/
    140 /*FUNCTION DoubleParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    141 void  DoubleParam::Process(double* partition,int numberofvertices){
    142 }
    143 /*}}}*/
  • issm/trunk/src/c/objects/Params/DoubleParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Mat* pmat){ISSMERROR("Double param cannot return a Mat");}
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
     73
    5974                /*}}}*/
    6075};
  • issm/trunk/src/c/objects/Params/DoubleVecParam.cpp

    r3713 r3715  
    162162}
    163163/*}}}*/
     164/*FUNCTION DoubleVecParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     165void  DoubleVecParam::Process(double* partition,int numberofvertices) {
     166
     167        int i;
     168        double* newvalue=NULL;
     169
     170        /*This param holds a vector of size numberofvertices, which means we are being asked to
     171         * repartition it: */
     172       
     173        if(this->M==numberofvertices){
     174
     175                newvalue=(double*)xmalloc(this->M*sizeof(double));
     176                               
     177                for(i=0;i<this->M;i++){
     178                        newvalue[(int)(partition[i])]=this->value[i];
     179                }
     180
     181                /*Reassign value to new value: */
     182                xfree((void**)&this->value);
     183                this->value=newvalue;
     184        }
     185
     186}
     187/*}}}*/
    164188/*FUNCTION DoubleVecParam::SetMatlabField(mxArray* dataref);{{{1*/
     189#ifdef _SERIAL_
    165190void  DoubleVecParam::SetMatlabField(mxArray* dataref){
    166191
     
    184209        xfree((void**)&doublevec);
    185210}
    186 /*}}}*/
    187 /*FUNCTION DoubleVecParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    188 void  DoubleVecParam::Process(double* partition,int numberofvertices) {
    189 
    190         int i;
    191         double* newvalue=NULL;
    192 
    193         /*This param holds a vector of size numberofvertices, which means we are being asked to
    194          * repartition it: */
    195        
    196         if(this->M==numberofvertices){
    197 
    198                 newvalue=(double*)xmalloc(this->M*sizeof(double));
    199                                
    200                 for(i=0;i<this->M;i++){
    201                         newvalue[(int)(partition[i])]=this->value[i];
    202                 }
    203 
    204                 /*Reassign value to new value: */
    205                 xfree((void**)&this->value);
    206                 this->value=newvalue;
    207         }
    208 
    209 }
    210 /*}}}*/
     211#endif
     212/*}}}*/
  • issm/trunk/src/c/objects/Params/DoubleVecParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleVec param cannot return a Mat");}
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
     73
    5974                /*}}}*/
    6075};
  • issm/trunk/src/c/objects/Params/IntParam.cpp

    r3713 r3715  
    132132}
    133133/*}}}*/
     134/*FUNCTION IntParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     135void  IntParam::Process(double* partition,int numberofvertices){
     136}
     137/*}}}*/
    134138/*FUNCTION IntParam::SetMatlabField(mxArray* dataref);{{{1*/
     139#ifdef _SERIAL_
    135140void  IntParam::SetMatlabField(mxArray* dataref){
    136141       
     
    141146
    142147}
     148#endif
    143149/*}}}*/
    144 /*FUNCTION IntParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    145 void  IntParam::Process(double* partition,int numberofvertices){
    146 }
    147 /*}}}*/
  • issm/trunk/src/c/objects/Params/IntParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Mat* pmat){ISSMERROR("Int param cannot return a Mat");}
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
     73
    5974                /*}}}*/
    6075};
  • issm/trunk/src/c/objects/Params/Param.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
    1122#include "../Object.h"
    1223#include "../Node.h"
     
    3142                virtual void  GetParameterValue(Mat* pmat)=0;
    3243                virtual char* GetParameterName(void)=0;
     44                virtual void  Process(double* partition,int numberofvertices)=0;
     45                #ifdef _SERIAL_
    3346                virtual void  SetMatlabField(mxArray* dataref)=0;
    34                 virtual void  Process(double* partition,int numberofvertices)=0;
     47                #endif
    3548
    3649                /*}}}*/
  • issm/trunk/src/c/objects/Params/PetscMatParam.cpp

    r3713 r3715  
    200200}
    201201/*}}}*/
     202/*FUNCTION PetscMatParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     203void  PetscMatParam::Process(double* partition,int numberofvertices){
     204}
     205/*}}}*/
    202206/*FUNCTION PetscMatParam::SetMatlabField(mxArray* dataref);{{{1*/
     207#ifdef _SERIAL_
    203208void  PetscMatParam::SetMatlabField(mxArray* dataref){
    204209       
     
    222227        xfree((void**)&doublemat);
    223228}
    224 /*}}}*/
    225 /*FUNCTION PetscMatParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    226 void  PetscMatParam::Process(double* partition,int numberofvertices){
    227 }
    228 /*}}}*/
     229#endif
     230/*}}}*/
  • issm/trunk/src/c/objects/Params/PetscMatParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Mat* poutput);
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
     73
    5974                /*}}}*/
    6075};
  • issm/trunk/src/c/objects/Params/PetscVecParam.cpp

    r3713 r3715  
    193193}
    194194/*}}}*/
     195/*FUNCTION PetscVecParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     196void  PetscVecParam::Process(double* partition,int numberofvertices){
     197}
     198/*}}}*/
    195199/*FUNCTION PetscVecParam::SetMatlabField(mxArray* dataref);{{{1*/
     200#ifdef _SERIAL_
    196201void  PetscVecParam::SetMatlabField(mxArray* dataref){
    197202
     
    216221        xfree((void**)&doublevec);
    217222}
    218 /*}}}*/
    219 /*FUNCTION PetscVecParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    220 void  PetscVecParam::Process(double* partition,int numberofvertices){
    221 }
    222 /*}}}*/
     223#endif
     224/*}}}*/
  • issm/trunk/src/c/objects/Params/PetscVecParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Vec* poutput);
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
     73
    5974                /*}}}*/
    6075};
  • issm/trunk/src/c/objects/Params/StringArrayParam.cpp

    r3713 r3715  
    225225}
    226226/*}}}*/
     227/*FUNCTION StringArrayParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     228void  StringArrayParam::Process(double* partition,int numberofvertices){
     229}
     230/*}}}*/
    227231/*FUNCTION StringArrayParam::SetMatlabField(mxArray* dataref);{{{1*/
     232#ifdef _SERIAL_
    228233void  StringArrayParam::SetMatlabField(mxArray* dataref){
    229234       
     
    248253
    249254}
    250 /*}}}*/
    251 /*FUNCTION StringArrayParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    252 void  StringArrayParam::Process(double* partition,int numberofvertices){
    253 }
    254 /*}}}*/
     255#endif
     256/*}}}*/
  • issm/trunk/src/c/objects/Params/StringArrayParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5769                void  GetParameterValue(Mat* pmat){ISSMERROR("StringArray param cannot return a Mat");}
    5870                char* GetParameterName(void);
     71                void  Process(double* partition,int numberofvertices);
     72                #ifdef _SERIAL_
    5973                void  SetMatlabField(mxArray* dataref);
    60                 void  Process(double* partition,int numberofvertices);
     74                #endif
     75
    6176                /*}}}*/
    6277};
  • issm/trunk/src/c/objects/Params/StringParam.cpp

    r3713 r3715  
    163163}
    164164/*}}}*/
     165/*FUNCTION StringParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
     166void  StringParam::Process(double* partition,int numberofvertices){
     167}
     168/*}}}*/
    165169/*FUNCTION StringParam::SetMatlabField(mxArray* dataref);{{{1*/
     170#ifdef _SERIAL_
    166171void  StringParam::SetMatlabField(mxArray* dataref){
    167172       
     
    175180
    176181}
     182#endif
    177183/*}}}*/
    178 /*FUNCTION StringParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    179 void  StringParam::Process(double* partition,int numberofvertices){
    180 }
    181 /*}}}*/
  • issm/trunk/src/c/objects/Params/StringParam.h

    r3713 r3715  
    99/*Headers:*/
    1010/*{{{1*/
     11
     12#ifdef HAVE_CONFIG_H
     13        #include "config.h"
     14#else
     15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     16#endif
     17
     18#ifdef _SERIAL_
     19#include <mex.h>
     20#endif
     21
     22
    1123#include "./Param.h"
    1224#include "../../include/types.h"
     
    5567                void  GetParameterValue(Mat* pmat){ISSMERROR("String param cannot return a Mat");}
    5668                char* GetParameterName(void);
     69                void  Process(double* partition,int numberofvertices);
     70                #ifdef _SERIAL_
    5771                void  SetMatlabField(mxArray* dataref);
    58                 void  Process(double* partition,int numberofvertices);
     72                #endif
     73
    5974                /*}}}*/
    6075};
  • issm/trunk/src/m/solutions/jpl/diagnostic.m

    r3203 r3715  
    4141                if md.control_analysis,
    4242                        %launch core of control solution.
    43                         results=control_core(models,inputs);
     43                        results=control_core(models);
    4444
    4545                        %process results
     
    4848                else,
    4949                        %launch core of diagnostic solution.
    50                         results=diagnostic_core(models,inputs);
     50                        results=diagnostic_core(models);
    5151
    5252                        %process results
     
    5656        else
    5757                %launch dakota driver for diagnostic core solution
    58                 Qmu(models,inputs,models.dh.parameters);
     58                Qmu(models,models.dh.parameters);
    5959        end
    6060
  • issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp

    r3712 r3715  
    3232        FetchData(&vertices,VERTICES);
    3333        FetchData(&materials,MATERIALS);
    34         FetchParams(&parameters,PARAMETERS);
     34        FetchData((DataSet**)&parameters,PARAMETERS);
    3535
    3636        /*!Configure objects:*/
  • issm/trunk/src/mex/ControlConstrain/ControlConstrain.h

    r3712 r3715  
    1313#include "../../c/DataSet/DataSet.h"
    1414#include "../../c/shared/shared.h"
     15#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1516
    1617#undef __FUNCT__
  • issm/trunk/src/mex/CostFunction/CostFunction.cpp

    r3712 r3715  
    1717        DataSet* materials=NULL;
    1818        Parameters* parameters=NULL;
    19         ParameterInputs* inputs=NULL;
    2019        int               analysis_type;
    2120        int               sub_analysis_type;
     
    4039        FetchData(&sub_analysis_type,SUBANALYSIS);
    4140
    42         /*Fetch inputs: */
    43         inputs=new ParameterInputs;
    44         inputs->Init(INPUTS);
    45 
    4641        /*!Call core code: */
    47         CostFunctionx(&J, elements,nodes,vertices, loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
     42        CostFunctionx(&J, elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type);
    4843
    4944        /*write output : */
     
    5752        delete materials;
    5853        delete parameters;
    59         delete inputs;
    6054
    6155        /*end module: */
     
    6660{
    6761        _printf_("\n");
    68         _printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters, inputs);\n",__FUNCT__);
     62        _printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters);\n",__FUNCT__);
    6963        _printf_("\n");
    7064}
  • issm/trunk/src/mex/Dof/Dof.cpp

    r3417 r3715  
    1414        DataSet* vertices=NULL;
    1515        DataSet* elements=NULL;
    16         DataSet* params=NULL;
     16        Parameters* params=NULL;
    1717
    1818        /* output datasets: */
     
    3030        FetchData(&nodes,NODESIN);
    3131        FetchData(&vertices,VERTICESIN);
    32         FetchData(&params,PARAMS);
     32        FetchData((DataSet**)&params,PARAMS);
    3333
    3434        /*!Generate internal degree of freedom numbers: */
  • issm/trunk/src/mex/Du/Du.cpp

    r3712 r3715  
    1717        DataSet* materials=NULL;
    1818        Parameters* parameters=NULL;
    19         ParameterInputs* inputs=NULL;
    2019        int               analysis_type;
    2120        int               sub_analysis_type;
     
    4039        FetchData(&sub_analysis_type,SUBANALYSIS);
    4140
    42         /*Fetch inputs: */
    43         inputs=new ParameterInputs;
    44         inputs->Init(INPUTS);
    45 
    4641        /*!Call core code: */
    47         Dux(&du_g, elements,nodes,vertices, loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
     42        Dux(&du_g, elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type);
    4843
    4944        /*write output : */
     
    5752        delete materials;
    5853        VecFree(&du_g);
    59         delete inputs;
    6054
    6155        /*end module: */
     
    6660{
    6761        _printf_("\n");
    68         _printf_("   usage: [du_g] = %s(lements,nodes,vertices,loads,materials, parameters,inputs);\n",__FUNCT__);
     62        _printf_("   usage: [du_g] = %s(lements,nodes,vertices,loads,materials, parameters);\n",__FUNCT__);
    6963        _printf_("\n");
    7064}
  • issm/trunk/src/mex/Gradj/Gradj.cpp

    r3712 r3715  
    1818        Parameters* parameters=NULL;
    1919        char*    control_type=NULL;
    20         ParameterInputs* inputs=NULL;
    2120        int      analysis_type;
    2221        int      sub_analysis_type;
     
    4039        FetchData(&materials,MATERIALS);
    4140        FetchParams(&parameters,PARAMETERS);
    42         parameters->FindParam(&numberofnodes,"numberofnodes");
    43         parameters->FindParam(&control_type,"control_type");
     41        parameters->FindParam(&numberofnodes,NumberOfNodesEnum);
     42        parameters->FindParam(&control_type,ControlTypeEnum);
    4443        FetchData(&analysis_type,ANALYSIS);
    4544        FetchData(&sub_analysis_type,SUBANALYSIS);
    4645
    47         /*Fetch inputs: */
    48         inputs=new ParameterInputs;
    49         inputs->Init(INPUTS);
    50 
    5146        /*!Call core code: */
    52         Gradjx(&grad_g,numberofnodes,elements,nodes,vertices,loads,materials,parameters,inputs,analysis_type,sub_analysis_type,control_type);
     47        Gradjx(&grad_g,numberofnodes,elements,nodes,vertices,loads,materials,parameters,analysis_type,sub_analysis_type,control_type);
    5348
    5449        /*write output : */
     
    6358        delete parameters;
    6459        xfree((void**)&control_type);
    65         delete inputs;
    6660        VecFree(&grad_g);
    6761
     
    7367{
    7468        _printf_("\n");
    75         _printf_("   usage: [grad_g] = %s(elements,nodes,vertices,loads, materials, parameters,inputs);\n",__FUNCT__);
     69        _printf_("   usage: [grad_g] = %s(elements,nodes,vertices,loads, materials, parameters);\n",__FUNCT__);
    7670        _printf_("\n");
    7771}
  • issm/trunk/src/mex/Gradj/Gradj.h

    r3712 r3715  
    1414#include "../../c/DataSet/DataSet.h"
    1515#include "../../c/shared/shared.h"
     16#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1617
    1718#undef __FUNCT__
  • issm/trunk/src/mex/MassFlux/MassFlux.cpp

    r3712 r3715  
    3838        FetchData(&materials,MATERIALS);
    3939        FetchParams(&parameters,PARAMETERS);
    40         parameters->FindParam(&segments,&num_segments,NULL,"qmu_mass_flux_segments");
     40        parameters->FindParam(&segments,&num_segments,NULL,QmuMassFluxSegmentsEnum);
    4141
    4242        /*results: */
     
    6565{
    6666        _printf_("\n");
    67         _printf_("   usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,inputs,analysis_type);\n",__FUNCT__);
     67        _printf_("   usage: [Kgg,pg] = %s(eleemnts,nodes,loads,materials,params,analysis_type);\n",__FUNCT__);
    6868        _printf_("\n");
    6969}
  • issm/trunk/src/mex/MassFlux/MassFlux.h

    r3712 r3715  
    1414#include "../../c/DataSet/DataSet.h"
    1515#include "../../c/shared/shared.h"
     16#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1617
    1718#undef __FUNCT__
  • issm/trunk/src/mex/Misfit/Misfit.cpp

    r3712 r3715  
    1717        DataSet* materials=NULL;
    1818        Parameters* parameters=NULL;
    19         ParameterInputs* inputs=NULL;
    2019        int               analysis_type;
    2120        int               sub_analysis_type;
     
    4039        FetchData(&sub_analysis_type,SUBANALYSIS);
    4140
    42         /*Fetch inputs: */
    43         inputs=new ParameterInputs;
    44         inputs->Init(INPUTS);
    45 
    4641        /*!Call core code: */
    47         Misfitx(&J, elements,nodes,vertices,loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
     42        Misfitx(&J, elements,nodes,vertices,loads,materials,parameters,analysis_type,sub_analysis_type);
    4843
    4944        /*write output : */
     
    5752        delete materials;
    5853        delete parameters;
    59         delete inputs;
    6054
    6155        /*end module: */
     
    6660{
    6761        _printf_("\n");
    68         _printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters, inputs);\n",__FUNCT__);
     62        _printf_("   usage: [J] = %s(elements,nodes,vertices,loads, materials, parameters);\n",__FUNCT__);
    6963        _printf_("\n");
    7064}
  • issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp

    r3712 r3715  
    3030
    3131        /*Fill iomodel with matlab workspace data: */
    32         IoModelInit(&iomodel,MODEL); //this routine goes through the entire MODEL matlab class, and starts filling the corresponding "c" code model object.
     32        iomodel=new IoModel(MODEL); //this routine goes through the entire MODEL matlab class, and starts filling the corresponding "c" code model object.
    3333
    3434        /*Create elements, nodes and materials: */
     
    4646
    4747        /*Free ressources: */
    48         DeleteIoModel(&iomodel);
     48        delete iomodel;
    4949        delete elements;
    5050        delete nodes;
  • issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp

    r3712 r3715  
    1717        DataSet* materials=NULL;
    1818        Parameters* parameters=NULL;
    19         ParameterInputs* inputs=NULL;
    2019        int               analysis_type;
    2120        int               sub_analysis_type;
     
    4342        FetchData(&sub_analysis_type,SUBANALYSIS);
    4443
    45         /*Fetch inputs: */
    46         inputs=new ParameterInputs;
    47         inputs->Init(INPUTS);
    48 
    4944        /*!Generate internal degree of freedom numbers: */
    50         PenaltyConstraintsx(&converged, &num_unstable_constraints, elements,nodes,vertices, loads,materials,parameters,inputs,analysis_type,sub_analysis_type);
     45        PenaltyConstraintsx(&converged, &num_unstable_constraints, elements,nodes,vertices, loads,materials,parameters,analysis_type,sub_analysis_type);
    5146
    5247        elements->Echo();
     
    6661        delete materials;
    6762        delete parameters;
    68         delete inputs;
    6963
    7064        /*end module: */
     
    7569{
    7670        _printf_("\n");
    77         _printf_("   usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params,inputs,analysis_type,sub_analysis_type);\n",__FUNCT__);
     71        _printf_("   usage: [loads, constraints_converged, num_unstable_constraints] = %s(elements,nodes,vertices,loads,materials,params,analysis_type,sub_analysis_type);\n",__FUNCT__);
    7872        _printf_("\n");
    7973}
  • issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp

    r3712 r3715  
    2323        Parameters* parameters=NULL;
    2424        int         kflag,pflag;
    25         ParameterInputs* inputs=NULL;
    2625        int               analysis_type;
    2726        int               sub_analysis_type;
     
    4443       
    4544        /*parameters: */
    46         parameters->FindParam(&kflag,"kflag");
    47         parameters->FindParam(&pflag,"pflag");
     45        parameters->FindParam(&kflag,KflagEnum);
     46        parameters->FindParam(&pflag,PflagEnum);
    4847        FetchData(&analysis_type,ANALYSIS);
    4948        FetchData(&sub_analysis_type,SUBANALYSIS);
    5049
    51         /*Fetch inputs: */
    52         inputs=new ParameterInputs;
    53         inputs->Init(INPUTS);
    54 
    5550        /*!Generate stiffnesses from penalties: */
    56         PenaltySystemMatricesx(Kgg, pg,&kmax,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,inputs,analysis_type,sub_analysis_type);
     51        PenaltySystemMatricesx(Kgg, pg,&kmax,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,analysis_type,sub_analysis_type);
    5752
    5853        /*write output datasets: */
     
    6863        delete materials;
    6964        delete parameters;
    70         delete inputs;
    7165        MatFree(&Kgg);
    7266        VecFree(&pg);
     
    7973{
    8074        _printf_("\n");
    81         _printf_("   usage: [Kgg,pg] = %s(Kggin,pgin,elements,nodes,vertices,loads,materials,params,inputs,analysis_type,sub_analysis_type);\n",__FUNCT__);
     75        _printf_("   usage: [Kgg,pg] = %s(Kggin,pgin,elements,nodes,vertices,loads,materials,params,analysis_type,sub_analysis_type);\n",__FUNCT__);
    8276        _printf_("\n");
    8377}
  • issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h

    r3712 r3715  
    1414#include "../../c/DataSet/DataSet.h"
    1515#include "../../c/shared/shared.h"
     16#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1617
    1718#undef __FUNCT__
  • issm/trunk/src/mex/ProcessParams/ProcessParams.cpp

    r3712 r3715  
    2121
    2222        /*Input datasets: */
    23         FetchData(&parameters,PARAMETERSIN);
     23        FetchData((DataSet**)&parameters,PARAMETERSIN);
    2424        FetchData(&partition,PARTITION);
    2525
  • issm/trunk/src/mex/Qmu/Qmu.cpp

    r3332 r3715  
    1818        /*input datasets: */
    1919        mxArray* models=NULL;
    20         mxArray* inputs=NULL;
    2120        int      analysis_type;
    2221        int      sub_analysis_type;
     
    3938        /*Input datasets: */
    4039        models=MODELS;
    41         inputs=INPUTS;
    4240       
    4341        FetchData(&analysis_type,mxGetField(PARAMETERS,0,"analysis_type"));
     
    4846
    4947        /*!Generate internal degree of freedom numbers: */
    50         Qmux(models,inputs,analysis_type,sub_analysis_type,dakota_input_file,dakota_output_file,dakota_error_file);
     48        Qmux(models,analysis_type,sub_analysis_type,dakota_input_file,dakota_output_file,dakota_error_file);
    5149
    5250
     
    6361void QmuUsage(void){
    6462        _printf_("\n");
    65         _printf_("   usage: %s(models,inputs,analysis_type,sub_analysis_type,dakota_input_file,dakota_outputa_file,dakota_error_file);\n",__FUNCT__);
     63        _printf_("   usage: %s(models,parameters);\n",__FUNCT__);
    6664        _printf_("\n");
    6765}
  • issm/trunk/src/mex/Qmu/Qmu.h

    r3712 r3715  
    2020/* serial input macros: */
    2121#define MODELS (mxArray*)prhs[0]
    22 #define INPUTS (mxArray*)prhs[1]
    23 #define PARAMETERS (mxArray*)prhs[2]
     22#define PARAMETERS (mxArray*)prhs[1]
    2423
    2524/* serial output macros: */
     
    2928#define NLHS  0
    3029#undef NRHS
    31 #define NRHS  3
     30#define NRHS  2
    3231
    3332
  • issm/trunk/src/mex/Solver/Solver.cpp

    r3712 r3715  
    3131        FetchData(&uf0,UF0);
    3232        FetchParams(&parameters,PARAMETERS);
    33         parameters->FindParam(&solver_string,"solverstring");
     33        parameters->FindParam(&solver_string,SolverStringEnum);
    3434
    3535        /*!Reduce vector: */
  • issm/trunk/src/mex/Solver/Solver.h

    r3712 r3715  
    1414#include "../../c/DataSet/DataSet.h"
    1515#include "../../c/shared/shared.h"
     16#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1617
    1718#undef __FUNCT__
  • issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp

    r3712 r3715  
    2020        int         connectivity;
    2121        int         numberofdofspernode;
    22         ParameterInputs* inputs=NULL;
    2322        int               analysis_type;
    2423        int               sub_analysis_type;
     
    4342
    4443        /*parameters: */
    45         parameters->FindParam(&kflag,"kflag");
    46         parameters->FindParam(&pflag,"pflag");
    47         parameters->FindParam(&connectivity,"connectivity");
    48         parameters->FindParam(&numberofdofspernode,"numberofdofspernode");
     44        parameters->FindParam(&kflag,KflagEnum);
     45        parameters->FindParam(&pflag,PflagEnum);
     46        parameters->FindParam(&connectivity,ConnectivityEnum);
     47        parameters->FindParam(&numberofdofspernode,NumberOfDofsPerNodeEnum);
    4948
    5049        FetchData(&analysis_type,ANALYSIS);
    5150        FetchData(&sub_analysis_type,SUBANALYSIS);
    5251
    53         /*Fetch inputs: */
    54         inputs=new ParameterInputs;
    55         inputs->Init(INPUTS);
    56 
    5752        /*!Generate internal degree of freedom numbers: */
    58         SystemMatricesx(&Kgg, &pg,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,connectivity,numberofdofspernode,inputs,analysis_type,sub_analysis_type);
     53        SystemMatricesx(&Kgg, &pg,elements,nodes,vertices,loads,materials,parameters,kflag,pflag,connectivity,numberofdofspernode,analysis_type,sub_analysis_type);
    5954
    6055        /*write output datasets: */
     
    7065        delete materials;
    7166        delete parameters;
    72         delete inputs;
    7367        MatFree(&Kgg);
    7468        VecFree(&pg);
     
    8175{
    8276        _printf_("\n");
    83         _printf_("   usage: [Kgg,pg] = %s(elements,nodes,vertices,loads,materials,params,inputs,analysis_type);\n",__FUNCT__);
     77        _printf_("   usage: [Kgg,pg] = %s(elements,nodes,vertices,loads,materials,params,analysis_type);\n",__FUNCT__);
    8478        _printf_("\n");
    8579}
  • issm/trunk/src/mex/SystemMatrices/SystemMatrices.h

    r3712 r3715  
    1414#include "../../c/DataSet/DataSet.h"
    1515#include "../../c/shared/shared.h"
     16#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1617
    1718#undef __FUNCT__
  • issm/trunk/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h

    r3712 r3715  
    1313#include "../../c/DataSet/DataSet.h"
    1414#include "../../c/shared/shared.h"
     15#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1516
    1617void TriMeshProcessRiftsUsage(void);
  • issm/trunk/src/mex/UpdateInputsFromVector/UpdateInputsFromVector.cpp

    r3712 r3715  
    1818Parameters* parameters=NULL;
    1919double*  vector=NULL;
     20int      dummy;
    2021int      NameEnum;
    2122int      TypeEnum;
     
    3435FetchData(&materials,MATERIALSIN);
    3536FetchParams(&parameters,PARAMETERSIN);
    36 FetchData(&vector,VECTOR);
     37FetchData(&vector,&dummy,VECTOR);
    3738FetchData(&NameEnum,NAME);
    3839FetchData(&TypeEnum,TYPE);
  • issm/trunk/src/mex/UpdateInputsFromVector/UpdateInputsFromVector.h

    r3712 r3715  
    1414#include "../../c/DataSet/DataSet.h"
    1515#include "../../c/shared/shared.h"
     16#include "../../c/EnumDefinitions/EnumDefinitions.h"
    1617
    1718#undef __FUNCT__
Note: See TracChangeset for help on using the changeset viewer.