Hi,
I am trying to calculate the error of a solver (I am solving Oseen equation
with the analytical solution as the convective field). To do this I both
used `VectorTools::integrate_difference` and implemented my own error
calculating function (for comparison).
My domain is slightly bigger than the physical domain where I want to solve
the problem (it's sort of similar to cut-cell) so I have two FE objects:
one for the fluid domain with (dim + 1) FE_Q<dim> components, and another
one for the empty domain with (dim + 1) FE_Nothing<dim> components.
Additionally, I am running a convergence test with adaptive refinement of
the boundary and the interior of the physical domain. Hanging nodes
constraints are applied where needed.
Error calculation using deal.ii `VectorTools::integrate_difference`:
const ComponentSelectFunction<dim> velocity_mask(
std::make_pair(0, dim),
dim + 1);
Vector<double> cellwise_errors(triangulation.n_active_cells());
QGauss<dim> quadrature(velocity_degree + 2);
cellwise_errors = 0.0;
VectorTools::integrate_difference(dof_handler,
locally_relevant_solution,
exact_solution_function,
cellwise_errors,
quadrature,
VectorTools::L2_norm,
&velocity_mask);
On the initial grid (cycle 0) `VectorTools::integrate_difference` gives the
same error estimate as my function, but on the next grid and thereafter
`VectorTools::integrate_difference` computes an unreasonable error:
Error on the initial grid is ~1.6e-3
Error on the second grid is ~9.2
Error on the third grid is ~11.5
My function:
1.578e-03
3.956e-04
1.021e-04
My implementation is rather long and is not really relevant to the question
itself. It seems to be working so can just use it instead of the built-in
functions, but I was interested if I have a bug somewhere in the code.
Has anyone ever had this or similar problem, or know how to use the
built-in funcionality of deal.ii for my case?
Many thanks,
Davit
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/16eda5e4-6c90-433d-a411-396e901ed102n%40googlegroups.com.