← Back to team overview

dolfin team mailing list archive

[Question #123668]: reading nodal data from XML file

 

New question #123668 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/123668

I am interested in having some restart capability in my script. Essentially, I need to be able to load my last converged nodal displacement solution from an XML file, and use this as the initial solution state for future load increments..... this is required as my multifield problem at times diverges, and I don't want to start again from the first load increment. 

demo.py in pde/advection-diffusion/ has:
V = VectorFunctionSpace(mesh, "CG", 2)
velocity = Function(V, "../velocity.xml.gz");

But I would prefer the following:
V = VectorFunctionSpace(mesh, "CG", 2)

And at every restart point:
input= File("../velocity.xml.gz");
input >> V;

but this returns: 
TypeError: in method 'File___rshift__', argument 2 of type 'dolfin::FunctionPlotData &'

So is there a way to initialize a scalar/vector nodal field from a XML file?

--shiva





-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.