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