[petsc-dev] Can we eliminate support for std::complex?

Jed Brown jed at jedbrown.org
Tue May 2 14:09:49 CDT 2017


Tobin Isaac <tisaac at uchicago.edu> writes:

> On Tue, May 02, 2017 at 09:30:18AM -0500, Matthew Knepley wrote:
>> I have Googled, but I still cannot understand this
>> 
>> 
>> http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2017/05/02/examples_next_arch-linux-cxx-cmplx-pkgs-64idx_churn.log
>> 
>> It appears in another one as well. Does anyone know how to fix this?
>> Otherwise I am turning off ex11 for C++.
>> 
>> This is the last problem before merging the Plex tests (modulo jitter in
>> iteration counts on two boxes which I assume we live with until the parser
>> is better).
>
> I'm changing the unions from PetscScalar to PetscReal right now.  C++
> thinks that std::complex<double> is funky enough that you can't put it
> in a union uninitialized.

Yeah, it isn't a POD type.  Idiotic decision.

I think the union could be eliminated here.  There used to be more
field-agnostic code in this example, but Matt moved most of it to the
library (with the unfortunate consequence that the example can no longer
be used for teaching FV discretization).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170502/15cdbe92/attachment.sig>


More information about the petsc-dev mailing list