virtual void assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dFMatrix &cell_matrix,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
protected:
const Function<dim> &right_hand_side;
};
void PoissonEquation<2>::assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<2> &fe_values,
- const Triangulation<2>::cell_iterator &) const {
+ const DoFHandler<2>::cell_iterator &) const {
for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
for (unsigned int i=0; i<fe_values.total_dofs; ++i)
{
template <int dim>
void PoissonEquation<dim>::assemble (dFMatrix &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
template <int dim>
void PoissonEquation<dim>::assemble (dVector &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
l1_error_per_cell,
- *quadrature, *fe, L1_norm);
+ *quadrature, L1_norm);
cout << l1_error_per_cell.l1_norm() << endl;
l1_error.push_back (l1_error_per_cell.l1_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
l2_error_per_cell,
- *quadrature, *fe, L2_norm);
+ *quadrature, L2_norm);
cout << l2_error_per_cell.l2_norm() << endl;
l2_error.push_back (l2_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
linfty_error_per_cell,
- *quadrature, *fe, Linfty_norm);
+ *quadrature, Linfty_norm);
cout << linfty_error_per_cell.linfty_norm() << endl;
linfty_error.push_back (linfty_error_per_cell.linfty_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
h1_seminorm_error_per_cell,
- *quadrature, *fe, H1_seminorm);
+ *quadrature, H1_seminorm);
cout << h1_seminorm_error_per_cell.l2_norm() << endl;
h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
h1_error_per_cell,
- *quadrature, *fe, H1_norm);
+ *quadrature, H1_norm);
cout << h1_error_per_cell.l2_norm() << endl;
h1_error.push_back (h1_error_per_cell.l2_norm());
cout << " Calculating L2 error... ";
VectorTools<dim>::integrate_difference (*dof_handler,
solution, *solution_function,
- l2_error_per_cell, q, fe,
+ l2_error_per_cell, q,
L2_norm);
cout << l2_error_per_cell.l2_norm() << endl;
l2_error.push_back (l2_error_per_cell.l2_norm());
cout << " Calculating L-infinity error... ";
VectorTools<dim>::integrate_difference (*dof_handler,
solution, *solution_function,
- linfty_error_per_cell, q, fe,
+ linfty_error_per_cell, q,
Linfty_norm);
cout << linfty_error_per_cell.linfty_norm() << endl;
linfty_error.push_back (linfty_error_per_cell.linfty_norm());
cout << " Calculating H1 error... ";
VectorTools<dim>::integrate_difference (*dof_handler,
solution, *solution_function,
- h1_error_per_cell, q, fe,
+ h1_error_per_cell, q,
H1_norm);
cout << h1_error_per_cell.l2_norm() << endl;
h1_error.push_back (h1_error_per_cell.l2_norm());
virtual void assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dFMatrix &cell_matrix,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
protected:
const Function<dim> &right_hand_side;
};
void PoissonEquation<2>::assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<2> &fe_values,
- const Triangulation<2>::cell_iterator &) const {
+ const DoFHandler<2>::cell_iterator &) const {
for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
for (unsigned int i=0; i<fe_values.total_dofs; ++i)
{
template <int dim>
void PoissonEquation<dim>::assemble (dFMatrix &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
template <int dim>
void PoissonEquation<dim>::assemble (dVector &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
// apply Dirichlet bc as described
// in the docs
map<int, double> boundary_value_list;
- VectorTools<dim>::interpolate_boundary_values (*dof,
- dirichlet_bc, fe, boundary,
+ VectorTools<dim>::interpolate_boundary_values (*dof, dirichlet_bc, boundary,
boundary_value_list);
MatrixTools<dim>::apply_boundary_values (boundary_value_list,
system_matrix, solution,
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
l1_error_per_cell,
- *quadrature, *fe, L1_norm);
+ *quadrature, L1_norm);
cout << l1_error_per_cell.l1_norm() << endl;
l1_error.push_back (l1_error_per_cell.l1_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
l2_error_per_cell,
- *quadrature, *fe, L2_norm);
+ *quadrature, L2_norm);
cout << l2_error_per_cell.l2_norm() << endl;
l2_error.push_back (l2_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
linfty_error_per_cell,
- *quadrature, *fe, Linfty_norm);
+ *quadrature, Linfty_norm);
cout << linfty_error_per_cell.linfty_norm() << endl;
linfty_error.push_back (linfty_error_per_cell.linfty_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
h1_seminorm_error_per_cell,
- *quadrature, *fe, H1_seminorm);
+ *quadrature, H1_seminorm);
cout << h1_seminorm_error_per_cell.l2_norm() << endl;
h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
h1_error_per_cell,
- *quadrature, *fe, H1_norm);
+ *quadrature, H1_norm);
cout << h1_error_per_cell.l2_norm() << endl;
h1_error.push_back (h1_error_per_cell.l2_norm());
* useful if you want to create many right hand side vectors.
*
*
+ * All functions in this collection use the finite elemen given to the
+ * #DoFHandler# object the last time that the degrees of freedom were
+ * distributed on the triangulation.
+ *
* @author Wolfgang Bangerth, 1998
*/
template <int dim>
* for more information.
*/
static void create_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
* for more information.
*/
static void create_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
* for more information.
*/
static void create_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Boundary<dim> &boundary,
dSMatrix &matrix);
* for more information.
*/
static void create_boundary_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim-1> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
* for more information.
*/
static void create_laplace_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
* for more information.
*/
static void create_laplace_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
dVector &rhs_vector,
const Function<dim> *a = 0);
- /**
- * Build Lagrange interpolation
- matrix of different finite
- elements.
- */
- static void create_interpolation_matrix(const FiniteElement<dim> &high,
- const FiniteElement<dim> &low,
- dFMatrix& result);
+ /**
+ * Build Lagrange interpolation
+ * matrix of different finite
+ * elements.
+ */
+ static void create_interpolation_matrix(const FiniteElement<dim> &high,
+ const FiniteElement<dim> &low,
+ dFMatrix& result);
/**
* $L_2$ norm: compute the $l_2$ norm of the cell error vector.
* \end{itemize}
*
+ * All functions use the finite element given to the #DoFHandler# object the last
+ * time that the degrees of freedom were distributed over the triangulation.
*
* @author Wolfgang Bangerth, 1998
*/
* class for further information.
*/
static void interpolate (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Boundary<dim> &boundary,
const Function<dim> &function,
dVector &vec);
- /**
- * Interpolate different finite element
- * spaces. The interpolation is
- * executed from the higher order
- * space represented by #high# to
- the lower order space
- #low#. The interpolation on each
- cell is represented by the matrix
- #transfer#. Curved boundaries are
- neglected so far.
- */
- static void interpolate(const DoFHandler<dim> &high_dof,
- const DoFHandler<dim> &low_dof,
- const dFMatrix& transfer,
- const dVector& high,
- dVector& low);
-
+ /**
+ * Interpolate different finite
+ * element spaces. The
+ * interpolation is executed from
+ * the higher order space
+ * represented by #high# to the
+ * lower order space #low#. The
+ * interpolation on each cell is
+ * represented by the matrix
+ * #transfer#. Curved boundaries
+ * are neglected so far.
+ */
+ static void interpolate(const DoFHandler<dim> &high_dof,
+ const DoFHandler<dim> &low_dof,
+ const dFMatrix &transfer,
+ const dVector &high,
+ dVector &low);
/**
* Compute the projection of
*/
static void project (const DoFHandler<dim> &dof,
const ConstraintMatrix &constraints,
- const FiniteElement<dim> &fe,
const Boundary<dim> &boundary,
const Quadrature<dim> &q,
const Function<dim> &function,
* class for further information.
*/
static void create_right_hand_side (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
const Function<dim> &rhs,
*/
static void interpolate_boundary_values (const DoFHandler<dim> &dof,
const FunctionMap &dirichlet_bc,
- const FiniteElement<dim> &fe,
- const Boundary<dim> &boundary,
- map<int,double> &boundary_values);
+ const Boundary<dim> &boundary,
+ map<int,double> &boundary_values);
/**
* Project #function# to the boundary
*/
static void project_boundary_values (const DoFHandler<dim> &dof,
const FunctionMap &boundary_functions,
- const FiniteElement<dim> &fe,
const Quadrature<dim-1> &q,
const Boundary<dim> &boundary,
map<int,double> &boundary_values);
const Function<dim> &exact_solution,
dVector &difference,
const Quadrature<dim> &q,
- const FiniteElement<dim> &fe,
const NormType &norm,
const Boundary<dim> &boundary=StraightBoundary<dim>());
// in the docs
map<int, double> boundary_value_list;
VectorTools<dim>::interpolate_boundary_values (*dof_handler,
- dirichlet_bc, fe, boundary,
+ dirichlet_bc, boundary,
boundary_value_list);
MatrixTools<dim>::apply_boundary_values (boundary_value_list,
system_matrix, solution,
template <int dim>
void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
const Function<dim> * const a) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
dVector dummy; // no entries, should give an error if accessed
UpdateFlags update_flags = update_JxW_values;
if (a != 0)
template <int dim>
void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
const Function<dim> &rhs,
dVector &rhs_vector,
const Function<dim> * const a) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
UpdateFlags update_flags = UpdateFlags(update_q_points |
update_JxW_values);
const AssemblerData<dim> data (dof,
template <int dim>
void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Boundary<dim> &boundary,
dSMatrix &matrix) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
const unsigned int total_dofs = fe.total_dofs;
dFMatrix local_mass_matrix (total_dofs, total_dofs);
template <>
void MatrixCreator<1>::create_boundary_mass_matrix (const DoFHandler<1> &,
- const FiniteElement<1> &,
const Quadrature<0> &,
const Boundary<1> &,
dSMatrix &,
template <int dim>
void MatrixCreator<dim>::create_boundary_mass_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim-1> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
dVector &rhs_vector,
vector<int> &dof_to_boundary_mapping,
const Function<dim> *a) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
Assert (matrix.n() == dof.n_boundary_dofs(rhs), ExcInternalError());
Assert (matrix.n() == matrix.m(), ExcInternalError());
Assert (matrix.n() == rhs_vector.size(), ExcInternalError());
template <int dim>
void MatrixCreator<dim>::create_laplace_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
const Function<dim> * const a) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
dVector dummy; // no entries, should give an error if accessed
UpdateFlags update_flags = UpdateFlags(update_gradients |
update_JxW_values);
template <int dim>
void MatrixCreator<dim>::create_laplace_matrix (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
dSMatrix &matrix,
const Function<dim> &rhs,
dVector &rhs_vector,
const Function<dim> * const a) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
UpdateFlags update_flags = UpdateFlags(update_q_points |
update_gradients |
update_JxW_values);
template <int dim>
void VectorTools<dim>::interpolate (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
- const Boundary<dim> &boundary,
- const Function<dim> &function,
- dVector &vec) {
+ const Boundary<dim> &boundary,
+ const Function<dim> &function,
+ dVector &vec)
+{
+ const FiniteElement<dim> &fe = dof.get_fe();
+
DoFHandler<dim>::active_cell_iterator cell = dof.begin_active(),
endc = dof.end();
vector<int> dofs_on_cell (fe.total_dofs);
template <int dim> void
VectorTools<dim>::interpolate(const DoFHandler<dim> &high_dof,
- const DoFHandler<dim> &low_dof,
- const dFMatrix &transfer,
- const dVector &high,
- dVector &low)
+ const DoFHandler<dim> &low_dof,
+ const dFMatrix &transfer,
+ const dVector &high,
+ dVector &low)
{
dVector cell_high(high_dof.get_fe().total_dofs);
dVector cell_low(low_dof.get_fe().total_dofs);
template <>
void VectorTools<1>::project (const DoFHandler<1> &,
const ConstraintMatrix &,
- const FiniteElement<1> &,
const Boundary<1> &,
const Quadrature<1> &,
const Function<1> &,
template <int dim>
void VectorTools<dim>::project (const DoFHandler<dim> &dof,
const ConstraintMatrix &constraints,
- const FiniteElement<dim> &fe,
const Boundary<dim> &boundary,
const Quadrature<dim> &q,
const Function<dim> &function,
const bool enforce_zero_boundary,
const Quadrature<dim-1> &q_boundary,
const bool project_to_boundary_first) {
- // make up boundary values
+ const FiniteElement<dim> &fe = dof.get_fe();
+
+ // make up boundary values
map<int,double> boundary_values;
if (enforce_zero_boundary == true)
FunctionMap boundary_functions;
for (unsigned char c=0; c<255; ++c)
boundary_functions[c] = &function;
- project_boundary_values (dof, boundary_functions, fe, q_boundary,
+ project_boundary_values (dof, boundary_functions, q_boundary,
boundary, boundary_values);
};
dSMatrix mass_matrix (sparsity);
dVector tmp (mass_matrix.n());
- MatrixCreator<dim>::create_mass_matrix (dof, fe, boundary, mass_matrix);
- VectorTools<dim>::create_right_hand_side (dof, fe, q, boundary,
+ MatrixCreator<dim>::create_mass_matrix (dof, boundary, mass_matrix);
+ VectorTools<dim>::create_right_hand_side (dof, q, boundary,
function, tmp);
constraints.condense (mass_matrix);
template <int dim>
void VectorTools<dim>::create_right_hand_side (const DoFHandler<dim> &dof,
- const FiniteElement<dim> &fe,
const Quadrature<dim> &q,
const Boundary<dim> &boundary,
const Function<dim> &rhs,
dVector &rhs_vector) {
+ const FiniteElement<dim> &fe = dof.get_fe();
+
UpdateFlags update_flags = UpdateFlags(update_q_points |
update_JxW_values);
dSMatrix dummy;
void
VectorTools<1>::interpolate_boundary_values (const DoFHandler<1> &,
const FunctionMap &,
- const FiniteElement<1> &,
const Boundary<1> &,
map<int,double> &) {
Assert (false, ExcNotImplemented());
void
VectorTools<dim>::interpolate_boundary_values (const DoFHandler<dim> &dof,
const FunctionMap &dirichlet_bc,
- const FiniteElement<dim> &fe,
const Boundary<dim> &boundary,
map<int,double> &boundary_values) {
Assert (dirichlet_bc.find(255) == dirichlet_bc.end(),
ExcInvalidBoundaryIndicator());
+
+ const FiniteElement<dim> &fe = dof.get_fe();
+
// use two face iterators, since we need
// a DoF-iterator for the dof indices, but
// a Tria-iterator for the fe object
void
VectorTools<dim>::project_boundary_values (const DoFHandler<dim> &dof,
const FunctionMap &boundary_functions,
- const FiniteElement<dim> &fe,
const Quadrature<dim-1> &q,
const Boundary<dim> &boundary,
map<int,double> &boundary_values) {
dVector rhs(sparsity.n_rows());
- MatrixTools<dim>::create_boundary_mass_matrix (dof, fe, q, boundary,
+ MatrixTools<dim>::create_boundary_mass_matrix (dof, q, boundary,
mass_matrix, boundary_functions,
rhs, dof_to_boundary_mapping);
const Function<dim> &exact_solution,
dVector &difference,
const Quadrature<dim> &q,
- const FiniteElement<dim> &fe,
const NormType &norm,
const Boundary<dim> &boundary) {
- Assert (fe == dof.get_fe(), ExcInvalidFE());
-
+ const FiniteElement<dim> &fe = dof.get_fe();
+
difference.reinit (dof.get_tria().n_active_cells());
UpdateFlags update_flags = UpdateFlags (update_q_points |
virtual void assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dFMatrix &cell_matrix,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
protected:
const Function<dim> &right_hand_side;
};
void PoissonEquation<2>::assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<2> &fe_values,
- const Triangulation<2>::cell_iterator &) const {
+ const DoFHandler<2>::cell_iterator &) const {
for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
for (unsigned int i=0; i<fe_values.total_dofs; ++i)
{
template <int dim>
void PoissonEquation<dim>::assemble (dFMatrix &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
template <int dim>
void PoissonEquation<dim>::assemble (dVector &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
l1_error_per_cell,
- *quadrature, *fe, L1_norm);
+ *quadrature, L1_norm);
cout << l1_error_per_cell.l1_norm() << endl;
l1_error.push_back (l1_error_per_cell.l1_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
l2_error_per_cell,
- *quadrature, *fe, L2_norm);
+ *quadrature, L2_norm);
cout << l2_error_per_cell.l2_norm() << endl;
l2_error.push_back (l2_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
linfty_error_per_cell,
- *quadrature, *fe, Linfty_norm);
+ *quadrature, Linfty_norm);
cout << linfty_error_per_cell.linfty_norm() << endl;
linfty_error.push_back (linfty_error_per_cell.linfty_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
h1_seminorm_error_per_cell,
- *quadrature, *fe, H1_seminorm);
+ *quadrature, H1_seminorm);
cout << h1_seminorm_error_per_cell.l2_norm() << endl;
h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof_handler,
solution, sol,
h1_error_per_cell,
- *quadrature, *fe, H1_norm);
+ *quadrature, H1_norm);
cout << h1_error_per_cell.l2_norm() << endl;
h1_error.push_back (h1_error_per_cell.l2_norm());
cout << " Calculating L2 error... ";
VectorTools<dim>::integrate_difference (*dof_handler,
solution, *solution_function,
- l2_error_per_cell, q, fe,
+ l2_error_per_cell, q,
L2_norm);
cout << l2_error_per_cell.l2_norm() << endl;
l2_error.push_back (l2_error_per_cell.l2_norm());
cout << " Calculating L-infinity error... ";
VectorTools<dim>::integrate_difference (*dof_handler,
solution, *solution_function,
- linfty_error_per_cell, q, fe,
+ linfty_error_per_cell, q,
Linfty_norm);
cout << linfty_error_per_cell.linfty_norm() << endl;
linfty_error.push_back (linfty_error_per_cell.linfty_norm());
cout << " Calculating H1 error... ";
VectorTools<dim>::integrate_difference (*dof_handler,
solution, *solution_function,
- h1_error_per_cell, q, fe,
+ h1_error_per_cell, q,
H1_norm);
cout << h1_error_per_cell.l2_norm() << endl;
h1_error.push_back (h1_error_per_cell.l2_norm());
virtual void assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dFMatrix &cell_matrix,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
virtual void assemble (dVector &rhs,
const FEValues<dim> &fe_values,
- const Triangulation<dim>::cell_iterator &cell) const;
+ const DoFHandler<dim>::cell_iterator &cell) const;
protected:
const Function<dim> &right_hand_side;
};
void PoissonEquation<2>::assemble (dFMatrix &cell_matrix,
dVector &rhs,
const FEValues<2> &fe_values,
- const Triangulation<2>::cell_iterator &) const {
+ const DoFHandler<2>::cell_iterator &) const {
for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
for (unsigned int i=0; i<fe_values.total_dofs; ++i)
{
template <int dim>
void PoissonEquation<dim>::assemble (dFMatrix &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
template <int dim>
void PoissonEquation<dim>::assemble (dVector &,
const FEValues<dim> &,
- const Triangulation<dim>::cell_iterator &) const {
+ const DoFHandler<dim>::cell_iterator &) const {
Assert (false, ExcPureVirtualFunctionCalled());
};
// apply Dirichlet bc as described
// in the docs
map<int, double> boundary_value_list;
- VectorTools<dim>::interpolate_boundary_values (*dof,
- dirichlet_bc, fe, boundary,
+ VectorTools<dim>::interpolate_boundary_values (*dof, dirichlet_bc, boundary,
boundary_value_list);
MatrixTools<dim>::apply_boundary_values (boundary_value_list,
system_matrix, solution,
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
l1_error_per_cell,
- *quadrature, *fe, L1_norm);
+ *quadrature, L1_norm);
cout << l1_error_per_cell.l1_norm() << endl;
l1_error.push_back (l1_error_per_cell.l1_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
l2_error_per_cell,
- *quadrature, *fe, L2_norm);
+ *quadrature, L2_norm);
cout << l2_error_per_cell.l2_norm() << endl;
l2_error.push_back (l2_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
linfty_error_per_cell,
- *quadrature, *fe, Linfty_norm);
+ *quadrature, Linfty_norm);
cout << linfty_error_per_cell.linfty_norm() << endl;
linfty_error.push_back (linfty_error_per_cell.linfty_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
h1_seminorm_error_per_cell,
- *quadrature, *fe, H1_seminorm);
+ *quadrature, H1_seminorm);
cout << h1_seminorm_error_per_cell.l2_norm() << endl;
h1_seminorm_error.push_back (h1_seminorm_error_per_cell.l2_norm());
VectorTools<dim>::integrate_difference (*dof,
solution, sol,
h1_error_per_cell,
- *quadrature, *fe, H1_norm);
+ *quadrature, H1_norm);
cout << h1_error_per_cell.l2_norm() << endl;
h1_error.push_back (h1_error_per_cell.l2_norm());