Changeset 3936
- Timestamp:
- 05/25/10 08:53:40 (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
r3935 r3936 1028 1028 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ 1029 1029 if (analysis_type==ControlAnalysisEnum){ 1030 1031 1030 CreateKMatrixDiagnosticHoriz( Kgg,analysis_type,sub_analysis_type); 1032 1033 1031 } 1034 1032 else if (analysis_type==DiagnosticAnalysisEnum){ 1035 1036 1033 if (sub_analysis_type==HorizAnalysisEnum){ 1037 1038 1034 CreateKMatrixDiagnosticHoriz( Kgg,analysis_type,sub_analysis_type); 1039 1035 } 1036 else if (sub_analysis_type==HutterAnalysisEnum){ 1037 CreateKMatrixDiagnosticHutter( Kgg,analysis_type,sub_analysis_type); 1038 } 1040 1039 else if (sub_analysis_type==VertAnalysisEnum){ 1041 1042 1040 CreateKMatrixDiagnosticVert( Kgg,analysis_type,sub_analysis_type); 1043 1041 } 1044 1042 else if (sub_analysis_type==StokesAnalysisEnum){ 1045 1046 1043 CreateKMatrixDiagnosticStokes( Kgg,analysis_type,sub_analysis_type); 1047 1048 1044 } 1049 1045 else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet"); 1050 1046 } 1051 1047 else if (analysis_type==SlopecomputeAnalysisEnum){ 1052 1053 1048 CreateKMatrixSlopeCompute( Kgg,analysis_type,sub_analysis_type); 1054 1049 } 1055 1050 else if (analysis_type==PrognosticAnalysisEnum){ 1056 1057 1051 CreateKMatrixPrognostic( Kgg,analysis_type,sub_analysis_type); 1058 1052 } 1059 1053 else if (analysis_type==BalancedthicknessAnalysisEnum){ 1060 1061 1054 CreateKMatrixBalancedthickness( Kgg,analysis_type,sub_analysis_type); 1062 1055 } 1063 1056 else if (analysis_type==BalancedvelocitiesAnalysisEnum){ 1064 1065 1057 CreateKMatrixBalancedvelocities( Kgg,analysis_type,sub_analysis_type); 1066 1058 } 1067 1059 else if (analysis_type==ThermalAnalysisEnum){ 1068 1069 1060 CreateKMatrixThermal( Kgg,analysis_type,sub_analysis_type); 1070 1061 } 1071 1062 else if (analysis_type==MeltingAnalysisEnum){ 1072 1073 1063 CreateKMatrixMelting( Kgg,analysis_type,sub_analysis_type); 1074 1064 } 1075 else{ 1076 ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 1077 } 1065 else ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 1078 1066 1079 1067 } … … 1357 1345 xfree((void**)&third_gauss_area_coord2d); 1358 1346 xfree((void**)&gauss_weights2d); 1347 1348 } 1349 /*}}}*/ 1350 /*FUNCTION Penta::CreateKMatrixDiagnosticHutter{{{1*/ 1351 void Penta::CreateKMatrixDiagnosticHutter(Mat Kgg,int analysis_type,int sub_analysis_type){ 1352 1353 /*Collapsed formulation: */ 1354 Beam* beam=NULL; 1355 int i; 1356 1357 /*flags: */ 1358 bool onwater; 1359 1360 /*recover some inputs: */ 1361 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 1362 1363 /*If on water, skip: */ 1364 if(onwater)return; 1365 1366 /*Spawn 3 beam elements: */ 1367 for(i=0;i<3;i++){ 1368 beam=(Beam*)SpawnBeam(i,i+3); //[0 3], [1 4] and [2 5] are the four vertical edges of the Penta 1369 beam->CreateKMatrix(Kgg,analysis_type,sub_analysis_type); 1370 } 1371 1372 /*clean up*/ 1373 delete beam; 1359 1374 1360 1375 } … … 2091 2106 /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */ 2092 2107 if (analysis_type==ControlAnalysisEnum){ 2093 2094 2108 CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type); 2095 2109 } 2096 2110 else if (analysis_type==DiagnosticAnalysisEnum){ 2097 2098 2111 if (sub_analysis_type==HorizAnalysisEnum){ 2099 2100 2112 CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type); 2101 2113 } 2114 else if (sub_analysis_type==HutterAnalysisEnum){ 2115 CreatePVectorDiagnosticHutter( pg,analysis_type,sub_analysis_type); 2116 } 2102 2117 else if (sub_analysis_type==VertAnalysisEnum){ 2103 2104 2118 CreatePVectorDiagnosticVert( pg,analysis_type,sub_analysis_type); 2105 2119 } 2106 2120 else if (sub_analysis_type==StokesAnalysisEnum){ 2107 2108 2121 CreatePVectorDiagnosticStokes( pg,analysis_type,sub_analysis_type); 2109 2122 } … … 2111 2124 } 2112 2125 else if (analysis_type==SlopecomputeAnalysisEnum){ 2113 2114 2126 CreatePVectorSlopeCompute( pg,analysis_type,sub_analysis_type); 2115 2127 } 2116 2128 else if (analysis_type==PrognosticAnalysisEnum){ 2117 2118 2129 CreatePVectorPrognostic( pg,analysis_type,sub_analysis_type); 2119 2130 } 2120 2131 else if (analysis_type==BalancedthicknessAnalysisEnum){ 2121 2122 2132 CreatePVectorBalancedthickness( pg,analysis_type,sub_analysis_type); 2123 2133 } 2124 2134 else if (analysis_type==BalancedvelocitiesAnalysisEnum){ 2125 2126 2135 CreatePVectorBalancedvelocities( pg,analysis_type,sub_analysis_type); 2127 2136 } 2128 2137 else if (analysis_type==ThermalAnalysisEnum){ 2129 2130 2138 CreatePVectorThermal( pg,analysis_type,sub_analysis_type); 2131 2139 } 2132 2140 else if (analysis_type==MeltingAnalysisEnum){ 2133 2134 2141 CreatePVectorMelting( pg,analysis_type,sub_analysis_type); 2135 2142 } 2136 else{ 2137 ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 2138 } 2143 else ISSMERROR("%s%i%s\n","analysis: ",analysis_type," not supported yet"); 2139 2144 2140 2145 } … … 2339 2344 xfree((void**)&area_gauss_weights); 2340 2345 xfree((void**)&vert_gauss_weights); 2346 2347 } 2348 /*}}}*/ 2349 /*FUNCTION Penta::CreatePVectorDiagnosticHutter{{{1*/ 2350 void Penta::CreatePVectorDiagnosticHutter(Vec pg,int analysis_type,int sub_analysis_type){ 2351 2352 /*Collapsed formulation: */ 2353 Beam* beam=NULL; 2354 int i; 2355 2356 /*flags: */ 2357 bool onwater; 2358 2359 /*recover some inputs: */ 2360 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 2361 2362 /*If on water, skip: */ 2363 if(onwater)return; 2364 2365 /*Spawn 3 beam elements: */ 2366 for(i=0;i<3;i++){ 2367 beam=(Beam*)SpawnBeam(i,i+3); //[0 3], [1 4] and [2 5] are the four vertical edges of the Penta 2368 beam->CreatePVector(pg,analysis_type,sub_analysis_type); 2369 } 2370 2371 /*clean up*/ 2372 delete beam; 2341 2373 2342 2374 } -
issm/trunk/src/c/objects/Elements/Penta.h
r3935 r3936 65 65 void CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type); 66 66 void CreateKMatrixDiagnosticHoriz( Mat Kgg, int analysis_type,int sub_analysis_type); 67 void CreateKMatrixDiagnosticHutter( Mat Kgg, int analysis_type,int sub_analysis_type); 67 68 void CreateKMatrixDiagnosticVert( Mat Kgg, int analysis_type,int sub_analysis_type); 68 69 void CreatePVector(Vec pg, int analysis_type,int sub_analysis_type); … … 99 100 void GetJacobianInvert(double* Jinv, double* xyz_list,double* gauss_coord); 100 101 void CreatePVectorDiagnosticHoriz( Vec pg, int analysis_type,int sub_analysis_type); 102 void CreatePVectorDiagnosticHutter( Vec pg, int analysis_type,int sub_analysis_type); 101 103 void CreatePVectorDiagnosticVert( Vec pg, int analysis_type,int sub_analysis_type); 102 104 void GetParameterValue(double* pvalue, double* v_list,double* gauss_coord);
Note:
See TracChangeset
for help on using the changeset viewer.