From: David Wells Date: Sun, 1 Nov 2015 20:22:51 +0000 (-0500) Subject: More VECTOR -> VectorType X-Git-Tag: v8.4.0-rc2~230^2~11 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5117b007368db0182f6c44afdebb469d330a841;p=dealii.git More VECTOR -> VectorType --- diff --git a/include/deal.II/base/time_stepping.templates.h b/include/deal.II/base/time_stepping.templates.h index 165bc94a08..d36af60f43 100644 --- a/include/deal.II/base/time_stepping.templates.h +++ b/include/deal.II/base/time_stepping.templates.h @@ -202,8 +202,8 @@ namespace TimeStepping template ImplicitRungeKutta::ImplicitRungeKutta(runge_kutta_method method, - unsigned int max_it, - double tolerance) + unsigned int max_it, + double tolerance) : RungeKutta (), skip_linear_combi(false), diff --git a/include/deal.II/lac/pointer_matrix.h b/include/deal.II/lac/pointer_matrix.h index d778c60b28..8fc7ddcff2 100644 --- a/include/deal.II/lac/pointer_matrix.h +++ b/include/deal.II/lac/pointer_matrix.h @@ -742,7 +742,7 @@ PointerMatrixAux::empty () const template inline void PointerMatrixAux::vmult (VectorType &dst, - const VectorType &src) const + const VectorType &src) const { if (mem == 0) mem = &my_memory; @@ -755,7 +755,7 @@ PointerMatrixAux::vmult (VectorType &dst, template inline void PointerMatrixAux::Tvmult (VectorType &dst, - const VectorType &src) const + const VectorType &src) const { if (mem == 0) mem = &my_memory; @@ -768,7 +768,7 @@ PointerMatrixAux::Tvmult (VectorType &dst, template inline void PointerMatrixAux::vmult_add (VectorType &dst, - const VectorType &src) const + const VectorType &src) const { if (mem == 0) mem = &my_memory; @@ -785,7 +785,7 @@ PointerMatrixAux::vmult_add (VectorType &dst, template inline void PointerMatrixAux::Tvmult_add (VectorType &dst, - const VectorType &src) const + const VectorType &src) const { if (mem == 0) mem = &my_memory; diff --git a/include/deal.II/lac/precondition.h b/include/deal.II/lac/precondition.h index c55d6ec85e..f2e6c0e82e 100644 --- a/include/deal.II/lac/precondition.h +++ b/include/deal.II/lac/precondition.h @@ -1335,7 +1335,7 @@ PreconditionSOR::Tstep (VectorType &dst, const VectorType &src) cons template inline void PreconditionSSOR::initialize (const MatrixType &rA, - const typename BaseClass::AdditionalData ¶meters) + const typename BaseClass::AdditionalData ¶meters) { this->PreconditionRelaxation::initialize (rA, parameters); @@ -1514,7 +1514,7 @@ PreconditionPSOR::AdditionalData::AdditionalData template PreconditionUseMatrix::PreconditionUseMatrix(const MatrixType &M, - const function_ptr method) + const function_ptr method) : matrix(M), precondition(method) {} diff --git a/include/deal.II/lac/precondition_block.templates.h b/include/deal.II/lac/precondition_block.templates.h index 468815acb8..410620c7ac 100644 --- a/include/deal.II/lac/precondition_block.templates.h +++ b/include/deal.II/lac/precondition_block.templates.h @@ -979,7 +979,7 @@ PreconditionBlockSSOR::PreconditionBlockSSOR () template template void PreconditionBlockSSOR::vmult (Vector &dst, - const Vector &src) const + const Vector &src) const { Vector help; help.reinit(dst); @@ -1010,7 +1010,7 @@ void PreconditionBlockSSOR::vmult (Vector template template void PreconditionBlockSSOR::Tvmult (Vector &dst, - const Vector &src) const + const Vector &src) const { Vector help; help.reinit(dst); diff --git a/include/deal.II/lac/solver.h b/include/deal.II/lac/solver.h index cdca1a8194..f0851e8b24 100644 --- a/include/deal.II/lac/solver.h +++ b/include/deal.II/lac/solver.h @@ -456,7 +456,7 @@ template inline SolverControl::State Solver::StateCombiner::operator ()(const SolverControl::State state1, - const SolverControl::State state2) const + const SolverControl::State state2) const { if ((state1 == SolverControl::failure) || @@ -476,7 +476,7 @@ template inline SolverControl::State Solver::StateCombiner::operator ()(const Iterator begin, - const Iterator end) const + const Iterator end) const { Assert (begin != end, ExcMessage ("You can't combine iterator states if no state is given.")); @@ -494,7 +494,7 @@ Solver::StateCombiner::operator ()(const Iterator begin, template inline Solver::Solver (SolverControl &solver_control, - VectorMemory &vector_memory) + VectorMemory &vector_memory) : memory(vector_memory) { diff --git a/include/deal.II/lac/solver_cg.h b/include/deal.II/lac/solver_cg.h index 942ca5429b..61d1734521 100644 --- a/include/deal.II/lac/solver_cg.h +++ b/include/deal.II/lac/solver_cg.h @@ -339,8 +339,8 @@ AdditionalData () template SolverCG::SolverCG (SolverControl &cn, - VectorMemory &mem, - const AdditionalData &data) + VectorMemory &mem, + const AdditionalData &data) : Solver(cn,mem), additional_data(data) diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index 2a9ec8ce1d..5a29a11b3c 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -524,7 +524,7 @@ namespace internal template inline VectorType & TmpVectors::operator() (const unsigned int i, - const VectorType &temp) + const VectorType &temp) { Assert (i+offset SolverMinRes::SolverMinRes (SolverControl &cn, VectorMemory &mem, - const AdditionalData &) + const AdditionalData &) : Solver(cn,mem) {} diff --git a/include/deal.II/meshworker/integration_info.h b/include/deal.II/meshworker/integration_info.h index c516b06570..35d14b27c8 100644 --- a/include/deal.II/meshworker/integration_info.h +++ b/include/deal.II/meshworker/integration_info.h @@ -779,7 +779,7 @@ namespace MeshWorker (const FiniteElement &el, const Mapping &mapping, const AnyData &data, - const VectorType &, + const VectorType &, const BlockInfo *block_info) { initialize(el, mapping, block_info); diff --git a/include/deal.II/meshworker/simple.h b/include/deal.II/meshworker/simple.h index 8fc1d01009..bf8993b31c 100644 --- a/include/deal.II/meshworker/simple.h +++ b/include/deal.II/meshworker/simple.h @@ -632,9 +632,9 @@ namespace MeshWorker template inline void MatrixSimple::assemble(const FullMatrix &M, - const unsigned int index, - const std::vector &i1, - const std::vector &i2) + const unsigned int index, + const std::vector &i1, + const std::vector &i2) { AssertDimension(M.m(), i1.size()); AssertDimension(M.n(), i2.size()); @@ -1036,7 +1036,7 @@ namespace MeshWorker template inline void MGMatrixSimple::assemble(const DOFINFO &info1, - const DOFINFO &info2) + const DOFINFO &info2) { Assert(info1.level_cell, ExcMessage("Cell must access level dofs")); Assert(info2.level_cell, ExcMessage("Cell must access level dofs")); @@ -1129,7 +1129,7 @@ namespace MeshWorker template inline void SystemSimple::initialize_info(DOFINFO &info, - bool face) const + bool face) const { MatrixSimple::initialize_info(info, face); ResidualSimple::initialize_info(info, face); @@ -1150,7 +1150,7 @@ namespace MeshWorker template inline void SystemSimple::assemble(const DOFINFO &info1, - const DOFINFO &info2) + const DOFINFO &info2) { MatrixSimple::assemble(info1, info2); ResidualSimple::assemble(info1, info2); diff --git a/include/deal.II/multigrid/mg_block_smoother.h b/include/deal.II/multigrid/mg_block_smoother.h index a39ef8ee7e..53ae1fe224 100644 --- a/include/deal.II/multigrid/mg_block_smoother.h +++ b/include/deal.II/multigrid/mg_block_smoother.h @@ -52,11 +52,11 @@ public: * Constructor. Sets memory and smoothing parameters. */ MGSmootherBlock (VectorMemory > &mem, - const unsigned int steps = 1, - const bool variable = false, - const bool symmetric = false, - const bool transpose = false, - const bool reverse = false); + const unsigned int steps = 1, + const bool variable = false, + const bool symmetric = false, + const bool transpose = false, + const bool reverse = false); /** * Initialize for matrices. The parameter matrices can be any @@ -263,7 +263,7 @@ template inline void MGSmootherBlock::smooth(const unsigned int level, BlockVector &u, - const BlockVector &rhs) const + const BlockVector &rhs) const { deallog.push("Smooth"); diff --git a/include/deal.II/multigrid/mg_matrix.h b/include/deal.II/multigrid/mg_matrix.h index 6301fbda9d..ec4f28673c 100644 --- a/include/deal.II/multigrid/mg_matrix.h +++ b/include/deal.II/multigrid/mg_matrix.h @@ -177,7 +177,7 @@ namespace mg matrices.resize(p.min_level(), p.max_level()); for (unsigned int level=p.min_level(); level <= p.max_level(); ++level) matrices[level] = std_cxx11::shared_ptr > - (new_pointer_matrix_base(p[level], VectorType())); + (new_pointer_matrix_base(p[level], VectorType())); } diff --git a/include/deal.II/multigrid/mg_smoother.h b/include/deal.II/multigrid/mg_smoother.h index 4d999ea068..ebc9a66ac6 100644 --- a/include/deal.II/multigrid/mg_smoother.h +++ b/include/deal.II/multigrid/mg_smoother.h @@ -797,8 +797,8 @@ MGSmootherRelaxation::initialize template inline void MGSmootherRelaxation::smooth (const unsigned int level, - VectorType &u, - const VectorType &rhs) const + VectorType &u, + const VectorType &rhs) const { unsigned int maxlevel = smoothers.max_level(); unsigned int steps2 = this->steps; diff --git a/include/deal.II/multigrid/mg_transfer.templates.h b/include/deal.II/multigrid/mg_transfer.templates.h index 6f634159d5..b7b1d44835 100644 --- a/include/deal.II/multigrid/mg_transfer.templates.h +++ b/include/deal.II/multigrid/mg_transfer.templates.h @@ -170,8 +170,8 @@ template void MGTransferPrebuilt::copy_to_mg (const DoFHandler &mg_dof_handler, - MGLevelObject &dst, - const InVector &src) const + MGLevelObject &dst, + const InVector &src) const { reinit_vector(mg_dof_handler, component_to_block_map, dst); bool first = true; diff --git a/include/deal.II/multigrid/multigrid.h b/include/deal.II/multigrid/multigrid.h index df0c9d31a9..21596f2f1a 100644 --- a/include/deal.II/multigrid/multigrid.h +++ b/include/deal.II/multigrid/multigrid.h @@ -424,12 +424,12 @@ private: template template Multigrid::Multigrid (const DoFHandler &mg_dof_handler, - const MGMatrixBase &matrix, - const MGCoarseGridBase &coarse, - const MGTransferBase &transfer, - const MGSmootherBase &pre_smooth, - const MGSmootherBase &post_smooth, - Cycle cycle) + const MGMatrixBase &matrix, + const MGCoarseGridBase &coarse, + const MGTransferBase &transfer, + const MGSmootherBase &pre_smooth, + const MGSmootherBase &post_smooth, + Cycle cycle) : cycle_type(cycle), minlevel(0), @@ -529,7 +529,7 @@ template template void PreconditionMG::Tvmult -(OtherVectorType &, +(OtherVectorType &, const OtherVectorType &) const { Assert(false, ExcNotImplemented()); @@ -540,7 +540,7 @@ template template void PreconditionMG::Tvmult_add -(OtherVectorType &, +(OtherVectorType &, const OtherVectorType &) const { Assert(false, ExcNotImplemented()); diff --git a/include/deal.II/numerics/vector_tools.h b/include/deal.II/numerics/vector_tools.h index 82b37ba285..6b94eb7af9 100644 --- a/include/deal.II/numerics/vector_tools.h +++ b/include/deal.II/numerics/vector_tools.h @@ -595,8 +595,8 @@ namespace VectorTools VectorType &vec, const bool enforce_zero_boundary = false, const Quadrature &q_boundary = (dim > 1 ? - QGauss(2) : - Quadrature(0)), + QGauss(2) : + Quadrature(0)), const bool project_to_boundary_first = false); /** @@ -611,8 +611,8 @@ namespace VectorTools VectorType &vec, const bool enforce_zero_boundary = false, const Quadrature &q_boundary = (dim > 1 ? - QGauss(2) : - Quadrature(0)), + QGauss(2) : + Quadrature(0)), const bool project_to_boundary_first = false); /** @@ -644,8 +644,8 @@ namespace VectorTools VectorType &vec, const bool enforce_zero_boundary = false, const hp::QCollection &q_boundary = hp::QCollection(dim > 1 ? - QGauss(2) : - Quadrature(0)), + QGauss(2) : + Quadrature(0)), const bool project_to_boundary_first = false); /** diff --git a/source/distributed/solution_transfer.cc b/source/distributed/solution_transfer.cc index 49b077c429..8829a486e9 100644 --- a/source/distributed/solution_transfer.cc +++ b/source/distributed/solution_transfer.cc @@ -43,8 +43,8 @@ namespace parallel namespace distributed { - template - SolutionTransfer::SolutionTransfer(const DH &dof) + template + SolutionTransfer::SolutionTransfer (const DH &dof) : dof_handler(&dof, typeid(*this).name()) { @@ -55,16 +55,16 @@ namespace parallel - template - SolutionTransfer::~SolutionTransfer() + template + SolutionTransfer::~SolutionTransfer () {} - template + template void - SolutionTransfer:: - prepare_for_coarsening_and_refinement (const std::vector &all_in) + SolutionTransfer:: + prepare_for_coarsening_and_refinement (const std::vector &all_in) { input_vectors = all_in; register_data_attach( get_data_size() * input_vectors.size() ); @@ -72,10 +72,9 @@ namespace parallel - template + template void - SolutionTransfer:: - register_data_attach(const std::size_t size) + SolutionTransfer::register_data_attach (const std::size_t size) { Assert(size > 0, ExcMessage("Please transfer at least one vector!")); @@ -88,7 +87,7 @@ namespace parallel offset = tria->register_data_attach(size, - std_cxx11::bind(&SolutionTransfer::pack_callback, + std_cxx11::bind(&SolutionTransfer::pack_callback, this, std_cxx11::_1, std_cxx11::_2, @@ -98,53 +97,50 @@ namespace parallel - template + template void - SolutionTransfer:: - prepare_for_coarsening_and_refinement (const VECTOR &in) + SolutionTransfer:: + prepare_for_coarsening_and_refinement (const VectorType &in) { - std::vector all_in(1, &in); + std::vector all_in(1, &in); prepare_for_coarsening_and_refinement(all_in); } - template + template void - SolutionTransfer:: - prepare_serialization(const VECTOR &in) + SolutionTransfer::prepare_serialization (const VectorType &in) { - std::vector all_in(1, &in); + std::vector all_in(1, &in); prepare_serialization(all_in); } - template + template void - SolutionTransfer:: - prepare_serialization(const std::vector &all_in) + SolutionTransfer::prepare_serialization + (const std::vector &all_in) { prepare_for_coarsening_and_refinement (all_in); } - template + template void - SolutionTransfer:: - deserialize(VECTOR &in) + SolutionTransfer::deserialize (VectorType &in) { - std::vector all_in(1, &in); + std::vector all_in(1, &in); deserialize(all_in); } - template + template void - SolutionTransfer:: - deserialize(std::vector &all_in) + SolutionTransfer::deserialize (std::vector &all_in) { register_data_attach( get_data_size() * all_in.size() ); @@ -155,10 +151,9 @@ namespace parallel } - template + template void - SolutionTransfer:: - interpolate (std::vector &all_out) + SolutionTransfer::interpolate (std::vector &all_out) { Assert(input_vectors.size()==all_out.size(), ExcDimensionMismatch(input_vectors.size(), all_out.size()) ); @@ -171,7 +166,7 @@ namespace parallel Assert (tria != 0, ExcInternalError()); tria->notify_ready_to_unpack(offset, - std_cxx11::bind(&SolutionTransfer::unpack_callback, + std_cxx11::bind(&SolutionTransfer::unpack_callback, this, std_cxx11::_1, std_cxx11::_2, @@ -179,7 +174,7 @@ namespace parallel std_cxx11::ref(all_out))); - for (typename std::vector::iterator it=all_out.begin(); + for (typename std::vector::iterator it=all_out.begin(); it !=all_out.end(); ++it) (*it)->compress(::dealii::VectorOperation::insert); @@ -189,72 +184,70 @@ namespace parallel - template + template void - SolutionTransfer:: - interpolate (VECTOR &out) + SolutionTransfer::interpolate (VectorType &out) { - std::vector all_out(1, &out); + std::vector all_out(1, &out); interpolate(all_out); } - template + template unsigned int - SolutionTransfer:: - get_data_size() const + SolutionTransfer::get_data_size() const { return sizeof(double)* DoFTools::max_dofs_per_cell(*dof_handler); } - template + template void - SolutionTransfer:: + SolutionTransfer:: pack_callback(const typename Triangulation::cell_iterator &cell_, const typename Triangulation::CellStatus /*status*/, void *data) { - typename VECTOR::value_type *data_store = reinterpret_cast(data); + typename VectorType::value_type *data_store = reinterpret_cast(data); typename DH::cell_iterator cell(*cell_, dof_handler); const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell; - ::dealii::Vector dofvalues(dofs_per_cell); - for (typename std::vector::iterator it=input_vectors.begin(); + ::dealii::Vector dofvalues(dofs_per_cell); + for (typename std::vector::iterator it=input_vectors.begin(); it !=input_vectors.end(); ++it) { cell->get_interpolated_dof_values(*(*it), dofvalues); - Assert (typeid(typename VECTOR::value_type) == typeid(double), ExcNotImplemented()); - std::memcpy(data_store, &dofvalues(0), sizeof(typename VECTOR::value_type)*dofs_per_cell); + Assert (typeid(typename VectorType::value_type) == typeid(double), ExcNotImplemented()); + std::memcpy(data_store, &dofvalues(0), sizeof(typename VectorType::value_type)*dofs_per_cell); data_store += dofs_per_cell; } } - template + template void - SolutionTransfer:: - unpack_callback(const typename Triangulation::cell_iterator &cell_, - const typename Triangulation::CellStatus /*status*/, - const void *data, - std::vector &all_out) + SolutionTransfer::unpack_callback + (const typename Triangulation::cell_iterator &cell_, + const typename Triangulation::CellStatus /*status*/, + const void *data, + std::vector &all_out) { typename DH::cell_iterator cell(*cell_, dof_handler); const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell; - ::dealii::Vector dofvalues(dofs_per_cell); - const typename VECTOR::value_type *data_store = reinterpret_cast(data); + ::dealii::Vector dofvalues(dofs_per_cell); + const typename VectorType::value_type *data_store = reinterpret_cast(data); - for (typename std::vector::iterator it = all_out.begin(); + for (typename std::vector::iterator it = all_out.begin(); it != all_out.end(); ++it) { - Assert (typeid(typename VECTOR::value_type) == typeid(double), ExcNotImplemented()); - std::memcpy(&dofvalues(0), data_store, sizeof(typename VECTOR::value_type)*dofs_per_cell); + Assert (typeid(typename VectorType::value_type) == typeid(double), ExcNotImplemented()); + std::memcpy(&dofvalues(0), data_store, sizeof(typename VectorType::value_type)*dofs_per_cell); cell->set_dof_values_by_interpolation(dofvalues, *(*it)); data_store += dofs_per_cell; } diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index bc6157a737..2cc3e5da28 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -44,10 +44,10 @@ DEAL_II_NAMESPACE_OPEN -template -MappingFEField::InternalData:: -InternalData (const FiniteElement &fe, - const ComponentMask mask) +template +MappingFEField::InternalData::InternalData +(const FiniteElement &fe, + const ComponentMask mask) : n_shape_functions (fe.dofs_per_cell), mask (mask), @@ -57,10 +57,9 @@ InternalData (const FiniteElement &fe, -template +template std::size_t -MappingFEField::InternalData:: -memory_consumption () const +MappingFEField::InternalData::memory_consumption () const { Assert (false, ExcNotImplemented()); return 0; @@ -68,11 +67,11 @@ memory_consumption () const -template +template double & -MappingFEField::InternalData:: -shape (const unsigned int qpoint, - const unsigned int shape_nr) +MappingFEField::InternalData::shape +(const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -81,11 +80,11 @@ shape (const unsigned int qpoint, } -template +template const Tensor<1,dim> & -MappingFEField::InternalData:: -derivative (const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::derivative +(const unsigned int qpoint, + const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -95,11 +94,11 @@ derivative (const unsigned int qpoint, -template +template Tensor<1,dim> & -MappingFEField::InternalData:: -derivative (const unsigned int qpoint, - const unsigned int shape_nr) +MappingFEField::InternalData::derivative +(const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -108,11 +107,11 @@ derivative (const unsigned int qpoint, } -template +template const Tensor<2,dim> & -MappingFEField::InternalData:: -second_derivative (const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::second_derivative +(const unsigned int qpoint, + const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -122,11 +121,11 @@ second_derivative (const unsigned int qpoint, -template +template Tensor<2,dim> & -MappingFEField::InternalData:: -second_derivative (const unsigned int qpoint, - const unsigned int shape_nr) +MappingFEField::InternalData::second_derivative +(const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -135,11 +134,11 @@ second_derivative (const unsigned int qpoint, } -template +template const Tensor<3,dim> & -MappingFEField::InternalData:: -third_derivative (const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::third_derivative +(const unsigned int qpoint, + const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_third_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -149,11 +148,11 @@ third_derivative (const unsigned int qpoint, -template +template Tensor<3,dim> & -MappingFEField::InternalData:: -third_derivative (const unsigned int qpoint, - const unsigned int shape_nr) +MappingFEField::InternalData::third_derivative +(const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_third_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -162,11 +161,11 @@ third_derivative (const unsigned int qpoint, } -template +template const Tensor<4,dim> & -MappingFEField::InternalData:: -fourth_derivative (const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::fourth_derivative +(const unsigned int qpoint, + const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_fourth_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -176,11 +175,11 @@ fourth_derivative (const unsigned int qpoint, -template +template Tensor<4,dim> & -MappingFEField::InternalData:: -fourth_derivative (const unsigned int qpoint, - const unsigned int shape_nr) +MappingFEField::InternalData::fourth_derivative +(const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_fourth_derivatives.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -190,10 +189,11 @@ fourth_derivative (const unsigned int qpoint, -template -MappingFEField::MappingFEField (const DH &euler_dof_handler, - const VECTOR &euler_vector, - const ComponentMask mask) +template +MappingFEField::MappingFEField +(const DH &euler_dof_handler, + const VectorType &euler_vector, + const ComponentMask mask) : euler_vector(&euler_vector), fe(&euler_dof_handler.get_fe()), @@ -212,8 +212,9 @@ MappingFEField::MappingFEField (const DH &euler_dof } -template -MappingFEField::MappingFEField (const MappingFEField &mapping) +template +MappingFEField::MappingFEField +(const MappingFEField &mapping) : euler_vector(mapping.euler_vector), fe(mapping.fe), @@ -224,11 +225,12 @@ MappingFEField::MappingFEField (const MappingFEField +template inline const double & -MappingFEField::InternalData::shape (const unsigned int qpoint, - const unsigned int shape_nr) const +MappingFEField::InternalData::shape +(const unsigned int qpoint, + const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, @@ -238,19 +240,19 @@ MappingFEField::InternalData::shape (const unsigned int -template +template bool -MappingFEField::preserves_vertex_locations () const +MappingFEField::preserves_vertex_locations () const { return false; } -template +template void -MappingFEField:: -compute_shapes_virtual (const std::vector > &unit_points, +MappingFEField:: +compute_shapes_virtual (const std::vector > &unit_points, typename MappingFEField::InternalData &data) const { const unsigned int n_points=unit_points.size(); @@ -280,9 +282,9 @@ compute_shapes_virtual (const std::vector > &unit_points, } -template +template UpdateFlags -MappingFEField::requires_update_flags (const UpdateFlags in) const +MappingFEField::requires_update_flags (const UpdateFlags in) const { // add flags if the respective quantities are necessary to compute // what we need. note that some flags appear in both conditions and @@ -339,12 +341,13 @@ MappingFEField::requires_update_flags (const UpdateFlags -template +template void -MappingFEField::compute_data (const UpdateFlags update_flags, - const Quadrature &q, - const unsigned int n_original_q_points, - InternalData &data) const +MappingFEField::compute_data +(const UpdateFlags update_flags, + const Quadrature &q, + const unsigned int n_original_q_points, + InternalData &data) const { // store the flags in the internal data object so we can access them // in fill_fe_*_values(). use the transitive hull of the required @@ -390,12 +393,13 @@ MappingFEField::compute_data (const UpdateFlags upd } -template +template void -MappingFEField::compute_face_data (const UpdateFlags update_flags, - const Quadrature &q, - const unsigned int n_original_q_points, - InternalData &data) const +MappingFEField::compute_face_data +(const UpdateFlags update_flags, + const Quadrature &q, + const unsigned int n_original_q_points, + InternalData &data) const { compute_data (update_flags, q, n_original_q_points, data); @@ -457,11 +461,11 @@ MappingFEField::compute_face_data (const UpdateFlags upd } -template +template typename -MappingFEField::InternalData * -MappingFEField::get_data (const UpdateFlags update_flags, - const Quadrature &quadrature) const +MappingFEField::InternalData * +MappingFEField::get_data (const UpdateFlags update_flags, + const Quadrature &quadrature) const { InternalData *data = new InternalData(*fe, fe_mask); this->compute_data (update_flags, quadrature, @@ -471,10 +475,11 @@ MappingFEField::get_data (const UpdateFlags update_flags -template +template typename Mapping::InternalDataBase * -MappingFEField::get_face_data (const UpdateFlags update_flags, - const Quadrature& quadrature) const +MappingFEField::get_face_data +(const UpdateFlags update_flags, + const Quadrature &quadrature) const { InternalData *data = new InternalData(*fe, fe_mask); const Quadrature q (QProjector::project_to_all_faces(quadrature)); @@ -485,10 +490,11 @@ MappingFEField::get_face_data (const UpdateFlags update_ } -template +template typename Mapping::InternalDataBase * -MappingFEField::get_subface_data (const UpdateFlags update_flags, - const Quadrature& quadrature) const +MappingFEField::get_subface_data +(const UpdateFlags update_flags, + const Quadrature &quadrature) const { InternalData *data = new InternalData(*fe, fe_mask); const Quadrature q (QProjector::project_to_all_subfaces(quadrature)); @@ -1267,9 +1273,9 @@ namespace internal // Note that the CellSimilarity flag is modifiable, since MappingFEField can need to // recalculate data even when cells are similar. -template +template CellSimilarity::Similarity -MappingFEField:: +MappingFEField:: fill_fe_values (const typename Triangulation::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature &quadrature, @@ -1439,9 +1445,9 @@ fill_fe_values (const typename Triangulation::cell_iterator &cell, -template +template void -MappingFEField:: +MappingFEField:: fill_fe_face_values (const typename Triangulation::cell_iterator &cell, const unsigned int face_no, const Quadrature &quadrature, @@ -1471,9 +1477,9 @@ fill_fe_face_values (const typename Triangulation::cell_iterator & } -template +template void -MappingFEField:: +MappingFEField:: fill_fe_subface_values (const typename Triangulation::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, @@ -1507,7 +1513,7 @@ fill_fe_subface_values (const typename Triangulation::cell_iterato namespace { - template + template void transform_fields(const VectorSlice > > input, const MappingType mapping_type, @@ -1515,10 +1521,10 @@ namespace VectorSlice > > output) { AssertDimension (input.size(), output.size()); - Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), + Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), ExcInternalError()); - const typename MappingFEField::InternalData - &data = static_cast::InternalData &>(mapping_data); + const typename MappingFEField::InternalData + &data = static_cast::InternalData &>(mapping_data); switch (mapping_type) { @@ -1569,19 +1575,19 @@ namespace } - template + template void - transform_differential_forms(const VectorSlice > > input, - const MappingType mapping_type, - const typename Mapping::InternalDataBase &mapping_data, - VectorSlice > > output) + transform_differential_forms(const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) { AssertDimension (input.size(), output.size()); - Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), + Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), ExcInternalError()); - const typename MappingFEField::InternalData - &data = static_cast::InternalData &>(mapping_data); + const typename MappingFEField::InternalData + &data = static_cast::InternalData &>(mapping_data); switch (mapping_type) { @@ -1604,9 +1610,9 @@ namespace -template +template void -MappingFEField:: +MappingFEField:: transform (const VectorSlice > > input, const MappingType mapping_type, const typename Mapping::InternalDataBase &mapping_data, @@ -1614,14 +1620,14 @@ transform (const VectorSlice > > input, { AssertDimension (input.size(), output.size()); - transform_fields(input, mapping_type, mapping_data, output); + transform_fields(input, mapping_type, mapping_data, output); } -template +template void -MappingFEField:: +MappingFEField:: transform (const VectorSlice > > input, const MappingType mapping_type, const typename Mapping::InternalDataBase &mapping_data, @@ -1629,14 +1635,14 @@ transform (const VectorSlice { AssertDimension (input.size(), output.size()); - transform_differential_forms(input, mapping_type, mapping_data, output); + transform_differential_forms(input, mapping_type, mapping_data, output); } -template +template void -MappingFEField:: +MappingFEField:: transform (const VectorSlice > > input, const MappingType, const typename Mapping::InternalDataBase &mapping_data, @@ -1652,9 +1658,9 @@ transform (const VectorSlice > > input, -template +template void -MappingFEField:: +MappingFEField:: transform (const VectorSlice > > input, const MappingType mapping_type, const typename Mapping::InternalDataBase &mapping_data, @@ -1702,9 +1708,9 @@ transform (const VectorSlice -template +template void -MappingFEField:: +MappingFEField:: transform (const VectorSlice > > input, const MappingType /*mapping_type*/, const typename Mapping::InternalDataBase &mapping_data, @@ -1722,11 +1728,11 @@ transform (const VectorSlice > > input, -template +template Point -MappingFEField:: +MappingFEField:: transform_unit_to_real_cell (const typename Triangulation::cell_iterator &cell, - const Point &p) const + const Point &p) const { // Use the get_data function to create an InternalData with data vectors of // the right size and transformation shape values already computed at point @@ -1741,9 +1747,9 @@ transform_unit_to_real_cell (const typename Triangulation::cell_it } -template +template Point -MappingFEField:: +MappingFEField:: do_transform_unit_to_real_cell (const InternalData &data) const { Point p_real; @@ -1760,11 +1766,11 @@ do_transform_unit_to_real_cell (const InternalData &data) const -template +template Point -MappingFEField:: +MappingFEField:: transform_real_to_unit_cell (const typename Triangulation::cell_iterator &cell, - const Point &p) const + const Point &p) const { // first a Newton iteration based on the real mapping. It uses the center // point of the cell as a starting point @@ -1803,14 +1809,14 @@ transform_real_to_unit_cell (const typename Triangulation::cell_it } -template +template Point -MappingFEField:: +MappingFEField:: do_transform_real_to_unit_cell (const typename Triangulation::cell_iterator &cell, - const Point &p, - const Point &initial_p_unit, - InternalData &mdata) const + const Point &p, + const Point &initial_p_unit, + InternalData &mdata) const { const unsigned int n_shapes=mdata.shape_values.size(); (void)n_shapes; @@ -1911,35 +1917,35 @@ failure: } -template +template unsigned int -MappingFEField::get_degree() const +MappingFEField::get_degree() const { return fe->degree; } -template +template ComponentMask -MappingFEField::get_component_mask() const +MappingFEField::get_component_mask() const { return this->fe_mask; } -template +template Mapping * -MappingFEField::clone () const +MappingFEField::clone () const { - return new MappingFEField(*this); + return new MappingFEField(*this); } -template +template void -MappingFEField::update_internal_dofs ( - const typename Triangulation::cell_iterator &cell, - const typename MappingFEField::InternalData &data) const +MappingFEField::update_internal_dofs +(const typename Triangulation::cell_iterator &cell, + const typename MappingFEField::InternalData &data) const { Assert(euler_dof_handler != 0, ExcMessage("euler_dof_handler is empty")); diff --git a/source/multigrid/mg_base.cc b/source/multigrid/mg_base.cc index a591e28f76..6c94eb0448 100644 --- a/source/multigrid/mg_base.cc +++ b/source/multigrid/mg_base.cc @@ -27,23 +27,23 @@ DEAL_II_NAMESPACE_OPEN -template -MGTransferBase::~MGTransferBase() +template +MGTransferBase::~MGTransferBase() {} -template -MGMatrixBase::~MGMatrixBase() +template +MGMatrixBase::~MGMatrixBase() {} -template -MGSmootherBase::~MGSmootherBase() +template +MGSmootherBase::~MGSmootherBase() {} -template -MGCoarseGridBase::~MGCoarseGridBase() +template +MGCoarseGridBase::~MGCoarseGridBase() {} diff --git a/source/multigrid/mg_transfer_prebuilt.cc b/source/multigrid/mg_transfer_prebuilt.cc index 823ab0cb8c..9b89e0166c 100644 --- a/source/multigrid/mg_transfer_prebuilt.cc +++ b/source/multigrid/mg_transfer_prebuilt.cc @@ -42,35 +42,35 @@ DEAL_II_NAMESPACE_OPEN -template -MGTransferPrebuilt::MGTransferPrebuilt () +template +MGTransferPrebuilt::MGTransferPrebuilt () {} -template -MGTransferPrebuilt::MGTransferPrebuilt (const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c) +template +MGTransferPrebuilt::MGTransferPrebuilt (const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c) : constraints(&c), mg_constrained_dofs(&mg_c) {} -template -MGTransferPrebuilt::~MGTransferPrebuilt () +template +MGTransferPrebuilt::~MGTransferPrebuilt () {} -template -void MGTransferPrebuilt::initialize_constraints ( - const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c) +template +void MGTransferPrebuilt::initialize_constraints +(const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c) { constraints = &c; mg_constrained_dofs = &mg_c; } -template -void MGTransferPrebuilt::clear () +template +void MGTransferPrebuilt::clear () { sizes.resize(0); prolongation_matrices.resize(0); @@ -85,11 +85,10 @@ void MGTransferPrebuilt::clear () } -template -void MGTransferPrebuilt::prolongate ( - const unsigned int to_level, - VECTOR &dst, - const VECTOR &src) const +template +void MGTransferPrebuilt::prolongate (const unsigned int to_level, + VectorType &dst, + const VectorType &src) const { Assert ((to_level >= 1) && (to_level<=prolongation_matrices.size()), ExcIndexRange (to_level, 1, prolongation_matrices.size()+1)); @@ -98,11 +97,10 @@ void MGTransferPrebuilt::prolongate ( } -template -void MGTransferPrebuilt::restrict_and_add ( - const unsigned int from_level, - VECTOR &dst, - const VECTOR &src) const +template +void MGTransferPrebuilt::restrict_and_add (const unsigned int from_level, + VectorType &dst, + const VectorType &src) const { Assert ((from_level >= 1) && (from_level<=prolongation_matrices.size()), ExcIndexRange (from_level, 1, prolongation_matrices.size()+1)); @@ -112,10 +110,10 @@ void MGTransferPrebuilt::restrict_and_add ( } -template +template template -void MGTransferPrebuilt::build_matrices ( - const DoFHandler &mg_dof) +void MGTransferPrebuilt::build_matrices +(const DoFHandler &mg_dof) { const unsigned int n_levels = mg_dof.get_tria().n_global_levels(); const unsigned int dofs_per_cell = mg_dof.get_fe().dofs_per_cell; @@ -140,9 +138,9 @@ void MGTransferPrebuilt::build_matrices ( for (unsigned int i=0; i::Sparsity> (new typename internal::MatrixSelector::Sparsity)); + (std_cxx11::shared_ptr::Sparsity> (new typename internal::MatrixSelector::Sparsity)); prolongation_matrices.push_back - (std_cxx11::shared_ptr::Matrix> (new typename internal::MatrixSelector::Matrix)); + (std_cxx11::shared_ptr::Matrix> (new typename internal::MatrixSelector::Matrix)); } // two fields which will store the @@ -209,11 +207,11 @@ void MGTransferPrebuilt::build_matrices ( } } - internal::MatrixSelector::reinit(*prolongation_matrices[level], - *prolongation_sparsities[level], - level, - dsp, - mg_dof); + internal::MatrixSelector::reinit(*prolongation_matrices[level], + *prolongation_sparsities[level], + level, + dsp, + mg_dof); dsp.reinit(0,0); FullMatrix prolongation; @@ -284,11 +282,11 @@ namespace }; } -template +template template void -MGTransferPrebuilt::fill_and_communicate_copy_indices( - const DoFHandler &mg_dof) +MGTransferPrebuilt::fill_and_communicate_copy_indices +(const DoFHandler &mg_dof) { // Now we are filling the variables copy_indices*, which are essentially // maps from global to mgdof for each level stored as a std::vector of @@ -473,9 +471,9 @@ MGTransferPrebuilt::fill_and_communicate_copy_indices( std::sort(copy_indices_global_mine[level].begin(), copy_indices_global_mine[level].end(), compare); } -template +template void -MGTransferPrebuilt::print_matrices (std::ostream &os) const +MGTransferPrebuilt::print_matrices (std::ostream &os) const { for (unsigned int level = 0; level::print_matrices (std::ostream &os) const } } -template +template void -MGTransferPrebuilt::print_indices (std::ostream &os) const +MGTransferPrebuilt::print_indices (std::ostream &os) const { for (unsigned int level = 0; level + template DataEntry:: DataEntry (const DH *dofs, const VectorType *data, @@ -497,7 +497,7 @@ namespace internal - template + template DataEntry:: DataEntry (const DH *dofs, const VectorType *data, @@ -510,10 +510,10 @@ namespace internal namespace { - template + template double - get_vector_element (const VectorType &vector, - const unsigned int cell_number) + get_vector_element (const VectorType &vector, + const unsigned int cell_number) { return vector[cell_number]; } @@ -529,7 +529,7 @@ namespace internal - template + template double DataEntry:: get_cell_data_value (const unsigned int cell_number) const @@ -539,11 +539,11 @@ namespace internal - template + template void - DataEntry:: - get_function_values (const FEValuesBase &fe_patch_values, - std::vector > &patch_values_system) const + DataEntry::get_function_values + (const FEValuesBase &fe_patch_values, + std::vector > &patch_values_system) const { // FIXME: FEValuesBase gives us data in types that match that of // the solution vector. but this function needs to pass it back @@ -584,9 +584,9 @@ namespace internal template void - DataEntry:: - get_function_values (const FEValuesBase &fe_patch_values, - std::vector &patch_values) const + DataEntry::get_function_values + (const FEValuesBase &fe_patch_values, + std::vector &patch_values) const { // FIXME: FEValuesBase gives us data in types that match that of // the solution vector. but this function needs to pass it back @@ -623,11 +623,11 @@ namespace internal - template + template void - DataEntry:: - get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > > &patch_gradients_system) const + DataEntry::get_function_gradients + (const FEValuesBase &fe_patch_values, + std::vector > > &patch_gradients_system) const { // FIXME: FEValuesBase gives us data in types that match that of // the solution vector. but this function needs to pass it back @@ -669,9 +669,9 @@ namespace internal template void - DataEntry:: - get_function_gradients (const FEValuesBase &fe_patch_values, - std::vector > &patch_gradients) const + DataEntry::get_function_gradients + (const FEValuesBase &fe_patch_values, + std::vector > &patch_gradients) const { // FIXME: FEValuesBase gives us data in types that match that of // the solution vector. but this function needs to pass it back @@ -709,11 +709,11 @@ namespace internal - template + template void - DataEntry:: - get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > > &patch_hessians_system) const + DataEntry::get_function_hessians + (const FEValuesBase &fe_patch_values, + std::vector > > &patch_hessians_system) const { // FIXME: FEValuesBase gives us data in types that match that of // the solution vector. but this function needs to pass it back @@ -755,9 +755,9 @@ namespace internal template void - DataEntry:: - get_function_hessians (const FEValuesBase &fe_patch_values, - std::vector > &patch_hessians) const + DataEntry::get_function_hessians + (const FEValuesBase &fe_patch_values, + std::vector > &patch_hessians) const { // FIXME: FEValuesBase gives us data in types that match that of // the solution vector. but this function needs to pass it back @@ -804,7 +804,7 @@ namespace internal - template + template void DataEntry::clear () { @@ -868,10 +868,10 @@ attach_triangulation (const Triangulation &tr template -template +template void DataOut_DoFData:: -add_data_vector (const VECTOR &vec, +add_data_vector (const VectorType &vec, const std::string &name, const DataVectorType type, const std::vector &data_component_interpretation) @@ -907,10 +907,10 @@ add_data_vector (const VECTOR &vec, template -template +template void DataOut_DoFData:: -add_data_vector (const VECTOR &vec, +add_data_vector (const VectorType &vec, const std::vector &names, const DataVectorType type, const std::vector &data_component_interpretation_) @@ -971,8 +971,8 @@ add_data_vector (const VECTOR &vec, } internal::DataOut::DataEntryBase *new_entry - = new internal::DataOut::DataEntry(dofs, &vec, names, - data_component_interpretation); + = new internal::DataOut::DataEntry(dofs, &vec, names, + data_component_interpretation); if (actual_type == type_dof_data) dof_data.push_back (std_cxx11::shared_ptr >(new_entry)); else @@ -983,10 +983,10 @@ add_data_vector (const VECTOR &vec, template -template +template void DataOut_DoFData:: -add_data_vector (const VECTOR &vec, +add_data_vector (const VectorType &vec, const DataPostprocessor &data_postprocessor) { // this is a specialized version of the other function where we have a @@ -1003,7 +1003,7 @@ add_data_vector (const VECTOR &vec, dofs->get_tria().n_active_cells())); internal::DataOut::DataEntryBase *new_entry - = new internal::DataOut::DataEntry(dofs, &vec, &data_postprocessor); + = new internal::DataOut::DataEntry(dofs, &vec, &data_postprocessor); dof_data.push_back (std_cxx11::shared_ptr >(new_entry)); } @@ -1011,11 +1011,11 @@ add_data_vector (const VECTOR &vec, template -template +template void DataOut_DoFData:: add_data_vector (const DH &dof_handler, - const VECTOR &vec, + const VectorType &vec, const DataPostprocessor &data_postprocessor) { // this is a specialized version of the other function where we have a @@ -1026,7 +1026,7 @@ add_data_vector (const DH &dof_handler, AssertDimension (vec.size(), dof_handler.n_dofs()); internal::DataOut::DataEntryBase *new_entry - = new internal::DataOut::DataEntry(&dof_handler, &vec, &data_postprocessor); + = new internal::DataOut::DataEntry(&dof_handler, &vec, &data_postprocessor); dof_data.push_back (std_cxx11::shared_ptr >(new_entry)); } @@ -1034,11 +1034,11 @@ add_data_vector (const DH &dof_handler, template -template +template void DataOut_DoFData:: add_data_vector (const DH &dof_handler, - const VECTOR &data, + const VectorType &data, const std::string &name, const std::vector &data_component_interpretation) { @@ -1067,11 +1067,11 @@ add_data_vector (const DH &dof_handler, template -template +template void DataOut_DoFData:: add_data_vector (const DH &dof_handler, - const VECTOR &data, + const VectorType &data, const std::vector &names, const std::vector &data_component_interpretation_) { @@ -1098,8 +1098,8 @@ add_data_vector (const DH &dof_handler, (names.size(), DataComponentInterpretation::component_is_scalar)); internal::DataOut::DataEntryBase *new_entry - = new internal::DataOut::DataEntry(&dof_handler, &data, names, - data_component_interpretation); + = new internal::DataOut::DataEntry(&dof_handler, &data, names, + data_component_interpretation); dof_data.push_back (std_cxx11::shared_ptr >(new_entry)); } diff --git a/source/numerics/point_value_history.cc b/source/numerics/point_value_history.cc index 018ca17ce9..4ece1fcb96 100644 --- a/source/numerics/point_value_history.cc +++ b/source/numerics/point_value_history.cc @@ -562,9 +562,9 @@ void PointValueHistory template -template +template void PointValueHistory -::evaluate_field (const std::string &vector_name, const VECTOR &solution) +::evaluate_field (const std::string &vector_name, const VectorType &solution) { // must be closed to add data to internal // members. @@ -615,9 +615,12 @@ void PointValueHistory template -template +template void PointValueHistory -::evaluate_field(const std::vector &vector_names, const VECTOR &solution, const DataPostprocessor< dim> &data_postprocessor, const Quadrature &quadrature) +::evaluate_field (const std::vector &vector_names, + const VectorType &solution, + const DataPostprocessor< dim> &data_postprocessor, + const Quadrature &quadrature) { // must be closed to add data to internal // members. @@ -658,9 +661,9 @@ void PointValueHistory { // Extract data for the // PostProcessor object - std::vector< typename VECTOR::value_type > uh (n_quadrature_points, 0.0); - std::vector< Tensor< 1, dim, typename VECTOR::value_type > > duh (n_quadrature_points, Tensor <1, dim, typename VECTOR::value_type> ()); - std::vector< Tensor< 2, dim, typename VECTOR::value_type > > dduh (n_quadrature_points, Tensor <2, dim, typename VECTOR::value_type> ()); + std::vector< typename VectorType::value_type > uh (n_quadrature_points, 0.0); + std::vector< Tensor< 1, dim, typename VectorType::value_type > > duh (n_quadrature_points, Tensor <1, dim, typename VectorType::value_type> ()); + std::vector< Tensor< 2, dim, typename VectorType::value_type > > dduh (n_quadrature_points, Tensor <2, dim, typename VectorType::value_type> ()); std::vector > dummy_normals (1, Point ()); std::vector > evaluation_points; // at each point there is @@ -691,7 +694,7 @@ void PointValueHistory // Call compute_derived_quantities_vector // or compute_derived_quantities_scalar - // TODO this function should also operate with typename VECTOR::value_type + // TODO this function should also operate with typename VectorType::value_type data_postprocessor. compute_derived_quantities_scalar(std::vector< double > (1, uh[selected_point]), std::vector< Tensor< 1, dim > > (1, Tensor< 1, dim >(duh[selected_point]) ), @@ -704,9 +707,9 @@ void PointValueHistory else // The case of a vector FE { // Extract data for the PostProcessor object - std::vector< Vector< typename VECTOR::value_type > > uh (n_quadrature_points, Vector (n_components)); - std::vector< std::vector< Tensor< 1, dim, typename VECTOR::value_type > > > duh (n_quadrature_points, std::vector< Tensor< 1, dim, typename VECTOR::value_type > > (n_components, Tensor< 1, dim, typename VECTOR::value_type >())); - std::vector< std::vector< Tensor< 2, dim, typename VECTOR::value_type > > > dduh (n_quadrature_points, std::vector< Tensor< 2, dim, typename VECTOR::value_type > > (n_components, Tensor< 2, dim, typename VECTOR::value_type >())); + std::vector< Vector< typename VectorType::value_type > > uh (n_quadrature_points, Vector (n_components)); + std::vector< std::vector< Tensor< 1, dim, typename VectorType::value_type > > > duh (n_quadrature_points, std::vector< Tensor< 1, dim, typename VectorType::value_type > > (n_components, Tensor< 1, dim, typename VectorType::value_type >())); + std::vector< std::vector< Tensor< 2, dim, typename VectorType::value_type > > > dduh (n_quadrature_points, std::vector< Tensor< 2, dim, typename VectorType::value_type > > (n_components, Tensor< 2, dim, typename VectorType::value_type >())); std::vector > dummy_normals (1, Point ()); std::vector > evaluation_points; // at each point there is @@ -739,9 +742,9 @@ void PointValueHistory // FIXME: We need tmp vectors below because the data // postprocessors are not equipped to deal with anything but // doubles (scalars and tensors). - const Vector< typename VECTOR::value_type > &uh_s = uh[selected_point]; - const std::vector< Tensor< 1, dim, typename VECTOR::value_type > > &duh_s = duh[selected_point]; - const std::vector< Tensor< 2, dim, typename VECTOR::value_type > > &dduh_s = dduh[selected_point]; + const Vector< typename VectorType::value_type > &uh_s = uh[selected_point]; + const std::vector< Tensor< 1, dim, typename VectorType::value_type > > &duh_s = duh[selected_point]; + const std::vector< Tensor< 2, dim, typename VectorType::value_type > > &dduh_s = dduh[selected_point]; std::vector< Tensor< 1, dim > > tmp_d (duh_s.size()); for (unsigned int i = 0; i < duh_s.size(); i++) tmp_d[i] = duh_s[i]; @@ -794,9 +797,12 @@ void PointValueHistory template -template +template void PointValueHistory -::evaluate_field(const std::string &vector_name, const VECTOR &solution, const DataPostprocessor &data_postprocessor, const Quadrature &quadrature) +::evaluate_field (const std::string &vector_name, + const VectorType &solution, + const DataPostprocessor &data_postprocessor, + const Quadrature &quadrature) { std::vector vector_names; vector_names.push_back (vector_name); @@ -806,9 +812,10 @@ void PointValueHistory template -template +template void PointValueHistory -::evaluate_field_at_requested_location(const std::string &vector_name, const VECTOR &solution) +::evaluate_field_at_requested_location (const std::string &vector_name, + const VectorType &solution) { // must be closed to add data to internal // members. @@ -1349,4 +1356,3 @@ void PointValueHistory DEAL_II_NAMESPACE_CLOSE - diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 4bdc71814e..425ff48948 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -34,8 +34,8 @@ DEAL_II_NAMESPACE_OPEN -template -SolutionTransfer::SolutionTransfer(const DH &dof) +template +SolutionTransfer::SolutionTransfer(const DH &dof) : dof_handler(&dof, typeid(*this).name()), n_dofs_old(0), @@ -44,16 +44,16 @@ SolutionTransfer::SolutionTransfer(const DH &dof) -template -SolutionTransfer::~SolutionTransfer() +template +SolutionTransfer::~SolutionTransfer() { clear (); } -template -void SolutionTransfer::clear () +template +void SolutionTransfer::clear () { indices_on_cell.clear(); dof_values_on_cell.clear(); @@ -64,8 +64,8 @@ void SolutionTransfer::clear () -template -void SolutionTransfer::prepare_for_pure_refinement() +template +void SolutionTransfer::prepare_for_pure_refinement() { Assert(prepared_for!=pure_refinement, ExcAlreadyPrepForRef()); Assert(prepared_for!=coarsening_and_refinement, @@ -101,10 +101,10 @@ void SolutionTransfer::prepare_for_pure_refinement() -template +template void -SolutionTransfer::refine_interpolate(const VECTOR &in, - VECTOR &out) const +SolutionTransfer::refine_interpolate (const VectorType &in, + VectorType &out) const { Assert(prepared_for==pure_refinement, ExcNotPrepared()); Assert(in.size()==n_dofs_old, ExcDimensionMismatch(in.size(),n_dofs_old)); @@ -114,7 +114,7 @@ SolutionTransfer::refine_interpolate(const VECTOR &in, ExcMessage ("Vectors cannot be used as input and output" " at the same time!")); - Vector local_values(0); + Vector local_values(0); typename DH::cell_iterator cell = dof_handler->begin(), endc = dof_handler->end(); @@ -226,10 +226,10 @@ namespace internal -template +template void -SolutionTransfer:: -prepare_for_coarsening_and_refinement(const std::vector &all_in) +SolutionTransfer:: +prepare_for_coarsening_and_refinement(const std::vector &all_in) { Assert (prepared_for!=pure_refinement, ExcAlreadyPrepForRef()); Assert (prepared_for!=coarsening_and_refinement, @@ -281,9 +281,9 @@ prepare_for_coarsening_and_refinement(const std::vector &all_in) std::vector >(n_cells_to_stay_or_refine) .swap(indices_on_cell); - std::vector > > + std::vector > > (n_coarsen_fathers, - std::vector > (in_size)) + std::vector > (in_size)) .swap(dof_values_on_cell); Table<2,FullMatrix > interpolation_hp; @@ -353,8 +353,8 @@ prepare_for_coarsening_and_refinement(const std::vector &all_in) const unsigned int dofs_per_cell=cell->get_dof_handler().get_fe()[target_fe_index].dofs_per_cell; - std::vector >(in_size, - Vector(dofs_per_cell)) + std::vector >(in_size, + Vector(dofs_per_cell)) .swap(dof_values_on_cell[n_cf]); @@ -379,20 +379,20 @@ prepare_for_coarsening_and_refinement(const std::vector &all_in) -template +template void -SolutionTransfer::prepare_for_coarsening_and_refinement(const VECTOR &in) +SolutionTransfer::prepare_for_coarsening_and_refinement (const VectorType &in) { - std::vector all_in=std::vector(1, in); + std::vector all_in=std::vector(1, in); prepare_for_coarsening_and_refinement(all_in); } -template -void SolutionTransfer:: -interpolate (const std::vector &all_in, - std::vector &all_out) const +template +void SolutionTransfer:: +interpolate (const std::vector &all_in, + std::vector &all_out) const { Assert(prepared_for==coarsening_and_refinement, ExcNotPrepared()); const unsigned int size=all_in.size(); @@ -409,7 +409,7 @@ interpolate (const std::vector &all_in, ExcMessage ("Vectors cannot be used as input and output" " at the same time!")); - Vector local_values; + Vector local_values; std::vector dofs; typename std::map, Pointerstruct>::const_iterator @@ -418,7 +418,7 @@ interpolate (const std::vector &all_in, Table<2,FullMatrix > interpolation_hp; internal::extract_interpolation_matrices (*dof_handler, interpolation_hp); - Vector tmp, tmp2; + Vector tmp, tmp2; typename DH::cell_iterator cell = dof_handler->begin(), endc = dof_handler->end(); @@ -431,7 +431,7 @@ interpolate (const std::vector &all_in, const std::vector *const indexptr =pointerstruct->second.indices_ptr; - const std::vector > *const valuesptr + const std::vector > *const valuesptr =pointerstruct->second.dof_values_ptr; // cell stayed as it was or was refined @@ -488,7 +488,7 @@ interpolate (const std::vector &all_in, // test we would have to // store the fe_index of all // cells - const Vector *data = 0; + const Vector *data = 0; const unsigned int active_fe_index = cell->active_fe_index(); if (active_fe_index != pointerstruct->second.active_fe_index) { @@ -518,18 +518,18 @@ interpolate (const std::vector &all_in, -template -void SolutionTransfer::interpolate(const VECTOR &in, - VECTOR &out) const +template +void SolutionTransfer::interpolate (const VectorType &in, + VectorType &out) const { Assert (in.size()==n_dofs_old, ExcDimensionMismatch(in.size(), n_dofs_old)); Assert (out.size()==dof_handler->n_dofs(), ExcDimensionMismatch(out.size(), dof_handler->n_dofs())); - std::vector all_in(1); + std::vector all_in(1); all_in[0] = in; - std::vector all_out(1); + std::vector all_out(1); all_out[0] = out; interpolate(all_in, all_out); @@ -538,9 +538,9 @@ void SolutionTransfer::interpolate(const VECTOR &in, -template +template std::size_t -SolutionTransfer::memory_consumption () const +SolutionTransfer::memory_consumption () const { // at the moment we do not include the memory // consumption of the cell_map as we have no @@ -555,9 +555,9 @@ SolutionTransfer::memory_consumption () const -template +template std::size_t -SolutionTransfer::Pointerstruct::memory_consumption () const +SolutionTransfer::Pointerstruct::memory_consumption () const { return sizeof(*this); } diff --git a/tests/multigrid/cycles.cc b/tests/multigrid/cycles.cc index eb2026e42f..8333afacc7 100644 --- a/tests/multigrid/cycles.cc +++ b/tests/multigrid/cycles.cc @@ -73,7 +73,7 @@ void test_cycles(unsigned int minlevel, unsigned int maxlevel) mg::Matrix mgmatrix(level_matrices); Multigrid mg1(minlevel, maxlevel, mgmatrix, all, all, all, all, - Multigrid::v_cycle); + Multigrid::v_cycle); mg1.set_debug(3); for (unsigned int i=minlevel; i<=maxlevel; ++i) mg1.defect[i].reinit(N); diff --git a/tests/petsc/solver_12.cc b/tests/petsc/solver_12.cc index d85c7c8ade..9a248ce3d6 100644 --- a/tests/petsc/solver_12.cc +++ b/tests/petsc/solver_12.cc @@ -34,11 +34,11 @@ template void check_solve(SOLVER &solver, - const SolverControl &solver_control, - const MATRIX &A, - VectorType &u, - VectorType &f, - const PRECONDITION &P) + const SolverControl &solver_control, + const MATRIX &A, + VectorType &u, + VectorType &f, + const PRECONDITION &P) { deallog << "Solver type: " << typeid(solver).name() << std::endl;