Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requirement deal.ii.8.5.0 related statements #1578

Merged
merged 1 commit into from May 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions source/main.cc
Expand Up @@ -312,7 +312,6 @@ parse_parameters (const std::string &input_as_string,
// try reading on processor 0
bool success = true;
if (dealii::Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
#if DEAL_II_VERSION_GTE(8,5,0)
try
{
prm.parse_input_from_string(input_as_string.c_str());
Expand All @@ -323,9 +322,6 @@ parse_parameters (const std::string &input_as_string,
e.print_info(std::cerr);
std::cerr << std::endl;
}
#else
success = prm.read_input_from_string(input_as_string.c_str());
#endif


// broadcast the result. we'd like to do this with a bool
Expand Down Expand Up @@ -353,12 +349,7 @@ parse_parameters (const std::string &input_as_string,
// other processors will be ok as well
if (dealii::Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) != 0)
{
#if DEAL_II_VERSION_GTE(8,5,0)
prm.parse_input_from_string(input_as_string.c_str());
#else
success = prm.read_input_from_string(input_as_string.c_str());
AssertThrow(success, dealii::ExcMessage ("Invalid input parameter file."));
#endif
}
}

Expand Down
42 changes: 0 additions & 42 deletions source/simulator/core.cc
Expand Up @@ -1117,34 +1117,13 @@ namespace aspect
}
}

#if DEAL_II_VERSION_GTE(8,5,0)
DoFTools::make_flux_sparsity_pattern (dof_handler,
sp,
constraints, false,
coupling,
face_coupling,
Utilities::MPI::
this_mpi_process(mpi_communicator));
#else
if (Utilities::MPI::n_mpi_processes(mpi_communicator) == 1)
{
DoFTools::make_sparsity_pattern (dof_handler,
coupling, sp,
constraints, false,
Utilities::MPI::
this_mpi_process(mpi_communicator));
DoFTools::make_flux_sparsity_pattern (dof_handler,
sp,
coupling,
face_coupling);
}
else
DoFTools::make_flux_sparsity_pattern (dof_handler,
sp,
constraints, false,
Utilities::MPI::
this_mpi_process(mpi_communicator));
#endif
}
else
DoFTools::make_sparsity_pattern (dof_handler,
Expand Down Expand Up @@ -1269,34 +1248,13 @@ namespace aspect
}
}

#if DEAL_II_VERSION_GTE(8,5,0)
DoFTools::make_flux_sparsity_pattern (dof_handler,
sp,
constraints, false,
coupling,
face_coupling,
Utilities::MPI::
this_mpi_process(mpi_communicator));
#else
if (Utilities::MPI::n_mpi_processes(mpi_communicator) == 1)
{
DoFTools::make_sparsity_pattern (dof_handler,
coupling, sp,
constraints, false,
Utilities::MPI::
this_mpi_process(mpi_communicator));
DoFTools::make_flux_sparsity_pattern (dof_handler,
sp,
coupling,
face_coupling);
}
else
DoFTools::make_flux_sparsity_pattern (dof_handler,
sp,
constraints, false,
Utilities::MPI::
this_mpi_process(mpi_communicator));
#endif
}
else
DoFTools::make_sparsity_pattern (dof_handler,
Expand Down
5 changes: 0 additions & 5 deletions source/simulator/free_surface.cc
Expand Up @@ -651,13 +651,8 @@ namespace aspect
mesh_vertex_constraints.close();

//Now reset the mapping of the simulator to be something that captures mesh deformation in time.
#if DEAL_II_VERSION_GTE(8,5,0)
sim.mapping.reset (new MappingQ1Eulerian<dim, LinearAlgebra::Vector> (free_surface_dof_handler,
mesh_displacements));
#else
sim.mapping.reset (new MappingQ1Eulerian<dim, LinearAlgebra::Vector> (mesh_displacements,
free_surface_dof_handler));
#endif
}

template <int dim>
Expand Down
45 changes: 0 additions & 45 deletions source/simulator/initial_conditions.cc
Expand Up @@ -91,7 +91,6 @@ namespace aspect

std::vector<types::global_dof_index> local_dof_indices (finite_element.dofs_per_cell);

#if DEAL_II_VERSION_GTE(8,5,0)
const VectorFunctionFromScalarFunctionObject<dim, double> &advf_init_function =
(advf.is_temperature()
?
Expand Down Expand Up @@ -145,50 +144,6 @@ namespace aspect
}
}
}
#else
for (typename DoFHandler<dim>::active_cell_iterator cell = dof_handler.begin_active();
cell != dof_handler.end(); ++cell)
if (cell->is_locally_owned())
{
fe_values.reinit (cell);

// go through the temperature/composition dofs and set their global values
// to the temperature/composition field interpolated at these points
cell->get_dof_indices (local_dof_indices);
for (unsigned int i=0; i<finite_element.base_element(base_element).dofs_per_cell; ++i)
{
const unsigned int system_local_dof
= finite_element.component_to_system_index(advf.component_index(introspection),
/*dof index within component=*/i);

const double value =
(advf.is_temperature()
?
initial_temperature_manager.initial_temperature(fe_values.quadrature_point(i))
:
initial_composition_manager.initial_composition(fe_values.quadrature_point(i),n-1));

initial_solution(local_dof_indices[system_local_dof]) = value;

// if it is specified in the parameter file that the sum of all compositional fields
// must not exceed one, this should be checked
if (parameters.normalized_fields.size()>0 && n == 1)
{
double sum = 0;
for (unsigned int m=0; m<parameters.normalized_fields.size(); ++m)
sum += initial_composition_manager.initial_composition(fe_values.quadrature_point(i),
parameters.normalized_fields[m]);

if (std::abs(sum) > 1.0+std::numeric_limits<double>::epsilon())
{
max_sum_comp = std::max(sum, max_sum_comp);
normalize_composition = true;
}
}

}
}
#endif

initial_solution.compress(VectorOperation::insert);

Expand Down