Changeset 17962
- Timestamp:
- 05/08/14 10:52:36 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Elements
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r17941 r17962 33 33 34 34 /*Other*/ 35 void Element::AddInput(Input* input_in){/*{{{*/35 void Element::AddInput(Input* input_in){/*{{{*/ 36 36 37 37 /*Call inputs method*/ … … 39 39 this->inputs->AddInput(input_in); 40 40 }/*}}}*/ 41 /* bool Element::AllActive(void){/\*{{{*\/ */ 42 43 /* int numnodes = this->GetNumberOfNodes(); */ 44 /* for(int i=0;i<numnodes;i++){ */ 45 /* if(!this->nodes[i]->IsActive()) return false; */ 46 /* } */ 47 /* return true; */ 48 /* }/\*}}}*\/ */ 49 /* bool Element::AnyActive(void){/\*{{{*\/ */ 50 51 /* int numnodes = this->GetNumberOfNodes(); */ 52 /* for(int i=0;i<numnodes;i++){ */ 53 /* if(this->nodes[i]->IsActive()) return true; */ 54 /* } */ 55 /* return false; */ 56 /* }/\*}}}*\/ */ 57 void Element::CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/ 41 void Element::CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/ 58 42 59 43 int i,counter; … … 129 113 } 130 114 /*}}}*/ 131 void Element::DeleteMaterials(void){/*{{{*/115 void Element::DeleteMaterials(void){/*{{{*/ 132 116 delete this->material; 133 117 }/*}}}*/ 134 void Element::DeepEcho(void){/*{{{*/118 void Element::DeepEcho(void){/*{{{*/ 135 119 136 120 _printf_(EnumToStringx(this->ObjectEnum())<<" element:\n"); … … 166 150 } 167 151 /*}}}*/ 168 void Element::Echo(void){/*{{{*/152 void Element::Echo(void){/*{{{*/ 169 153 _printf_(EnumToStringx(this->ObjectEnum())<<" element:\n"); 170 154 _printf_(" id : "<<this->id <<"\n"); … … 229 213 return divergence; 230 214 }/*}}}*/ 231 void Element::ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure){/*{{{*/215 void Element::ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure){/*{{{*/ 232 216 matpar->ThermalToEnthalpy(penthalpy,temperature,waterfraction,pressure); 233 217 }/*}}}*/ 234 void Element::EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){/*{{{*/218 void Element::EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){/*{{{*/ 235 219 matpar->EnthalpyToThermal(ptemperature,pwaterfraction,enthalpy,pressure); 236 220 }/*}}}*/ … … 241 225 return matpar->GetEnthalpyDiffusionParameterVolume(numvertices,enthalpy,pressure); 242 226 }/*}}}*/ 243 void Element::FindParam(bool* pvalue,int paramenum){/*{{{*/227 void Element::FindParam(bool* pvalue,int paramenum){/*{{{*/ 244 228 this->parameters->FindParam(pvalue,paramenum); 245 229 }/*}}}*/ 246 void Element::FindParam(int* pvalue,int paramenum){/*{{{*/230 void Element::FindParam(int* pvalue,int paramenum){/*{{{*/ 247 231 this->parameters->FindParam(pvalue,paramenum); 248 232 }/*}}}*/ 249 void Element::FindParam(IssmDouble* pvalue,int paramenum){/*{{{*/233 void Element::FindParam(IssmDouble* pvalue,int paramenum){/*{{{*/ 250 234 this->parameters->FindParam(pvalue,paramenum); 251 235 }/*}}}*/ 252 void Element::FindParam(int** pvalues,int* psize,int paramenum){/*{{{*/236 void Element::FindParam(int** pvalues,int* psize,int paramenum){/*{{{*/ 253 237 this->parameters->FindParam(pvalues,psize,paramenum); 254 238 }/*}}}*/ 255 void Element::GetDofList(int** pdoflist,int approximation_enum,int setenum){/*{{{*/239 void Element::GetDofList(int** pdoflist,int approximation_enum,int setenum){/*{{{*/ 256 240 257 241 /*Fetch number of nodes and dof for this finite element*/ … … 276 260 } 277 261 /*}}}*/ 278 void Element::GetDofListVelocity(int** pdoflist,int setenum){/*{{{*/262 void Element::GetDofListVelocity(int** pdoflist,int setenum){/*{{{*/ 279 263 280 264 /*Fetch number of nodes and dof for this finite element*/ … … 299 283 } 300 284 /*}}}*/ 301 void Element::GetDofListPressure(int** pdoflist,int setenum){/*{{{*/285 void Element::GetDofListPressure(int** pdoflist,int setenum){/*{{{*/ 302 286 303 287 /*Fetch number of nodes and dof for this finite element*/ … … 337 321 } 338 322 }/*}}}*/ 339 void Element::GetPhi(IssmDouble* phi, IssmDouble* epsilon, IssmDouble viscosity){/*{{{*/323 void Element::GetPhi(IssmDouble* phi, IssmDouble* epsilon, IssmDouble viscosity){/*{{{*/ 340 324 /*Compute deformational heating from epsilon and viscosity */ 341 325 … … 374 358 } 375 359 /*}}}*/ 376 Input* Element::GetInput(int inputenum){/*{{{*/360 Input* Element::GetInput(int inputenum){/*{{{*/ 377 361 return inputs->GetInput(inputenum); 378 362 }/*}}}*/ 379 void Element::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){/*{{{*/363 void Element::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){/*{{{*/ 380 364 381 365 /*Recover input*/ … … 400 384 } 401 385 /*}}}*/ 402 void Element::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/386 void Element::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/ 403 387 404 388 /*Recover input*/ … … 425 409 } 426 410 /*}}}*/ 427 void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/411 void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){/*{{{*/ 428 412 429 413 _assert_(pvalue); … … 446 430 } 447 431 /*}}}*/ 448 void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype){/*{{{*/432 void Element::GetInputListOnNodes(IssmDouble* pvalue,int enumtype){/*{{{*/ 449 433 450 434 _assert_(pvalue); … … 463 447 } 464 448 /*}}}*/ 465 void Element::GetInputListOnNodesVelocity(IssmDouble* pvalue,int enumtype){/*{{{*/449 void Element::GetInputListOnNodesVelocity(IssmDouble* pvalue,int enumtype){/*{{{*/ 466 450 467 451 _assert_(pvalue); … … 480 464 } 481 465 /*}}}*/ 482 void Element::GetInputValue(bool* pvalue,int inputenum){/*{{{*/466 void Element::GetInputValue(bool* pvalue,int inputenum){/*{{{*/ 483 467 484 468 Input* input=inputs->GetInput(inputenum); … … 487 471 488 472 }/*}}}*/ 489 void Element::GetInputValue(int* pvalue,int inputenum){/*{{{*/473 void Element::GetInputValue(int* pvalue,int inputenum){/*{{{*/ 490 474 491 475 Input* input=inputs->GetInput(inputenum); … … 494 478 495 479 }/*}}}*/ 496 void Element::GetInputValue(IssmDouble* pvalue,int inputenum){/*{{{*/480 void Element::GetInputValue(IssmDouble* pvalue,int inputenum){/*{{{*/ 497 481 498 482 Input* input=inputs->GetInput(inputenum); … … 501 485 502 486 }/*}}}*/ 503 void Element::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int inputenum){/*{{{*/487 void Element::GetInputValue(IssmDouble* pvalue,Gauss* gauss,int inputenum){/*{{{*/ 504 488 505 489 Input* input=inputs->GetInput(inputenum); … … 508 492 509 493 }/*}}}*/ 510 void Element::GetNodesSidList(int* sidlist){/*{{{*/494 void Element::GetNodesSidList(int* sidlist){/*{{{*/ 511 495 512 496 _assert_(sidlist); … … 518 502 } 519 503 /*}}}*/ 520 void Element::GetNodesLidList(int* lidlist){/*{{{*/504 void Element::GetNodesLidList(int* lidlist){/*{{{*/ 521 505 522 506 _assert_(lidlist); … … 528 512 } 529 513 /*}}}*/ 530 void Element::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){/*{{{*/514 void Element::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){/*{{{*/ 531 515 532 516 /*Fetch number vertices for this element and allocate arrays*/ … … 546 530 } 547 531 /*}}}*/ 548 void Element::GetVertexPidList(int* pidlist){/*{{{*/532 void Element::GetVertexPidList(int* pidlist){/*{{{*/ 549 533 550 534 int numvertices = this->GetNumberOfVertices(); … … 553 537 } 554 538 /*}}}*/ 555 void Element::GetVerticesCoordinates(IssmDouble** pxyz_list){/*{{{*/539 void Element::GetVerticesCoordinates(IssmDouble** pxyz_list){/*{{{*/ 556 540 557 541 int numvertices = this->GetNumberOfVertices(); … … 562 546 563 547 }/*}}}*/ 564 void Element::GetVerticesSidList(int* sidlist){/*{{{*/548 void Element::GetVerticesSidList(int* sidlist){/*{{{*/ 565 549 566 550 int numvertices = this->GetNumberOfVertices(); … … 568 552 } 569 553 /*}}}*/ 570 void Element::GetVerticesConnectivityList(int* connectivity){/*{{{*/554 void Element::GetVerticesConnectivityList(int* connectivity){/*{{{*/ 571 555 572 556 int numvertices = this->GetNumberOfVertices(); … … 616 600 return z; 617 601 }/*}}}*/ 618 bool Element::HasNodeOnBase(){/*{{{*/602 bool Element::HasNodeOnBase(){/*{{{*/ 619 603 return (this->inputs->Max(MeshVertexonbaseEnum)>0.); 620 604 }/*}}}*/ 621 bool Element::HasNodeOnSurface(){/*{{{*/605 bool Element::HasNodeOnSurface(){/*{{{*/ 622 606 return (this->inputs->Max(MeshVertexonsurfaceEnum)>0.); 623 607 }/*}}}*/ 624 int Element::Id(){/*{{{*/608 int Element::Id(){/*{{{*/ 625 609 626 610 return this->id; … … 628 612 } 629 613 /*}}}*/ 630 void Element::InputChangeName(int original_enum,int new_enum){/*{{{*/614 void Element::InputChangeName(int original_enum,int new_enum){/*{{{*/ 631 615 this->inputs->ChangeEnum(original_enum,new_enum); 632 616 } 633 617 /*}}}*/ 634 void Element::InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){/*{{{*/618 void Element::InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){/*{{{*/ 635 619 636 620 /*Intermediaries*/ … … 700 684 } 701 685 }/*}}}*/ 702 void Element::InputDuplicate(int original_enum,int new_enum){/*{{{*/686 void Element::InputDuplicate(int original_enum,int new_enum){/*{{{*/ 703 687 704 688 /*Call inputs method*/ … … 707 691 } 708 692 /*}}}*/ 709 void Element::InputUpdateFromConstant(int constant, int name){/*{{{*/693 void Element::InputUpdateFromConstant(int constant, int name){/*{{{*/ 710 694 711 695 /*Check that name is an element input*/ … … 716 700 } 717 701 /*}}}*/ 718 void Element::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/702 void Element::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/ 719 703 720 704 /*Check that name is an element input*/ … … 725 709 } 726 710 /*}}}*/ 727 void Element::InputUpdateFromConstant(bool constant, int name){/*{{{*/711 void Element::InputUpdateFromConstant(bool constant, int name){/*{{{*/ 728 712 729 713 /*Check that name is an element input*/ … … 734 718 } 735 719 /*}}}*/ 736 bool Element::IsFloating(){/*{{{*/720 bool Element::IsFloating(){/*{{{*/ 737 721 738 722 bool shelf; … … 752 736 return shelf; 753 737 }/*}}}*/ 754 bool Element::IsIceInElement(){/*{{{*/738 bool Element::IsIceInElement(){/*{{{*/ 755 739 return (this->inputs->Min(MaskIceLevelsetEnum)<0.); 756 740 } 757 741 /*}}}*/ 758 bool Element::IsInput(int name){/*{{{*/742 bool Element::IsInput(int name){/*{{{*/ 759 743 if ( 760 744 name==ThicknessEnum || … … 847 831 return this->matpar->PureIceEnthalpy(pressure); 848 832 }/*}}}*/ 849 void Element::ResultInterpolation(int* pinterpolation,int* pnodesperelement,int output_enum){/*{{{*/833 void Element::ResultInterpolation(int* pinterpolation,int* pnodesperelement,int output_enum){/*{{{*/ 850 834 851 835 Input* input=this->inputs->GetInput(output_enum); … … 898 882 *pnodesperelement = input->GetResultNumberOfNodes(); 899 883 }/*}}}*/ 900 void Element::ResultToVector(Vector<IssmDouble>* vector,int output_enum){/*{{{*/884 void Element::ResultToVector(Vector<IssmDouble>* vector,int output_enum){/*{{{*/ 901 885 902 886 Input* input=this->inputs->GetInput(output_enum); … … 944 928 } 945 929 } /*}}}*/ 946 void Element::ResultToPatch(IssmDouble* values,int nodesperelement,int output_enum){/*{{{*/930 void Element::ResultToPatch(IssmDouble* values,int nodesperelement,int output_enum){/*{{{*/ 947 931 948 932 Input* input=this->inputs->GetInput(output_enum); … … 952 936 953 937 } /*}}}*/ 954 void Element::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){/*{{{*/938 void Element::SetwiseNodeConnectivity(int* pd_nz,int* po_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){/*{{{*/ 955 939 956 940 /*Intermediaries*/ … … 1022 1006 } 1023 1007 /*}}}*/ 1024 int Element::Sid(){/*{{{*/1008 int Element::Sid(){/*{{{*/ 1025 1009 1026 1010 return this->sid; … … 1032 1016 return this->matpar->TMeltingPoint(pressure); 1033 1017 }/*}}}*/ 1034 void Element::ViscousHeatingCreateInput(void){/*{{{*/1018 void Element::ViscousHeatingCreateInput(void){/*{{{*/ 1035 1019 1036 1020 /*Intermediaries*/ … … 1074 1058 } 1075 1059 /*}}}*/ 1076 void Element::ViscosityFS(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/1060 void Element::ViscosityFS(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/ 1077 1061 /*The effective strain rate is defined in Paterson 3d Ed p 91 eq 9, 1078 1062 * and Cuffey p 303 eq 8.18: … … 1113 1097 } 1114 1098 /*}}}*/ 1115 void Element::ViscosityL1L2(IssmDouble* pviscosity,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* surface_input){/*{{{*/1099 void Element::ViscosityL1L2(IssmDouble* pviscosity,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* surface_input){/*{{{*/ 1116 1100 /*Compute the L1L2 viscosity 1117 1101 * … … 1172 1156 *pviscosity = viscosity; 1173 1157 }/*}}}*/ 1174 void Element::ViscosityHO(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/1158 void Element::ViscosityHO(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/ 1175 1159 1176 1160 /*Intermediaries*/ … … 1197 1181 *pviscosity=viscosity; 1198 1182 }/*}}}*/ 1199 void Element::ViscositySSA(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/1183 void Element::ViscositySSA(IssmDouble* pviscosity,int dim,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/ 1200 1184 1201 1185 /*Intermediaries*/ … … 1222 1206 *pviscosity=viscosity; 1223 1207 }/*}}}*/ 1224 void Element::ViscositySSADerivativeEpsSquare(IssmDouble* pmu_prime,IssmDouble* epsilon){/*{{{*/1208 void Element::ViscositySSADerivativeEpsSquare(IssmDouble* pmu_prime,IssmDouble* epsilon){/*{{{*/ 1225 1209 this->material->GetViscosity2dDerivativeEpsSquare(pmu_prime,epsilon); 1226 1210 }/*}}}*/ 1227 void Element::ViscosityHODerivativeEpsSquare(IssmDouble* pmu_prime,IssmDouble* epsilon){/*{{{*/1211 void Element::ViscosityHODerivativeEpsSquare(IssmDouble* pmu_prime,IssmDouble* epsilon){/*{{{*/ 1228 1212 this->material->GetViscosityDerivativeEpsSquare(pmu_prime,epsilon); 1229 1213 }/*}}}*/ 1230 void Element::ViscosityFSDerivativeEpsSquare(IssmDouble* pmu_prime,IssmDouble* epsilon){/*{{{*/1214 void Element::ViscosityFSDerivativeEpsSquare(IssmDouble* pmu_prime,IssmDouble* epsilon){/*{{{*/ 1231 1215 this->material->GetViscosityDerivativeEpsSquare(pmu_prime,epsilon); 1232 1216 }/*}}}*/ 1233 void Element::StrainRateFS(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/1217 void Element::StrainRateFS(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/ 1234 1218 /*Compute the 3d Strain Rate (6 components): 1235 1219 * … … 1259 1243 1260 1244 }/*}}}*/ 1261 void Element::StrainRateHO(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/1245 void Element::StrainRateHO(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/ 1262 1246 /*Compute the 3d Blatter/HOStrain Rate (5 components): 1263 1247 * … … 1289 1273 1290 1274 }/*}}}*/ 1291 void Element::StrainRateHO2dvertical(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/1275 void Element::StrainRateHO2dvertical(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/ 1292 1276 /*Compute the 2d Blatter/HOStrain Rate (2 components): 1293 1277 * … … 1313 1297 1314 1298 }/*}}}*/ 1315 void Element::StrainRateSSA(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/1299 void Element::StrainRateSSA(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input){/*{{{*/ 1316 1300 1317 1301 /*Intermediaries*/ … … 1332 1316 1333 1317 }/*}}}*/ 1334 void Element::StrainRateSSA1d(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input){/*{{{*/1318 void Element::StrainRateSSA1d(IssmDouble* epsilon,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input){/*{{{*/ 1335 1319 1336 1320 /*Intermediaries*/ … … 1347 1331 1348 1332 }/*}}}*/ 1349 void Element::TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,int transformenum){/*{{{*/1333 void Element::TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,int transformenum){/*{{{*/ 1350 1334 1351 1335 /*All nodes have the same Coordinate System*/ … … 1360 1344 xDelete<int>(cs_array); 1361 1345 }/*}}}*/ 1362 void Element::TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/1346 void Element::TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/ 1363 1347 1364 1348 int i,j; … … 1394 1378 xDelete<IssmDouble>(values); 1395 1379 }/*}}}*/ 1396 void Element::TransformLoadVectorCoord(ElementVector* pe,int transformenum){/*{{{*/1380 void Element::TransformLoadVectorCoord(ElementVector* pe,int transformenum){/*{{{*/ 1397 1381 1398 1382 /*All nodes have the same Coordinate System*/ … … 1407 1391 xDelete<int>(cs_array); 1408 1392 }/*}}}*/ 1409 void Element::TransformLoadVectorCoord(ElementVector* pe,int* cs_array){/*{{{*/1393 void Element::TransformLoadVectorCoord(ElementVector* pe,int* cs_array){/*{{{*/ 1410 1394 1411 1395 this->TransformLoadVectorCoord(pe,this->nodes,this->GetNumberOfNodes(),cs_array); 1412 1396 1413 1397 }/*}}}*/ 1414 void Element::TransformLoadVectorCoord(ElementVector* pe,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/1398 void Element::TransformLoadVectorCoord(ElementVector* pe,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/ 1415 1399 1416 1400 int i; … … 1445 1429 xDelete<IssmDouble>(values); 1446 1430 }/*}}}*/ 1447 void Element::TransformSolutionCoord(IssmDouble* values,int transformenum){/*{{{*/1431 void Element::TransformSolutionCoord(IssmDouble* values,int transformenum){/*{{{*/ 1448 1432 1449 1433 /*All nodes have the same Coordinate System*/ … … 1458 1442 xDelete<int>(cs_array); 1459 1443 }/*}}}*/ 1460 void Element::TransformSolutionCoord(IssmDouble* values,int* transformenum_list){/*{{{*/1444 void Element::TransformSolutionCoord(IssmDouble* values,int* transformenum_list){/*{{{*/ 1461 1445 this->TransformSolutionCoord(values,this->nodes,this->GetNumberOfNodes(),transformenum_list); 1462 1446 }/*}}}*/ 1463 void Element::TransformSolutionCoord(IssmDouble* values,int numnodes,int transformenum){/*{{{*/1447 void Element::TransformSolutionCoord(IssmDouble* values,int numnodes,int transformenum){/*{{{*/ 1464 1448 1465 1449 /*All nodes have the same Coordinate System*/ … … 1473 1457 xDelete<int>(cs_array); 1474 1458 }/*}}}*/ 1475 void Element::TransformSolutionCoord(IssmDouble* solution,int numnodes,int* cs_array){/*{{{*/1459 void Element::TransformSolutionCoord(IssmDouble* solution,int numnodes,int* cs_array){/*{{{*/ 1476 1460 this->TransformSolutionCoord(solution,this->nodes,numnodes,cs_array); 1477 1461 }/*}}}*/ 1478 void Element::TransformSolutionCoord(IssmDouble* values,Node** nodes_list,int numnodes,int transformenum){/*{{{*/1462 void Element::TransformSolutionCoord(IssmDouble* values,Node** nodes_list,int numnodes,int transformenum){/*{{{*/ 1479 1463 /*NOT NEEDED*/ 1480 1464 /*All nodes have the same Coordinate System*/ … … 1488 1472 xDelete<int>(cs_array); 1489 1473 }/*}}}*/ 1490 void Element::TransformSolutionCoord(IssmDouble* solution,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/1474 void Element::TransformSolutionCoord(IssmDouble* solution,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/ 1491 1475 1492 1476 int i; … … 1521 1505 xDelete<IssmDouble>(values); 1522 1506 }/*}}}*/ 1523 void Element::TransformStiffnessMatrixCoord(ElementMatrix* Ke,int transformenum){/*{{{*/1507 void Element::TransformStiffnessMatrixCoord(ElementMatrix* Ke,int transformenum){/*{{{*/ 1524 1508 1525 1509 /*All nodes have the same Coordinate System*/ … … 1534 1518 xDelete<int>(cs_array); 1535 1519 }/*}}}*/ 1536 void Element::TransformStiffnessMatrixCoord(ElementMatrix* Ke,int* transformenum_list){/*{{{*/1520 void Element::TransformStiffnessMatrixCoord(ElementMatrix* Ke,int* transformenum_list){/*{{{*/ 1537 1521 this->TransformStiffnessMatrixCoord(Ke,this->nodes,this->GetNumberOfNodes(),transformenum_list); 1538 1522 }/*}}}*/ 1539 void Element::TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/1523 void Element::TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes_list,int numnodes,int* cs_array){/*{{{*/ 1540 1524 1541 1525 int numdofs = 0; -
issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp
r17514 r17962 16 16 17 17 /*Object constructors and destructor*/ 18 /*FUNCTION ElementHook::ElementHook(){{{*/ 19 ElementHook::ElementHook(){ 18 ElementHook::ElementHook(){/*{{{*/ 20 19 numanalyses=UNDEF; 21 20 this->hnodes = NULL; … … 26 25 } 27 26 /*}}}*/ 28 /*FUNCTION ElementHook::~ElementHook(){{{*/ 29 ElementHook::~ElementHook(){ 27 ElementHook::~ElementHook(){/*{{{*/ 30 28 31 29 int i; … … 41 39 } 42 40 /*}}}*/ 43 /*FUNCTION ElementHook::ElementHook(int in_numanalyses,int element_id, int numvertices,IoModel* iomodel){{{*/ 44 ElementHook::ElementHook(int in_numanalyses,int element_id,int numvertices,IoModel* iomodel){ 41 ElementHook::ElementHook(int in_numanalyses,int element_id,int numvertices,IoModel* iomodel){/*{{{*/ 45 42 46 43 /*intermediary: */ … … 78 75 /*}}}*/ 79 76 80 /*FUNCTION ElementHook::SetHookNodes{{{*/ 81 void ElementHook::SetHookNodes(int* node_ids,int numnodes,int analysis_counter){ 77 void ElementHook::SetHookNodes(int* node_ids,int numnodes,int analysis_counter){/*{{{*/ 82 78 this->hnodes[analysis_counter]= new Hook(node_ids,numnodes); 83 79 } 84 80 /*}}}*/ 85 /*FUNCTION ElementHook::InitHookNeighbors{{{*/ 86 void ElementHook::InitHookNeighbors(int* element_ids){ 81 void ElementHook::InitHookNeighbors(int* element_ids){/*{{{*/ 87 82 this->hneighbors=new Hook(element_ids,2); 88 83 } 89 84 /*}}}*/ 90 /*FUNCTION ElementHook::SpawnTriaHook{{{*/ 91 void ElementHook::SpawnTriaHook(ElementHook* triahook,int index1,int index2,int index3){ 85 void ElementHook::SpawnTriaHook(ElementHook* triahook,int index1,int index2,int index3){/*{{{*/ 92 86 93 87 /*Create arrow of indices depending on location (0=base 1=surface)*/ … … 117 111 } 118 112 /*}}}*/ 119 /*FUNCTION ElementHook::SpawnSegHook{{{*/ 120 void ElementHook::SpawnSegHook(ElementHook* triahook,int index1,int index2){ 113 void ElementHook::SpawnSegHook(ElementHook* triahook,int index1,int index2){/*{{{*/ 121 114 122 115 triahook->numanalyses=this->numanalyses; -
issm/trunk-jpl/src/c/classes/Elements/Elements.cpp
r16486 r17962 23 23 24 24 /*Object constructors and destructor*/ 25 /*FUNCTION Elements::Elements(){{{*/ 26 Elements::Elements(){ 25 Elements::Elements(){/*{{{*/ 27 26 enum_type=MeshElementsEnum; 28 27 return; 29 28 } 30 29 /*}}}*/ 31 /*FUNCTION Elements::~Elements(){{{*/ 32 Elements::~Elements(){ 30 Elements::~Elements(){/*{{{*/ 33 31 return; 34 32 } … … 36 34 37 35 /*Object management*/ 38 /*FUNCTION Elements::Configure{{{*/ 39 void Elements::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){ 36 void Elements::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){/*{{{*/ 40 37 41 38 vector<Object*>::iterator object; … … 51 48 } 52 49 /*}}}*/ 53 /*FUNCTION Elements::SetCurrentConfiguration{{{*/ 54 void Elements::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){ 50 void Elements::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){/*{{{*/ 55 51 56 52 vector<Object*>::iterator object; … … 66 62 } 67 63 /*}}}*/ 68 /*FUNCTION Elements::MaxNumNodes{{{*/ 69 int Elements::MaxNumNodes(void){ 64 int Elements::MaxNumNodes(void){/*{{{*/ 70 65 71 66 int max=0; … … 88 83 } 89 84 /*}}}*/ 90 /*FUNCTION Elements::NumberOfElements{{{*/ 91 int Elements::NumberOfElements(void){ 85 int Elements::NumberOfElements(void){/*{{{*/ 92 86 93 87 int local_nelem; … … 100 94 } 101 95 /*}}}*/ 102 /*FUNCTION Elements::InputDuplicate{{{*/ 103 void Elements::InputDuplicate(int input_enum,int output_enum){ 96 void Elements::InputDuplicate(int input_enum,int output_enum){/*{{{*/ 104 97 105 98 for(int i=0;i<this->Size();i++){ -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
r17926 r17962 27 27 28 28 /*Object constructors and destructor*/ 29 /*FUNCTION PentaRef::PentaRef(){{{*/ 30 PentaRef::PentaRef(){ 29 PentaRef::PentaRef(){/*{{{*/ 31 30 this->element_type_list=NULL; 32 31 } 33 32 /*}}}*/ 34 /*FUNCTION PentaRef::PentaRef(int* types,int nummodels){{{*/ 35 PentaRef::PentaRef(const int nummodels){ 33 PentaRef::PentaRef(const int nummodels){/*{{{*/ 36 34 37 35 /*Only allocate pointer*/ … … 40 38 } 41 39 /*}}}*/ 42 /*FUNCTION PentaRef::~PentaRef(){{{*/ 43 PentaRef::~PentaRef(){ 40 PentaRef::~PentaRef(){/*{{{*/ 44 41 xDelete<int>(element_type_list); 45 42 } … … 47 44 48 45 /*Management*/ 49 /*FUNCTION PentaRef::SetElementType{{{*/ 50 void PentaRef::SetElementType(int type,int type_counter){ 46 void PentaRef::SetElementType(int type,int type_counter){/*{{{*/ 51 47 52 48 /*initialize element type*/ … … 56 52 57 53 /*Reference Element numerics*/ 58 /*FUNCTION PentaRef::GetJacobian {{{*/ 59 void PentaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss_in){ 54 void PentaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss_in){/*{{{*/ 60 55 /*The Jacobian is constant over the element, discard the gaussian points. 61 56 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 113 108 } 114 109 /*}}}*/ 115 /*FUNCTION PentaRef::GetJacobianDeterminant {{{*/ 116 void PentaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){ 110 void PentaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 117 111 /*On a penta, Jacobian varies according to coordinates. We need to get the Jacobian, and take 118 112 * the determinant of it: */ … … 128 122 } 129 123 /*}}}*/ 130 /*FUNCTION PentaRef::GetTriaJacobianDeterminant{{{*/ 131 void PentaRef::GetTriaJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){ 124 void PentaRef::GetTriaJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 132 125 /*The Jacobian determinant is constant over the element, discard the gaussian points. 133 126 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 148 141 } 149 142 /*}}}*/ 150 /*FUNCTION PentaRef::GetSegmentJacobianDeterminant{{{*/ 151 void PentaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){ 143 void PentaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 152 144 /*The Jacobian determinant is constant over the element, discard the gaussian points. 153 145 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 165 157 } 166 158 /*}}}*/ 167 /*FUNCTION PentaRef::GetJacobianInvert {{{*/ 168 void PentaRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,Gauss* gauss){ 159 void PentaRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 169 160 170 161 /*Jacobian*/ … … 178 169 } 179 170 /*}}}*/ 180 /*FUNCTION PentaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss){{{*/ 181 void PentaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss){ 171 void PentaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss){/*{{{*/ 182 172 /*This routine returns the values of the nodal functions at the gaussian point.*/ 183 173 … … 187 177 } 188 178 /*}}}*/ 189 /*FUNCTION PentaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss_in,int finiteelement){{{*/ 190 void PentaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss_in,int finiteelement){ 179 void PentaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss_in,int finiteelement){/*{{{*/ 191 180 /*This routine returns the values of the nodal functions at the gaussian point.*/ 192 181 … … 332 321 } 333 322 /*}}}*/ 334 /*FUNCTION PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){{{*/ 335 void PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){ 323 void PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 336 324 GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss,this->element_type); 337 325 } 338 326 /*}}}*/ 339 /*FUNCTION PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){{{*/ 340 void PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){ 327 void PentaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){/*{{{*/ 341 328 342 329 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 371 358 } 372 359 /*}}}*/ 373 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){{{*/ 374 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){ 360 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){/*{{{*/ 375 361 GetNodalFunctionsDerivativesReference(dbasis,gauss,this->element_type); 376 362 } 377 363 /*}}}*/ 378 /*FUNCTION PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){{{*/ 379 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){ 364 void PentaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){/*{{{*/ 380 365 381 366 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 799 784 } 800 785 /*}}}*/ 801 /*FUNCTION PentaRef::GetNodalFunctionsMINIDerivatives{{{*/ 802 void PentaRef::GetNodalFunctionsMINIDerivatives(IssmDouble* dbasismini,IssmDouble* xyz_list, Gauss* gauss){ 786 void PentaRef::GetNodalFunctionsMINIDerivatives(IssmDouble* dbasismini,IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 803 787 804 788 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 829 813 } 830 814 /*}}}*/ 831 /*FUNCTION PentaRef::GetNodalFunctionsMINIDerivativesReference{{{*/ 832 void PentaRef::GetNodalFunctionsMINIDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in){ 815 void PentaRef::GetNodalFunctionsMINIDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in){/*{{{*/ 833 816 /*This routine returns the values of the nodal functions derivatives (with respect to the 834 817 * natural coordinate system) at the gaussian point. */ … … 871 854 } 872 855 /*}}}*/ 873 /*FUNCTION PentaRef::GetNodalFunctionsP1 {{{*/ 874 void PentaRef::GetNodalFunctionsP1(IssmDouble* basis, Gauss* gauss_in){ 856 void PentaRef::GetNodalFunctionsP1(IssmDouble* basis, Gauss* gauss_in){/*{{{*/ 875 857 /*This routine returns the values of the nodal functions at the gaussian point.*/ 876 858 … … 888 870 } 889 871 /*}}}*/ 890 /*FUNCTION PentaRef::GetNodalFunctionsP1Derivatives {{{*/ 891 void PentaRef::GetNodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){ 872 void PentaRef::GetNodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 892 873 893 874 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 917 898 } 918 899 /*}}}*/ 919 /*FUNCTION PentaRef::GetNodalFunctionsP1DerivativesReference {{{*/ 920 void PentaRef::GetNodalFunctionsP1DerivativesReference(IssmDouble* dbasis,Gauss* gauss_in){ 900 void PentaRef::GetNodalFunctionsP1DerivativesReference(IssmDouble* dbasis,Gauss* gauss_in){/*{{{*/ 921 901 922 902 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 955 935 } 956 936 /*}}}*/ 957 /*FUNCTION PentaRef::GetQuadJacobianDeterminant{{{*/ 958 void PentaRef::GetQuadJacobianDeterminant(IssmDouble* Jdet,IssmDouble* xyz_list,Gauss* gauss){ 937 void PentaRef::GetQuadJacobianDeterminant(IssmDouble* Jdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 959 938 /*This routine returns the values of the nodal functions at the gaussian point.*/ 960 939 … … 981 960 } 982 961 /*}}}*/ 983 /*FUNCTION PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,Gauss* gauss){{{*/ 984 void PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,Gauss* gauss){ 962 void PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,Gauss* gauss){/*{{{*/ 985 963 986 964 GetInputValue(pvalue,plist,gauss,this->element_type); … … 988 966 } 989 967 /*}}}*/ 990 /*FUNCTION PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,Gauss* gauss,int finiteelement){{{*/ 991 void PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,Gauss* gauss,int finiteelement){ 968 void PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,Gauss* gauss,int finiteelement){/*{{{*/ 992 969 993 970 /*Output*/ … … 1010 987 } 1011 988 /*}}}*/ 1012 /*FUNCTION PentaRef::GetInputDerivativeValue{{{*/ 1013 void PentaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, Gauss* gauss){ 989 void PentaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 1014 990 /*From node values of parameter p (p_list[0], p_list[1], p_list[2], 1015 991 * p_list[3], p_list[4] and p_list[4]), return parameter derivative value at … … 1047 1023 } 1048 1024 /*}}}*/ 1049 /*FUNCTION PentaRef::NumberofNodes(){{{*/ 1050 int PentaRef::NumberofNodes(void){ 1025 int PentaRef::NumberofNodes(void){/*{{{*/ 1051 1026 1052 1027 return this->NumberofNodes(this->element_type); 1053 1028 } 1054 1029 /*}}}*/ 1055 /*FUNCTION PentaRef::NumberofNodes(int finiteelement){{{*/ 1056 int PentaRef::NumberofNodes(int finiteelement){ 1030 int PentaRef::NumberofNodes(int finiteelement){/*{{{*/ 1057 1031 1058 1032 switch(finiteelement){ … … 1078 1052 } 1079 1053 /*}}}*/ 1080 /*FUNCTION PentaRef::VelocityInterpolation{{{*/ 1081 int PentaRef::VelocityInterpolation(void){ 1054 int PentaRef::VelocityInterpolation(void){/*{{{*/ 1082 1055 1083 1056 switch(this->element_type){ … … 1094 1067 } 1095 1068 /*}}}*/ 1096 /*FUNCTION PentaRef::PressureInterpolation{{{*/ 1097 int PentaRef::PressureInterpolation(void){ 1069 int PentaRef::PressureInterpolation(void){/*{{{*/ 1098 1070 1099 1071 switch(this->element_type){ … … 1110 1082 } 1111 1083 /*}}}*/ 1112 /*FUNCTION PentaRef::TensorInterpolation{{{*/ 1113 int PentaRef::TensorInterpolation(void){ 1084 int PentaRef::TensorInterpolation(void){/*{{{*/ 1114 1085 1115 1086 switch(this->element_type){ … … 1121 1092 } 1122 1093 /*}}}*/ 1123 /*FUNCTION PentaRef::BasalNodeIndices{{{*/ 1124 void PentaRef::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){ 1094 void PentaRef::BasalNodeIndices(int* pnumindices,int** pindices,int finiteelement){/*{{{*/ 1125 1095 1126 1096 /*Output*/ … … 1196 1166 } 1197 1167 /*}}}*/ 1198 /*FUNCTION PentaRef::SurfaceNodeIndices{{{*/ 1199 void PentaRef::SurfaceNodeIndices(int* pnumindices,int** pindices,int finiteelement){ 1168 void PentaRef::SurfaceNodeIndices(int* pnumindices,int** pindices,int finiteelement){/*{{{*/ 1200 1169 1201 1170 /*Output*/ -
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r17516 r17962 19 19 #define NUMVERTICES 2 20 20 /*Constructors/destructor/copy*/ 21 /*FUNCTION Seg::Seg(int id, int sid,int index, IoModel* iomodel,int nummodels){{{*/ 22 Seg::Seg(int seg_id, int seg_sid, int index, IoModel* iomodel,int nummodels) 21 Seg::Seg(int seg_id, int seg_sid, int index, IoModel* iomodel,int nummodels)/*{{{*/ 23 22 :SegRef(nummodels),ElementHook(nummodels,index+1,NUMVERTICES,iomodel){ 24 23 … … 40 39 } 41 40 /*}}}*/ 42 /*FUNCTION Seg::~Seg(){{{*/ 43 Seg::~Seg(){ 41 Seg::~Seg(){/*{{{*/ 44 42 this->parameters=NULL; 45 43 } 46 44 /*}}}*/ 47 /*FUNCTION Seg::copy {{{*/ 48 Object* Seg::copy() { 45 Object* Seg::copy(){/*{{{*/ 49 46 _error_("not implemented yet"); 50 47 } 51 48 /*}}}*/ 52 49 53 /*FUNCTION Seg::CharacteristicLength{{{*/ 54 IssmDouble Seg::CharacteristicLength(void){ 50 IssmDouble Seg::CharacteristicLength(void){/*{{{*/ 55 51 56 52 IssmDouble xyz_list[NUMVERTICES][3]; … … 65 61 } 66 62 /*}}}*/ 67 /*FUNCTION Seg::FiniteElement{{{*/ 68 int Seg::FiniteElement(void){ 63 int Seg::FiniteElement(void){/*{{{*/ 69 64 return this->element_type; 70 65 } 71 66 /*}}}*/ 72 /*FUNCTION Seg::ObjectEnum{{{*/ 73 int Seg::ObjectEnum(void){ 67 int Seg::ObjectEnum(void){/*{{{*/ 74 68 75 69 return SegEnum; … … 77 71 } 78 72 /*}}}*/ 79 80 void Seg::GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){/*{{{*/ 73 void Seg::GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){/*{{{*/ 81 74 82 75 /* Intermediaries */ … … 106 99 *pxyz_front=xyz_front; 107 100 }/*}}}*/ 108 /*FUNCTION Seg::GetNumberOfNodes;{{{*/ 109 int Seg::GetNumberOfNodes(void){ 101 int Seg::GetNumberOfNodes(void){/*{{{*/ 110 102 return this->NumberofNodes(); 111 103 } 112 104 /*}}}*/ 113 /*FUNCTION Seg::GetNumberOfVertices;{{{*/ 114 int Seg::GetNumberOfVertices(void){ 105 int Seg::GetNumberOfVertices(void){/*{{{*/ 115 106 return NUMVERTICES; 116 107 } 117 108 /*}}}*/ 118 /*FUNCTION Seg::GetVerticesCoordinates(IssmDouble** pxyz_list){{{*/ 119 void Seg::GetVerticesCoordinates(IssmDouble** pxyz_list){ 109 void Seg::GetVerticesCoordinates(IssmDouble** pxyz_list){/*{{{*/ 120 110 121 111 IssmDouble* xyz_list = xNew<IssmDouble>(NUMVERTICES*3); … … 126 116 127 117 }/*}}}*/ 128 bool Seg::IsIcefront(void){/*{{{*/118 bool Seg::IsIcefront(void){/*{{{*/ 129 119 130 120 bool isicefront; … … 145 135 return isicefront; 146 136 }/*}}}*/ 147 /*FUNCTION Seg::JacobianDeterminant{{{*/ 148 void Seg::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){ 137 void Seg::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 149 138 150 139 _assert_(gauss->Enum()==GaussSegEnum); … … 153 142 } 154 143 /*}}}*/ 155 /*FUNCTION Seg::JacobianDeterminantSurface{{{*/ 156 void Seg::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){ 144 void Seg::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 157 145 158 146 *pJdet = 1.; … … 160 148 } 161 149 /*}}}*/ 162 /*FUNCTION Seg::NewGauss(){{{*/ 163 Gauss* Seg::NewGauss(void){ 150 Gauss* Seg::NewGauss(void){/*{{{*/ 164 151 return new GaussSeg(); 165 152 } 166 153 /*}}}*/ 167 /*FUNCTION Seg::NewGauss(int order){{{*/ 168 Gauss* Seg::NewGauss(int order){ 154 Gauss* Seg::NewGauss(int order){/*{{{*/ 169 155 return new GaussSeg(order); 170 156 } 171 157 /*}}}*/ 172 /*FUNCTION Seg::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){{{*/ 173 Gauss* Seg::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){ 158 Gauss* Seg::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){/*{{{*/ 174 159 175 160 /*Output*/ … … 189 174 } 190 175 /*}}}*/ 191 /*FUNCTION Seg::NodalFunctions{{{*/ 192 void Seg::NodalFunctions(IssmDouble* basis, Gauss* gauss){ 176 void Seg::NodalFunctions(IssmDouble* basis, Gauss* gauss){/*{{{*/ 193 177 194 178 _assert_(gauss->Enum()==GaussSegEnum); … … 197 181 } 198 182 /*}}}*/ 199 /*FUNCTION Seg::NodalFunctionsDerivatives{{{*/ 200 void Seg::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){ 183 void Seg::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 201 184 202 185 _assert_(gauss->Enum()==GaussSegEnum); … … 205 188 } 206 189 /*}}}*/ 207 /*FUNCTION Seg::NormalSection{{{*/ 208 void Seg::NormalSection(IssmDouble* normal,IssmDouble* xyz_list_front){ 190 void Seg::NormalSection(IssmDouble* normal,IssmDouble* xyz_list_front){/*{{{*/ 209 191 210 192 IssmDouble* xyz_list = xNew<IssmDouble>(NUMVERTICES*3); -
issm/trunk-jpl/src/c/classes/Elements/SegRef.cpp
r17926 r17962 20 20 21 21 /*Object constructors and destructor*/ 22 /*FUNCTION SegRef::SegRef(){{{*/ 23 SegRef::SegRef(){ 22 SegRef::SegRef(){/*{{{*/ 24 23 this->element_type_list=NULL; 25 24 } 26 25 /*}}}*/ 27 /*FUNCTION SegRef::SegRef(int* types,int nummodels){{{*/ 28 SegRef::SegRef(const int nummodels){ 26 SegRef::SegRef(const int nummodels){/*{{{*/ 29 27 30 28 /*Only allocate pointer*/ … … 33 31 } 34 32 /*}}}*/ 35 /*FUNCTION SegRef::~SegRef(){{{*/ 36 SegRef::~SegRef(){ 33 SegRef::~SegRef(){/*{{{*/ 37 34 xDelete<int>(element_type_list); 38 35 } … … 40 37 41 38 /*Management*/ 42 /*FUNCTION SegRef::SetElementType{{{*/ 43 void SegRef::SetElementType(int type,int type_counter){ 39 void SegRef::SetElementType(int type,int type_counter){/*{{{*/ 44 40 45 41 /*initialize element type*/ … … 49 45 50 46 /*Reference Element numerics*/ 51 /*FUNCTION SegRef::GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss){{{*/ 52 void SegRef::GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss){ 47 void SegRef::GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss){/*{{{*/ 53 48 /*This routine returns the values of the nodal functions at the gaussian point.*/ 54 49 … … 58 53 } 59 54 /*}}}*/ 60 /*FUNCTION SegRef::GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss,int finiteelement){{{*/ 61 void SegRef::GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss,int finiteelement){ 55 void SegRef::GetNodalFunctions(IssmDouble* basis,GaussSeg* gauss,int finiteelement){/*{{{*/ 62 56 /*This routine returns the values of the nodal functions at the gaussian point.*/ 63 57 … … 82 76 } 83 77 /*}}}*/ 84 /*FUNCTION SegRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss){{{*/ 85 void SegRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss){ 78 void SegRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss){/*{{{*/ 86 79 87 80 GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss,this->element_type); … … 89 82 } 90 83 /*}}}*/ 91 /*FUNCTION SegRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss,int finiteelement){{{*/ 92 void SegRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss,int finiteelement){ 84 void SegRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussSeg* gauss,int finiteelement){/*{{{*/ 93 85 94 86 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 118 110 } 119 111 /*}}}*/ 120 /*FUNCTION SegRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss){{{*/ 121 void SegRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss){ 112 void SegRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss){/*{{{*/ 122 113 /*This routine returns the values of the nodal functions derivatives (with respect to the 123 114 * natural coordinate system) at the gaussian point. */ … … 127 118 } 128 119 /*}}}*/ 129 /*FUNCTION SegRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss,int finiteelement){{{*/ 130 void SegRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss,int finiteelement){ 120 void SegRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussSeg* gauss,int finiteelement){/*{{{*/ 131 121 /*This routine returns the values of the nodal functions derivatives (with respect to the 132 122 * natural coordinate system) at the gaussian point. */ … … 157 147 } 158 148 /*}}}*/ 159 /*FUNCTION SegRef::GetInputDerivativeValue{{{*/ 160 void SegRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, GaussSeg* gauss){ 149 void SegRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, GaussSeg* gauss){/*{{{*/ 161 150 162 151 /*From node values of parameter p (plist[0],plist[1]), return parameter derivative value at gaussian … … 186 175 } 187 176 /*}}}*/ 188 /*FUNCTION SegRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussSeg* gauss){{{*/ 189 void SegRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussSeg* gauss){ 177 void SegRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussSeg* gauss){/*{{{*/ 190 178 191 179 GetInputValue(p,plist,gauss,this->element_type); 192 180 } 193 181 /*}}}*/ 194 /*FUNCTION SegRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussSeg* gauss,int finiteelement){{{*/ 195 void SegRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussSeg* gauss,int finiteelement){ 182 void SegRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussSeg* gauss,int finiteelement){/*{{{*/ 196 183 197 184 /*Output*/ … … 213 200 } 214 201 /*}}}*/ 215 /*FUNCTION SegRef::GetJacobian{{{*/ 216 void SegRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussSeg* gauss){ 202 void SegRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussSeg* gauss){/*{{{*/ 217 203 /*The Jacobian is constant over the element, discard the gaussian points. 218 204 * J is assumed to have been allocated of size 1*/ … … 224 210 } 225 211 /*}}}*/ 226 /*FUNCTION SegRef::GetJacobianDeterminant{{{*/ 227 void SegRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussSeg* gauss){ 212 void SegRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussSeg* gauss){/*{{{*/ 228 213 /*The Jacobian determinant is constant over the element, discard the gaussian points. 229 214 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 235 220 } 236 221 /*}}}*/ 237 /*FUNCTION SegRef::GetJacobianInvert {{{*/ 238 void SegRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussSeg* gauss){ 222 void SegRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussSeg* gauss){/*{{{*/ 239 223 240 224 /*Jacobian*/ … … 248 232 } 249 233 /*}}}*/ 250 /*FUNCTION SegRef::NumberofNodes(){{{*/ 251 int SegRef::NumberofNodes(void){ 234 int SegRef::NumberofNodes(void){/*{{{*/ 252 235 253 236 return this->NumberofNodes(this->element_type); 254 237 } 255 238 /*}}}*/ 256 /*FUNCTION SegRef::NumberofNodes(int finiteelement){{{*/ 257 int SegRef::NumberofNodes(int finiteelement){ 239 int SegRef::NumberofNodes(int finiteelement){/*{{{*/ 258 240 259 241 switch(finiteelement){ -
issm/trunk-jpl/src/c/classes/Elements/Tetra.cpp
r17925 r17962 20 20 21 21 /*Constructors/destructor/copy*/ 22 /*FUNCTION Tetra::Tetra(int id, int sid,int index, IoModel* iomodel,int nummodels){{{*/ 23 Tetra::Tetra(int seg_id, int seg_sid, int index, IoModel* iomodel,int nummodels) 22 Tetra::Tetra(int seg_id, int seg_sid, int index, IoModel* iomodel,int nummodels)/*{{{*/ 24 23 :TetraRef(nummodels),ElementHook(nummodels,index+1,NUMVERTICES,iomodel){ 25 24 … … 41 40 } 42 41 /*}}}*/ 43 /*FUNCTION Tetra::~Tetra(){{{*/ 44 Tetra::~Tetra(){ 42 Tetra::~Tetra(){/*{{{*/ 45 43 this->parameters=NULL; 46 44 } 47 45 /*}}}*/ 48 /*FUNCTION Tetra::copy {{{*/ 49 Object* Tetra::copy() { 46 Object* Tetra::copy() {/*{{{*/ 50 47 _error_("not implemented yet"); 51 48 } 52 49 /*}}}*/ 53 50 54 /*FUNCTION Tetra::FiniteElement{{{*/ 55 int Tetra::FiniteElement(void){ 51 int Tetra::FiniteElement(void){/*{{{*/ 56 52 return this->element_type; 57 53 } /*}}}*/ 58 /*FUNCTION Tetra::ObjectEnum{{{*/ 59 int Tetra::ObjectEnum(void){ 54 int Tetra::ObjectEnum(void){/*{{{*/ 60 55 61 56 return TetraEnum; 62 57 63 58 }/*}}}*/ 64 65 /*FUNCTION Tetra::AddInput{{{*/ 66 void Tetra::AddInput(int input_enum,IssmDouble* values, int interpolation_enum){ 59 void Tetra::AddInput(int input_enum,IssmDouble* values, int interpolation_enum){/*{{{*/ 67 60 68 61 /*Call inputs method*/ … … 71 64 } 72 65 /*}}}*/ 73 /*FUNCTION Tetra::Configure {{{*/ 74 void Tetra::Configure(Elements* elementsin, Loads* loadsin, Nodes* nodesin,Vertices* verticesin, Materials* materialsin, Parameters* parametersin){ 66 void Tetra::Configure(Elements* elementsin, Loads* loadsin, Nodes* nodesin,Vertices* verticesin, Materials* materialsin, Parameters* parametersin){/*{{{*/ 75 67 76 68 int analysis_counter; … … 103 95 } 104 96 /*}}}*/ 105 /*FUNCTION Tetra::ElementSizes (THIS ONE){{{*/ 106 void Tetra::ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){ 97 void Tetra::ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){/*{{{*/ 107 98 108 99 IssmDouble xyz_list[NUMVERTICES][3]; … … 130 121 } 131 122 /*}}}*/ 132 /*FUNCTION Tetra::FaceOnBaseIndices{{{*/ 133 void Tetra::FaceOnBaseIndices(int* pindex1,int* pindex2,int* pindex3){ 123 void Tetra::FaceOnBaseIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/ 134 124 135 125 IssmDouble values[NUMVERTICES]; … … 151 141 } 152 142 /*}}}*/ 153 /*FUNCTION Tetra::FaceOnSurfaceIndices{{{*/ 154 void Tetra::FaceOnSurfaceIndices(int* pindex1,int* pindex2,int* pindex3){ 143 void Tetra::FaceOnSurfaceIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/ 155 144 156 145 IssmDouble values[NUMVERTICES]; … … 172 161 } 173 162 /*}}}*/ 174 /*FUNCTION Tetra::FaceOnFrontIndices{{{*/ 175 void Tetra::FaceOnFrontIndices(int* pindex1,int* pindex2,int* pindex3){ 163 void Tetra::FaceOnFrontIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/ 176 164 177 165 IssmDouble values[NUMVERTICES]; … … 193 181 } 194 182 /*}}}*/ 195 /*FUNCTION Tetra::GetElementType {{{*/ 196 int Tetra::GetElementType(){ 183 int Tetra::GetElementType(){/*{{{*/ 197 184 198 185 /*return TetraRef field*/ … … 200 187 } 201 188 /*}}}*/ 202 /*FUNCTION Tetra::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype) (THIS ONE??){{{*/ 203 void Tetra::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){ 189 void Tetra::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){/*{{{*/ 204 190 205 191 Input* input=inputs->GetInput(enumtype); … … 213 199 } 214 200 /*}}}*/ 215 /*FUNCTION Tetra::GetNodeIndex (THIS ONE){{{*/ 216 int Tetra::GetNodeIndex(Node* node){ 201 int Tetra::GetNodeIndex(Node* node){/*{{{*/ 217 202 218 203 _assert_(nodes); … … 226 211 } 227 212 /*}}}*/ 228 /*FUNCTION Tetra::GetNumberOfNodes;{{{*/ 229 int Tetra::GetNumberOfNodes(void){ 213 int Tetra::GetNumberOfNodes(void){/*{{{*/ 230 214 return this->NumberofNodes(); 231 215 } 232 216 /*}}}*/ 233 /*FUNCTION Tetra::GetNumberOfVertices;{{{*/ 234 int Tetra::GetNumberOfVertices(void){ 217 int Tetra::GetNumberOfVertices(void){/*{{{*/ 235 218 return NUMVERTICES; 236 219 } 237 220 /*}}}*/ 238 /*FUNCTION Tetra::GetVerticesCoordinatesBase(IssmDouble** pxyz_list){{{*/ 239 void Tetra::GetVerticesCoordinatesBase(IssmDouble** pxyz_list){ 221 void Tetra::GetVerticesCoordinatesBase(IssmDouble** pxyz_list){/*{{{*/ 240 222 241 223 int indices[3]; … … 254 236 255 237 }/*}}}*/ 256 /*FUNCTION Tetra::GetVerticesCoordinatesTop(IssmDouble** pxyz_list){{{*/ 257 void Tetra::GetVerticesCoordinatesTop(IssmDouble** pxyz_list){ 238 void Tetra::GetVerticesCoordinatesTop(IssmDouble** pxyz_list){/*{{{*/ 258 239 259 240 int indices[3]; … … 272 253 273 254 }/*}}}*/ 274 /*FUNCTION Tetra::HasFaceOnBase{{{*/ 275 bool Tetra::HasFaceOnBase(){ 255 bool Tetra::HasFaceOnBase(){/*{{{*/ 276 256 277 257 IssmDouble values[NUMVERTICES]; … … 292 272 } 293 273 /*}}}*/ 294 /*FUNCTION Tetra::HasFaceOnSurface{{{*/ 295 bool Tetra::HasFaceOnSurface(){ 274 bool Tetra::HasFaceOnSurface(){/*{{{*/ 296 275 297 276 IssmDouble values[NUMVERTICES]; … … 312 291 } 313 292 /*}}}*/ 314 /*FUNCTION Tetra::InputUpdateFromIoModel {{{*/ 315 void Tetra::InputUpdateFromIoModel(int index,IoModel* iomodel){ 293 void Tetra::InputUpdateFromIoModel(int index,IoModel* iomodel){ /*{{{*/ 316 294 317 295 /*Intermediaries*/ … … 416 394 } 417 395 /*}}}*/ 418 /*FUNCTION Tetra::InputUpdateFromSolutionOneDof{{{*/ 419 void Tetra::InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type){ 396 void Tetra::InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type){/*{{{*/ 420 397 421 398 /*Intermediary*/ … … 443 420 } 444 421 /*}}}*/ 445 /*FUNCTION Tetra::IsOnBase {{{*/ 446 bool Tetra::IsOnBase(){ 422 bool Tetra::IsOnBase(){/*{{{*/ 447 423 return HasFaceOnBase(); 448 424 } 449 425 /*}}}*/ 450 /*FUNCTION Tetra::IsOnSurface {{{*/ 451 bool Tetra::IsOnSurface(){ 426 bool Tetra::IsOnSurface(){/*{{{*/ 452 427 return HasFaceOnSurface(); 453 428 } 454 429 /*}}}*/ 455 bool Tetra::IsIcefront(void){/*{{{*/430 bool Tetra::IsIcefront(void){/*{{{*/ 456 431 457 432 /*Retrieve all inputs and parameters*/ … … 467 442 return false; 468 443 }/*}}}*/ 469 /*FUNCTION Tetra::JacobianDeterminant{{{*/ 470 void Tetra::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){ 444 void Tetra::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 471 445 472 446 _assert_(gauss->Enum()==GaussTetraEnum); … … 475 449 } 476 450 /*}}}*/ 477 /*FUNCTION Tetra::JacobianDeterminantSurface{{{*/ 478 void Tetra::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){ 451 void Tetra::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 479 452 480 453 _assert_(gauss->Enum()==GaussTetraEnum); … … 483 456 } 484 457 /*}}}*/ 485 /*FUNCTION Tetra::JacobianDeterminantBase{{{*/ 486 void Tetra::JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){ 458 void Tetra::JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){/*{{{*/ 487 459 488 460 _assert_(gauss->Enum()==GaussTetraEnum); … … 491 463 } 492 464 /*}}}*/ 493 /*FUNCTION Tetra::JacobianDeterminantTop{{{*/ 494 void Tetra::JacobianDeterminantTop(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){ 465 void Tetra::JacobianDeterminantTop(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){/*{{{*/ 495 466 496 467 _assert_(gauss->Enum()==GaussTetraEnum); … … 499 470 } 500 471 /*}}}*/ 501 /*FUNCTION Tetra::NewGauss(){{{*/ 502 Gauss* Tetra::NewGauss(void){ 472 Gauss* Tetra::NewGauss(void){/*{{{*/ 503 473 return new GaussTetra(); 504 474 } 505 475 /*}}}*/ 506 /*FUNCTION Tetra::NewGauss(int order){{{*/ 507 Gauss* Tetra::NewGauss(int order){ 476 Gauss* Tetra::NewGauss(int order){/*{{{*/ 508 477 return new GaussTetra(order); 509 478 } 510 479 /*}}}*/ 511 /*FUNCTION Tetra::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){{{*/ 512 Gauss* Tetra::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){ 480 Gauss* Tetra::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){/*{{{*/ 513 481 /*FIXME: this is messed up, should provide indices and not xyz_list!*/ 514 482 int indices[3]; … … 517 485 } 518 486 /*}}}*/ 519 /*FUNCTION Tetra::NewGaussBase(int order){{{*/ 520 Gauss* Tetra::NewGaussBase(int order){ 487 Gauss* Tetra::NewGaussBase(int order){/*{{{*/ 521 488 522 489 int indices[3]; … … 525 492 } 526 493 /*}}}*/ 527 /*FUNCTION Tetra::NewGaussTop(int order){{{*/ 528 Gauss* Tetra::NewGaussTop(int order){ 494 Gauss* Tetra::NewGaussTop(int order){/*{{{*/ 529 495 530 496 int indices[3]; … … 533 499 } 534 500 /*}}}*/ 535 /*FUNCTION Tetra::NodalFunctions{{{*/ 536 void Tetra::NodalFunctions(IssmDouble* basis, Gauss* gauss){ 501 void Tetra::NodalFunctions(IssmDouble* basis, Gauss* gauss){/*{{{*/ 537 502 538 503 _assert_(gauss->Enum()==GaussTetraEnum); … … 541 506 } 542 507 /*}}}*/ 543 /*FUNCTION Tetra::NodalFunctionsVelocity{{{*/ 544 void Tetra::NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss){ 508 void Tetra::NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss){/*{{{*/ 545 509 546 510 _assert_(gauss->Enum()==GaussTetraEnum); … … 549 513 } 550 514 /*}}}*/ 551 /*FUNCTION Tetra::NodalFunctionsPressure{{{*/ 552 void Tetra::NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss){ 515 void Tetra::NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss){/*{{{*/ 553 516 554 517 _assert_(gauss->Enum()==GaussTetraEnum); … … 557 520 } 558 521 /*}}}*/ 559 /*FUNCTION Tetra::NodalFunctionsTensor{{{*/ 560 void Tetra::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){ 522 void Tetra::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){/*{{{*/ 561 523 562 524 _assert_(gauss->Enum()==GaussTetraEnum); … … 565 527 } 566 528 /*}}}*/ 567 /*FUNCTION Tetra::NodalFunctionsDerivatives{{{*/ 568 void Tetra::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){ 529 void Tetra::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 569 530 570 531 _assert_(gauss->Enum()==GaussTetraEnum); … … 573 534 } 574 535 /*}}}*/ 575 /*FUNCTION Tetra::NodalFunctionsDerivativesVelocity{{{*/ 576 void Tetra::NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){ 536 void Tetra::NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 577 537 578 538 _assert_(gauss->Enum()==GaussTetraEnum); … … 581 541 } 582 542 /*}}}*/ 583 /*FUNCTION Tetra::NormalSection{{{*/ 584 void Tetra::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){ 543 void Tetra::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){/*{{{*/ 585 544 586 545 /*Build unit outward pointing vector*/ … … 602 561 } 603 562 /*}}}*/ 604 /*FUNCTION Tetra::NormalBase (THIS ONE){{{*/ 605 void Tetra::NormalBase(IssmDouble* bed_normal,IssmDouble* xyz_list){ 563 void Tetra::NormalBase(IssmDouble* bed_normal,IssmDouble* xyz_list){/*{{{*/ 606 564 607 565 IssmDouble v13[3],v23[3]; … … 627 585 } 628 586 /*}}}*/ 629 /*FUNCTION Tetra::NormalTop (THIS ONE){{{*/ 630 void Tetra::NormalTop(IssmDouble* top_normal,IssmDouble* xyz_list){ 587 void Tetra::NormalTop(IssmDouble* top_normal,IssmDouble* xyz_list){/*{{{*/ 631 588 632 589 IssmDouble v13[3],v23[3]; … … 650 607 } 651 608 /*}}}*/ 652 /*FUNCTION Tetra::NumberofNodesPressure{{{*/ 653 int Tetra::NumberofNodesPressure(void){ 609 int Tetra::NumberofNodesPressure(void){/*{{{*/ 654 610 return TetraRef::NumberofNodes(this->PressureInterpolation()); 655 611 } 656 612 /*}}}*/ 657 /*FUNCTION Tetra::NumberofNodesVelocity{{{*/ 658 int Tetra::NumberofNodesVelocity(void){ 613 int Tetra::NumberofNodesVelocity(void){/*{{{*/ 659 614 return TetraRef::NumberofNodes(this->VelocityInterpolation()); 660 615 } 661 616 /*}}}*/ 662 /*FUNCTION Tetra::ReduceMatrices{{{*/ 663 void Tetra::ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){ 617 void Tetra::ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){/*{{{*/ 664 618 665 619 if(pe){ … … 696 650 } 697 651 /*}}}*/ 698 /*FUNCTION Tetra::ResetFSBasalBoundaryCondition {{{*/ 699 void Tetra::ResetFSBasalBoundaryCondition(void){ 652 void Tetra::ResetFSBasalBoundaryCondition(void){/*{{{*/ 700 653 701 654 int numnodes = this->GetNumberOfNodes(); … … 756 709 } 757 710 /*}}}*/ 758 /*FUNCTION Tetra::SetCurrentConfiguration {{{*/ 759 void Tetra::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){ 711 void Tetra::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){/*{{{*/ 760 712 761 713 /*go into parameters and get the analysis_counter: */ … … 772 724 } 773 725 /*}}}*/ 774 /*FUNCTION Tetra::SpawnBasalElement{{{*/ 775 Element* Tetra::SpawnBasalElement(void){ 726 Element* Tetra::SpawnBasalElement(void){/*{{{*/ 776 727 777 728 _assert_(HasFaceOnBase()); … … 781 732 return SpawnTria(index1,index2,index3); 782 733 }/*}}}*/ 783 /*FUNCTION Tetra::SpawnTopElement{{{*/ 784 Element* Tetra::SpawnTopElement(void){ 734 Element* Tetra::SpawnTopElement(void){/*{{{*/ 785 735 786 736 _assert_(HasFaceOnSurface()); … … 790 740 return SpawnTria(index1,index2,index3); 791 741 }/*}}}*/ 792 /*FUNCTION Tetra::SpawnTria{{{*/ 793 Tria* Tetra::SpawnTria(int index1,int index2,int index3){ 742 Tria* Tetra::SpawnTria(int index1,int index2,int index3){/*{{{*/ 794 743 795 744 int analysis_counter; … … 818 767 } 819 768 /*}}}*/ 820 /*FUNCTION Tetra::Update {{{*/ 821 void Tetra::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type,int finiteelement_type){ 769 void Tetra::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type,int finiteelement_type){ /*{{{*/ 822 770 823 771 /*Intermediaries*/ … … 923 871 } 924 872 /*}}}*/ 925 /*FUNCTION Tetra::VelocityInterpolation{{{*/ 926 int Tetra::VelocityInterpolation(void){ 873 int Tetra::VelocityInterpolation(void){/*{{{*/ 927 874 return TetraRef::VelocityInterpolation(); 928 875 } 929 876 /*}}}*/ 930 /*FUNCTION Tetra::ViscousHeating (THIS ONE){{{*/ 931 void Tetra::ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){ 877 void Tetra::ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){/*{{{*/ 932 878 933 879 /*Intermediaries*/ … … 945 891 } 946 892 /*}}}*/ 947 /*FUNCTION Tetra::PressureInterpolation{{{*/ 948 int Tetra::PressureInterpolation(void){ 893 int Tetra::PressureInterpolation(void){/*{{{*/ 949 894 return TetraRef::PressureInterpolation(); 950 895 } 951 896 /*}}}*/ 952 /*FUNCTION Tetra::TensorInterpolation{{{*/ 953 int Tetra::TensorInterpolation(void){ 897 int Tetra::TensorInterpolation(void){/*{{{*/ 954 898 return TetraRef::TensorInterpolation(); 955 899 } 956 900 /*}}}*/ 957 /*FUNCTION Tetra::ZeroLevelsetCoordinates{{{*/ 958 void Tetra::ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){ 901 void Tetra::ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){/*{{{*/ 959 902 /*Compute portion of the element that is grounded*/ 960 903 -
issm/trunk-jpl/src/c/classes/Elements/TetraRef.cpp
r17875 r17962 4 4 5 5 /*Headers:*/ 6 /*{{{*/ 6 /*{{{*//*{{{*/ 7 7 #ifdef HAVE_CONFIG_H 8 8 #include <config.h> … … 22 22 23 23 /*Object constructors and destructor*/ 24 /*FUNCTION TetraRef::TetraRef(){{{*/ 25 TetraRef::TetraRef(){ 24 TetraRef::TetraRef(){/*{{{*/ 26 25 this->element_type_list=NULL; 27 26 } 28 27 /*}}}*/ 29 /*FUNCTION TetraRef::TetraRef(int* types,int nummodels){{{*/ 30 TetraRef::TetraRef(const int nummodels){ 28 TetraRef::TetraRef(const int nummodels){/*{{{*/ 31 29 32 30 /*Only allocate pointer*/ … … 35 33 } 36 34 /*}}}*/ 37 /*FUNCTION TetraRef::~TetraRef(){{{*/ 38 TetraRef::~TetraRef(){ 35 TetraRef::~TetraRef(){/*{{{*/ 39 36 xDelete<int>(element_type_list); 40 37 } … … 42 39 43 40 /*Management*/ 44 /*FUNCTION TetraRef::SetElementType{{{*/ 45 void TetraRef::SetElementType(int type,int type_counter){ 41 void TetraRef::SetElementType(int type,int type_counter){/*{{{*/ 46 42 47 43 /*initialize element type*/ … … 51 47 52 48 /*Reference Element numerics*/ 53 /*FUNCTION TetraRef::GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss){{{*/ 54 void TetraRef::GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss){ 49 void TetraRef::GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss){/*{{{*/ 55 50 /*This routine returns the values of the nodal functions at the gaussian point.*/ 56 51 _assert_(basis); … … 58 53 } 59 54 /*}}}*/ 60 /*FUNCTION TetraRef::GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss,int finiteelement){{{*/ 61 void TetraRef::GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss,int finiteelement){ 55 void TetraRef::GetNodalFunctions(IssmDouble* basis,GaussTetra* gauss,int finiteelement){/*{{{*/ 62 56 /*This routine returns the values of the nodal functions at the gaussian point.*/ 63 57 … … 102 96 } 103 97 /*}}}*/ 104 /*FUNCTION TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){{{*/ 105 void TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){ 98 void TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss){/*{{{*/ 106 99 GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss,this->element_type); 107 100 } 108 101 /*}}}*/ 109 /*FUNCTION TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss,int finiteelement){{{*/ 110 void TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss,int finiteelement){ 102 void TetraRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTetra* gauss,int finiteelement){/*{{{*/ 111 103 112 104 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 141 133 } 142 134 /*}}}*/ 143 /*FUNCTION TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss){{{*/ 144 void TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss){ 135 void TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss){/*{{{*/ 145 136 /*This routine returns the values of the nodal functions derivatives (with respect to the 146 137 * natural coordinate system) at the gaussian point. */ … … 150 141 } 151 142 /*}}}*/ 152 /*FUNCTION TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss,int finiteelement){{{*/ 153 void TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss,int finiteelement){ 143 void TetraRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,GaussTetra* gauss,int finiteelement){/*{{{*/ 154 144 /*This routine returns the values of the nodal functions derivatives (with respect to the 155 145 * natural coordinate system) at the gaussian point. */ … … 249 239 } 250 240 /*}}}*/ 251 /*FUNCTION TetraRef::GetInputDerivativeValue{{{*/ 252 void TetraRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, GaussTetra* gauss){ 241 void TetraRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, GaussTetra* gauss){/*{{{*/ 253 242 /*From node values of parameter p (p_list[0], p_list[1], p_list[2], 254 243 * p_list[3], p_list[4] and p_list[4]), return parameter derivative value at … … 285 274 } 286 275 /*}}}*/ 287 /*FUNCTION TetraRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTetra* gauss){{{*/ 288 void TetraRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTetra* gauss){ 276 void TetraRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTetra* gauss){/*{{{*/ 289 277 290 278 GetInputValue(p,plist,gauss,this->element_type); 291 279 } 292 280 /*}}}*/ 293 /*FUNCTION TetraRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTetra* gauss,int finiteelement){{{*/ 294 void TetraRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTetra* gauss,int finiteelement){ 281 void TetraRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTetra* gauss,int finiteelement){/*{{{*/ 295 282 296 283 /*Output*/ … … 312 299 } 313 300 /*}}}*/ 314 /*FUNCTION TetraRef::GetJacobian{{{*/ 315 void TetraRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussTetra* gauss){ 301 void TetraRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussTetra* gauss){/*{{{*/ 316 302 /*The Jacobian is constant over the element, discard the gaussian points. 317 303 * J is assumed to have been allocated of size 1*/ … … 345 331 } 346 332 /*}}}*/ 347 /*FUNCTION TetraRef::GetJacobianDeterminant{{{*/ 348 void TetraRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTetra* gauss){ 333 void TetraRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTetra* gauss){/*{{{*/ 349 334 /*The Jacobian determinant is constant over the element, discard the gaussian points. 350 335 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 360 345 } 361 346 /*}}}*/ 362 /*FUNCTION TetraRef::GetJacobianDeterminantFace{{{*/ 363 void TetraRef::GetJacobianDeterminantFace(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTetra* gauss){ 347 void TetraRef::GetJacobianDeterminantFace(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTetra* gauss){/*{{{*/ 364 348 /*The Jacobian determinant is constant over the element, discard the gaussian points. 365 349 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 380 364 } 381 365 /*}}}*/ 382 /*FUNCTION TetraRef::GetJacobianInvert {{{*/ 383 void TetraRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussTetra* gauss){ 366 void TetraRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussTetra* gauss){/*{{{*/ 384 367 385 368 /*Jacobian*/ … … 393 376 } 394 377 /*}}}*/ 395 /*FUNCTION TetraRef::NumberofNodes(){{{*/ 396 int TetraRef::NumberofNodes(void){ 378 int TetraRef::NumberofNodes(void){/*{{{*/ 397 379 398 380 return this->NumberofNodes(this->element_type); 399 381 } 400 382 /*}}}*/ 401 /*FUNCTION TetraRef::NumberofNodes(int finiteelement){{{*/ 402 int TetraRef::NumberofNodes(int finiteelement){ 383 int TetraRef::NumberofNodes(int finiteelement){/*{{{*/ 403 384 404 385 switch(finiteelement){ … … 420 401 } 421 402 /*}}}*/ 422 /*FUNCTION TetraRef::VelocityInterpolation{{{*/ 423 int TetraRef::VelocityInterpolation(void){ 403 int TetraRef::VelocityInterpolation(void){/*{{{*/ 424 404 425 405 switch(this->element_type){ … … 435 415 } 436 416 /*}}}*/ 437 /*FUNCTION TetraRef::PressureInterpolation{{{*/ 438 int TetraRef::PressureInterpolation(void){ 417 int TetraRef::PressureInterpolation(void){/*{{{*/ 439 418 440 419 switch(this->element_type){ … … 449 428 return -1; 450 429 }/*}}}*/ 451 /*FUNCTION TetraRef::TensorInterpolation{{{*/ 452 int TetraRef::TensorInterpolation(void){ 430 int TetraRef::TensorInterpolation(void){/*{{{*/ 453 431 /*This routine returns the values of the nodal functions at the gaussian point.*/ 454 432 -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17943 r17962 24 24 25 25 /*Constructors/destructor/copy*/ 26 /*FUNCTION Tria::Tria(int id, int sid,int index, IoModel* iomodel,int nummodels){{{*/ 27 Tria::Tria(int tria_id, int tria_sid, int index, IoModel* iomodel,int nummodels) 26 Tria::Tria(int tria_id, int tria_sid, int index, IoModel* iomodel,int nummodels)/*{{{*/ 28 27 :TriaRef(nummodels),ElementHook(nummodels,index+1,NUMVERTICES,iomodel){ 29 28 … … 45 44 } 46 45 /*}}}*/ 47 /*FUNCTION Tria::~Tria(){{{*/ 48 Tria::~Tria(){ 46 Tria::~Tria(){/*{{{*/ 49 47 this->parameters=NULL; 50 48 } 51 49 /*}}}*/ 52 /*FUNCTION Tria::copy {{{*/ 53 Object* Tria::copy() { 50 Object* Tria::copy() {/*{{{*/ 54 51 55 52 int i; … … 95 92 96 93 /*Other*/ 97 /*FUNCTION Tria::AddBasalInput{{{*/ 98 void Tria::AddBasalInput(int input_enum,IssmDouble* values, int interpolation_enum){ 94 void Tria::AddBasalInput(int input_enum,IssmDouble* values, int interpolation_enum){/*{{{*/ 99 95 100 96 /*Call inputs method*/ … … 128 124 } 129 125 /*}}}*/ 130 /*FUNCTION Tria::AddInput{{{*/ 131 void Tria::AddInput(int input_enum,IssmDouble* values, int interpolation_enum){ 126 void Tria::AddInput(int input_enum,IssmDouble* values, int interpolation_enum){/*{{{*/ 132 127 133 128 /*Call inputs method*/ … … 136 131 } 137 132 /*}}}*/ 138 /*FUNCTION Tria::CharacteristicLength{{{*/ 139 IssmDouble Tria::CharacteristicLength(void){ 133 IssmDouble Tria::CharacteristicLength(void){/*{{{*/ 140 134 141 135 return sqrt(2*this->GetArea()); 142 136 } 143 137 /*}}}*/ 144 /*FUNCTION Tria::ComputeBasalStress {{{*/ 145 void Tria::ComputeBasalStress(Vector<IssmDouble>* eps){ 138 void Tria::ComputeBasalStress(Vector<IssmDouble>* eps){/*{{{*/ 146 139 _error_("Not Implemented yet"); 147 140 } 148 141 /*}}}*/ 149 /*FUNCTION Tria::ComputeSigmaNN {{{*/ 150 void Tria::ComputeSigmaNN(){ 142 void Tria::ComputeSigmaNN(){/*{{{*/ 151 143 152 144 if(!IsOnBase()){ … … 205 197 } 206 198 /*}}}*/ 207 /*FUNCTION Tria::ComputeStrainRate {{{*/ 208 void Tria::ComputeStrainRate(){ 199 void Tria::ComputeStrainRate(){/*{{{*/ 209 200 210 201 IssmDouble xyz_list[NUMVERTICES][3]; … … 251 242 } 252 243 /*}}}*/ 253 /*FUNCTION Tria::ComputeStressTensor {{{*/ 254 void Tria::ComputeStressTensor(){ 244 void Tria::ComputeStressTensor(){/*{{{*/ 255 245 256 246 IssmDouble xyz_list[NUMVERTICES][3]; … … 304 294 } 305 295 /*}}}*/ 306 /*FUNCTION Tria::ComputeDeviatoricStressTensor {{{*/ 307 void Tria::ComputeDeviatoricStressTensor(){ 296 void Tria::ComputeDeviatoricStressTensor(){/*{{{*/ 308 297 309 298 IssmDouble xyz_list[NUMVERTICES][3]; … … 355 344 } 356 345 /*}}}*/ 357 /*FUNCTION Tria::Configure {{{*/ 358 void Tria::Configure(Elements* elementsin, Loads* loadsin,Nodes* nodesin,Vertices *verticesin,Materials* materialsin, Parameters* parametersin){ 346 void Tria::Configure(Elements* elementsin, Loads* loadsin,Nodes* nodesin,Vertices *verticesin,Materials* materialsin, Parameters* parametersin){/*{{{*/ 359 347 360 348 /*go into parameters and get the analysis_counter: */ … … 387 375 } 388 376 /*}}}*/ 389 /*FUNCTION Tria::Delta18oParameterization{{{*/ 390 void Tria::Delta18oParameterization(void){ 377 void Tria::Delta18oParameterization(void){/*{{{*/ 391 378 392 379 int i; … … 458 445 } 459 446 /*}}}*/ 460 /*FUNCTION Tria::ElementSizes{{{*/ 461 void Tria::ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){ 447 void Tria::ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){/*{{{*/ 462 448 463 449 IssmDouble xyz_list[NUMVERTICES][3]; … … 482 468 } 483 469 /*}}}*/ 484 /*FUNCTION Tria::FiniteElement{{{*/ 485 int Tria::FiniteElement(void){ 470 int Tria::FiniteElement(void){/*{{{*/ 486 471 return this->element_type; 487 472 } 488 473 /*}}}*/ 489 /*FUNCTION Tria::ObjectEnum{{{*/ 490 int Tria::ObjectEnum(void){ 474 int Tria::ObjectEnum(void){/*{{{*/ 491 475 492 476 return TriaEnum; … … 494 478 } 495 479 /*}}}*/ 496 /*FUNCTION Tria::GetArea {{{*/ 497 IssmDouble Tria::GetArea(void){ 480 IssmDouble Tria::GetArea(void){/*{{{*/ 498 481 499 482 IssmDouble xyz_list[NUMVERTICES][3]; … … 510 493 } 511 494 /*}}}*/ 512 /*FUNCTION Tria::GetAreaCoordinates{{{*/ 513 void Tria::GetAreaCoordinates(IssmDouble* area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints){ 495 void Tria::GetAreaCoordinates(IssmDouble* area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints){/*{{{*/ 514 496 /*Computeportion of the element that is grounded*/ 515 497 … … 546 528 } 547 529 /*}}}*/ 548 /*FUNCTION Tria::GetElementType {{{*/ 549 int Tria::GetElementType(){ 530 int Tria::GetElementType(){/*{{{*/ 550 531 551 532 /*return TriaRef field*/ … … 554 535 } 555 536 /*}}}*/ 556 /*FUNCTION Tria::GetGroundedPart{{{*/ 557 void Tria::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){ 537 void Tria::GetGroundedPart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlyfloating){/*{{{*/ 558 538 /*Computeportion of the element that is grounded*/ 559 539 … … 608 588 } 609 589 /*}}}*/ 610 /*FUNCTION Tria::GetGroundedPortion{{{*/ 611 IssmDouble Tria::GetGroundedPortion(IssmDouble* xyz_list){ 590 IssmDouble Tria::GetGroundedPortion(IssmDouble* xyz_list){/*{{{*/ 612 591 /*Computeportion of the element that is grounded*/ 613 592 … … 727 706 } 728 707 /*}}}*/ 729 /*FUNCTION Tria::GetVerticesCoordinatesBase(IssmDouble** pxyz_list){{{*/ 730 void Tria::GetVerticesCoordinatesBase(IssmDouble** pxyz_list){ 708 void Tria::GetVerticesCoordinatesBase(IssmDouble** pxyz_list){/*{{{*/ 731 709 732 710 int indices[2]; … … 745 723 746 724 }/*}}}*/ 747 /*FUNCTION Tria::GetVerticesCoordinatesTop(IssmDouble** pxyz_list){{{*/ 748 void Tria::GetVerticesCoordinatesTop(IssmDouble** pxyz_list){ 725 void Tria::GetVerticesCoordinatesTop(IssmDouble** pxyz_list){/*{{{*/ 749 726 750 727 int indices[2]; … … 763 740 764 741 }/*}}}*/ 765 /*FUNCTION Tria::NormalSection{{{*/ 766 void Tria::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){ 742 void Tria::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){/*{{{*/ 767 743 768 744 /*Build unit outward pointing vector*/ … … 779 755 } 780 756 /*}}}*/ 781 /*FUNCTION Tria::ZeroLevelsetCoordinates{{{*/ 782 void Tria::ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){ 757 void Tria::ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){/*{{{*/ 783 758 784 759 int normal_orientation=0; … … 874 849 } 875 850 /*}}}*/ 876 void Tria::GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){/*{{{*/851 void Tria::GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){/*{{{*/ 877 852 878 853 /* Intermediaries */ … … 914 889 xDelete<int>(indicesfront); 915 890 }/*}}}*/ 916 /*FUNCTION Tria::GetNodeIndex {{{*/ 917 int Tria::GetNodeIndex(Node* node){ 891 int Tria::GetNodeIndex(Node* node){/*{{{*/ 918 892 919 893 _assert_(nodes); … … 925 899 } 926 900 /*}}}*/ 927 /*FUNCTION Tria::GetNumberOfNodes;{{{*/ 928 int Tria::GetNumberOfNodes(void){ 901 int Tria::GetNumberOfNodes(void){/*{{{*/ 929 902 return this->NumberofNodes(); 930 903 } 931 904 /*}}}*/ 932 /*FUNCTION Tria::GetNumberOfVertices;{{{*/ 933 int Tria::GetNumberOfVertices(void){ 905 int Tria::GetNumberOfVertices(void){/*{{{*/ 934 906 return NUMVERTICES; 935 907 } 936 908 /*}}}*/ 937 /*FUNCTION Tria::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype) {{{*/ 938 void Tria::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){ 909 void Tria::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){/*{{{*/ 939 910 940 911 Input* input=inputs->GetInput(enumtype); … … 948 919 } 949 920 /*}}}*/ 950 Node* Tria::GetNode(int node_number){/*{{{*/921 Node* Tria::GetNode(int node_number){/*{{{*/ 951 922 _assert_(node_number>=0); 952 923 _assert_(node_number<this->NumberofNodes()); … … 954 925 955 926 }/*}}}*/ 956 /*FUNCTION Tria::InputDepthAverageAtBase {{{*/ 957 void Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type){ 927 void Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type){/*{{{*/ 958 928 959 929 /*New input*/ … … 973 943 } 974 944 /*}}}*/ 975 /*FUNCTION Tria::InputScale{{{*/ 976 void Tria::InputScale(int enum_type,IssmDouble scale_factor){ 945 void Tria::InputScale(int enum_type,IssmDouble scale_factor){/*{{{*/ 977 946 978 947 Input* input=NULL; … … 986 955 } 987 956 /*}}}*/ 988 /*FUNCTION Tria::InputUpdateFromIoModel{{{*/ 989 void Tria::InputUpdateFromIoModel(int index, IoModel* iomodel){ //i is the element index 957 void Tria::InputUpdateFromIoModel(int index, IoModel* iomodel){ //i is the element index/*{{{*/ 990 958 991 959 /*Intermediaries*/ … … 1084 1052 } 1085 1053 /*}}}*/ 1086 /*FUNCTION Tria::InputUpdateFromSolutionOneDof{{{*/ 1087 void Tria::InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type){ 1054 void Tria::InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type){/*{{{*/ 1088 1055 1089 1056 /*Intermediary*/ … … 1111 1078 } 1112 1079 /*}}}*/ 1113 /*FUNCTION Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type);{{{*/ 1114 void Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type){ 1080 void Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/ 1115 1081 1116 1082 /*Check that name is an element input*/ … … 1177 1143 } 1178 1144 /*}}}*/ 1179 /*FUNCTION Tria::IsOnBase {{{*/ 1180 bool Tria::IsOnBase(){ 1145 bool Tria::IsOnBase(){/*{{{*/ 1181 1146 1182 1147 int domaintype; … … 1191 1156 } 1192 1157 /*}}}*/ 1193 /*FUNCTION Tria::IsOnSurface {{{*/ 1194 bool Tria::IsOnSurface(){ 1158 bool Tria::IsOnSurface(){/*{{{*/ 1195 1159 1196 1160 int domaintype; … … 1205 1169 } 1206 1170 /*}}}*/ 1207 /*FUNCTION Tria::JacobianDeterminant{{{*/ 1208 void Tria::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){ 1171 void Tria::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1209 1172 1210 1173 _assert_(gauss->Enum()==GaussTriaEnum); … … 1213 1176 } 1214 1177 /*}}}*/ 1215 /*FUNCTION Tria::JacobianDeterminantBase{{{*/ 1216 void Tria::JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){ 1178 void Tria::JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){/*{{{*/ 1217 1179 1218 1180 _assert_(gauss->Enum()==GaussTriaEnum); … … 1221 1183 } 1222 1184 /*}}}*/ 1223 /*FUNCTION Tria::JacobianDeterminantSurface{{{*/ 1224 void Tria::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){ 1185 void Tria::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1225 1186 1226 1187 _assert_(gauss->Enum()==GaussTriaEnum); … … 1229 1190 } 1230 1191 /*}}}*/ 1231 /*FUNCTION Tria::JacobianDeterminantTop{{{*/ 1232 void Tria::JacobianDeterminantTop(IssmDouble* pJdet,IssmDouble* xyz_list_top,Gauss* gauss){ 1192 void Tria::JacobianDeterminantTop(IssmDouble* pJdet,IssmDouble* xyz_list_top,Gauss* gauss){/*{{{*/ 1233 1193 1234 1194 _assert_(gauss->Enum()==GaussTriaEnum); … … 1237 1197 } 1238 1198 /*}}}*/ 1239 /*FUNCTION Tria::HasEdgeOnBase {{{*/ 1240 bool Tria::HasEdgeOnBase(){ 1199 bool Tria::HasEdgeOnBase(){/*{{{*/ 1241 1200 1242 1201 IssmDouble values[NUMVERTICES]; … … 1259 1218 } 1260 1219 /*}}}*/ 1261 /*FUNCTION Tria::HasEdgeOnSurface {{{*/ 1262 bool Tria::HasEdgeOnSurface(){ 1220 bool Tria::HasEdgeOnSurface(){/*{{{*/ 1263 1221 1264 1222 IssmDouble values[NUMVERTICES]; … … 1281 1239 } 1282 1240 /*}}}*/ 1283 /*FUNCTION Tria::EdgeOnBaseIndices{{{*/ 1284 void Tria::EdgeOnBaseIndices(int* pindex1,int* pindex2){ 1241 void Tria::EdgeOnBaseIndices(int* pindex1,int* pindex2){/*{{{*/ 1285 1242 1286 1243 IssmDouble values[NUMVERTICES]; … … 1302 1259 } 1303 1260 /*}}}*/ 1304 /*FUNCTION Tria::EdgeOnSurfaceIndices{{{*/ 1305 void Tria::EdgeOnSurfaceIndices(int* pindex1,int* pindex2){ 1261 void Tria::EdgeOnSurfaceIndices(int* pindex1,int* pindex2){/*{{{*/ 1306 1262 1307 1263 IssmDouble values[NUMVERTICES]; … … 1323 1279 } 1324 1280 /*}}}*/ 1325 /*FUNCTION Tria::EdgeOnBaseIndex{{{*/ 1326 int Tria::EdgeOnBaseIndex(void){ 1281 int Tria::EdgeOnBaseIndex(void){/*{{{*/ 1327 1282 1328 1283 IssmDouble values[NUMVERTICES]; … … 1342 1297 } 1343 1298 /*}}}*/ 1344 /*FUNCTION Tria::EdgeOnSurfaceIndex{{{*/ 1345 int Tria::EdgeOnSurfaceIndex(void){ 1299 int Tria::EdgeOnSurfaceIndex(void){/*{{{*/ 1346 1300 1347 1301 IssmDouble values[NUMVERTICES]; … … 1361 1315 } 1362 1316 /*}}}*/ 1363 /*FUNCTION Tria::FSContactMigration{{{*/ 1364 void Tria::FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){ 1317 void Tria::FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){/*{{{*/ 1365 1318 1366 1319 if(!IsOnBase()) return; … … 1441 1394 } 1442 1395 /*}}}*/ 1443 /*FUNCTION Tria::IsNodeOnShelfFromFlags {{{*/ 1444 bool Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){ 1396 bool Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){/*{{{*/ 1445 1397 1446 1398 int i; … … 1456 1408 } 1457 1409 /*}}}*/ 1458 /*FUNCTION Tria::NewGauss(){{{*/ 1459 Gauss* Tria::NewGauss(void){ 1410 Gauss* Tria::NewGauss(void){/*{{{*/ 1460 1411 return new GaussTria(); 1461 1412 } 1462 1413 /*}}}*/ 1463 /*FUNCTION Tria::NewGauss(int order){{{*/ 1464 Gauss* Tria::NewGauss(int order){ 1414 Gauss* Tria::NewGauss(int order){/*{{{*/ 1465 1415 return new GaussTria(order); 1466 1416 } 1467 1417 /*}}}*/ 1468 /*FUNCTION Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){{{*/ 1469 Gauss* Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){ 1418 Gauss* Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){/*{{{*/ 1470 1419 1471 1420 IssmDouble area_coordinates[2][3]; … … 1474 1423 } 1475 1424 /*}}}*/ 1476 /*FUNCTION Tria::NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating){{{*/ 1477 Gauss* Tria::NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){ 1425 Gauss* Tria::NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){/*{{{*/ 1478 1426 1479 1427 return new GaussTria(point1,fraction1,fraction2,mainlyfloating,order); 1480 1428 } 1481 1429 /*}}}*/ 1482 /*FUNCTION Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){{{*/ 1483 Gauss* Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){ 1430 Gauss* Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){/*{{{*/ 1484 1431 1485 1432 IssmDouble area_coordinates[2][3]; … … 1488 1435 } 1489 1436 /*}}}*/ 1490 /*FUNCTION Tria::NewGaussBase(int order){{{*/ 1491 Gauss* Tria::NewGaussBase(int order){ 1437 Gauss* Tria::NewGaussBase(int order){/*{{{*/ 1492 1438 1493 1439 int indices[2]; … … 1496 1442 } 1497 1443 /*}}}*/ 1498 /*FUNCTION Tria::NewGaussTop(int order){{{*/ 1499 Gauss* Tria::NewGaussTop(int order){ 1444 Gauss* Tria::NewGaussTop(int order){/*{{{*/ 1500 1445 1501 1446 int indices[2]; … … 1504 1449 } 1505 1450 /*}}}*/ 1506 /*FUNCTION Tria::NodalFunctions{{{*/ 1507 void Tria::NodalFunctions(IssmDouble* basis, Gauss* gauss){ 1451 void Tria::NodalFunctions(IssmDouble* basis, Gauss* gauss){/*{{{*/ 1508 1452 1509 1453 _assert_(gauss->Enum()==GaussTriaEnum); … … 1512 1456 } 1513 1457 /*}}}*/ 1514 /*FUNCTION Tria::NodalFunctionsDerivatives{{{*/ 1515 void Tria::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){ 1458 void Tria::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1516 1459 1517 1460 _assert_(gauss->Enum()==GaussTriaEnum); … … 1520 1463 } 1521 1464 /*}}}*/ 1522 /*FUNCTION Tria::NodalFunctionsDerivativesVelocity{{{*/ 1523 void Tria::NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){ 1465 void Tria::NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 1524 1466 1525 1467 _assert_(gauss->Enum()==GaussTriaEnum); … … 1528 1470 } 1529 1471 /*}}}*/ 1530 /*FUNCTION Tria::NodalFunctionsVelocity{{{*/ 1531 void Tria::NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss){ 1472 void Tria::NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss){/*{{{*/ 1532 1473 1533 1474 _assert_(gauss->Enum()==GaussTriaEnum); … … 1536 1477 } 1537 1478 /*}}}*/ 1538 /*FUNCTION Tria::NodalFunctionsPressure{{{*/ 1539 void Tria::NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss){ 1479 void Tria::NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss){/*{{{*/ 1540 1480 1541 1481 _assert_(gauss->Enum()==GaussTriaEnum); … … 1544 1484 } 1545 1485 /*}}}*/ 1546 /*FUNCTION Tria::NodalFunctionsTensor{{{*/ 1547 void Tria::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){ 1486 void Tria::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){/*{{{*/ 1548 1487 1549 1488 _assert_(gauss->Enum()==GaussTriaEnum); … … 1552 1491 } 1553 1492 /*}}}*/ 1554 /*FUNCTION Tria::NodalValue {{{*/ 1555 int Tria::NodalValue(IssmDouble* pvalue, int index, int natureofdataenum){ 1493 int Tria::NodalValue(IssmDouble* pvalue, int index, int natureofdataenum){/*{{{*/ 1556 1494 1557 1495 int found = 0; … … 1585 1523 } 1586 1524 /*}}}*/ 1587 /*FUNCTION Tria::NormalBase {{{*/ 1588 void Tria::NormalBase(IssmDouble* bed_normal,IssmDouble* xyz_list){ 1525 void Tria::NormalBase(IssmDouble* bed_normal,IssmDouble* xyz_list){/*{{{*/ 1589 1526 1590 1527 /*Build unit outward pointing vector*/ … … 1602 1539 } 1603 1540 /*}}}*/ 1604 /*FUNCTION Tria::NormalTop {{{*/ 1605 void Tria::NormalTop(IssmDouble* top_normal,IssmDouble* xyz_list){ 1541 void Tria::NormalTop(IssmDouble* top_normal,IssmDouble* xyz_list){/*{{{*/ 1606 1542 1607 1543 /*Build unit outward pointing vector*/ … … 1621 1557 } 1622 1558 /*}}}*/ 1623 /*FUNCTION Tria::VelocityInterpolation{{{*/ 1624 int Tria::VelocityInterpolation(void){ 1559 int Tria::VelocityInterpolation(void){/*{{{*/ 1625 1560 return TriaRef::VelocityInterpolation(); 1626 1561 } 1627 1562 /*}}}*/ 1628 /*FUNCTION Tria::PressureInterpolation{{{*/ 1629 int Tria::PressureInterpolation(void){ 1563 int Tria::PressureInterpolation(void){/*{{{*/ 1630 1564 return TriaRef::PressureInterpolation(); 1631 1565 } 1632 1566 /*}}}*/ 1633 /*FUNCTION Tria::TensorInterpolation{{{*/ 1634 int Tria::TensorInterpolation(void){ 1567 int Tria::TensorInterpolation(void){/*{{{*/ 1635 1568 return TriaRef::TensorInterpolation(); 1636 1569 } 1637 1570 /*}}}*/ 1638 /*FUNCTION Tria::NumberofNodesPressure{{{*/ 1639 int Tria::NumberofNodesPressure(void){ 1571 int Tria::NumberofNodesPressure(void){/*{{{*/ 1640 1572 return TriaRef::NumberofNodes(this->PressureInterpolation()); 1641 1573 } 1642 1574 /*}}}*/ 1643 /*FUNCTION Tria::NumberofNodesVelocity{{{*/ 1644 int Tria::NumberofNodesVelocity(void){ 1575 int Tria::NumberofNodesVelocity(void){/*{{{*/ 1645 1576 return TriaRef::NumberofNodes(this->VelocityInterpolation()); 1646 1577 } 1647 1578 /*}}}*/ 1648 /*FUNCTION Tria::PositiveDegreeDay{{{*/ 1649 void Tria::PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){ 1579 void Tria::PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){/*{{{*/ 1650 1580 1651 1581 IssmDouble agd[NUMVERTICES]; // surface mass balance … … 1696 1626 } 1697 1627 /*}}}*/ 1698 /*FUNCTION Tria::ReduceMatrices {{{*/ 1699 void Tria::ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){ 1628 void Tria::ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){/*{{{*/ 1700 1629 1701 1630 /*Static condensation if requested*/ … … 1735 1664 } 1736 1665 /*}}}*/ 1737 /*FUNCTION Tria::ResetFSBasalBoundaryCondition{{{*/ 1738 void Tria::ResetFSBasalBoundaryCondition(void){ 1666 void Tria::ResetFSBasalBoundaryCondition(void){/*{{{*/ 1739 1667 1740 1668 int numnodes = this->NumberofNodesVelocity(); … … 1786 1714 } 1787 1715 /*}}}*/ 1788 /*FUNCTION Tria::SetClone {{{*/ 1789 void Tria::SetClone(int* minranks){ 1716 void Tria::SetClone(int* minranks){/*{{{*/ 1790 1717 1791 1718 _error_("not implemented yet"); 1792 1719 } 1793 1720 /*}}}*/ 1794 /*FUNCTION Tria::SmbGradients{{{*/ 1795 void Tria::SmbGradients(void){ 1721 void Tria::SmbGradients(void){/*{{{*/ 1796 1722 1797 1723 int i; … … 1838 1764 } 1839 1765 /*}}}*/ 1840 /*FUNCTION Tria::SpawnSeg {{{*/ 1841 Seg* Tria::SpawnSeg(int index1,int index2){ 1766 Seg* Tria::SpawnSeg(int index1,int index2){/*{{{*/ 1842 1767 1843 1768 int analysis_counter; … … 1866 1791 } 1867 1792 /*}}}*/ 1868 /*FUNCTION Tria::SpawnBasalElement{{{*/ 1869 Element* Tria::SpawnBasalElement(void){ 1793 Element* Tria::SpawnBasalElement(void){/*{{{*/ 1870 1794 1871 1795 int index1,index2; … … 1885 1809 } 1886 1810 /*}}}*/ 1887 /*FUNCTION Tria::SpawnTopElement{{{*/ 1888 Element* Tria::SpawnTopElement(void){ 1811 Element* Tria::SpawnTopElement(void){/*{{{*/ 1889 1812 1890 1813 int index1,index2; … … 1904 1827 } 1905 1828 /*}}}*/ 1906 /*FUNCTION Tria::SetCurrentConfiguration {{{*/ 1907 void Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){ 1829 void Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){/*{{{*/ 1908 1830 1909 1831 /*go into parameters and get the analysis_counter: */ … … 1920 1842 } 1921 1843 /*}}}*/ 1922 /*FUNCTION Tria::SurfaceArea {{{*/ 1923 IssmDouble Tria::SurfaceArea(void){ 1844 IssmDouble Tria::SurfaceArea(void){/*{{{*/ 1924 1845 1925 1846 IssmDouble S; … … 1948 1869 } 1949 1870 /*}}}*/ 1950 /*FUNCTION Tria::TimeAdapt{{{*/ 1951 IssmDouble Tria::TimeAdapt(void){ 1871 IssmDouble Tria::TimeAdapt(void){/*{{{*/ 1952 1872 1953 1873 /*intermediary: */ … … 1990 1910 } 1991 1911 /*}}}*/ 1992 /*FUNCTION Tria::Update{{{*/ 1993 void Tria::Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finiteelement_type){ 1912 void Tria::Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finiteelement_type){/*{{{*/ 1994 1913 1995 1914 /*Intermediaries*/ … … 2087 2006 } 2088 2007 /*}}}*/ 2089 /*FUNCTION Tria::UpdateConstraintsExtrudeFromBase{{{*/ 2090 void Tria::UpdateConstraintsExtrudeFromBase(void){ 2008 void Tria::UpdateConstraintsExtrudeFromBase(void){/*{{{*/ 2091 2009 2092 2010 if(!HasEdgeOnBase()) return; … … 2112 2030 } 2113 2031 /*}}}*/ 2114 /*FUNCTION Tria::UpdateConstraintsExtrudeFromTop{{{*/ 2115 void Tria::UpdateConstraintsExtrudeFromTop(void){ 2032 void Tria::UpdateConstraintsExtrudeFromTop(void){/*{{{*/ 2116 2033 2117 2034 if(!HasEdgeOnSurface()) return; … … 2135 2052 } 2136 2053 /*}}}*/ 2137 /*FUNCTION Tria::ValueP1OnGauss{{{*/ 2138 void Tria::ValueP1OnGauss(IssmDouble* pvalue,IssmDouble* values,Gauss* gauss){ 2054 void Tria::ValueP1OnGauss(IssmDouble* pvalue,IssmDouble* values,Gauss* gauss){/*{{{*/ 2139 2055 TriaRef::GetInputValue(pvalue,values,gauss,P1Enum); 2140 2056 } 2141 2057 /*}}}*/ 2142 /*FUNCTION Tria::ValueP1DerivativesOnGauss{{{*/ 2143 void Tria::ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss){ 2058 void Tria::ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 2144 2059 TriaRef::GetInputDerivativeValue(dvalue,values,xyz_list,gauss); 2145 2060 } 2146 2061 /*}}}*/ 2147 /*FUNCTION Tria::VertexConnectivity{{{*/ 2148 int Tria::VertexConnectivity(int vertexindex){ 2062 int Tria::VertexConnectivity(int vertexindex){/*{{{*/ 2149 2063 _assert_(this->vertices); 2150 2064 return this->vertices[vertexindex]->Connectivity(); 2151 2065 } 2152 2066 /*}}}*/ 2153 /*FUNCTION Tria::IsZeroLevelset{{{*/ 2154 bool Tria::IsZeroLevelset(int levelset_enum){ 2067 bool Tria::IsZeroLevelset(int levelset_enum){/*{{{*/ 2155 2068 2156 2069 bool iszerols; … … 2171 2084 } 2172 2085 /*}}}*/ 2173 bool Tria::IsIcefront(void){/*{{{*/2086 bool Tria::IsIcefront(void){/*{{{*/ 2174 2087 2175 2088 bool isicefront; … … 2190 2103 return isicefront; 2191 2104 }/*}}}*/ 2192 bool Tria::IsFaceOnBoundary(void){/*{{{*/2105 bool Tria::IsFaceOnBoundary(void){/*{{{*/ 2193 2106 2194 2107 IssmDouble values[NUMVERTICES]; … … 2210 2123 } 2211 2124 }/*}}}*/ 2212 /*FUNCTION Tria::AverageOntoPartition {{{*/ 2213 void Tria::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){ 2125 void Tria::AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){/*{{{*/ 2214 2126 2215 2127 bool already = false; … … 2249 2161 } 2250 2162 /*}}}*/ 2251 /*FUNCTION Tria::IceVolume {{{*/ 2252 IssmDouble Tria::IceVolume(void){ 2163 IssmDouble Tria::IceVolume(void){/*{{{*/ 2253 2164 2254 2165 /*The volume of a troncated prism is base * 1/3 sum(length of edges)*/ … … 2278 2189 } 2279 2190 /*}}}*/ 2280 /*FUNCTION Tria::IceVolumeAboveFloatation {{{*/ 2281 IssmDouble Tria::IceVolumeAboveFloatation(void){ 2191 IssmDouble Tria::IceVolumeAboveFloatation(void){/*{{{*/ 2282 2192 2283 2193 /*The volume above floatation: H + rho_water/rho_ice * bathymetry */ … … 2309 2219 } 2310 2220 /*}}}*/ 2311 /*FUNCTION Tria::MassFlux {{{*/ 2312 IssmDouble Tria::MassFlux( IssmDouble x1, IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){ 2221 IssmDouble Tria::MassFlux( IssmDouble x1, IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){/*{{{*/ 2313 2222 2314 2223 int domaintype; … … 2373 2282 } 2374 2283 /*}}}*/ 2375 /*FUNCTION Tria::MassFlux {{{*/ 2376 IssmDouble Tria::MassFlux( IssmDouble* segment){ 2284 IssmDouble Tria::MassFlux( IssmDouble* segment){/*{{{*/ 2377 2285 2378 2286 int domaintype; … … 2440 2348 } 2441 2349 /*}}}*/ 2442 /*FUNCTION Tria::MaxAbsVx{{{*/ 2443 void Tria::MaxAbsVx(IssmDouble* pmaxabsvx){ 2350 void Tria::MaxAbsVx(IssmDouble* pmaxabsvx){/*{{{*/ 2444 2351 2445 2352 /*Get maximum:*/ … … 2450 2357 } 2451 2358 /*}}}*/ 2452 /*FUNCTION Tria::MaxAbsVy{{{*/ 2453 void Tria::MaxAbsVy(IssmDouble* pmaxabsvy){ 2359 void Tria::MaxAbsVy(IssmDouble* pmaxabsvy){/*{{{*/ 2454 2360 2455 2361 /*Get maximum:*/ … … 2460 2366 } 2461 2367 /*}}}*/ 2462 /*FUNCTION Tria::MaxAbsVz{{{*/ 2463 void Tria::MaxAbsVz(IssmDouble* pmaxabsvz){ 2368 void Tria::MaxAbsVz(IssmDouble* pmaxabsvz){/*{{{*/ 2464 2369 2465 2370 /*Get maximum:*/ … … 2470 2375 } 2471 2376 /*}}}*/ 2472 /*FUNCTION Tria::MaxVel{{{*/ 2473 void Tria::MaxVel(IssmDouble* pmaxvel){ 2377 void Tria::MaxVel(IssmDouble* pmaxvel){/*{{{*/ 2474 2378 2475 2379 /*Get maximum:*/ … … 2480 2384 } 2481 2385 /*}}}*/ 2482 /*FUNCTION Tria::MaxVx{{{*/ 2483 void Tria::MaxVx(IssmDouble* pmaxvx){ 2386 void Tria::MaxVx(IssmDouble* pmaxvx){/*{{{*/ 2484 2387 2485 2388 /*Get maximum:*/ … … 2490 2393 } 2491 2394 /*}}}*/ 2492 /*FUNCTION Tria::MaxVy{{{*/ 2493 void Tria::MaxVy(IssmDouble* pmaxvy){ 2395 void Tria::MaxVy(IssmDouble* pmaxvy){/*{{{*/ 2494 2396 2495 2397 /*Get maximum:*/ … … 2501 2403 } 2502 2404 /*}}}*/ 2503 /*FUNCTION Tria::MaxVz{{{*/ 2504 void Tria::MaxVz(IssmDouble* pmaxvz){ 2405 void Tria::MaxVz(IssmDouble* pmaxvz){/*{{{*/ 2505 2406 2506 2407 /*Get maximum:*/ … … 2511 2412 } 2512 2413 /*}}}*/ 2513 /*FUNCTION Tria::MinVel{{{*/ 2514 void Tria::MinVel(IssmDouble* pminvel){ 2414 void Tria::MinVel(IssmDouble* pminvel){/*{{{*/ 2515 2415 2516 2416 /*Get minimum:*/ … … 2521 2421 } 2522 2422 /*}}}*/ 2523 /*FUNCTION Tria::MinVx{{{*/ 2524 void Tria::MinVx(IssmDouble* pminvx){ 2423 void Tria::MinVx(IssmDouble* pminvx){/*{{{*/ 2525 2424 2526 2425 /*Get minimum:*/ … … 2531 2430 } 2532 2431 /*}}}*/ 2533 /*FUNCTION Tria::MinVy{{{*/ 2534 void Tria::MinVy(IssmDouble* pminvy){ 2432 void Tria::MinVy(IssmDouble* pminvy){/*{{{*/ 2535 2433 2536 2434 /*Get minimum:*/ … … 2541 2439 } 2542 2440 /*}}}*/ 2543 /*FUNCTION Tria::MinVz{{{*/ 2544 void Tria::MinVz(IssmDouble* pminvz){ 2441 void Tria::MinVz(IssmDouble* pminvz){/*{{{*/ 2545 2442 2546 2443 /*Get minimum:*/ … … 2551 2448 } 2552 2449 /*}}}*/ 2553 /*FUNCTION Tria::ElementResponse{{{*/ 2554 void Tria::ElementResponse(IssmDouble* presponse,int response_enum){ 2450 void Tria::ElementResponse(IssmDouble* presponse,int response_enum){/*{{{*/ 2555 2451 2556 2452 switch(response_enum){ … … 2577 2473 } 2578 2474 /*}}}*/ 2579 /*FUNCTION Tria::TotalSmb {{{*/ 2580 IssmDouble Tria::TotalSmb(void){ 2475 IssmDouble Tria::TotalSmb(void){/*{{{*/ 2581 2476 2582 2477 /*The smb[kg yr-1] of one element is area[m2] * smb [kg m^-2 yr^-1]*/ … … 2606 2501 } 2607 2502 /*}}}*/ 2608 /*FUNCTION Tria::MisfitArea{{{*/ 2609 IssmDouble Tria::MisfitArea(int weightsenum){ 2503 IssmDouble Tria::MisfitArea(int weightsenum){/*{{{*/ 2610 2504 2611 2505 /*Intermediaries*/ … … 2644 2538 } 2645 2539 /*}}}*/ 2646 /*FUNCTION Tria::Misfit{{{*/ 2647 IssmDouble Tria::Misfit(int modelenum,int observationenum,int weightsenum){ 2540 IssmDouble Tria::Misfit(int modelenum,int observationenum,int weightsenum){/*{{{*/ 2648 2541 2649 2542 /*Intermediaries*/ … … 2688 2581 2689 2582 #ifdef _HAVE_GIA_ 2690 /*FUNCTION Tria::GiaDeflection {{{*/ 2691 void Tria::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x, IssmDouble* y){ 2583 void Tria::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x, IssmDouble* y){/*{{{*/ 2692 2584 2693 2585 int i; … … 2816 2708 #endif 2817 2709 2818 /*FUNCTION Tria::BalancethicknessMisfit{{{*/ 2819 IssmDouble Tria::BalancethicknessMisfit(void){ 2710 IssmDouble Tria::BalancethicknessMisfit(void){/*{{{*/ 2820 2711 2821 2712 /* Intermediaries */ … … 2874 2765 } 2875 2766 /*}}}*/ 2876 /*FUNCTION Tria::InputControlUpdate{{{*/ 2877 void Tria::InputControlUpdate(IssmDouble scalar,bool save_parameter){ 2767 void Tria::InputControlUpdate(IssmDouble scalar,bool save_parameter){/*{{{*/ 2878 2768 2879 2769 /*Intermediary*/ … … 2902 2792 } 2903 2793 /*}}}*/ 2904 /*FUNCTION Tria::ControlInputGetGradient{{{*/ 2905 void Tria::ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index){ 2794 void Tria::ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index){/*{{{*/ 2906 2795 2907 2796 int vertexpidlist[NUMVERTICES]; … … 2915 2804 2916 2805 }/*}}}*/ 2917 /*FUNCTION Tria::ControlInputScaleGradient{{{*/ 2918 void Tria::ControlInputScaleGradient(int enum_type,IssmDouble scale){ 2806 void Tria::ControlInputScaleGradient(int enum_type,IssmDouble scale){/*{{{*/ 2919 2807 2920 2808 Input* input=inputs->GetInput(enum_type); … … 2924 2812 ((ControlInput*)input)->ScaleGradient(scale); 2925 2813 }/*}}}*/ 2926 /*FUNCTION Tria::ControlInputSetGradient{{{*/ 2927 void Tria::ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){ 2814 void Tria::ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){/*{{{*/ 2928 2815 2929 2816 int vertexpidlist[NUMVERTICES]; … … 2942 2829 2943 2830 }/*}}}*/ 2944 /*FUNCTION Tria::ControlToVectors{{{*/ 2945 void Tria::ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum){ 2831 void Tria::ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum){/*{{{*/ 2946 2832 2947 2833 Input* input=inputs->GetInput(control_enum); … … 2974 2860 2975 2861 }/*}}}*/ 2976 /*FUNCTION Tria::Gradj {{{*/ 2977 void Tria::Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index){ 2862 void Tria::Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index){/*{{{*/ 2978 2863 /*dJ/dalpha = ∂L/∂alpha = ∂J/∂alpha + ∂/∂alpha(KU-F)*/ 2979 2864 … … 3042 2927 } 3043 2928 /*}}}*/ 3044 /*FUNCTION Tria::GradjBGradient{{{*/ 3045 void Tria::GradjBGradient(Vector<IssmDouble>* gradient,int control_index){ 2929 void Tria::GradjBGradient(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3046 2930 3047 2931 int i; … … 3082 2966 } 3083 2967 /*}}}*/ 3084 /*FUNCTION Tria::GradjBSSA{{{*/ 3085 void Tria::GradjBSSA(Vector<IssmDouble>* gradient,int control_index){ 2968 void Tria::GradjBSSA(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3086 2969 3087 2970 /*Intermediaries*/ … … 3139 3022 } 3140 3023 /*}}}*/ 3141 /*FUNCTION Tria::GradjDSSA{{{*/ 3142 void Tria::GradjDSSA(Vector<IssmDouble>* gradient,int control_index){ 3024 void Tria::GradjDSSA(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3143 3025 3144 3026 /*Intermediaries*/ … … 3197 3079 } 3198 3080 /*}}}*/ 3199 /*FUNCTION Tria::GradjDragSSA {{{*/ 3200 void Tria::GradjDragSSA(Vector<IssmDouble>* gradient,int control_index){ 3081 void Tria::GradjDragSSA(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3201 3082 3202 3083 int i; … … 3284 3165 } 3285 3166 /*}}}*/ 3286 /*FUNCTION Tria::GradjDragGradient{{{*/ 3287 void Tria::GradjDragGradient(Vector<IssmDouble>* gradient,int control_index){ 3167 void Tria::GradjDragGradient(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3288 3168 3289 3169 int i; … … 3328 3208 } 3329 3209 /*}}}*/ 3330 /*FUNCTION Tria::GradjDhDtBalancedthickness{{{*/ 3331 void Tria::GradjDhDtBalancedthickness(Vector<IssmDouble>* gradient,int control_index){ 3210 void Tria::GradjDhDtBalancedthickness(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3332 3211 3333 3212 /*Intermediaries*/ … … 3344 3223 } 3345 3224 /*}}}*/ 3346 /*FUNCTION Tria::GradjVxBalancedthickness{{{*/ 3347 void Tria::GradjVxBalancedthickness(Vector<IssmDouble>* gradient,int control_index){ 3225 void Tria::GradjVxBalancedthickness(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3348 3226 3349 3227 /*Intermediaries*/ … … 3387 3265 } 3388 3266 /*}}}*/ 3389 /*FUNCTION Tria::GradjVyBalancedthickness{{{*/ 3390 void Tria::GradjVyBalancedthickness(Vector<IssmDouble>* gradient,int control_index){ 3267 void Tria::GradjVyBalancedthickness(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3391 3268 3392 3269 /*Intermediaries*/ … … 3429 3306 } 3430 3307 /*}}}*/ 3431 /*FUNCTION Tria::GradjThicknessBalancethicknessSoft{{{*/ 3432 void Tria::GradjThicknessBalancethicknessSoft(Vector<IssmDouble>* gradient,int control_index){ 3308 void Tria::GradjThicknessBalancethicknessSoft(Vector<IssmDouble>* gradient,int control_index){/*{{{*/ 3433 3309 3434 3310 /*Intermediaries */ … … 3538 3414 } 3539 3415 /*}}}*/ 3540 /*FUNCTION Tria::GradientIndexing{{{*/ 3541 void Tria::GradientIndexing(int* indexing,int control_index){ 3416 void Tria::GradientIndexing(int* indexing,int control_index){/*{{{*/ 3542 3417 3543 3418 /*Get some parameters*/ … … 3552 3427 } 3553 3428 /*}}}*/ 3554 /*FUNCTION Tria::RheologyBbarAbsGradient{{{*/ 3555 IssmDouble Tria::RheologyBbarAbsGradient(void){ 3429 IssmDouble Tria::RheologyBbarAbsGradient(void){/*{{{*/ 3556 3430 3557 3431 /* Intermediaries */ … … 3595 3469 } 3596 3470 /*}}}*/ 3597 /*FUNCTION Tria::SurfaceAverageVelMisfit {{{*/ 3598 IssmDouble Tria::SurfaceAverageVelMisfit(void){ 3471 IssmDouble Tria::SurfaceAverageVelMisfit(void){/*{{{*/ 3599 3472 3600 3473 IssmDouble Jelem=0,S,Jdet; … … 3651 3524 } 3652 3525 /*}}}*/ 3653 /*FUNCTION Tria::SurfaceLogVelMisfit {{{*/ 3654 IssmDouble Tria::SurfaceLogVelMisfit(void){ 3526 IssmDouble Tria::SurfaceLogVelMisfit(void){/*{{{*/ 3655 3527 3656 3528 IssmDouble Jelem=0.; … … 3711 3583 } 3712 3584 /*}}}*/ 3713 /*FUNCTION Tria::SurfaceLogVxVyMisfit {{{*/ 3714 IssmDouble Tria::SurfaceLogVxVyMisfit(void){ 3585 IssmDouble Tria::SurfaceLogVxVyMisfit(void){/*{{{*/ 3715 3586 3716 3587 IssmDouble Jelem=0, S=0; … … 3771 3642 } 3772 3643 /*}}}*/ 3773 /*FUNCTION Tria::SurfaceAbsVelMisfit {{{*/ 3774 IssmDouble Tria::SurfaceAbsVelMisfit(void){ 3644 IssmDouble Tria::SurfaceAbsVelMisfit(void){/*{{{*/ 3775 3645 3776 3646 IssmDouble Jelem=0; … … 3827 3697 } 3828 3698 /*}}}*/ 3829 /*FUNCTION Tria::SurfaceRelVelMisfit {{{*/ 3830 IssmDouble Tria::SurfaceRelVelMisfit(void){ 3699 IssmDouble Tria::SurfaceRelVelMisfit(void){/*{{{*/ 3831 3700 3832 3701 IssmDouble Jelem=0; … … 3888 3757 } 3889 3758 /*}}}*/ 3890 /*FUNCTION Tria::ThicknessAbsGradient{{{*/ 3891 IssmDouble Tria::ThicknessAbsGradient(void){ 3759 IssmDouble Tria::ThicknessAbsGradient(void){/*{{{*/ 3892 3760 3893 3761 /* Intermediaries */ … … 3931 3799 } 3932 3800 /*}}}*/ 3933 /*FUNCTION Tria::ThicknessAlongGradient{{{*/ 3934 IssmDouble Tria::ThicknessAlongGradient(void){ 3801 IssmDouble Tria::ThicknessAlongGradient(void){/*{{{*/ 3935 3802 3936 3803 /* Intermediaries */ … … 3982 3849 } 3983 3850 /*}}}*/ 3984 /*FUNCTION Tria::ThicknessAcrossGradient{{{*/ 3985 IssmDouble Tria::ThicknessAcrossGradient(void){ 3851 IssmDouble Tria::ThicknessAcrossGradient(void){/*{{{*/ 3986 3852 3987 3853 /* Intermediaries */ … … 4033 3899 } 4034 3900 /*}}}*/ 4035 /*FUNCTION Tria::ThicknessAbsMisfit {{{*/ 4036 IssmDouble Tria::ThicknessAbsMisfit(void){ 3901 IssmDouble Tria::ThicknessAbsMisfit(void){/*{{{*/ 4037 3902 4038 3903 /*Intermediaries*/ … … 4077 3942 } 4078 3943 /*}}}*/ 4079 /*FUNCTION Tria::DragCoefficientAbsGradient{{{*/ 4080 IssmDouble Tria::DragCoefficientAbsGradient(void){ 3944 IssmDouble Tria::DragCoefficientAbsGradient(void){/*{{{*/ 4081 3945 4082 3946 /* Intermediaries */ … … 4120 3984 } 4121 3985 /*}}}*/ 4122 /*FUNCTION Tria::GetVectorFromControlInputs{{{*/ 4123 void Tria::GetVectorFromControlInputs(Vector<IssmDouble>* vector,int control_enum,int control_index,const char* data){ 3986 void Tria::GetVectorFromControlInputs(Vector<IssmDouble>* vector,int control_enum,int control_index,const char* data){/*{{{*/ 4124 3987 4125 3988 int vertexpidlist[NUMVERTICES]; … … 4143 4006 } 4144 4007 /*}}}*/ 4145 /*FUNCTION Tria::SetControlInputsFromVector{{{*/ 4146 void Tria::SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index){ 4008 void Tria::SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index){/*{{{*/ 4147 4009 4148 4010 IssmDouble values[NUMVERTICES]; … … 4171 4033 } 4172 4034 /*}}}*/ 4173 /*FUNCTION Tria::GetSolutionFromInputsOneDof{{{*/ 4174 void Tria::GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution, int enum_type){ 4035 void Tria::GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution, int enum_type){/*{{{*/ 4175 4036 4176 4037 int *doflist = NULL; … … 4206 4067 4207 4068 #ifdef _HAVE_DAKOTA_ 4208 /*FUNCTION Tria::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);{{{*/ 4209 void Tria::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){ 4069 void Tria::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/ 4210 4070 4211 4071 int i,j; … … 4298 4158 } 4299 4159 /*}}}*/ 4300 /*FUNCTION Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/ 4301 void Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){ 4160 void Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*{{{*/ 4302 4161 4303 4162 int i,t,row; … … 4339 4198 #endif 4340 4199 4341 /*FUNCTION Tria::MigrateGroundingLine{{{*/ 4342 void Tria::MigrateGroundingLine(IssmDouble* phi_ungrounding){ 4200 void Tria::MigrateGroundingLine(IssmDouble* phi_ungrounding){/*{{{*/ 4343 4201 4344 4202 int i,migration_style; … … 4470 4328 } 4471 4329 /*}}}*/ 4472 /*FUNCTION Tria::PotentialUngrounding{{{*/ 4473 void Tria::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){ 4330 void Tria::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){/*{{{*/ 4474 4331 4475 4332 IssmDouble h[NUMVERTICES],r[NUMVERTICES],gl[NUMVERTICES]; … … 4498 4355 } 4499 4356 /*}}}*/ 4500 /*FUNCTION Tria::UpdatePotentialUngrounding{{{*/ 4501 int Tria::UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){ 4357 int Tria::UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){/*{{{*/ 4502 4358 4503 4359 int i; -
issm/trunk-jpl/src/c/classes/Elements/TriaRef.cpp
r17875 r17962 4 4 5 5 /*Headers:*/ 6 /*{{{*/ 6 /*{{{*//*{{{*/ 7 7 #ifdef HAVE_CONFIG_H 8 8 #include <config.h> … … 22 22 23 23 /*Object constructors and destructor*/ 24 /*FUNCTION TriaRef::TriaRef(){{{*/ 25 TriaRef::TriaRef(){ 24 TriaRef::TriaRef(){/*{{{*/ 26 25 this->element_type_list=NULL; 27 26 } 28 27 /*}}}*/ 29 /*FUNCTION TriaRef::TriaRef(int* types,int nummodels){{{*/ 30 TriaRef::TriaRef(const int nummodels){ 28 TriaRef::TriaRef(const int nummodels){/*{{{*/ 31 29 32 30 /*Only allocate pointer*/ … … 35 33 } 36 34 /*}}}*/ 37 /*FUNCTION TriaRef::~TriaRef(){{{*/ 38 TriaRef::~TriaRef(){ 35 TriaRef::~TriaRef(){/*{{{*/ 39 36 xDelete<int>(element_type_list); 40 37 } … … 42 39 43 40 /*Management*/ 44 /*FUNCTION TriaRef::SetElementType{{{*/ 45 void TriaRef::SetElementType(int type,int type_counter){ 41 void TriaRef::SetElementType(int type,int type_counter){/*{{{*/ 46 42 47 43 /*initialize element type*/ … … 51 47 52 48 /*Reference Element numerics*/ 53 /*FUNCTION TriaRef::GetSegmentBFlux{{{*/ 54 void TriaRef::GetSegmentBFlux(IssmDouble* B,Gauss* gauss, int index1,int index2){ 49 void TriaRef::GetSegmentBFlux(IssmDouble* B,Gauss* gauss, int index1,int index2){/*{{{*/ 55 50 /*Compute B matrix. B=[phi1 phi2 -phi3 -phi4] 56 51 * … … 77 72 } 78 73 /*}}}*/ 79 /*FUNCTION TriaRef::GetSegmentBprimeFlux{{{*/ 80 void TriaRef::GetSegmentBprimeFlux(IssmDouble* Bprime,Gauss* gauss, int index1,int index2){ 74 void TriaRef::GetSegmentBprimeFlux(IssmDouble* Bprime,Gauss* gauss, int index1,int index2){/*{{{*/ 81 75 /*Compute Bprime matrix. Bprime=[phi1 phi2 phi3 phi4] 82 76 * … … 103 97 } 104 98 /*}}}*/ 105 /*FUNCTION TriaRef::GetJacobian{{{*/ 106 void TriaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss){ 99 void TriaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 107 100 /*The Jacobian is constant over the element, discard the gaussian points. 108 101 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 121 114 } 122 115 /*}}}*/ 123 /*FUNCTION TriaRef::GetSegmentJacobianDeterminant{{{*/ 124 void TriaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){ 116 void TriaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 125 117 /*The Jacobian determinant is constant over the element, discard the gaussian points. 126 118 * J is assumed to have been allocated*/ … … 136 128 } 137 129 /*}}}*/ 138 /*FUNCTION TriaRef::GetJacobianDeterminant{{{*/ 139 void TriaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){ 130 void TriaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 140 131 /*The Jacobian determinant is constant over the element, discard the gaussian points. 141 132 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 151 142 } 152 143 /*}}}*/ 153 /*FUNCTION TriaRef::GetJacobianInvert{{{*/ 154 void TriaRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,Gauss* gauss){ 144 void TriaRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/ 155 145 156 146 /*Jacobian*/ … … 165 155 } 166 156 /*}}}*/ 167 /*FUNCTION TriaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss){{{*/ 168 void TriaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss){ 157 void TriaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss){/*{{{*/ 169 158 /*This routine returns the values of the nodal functions at the gaussian point.*/ 170 159 … … 174 163 } 175 164 /*}}}*/ 176 /*FUNCTION TriaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss,int finiteelement){{{*/ 177 void TriaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss_in,int finiteelement){ 165 void TriaRef::GetNodalFunctions(IssmDouble* basis,Gauss* gauss_in,int finiteelement){/*{{{*/ 178 166 /*This routine returns the values of the nodal functions at the gaussian point.*/ 179 167 … … 216 204 } 217 205 /*}}}*/ 218 /*FUNCTION TriaRef::GetSegmentNodalFunctions{{{*/ 219 void TriaRef::GetSegmentNodalFunctions(IssmDouble* basis,Gauss* gauss,int index1,int index2){ 206 void TriaRef::GetSegmentNodalFunctions(IssmDouble* basis,Gauss* gauss,int index1,int index2){/*{{{*/ 220 207 /*This routine returns the values of the nodal functions at the gaussian point.*/ 221 208 … … 256 243 } 257 244 /*}}}*/ 258 /*FUNCTION TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){{{*/ 259 void TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){ 245 void TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 260 246 261 247 GetNodalFunctionsDerivatives(dbasis,xyz_list,gauss,this->element_type); … … 263 249 } 264 250 /*}}}*/ 265 /*FUNCTION TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){{{*/ 266 void TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){ 251 void TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, Gauss* gauss,int finiteelement){/*{{{*/ 267 252 268 253 /*This routine returns the values of the nodal functions derivatives (with respect to the … … 294 279 } 295 280 /*}}}*/ 296 /*FUNCTION TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){{{*/ 297 void TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){ 281 void TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss){/*{{{*/ 298 282 /*This routine returns the values of the nodal functions derivatives (with respect to the 299 283 * natural coordinate system) at the gaussian point. */ … … 303 287 } 304 288 /*}}}*/ 305 /*FUNCTION TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss,int finiteelement){{{*/ 306 void TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){ 289 void TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dbasis,Gauss* gauss_in,int finiteelement){/*{{{*/ 307 290 /*This routine returns the values of the nodal functions derivatives (with respect to the 308 291 * natural coordinate system) at the gaussian point. */ … … 371 354 } 372 355 /*}}}*/ 373 /*FUNCTION TriaRef::GetInputDerivativeValue{{{*/ 374 void TriaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, Gauss* gauss){ 356 void TriaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, Gauss* gauss){/*{{{*/ 375 357 376 358 /*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter derivative value at gaussian … … 404 386 } 405 387 /*}}}*/ 406 /*FUNCTION TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, Gauss* gauss){{{*/ 407 void TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, Gauss* gauss){ 388 void TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, Gauss* gauss){/*{{{*/ 408 389 409 390 GetInputValue(p,plist,gauss,this->element_type); 410 391 } 411 392 /*}}}*/ 412 /*FUNCTION TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, Gauss* gauss,int finiteelement){{{*/ 413 void TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, Gauss* gauss,int finiteelement){ 393 void TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, Gauss* gauss,int finiteelement){/*{{{*/ 414 394 415 395 /*Output*/ … … 431 411 } 432 412 /*}}}*/ 433 /*FUNCTION TriaRef::NumberofNodes(){{{*/ 434 int TriaRef::NumberofNodes(void){ 413 int TriaRef::NumberofNodes(void){/*{{{*/ 435 414 436 415 return this->NumberofNodes(this->element_type); 437 416 } 438 417 /*}}}*/ 439 /*FUNCTION TriaRef::NumberofNodes(int finiteelement){{{*/ 440 int TriaRef::NumberofNodes(int finiteelement){ 418 int TriaRef::NumberofNodes(int finiteelement){/*{{{*/ 441 419 442 420 switch(finiteelement){ … … 459 437 } 460 438 /*}}}*/ 461 /*FUNCTION TriaRef::VelocityInterpolation{{{*/ 462 int TriaRef::VelocityInterpolation(void){ 439 int TriaRef::VelocityInterpolation(void){/*{{{*/ 463 440 464 441 switch(this->element_type){ … … 475 452 } 476 453 /*}}}*/ 477 /*FUNCTION TriaRef::PressureInterpolation{{{*/ 478 int TriaRef::PressureInterpolation(void){ 454 int TriaRef::PressureInterpolation(void){/*{{{*/ 479 455 480 456 switch(this->element_type){ … … 491 467 } 492 468 /*}}}*/ 493 /*FUNCTION TriaRef::TensorInterpolation{{{*/ 494 int TriaRef::TensorInterpolation(void){ 469 int TriaRef::TensorInterpolation(void){/*{{{*/ 495 470 /*This routine returns the values of the nodal functions at the gaussian point.*/ 496 471 … … 501 476 } 502 477 /*}}}*/ 503 /*FUNCTION TriaRef::NodeOnEdgeIndices{{{*/ 504 void TriaRef::NodeOnEdgeIndices(int* pnumindices,int** pindices,int index,int finiteelement){ 478 void TriaRef::NodeOnEdgeIndices(int* pnumindices,int** pindices,int index,int finiteelement){/*{{{*/ 505 479 506 480 /*Output*/
Note:
See TracChangeset
for help on using the changeset viewer.