Re: [eigen] Reusing a sparse matrix for SparseLU
• To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
• Subject: Re: [eigen] Reusing a sparse matrix for SparseLU
• From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
• Date: Mon, 3 Dec 2018 15:37:26 +0100
• Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0wUxhgSG3FstFoRV1K/dVlQk3tpk0v+X94jE6/tbQkM=; b=J75o7Se+9Ow6GtJs5tUrSqDvsQt+ENwcyFiTqTzwVvRVk+XGd2KXmMHze/1wtNb/uc YxVt0wsbh9syXla9JSa8Us60BySGlfEHrARq1f75Tr5jRmUZoV6CHCQyj16lRzwZhRcl Fiy6puH9JB8+CwP+whGb3V9PjppDYpe+BmzxiQBJw0w+e6Bw8lfItYMfuHAhjgUyFB// 0M1wMNlHUYqO+FnRD1Et3gOPQOnazrYaSEYdjMLPmkK400nfGRf5ZHOMXZC9fEmMj4IZ 7/tYMPkmSG7JvjBBNIc02MBHMXxKMKaZtMiIDmTSgnnJtw2NIhKUF3mw7CYn7E/3iFbm +ozg==

hm... if you're thinking about using coeffs() << v0, v1, v2... then your matrix is likely very small. What is its typical size and number of non-zeros? If too small and not sparse enough better use a dense matrix/solver.

gael

On Mon, Dec 3, 2018 at 2:28 PM Matthieu Brucher <matthieu.brucher@xxxxxxxxx> wrote:

Le lun. 3 déc. 2018 à 11:43, Alberto Luaces <alberto.luaces@xxxxxxxxx> a écrit :
Matthieu Brucher writes:

> Hi Alberto,
>
> Thanks for the answer. Unfortunately, this still makes me create
> another array,

How so?

I need to create an array for the coifs, don't I? Seems like I could use valuePtr as well.
But the speed is very bad and profiles indicate that there may be mallocs inside the factorisation or the solve :/

> I'd rather populate the elements directly.

You can do precisely that, by using the coeffs() vector.

Oh, you mean I could do coeffs() << v0, v1, v2...?

--

 Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/