]> https://gitweb.dealii.org/ - code-gallery.git/commitdiff
Tweak source files
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 22 May 2020 20:36:56 +0000 (22:36 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 30 May 2020 20:57:35 +0000 (22:57 +0200)
Standardisation of includes; Remove some compilation warnings

parallel_in_time/src/BraidFuncs.cc
parallel_in_time/src/BraidFuncs.hh
parallel_in_time/src/HeatEquation.hh
parallel_in_time/src/HeatEquationImplem.hh
parallel_in_time/src/Utilities.cc
parallel_in_time/src/Utilities.hh
parallel_in_time/src/parallel_in_time.cc
parallel_in_time/test/test_braid.cc

index 92cd5e2c1733898802041375a271ed6b9a3806bd..a1bc525fd0f6ddf684d482d7b3741b55286c082d 100644 (file)
@@ -215,7 +215,7 @@ my_BufUnpack(braid_App           app,
 
   my_Vector *u = NULL;
   double *dbuffer = (double*)buffer;
-  int size = dbuffer[0];
+  int size = static_cast<int>(dbuffer[0]);
   u = new(my_Vector);
   u->data.reinit(size);
 
index 9e84c210a46c9d3293f18afaefe647f8989628ce..3b516c94475630048810a6e3a7608874b380288f 100644 (file)
@@ -17,8 +17,8 @@
 /*-------- Third Party --------*/
 #include <deal.II/numerics/vector_tools.h>
 
-#include "braid.h"
-#include "braid_test.h"
+#include <braid.h>
+#include <braid_test.h>
 
 /*-------- Project --------*/
 #include "HeatEquation.hh"
index b743c3aa4638c16aafd1c1d149649dc54ccd6bc6..3013be485a408a64796985fed26d3c327e0d725f 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _HEATEQUATION_H_
 #define _HEATEQUATION_H_
 
-#include <fstream>
-
 #include <deal.II/base/utilities.h>
 #include <deal.II/base/quadrature_lib.h>
 #include <deal.II/base/function.h>
@@ -13,7 +11,7 @@
 #include <deal.II/lac/sparse_matrix.h>
 #include <deal.II/lac/solver_cg.h>
 #include <deal.II/lac/precondition.h>
-#include <deal.II/lac/constraint_matrix.h>
+#include <deal.II/lac/affine_constraints.h>
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_refinement.h>
@@ -32,6 +30,8 @@
 #include <deal.II/numerics/matrix_tools.h>
 #include <deal.II/base/convergence_table.h>
 
+#include <fstream>
+
 using namespace dealii;
 
 // The HeatEquation class is describes the finite element
@@ -70,7 +70,7 @@ private:
   FE_Q<dim>            fe;
   DoFHandler<dim>      dof_handler;
 
-  ConstraintMatrix     constraints;
+  AffineConstraints<double> constraints;
 
   SparsityPattern      sparsity_pattern;
   SparseMatrix<double> mass_matrix;
@@ -79,7 +79,7 @@ private:
 
   Vector<double>       system_rhs;
 
-  std::ofstream myfile;
+  std::ofstream        myfile;
 
   const double         theta;
 
index 3b18f119c4466900ebbf413d912224efbca062c1..d30819f3718a42ae0b8f989bc507e7049080518f 100644 (file)
@@ -1,6 +1,7 @@
+#include "Utilities.hh"
+
 #include <iomanip>
 #include <math.h>
-#include "Utilities.hh"
 
 // Calculates the forcing function for the RightHandSide. See the
 // documentation for the math.
index dca1c3db93ba476a36d4ee85594f644bb1795043..1f490b401c537a5f5c7a699c2e1488e273583a50 100644 (file)
@@ -3,7 +3,7 @@
 #include <string>
 #include <fstream>
 
-#include "mpi.h"
+#include <mpi.h>
 
 int procID = 0;
 
index 607fa47cf2d75a8e0fb17b0851fcdc08172bc7c1..323849af3e660f0177a2480e0d7fe1eae57d3296 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef _UTILITIES_H_
 #define _UTILITIES_H_
+
 #include <iostream>
 
 // This preprocessor macro is used on function arguments
index 460ee350c4cadd9b3199b86fe8d34976f4b414ca..9117a3785f91a5fabc04a5b7add690062ed67126 100644 (file)
  * Author: Joshua Christopher, Colorado State University, 2018
  */
 
-#include <fstream>
-#include <iostream>
-
 #include "BraidFuncs.hh"
 #include "HeatEquation.hh"
 #include "Utilities.hh"
 
+#include <fstream>
+#include <iostream>
+
 int main(int argc, char *argv[])
 {
   try
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
       braid_Core core;
       double tstart = 0.0;
       double tstop = 0.002;
-      double ntime = 10;
+      int    ntime = 10;
       my_App *app = new(my_App);
 
       braid_Init(MPI_COMM_WORLD, comm, tstart, tstop, ntime, app,
index 817f993e1d943526f0021b3cbb767a1704690aa2..61e006a5a32be9a49cf40c9bfccad5bbac5dfdde 100644 (file)
@@ -1,9 +1,9 @@
-#include <iostream>
+#include "BraidFuncs.hh"
 
-#include "braid.h"
-#include "braid_test.h"
+#include <braid.h>
+#include <braid_test.h>
 
-#include "BraidFuncs.hh"
+#include <iostream>
 
 int main(int argc, char** argv)
 {

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.