40 template <
int dim,
int spacedim,
typename DoFHandlerType>
51 template <
int dim,
int spacedim,
typename DoFHandlerType>
64 for (
typename std::vector<DataVector>::const_iterator i =
dof_data.begin();
68 for (
typename std::vector<DataVector>::const_iterator i =
cell_data.begin();
75 template <
int dim,
int spacedim,
typename DoFHandlerType>
78 const DoFHandlerType &dof)
82 Assert(dim == DoFHandlerType::dimension,
89 template <
int dim,
int spacedim,
typename DoFHandlerType>
92 const std::string &name,
95 std::vector<std::string> names;
96 names.push_back(name);
101 template <
int dim,
int spacedim,
typename DoFHandlerType>
104 const std::vector<std::string> &names,
116 for (
const auto &name : names)
118 for (
const auto &data_set :
dof_data)
119 for (
const auto &data_set_name : data_set.names)
123 for (
const auto &data_set_name : data_set.names)
143 template <
int dim,
int spacedim,
typename DoFHandlerType>
144 template <
typename number>
148 const std::string & name)
152 std::vector<std::string> names;
159 names.resize(1, name);
168 std::ostringstream namebuf;
170 names[i] = name + namebuf.str();
178 template <
int dim,
int spacedim,
typename DoFHandlerType>
179 template <
typename number>
183 const std::vector<std::string> &names)
190 (names.size() == 1)) ||
192 (names.size() ==
dof_handler->get_fe(0).n_components())),
194 names.size(),
dof_handler->get_fe(0).n_components()));
195 for (
const auto &name : names)
198 Assert(name.find_first_not_of(
"abcdefghijklmnopqrstuvwxyz"
199 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
200 "0123456789_<>()") == std::string::npos,
203 name.find_first_not_of(
"abcdefghijklmnopqrstuvwxyz"
204 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
205 "0123456789_<>()")));
210 typename std::vector<DataVector>::iterator data_vector =
dof_data.begin();
211 for (; data_vector !=
dof_data.end(); ++data_vector)
212 if (data_vector->names == names)
214 data_vector->data.reinit(vec.
size());
232 dof_handler->get_triangulation().n_active_cells()))
234 typename std::vector<DataVector>::iterator data_vector =
236 for (; data_vector !=
cell_data.end(); ++data_vector)
237 if (data_vector->names == names)
239 data_vector->data.reinit(vec.
size());
253 template <
int dim,
int spacedim,
typename DoFHandlerType>
256 const unsigned int nnnn_subdivisions)
260 unsigned int n_subdivisions =
263 Assert(n_subdivisions >= 1,
272 const unsigned int n_datasets =
278 unsigned int n_patches = 0;
279 for (
typename DoFHandlerType::active_cell_iterator cell =
309 const unsigned int n_q_points = patch_points.
size();
310 std::vector<double> patch_values(n_q_points);
311 std::vector<Vector<double>> patch_values_system(n_q_points,
321 default_patch.
data.
reinit(n_datasets, n_q_points * (n_subdivisions + 1));
326 typename std::vector<::DataOutBase::Patch<dim + 1, dim + 1>>::iterator
328 unsigned int cell_number = 0;
329 for (
typename DoFHandlerType::active_cell_iterator cell =
332 ++cell, ++patch, ++cell_number)
394 x_fe_patch_values.
reinit(cell);
399 for (
unsigned int dataset = 0; dataset <
dof_data.size(); ++dataset)
403 fe_patch_values.get_function_values(
dof_data[dataset].data,
405 for (
unsigned int i = 0; i < n_subdivisions + 1; ++i)
406 for (
unsigned int q = 0; q < n_q_points; ++q)
407 patch->data(dataset, q + n_q_points * i) =
413 fe_patch_values.get_function_values(
dof_data[dataset].data,
414 patch_values_system);
415 for (
unsigned int component = 0; component <
n_components;
417 for (
unsigned int i = 0; i < n_subdivisions + 1; ++i)
418 for (
unsigned int q = 0; q < n_q_points; ++q)
420 q + n_q_points * i) =
421 patch_values_system[q](component);
426 for (
unsigned int dataset = 0; dataset <
cell_data.size(); ++dataset)
429 for (
unsigned int q = 0; q < n_q_points; ++q)
430 for (
unsigned int i = 0; i < n_subdivisions + 1; ++i)
432 q * (n_subdivisions + 1) + i) =
value;
439 template <
int dim,
int spacedim,
typename DoFHandlerType>
445 for (
typename std::vector<DataVector>::iterator i =
dof_data.begin();
450 for (
typename std::vector<DataVector>::iterator i =
cell_data.begin();
458 template <
int dim,
int spacedim,
typename DoFHandlerType>
473 template <
int dim,
int spacedim,
typename DoFHandlerType>
474 const std::vector<::DataOutBase::Patch<dim + 1, dim + 1>> &
482 template <
int dim,
int spacedim,
typename DoFHandlerType>
483 std::vector<std::string>
486 std::vector<std::string> names;
487 for (
typename std::vector<DataVector>::const_iterator dataset =
491 names.insert(names.end(), dataset->names.begin(), dataset->names.end());
492 for (
typename std::vector<DataVector>::const_iterator dataset =
496 names.insert(names.end(), dataset->names.begin(), dataset->names.end());
504 #include "data_out_stack.inst"