Do I understand correctly that these meshes are identical, but that you
    store them in separate variables? Why not just one mesh that two
    DoFHandlers build on?

Yes, right now they are the same mesh (for testing) but in the future we will want to have different meshes that represent the same domain but with different subdivisions.

There lies heartbreak. If you use meshes with different partitioning, you cannot easily transfer information from one mesh to another because the information you need from one mesh to interpolate onto the other is no longer guaranteed to live on the same MPI process.

It's possible to do this (there are tools such as FERemoteEvaluation), but it becomes *much* more difficult and expensive to have meshes that are partitioned differently.


     > The violated condition was:
     >
     >     partitioner->in_local_range(global_index) || partitioner-
     > >ghost_indices().is_element(global_index)
     >
     > Additional information:
     >     You tried to access element 54 of a distributed vector, but this
     >     element is not stored on the current processor. Note: The range of
     >     locally owned elements is [135,242], and there are 27 ghost elements
     >     that this vector can access.
     >
     >     A common source for this kind of problem is that you are passing a
     >     'fully distributed' vector into a function that needs read access to
     >     vector elements that correspond to degrees of freedom on ghost cells
     >     (or at least to 'locally active' degrees of freedom that are not also
     >     'locally owned'). You need to pass a vector that has these elements 
as
     >     ghost entries.

    Before we go into the weeds, is this true in your case? Is the vector
    you are passing into the FEFieldFunction (where the error originates)
    ghosted?


Just to clarify, the error originates in
VectorTools::interpolate(dofHandler_Scalar, fe_function_1, non_ghosted_solution_cp);
(I am getting an error if I comment out that line)

Right, but if you look at the backtrace, you see that VectorTools::interpolate() calls FEFieldFunction.


I am assuming non_ghosted_solution_cp is non-ghosted because of the line
non_ghosted_solution_cp.reinit(own_dofs, mpi_communicator);

Prior to this, the vector that I am passing to FEFieldFunction to define fe_function_1 is *pf_obj.getSolutionSet()[0].
I am not sure if this vector is ghosted. Could that be the problem?

It could. Why don't you find out? Either way, the error message tells you that FEFieldFunction is trying to evaluate a vector that does not have the right ghost elements. It's your job then to next figure out why that is so. If you have confirmed that the vector is not ghosted, the next step is to make sure that you pass a vector instead that *is* ghosted.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/


--
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 dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/adda5c2f-6a86-429e-9860-f1be274b7b6b%40colostate.edu.

Reply via email to