template <int dim>
void EstimatorIntegrator<dim>::face(MeshWorker::DoFInfo<dim> &dinfo1,
MeshWorker::DoFInfo<dim> &dinfo2,
typename MeshWorker::IntegrationInfo<dim> &info1,
typename MeshWorker::IntegrationInfo<dim> &info2) const
{
const FEValuesBase<dim> &fe = info1.fe_values();
const std::vector<Tensor<1,dim> > &Duh1 = info1.gradients[0][0];
const std::vector<Tensor<1,dim> > &Duh2 = info2.gradients[0][0];
const double h_K1 = dinfo1.cell->measure();
const double h_K2 = dinfo2.cell->measure();
double integral = 0.;
for (unsigned k=0; k<fe.n_quadrature_points; ++k)
{
const double diff = fe.normal_vector(k) * Duh1[k] - fe.normal_vector(k) * Duh2[k];
integral += diff * diff * fe.JxW(k);
}
dinfo1.value(0) = std::sqrt((h_K1/24.)*integral);
dinfo2.value(0) = std::sqrt((h_K2/24.)*integral);
}
On 04/04/2016 10:34 AM, Denis Davydov wrote:
>
> I was playing around with MeshWorker, in particular I tried to use it in
> step-16 instead of Kelly estimator, following ideas of Step-39.
> Interesting part is that i was not able to make them identical...
Are they just a bit different, or completely different? Does it yield the same
results on uniformly refined meshes?
The thing is that, collectively, we have forgotten how MeshWorker works. As
you (and others) found out, the documentation by itself is inadequate, and
nobody who's active on the mailing list knows how it all works :-(
DEAL::Cycle 0
DEAL:: Number of active cells: 20
DEAL:: Number of degrees of freedom: 25 (by level: 8, 25)
DEAL:cg::Starting value 0.510691
DEAL:cg::Convergence step 6 value 4.59193e-14
DEAL::Cycle 1
DEAL::error: 1.02041
DEAL:: Number of active cells: 41
DEAL:: Number of degrees of freedom: 52 (by level: 8, 25, 41)
DEAL:cg::Starting value 0.455356
DEAL:cg::Convergence step 8 value 3.09682e-13
DEAL::Cycle 2
DEAL::error: 0.778599
DEAL:: Number of active cells: 80
DEAL:: Number of degrees of freedom: 100 (by level: 8, 25, 61, 52)
DEAL:cg::Starting value 0.394469
DEAL:cg::Convergence step 9 value 1.96993e-13
DEAL::Cycle 3
DEAL::error: 0.668332
DEAL:: Number of active cells: 161
DEAL:: Number of degrees of freedom: 190 (by level: 8, 25, 77, 160)
DEAL:cg::Starting value 0.322156
DEAL:cg::Convergence step 9 value 2.94418e-13
DEAL::Cycle 0
DEAL:: Number of active cells: 20
DEAL:: Number of degrees of freedom: 25 (by level: 8, 25)
DEAL:cg::Starting value 0.510691
DEAL:cg::Convergence step 6 value 4.59193e-14
DEAL::Cycle 1
DEAL::error: 0.438336
DEAL:: Number of active cells: 41
DEAL:: Number of degrees of freedom: 52 (by level: 8, 25, 41)
DEAL:cg::Starting value 0.455356
DEAL:cg::Convergence step 8 value 3.09682e-13
DEAL::Cycle 2
DEAL::error: 0.294554
DEAL:: Number of active cells: 80
DEAL:: Number of degrees of freedom: 100 (by level: 8, 25, 57, 55)
DEAL:cg::Starting value 0.398498
DEAL:cg::Convergence step 9 value 2.80944e-13
DEAL::Cycle 3
DEAL::error: 0.223672
DEAL:: Number of active cells: 155
DEAL:: Number of degrees of freedom: 181 (by level: 8, 25, 77, 147)
DEAL:cg::Starting value 0.322165
DEAL:cg::Convergence step 9 value 5.09767e-13
The thing is that, collectively, we have forgotten how MeshWorker works. As
you (and others) found out, the documentation by itself is inadequate, and
nobody who's active on the mailing list knows how it all works :-(
--
You received this message because you are subscribed to a topic in the Google Groups "deal.II developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii-developers/66vk8nk7SKA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii-develop...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 04/04/2016 01:47 PM, Denis Davydov wrote:
> Hi Wolfgang,
>
> On Monday, April 4, 2016 at 6:09:25 PM UTC+2, bangerth wrote:
>
>
> that's a pity... If that is the case, perhaps we should rework the examples so
> that
> we show how to use classes for which we still remember what they do exactly
> and which are well documented?
I'll let others make this call.