On Mon, 12 Jan 2009, Mathias Nenning wrote:

> To get my code compiled, due to the complex instantiation of class
> DenseMatrix, I have to uncomment in file "dense_matric.C", in method

By "uncomment" I assume you mean "comment out"?

> "DenseMatrix<T>::_cholesky_decompose ()" the part
>
> #ifndef USE_COMPLEX_NUMBERS
>  if (A(i,j) <= 0.0)
>    {
>    std::cerr << "Error! Can only use Cholesky decomposition "
>              << "with symmetric positive definite matrices."
>              << std::endl;
>    libmesh_error();
>    }
> #endif
>
> This makes sense since "A(i,j) <= 0.0" isn't defined using a complex and
> a double value.
>
> Maybe there can be used a alternative code line in future so that it is
> possible to use complex dense matrices.

That would be a good idea; I'm not sure how best to implement it,
though.  Move that code into a libmesh_assert_positive<T>() function,
then give it a do-nothing specialization for std::complex<T>?
---
Roy

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to