> But when I to try to run the 'initialize' or 'factorize' functions on my
> SparseMatrixEZ, the linker throws an error (undefined reference to `void
> dealii::SparseDirectUMFPACK::initialize<dealii::SparseMatrixEZ<double>
>
> >(dealii::SparseMatrixEZ<double> const&,
>
> dealii::SparseDirectUMFPACK::AdditionalData)'), even though the
> functions are templated by the type of matrix (template <class Matrix>),
> so I guess I'm missing something.
Yes, this function is instantiated at the very bottom of the file for
particular matrix types. You'll have to add the instantiation for
SparseMatrixEZ there.
When you do that, you'll probably run into trouble because the factorize
function makes use of some things the SparseMatrixEZ class does not have.
Specifically, what I see is this:
There are calls to matrix.get_sparsity_pattern().row_length(row-1);
The SMEZ does not have a sparsity pattern. The usual solution would
be to replace these calls by
get_row_length(matrix, row-1)
and write functions like so:
template <typename Matrix>
unsigned int get_row_length (const Matrix &m, unsigned int row) {
return m.get_sparsity_pattern().row_length(row-1);
}
unsigned int get_row_length (const SparseMatrixEZ &m, unsigned int row) {
...do the appropriate thing for the SMEZ...
}
There may be other reasons why this function in its current form doesn't
compile for SparseMatrixEZ arguments -- see how far you get!
Best
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.tamu.edu/~bangerth/
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii