I have a 1D,2D,3D (line/square/cube) of unit dimension which is separated by an flat interface into two regions. A scalar quantity(p) with a jump discontiuity is defined in this domain.
I know the following :
- value of the scalar field
- the normal to the interface
- gradients in both directions of the normal.
In 1D, its easy! If value at the interface is p* and the grad at the interface is $\frac{dp}{dn}$$|_{+}$ , $\frac{dp}{dn}$$|_{-}$and interface is at x*,
Avg on + is : 0.5(p* + (p* + $\frac{dp}{dn}$$|_{+}$ (1-x*)))
Avg on - is : 0.5(p* + (p* + $\frac{dp}{dn}$$|_{-}$ (x*)))
I am trying to figure out how to do a similar averaging in 2D and 3D.
Could you suggest a method for 2D extendable to 3D

If the gradient $\vec g$ of function $p$ is constant over a certain region, containing points $\vec x$ and $\vec x_0$, then: $$ p(\vec x)=p(\vec x_0)+\vec g\cdot(\vec x-\vec x_0), $$ where $\cdot$ denotes a scalar product.
If the value of $p$ at the interface is known, you can take as $x_0$ any point on the interface and then average $p(\vec x)$ over the region $A$ of interest to get the average value $\bar p$: $$ \bar p={\int_A p(\vec x)\, dV\over\int_A dV}, $$ where $dV=dx_1dx_2\cdots dx_n$ is the $n$-dimensional volume element.