This did exactly what I needed. Thanks!!

On Saturday, March 16, 2019 at 5:48:14 PM UTC, Jean-Paul Pelteret wrote:
>
> There’s a function to compute the bounding box in GridTools:
>
> https://www.dealii.org/current/doxygen/deal.II/namespaceGridTools.html#ae1ec55abefa31cf001fd29d8d4d993f1
>
>
> On 16 Mar 2019, at 18:36, jane...@jandj-ltd.com <javascript:> wrote:
>
> Thanks for your suggestions.
>
> BoundingBox should for now be sufficient, but I am having some trouble 
> using it properly. 
>
> I am unsure what to put in to use it? triangulation? cell? 
>
> I think i need something like
> BoundingBox<dim> mybox;
> mybox.get_boundary_points();
>
> but I'm a little unsure where I put my argument and what that is - I can't 
> seem to find any examples either. Sorry if this is very basic!
>
> On Friday, March 15, 2019 at 11:40:28 PM UTC, Wolfgang Bangerth wrote:
>>
>>
>> > Yes, what you put into much better words than mine is exactly what I am 
>> > needing - For a given quadrature point at 
>> > (x,y), find how far the domain extends above (x,y) in y-direction? 
>> > 
>> > So I am looking to find the y-coordinate of the point which is directly 
>> > above the (x,y) in question, so that I can find how far it extends 
>> above 
>> > it (by subtracting it from what I am trying to find) 
>>
>> As Jean-Paul already mentioned, this is easy enough if your top surface 
>> is level (i.e., at the same y value). It is, in general, difficult to 
>> figure this out on unstructured meshes if the top surface is not level. 
>>
>> The way to do this then is to define a "depth" variable D(x,y). You know 
>> that D(x,y)=0 at the top surface, and that it grows linearly with depth 
>> y. So D(x,y) satisfies a differential equation of the form 
>>
>>    d/d(-y) D(x,y) = 1 
>>
>> or equivalently 
>>
>>    d/dy D(x,y) = -1 
>>
>> which you can also write as follows: 
>>
>>   (0,-1) . nabla D(x,y) = 1 
>>
>> So it is an advection equation with the advection velocity being the 
>> vector pointing straight down. The boundary condition at the "inflow" 
>> boundary -- which here is the top boundary) is D(x,y)=0. 
>>
>> Then, if you need to know the depth at a given point (x_q,y_q), for 
>> example at a quadrature point when assembling your linear system, all 
>> you need to do is evaluate the depth field D(x_q,y_q) that you have 
>> previously computed. 
>>
>> Best 
>>   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+un...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to