Matthias,

When you helped me implement the operator N_c which is added to my 
linear_operator , i.e. 

auto N_c = temp1_coef*M + temp_coef*Kronecker;

auto system_matrix = linear_operator(linear_part) + N_c;


the first term is not complete.


Really I want,

auto N_c = temp1_coef*|Psi^m|^2 *M + temp_coef*Kronecker;

auto system_matrix = linear_operator(linear_part) + N_c;


So I was trying in some way to represent that so I can add that term to 
'temp_coef*Kronecker' which is of type linear operator. 

Nikki 





On Monday, October 26, 2020 at 3:07:39 PM UTC-4 Matthias Maier wrote:

> Dear Nikki,
>
> A "linear operator" in deal.II is an object that linearly transforms a
> vector into another one, i.e., it has a vector space as domain of
> definition and a vector space as range space. 
>
> In your case M.matrix_scalar_product(u,u) is (u^T M u), this is a
> quadratic operation, not a linear one. You cannot represent this
> operation with a linear operator. Did you intend to simply scale with
> that value?
>
> Best,
> Matthias
>
>
> On Mon, Oct 26, 2020, at 13:40 CDT, Nikki Holtzer <
> nhol...@math.arizona.edu> wrote:
>
> > Hello all,
> >
> > I am struggling to turn a matrix scalar product into a linear operator. 
> I 
> > currently have:
> >
> > temp = M.matrix_scalar_product(u,u);
> >
> >
> > and I need to turn 'temp' into a linear operator. 
> >
> > I have tried turning 'M' into a linear operator first and then 
> performing 
> > the multiplication and have also tried something like 
> > linear_operator(temp). Neither has compiled.
> >
> > Thank you in advance!
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f2d5c61a-49c2-4a7a-a984-1f3917b215bdn%40googlegroups.com.

Reply via email to