Changeset 5859
- Timestamp:
- 09/17/10 08:20:45 (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
r5854 r5859 714 714 break; 715 715 case BalancedthicknessAnalysisEnum: 716 CreateKMatrixBalancedthickness( Kgg); 716 Ke=CreateKMatrixBalancedthickness(); 717 if(Ke) Ke->AddToGlobal(Kgg,NULL,NULL); 718 delete Ke; 717 719 break; 718 720 case BalancedvelocitiesAnalysisEnum: 719 CreateKMatrixBalancedvelocities( Kgg); 721 Ke=CreateKMatrixBalancedvelocities(); 722 if(Ke) Ke->AddToGlobal(Kgg,NULL,NULL); 723 delete Ke; 720 724 break; 721 725 case ThermalAnalysisEnum: … … 1944 1948 /*}}}*/ 1945 1949 /*FUNCTION Penta::CreateKMatrixBalancedthickness {{{1*/ 1946 void Penta::CreateKMatrixBalancedthickness(Mat Kgg){ 1947 1948 /*Collapsed formulation: */ 1949 Tria* tria=NULL; 1950 1951 /*If on water, skip: */ 1952 if(IsOnWater())return; 1953 1954 /*Is this element on the bed? :*/ 1955 if(!IsOnBed())return; 1950 ElementMatrix* Penta::CreateKMatrixBalancedthickness(void){ 1951 1952 /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 1953 bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 1954 the stiffness matrix. */ 1955 if (!IsOnBed() || IsOnWater()) return NULL; 1956 1956 1957 1957 /*Depth Averaging Vx and Vy*/ … … 1960 1960 1961 1961 /*Spawn Tria element from the base of the Penta: */ 1962 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.1963 tria->CreateKMatrix(Kgg,NULL,NULL);1962 Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 1963 ElementMatrix* Ke=tria->CreateKMatrixBalancedthickness(); 1964 1964 delete tria->matice; delete tria; 1965 1965 … … 1968 1968 this->inputs->DeleteInput(VyAverageEnum); 1969 1969 1970 return;1971 1970 /*clean up and return*/ 1971 return Ke; 1972 1972 } 1973 1973 /*}}}*/ 1974 1974 /*FUNCTION Penta::CreateKMatrixBalancedvelocities {{{1*/ 1975 1976 void Penta::CreateKMatrixBalancedvelocities(Mat Kgg){ 1977 1978 /*Collapsed formulation: */ 1979 Tria* tria=NULL; 1980 1981 /*If on water, skip: */ 1982 if(IsOnWater())return; 1983 1984 /*Is this element on the bed? :*/ 1985 if(!IsOnBed())return; 1975 ElementMatrix* Penta::CreateKMatrixBalancedvelocities(void){ 1976 1977 /*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 1978 bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 1979 the stiffness matrix. */ 1980 if (!IsOnBed() || IsOnWater()) return NULL; 1986 1981 1987 1982 /*Depth Averaging Vx and Vy*/ … … 1990 1985 1991 1986 /*Spawn Tria element from the base of the Penta: */ 1992 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.1993 tria->CreateKMatrix(Kgg,NULL,NULL);1987 Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria. 1988 ElementMatrix* Ke=tria->CreateKMatrixBalancedvelocities(); 1994 1989 delete tria->matice; delete tria; 1995 1990 … … 1998 1993 this->inputs->DeleteInput(VyAverageEnum); 1999 1994 2000 return;2001 1995 /*clean up and return*/ 1996 return Ke; 2002 1997 } 2003 1998 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r5854 r5859 121 121 /*Penta specific routines:{{{1*/ 122 122 void BedNormal(double* bed_normal, double xyz_list[3][3]); 123 void CreateKMatrixBalancedthickness(Mat Kggg);124 void CreateKMatrixBalancedvelocities(Mat Kggg);123 ElementMatrix* CreateKMatrixBalancedthickness(void); 124 ElementMatrix* CreateKMatrixBalancedvelocities(void); 125 125 void CreateKMatrixCouplingMacAyealPattyn( Mat Kgg); 126 126 void CreateKMatrixCouplingMacAyealPattynViscous( Mat Kgg);
Note:
See TracChangeset
for help on using the changeset viewer.