Changeset 3715
- Timestamp:
- 05/11/10 11:10:29 (15 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 50 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r3703 r3715 214 214 PenaltyOffsetEnum, 215 215 ConstantEnum, 216 KflagEnum, 217 PflagEnum, 216 218 /*}}}*/ 217 219 /*Parameters{{{1*/ -
issm/trunk/src/c/UpdateInputsFromSolutionx/UpdateInputsFromSolutionx.h
r3703 r3715 3 3 */ 4 4 5 #ifndef _UPDATEINPUTS XX_H6 #define _UPDATEINPUTS XX_H5 #ifndef _UPDATEINPUTSFROMSOLUTIONXX_H 6 #define _UPDATEINPUTSFROMSOLUTIONXX_H 7 7 8 8 #include "../objects/objects.h" … … 12 12 void UpdateInputsFromSolutionx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,Vec solution, int analysis_type, int sub_analysis_type); 13 13 14 #endif /* _UPDATEINPUTS XX_H */14 #endif /* _UPDATEINPUTSFROMSOLUTIONXX_H */ 15 15 -
issm/trunk/src/c/UpdateInputsFromVectorx/UpdateInputsFromVectorx.h
r3703 r3715 3 3 */ 4 4 5 #ifndef _UPDATEINPUTS XX_H6 #define _UPDATEINPUTS XX_H5 #ifndef _UPDATEINPUTSFROMVECTORXX_H 6 #define _UPDATEINPUTSFROMVECTORXX_H 7 7 8 8 #include "../objects/objects.h" … … 12 12 void UpdateInputsFromVectorx( DataSet* elements,DataSet* nodes, DataSet* vertices,DataSet* loads, DataSet* materials, Parameters* parameters,double* vector, int NameEnum,int TypeEnum); 13 13 14 #endif /* _UPDATEINPUTS XX_H */14 #endif /* _UPDATEINPUTSFROMVECTORXX_H */ 15 15 -
issm/trunk/src/c/objects/Elements/Penta.cpp
r3707 r3715 128 128 if (iomodel->dhdt) { 129 129 for(i=0;i<6;i++)nodeinputs[i]=iomodel->dhdt[penta_node_ids[i]-1]; 130 this->inputs->AddInput(new PentaVertexInput(Dh dtEnum,nodeinputs));130 this->inputs->AddInput(new PentaVertexInput(DhDtEnum,nodeinputs)); 131 131 } 132 132 -
issm/trunk/src/c/objects/Elements/Penta.h
r3703 r3715 141 141 void UpdateInputsFromSolutionBalancedvelocities( double* solution,int analysis_type,int sub_analysis_type); 142 142 void UpdateInputsFromVector(double* vector, int name, int type); 143 void AddInput(double value, int enum_type){ISSMERROR("not supporteyet!");}143 void AddInput(double value, int enum_type){ISSMERROR("not supported yet!");} 144 144 145 145 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.cpp
r3707 r3715 117 117 if (iomodel->drag_q) this->inputs->AddInput(new DoubleInput(DragQEnum,iomodel->drag_q[index])); 118 118 this->inputs->AddInput(new IntInput(DragTypeEnum,iomodel->drag_type)); 119 s120 119 } 121 120 if (iomodel->melting_rate) { -
issm/trunk/src/c/objects/Params/BoolParam.cpp
r3713 r3715 132 132 } 133 133 /*}}}*/ 134 /*FUNCTION BoolParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 135 void BoolParam::Process(double* partition,int numberofvertices){ 136 } 137 /*}}}*/ 134 138 /*FUNCTION BoolParam::SetMatlabField(mxArray* dataref);{{{1*/ 139 #ifdef _SERIAL_ 135 140 void BoolParam::SetMatlabField(mxArray* dataref){ 136 141 char* name=NULL; … … 139 144 xfree((void**)&name); 140 145 } 146 #endif 141 147 /*}}}*/ 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Mat* pmat){ISSMERROR("Bool param cannot return a Mat");} 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices);72 #endif 59 73 /*}}}*/ 60 74 }; -
issm/trunk/src/c/objects/Params/DoubleMatParam.cpp
r3713 r3715 169 169 } 170 170 /*}}}*/ 171 /*FUNCTION DoubleMatParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 172 void DoubleMatParam::Process(double* partition,int numberofvertices){ 173 } 174 /*}}}*/ 171 175 /*FUNCTION DoubleMatParam::SetMatlabField(mxArray* dataref);{{{1*/ 176 #ifdef _SERIAL_ 172 177 void DoubleMatParam::SetMatlabField(mxArray* dataref){ 173 178 … … 194 199 xfree((void**)&doublemat); 195 200 } 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 57 69 void GetParameterValue(Mat* pmat){ISSMERROR("DoubleMat param cannot return a Mat");} 58 70 char* GetParameterName(void); 71 void Process(double* partition,int numberofvertices); 72 #ifdef _SERIAL_ 59 73 void SetMatlabField(mxArray* dataref); 60 void Process(double* partition,int numberofvertices); 74 #endif 75 61 76 /*}}}*/ 62 77 }; -
issm/trunk/src/c/objects/Params/DoubleParam.cpp
r3713 r3715 129 129 } 130 130 /*}}}*/ 131 /*FUNCTION DoubleParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 132 void DoubleParam::Process(double* partition,int numberofvertices){ 133 } 134 /*}}}*/ 131 135 /*FUNCTION DoubleParam::SetMatlabField(mxArray* dataref);{{{1*/ 136 #ifdef _SERIAL_ 132 137 void DoubleParam::SetMatlabField(mxArray* dataref){ 133 138 … … 137 142 xfree((void**)&name); 138 143 } 144 #endif 139 145 /*}}}*/ 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Mat* pmat){ISSMERROR("Double param cannot return a Mat");} 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices); 72 #endif 73 59 74 /*}}}*/ 60 75 }; -
issm/trunk/src/c/objects/Params/DoubleVecParam.cpp
r3713 r3715 162 162 } 163 163 /*}}}*/ 164 /*FUNCTION DoubleVecParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 165 void 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 /*}}}*/ 164 188 /*FUNCTION DoubleVecParam::SetMatlabField(mxArray* dataref);{{{1*/ 189 #ifdef _SERIAL_ 165 190 void DoubleVecParam::SetMatlabField(mxArray* dataref){ 166 191 … … 184 209 xfree((void**)&doublevec); 185 210 } 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Mat* pmat){ISSMERROR("DoubleVec param cannot return a Mat");} 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices); 72 #endif 73 59 74 /*}}}*/ 60 75 }; -
issm/trunk/src/c/objects/Params/IntParam.cpp
r3713 r3715 132 132 } 133 133 /*}}}*/ 134 /*FUNCTION IntParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 135 void IntParam::Process(double* partition,int numberofvertices){ 136 } 137 /*}}}*/ 134 138 /*FUNCTION IntParam::SetMatlabField(mxArray* dataref);{{{1*/ 139 #ifdef _SERIAL_ 135 140 void IntParam::SetMatlabField(mxArray* dataref){ 136 141 … … 141 146 142 147 } 148 #endif 143 149 /*}}}*/ 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Mat* pmat){ISSMERROR("Int param cannot return a Mat");} 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices); 72 #endif 73 59 74 /*}}}*/ 60 75 }; -
issm/trunk/src/c/objects/Params/Param.h
r3713 r3715 9 9 /*Headers:*/ 10 10 /*{{{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 11 22 #include "../Object.h" 12 23 #include "../Node.h" … … 31 42 virtual void GetParameterValue(Mat* pmat)=0; 32 43 virtual char* GetParameterName(void)=0; 44 virtual void Process(double* partition,int numberofvertices)=0; 45 #ifdef _SERIAL_ 33 46 virtual void SetMatlabField(mxArray* dataref)=0; 34 virtual void Process(double* partition,int numberofvertices)=0;47 #endif 35 48 36 49 /*}}}*/ -
issm/trunk/src/c/objects/Params/PetscMatParam.cpp
r3713 r3715 200 200 } 201 201 /*}}}*/ 202 /*FUNCTION PetscMatParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 203 void PetscMatParam::Process(double* partition,int numberofvertices){ 204 } 205 /*}}}*/ 202 206 /*FUNCTION PetscMatParam::SetMatlabField(mxArray* dataref);{{{1*/ 207 #ifdef _SERIAL_ 203 208 void PetscMatParam::SetMatlabField(mxArray* dataref){ 204 209 … … 222 227 xfree((void**)&doublemat); 223 228 } 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Mat* poutput); 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices); 72 #endif 73 59 74 /*}}}*/ 60 75 }; -
issm/trunk/src/c/objects/Params/PetscVecParam.cpp
r3713 r3715 193 193 } 194 194 /*}}}*/ 195 /*FUNCTION PetscVecParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 196 void PetscVecParam::Process(double* partition,int numberofvertices){ 197 } 198 /*}}}*/ 195 199 /*FUNCTION PetscVecParam::SetMatlabField(mxArray* dataref);{{{1*/ 200 #ifdef _SERIAL_ 196 201 void PetscVecParam::SetMatlabField(mxArray* dataref){ 197 202 … … 216 221 xfree((void**)&doublevec); 217 222 } 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Vec* poutput); 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices); 72 #endif 73 59 74 /*}}}*/ 60 75 }; -
issm/trunk/src/c/objects/Params/StringArrayParam.cpp
r3713 r3715 225 225 } 226 226 /*}}}*/ 227 /*FUNCTION StringArrayParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 228 void StringArrayParam::Process(double* partition,int numberofvertices){ 229 } 230 /*}}}*/ 227 231 /*FUNCTION StringArrayParam::SetMatlabField(mxArray* dataref);{{{1*/ 232 #ifdef _SERIAL_ 228 233 void StringArrayParam::SetMatlabField(mxArray* dataref){ 229 234 … … 248 253 249 254 } 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 57 69 void GetParameterValue(Mat* pmat){ISSMERROR("StringArray param cannot return a Mat");} 58 70 char* GetParameterName(void); 71 void Process(double* partition,int numberofvertices); 72 #ifdef _SERIAL_ 59 73 void SetMatlabField(mxArray* dataref); 60 void Process(double* partition,int numberofvertices); 74 #endif 75 61 76 /*}}}*/ 62 77 }; -
issm/trunk/src/c/objects/Params/StringParam.cpp
r3713 r3715 163 163 } 164 164 /*}}}*/ 165 /*FUNCTION StringParam::ProcessParams(double* partition,int numberofvertices);{{{1*/ 166 void StringParam::Process(double* partition,int numberofvertices){ 167 } 168 /*}}}*/ 165 169 /*FUNCTION StringParam::SetMatlabField(mxArray* dataref);{{{1*/ 170 #ifdef _SERIAL_ 166 171 void StringParam::SetMatlabField(mxArray* dataref){ 167 172 … … 175 180 176 181 } 182 #endif 177 183 /*}}}*/ 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 9 9 /*Headers:*/ 10 10 /*{{{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 11 23 #include "./Param.h" 12 24 #include "../../include/types.h" … … 55 67 void GetParameterValue(Mat* pmat){ISSMERROR("String param cannot return a Mat");} 56 68 char* GetParameterName(void); 69 void Process(double* partition,int numberofvertices); 70 #ifdef _SERIAL_ 57 71 void SetMatlabField(mxArray* dataref); 58 void Process(double* partition,int numberofvertices); 72 #endif 73 59 74 /*}}}*/ 60 75 }; -
issm/trunk/src/m/solutions/jpl/diagnostic.m
r3203 r3715 41 41 if md.control_analysis, 42 42 %launch core of control solution. 43 results=control_core(models ,inputs);43 results=control_core(models); 44 44 45 45 %process results … … 48 48 else, 49 49 %launch core of diagnostic solution. 50 results=diagnostic_core(models ,inputs);50 results=diagnostic_core(models); 51 51 52 52 %process results … … 56 56 else 57 57 %launch dakota driver for diagnostic core solution 58 Qmu(models, inputs,models.dh.parameters);58 Qmu(models,models.dh.parameters); 59 59 end 60 60 -
issm/trunk/src/mex/ConfigureObjects/ConfigureObjects.cpp
r3712 r3715 32 32 FetchData(&vertices,VERTICES); 33 33 FetchData(&materials,MATERIALS); 34 Fetch Params(¶meters,PARAMETERS);34 FetchData((DataSet**)¶meters,PARAMETERS); 35 35 36 36 /*!Configure objects:*/ -
issm/trunk/src/mex/ControlConstrain/ControlConstrain.h
r3712 r3715 13 13 #include "../../c/DataSet/DataSet.h" 14 14 #include "../../c/shared/shared.h" 15 #include "../../c/EnumDefinitions/EnumDefinitions.h" 15 16 16 17 #undef __FUNCT__ -
issm/trunk/src/mex/CostFunction/CostFunction.cpp
r3712 r3715 17 17 DataSet* materials=NULL; 18 18 Parameters* parameters=NULL; 19 ParameterInputs* inputs=NULL;20 19 int analysis_type; 21 20 int sub_analysis_type; … … 40 39 FetchData(&sub_analysis_type,SUBANALYSIS); 41 40 42 /*Fetch inputs: */43 inputs=new ParameterInputs;44 inputs->Init(INPUTS);45 46 41 /*!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); 48 43 49 44 /*write output : */ … … 57 52 delete materials; 58 53 delete parameters; 59 delete inputs;60 54 61 55 /*end module: */ … … 66 60 { 67 61 _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__); 69 63 _printf_("\n"); 70 64 } -
issm/trunk/src/mex/Dof/Dof.cpp
r3417 r3715 14 14 DataSet* vertices=NULL; 15 15 DataSet* elements=NULL; 16 DataSet* params=NULL;16 Parameters* params=NULL; 17 17 18 18 /* output datasets: */ … … 30 30 FetchData(&nodes,NODESIN); 31 31 FetchData(&vertices,VERTICESIN); 32 FetchData( ¶ms,PARAMS);32 FetchData((DataSet**)¶ms,PARAMS); 33 33 34 34 /*!Generate internal degree of freedom numbers: */ -
issm/trunk/src/mex/Du/Du.cpp
r3712 r3715 17 17 DataSet* materials=NULL; 18 18 Parameters* parameters=NULL; 19 ParameterInputs* inputs=NULL;20 19 int analysis_type; 21 20 int sub_analysis_type; … … 40 39 FetchData(&sub_analysis_type,SUBANALYSIS); 41 40 42 /*Fetch inputs: */43 inputs=new ParameterInputs;44 inputs->Init(INPUTS);45 46 41 /*!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); 48 43 49 44 /*write output : */ … … 57 52 delete materials; 58 53 VecFree(&du_g); 59 delete inputs;60 54 61 55 /*end module: */ … … 66 60 { 67 61 _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__); 69 63 _printf_("\n"); 70 64 } -
issm/trunk/src/mex/Gradj/Gradj.cpp
r3712 r3715 18 18 Parameters* parameters=NULL; 19 19 char* control_type=NULL; 20 ParameterInputs* inputs=NULL;21 20 int analysis_type; 22 21 int sub_analysis_type; … … 40 39 FetchData(&materials,MATERIALS); 41 40 FetchParams(¶meters,PARAMETERS); 42 parameters->FindParam(&numberofnodes, "numberofnodes");43 parameters->FindParam(&control_type, "control_type");41 parameters->FindParam(&numberofnodes,NumberOfNodesEnum); 42 parameters->FindParam(&control_type,ControlTypeEnum); 44 43 FetchData(&analysis_type,ANALYSIS); 45 44 FetchData(&sub_analysis_type,SUBANALYSIS); 46 45 47 /*Fetch inputs: */48 inputs=new ParameterInputs;49 inputs->Init(INPUTS);50 51 46 /*!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); 53 48 54 49 /*write output : */ … … 63 58 delete parameters; 64 59 xfree((void**)&control_type); 65 delete inputs;66 60 VecFree(&grad_g); 67 61 … … 73 67 { 74 68 _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__); 76 70 _printf_("\n"); 77 71 } -
issm/trunk/src/mex/Gradj/Gradj.h
r3712 r3715 14 14 #include "../../c/DataSet/DataSet.h" 15 15 #include "../../c/shared/shared.h" 16 #include "../../c/EnumDefinitions/EnumDefinitions.h" 16 17 17 18 #undef __FUNCT__ -
issm/trunk/src/mex/MassFlux/MassFlux.cpp
r3712 r3715 38 38 FetchData(&materials,MATERIALS); 39 39 FetchParams(¶meters,PARAMETERS); 40 parameters->FindParam(&segments,&num_segments,NULL, "qmu_mass_flux_segments");40 parameters->FindParam(&segments,&num_segments,NULL,QmuMassFluxSegmentsEnum); 41 41 42 42 /*results: */ … … 65 65 { 66 66 _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__); 68 68 _printf_("\n"); 69 69 } -
issm/trunk/src/mex/MassFlux/MassFlux.h
r3712 r3715 14 14 #include "../../c/DataSet/DataSet.h" 15 15 #include "../../c/shared/shared.h" 16 #include "../../c/EnumDefinitions/EnumDefinitions.h" 16 17 17 18 #undef __FUNCT__ -
issm/trunk/src/mex/Misfit/Misfit.cpp
r3712 r3715 17 17 DataSet* materials=NULL; 18 18 Parameters* parameters=NULL; 19 ParameterInputs* inputs=NULL;20 19 int analysis_type; 21 20 int sub_analysis_type; … … 40 39 FetchData(&sub_analysis_type,SUBANALYSIS); 41 40 42 /*Fetch inputs: */43 inputs=new ParameterInputs;44 inputs->Init(INPUTS);45 46 41 /*!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); 48 43 49 44 /*write output : */ … … 57 52 delete materials; 58 53 delete parameters; 59 delete inputs;60 54 61 55 /*end module: */ … … 66 60 { 67 61 _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__); 69 63 _printf_("\n"); 70 64 } -
issm/trunk/src/mex/ModelProcessor/ModelProcessor.cpp
r3712 r3715 30 30 31 31 /*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. 33 33 34 34 /*Create elements, nodes and materials: */ … … 46 46 47 47 /*Free ressources: */ 48 DeleteIoModel(&iomodel);48 delete iomodel; 49 49 delete elements; 50 50 delete nodes; -
issm/trunk/src/mex/PenaltyConstraints/PenaltyConstraints.cpp
r3712 r3715 17 17 DataSet* materials=NULL; 18 18 Parameters* parameters=NULL; 19 ParameterInputs* inputs=NULL;20 19 int analysis_type; 21 20 int sub_analysis_type; … … 43 42 FetchData(&sub_analysis_type,SUBANALYSIS); 44 43 45 /*Fetch inputs: */46 inputs=new ParameterInputs;47 inputs->Init(INPUTS);48 49 44 /*!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); 51 46 52 47 elements->Echo(); … … 66 61 delete materials; 67 62 delete parameters; 68 delete inputs;69 63 70 64 /*end module: */ … … 75 69 { 76 70 _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__); 78 72 _printf_("\n"); 79 73 } -
issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.cpp
r3712 r3715 23 23 Parameters* parameters=NULL; 24 24 int kflag,pflag; 25 ParameterInputs* inputs=NULL;26 25 int analysis_type; 27 26 int sub_analysis_type; … … 44 43 45 44 /*parameters: */ 46 parameters->FindParam(&kflag, "kflag");47 parameters->FindParam(&pflag, "pflag");45 parameters->FindParam(&kflag,KflagEnum); 46 parameters->FindParam(&pflag,PflagEnum); 48 47 FetchData(&analysis_type,ANALYSIS); 49 48 FetchData(&sub_analysis_type,SUBANALYSIS); 50 49 51 /*Fetch inputs: */52 inputs=new ParameterInputs;53 inputs->Init(INPUTS);54 55 50 /*!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); 57 52 58 53 /*write output datasets: */ … … 68 63 delete materials; 69 64 delete parameters; 70 delete inputs;71 65 MatFree(&Kgg); 72 66 VecFree(&pg); … … 79 73 { 80 74 _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__); 82 76 _printf_("\n"); 83 77 } -
issm/trunk/src/mex/PenaltySystemMatrices/PenaltySystemMatrices.h
r3712 r3715 14 14 #include "../../c/DataSet/DataSet.h" 15 15 #include "../../c/shared/shared.h" 16 #include "../../c/EnumDefinitions/EnumDefinitions.h" 16 17 17 18 #undef __FUNCT__ -
issm/trunk/src/mex/ProcessParams/ProcessParams.cpp
r3712 r3715 21 21 22 22 /*Input datasets: */ 23 FetchData( ¶meters,PARAMETERSIN);23 FetchData((DataSet**)¶meters,PARAMETERSIN); 24 24 FetchData(&partition,PARTITION); 25 25 -
issm/trunk/src/mex/Qmu/Qmu.cpp
r3332 r3715 18 18 /*input datasets: */ 19 19 mxArray* models=NULL; 20 mxArray* inputs=NULL;21 20 int analysis_type; 22 21 int sub_analysis_type; … … 39 38 /*Input datasets: */ 40 39 models=MODELS; 41 inputs=INPUTS;42 40 43 41 FetchData(&analysis_type,mxGetField(PARAMETERS,0,"analysis_type")); … … 48 46 49 47 /*!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); 51 49 52 50 … … 63 61 void QmuUsage(void){ 64 62 _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__); 66 64 _printf_("\n"); 67 65 } -
issm/trunk/src/mex/Qmu/Qmu.h
r3712 r3715 20 20 /* serial input macros: */ 21 21 #define MODELS (mxArray*)prhs[0] 22 #define INPUTS (mxArray*)prhs[1] 23 #define PARAMETERS (mxArray*)prhs[2] 22 #define PARAMETERS (mxArray*)prhs[1] 24 23 25 24 /* serial output macros: */ … … 29 28 #define NLHS 0 30 29 #undef NRHS 31 #define NRHS 330 #define NRHS 2 32 31 33 32 -
issm/trunk/src/mex/Solver/Solver.cpp
r3712 r3715 31 31 FetchData(&uf0,UF0); 32 32 FetchParams(¶meters,PARAMETERS); 33 parameters->FindParam(&solver_string, "solverstring");33 parameters->FindParam(&solver_string,SolverStringEnum); 34 34 35 35 /*!Reduce vector: */ -
issm/trunk/src/mex/Solver/Solver.h
r3712 r3715 14 14 #include "../../c/DataSet/DataSet.h" 15 15 #include "../../c/shared/shared.h" 16 #include "../../c/EnumDefinitions/EnumDefinitions.h" 16 17 17 18 #undef __FUNCT__ -
issm/trunk/src/mex/SystemMatrices/SystemMatrices.cpp
r3712 r3715 20 20 int connectivity; 21 21 int numberofdofspernode; 22 ParameterInputs* inputs=NULL;23 22 int analysis_type; 24 23 int sub_analysis_type; … … 43 42 44 43 /*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); 49 48 50 49 FetchData(&analysis_type,ANALYSIS); 51 50 FetchData(&sub_analysis_type,SUBANALYSIS); 52 51 53 /*Fetch inputs: */54 inputs=new ParameterInputs;55 inputs->Init(INPUTS);56 57 52 /*!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); 59 54 60 55 /*write output datasets: */ … … 70 65 delete materials; 71 66 delete parameters; 72 delete inputs;73 67 MatFree(&Kgg); 74 68 VecFree(&pg); … … 81 75 { 82 76 _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__); 84 78 _printf_("\n"); 85 79 } -
issm/trunk/src/mex/SystemMatrices/SystemMatrices.h
r3712 r3715 14 14 #include "../../c/DataSet/DataSet.h" 15 15 #include "../../c/shared/shared.h" 16 #include "../../c/EnumDefinitions/EnumDefinitions.h" 16 17 17 18 #undef __FUNCT__ -
issm/trunk/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h
r3712 r3715 13 13 #include "../../c/DataSet/DataSet.h" 14 14 #include "../../c/shared/shared.h" 15 #include "../../c/EnumDefinitions/EnumDefinitions.h" 15 16 16 17 void TriMeshProcessRiftsUsage(void); -
issm/trunk/src/mex/UpdateInputsFromVector/UpdateInputsFromVector.cpp
r3712 r3715 18 18 Parameters* parameters=NULL; 19 19 double* vector=NULL; 20 int dummy; 20 21 int NameEnum; 21 22 int TypeEnum; … … 34 35 FetchData(&materials,MATERIALSIN); 35 36 FetchParams(¶meters,PARAMETERSIN); 36 FetchData(&vector, VECTOR);37 FetchData(&vector,&dummy,VECTOR); 37 38 FetchData(&NameEnum,NAME); 38 39 FetchData(&TypeEnum,TYPE); -
issm/trunk/src/mex/UpdateInputsFromVector/UpdateInputsFromVector.h
r3712 r3715 14 14 #include "../../c/DataSet/DataSet.h" 15 15 #include "../../c/shared/shared.h" 16 #include "../../c/EnumDefinitions/EnumDefinitions.h" 16 17 17 18 #undef __FUNCT__
Note:
See TracChangeset
for help on using the changeset viewer.