Changeset 4367


Ignore:
Timestamp:
06/30/10 15:58:39 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added some checks in GetInput

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/Gradjx/Gradjx.cpp

    r4218 r4367  
    2626        numberofvertices=vertices->NumberOfVertices();
    2727
     28        /*Allocate gradient: */
     29        gradient=NewVec(numberofvertices);
     30
    2831        /*Compute gradients: */
    2932        for (i=0;i<elements->Size();i++){
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r4358 r4367  
    996996       
    997997        /*Do nothing if we  don't find it: */
    998         if(!input)return;
     998        if(!input) return;
    999999
    10001000        /*Constrain input using cm_min and cm_max: */
     
    10451045        /*Make a copy of the original input: */
    10461046        original=(Input*)this->inputs->GetInput(original_enum);
     1047        if(!original)ISSMERROR(" could not find old input with enum: %s",EnumAsString(original_enum));
    10471048        copy=(Input*)original->copy();
    10481049
     
    10611062        /*Make a copy of the original input: */
    10621063        input=(Input*)this->inputs->GetInput(enum_type);
     1064        if(!input)ISSMERROR(" could not find old input with enum: %s",EnumAsString(enum_type));
    10631065
    10641066        /*Scale: */
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r4363 r4367  
    13711371       
    13721372        /*Do nothing if we  don't find it: */
    1373         if(!input)return;
     1373        if(!input) return;
    13741374
    13751375        /*Constrain input using cm_min and cm_max: */
     
    14351435        /*Make a copy of the original input: */
    14361436        original=(Input*)this->inputs->GetInput(original_enum);
     1437        if(!original)ISSMERROR(" could not find old input with enum: %s",EnumAsString(original_enum));
    14371438        copy=(Input*)original->copy();
    14381439
     
    14511452        /*Make a copy of the original input: */
    14521453        input=(Input*)this->inputs->GetInput(enum_type);
     1454        if(!input)ISSMERROR(" could not find old input with enum: %s",EnumAsString(enum_type));
    14531455
    14541456        /*Scale: */
Note: See TracChangeset for help on using the changeset viewer.