Changeset 5862
- Timestamp:
- 09/17/10 08:28:51 (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
r5859 r5862 708 708 break; 709 709 case BedSlopeXAnalysisEnum: case SurfaceSlopeXAnalysisEnum: case BedSlopeYAnalysisEnum: case SurfaceSlopeYAnalysisEnum: 710 CreateKMatrixSlope( Kgg); 710 Ke=CreateKMatrixSlope(); 711 if(Ke) Ke->AddToGlobal(Kgg,NULL,NULL); 712 delete Ke; 711 713 break; 712 714 case PrognosticAnalysisEnum: 713 CreateKMatrixPrognostic( Kgg); 715 Ke=CreateKMatrixPrognostic(); 716 if(Ke) Ke->AddToGlobal(Kgg,NULL,NULL); 717 delete Ke; 714 718 break; 715 719 case BalancedthicknessAnalysisEnum: … … 2831 2835 /*}}}*/ 2832 2836 /*FUNCTION Penta::CreateKMatrixPrognostic {{{1*/ 2833 void Penta::CreateKMatrixPrognostic(Mat Kgg){ 2834 2835 /*Collapsed formulation: */ 2836 Tria* tria=NULL; 2837 2838 /*If on water, skip: */ 2839 if(IsOnWater())return; 2840 2841 /*Is this element on the bed? :*/ 2842 if(!IsOnBed())return; 2837 ElementMatrix* Penta::CreateKMatrixPrognostic(void){ 2838 2839 if (!IsOnBed() || IsOnWater()) return NULL; 2843 2840 2844 2841 /*Depth Averaging Vx and Vy*/ … … 2846 2843 this->InputDepthAverageAtBase(VyEnum,VyAverageEnum); 2847 2844 2848 /*Spawn Tria element from the base of the Penta: */ 2849 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2850 tria->CreateKMatrix(Kgg,NULL,NULL); 2845 Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2846 ElementMatrix* Ke=tria->CreateKMatrixPrognostic(); 2851 2847 delete tria->matice; delete tria; 2852 2848 … … 2855 2851 this->inputs->DeleteInput(VyAverageEnum); 2856 2852 2857 return;2858 2853 /*clean up and return*/ 2854 return Ke; 2859 2855 } 2860 2856 /*}}}*/ 2861 2857 /*FUNCTION Penta::CreateKMatrixSlope {{{1*/ 2862 void Penta::CreateKMatrixSlope(Mat Kgg){ 2863 2864 /*Collapsed formulation: */ 2865 Tria* tria=NULL; 2866 2867 /*If on water, skip: */ 2868 if(IsOnWater())return; 2869 2870 /*Is this element on the bed? :*/ 2871 if(!IsOnBed())return; 2872 2873 /*Spawn Tria element from the base of the Penta: */ 2874 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2875 tria->CreateKMatrix(Kgg,NULL,NULL); 2858 ElementMatrix* Penta::CreateKMatrixSlope(void){ 2859 2860 if (!IsOnBed() || IsOnWater()) return NULL; 2861 2862 Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 2863 ElementMatrix* Ke=tria->CreateKMatrixSlope(); 2876 2864 delete tria->matice; delete tria; 2877 return; 2878 2865 2866 /*clean up and return*/ 2867 return Ke; 2879 2868 } 2880 2869 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r5859 r5862 141 141 void CreateKMatrixDiagnosticVert( Mat Kgg); 142 142 ElementMatrix* CreateKMatrixMelting(void); 143 void CreateKMatrixPrognostic(Mat Kggg);144 void CreateKMatrixSlope(Mat Kggg);143 ElementMatrix* CreateKMatrixPrognostic(void); 144 ElementMatrix* CreateKMatrixSlope(void); 145 145 void CreateKMatrixThermal(Mat Kggg); 146 146 void CreatePVectorBalancedthickness( Vec pg);
Note:
See TracChangeset
for help on using the changeset viewer.