]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix PETSc complex tests 13988/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 16 Jun 2022 12:21:48 +0000 (14:21 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 16 Jun 2022 12:21:48 +0000 (14:21 +0200)
tests/petsc_complex/assemble_01.mpirun=1.output
tests/simplex/step-17.cc
tests/simplex/step-18.cc
tests/simplex/step-18.mpirun=1.with_petsc=true.with_petsc_with_complex=false.output [moved from tests/simplex/step-18.mpirun=1.with_petsc=true.output with 100% similarity]

index ac7b985c6e90c67696234094ec275f53959581cd..a76f334c053c71faf997a01f1d4b7abb91916012 100644 (file)
@@ -16,6 +16,7 @@
 (3,2) (14.0000,0.00000)
 (3,3) (15.0000,0.00000)
 [Proc0 0-3] (0.000e+00,0.000e+00) (2.000e+00,0.000e+00) (4.000e+00,0.000e+00) (6.000e+00,0.000e+00) 
+(0,0) (0.00000,0.00000)
 (0,1) (1.00000,0.00000)
 (0,2) (2.00000,0.00000)
 (0,3) (3.00000,0.00000)
index 0da2d021f597fe90de8917f8a208aac62ac60284..9a1a86bc3bf693a85578e3a9be2db10154b46dd0 100644 (file)
@@ -119,7 +119,7 @@ namespace Step17
     FESystem<dim>      fe;
     DoFHandler<dim>    dof_handler;
 
-    AffineConstraints<double> hanging_node_constraints;
+    AffineConstraints<PetscScalar> hanging_node_constraints;
 
     PETScWrappers::MPI::SparseMatrix system_matrix;
 
@@ -233,8 +233,8 @@ namespace Step17
     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);
 
@@ -341,7 +341,7 @@ namespace Step17
       upper);
 
 
-    Vector<double> localized_solution(solution);
+    Vector<PetscScalar> localized_solution(solution);
     hanging_node_constraints.distribute(localized_solution);
     solution = localized_solution;
 
@@ -352,7 +352,7 @@ namespace Step17
   void
   ElasticProblem<dim>::output_results() const
   {
-    const Vector<double> localized_solution(solution);
+    const Vector<PetscScalar> localized_solution(solution);
 
     if (this_mpi_process == 0)
       {
index b8a099550bbaa1b9b5a7ebcba3a4c8dc21ad2eb4..37ba34f885ca14a7952374ad459dbcad29f6bd2d 100644 (file)
@@ -639,14 +639,13 @@ namespace Step18
 #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,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.