Changeset 4652
- Timestamp:
- 07/19/10 11:28:44 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r4624 r4652 928 928 if (analysis_type==DiagnosticHorizAnalysisEnum){ 929 929 GetSolutionFromInputsDiagnosticHoriz(solution); 930 } 931 else if(analysis_type==DiagnosticHutterAnalysisEnum){ 932 GetSolutionFromInputsDiagnosticHutter(solution); 930 933 } 931 934 else if(analysis_type==DiagnosticVertAnalysisEnum){ … … 2673 2676 /*FUNCTION Penta::GetSolutionFromInputsDiagnosticHoriz{{{1*/ 2674 2677 void Penta::GetSolutionFromInputsDiagnosticHoriz(Vec solution){ 2678 2679 int i; 2680 2681 const int numvertices=6; 2682 const int numdofpervertex=2; 2683 const int numdof=numdofpervertex*numvertices; 2684 double gauss[numvertices][4]={{1,0,0,-1},{0,1,0,-1},{0,0,1,-1},{1,0,0,1},{0,1,0,1},{0,0,1,1}}; 2685 2686 int doflist[numdof]; 2687 double values[numdof]; 2688 double vx; 2689 double vy; 2690 2691 int dummy; 2692 2693 /*Get dof list: */ 2694 GetDofList(&doflist[0],&dummy); 2695 2696 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 2697 /*P1 element only for now*/ 2698 for(i=0;i<numvertices;i++){ 2699 2700 /*Recover vx and vy*/ 2701 inputs->GetParameterValue(&vx,&gauss[i][0],VxEnum); 2702 inputs->GetParameterValue(&vy,&gauss[i][0],VyEnum); 2703 values[i*numdofpervertex+0]=vx; 2704 values[i*numdofpervertex+1]=vy; 2705 } 2706 2707 /*Add value to global vector*/ 2708 VecSetValues(solution,numdof,doflist,(const double*)values,INSERT_VALUES); 2709 2710 } 2711 /*}}}*/ 2712 /*FUNCTION Penta::GetSolutionFromInputsDiagnosticHutter{{{1*/ 2713 void Penta::GetSolutionFromInputsDiagnosticHutter(Vec solution){ 2675 2714 2676 2715 int i; -
issm/trunk/src/c/objects/Elements/Penta.h
r4592 r4652 163 163 void GetPhi(double* phi, double* epsilon, double viscosity); 164 164 void GetSolutionFromInputsDiagnosticHoriz(Vec solutiong); 165 void GetSolutionFromInputsDiagnosticHutter(Vec solutiong); 165 166 void GetSolutionFromInputsDiagnosticStokes(Vec solutiong); 166 167 void GetSolutionFromInputsDiagnosticVert(Vec solutiong);
Note:
See TracChangeset
for help on using the changeset viewer.