Ignore:
Timestamp:
03/21/14 09:18:17 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removed duplicate SpawnTria that required location only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp

    r17513 r17514  
    7979        return this->enum_type;
    8080
    81 }
    82 /*}}}*/
    83 /*FUNCTION PentaInput::SpawnTriaInput{{{*/
    84 Input* PentaInput::SpawnTriaInput(int location){
    85 
    86         /*output*/
    87         TriaInput* outinput=NULL;
    88 
    89         if(this->element_type==P0Enum){
    90                 outinput=new TriaInput(this->enum_type,&this->values[0],P0Enum);
    91         }
    92         else{
    93                 /*Assume P1 interpolation only for now*/
    94                 IssmDouble newvalues[3];
    95 
    96                 /*Create array of indices depending on location (0=base 1=surface)*/
    97                 int indices[3];
    98                 switch(location){
    99                         case 0:
    100                                 indices[0] = 0;
    101                                 indices[1] = 1;
    102                                 indices[2] = 2;
    103                                 break;
    104                         case 1:
    105                                 indices[0] = 3;
    106                                 indices[1] = 4;
    107                                 indices[2] = 5;
    108                                 break;
    109                         default:
    110                                 _error_("case "<<location<<" not supported");
    111                 }
    112 
    113                 /*Create new input*/
    114                 for(int i=0;i<3;i++){
    115                         _assert_(indices[i]>=0 && indices[i]<6);
    116                         newvalues[i]=this->values[indices[i]];
    117                 }
    118                 outinput=new TriaInput(this->enum_type,&newvalues[0],P1Enum);
    119         }
    120 
    121         /*Assign output*/
    122         return outinput;
    12381}
    12482/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.