Changeset 24487


Ignore:
Timestamp:
12/19/19 15:46:27 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: allow results to patch again

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/EnthalpyAnalysis.cpp

    r24486 r24487  
    507507                element->AddInput2(WatercolumnEnum,watercolumns,finite_element);
    508508        }
    509         element->AddInput2(BasalforcingsGroundediceMeltingRateEnum,basalmeltingrates,finite_element);
     509        element->AddInput2(BasalforcingsGroundediceMeltingRateEnum,basalmeltingrates,P1Enum);
    510510
    511511        /*Clean up and return*/
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r24483 r24487  
    31993199                        break;
    32003200                default:
    3201                         _error_("Input type \""<<EnumToStringx(this->inputs2->GetInputObjectEnum(output_enum))<<"\" not supported yet");
     3201                        _error_("Input type \""<<EnumToStringx(this->inputs2->GetInputObjectEnum(output_enum))<<"\" not supported yet (While trying to return "<<EnumToStringx(output_enum)<<")");
    32023202        }
    32033203
     
    32093209void       Element::ResultToPatch(IssmDouble* values,int nodesperelement,int output_enum){/*{{{*/
    32103210
     3211        /*Find input*/
    32113212        Input2* input=this->GetInput2(output_enum);
    32123213        if(!input) _error_("input "<<EnumToStringx(output_enum)<<" not found in element");
    32133214
    3214         _error_("not implemented yet ");
    3215         //input->ResultToPatch(values,nodesperelement,this->Sid());
     3215        /*Cast to ElementInput*/
     3216        if(input->ObjectEnum()!=TriaInput2Enum && input->ObjectEnum()!=PentaInput2Enum){
     3217                _error_("Input "<<EnumToStringx(output_enum)<<" is not an ElementInput2");
     3218        }
     3219        ElementInput2* element_input = xDynamicCast<ElementInput2*>(input);
     3220
     3221        /*Get Number of nodes and make sure that it is the same as the one provided*/
     3222        int numnodes = this->GetNumberOfNodes(element_input->GetInputInterpolationType());
     3223        _assert_(numnodes==nodesperelement);
     3224
     3225        /*Fill in arrays*/
     3226        for(int i=0;i<numnodes;i++) values[this->sid*numnodes + i] = element_input->element_values[i];
    32163227
    32173228} /*}}}*/
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r24434 r24487  
    24912491        }
    24922492        else{
    2493                 _error_("interpolation "<<EnumToStringx(pentainput->GetInterpolation())<<" not implemented yet");
     2493                _error_("interpolation "<<EnumToStringx(pentainput->GetInterpolation())<<" not implemented yet (while trying to extrude "<<EnumToStringx(enum_type)<<")");
    24942494        }
    24952495}
Note: See TracChangeset for help on using the changeset viewer.