Skip to content

Stix1D won't compile because ComplexVectorCoefficientByAttr is not a trivial type #1

@cjvogl

Description

@cjvogl

The line with the issue is https://github.com/RF-SciDAC/mfem/blob/plasma-dev/miniapps/plasma/stix1d.cpp#L905, which tries to construct an object of type Array<ComplexVectorCoefficientByAttr> which then trips a static assert within the Array class on https://github.com/RF-SciDAC/mfem/blob/plasma-dev/general/array.hpp#L57.

Relevant compiler error is

In file included from /g/g14/vogl2/workspace/rf-scidac/mfem/mfem.hpp:19,
                 from /p/lscratchh/vogl2/rf-scidac/mfem/mfem.hpp:3,
                 from /g/g14/vogl2/workspace/rf-scidac/mfem/miniapps/plasma/../common/pfem_extras.hpp:15,
                 from /g/g14/vogl2/workspace/rf-scidac/mfem/miniapps/plasma/cold_plasma_dielectric_coefs.hpp:15,
                 from /g/g14/vogl2/workspace/rf-scidac/mfem/miniapps/plasma/stix1d.cpp:89:
/g/g14/vogl2/workspace/rf-scidac/mfem/general/array.hpp: In instantiation of 'static void mfem::Array<T>::TypeAssert() [with T = mfem::plasma::ComplexVectorCoefficientByAttr]':
/g/g14/vogl2/workspace/rf-scidac/mfem/general/array.hpp:96:32:   required from 'mfem::Array<T>::~Array() [with T = mfem::plasma::ComplexVectorCoefficientByAttr]'
/g/g14/vogl2/workspace/rf-scidac/mfem/miniapps/plasma/stix1d.cpp:905:67:   required from here
/g/g14/vogl2/workspace/rf-scidac/mfem/general/array.hpp:57:41: error: static assertion failed: type T must be trivial
   57 |       static_assert(std::is_trivial<T>::value, "type T must be trivial");
      |                                         ^~~~~
[ 68%] Built target minimal-surface
make[2]: *** [miniapps/plasma/CMakeFiles/stix1d.dir/stix1d.cpp.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions