]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Update to deal.II 9.1: two_phase_flow 77/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 23 May 2020 18:58:19 +0000 (20:58 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 23 May 2020 18:58:19 +0000 (20:58 +0200)
two_phase_flow/CMakeLists.txt
two_phase_flow/LevelSetSolver.cc
two_phase_flow/MultiPhase.cc
two_phase_flow/NavierStokesSolver.cc
two_phase_flow/TestLevelSet.cc
two_phase_flow/TestNavierStokes.cc
two_phase_flow/utilities_test_LS.cc
two_phase_flow/utilities_test_NS.cc

index 259eba65947941a18da08162e55fb31754cf93a5..33ad8aa508fa43740acad83515de6c831e7e7b5e 100644 (file)
@@ -28,7 +28,7 @@ SET(TARGET_SRC
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 
-FIND_PACKAGE(deal.II 8.4 QUIET
+FIND_PACKAGE(deal.II 9.1 QUIET
   HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
   )
 IF(NOT ${deal.II_FOUND})
index af18d86f2739b5d7caa76cdd57a4010ebc4236ed..d2c445e7fcbe8be8db071ece7c22b4d80c2d9e32 100644 (file)
@@ -1,9 +1,9 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
+#include <deal.II/lac/affine_constraints.h>
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/full_matrix.h>
 #include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/constraint_matrix.h>
 #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
 #include <deal.II/lac/petsc_sparse_matrix.h>
 #include <deal.II/lac/petsc_parallel_vector.h>
@@ -160,7 +160,7 @@ private:
   ///////////////
   void get_sparsity_pattern();
   void get_map_from_Q1_to_Q2();
-  void solve(const ConstraintMatrix &constraints,
+  void solve(const AffineConstraints<double> &constraints,
              PETScWrappers::MPI::SparseMatrix &Matrix,
              std::shared_ptr<PETScWrappers::PreconditionBoomerAMG> preconditioner,
              PETScWrappers::MPI::Vector &completely_distributed_solution,
@@ -245,7 +245,7 @@ private:
   PETScWrappers::MPI::Vector inverse_ML_vector;
 
   // CONSTRAINTS
-  ConstraintMatrix     constraints;
+  AffineConstraints<double> constraints;
 
   // TIME STEPPING
   double time_step;
@@ -1532,7 +1532,7 @@ void LevelSetSolver<dim>::get_map_from_Q1_to_Q2()
 }
 
 template <int dim>
-void LevelSetSolver<dim>::solve(const ConstraintMatrix &constraints,
+void LevelSetSolver<dim>::solve(const AffineConstraints<double> &constraints,
                                 PETScWrappers::MPI::SparseMatrix &Matrix,
                                 std::shared_ptr<PETScWrappers::PreconditionBoomerAMG> preconditioner,
                                 PETScWrappers::MPI::Vector &completely_distributed_solution,
index 00dbf55439c0aaab07fa9443b0a7323a949ff9e7..3e0e71d95b057b8c52586a0e7e3bb86c5c56b669 100644 (file)
@@ -1,9 +1,9 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
+#include <deal.II/lac/affine_constraints.h>
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/full_matrix.h>
 #include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/constraint_matrix.h>
 #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
 #include <deal.II/lac/petsc_parallel_vector.h>
 #include <deal.II/lac/petsc_solver.h>
@@ -115,7 +115,7 @@ private:
   std::vector<double> boundary_values_v;
   std::vector<double> boundary_values_phi;
 
-  ConstraintMatrix     constraints;
+  AffineConstraints<double> constraints;
 
   double time;
   double time_step;
index 7acd19a42377cade449570fb19a7431f4aca0225..3f013b2680b9d7a7f951ce9d009d5777eb1b3f3d 100644 (file)
@@ -1,9 +1,9 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
+#include <deal.II/lac/affine_constraints.h>
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/full_matrix.h>
 #include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/constraint_matrix.h>
 #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
 #include <deal.II/lac/petsc_parallel_vector.h>
 #include <deal.II/lac/petsc_solver.h>
@@ -120,11 +120,11 @@ private:
   void assemble_system_U();
   void assemble_system_dpsi_q();
   // SOLVERS //
-  void solve_U(const ConstraintMatrix &constraints, PETScWrappers::MPI::SparseMatrix &Matrix,
+  void solve_U(const AffineConstraints<double> &constraints, PETScWrappers::MPI::SparseMatrix &Matrix,
                std::shared_ptr<PETScWrappers::PreconditionBoomerAMG> preconditioner,
                PETScWrappers::MPI::Vector &completely_distributed_solution,
                const PETScWrappers::MPI::Vector &rhs);
-  void solve_P(const ConstraintMatrix &constraints, PETScWrappers::MPI::SparseMatrix &Matrix,
+  void solve_P(const AffineConstraints<double> &constraints, PETScWrappers::MPI::SparseMatrix &Matrix,
                std::shared_ptr<PETScWrappers::PreconditionBoomerAMG> preconditioner,
                PETScWrappers::MPI::Vector &completely_distributed_solution,
                const PETScWrappers::MPI::Vector &rhs);
@@ -182,8 +182,8 @@ private:
 
   int degree_MAX;
 
-  ConstraintMatrix constraints;
-  ConstraintMatrix constraints_psi;
+  AffineConstraints<double> constraints;
+  AffineConstraints<double> constraints_psi;
 
   std::vector<types::global_dof_index> boundary_values_id_u;
   std::vector<types::global_dof_index> boundary_values_id_v;
@@ -984,7 +984,7 @@ void NavierStokesSolver<dim>::assemble_system_dpsi_q()
 /////////////////////// SOLVERS ///////////////////////
 ///////////////////////////////////////////////////////
 template<int dim>
-void NavierStokesSolver<dim>::solve_U(const ConstraintMatrix &constraints,
+void NavierStokesSolver<dim>::solve_U(const AffineConstraints<double> &constraints,
                                       PETScWrappers::MPI::SparseMatrix &Matrix,
                                       std::shared_ptr<PETScWrappers::PreconditionBoomerAMG> preconditioner,
                                       PETScWrappers::MPI::Vector &completely_distributed_solution,
@@ -1005,7 +1005,7 @@ void NavierStokesSolver<dim>::solve_U(const ConstraintMatrix &constraints,
 }
 
 template<int dim>
-void NavierStokesSolver<dim>::solve_P(const ConstraintMatrix &constraints,
+void NavierStokesSolver<dim>::solve_P(const AffineConstraints<double> &constraints,
                                       PETScWrappers::MPI::SparseMatrix &Matrix,
                                       std::shared_ptr<PETScWrappers::PreconditionBoomerAMG> preconditioner,
                                       PETScWrappers::MPI::Vector &completely_distributed_solution,
index 15d2abd62df30e80046342be55e69f77a7946e8b..00f58fa299efbfe8712139e3b1732c9c7aaaa573 100644 (file)
@@ -1,10 +1,9 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
+#include <deal.II/lac/affine_constraints.h>
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/full_matrix.h>
 #include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/constraint_matrix.h>
-#include <deal.II/lac/compressed_simple_sparsity_pattern.h>
 #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
 #include <deal.II/lac/petsc_parallel_vector.h>
 #include <deal.II/lac/petsc_solver.h>
@@ -120,8 +119,8 @@ private:
   IndexSet             locally_owned_dofs_U_disp_field;
   IndexSet             locally_relevant_dofs_U_disp_field;
 
-  ConstraintMatrix     constraints;
-  ConstraintMatrix     constraints_disp_field;
+  AffineConstraints<double> constraints;
+  AffineConstraints<double> constraints_disp_field;
 
   double time;
   double time_step;
index f812589dabb07c0de8b82ac0aa190dc3bf26bcbc..651da17045a50159fc925e51080bffff1df30e9a 100644 (file)
@@ -1,10 +1,9 @@
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
+#include <deal.II/lac/affine_constraints.h>
 #include <deal.II/lac/vector.h>
 #include <deal.II/lac/full_matrix.h>
 #include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/constraint_matrix.h>
-#include <deal.II/lac/compressed_simple_sparsity_pattern.h>
 #include <deal.II/lac/petsc_parallel_sparse_matrix.h>
 #include <deal.II/lac/petsc_parallel_vector.h>
 #include <deal.II/lac/petsc_solver.h>
@@ -105,7 +104,7 @@ private:
   IndexSet             locally_owned_dofs_P;
   IndexSet             locally_relevant_dofs_P;
 
-  ConstraintMatrix     constraints;
+  AffineConstraints<double> constraints;
 
   //TimerOutput timer;
 
index 0802bcf6ff4ebdec0d7a6190e96da61de6173ced..cd8e26ee358547157090b72e433778282b534494 100644 (file)
@@ -62,7 +62,7 @@ public:
 };
 
 template <int dim>
-double BoundaryPhi<dim>::value (const Point<dim> &p, const unsigned int) const
+double BoundaryPhi<dim>::value (const Point<dim> &, const unsigned int) const
 {
   return -1.0;
 }
@@ -122,7 +122,7 @@ public:
 };
 
 template <int dim>
-double ExactW<dim>::value (const Point<dim> &p, const unsigned int) const
+double ExactW<dim>::value (const Point<dim> &, const unsigned int) const
 {
   // PROBLEM = 3D_DIAGONAL_ADVECTION
   return 1.0;
index 85302b0bb93e387ecce4f446b672e589194f058c..2c04f628c52da50e50b3c5ce1b2668fe9c7983c7 100644 (file)
@@ -6,7 +6,7 @@ class RhoFunction : public Function <dim>
 {
 public:
   RhoFunction (double t=0) : Function<dim>() {this->set_time(t);}
-  virtual double value (const Point<dim>   &p, const unsigned int component=0) const;
+  virtual double value (const Point<dim> &p, const unsigned int component=0) const;
 };
 template <int dim>
 double RhoFunction<dim>::value (const Point<dim> &p,
@@ -29,7 +29,7 @@ public:
   virtual double value (const Point<dim>   &p, const unsigned int component=0) const;
 };
 template <int dim>
-double NuFunction<dim>::value (const Point<dim> &p, const unsigned int) const
+double NuFunction<dim>::value (const Point<dim> &, const unsigned int) const
 {
   return 1.;
 }

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.