← Back to team overview

dolfin team mailing list archive

Re: Reading back matrix from xml file

 

On Sat, Jun 14, 2008 at 04:08:24PM +0200, Dag Lindbo wrote:
> Hello!
> 
> This should work, right?
> 
> #include <dolfin.h>
> using namespace dolfin;
> 
> int main(void)
> {
>   File file("matrix.xml");
>   Matrix A;
>   file >> A;
> 
>   cout << "size: " << A.size(0) << "-by-" << A.size(1) << endl;
> }
> 
> This results in a zero-by-zero matrix A. Any ideas what's going on? Has
> this functionality been tested since the LA redesign? I would appreciate
> if someone could grab the matrix from
> http://www.csc.kth.se/~dag/dolfin/matrix.xml and confirm.
> 
> /Dag

Well, the following piece of code from XMLMatrix.cpp should give you a
hint:

  // FIXME: update to new format
  error("This function needs to be updated to the new format.");

  /*
  // Set default values
  row = 0;
  int size = 0;
  
  // Parse values
  parseIntegerRequired(name, attrs, "row",  row);
  parseIntegerRequired(name, attrs, "size", size);

  // Set values
  A.initrow(row, size);
  */

:-)

Anyway, it should be fixed now so try again.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References