FESystem<dim> fe;
DoFHandler<dim> dof_handler;
- AffineConstraints<double> hanging_node_constraints;
+ AffineConstraints<PetscScalar> hanging_node_constraints;
PETScWrappers::MPI::SparseMatrix system_matrix;
const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
- FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
- Vector<double> cell_rhs(dofs_per_cell);
+ FullMatrix<PetscScalar> cell_matrix(dofs_per_cell, dofs_per_cell);
+ Vector<PetscScalar> cell_rhs(dofs_per_cell);
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
upper);
- Vector<double> localized_solution(solution);
+ Vector<PetscScalar> localized_solution(solution);
hanging_node_constraints.distribute(localized_solution);
solution = localized_solution;
void
ElasticProblem<dim>::output_results() const
{
- const Vector<double> localized_solution(solution);
+ const Vector<PetscScalar> localized_solution(solution);
if (this_mpi_process == 0)
{
#endif
- FEValuesExtractors::Scalar z_component(dim - 1);
- std::map<types::global_dof_index, PetscScalar> boundary_values;
- VectorTools::interpolate_boundary_values(
- mapping,
- dof_handler,
- 0,
- Functions::ZeroFunction<dim, PetscScalar>(dim),
- boundary_values);
+ FEValuesExtractors::Scalar z_component(dim - 1);
+ std::map<types::global_dof_index, double> boundary_values;
+ VectorTools::interpolate_boundary_values(mapping,
+ dof_handler,
+ 0,
+ Functions::ZeroFunction<dim>(dim),
+ boundary_values);
VectorTools::interpolate_boundary_values(
mapping,
dof_handler,