From 9ba73d2b473cd26ad5820b4f2d2e8b6a6bf5ce0b Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 9 Jan 2016 13:35:30 -0500 Subject: [PATCH] Remove unused files. These are present in the serial versions of the solver (to which I link) but are not used in the parallel version (which is the only solver included in the gallery). --- .../include/deal.II-cdr/assemble_system.h | 33 ------- .../deal.II-cdr/assemble_system.templates.h | 98 ------------------- .../include/deal.II-cdr/write_xdmf_output.h | 40 -------- .../deal.II-cdr/write_xdmf_output.templates.h | 52 ---------- cdr/common/source/assemble_system.cc | 65 ------------ cdr/common/source/write_xdmf_output.cc | 42 -------- 6 files changed, 330 deletions(-) delete mode 100644 cdr/common/include/deal.II-cdr/assemble_system.h delete mode 100644 cdr/common/include/deal.II-cdr/assemble_system.templates.h delete mode 100644 cdr/common/include/deal.II-cdr/write_xdmf_output.h delete mode 100644 cdr/common/include/deal.II-cdr/write_xdmf_output.templates.h delete mode 100644 cdr/common/source/assemble_system.cc delete mode 100644 cdr/common/source/write_xdmf_output.cc diff --git a/cdr/common/include/deal.II-cdr/assemble_system.h b/cdr/common/include/deal.II-cdr/assemble_system.h deleted file mode 100644 index 9eb4026..0000000 --- a/cdr/common/include/deal.II-cdr/assemble_system.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef dealii__cdr_assemble_system_h -#define dealii__cdr_assemble_system_h -#include -#include - -#include - -#include - -#include - -#include - -#include - -namespace CDR -{ - using namespace dealii; - - template - void assemble_system - (const DoFHandler &dof_handler, - const QGauss &quad, - const std::function(const Point)> convection_function, - const std::function)> forcing_function, - const CDR::Parameters ¶meters, - const VectorType ¤t_solution, - const ConstraintMatrix &constraints, - const double current_time, - MatrixType &system_matrix, - VectorType &system_rhs); -} -#endif diff --git a/cdr/common/include/deal.II-cdr/assemble_system.templates.h b/cdr/common/include/deal.II-cdr/assemble_system.templates.h deleted file mode 100644 index f76dc94..0000000 --- a/cdr/common/include/deal.II-cdr/assemble_system.templates.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef dealii__cdr_assemble_system_templates_h -#define dealii__cdr_assemble_system_templates_h -#include - -#include - -#include - -#include - -namespace CDR -{ - using namespace dealii; - - template - void assemble_system - (const DoFHandler &dof_handler, - const QGauss &quad, - const std::function(const Point)> convection_function, - const std::function)> forcing_function, - const CDR::Parameters ¶meters, - const VectorType ¤t_solution, - const ConstraintMatrix &constraints, - const double current_time, - MatrixType &system_matrix, - VectorType &system_rhs) - { - auto &fe = dof_handler.get_fe(); - const auto dofs_per_cell = fe.dofs_per_cell; - const double time_step = (parameters.stop_time - parameters.start_time) - /parameters.n_time_steps; - FEValues fe_values(fe, quad, update_values | update_gradients | - update_quadrature_points | update_JxW_values); - - Vector cell_rhs(dofs_per_cell); - FullMatrix cell_matrix(dofs_per_cell, dofs_per_cell); - - Vector current_fe_coefficients(dofs_per_cell); - std::vector local_indices(dofs_per_cell); - - auto previous_time = current_time - time_step; - - for (const auto &cell : dof_handler.active_cell_iterators()) - { - if (cell->is_locally_owned()) - { - fe_values.reinit(cell); - cell_rhs = 0.0; - cell_matrix = 0.0; - cell->get_dof_indices(local_indices); - for (unsigned int i = 0; i < dofs_per_cell; ++i) - { - current_fe_coefficients[i] = current_solution[local_indices[i]]; - } - - for (unsigned int q = 0; q < quad.size(); ++q) - { - const auto current_convection = - convection_function(fe_values.quadrature_point(q)); - const auto current_forcing = - forcing_function(current_time, fe_values.quadrature_point(q)); - const auto previous_forcing = - forcing_function(previous_time, fe_values.quadrature_point(q)); - - for (unsigned int i = 0; i < dofs_per_cell; ++i) - { - for (unsigned int j = 0; j < dofs_per_cell; ++j) - { - const auto convection_contribution = current_convection - *fe_values.shape_grad(j, q); - - const double mass_part - {fe_values.shape_value(i, q)*fe_values.shape_value(j, q)}; - const double system_part - {time_step/2.0* - // convection part - (fe_values.shape_value(i, q)*convection_contribution - // diffusion part - + parameters.diffusion_coefficient - *fe_values.shape_grad(i, q)*fe_values.shape_grad(j, q) - // reaction part - + parameters.reaction_coefficient*mass_part)}; - cell_rhs(i) += fe_values.JxW(q) - *((mass_part - system_part)*current_fe_coefficients[j] - + time_step/2.0*fe_values.shape_value(i, q) - *(current_forcing + previous_forcing)); - cell_matrix(i, j) += - fe_values.JxW(q)*(mass_part + system_part); - } - } - } - constraints.distribute_local_to_global - (cell_matrix, cell_rhs, local_indices, system_matrix, system_rhs, true); - } - } - } -} -#endif diff --git a/cdr/common/include/deal.II-cdr/write_xdmf_output.h b/cdr/common/include/deal.II-cdr/write_xdmf_output.h deleted file mode 100644 index 6a1a696..0000000 --- a/cdr/common/include/deal.II-cdr/write_xdmf_output.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef dealii__cdr_write_xmdf_output_h -#define dealii__cdr_write_xmdf_output_h -#include - -#include - -#include - -#include - -#include -#include - - -namespace CDR -{ - using namespace dealii; - - class WriteXDMFOutput - { - public: - WriteXDMFOutput(const unsigned int patch_level, - const bool update_mesh_at_each_step = true); - - template - void write_output(const DoFHandler &dof_handler, - const VectorType &solution, - const unsigned int time_step_n, - const double current_time); - private: - const unsigned int patch_level; - const bool update_mesh_at_each_step; - const std::string xdmf_file_name; - const std::vector - data_component_interpretation; - std::vector xdmf_entries; - bool write_mesh; - }; -} -#endif diff --git a/cdr/common/include/deal.II-cdr/write_xdmf_output.templates.h b/cdr/common/include/deal.II-cdr/write_xdmf_output.templates.h deleted file mode 100644 index e944d92..0000000 --- a/cdr/common/include/deal.II-cdr/write_xdmf_output.templates.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef dealii__cdr_write_xmdf_output_templates_h -#define dealii__cdr_write_xmdf_output_templates_h -#include - -#include - -#include - -namespace CDR -{ - template - void WriteXDMFOutput::write_output(const DoFHandler &dof_handler, - const VectorType &solution, - const unsigned int time_step_n, - const double current_time) - { - DataOut data_out; - data_out.attach_dof_handler(dof_handler); - data_out.add_data_vector(solution, "u", DataOut::type_dof_data, - data_component_interpretation); - data_out.build_patches(patch_level); - - auto solution_file_name = "solution-" - + Utilities::int_to_string(time_step_n, 9) + ".h5"; - std::string mesh_file_name; - if (update_mesh_at_each_step) - { - mesh_file_name = "mesh-" - + Utilities::int_to_string(time_step_n, 9) + ".h5"; - } - else - { - mesh_file_name = "mesh.h5"; - } - - DataOutBase::DataOutFilter data_filter - (DataOutBase::DataOutFilterFlags(true, true)); - data_out.write_filtered_data(data_filter); - data_out.write_hdf5_parallel(data_filter, write_mesh, mesh_file_name, - solution_file_name, MPI_COMM_WORLD); - if (!update_mesh_at_each_step) - { - write_mesh = false; - } - - xdmf_entries.push_back(data_out.create_xdmf_entry - (data_filter, mesh_file_name, solution_file_name, - current_time, MPI_COMM_WORLD)); - data_out.write_xdmf_file(xdmf_entries, xdmf_file_name, MPI_COMM_WORLD); - } -} -#endif diff --git a/cdr/common/source/assemble_system.cc b/cdr/common/source/assemble_system.cc deleted file mode 100644 index 73c5bba..0000000 --- a/cdr/common/source/assemble_system.cc +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include - -#include - -#include - -namespace CDR -{ - using namespace dealii; - - template - void assemble_system<2, SparseMatrix, Vector> - (const DoFHandler<2> &dof_handler, - const QGauss<2> &quad, - const std::function(const Point<2>)> convection_function, - const std::function)> forcing_function, - const CDR::Parameters ¶meters, - const Vector ¤t_solution, - const ConstraintMatrix &constraints, - const double current_time, - SparseMatrix &system_matrix, - Vector &system_rhs); - - template - void assemble_system<3, SparseMatrix, Vector> - (const DoFHandler<3> &dof_handler, - const QGauss<3> &quad, - const std::function(const Point<3>)> convection_function, - const std::function)> forcing_function, - const CDR::Parameters ¶meters, - const Vector ¤t_solution, - const ConstraintMatrix &constraints, - const double current_time, - SparseMatrix &system_matrix, - Vector &system_rhs); - - template - void assemble_system<2, TrilinosWrappers::SparseMatrix, - TrilinosWrappers::MPI::Vector> - (const DoFHandler<2> &dof_handler, - const QGauss<2> &quad, - const std::function(const Point<2>)> convection_function, - const std::function)> forcing_function, - const CDR::Parameters ¶meters, - const TrilinosWrappers::MPI::Vector ¤t_solution, - const ConstraintMatrix &constraints, - const double current_time, - TrilinosWrappers::SparseMatrix &system_matrix, - TrilinosWrappers::MPI::Vector &system_rhs); - - template - void assemble_system<3, TrilinosWrappers::SparseMatrix, - TrilinosWrappers::MPI::Vector> - (const DoFHandler<3> &dof_handler, - const QGauss<3> &quad, - const std::function(const Point<3>)> convection_function, - const std::function)> forcing_function, - const CDR::Parameters ¶meters, - const TrilinosWrappers::MPI::Vector ¤t_solution, - const ConstraintMatrix &constraints, - const double current_time, - TrilinosWrappers::SparseMatrix &system_matrix, - TrilinosWrappers::MPI::Vector &system_rhs); -} diff --git a/cdr/common/source/write_xdmf_output.cc b/cdr/common/source/write_xdmf_output.cc deleted file mode 100644 index 4a6b3a7..0000000 --- a/cdr/common/source/write_xdmf_output.cc +++ /dev/null @@ -1,42 +0,0 @@ -#include - -#include - -namespace CDR -{ - using namespace dealii; - - WriteXDMFOutput::WriteXDMFOutput(const unsigned int patch_level, - const bool update_mesh_at_each_step) - : patch_level {patch_level}, - update_mesh_at_each_step {update_mesh_at_each_step}, - xdmf_file_name {"solution.xdmf"}, - data_component_interpretation - {DataComponentInterpretation::component_is_scalar}, - write_mesh {true} - {} - - template - void WriteXDMFOutput::write_output(const DoFHandler<2> &dof_handler, - const Vector &solution, - const unsigned int time_step_n, - const double current_time); - - template - void WriteXDMFOutput::write_output(const DoFHandler<2> &dof_handler, - const TrilinosWrappers::MPI::Vector &solution, - const unsigned int time_step_n, - const double current_time); - - template - void WriteXDMFOutput::write_output(const DoFHandler<3> &dof_handler, - const Vector &solution, - const unsigned int time_step_n, - const double current_time); - - template - void WriteXDMFOutput::write_output(const DoFHandler<3> &dof_handler, - const TrilinosWrappers::MPI::Vector &solution, - const unsigned int time_step_n, - const double current_time); -} -- 2.39.5