// ...then have some objects of which the meaning will become clear
// below...
- QTrapezoid<dim> vertex_quadrature;
+ const QTrapezoid<dim> vertex_quadrature;
FEValues<dim> fe_values(dof_handler.get_fe(),
vertex_quadrature,
update_gradients | update_quadrature_points);
// Initialize a <code>FEValues</code> object with a quadrature formula,
// have abbreviations for the number of quadrature points and shape
// functions...
- QGauss<dim> quadrature(dof_handler.get_fe().degree + 1);
+ const QGauss<dim> quadrature(dof_handler.get_fe().degree + 1);
FEValues<dim> fe_values(dof_handler.get_fe(),
quadrature,
update_gradients | update_quadrature_points |
template <int dim>
void ElasticProblem<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
- FEValues<dim> fe_values(fe,
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
+ FEValues<dim> fe_values(fe,
quadrature_formula,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
template <int dim>
void MixedLaplaceProblem<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(degree + 2);
- QGauss<dim - 1> face_quadrature_formula(degree + 2);
+ const QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim - 1> face_quadrature_formula(degree + 2);
FEValues<dim> fe_values(fe,
quadrature_formula,
// points for integration. To avoid this problem, we simply use a
// trapezoidal rule and iterate it <code>degree+2</code> times in each
// coordinate direction (again as explained in step-7):
- QTrapezoid<1> q_trapez;
- QIterated<dim> quadrature(q_trapez, degree + 2);
+ const QTrapezoid<1> q_trapez;
+ const QIterated<dim> quadrature(q_trapez, degree + 2);
// With this, we can then let the library compute the errors and output
// them to the screen:
system_matrix = 0;
system_rhs = 0;
- QGauss<dim> quadrature_formula(degree + 2);
- QGauss<dim - 1> face_quadrature_formula(degree + 2);
+ const QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim - 1> face_quadrature_formula(degree + 2);
FEValues<dim> fe_values(fe,
quadrature_formula,
template <int dim>
void TwoPhaseFlowProblem<dim>::assemble_rhs_S()
{
- QGauss<dim> quadrature_formula(degree + 2);
- QGauss<dim - 1> face_quadrature_formula(degree + 2);
- FEValues<dim> fe_values(fe,
+ const QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim - 1> face_quadrature_formula(degree + 2);
+ FEValues<dim> fe_values(fe,
quadrature_formula,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- FEFaceValues<dim> fe_face_values(fe,
+ FEFaceValues<dim> fe_face_values(fe,
face_quadrature_formula,
update_values | update_normal_vectors |
update_quadrature_points |
update_JxW_values);
- FEFaceValues<dim> fe_face_values_neighbor(fe,
+ FEFaceValues<dim> fe_face_values_neighbor(fe,
face_quadrature_formula,
update_values);
template <int dim>
double TwoPhaseFlowProblem<dim>::get_maximal_velocity() const
{
- QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim> quadrature_formula(degree + 2);
const unsigned int n_q_points = quadrature_formula.size();
FEValues<dim> fe_values(fe, quadrature_formula, update_values);
system_rhs = 0;
preconditioner_matrix = 0;
- QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim> quadrature_formula(degree + 2);
FEValues<dim> fe_values(fe,
quadrature_formula,
const Vector<double> &new_data,
SparseMatrix<double> &nl_matrix) const
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
- FEValues<dim> fe_values(fe,
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
+ FEValues<dim> fe_values(fe,
quadrature_formula,
update_values | update_JxW_values |
update_quadrature_points);
// used. Since our bilinear form involves boundary integrals on
// $\Gamma_2$, we also need a quadrature rule for surface integration on
// the faces, which are $dim-1$ dimensional:
- QGauss<dim> quadrature_formula(fe.degree + 1);
- QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
const unsigned int n_q_points = quadrature_formula.size(),
n_face_q_points = face_quadrature_formula.size(),
temperature_mass_matrix = 0;
temperature_stiffness_matrix = 0;
- QGauss<dim> quadrature_formula(temperature_degree + 2);
- FEValues<dim> temperature_fe_values(temperature_fe,
+ const QGauss<dim> quadrature_formula(temperature_degree + 2);
+ FEValues<dim> temperature_fe_values(temperature_fe,
quadrature_formula,
update_values | update_gradients |
update_JxW_values);
DoFHandler<dim> dof_handler_velocity;
DoFHandler<dim> dof_handler_pressure;
- QGauss<dim> quadrature_pressure;
- QGauss<dim> quadrature_velocity;
+ const QGauss<dim> quadrature_pressure;
+ const QGauss<dim> quadrature_velocity;
SparsityPattern sparsity_pattern_velocity;
SparsityPattern sparsity_pattern_pressure;
template <int dim>
void EigenvalueProblem<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
template <int dim>
void Step4<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
// We wanted to have a non-constant right hand side, so we use an object of
// the class declared above to generate the necessary data. Since this right
void PlasticityContactProblem<dim>::assemble_mass_matrix_diagonal(
TrilinosWrappers::SparseMatrix &mass_matrix)
{
- QGaussLobatto<dim - 1> face_quadrature_formula(fe.degree + 1);
+ const QGaussLobatto<dim - 1> face_quadrature_formula(fe.degree + 1);
FEFaceValues<dim> fe_values_face(fe,
face_quadrature_formula,
// many quadrature points as there are shape functions per face and
// looping over quadrature points is equivalent to looping over shape
// functions defined on a face. With this, the code looks as follows:
- Quadrature<dim - 1> face_quadrature(fe.get_unit_face_support_points());
- FEFaceValues<dim> fe_values_face(fe,
+ const Quadrature<dim - 1> face_quadrature(
+ fe.get_unit_face_support_points());
+ FEFaceValues<dim> fe_values_face(fe,
face_quadrature,
update_quadrature_points);
{
TimerOutput::Scope t(computing_timer, "Assembling");
- QGauss<dim> quadrature_formula(fe.degree + 1);
- QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
void PlasticityContactProblem<dim>::compute_nonlinear_residual(
const TrilinosWrappers::MPI::Vector &linearization_point)
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
- QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
double contact_force = 0.0;
- QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
- FEFaceValues<dim> fe_values_face(fe,
+ const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+ FEFaceValues<dim> fe_values_face(fe,
face_quadrature_formula,
update_values | update_JxW_values);
darcy_matrix = 0;
darcy_rhs = 0;
- QGauss<dim> quadrature_formula(darcy_degree + 2);
- QGauss<dim - 1> face_quadrature_formula(darcy_degree + 2);
+ const QGauss<dim> quadrature_formula(darcy_degree + 2);
+ const QGauss<dim - 1> face_quadrature_formula(darcy_degree + 2);
FEValues<dim> darcy_fe_values(darcy_fe,
quadrature_formula,
template <int dim>
void TwoPhaseFlowProblem<dim>::assemble_saturation_matrix()
{
- QGauss<dim> quadrature_formula(saturation_degree + 2);
+ const QGauss<dim> quadrature_formula(saturation_degree + 2);
FEValues<dim> saturation_fe_values(saturation_fe,
quadrature_formula,
template <int dim>
void TwoPhaseFlowProblem<dim>::assemble_saturation_rhs()
{
- QGauss<dim> quadrature_formula(saturation_degree + 2);
- QGauss<dim - 1> face_quadrature_formula(saturation_degree + 2);
+ const QGauss<dim> quadrature_formula(saturation_degree + 2);
+ const QGauss<dim - 1> face_quadrature_formula(saturation_degree + 2);
FEValues<dim> saturation_fe_values(saturation_fe,
quadrature_formula,
system_rhs = 0.;
preconditioner_matrix = 0.;
- QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim> quadrature_formula(degree + 2);
FEValues<dim> fe_values(mapping,
fe,
template <int dim>
void Step5<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
{
TimerOutput::Scope timing(computing_timer, "Assemble multigrid");
- QGauss<dim> quadrature_formula(degree + 1);
+ const QGauss<dim> quadrature_formula(degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
const ComponentSelectFunction<dim> velocity_mask(std::make_pair(0, dim),
dim + 1);
- Vector<double> cellwise_errors(triangulation.n_active_cells());
- QGauss<dim> quadrature(velocity_degree + 2);
+ Vector<double> cellwise_errors(triangulation.n_active_cells());
+ const QGauss<dim> quadrature(velocity_degree + 2);
VectorTools::integrate_difference(dof_handler,
locally_relevant_solution,
const bool assemble_pressure_mass_matrix =
(solver_type == SolverType::UMFPACK) ? false : true;
- QGauss<dim> quadrature_formula(pressure_degree + 2);
+ const QGauss<dim> quadrature_formula(pressure_degree + 2);
FEValues<dim> fe_values(fe,
quadrature_formula,
mg_matrices = 0.;
- QGauss<dim> quadrature_formula(pressure_degree + 2);
+ const QGauss<dim> quadrature_formula(pressure_degree + 2);
FEValues<dim> fe_values(velocity_fe,
quadrature_formula,
system_rhs = 0;
- QGauss<dim> quadrature_formula(degree + 2);
+ const QGauss<dim> quadrature_formula(degree + 2);
FEValues<dim> fe_values(fe,
quadrature_formula,
laplace_matrices[d].reinit(N, N);
}
- QGauss<1> quadrature(N);
+ const QGauss<1> quadrature(N);
for (unsigned int i = 0; i < N; ++i)
for (unsigned int j = 0; j < N; ++j)
{
{
TimerOutput::Scope timer_section(monitor, "Setup coupling");
- QGauss<dim> quad(parameters.coupling_quadrature_order);
+ const QGauss<dim> quad(parameters.coupling_quadrature_order);
DynamicSparsityPattern dsp(space_dh->n_dofs(), embedded_dh->n_dofs());
// To compute the coupling matrix we use the
// NonMatching::create_coupling_mass_matrix tool, which works similarly to
// NonMatching::create_coupling_sparsity_pattern.
- QGauss<dim> quad(parameters.coupling_quadrature_order);
+ const QGauss<dim> quad(parameters.coupling_quadrature_order);
NonMatching::create_coupling_mass_matrix(*space_grid_tools_cache,
*space_dh,
*embedded_dh,
parallel::distributed::Triangulation<dim> triangulation;
- QGauss<dim> quadrature_formula;
+ const QGauss<dim> quadrature_formula;
// We store the mass and stiffness matrices for each cell this vector.
std::vector<QuadratureCache<dim>> quadrature_cache;
template <int dim>
void HelmholtzProblem<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(fe->degree + 1);
- QGauss<dim - 1> face_quadrature_formula(fe->degree + 1);
+ const QGauss<dim> quadrature_formula(fe->degree + 1);
+ const QGauss<dim - 1> face_quadrature_formula(fe->degree + 1);
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
template <int dim, int spacedim>
void StokesImmersedProblem<dim, spacedim>::setup_solid_particles()
{
- QGauss<dim> quadrature(fluid_fe->degree + 1);
+ const QGauss<dim> quadrature(fluid_fe->degree + 1);
const unsigned int n_properties = 1;
solid_particle_handler.initialize(fluid_tria,
TimerOutput::Scope t(computing_timer, "Assemble Stokes terms");
- QGauss<spacedim> quadrature_formula(fluid_fe->degree + 1);
- FEValues<spacedim> fe_values(*fluid_fe,
+ const QGauss<spacedim> quadrature_formula(fluid_fe->degree + 1);
+ FEValues<spacedim> fe_values(*fluid_fe,
quadrature_formula,
update_values | update_gradients |
update_quadrature_points |
Triangulation<dim> triangulation;
- DoFHandler<dim> dof_handler;
- FE_Q<dim> fe;
- QGauss<dim> quadrature_formula;
+ DoFHandler<dim> dof_handler;
+ const FE_Q<dim> fe;
+ const QGauss<dim> quadrature_formula;
AffineConstraints<double> hanging_node_constraints;
// <code>current_coefficient</code> variable.
const unsigned int dofs_per_cell = fe.dofs_per_cell;
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
- QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
update_values | update_gradients |
system_rhs = 0;
- MappingQ<dim> mapping(1);
- QGauss<dim> quadrature_formula(fe.degree + 1);
- QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
- FEValues<dim> fe_values(mapping,
+ MappingQ<dim> mapping(1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim - 1> face_quadrature_formula(fe.degree + 1);
+ FEValues<dim> fe_values(mapping,
fe,
quadrature_formula,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- FEFaceValues<dim> fe_face_values(mapping,
+ FEFaceValues<dim> fe_face_values(mapping,
fe,
face_quadrature_formula,
update_values | update_quadrature_points |
template <int dim>
void ElasticProblem<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(fe.degree + 1);
+ const QGauss<dim> quadrature_formula(fe.degree + 1);
FEValues<dim> fe_values(fe,
quadrature_formula,
template <int dim>
void Maxwell<dim>::assemble_system()
{
- QGauss<dim> quadrature_formula(quadrature_order);
- QGauss<dim - 1> face_quadrature_formula(quadrature_order);
+ const QGauss<dim> quadrature_formula(quadrature_order);
+ const QGauss<dim - 1> face_quadrature_formula(quadrature_order);
FEValues<dim, dim> fe_values(*fe,
quadrature_formula,
{
matrix = 0;
- QGauss<dim> quad(fe.degree + 1);
- QGauss<dim - 1> quad_face(fe.degree + 1);
+ const QGauss<dim> quad(fe.degree + 1);
+ const QGauss<dim - 1> quad_face(fe.degree + 1);
const unsigned int n_q_points = quad.size();
const unsigned int n_q_points_face = quad_face.size();
double error_H1 = 0;
double error_L2 = 0;
- QGauss<dim> quad(fe.degree + 1);
- QGauss<dim - 1> quad_face(fe.degree + 1);
+ const QGauss<dim> quad(fe.degree + 1);
+ const QGauss<dim - 1> quad_face(fe.degree + 1);
FEValues<dim> fe_values(fe,
quad,
const typename Triangulation<dim>::cell_iterator cell_lift =
static_cast<typename Triangulation<dim>::cell_iterator>(cell);
- QGauss<dim> quad(fe.degree + 1);
- QGauss<dim - 1> quad_face(fe.degree + 1);
+ const QGauss<dim> quad(fe.degree + 1);
+ const QGauss<dim - 1> quad_face(fe.degree + 1);
const unsigned int n_q_points = quad.size();
const unsigned int n_q_points_face = quad_face.size();
MappingQ<dim - 1, dim> mapping_immersed_base(3);
MappingQCache<dim - 1, dim> mapping_immersed(3);
mapping_immersed.initialize(mapping_immersed_base, tria_immersed);
- QGauss<dim - 1> quadrature_immersed(degree + 1);
+ const QGauss<dim - 1> quadrature_immersed(degree + 1);
FE_Q<dim - 1, dim> fe_scalar_immersed(degree);
FESystem<dim - 1, dim> fe_immersed(fe_scalar_immersed, dim);
// Gauss-Legendre quadrature formula
if (k > 0)
{
- QGauss<1> gauss(k);
+ const QGauss<1> gauss(k);
for (unsigned int i = 0; i < k; ++i)
this->lagrange_support_points[i] = gauss.get_points()[i][0];
}
// Note that the polynomials are not yet normalized here, which is not
// necessary because we are only looking for the x_star where the matrix
// entry is zero, for which the constants do not matter.
- QGauss<1> gauss(degree + 1);
- double integral_left = 0, integral_right = 0;
+ const QGauss<1> gauss(degree + 1);
+ double integral_left = 0, integral_right = 0;
for (unsigned int q = 0; q < gauss.size(); ++q)
{
const double x = gauss.point(q)[0];
// only need n quadrature points. In the most difficult one, we
// need 2*n points for the first segment, and 2*n points for the
// second segment.
- QGaussLog<1> quad1(n, origin[0] != 0);
- QGaussLog<1> quad2(n);
- QGauss<1> quad(n);
+ const QGaussLog<1> quad1(n, origin[0] != 0);
+ const QGaussLog<1> quad2(n);
+ const QGauss<1> quad(n);
// Check that the origin is inside 0,1
Assert((fraction >= 0) && (fraction <= 1),
// Start with the gauss quadrature formula on the (u,v) reference
// element.
- QGauss<2> gauss(n);
+ const QGauss<2> gauss(n);
Assert(gauss.size() == n * n, ExcInternalError());
{
AssertDimension(dim, 3);
- QGaussSimplex<2> quad_tri(n_points);
- QGauss<1> quad_line(n_points);
+ const QGaussSimplex<2> quad_tri(n_points);
+ const QGauss<1> quad_line(n_points);
for (unsigned int i = 0; i < quad_line.size(); ++i)
for (unsigned int j = 0; j < quad_tri.size(); ++j)
std::vector<std::pair<Point<spacedim>, unsigned int>>
support_point_list(n_dofs);
- Quadrature<dim> q_dummy(dof.get_fe().get_unit_support_points());
+ const Quadrature<dim> q_dummy(dof.get_fe().get_unit_support_points());
FEValues<dim, spacedim> fe_values(dof.get_fe(),
q_dummy,
update_quadrature_points);
Assert(matrix.m() == spacedim, ExcInternalError());
- Quadrature<dim - 1> quadrature(fe.get_unit_face_support_points(face_no));
+ const Quadrature<dim - 1> quadrature(
+ fe.get_unit_face_support_points(face_no));
// have an array that stores the location of each vector-dof tuple we want
// to rotate.
void
FE_ABF<dim>::initialize_support_points(const unsigned int deg)
{
- QGauss<dim> cell_quadrature(deg + 2);
+ const QGauss<dim> cell_quadrature(deg + 2);
const unsigned int n_interior_points = cell_quadrature.size();
// TODO: the implementation makes the assumption that all faces have the
if (dim > 1)
{
- QGauss<dim - 1> face_points(deg + 1);
+ const QGauss<dim - 1> face_points(deg + 1);
TensorProductPolynomials<dim - 1> legendre =
Polynomials::Legendre::generate_complete_basis(deg);
this->restriction[iso][i].reinit(0, 0);
return;
}
- unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
- QGauss<dim - 1> q_base(rt_order + 1);
- const unsigned int n_face_points = q_base.size();
+ unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
+ const QGauss<dim - 1> q_base(rt_order + 1);
+ const unsigned int n_face_points = q_base.size();
// First, compute interpolation on
// subfaces
for (const unsigned int face : GeometryInfo<dim>::face_indices())
AssertDimension(this->n_unique_faces(), 1);
const unsigned int face_no = 0;
- QGauss<dim> q_cell(rt_order + 1);
+ const QGauss<dim> q_cell(rt_order + 1);
const unsigned int start_cell_dofs =
GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face(face_no);
// up to deg, which means we need dg+1 points in each direction. The
// fact that we do not have tensor product polynomials will be
// considered later. In 2d, we can use point values.
- QGauss<dim - 1> face_points(deg + 1);
+ const QGauss<dim - 1> face_points(deg + 1);
// TODO: the implementation makes the assumption that all faces have the
// same number of dofs
// deg-2, thus we use deg points. Note that deg>=1 and the lowest
// order element has no points in the cell, such that we have to
// distinguish this case.
- QGauss<dim> cell_points(deg == 1 ? 0 : deg);
+ const QGauss<dim> cell_points(deg == 1 ? 0 : deg);
// Compute the size of the whole support point set
const unsigned int npoints =
this->generalized_support_points.resize(npoints);
- Quadrature<dim> faces =
+ const Quadrature<dim> faces =
QProjector<dim>::project_to_all_faces(this->reference_cell(), face_points);
for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
polynomial_space->get_numbering_inverse();
for (unsigned int i = 0; i <= this->degree; ++i)
qpoints[i] = Point<1>(this->unit_support_points[lexicographic[i]][0]);
- Quadrature<1> pquadrature(qpoints);
+ const Quadrature<1> pquadrature(qpoints);
return std::make_unique<FE_DGQArbitraryNodes<dim, spacedim>>(pquadrature);
}
std::vector<Point<dim - 2>> line_support_points(n);
for (unsigned int i = 0; i < n; ++i)
line_support_points[i][0] = (i + 1) * step;
- Quadrature<dim - 2> qline(line_support_points);
+ const Quadrature<dim - 2> qline(line_support_points);
// auxiliary points in 2d
std::vector<Point<dim - 1>> p_line(n);
ExcMessage("This element can only be used with a positive number of "
"subelements"));
- QTrapezoid<1> trapez;
- QIterated<1> points(trapez, subdivisions);
+ const QTrapezoid<1> trapez;
+ const QIterated<1> points(trapez, subdivisions);
this->initialize(points.get_points());
}
void
FE_RaviartThomas<dim>::initialize_support_points(const unsigned int deg)
{
- QGauss<dim> cell_quadrature(deg + 1);
+ const QGauss<dim> cell_quadrature(deg + 1);
const unsigned int n_interior_points = (deg > 0) ? cell_quadrature.size() : 0;
// TODO: the implementation makes the assumption that all faces have the
if (dim > 1)
{
- QGauss<dim - 1> face_points(deg + 1);
+ const QGauss<dim - 1> face_points(deg + 1);
TensorProductPolynomials<dim - 1> legendre =
Polynomials::Legendre::generate_complete_basis(deg);
{
const unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
- QGauss<dim - 1> q_base(this->degree);
- const unsigned int n_face_points = q_base.size();
+ const QGauss<dim - 1> q_base(this->degree);
+ const unsigned int n_face_points = q_base.size();
// First, compute interpolation on
// subfaces
for (const unsigned int face : GeometryInfo<dim>::face_indices())
// child cell are evaluated
// in the quadrature points
// of a full face.
- Quadrature<dim> q_face =
+ const Quadrature<dim> q_face =
QProjector<dim>::project_to_face(this->reference_cell(), q_base, face);
// Store shape values, since the
// evaluation suffers if not
// the coarse face are
// evaluated on the subface
// only.
- Quadrature<dim> q_sub = QProjector<dim>::project_to_subface(
+ const Quadrature<dim> q_sub = QProjector<dim>::project_to_subface(
this->reference_cell(), q_base, face, sub);
const unsigned int child = GeometryInfo<dim>::child_cell_on_face(
RefinementCase<dim>::isotropic_refinement, face, sub);
AssertDimension(this->n_unique_faces(), 1);
const unsigned int face_no = 0;
- QGauss<dim> q_cell(this->degree);
+ const QGauss<dim> q_cell(this->degree);
const unsigned int start_cell_dofs =
GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face(face_no);
// This is the deg of the RT_Bubble element plus one.
if (dim > 1)
{
- QGaussLobatto<dim - 1> face_points(deg + 1);
+ const QGaussLobatto<dim - 1> face_points(deg + 1);
Assert(face_points.size() == this->n_dofs_per_face(face_no),
ExcInternalError());
for (unsigned int k = 0; k < this->n_dofs_per_face(face_no); ++k)
// In the interior, we need anisotropic Gauss-Lobatto quadratures,
// one for each direction
- QGaussLobatto<1> high(deg + 1);
- std::vector<Point<1>> pts = high.get_points();
+ const QGaussLobatto<1> high(deg + 1);
+ std::vector<Point<1>> pts = high.get_points();
if (pts.size() > 2)
{
pts.erase(pts.begin());
}
std::vector<double> wts(pts.size(), 1);
- Quadrature<1> low(pts, wts);
+ const Quadrature<1> low(pts, wts);
for (unsigned int d = 0; d < dim; ++d)
{
auto &fe_values = fe_values_all.get();
if (fe_values.get() == nullptr)
{
- QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+ const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+ 1);
std::vector<Point<dim>> quadrature_points;
for (const auto i :
FETools::hierarchic_to_lexicographic_numbering<dim>(
this->polynomial_degree))
quadrature_points.push_back(quadrature_gl.point(i));
- Quadrature<dim> quadrature(quadrature_points);
+ const Quadrature<dim> quadrature(quadrature_points);
fe_values = std::make_unique<FEValues<dim, spacedim>>(
mapping, fe, quadrature, update_quadrature_points);
auto &fe_values = fe_values_all.get();
if (fe_values.get() == nullptr)
{
- QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+ const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+ 1);
std::vector<Point<dim>> quadrature_points;
for (const auto i :
FETools::hierarchic_to_lexicographic_numbering<dim>(
this->polynomial_degree))
quadrature_points.push_back(quadrature_gl.point(i));
- Quadrature<dim> quadrature(quadrature_points);
+ const Quadrature<dim> quadrature(quadrature_points);
fe_values = std::make_unique<FEValues<dim, spacedim>>(
mapping, fe, quadrature, update_quadrature_points);
auto &fe_values = fe_values_all.get();
if (fe_values.get() == nullptr)
{
- QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+ const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+ 1);
std::vector<Point<dim>> quadrature_points;
for (const auto i :
FETools::hierarchic_to_lexicographic_numbering<dim>(
this->polynomial_degree))
quadrature_points.push_back(quadrature_gl.point(i));
- Quadrature<dim> quadrature(quadrature_points);
+ const Quadrature<dim> quadrature(quadrature_points);
fe_values = std::make_unique<FEValues<dim, spacedim>>(
mapping,
auto &fe_values = fe_values_all.get();
if (fe_values.get() == nullptr)
{
- QGaussLobatto<dim> quadrature_gl(this->polynomial_degree + 1);
+ const QGaussLobatto<dim> quadrature_gl(this->polynomial_degree +
+ 1);
std::vector<Point<dim>> quadrature_points;
for (const auto i :
FETools::hierarchic_to_lexicographic_numbering<dim>(
this->polynomial_degree))
quadrature_points.push_back(quadrature_gl.point(i));
- Quadrature<dim> quadrature(quadrature_points);
+ const Quadrature<dim> quadrature(quadrature_points);
fe_values = std::make_unique<FEValues<dim, spacedim>>(
mapping,
// We need a dummy vector with the names of the data values in the
// .vtu files in order that the .pvtu contains reference these values
- Vector<float> dummy_vector(tr->n_active_cells());
+ const Vector<float> dummy_vector(tr->n_active_cells());
data_out.add_data_vector(dummy_vector, "level");
data_out.add_data_vector(dummy_vector, "subdomain");
data_out.add_data_vector(dummy_vector, "level_subdomain");
for (unsigned int i = 1; i < n_points - 1; ++i)
boundary_points[i][0] = 1. * i / (n_points - 1);
- std::vector<double> dummy_weights(n_points, 1. / n_points);
- Quadrature<dim - 1> quadrature(boundary_points, dummy_weights);
+ const std::vector<double> dummy_weights(n_points, 1. / n_points);
+ const Quadrature<dim - 1> quadrature(boundary_points, dummy_weights);
q_projector = QProjector<dim>::project_to_all_faces(
ReferenceCells::get_hypercube<dim>(), quadrature);
for (unsigned int i = 1; i < n_points - 1; ++i)
boundary_points[i][0] = 1. * i / (n_points - 1);
- std::vector<double> dummy_weights(n_points, 1. / n_points);
- Quadrature<1> quadrature1d(boundary_points, dummy_weights);
+ const std::vector<double> dummy_weights(n_points, 1. / n_points);
+ const Quadrature<1> quadrature1d(boundary_points, dummy_weights);
// tensor product of points, only one copy
- QIterated<dim - 1> quadrature(quadrature1d, 1);
+ const QIterated<dim - 1> quadrature(quadrature1d, 1);
q_projector = std::make_unique<Quadrature<dim>>(
QProjector<dim>::project_to_all_faces(
ReferenceCells::get_hypercube<dim>(), quadrature));
for (unsigned int i = 0; i < n_points; ++i)
boundary_points[i][0] = 1. * (i + 1) / (n_points + 1);
- Quadrature<dim - 1> quadrature(boundary_points);
- Quadrature<dim> q_projector(
+ const Quadrature<dim - 1> quadrature(boundary_points);
+ const Quadrature<dim> q_projector(
QProjector<dim>::project_to_all_faces(
ReferenceCells::get_hypercube<dim>(), quadrature));
SparseMatrix<double> S(sparsity_pattern);
- QGauss<dim> quadrature(4);
+ const QGauss<dim> quadrature(4);
Assert(triangulation.all_reference_cells_are_hyper_cube(),
ExcNotImplemented());
// back to a simple GridTools::affine_cell_approximation<dim>() which
// requires 2^dim points, instead. Thus, initialize the QIterated
// quadrature with no subdivisions.
- std::vector<Point<dim>> unit_points =
+ const std::vector<Point<dim>> unit_points =
QIterated<dim>(QTrapezoid<1>(), (dim == spacedim ? 2 : 1)).get_points();
std::vector<Point<spacedim>> real_points(unit_points.size());
std::vector<std::pair<types::global_dof_index, Point<spacedim>>> points_all;
- Quadrature<patch_dim> quadrature(fe.get_unit_support_points());
+ const Quadrature<patch_dim> quadrature(fe.get_unit_support_points());
FEValues<patch_dim, spacedim> fe_values(*patch_mapping,
fe,
// patch, and an object that
// extracts the data on each
// cell to these points
- QTrapezoid<1> q_trapez;
- QIterated<dim> patch_points(q_trapez, n_subdivisions);
+ const QTrapezoid<1> q_trapez;
+ const QIterated<dim> patch_points(q_trapez, n_subdivisions);
// create collection objects from
// single quadratures,
const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
typename DerivativeDescription::Derivative &derivative)
{
- QMidpoint<dim> midpoint_rule;
+ const QMidpoint<dim> midpoint_rule;
// create collection objects from
// single quadratures, mappings,