Changeset 4470 for issm/trunk/src/c/objects/Elements/Penta.cpp
- Timestamp:
- 07/08/10 14:42:11 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4463 r4470 397 397 else if (analysis_type==BalancedvelocitiesAnalysisEnum){ 398 398 InputUpdateFromSolutionBalancedvelocities( solution); 399 } 400 else if (analysis_type==ThermalAnalysisEnum){ 401 InputUpdateFromSolutionThermal( solution); 402 } 403 else if (analysis_type==MeltingAnalysisEnum){ 404 InputUpdateFromSolutionMelting( solution); 399 405 } 400 406 else{ … … 2468 2474 void Penta::InputUpdateFromSolutionBalancedvelocities(double* solution){ 2469 2475 ISSMERROR(" not supported yet!"); 2476 } 2477 /*}}}*/ 2478 /*FUNCTION Penta::InputUpdateFromSolutionThermal {{{1*/ 2479 void Penta::InputUpdateFromSolutionThermal(double* solution){ 2480 2481 int i; 2482 2483 const int numvertices=6; 2484 const int numdofpervertex=1; 2485 const int numdof=numdofpervertex*numvertices; 2486 2487 int doflist[numdof]; 2488 double values[numdof]; 2489 2490 int dummy; 2491 2492 /*Get dof list: */ 2493 GetDofList(&doflist[0],&dummy); 2494 2495 /*Use the dof list to index into the solution vector: */ 2496 for(i=0;i<numdof;i++){ 2497 values[i]=solution[doflist[i]]; 2498 } 2499 2500 /*Add thickness as inputs to the tria element: */ 2501 this->inputs->AddInput(new PentaVertexInput(TemperatureEnum,values)); 2502 } 2503 /*}}}*/ 2504 /*FUNCTION Penta::InputUpdateFromSolutionMelting {{{1*/ 2505 void Penta::InputUpdateFromSolutionMelting(double* solution){ 2506 2507 int i; 2508 2509 const int numvertices=6; 2510 const int numdofpervertex=1; 2511 const int numdof=numdofpervertex*numvertices; 2512 2513 int doflist[numdof]; 2514 double values[numdof]; 2515 2516 int dummy; 2517 2518 /*Get dof list: */ 2519 GetDofList(&doflist[0],&dummy); 2520 2521 /*Use the dof list to index into the solution vector: */ 2522 for(i=0;i<numdof;i++){ 2523 values[i]=solution[doflist[i]]; 2524 } 2525 2526 /*Add thickness as inputs to the tria element: */ 2527 this->inputs->AddInput(new PentaVertexInput(MeltingRateEnum,values)); 2470 2528 } 2471 2529 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.