Changeset 5912


Ignore:
Timestamp:
09/20/10 15:58:55 (15 years ago)
Author:
Mathieu Morlighem
Message:

minor cosmetics

File:
1 edited

Legend:

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

    r5910 r5912  
    738738void  Tria::CreatePVector(Vec pg, Vec pf){
    739739
     740        /*retrive parameters: */
     741        ElementVector* pe=NULL;
    740742        int analysis_type;
    741 
    742         /*retrive parameters: */
    743743        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    744744
     
    749749
    750750        /*Just branch to the correct load generator, according to the type of analysis we are carrying out: */
    751         if (analysis_type==DiagnosticHorizAnalysisEnum){
    752                 CreatePVectorDiagnosticMacAyeal( pg,pf);
    753         }
    754         else if (analysis_type==AdjointHorizAnalysisEnum){
    755                 CreatePVectorAdjointHoriz( pg);
    756         }
    757         else if (analysis_type==DiagnosticHutterAnalysisEnum){
    758                 CreatePVectorDiagnosticHutter( pg);
    759         }
    760         else if (analysis_type==BedSlopeXAnalysisEnum || analysis_type==SurfaceSlopeXAnalysisEnum || analysis_type==BedSlopeYAnalysisEnum || analysis_type==SurfaceSlopeYAnalysisEnum){
    761                 CreatePVectorSlope( pg);
    762         }
    763         else if (analysis_type==PrognosticAnalysisEnum){
    764                 if (GetElementType()==P1Enum)
    765                  CreatePVectorPrognostic_CG( pg);
    766                 else if (GetElementType()==P1DGEnum)
    767                 CreatePVectorPrognostic_DG( pg);
    768                 else
    769                  ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
    770         }
    771         else if (analysis_type==BalancedthicknessAnalysisEnum){
    772                 if (GetElementType()==P1Enum)
    773                  CreatePVectorBalancedthickness_CG( pg);
    774                 else if (GetElementType()==P1DGEnum)
    775                  CreatePVectorBalancedthickness_DG( pg);
    776                 else
    777                  ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
    778         }
    779         else if (analysis_type==AdjointBalancedthicknessAnalysisEnum){
    780                 CreatePVectorAdjointBalancedthickness(pg);
    781         }
    782         else if (analysis_type==BalancedvelocitiesAnalysisEnum){
    783                 CreatePVectorBalancedvelocities( pg);
    784         }
    785         else{
    786                 ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
     751        switch(analysis_type){
     752                case DiagnosticHorizAnalysisEnum:
     753                        CreatePVectorDiagnosticMacAyeal( pg,pf);
     754                        break;
     755                case AdjointHorizAnalysisEnum:
     756                        CreatePVectorAdjointHoriz( pg);
     757                        break;
     758                case DiagnosticHutterAnalysisEnum:
     759                        CreatePVectorDiagnosticHutter( pg);
     760                        break;
     761                case BedSlopeXAnalysisEnum: case SurfaceSlopeXAnalysisEnum: case BedSlopeYAnalysisEnum: case SurfaceSlopeYAnalysisEnum:
     762                        CreatePVectorSlope( pg);
     763                        break;
     764                case PrognosticAnalysisEnum:
     765                        if (GetElementType()==P1Enum)
     766                         CreatePVectorPrognostic_CG( pg);
     767                        else if (GetElementType()==P1DGEnum)
     768                         CreatePVectorPrognostic_DG( pg);
     769                        else
     770                         ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
     771                        break;
     772                case BalancedthicknessAnalysisEnum:
     773                        if (GetElementType()==P1Enum)
     774                         CreatePVectorBalancedthickness_CG( pg);
     775                        else if (GetElementType()==P1DGEnum)
     776                         CreatePVectorBalancedthickness_DG( pg);
     777                        else
     778                         ISSMERROR("Element type %s not supported yet",EnumToString(GetElementType()));
     779                        break;
     780                case AdjointBalancedthicknessAnalysisEnum:
     781                        CreatePVectorAdjointBalancedthickness(pg);
     782                        break;
     783                case BalancedvelocitiesAnalysisEnum:
     784                        CreatePVectorBalancedvelocities( pg);
     785                        break;
     786                default:
     787                        ISSMERROR("analysis %i (%s) not supported yet",analysis_type,EnumToString(analysis_type));
    787788        }
    788789
Note: See TracChangeset for help on using the changeset viewer.