I have implemented, as suggested by Daniel, another MeshWorker callback for
the right hand side.
The code is at the bottom, but I don't know, given the status of the
MeshWorker documentation, if this is correct. I cannot say this by looking
at the solutions, since matices, as I said, differ greatly between serial
and parallel parts.
Any hints on what I'm doing wrong with my implementation?
Cheers!
static void rhs_integrate_boundary_term (MeshWorker::DoFInfo<dim> &dinfo,
MeshWorker::IntegrationInfo<dim> &info)
{
if (dumpall)
{
std::lock_guard<std::mutex> guard(lock);
std::cout << "> RHS boundary " << dinfo.cell->id() << " face " <<
dinfo.face_number << std::endl;
}
loopb++;
// FE Values
const FEValuesBase<dim> &fe_v = info.fe_values();
// Local RHS vector
Vector<double> &local_vector = dinfo.vector(0).block(0);
// Local values
std::vector<Vector<double>> boundary_values(fe_v.n_quadrature_points,
Vector<double>(dim));
// Compute values for this boundary cell
right_face_side.vector_value_list(fe_v.get_quadrature_points(),
boundary_values);
for (unsigned k = 0; k < fe_v.n_quadrature_points; ++k)
for (unsigned int i = 0; i < fe_v.dofs_per_cell; ++i)
{
const unsigned int component_i = info.fe_values().get_fe().
system_to_component_index(i).first;
local_vector(i) += (fe_v.shape_value(i, k) * boundary_values[k][
component_i]) * fe_v.JxW(k);
}
}
--
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].
For more options, visit https://groups.google.com/d/optout.