From: Wolfgang Bangerth Date: Wed, 8 Nov 2017 04:17:03 +0000 (-0700) Subject: Output complex-valued data for cell data. X-Git-Tag: v9.0.0-rc1~798^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb7a7ddde6fd83d1c948c214fb76a43ef9d17cd0;p=dealii.git Output complex-valued data for cell data. --- diff --git a/source/numerics/data_out.cc b/source/numerics/data_out.cc index f8a3a827ae..aa5270ebeb 100644 --- a/source/numerics/data_out.cc +++ b/source/numerics/data_out.cc @@ -286,13 +286,26 @@ build_one_patch for (unsigned int dataset=0; datasetcell_data.size(); ++dataset) { - const double value - = this->cell_data[dataset]->get_cell_data_value (cell_and_index->second, - internal::DataOut::ComponentExtractor::real_part); - for (unsigned int q=0; qcell_data[dataset]->get_cell_data_value (cell_and_index->second, + internal::DataOut::ComponentExtractor::real_part); + for (unsigned int q=0; qcell_data[dataset]->is_complex_valued() == true) + { + const double value + = this->cell_data[dataset]->get_cell_data_value (cell_and_index->second, + internal::DataOut::ComponentExtractor::imaginary_part); + for (unsigned int q=0; qdof_data[dataset]->is_complex_valued() ? 2 : 1); + offset += (this->cell_data[dataset]->is_complex_valued() ? 2 : 1); } } }