[cig-commits] [commit] master: require deal.II 8.2 and remove old checks (511d40d)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Jan 13 07:46:56 PST 2015
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/7eb5dd7a1a7f54306391ab2a8555b149d6a5164e...a35a0826b0a629eb322adf3dd4f68bc70344e042
>---------------------------------------------------------------
commit 511d40d01b95316648056f814ee7ed73025965e2
Author: Timo Heister <timo.heister at gmail.com>
Date: Tue Jan 13 10:11:49 2015 -0500
require deal.II 8.2 and remove old checks
>---------------------------------------------------------------
511d40d01b95316648056f814ee7ed73025965e2
CMakeLists.txt | 2 +-
doc/manual/manual.tex | 4 ++--
include/aspect/global.h | 2 --
source/geometry_model/box.cc | 9 ---------
source/postprocess/visualization.cc | 25 +++++--------------------
source/simulator/core.cc | 12 ------------
6 files changed, 8 insertions(+), 46 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c366fd..de64216 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES(include)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-FIND_PACKAGE(deal.II 8.0 QUIET
+FIND_PACKAGE(deal.II 8.2 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
IF(NOT ${deal.II_FOUND})
diff --git a/doc/manual/manual.tex b/doc/manual/manual.tex
index 7fd318f..c7116c0 100644
--- a/doc/manual/manual.tex
+++ b/doc/manual/manual.tex
@@ -1535,9 +1535,9 @@ prerequisites:
% Once \dealii{} 7.2 is available, this will suffice as well.
\item \textit{\dealii{}:}
- The current version of \aspect{} requires \dealii{} version 8.0 or later.
+ The current version of \aspect{} requires \dealii{} version 8.2 or later.
This version can be downloaded and installed from
- \url{https://code.google.com/p/dealii/downloads/list}.
+ \url{http://www.dealii.org/download.html}.
\item \textit{Configuring and compiling \dealii:} Now it is time to configure
\dealii.
diff --git a/include/aspect/global.h b/include/aspect/global.h
index 25c1e12..f98683e 100644
--- a/include/aspect/global.h
+++ b/include/aspect/global.h
@@ -209,11 +209,9 @@ void print_aspect_header(Stream &stream)
<< "-- . running in OPTIMIZED mode\n"
#endif
<< "-- . running with " << n_tasks << " MPI process" << (n_tasks == 1 ? "\n" : "es\n");
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) >= 801
const int n_threads = dealii::multithread_info.n_threads();
if (n_threads>1)
stream << "-- . using " << n_threads << " threads " << (n_tasks == 1 ? "\n" : "each\n");
-#endif
#ifdef ASPECT_USE_PETSC
stream << "-- . using PETSc\n";
#else
diff --git a/source/geometry_model/box.cc b/source/geometry_model/box.cc
index 31daf91..c713a63 100644
--- a/source/geometry_model/box.cc
+++ b/source/geometry_model/box.cc
@@ -44,10 +44,6 @@ namespace aspect
true);
//Tell p4est about the periodicity of the mesh.
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) >= 801
-
- // If this does not compile you are probably using 8.1pre, so please update
- // to a recent svn version or to the 8.1 release.
std::vector<GridTools::PeriodicFacePair<typename parallel::distributed::Triangulation<dim>::cell_iterator> >
periodicity_vector;
for (int i=0; i<dim; ++i)
@@ -58,11 +54,6 @@ namespace aspect
if (periodicity_vector.size() > 0)
coarse_grid.add_periodicity (periodicity_vector);
-#else
- for ( unsigned int i=0; i<dim; ++i)
- AssertThrow(!periodic[i],
- ExcMessage("Please update deal.II to the latest version to get support for periodic domains."));
-#endif
}
diff --git a/source/postprocess/visualization.cc b/source/postprocess/visualization.cc
index e3a59ac..88fb5fb 100644
--- a/source/postprocess/visualization.cc
+++ b/source/postprocess/visualization.cc
@@ -306,9 +306,7 @@ namespace aspect
std::string h5_solution_file_name = solution_file_prefix + ".h5";
std::string xdmf_filename = this->get_output_directory() + "solution.xdmf";
- // Filter redundant values if the functionality is available in the current
- // version of deal.II, otherwise use the old data format
-#if DEAL_II_VERSION_MAJOR*100 + DEAL_II_VERSION_MINOR > 800
+ // Filter redundant values
DataOutBase::DataOutFilter data_filter(DataOutBase::DataOutFilterFlags(true, true));
// If the mesh changed since the last output, make a new mesh file
@@ -325,13 +323,6 @@ namespace aspect
h5_solution_file_name.c_str(),
time_in_years_or_seconds,
this->get_mpi_communicator());
-#else
- data_out.write_hdf5_parallel((this->get_output_directory()+h5_solution_file_name).c_str(),
- this->get_mpi_communicator());
- new_xdmf_entry = data_out.create_xdmf_entry(h5_solution_file_name.c_str(),
- time_in_years_or_seconds,
- this->get_mpi_communicator());
-#endif
xdmf_entries.push_back(new_xdmf_entry);
data_out.write_xdmf_file(xdmf_entries, xdmf_filename.c_str(),
this->get_mpi_communicator());
@@ -374,11 +365,10 @@ namespace aspect
data_out.write_visit_record (visit_master, filenames);
output_file_names_by_timestep.push_back (filenames);
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) > 800
+
std::ofstream global_visit_master ((this->get_output_directory() +
"solution.visit").c_str());
data_out.write_visit_record (global_visit_master, output_file_names_by_timestep);
-#endif
}
}
else
@@ -389,13 +379,11 @@ namespace aspect
{
std::ostringstream tmp;
- // if deal.II supports it (after 7.3.x), pass time step number and time as
- // metadata into the output file
+ // pass time step number and time as metadata into the output file
DataOutBase::VtkFlags vtk_flags;
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) >= 704
vtk_flags.cycle = this->get_timestep_number();
vtk_flags.time = time_in_years_or_seconds;
-#endif
+
data_out.set_flags (vtk_flags);
data_out.write (tmp, DataOutBase::parse_output_format(output_format));
@@ -439,11 +427,10 @@ namespace aspect
data_out.write_visit_record (visit_master, filenames);
output_file_names_by_timestep.push_back (filenames);
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) > 800
+
std::ofstream global_visit_master ((this->get_output_directory() +
"solution.visit").c_str());
data_out.write_visit_record (global_visit_master, output_file_names_by_timestep);
-#endif
}
const std::string *filename
@@ -799,9 +786,7 @@ namespace aspect
& output_file_names_by_timestep
& mesh_changed
& last_mesh_file_name
-#if DEAL_II_VERSION_MAJOR*100 + DEAL_II_VERSION_MINOR > 800
& xdmf_entries
-#endif
;
}
diff --git a/source/simulator/core.cc b/source/simulator/core.cc
index 53ceb8c..cee0dae 100644
--- a/source/simulator/core.cc
+++ b/source/simulator/core.cc
@@ -779,15 +779,10 @@ namespace aspect
LinearAlgebra::CompressedBlockSparsityPattern sp(introspection.index_sets.system_relevant_partitioning);
#else
-# if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) > 801
TrilinosWrappers::BlockSparsityPattern sp (system_partitioning,
system_partitioning,
introspection.index_sets.system_relevant_partitioning,
mpi_communicator);
-# else
- TrilinosWrappers::BlockSparsityPattern sp (system_partitioning,
- mpi_communicator);
-# endif
#endif
DoFTools::make_sparsity_pattern (dof_handler,
@@ -839,15 +834,10 @@ namespace aspect
#else
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) > 801
TrilinosWrappers::BlockSparsityPattern sp (system_partitioning,
system_partitioning,
introspection.index_sets.system_relevant_partitioning,
mpi_communicator);
-#else
- TrilinosWrappers::BlockSparsityPattern sp (system_partitioning,
- mpi_communicator);
-#endif
#endif
DoFTools::make_sparsity_pattern (dof_handler,
@@ -953,13 +943,11 @@ namespace aspect
== parameters.prescribed_velocity_boundary_indicators.end(),
ExcInternalError());
-#if (DEAL_II_MAJOR*100 + DEAL_II_MINOR) >= 801
DoFTools::make_periodicity_constraints(dof_handler,
(*p).first.first, //first boundary id
(*p).first.second, //second boundary id
(*p).second, //cartesian direction for translational symmetry
constraints);
-#endif
}
More information about the CIG-COMMITS
mailing list