Changeset 3936


Ignore:
Timestamp:
05/25/10 08:53:40 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added KMatrix and PVector Hutter in Penta

Location:
issm/trunk/src/c/objects/Elements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r3935 r3936  
    10281028        /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
    10291029        if (analysis_type==ControlAnalysisEnum){
    1030 
    10311030                CreateKMatrixDiagnosticHoriz( Kgg,analysis_type,sub_analysis_type);
    1032 
    10331031        }
    10341032        else if (analysis_type==DiagnosticAnalysisEnum){
    1035 
    10361033                if (sub_analysis_type==HorizAnalysisEnum){
    1037 
    10381034                        CreateKMatrixDiagnosticHoriz( Kgg,analysis_type,sub_analysis_type);
    10391035                }
     1036                else if (sub_analysis_type==HutterAnalysisEnum){
     1037                        CreateKMatrixDiagnosticHutter( Kgg,analysis_type,sub_analysis_type);
     1038                }
    10401039                else if (sub_analysis_type==VertAnalysisEnum){
    1041 
    10421040                        CreateKMatrixDiagnosticVert( Kgg,analysis_type,sub_analysis_type);
    10431041                }
    10441042                else if (sub_analysis_type==StokesAnalysisEnum){
    1045 
    10461043                        CreateKMatrixDiagnosticStokes( Kgg,analysis_type,sub_analysis_type);
    1047 
    10481044                }
    10491045                else ISSMERROR("%s%i%s\n","sub_analysis: ",sub_analysis_type," not supported yet");
    10501046        }
    10511047        else if (analysis_type==SlopecomputeAnalysisEnum){
    1052 
    10531048                CreateKMatrixSlopeCompute( Kgg,analysis_type,sub_analysis_type);
    10541049        }
    10551050        else if (analysis_type==PrognosticAnalysisEnum){
    1056 
    10571051                CreateKMatrixPrognostic( Kgg,analysis_type,sub_analysis_type);
    10581052        }
    10591053        else if (analysis_type==BalancedthicknessAnalysisEnum){
    1060 
    10611054                CreateKMatrixBalancedthickness( Kgg,analysis_type,sub_analysis_type);
    10621055        }
    10631056        else if (analysis_type==BalancedvelocitiesAnalysisEnum){
    1064 
    10651057                CreateKMatrixBalancedvelocities( Kgg,analysis_type,sub_analysis_type);
    10661058        }
    10671059        else if (analysis_type==ThermalAnalysisEnum){
    1068 
    10691060                CreateKMatrixThermal( Kgg,analysis_type,sub_analysis_type);
    10701061        }
    10711062        else if (analysis_type==MeltingAnalysisEnum){
    1072 
    10731063                CreateKMatrixMelting( Kgg,analysis_type,sub_analysis_type);
    10741064        }
    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");
    10781066
    10791067}
     
    13571345        xfree((void**)&third_gauss_area_coord2d);
    13581346        xfree((void**)&gauss_weights2d);
     1347
     1348}
     1349/*}}}*/
     1350/*FUNCTION Penta::CreateKMatrixDiagnosticHutter{{{1*/
     1351void  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;
    13591374
    13601375}
     
    20912106        /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
    20922107        if (analysis_type==ControlAnalysisEnum){
    2093 
    20942108                CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
    20952109        }
    20962110        else if (analysis_type==DiagnosticAnalysisEnum){
    2097 
    20982111                if (sub_analysis_type==HorizAnalysisEnum){
    2099 
    21002112                        CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
    21012113                }
     2114                else if (sub_analysis_type==HutterAnalysisEnum){
     2115                        CreatePVectorDiagnosticHutter( pg,analysis_type,sub_analysis_type);
     2116                }
    21022117                else if (sub_analysis_type==VertAnalysisEnum){
    2103 
    21042118                        CreatePVectorDiagnosticVert( pg,analysis_type,sub_analysis_type);
    21052119                }
    21062120                else if (sub_analysis_type==StokesAnalysisEnum){
    2107 
    21082121                        CreatePVectorDiagnosticStokes( pg,analysis_type,sub_analysis_type);
    21092122                }
     
    21112124        }
    21122125        else if (analysis_type==SlopecomputeAnalysisEnum){
    2113 
    21142126                CreatePVectorSlopeCompute( pg,analysis_type,sub_analysis_type);
    21152127        }
    21162128        else if (analysis_type==PrognosticAnalysisEnum){
    2117 
    21182129                CreatePVectorPrognostic( pg,analysis_type,sub_analysis_type);
    21192130        }
    21202131        else if (analysis_type==BalancedthicknessAnalysisEnum){
    2121 
    21222132                CreatePVectorBalancedthickness( pg,analysis_type,sub_analysis_type);
    21232133        }
    21242134        else if (analysis_type==BalancedvelocitiesAnalysisEnum){
    2125 
    21262135                CreatePVectorBalancedvelocities( pg,analysis_type,sub_analysis_type);
    21272136        }
    21282137        else if (analysis_type==ThermalAnalysisEnum){
    2129 
    21302138                CreatePVectorThermal( pg,analysis_type,sub_analysis_type);
    21312139        }
    21322140        else if (analysis_type==MeltingAnalysisEnum){
    2133 
    21342141                CreatePVectorMelting( pg,analysis_type,sub_analysis_type);
    21352142        }
    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");
    21392144
    21402145}
     
    23392344        xfree((void**)&area_gauss_weights);
    23402345        xfree((void**)&vert_gauss_weights);
     2346
     2347}
     2348/*}}}*/
     2349/*FUNCTION Penta::CreatePVectorDiagnosticHutter{{{1*/
     2350void  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;
    23412373
    23422374}
  • issm/trunk/src/c/objects/Elements/Penta.h

    r3935 r3936  
    6565                void  CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type);
    6666                void  CreateKMatrixDiagnosticHoriz( Mat Kgg,  int analysis_type,int sub_analysis_type);
     67                void  CreateKMatrixDiagnosticHutter( Mat Kgg,  int analysis_type,int sub_analysis_type);
    6768                void  CreateKMatrixDiagnosticVert( Mat Kgg,  int analysis_type,int sub_analysis_type);
    6869                void  CreatePVector(Vec pg,  int analysis_type,int sub_analysis_type);
     
    99100                void  GetJacobianInvert(double*  Jinv, double* xyz_list,double* gauss_coord);
    100101                void  CreatePVectorDiagnosticHoriz( Vec pg, int analysis_type,int sub_analysis_type);
     102                void  CreatePVectorDiagnosticHutter( Vec pg, int analysis_type,int sub_analysis_type);
    101103                void  CreatePVectorDiagnosticVert( Vec pg, int analysis_type,int sub_analysis_type);
    102104                void  GetParameterValue(double* pvalue, double* v_list,double* gauss_coord);
Note: See TracChangeset for help on using the changeset viewer.