Changeset 3483


Ignore:
Timestamp:
04/09/10 08:23:31 (15 years ago)
Author:
Mathieu Morlighem
Message:

bug fix

Location:
issm/trunk/src/c
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/PenaltySystemMatricesx/PenaltySystemMatricesx.cpp

    r3446 r3483  
    2121        /*First, get elements and loads configured: */
    2222        elements->Configure(elements,loads, nodes,vertices, materials,parameters);
     23        nodes->Configure(elements,loads, nodes,vertices, materials,parameters);
    2324        loads->Configure(elements, loads, nodes,vertices, materials,parameters);
    2425        parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
  • issm/trunk/src/c/SystemMatricesx/SystemMatricesx.cpp

    r3446 r3483  
    2727        /*First, get elements and loads configured: */
    2828        elements->Configure(elements,loads, nodes,vertices, materials,parameters);
     29        nodes->Configure(elements,loads, nodes,vertices, materials,parameters);
    2930        loads->Configure(elements, loads, nodes,vertices, materials,parameters);
    3031        parameters->Configure(elements,loads, nodes,vertices, materials,parameters);
  • issm/trunk/src/c/objects/DofIndexing.cpp

    r3470 r3483  
    7979        printf("\n");
    8080
    81         printf("   doflist:|");
     81        printf("   doflist: |");
    8282        for(i=0;i<numberofdofs;i++){
    8383                if(i>MAXDOFSPERNODE)break;
    84                 printf("%i|",doflist[i]);
     84                printf(" %i |",doflist[i]);
    8585        }
     86        printf("\n");
    8687
    8788}               
  • issm/trunk/src/c/objects/ElementProperties.cpp

    r3479 r3483  
    429429        int i;
    430430       
    431         if (h)              {printf("   h=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");}
    432         if (s)              {printf("   s=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");}
    433         if (b)              {printf("   b=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");}
    434         if (k)              {printf("   k=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->k[i]);printf("]\n");}
    435         if (melting)        {printf("   melting=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");}
    436         if (accumulation)   {printf("   accumulation=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");}
    437         if (geothermalflux) {printf("   geothermalflux=[\n"); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");}
     431        printf("Element properties:\n");
     432        if (h)              {printf("   h=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->h[i]);printf("]\n");}
     433        if (s)              {printf("   s=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->s[i]);printf("]\n");}
     434        if (b)              {printf("   b=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->b[i]);printf("]\n");}
     435        if (k)              {printf("   k=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->k[i]);printf("]\n");}
     436        if (melting)        {printf("   melting=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->melting[i]);printf("]\n");}
     437        if (accumulation)   {printf("   accumulation=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->accumulation[i]);printf("]\n");}
     438        if (geothermalflux) {printf("   geothermalflux=[ "); for(i=0;i<numnodes;i++)printf("%g ",this->geothermalflux[i]);printf("]\n");}
    438439        printf("   friction_type: %i\n",friction_type);
    439440        printf("   p: %g\n",p);
  • issm/trunk/src/c/objects/Hook.cpp

    r3468 r3483  
    226226        int i;
    227227        if (num){
    228                 printf("Hook: \n");
    229                 printf("  num=%i\n",this->num);
    230                 printf("  ids:\n    ");
     228                printf("   Hook: \n");
     229                printf("      num=%i\n",this->num);
     230                printf("      ids: ");
    231231                for (i=0;i<this->num;i++){
    232232                        printf("%i ",this->ids[i]);
    233233                }
    234                 printf("\n   offsets:\n   ");
     234                printf("\n");
     235                printf("      offsets: ");
    235236                for (i=0;i<this->num;i++){
    236237                        printf("%i ",this->offsets[i]);
    237238                }
     239                printf("\n");
    238240        }
    239241        else{
    240                 printf("Hook: num=0 \n");
     242                printf("   Hook: num=0 \n");
    241243        }
    242244}
     
    247249        int i;
    248250        if (num){
    249                 printf("Hook: \n");
    250                 printf("  num=%i\n",this->num);
    251                 printf("  ids:\n    ");
     251                printf("   Hook: \n");
     252                printf("      num=%i\n",this->num);
     253                printf("      ids: ");
    252254                for (i=0;i<this->num;i++){
    253255                        printf("%i ",this->ids[i]);
    254256                }
    255                 printf("\n   offsets:\n   ");
     257                printf("\n");
     258                printf("      offsets: ");
    256259                for (i=0;i<this->num;i++){
    257260                        printf("%i ",this->offsets[i]);
    258261                }
    259                 printf("\n   objects:\n   ");
    260                 for (i=0;i<this->num;i++){
    261                         printf("      object %i\n",i);
    262                         objects[i]->Echo();
     262                printf("\n");
     263                if (!objects) printf("      warning: object not hooked yet\n");
     264                else{
     265                        printf("      objects:\n   ");
     266                        for (i=0;i<this->num;i++){
     267                                printf("         object %i\n",i);
     268                                objects[i]->DeepEcho();
     269                        }
    263270                }
    264271        }
    265272        else{
    266                 printf("Hook: num=0 \n");
     273                printf("   Hook: num=0 \n");
    267274        }
    268275}
  • issm/trunk/src/c/objects/Node.cpp

    r3479 r3483  
    242242        indexing.DeepEcho();
    243243        properties.DeepEcho();
     244        printf("Vertex:\n");
    244245        hvertex.DeepEcho();
     246        printf("Upper node:\n");
    245247        hupper_node.DeepEcho();
    246248
  • issm/trunk/src/c/objects/NodeProperties.cpp

    r3468 r3483  
    130130void  NodeProperties::Echo(void){
    131131
    132         printf("NodeProperties echo: \n");
     132        printf("Node properties:\n");
    133133        printf("   onbed: %i\n",onbed);
    134134        printf("   onsurface: %i\n",onsurface);
  • issm/trunk/src/c/objects/Tria.cpp

    r3479 r3483  
    983983/*}}}*/
    984984/*FUNCTION Tria::CreateKMatrixDiagnosticHoriz {{{1*/
    985 
    986985void  Tria::CreateKMatrixDiagnosticHoriz(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
    987 
    988986
    989987        /* local declarations */
     
    10421040
    10431041        /*First, if we are on water, return empty matrix: */
    1044         if(this->properties.onwater)return;
     1042        if(this->properties.onwater) return;
    10451043
    10461044        /*recover pointers: */
     
    10481046
    10491047        /*recover objects from hooks: */
    1050         nodes=(Node**)hnodes.deliverp();
     1048        nodes =(Node**) hnodes.deliverp();
    10511049        matpar=(Matpar*)hmatpar.delivers();
    10521050        matice=(Matice*)hmatice.delivers();
     
    10641062        for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke_gg[i][j]=0.0;
    10651063
    1066 #ifdef _DEBUGELEMENTS_
    1067         if(my_rank==RANK && id==ELID){
    1068                 printf("El id %i Rank %i TriaElemnet input list before gaussian loop: \n",ELID,RANK);
    1069                 printf("   rho_ice: %g \n",matpar->GetRhoIce());
    1070                 printf("   gravity: %g \n",matpar->GetG())
    1071                   printf("   rho_water: %g \n",matpar->GetRhoWater());
    1072                 printf("   Velocity: \n");
    1073                 for (i=0;i<numgrids;i++){
    1074                         printf("      node %i  [%g,%g]\n",i,vxvy_list[i][0],vxvy_list[i][1]);
    1075                 }
    1076                 printf("   flow_law_parameter [%g ]\n",matice->GetB());
    1077                 printf("   drag [%g %g %g ]\n",k[0],k[1],k[2]);
    1078                 printf("   thickness [%g %g %g]\n",h[0],h[1],h[2]);
    1079                 printf("   surface [%g %g %g ]\n",s[0],s[1],s[2]);
    1080                 printf("   bed [%g %g %g]\n",b[0],b[1],b[2]);
    1081         }
    1082 #endif
    1083 
    1084 
    10851064        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    10861065        GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2);
    1087 
    1088 #ifdef _DEBUGELEMENTS_
    1089         if(my_rank==RANK && id==ELID){
    1090                 printf("   gaussian points: \n");
    1091                 for(i=0;i<num_gauss;i++){
    1092                         printf("    %g %g %g : %g\n",first_gauss_area_coord[i],second_gauss_area_coord[i],third_gauss_area_coord[i],gauss_weights[i]);
    1093                 }
    1094         }
    1095 #endif
    10961066
    10971067        /* Start  looping on the number of gaussian points: */
     
    11271097                }
    11281098
    1129 #ifdef _DEBUGELEMENTS_
    1130                 if(my_rank==RANK && id==ELID){
    1131                         printf("   gaussian loop %i\n",ig);
    1132                         printf("      thickness %g\n",thickness);
    1133                         printf("      slope [%g,%g]\n",slope[0],slope[1]);
    1134                         printf("      alpha2_list [%g,%g,%g]\n",alpha2_list[0],alpha2_list[1],alpha2_list[2]);
    1135                         printf("      epsilon [%g,%g,%g]\n",epsilon[0],epsilon[1],epsilon[2]);
    1136                         printf("      Matice: \n");
    1137                         matice->Echo();
    1138                         printf("      Matpar: \n");
    1139                         matpar->Echo();
    1140                         printf("\n    viscosity: %g \n",viscosity);
    1141                         printf("      jacobian: %g \n",Jdet);
    1142                         printf("      gauss_weight: %g \n",gauss_weight);
    1143                 }
    1144 #endif
    1145 
    11461099                /*Get B and Bprime matrices: */
    11471100                GetB(&B[0][0], &xyz_list[0][0], gauss_l1l2l3);
     
    11571110                for( i=0; i<numdof; i++) for(j=0;j<numdof;j++) Ke_gg[i][j]+=Ke_gg_gaussian[i][j];
    11581111
    1159 #ifdef _DEBUGELEMENTS_
    1160                 if(my_rank==RANK && id==ELID){
    1161                         printf("      B:\n");
    1162                         for(i=0;i<3;i++){
    1163                                 for(j=0;j<numdof;j++){
    1164                                         printf("%g ",B[i][j]);
    1165                                 }
    1166                                 printf("\n");
    1167                         }
    1168                         printf("      Bprime:\n");
    1169                         for(i=0;i<3;i++){
    1170                                 for(j=0;j<numdof;j++){
    1171                                         printf("%g ",Bprime[i][j]);
    1172                                 }
    1173                                 printf("\n");
    1174                         }
    1175                 }
    1176 #endif
    11771112        } // for (ig=0; ig<num_gauss; ig++)
    11781113
    11791114        /*Add Ke_gg to global matrix Kgg: */
    11801115        MatSetValues(Kgg,numdof,doflist,numdof,doflist,(const double*)Ke_gg,ADD_VALUES);
    1181 
    11821116
    11831117        /*Do not forget to include friction: */
     
    11851119                CreateKMatrixDiagnosticHorizFriction(Kgg,inputs,analysis_type,sub_analysis_type);
    11861120        }
    1187 
    1188 #ifdef _DEBUGELEMENTS_
    1189         if(my_rank==RANK && id==ELID){
    1190                 printf("      Ke_gg erms:\n");
    1191                 for( i=0; i<numdof; i++){
    1192                         for (j=0;j<numdof;j++){
    1193                                 printf("%g ",Ke_gg[i][j]);
    1194                         }
    1195                         printf("\n");
    1196                 }
    1197                 printf("      Ke_gg row_indices:\n");
    1198                 for( i=0; i<numdof; i++){
    1199                         printf("%i ",doflist[i]);
    1200                 }
    1201 
    1202         }
    1203 #endif
    12041121
    12051122cleanup_and_return:
Note: See TracChangeset for help on using the changeset viewer.