Changeset 21573


Ignore:
Timestamp:
02/22/17 07:21:50 (8 years ago)
Author:
tsantos
Message:

CHG: changes in FemModel->ReMesh (now it just sets elements, vertices, nodes, constrains and materials). Changes in refpattern file names. NOTE: AMR not working yet.

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

Legend:

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

    r21562 r21573  
    546546   std::string filename1 = filepath + "/2D_Triang_Rib_3.rpt";
    547547   std::string filename2 = filepath + "/2D_Triang_Rib_4.rpt";
    548    std::string filename3 = filepath + "/2D_Triang_Rib2_Side_3_4.rpt";
    549    std::string filename4 = filepath + "/2D_Triang_Rib2_Side_3_4permuted.rpt";
    550    std::string filename5 = filepath + "/2D_Triang_Rib2_Side_3_5.rpt";
    551         std::string filename6 = filepath + "/2D_Triang_Rib2_Side_3_5permuted.rpt";
     548   std::string filename3 = filepath + "/2D_Triang_Rib_OnlyTriang_Side_3_4.rpt";
     549   std::string filename4 = filepath + "/2D_Triang_Rib_OnlyTriang_Side_3_4_permuted.rpt";
     550   std::string filename5 = filepath + "/2D_Triang_Rib_OnlyTriang_Side_3_5.rpt";
     551        std::string filename6 = filepath + "/2D_Triang_Rib_OnlyTriang_Side_3_5_permuted.rpt";
    552552   std::string filename7 = filepath + "/2D_Triang_Rib_5.rpt";
    553553
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r21562 r21573  
    29342934        /*Get vertices coordinates of the coarse mesh (father mesh)*/
    29352935        /*elements comes in Matlab indexing*/
    2936         this->GetMesh(this,&x,&y,&z,&elements);
     2936        this->GetMesh(this->vertices,this->elements,&x,&y,&z,&elements);
    29372937       
    29382938        /*Create initial mesh (coarse mesh) in neopz data structure*/
     
    29532953}
    29542954/*}}}*/
    2955 FemModel* FemModel::ReMesh(void){/*{{{*/
     2955void FemModel::ReMesh(void){/*{{{*/
    29562956       
    29572957        /*Variables*/
     
    29732973        this->ElementsAndVerticesPartitioning(newnumberofvertices,newnumberofelements,elementswidth,newelementslist,&my_elements,&my_vertices);
    29742974
    2975         /*Creating new femmodel with new mesh*/
    2976         FemModel* output = new FemModel(*this);
    2977 
    2978         /*Copy basic attributes:*/
    2979         output->nummodels        = this->nummodels;
    2980         output->solution_type    = this->solution_type;
    2981         output->analysis_counter = this->analysis_counter;
    2982 
    2983         /*Now, deep copy arrays:*/
    2984         output->analysis_type_list=xNew<int>(this->nummodels);
    2985         xMemCpy<int>(output->analysis_type_list,this->analysis_type_list,this->nummodels);
    2986         output->profiler=static_cast<Profiler*>(this->profiler->copy());
    2987         output->parameters=static_cast<Parameters*>(this->parameters->Copy());     
    29882975        if(this->loads->Size()!=0){
    29892976                _error_("not supported yet");
    29902977        }
    2991         else{
    2992                 output->loads=new Loads();
    2993         }
    2994         output->results=new Results();
    2995         output->amr = NULL;
    2996         if(IssmComm::GetRank()==0){
    2997                 if(!this->amr) _error_("this->amr is NULL!");
    2998                 output->amr = new AdaptiveMeshRefinement(*this->amr);
    2999                 if(!output->amr) _error_("output->amr is NULL!");
    3000         }
    30012978
    30022979        /*Create vertices*/
    3003         output->vertices=new Vertices();
    3004         this->CreateVertices(newnumberofvertices,newnumberofelements,elementswidth,newelementslist,my_vertices,newx,newy,newz,output->vertices);
     2980        Vertices* new_vertices=new Vertices();
     2981        this->CreateVertices(newnumberofvertices,newnumberofelements,elementswidth,newelementslist,my_vertices,newx,newy,newz,new_vertices);
    30052982 
    30062983        /*Creating elements*/
    30072984        /*Just Tria in this version*/
    3008         output->elements=new Elements();
    3009         this->CreateElements(newnumberofelements,elementswidth,newelementslist,my_elements,output->elements);
     2985        Elements* new_elements=new Elements();
     2986        this->CreateElements(newnumberofelements,elementswidth,newelementslist,my_elements,new_elements);
    30102987
    30112988        /*Creating materials*/
    3012         output->materials=new Materials();
    3013         this->CreateMaterials(newnumberofelements,my_elements,output->materials);
    3014        
    3015         /*Creating nodes*/
     2989        Materials* new_materials=new Materials();
     2990        this->CreateMaterials(newnumberofelements,my_elements,new_materials);
     2991       
     2992        /*Creating nodes and constraints*/
    30162993        /*Just SSA (2D) and P1 in this version*/
    3017         output->nodes=new Nodes();
    3018        
     2994        Nodes* new_nodes=new Nodes();
     2995        Constraints* new_constraints=new Constraints();
     2996
    30192997        int nodecounter=0;
    3020         for(int i=0;i<output->nummodels;i++){//create nodes for each analysis in analysis_type_list
    3021        
    3022                 int analysis_enum = output->analysis_type_list[i];
     2998        int constraintcounter=0;
     2999        for(int i=0;i<this->nummodels;i++){//create nodes for each analysis in analysis_type_list
     3000       
     3001                int analysis_enum = this->analysis_type_list[i];
    30233002               
    30243003                /*As the domain is 2D, it is not necessary to create nodes for this analysis*/
     
    30263005                if(analysis_enum==StressbalanceVerticalAnalysisEnum) continue;     
    30273006               
    3028                 this->CreateNodes(newnumberofvertices,my_vertices,nodecounter,analysis_enum,output->nodes);
    3029                 this->UpdateElements(newnumberofelements,newelementslist,my_elements,nodecounter,i,output->elements);
    3030 
    3031                 if(output->nodes->Size()) nodecounter = output->nodes->MaximumId();
    3032         }
    3033 
    3034         /*Create constraints*/
    3035         output->constraints=new Constraints();
    3036         this->CreateConstraints(newnumberofvertices,newnumberofelements,newx,newy,my_vertices,output->constraints);
    3037        
    3038         output->elements->Presort();
    3039         output->nodes->Presort();
    3040         output->vertices->Presort();
    3041         output->loads->Presort();
    3042         output->materials->Presort();
    3043         output->constraints->Presort();
     3007                this->CreateNodes(newnumberofvertices,my_vertices,nodecounter,analysis_enum,new_nodes);
     3008                if(analysis_enum==StressbalanceAnalysisEnum) this->CreateConstraints(newnumberofvertices,newnumberofelements,nodecounter,constraintcounter,newx,newy,my_vertices,new_constraints);
     3009                this->UpdateElements(newnumberofelements,newelementslist,my_elements,nodecounter,i,new_elements);
     3010
     3011
     3012                if(IssmComm::GetRank()==2){
     3013                        _printf_("New constraints: CPU 1\n");
     3014                        //this->constraints->DeepEcho();
     3015                        new_constraints->DeepEcho();
     3016                        printarray(my_vertices,newnumberofvertices,1);
     3017                        _error_("stop!");
     3018                }
     3019
     3020
     3021                if(new_nodes->Size()) nodecounter=new_nodes->MaximumId();
     3022                constraintcounter = new_constraints->NumberOfConstraints();
     3023                /*Make sure nodecounter is at least 0 (if no node exists, maxid will be -1*/
     3024                _assert_(nodecounter>=0);
     3025        }
     3026
     3027        new_elements->Presort();
     3028        new_nodes->Presort();
     3029        new_vertices->Presort();
     3030        this->loads->Presort();
     3031        new_materials->Presort();
     3032        new_constraints->Presort();
    30443033
    30453034        /*reset hooks for elements, loads and nodes: */
    3046         output->elements->ResetHooks();
    3047         output->loads->ResetHooks();
    3048         output->materials->ResetHooks();
     3035        new_elements->ResetHooks();
     3036        this->loads->ResetHooks();
     3037        new_materials->ResetHooks();
    30493038
    30503039        /*do the post-processing of the datasets to get an FemModel that can actually run analyses: */
    30513040        int analysis_type;
    3052         for(int i=0;i<output->nummodels;i++){
    3053                 analysis_type=output->analysis_type_list[i];
    3054                 output->SetCurrentConfiguration(analysis_type);
    3055                 ConfigureObjectsx(output->elements,output->loads,output->nodes,output->vertices,output->materials,output->parameters);
     3041        for(int i=0;i<this->nummodels;i++){
     3042                analysis_type=this->analysis_type_list[i];
     3043                //SetCurrentConfiguration(analysis_type);
     3044
     3045                this->analysis_counter=i;       
     3046                /*Now, plug analysis_counter and analysis_type inside the parameters: */
     3047                this->parameters->SetParam(this->analysis_counter,AnalysisCounterEnum);
     3048                this->parameters->SetParam(analysis_type,AnalysisTypeEnum);
     3049                this->parameters->SetParam(analysis_type,ConfigurationTypeEnum);
     3050
     3051                /*configure elements, loads and nodes, for this new analysis: */
     3052                new_elements->SetCurrentConfiguration(new_elements,this->loads,new_nodes,new_vertices,new_materials,this->parameters);
     3053                this->loads->SetCurrentConfiguration(new_elements,this->loads,new_nodes,new_vertices,new_materials,this->parameters);
     3054
     3055                /*take care of toolkits options, that depend on this analysis type (present only after model processor)*/
     3056                if(this->parameters->Exist(ToolkitsOptionsStringsEnum)){
     3057                        ToolkitsOptionsFromAnalysis(this->parameters,analysis_type);
     3058                        if(VerboseSolver()) _printf0_("      toolkits Options set for analysis type: " << EnumToStringx(analysis_type) << "\n");
     3059                }
     3060               
     3061                ConfigureObjectsx(new_elements,this->loads,new_nodes,new_vertices,new_materials,this->parameters);
    30563062                if(i==0){
    3057                         VerticesDofx(output->vertices,output->parameters); //only call once, we only have one set of vertices
    3058                         //GetMaskOfIceVerticesLSMx(output); //itapopo it needs element->inputs
    3059                 }
    3060                 SpcNodesx(output->nodes,output->constraints,output->parameters,analysis_type);
    3061                 NodesDofx(output->nodes,output->parameters,analysis_type);
     3063                        VerticesDofx(new_vertices,this->parameters); //only call once, we only have one set of vertices
     3064                }
     3065                SpcNodesx(new_nodes,new_constraints,this->parameters,analysis_type);
     3066                NodesDofx(new_nodes,this->parameters,analysis_type);
    30623067        }
    30633068
    30643069        /*Finally: interpolate all inputs and insert them into the new elements.*/
    3065         this->InterpolateInputs(output);
    3066         GetMaskOfIceVerticesLSMx(output);
     3070        this->InterpolateInputs(new_vertices,new_elements);
     3071
     3072        if(IssmComm::GetRank()==2){
     3073                _printf_("New constraints: CPU 1\n");
     3074                //this->constraints->DeepEcho();
     3075                new_constraints->DeepEcho();
     3076                _error_("stop!");
     3077        }
     3078
     3079
     3080        /*Delete old structure and set new pointers*/
     3081        delete this->vertices;          this->vertices          = new_vertices;
     3082        delete this->elements;          this->elements          = new_elements;
     3083        delete this->nodes;                     this->nodes                     = new_nodes;
     3084        delete this->constraints;       this->constraints       = new_constraints;
     3085        delete this->materials;         this->materials = new_materials;
     3086       
     3087        GetMaskOfIceVerticesLSMx(this);
    30673088
    30683089        /*Reset current configuration: */
    3069         analysis_type=output->analysis_type_list[this->analysis_counter];
    3070         output->SetCurrentConfiguration(analysis_type);
     3090        analysis_type=this->analysis_type_list[this->analysis_counter];
     3091        SetCurrentConfiguration(analysis_type);
    30713092
    30723093        /*Cleanup*/
     
    30783099        xDelete<bool>(my_elements);
    30793100
    3080         return output;
    3081 
    3082 }
    3083 /*}}}*/
    3084 void FemModel::InterpolateInputs(FemModel* newfemmodel){/*{{{*/
     3101        return;
     3102
     3103}
     3104/*}}}*/
     3105void FemModel::InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements){/*{{{*/
    30853106
    30863107        int maxinputs = MaximumNumberOfDefinitionsEnum;
     
    31453166        /*========== Deal with P0 inputs ==========*/
    31463167        int numelementsold = this->elements->NumberOfElements();
    3147         int numelementsnew = newfemmodel->elements->NumberOfElements();
     3168        int numelementsnew = newfemmodel_elements->NumberOfElements();
    31483169        int numverticesold = this->vertices->NumberOfVertices();
    3149         int numverticesnew = newfemmodel->vertices->NumberOfVertices();
     3170        int numverticesnew = newfemmodel_vertices->NumberOfVertices();
    31503171        IssmDouble* P0inputsold = xNew<IssmDouble>(numelementsold*numP0inputs);
    31513172        IssmDouble* P0inputsnew = NULL;
     
    31863207       
    31873208        /*Get the old mesh*/
    3188         this->GetMesh(this,&Xold,&Yold,&Zold,&Indexold);
     3209        this->GetMesh(this->vertices,this->elements,&Xold,&Yold,&Zold,&Indexold);
    31893210
    31903211        /*Get the new mesh*/
    3191         this->GetMesh(newfemmodel,&Xnew,&Ynew,&Znew,&Indexnew);
     3212        this->GetMesh(newfemmodel_vertices,newfemmodel_elements,&Xnew,&Ynew,&Znew,&Indexnew);
    31923213
    31933214        /*Calculate the center points xc and xy*/
     
    32253246
    32263247                /*Update elements from inputs: */
    3227                 for(int j=0;j<newfemmodel->elements->Size();j++){
    3228                         Element* element=xDynamicCast<Element*>(newfemmodel->elements->GetObjectByOffset(j));
     3248                for(int j=0;j<newfemmodel_elements->Size();j++){
     3249                        Element* element=xDynamicCast<Element*>(newfemmodel_elements->GetObjectByOffset(j));
    32293250                        switch(P0input_interp[i]){     
    32303251                                case P0Enum:
     
    32553276
    32563277                /*Update elements from inputs: */
    3257                 InputUpdateFromVectorx(newfemmodel,vector,P1input_enums[i],VertexSIdEnum);//VertexSId because vector is serial in SId indexing
    3258                
     3278                //InputUpdateFromVectorx(newfemmodel,vector,P1input_enums[i],VertexSIdEnum);//VertexSId because vector is serial in SId indexing
     3279                for(int j=0;j<newfemmodel_elements->Size();j++){
     3280                        Element* element=xDynamicCast<Element*>(newfemmodel_elements->GetObjectByOffset(j));
     3281                        element->InputUpdateFromVector(vector,P1input_enums[i],VertexSIdEnum);
     3282                }
     3283
    32593284                xDelete<IssmDouble>(vector);
    32603285        }
     
    35113536}
    35123537/*}}}*/
    3513 void FemModel::GetMesh(FemModel* femmodel,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist){/*{{{*/
    3514 
    3515         if(!femmodel) _error_("GetMesh: NULL femmodel.");
     3538void FemModel::GetMesh(Vertices* femmodel_vertices, Elements* femmodel_elements,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist){/*{{{*/
     3539
     3540        if(!femmodel_vertices) _error_("GetMesh: vertices are NULL.");
     3541        if(!femmodel_elements) _error_("GetMesh: elements are NULL.");
    35163542       
    35173543        int numberofvertices, numberofelements;
     
    35233549       
    35243550        /*Get vertices coordinates*/
    3525         VertexCoordinatesx(&x, &y, &z, femmodel->vertices,false) ;
    3526 
    3527         numberofvertices = femmodel->vertices->NumberOfVertices();
    3528         numberofelements = femmodel->elements->NumberOfElements();
     3551        VertexCoordinatesx(&x, &y, &z, femmodel_vertices,false) ;
     3552
     3553        numberofvertices = femmodel_vertices->NumberOfVertices();
     3554        numberofelements = femmodel_elements->NumberOfElements();
    35293555       
    35303556        /*Get element vertices*/
     
    35353561
    35363562        /*Go through elements, and for each element, get vertices*/
    3537    for(int i=0;i<femmodel->elements->Size();i++){
    3538         Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
     3563   for(int i=0;i<femmodel_elements->Size();i++){
     3564        Element* element=xDynamicCast<Element*>(femmodel_elements->GetObjectByOffset(i));
    35393565        element->GetVerticesSidList(elem_vertices);
    35403566        vid1->SetValue(element->sid,elem_vertices[0],INS_VAL);
     
    35783604}
    35793605/*}}}*/
    3580 void FemModel::CreateConstraints(int newnumberofvertices,int newnumberofelements,IssmDouble* newx,IssmDouble* newy,int* my_vertices,Constraints* constraints){/*{{{*/
    3581 
     3606void FemModel::CreateConstraints(int newnumberofvertices,int newnumberofelements,int nodecounter,int constraintcounter,IssmDouble* newx,IssmDouble* newy,int* my_vertices,Constraints* constraints){/*{{{*/
     3607
     3608        /*itapopo ATTENTION: JUST SPCVX AND SPCVY TO TEST!!!*/
     3609        /*OTHERS CONSTRAINTS MUST BE IMPLEMENTED!!!*/
     3610       
    35823611        /*Get x and y of the mesh i-1*/
    35833612        int numberofvertices                    = this->vertices->NumberOfVertices();
     
    35893618
    35903619        /*elementslist is in Matlab indexing*/
    3591         this->GetMesh(this,&x,&y,&z,&elementslist);
    3592        
    3593         /*itapopo ATTENTION: JUST SPCVX AND SPCVY TO TEST!!!*/
    3594         /*OTHERS CONSTRAINTS MUST BE IMPLEMENTED!!!*/
    3595 
     3620        this->GetMesh(this->vertices,this->elements,&x,&y,&z,&elementslist);
     3621       
    35963622        /*Get spcvx and spcvy for mesh i-1*/
    3597         IssmDouble *spcvx=NULL;
    3598         IssmDouble *spcvy=NULL;
    3599         IssmDouble *spcvxflag=NULL;
    3600         IssmDouble *spcvyflag=NULL;
    3601         int numberofnodes_analysistype=this->nodes->NumberOfNodes(StressbalanceAnalysisEnum);
    3602         Vector<IssmDouble>* vspcvx=new Vector<IssmDouble>(numberofnodes_analysistype);
    3603         Vector<IssmDouble>* vspcvy=new Vector<IssmDouble>(numberofnodes_analysistype);
    3604         Vector<IssmDouble>* vspcvxflag=new Vector<IssmDouble>(numberofnodes_analysistype);
    3605         Vector<IssmDouble>* vspcvyflag=new Vector<IssmDouble>(numberofnodes_analysistype);
     3623        IssmDouble *spcvx                                               = NULL;
     3624        IssmDouble *spcvy                                               = NULL;
     3625        IssmDouble *spcvxflag                           = NULL;
     3626        IssmDouble *spcvyflag                           = NULL;
     3627        int numberofnodes_analysistype  = this->nodes->NumberOfNodes(StressbalanceAnalysisEnum);
     3628        Vector<IssmDouble>* vspcvx                      = new Vector<IssmDouble>(numberofnodes_analysistype);
     3629        Vector<IssmDouble>* vspcvy                      = new Vector<IssmDouble>(numberofnodes_analysistype);
     3630        Vector<IssmDouble>* vspcvxflag  = new Vector<IssmDouble>(numberofnodes_analysistype);
     3631        Vector<IssmDouble>* vspcvyflag  = new Vector<IssmDouble>(numberofnodes_analysistype);
     3632       
    36063633        for(int i=0;i<numberofnodes_analysistype;i++){
    36073634                vspcvx->SetValue(i,0.,INS_VAL);
     
    36123639
    36133640        for(int i=0;i<this->constraints->Size();i++){
    3614                 SpcStatic* spc=xDynamicCast<SpcStatic*>(this->constraints->GetObjectByOffset(i));
    3615                 int dof=spc->GetDof();
    3616                 int node=spc->GetNodeId();
    3617                 IssmDouble spcvalue=spc->GetValue();
    3618                 int nodeindex=node-1;
    3619                 if(dof==0) {//vx
     3641                SpcStatic* spc                  = xDynamicCast<SpcStatic*>(this->constraints->GetObjectByOffset(i));
     3642                int dof                                 = spc->GetDof();
     3643                int node                                        = spc->GetNodeId();
     3644                IssmDouble spcvalue     = spc->GetValue();
     3645                int nodeindex                   = node-1;
     3646               
     3647                if(IssmComm::GetRank()==0)     
     3648                  {//itapopo
     3649                 if(dof==0) {//vx
     3650                        if(IssmComm::GetRank()==0) _printf_("Node: " << nodeindex << "\tdof: " << dof << "\tspcvalue: " << spcvalue << "\n") ;
    36203651                        vspcvx->SetValue(nodeindex,spcvalue,INS_VAL);
    36213652                        vspcvxflag->SetValue(nodeindex,1,INS_VAL);
    36223653                }
    3623                 else if(dof==1){//vy
     3654                if(dof==1){//vy
    36243655                        vspcvy->SetValue(nodeindex,spcvalue,INS_VAL);
    36253656                        vspcvyflag->SetValue(nodeindex,1,INS_VAL);
    36263657                }
    3627                 else{
    3628                         /*nothing here*/
    3629                 }
    3630         }
     3658
     3659                  }//itapopo
     3660        }
     3661
     3662        #ifdef _HAVE_PETSC_
     3663                _printf_("Tem PETSC\n");
     3664        #endif
    36313665
    36323666        /*Assemble*/
     
    36363670        vspcvyflag->Assemble();
    36373671
     3672        IssmDouble pvalue1,pvalue2;
     3673        vspcvx->GetValue(&pvalue1,0);
     3674        vspcvxflag->GetValue(&pvalue2,0);
     3675        if(IssmComm::GetRank()==0) _printf_("Node: " << 0 << "\tspcvalue: " << pvalue1 << "\tflag: " << pvalue2 << "\n") ;
     3676        vspcvx->GetValue(&pvalue1,5);
     3677        vspcvxflag->GetValue(&pvalue2,5);
     3678        if(IssmComm::GetRank()==0) _printf_("Node: " << 5 << "\tspcvalue: " << pvalue1 << "\tflag: " << pvalue2 << "\n") ;
     3679       
     3680       
     3681       
    36383682        /*Serialize*/
    36393683        spcvx            = vspcvx->ToMPISerial();
     
    36573701        InterpFromMeshToMesh2dx(&newspcvxflag,elementslist,x,y,nods_data,nels_data,spcvxflag,M_data,N_data,newx,newy,N_interp,NULL);
    36583702        InterpFromMeshToMesh2dx(&newspcvyflag,elementslist,x,y,nods_data,nels_data,spcvyflag,M_data,N_data,newx,newy,N_interp,NULL);
    3659        
    3660         int nodecounter                 = 0; //itapopo deve começar pelo primeiro nó do StressbalanceAnalysis
     3703
     3704        if(IssmComm::GetRank()==1){
     3705                _printf_("CPU 1:\n");
     3706                _printf_("Old spcvx:\n");
     3707                printarray(spcvx,nods_data,1);
     3708                _printf_("Old spcvxflag:\n");
     3709                printarray(spcvxflag,nods_data,1);
     3710                _error_("Stop!!");
     3711        }
     3712
     3713
     3714
     3715
     3716
    36613717        int count                                       = 0;
    3662         int constraintcounter   = 0; //itapopo
    36633718        IssmDouble eps                          = 1.e-8;
    36643719
  • issm/trunk-jpl/src/c/classes/FemModel.h

    r21540 r21573  
    148148                /*Adaptive mesh refinement methods*/
    149149                void InitializeAdaptiveRefinement(void);
    150                 FemModel* ReMesh(void);
    151                 void GetMesh(FemModel* femmodel,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist);
     150                void ReMesh(void);
     151                void GetMesh(Vertices* femmodel_vertices,Elements* femmodel_elements,IssmDouble** px, IssmDouble** py, IssmDouble** pz, int** pelementslist);
    152152                int GetElementsWidth(){return 3;};//just tria elements in this first version
    153153                void ExecuteRefinement(int &numberofvertices,int &numberofelements,IssmDouble** px,IssmDouble** py,IssmDouble** pz,int** pelementslist);
     
    157157                void CreateMaterials(int newnumberofelements,bool* my_elements,Materials* materials);
    158158                void CreateNodes(int newnumberofvertices,int* my_vertices,int nodecounter,int analysis_enum,Nodes* nodes);
    159                 void CreateConstraints(int newnumberofvertices,int newnumberofelements,IssmDouble* newx,IssmDouble* newy,int* my_vertices,Constraints* constraints);
    160                 void InterpolateInputs(FemModel* femmodel);
     159                void CreateConstraints(int newnumberofvertices,int newnumberofelements,int nodecounter,int constraintcounter,IssmDouble* newx,IssmDouble* newy,int* my_vertices,Constraints* constraints);
     160                void InterpolateInputs(Vertices* newfemmodel_vertices,Elements* newfemmodel_elements);
    161161                void UpdateElements(int newnumberofelements,int* newelementslist,bool* my_elements,int nodecounter,int analysis_counter,Elements* newelements);
    162162                void ElementsAndVerticesPartitioning(int& newnumberofvertices,int& newnumberofelements,int& elementswidth,int* newelementslist,bool** pmy_elements,int** pmy_vertices);
  • issm/trunk-jpl/src/c/cores/transient_core.cpp

    r21562 r21573  
    171171                #ifdef _HAVE_NEOPZ_
    172172                int isamr=true;
    173                 if(isamr){
    174                         FemModel* newfemmodel = femmodel->ReMesh();
    175                         delete femmodel;
    176                         femmodel = newfemmodel;
    177                 }
     173                if(isamr) femmodel->ReMesh();
    178174                #endif
    179175       
Note: See TracChangeset for help on using the changeset viewer.