Changeset 15230


Ignore:
Timestamp:
06/10/13 14:00:22 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added AllActive function to Tria, that checks that all nodes are active

Location:
issm/trunk-jpl/src/c/classes
Files:
4 edited

Legend:

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

    r15223 r15230  
    58275827
    58285828#ifdef _HAVE_HYDROLOGY_
     5829/*FUNCTION Tria::AllActive{{{*/
     5830bool Tria::AllActive(void){
     5831
     5832        /*Intermediaries*/
     5833        const int  numnodes = NUMVERTICES;
     5834
     5835        for(int i=0;i<numnodes;i++){
     5836                if(!this->nodes[i]->IsActive()) return false;
     5837        }
     5838
     5839        return true;
     5840}
     5841/*}}}*/
    58295842/*FUNCTION Tria::CreateHydrologyWaterVelocityInput {{{*/
    58305843void Tria::CreateHydrologyWaterVelocityInput(void){
     
    60616074        GaussTria   *gauss = NULL;
    60626075
     6076        /*Check that all nodes are active, else return empty matrix*/
     6077        if(!this->AllActive()) return NULL;
     6078
    60636079        /*Initialize Element matrix*/
    60646080        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
     
    62296245        IssmDouble basis[numdof];
    62306246        GaussTria* gauss=NULL;
     6247
     6248        /*Check that all nodes are active, else return empty matrix*/
     6249        if(!this->AllActive()) return NULL;
    62316250
    62326251        /*Initialize Element vector*/
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r15223 r15230  
    259259                void    GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode);
    260260                void    GetHydrologyTransfer(Vector<IssmDouble>* transfer);
     261                bool    AllActive(void);
    261262                #endif
    262263                #ifdef _HAVE_BALANCED_
  • issm/trunk-jpl/src/c/classes/Node.cpp

    r15223 r15230  
    503503
    504504        indexing.Activate();
     505
     506}
     507/*}}}*/
     508/*FUNCTION Node::IsActive{{{*/
     509bool Node::IsActive(void){
     510
     511        return indexing.active;
    505512
    506513}
  • issm/trunk-jpl/src/c/classes/Node.h

    r15223 r15230  
    8787                void   GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
    8888                void   FreezeDof(int dof);
     89                bool   IsActive(void);
    8990                void   Activate(void);
    9091                void   Deactivate(void);
Note: See TracChangeset for help on using the changeset viewer.