From faf425bc16a631b4a4c5051801ff08df6e6e9a04 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Fri, 22 May 2020 22:36:56 +0200 Subject: [PATCH] Tweak source files Standardisation of includes; Remove some compilation warnings --- parallel_in_time/src/BraidFuncs.cc | 2 +- parallel_in_time/src/BraidFuncs.hh | 4 ++-- parallel_in_time/src/HeatEquation.hh | 10 +++++----- parallel_in_time/src/HeatEquationImplem.hh | 3 ++- parallel_in_time/src/Utilities.cc | 2 +- parallel_in_time/src/Utilities.hh | 1 + parallel_in_time/src/parallel_in_time.cc | 8 ++++---- parallel_in_time/test/test_braid.cc | 8 ++++---- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/parallel_in_time/src/BraidFuncs.cc b/parallel_in_time/src/BraidFuncs.cc index 92cd5e2..a1bc525 100644 --- a/parallel_in_time/src/BraidFuncs.cc +++ b/parallel_in_time/src/BraidFuncs.cc @@ -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(dbuffer[0]); u = new(my_Vector); u->data.reinit(size); diff --git a/parallel_in_time/src/BraidFuncs.hh b/parallel_in_time/src/BraidFuncs.hh index 9e84c21..3b516c9 100644 --- a/parallel_in_time/src/BraidFuncs.hh +++ b/parallel_in_time/src/BraidFuncs.hh @@ -17,8 +17,8 @@ /*-------- Third Party --------*/ #include -#include "braid.h" -#include "braid_test.h" +#include +#include /*-------- Project --------*/ #include "HeatEquation.hh" diff --git a/parallel_in_time/src/HeatEquation.hh b/parallel_in_time/src/HeatEquation.hh index b743c3a..3013be4 100644 --- a/parallel_in_time/src/HeatEquation.hh +++ b/parallel_in_time/src/HeatEquation.hh @@ -1,8 +1,6 @@ #ifndef _HEATEQUATION_H_ #define _HEATEQUATION_H_ -#include - #include #include #include @@ -13,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,6 +30,8 @@ #include #include +#include + using namespace dealii; // The HeatEquation class is describes the finite element @@ -70,7 +70,7 @@ private: FE_Q fe; DoFHandler dof_handler; - ConstraintMatrix constraints; + AffineConstraints constraints; SparsityPattern sparsity_pattern; SparseMatrix mass_matrix; @@ -79,7 +79,7 @@ private: Vector system_rhs; - std::ofstream myfile; + std::ofstream myfile; const double theta; diff --git a/parallel_in_time/src/HeatEquationImplem.hh b/parallel_in_time/src/HeatEquationImplem.hh index 3b18f11..d30819f 100644 --- a/parallel_in_time/src/HeatEquationImplem.hh +++ b/parallel_in_time/src/HeatEquationImplem.hh @@ -1,6 +1,7 @@ +#include "Utilities.hh" + #include #include -#include "Utilities.hh" // Calculates the forcing function for the RightHandSide. See the // documentation for the math. diff --git a/parallel_in_time/src/Utilities.cc b/parallel_in_time/src/Utilities.cc index dca1c3d..1f490b4 100644 --- a/parallel_in_time/src/Utilities.cc +++ b/parallel_in_time/src/Utilities.cc @@ -3,7 +3,7 @@ #include #include -#include "mpi.h" +#include int procID = 0; diff --git a/parallel_in_time/src/Utilities.hh b/parallel_in_time/src/Utilities.hh index 607fa47..323849a 100644 --- a/parallel_in_time/src/Utilities.hh +++ b/parallel_in_time/src/Utilities.hh @@ -1,5 +1,6 @@ #ifndef _UTILITIES_H_ #define _UTILITIES_H_ + #include // This preprocessor macro is used on function arguments diff --git a/parallel_in_time/src/parallel_in_time.cc b/parallel_in_time/src/parallel_in_time.cc index 460ee35..9117a37 100644 --- a/parallel_in_time/src/parallel_in_time.cc +++ b/parallel_in_time/src/parallel_in_time.cc @@ -17,13 +17,13 @@ * Author: Joshua Christopher, Colorado State University, 2018 */ -#include -#include - #include "BraidFuncs.hh" #include "HeatEquation.hh" #include "Utilities.hh" +#include +#include + 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, diff --git a/parallel_in_time/test/test_braid.cc b/parallel_in_time/test/test_braid.cc index 817f993..61e006a 100644 --- a/parallel_in_time/test/test_braid.cc +++ b/parallel_in_time/test/test_braid.cc @@ -1,9 +1,9 @@ -#include +#include "BraidFuncs.hh" -#include "braid.h" -#include "braid_test.h" +#include +#include -#include "BraidFuncs.hh" +#include int main(int argc, char** argv) { -- 2.39.5