[deal.II] Step 26 with advection term

2019-07-20 Thread Sai P
Hi,

I am a new dealii user and trying to extend step 26 with an advection term. 
If the method is implicit, I am not sure how to handle the boundary terms 
due to upwinding boundary in the advection term. It looks like the 
following code in step 26 for diffusion term will make the advection 
boundary conditions redundant.
{
 BoundaryValues boundary_values_function;
 boundary_values_function.set_time(time);

 std::map boundary_values;
 VectorTools::interpolate_boundary_values 

(dof_handler,
 0,
 boundary_values_function,
 boundary_values);

 MatrixTools::apply_boundary_values 

(boundary_values,
 system_matrix,
 solution,
 system_rhs);
}
 Am I missing anything? How do I handle the boundary conditions in dealii 
for advection term?

-- 
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 on the web visit 
https://groups.google.com/d/msgid/dealii/f8e0bffc-ec3a-43e0-8446-8febb4773397%40googlegroups.com.


Re: [deal.II] Code tries to access DoF indices on artificial cells, even though those cells should not be artificial

2019-07-20 Thread 'Maxi Miller' via deal.II User Group
Based on what I get (within the if-loop):
I print the cell information using 
std::cout << "Aquiring function gradients on cell with data points " << cell
->level_subdomain_id() << '\t' << triangulation.locally_owned_subdomain() << 
'\t' << cell->active() << '\t' << cell_counter << '\n';

with cell_counter a static variable, increasing for every function call.
This gives me
Aquiring function gradients on cell with data points 1  1   0   1
Aquiring function gradients on cell with data points 0  0   0   1
Aquired function gradients on cell 1
Aquired function gradients on cell 1
Aquiring function gradients on cell with data points 1  1   0   2
Aquiring function gradients on cell with data points 0  0   0   2
Aquired function gradients on cell 2
Aquired function gradients on cell 2
Aquiring function gradients on cell with data points 0  0   0   3
Aquiring function gradients on cell with data points 1  1   0   3
Aquired function gradients on cell 3


before crashing, indicating a problem on cell 1 1 0 3. As long as 
cell->active() is false, I can not call the function is_artificial() for 
checking if I am on an artificial cell. Is my if-loop correct, or did I 
miss something here?

Am Freitag, 19. Juli 2019 18:01:03 UTC+2 schrieb Wolfgang Bangerth:
>
> On 7/19/19 9:59 AM, 'Maxi Miller' via deal.II User Group wrote: 
> > What do the parallel multigrid functions do? Could you just have 
> your if() 
> > inside that function -- i.e., it is called on all cells, but does 
> nothing if 
> > the cell doesn't allow you to do anything? 
> > 
> > 
> > That's exactly what my if()-conditions should do (but is not doing)... 
>
> Then put a breakpoint on it and see why it isn't doing what you think it 
> is 
> doing :-) 
>
> W. 
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@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 on the web visit 
https://groups.google.com/d/msgid/dealii/466b7db8-a8f1-4215-a5c1-41ba16132e76%40googlegroups.com.