hi peter,
i actually want to set a constraint to a bc flux that is dependent on some variables
Think of poissons equation. The flux "permittivity \nabla phi" at the boundary is equivalent to the charge at the bc. And in many situations this charge has to be equivalent to the charge in the bulk space in order to fullfill a charge neutrality condition.
this gives a constraint of the form
boundary integral over permittivity \nabla phi + bulk integral over charge =0
this implicitly gives the neumann boundary or the flux at the boundary for the electric field.
so no, it is not a postprocessing issue.
i just found the elementmetric function in elementdescription and put together the following:
Code: Select all
...
the usual foreplay in the boundary assembly where i also find the parent element in the bulk
....
stat = ElementInfo( Element, Nodes, IP % U(t), IP % V(t), IP % W(t), detJ, Basis, dBasisdx )
stat_parent = ElementInfo( ParentElement, ParentNodes, IP % U(t), IP % V(t), IP % W(t), parentdetJ, ParentBasis, ParentdBasisdx )
stat= ElementMetric(nd,Element,Nodes,Metric,DetG,dBasisdx,LtoGMap)
stat_parent= ElementMetric(nd_parent,ParentElement,ParentNodes,Metric,DetG,parentdBasisdx,parentLtoGMap)
call InvertMatrix3x3( parentltogmap,parentgtolmap,detG )
local_bc(1)=ip%u(t)
local_bc(2)=ip%v(t)
local_bc(3)=ip%w(t)
global=MATMUL(ltogmap,local_bc)
local_parent=matmul(parentgtolmap,global)
...
so what i think i do here is that i get a mapping ltogmap from the boundary element to the global coordinates
with the i calculate the variable "global" that is the global coordinates of the integration point.
with those i take the inverse of the same mapping in the parent element to get the local coordinates in the bulk element.
i guess this has many flaws.
but could it gop into the right direction??
best regards
Franz