Re: [deal.II] Complex-valued distributed matrices in dealii

2020-07-25 Thread Wolfgang Bangerth

On 7/23/20 10:42 AM, Pascal Kraft wrote:


I have Trillions compiled with support for complex numbers and also searched 
through the LinearAlgebra documentation.


I don't think I knew that one can compile Trilinos with complex numbers. How 
do you do that?


It does not greatly surprise me that we use TrilinosScalar and double 
interchangeably. If Trilinos can indeed be compiled with complex numbers, then 
we ought to find a way to (i) make TrilinosScalar dependent on whatever 
Trilinos was compiled for, (ii) ensure that all of the places that currently 
don't compile because we use double in place of TrilinosScalar are fixed.


Patches are, as always, very welcome!


I require GMRES as a solver (which should be possible, because the GMRES 
Versions all use a templated Vector which can take complex components) and MPI 
distribution of a sparse system. I have so far only seen FullMatrix to accept 
complex numbers.


I believe that GMRES could indeed be made to work for complex-valued problems, 
but I'm not sure any of us have every tried. When writing step-58, I toyed 
with the idea of looking up in the literature what one would need for a 
complex GMRES, but in the end decided to just make SparseDirectUMFPACK work 
instead. The issue is that for every matrix-vector and vector-vector operation 
that happens inside GMRES, you have to think about whether one or the other 
operand needs to be complex-conjugated. I'm certain that is possible, but 
would require an audit of a few hundred lines. It would probably be simpler to 
just use PETSc's (or Trilinos') GMRES implementation.


Best
 W.

--

Wolfgang Bangerth  email: bange...@colostate.edu
   www: http://www.math.colostate.edu/~bangerth/

--
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/0a11242b-16e1-7c2b-681e-398602d2c60c%40colostate.edu.


Re: [deal.II] Accessing nodal values of a FEM solution

2020-07-25 Thread Xuefeng Li
On Fri, Jul 24, 2020 at 9:58 PM Wolfgang Bangerth 
wrote:

> On 7/23/20 12:07 PM, Xuefeng Li wrote:
> >
> > Well, the above function calculates the gradients of a finite element at
> the
> > quadrature points of a cell, not at the nodal points of a cell.
> > Such a need arises in the following situation.
> >
> > for ( x in vector_of_nodal_points )
> >v(x) = g(x, u(x), grad u(x))
>
> It's worth pointing out, however, that for the common FE_Q elements, the
> function values u(x) are continuous and so it doesn't matter how exactly
> you
> compute u(x) at node points. On the other hand, grad u(x) is in general
> discontinuous and so trying to evaluate it at node points is not actually
> possible: You will either get the values from one adjacent cell or the
> value
> from another.
>
> In other words, if you want to compute a function that depends on 'grad
> u',
> you need to think about what exactly you mean by that. In the formulation
> above, v(x) will in general be a discontinuous function, and you need to
> think
> about whether using FE_Q (a continuous finite element space) is really
> what
> you want to do.
>
> Best
>   W.
>
> Indeed, grad u would be discontinuous under normal conditions when u is
approximated by FE_Q. I remember vaguely that such an issue was discussed
in one or more of the tutorial Step examples. Thanks for your follow-up.

-- 
Stay put, practice social distancing, and be safe!

Best,

--Xuefeng Li, (504)865-3340(phone)
   Like floating clouds, the heart rests easy
   Like flowing water, the spirit stays free
  Loyola University New Orleans
   New Orleans, Louisiana (504)865-2051(fax)

-- 
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/CAO2HPGW9tZ-U0mSuNYQcrzKGtnvg7mSoBA58svEL8DYEtfz%3DPQ%40mail.gmail.com.


[deal.II] Memory loss in system solver

2020-07-25 Thread Richard Schussnig
Hi Alberto,
I might be having a similar or even the same problem with petsc! In my case, 
the memory accumulated is proportional to the number of iterations done in the 
SolverFGMRES solver. Also, when using trilinos (switch between petsc and 
trilinos see step 40 I believe), this does not(!) happen!
Please do report back, if you find anything - I did not look into it for now, 
but will do in a week or so.
Regards & good luck,
Richard

-- 
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/e0b379a9-dba7-4133-8ef0-ad308e680ffeo%40googlegroups.com.