Sorry, it was my fault. Now it works fine after correct compiling. Thank you for maintenance.
07.01.2020, 18:21, "Smith, Barry F." <[email protected]>:
On Jan 7, 2020, at 8:59 AM, Mark Adams <[email protected]> wrote:
I’m not sure what the compilers, and C++ are doing here
On Tue, Jan 7, 2020 at 9:17 AM Кудров Илья <[email protected]> wrote:
However, after configuring
cout<<1. + 1.*PETSC_i<<endl;
outputs (1, 0) instead of (1, 1).
Where after configure? PETSC_i is not defined until after PetscInitialize() is called. Send full example.
Here is the code that defines it
/*
Initialized the global complex variable; this is because with
shared libraries the constructors for global variables
are not called; at least on IRIX.
*/
#if defined(PETSC_HAVE_COMPLEX)
{
#if defined(PETSC_CLANGUAGE_CXX) && !defined(PETSC_USE_REAL___FLOAT128)
PetscComplex ic(0.0,1.0);
PETSC_i = ic;
#else
PETSC_i = _Complex_I;
#endif
}
Perhaps it is problematic in C++? With single precision? Try PetscComplex ic(0.0,1.0); and see what ic is
Barry
07.01.2020, 16:01, "Mark Adams" <[email protected]>:
yes, configure with
--with-precision=single
--with-scalar-type=complex
On Tue, Jan 7, 2020 at 7:49 AM Кудров Илья <[email protected]> wrote:
Good day! Is it possible to use complex numbers in single precision in linear solvers? I'd like to decrease time and memory needed for calculation.
Best regards, Ilya Kudrov!
