Changeset 8376
- Timestamp:
- 05/20/11 13:22:48 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/Parameters.cpp
r8263 r8376 57 57 /*}}}*/ 58 58 /*FUNCTION Parameters::FindParam(bool* pbool,int enum_type){{{1*/ 59 void Parameters::FindParam(bool* pbool,int enum_type){ 59 void Parameters::FindParam(bool* pbool,int enum_type){ _assert_(this); 60 60 61 61 vector<Object*>::iterator object; … … 74 74 /*}}}*/ 75 75 /*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{1*/ 76 void Parameters::FindParam(int* pinteger,int enum_type){ 76 void Parameters::FindParam(int* pinteger,int enum_type){ _assert_(this); 77 77 78 78 vector<Object*>::iterator object; … … 91 91 /*}}}*/ 92 92 /*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{1*/ 93 void Parameters::FindParam(double* pscalar, int enum_type){ 93 void Parameters::FindParam(double* pscalar, int enum_type){ _assert_(this); 94 94 95 95 vector<Object*>::iterator object; … … 108 108 /*}}}*/ 109 109 /*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{1*/ 110 void Parameters::FindParam(char** pstring,int enum_type){ 110 void Parameters::FindParam(char** pstring,int enum_type){ _assert_(this); 111 111 112 112 vector<Object*>::iterator object; … … 126 126 /*}}}*/ 127 127 /*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{1*/ 128 void Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){ 128 void Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){ _assert_(this); 129 129 130 130 vector<Object*>::iterator object; … … 144 144 /*}}}*/ 145 145 /*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int enum_type){{{1*/ 146 void Parameters::FindParam(int** pintarray,int* pM, int enum_type){ 146 void Parameters::FindParam(int** pintarray,int* pM, int enum_type){ _assert_(this); 147 147 148 148 vector<Object*>::iterator object; … … 162 162 /*}}}*/ 163 163 /*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{1*/ 164 void Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){ 164 void Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){ _assert_(this); 165 165 166 166 vector<Object*>::iterator object; … … 180 180 /*}}}*/ 181 181 /*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{1*/ 182 void Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){ 182 void Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){ _assert_(this); 183 183 184 184 vector<Object*>::iterator object; … … 198 198 /*}}}*/ 199 199 /*FUNCTION Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){{{1*/ 200 void Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ 200 void Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ _assert_(this); 201 201 202 202 vector<Object*>::iterator object; … … 215 215 /*}}}*/ 216 216 /*FUNCTION Parameters::FindParam(Vec* pvec,int enum_type){{{1*/ 217 void Parameters::FindParam(Vec* pvec,int enum_type){ 217 void Parameters::FindParam(Vec* pvec,int enum_type){ _assert_(this); 218 218 219 219 vector<Object*>::iterator object; … … 233 233 /*}}}*/ 234 234 /*FUNCTION Parameters::FindParam(Mat* pmat,int enum_type){{{1*/ 235 void Parameters::FindParam(Mat* pmat,int enum_type){ 235 void Parameters::FindParam(Mat* pmat,int enum_type){ _assert_(this); 236 236 237 237 vector<Object*>::iterator object; … … 251 251 /*}}}*/ 252 252 /*FUNCTION Parameters::FindParam(FILE** pfid,int enum_type){{{1*/ 253 void Parameters::FindParam(FILE** pfid,int enum_type){ 253 void Parameters::FindParam(FILE** pfid,int enum_type){ _assert_(this); 254 254 255 255 vector<Object*>::iterator object; -
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r8363 r8376 136 136 TriaVertexInputEnum, 137 137 TriaVertexForcingEnum, 138 PentaVertexForcingEnum, 138 139 ControlInputEnum, 139 140 /*Params: */ -
issm/trunk/src/c/Makefile.am
r8363 r8376 198 198 ./objects/Inputs/PentaVertexInput.h\ 199 199 ./objects/Inputs/PentaVertexInput.cpp\ 200 ./objects/Inputs/PentaVertexForcing.h\ 201 ./objects/Inputs/PentaVertexForcing.cpp\ 200 202 ./objects/Inputs/BoolInput.h\ 201 203 ./objects/Inputs/BoolInput.cpp\ … … 845 847 ./objects/Inputs/PentaVertexInput.h\ 846 848 ./objects/Inputs/PentaVertexInput.cpp\ 849 ./objects/Inputs/PentaVertexForcing.h\ 850 ./objects/Inputs/PentaVertexForcing.cpp\ 847 851 ./objects/Inputs/BoolInput.h\ 848 852 ./objects/Inputs/BoolInput.cpp\ -
issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
r8363 r8376 115 115 case TriaVertexInputEnum : return "TriaVertexInput"; 116 116 case TriaVertexForcingEnum : return "TriaVertexForcing"; 117 case PentaVertexForcingEnum : return "PentaVertexForcing"; 117 118 case ControlInputEnum : return "ControlInput"; 118 119 case ParamEnum : return "Param"; -
issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
r8363 r8376 113 113 else if (strcmp(name,"TriaVertexInput")==0) return TriaVertexInputEnum; 114 114 else if (strcmp(name,"TriaVertexForcing")==0) return TriaVertexForcingEnum; 115 else if (strcmp(name,"PentaVertexForcing")==0) return PentaVertexForcingEnum; 115 116 else if (strcmp(name,"ControlInput")==0) return ControlInputEnum; 116 117 else if (strcmp(name,"Param")==0) return ParamEnum; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r8303 r8376 467 467 /*point parameters to real dataset: */ 468 468 this->parameters=parametersin; 469 470 /*get inputs configured too: */ 471 this->inputs->Configure(parameters); 469 472 } 470 473 /*}}}*/ … … 6263 6266 } 6264 6267 /*}}}*/ 6268 /*FUNCTION Penta::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum){{{1*/ 6269 void Penta::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters){ 6270 6271 /*Intermediaries*/ 6272 int i,j; 6273 int penta_vertex_ids[6]; 6274 double nodeinputs[6]; 6275 6276 /*Recover vertices ids needed to initialize inputs*/ 6277 for(i=0;i<6;i++) penta_vertex_ids[i]=(int)iomodel->elements[3*index+i]; //ids for vertices are in the elements array from Matlab 6278 6279 /*recover forcing for this time step: */ 6280 for(i=0;i<6;i++)nodeinputs[i]=iomodel->forcing[penta_vertex_ids[i]-1]; 6281 6282 /*process units: */ 6283 UnitConversion(&nodeinputs[0],6,ExtToIuEnum, FieldEnum, parameters); 6284 6285 if(step==0){ 6286 /*This is the first time we are trying to replace the accumulation penta vertex input by an accumulation pentav vertex 6287 *forcing, which is essentially a penta vertex input that can vary with time. So firt, if there is already 6288 an input with enum FieldEnum, squash it: */ 6289 this->inputs->AddInput(new PentaVertexForcing(FieldEnum,nodeinputs,time,iomodel->forcing_numtimesteps,this->parameters)); 6290 } 6291 else{ 6292 6293 /*Ok, we can't write over the existing forcing that was created in previous step 0. Find the input, and add 6294 *values for this time step: */ 6295 PentaVertexForcing* forcing=(PentaVertexForcing*)inputs->GetInput(FieldEnum); _assert_(forcing); 6296 forcing->AddTimeValues(&nodeinputs[0],step,time); 6297 6298 } 6299 6300 6301 } 6302 /*}}}*/ 6265 6303 /*FUNCTION Penta::UpdateShelfStatus{{{1*/ 6266 6304 int Penta::UpdateShelfStatus(Vec new_shelf_nodes){ -
issm/trunk/src/c/objects/Elements/Penta.h
r8365 r8376 129 129 double SurfaceArea(void); 130 130 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); 131 void UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters) {_error_("not supported yet!");}131 void UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters); 132 132 int UpdateShelfStatus(Vec new_shelf_nodes); 133 133 void UpdateShelfFlags(double* new_shelf_nodes); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r8375 r8376 2728 2728 /*get inputs configured too: */ 2729 2729 this->inputs->Configure(parameters); 2730 2731 2730 2732 2731 } -
issm/trunk/src/c/objects/objects.h
r8363 r8376 79 79 #include "./Inputs/IntInput.h" 80 80 #include "./Inputs/PentaVertexInput.h" 81 #include "./Inputs/PentaVertexForcing.h" 81 82 #include "./Inputs/TriaVertexInput.h" 82 83 #include "./Inputs/TriaVertexForcing.h"
Note:
See TracChangeset
for help on using the changeset viewer.