From: Wolfgang Bangerth Date: Thu, 26 Oct 2017 15:26:18 +0000 (-0600) Subject: Let DataOut vector wrappers report whether the data type is complex. X-Git-Tag: v9.0.0-rc1~868^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98e025d1bb0db2cd8c9a63c806c5ebc0f647cfad;p=dealii.git Let DataOut vector wrappers report whether the data type is complex. --- diff --git a/include/deal.II/numerics/data_out_dof_data.h b/include/deal.II/numerics/data_out_dof_data.h index 646293443c..4de8a3a6a8 100644 --- a/include/deal.II/numerics/data_out_dof_data.h +++ b/include/deal.II/numerics/data_out_dof_data.h @@ -255,6 +255,12 @@ namespace internal (const FEValuesBase &fe_patch_values, std::vector > > &patch_hessians_system) const = 0; + /** + * Return whether the data represented by (a derived class of) this object + * represents a complex-valued (as opposed to real-valued) information. + */ + virtual bool is_complex_valued () const = 0; + /** * Clear all references to the vectors. */ diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 83d0c7f391..bf36a986ef 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -471,6 +472,12 @@ namespace internal (const FEValuesBase &fe_patch_values, std::vector > > &patch_hessians_system) const; + /** + * Return whether the data represented by (a derived class of) this object + * represents a complex-valued (as opposed to real-valued) information. + */ + virtual bool is_complex_valued () const; + /** * Clear all references to the vectors. */ @@ -808,6 +815,15 @@ namespace internal + template + bool + DataEntry::is_complex_valued() const + { + return numbers::NumberTraits::is_complex; + } + + + template std::size_t DataEntry::memory_consumption () const