DEAL_II_NAMESPACE_CLOSE
-char const *pydealii_docstring =
+const char *pydealii_docstring =
" \n"
"PyDealII \n"
"======== \n"
}
public:
- static bool const value = test<From, To>(0);
+ static const bool value = test<From, To>(0);
};
/*
template <typename T>
struct is_list_compatible
{
- static constexpr bool const value =
+ static constexpr const bool value =
internal::is_list_compatible<std::decay_t<T>>::value;
};
template <typename T>
struct is_map_compatible
{
- static constexpr bool const value =
+ static constexpr const bool value =
internal::is_map_compatible<std::decay_t<T>>::value;
};
this->n_stages = 2;
this->b.reserve(this->n_stages);
this->c.reserve(this->n_stages);
- double const gamma = 1.0 - 1.0 / std::sqrt(2.0);
+ const double gamma = 1.0 - 1.0 / std::sqrt(2.0);
this->b.push_back(1.0 - gamma);
this->b.push_back(gamma);
this->a.push_back(std::vector<double>(1, gamma));
* a dealii::BoundingBox.
*/
static inline double
- get(dealii::BoundingBox<dim, Number> const &box)
+ get(const dealii::BoundingBox<dim, Number> &box)
{
return box.get_boundary_points().first[D];
}
* a dealii::BoundingBox.
*/
static inline double
- get(dealii::BoundingBox<dim, Number> const &box)
+ get(const dealii::BoundingBox<dim, Number> &box)
{
return box.get_boundary_points().second[D];
}
struct access<dealii::Point<dim, Number>, D>
{
static inline double
- get(dealii::Point<dim, Number> const &p)
+ get(const dealii::Point<dim, Number> &p)
{
return p[D];
}
const MatrixCreator::internal::AssemblerBoundary::Scratch &,
MatrixCreator::internal::AssemblerBoundary::
CopyData<dim, spacedim, number> & copy_data,
- Mapping<dim, spacedim> const & mapping,
- FiniteElement<dim, spacedim> const &fe,
- Quadrature<dim - 1> const & q,
- std::map<types::boundary_id, const Function<spacedim, number> *> const
+ const Mapping<dim, spacedim> & mapping,
+ const FiniteElement<dim, spacedim> &fe,
+ const Quadrature<dim - 1> & q,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_functions,
- Function<spacedim, number> const *const coefficient,
- std::vector<unsigned int> const & component_mapping)
-
+ const Function<spacedim, number> *const coefficient,
+ const std::vector<unsigned int> & component_mapping)
{
// Most assertions for this function are in the calling function
// before creating threads.
template <int dim, int spacedim, typename number>
void
copy_boundary_mass_matrix_1(
- MatrixCreator::internal::AssemblerBoundary::
- CopyData<dim, spacedim, number> const ©_data,
- std::map<types::boundary_id, const Function<spacedim, number> *> const
+ const MatrixCreator::internal::AssemblerBoundary::
+ CopyData<dim, spacedim, number> ©_data,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_functions,
- std::vector<types::global_dof_index> const &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparseMatrix<number> & matrix,
Vector<number> & rhs_vector)
{
const MatrixCreator::internal::AssemblerBoundary::Scratch &,
MatrixCreator::internal::AssemblerBoundary::CopyData<1, 3, float>
& /*copy_data*/,
- Mapping<1, 3> const &,
- FiniteElement<1, 3> const &,
- Quadrature<0> const &,
- std::map<types::boundary_id, const Function<3, float> *> const
+ const Mapping<1, 3> &,
+ const FiniteElement<1, 3> &,
+ const Quadrature<0> &,
+ const std::map<types::boundary_id, const Function<3, float> *>
& /*boundary_functions*/,
- Function<3, float> const *const /*coefficient*/,
- std::vector<unsigned int> const & /*component_mapping*/)
+ const Function<3, float> *const /*coefficient*/,
+ const std::vector<unsigned int> & /*component_mapping*/)
{
Assert(false, ExcNotImplemented());
}
const MatrixCreator::internal::AssemblerBoundary::Scratch &,
MatrixCreator::internal::AssemblerBoundary::CopyData<1, 3, double>
& /*copy_data*/,
- Mapping<1, 3> const &,
- FiniteElement<1, 3> const &,
- Quadrature<0> const &,
- std::map<types::boundary_id, const Function<3, double> *> const
+ const Mapping<1, 3> &,
+ const FiniteElement<1, 3> &,
+ const Quadrature<0> &,
+ const std::map<types::boundary_id, const Function<3, double> *>
& /*boundary_functions*/,
- Function<3, double> const *const /*coefficient*/,
- std::vector<unsigned int> const & /*component_mapping*/)
+ const Function<3, double> *const /*coefficient*/,
+ const std::vector<unsigned int> & /*component_mapping*/)
{
Assert(false, ExcNotImplemented());
}
component_mapping);
},
[&boundary_functions, &dof_to_boundary_mapping, &matrix, &rhs_vector](
- MatrixCreator::internal::AssemblerBoundary::
- CopyData<dim, spacedim, number> const ©_data) {
+ const MatrixCreator::internal::AssemblerBoundary::
+ CopyData<dim, spacedim, number> ©_data) {
internal::copy_boundary_mass_matrix_1(copy_data,
boundary_functions,
dof_to_boundary_mapping,
const MatrixCreator::internal::AssemblerBoundary::Scratch &,
MatrixCreator::internal::AssemblerBoundary ::
CopyData<dim, spacedim, number> & copy_data,
- hp::MappingCollection<dim, spacedim> const &mapping,
- hp::FECollection<dim, spacedim> const & fe_collection,
- hp::QCollection<dim - 1> const & q,
+ const hp::MappingCollection<dim, spacedim> &mapping,
+ const hp::FECollection<dim, spacedim> & fe_collection,
+ const hp::QCollection<dim - 1> & q,
const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_functions,
- Function<spacedim, number> const *const coefficient,
- std::vector<unsigned int> const & component_mapping)
+ const Function<spacedim, number> *const coefficient,
+ const std::vector<unsigned int> & component_mapping)
{
const unsigned int n_components = fe_collection.n_components();
const unsigned int n_function_components =
template <int dim, int spacedim, typename number>
void
copy_hp_boundary_mass_matrix_1(
- MatrixCreator::internal::AssemblerBoundary ::
- CopyData<dim, spacedim, number> const ©_data,
- std::map<types::boundary_id, const Function<spacedim, number> *> const
+ const MatrixCreator::internal::AssemblerBoundary ::
+ CopyData<dim, spacedim, number> ©_data,
+ const std::map<types::boundary_id, const Function<spacedim, number> *>
& boundary_functions,
- std::vector<types::global_dof_index> const &dof_to_boundary_mapping,
+ const std::vector<types::global_dof_index> &dof_to_boundary_mapping,
SparseMatrix<number> & matrix,
Vector<number> & rhs_vector)
{
component_mapping);
},
[&boundary_functions, &dof_to_boundary_mapping, &matrix, &rhs_vector](
- MatrixCreator::internal::AssemblerBoundary ::
- CopyData<dim, spacedim, number> const ©_data) {
+ const MatrixCreator::internal::AssemblerBoundary ::
+ CopyData<dim, spacedim, number> ©_data) {
internal::copy_hp_boundary_mass_matrix_1(copy_data,
boundary_functions,
dof_to_boundary_mapping,
ExcMessage("Invalid angle phi specified."));
// the first 8 vertices are in the x-y-plane
- Point<3> const p = Point<3>(R, 0.0, 0.0);
- double const a = 1. / (1 + std::sqrt(2.0));
+ const Point<3> p = Point<3>(R, 0.0, 0.0);
+ const double a = 1. / (1 + std::sqrt(2.0));
// A value of 1 indicates "open" torus with angle < 2*pi, which
// means that we need an additional layer of vertices
const unsigned int additional_layer =
// create remaining vertices by rotating around negative y-axis (the
// direction is to ensure positive cell measures)
- double const phi_cell = phi / n_cells_toroidal;
+ const double phi_cell = phi / n_cells_toroidal;
for (unsigned int c = 1; c < n_point_layers_toroidal; ++c)
{
for (unsigned int v = 0; v < 8; ++v)
{
- double const r_2d = vertices[v][0];
+ const double r_2d = vertices[v][0];
vertices[8 * c + v][0] = r_2d * std::cos(phi_cell * c);
vertices[8 * c + v][1] = vertices[v][1];
vertices[8 * c + v][2] = r_2d * std::sin(phi_cell * c);
J.compute_svd();
- double const max_sv = J.singular_value(0);
- double const min_sv = J.singular_value(dim - 1);
- double const ar = max_sv / min_sv;
+ const double max_sv = J.singular_value(0);
+ const double min_sv = J.singular_value(dim - 1);
+ const double ar = max_sv / min_sv;
// Take the max between the previous and the current
// aspect ratio value; if we had previously encountered
Number * x_dev)
{
// Change the format of the matrix from sparse to dense
- unsigned int const m = matrix.m();
- unsigned int const n = matrix.n();
+ const unsigned int m = matrix.m();
+ const unsigned int n = matrix.n();
Assert(m == n, ExcMessage("The matrix is not square"));
Number *dense_matrix_dev;
Utilities::CUDA::malloc(dense_matrix_dev, m * n);
nnz = sparse_matrix_host.n_nonzero_elements();
n_rows = sparse_matrix_host.m();
n_cols = sparse_matrix_host.n();
- unsigned int const row_ptr_size = n_rows + 1;
+ const unsigned int row_ptr_size = n_rows + 1;
std::vector<Number> val;
val.reserve(nnz);
std::vector<int> column_index;
row_ptr[row + 1] = row_ptr[row] + counter;
// Sort the elements in the row
- unsigned int const offset = row_ptr[row];
- int const diag_index = column_index[offset];
+ const unsigned int offset = row_ptr[row];
+ const int diag_index = column_index[offset];
Number diag_elem = sparse_matrix_host.diag_element(row);
unsigned int pos = 1;
while ((column_index[offset + pos] < row) && (pos < counter))
template Vector<double> &
Vector<double>::operator=<int>(const dealii::Vector<int> &);
template bool
-Vector<int>::operator==<int>(dealii::Vector<int> const &) const;
+Vector<int>::operator==<int>(const dealii::Vector<int> &) const;
// instantiate for long double manually because we use it in a few places:
template class Vector<long double>;
int spacedim>
void
approximate(
- SynchronousIterators<
+ const SynchronousIterators<
std::tuple<typename DoFHandler<dim, spacedim>::active_cell_iterator,
- Vector<float>::iterator>> const &cell,
- const Mapping<dim, spacedim> & mapping,
- const DoFHandler<dim, spacedim> & dof_handler,
- const InputVector & solution,
- const unsigned int component)
+ Vector<float>::iterator>> &cell,
+ const Mapping<dim, spacedim> & mapping,
+ const DoFHandler<dim, spacedim> & dof_handler,
+ const InputVector & solution,
+ const unsigned int component)
{
// if the cell is not locally owned, then there is nothing to do
if (std::get<0>(*cell)->is_locally_owned() == false)
begin,
end,
[&mapping, &dof_handler, &solution, component](
- SynchronousIterators<Iterators> const &cell,
+ const SynchronousIterators<Iterators> &cell,
const Assembler::Scratch &,
Assembler::CopyData &) {
approximate<DerivativeDescription, dim, InputVector, spacedim>(
#include "../tests.h"
Vector<double>
-f1(double const t, Vector<double> const &y)
+f1(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
}
Vector<double>
-f2(double const t, Vector<double> const &y)
+f2(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
}
Vector<double>
-f3(double const t, Vector<double> const &y)
+f3(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
}
Vector<double>
-f4(double const t, Vector<double> const &y)
+f4(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
}
Vector<double>
-f5(double const t, Vector<double> const &y)
+f5(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
Vector<double>
-my_rhs_function(double const t, Vector<double> const &y)
+my_rhs_function(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
}
Vector<double>
-id_minus_tau_J_inv1(double const t, double const tau, Vector<double> const &y)
+id_minus_tau_J_inv1(const double t, const double tau, const Vector<double> &y)
{
return y;
}
Vector<double>
-id_minus_tau_J_inv2(double const t, double const tau, Vector<double> const &y)
+id_minus_tau_J_inv2(const double t, const double tau, const Vector<double> &y)
{
return y;
}
Vector<double>
-id_minus_tau_J_inv3(double const t, double const tau, Vector<double> const &y)
+id_minus_tau_J_inv3(const double t, const double tau, const Vector<double> &y)
{
return y;
}
Vector<double>
-id_minus_tau_J_inv4(double const t, double const tau, Vector<double> const &y)
+id_minus_tau_J_inv4(const double t, const double tau, const Vector<double> &y)
{
return y;
}
Vector<double>
-id_minus_tau_J_inv5(double const t, double const tau, Vector<double> const &y)
+id_minus_tau_J_inv5(const double t, const double tau, const Vector<double> &y)
{
return y;
}
double
-my1(double const t)
+my1(const double t)
{
return t;
}
double
-my2(double const t)
+my2(const double t)
{
return t * t;
}
double
-my3(double const t)
+my3(const double t)
{
return t * t * t;
}
double
-my4(double const t)
+my4(const double t)
{
return t * t * t * t;
}
double
-my5(double const t)
+my5(const double t)
{
return t * t * t * t * t;
}
double
-my_exact_solution(double const t)
+my_exact_solution(const double t)
{
return 0.1 * std::exp(t * t);
}
void
test(TimeStepping::RungeKutta<Vector<double>> & solver,
- std::function<Vector<double>(double const, Vector<double> const &)> f,
- std::function<Vector<double>(double const,
- double const,
- Vector<double> const &)> id_minus_tau_J_inv,
- std::function<double(double const)> my)
+ std::function<Vector<double>(const double, const Vector<double> &)> f,
+ std::function<Vector<double>(const double,
+ const double,
+ const Vector<double> &)> id_minus_tau_J_inv,
+ std::function<double(const double)> my)
{
unsigned int n_time_steps = 1;
unsigned int size = 1;
void
test2(TimeStepping::EmbeddedExplicitRungeKutta<Vector<double>> &solver,
- std::function<Vector<double>(double const, Vector<double> const &)> f,
- std::function<Vector<double>(double const,
- double const,
- Vector<double> const &)> id_minus_tau_J_inv,
- std::function<double(double const)> my)
+ std::function<Vector<double>(const double, const Vector<double> &)> f,
+ std::function<Vector<double>(const double,
+ const double,
+ const Vector<double> &)> id_minus_tau_J_inv,
+ std::function<double(const double)> my)
{
double initial_time = 0.0, final_time = 1.0;
double time_step = 1.0;
void
test_convergence(
TimeStepping::RungeKutta<Vector<double>> & solver,
- std::function<Vector<double>(double const, Vector<double> const &)> f,
- std::function<Vector<double>(double const,
- double const,
- Vector<double> const &)> id_minus_tau_J_inv,
- std::function<double(double const)> my)
+ std::function<Vector<double>(const double, const Vector<double> &)> f,
+ std::function<Vector<double>(const double,
+ const double,
+ const Vector<double> &)> id_minus_tau_J_inv,
+ std::function<double(const double)> my)
{
std::vector<double> errors;
double initial_time = 0.0, final_time = 1.0;
#include "../tests.h"
Vector<double>
-f(double const t, Vector<double> const &y)
+f(const double t, const Vector<double> &y)
{
Vector<double> values(y);
for (unsigned int i = 0; i < values.size(); ++i)
}
double
-my(double const t)
+my(const double t)
{
return t;
}
void
test(TimeStepping::EmbeddedExplicitRungeKutta<Vector<double>> & solver,
- std::function<Vector<double>(double const, Vector<double> const &)> f,
- std::function<double(double const)> my)
+ std::function<Vector<double>(const double, const Vector<double> &)> f,
+ std::function<double(const double)> my)
{
double initial_time = 0.0, final_time = 1.0;
double time_step = 0.1;
// Create the matrix on the host.
dealii::SparsityPattern sparsity_pattern;
dealii::SparseMatrix<double> matrix;
- unsigned int const size = 30;
+ const unsigned int size = 30;
std::vector<std::vector<unsigned int>> column_indices(size);
for (unsigned int i = 0; i < size; ++i)
{
void
-check_matrix(SparseMatrix<double> const & A,
+check_matrix(const SparseMatrix<double> & A,
CUDAWrappers::SparseMatrix<double> &A_dev)
{
cudaError_t cuda_error_code;
cudaMemcpyDeviceToHost);
AssertCuda(cuda_error_code);
- int const n_rows = A_dev.m() + 1;
+ const int n_rows = A_dev.m() + 1;
std::vector<int> row_ptr_host(n_rows + 1);
cuda_error_code = cudaMemcpy(&row_ptr_host[0],
row_ptr_dev,
}
void
-check_vector(Vector<double> const & a,
- LinearAlgebra::ReadWriteVector<double> const &b)
+check_vector(const Vector<double> & a,
+ const LinearAlgebra::ReadWriteVector<double> &b)
{
unsigned int size = a.size();
for (unsigned int i = 0; i < size; ++i)
test()
{
Triangulation<3> tria;
- unsigned int const n_cells_toroidal = 9;
- double const angle = 2.0 * numbers::PI;
- double const R = 3., r = 1.;
+ const unsigned int n_cells_toroidal = 9;
+ const double angle = 2.0 * numbers::PI;
+ const double R = 3., r = 1.;
GridGenerator::torus(tria, R, r, n_cells_toroidal, angle);
Triangulation<3> tria_open;
- unsigned int const factor = 3;
+ const unsigned int factor = 3;
GridGenerator::torus(
tria_open, R, r, n_cells_toroidal / factor, angle / (double)factor);
- MappingQ<3> const mapping(3);
- QGauss<3> const gauss(4);
+ const MappingQ<3> mapping(3);
+ const QGauss<3> gauss(4);
- double const ar_full_torus =
+ const double ar_full_torus =
GridTools::compute_maximum_aspect_ratio(mapping, tria, gauss);
- double const ar_open_torus =
+ const double ar_open_torus =
GridTools::compute_maximum_aspect_ratio(mapping, tria_open, gauss);
deallog << "N_active_cells_full = " << tria.n_global_active_cells()
template <int dim>
double
compute_aspect_ratio_hyper_rectangle(
- Point<dim> const & left,
- Point<dim> const & right,
- std::vector<unsigned int> const &refinements,
+ const Point<dim> & left,
+ const Point<dim> & right,
+ const std::vector<unsigned int> &refinements,
unsigned int degree = 1,
unsigned int n_q_points = 2,
bool deform = false,
tria.begin_active()->vertex(0) += shift;
}
- MappingQ<dim> const mapping(degree);
- QGauss<dim> const gauss(n_q_points);
+ const MappingQ<dim> mapping(degree);
+ const QGauss<dim> gauss(n_q_points);
Vector<double> ratios =
GridTools::compute_aspect_ratio_of_cells(mapping, tria, gauss);
void
print_sparse_matrix()
{
- unsigned int const n = 20;
+ const unsigned int n = 20;
SparsityPattern sp(n, n);
for (unsigned int i = 0; i < n; ++i)
for (unsigned int j = 0; j < n; ++j)
const unsigned int n_cells = 3;
// the first 8 vertices are in the x-y-plane
- Point<3> const p = Point<3>(R, 0.0, 0.0);
- double const a = 1. / (1 + std::sqrt(2.0));
+ const Point<3> p = Point<3>(R, 0.0, 0.0);
+ const double a = 1. / (1 + std::sqrt(2.0));
std::vector<Point<3>> vertices(8 * n_cells);
vertices[0] = p + Point<3>(-1, -1, 0) * (r / std::sqrt(2.0)),
vertices[1] = p + Point<3>(+1, -1, 0) * (r / std::sqrt(2.0)),
{
for (unsigned int v = 0; v < 8; ++v)
{
- double const r_2d = vertices[v][0];
+ const double r_2d = vertices[v][0];
vertices[8 * c + v][0] = r_2d * std::cos(phi_cell * c);
vertices[8 * c + v][1] = vertices[v][1];
vertices[8 * c + v][2] = r_2d * std::sin(phi_cell * c);
for (unsigned int i = 0; i < vertices.size(); ++i)
{
- auto const diff = vertices[i] - vertices_detour[i];
+ const auto diff = vertices[i] - vertices_detour[i];
AssertThrow(diff.norm() < 1e-12, ExcMessage("Vertices differ!"));
}
}
// Computation the host
auto graph = mf_data.get_colored_graph();
- unsigned int const n_colors = graph.size();
+ const unsigned int n_colors = graph.size();
for (unsigned int color = 0; color < n_colors; ++color)
{
typename CUDAWrappers::MatrixFree<dim, double>::Data gpu_data =
mf_data.get_data(color);
- unsigned int const n_cells = gpu_data.n_cells;
+ const unsigned int n_cells = gpu_data.n_cells;
auto gpu_data_host = CUDAWrappers::copy_mf_data_to_host<dim, double>(
gpu_data, additional_data.mapping_update_flags);
for (unsigned int cell_id = 0; cell_id < n_cells; ++cell_id)
{
for (unsigned int i = 0; i < n_q_points_per_cell; ++i)
{
- unsigned int const pos =
+ const unsigned int pos =
gpu_data_host.local_q_point_id(cell_id, n_q_points_per_cell, i);
auto p = gpu_data_host.get_quadrature_point(cell_id, i);
const double p_val = dim == 2 ? p(0) + p(1) : p(0) + p(1) + p(2);
class DeformedCubeManifold : public dealii::ChartManifold<dim, dim, dim>
{
public:
- DeformedCubeManifold(double const left,
- double const right,
- double const deformation,
- unsigned int const frequency = 1)
+ DeformedCubeManifold(const double left,
+ const double right,
+ const double deformation,
+ const unsigned int frequency = 1)
: left(left)
, right(right)
, deformation(deformation)
{}
dealii::Point<dim>
- push_forward(dealii::Point<dim> const &chart_point) const override
+ push_forward(const dealii::Point<dim> &chart_point) const override
{
double sinval = deformation;
for (unsigned int d = 0; d < dim; ++d)
}
dealii::Point<dim>
- pull_back(dealii::Point<dim> const &space_point) const override
+ pull_back(const dealii::Point<dim> &space_point) const override
{
dealii::Point<dim> x = space_point;
dealii::Point<dim> one;
}
private:
- double const left;
- double const right;
- double const deformation;
- unsigned int const frequency;
+ const double left;
+ const double right;
+ const double deformation;
+ const unsigned int frequency;
};
template <int dim, int fe_degree>
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- unsigned int const frequency = 2;
- double const deformation = 0.05;
+ const unsigned int frequency = 2;
+ const double deformation = 0.05;
static DeformedCubeManifold<dim> manifold(0.0, 1.0, deformation, frequency);
tria.set_all_manifold_ids(1);
tria.set_manifold(1, manifold);
};
std::string
-enum_to_string(TestType const enum_type)
+enum_to_string(const TestType enum_type)
{
std::string string_type;
switch (enum_type)
class DeformedCubeManifold : public dealii::ChartManifold<dim, dim, dim>
{
public:
- DeformedCubeManifold(double const left,
- double const right,
- double const deformation,
- unsigned int const frequency = 1)
+ DeformedCubeManifold(const double left,
+ const double right,
+ const double deformation,
+ const unsigned int frequency = 1)
: left(left)
, right(right)
, deformation(deformation)
{}
dealii::Point<dim>
- push_forward(dealii::Point<dim> const &chart_point) const override
+ push_forward(const dealii::Point<dim> &chart_point) const override
{
double sinval = deformation;
for (unsigned int d = 0; d < dim; ++d)
}
dealii::Point<dim>
- pull_back(dealii::Point<dim> const &space_point) const override
+ pull_back(const dealii::Point<dim> &space_point) const override
{
dealii::Point<dim> x = space_point;
dealii::Point<dim> one;
}
private:
- double const left;
- double const right;
- double const deformation;
- unsigned int const frequency;
+ const double left;
+ const double right;
+ const double deformation;
+ const unsigned int frequency;
};
template <int dim, int fe_degree>
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
- unsigned int const frequency = 2;
- double const deformation = 0.05;
+ const unsigned int frequency = 2;
+ const double deformation = 0.05;
static DeformedCubeManifold<dim> manifold(0.0, 1.0, deformation, frequency);
tria.set_all_manifold_ids(1);
tria.set_manifold(1, manifold);
};
std::string
-enum_to_string(TestType const enum_type)
+enum_to_string(const TestType enum_type)
{
std::string string_type;
switch (enum_type)
{}
inline virtual void
- vector_value(Point<dim> const &p, Vector<double> &values) const override
+ vector_value(const Point<dim> &p, Vector<double> &values) const override
{
for (unsigned int i = 0; i < dim; ++i)
{
{}
inline virtual void
- vector_value(Point<dim> const &p, Vector<double> &values) const override
+ vector_value(const Point<dim> &p, Vector<double> &values) const override
{
for (unsigned int i = 0; i < dim; ++i)
{
void
construct_triangulation(Triangulation<dim> &tria)
{
- double const L_F = 0.7;
- double const B_F = 1.0;
- double const H_F = 0.5;
+ const double L_F = 0.7;
+ const double B_F = 1.0;
+ const double H_F = 0.5;
- double const T_S = 0.05;
- double const B_S = 0.6;
- double const H_S = 0.4;
+ const double T_S = 0.05;
+ const double B_S = 0.6;
+ const double H_S = 0.4;
- double const L_IN = 0.6;
+ const double L_IN = 0.6;
- unsigned int const N_CELLS_X_OUTFLOW = 1;
- unsigned int const N_CELLS_Y_LOWER = 2;
- unsigned int const N_CELLS_Z_MIDDLE = 2;
+ const unsigned int N_CELLS_X_OUTFLOW = 1;
+ const unsigned int N_CELLS_Y_LOWER = 2;
+ const unsigned int N_CELLS_Z_MIDDLE = 2;
std::vector<dealii::Triangulation<3>> tria_vec;
tria_vec.resize(4);
dealii::Point<3>(L_IN, -H_F / 2.0, -B_F / 2.0),
dealii::Point<3>(L_IN + T_S, H_S - H_F / 2.0, -B_S / 2.0));
- std::vector<dealii::Triangulation<3> const *> tria_vec_ptr(tria_vec.size());
+ std::vector<const dealii::Triangulation<3> *> tria_vec_ptr(tria_vec.size());
for (unsigned int i = 0; i < tria_vec.size(); ++i)
tria_vec_ptr[i] = &tria_vec[i];
// enclosing dummy triangulation for point plots
dealii::BoundingBox<dim> bounding_box(points);
- auto const boundary_points =
+ const auto boundary_points =
bounding_box.create_extended_relative(1e-3).get_boundary_points();
dealii::Triangulation<dim> particle_dummy_tria;
const double(&t_ref)[3][3][3][3][3] = t;
dealii::TensorAccessors::internal::
- ReorderedIndexView<2, 5, double const[3][3][3][3][3]> // auto ...
+ ReorderedIndexView<2, 5, const double[3][3][3][3][3]> // auto ...
foo2 = TensorAccessors::reordered_index_view<2, 5>(t_ref);
deallog << foo2[0][1][0][1][2] << std::endl;
}
std::vector<types::global_dof_index>
get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&cell) const;
parallel::distributed::Triangulation<dim> triangulation;
template <int dim>
std::vector<types::global_dof_index>
LaplaceProblem<dim>::get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const &cell)
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> &cell)
const
{
std::vector<types::global_dof_index> local_dof_indices(
begin,
end,
static_cast<std::function<std::vector<types::global_dof_index>(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&)>>(std::bind(&LaplaceProblem<dim>::get_conflict_indices,
this,
std::placeholders::_1)));
std::vector<types::global_dof_index>
get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&cell) const;
parallel::distributed::Triangulation<dim> triangulation;
template <int dim>
std::vector<types::global_dof_index>
LaplaceProblem<dim>::get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const &cell)
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> &cell)
const
{
std::vector<types::global_dof_index> local_dof_indices(
begin,
end,
static_cast<std::function<std::vector<types::global_dof_index>(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&)>>(std::bind(&LaplaceProblem<dim>::get_conflict_indices,
this,
std::placeholders::_1)));
std::vector<types::global_dof_index>
get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&cell) const;
parallel::distributed::Triangulation<dim> triangulation;
template <int dim>
std::vector<types::global_dof_index>
LaplaceProblem<dim>::get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const &cell)
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> &cell)
const
{
std::vector<types::global_dof_index> local_dof_indices(
begin,
end,
static_cast<std::function<std::vector<types::global_dof_index>(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&)>>(std::bind(&LaplaceProblem<dim>::get_conflict_indices,
this,
std::placeholders::_1)));
std::vector<types::global_dof_index>
get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&cell) const;
parallel::distributed::Triangulation<dim> triangulation;
template <int dim>
std::vector<types::global_dof_index>
LaplaceProblem<dim>::get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const &cell)
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> &cell)
const
{
std::vector<types::global_dof_index> local_dof_indices(
begin,
end,
static_cast<std::function<std::vector<types::global_dof_index>(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&)>>(std::bind(&LaplaceProblem<dim>::get_conflict_indices,
this,
std::placeholders::_1)));
std::vector<types::global_dof_index>
get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&cell) const;
parallel::distributed::Triangulation<dim> triangulation;
template <int dim>
std::vector<types::global_dof_index>
LaplaceProblem<dim>::get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const &cell)
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> &cell)
const
{
std::vector<types::global_dof_index> local_dof_indices(
begin,
end,
static_cast<std::function<std::vector<types::global_dof_index>(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&)>>(std::bind(&LaplaceProblem<dim>::get_conflict_indices,
this,
std::placeholders::_1)));
std::vector<types::global_dof_index>
get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&cell) const;
parallel::distributed::Triangulation<dim> triangulation;
template <int dim>
std::vector<types::global_dof_index>
LaplaceProblem<dim>::get_conflict_indices(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const &cell)
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> &cell)
const
{
std::vector<types::global_dof_index> local_dof_indices(
begin,
end,
static_cast<std::function<std::vector<types::global_dof_index>(
- FilteredIterator<typename DoFHandler<dim>::active_cell_iterator> const
+ const FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
&)>>(std::bind(&LaplaceProblem<dim>::get_conflict_indices,
this,
std::placeholders::_1)));