Changeset 16611


Ignore:
Timestamp:
11/04/13 13:49:33 (11 years ago)
Author:
Mathieu Morlighem
Message:

BUG: slope was not recopmuted if already in inputs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Seg.cpp

    r16529 r16611  
    348348        IssmDouble xyz_list[NUMVERTICES][3];
    349349        IssmDouble value;
     350        Input*     input  = NULL;
    350351        Input*     input2 = NULL;
    351352
     
    360361        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    361362        this->parameters->FindParam(&input_enum,InputToL2ProjectEnum);
    362         Input* input = inputs->GetInput(input_enum);
    363         if(!input){
    364                 switch(input_enum){
    365                         case SurfaceSlopeXEnum: input2 = inputs->GetInput(SurfaceEnum); _assert_(input2); break;
    366                         case BedSlopeXEnum:     input2 = inputs->GetInput(BedEnum);     _assert_(input2); break;
    367                         default: _error_("input not found in element");
    368                 }
     363        switch(input_enum){
     364                case SurfaceSlopeXEnum: input2 = inputs->GetInput(SurfaceEnum); _assert_(input2); break;
     365                case BedSlopeXEnum:     input2 = inputs->GetInput(BedEnum);     _assert_(input2); break;
     366                default: input = inputs->GetInput(input_enum);
    369367        }
    370368
     
    378376                GetNodalFunctions(basis,gauss);
    379377
    380                 if(input){
     378                if(input2){
     379                        input2->GetInputDerivativeValue(&value,&xyz_list[0][0],gauss);
     380                }
     381                else{
    381382                        input->GetInputValue(&value,gauss);
    382                 }
    383                 else{
    384                         input2->GetInputDerivativeValue(&value,&xyz_list[0][0],gauss);
    385383                }
    386384
Note: See TracChangeset for help on using the changeset viewer.