← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Merge patch from Shawn Walker

 

ok, it looks like people have added some things that will be useful. But I just want to be clear.

1. When I read the FE signature and dofmap strings from the file (before reading the vector data), I will immediately create a Function (in MeshGeometry class, through the MeshEditor class) with vector data allocated and initialized to zero.

2. I will then create an XMLVector using the vector data in the Function above.

3. As I read the file, I will be using the methods of XMLVector to get the data. Since, XMLVector was called using the vector data already allocated, everything is fine.

4. I then delete the XMLVector object when I am done reading the file.

The End.  This seems better and is different from the way I did it before.

- Shawn

On Thu, 11 Sep 2008, Anders Logg wrote:

On Thu, Sep 11, 2008 at 05:12:48PM -0400, Shawn Walker wrote:
ok.  This will probably take me a while to figure out.

Actually, one dumb question I have is for XMLMesh.  I noticed the
constructor takes a mesh as input:

XMLMesh::XMLMesh(Mesh& mesh) : XMLObject(), _mesh(mesh), state(OUTSIDE),
f(0), a(0),
                               mesh_coord(0), xml_vector(0)
{
  // Do nothing

}

My confusion is, why is the mesh argument needed?  Because at this point,
the mesh hasn't been read in yet.  That's what the XMLMesh class does.  I
realize I am missing something stupid.  I guess this is being called from
XMLFile?

- Shawn

Yes, line 87. The XMLMesh class stores a reference to the mesh so that
it can access it to set the values as they are parsed.

--
Anders



Follow ups

References