Ignore:
Timestamp:
06/06/13 10:35:32 (12 years ago)
Author:
Mathieu Morlighem
Message:

NEW: Added active field in node for node activation/deactivation

File:
1 edited

Legend:

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

    r15104 r15198  
    6868        if (!iomodel->Data(MaskVertexonwaterEnum)) _error_("iomodel->nodeonwater is NULL");
    6969        if (reCast<bool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){
    70                 for(k=1;k<=gsize;k++){
    71                         this->FreezeDof(k);
    72                 }
     70                this->Deactivate();
    7371        }
    7472
     
    8684                        _assert_(iomodel->Data(FlowequationVertexEquationEnum));
    8785                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    88                                 for(k=1;k<=gsize;k++) this->FreezeDof(k);
     86                                this->Deactivate();
    8987                        }
    9088                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==L1L2ApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    91                                 for(k=1;k<=gsize;k++) this->FreezeDof(k);
     89                                this->Deactivate();
    9290                        }
    9391                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealPattynApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){
    9492                                if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    95                                         for(k=1;k<=gsize;k++) this->FreezeDof(k);
     93                                        this->Deactivate();
    9694                                }
    9795                        }
     
    104102                /*spc all nodes on hutter*/
    105103                if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){
    106                         for(k=1;k<=gsize;k++){
    107                                 this->FreezeDof(k);
    108                         }
     104                        this->Deactivate();
    109105                }
    110106        }
     
    116112                /*Constrain all nodes that are not Hutter*/
    117113                if (reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])!=HutterApproximationEnum){
    118                         for(k=1;k<=gsize;k++){
    119                                 this->FreezeDof(k);
    120                         }
     114                        this->Deactivate();
    121115                }
    122116        }
     
    134128                        _assert_(iomodel->Data(MeshVertexonbedEnum));
    135129                        if (!(reCast<bool>(iomodel->Data(MeshVertexonbedEnum)[io_index]))){
    136                                 for(k=1;k<=gsize;k++){
    137                                         this->FreezeDof(k);
    138                                 }
     130                                this->Deactivate();
    139131                        }
    140132                }
     
    497489
    498490        DofInSSet(dof-1); //with 0 displacement for this dof.
     491
     492}
     493/*}}}*/
     494/*FUNCTION Node::Deactivate{{{*/
     495void  Node::Deactivate(void){
     496
     497        indexing.Deactivate();
    499498
    500499}
Note: See TracChangeset for help on using the changeset viewer.