public:
static_assert(dim == 2, "Only dim==2 is implemented.");
- Solution() = default;
-
virtual double value(const Point<dim> &p,
const unsigned int /*component*/ = 0) const override
{
public:
static_assert(dim == 2, "Only dim==2 is implemented");
- RightHandSide() = default;
-
virtual double value(const Point<dim> &p,
const unsigned int /*component*/ = 0) const override
cell->get_dof_indices(copy_data.local_dof_indices);
- const ExactSolution::RightHandSide<dim> right_hand_side;
+ ExactSolution::RightHandSide<dim> right_hand_side;
const unsigned int dofs_per_cell =
scratch_data.fe_values.get_fe().n_dofs_per_cell();
fe_interface_values.get_normal_vectors();
- const ExactSolution::Solution<dim> exact_solution;
- std::vector<Tensor<1, dim>> exact_gradients(q_points.size());
+ ExactSolution::Solution<dim> exact_solution;
+ std::vector<Tensor<1, dim>> exact_gradients(q_points.size());
exact_solution.gradient_list(q_points, exact_gradients);
class RightHandSide : public Function<dim>, protected SolutionBase<dim>
{
public:
- RightHandSide() = default;
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
};
// Note that the operations we will do with the right hand side object are
// only querying data, never changing the object. We can therefore declare
// it <code>const</code>:
- const RightHandSide<dim> right_hand_side;
- std::vector<double> rhs_values(n_q_points);
+ RightHandSide<dim> right_hand_side;
+ std::vector<double> rhs_values(n_q_points);
// Finally we define an object denoting the exact solution function. We
// will use it to compute the Neumann values at the boundary from
class AnalyticalSolution : public Function<dim>
{
public:
- AnalyticalSolution() = default;
-
double value(const Point<dim> & point,
const unsigned int component = 0) const override;
};
// We then iterate iterate over the cells that have LocationToLevelSetValue
// value inside or intersected again. For each quadrature point, we compute
// the pointwise error and use this to compute the integral.
- const AnalyticalSolution<dim> analytical_solution;
- double error_L2_squared = 0;
+ AnalyticalSolution<dim> analytical_solution;
+ double error_L2_squared = 0;
for (const auto &cell :
dof_handler.active_cell_iterators() |
* Return an unrolled index in the range $[0,\text{dim}^{\text{rank}}-1]$
* for the element of the tensor indexed by the argument to the function.
*/
- DEAL_II_HOST_DEVICE static constexpr unsigned int
+ static constexpr DEAL_II_HOST_DEVICE unsigned int
component_to_unrolled_index(const TableIndices<rank_> &indices);
/**
* $[0, \text{dim}^{\text{rank}}-1]$, return which set of indices it would
* correspond to.
*/
- DEAL_II_HOST_DEVICE static constexpr TableIndices<rank_>
+ static constexpr DEAL_II_HOST_DEVICE TableIndices<rank_>
unrolled_to_component_indices(const unsigned int i);
/**