Yuesu,
> I am adding an absorbing boundary condition like step-24 did in the
> frequency domain, in which the time derivative gives a complex term. I also
> found the complex acoustic wave problem step-29 which splits the complex wave
> function into two real parts.
> What I want to know is what if I directly set up the matrix and rhs vector
> as complex<double> ? Why does step-29 says "/it is often more convenient to
> split complex valued functions into their real and imaginary parts and use
> separate scalar finite element fields for discretizing each one of them/" ?
The problem is that we don't have iterative solvers for problems in which the
matrix and vectors store complex values. We can, however, use PETSc's
complex-valued solvers as well as the SparseDirectUMFPACK solver. I think you
probably want to look at step-62 and step-58 for other options.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/