Changeset 4684


Ignore:
Timestamp:
07/21/10 07:50:16 (15 years ago)
Author:
Mathieu Morlighem
Message:

Do not add penalties and ice front if Stokes not activated

Location:
issm/trunk/src/c/objects/Loads
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Loads/Icefront.cpp

    r4575 r4684  
    654654        Node**   nodes=NULL;
    655655        Element* element=NULL;
     656        Penta*   penta=NULL;
    656657
    657658        /*quad grids: */
     
    668669        double v35[3];
    669670        double v45[3];
     671        bool isstokes;
    670672
    671673        /*Recover hook objects: */
     
    673675        element=(Element*)helement->delivers();
    674676        nodes=(Node**)hnodes->deliverp();
    675        
     677
    676678        /*check icefront is associated to a pentaelem: */
    677679        if(element->Enum()!=PentaEnum) ISSMERROR("Only Penta supported yet");
     680        penta=(Penta*)element;
     681
     682        /*If not Stokes, return*/
     683        penta->inputs->GetParameterValue(&isstokes,IsStokesEnum);
     684        if(!isstokes) return;
    678685
    679686        /* Get dof list and node coordinates: */
  • issm/trunk/src/c/objects/Loads/Pengrid.cpp

    r4575 r4684  
    558558        double Ke[4][4]={0.0};
    559559        double penalty_offset;
     560        bool isstokes;
    560561
    561562        /*pointers: */
     
    569570        node=(Node*)hnode->delivers();
    570571        penta=(Penta*)helement->delivers();
     572
     573        /*If not Stokes, return*/
     574        penta->inputs->GetParameterValue(&isstokes,IsStokesEnum);
     575        if(!isstokes) return;
    571576
    572577        //recover slope: */
Note: See TracChangeset for help on using the changeset viewer.