Changeset 15670
- Timestamp:
- 08/01/13 11:28:17 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r15667 r15670 6208 6208 switch(name){ 6209 6209 case ThicknessEnum: 6210 /*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/6210 /*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium*/ 6211 6211 IssmDouble thickness[6]; 6212 6212 IssmDouble thickness_init[6]; … … 6274 6274 this->inputs->AddInput(new PentaInput(SurfaceEnum,surface,P1Enum)); 6275 6275 6276 /*}}}*/6277 6276 break; 6278 6277 default: … … 6300 6299 void Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ 6301 6300 6302 int i,j,t; 6303 TransientInput* transientinput=NULL; 6304 IssmDouble values[6]; 6305 IssmDouble time; 6306 int row; 6307 IssmDouble yts; 6301 int i,t,row; 6302 IssmDouble time; 6303 TransientInput *transientinput = NULL; 6304 IssmDouble values[6]; 6308 6305 6309 6306 /*Check that name is an element input*/ … … 6313 6310 6314 6311 case VertexEnum: 6315 6316 6312 /*Create transient input: */ 6317 6318 parameters->FindParam(&yts,ConstantsYtsEnum);6319 6320 6313 for(t=0;t<ncols;t++){ //ncols is the number of times 6321 6314 … … 6323 6316 for(i=0;i<6;i++){ 6324 6317 row=this->vertices[i]->Sid(); 6325 values[i]= (IssmDouble)matrix[ncols*row+t];6318 values[i]=matrix[ncols*row+t]; 6326 6319 } 6327 6320 6328 /*time ?:*/6329 time= (IssmDouble)matrix[(nrows-1)*ncols+t]*yts;6321 /*time:*/ 6322 time=matrix[(nrows-1)*ncols+t]; 6330 6323 6331 6324 if(t==0) transientinput=new TransientInput(name); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r15667 r15670 6819 6819 void Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ 6820 6820 6821 int i,j,t; 6822 TransientInput* transientinput=NULL; 6823 IssmDouble values[3]; 6824 IssmDouble time; 6825 int row; 6826 IssmDouble yts; 6821 int i,t,row; 6822 IssmDouble time; 6823 TransientInput *transientinput = NULL; 6824 IssmDouble values[3]; 6827 6825 6828 6826 /*Check that name is an element input*/ … … 6832 6830 6833 6831 case VertexEnum: 6834 6835 6832 /*Create transient input: */ 6836 6837 parameters->FindParam(&yts,ConstantsYtsEnum);6838 6833 for(t=0;t<ncols;t++){ //ncols is the number of times 6839 6834 … … 6841 6836 for(i=0;i<3;i++){ 6842 6837 row=this->vertices[i]->Sid(); 6843 values[i]= (IssmDouble)matrix[ncols*row+t];6838 values[i]=matrix[ncols*row+t]; 6844 6839 } 6845 6840 6846 /*time ?:*/6847 time= (IssmDouble)matrix[(nrows-1)*ncols+t]*yts;6841 /*time:*/ 6842 time=matrix[(nrows-1)*ncols+t]; 6848 6843 6849 6844 if(t==0) transientinput=new TransientInput(name);
Note:
See TracChangeset
for help on using the changeset viewer.