home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12743 < prev    next >
Encoding:
Text File  |  1992-11-10  |  4.3 KB  |  110 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!seas.gwu.edu!stoler
  3. From: stoler@seas.gwu.edu (Rich Stoler)
  4. Subject: xdb problem
  5. Message-ID: <1992Nov10.153253.23180@seas.gwu.edu>
  6. Sender: news@seas.gwu.edu
  7. Organization: George Washington University
  8. Date: Tue, 10 Nov 1992 15:32:53 GMT
  9. Lines: 99
  10.  
  11. A user has been having a problem with xdb that he, and we, ar unable to figure
  12. out.  He is unable to reference elements of a data structure from within the
  13. debugger, as shown below.  We have included the full screen of text in the hope
  14. someone more knowledgeable may be able to find out or explain what we're doing
  15. or not doing.  Thanks in advance.
  16. -------------------------------------------------------------------------------
  17. This is a screen of my debugger run (I use a big screen!).
  18.  
  19.       33:     printf("max principal stress = %f angle= %f\n",max_principal,
  20.       34:                                       theta_max_principal*180/PI);
  21.       35:     printf("at element = %d  node = %d\n",ielem_max_principal,
  22.       36:                                              inode_max_principal);
  23.       37:     fprintf(fd,"max principal stress = %f angle= %f\n",max_princip
  24.       38:                                       theta_max_principal*180/PI);
  25.       39:     fprintf(fd,"at element = %d  node = %d\n",ielem_max_principal,
  26.       40:                                              inode_max_principal);
  27.       41:   crack[number_of_tips].angle=theta_max_principal;
  28.       42:   crack[number_of_tips].node=inode_max_principal;
  29.       43: }
  30.       44: /****************************************************************/
  31.       45: void get_crack(node_A,length,theta)
  32.       46:    int node_A;
  33.       47:    double length,theta;
  34.       48: {
  35.       49:    int node_B,mesh_el[2],mesh_type,i;
  36.       50:    double angle;
  37.       51:    Create_Node(node_array[node_A-1].x,node_array[node_A-1].y,
  38.       52:                node_array[node_A-1].z);
  39.       53:    node_B = analysis.nodes;
  40.       54:    angle = (theta>PI/2.0)? theta-3.0*PI/2.0: theta+PI/2.0;
  41. *>    55:    if (is_boundary_node(node_A))
  42.       56:    {
  43.       57:       mesh_type = get_mesh_type(mesh_el,node_A,node_B,angle);
  44.       58:       for (i=0;i<4;i++)
  45.       59:       {
  46.       60:          if (element[mesh_el[mesh_type]].node[i]==node_A)
  47.       61:             break;
  48.       62:       }
  49.       63:       put_crack(mesh_el,mesh_type,node_B,node_A,length,angle);
  50.       64:       i = (i==0)? 3: i-1;
  51.       65:       update_crack_node(element[mesh_el[mesh_type]].neighbors[i],n
  52.       66:    }
  53.       67:    else
  54.       68:    {
  55.       69:       mesh_type = get_mesh_type(mesh_el,node_A,node_B,angle);
  56.       70:       put_crack(mesh_el,mesh_type,node_B,node_A,length/2.0,angle);
  57.       71:       angle += (angle<0.0)? PI: -PI;
  58.  File: hplcrack.c    Procedure: get_crack    Line: 55
  59. solving equations
  60. forming stiffness matrix
  61. max principal stress = 2104022.238632 angle= 14.457992
  62. at element = 64  node = 5
  63. area weighted stress smoothing
  64. error estimation
  65. elements=102,nodes=118
  66. global error=5.597142
  67.  Select CONTINUE / NEXT STEP / EXIT in the menu
  68. max principal stress = 2104022.238632 angle= 14.457992
  69. at element = 64  node = 5
  70. Input crack length
  71. 0.7
  72.  
  73. breakpoint at 0x2eda                        This is where output from the
  74.                                             program ends and debuger session
  75.                                             begins.
  76. >p node_A
  77. node_A = 5
  78. >p element[63].neighbors[0]
  79. xdb panic: Internal Error (IE571) (0, 10)   When I try to access the structure
  80.                                             elements xdb panics.
  81. >
  82. >p element[63]                              If I just print the structure it
  83.                                             works.
  84. 0x86b7c  struct {
  85.     number = 64;
  86.     node = 0x86b80;
  87.     neighbors = 0x86ba0;
  88.     split_number = 0x86bb0;
  89.     split = 1;
  90.     split_previous = 0;
  91.     brothers = 9;
  92.     father = 14;
  93.     old_elem = 0;
  94. }
  95. >
  96. >p element[63].number                       It does not work again!
  97. xdb panic: Internal Error (IE571) (0, 10)
  98. >
  99.  
  100. I hope you can get something out of that.
  101. Thanks.
  102.                 Fernando
  103.  
  104. -------------------------------------------------------------------------------
  105. -- 
  106.              Rich Stoler, Senior Systems Prgrammer,
  107.                  George Washington University
  108.      SEAS Computing Facility, 725 23rd St NW, Washington DC 20052
  109.           stoler@seas.gwu.edu  -or-  uunet!gwusun!stoler
  110.