Changeset 874


Ignore:
Timestamp:
06/09/09 17:05:46 (16 years ago)
Author:
seroussi
Message:

fixed problem in FieldExtrude for velocity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Node.cpp

    r848 r874  
    685685
    686686                if (strcmp(field_name,"velocity")==0){
     687                        printf("extrude velocity\n");
     688
    687689
    688690                        /* node data: */
    689                         const int    numdof=2;
    690                         int          doflist[numdof];
    691                         int          nodedofs[2];
     691                        int          doflist1;
     692                        int          doflist[2];
    692693                        double       fieldnode[2];
    693694
    694 
    695                         GetDofList(&doflist[0],&numberofdofspernode);
     695                        doflist1=GetDofList1();
     696
     697                        /*get dofs for this base node velocity: we know there are two dofs in field_serial */
     698                        doflist[0]=2*doflist1;
     699                        doflist[1]=2*doflist1+1;
    696700
    697701                        //initilaize node
     
    701705                        fieldnode[0]=field_serial[doflist[0]];
    702706                        fieldnode[1]=field_serial[doflist[1]];
     707                        printf("dof %g \n",doflist[0]);
     708                        printf("dof %g \n",doflist[1]);
     709                        printf("fieldnode %g \n",fieldnode[0]);
     710                        printf("fieldnode %g \n",fieldnode[1]);
     711
    703712
    704713                        //go through all nodes which sit on top of this node, until we reach the surface,
     
    706715                        for(;;){
    707716
    708                                 node->GetDofList(&nodedofs[0],&numberofdofspernode);
    709                                 VecSetValues(field,1,&nodedofs[0],&fieldnode[0],INSERT_VALUES);
    710                                 VecSetValues(field,1,&nodedofs[1],&fieldnode[1],INSERT_VALUES);
     717                                doflist1=node->GetDofList1();
     718                                doflist[0]=2*doflist1;
     719                                doflist[1]=2*doflist1+1;
     720                                VecSetValues(field,1,&doflist[0],&fieldnode[0],INSERT_VALUES);
     721                                VecSetValues(field,1,&doflist[1],&fieldnode[1],INSERT_VALUES);
    711722
    712723                                if (node->IsOnSurface())break;
Note: See TracChangeset for help on using the changeset viewer.