~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to dolfin/io/XMLMesh.cpp

  • Committer: Anders Logg
  • Date: 2008-05-22 09:02:01 UTC
  • mto: (2668.9.6 trunk)
  • mto: This revision was merged to the branch mainline in revision 2670.
  • Revision ID: logg@simula.no-20080522090201-ut5c5b6n00x64610
Bug fixes. Reading boundary data from mesh file and
application of boundary conditions seems to work now.
Will comment on integration with VMTK in a while.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    
32
32
    if ( xmlStrcasecmp(name, (xmlChar *) "mesh") == 0 )
33
33
    {
34
 
      cout << "Reading mesh" << endl;
35
 
 
36
34
      readMesh(name, attrs);
37
35
      state = INSIDE_MESH;
38
36
    }
43
41
    
44
42
    if ( xmlStrcasecmp(name, (xmlChar *) "vertices") == 0 )
45
43
    {
46
 
      cout << "Reading vertices" << endl;
47
 
 
48
44
      readVertices(name, attrs);
49
45
      state = INSIDE_VERTICES;
50
46
    }
51
47
    else if ( xmlStrcasecmp(name, (xmlChar *) "cells") == 0 )
52
48
    {
53
 
      cout << "Reading cells" << endl;
54
 
 
55
49
      readCells(name, attrs);
56
50
      state = INSIDE_CELLS;
57
51
    }
58
52
    else if ( xmlStrcasecmp(name, (xmlChar *) "data") == 0 )
59
53
    {
60
 
      cout << "Reading data" << endl;
61
54
      state = INSIDE_DATA;
62
55
    }
63
56
 
85
78
    
86
79
    if ( xmlStrcasecmp(name, (xmlChar *) "meshfunction") == 0 )
87
80
    {
88
 
      cout << "Reading mesh function" << endl;
89
81
      readMeshFunction(name, attrs);
90
82
      state = INSIDE_MESH_FUNCTION;
91
83
    }
92
84
    if ( xmlStrcasecmp(name, (xmlChar *) "array") == 0 )
93
85
    {
94
 
      cout << "Reading array" << endl;
95
86
      readArray(name, attrs);
96
87
      state = INSIDE_ARRAY;
97
88
    }
127
118
    {
128
119
      closeMesh();
129
120
      state = DONE;
130
 
      cout << "End XML" << endl;
131
121
    }
132
122
    
133
123
    break;
137
127
    if ( xmlStrcasecmp(name, (xmlChar *) "vertices") == 0 )
138
128
    {
139
129
      state = INSIDE_MESH;    
140
 
      cout << "End vertices" << endl;
141
130
    }
142
131
 
143
132
    break;
147
136
    if ( xmlStrcasecmp(name, (xmlChar *) "cells") == 0 )
148
137
    {
149
138
      state = INSIDE_MESH;
150
 
      cout << "End cells" << endl;
151
139
    }
152
140
 
153
141
    break;
157
145
    if ( xmlStrcasecmp(name, (xmlChar *) "data") == 0 )
158
146
    {
159
147
      state = INSIDE_MESH;
160
 
      cout << "End data" << endl;
161
148
    }
162
149
 
163
150
    break;
167
154
    if ( xmlStrcasecmp(name, (xmlChar *) "meshfunction") == 0 )
168
155
    {
169
156
      state = INSIDE_DATA;
170
 
      cout << "End mesh function" << endl;
171
157
    }
172
158
 
173
159
    break;
177
163
    if ( xmlStrcasecmp(name, (xmlChar *) "array") == 0 )
178
164
    {
179
165
      state = INSIDE_DATA;
180
 
      cout << "End array" << endl;
181
166
    }
182
167
 
183
168
    break;
369
354
//-----------------------------------------------------------------------------
370
355
void XMLMesh::readArrayElement(const xmlChar* name, const xmlChar** attrs)
371
356
{
372
 
  return;
373
 
 
374
357
  // Read index
375
358
  const uint index = parseUnsignedInt(name, attrs, "index");
376
359