I realize that maybe this is because the mesh is too irregular. I have a 
lot of the following features as shown in the picture below (enclosed by 
red circles):
[image: whole.jpg]  [image: feature.jpg]


I think these shared nodes make the dof problemtic? But why one single 
processor is find?
On Tuesday, November 4, 2025 at 1:50:56 PM UTC+2 Tingchang Yin wrote:

> Hi everyone,
>
> I downloaded the convection diffusion reaction solver from 
> https://github.com/dealii/code-gallery  
>
> The cdr solver is really what I need.  I changed the user interface code a 
> little bit regarding loading mesh, setting boundary conditions and initial 
> conditions. Now the code can load a mesh file (*.inp).  
>
> When I use one processor to run it with the command `mpirun -np 1 
>  ./cdr  SmallPorous.inp`, the simulation is conducted without any error. 
>
> When I use multiple processor with command `mpirun -np 14 
>  ./cdr  SmallPorous.inp`, I get the following exceptions, which seems to be 
> unmatched dof between processors:
> ```
> ...
> ...
> cycle 128 and number of degrees of freedom: 20796
> cycle 129 and number of degrees of freedom: 20800
> cycle 130 and number of degrees of freedom: 20803
>
> --------------------------------------------------------
> An error occurred in line <3561> of file 
> </home/tingchang/dealii-9.7.0/source/dofs/dof_handler_policy.cc> in function
>     
> dealii::internal::DoFHandlerImplementation::Policy::{anonymous}::communicate_dof_indices_on_marked_cells<2,
>  
> 2>(const dealii::DoFHandler<2, 2>&, std::vector<bool>&)::<lambda(const 
> auto:243&, const auto:244&)>::<lambda(auto:245&, auto:246)> [with auto:245 
> = unsigned int; auto:246 = unsigned int*]
> The violated condition was: 
>     (stored_index == invalid_dof_index) || (stored_index == 
> *received_index)
> Additional information: 
>     This exception -- which is used in many places in the library --
>     usually indicates that some condition which the author of the code
>     thought must be satisfied at a certain point in an algorithm, is not
>     fulfilled. An example would be that the first part of an algorithm
>     sorts elements of an array in ascending order, and a second part of
>     the algorithm later encounters an element that is not larger than the
>     previous one.
>     
>     There is usually not very much you can do if you encounter such an
>     exception since it indicates an error in deal.II, not in your own
>     program. Try to come up with the smallest possible program that still
>     demonstrates the error and contact the deal.II mailing lists with it
>     to obtain help.
> ```
> I am thinking that some parts of my code might be improved to aviod this 
> exception, although i have seen `There is usually not very much you can do 
> if you encounter such an
>     exception`.
>
>

-- 
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 visit 
https://groups.google.com/d/msgid/dealii/61f80187-304c-4454-9a3e-5ca552559c32n%40googlegroups.com.

Reply via email to