Changeset 17245


Ignore:
Timestamp:
02/07/14 17:31:01 (11 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed boundary condition problem for Mesh2dHorizontal (vy can be spc'ed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp

    r17244 r17245  
    484484                else{
    485485                        IoModelToConstraintsx(constraints,iomodel,StressbalanceSpcvxEnum,StressbalanceAnalysisEnum,finiteelement,1);
    486                         if(iomodel->meshtype==Mesh3DEnum){
     486                        if(iomodel->meshtype!=Mesh2DverticalEnum){
    487487                                IoModelToConstraintsx(constraints,iomodel,StressbalanceSpcvyEnum,StressbalanceAnalysisEnum,finiteelement,2);
    488488                        }
     
    963963
    964964        IssmDouble   vx,vy;
    965         int          meshtype,dim,approximation;
     965        int          meshtype,dim,approximation,dofpernode;
    966966        int*         doflist = NULL;
    967967
     
    969969        element->FindParam(&meshtype,MeshTypeEnum);
    970970        switch(meshtype){
    971                 case Mesh2DverticalEnum: dim = 2; break;
    972                 case Mesh3DEnum:         dim = 3; break;
     971                case Mesh2DhorizontalEnum: dim = 2; dofpernode = 2; break;
     972                case Mesh2DverticalEnum:   dim = 2; dofpernode = 1; break;
     973                case Mesh3DEnum:           dim = 3; dofpernode = 2; break;
    973974                default: _error_("mesh "<<EnumToStringx(meshtype)<<" not supported yet");
    974975        }
     
    976977        /*Fetch number of nodes and dof for this finite element*/
    977978        int numnodes = element->GetNumberOfNodes();
    978         int numdof   = numnodes*(dim-1);
     979        int numdof   = numnodes*dofpernode;
    979980        element->GetInputValue(&approximation,ApproximationEnum);
    980981
     
    986987        Input* vx_input=element->GetInput(VxEnum); _assert_(vx_input);
    987988        Input* vy_input=NULL;
    988         if(dim==3){vy_input=element->GetInput(VyEnum); _assert_(vy_input);}
     989        if(meshtype!=Mesh2DverticalEnum){vy_input=element->GetInput(VyEnum); _assert_(vy_input);}
    989990
    990991        /*Ok, we have vx and vy in values, fill in vx and vy arrays: */
     
    995996                /*Recover vx and vy*/
    996997                vx_input->GetInputValue(&vx,gauss);
    997                 values[i*(dim-1)+0]=vx;
    998                 if(dim==3){
     998                values[i*dofpernode+0]=vx;
     999                if(dofpernode==2){
    9991000                        vy_input->GetInputValue(&vy,gauss);
    1000                         values[i*(dim-1)+1]=vy;
     1001                        values[i*dofpernode+1]=vy;
    10011002                }
    10021003        }
Note: See TracChangeset for help on using the changeset viewer.