Hi Oliver,
here you can use the BoundaryFromVolumeCF, an example is attached.
copied from help(BoundaryFromVolumeCF):
BoundaryFromVolumeCF(...) method of builtins.PyCapsule instance
BoundaryFromVolumeCF(vol_cf: ngsolve.fem.CoefficientFunction) -> ngsolve.fem.CoefficientFunction
Allows the evaluation of volumetric functions on the boundary.
When evaluated on a boundary element, this function searches for the associated
volume element, transforms the local coordinates, and evaluates the function in the
volume. A typical use case is to visualize L2-functions, or mechanical stresses at
the boundary.
It is different from the boundary Trace()-operator. The trace provides a function
which is defined by boundary degrees of freedom only. E.g. the trace of an H(div)
function is only the normal component, while the BoundaryFromVolumeCF gives the
whole function. Obviously, the Trace() function is cheaper to evaluate.
If called on an interface, it evaluates from one side (which one is not specified).
If the function is only defined on one side, this side will be taken. One can use
a domain-wise CF to define a function only locally:
uloc = CoefficientFunction( [None, None, u, None] )
There are two possibilities to set the integration rules with dx - integrals:
1.
Code:
dx(bonus_intorder=3)
.... increase the default order by 3
2.
provide a user-defined integration-rule for each element shape:
Code:
dx(intrules = { TRIG : IntegrationRule( [(x1,y1),(x2,y2), ..], [w1,w2,...]) })
but, unfortunately, these settings are used only for assembling, and non of them is used in the Integrate ( func*dx ) function. It just uses fixed order=5.
I just added to use the bonus_intorder quite now, will be available tonight.
Joachim