const auto cell_worker = [&](const Iterator & cell,
ScratchData<dim> &scratch_data,
CopyData & copy_data) {
- const unsigned int n_dofs = scratch_data.fe_values.get_fe().dofs_per_cell;
+ const unsigned int n_dofs =
+ scratch_data.fe_values.get_fe().n_dofs_per_cell();
copy_data.reinit(cell, n_dofs);
scratch_data.fe_values.reinit(cell);
PreconditionBlockSSOR<SparseMatrix<double>> preconditioner;
// then assign the matrix to it and set the right block size:
- preconditioner.initialize(system_matrix, fe.dofs_per_cell);
+ preconditioner.initialize(system_matrix, fe.n_dofs_per_cell());
// After these preparations we are ready to start the linear solver.
solver.solve(system_matrix, solution, right_hand_side, preconditioner);
PreconditionBlockSSOR<SparseMatrix<double>> preconditioner;
// then assign the matrix to it and set the right block size:
- preconditioner.initialize(system_matrix, fe.dofs_per_cell);
+ preconditioner.initialize(system_matrix, fe.n_dofs_per_cell());
// After these preparations we are ready to start the linear solver.
solver.solve(system_matrix, solution, right_hand_side, preconditioner);
AssemblyScratchData & scratch_data,
AssemblyCopyData & copy_data) const
{
- const unsigned int dofs_per_cell = fe->dofs_per_cell;
+ const unsigned int dofs_per_cell = fe->n_dofs_per_cell();
const unsigned int n_q_points = quadrature->size();
copy_data.cell_matrix.reinit(dofs_per_cell, dofs_per_cell);
update_values | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = this->fe->dofs_per_cell;
+ const unsigned int dofs_per_cell = this->fe->n_dofs_per_cell();
const unsigned int n_q_points = this->quadrature->size();
Vector<double> cell_rhs(dofs_per_cell);
AssemblyScratchData & scratch_data,
AssemblyCopyData & copy_data) const
{
- const unsigned int dofs_per_cell = fe->dofs_per_cell;
+ const unsigned int dofs_per_cell = fe->n_dofs_per_cell();
const unsigned int n_q_points = quadrature->size();
copy_data.cell_matrix.reinit(dofs_per_cell, dofs_per_cell);
update_values | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = this->fe->dofs_per_cell;
+ const unsigned int dofs_per_cell = this->fe->n_dofs_per_cell();
const unsigned int n_q_points = this->quadrature->size();
Vector<double> cell_rhs(dofs_per_cell);
update_gradients | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_gradients | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
Vector<double> cell_residual(dofs_per_cell);
FEValues<dim> &fe_values = scratch_data.fe_values;
fe_values.reinit(cell);
- const unsigned int dofs_per_cell = fe_values.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = fe_values.get_fe().n_dofs_per_cell();
const unsigned int n_q_points = fe_values.get_quadrature().size();
copy_data.reinit(cell, dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
{
history_field[i][j].reinit(history_dof_handler.n_dofs());
local_history_values_at_qpoints[i][j].reinit(quadrature.size());
- local_history_fe_values[i][j].reinit(history_fe.dofs_per_cell);
+ local_history_fe_values[i][j].reinit(history_fe.n_dofs_per_cell());
}
FullMatrix<double> qpoint_to_dof_matrix (history_fe.dofs_per_cell,
will do that:
@code
FullMatrix<double> dof_to_qpoint_matrix (quadrature.size(),
- history_fe.dofs_per_cell);
+ history_fe.n_dofs_per_cell());
FETools::compute_interpolation_to_quadrature_points_matrix
(history_fe,
quadrature,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
face_quadrature_formula,
update_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
update_values | update_quadrature_points |
update_JxW_values | update_gradients);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
quadrature_formula,
update_values | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_values | update_JxW_values |
update_quadrature_points);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
Vector<double> local_nl_term(dofs_per_cell);
update_values | update_JxW_values |
update_quadrature_points);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> local_nl_matrix(dofs_per_cell, dofs_per_cell);
for (const auto &cell : dof_handler.active_cell_iterators())
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
cell_matrix.reinit(dofs_per_cell, dofs_per_cell);
cell_matrix = 0;
// that has to be provided with the <code>local_dof_values</code>,
// <code>cell->active_fe_index()</code> and a Table to store
// coefficients.
- local_dof_values.reinit(cell->get_fe().dofs_per_cell);
+ local_dof_values.reinit(cell->get_fe().n_dofs_per_cell());
cell->get_dof_values(solution, local_dof_values);
fourier->calculate(local_dof_values,
update_values | update_gradients |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
const QGauss<dim> quadrature_formula(fe.degree + 1);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FEValues<dim> fe_values(fe,
for (const auto &cell_pair : cell_list)
{
- FullMatrix<double> unit_matrix(fe.dofs_per_cell);
+ FullMatrix<double> unit_matrix(fe.n_dofs_per_cell());
for (unsigned int i = 0; i < unit_matrix.m(); ++i)
unit_matrix(i, i) = 1;
assemble_cross_group_rhs_recursive(g_prime,
group,
cell_g_prime->material_id());
- FullMatrix<double> local_mass_matrix_f(fe.dofs_per_cell,
- fe.dofs_per_cell);
- FullMatrix<double> local_mass_matrix_g(fe.dofs_per_cell,
- fe.dofs_per_cell);
+ FullMatrix<double> local_mass_matrix_f(fe.n_dofs_per_cell(),
+ fe.n_dofs_per_cell());
+ FullMatrix<double> local_mass_matrix_g(fe.n_dofs_per_cell(),
+ fe.n_dofs_per_cell());
for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
local_mass_matrix_f(i, j) +=
(fission_dist_XS * fe_values.shape_value(i, q_point) *
// or the product with the transpose matrix using <code>Tvmult</code>.
// After doing so, we transfer the result into the global right hand
// side vector of energy group $g$.
- Vector<double> g_prime_new_values(fe.dofs_per_cell);
- Vector<double> g_prime_old_values(fe.dofs_per_cell);
+ Vector<double> g_prime_new_values(fe.n_dofs_per_cell());
+ Vector<double> g_prime_old_values(fe.n_dofs_per_cell());
cell_g_prime->get_dof_values(g_prime.solution_old, g_prime_old_values);
cell_g_prime->get_dof_values(g_prime.solution, g_prime_new_values);
- Vector<double> cell_rhs(fe.dofs_per_cell);
- Vector<double> tmp(fe.dofs_per_cell);
+ Vector<double> cell_rhs(fe.n_dofs_per_cell());
+ Vector<double> tmp(fe.n_dofs_per_cell());
if (cell_g->level() > cell_g_prime->level())
{
}
std::vector<types::global_dof_index> local_dof_indices(
- fe.dofs_per_cell);
+ fe.n_dofs_per_cell());
cell_g->get_dof_indices(local_dof_indices);
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
system_rhs(local_dof_indices[i]) += cell_rhs(i);
}
child < GeometryInfo<dim>::max_children_per_cell;
++child)
{
- FullMatrix<double> new_matrix(fe.dofs_per_cell, fe.dofs_per_cell);
+ FullMatrix<double> new_matrix(fe.n_dofs_per_cell(),
+ fe.n_dofs_per_cell());
fe.get_prolongation_matrix(child).mmult(new_matrix,
prolongation_matrix);
const unsigned int n_q_points = quadrature_formula.size(),
n_face_q_points = face_quadrature_formula.size(),
- dofs_per_cell = fe.dofs_per_cell;
+ dofs_per_cell = fe.n_dofs_per_cell();
// The FEValues objects will evaluate the shape functions for us. For the
// part of the bilinear form that involves integration on $\Omega$, we'll
@endcode
where <code>local_dof_indices</code> is declared as
@code
- std::vector<types::global_dof_index> local_dof_indices (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (fe.n_dofs_per_cell());
@endcode
The name of this variable might be a bit of a misnomer -- it stands for "the
global indices of those degrees of freedom locally defined on the current
// loops a bit more readable. You will see such shortcuts in many places in
// larger programs, and `dofs_per_cell` is one that is more or less the
// conventional name for this kind of object.
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
// Now, we said that we wanted to assemble the global matrix and vector
// cell-by-cell. We could write the results directly into the global matrix,
(GeometryInfo<dim>::faces_per_cell *
GeometryInfo<dim>::max_children_per_face +
1) *
- fe.dofs_per_cell);
+ fe.n_dofs_per_cell());
DoFTools::make_flux_sparsity_pattern(dof_handler, sparsity_pattern);
template <int dim>
void DGMethod<dim>::assemble_system()
{
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dofs(dofs_per_cell);
std::vector<types::global_dof_index> dofs_neighbor(dofs_per_cell);
PreconditionBlockSSOR<SparseMatrix<double>> preconditioner;
- preconditioner.initialize(system_matrix, fe.dofs_per_cell);
+ preconditioner.initialize(system_matrix, fe.n_dofs_per_cell());
solver.solve(system_matrix, solution, right_hand_side, preconditioner);
}
update_JxW_values | update_values |
update_gradients);
- const unsigned int dofs_per_cell = stokes_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = stokes_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> local_matrix(dofs_per_cell, dofs_per_cell);
quadrature_formula,
update_values);
- const unsigned int dofs_per_cell = stokes_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = stokes_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> local_matrix(dofs_per_cell, dofs_per_cell);
update_values | update_gradients |
update_JxW_values);
- const unsigned int dofs_per_cell = temperature_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = temperature_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> local_mass_matrix(dofs_per_cell, dofs_per_cell);
quadrature_formula,
update_values);
- const unsigned int dofs_per_cell = temperature_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = temperature_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
Vector<double> local_rhs(dofs_per_cell);
const Mapping<dim> & mapping,
const UpdateFlags update_flags)
: stokes_fe_values(mapping, stokes_fe, stokes_quadrature, update_flags)
- , grad_phi_u(stokes_fe.dofs_per_cell)
- , phi_p(stokes_fe.dofs_per_cell)
+ , grad_phi_u(stokes_fe.n_dofs_per_cell())
+ , phi_p(stokes_fe.n_dofs_per_cell())
{}
temperature_fe,
stokes_quadrature,
temperature_update_flags)
- , phi_u(stokes_fe.dofs_per_cell)
- , grads_phi_u(stokes_fe.dofs_per_cell)
- , div_phi_u(stokes_fe.dofs_per_cell)
+ , phi_u(stokes_fe.n_dofs_per_cell())
+ , grads_phi_u(stokes_fe.n_dofs_per_cell())
+ , div_phi_u(stokes_fe.n_dofs_per_cell())
, old_temperature_values(stokes_quadrature.size())
{}
temperature_quadrature,
update_values | update_gradients |
update_JxW_values)
- , phi_T(temperature_fe.dofs_per_cell)
- , grad_phi_T(temperature_fe.dofs_per_cell)
+ , phi_T(temperature_fe.n_dofs_per_cell())
+ , grad_phi_T(temperature_fe.n_dofs_per_cell())
{}
stokes_fe,
quadrature,
update_values | update_gradients)
- , phi_T(temperature_fe.dofs_per_cell)
- , grad_phi_T(temperature_fe.dofs_per_cell)
+ , phi_T(temperature_fe.n_dofs_per_cell())
+ , grad_phi_T(temperature_fe.n_dofs_per_cell())
,
old_velocity_values(quadrature.size())
template <int dim>
StokesPreconditioner<dim>::StokesPreconditioner(
const FiniteElement<dim> &stokes_fe)
- : local_matrix(stokes_fe.dofs_per_cell, stokes_fe.dofs_per_cell)
- , local_dof_indices(stokes_fe.dofs_per_cell)
+ : local_matrix(stokes_fe.n_dofs_per_cell(), stokes_fe.n_dofs_per_cell())
+ , local_dof_indices(stokes_fe.n_dofs_per_cell())
{}
template <int dim>
template <int dim>
StokesSystem<dim>::StokesSystem(const FiniteElement<dim> &stokes_fe)
: StokesPreconditioner<dim>(stokes_fe)
- , local_rhs(stokes_fe.dofs_per_cell)
+ , local_rhs(stokes_fe.n_dofs_per_cell())
{}
template <int dim>
TemperatureMatrix<dim>::TemperatureMatrix(
const FiniteElement<dim> &temperature_fe)
- : local_mass_matrix(temperature_fe.dofs_per_cell,
- temperature_fe.dofs_per_cell)
- , local_stiffness_matrix(temperature_fe.dofs_per_cell,
- temperature_fe.dofs_per_cell)
- , local_dof_indices(temperature_fe.dofs_per_cell)
+ : local_mass_matrix(temperature_fe.n_dofs_per_cell(),
+ temperature_fe.n_dofs_per_cell())
+ , local_stiffness_matrix(temperature_fe.n_dofs_per_cell(),
+ temperature_fe.n_dofs_per_cell())
+ , local_dof_indices(temperature_fe.n_dofs_per_cell())
{}
template <int dim>
TemperatureRHS<dim>::TemperatureRHS(
const FiniteElement<dim> &temperature_fe)
- : local_rhs(temperature_fe.dofs_per_cell)
- , local_dof_indices(temperature_fe.dofs_per_cell)
- , matrix_for_bc(temperature_fe.dofs_per_cell,
- temperature_fe.dofs_per_cell)
+ : local_rhs(temperature_fe.n_dofs_per_cell())
+ , local_dof_indices(temperature_fe.n_dofs_per_cell())
+ , matrix_for_bc(temperature_fe.n_dofs_per_cell(),
+ temperature_fe.n_dofs_per_cell())
{}
} // namespace CopyData
} // namespace Assembly
Assembly::Scratch::StokesPreconditioner<dim> & scratch,
Assembly::CopyData::StokesPreconditioner<dim> & data)
{
- const unsigned int dofs_per_cell = stokes_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = stokes_fe.n_dofs_per_cell();
const unsigned int n_q_points =
scratch.stokes_fe_values.n_quadrature_points;
Assembly::CopyData::StokesSystem<dim> & data)
{
const unsigned int dofs_per_cell =
- scratch.stokes_fe_values.get_fe().dofs_per_cell;
+ scratch.stokes_fe_values.get_fe().n_dofs_per_cell();
const unsigned int n_q_points =
scratch.stokes_fe_values.n_quadrature_points;
Assembly::CopyData::TemperatureMatrix<dim> & data)
{
const unsigned int dofs_per_cell =
- scratch.temperature_fe_values.get_fe().dofs_per_cell;
+ scratch.temperature_fe_values.get_fe().n_dofs_per_cell();
const unsigned int n_q_points =
scratch.temperature_fe_values.n_quadrature_points;
const bool use_bdf2_scheme = (timestep_number != 0);
const unsigned int dofs_per_cell =
- scratch.temperature_fe_values.get_fe().dofs_per_cell;
+ scratch.temperature_fe_values.get_fe().n_dofs_per_cell();
const unsigned int n_q_points =
scratch.temperature_fe_values.n_quadrature_points;
{
std::vector<types::global_dof_index> local_joint_dof_indices(
- joint_fe.dofs_per_cell);
+ joint_fe.n_dofs_per_cell());
std::vector<types::global_dof_index> local_stokes_dof_indices(
- stokes_fe.dofs_per_cell);
+ stokes_fe.n_dofs_per_cell());
std::vector<types::global_dof_index> local_temperature_dof_indices(
- temperature_fe.dofs_per_cell);
+ temperature_fe.n_dofs_per_cell());
typename DoFHandler<dim>::active_cell_iterator
joint_cell = joint_dof_handler.begin_active(),
stokes_cell->get_dof_indices(local_stokes_dof_indices);
temperature_cell->get_dof_indices(local_temperature_dof_indices);
- for (unsigned int i = 0; i < joint_fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < joint_fe.n_dofs_per_cell(); ++i)
if (joint_fe.system_to_base_index(i).first.first == 0)
{
Assert(joint_fe.system_to_base_index(i).second <
const Vector<double> & solution,
Vector<double> & refinement_indicators)
{
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
std::vector<unsigned int> dofs(dofs_per_cell);
const QMidpoint<dim> quadrature_formula;
template <int dim>
void ConservationLaw<dim>::assemble_system()
{
- const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
std::vector<types::global_dof_index> dof_indices_neighbor(dofs_per_cell);
const unsigned int n_q_points = fe_v.n_quadrature_points;
- std::vector<types::global_dof_index> local_dof_indices(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(
+ fe.n_dofs_per_cell());
std::vector<Vector<double>> cell_wind(n_q_points, Vector<double>(dim));
double normal_wind;
// cell. This is done using a vector of fe.dofs_per_cell elements, which
// will then be distributed to the matrix in the global row $i$. The
// following object will hold this information:
- Vector<double> local_matrix_row_i(fe.dofs_per_cell);
+ Vector<double> local_matrix_row_i(fe.n_dofs_per_cell());
// The index $i$ runs on the collocation points, which are the support
// points of the $i$th basis function, while $j$ runs on inner integration
bool is_singular = false;
unsigned int singular_index = numbers::invalid_unsigned_int;
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
if (local_dof_indices[j] == i)
{
singular_index = j;
system_rhs(i) += (LaplaceKernel::single_layer(R) *
normal_wind * fe_v.JxW(q));
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
local_matrix_row_i(j) -=
((LaplaceKernel::double_layer(R) * normals[q]) *
system_rhs(i) += (LaplaceKernel::single_layer(R) *
normal_wind * fe_v_singular.JxW(q));
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
{
local_matrix_row_i(j) -=
((LaplaceKernel::double_layer(R) *
// Finally, we need to add the contributions of the current cell
// to the global matrix.
- for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_cell(); ++j)
system_matrix(i, local_dof_indices[j]) += local_matrix_row_i(j);
}
}
const DoFHandler<2, 3>::active_cell_iterator &,
const unsigned int index) const
{
- Assert(index < fe.dofs_per_cell, ExcIndexRange(0, fe.dofs_per_cell, index));
+ Assert(index < fe.n_dofs_per_cell(),
+ ExcIndexRange(0, fe.n_dofs_per_cell(), index));
static std::vector<QGaussOneOverR<2>> quadratures;
if (quadratures.size() == 0)
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
quadratures.emplace_back(singular_quadrature_order,
fe.get_unit_support_points()[i],
true);
const DoFHandler<1, 2>::active_cell_iterator &cell,
const unsigned int index) const
{
- Assert(index < fe.dofs_per_cell, ExcIndexRange(0, fe.dofs_per_cell, index));
+ Assert(index < fe.n_dofs_per_cell(),
+ ExcIndexRange(0, fe.n_dofs_per_cell(), index));
static Quadrature<1> *q_pointer = nullptr;
if (q_pointer)
const unsigned int n_q_points = fe_v.n_quadrature_points;
- std::vector<types::global_dof_index> dofs(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs(fe.n_dofs_per_cell());
std::vector<double> local_phi(n_q_points);
std::vector<double> normal_wind(n_q_points);
const QGauss<dim> &quad,
const UpdateFlags flags)
: nqp(quad.size())
- , dpc(fe.dofs_per_cell)
+ , dpc(fe.n_dofs_per_cell())
, u_star_local(nqp)
, grad_u_star(nqp)
, u_star_tmp(nqp)
}
InitGradPerTaskData per_task_data(0,
- fe_velocity.dofs_per_cell,
- fe_pressure.dofs_per_cell);
+ fe_velocity.n_dofs_per_cell(),
+ fe_pressure.n_dofs_per_cell());
InitGradScratchData scratch_data(fe_velocity,
fe_pressure,
quadrature_velocity,
void NavierStokesProjection<dim>::assemble_advection_term()
{
vel_Advection = 0.;
- AdvectionPerTaskData data(fe_velocity.dofs_per_cell);
+ AdvectionPerTaskData data(fe_velocity.n_dofs_per_cell());
AdvectionScratchData scratch(fe_velocity,
quadrature_velocity,
update_values | update_JxW_values |
void NavierStokesProjection<dim>::copy_advection_local_to_global(
const AdvectionPerTaskData &data)
{
- for (unsigned int i = 0; i < fe_velocity.dofs_per_cell; ++i)
- for (unsigned int j = 0; j < fe_velocity.dofs_per_cell; ++j)
+ for (unsigned int i = 0; i < fe_velocity.n_dofs_per_cell(); ++i)
+ for (unsigned int j = 0; j < fe_velocity.n_dofs_per_cell(); ++j)
vel_Advection.add(data.local_dof_indices[i],
data.local_dof_indices[j],
data.local_advection(i, j));
ExcInternalError());
Vector<double> joint_solution(joint_dof_handler.n_dofs());
std::vector<types::global_dof_index> loc_joint_dof_indices(
- joint_fe.dofs_per_cell),
- loc_vel_dof_indices(fe_velocity.dofs_per_cell),
- loc_pres_dof_indices(fe_pressure.dofs_per_cell);
+ joint_fe.n_dofs_per_cell()),
+ loc_vel_dof_indices(fe_velocity.n_dofs_per_cell()),
+ loc_pres_dof_indices(fe_pressure.n_dofs_per_cell());
typename DoFHandler<dim>::active_cell_iterator
joint_cell = joint_dof_handler.begin_active(),
joint_endc = joint_dof_handler.end(),
joint_cell->get_dof_indices(loc_joint_dof_indices);
vel_cell->get_dof_indices(loc_vel_dof_indices);
pres_cell->get_dof_indices(loc_pres_dof_indices);
- for (unsigned int i = 0; i < joint_fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < joint_fe.n_dofs_per_cell(); ++i)
switch (joint_fe.system_to_base_index(i).first.first)
{
case 0:
quadrature_velocity,
update_gradients | update_JxW_values |
update_values);
- const unsigned int dpc = fe_velocity.dofs_per_cell,
+ const unsigned int dpc = fe_velocity.n_dofs_per_cell(),
nqp = quadrature_velocity.size();
std::vector<types::global_dof_index> ldi(dpc);
Vector<double> loc_rot(dpc);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_stiffness_matrix(dofs_per_cell, dofs_per_cell);
update_gradients | update_JxW_values|
update_quadrature_points);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix (dofs_per_cell, dofs_per_cell);
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
// are presently using, but the FiniteElement class does all the necessary
// work for you and you don't have to care about the dimension dependent
// parts:
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs(dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
quadrature_formula,
update_values | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
for (const auto &cell : dof_handler.active_cell_iterators())
for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell; ++v)
{
- Assert(dof_handler.get_fe().dofs_per_cell ==
+ Assert(dof_handler.get_fe().n_dofs_per_cell() ==
GeometryInfo<dim>::vertices_per_cell,
ExcNotImplemented());
face_quadrature_formula,
update_values | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_face_q_points = face_quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
face_quadrature,
update_quadrature_points);
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
const unsigned int n_face_q_points = face_quadrature.size();
std::vector<types::global_dof_index> dof_indices(dofs_per_face);
update_values | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
update_values | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
quadrature_formula,
update_values);
- const unsigned int dofs_per_cell = darcy_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = darcy_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
std::vector<Tensor<2, dim>> k_inverse_values(n_q_points);
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = darcy_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = darcy_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
quadrature_formula,
update_values | update_JxW_values);
- const unsigned int dofs_per_cell = saturation_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = saturation_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
saturation_fe, face_quadrature_formula, update_values);
const unsigned int dofs_per_cell =
- saturation_dof_handler.get_fe().dofs_per_cell;
+ saturation_dof_handler.get_fe().n_dofs_per_cell();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
const double global_max_u_F_prime = get_max_u_F_prime();
{
std::vector<types::global_dof_index> local_joint_dof_indices(
- joint_fe.dofs_per_cell);
+ joint_fe.n_dofs_per_cell());
std::vector<types::global_dof_index> local_darcy_dof_indices(
- darcy_fe.dofs_per_cell);
+ darcy_fe.n_dofs_per_cell());
std::vector<types::global_dof_index> local_saturation_dof_indices(
- saturation_fe.dofs_per_cell);
+ saturation_fe.n_dofs_per_cell());
auto joint_cell = joint_dof_handler.begin_active();
const auto joint_endc = joint_dof_handler.end();
darcy_cell->get_dof_indices(local_darcy_dof_indices);
saturation_cell->get_dof_indices(local_saturation_dof_indices);
- for (unsigned int i = 0; i < joint_fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < joint_fe.n_dofs_per_cell(); ++i)
if (joint_fe.system_to_base_index(i).first.first == 0)
{
Assert(joint_fe.system_to_base_index(i).second <
1)
, // dilatation
dof_handler(triangulation)
- , dofs_per_cell(fe.dofs_per_cell)
+ , dofs_per_cell(fe.n_dofs_per_cell())
, u_fe(first_u_component)
, p_fe(p_component)
, J_fe(J_component)
const QGauss<dim> & qf_cell,
const UpdateFlags uf_cell)
: fe_values(fe_cell, qf_cell, uf_cell)
- , Nx(qf_cell.size(), std::vector<double>(fe_cell.dofs_per_cell))
+ , Nx(qf_cell.size(), std::vector<double>(fe_cell.n_dofs_per_cell()))
, grad_Nx(qf_cell.size(),
- std::vector<Tensor<2, dim>>(fe_cell.dofs_per_cell))
+ std::vector<Tensor<2, dim>>(fe_cell.n_dofs_per_cell()))
, symm_grad_Nx(qf_cell.size(),
std::vector<SymmetricTensor<2, dim>>(
- fe_cell.dofs_per_cell))
+ fe_cell.n_dofs_per_cell()))
{}
ScratchData_K(const ScratchData_K &rhs)
const UpdateFlags uf_face)
: fe_values(fe_cell, qf_cell, uf_cell)
, fe_face_values(fe_cell, qf_face, uf_face)
- , Nx(qf_cell.size(), std::vector<double>(fe_cell.dofs_per_cell))
+ , Nx(qf_cell.size(), std::vector<double>(fe_cell.n_dofs_per_cell()))
, symm_grad_Nx(qf_cell.size(),
std::vector<SymmetricTensor<2, dim>>(
- fe_cell.dofs_per_cell))
+ fe_cell.n_dofs_per_cell()))
{}
ScratchData_RHS(const ScratchData_RHS &rhs)
element_indices_p.clear();
element_indices_J.clear();
- for (unsigned int k = 0; k < fe.dofs_per_cell; ++k)
+ for (unsigned int k = 0; k < fe.n_dofs_per_cell(); ++k)
{
const unsigned int k_group = fe.system_to_base_index(k).first.first;
if (k_group == u_dof)
update_values | update_quadrature_points |
update_JxW_values | update_gradients);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
functions that are constant zero. A particular property of this
peculiar linear vector space is that it has no degrees of freedom: it
isn't just finite dimensional, it is in fact zero dimensional, and
-consequently for objects of this type, FiniteElement::dofs_per_cell
+consequently for objects of this type, FiniteElement::n_dofs_per_cell()
will return zero. For discussion below, let us give this space a
proper symbol:
@f[
// introduction:
{
std::vector<types::global_dof_index> local_face_dof_indices(
- stokes_fe.dofs_per_face);
+ stokes_fe.n_dofs_per_face());
for (const auto &cell : dof_handler.active_cell_iterators())
if (cell_is_in_fluid_domain(cell))
for (unsigned int face_no : GeometryInfo<dim>::face_indices())
// ...to objects that are needed to describe the local contributions to
// the global linear system...
- const unsigned int stokes_dofs_per_cell = stokes_fe.dofs_per_cell;
- const unsigned int elasticity_dofs_per_cell = elasticity_fe.dofs_per_cell;
+ const unsigned int stokes_dofs_per_cell = stokes_fe.n_dofs_per_cell();
+ const unsigned int elasticity_dofs_per_cell =
+ elasticity_fe.n_dofs_per_cell();
FullMatrix<double> local_matrix;
FullMatrix<double> local_interface_matrix(elasticity_dofs_per_cell,
const FEValues<dim> &fe_values = hp_fe_values.get_present_fe_values();
- local_matrix.reinit(cell->get_fe().dofs_per_cell,
- cell->get_fe().dofs_per_cell);
- local_rhs.reinit(cell->get_fe().dofs_per_cell);
+ local_matrix.reinit(cell->get_fe().n_dofs_per_cell(),
+ cell->get_fe().n_dofs_per_cell());
+ local_rhs.reinit(cell->get_fe().n_dofs_per_cell());
// With all of this done, we continue to assemble the cell terms for
// cells that are part of the Stokes and elastic regions. While we
// documentation module for the elasticity equations:
if (cell_is_in_fluid_domain(cell))
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
Assert(dofs_per_cell == stokes_dofs_per_cell, ExcInternalError());
for (unsigned int q = 0; q < fe_values.n_quadrature_points; ++q)
}
else
{
- const unsigned int dofs_per_cell = cell->get_fe().dofs_per_cell;
+ const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
Assert(dofs_per_cell == elasticity_dofs_per_cell,
ExcInternalError());
// along since the elimination of nonzero boundary values requires the
// modification of local and consequently also global right hand side
// values:
- local_dof_indices.resize(cell->get_fe().dofs_per_cell);
+ local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
cell->get_dof_indices(local_dof_indices);
constraints.distribute_local_to_global(local_matrix,
local_rhs,
const ExactSolution::RightHandSide<dim> right_hand_side;
const unsigned int dofs_per_cell =
- scratch_data.fe_values.get_fe().dofs_per_cell;
+ scratch_data.fe_values.get_fe().n_dofs_per_cell();
for (unsigned int qpoint = 0; qpoint < fe_values.n_quadrature_points;
++qpoint)
update_values | update_gradients |
update_hessians | update_quadrature_points |
update_JxW_values | update_normal_vectors);
- CopyData copy_data(dof_handler.get_fe().dofs_per_cell);
+ CopyData copy_data(dof_handler.get_fe().n_dofs_per_cell());
MeshWorker::mesh_loop(dof_handler.begin_active(),
dof_handler.end(),
cell_worker,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs(dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
{
DynamicSparsityPattern dsp(dof_handler.n_dofs());
DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, false);
- sparsity_pattern.copy_from(dsp, fe.dofs_per_face);
+ sparsity_pattern.copy_from(dsp, fe.n_dofs_per_face());
}
system_matrix.reinit(sparsity_pattern);
}
face_quadrature_formula,
local_face_flags)
, fe_face_values(fe, face_quadrature_formula, flags)
- , ll_matrix(fe_local.dofs_per_cell, fe_local.dofs_per_cell)
- , lf_matrix(fe_local.dofs_per_cell, fe.dofs_per_cell)
- , fl_matrix(fe.dofs_per_cell, fe_local.dofs_per_cell)
- , tmp_matrix(fe.dofs_per_cell, fe_local.dofs_per_cell)
- , l_rhs(fe_local.dofs_per_cell)
- , tmp_rhs(fe_local.dofs_per_cell)
- , q_phi(fe_local.dofs_per_cell)
- , q_phi_div(fe_local.dofs_per_cell)
- , u_phi(fe_local.dofs_per_cell)
- , u_phi_grad(fe_local.dofs_per_cell)
- , tr_phi(fe.dofs_per_cell)
+ , ll_matrix(fe_local.n_dofs_per_cell(), fe_local.n_dofs_per_cell())
+ , lf_matrix(fe_local.n_dofs_per_cell(), fe.n_dofs_per_cell())
+ , fl_matrix(fe.n_dofs_per_cell(), fe_local.n_dofs_per_cell())
+ , tmp_matrix(fe.n_dofs_per_cell(), fe_local.n_dofs_per_cell())
+ , l_rhs(fe_local.n_dofs_per_cell())
+ , tmp_rhs(fe_local.n_dofs_per_cell())
+ , q_phi(fe_local.n_dofs_per_cell())
+ , q_phi_div(fe_local.n_dofs_per_cell())
+ , u_phi(fe_local.n_dofs_per_cell())
+ , u_phi_grad(fe_local.n_dofs_per_cell())
+ , tr_phi(fe.n_dofs_per_cell())
, trace_values(face_quadrature_formula.size())
, fe_local_support_on_face(GeometryInfo<dim>::faces_per_cell)
, fe_support_on_face(GeometryInfo<dim>::faces_per_cell)
, exact_solution()
{
for (unsigned int face_no : GeometryInfo<dim>::face_indices())
- for (unsigned int i = 0; i < fe_local.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe_local.n_dofs_per_cell(); ++i)
{
if (fe_local.has_support_on_face(i, face_no))
fe_local_support_on_face[face_no].push_back(i);
}
for (unsigned int face_no : GeometryInfo<dim>::face_indices())
- for (unsigned int i = 0; i < fe.dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
{
if (fe.has_support_on_face(i, face_no))
fe_support_on_face[face_no].push_back(i);
, fe_values(fe, quadrature_formula, flags)
, u_values(quadrature_formula.size())
, u_gradients(quadrature_formula.size())
- , cell_matrix(fe.dofs_per_cell, fe.dofs_per_cell)
- , cell_rhs(fe.dofs_per_cell)
- , cell_sol(fe.dofs_per_cell)
+ , cell_matrix(fe.n_dofs_per_cell(), fe.n_dofs_per_cell())
+ , cell_rhs(fe.n_dofs_per_cell())
+ , cell_sol(fe.n_dofs_per_cell())
{}
PostProcessScratchData(const PostProcessScratchData &sd)
const UpdateFlags flags(update_values | update_normal_vectors |
update_quadrature_points | update_JxW_values);
- PerTaskData task_data(fe.dofs_per_cell, trace_reconstruct);
+ PerTaskData task_data(fe.n_dofs_per_cell(), trace_reconstruct);
ScratchData scratch(fe,
fe_local,
quadrature_formula,
scratch.fe_face_values_local.get_quadrature().size();
const unsigned int loc_dofs_per_cell =
- scratch.fe_values_local.get_fe().dofs_per_cell;
+ scratch.fe_values_local.get_fe().n_dofs_per_cell();
const FEValuesExtractors::Vector fluxes(0);
const FEValuesExtractors::Scalar scalar(dim);
update_values | update_gradients | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
Vector<double> cell_source(dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_values | update_quadrature_points |
update_JxW_values | update_gradients);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
update_values | update_quadrature_points |
update_JxW_values | update_gradients);
- const unsigned int dofs_per_cell = velocity_fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = velocity_fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
update_values | update_quadrature_points |
update_JxW_values | update_gradients);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
const FEValuesExtractors::Vector velocities(0);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<std::complex<double>> cell_matrix_lhs(dofs_per_cell,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs(dofs_per_cell);
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
- const unsigned int dofs_per_cell_dgrt = fe_dgrt.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
+ const unsigned int dofs_per_cell_dgrt = fe_dgrt.n_dofs_per_cell();
const unsigned int n_q_points = fe_values.get_quadrature().size();
const unsigned int n_q_points_dgrt = fe_values_dgrt.get_quadrature().size();
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
- const unsigned int dofs_per_cell_dgrt = fe_dgrt.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
+ const unsigned int dofs_per_cell_dgrt = fe_dgrt.n_dofs_per_cell();
const unsigned int n_q_points = fe_values.get_quadrature().size();
const unsigned int n_q_points_dgrt = fe_values_dgrt.get_quadrature().size();
quadrature_formula,
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<std::complex<double>> cell_matrix(dofs_per_cell, dofs_per_cell);
quadrature_cache.resize(triangulation.n_locally_owned_active_cells() *
quadrature_formula.size(),
- QuadratureCache<dim>(fe.dofs_per_cell));
+ QuadratureCache<dim>(fe.n_dofs_per_cell()));
unsigned int cache_index = 0;
for (const auto &cell : triangulation.active_cell_iterators())
if (cell->is_locally_owned())
copy_data.level = cell->level();
const unsigned int dofs_per_cell =
- scratch_data.fe_values.get_fe().dofs_per_cell;
+ scratch_data.fe_values.get_fe().n_dofs_per_cell();
copy_data.dofs_per_cell = dofs_per_cell;
copy_data.cell_matrix.reinit(dofs_per_cell, dofs_per_cell);
update_values | update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
Vector<double> cell_rhs(dofs_per_cell);
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
DynamicSparsityPattern dsp(n_locally_relevant, n_locally_relevant);
- const auto dofs_per_cell = discretization->finite_element.dofs_per_cell;
+ const auto dofs_per_cell =
+ discretization->finite_element.n_dofs_per_cell();
std::vector<types::global_dof_index> dof_indices(dofs_per_cell);
for (const auto &cell : dof_handler.active_cell_iterators())
for (auto &matrix : nij_matrix)
matrix = 0.;
- unsigned int dofs_per_cell = discretization->finite_element.dofs_per_cell;
- unsigned int n_q_points = discretization->quadrature.size();
+ unsigned int dofs_per_cell =
+ discretization->finite_element.n_dofs_per_cell();
+ unsigned int n_q_points = discretization->quadrature.size();
// What follows is the initialization of the scratch data required by
// WorkStream
const unsigned int n_q_points = quadrature_formula.size();
const unsigned int n_face_q_points = face_quadrature_formula.size();
- const unsigned int dofs_per_cell = fe->dofs_per_cell;
+ const unsigned int dofs_per_cell = fe->n_dofs_per_cell();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
Vector<double> cell_rhs(dofs_per_cell);
update_quadrature_points |
update_JxW_values);
- const unsigned int dofs_per_cell = fluid_fe->dofs_per_cell;
+ const unsigned int dofs_per_cell = fluid_fe->n_dofs_per_cell();
const unsigned int n_q_points = fluid_quadrature_formula->size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
SolidVelocity<spacedim> solid_velocity(par.angular_velocity);
std::vector<types::global_dof_index> fluid_dof_indices(
- fluid_fe->dofs_per_cell);
+ fluid_fe->n_dofs_per_cell());
- FullMatrix<double> local_matrix(fluid_fe->dofs_per_cell,
- fluid_fe->dofs_per_cell);
- dealii::Vector<double> local_rhs(fluid_fe->dofs_per_cell);
+ FullMatrix<double> local_matrix(fluid_fe->n_dofs_per_cell(),
+ fluid_fe->n_dofs_per_cell());
+ dealii::Vector<double> local_rhs(fluid_fe->n_dofs_per_cell());
const auto penalty_parameter =
1.0 / GridTools::minimal_cell_diameter(fluid_tria);
const auto &real_q = p.get_location();
const auto &JxW = p.get_properties()[0];
- for (unsigned int i = 0; i < fluid_fe->dofs_per_cell; ++i)
+ for (unsigned int i = 0; i < fluid_fe->n_dofs_per_cell(); ++i)
{
const auto comp_i =
fluid_fe->system_to_component_index(i).first;
if (comp_i < spacedim)
{
- for (unsigned int j = 0; j < fluid_fe->dofs_per_cell; ++j)
+ for (unsigned int j = 0; j < fluid_fe->n_dofs_per_cell();
+ ++j)
{
const auto comp_j =
fluid_fe->system_to_component_index(j).first;
update_values | update_gradients |
update_quadrature_points | update_JxW_values);
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points = quadrature_formula.size();
FullMatrix<double> cell_matrix(dofs_per_cell, dofs_per_cell);
AssemblyCopyData & copy_data)
{
// We define some abbreviations to avoid unnecessarily long lines:
- const unsigned int dofs_per_cell = fe.dofs_per_cell;
+ const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
const unsigned int n_q_points =
scratch_data.fe_values.get_quadrature().size();
const unsigned int n_face_q_points =
accessor.set_mg_vertex_dof_index(
level, vertex, dof, *next++, fe_index);
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
accessor.set_mg_dof_index(level, dof, *next++);
Assert(next == dof_indices.end(), ExcInternalError());
level, vertex, dof, *next++, fe_index);
for (unsigned int line = 0; line < accessor.n_lines(); ++line)
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
accessor.line(line)->set_mg_dof_index(level, dof, *next++);
- for (unsigned int dof = 0; dof < fe.dofs_per_quad; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_quad(); ++dof)
accessor.set_mg_dof_index(level, dof, *next++);
Assert(next == dof_indices.end(), ExcInternalError());
level, vertex, dof, *next++, fe_index);
for (unsigned int line = 0; line < accessor.n_lines(); ++line)
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
accessor.line(line)->set_mg_dof_index(
level,
fe.adjust_line_dof_index_for_line_orientation(
*next++);
for (unsigned int quad = 0; quad < accessor.n_faces(); ++quad)
- for (unsigned int dof = 0; dof < fe.dofs_per_quad; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_quad(); ++dof)
accessor.quad(quad)->set_mg_dof_index(
level,
fe.adjust_quad_dof_index_for_face_orientation(
accessor.face_rotation(quad)),
*next++);
- for (unsigned int dof = 0; dof < fe.dofs_per_hex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_hex(); ++dof)
accessor.set_mg_dof_index(level, dof, *next++);
Assert(next == dof_indices.end(), ExcInternalError());
{
const unsigned int //
dofs_per_vertex = accessor.get_fe(fe_index).n_dofs_per_vertex(), //
- dofs_per_line = accessor.get_fe(fe_index).dofs_per_line, //
- dofs_per_quad = accessor.get_fe(fe_index).dofs_per_quad, //
- dofs_per_hex = accessor.get_fe(fe_index).dofs_per_hex; //
+ dofs_per_line = accessor.get_fe(fe_index).n_dofs_per_line(), //
+ dofs_per_quad = accessor.get_fe(fe_index).n_dofs_per_quad(), //
+ dofs_per_hex = accessor.get_fe(fe_index).n_dofs_per_hex(); //
const unsigned int inner_dofs =
structdim == 1 ? dofs_per_line :
for (unsigned int dof = 0; dof < fe.n_dofs_per_vertex(); ++dof)
*next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
*next++ = accessor.mg_dof_index(level, dof);
Assert(next == dof_indices.end(), ExcInternalError());
*next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
for (unsigned int line = 0; line < accessor.n_lines(); ++line)
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
*next++ = accessor.line(line)->mg_dof_index(level, dof);
- for (unsigned int dof = 0; dof < fe.dofs_per_quad; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_quad(); ++dof)
*next++ = accessor.mg_dof_index(level, dof);
Assert(next == dof_indices.end(), ExcInternalError());
*next++ = accessor.mg_vertex_dof_index(level, vertex, dof);
for (unsigned int line = 0; line < accessor.n_lines(); ++line)
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
*next++ = accessor.line(line)->mg_dof_index(
level,
accessor.get_fe(fe_index)
dof, accessor.line_orientation(line)));
for (unsigned int quad = 0; quad < accessor.n_faces(); ++quad)
- for (unsigned int dof = 0; dof < fe.dofs_per_quad; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_quad(); ++dof)
*next++ = accessor.quad(quad)->mg_dof_index(
level,
accessor.get_fe(fe_index)
accessor.face_flip(quad),
accessor.face_rotation(quad)));
- for (unsigned int dof = 0; dof < fe.dofs_per_hex; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_hex(); ++dof)
*next++ = accessor.mg_dof_index(level, dof);
Assert(next == dof_indices.end(), ExcInternalError());
Assert(dof_indices.size() ==
(this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
- this->dof_handler->get_fe(fe_index).dofs_per_line),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line()),
ExcVectorDoesNotMatch());
break;
case 2:
(this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
- this->dof_handler->get_fe(fe_index).dofs_per_line +
- this->dof_handler->get_fe(fe_index).dofs_per_quad),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line() +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_quad()),
ExcVectorDoesNotMatch());
break;
case 3:
(this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
- this->dof_handler->get_fe(fe_index).dofs_per_line +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line() +
this->n_faces() *
- this->dof_handler->get_fe(fe_index).dofs_per_quad +
- this->dof_handler->get_fe(fe_index).dofs_per_hex),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_quad() +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_hex()),
ExcVectorDoesNotMatch());
break;
default:
Assert(dof_indices.size() ==
(this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
- this->dof_handler->get_fe(fe_index).dofs_per_line),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line()),
ExcVectorDoesNotMatch());
break;
case 2:
(this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
- this->dof_handler->get_fe(fe_index).dofs_per_line +
- this->dof_handler->get_fe(fe_index).dofs_per_quad),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line() +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_quad()),
ExcVectorDoesNotMatch());
break;
case 3:
(this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
- this->dof_handler->get_fe(fe_index).dofs_per_line +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line() +
this->n_faces() *
- this->dof_handler->get_fe(fe_index).dofs_per_quad +
- this->dof_handler->get_fe(fe_index).dofs_per_hex),
+ this->dof_handler->get_fe(fe_index).n_dofs_per_quad() +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_hex()),
ExcVectorDoesNotMatch());
break;
default:
Assert(dof_indices.size() ==
this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
- this->dof_handler->get_fe(fe_index).dofs_per_line,
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line(),
ExcVectorDoesNotMatch());
break;
}
this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
- this->dof_handler->get_fe(fe_index).dofs_per_line +
- this->dof_handler->get_fe(fe_index).dofs_per_quad,
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line() +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_quad(),
ExcVectorDoesNotMatch());
break;
}
this->n_vertices() *
this->dof_handler->get_fe(fe_index).n_dofs_per_vertex() +
this->n_lines() *
- this->dof_handler->get_fe(fe_index).dofs_per_line +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_line() +
this->n_faces() *
- this->dof_handler->get_fe(fe_index).dofs_per_quad +
- this->dof_handler->get_fe(fe_index).dofs_per_hex,
+ this->dof_handler->get_fe(fe_index).n_dofs_per_quad() +
+ this->dof_handler->get_fe(fe_index).n_dofs_per_hex(),
ExcVectorDoesNotMatch());
break;
}
// just go through the usual cases, taking into account how DoFs
// are enumerated on the reference cell
- if (cell_dof_index < this->first_line_index)
+ if (cell_dof_index < this->get_first_line_index())
return GeometryPrimitive::vertex;
- else if (cell_dof_index < this->first_quad_index)
+ else if (cell_dof_index < this->get_first_quad_index())
return GeometryPrimitive::line;
- else if (cell_dof_index < this->first_hex_index)
+ else if (cell_dof_index < this->get_first_hex_index())
return GeometryPrimitive::quad;
else
return GeometryPrimitive::hex;
*/
bool
operator==(const FiniteElementData &) const;
+
+ /**
+ * Return first index of dof on a line.
+ */
+ unsigned int
+ get_first_line_index() const;
+
+ /**
+ * Return first index of dof on a quad.
+ */
+ unsigned int
+ get_first_quad_index() const;
+
+ /**
+ * Return first index of dof on a hexahedron.
+ */
+ unsigned int
+ get_first_hex_index() const;
+
+ /**
+ * Return first index of dof on a line for face data.
+ */
+ unsigned int
+ get_first_face_line_index() const;
+
+ /**
+ * Return first index of dof on a quad for face data.
+ */
+ unsigned int
+ get_first_face_quad_index() const;
};
}
+
+template <int dim>
+unsigned int
+FiniteElementData<dim>::get_first_line_index() const
+{
+ return first_line_index;
+}
+
+template <int dim>
+unsigned int
+FiniteElementData<dim>::get_first_quad_index() const
+{
+ return first_quad_index;
+}
+
+template <int dim>
+unsigned int
+FiniteElementData<dim>::get_first_hex_index() const
+{
+ return first_hex_index;
+}
+
+template <int dim>
+unsigned int
+FiniteElementData<dim>::get_first_face_line_index() const
+{
+ return first_face_line_index;
+}
+
+template <int dim>
+unsigned int
+FiniteElementData<dim>::get_first_face_quad_index() const
+{
+ return first_face_quad_index;
+}
+
+
#endif // DOXYGEN
case 3:
{
// Fill data for quad shape functions
- if (this->dofs_per_quad != 0)
+ if (this->n_dofs_per_quad() != 0)
{
const unsigned int foffset =
- this->first_quad_index + this->dofs_per_quad * face_no;
- for (unsigned int k = 0; k < this->dofs_per_quad; ++k)
+ this->get_first_quad_index() +
+ this->n_dofs_per_quad() * face_no;
+ for (unsigned int k = 0; k < this->n_dofs_per_quad(); ++k)
output_data.shape_values(foffset + k, i) =
fe_data
- .shape_values[k + this->first_face_quad_index][i];
+ .shape_values[k + this->get_first_face_quad_index()]
+ [i];
}
}
DEAL_II_FALLTHROUGH;
case 2:
{
// Fill data for line shape functions
- if (this->dofs_per_line != 0)
+ if (this->n_dofs_per_line() != 0)
{
- const unsigned int foffset = this->first_line_index;
+ const unsigned int foffset = this->get_first_line_index();
for (unsigned int line = 0;
line < GeometryInfo<dim>::lines_per_face;
++line)
{
- for (unsigned int k = 0; k < this->dofs_per_line; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_line();
+ ++k)
output_data.shape_values(
foffset +
GeometryInfo<dim>::face_to_cell_lines(face_no,
line) *
- this->dofs_per_line +
+ this->n_dofs_per_line() +
k,
- i) =
- fe_data
- .shape_values[k + (line * this->dofs_per_line) +
- this->first_face_line_index][i];
+ i) = fe_data.shape_values
+ [k + (line * this->n_dofs_per_line()) +
+ this->get_first_face_line_index()][i];
}
}
}
multiplied_dofs_per_vertex +=
fes[i]->n_dofs_per_vertex() * multiplicities[i];
multiplied_dofs_per_line +=
- fes[i]->dofs_per_line * multiplicities[i];
+ fes[i]->n_dofs_per_line() * multiplicities[i];
multiplied_dofs_per_quad +=
- fes[i]->dofs_per_quad * multiplicities[i];
- multiplied_dofs_per_hex += fes[i]->dofs_per_hex * multiplicities[i];
+ fes[i]->n_dofs_per_quad() * multiplicities[i];
+ multiplied_dofs_per_hex +=
+ fes[i]->n_dofs_per_hex() * multiplicities[i];
multiplied_n_components +=
fes[i]->n_components() * multiplicities[i];
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_line;
+ local_index < fes[base]->n_dofs_per_line();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_line * line_number + local_index +
- fes[base]->first_line_index);
+ (fes[base]->n_dofs_per_line() * line_number + local_index +
+ fes[base]->get_first_line_index());
Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_quad;
+ local_index < fes[base]->n_dofs_per_quad();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_quad * quad_number + local_index +
- fes[base]->first_quad_index);
+ (fes[base]->n_dofs_per_quad() * quad_number + local_index +
+ fes[base]->get_first_quad_index());
Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
for (unsigned int base = 0; base < fes.size(); ++base)
for (unsigned int m = 0; m < multiplicities[base]; ++m)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_hex;
+ local_index < fes[base]->n_dofs_per_hex();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_hex * hex_number + local_index +
- fes[base]->first_hex_index);
+ (fes[base]->n_dofs_per_hex() * hex_number + local_index +
+ fes[base]->get_first_hex_index());
Assert(index_in_base < fes[base]->n_dofs_per_cell(),
ExcInternalError());
comp_start +=
fes[base]->n_components() * do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_line;
+ local_index < fes[base]->n_dofs_per_line();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_line * line_number + local_index +
- fes[base]->first_line_index);
+ (fes[base]->n_dofs_per_line() * line_number + local_index +
+ fes[base]->get_first_line_index());
Assert(comp_start + fes[base]->n_components() <=
retval[total_index].size(),
comp_start +=
fes[base]->n_components() * do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_quad;
+ local_index < fes[base]->n_dofs_per_quad();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_quad * quad_number + local_index +
- fes[base]->first_quad_index);
+ (fes[base]->n_dofs_per_quad() * quad_number + local_index +
+ fes[base]->get_first_quad_index());
Assert(comp_start + fes[base]->n_components() <=
retval[total_index].size(),
comp_start +=
fes[base]->n_components() * do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fes[base]->dofs_per_hex;
+ local_index < fes[base]->n_dofs_per_hex();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fes[base]->dofs_per_hex * hex_number + local_index +
- fes[base]->first_hex_index);
+ (fes[base]->n_dofs_per_hex() * hex_number + local_index +
+ fes[base]->get_first_hex_index());
Assert(comp_start + fes[base]->n_components() <=
retval[total_index].size(),
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_line;
+ local_index < fe.base_element(base).n_dofs_per_line();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_line * line_number +
- local_index + fe.base_element(base).first_line_index);
+ (fe.base_element(base).n_dofs_per_line() * line_number +
+ local_index +
+ fe.base_element(base).get_first_line_index());
system_to_base_table[total_index] =
std::make_pair(std::make_pair(base, m), index_in_base);
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_quad;
+ local_index < fe.base_element(base).n_dofs_per_quad();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_quad * quad_number +
- local_index + fe.base_element(base).first_quad_index);
+ (fe.base_element(base).n_dofs_per_quad() * quad_number +
+ local_index +
+ fe.base_element(base).get_first_quad_index());
system_to_base_table[total_index] =
std::make_pair(std::make_pair(base, m), index_in_base);
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_hex;
+ local_index < fe.base_element(base).n_dofs_per_hex();
++local_index, ++total_index)
{
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_hex * hex_number +
- local_index + fe.base_element(base).first_hex_index);
+ (fe.base_element(base).n_dofs_per_hex() * hex_number +
+ local_index + fe.base_element(base).get_first_hex_index());
system_to_base_table[total_index] =
std::make_pair(std::make_pair(base, m), index_in_base);
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_line;
+ local_index < fe.base_element(base).n_dofs_per_line();
++local_index, ++total_index)
{
// do everything alike for this type of object
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_line * line_number +
- local_index + fe.base_element(base).first_line_index);
+ (fe.base_element(base).n_dofs_per_line() * line_number +
+ local_index +
+ fe.base_element(base).get_first_line_index());
const unsigned int face_index_in_base =
- (fe.base_element(base).first_face_line_index +
- fe.base_element(base).dofs_per_line * line_number +
+ (fe.base_element(base).get_first_face_line_index() +
+ fe.base_element(base).n_dofs_per_line() * line_number +
local_index);
face_system_to_base_table[total_index] =
fe.base_element(base).n_components() *
do_tensor_product)
for (unsigned int local_index = 0;
- local_index < fe.base_element(base).dofs_per_quad;
+ local_index < fe.base_element(base).n_dofs_per_quad();
++local_index, ++total_index)
{
// do everything alike for this type of object
const unsigned int index_in_base =
- (fe.base_element(base).dofs_per_quad * quad_number +
- local_index + fe.base_element(base).first_quad_index);
+ (fe.base_element(base).n_dofs_per_quad() * quad_number +
+ local_index +
+ fe.base_element(base).get_first_quad_index());
const unsigned int face_index_in_base =
- (fe.base_element(base).first_face_quad_index +
- fe.base_element(base).dofs_per_quad * quad_number +
+ (fe.base_element(base).get_first_face_quad_index() +
+ fe.base_element(base).n_dofs_per_quad() * quad_number +
local_index);
face_system_to_base_table[total_index] =
non_primitive_index;
}
}
- Assert(total_index == fe.dofs_per_face, ExcInternalError());
+ Assert(total_index == fe.n_dofs_per_face(), ExcInternalError());
Assert(total_index == face_system_to_component_table.size(),
ExcInternalError());
Assert(total_index == face_system_to_base_table.size(),
Assert(face_fine == 0, ExcNotImplemented());
const unsigned int nc = GeometryInfo<dim>::max_children_per_face;
- const unsigned int n = fe.dofs_per_face;
+ const unsigned int n = fe.n_dofs_per_face();
const unsigned int nd = fe.n_components();
const unsigned int degree = fe.degree;
for (unsigned int i = 1; i <= GeometryInfo<dim>::lines_per_face; ++i)
{
const unsigned int offset_c =
- fe.first_line_index +
+ fe.get_first_line_index() +
GeometryInfo<dim>::face_to_cell_lines(face_coarse, i - 1) *
- fe.dofs_per_line;
+ fe.n_dofs_per_line();
const unsigned int offset_f =
- fe.first_line_index +
+ fe.get_first_line_index() +
GeometryInfo<dim>::face_to_cell_lines(face_fine, i - 1) *
- fe.dofs_per_line;
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ fe.n_dofs_per_line();
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
{
face_c_dofs[face_dof] = offset_c + j;
face_f_dofs[face_dof] = offset_f + j;
for (unsigned int i = 1; i <= GeometryInfo<dim>::quads_per_face; ++i)
{
const unsigned int offset_c =
- fe.first_quad_index + face_coarse * fe.dofs_per_quad;
+ fe.get_first_quad_index() + face_coarse * fe.n_dofs_per_quad();
const unsigned int offset_f =
- fe.first_quad_index + face_fine * fe.dofs_per_quad;
- for (unsigned int j = 0; j < fe.dofs_per_quad; ++j)
+ fe.get_first_quad_index() + face_fine * fe.n_dofs_per_quad();
+ for (unsigned int j = 0; j < fe.n_dofs_per_quad(); ++j)
{
face_c_dofs[face_dof] = offset_c + j;
face_f_dofs[face_dof] = offset_f + j;
++face_dof;
}
}
- Assert(face_dof == fe.dofs_per_face, ExcInternalError());
+ Assert(face_dof == fe.n_dofs_per_face(), ExcInternalError());
}
// Set up meshes, one with a single
{
Assert(h2l.size() == fe.n_dofs_per_cell(),
ExcDimensionMismatch(h2l.size(), fe.n_dofs_per_cell()));
- hierarchic_to_lexicographic_numbering<dim>(fe.dofs_per_line + 1, h2l);
+ hierarchic_to_lexicographic_numbering<dim>(fe.n_dofs_per_line() + 1, h2l);
}
hierarchic_to_lexicographic_numbering(const FiniteElementData<dim> &fe)
{
Assert(fe.n_components() == 1, ExcInvalidFE());
- return hierarchic_to_lexicographic_numbering<dim>(fe.dofs_per_line + 1);
+ return hierarchic_to_lexicographic_numbering<dim>(fe.n_dofs_per_line() + 1);
}
// exclude dofs on more refined ghosted cells
const FiniteElement<dim, spacedim> &fe = dof2.get_fe();
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
if (dofs_per_face > 0)
{
const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
unsigned int max = 0;
for (unsigned int i = 0; i < finite_elements.size(); ++i)
- if (finite_elements[i]->dofs_per_line > max)
- max = finite_elements[i]->dofs_per_line;
+ if (finite_elements[i]->n_dofs_per_line() > max)
+ max = finite_elements[i]->n_dofs_per_line();
return max;
}
unsigned int max = 0;
for (unsigned int i = 0; i < finite_elements.size(); ++i)
- if (finite_elements[i]->dofs_per_quad > max)
- max = finite_elements[i]->dofs_per_quad;
+ if (finite_elements[i]->n_dofs_per_quad() > max)
+ max = finite_elements[i]->n_dofs_per_quad();
return max;
}
unsigned int max = 0;
for (unsigned int i = 0; i < finite_elements.size(); ++i)
- if (finite_elements[i]->dofs_per_hex > max)
- max = finite_elements[i]->dofs_per_hex;
+ if (finite_elements[i]->n_dofs_per_hex() > max)
+ max = finite_elements[i]->n_dofs_per_hex();
return max;
}
unsigned int max = 0;
for (unsigned int i = 0; i < finite_elements.size(); ++i)
- if (finite_elements[i]->dofs_per_face > max)
- max = finite_elements[i]->dofs_per_face;
+ if (finite_elements[i]->n_dofs_per_face() > max)
+ max = finite_elements[i]->n_dofs_per_face();
return max;
}
setup_constraint_weigths(unsigned int fe_degree)
{
FE_Q<2> fe_q(fe_degree);
- FullMatrix<double> interpolation_matrix(fe_q.dofs_per_face,
- fe_q.dofs_per_face);
+ FullMatrix<double> interpolation_matrix(fe_q.n_dofs_per_face(),
+ fe_q.n_dofs_per_face());
fe_q.get_subface_interpolation_matrix(fe_q, 0, interpolation_matrix);
std::vector<unsigned int> mapping =
FETools::lexicographic_to_hierarchic_numbering<1>(fe_degree);
- FullMatrix<double> mapped_matrix(fe_q.dofs_per_face,
- fe_q.dofs_per_face);
- for (unsigned int i = 0; i < fe_q.dofs_per_face; ++i)
- for (unsigned int j = 0; j < fe_q.dofs_per_face; ++j)
+ FullMatrix<double> mapped_matrix(fe_q.n_dofs_per_face(),
+ fe_q.n_dofs_per_face());
+ for (unsigned int i = 0; i < fe_q.n_dofs_per_face(); ++i)
+ for (unsigned int j = 0; j < fe_q.n_dofs_per_face(); ++j)
mapped_matrix(i, j) = interpolation_matrix(mapping[i], mapping[j]);
cudaError_t error_code =
cudaMemcpyToSymbol(internal::constraint_weights,
&mapped_matrix[0][0],
- sizeof(double) * fe_q.dofs_per_face *
- fe_q.dofs_per_face);
+ sizeof(double) * fe_q.n_dofs_per_face() *
+ fe_q.n_dofs_per_face());
AssertCuda(error_code);
}
} // namespace internal
const FiniteElement<dim> &fe = fes[fe_index];
// cache number of finite elements and dofs_per_cell
dof_info[no].dofs_per_cell.push_back(fe.n_dofs_per_cell());
- dof_info[no].dofs_per_face.push_back(fe.dofs_per_face);
+ dof_info[no].dofs_per_face.push_back(fe.n_dofs_per_face());
dof_info[no].dimension = dim;
dof_info[no].n_base_elements = fe.n_base_elements();
dof_info[no].n_components.resize(dof_info[no].n_base_elements);
}
const unsigned int dofs_per_face =
- cell->face(f)->get_fe(0).dofs_per_face;
+ cell->face(f)->get_fe(0).n_dofs_per_face();
std::vector<types::global_dof_index> dofs_1(dofs_per_face);
std::vector<types::global_dof_index> dofs_2(dofs_per_face);
const bool fe_is_system = (n_components != 1);
const bool fe_is_primitive = fe.is_primitive();
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
copy_data.cell = cell;
copy_data.dofs_per_cell = fe.n_dofs_per_cell();
const FiniteElement<dim, spacedim> &fe = cell->get_fe();
const bool fe_is_system = (n_components != 1);
const bool fe_is_primitive = fe.is_primitive();
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
copy_data.cell = cell;
copy_data.dofs_per_cell = fe.n_dofs_per_cell();
// components we are interested in are primitive (by the above
// check), we can safely put such a check in front
std::vector<Point<dim - 1>> unit_support_points(
- fe.dofs_per_face);
+ fe.n_dofs_per_face());
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (fe.is_primitive(fe.face_to_cell_index(i, 0)))
if (component_mask[fe.face_system_to_component_index(i)
.first] == true)
// element in use here has DoFs on the face at all
if ((function_map.find(boundary_component) !=
function_map.end()) &&
- (cell->get_fe().dofs_per_face > 0))
+ (cell->get_fe().n_dofs_per_face() > 0))
{
// face is of the right component
x_fe_values.reinit(cell, face_no);
// get indices, physical location and boundary values of
// dofs on this face
- face_dofs.resize(fe.dofs_per_face);
+ face_dofs.resize(fe.n_dofs_per_face());
face->get_dof_indices(face_dofs, cell->active_fe_index());
const std::vector<Point<spacedim>> &dof_locations =
fe_values.get_quadrature_points();
{
// resize array. avoid construction of a memory
// allocating temporary if possible
- if (dof_values_system.size() < fe.dofs_per_face)
- dof_values_system.resize(fe.dofs_per_face,
+ if (dof_values_system.size() < fe.n_dofs_per_face())
+ dof_values_system.resize(fe.n_dofs_per_face(),
Vector<number>(
fe.n_components()));
else
- dof_values_system.resize(fe.dofs_per_face);
+ dof_values_system.resize(fe.n_dofs_per_face());
function_map.find(boundary_component)
->second->vector_value_list(dof_locations,
(i < 4 * fe.n_dofs_per_vertex() ?
i :
(i < 4 * fe.n_dofs_per_vertex() +
- 4 * fe.dofs_per_line ?
+ 4 *
+ fe.n_dofs_per_line() ?
i +
4 *
fe.n_dofs_per_vertex() :
i +
4 *
fe.n_dofs_per_vertex() +
- 8 * fe.dofs_per_line)) :
+ 8 *
+ fe.n_dofs_per_line())) :
numbers::invalid_unsigned_int)));
Assert(cell_i < fe.n_dofs_per_cell(),
ExcInternalError());
// fe has only one component, so save some computations
{
// get only the one component that this function has
- dof_values_scalar.resize(fe.dofs_per_face);
+ dof_values_scalar.resize(fe.n_dofs_per_face());
function_map.find(boundary_component)
->second->value_list(dof_locations,
dof_values_scalar,
// Compute the degrees of
// freedom.
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) != nullptr) &&
(fe.system_to_base_index(fe.face_to_cell_index(i, face))
.first == base_indices) &&
// Compute the degrees
// of freedom.
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) !=
nullptr) &&
(fe.system_to_base_index(
for (unsigned int d = 0; d < dim; ++d)
tmp[d] = values[q_point](first_vector_component + d);
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) !=
nullptr) &&
(fe.system_to_base_index(
unsigned int index = 0;
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) !=
nullptr) &&
(fe.system_to_base_index(
{
unsigned int index = 0;
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) != nullptr) &&
(fe.system_to_base_index(fe.face_to_cell_index(i, face))
.first == base_indices) &&
for (unsigned int d = 0; d < dim; ++d)
tmp[d] = values[q_point](first_vector_component + d);
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) !=
nullptr) &&
(fe.system_to_base_index(
unsigned int index = 0;
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) !=
nullptr) &&
(fe.system_to_base_index(
unsigned int index = 0;
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (((dynamic_cast<const FESystem<dim> *>(&fe) != nullptr) &&
(fe.system_to_base_index(fe.face_to_cell_index(i, face))
.first == base_indices) &&
// corresponding degrees of freedom.
const unsigned int superdegree = dof_handler.get_fe().degree;
const QGauss<dim - 1> reference_face_quadrature(2 * superdegree);
- const unsigned int dofs_per_face = dof_handler.get_fe().dofs_per_face;
+ const unsigned int dofs_per_face = dof_handler.get_fe().n_dofs_per_face();
const hp::FECollection<dim> &fe_collection(dof_handler.get_fe_collection());
const hp::MappingCollection<dim> mapping_collection(mapping);
hp::QCollection<dim> face_quadrature_collection;
}
const unsigned int dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
dofs_processed.resize(dofs_per_face);
dof_values.resize(dofs_per_face);
const unsigned int superdegree = cell->get_fe().degree;
const unsigned int degree = superdegree - 1;
const unsigned int dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
dofs_processed.resize(dofs_per_face);
dof_values.resize(dofs_per_face);
.face_to_cell_index((line + 1) * (degree + 1) - 1, face);
unsigned int associated_edge_dof_index = 0;
- for (unsigned int line_dof_idx = 0; line_dof_idx < fe.dofs_per_line;
+ for (unsigned int line_dof_idx = 0; line_dof_idx < fe.n_dofs_per_line();
++line_dof_idx)
{
// For each DoF associated with the (interior of) the line, we need
const unsigned int face_dof_idx =
GeometryInfo<dim>::vertices_per_face * fe.n_dofs_per_vertex() +
- line * fe.dofs_per_line + line_dof_idx;
+ line * fe.n_dofs_per_line() + line_dof_idx;
// Note, assuming that the edge orientations are "standard"
// i.e. cell->line_orientation(line) = true.
1);
unsigned int associated_edge_dof_index = 0;
- for (unsigned int face_idx = 0; face_idx < fe.dofs_per_face;
+ for (unsigned int face_idx = 0; face_idx < fe.n_dofs_per_face();
++face_idx)
{
const unsigned int cell_idx =
unsigned int associated_edge_dof_index = 0;
for (unsigned int line_dof_idx = 0;
- line_dof_idx < fe.dofs_per_line;
+ line_dof_idx < fe.n_dofs_per_line();
++line_dof_idx)
{
// For each DoF associated with the (interior of) the
const unsigned int face_dof_idx =
GeometryInfo<dim>::vertices_per_face *
fe.n_dofs_per_vertex() +
- line * fe.dofs_per_line + line_dof_idx;
+ line * fe.n_dofs_per_line() + line_dof_idx;
// Next, translate from face to cell. Note, this might be
// assuming that the edge orientations are "standard" (not
// Loop over these quad-interior dofs.
unsigned int associated_face_dof_index = 0;
for (unsigned int quad_dof_idx = 0;
- quad_dof_idx < fe.dofs_per_quad;
+ quad_dof_idx < fe.n_dofs_per_quad();
++quad_dof_idx)
{
const unsigned int face_idx =
GeometryInfo<dim>::vertices_per_face *
fe.n_dofs_per_vertex() +
- lines_per_face * fe.dofs_per_line + quad_dof_idx;
+ lines_per_face * fe.n_dofs_per_line() + quad_dof_idx;
const unsigned int cell_idx =
fe.face_to_cell_index(face_idx, face);
if (((dynamic_cast<const FESystem<dim> *>(&fe) != nullptr) &&
}
const unsigned int dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
dofs_processed.resize(dofs_per_face);
dof_values.resize(dofs_per_face);
cell->get_fe().degree;
const unsigned int degree = superdegree - 1;
const unsigned int dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
dofs_processed.resize(dofs_per_face);
dof_values.resize(dofs_per_face);
0};
std::vector<Vector<double>> values(fe_values.n_quadrature_points,
Vector<double>(2));
- Vector<double> dof_values(fe.dofs_per_face);
+ Vector<double> dof_values(fe.n_dofs_per_face());
// Get the values of the boundary function at the quadrature points.
{
jacobians[q_point][1][face_coordinate_direction[face]] *
jacobians[q_point][1][face_coordinate_direction[face]]);
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
dof_values(i) +=
tmp * (normals[q_point] *
fe_values[vec].value(
q_point));
}
- std::vector<types::global_dof_index> face_dof_indices(fe.dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices(
+ fe.n_dofs_per_face());
cell->face(face)->get_dof_indices(face_dof_indices,
cell->active_fe_index());
// Copy the computed values in the AffineConstraints only, if the degree
// of freedom is not already constrained.
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (!(constraints.is_constrained(face_dof_indices[i])) &&
fe.get_nonzero_components(fe.face_to_cell_index(
i,
{1, 2}, {1, 2}, {2, 0}, {2, 0}, {0, 1}, {0, 1}};
std::vector<Vector<double>> values(fe_values.n_quadrature_points,
Vector<double>(3));
- Vector<double> dof_values_local(fe.dofs_per_face);
+ Vector<double> dof_values_local(fe.n_dofs_per_face());
{
const std::vector<Point<3>> &quadrature_points =
jacobians[q_point][2][face_coordinate_directions[face][1]] *
jacobians[q_point][2][face_coordinate_directions[face][1]]));
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
dof_values_local(i) +=
tmp * (normals[q_point] *
fe_values[vec].value(
q_point));
}
- std::vector<types::global_dof_index> face_dof_indices(fe.dofs_per_face);
+ std::vector<types::global_dof_index> face_dof_indices(
+ fe.n_dofs_per_face());
cell->face(face)->get_dof_indices(face_dof_indices,
cell->active_fe_index());
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (projected_dofs[face_dof_indices[i]] < fe.degree &&
fe.get_nonzero_components(fe.face_to_cell_index(
i,
const std::vector<Point<dim - 1>> &unit_support_points =
fe_collection[i].get_unit_face_support_points();
- Assert(unit_support_points.size() == fe_collection[i].dofs_per_face,
+ Assert(unit_support_points.size() == fe_collection[i].n_dofs_per_face(),
ExcInternalError());
face_quadrature_collection.push_back(
cell->face(face_no);
// get the indices of the dofs on this cell...
- face_dofs.resize(fe.dofs_per_face);
+ face_dofs.resize(fe.n_dofs_per_face());
face->get_dof_indices(face_dofs, cell->active_fe_index());
x_fe_face_values.reinit(cell, face_no);
"Error: the finite element does not have enough components "
"to define a normal direction."));
- for (unsigned int k = 0; k < fe.dofs_per_face; ++k)
+ for (unsigned int k = 0; k < fe.n_dofs_per_face(); ++k)
if ((k != i) &&
(face_quadrature_collection[cell->active_fe_index()]
.point(k) ==
const std::vector<Point<dim - 1>> &unit_support_points =
fe_collection[i].get_unit_face_support_points();
- Assert(unit_support_points.size() == fe_collection[i].dofs_per_face,
+ Assert(unit_support_points.size() == fe_collection[i].n_dofs_per_face(),
ExcInternalError());
face_quadrature_collection.push_back(
cell->face(face_no);
// get the indices of the dofs on this cell...
- face_dofs.resize(fe.dofs_per_face);
+ face_dofs.resize(fe.n_dofs_per_face());
face->get_dof_indices(face_dofs, cell->active_fe_index());
x_fe_face_values.reinit(cell, face_no);
std::map<types::global_dof_index, double> dof_to_b_value;
unsigned int n_scalar_indices = 0;
- cell_vector_dofs.resize(fe.dofs_per_face);
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ cell_vector_dofs.resize(fe.n_dofs_per_face());
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
{
if (fe.face_system_to_component_index(i).first >=
first_vector_component &&
for (auto f : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(f))
{
- face_dof_indices.resize(cell->get_fe().dofs_per_face);
+ face_dof_indices.resize(cell->get_fe().n_dofs_per_face());
cell->face(f)->get_dof_indices(face_dof_indices,
cell->active_fe_index());
- for (unsigned int i = 0; i < cell->get_fe().dofs_per_face; ++i)
+ for (unsigned int i = 0; i < cell->get_fe().n_dofs_per_face();
+ ++i)
// enter zero boundary values
// for all boundary nodes
//
{
dof_handler.object_dof_indices[i][1].resize(
dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_fe().dofs_per_line,
+ dof_handler.get_fe().n_dofs_per_line(),
numbers::invalid_dof_index);
dof_handler.object_dof_ptr[i][1].reserve(
for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
j++)
dof_handler.object_dof_ptr[i][1].push_back(
- j * dof_handler.get_fe().dofs_per_line);
+ j * dof_handler.get_fe().n_dofs_per_line());
dof_handler.cell_dof_cache_indices[i].resize(
dof_handler.tria->n_raw_cells(i) *
{
dof_handler.object_dof_indices[i][2].resize(
dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_fe().dofs_per_quad,
+ dof_handler.get_fe().n_dofs_per_quad(),
numbers::invalid_dof_index);
dof_handler.object_dof_ptr[i][2].reserve(
for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
j++)
dof_handler.object_dof_ptr[i][2].push_back(
- j * dof_handler.get_fe().dofs_per_quad);
+ j * dof_handler.get_fe().n_dofs_per_quad());
dof_handler.cell_dof_cache_indices[i].resize(
dof_handler.tria->n_raw_cells(i) *
for (unsigned int i = 0; i < dof_handler.tria->n_raw_lines() + 1;
i++)
dof_handler.object_dof_ptr[0][1].push_back(
- i * dof_handler.get_fe().dofs_per_line);
+ i * dof_handler.get_fe().n_dofs_per_line());
dof_handler.object_dof_indices[0][1].resize(
dof_handler.tria->n_raw_lines() *
- dof_handler.get_fe().dofs_per_line,
+ dof_handler.get_fe().n_dofs_per_line(),
numbers::invalid_dof_index);
}
}
{
dof_handler.object_dof_indices[i][3].resize(
dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_fe().dofs_per_hex,
+ dof_handler.get_fe().n_dofs_per_hex(),
numbers::invalid_dof_index);
dof_handler.object_dof_ptr[i][3].reserve(
for (unsigned int j = 0; j < dof_handler.tria->n_raw_cells(i) + 1;
j++)
dof_handler.object_dof_ptr[i][3].push_back(
- j * dof_handler.get_fe().dofs_per_hex);
+ j * dof_handler.get_fe().n_dofs_per_hex());
dof_handler.cell_dof_cache_indices[i].resize(
dof_handler.tria->n_raw_cells(i) *
for (unsigned int i = 0; i < dof_handler.tria->n_raw_lines() + 1;
i++)
dof_handler.object_dof_ptr[0][1].push_back(
- i * dof_handler.get_fe().dofs_per_line);
+ i * dof_handler.get_fe().n_dofs_per_line());
dof_handler.object_dof_indices[0][1].resize(
dof_handler.tria->n_raw_lines() *
- dof_handler.get_fe().dofs_per_line,
+ dof_handler.get_fe().n_dofs_per_line(),
numbers::invalid_dof_index);
// faces
for (unsigned int i = 0; i < dof_handler.tria->n_raw_quads() + 1;
i++)
dof_handler.object_dof_ptr[0][2].push_back(
- i * dof_handler.get_fe().dofs_per_quad);
+ i * dof_handler.get_fe().n_dofs_per_quad());
dof_handler.object_dof_indices[0][2].resize(
dof_handler.tria->n_raw_quads() *
- dof_handler.get_fe().dofs_per_quad,
+ dof_handler.get_fe().n_dofs_per_quad(),
numbers::invalid_dof_index);
}
}
const dealii::Triangulation<1, spacedim> &tria =
dof_handler.get_triangulation();
- const unsigned int dofs_per_line = dof_handler.get_fe().dofs_per_line;
- const unsigned int n_levels = tria.n_levels();
+ const unsigned int dofs_per_line =
+ dof_handler.get_fe().n_dofs_per_line();
+ const unsigned int n_levels = tria.n_levels();
for (unsigned int i = 0; i < n_levels; ++i)
{
internal::DoFHandlerImplementation::DoFLevel<2>>());
dof_handler.mg_levels.back()->dof_object.dofs =
std::vector<types::global_dof_index>(tria.n_raw_quads(i) *
- fe.dofs_per_quad,
+ fe.n_dofs_per_quad(),
numbers::invalid_dof_index);
}
dof_handler.mg_faces =
std::make_unique<internal::DoFHandlerImplementation::DoFFaces<2>>();
- dof_handler.mg_faces->lines.dofs = std::vector<types::global_dof_index>(
- tria.n_raw_lines() * fe.dofs_per_line, numbers::invalid_dof_index);
+ dof_handler.mg_faces->lines.dofs =
+ std::vector<types::global_dof_index>(tria.n_raw_lines() *
+ fe.n_dofs_per_line(),
+ numbers::invalid_dof_index);
const unsigned int n_vertices = tria.n_vertices();
internal::DoFHandlerImplementation::DoFLevel<3>>());
dof_handler.mg_levels.back()->dof_object.dofs =
std::vector<types::global_dof_index>(tria.n_raw_hexs(i) *
- fe.dofs_per_hex,
+ fe.n_dofs_per_hex(),
numbers::invalid_dof_index);
}
dof_handler.mg_faces =
std::make_unique<internal::DoFHandlerImplementation::DoFFaces<3>>();
- dof_handler.mg_faces->lines.dofs = std::vector<types::global_dof_index>(
- tria.n_raw_lines() * fe.dofs_per_line, numbers::invalid_dof_index);
- dof_handler.mg_faces->quads.dofs = std::vector<types::global_dof_index>(
- tria.n_raw_quads() * fe.dofs_per_quad, numbers::invalid_dof_index);
+ dof_handler.mg_faces->lines.dofs =
+ std::vector<types::global_dof_index>(tria.n_raw_lines() *
+ fe.n_dofs_per_line(),
+ numbers::invalid_dof_index);
+ dof_handler.mg_faces->quads.dofs =
+ std::vector<types::global_dof_index>(tria.n_raw_quads() *
+ fe.n_dofs_per_quad(),
+ numbers::invalid_dof_index);
const unsigned int n_vertices = tria.n_vertices();
{
fe_slots_needed++;
line_slots_needed +=
- dof_handler.get_fe(fe).dofs_per_line;
+ dof_handler.get_fe(fe).n_dofs_per_line();
}
}
}
dof_handler.object_dof_indices[l][d].size());
for (unsigned int i = 0;
- i < dof_handler.get_fe(fe).dofs_per_line;
+ i < dof_handler.get_fe(fe).n_dofs_per_line();
i++)
dof_handler.object_dof_indices[l][d].push_back(
numbers::invalid_dof_index);
const auto face = cell->face(iface);
if (face->at_boundary())
{
- const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
+ const unsigned int dofs_per_face =
+ cell->get_fe().n_dofs_per_face();
dofs_on_face.resize(dofs_per_face);
face->get_dof_indices(dofs_on_face, cell->active_fe_index());
if (face->at_boundary() &&
(boundary_ids.find(boundary_id) != boundary_ids.end()))
{
- const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
+ const unsigned int dofs_per_face =
+ cell->get_fe().n_dofs_per_face();
dofs_on_face.resize(dofs_per_face);
face->get_dof_indices(dofs_on_face, cell->active_fe_index());
// FE_Q objects of the same order, from which one is
// enhanced by a bubble function that is zero on the
// boundary.
- if ((dof_handler.get_fe(fe_index_1).dofs_per_line ==
- dof_handler.get_fe(fe_index_2).dofs_per_line) &&
- (dof_handler.get_fe(fe_index_1).dofs_per_line > 0))
+ if ((dof_handler.get_fe(fe_index_1).n_dofs_per_line() ==
+ dof_handler.get_fe(fe_index_2)
+ .n_dofs_per_line()) &&
+ (dof_handler.get_fe(fe_index_1).n_dofs_per_line() >
+ 0))
{
// the number of dofs per line is identical
const unsigned int dofs_per_line =
- dof_handler.get_fe(fe_index_1).dofs_per_line;
+ dof_handler.get_fe(fe_index_1).n_dofs_per_line();
ensure_existence_of_dof_identities<1>(
dof_handler.get_fe(fe_index_1),
fe_index_2 =
line->nth_active_fe_index(g);
- if ((dof_handler.get_fe(fe_index_1).dofs_per_line ==
- dof_handler.get_fe(fe_index_2).dofs_per_line) &&
- (dof_handler.get_fe(fe_index_1).dofs_per_line > 0))
+ if ((dof_handler.get_fe(fe_index_1).n_dofs_per_line() ==
+ dof_handler.get_fe(fe_index_2)
+ .n_dofs_per_line()) &&
+ (dof_handler.get_fe(fe_index_1).n_dofs_per_line() >
+ 0))
{
// the number of dofs per line is identical
const unsigned int dofs_per_line =
- dof_handler.get_fe(fe_index_1).dofs_per_line;
+ dof_handler.get_fe(fe_index_1).n_dofs_per_line();
ensure_existence_of_dof_identities<1>(
dof_handler.get_fe(fe_index_1),
line->nth_active_fe_index(f);
for (unsigned int d = 0;
- d < dof_handler.get_fe(fe_index).dofs_per_line;
+ d <
+ dof_handler.get_fe(fe_index).n_dofs_per_line();
++d)
{
const types::global_dof_index old_dof_index =
line->nth_active_fe_index(f);
for (unsigned int d = 0;
- d < dof_handler.get_fe(fe_index).dofs_per_line;
+ d <
+ dof_handler.get_fe(fe_index).n_dofs_per_line();
++d)
{
const types::global_dof_index old_dof_index =
quad->nth_active_fe_index(f);
for (unsigned int d = 0;
- d < dof_handler.get_fe(fe_index).dofs_per_quad;
+ d <
+ dof_handler.get_fe(fe_index).n_dofs_per_quad();
++d)
{
const types::global_dof_index old_dof_index =
const unsigned int level,
const bool check_validity)
{
- if (dof_handler.get_fe().dofs_per_line > 0)
+ if (dof_handler.get_fe().n_dofs_per_line() > 0)
{
// save user flags as they will be modified
std::vector<bool> user_flags;
if (cell->line(l)->user_flag_set())
{
for (unsigned int d = 0;
- d < dof_handler.get_fe().dofs_per_line;
+ d < dof_handler.get_fe().n_dofs_per_line();
++d)
{
const dealii::types::global_dof_index idx =
const unsigned int level,
const bool check_validity)
{
- if (dof_handler.get_fe().dofs_per_line > 0 ||
- dof_handler.get_fe().dofs_per_quad > 0)
+ if (dof_handler.get_fe().n_dofs_per_line() > 0 ||
+ dof_handler.get_fe().n_dofs_per_quad() > 0)
{
// save user flags as they will be modified
std::vector<bool> user_flags;
if (cell->line(l)->user_flag_set())
{
for (unsigned int d = 0;
- d < dof_handler.get_fe().dofs_per_line;
+ d < dof_handler.get_fe().n_dofs_per_line();
++d)
{
const dealii::types::global_dof_index idx =
if (cell->quad(l)->user_flag_set())
{
for (unsigned int d = 0;
- d < dof_handler.get_fe().dofs_per_quad;
+ d < dof_handler.get_fe().n_dofs_per_quad();
++d)
{
const dealii::types::global_dof_index idx =
{
const FiniteElement<dim, spacedim> &fe = cell->get_fe();
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
face_dof_indices.resize(dofs_per_face);
cell->face(face)->get_dof_indices(face_dof_indices,
cell->active_fe_index());
- for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_face(); ++i)
if (!check_vector_component)
selected_dofs.add_index(face_dof_indices[i]);
else
(dim == 3 ? (i < 4 * fe.n_dofs_per_vertex() ?
i :
(i < 4 * fe.n_dofs_per_vertex() +
- 4 * fe.dofs_per_line ?
+ 4 * fe.n_dofs_per_line() ?
i + 4 * fe.n_dofs_per_vertex() :
i + 4 * fe.n_dofs_per_vertex() +
- 8 * fe.dofs_per_line)) :
+ 8 * fe.n_dofs_per_line())) :
numbers::invalid_unsigned_int)));
if (fe.is_primitive(cell_index))
{
if (cell->neighbor_child_on_subface(face, child)
->is_artificial())
continue;
- for (unsigned int dof = 0; dof != fe.dofs_per_line;
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_line();
++dof)
selected_dofs.add_index(
line->child(child)->dof_index(dof));
{
// simply take all DoFs that live on this subface
std::vector<types::global_dof_index> ldi(
- fe.dofs_per_face);
+ fe.n_dofs_per_face());
face->child(child)->get_dof_indices(ldi);
selected_dofs.add_indices(ldi.begin(), ldi.end());
}
for (const unsigned int f : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(f))
{
- const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
+ const unsigned int dofs_per_face = cell->get_fe().n_dofs_per_face();
dofs_on_face.resize(dofs_per_face);
cell->face(f)->get_dof_indices(dofs_on_face,
cell->active_fe_index());
if (boundary_ids.find(cell->face(f)->boundary_id()) !=
boundary_ids.end())
{
- const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
+ const unsigned int dofs_per_face = cell->get_fe().n_dofs_per_face();
dofs_on_face.resize(dofs_per_face);
cell->face(f)->get_dof_indices(dofs_on_face,
cell->active_fe_index());
// Exclude degrees of freedom on faces opposite to the vertex
exclude.resize(fe.n_dofs_per_cell());
std::fill(exclude.begin(), exclude.end(), false);
- const unsigned int dpf = fe.dofs_per_face;
+ const unsigned int dpf = fe.n_dofs_per_face();
for (const unsigned int face : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(face) ||
{
// Eliminate dofs on faces of the child which are on faces
// of the parent
- const unsigned int dpf = fe.dofs_per_face;
+ const unsigned int dpf = fe.n_dofs_per_face();
for (unsigned int d = 0; d < dim; ++d)
{
// vertex
exclude.resize(fe.n_dofs_per_cell());
std::fill(exclude.begin(), exclude.end(), false);
- const unsigned int dpf = fe.dofs_per_face;
+ const unsigned int dpf = fe.n_dofs_per_face();
for (unsigned int d = 0; d < dim; ++d)
{
const FullMatrix<double> & face_interpolation_matrix,
std::vector<bool> & primary_dof_mask)
{
- Assert(fe1.dofs_per_face >= fe2.dofs_per_face, ExcInternalError());
- AssertDimension(primary_dof_mask.size(), fe1.dofs_per_face);
+ Assert(fe1.n_dofs_per_face() >= fe2.n_dofs_per_face(),
+ ExcInternalError());
+ AssertDimension(primary_dof_mask.size(), fe1.n_dofs_per_face());
Assert(fe2.n_dofs_per_vertex() <= fe1.n_dofs_per_vertex(),
ExcInternalError());
- Assert(fe2.dofs_per_line <= fe1.dofs_per_line, ExcInternalError());
- Assert((dim < 3) || (fe2.dofs_per_quad <= fe1.dofs_per_quad),
+ Assert(fe2.n_dofs_per_line() <= fe1.n_dofs_per_line(),
+ ExcInternalError());
+ Assert((dim < 3) || (fe2.n_dofs_per_quad() <= fe1.n_dofs_per_quad()),
ExcInternalError());
// the idea here is to designate as many DoFs in fe1 per object (vertex,
// same algorithm as above
unsigned int dofs_added = 0;
unsigned int i = 0;
- while (dofs_added < fe2.dofs_per_line)
+ while (dofs_added < fe2.n_dofs_per_line())
{
- Assert(i < fe1.dofs_per_line, ExcInternalError());
+ Assert(i < fe1.n_dofs_per_line(), ExcInternalError());
primary_dof_list.push_back(index + i);
if (check_primary_dof_list(face_interpolation_matrix,
++i;
}
- index += fe1.dofs_per_line;
+ index += fe1.n_dofs_per_line();
}
for (int q = 0;
// same algorithm as above
unsigned int dofs_added = 0;
unsigned int i = 0;
- while (dofs_added < fe2.dofs_per_quad)
+ while (dofs_added < fe2.n_dofs_per_quad())
{
- Assert(i < fe1.dofs_per_quad, ExcInternalError());
+ Assert(i < fe1.n_dofs_per_quad(), ExcInternalError());
primary_dof_list.push_back(index + i);
if (check_primary_dof_list(face_interpolation_matrix,
++i;
}
- index += fe1.dofs_per_quad;
+ index += fe1.n_dofs_per_quad();
}
- AssertDimension(index, fe1.dofs_per_face);
- AssertDimension(primary_dof_list.size(), fe2.dofs_per_face);
+ AssertDimension(index, fe1.n_dofs_per_face());
+ AssertDimension(primary_dof_list.size(), fe2.n_dofs_per_face());
// finally copy the list into the mask
std::fill(primary_dof_mask.begin(), primary_dof_mask.end(), false);
if (primary_dof_mask == nullptr)
{
primary_dof_mask =
- std::make_unique<std::vector<bool>>(fe1.dofs_per_face);
+ std::make_unique<std::vector<bool>>(fe1.n_dofs_per_face());
select_primary_dofs_for_face_restriction(fe1,
fe2,
face_interpolation_matrix,
{
if (matrix == nullptr)
{
- matrix = std::make_unique<FullMatrix<double>>(fe2.dofs_per_face,
- fe1.dofs_per_face);
+ matrix =
+ std::make_unique<FullMatrix<double>>(fe2.n_dofs_per_face(),
+ fe1.n_dofs_per_face());
fe1.get_face_interpolation_matrix(fe2, *matrix);
}
}
{
if (matrix == nullptr)
{
- matrix = std::make_unique<FullMatrix<double>>(fe2.dofs_per_face,
- fe1.dofs_per_face);
+ matrix =
+ std::make_unique<FullMatrix<double>>(fe2.n_dofs_per_face(),
+ fe1.n_dofs_per_face());
fe1.get_subface_interpolation_matrix(fe2, subface, *matrix);
}
}
const unsigned int n_dofs_on_mother =
2 * fe.n_dofs_per_vertex() +
- fe.dofs_per_line,
- n_dofs_on_children = fe.n_dofs_per_vertex() +
- 2 * fe.dofs_per_line;
+ fe.n_dofs_per_line(),
+ n_dofs_on_children =
+ fe.n_dofs_per_vertex() +
+ 2 * fe.n_dofs_per_line();
dofs_on_mother.resize(n_dofs_on_mother);
// we might not use all of those in case of artificial cells, so
++dof)
dofs_on_mother[next_index++] =
this_face->vertex_dof_index(vertex, dof, fe_index);
- for (unsigned int dof = 0; dof != fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_line(); ++dof)
dofs_on_mother[next_index++] =
this_face->dof_index(dof, fe_index);
AssertDimension(next_index, dofs_on_mother.size());
if (cell->neighbor_child_on_subface(face, child)
->is_artificial())
continue;
- for (unsigned int dof = 0; dof != fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_line();
+ ++dof)
dofs_on_children.push_back(
this_face->child(child)->dof_index(dof, fe_index));
}
// first of all, make sure that we treat a case which is
// possible, i.e. either no dofs on the face at all or no
// anisotropic refinement
- if (cell->get_fe().dofs_per_face == 0)
+ if (cell->get_fe().n_dofs_per_face() == 0)
continue;
Assert(cell->face(face)->refinement_case() ==
const FiniteElement<dim> &fe = cell->get_fe();
const unsigned int fe_index = cell->active_fe_index();
- const unsigned int n_dofs_on_mother = fe.dofs_per_face;
+ const unsigned int n_dofs_on_mother = fe.n_dofs_per_face();
const unsigned int n_dofs_on_children =
- (5 * fe.n_dofs_per_vertex() + 12 * fe.dofs_per_line +
- 4 * fe.dofs_per_quad);
+ (5 * fe.n_dofs_per_vertex() + 12 * fe.n_dofs_per_line() +
+ 4 * fe.n_dofs_per_quad());
// TODO[TL]: think about this and the following in case of
// anisotropic refinement
dofs_on_mother[next_index++] =
this_face->vertex_dof_index(vertex, dof, fe_index);
for (unsigned int line = 0; line < 4; ++line)
- for (unsigned int dof = 0; dof != fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_line(); ++dof)
dofs_on_mother[next_index++] =
this_face->line(line)->dof_index(dof, fe_index);
- for (unsigned int dof = 0; dof != fe.dofs_per_quad; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_quad(); ++dof)
dofs_on_mother[next_index++] =
this_face->dof_index(dof, fe_index);
AssertDimension(next_index, dofs_on_mother.size());
// next the dofs on the lines interior to the face; the order of
// these lines is laid down in the FiniteElement class
// documentation
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
dofs_on_children.push_back(
this_face->child(0)->line(1)->dof_index(dof, fe_index));
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
dofs_on_children.push_back(
this_face->child(2)->line(1)->dof_index(dof, fe_index));
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
dofs_on_children.push_back(
this_face->child(0)->line(3)->dof_index(dof, fe_index));
- for (unsigned int dof = 0; dof < fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof < fe.n_dofs_per_line(); ++dof)
dofs_on_children.push_back(
this_face->child(1)->line(3)->dof_index(dof, fe_index));
for (unsigned int line = 0; line < 4; ++line)
for (unsigned int child = 0; child < 2; ++child)
{
- for (unsigned int dof = 0; dof != fe.dofs_per_line; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_line();
+ ++dof)
dofs_on_children.push_back(
this_face->line(line)->child(child)->dof_index(
dof, fe_index));
if (cell->neighbor_child_on_subface(face, child)
->is_artificial())
continue;
- for (unsigned int dof = 0; dof != fe.dofs_per_quad; ++dof)
+ for (unsigned int dof = 0; dof != fe.n_dofs_per_quad();
+ ++dof)
dofs_on_children.push_back(
this_face->child(child)->dof_index(dof, fe_index));
}
// first of all, make sure that we treat a case which is
// possible, i.e. either no dofs on the face at all or no
// anisotropic refinement
- if (cell->get_fe().dofs_per_face == 0)
+ if (cell->get_fe().n_dofs_per_face() == 0)
continue;
Assert(cell->face(face)->refinement_case() ==
//
// so we are going to constrain the DoFs on the face
// children against the DoFs on the face itself
- primary_dofs.resize(cell->get_fe().dofs_per_face);
+ primary_dofs.resize(cell->get_fe().n_dofs_per_face());
cell->face(face)->get_dof_indices(
primary_dofs, cell->active_fe_index());
// Same procedure as for the mother cell. Extract
// the face DoFs from the cell DoFs.
dependent_dofs.resize(
- subface->get_fe(subface_fe_index).dofs_per_face);
+ subface->get_fe(subface_fe_index)
+ .n_dofs_per_face());
subface->get_dof_indices(dependent_dofs,
subface_fe_index);
// first get the interpolation matrix from the mother to
// the virtual dofs
- Assert(dominating_fe.dofs_per_face <=
- cell->get_fe().dofs_per_face,
+ Assert(dominating_fe.n_dofs_per_face() <=
+ cell->get_fe().n_dofs_per_face(),
ExcInternalError());
ensure_existence_of_face_matrix(
// now compute the constraint matrix as the product
// between the inverse matrix and the dependent part
- constraint_matrix.reinit(cell->get_fe().dofs_per_face -
- dominating_fe.dofs_per_face,
- dominating_fe.dofs_per_face);
+ constraint_matrix.reinit(
+ cell->get_fe().n_dofs_per_face() -
+ dominating_fe.n_dofs_per_face(),
+ dominating_fe.n_dofs_per_face());
restrict_mother_to_virtual_dependent.mmult(
constraint_matrix,
restrict_mother_to_virtual_primary_inv);
// then figure out the global numbers of primary and
// dependent dofs and apply constraints
- scratch_dofs.resize(cell->get_fe().dofs_per_face);
+ scratch_dofs.resize(cell->get_fe().n_dofs_per_face());
cell->face(face)->get_dof_indices(
scratch_dofs, cell->active_fe_index());
primary_dofs.clear();
dependent_dofs.clear();
for (unsigned int i = 0;
- i < cell->get_fe().dofs_per_face;
+ i < cell->get_fe().n_dofs_per_face();
++i)
if ((*primary_dof_masks[dominating_fe_index]
[cell
dependent_dofs.push_back(scratch_dofs[i]);
AssertDimension(primary_dofs.size(),
- dominating_fe.dofs_per_face);
+ dominating_fe.n_dofs_per_face());
AssertDimension(dependent_dofs.size(),
- cell->get_fe().dofs_per_face -
- dominating_fe.dofs_per_face);
+ cell->get_fe().n_dofs_per_face() -
+ dominating_fe.n_dofs_per_face());
filter_constraints(primary_dofs,
dependent_dofs,
// first get the interpolation matrix from the
// subface to the virtual dofs
- Assert(dominating_fe.dofs_per_face <=
- subface_fe.dofs_per_face,
+ Assert(dominating_fe.n_dofs_per_face() <=
+ subface_fe.n_dofs_per_face(),
ExcInternalError());
ensure_existence_of_subface_matrix(
dominating_fe,
[dominating_fe_index][subface_fe_index][sf]);
constraint_matrix.reinit(
- subface_fe.dofs_per_face,
- dominating_fe.dofs_per_face);
+ subface_fe.n_dofs_per_face(),
+ dominating_fe.n_dofs_per_face());
restrict_subface_to_virtual.mmult(
constraint_matrix,
restrict_mother_to_virtual_primary_inv);
- dependent_dofs.resize(subface_fe.dofs_per_face);
+ dependent_dofs.resize(subface_fe.n_dofs_per_face());
cell->face(face)->child(sf)->get_dof_indices(
dependent_dofs, subface_fe_index);
{
// Get DoFs on dominating and dominated side of the
// face
- primary_dofs.resize(cell->get_fe().dofs_per_face);
+ primary_dofs.resize(
+ cell->get_fe().n_dofs_per_face());
cell->face(face)->get_dof_indices(
primary_dofs, cell->active_fe_index());
break;
dependent_dofs.resize(
- neighbor->get_fe().dofs_per_face);
+ neighbor->get_fe().n_dofs_per_face());
cell->face(face)->get_dof_indices(
dependent_dofs, neighbor->active_fe_index());
// first get the interpolation matrix from main FE
// to the virtual dofs
- Assert(dominating_fe.dofs_per_face <=
- cell->get_fe().dofs_per_face,
+ Assert(dominating_fe.n_dofs_per_face() <=
+ cell->get_fe().n_dofs_per_face(),
ExcInternalError());
ensure_existence_of_face_matrix(
// now compute the constraint matrix as the product
// between the inverse matrix and the dependent part
constraint_matrix.reinit(
- cell->get_fe().dofs_per_face -
- dominating_fe.dofs_per_face,
- dominating_fe.dofs_per_face);
+ cell->get_fe().n_dofs_per_face() -
+ dominating_fe.n_dofs_per_face(),
+ dominating_fe.n_dofs_per_face());
restrict_mother_to_virtual_dependent.mmult(
constraint_matrix,
restrict_mother_to_virtual_primary_inv);
// then figure out the global numbers of primary and
// dependent dofs and apply constraints
- scratch_dofs.resize(cell->get_fe().dofs_per_face);
+ scratch_dofs.resize(
+ cell->get_fe().n_dofs_per_face());
cell->face(face)->get_dof_indices(
scratch_dofs, cell->active_fe_index());
primary_dofs.clear();
dependent_dofs.clear();
for (unsigned int i = 0;
- i < cell->get_fe().dofs_per_face;
+ i < cell->get_fe().n_dofs_per_face();
++i)
if ((*primary_dof_masks[dominating_fe_index]
[cell->active_fe_index()])
dependent_dofs.push_back(scratch_dofs[i]);
AssertDimension(primary_dofs.size(),
- dominating_fe.dofs_per_face);
+ dominating_fe.n_dofs_per_face());
AssertDimension(dependent_dofs.size(),
- cell->get_fe().dofs_per_face -
- dominating_fe.dofs_per_face);
+ cell->get_fe().n_dofs_per_face() -
+ dominating_fe.n_dofs_per_face());
filter_constraints(primary_dofs,
dependent_dofs,
// now do the same for another FE this is pretty
// much the same we do above to resolve h-refinement
// constraints
- Assert(dominating_fe.dofs_per_face <=
- neighbor->get_fe().dofs_per_face,
+ Assert(dominating_fe.n_dofs_per_face() <=
+ neighbor->get_fe().n_dofs_per_face(),
ExcInternalError());
ensure_existence_of_face_matrix(
[neighbor->active_fe_index()]);
constraint_matrix.reinit(
- neighbor->get_fe().dofs_per_face,
- dominating_fe.dofs_per_face);
+ neighbor->get_fe().n_dofs_per_face(),
+ dominating_fe.n_dofs_per_face());
restrict_secondface_to_virtual.mmult(
constraint_matrix,
restrict_mother_to_virtual_primary_inv);
dependent_dofs.resize(
- neighbor->get_fe().dofs_per_face);
+ neighbor->get_fe().n_dofs_per_face());
cell->face(face)->get_dof_indices(
dependent_dofs, neighbor->active_fe_index());
ExcNotImplemented());
const unsigned int dofs_per_face =
- face_1->get_fe(face_1->nth_active_fe_index(0)).dofs_per_face;
+ face_1->get_fe(face_1->nth_active_fe_index(0)).n_dofs_per_face();
FullMatrix<double> child_transformation(dofs_per_face, dofs_per_face);
FullMatrix<double> subface_interpolation(dofs_per_face,
dofs_per_face);
"zero or equal to the number of components in the finite "
"element."));
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
std::vector<types::global_dof_index> dofs_1(dofs_per_face);
std::vector<types::global_dof_index> dofs_2(dofs_per_face);
{
Assert(matrix.m() == matrix.n(), ExcInternalError());
- const unsigned int n_dofs_per_face = fe.dofs_per_face;
+ const unsigned int n_dofs_per_face = fe.n_dofs_per_face();
if (matrix.m() == n_dofs_per_face)
{
{
Assert(face_1->n_active_fe_indices() == 1, ExcInternalError());
const unsigned int n_dofs_per_face =
- face_1->get_fe(face_1->nth_active_fe_index(0)).dofs_per_face;
+ face_1->get_fe(face_1->nth_active_fe_index(0)).n_dofs_per_face();
Assert(matrix.m() == 0 ||
(first_vector_components.empty() &&
{
Assert(face_2->n_active_fe_indices() == 1, ExcInternalError());
const unsigned int n_dofs_per_face =
- face_2->get_fe(face_2->nth_active_fe_index(0)).dofs_per_face;
+ face_2->get_fe(face_2->nth_active_fe_index(0)).n_dofs_per_face();
Assert(matrix.m() == 0 ||
(first_vector_components.empty() &&
face_2->get_fe(face_2->nth_active_fe_index(0)) :
face_1->get_fe(face_1->nth_active_fe_index(0));
- const unsigned int n_dofs_per_face = fe.dofs_per_face;
+ const unsigned int n_dofs_per_face = fe.n_dofs_per_face();
// Sometimes we just have nothing to do (for all finite elements, or
// systems which accidentally don't have any dofs on the boundary).
(face->boundary_id() == boundary_id)))
{
// get indices and physical location on this face
- face_dofs.resize(fe.dofs_per_face);
+ face_dofs.resize(fe.n_dofs_per_face());
face->get_dof_indices(face_dofs, cell->active_fe_index());
// enter those dofs into the list that match the component
for (const unsigned int f : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(f))
{
- const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
+ const unsigned int dofs_per_face = cell->get_fe().n_dofs_per_face();
dofs_on_this_face.resize(dofs_per_face);
cell->face(f)->get_dof_indices(dofs_on_this_face,
cell->active_fe_index());
if (boundary_ids.find(cell->face(f)->boundary_id()) !=
boundary_ids.end())
{
- const unsigned int dofs_per_face = cell->get_fe().dofs_per_face;
+ const unsigned int dofs_per_face = cell->get_fe().n_dofs_per_face();
dofs_on_this_face.resize(dofs_per_face);
cell->face(f)->get_dof_indices(dofs_on_this_face,
cell->active_fe_index());
const std::vector<ComponentMask> &nonzero_c)
: FiniteElementData<dim>(fe_data)
, adjust_quad_dof_index_for_face_orientation_table(dim == 3 ?
- this->dofs_per_quad :
+ this->n_dofs_per_quad() :
0,
dim == 3 ? 8 : 0)
, adjust_line_dof_index_for_line_orientation_table(
- dim == 3 ? this->dofs_per_line : 0)
+ dim == 3 ? this->n_dofs_per_line() : 0)
, system_to_base_table(this->n_dofs_per_cell())
- , face_system_to_base_table(this->dofs_per_face)
+ , face_system_to_base_table(this->n_dofs_per_face())
, component_to_base_table(this->components,
std::make_pair(std::make_pair(0U, 0U), 0U))
,
if (this->is_primitive())
{
system_to_component_table.resize(this->n_dofs_per_cell());
- face_system_to_component_table.resize(this->dofs_per_face);
+ face_system_to_component_table.resize(this->n_dofs_per_face());
for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
face_system_to_component_table[j] = std::pair<unsigned, unsigned>(0, j);
}
for (unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
face_system_to_base_table[j] = std::make_pair(std::make_pair(0U, 0U), j);
// Fill with default value; may be changed by constructor of derived class.
const bool face_flip,
const bool face_rotation) const
{
- AssertIndexRange(face_index, this->dofs_per_face);
+ AssertIndexRange(face_index, this->n_dofs_per_face());
AssertIndexRange(face, GeometryInfo<dim>::faces_per_cell);
// TODO: we could presumably solve the 3d case below using the
// other than standard orientation
if ((face_orientation != true) || (face_flip != false) ||
(face_rotation != false))
- Assert((this->dofs_per_line <= 1) && (this->dofs_per_quad <= 1),
+ Assert((this->n_dofs_per_line() <= 1) && (this->n_dofs_per_quad() <= 1),
ExcMessage(
"The function in this base class can not handle this case. "
"Rather, the derived class you are using must provide "
// we need to distinguish between DoFs on vertices, lines and in 3d quads.
// do so in a sequence of if-else statements
- if (face_index < this->first_face_line_index)
+ if (face_index < this->get_first_face_line_index())
// DoF is on a vertex
{
// get the number of the vertex on the face that corresponds to this DoF,
this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
- else if (face_index < this->first_face_quad_index)
+ else if (face_index < this->get_first_face_quad_index())
// DoF is on a face
{
// do the same kind of translation as before. we need to only consider
// DoFs on the lines, i.e., ignoring those on the vertices
- const unsigned int index = face_index - this->first_face_line_index;
+ const unsigned int index = face_index - this->get_first_face_line_index();
- const unsigned int face_line = index / this->dofs_per_line;
- const unsigned int dof_index_on_line = index % this->dofs_per_line;
+ const unsigned int face_line = index / this->n_dofs_per_line();
+ const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
- return (this->first_line_index +
+ return (this->get_first_line_index() +
GeometryInfo<dim>::face_to_cell_lines(
face, face_line, face_orientation, face_flip, face_rotation) *
- this->dofs_per_line +
+ this->n_dofs_per_line() +
dof_index_on_line);
}
else
Assert(dim >= 3, ExcInternalError());
// ignore vertex and line dofs
- const unsigned int index = face_index - this->first_face_quad_index;
+ const unsigned int index = face_index - this->get_first_face_quad_index();
- return (this->first_quad_index + face * this->dofs_per_quad + index);
+ return (this->get_first_quad_index() + face * this->n_dofs_per_quad() +
+ index);
}
}
// in 3d), so we don't need the table, but
// the function should also not have been
// called
- AssertIndexRange(index, this->dofs_per_quad);
+ AssertIndexRange(index, this->n_dofs_per_quad());
Assert(adjust_quad_dof_index_for_face_orientation_table.n_elements() ==
- 8 * this->dofs_per_quad,
+ 8 * this->n_dofs_per_quad(),
ExcInternalError());
return index + adjust_quad_dof_index_for_face_orientation_table(
index, 4 * face_orientation + 2 * face_flip + face_rotation);
if (dim < 3)
return index;
- AssertIndexRange(index, this->dofs_per_line);
+ AssertIndexRange(index, this->n_dofs_per_line());
Assert(adjust_line_dof_index_for_line_orientation_table.size() ==
- this->dofs_per_line,
+ this->n_dofs_per_line(),
ExcInternalError());
if (line_orientation)
return index;
const internal::SubfaceCase<dim> &subface_case) const
{
if (subface_case == internal::SubfaceCase<dim>::case_isotropic)
- return (this->dofs_per_face == 0) || (interface_constraints.m() != 0);
+ return (this->n_dofs_per_face() == 0) || (interface_constraints.m() != 0);
else
return false;
}
"(which is always the case in 2d, and in 3d requires "
"that the neighboring cell of a coarse cell presents "
"exactly four children on the common face)."));
- Assert((this->dofs_per_face == 0) || (interface_constraints.m() != 0),
+ Assert((this->n_dofs_per_face() == 0) || (interface_constraints.m() != 0),
ExcMessage("The finite element for which you try to obtain "
"hanging node constraints does not appear to "
"implement them."));
case 1:
return {0U, 0U};
case 2:
- return {this->n_dofs_per_vertex() + 2 * this->dofs_per_line,
- this->dofs_per_face};
+ return {this->n_dofs_per_vertex() + 2 * this->n_dofs_per_line(),
+ this->n_dofs_per_face()};
case 3:
- return {5 * this->n_dofs_per_vertex() + 12 * this->dofs_per_line +
- 4 * this->dofs_per_quad,
- this->dofs_per_face};
+ return {5 * this->n_dofs_per_vertex() + 12 * this->n_dofs_per_line() +
+ 4 * this->n_dofs_per_quad(),
+ this->n_dofs_per_face()};
default:
Assert(false, ExcNotImplemented());
}
// there are as many as there are
// degrees of freedom on a face
Assert((unit_face_support_points.size() == 0) ||
- (unit_face_support_points.size() == this->dofs_per_face),
+ (unit_face_support_points.size() == this->n_dofs_per_face()),
ExcInternalError());
return unit_face_support_points;
}
FiniteElement<dim, spacedim>::unit_face_support_point(
const unsigned int index) const
{
- AssertIndexRange(index, this->dofs_per_face);
- Assert(unit_face_support_points.size() == this->dofs_per_face,
+ AssertIndexRange(index, this->n_dofs_per_face());
+ Assert(unit_face_support_points.size() == this->n_dofs_per_face(),
ExcFEHasNoSupportPoints());
return unit_face_support_points[index];
}
// submatrices with an array for each refine case
std::vector<FullMatrix<double>> face_embeddings(
1 << (dim - 1),
- FullMatrix<double>(this->dofs_per_face, this->dofs_per_face));
+ FullMatrix<double>(this->n_dofs_per_face(), this->n_dofs_per_face()));
// TODO: Something goes wrong there. The error of the least squares fit
// is to large ...
// FETools::compute_face_embedding_matrices(*this, face_embeddings.data(), 0,
// 0);
- this->interface_constraints.reinit((1 << (dim - 1)) * this->dofs_per_face,
- this->dofs_per_face);
+ this->interface_constraints.reinit((1 << (dim - 1)) * this->n_dofs_per_face(),
+ this->n_dofs_per_face());
unsigned int target_row = 0;
for (const auto &face_embedding : face_embeddings)
for (unsigned int i = 0; i < face_embedding.m(); ++i)
boundary_weights.reinit(n_face_points, legendre.n());
- // Assert (face_points.size() == this->dofs_per_face,
+ // Assert (face_points.size() == this->n_dofs_per_face(),
// ExcInternalError());
for (unsigned int k = 0; k < n_face_points; ++k)
for (unsigned int k = 0; k < n_face_points; ++k)
for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
++i_child)
- for (unsigned int i_face = 0; i_face < this->dofs_per_face;
+ for (unsigned int i_face = 0; i_face < this->n_dofs_per_face();
++i_face)
{
// The quadrature
// subcell are NOT
// transformed, so we
// have to do it here.
- this->restriction[iso][child](face * this->dofs_per_face +
+ this->restriction[iso][child](face * this->n_dofs_per_face() +
i_face,
i_child) +=
Utilities::fixed_power<dim - 1>(.5) * q_sub.weight(k) *
cached_values_face(i_child, k) *
this->shape_value_component(
- face * this->dofs_per_face + i_face,
+ face * this->n_dofs_per_face() + i_face,
q_sub.point(k),
GeometryInfo<dim>::unit_normal_direction[face]);
}
QGauss<dim> q_cell(rt_order + 1);
const unsigned int start_cell_dofs =
- GeometryInfo<dim>::faces_per_cell * this->dofs_per_face;
+ GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face();
// Store shape values, since the
// evaluation suffers if not
for (unsigned int k = 0; k < n_face_points; ++k)
for (unsigned int i = 0; i < boundary_weights.size(1); ++i)
{
- nodal_values[i + face * this->dofs_per_face] +=
+ nodal_values[i + face * this->n_dofs_per_face()] +=
boundary_weights(k, i) *
support_point_values[face * n_face_points + k][GeometryInfo<
dim>::unit_normal_direction[face]];
}
const unsigned int start_cell_dofs =
- GeometryInfo<dim>::faces_per_cell * this->dofs_per_face;
+ GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face();
const unsigned int start_cell_points =
GeometryInfo<dim>::faces_per_cell * n_face_points;
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
- face_embeddings[i].reinit(this->dofs_per_face, this->dofs_per_face);
+ face_embeddings[i].reinit(this->n_dofs_per_face(), this->n_dofs_per_face());
FETools::compute_face_embedding_matrices(*this, face_embeddings, 0, 0, 1.);
- this->interface_constraints.reinit((1 << (dim - 1)) * this->dofs_per_face,
- this->dofs_per_face);
+ this->interface_constraints.reinit((1 << (dim - 1)) * this->n_dofs_per_face(),
+ this->n_dofs_per_face());
unsigned int target_row = 0;
for (unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
for (unsigned int i = 0; i < face_embeddings[d].m(); ++i)
// initialize_support_points()
if (test_values_face.size() == 0)
{
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
nodal_values[dbase + i] =
support_point_values[pbase + i]
[GeometryInfo<dim>::unit_normal_direction[f]];
- pbase += this->dofs_per_face;
+ pbase += this->n_dofs_per_face();
}
else
{
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
{
double s = 0.;
for (unsigned int k = 0; k < test_values_face.size(); ++k)
}
pbase += test_values_face.size();
}
- dbase += this->dofs_per_face;
+ dbase += this->n_dofs_per_face();
}
AssertDimension(dbase,
- this->dofs_per_face * GeometryInfo<dim>::faces_per_cell);
+ this->n_dofs_per_face() * GeometryInfo<dim>::faces_per_cell);
AssertDimension(pbase,
this->generalized_support_points.size() -
test_values_cell.size());
++k)
this->generalized_support_points[k] =
faces.point(k + QProjector<dim>::DataSetDescriptor::face(
- 0, true, false, false, this->dofs_per_face));
+ 0, true, false, false, this->n_dofs_per_face()));
// Currently, for backward compatibility, we do not use moments, but
// point values on faces in 2D. In 3D, this is impossible, since the
const unsigned int subface,
FullMatrix<double> & interpolation_matrix) const
{
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// see if source is a Bernstein element
if (const FE_Bernstein<dim, spacedim> *source_fe =
{
// have this test in here since a table of size 2x0 reports its size as
// 0x0
- Assert(interpolation_matrix.n() == this->dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.n(),
- this->dofs_per_face));
+ this->n_dofs_per_face()));
// Make sure that the element for which the DoFs should be constrained
// is the one with the higher polynomial degree. Actually the procedure
// produced in that case might lead to problems in the hp procedures,
// which use this method.
Assert(
- this->dofs_per_face <= source_fe->dofs_per_face,
+ this->n_dofs_per_face() <= source_fe->n_dofs_per_face(),
(typename FiniteElement<dim,
spacedim>::ExcInterpolationNotImplemented()));
QProjector<dim>::project_to_face(quad_face_support, 0) :
QProjector<dim>::project_to_subface(quad_face_support, 0, subface);
- for (unsigned int i = 0; i < source_fe->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < source_fe->n_dofs_per_face(); ++i)
{
const Point<dim> &p = subface_quadrature.point(i);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
{
double matrix_entry =
this->shape_value(this->face_to_cell_index(j, 0), p);
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
- for (unsigned int j = 0; j < source_fe->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_face(); ++j)
{
double sum = 0.;
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
sum += interpolation_matrix(j, i);
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
// equivalencies to be recorded
return std::vector<std::pair<unsigned int, unsigned int>>();
}
- else if (fe_other.dofs_per_face == 0)
+ else if (fe_other.n_dofs_per_face() == 0)
{
// if the other element has no elements on faces at all,
// then it would be impossible to enforce any kind of
// If the system is not primitive, these have not been initialized by
// FiniteElement
this->system_to_component_table.resize(this->n_dofs_per_cell());
- this->face_system_to_component_table.resize(this->dofs_per_face);
+ this->face_system_to_component_table.resize(this->n_dofs_per_face());
FETools::Compositing::build_cell_tables(this->system_to_base_table,
this->system_to_component_table,
{
// this function is similar to the respective method in FE_Q
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// see if source is a FaceQ element
if (const FE_FaceQ<dim, spacedim> *source_fe =
// produced in that case might lead to problems in the hp procedures,
// which use this method.
Assert(
- this->dofs_per_face <= source_fe->dofs_per_face,
+ this->n_dofs_per_face() <= source_fe->n_dofs_per_face(),
(typename FiniteElement<dim,
spacedim>::ExcInterpolationNotImplemented()));
// compute the interpolation matrix by simply taking the value at the
// support points.
- for (unsigned int i = 0; i < source_fe->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < source_fe->n_dofs_per_face(); ++i)
{
const Point<dim - 1> p =
subface == numbers::invalid_unsigned_int ?
GeometryInfo<dim - 1>::child_to_cell_coordinates(
face_quadrature.point(i), subface);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
{
double matrix_entry = this->poly_space.compute_value(j, p);
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
- for (unsigned int j = 0; j < source_fe->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_face(); ++j)
{
double sum = 0.;
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
sum += interpolation_matrix(j, i);
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
const unsigned int shape_index,
const unsigned int face_index) const
{
- return (face_index == (shape_index / this->dofs_per_face));
+ return (face_index == (shape_index / this->n_dofs_per_face()));
}
// equivalencies to be recorded
return std::vector<std::pair<unsigned int, unsigned int>>();
}
- else if (fe_other.dofs_per_face == 0)
+ else if (fe_other.n_dofs_per_face() == 0)
{
// if the other element has no elements on faces at all,
// then it would be impossible to enforce any kind of
// equivalencies to be recorded
return std::vector<std::pair<unsigned int, unsigned int>>();
}
- else if (fe_other.dofs_per_face == 0)
+ else if (fe_other.n_dofs_per_face() == 0)
{
// if the other element has no elements on faces at all,
// then it would be impossible to enforce any kind of
FullMatrix<double> &interpolation_matrix) const
{
(void)x_source_fe;
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
interpolation_matrix(0, 0) = 1.;
}
const unsigned int shape_index,
const unsigned int face_index) const
{
- return (face_index == (shape_index / this->dofs_per_face));
+ return (face_index == (shape_index / this->n_dofs_per_face()));
}
{
// this function is similar to the respective method in FE_Q
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// see if source is a FaceP element
if (const FE_FaceP<dim, spacedim> *source_fe =
// produced in that case might lead to problems in the hp procedures,
// which use this method.
Assert(
- this->dofs_per_face <= source_fe->dofs_per_face,
+ this->n_dofs_per_face() <= source_fe->n_dofs_per_face(),
(typename FiniteElement<dim,
spacedim>::ExcInterpolationNotImplemented()));
// zero.
const double eps = 2e-13 * (this->degree + 1) * (dim - 1);
- FullMatrix<double> mass(face_quadrature.size(), source_fe->dofs_per_face);
+ FullMatrix<double> mass(face_quadrature.size(),
+ source_fe->n_dofs_per_face());
for (unsigned int k = 0; k < face_quadrature.size(); ++k)
{
GeometryInfo<dim - 1>::child_to_cell_coordinates(
face_quadrature.point(k), subface);
- for (unsigned int j = 0; j < source_fe->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_face(); ++j)
mass(k, j) = source_fe->poly_space.compute_value(j, p);
}
Householder<double> H(mass);
Vector<double> v_in(face_quadrature.size());
- Vector<double> v_out(source_fe->dofs_per_face);
+ Vector<double> v_out(source_fe->n_dofs_per_face());
// compute the interpolation matrix by evaluating on the fine side and
// then solving the least squares problem
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
{
for (unsigned int k = 0; k < face_quadrature.size(); ++k)
{
(void)result;
Assert(result < 1e-12, FETools::ExcLeastSquaresError(result));
- for (unsigned int j = 0; j < source_fe->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_face(); ++j)
{
double matrix_entry = v_out(j);
{
Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
for (unsigned int face : GeometryInfo<dim>::face_indices())
- constant_modes(0, face * this->dofs_per_face) = true;
+ constant_modes(0, face * this->n_dofs_per_face()) = true;
return std::pair<Table<2, bool>, std::vector<unsigned int>>(
constant_modes, std::vector<unsigned int>(1, 0));
}
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
- face_embeddings[i].reinit(this->dofs_per_face, this->dofs_per_face);
+ face_embeddings[i].reinit(this->n_dofs_per_face(), this->n_dofs_per_face());
FETools::compute_face_embedding_matrices<dim, double>(
*this,
case 2:
{
- this->interface_constraints.reinit(2 * this->dofs_per_face,
- this->dofs_per_face);
+ this->interface_constraints.reinit(2 * this->n_dofs_per_face(),
+ this->n_dofs_per_face());
for (unsigned int i = 0; i < GeometryInfo<2>::max_children_per_face;
++i)
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
- for (unsigned int k = 0; k < this->dofs_per_face; ++k)
- this->interface_constraints(i * this->dofs_per_face + j, k) =
- face_embeddings[i](j, k);
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
+ for (unsigned int k = 0; k < this->n_dofs_per_face(); ++k)
+ this->interface_constraints(i * this->n_dofs_per_face() + j,
+ k) = face_embeddings[i](j, k);
break;
}
case 3:
{
- this->interface_constraints.reinit(4 * (this->dofs_per_face -
+ this->interface_constraints.reinit(4 * (this->n_dofs_per_face() -
this->degree),
- this->dofs_per_face);
+ this->n_dofs_per_face());
unsigned int target_row = 0;
for (unsigned int i = 0; i < 2; ++i)
for (unsigned int j = this->degree; j < 2 * this->degree;
++j, ++target_row)
- for (unsigned int k = 0; k < this->dofs_per_face; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_face(); ++k)
this->interface_constraints(target_row, k) =
face_embeddings[2 * i](j, k);
for (unsigned int j = 3 * this->degree;
j < GeometryInfo<3>::lines_per_face * this->degree;
++j, ++target_row)
- for (unsigned int k = 0; k < this->dofs_per_face; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_face(); ++k)
this->interface_constraints(target_row, k) =
face_embeddings[i](j, k);
for (unsigned int k = i * this->degree;
k < (i + 1) * this->degree;
++k, ++target_row)
- for (unsigned int l = 0; l < this->dofs_per_face; ++l)
+ for (unsigned int l = 0; l < this->n_dofs_per_face(); ++l)
this->interface_constraints(target_row, l) =
face_embeddings[i + 2 * j](k, l);
for (unsigned int k = (i + 2) * this->degree;
k < (i + 3) * this->degree;
++k, ++target_row)
- for (unsigned int l = 0; l < this->dofs_per_face; ++l)
+ for (unsigned int l = 0; l < this->n_dofs_per_face(); ++l)
this->interface_constraints(target_row, l) =
face_embeddings[2 * i + j](k, l);
++i)
for (unsigned int j =
GeometryInfo<3>::lines_per_face * this->degree;
- j < this->dofs_per_face;
+ j < this->n_dofs_per_face();
++j, ++target_row)
- for (unsigned int k = 0; k < this->dofs_per_face; ++k)
+ for (unsigned int k = 0; k < this->n_dofs_per_face(); ++k)
this->interface_constraints(target_row, k) =
face_embeddings[i](j, k);
AssertThrow((source.get_name().find("FE_Nedelec<") == 0) ||
(dynamic_cast<const FE_Nedelec<dim> *>(&source) != nullptr),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
- Assert(interpolation_matrix.m() == source.dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.m(), source.dofs_per_face));
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
+ Assert(interpolation_matrix.m() == source.n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.m(),
+ source.n_dofs_per_face()));
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
// ok, source is a Nedelec element, so
// we will be able to do the work
// lead to problems in the
// hp procedures, which use this
// method.
- Assert(this->dofs_per_face <= source_fe.dofs_per_face,
+ Assert(this->n_dofs_per_face() <= source_fe.n_dofs_per_face(),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
interpolation_matrix = 0;
AssertThrow((source.get_name().find("FE_Nedelec<") == 0) ||
(dynamic_cast<const FE_Nedelec<dim> *>(&source) != nullptr),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
- Assert(interpolation_matrix.m() == source.dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.m(), source.dofs_per_face));
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
+ Assert(interpolation_matrix.m() == source.n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.m(),
+ source.n_dofs_per_face()));
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
// ok, source is a Nedelec element, so
// we will be able to do the work
// lead to problems in the
// hp procedures, which use this
// method.
- Assert(this->dofs_per_face <= source_fe.dofs_per_face,
+ Assert(this->n_dofs_per_face() <= source_fe.n_dofs_per_face(),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
interpolation_matrix = 0.0;
// Perform projection-based interpolation
{
case 2:
{
- for (unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_face(); ++dof)
for (unsigned int q_point = 0; q_point < n_edge_quadrature_points;
++q_point)
{
Vector<double> solution(source_fe.degree - 1);
Vector<double> system_rhs(source_fe.degree - 1);
- for (unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_face(); ++dof)
{
system_rhs = 0.0;
{0.0, 1.0},
{1.0, 1.0}};
- for (unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_face(); ++dof)
for (unsigned int q_point = 0; q_point < n_edge_quadrature_points;
++q_point)
{
GeometryInfo<dim>::lines_per_face);
Vector<double> tmp(GeometryInfo<dim>::lines_per_face);
- for (unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_face(); ++dof)
{
system_rhs = 0.0;
system_rhs.reinit(system_matrix_inv.m(), 2);
tmp.reinit(2);
- for (unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
+ for (unsigned int dof = 0; dof < this->n_dofs_per_face(); ++dof)
{
system_rhs = 0.0;
const unsigned int lines_per_cell = GeometryInfo<dim>::lines_per_cell;
const unsigned int faces_per_cell = GeometryInfo<dim>::faces_per_cell;
- const unsigned int n_line_dofs = this->dofs_per_line * lines_per_cell;
- const unsigned int n_face_dofs = this->dofs_per_quad * faces_per_cell;
+ const unsigned int n_line_dofs = this->n_dofs_per_line() * lines_per_cell;
+ const unsigned int n_face_dofs = this->n_dofs_per_quad() * faces_per_cell;
const UpdateFlags flags(data.update_each);
const unsigned int n_q_points = quadrature.size();
for (unsigned int m = 0; m < lines_per_cell; ++m)
{
- const unsigned int shift_m(m * this->dofs_per_line);
+ const unsigned int shift_m(m * this->n_dofs_per_line());
for (unsigned int q = 0; q < n_q_points; ++q)
{
// Only compute 1d polynomials if degree>0.
degree, std::vector<double>(poly_length));
for (unsigned int m = 0; m < lines_per_cell; ++m)
{
- const unsigned int shift_m(m * this->dofs_per_line);
+ const unsigned int shift_m(m * this->n_dofs_per_line());
for (unsigned int q = 0; q < n_q_points; ++q)
{
// precompute values of all 1d polynomials required:
// DoF info:
const unsigned int n_line_dofs =
- this->dofs_per_line * GeometryInfo<dim>::lines_per_cell;
+ this->n_dofs_per_line() * GeometryInfo<dim>::lines_per_cell;
// First we find the global face orientations on the current cell.
std::vector<std::vector<unsigned int>> face_orientation(
// Loop through quad points:
for (unsigned int m = 0; m < faces_per_cell; ++m)
{
- const unsigned int shift_m(m * this->dofs_per_quad);
+ const unsigned int shift_m(m * this->n_dofs_per_quad());
// Calculate the offsets for each face-based shape function:
//
// Type-1 (gradients)
const unsigned int nn = cell->neighbor_face_no(f);
if (nn < GeometryInfo<dim>::faces_per_cell / 2)
- for (unsigned int j = 0; j < fe.dofs_per_face; ++j)
+ for (unsigned int j = 0; j < fe.n_dofs_per_face(); ++j)
{
const unsigned int cell_j = fe.face_to_cell_index(j, f);
- Assert(f * fe.dofs_per_face + j < face_sign.size(),
+ Assert(f * fe.n_dofs_per_face() + j < face_sign.size(),
ExcInternalError());
Assert(mapping_kind.size() == 1 ||
cell_j < mapping_kind.size(),
if ((mapping_kind.size() > 1 ?
mapping_kind[cell_j] :
mapping_kind[0]) == mapping_raviart_thomas)
- face_sign[f * fe.dofs_per_face + j] = -1.0;
+ face_sign[f * fe.n_dofs_per_face() + j] = -1.0;
}
}
}
const unsigned int subface,
FullMatrix<double> & interpolation_matrix) const
{
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// see if source is a Q element
if (const FE_Q_Base<PolynomialType, dim, spacedim> *source_fe =
{
// have this test in here since a table of size 2x0 reports its size as
// 0x0
- Assert(interpolation_matrix.n() == this->dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.n(),
- this->dofs_per_face));
+ this->n_dofs_per_face()));
// Make sure that the element for which the DoFs should be constrained
// is the one with the higher polynomial degree. Actually the procedure
// produced in that case might lead to problems in the hp procedures,
// which use this method.
Assert(
- this->dofs_per_face <= source_fe->dofs_per_face,
+ this->n_dofs_per_face() <= source_fe->n_dofs_per_face(),
(typename FiniteElement<dim,
spacedim>::ExcInterpolationNotImplemented()));
subface == numbers::invalid_unsigned_int ?
QProjector<dim>::project_to_face(quad_face_support, 0) :
QProjector<dim>::project_to_subface(quad_face_support, 0, subface);
- for (unsigned int i = 0; i < source_fe->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < source_fe->n_dofs_per_face(); ++i)
{
const Point<dim> &p = subface_quadrature.point(i);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
{
double matrix_entry =
this->shape_value(this->face_to_cell_index(j, 0), p);
// make sure that the row sum of each of the matrices is 1 at this
// point. this must be so since the shape functions sum up to 1
- for (unsigned int j = 0; j < source_fe->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe->n_dofs_per_face(); ++j)
{
double sum = 0.;
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
sum += interpolation_matrix(j, i);
Assert(std::fabs(sum - 1) < eps, ExcInternalError());
// equivalencies to be recorded
return std::vector<std::pair<unsigned int, unsigned int>>();
}
- else if (fe_other.dofs_per_face == 0)
+ else if (fe_other.n_dofs_per_face() == 0)
{
// if the other element has no elements on faces at all,
// then it would be impossible to enforce any kind of
// equivalencies to be recorded
return std::vector<std::pair<unsigned int, unsigned int>>();
}
- else if (fe_other.dofs_per_face == 0)
+ else if (fe_other.n_dofs_per_face() == 0)
{
// if the other element has no elements on faces at all,
// then it would be impossible to enforce any kind of
// equivalencies to be recorded
return std::vector<std::pair<unsigned int, unsigned int>>();
}
- else if (fe_other.dofs_per_face == 0)
+ else if (fe_other.n_dofs_per_face() == 0)
{
// if the other element has no elements on faces at all,
// then it would be impossible to enforce any kind of
return;
Assert(this->adjust_quad_dof_index_for_face_orientation_table.n_elements() ==
- 8 * this->dofs_per_quad,
+ 8 * this->n_dofs_per_quad(),
ExcInternalError());
const unsigned int n = q_degree - 1;
- Assert(n * n == this->dofs_per_quad, ExcInternalError());
+ Assert(n * n == this->n_dofs_per_quad(), ExcInternalError());
// the dofs on a face are connected to a n x n matrix. for example, for
// degree==4 we have the following dofs on a quad
// rotated and mirrored numbers.
- for (unsigned int local = 0; local < this->dofs_per_quad; ++local)
+ for (unsigned int local = 0; local < this->n_dofs_per_quad(); ++local)
// face support points are in lexicographic ordering with x running
// fastest. invert that (y running fastest)
{
}
// additionally initialize reordering of line dofs
- for (unsigned int i = 0; i < this->dofs_per_line; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_line(); ++i)
this->adjust_line_dof_index_for_line_orientation_table[i] =
- this->dofs_per_line - 1 - i - i;
+ this->n_dofs_per_line() - 1 - i - i;
}
const bool face_flip,
const bool face_rotation) const
{
- AssertIndexRange(face_index, this->dofs_per_face);
+ AssertIndexRange(face_index, this->n_dofs_per_face());
AssertIndexRange(face, GeometryInfo<dim>::faces_per_cell);
// TODO: we could presumably solve the 3d case below using the
// we need to distinguish between DoFs on vertices, lines and in 3d quads.
// do so in a sequence of if-else statements
- if (face_index < this->first_face_line_index)
+ if (face_index < this->get_first_face_line_index())
// DoF is on a vertex
{
// get the number of the vertex on the face that corresponds to this DoF,
this->n_dofs_per_vertex() +
dof_index_on_vertex);
}
- else if (face_index < this->first_face_quad_index)
+ else if (face_index < this->get_first_face_quad_index())
// DoF is on a face
{
// do the same kind of translation as before. we need to only consider
// DoFs on the lines, i.e., ignoring those on the vertices
- const unsigned int index = face_index - this->first_face_line_index;
+ const unsigned int index = face_index - this->get_first_face_line_index();
- const unsigned int face_line = index / this->dofs_per_line;
- const unsigned int dof_index_on_line = index % this->dofs_per_line;
+ const unsigned int face_line = index / this->n_dofs_per_line();
+ const unsigned int dof_index_on_line = index % this->n_dofs_per_line();
// we now also need to adjust the line index for the case of
// face orientation, face flips, etc
adjusted_dof_index_on_line = dof_index_on_line;
else
adjusted_dof_index_on_line =
- this->dofs_per_line - dof_index_on_line - 1;
+ this->n_dofs_per_line() - dof_index_on_line - 1;
break;
case 3:
//
// that said, the Q2 case is easy enough to implement, as is the
// case where everything is in standard orientation
- Assert((this->dofs_per_line <= 1) ||
+ Assert((this->n_dofs_per_line() <= 1) ||
((face_orientation == true) && (face_flip == false) &&
(face_rotation == false)),
ExcNotImplemented());
Assert(false, ExcInternalError());
}
- return (this->first_line_index +
+ return (this->get_first_line_index() +
GeometryInfo<dim>::face_to_cell_lines(
face, face_line, face_orientation, face_flip, face_rotation) *
- this->dofs_per_line +
+ this->n_dofs_per_line() +
adjusted_dof_index_on_line);
}
else
Assert(dim >= 3, ExcInternalError());
// ignore vertex and line dofs
- const unsigned int index = face_index - this->first_face_quad_index;
+ const unsigned int index = face_index - this->get_first_face_quad_index();
// the same is true here as above for the 3d case -- someone will
// just have to draw a bunch of pictures. in the meantime,
// we can implement the Q2 case in which it is simple
- Assert((this->dofs_per_quad <= 1) ||
+ Assert((this->n_dofs_per_quad() <= 1) ||
((face_orientation == true) && (face_flip == false) &&
(face_rotation == false)),
ExcNotImplemented());
- return (this->first_quad_index + face * this->dofs_per_quad + index);
+ return (this->get_first_quad_index() + face * this->n_dofs_per_quad() +
+ index);
}
}
// first, special-case interior shape functions, since they have no support
// no-where on the boundary
- if (((dim == 2) && (shape_index >= this->first_quad_index)) ||
- ((dim == 3) && (shape_index >= this->first_hex_index)))
+ if (((dim == 2) && (shape_index >= this->get_first_quad_index())) ||
+ ((dim == 3) && (shape_index >= this->get_first_hex_index())))
return false;
// let's see whether this is a vertex
- if (shape_index < this->first_line_index)
+ if (shape_index < this->get_first_line_index())
{
// for Q elements, there is one dof per vertex, so
// shape_index==vertex_number. check whether this vertex is on the given
return false;
}
- else if (shape_index < this->first_quad_index)
+ else if (shape_index < this->get_first_quad_index())
// ok, dof is on a line
{
const unsigned int line_index =
- (shape_index - this->first_line_index) / this->dofs_per_line;
+ (shape_index - this->get_first_line_index()) / this->n_dofs_per_line();
Assert(line_index < GeometryInfo<dim>::lines_per_cell,
ExcInternalError());
else
Assert(false, ExcNotImplemented());
}
- else if (shape_index < this->first_hex_index)
+ else if (shape_index < this->get_first_hex_index())
// dof is on a quad
{
const unsigned int quad_index =
- (shape_index - this->first_quad_index) / this->dofs_per_quad;
+ (shape_index - this->get_first_quad_index()) / this->n_dofs_per_quad();
Assert(static_cast<signed int>(quad_index) <
static_cast<signed int>(GeometryInfo<dim>::quads_per_cell),
ExcInternalError());
// for all dimensions.
std::vector<FullMatrix<double>> dofs_cell(
GeometryInfo<1>::max_children_per_cell,
- FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->dofs_per_line,
- 2 * this->n_dofs_per_vertex() + this->dofs_per_line));
+ FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->n_dofs_per_line(),
+ 2 * this->n_dofs_per_vertex() +
+ this->n_dofs_per_line()));
std::vector<FullMatrix<double>> dofs_subcell(
GeometryInfo<1>::max_children_per_cell,
- FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->dofs_per_line,
- 2 * this->n_dofs_per_vertex() + this->dofs_per_line));
+ FullMatrix<double>(2 * this->n_dofs_per_vertex() + this->n_dofs_per_line(),
+ 2 * this->n_dofs_per_vertex() +
+ this->n_dofs_per_line()));
// build these fields, as they are
// needed as auxiliary fields later
// on
// one is an FE_Nothing.
if (dynamic_cast<const FE_Q_Hierarchical<dim> *>(&fe_other) != nullptr)
{
- const unsigned int this_dpl = this->dofs_per_line;
- const unsigned int other_dpl = fe_other.dofs_per_line;
+ const unsigned int this_dpl = this->n_dofs_per_line();
+ const unsigned int other_dpl = fe_other.n_dofs_per_line();
// we deal with hierarchical 1d polynomials where dofs are enumerated
// increasingly. Thus we return a vector of pairs for the first N-1, where
// one is an FE_Nothing.
if (dynamic_cast<const FE_Q_Hierarchical<dim> *>(&fe_other) != nullptr)
{
- const unsigned int this_dpq = this->dofs_per_quad;
- const unsigned int other_dpq = fe_other.dofs_per_quad;
+ const unsigned int this_dpq = this->n_dofs_per_quad();
+ const unsigned int other_dpq = fe_other.n_dofs_per_quad();
// we deal with hierarchical 1d polynomials where dofs are enumerated
// increasingly. Thus we return a vector of pairs for the first N-1, where
std::vector<FullMatrix<double>> &dofs_subcell) const
{
const unsigned int dofs_1d =
- 2 * this->n_dofs_per_vertex() + this->dofs_per_line;
+ 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
// The dofs_subcell matrices are transposed
// (4.19), (4.21) and (4.27),(4.28),(4.30) in
const std::vector<FullMatrix<double>> &dofs_subcell)
{
const unsigned int dofs_1d =
- 2 * this->n_dofs_per_vertex() + this->dofs_per_line;
+ 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
this->interface_constraints.TableBase<2, double>::reinit(
this->interface_constraints_size());
unsigned int iso = RefinementCase<dim>::isotropic_refinement - 1;
const unsigned int dofs_1d =
- 2 * this->n_dofs_per_vertex() + this->dofs_per_line;
+ 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
TensorProductPolynomials<dim> *poly_space_derived_ptr =
dynamic_cast<TensorProductPolynomials<dim> *>(this->poly_space.get());
const std::vector<unsigned int> &renumber =
nullptr),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// ok, source is a Q_Hierarchical element, so
// we will be able to do the work
// lead to problems in the
// hp procedures, which use this
// method.
- Assert(this->dofs_per_face <= source_fe.dofs_per_face,
+ Assert(this->n_dofs_per_face() <= source_fe.n_dofs_per_face(),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
interpolation_matrix = 0;
// element, which corresponds to 1 on diagonal of the matrix.
// DoFs which correspond to higher polynomials
// are zeroed (zero rows in the matrix).
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
interpolation_matrix(i, i) = 1;
break;
nullptr),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// ok, source is a Q_Hierarchical element, so
// we will be able to do the work
// lead to problems in the
// hp procedures, which use this
// method.
- Assert(this->dofs_per_face <= source_fe.dofs_per_face,
+ Assert(this->n_dofs_per_face() <= source_fe.n_dofs_per_face(),
(typename FiniteElement<dim>::ExcInterpolationNotImplemented()));
switch (dim)
interpolation_matrix(1, 0) = 0.5;
interpolation_matrix(1, 1) = 0.5;
- for (unsigned int dof = 2; dof < this->dofs_per_face;)
+ for (unsigned int dof = 2; dof < this->n_dofs_per_face();)
{
interpolation_matrix(1, dof) = -1.0;
dof = dof + 2;
int factorial_i = 1;
- for (unsigned int i = 2; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 2; i < this->n_dofs_per_face(); ++i)
{
interpolation_matrix(i, i) = std::pow(0.5, i);
factorial_i *= i;
int factorial_j = factorial_i;
int factorial_ij = 1;
- for (unsigned int j = i + 1; j < this->dofs_per_face; ++j)
+ for (unsigned int j = i + 1; j < this->n_dofs_per_face();
+ ++j)
{
factorial_ij *= j - i;
factorial_j *= j;
interpolation_matrix(0, 0) = 0.5;
interpolation_matrix(0, 1) = 0.5;
- for (unsigned int dof = 2; dof < this->dofs_per_face;)
+ for (unsigned int dof = 2; dof < this->n_dofs_per_face();)
{
interpolation_matrix(0, dof) = -1.0;
dof = dof + 2;
int factorial_i = 1;
- for (unsigned int i = 2; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 2; i < this->n_dofs_per_face(); ++i)
{
interpolation_matrix(i, i) = std::pow(0.5, i);
factorial_i *= i;
int factorial_j = factorial_i;
int factorial_ij = 1;
- for (unsigned int j = i + 1; j < this->dofs_per_face; ++j)
+ for (unsigned int j = i + 1; j < this->n_dofs_per_face();
+ ++j)
{
factorial_ij *= j - i;
factorial_j *= j;
std::vector<unsigned int> h2l(fe.n_dofs_per_cell());
// polynomial degree
- const unsigned int degree = fe.dofs_per_line + 1;
+ const unsigned int degree = fe.n_dofs_per_line() + 1;
// number of grid points in each
// direction
const unsigned int n = degree + 1;
h2l[next_index++] = n;
h2l[next_index++] = n + 1;
// left line
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n;
// right line
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n + 1;
// bottom line
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = 2 + i;
// top line
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = n + 2 + i;
// inside quad
- Assert(fe.dofs_per_quad == fe.dofs_per_line * fe.dofs_per_line,
+ Assert(fe.n_dofs_per_quad() ==
+ fe.n_dofs_per_line() * fe.n_dofs_per_line(),
ExcInternalError());
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = (2 + i) * n + 2 + j;
Assert(next_index == fe.n_dofs_per_cell(), ExcInternalError());
// now the lines
// bottom face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n + 1;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = 2 + i;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = n + 2 + i;
// top face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = n2 + (2 + i) * n;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = n2 + (2 + i) * n + 1;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = n2 + 2 + i;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = n2 + n + 2 + i;
// lines in z-direction
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n2;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n2 + 1;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n2 + n;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
h2l[next_index++] = (2 + i) * n2 + n + 1;
// inside quads
- Assert(fe.dofs_per_quad == fe.dofs_per_line * fe.dofs_per_line,
+ Assert(fe.n_dofs_per_quad() ==
+ fe.n_dofs_per_line() * fe.n_dofs_per_line(),
ExcInternalError());
// left face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = (2 + i) * n2 + (2 + j) * n;
// right face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = (2 + i) * n2 + (2 + j) * n + 1;
// front face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = (2 + i) * n2 + 2 + j;
// back face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = (2 + i) * n2 + n + 2 + j;
// bottom face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = (2 + i) * n + 2 + j;
// top face
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
h2l[next_index++] = n2 + (2 + i) * n + 2 + j;
// inside hex
- Assert(fe.dofs_per_hex == fe.dofs_per_quad * fe.dofs_per_line,
+ Assert(fe.n_dofs_per_hex() ==
+ fe.n_dofs_per_quad() * fe.n_dofs_per_line(),
ExcInternalError());
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
- for (unsigned int j = 0; j < fe.dofs_per_line; ++j)
- for (unsigned int k = 0; k < fe.dofs_per_line; ++k)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
+ for (unsigned int j = 0; j < fe.n_dofs_per_line(); ++j)
+ for (unsigned int k = 0; k < fe.n_dofs_per_line(); ++k)
h2l[next_index++] = (2 + i) * n2 + (2 + j) * n + 2 + k;
Assert(next_index == fe.n_dofs_per_cell(), ExcInternalError());
// shape functions, since they
// have no support no-where on
// the boundary
- if (((dim == 2) && (shape_index >= this->first_quad_index)) ||
- ((dim == 3) && (shape_index >= this->first_hex_index)))
+ if (((dim == 2) && (shape_index >= this->get_first_quad_index())) ||
+ ((dim == 3) && (shape_index >= this->get_first_hex_index())))
return false;
// let's see whether this is a
// vertex
- if (shape_index < this->first_line_index)
+ if (shape_index < this->get_first_line_index())
{
// for Q elements, there is
// one dof per vertex, so
return true;
return false;
}
- else if (shape_index < this->first_quad_index)
+ else if (shape_index < this->get_first_quad_index())
// ok, dof is on a line
{
const unsigned int line_index =
- (shape_index - this->first_line_index) / this->dofs_per_line;
+ (shape_index - this->get_first_line_index()) / this->n_dofs_per_line();
Assert(line_index < GeometryInfo<dim>::lines_per_cell,
ExcInternalError());
return true;
return false;
}
- else if (shape_index < this->first_hex_index)
+ else if (shape_index < this->get_first_hex_index())
// dof is on a quad
{
const unsigned int quad_index =
- (shape_index - this->first_quad_index) / this->dofs_per_quad;
+ (shape_index - this->get_first_quad_index()) / this->n_dofs_per_quad();
Assert(static_cast<signed int>(quad_index) <
static_cast<signed int>(GeometryInfo<dim>::quads_per_cell),
ExcInternalError());
// submatrices with an array for each refine case
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
- face_embeddings[i].reinit(this->dofs_per_face, this->dofs_per_face);
+ face_embeddings[i].reinit(this->n_dofs_per_face(), this->n_dofs_per_face());
FETools::compute_face_embedding_matrices<dim, double>(*this,
face_embeddings,
0,
0);
- this->interface_constraints.reinit((1 << (dim - 1)) * this->dofs_per_face,
- this->dofs_per_face);
+ this->interface_constraints.reinit((1 << (dim - 1)) * this->n_dofs_per_face(),
+ this->n_dofs_per_face());
unsigned int target_row = 0;
for (unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
for (unsigned int i = 0; i < face_embeddings[d].m(); ++i)
boundary_weights.reinit(n_face_points, legendre.n());
- // Assert (face_points.size() == this->dofs_per_face,
+ // Assert (face_points.size() == this->n_dofs_per_face(),
// ExcInternalError());
for (unsigned int k = 0; k < n_face_points; ++k)
for (unsigned int k = 0; k < n_face_points; ++k)
for (unsigned int i_child = 0; i_child < this->n_dofs_per_cell();
++i_child)
- for (unsigned int i_face = 0; i_face < this->dofs_per_face;
+ for (unsigned int i_face = 0; i_face < this->n_dofs_per_face();
++i_face)
{
// The quadrature
// subcell are NOT
// transformed, so we
// have to do it here.
- this->restriction[iso][child](face * this->dofs_per_face +
+ this->restriction[iso][child](face * this->n_dofs_per_face() +
i_face,
i_child) +=
Utilities::fixed_power<dim - 1>(.5) * q_sub.weight(k) *
cached_values_on_face(i_child, k) *
this->shape_value_component(
- face * this->dofs_per_face + i_face,
+ face * this->n_dofs_per_face() + i_face,
q_sub.point(k),
GeometryInfo<dim>::unit_normal_direction[face]);
}
QGauss<dim> q_cell(this->degree);
const unsigned int start_cell_dofs =
- GeometryInfo<dim>::faces_per_cell * this->dofs_per_face;
+ GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face();
// Store shape values, since the
// evaluation suffers if not
for (unsigned int k = 0; k < n_face_points; ++k)
for (unsigned int i = 0; i < boundary_weights.size(1); ++i)
{
- nodal_values[i + face * this->dofs_per_face] +=
+ nodal_values[i + face * this->n_dofs_per_face()] +=
boundary_weights(k, i) *
support_point_values[face * n_face_points + k](
GeometryInfo<dim>::unit_normal_direction[face]);
}
const unsigned int start_cell_dofs =
- GeometryInfo<dim>::faces_per_cell * this->dofs_per_face;
+ GeometryInfo<dim>::faces_per_cell * this->n_dofs_per_face();
const unsigned int start_cell_points =
GeometryInfo<dim>::faces_per_cell * n_face_points;
// submatrices with an array for each refine case
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
- face_embeddings[i].reinit(this->dofs_per_face, this->dofs_per_face);
+ face_embeddings[i].reinit(this->n_dofs_per_face(), this->n_dofs_per_face());
FETools::compute_face_embedding_matrices<dim, double>(*this,
face_embeddings,
0,
0);
- this->interface_constraints.reinit((1 << (dim - 1)) * this->dofs_per_face,
- this->dofs_per_face);
+ this->interface_constraints.reinit((1 << (dim - 1)) * this->n_dofs_per_face(),
+ this->n_dofs_per_face());
unsigned int target_row = 0;
for (unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
for (unsigned int i = 0; i < face_embeddings[d].m(); ++i)
FE_RaviartThomasNodal<dim>::initialize_support_points(const unsigned int deg)
{
this->generalized_support_points.resize(this->n_dofs_per_cell());
- this->generalized_face_support_points.resize(this->dofs_per_face);
+ this->generalized_face_support_points.resize(this->n_dofs_per_face());
// Number of the point being entered
unsigned int current = 0;
if (dim > 1)
{
QGauss<dim - 1> face_points(deg + 1);
- Assert(face_points.size() == this->dofs_per_face, ExcInternalError());
- for (unsigned int k = 0; k < this->dofs_per_face; ++k)
+ Assert(face_points.size() == this->n_dofs_per_face(), ExcInternalError());
+ for (unsigned int k = 0; k < this->n_dofs_per_face(); ++k)
this->generalized_face_support_points[k] = face_points.point(k);
Quadrature<dim> faces =
QProjector<dim>::project_to_all_faces(face_points);
for (unsigned int k = 0;
- k < this->dofs_per_face * GeometryInfo<dim>::faces_per_cell;
+ k < this->n_dofs_per_face() * GeometryInfo<dim>::faces_per_cell;
++k)
this->generalized_support_points[k] =
faces.point(k + QProjector<dim>::DataSetDescriptor::face(
- 0, true, false, false, this->dofs_per_face));
+ 0, true, false, false, this->n_dofs_per_face()));
- current = this->dofs_per_face * GeometryInfo<dim>::faces_per_cell;
+ current = this->n_dofs_per_face() * GeometryInfo<dim>::faces_per_cell;
}
if (deg == 0)
unsigned int fbase = 0;
unsigned int f = 0;
for (; f < GeometryInfo<dim>::faces_per_cell;
- ++f, fbase += this->dofs_per_face)
+ ++f, fbase += this->n_dofs_per_face())
{
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
{
nodal_values[fbase + i] = support_point_values[fbase + i](
GeometryInfo<dim>::unit_normal_direction[f]);
// this works exactly like the line
// case above
- const unsigned int p = this->dofs_per_quad;
- const unsigned int q = fe_q_other->dofs_per_quad;
+ const unsigned int p = this->n_dofs_per_quad();
+ const unsigned int q = fe_q_other->n_dofs_per_quad();
std::vector<std::pair<unsigned int, unsigned int>> identities;
&x_source_fe) != nullptr),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// ok, source is a RaviartThomasNodal element, so
// we will be able to do the work
// lead to problems in the
// hp procedures, which use this
// method.
- Assert(this->dofs_per_face <= source_fe.dofs_per_face,
+ Assert(this->n_dofs_per_face() <= source_fe.n_dofs_per_face(),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
// generate a quadrature
const Quadrature<dim> face_projection =
QProjector<dim>::project_to_face(quad_face_support, 0);
- for (unsigned int i = 0; i < source_fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < source_fe.n_dofs_per_face(); ++i)
{
const Point<dim> &p = face_projection.point(i);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
{
double matrix_entry =
this->shape_value_component(this->face_to_cell_index(j, 0), p, 0);
// this point. this must be so
// since the shape functions sum up
// to 1
- for (unsigned int j = 0; j < source_fe.dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe.n_dofs_per_face(); ++j)
{
double sum = 0.;
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
sum += interpolation_matrix(j, i);
Assert(std::fabs(sum - 1) < 2e-13 * this->degree * (dim - 1),
&x_source_fe) != nullptr),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// ok, source is a RaviartThomasNodal element, so
// we will be able to do the work
// lead to problems in the
// hp procedures, which use this
// method.
- Assert(this->dofs_per_face <= source_fe.dofs_per_face,
+ Assert(this->n_dofs_per_face() <= source_fe.n_dofs_per_face(),
typename FiniteElement<dim>::ExcInterpolationNotImplemented());
// generate a quadrature
const Quadrature<dim> subface_projection =
QProjector<dim>::project_to_subface(quad_face_support, 0, subface);
- for (unsigned int i = 0; i < source_fe.dofs_per_face; ++i)
+ for (unsigned int i = 0; i < source_fe.n_dofs_per_face(); ++i)
{
const Point<dim> &p = subface_projection.point(i);
- for (unsigned int j = 0; j < this->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < this->n_dofs_per_face(); ++j)
{
double matrix_entry =
this->shape_value_component(this->face_to_cell_index(j, 0), p, 0);
// this point. this must be so
// since the shape functions sum up
// to 1
- for (unsigned int j = 0; j < source_fe.dofs_per_face; ++j)
+ for (unsigned int j = 0; j < source_fe.n_dofs_per_face(); ++j)
{
double sum = 0.;
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
sum += interpolation_matrix(j, i);
Assert(std::fabs(sum - 1) < 2e-13 * this->degree * (dim - 1),
FETools::compute_embedding_matrices(*this, this->prolongation, true, 1.0);
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
- face_embeddings[i].reinit(this->dofs_per_face, this->dofs_per_face);
+ face_embeddings[i].reinit(this->n_dofs_per_face(), this->n_dofs_per_face());
FETools::compute_face_embedding_matrices<dim, double>(*this,
face_embeddings,
0,
0);
- this->interface_constraints.reinit((1 << (dim - 1)) * this->dofs_per_face,
- this->dofs_per_face);
+ this->interface_constraints.reinit((1 << (dim - 1)) * this->n_dofs_per_face(),
+ this->n_dofs_per_face());
unsigned int target_row = 0;
for (unsigned int d = 0; d < GeometryInfo<dim>::max_children_per_face; ++d)
for (unsigned int i = 0; i < face_embeddings[d].m(); ++i)
FE_RT_Bubbles<dim>::initialize_support_points(const unsigned int deg)
{
this->generalized_support_points.resize(this->n_dofs_per_cell());
- this->generalized_face_support_points.resize(this->dofs_per_face);
+ this->generalized_face_support_points.resize(this->n_dofs_per_face());
// Index of the point being entered
unsigned int current = 0;
if (dim > 1)
{
QGaussLobatto<dim - 1> face_points(deg + 1);
- Assert(face_points.size() == this->dofs_per_face, ExcInternalError());
- for (unsigned int k = 0; k < this->dofs_per_face; ++k)
+ Assert(face_points.size() == this->n_dofs_per_face(), ExcInternalError());
+ for (unsigned int k = 0; k < this->n_dofs_per_face(); ++k)
this->generalized_face_support_points[k] = face_points.point(k);
Quadrature<dim> faces =
QProjector<dim>::project_to_all_faces(face_points);
for (unsigned int k = 0;
- k < this->dofs_per_face * GeometryInfo<dim>::faces_per_cell;
+ k < this->n_dofs_per_face() * GeometryInfo<dim>::faces_per_cell;
++k)
this->generalized_support_points[k] =
faces.point(k + QProjector<dim>::DataSetDescriptor::face(
- 0, true, false, false, this->dofs_per_face));
+ 0, true, false, false, this->n_dofs_per_face()));
- current = this->dofs_per_face * GeometryInfo<dim>::faces_per_cell;
+ current = this->n_dofs_per_face() * GeometryInfo<dim>::faces_per_cell;
}
if (deg == 1)
unsigned int fbase = 0;
unsigned int f = 0;
for (; f < GeometryInfo<dim>::faces_per_cell;
- ++f, fbase += this->dofs_per_face)
+ ++f, fbase += this->n_dofs_per_face())
{
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
{
nodal_values[fbase + i] = support_point_values[fbase + i](
GeometryInfo<dim>::unit_normal_direction[f]);
// then come the two sets of line indices
{
const unsigned int index_in_line =
- (m - this->n_dofs_per_vertex()) % this->dofs_per_line;
+ (m - this->n_dofs_per_vertex()) % this->n_dofs_per_line();
const unsigned int sub_line =
- (m - this->n_dofs_per_vertex()) / this->dofs_per_line;
+ (m - this->n_dofs_per_vertex()) / this->n_dofs_per_line();
Assert(sub_line < 2, ExcInternalError());
// from this information, try to get base element and
const unsigned int tmp2 =
this->face_system_to_base_table[tmp1].second -
2 * base_element(m_index.first.first).n_dofs_per_vertex();
- Assert(tmp2 <
- base_element(m_index.first.first).dofs_per_line,
+ Assert(tmp2 < base_element(m_index.first.first)
+ .n_dofs_per_line(),
ExcInternalError());
m_index.second =
base_element(m_index.first.first).n_dofs_per_vertex() +
- base_element(m_index.first.first).dofs_per_line *
+ base_element(m_index.first.first).n_dofs_per_line() *
sub_line +
tmp2;
}
m_index = this->system_to_base_table[m];
else
// then come the 12 sets of line indices
- if (m <
- 5 * this->n_dofs_per_vertex() + 12 * this->dofs_per_line)
+ if (m < 5 * this->n_dofs_per_vertex() +
+ 12 * this->n_dofs_per_line())
{
// for the meaning of all this, see the 2d part
const unsigned int index_in_line =
- (m - 5 * this->n_dofs_per_vertex()) % this->dofs_per_line;
+ (m - 5 * this->n_dofs_per_vertex()) %
+ this->n_dofs_per_line();
const unsigned int sub_line =
- (m - 5 * this->n_dofs_per_vertex()) / this->dofs_per_line;
+ (m - 5 * this->n_dofs_per_vertex()) /
+ this->n_dofs_per_line();
Assert(sub_line < 12, ExcInternalError());
const unsigned int tmp1 =
const unsigned int tmp2 =
this->face_system_to_base_table[tmp1].second -
4 * base_element(m_index.first.first).n_dofs_per_vertex();
- Assert(tmp2 <
- base_element(m_index.first.first).dofs_per_line,
+ Assert(tmp2 < base_element(m_index.first.first)
+ .n_dofs_per_line(),
ExcInternalError());
m_index.second =
5 *
base_element(m_index.first.first).n_dofs_per_vertex() +
- base_element(m_index.first.first).dofs_per_line *
+ base_element(m_index.first.first).n_dofs_per_line() *
sub_line +
tmp2;
}
// for the meaning of all this, see the 2d part
const unsigned int index_in_quad =
(m - 5 * this->n_dofs_per_vertex() -
- 12 * this->dofs_per_line) %
- this->dofs_per_quad;
- Assert(index_in_quad < this->dofs_per_quad,
+ 12 * this->n_dofs_per_line()) %
+ this->n_dofs_per_quad();
+ Assert(index_in_quad < this->n_dofs_per_quad(),
ExcInternalError());
const unsigned int sub_quad =
((m - 5 * this->n_dofs_per_vertex() -
- 12 * this->dofs_per_line) /
- this->dofs_per_quad);
+ 12 * this->n_dofs_per_line()) /
+ this->n_dofs_per_quad());
Assert(sub_quad < 4, ExcInternalError());
const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
- 4 * this->dofs_per_line +
+ 4 * this->n_dofs_per_line() +
index_in_quad;
Assert(tmp1 < this->face_system_to_base_table.size(),
ExcInternalError());
m_index.first = this->face_system_to_base_table[tmp1].first;
- Assert(
- this->face_system_to_base_table[tmp1].second >=
- 4 * base_element(m_index.first.first)
- .n_dofs_per_vertex() +
- 4 * base_element(m_index.first.first).dofs_per_line,
- ExcInternalError());
+ Assert(this->face_system_to_base_table[tmp1].second >=
+ 4 * base_element(m_index.first.first)
+ .n_dofs_per_vertex() +
+ 4 * base_element(m_index.first.first)
+ .n_dofs_per_line(),
+ ExcInternalError());
const unsigned int tmp2 =
this->face_system_to_base_table[tmp1].second -
4 *
base_element(m_index.first.first).n_dofs_per_vertex() -
- 4 * base_element(m_index.first.first).dofs_per_line;
- Assert(tmp2 <
- base_element(m_index.first.first).dofs_per_quad,
+ 4 * base_element(m_index.first.first).n_dofs_per_line();
+ Assert(tmp2 < base_element(m_index.first.first)
+ .n_dofs_per_quad(),
ExcInternalError());
m_index.second =
5 *
base_element(m_index.first.first).n_dofs_per_vertex() +
- 12 * base_element(m_index.first.first).dofs_per_line +
- base_element(m_index.first.first).dofs_per_quad *
+ 12 * base_element(m_index.first.first).n_dofs_per_line() +
+ base_element(m_index.first.first).n_dofs_per_quad() *
sub_quad +
tmp2;
}
// If the system is not primitive, these have not been initialized by
// FiniteElement
this->system_to_component_table.resize(this->n_dofs_per_cell());
- this->face_system_to_component_table.resize(this->dofs_per_face);
+ this->face_system_to_component_table.resize(this->n_dofs_per_face());
FETools::Compositing::build_cell_tables(this->system_to_base_table,
this->system_to_component_table,
for (unsigned int base_el = 0; base_el < this->n_base_elements();
++base_el)
if (!base_element(base_el).has_support_points() &&
- (base_element(base_el).dofs_per_face > 0))
+ (base_element(base_el).n_dofs_per_face() > 0))
{
this->unit_face_support_points.resize(0);
return;
// generate unit face support points from unit support points of sub
// elements
- this->unit_face_support_points.resize(this->dofs_per_face);
+ this->unit_face_support_points.resize(this->n_dofs_per_face());
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
{
const unsigned int base_i =
this->face_system_to_base_table[i].first.first;
// the array into which we want to write should have the correct size
// already.
Assert(this->adjust_quad_dof_index_for_face_orientation_table
- .n_elements() == 8 * this->dofs_per_quad,
+ .n_elements() == 8 * this->n_dofs_per_quad(),
ExcInternalError());
// to obtain the shifts for this composed element, copy the shift
index += temp.size(0);
}
}
- Assert(index == this->dofs_per_quad, ExcInternalError());
+ Assert(index == this->n_dofs_per_quad(), ExcInternalError());
// additionally compose the permutation information for lines
Assert(this->adjust_line_dof_index_for_line_orientation_table.size() ==
- this->dofs_per_line,
+ this->n_dofs_per_line(),
ExcInternalError());
index = 0;
for (unsigned int b = 0; b < this->n_base_elements(); ++b)
index += temp2.size();
}
}
- Assert(index == this->dofs_per_line, ExcInternalError());
+ Assert(index == this->n_dofs_per_line(), ExcInternalError());
});
// wait for all of this to finish
const FiniteElement<dim, spacedim> &x_source_fe,
FullMatrix<double> & interpolation_matrix) const
{
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// since dofs for each base are independent, we only have to stack things up
// from base element to base element
ExcNotImplemented());
// get the interpolation from the bases
- base_to_base_interpolation.reinit(base_other.dofs_per_face,
- base.dofs_per_face);
+ base_to_base_interpolation.reinit(base_other.n_dofs_per_face(),
+ base.n_dofs_per_face());
base.get_face_interpolation_matrix(base_other,
base_to_base_interpolation);
// now translate entries. we'd like to have something like
// face_base_to_system_index, but that doesn't exist. rather, all we
// have is the reverse. well, use that then
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
if (this->face_system_to_base_index(i).first ==
std::make_pair(base_index, multiplicity))
- for (unsigned int j = 0; j < fe_other_system->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < fe_other_system->n_dofs_per_face();
+ ++j)
if (fe_other_system->face_system_to_base_index(j).first ==
std::make_pair(base_index_other, multiplicity_other))
interpolation_matrix(j, i) = base_to_base_interpolation(
(dynamic_cast<const FESystem<dim, spacedim> *>(&x_source_fe) != nullptr),
(typename FiniteElement<dim, spacedim>::ExcInterpolationNotImplemented()));
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// since dofs for each base are independent, we only have to stack things up
// from base element to base element
ExcNotImplemented());
// get the interpolation from the bases
- base_to_base_interpolation.reinit(base_other.dofs_per_face,
- base.dofs_per_face);
+ base_to_base_interpolation.reinit(base_other.n_dofs_per_face(),
+ base.n_dofs_per_face());
base.get_subface_interpolation_matrix(base_other,
subface,
base_to_base_interpolation);
// now translate entries. we'd like to have something like
// face_base_to_system_index, but that doesn't exist. rather, all we
// have is the reverse. well, use that then
- for (unsigned int i = 0; i < this->dofs_per_face; ++i)
+ for (unsigned int i = 0; i < this->n_dofs_per_face(); ++i)
if (this->face_system_to_base_index(i).first ==
std::make_pair(base_index, multiplicity))
- for (unsigned int j = 0; j < fe_other_system->dofs_per_face; ++j)
+ for (unsigned int j = 0; j < fe_other_system->n_dofs_per_face();
+ ++j)
if (fe_other_system->face_system_to_base_index(j).first ==
std::make_pair(base_index_other, multiplicity_other))
interpolation_matrix(j, i) = base_to_base_interpolation(
Point<dim - 1>
FESystem<dim, spacedim>::unit_face_support_point(const unsigned int index) const
{
- AssertIndexRange(index, this->dofs_per_face);
- Assert((this->unit_face_support_points.size() == this->dofs_per_face) ||
+ AssertIndexRange(index, this->n_dofs_per_face());
+ Assert((this->unit_face_support_points.size() == this->n_dofs_per_face()) ||
(this->unit_face_support_points.size() == 0),
(typename FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
FullMatrix<double> & interpolation_matrix) const
{
// this is the code from FE_FaceQ
- Assert(interpolation_matrix.n() == this->dofs_per_face,
- ExcDimensionMismatch(interpolation_matrix.n(), this->dofs_per_face));
- Assert(interpolation_matrix.m() == x_source_fe.dofs_per_face,
+ Assert(interpolation_matrix.n() == this->n_dofs_per_face(),
+ ExcDimensionMismatch(interpolation_matrix.n(),
+ this->n_dofs_per_face()));
+ Assert(interpolation_matrix.m() == x_source_fe.n_dofs_per_face(),
ExcDimensionMismatch(interpolation_matrix.m(),
- x_source_fe.dofs_per_face));
+ x_source_fe.n_dofs_per_face()));
// see if source is a FaceQ element
if (const FE_TraceQ<dim, spacedim> *source_fe =
ExcInternalError());
const unsigned int n_dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
local_face_dof_indices.resize(n_dofs_per_face);
cell->face(f)->child(c)->get_dof_indices(
unsigned int subface = neighbor_face_no_subface_no.second;
const unsigned int n_dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
local_face_dof_indices.resize(n_dofs_per_face);
cell->neighbor(f)->face(face_no)->get_dof_indices(
// original cell
{
const unsigned int n_dofs_per_face =
- cell->get_fe().dofs_per_face;
+ cell->get_fe().n_dofs_per_face();
local_face_dof_indices.resize(n_dofs_per_face);
Assert(cell->neighbor(f)
// on line not including the vertices of the line.
const unsigned int n_dofs_per_line =
2 * cell->get_fe().n_dofs_per_vertex() +
- cell->get_fe().dofs_per_line;
+ cell->get_fe().n_dofs_per_line();
local_line_dof_indices.resize(n_dofs_per_line);
cell->line(l)->child(c)->get_dof_indices(
// on line not including the vertices of the line.
const unsigned int n_dofs_per_line =
2 * cell->get_fe().n_dofs_per_vertex() +
- cell->get_fe().dofs_per_line;
+ cell->get_fe().n_dofs_per_line();
local_line_dof_indices.resize(n_dofs_per_line);
parent_line->get_dof_indices(local_line_dof_indices);
const unsigned int n_dofs_per_line =
2 * cell->get_fe().n_dofs_per_vertex() +
- cell->get_fe().dofs_per_line;
+ cell->get_fe().n_dofs_per_line();
local_line_dof_indices.resize(n_dofs_per_line);
parent_line->child(c)->get_dof_indices(
// round.
// TODO: This assumes that even in hp context, the dofs per face
// coincide!
- unsigned int increment = fe.n_dofs_per_cell() - dim * fe.dofs_per_face;
- while (i < fe.first_line_index)
+ unsigned int increment =
+ fe.n_dofs_per_cell() - dim * fe.n_dofs_per_face();
+ while (i < fe.get_first_line_index())
row_lengths[cell_indices[i++]] += increment;
// From now on, if an object is
// a cell, its dofs only couple
// subtract adjacent faces to be
// added in the loop below.
increment = (dim > 1) ?
- fe.n_dofs_per_cell() - (dim - 1) * fe.dofs_per_face :
- fe.n_dofs_per_cell() -
- GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
- while (i < fe.first_quad_index)
+ fe.n_dofs_per_cell() - (dim - 1) * fe.n_dofs_per_face() :
+ fe.n_dofs_per_cell() - GeometryInfo<dim>::faces_per_cell *
+ fe.n_dofs_per_face();
+ while (i < fe.get_first_quad_index())
row_lengths[cell_indices[i++]] += increment;
// Now quads in 2D and 3D
increment = (dim > 2) ?
- fe.n_dofs_per_cell() - (dim - 2) * fe.dofs_per_face :
- fe.n_dofs_per_cell() -
- GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
- while (i < fe.first_hex_index)
+ fe.n_dofs_per_cell() - (dim - 2) * fe.n_dofs_per_face() :
+ fe.n_dofs_per_cell() - GeometryInfo<dim>::faces_per_cell *
+ fe.n_dofs_per_face();
+ while (i < fe.get_first_hex_index())
row_lengths[cell_indices[i++]] += increment;
// Finally, cells in 3D
increment = fe.n_dofs_per_cell() -
- GeometryInfo<dim>::faces_per_cell * fe.dofs_per_face;
+ GeometryInfo<dim>::faces_per_cell * fe.n_dofs_per_face();
while (i < fe.n_dofs_per_cell())
row_lengths[cell_indices[i++]] += increment;
for (unsigned int local_dof = 0;
local_dof < fe.n_dofs_per_cell();
++local_dof)
- row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
+ row_lengths[cell_indices[local_dof]] += fe.n_dofs_per_face();
continue;
}
if (flux_coupling != DoFTools::none)
{
const unsigned int dof_increment =
- nfe.n_dofs_per_cell() - nfe.dofs_per_face;
+ nfe.n_dofs_per_cell() - nfe.n_dofs_per_face();
for (unsigned int local_dof = 0;
local_dof < fe.n_dofs_per_cell();
++local_dof)
neighbor->get_mg_dof_indices(neighbor_indices);
for (unsigned int local_dof = 0; local_dof < fe.n_dofs_per_cell();
++local_dof)
- row_lengths[cell_indices[local_dof]] += nfe.dofs_per_face;
+ row_lengths[cell_indices[local_dof]] += nfe.n_dofs_per_face();
for (unsigned int local_dof = 0; local_dof < nfe.n_dofs_per_cell();
++local_dof)
- row_lengths[neighbor_indices[local_dof]] += fe.dofs_per_face;
+ row_lengths[neighbor_indices[local_dof]] += fe.n_dofs_per_face();
}
}
user_flags_triangulation.load_user_flags(old_flags);
// arbitrary, not the other way
// round.
unsigned int increment;
- while (i < fe.first_line_index)
+ while (i < fe.get_first_line_index())
{
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
mult) != DoFTools::none)
{
increment = fe.base_element(base).n_dofs_per_cell() -
- dim * fe.base_element(base).dofs_per_face;
+ dim * fe.base_element(base).n_dofs_per_face();
row_lengths[cell_indices[i]] += increment;
}
++i;
// In all other cases we
// subtract adjacent faces to be
// added in the loop below.
- while (i < fe.first_quad_index)
+ while (i < fe.get_first_quad_index())
{
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
fe.base_element(base).n_dofs_per_cell() -
((dim > 1) ? (dim - 1) :
GeometryInfo<dim>::faces_per_cell) *
- fe.base_element(base).dofs_per_face;
+ fe.base_element(base).n_dofs_per_face();
row_lengths[cell_indices[i]] += increment;
}
++i;
}
// Now quads in 2D and 3D
- while (i < fe.first_hex_index)
+ while (i < fe.get_first_hex_index())
{
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
fe.base_element(base).n_dofs_per_cell() -
((dim > 2) ? (dim - 2) :
GeometryInfo<dim>::faces_per_cell) *
- fe.base_element(base).dofs_per_face;
+ fe.base_element(base).n_dofs_per_face();
row_lengths[cell_indices[i]] += increment;
}
++i;
{
increment = fe.base_element(base).n_dofs_per_cell() -
GeometryInfo<dim>::faces_per_cell *
- fe.base_element(base).dofs_per_face;
+ fe.base_element(base).n_dofs_per_face();
row_lengths[cell_indices[i]] += increment;
}
++i;
for (unsigned int local_dof = 0;
local_dof < fe.n_dofs_per_cell();
++local_dof)
- row_lengths[cell_indices[local_dof]] += fe.dofs_per_face;
+ row_lengths[cell_indices[local_dof]] += fe.n_dofs_per_face();
continue;
}
{
const unsigned int dof_increment =
nfe.base_element(base).n_dofs_per_cell() -
- nfe.base_element(base).dofs_per_face;
+ nfe.base_element(base).n_dofs_per_face();
row_lengths[cell_indices[local_dof]] += dof_increment;
}
fe.system_to_component_index(local_dof).first,
nfe.first_block_of_base(base) + mult) != DoFTools::none)
row_lengths[cell_indices[local_dof]] +=
- nfe.base_element(base).dofs_per_face;
+ nfe.base_element(base).n_dofs_per_face();
for (unsigned int base = 0; base < fe.n_base_elements(); ++base)
for (unsigned int mult = 0; mult < fe.element_multiplicity(base);
++mult)
nfe.system_to_component_index(local_dof).first,
fe.first_block_of_base(base) + mult) != DoFTools::none)
row_lengths[neighbor_indices[local_dof]] +=
- fe.base_element(base).dofs_per_face;
+ fe.base_element(base).n_dofs_per_face();
}
}
user_flags_triangulation.load_user_flags(old_flags);
continue;
const FiniteElement<dim> &fe = cell->get_fe();
const unsigned int level = cell->level();
- local_dofs.resize(fe.dofs_per_face);
+ local_dofs.resize(fe.n_dofs_per_face());
for (const unsigned int face_no : GeometryInfo<dim>::face_indices())
if (cell->at_boundary(face_no) == true)
// get indices, physical location and boundary values of
// dofs on this face
- local_dofs.resize(fe.dofs_per_face);
+ local_dofs.resize(fe.n_dofs_per_face());
face->get_mg_dof_indices(level, local_dofs);
if (fe_is_system)
{
const FiniteElement<dim, spacedim> &fe = mg_dof_handler.get_fe();
const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
- const unsigned int dofs_per_face = fe.dofs_per_face;
+ const unsigned int dofs_per_face = fe.n_dofs_per_face();
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
{
AssertIndexRange(fe.n_dofs_per_vertex(), 2);
renumbering[0] = 0;
- for (unsigned int i = 0; i < fe.dofs_per_line; ++i)
+ for (unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
renumbering[i + fe.n_dofs_per_vertex()] =
GeometryInfo<1>::vertices_per_cell * fe.n_dofs_per_vertex() + i;
if (fe.n_dofs_per_vertex() > 0)