*/
virtual
void
- get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::dimension> > &patch_hessians) const = 0;
+ get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+ std::vector<Tensor<2,DH::dimension> > &patch_hessians) const = 0;
/**
* Given a FEValuesBase object, extract
*/
virtual
void
- get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
- std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const = 0;
+ get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+ std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const = 0;
/**
* Clear all references to the
*/
virtual
void
- get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::dimension> > &patch_hessians) const;
+ get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+ std::vector<Tensor<2,DH::dimension> > &patch_hessians) const;
/**
* Given a FEValuesBase object, extract
*/
virtual
void
- get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
- std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const;
+ get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+ std::vector<std::vector< Tensor<2,DH::dimension> > > &patch_hessians_system) const;
/**
* Clear all references to the
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
DataEntry<VectorType>::
-get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<2,DH::dimension> > > &patch_hessians_system) const
+get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<2,DH::dimension> > > &patch_hessians_system) const
{
fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians_system);
}
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
DataEntry<VectorType>::
-get_function_second_derivatives (const FEValuesBase<DH::dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::dimension> > &patch_hessians) const
+get_function_hessians (const FEValuesBase<DH::dimension> &fe_patch_values,
+ std::vector<Tensor<2,DH::dimension> > &patch_hessians) const
{
fe_patch_values.get_function_2nd_derivatives (*vector, patch_hessians);
}
this->dof_data[dataset]->get_function_gradients (fe_patch_values,
data.patch_gradients);
if (update_flags & update_hessians)
- this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
- data.patch_hessians);
+ this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+ data.patch_hessians);
postprocessor->
compute_derived_quantities_scalar(data.patch_values,
data.patch_gradients,
this->dof_data[dataset]->get_function_gradients (fe_patch_values,
data.patch_gradients_system);
if (update_flags & update_hessians)
- this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
- data.patch_hessians_system);
+ this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+ data.patch_hessians_system);
postprocessor->
compute_derived_quantities_vector(data.patch_values_system,
data.patch_gradients_system,
// treat single component
// functions separately for
// efficiency reasons.
- if (data.n_components == 1)
- {
- this->dof_data[dataset]->get_function_values (fe_patch_values,
- data.patch_values);
+ if (data.n_components == 1)
+ {
+ this->dof_data[dataset]->get_function_values (fe_patch_values,
+ data.patch_values);
+ for (unsigned int q=0; q<n_q_points; ++q)
+ patch->data(offset,q) = data.patch_values[q];
+ }
+ else
+ {
+ this->dof_data[dataset]->get_function_values (fe_patch_values,
+ data.patch_values_system);
+ for (unsigned int component=0; component<data.n_components;
+ ++component)
for (unsigned int q=0; q<n_q_points; ++q)
- patch->data(offset,q) = data.patch_values[q];
- }
- else
- {
- this->dof_data[dataset]->get_function_values (fe_patch_values,
- data.patch_values_system);
- for (unsigned int component=0; component<data.n_components;
- ++component)
- for (unsigned int q=0; q<n_q_points; ++q)
- patch->data(offset+component,q) =
- data.patch_values_system[q](component);
- }
+ patch->data(offset+component,q) =
+ data.patch_values_system[q](component);
+ }
// increment the counter for the
// actual data record
offset+=this->dof_data[dataset]->n_output_variables;
// patch number and set it
// for the neighbor index
patch->neighbors[f] = this->patches[(*data.cell_to_patch_index_map)
- [neighbor->level()][neighbor->index()]].patch_index;
+ [neighbor->level()][neighbor->index()]].patch_index;
}
// next cell (patch) in this
this->dof_data[dataset]->get_function_gradients (fe_patch_values,
data.patch_gradients);
if (update_flags & update_hessians)
- this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
- data.patch_hessians);
+ this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+ data.patch_hessians);
postprocessor->
compute_derived_quantities_scalar(data.patch_values,
data.patch_gradients,
this->dof_data[dataset]->get_function_gradients (fe_patch_values,
data.patch_gradients_system);
if (update_flags & update_hessians)
- this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
- data.patch_hessians_system);
+ this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+ data.patch_hessians_system);
postprocessor->
compute_derived_quantities_vector(data.patch_values_system,
data.patch_gradients_system,
// treat single component
// functions separately for
// efficiency reasons.
- if (data.n_components == 1)
- {
- this->dof_data[dataset]->get_function_values (fe_patch_values,
- data.patch_values);
+ if (data.n_components == 1)
+ {
+ this->dof_data[dataset]->get_function_values (fe_patch_values,
+ data.patch_values);
+ for (unsigned int q=0; q<n_q_points; ++q)
+ patch->data(offset,q) = data.patch_values[q];
+ }
+ else
+ {
+ this->dof_data[dataset]->get_function_values (fe_patch_values,
+ data.patch_values_system);
+ for (unsigned int component=0; component<data.n_components;
+ ++component)
for (unsigned int q=0; q<n_q_points; ++q)
- patch->data(offset,q) = data.patch_values[q];
- }
- else
- {
- this->dof_data[dataset]->get_function_values (fe_patch_values,
- data.patch_values_system);
- for (unsigned int component=0; component<data.n_components;
- ++component)
- for (unsigned int q=0; q<n_q_points; ++q)
- patch->data(offset+component,q) =
- data.patch_values_system[q](component);
- }
+ patch->data(offset+component,q) =
+ data.patch_values_system[q](component);
+ }
// increment the counter for the
// actual data record
offset+=this->dof_data[dataset]->n_output_variables;
threads.join_all();
}
else
- // just one thread
+ // just one thread
build_some_patches(thread_data[0]);
}
ExcMessage("The update of normal vectors may not be requested for evaluation of data on cells via DataPostprocessor."));
hp::FEValues<DH::dimension> x_fe_patch_values (fe_collection, q_collection,
- update_flags);
+ update_flags);
const unsigned int n_patches_per_circle = data.n_patches_per_circle;
for (unsigned int i=0; i<=n_patches_per_circle; ++i)
{
angle_directions[i][DH::dimension-1] = std::cos(2*deal_II_numbers::PI *
- i/n_patches_per_circle);
+ i/n_patches_per_circle);
angle_directions[i][DH::dimension] = std::sin(2*deal_II_numbers::PI *
- i/n_patches_per_circle);
+ i/n_patches_per_circle);
};
this->dof_data[dataset]->get_function_gradients (fe_patch_values,
data.patch_gradients);
if (update_flags & update_hessians)
- this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
- data.patch_hessians);
+ this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+ data.patch_hessians);
postprocessor->
compute_derived_quantities_scalar(data.patch_values,
data.patch_gradients,
this->dof_data[dataset]->get_function_gradients (fe_patch_values,
data.patch_gradients_system);
if (update_flags & update_hessians)
- this->dof_data[dataset]->get_function_second_derivatives (fe_patch_values,
- data.patch_hessians_system);
+ this->dof_data[dataset]->get_function_hessians (fe_patch_values,
+ data.patch_hessians_system);
postprocessor->
compute_derived_quantities_vector(data.patch_values_system,
data.patch_gradients_system,
for (unsigned int component=0;
component<this->dof_data[dataset]->n_output_variables;
++component)
- {
- switch (DH::dimension)
- {
- case 1:
- for (unsigned int x=0; x<n_points; ++x)
- for (unsigned int y=0; y<n_points; ++y)
- patch->data(offset+component,
- x*n_points + y)
- = data.postprocessed_values[dataset][x](component);
- break;
+ {
+ switch (DH::dimension)
+ {
+ case 1:
+ for (unsigned int x=0; x<n_points; ++x)
+ for (unsigned int y=0; y<n_points; ++y)
+ patch->data(offset+component,
+ x*n_points + y)
+ = data.postprocessed_values[dataset][x](component);
+ break;
- case 2:
- for (unsigned int x=0; x<n_points; ++x)
- for (unsigned int y=0; y<n_points; ++y)
- for (unsigned int z=0; z<n_points; ++z)
- patch->data(offset+component,
- x*n_points*n_points +
- y*n_points +
- z)
- = data.postprocessed_values[dataset][x*n_points+z](component);
- break;
+ case 2:
+ for (unsigned int x=0; x<n_points; ++x)
+ for (unsigned int y=0; y<n_points; ++y)
+ for (unsigned int z=0; z<n_points; ++z)
+ patch->data(offset+component,
+ x*n_points*n_points +
+ y*n_points +
+ z)
+ = data.postprocessed_values[dataset][x*n_points+z](component);
+ break;
- default:
- Assert (false, ExcNotImplemented());
- }
- }
+ default:
+ Assert (false, ExcNotImplemented());
+ }
+ }
}
else
if (data.n_components == 1)