Stiffness Matrix

Asked by Tim Dodwell

Is there a way of extracting the stiffness Matrix from the solver, for example to solve buckling eigenvalue problem?

Thanks

Tim

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Lutz Gross
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Lutz Gross (l-gross) said :
#1

Try:

mypde=LienarPDE(...)
mypde.setValue(..)
mypde.getOperator().saveMM("mymatrix.mm")

to write the stiffness matrix to the file mymatrix.mm in the Matrix Market File Format, see http://math.nist.gov/MatrixMarket/formats.html . This does not work for more than one MPI rank.

Revision history for this message
Tim Dodwell (tjd20) said :
#2

Thanks Lutz Gross, that solved my question.

Revision history for this message
Tim Dodwell (tjd20) said :
#3

Thanks for this Lutz, is there a similar way to extract the right hand side i.e f of KU = f.

Many Thanks T

Revision history for this message
Lutz Gross (l-gross) said :
#4

Try:

mypde=LienarPDE(...)
mypde.setValue(..)
f=mypde.getRightHandSide()
for i in xrange(f.getNumDataPoints()):
          print f.getValueOfDataPointAsTuple(i)

Revision history for this message
Tim Dodwell (tjd20) said :
#5

This gives the following error

Attribute Error: 'Data' object has no attribute 'getDataPointRank'

Revision history for this message
Tim Dodwell (tjd20) said :
#6

Sorry meant to write 'getNumDataPoints' instead of 'getDataPointRank'

Revision history for this message
Best Lutz Gross (l-gross) said :
#7

This should be: getNumberOfDataPoints Sorry.

Revision history for this message
Tim Dodwell (tjd20) said :
#8

Thanks Lutz Gross, that solved my question.