Lex,
you show the backtrace, but what is the actual error message you observe?
Best
 WB

On 10/24/23 23:08, Lex Lee wrote:
*** Caution: EXTERNAL Sender ***

Hello deal.ii develpoers,


In my FSI problem, the parallization code solved 2 sets of equations using the "workstream" class interfacing with PETSc. Equation 1 will get known values of variables in equation 2, and so does equation 2.

The solution for equation 2 is initiallized in this way.

hp_index_set = dof_handler.locally_owned_dofs();
hp_relevant_set = DoFTools::extract_locally_relevant_dofs(dof_handler);
solution.reinit(hp_index_set,
                 hp_relevant_set,
                 mpi_communicator);


In the "assemble_local" part, I used this line to get parts of the solution values.
fe_values[extractor_displacement].get_function_gradients(solution, grad_u);


In the "workstream" part, there are worker, copier, and workstream function.

     PerTaskData cp;

     auto worker =
       [this](const typename DoFHandler<dim>::active_cell_iterator &cell,
           ScratchData &                                         scratch,
           PerTaskData &                                         copy_data) {
         this->local_assemble_volume(cell, scratch, copy_data);
       };
     auto copier = [this](const PerTaskData &copy_data) {
        this->copy_local_to_global_volume(copy_data);
     };

       WorkStream::run(CellFilter(IteratorFilters::LocallyOwnedCell(),
                                  volume_dof_handler.begin_active()),
                       CellFilter(IteratorFilters::LocallyOwnedCell(),
                                  volume_dof_handler.end()),
                       worker,
                       copier,
                       sd,
                       cp);
       volume_system_matrix.compress(VectorOperation::add);
       volume_system_rhs.compress(VectorOperation::add);


Note that I used a cell filter to make the code run on locally owned cells, instead of ghosted cells.However, an error will occur in the "get function values" line. It failed to call back the function

get_dof_values(values, local_values.begin(), local_values.end());

in the source file. Refer to the picture below.

The reason is deal.ii somehow tries to get values on ghosted cells, ignoring the cell filter.

Screenshot from 2023-10-24 21-34-45.png

Screenshot from 2023-10-24 21-35-05.png
This puzzled me a lot for a long time. Any suggestion?

Regards,
Lex

--
The deal.II project is located at http://www.dealii.org/ <http://www.dealii.org/> For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en <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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/d408514c-0f75-4448-8279-ac550830c6c1n%40googlegroups.com <https://groups.google.com/d/msgid/dealii/d408514c-0f75-4448-8279-ac550830c6c1n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/20552458-96b5-31fa-cd7a-7d9eb98de31f%40colostate.edu.

Reply via email to