Changeset 15594


Ignore:
Timestamp:
07/24/13 15:21:04 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: SIA constrain nodes in CreateNodes instead of constructor

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

Legend:

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

    r15583 r15594  
    9797        #endif
    9898
    99         /*Diagnostic SIA*/
    100         if(analysis_type==DiagnosticSIAAnalysisEnum){
    101                 _assert_(iomodel->Data(FlowequationVertexEquationEnum));
    102                 /*Constrain all nodes that are not SIA*/
    103                 if(reCast<int>(in_approximation)!=SIAApproximationEnum){
    104                         this->Deactivate();
    105                 }
    106         }
    107 
    108         /*Prognostic/ Melting/ Slopecompute/ Balancethickness*/
     99        /*2d solutions in 3d, we need to constrain all the nodes that are not on base*/
    109100        if(
    110101                                analysis_type==PrognosticAnalysisEnum ||
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp

    r15583 r15594  
    1111void    CreateNodesDiagnosticSIA(Nodes** pnodes, IoModel* iomodel){
    1212
     13        /*Intermediaries*/
     14        bool  isSIA;
     15        Node* node = NULL;
     16
    1317        /*Fetch parameters: */
    14         bool isSIA;
    1518        iomodel->Constant(&isSIA,FlowequationIsSIAEnum);
    1619
     
    2427        iomodel->FetchData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,
    2528                                MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);
     29
    2630        for(int i=0;i<iomodel->numberofvertices;i++){
    2731                if(iomodel->my_vertices[i]){
    28                         nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,i,iomodel,DiagnosticSIAAnalysisEnum,reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[i])));
     32
     33                        /*Create new node if is in this processor's partition*/
     34                        node = new Node(iomodel->nodecounter+i+1,i,i,iomodel,DiagnosticSIAAnalysisEnum,reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[i]));
     35
     36                        /*Deactivate node if not SIA*/
     37                        if(reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[i])!=SIAApproximationEnum){
     38                                node->Deactivate();
     39                        }
     40
     41                        /*Add to Nodes dataset*/
     42                        nodes->AddObject(node);
    2943                }
    3044        }
     45
    3146        iomodel->DeleteData(9,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,FlowequationBorderSSAEnum,FlowequationBorderFSEnum,
    3247                                MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MaskVertexonwaterEnum,FlowequationVertexEquationEnum,DiagnosticReferentialEnum);
Note: See TracChangeset for help on using the changeset viewer.