I’m trying to implement an HDG method for Stokes-Darcy flows. I had the following error when I run the code. Please see the attached file.
[code]---------------------------------------------------------------------------
NgException Traceback (most recent call last)
in
108
109 #a += interface_termds(defined =mesh.Boundaries(“GammaI”))
→ 110 a += SymbolicBFI(interface_term, definedon=mesh.Boundaries(“GammaI”))
111
112 a += (plam2 + q*lam1)*dx
NgException: Trialfunction does not support BND-forms, maybe a Trace() operator is missing, type = class ngfem::DiffOp<class ngcomp::DiffOpIdFacet<2> > __cdecl(void)[/code]
When I added Trace() to ubar, there was another error related to Trace()
[code]---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
160 # interface Gamma_I
161 ah_I = alpha*sqrt(1/kappa)*InnerProduct(tan_ubar,tan_vbar)
→ 162 bh_IS = - pbarS.Trace()*vbar.Trace()*n - qbarS.Trace()*ubar.Trace()*n
163 bh_ID = - pbarD.Trace()*vbar.Trace()*n - qbarD.Trace()*ubar.Trace()*n
164 interface_term = ah_I + bh_IS# + bh_ID
AttributeError: ‘ngsolve.fem.CoefficientFunction’ object has no attribute ‘Trace’[/code]
I found a topic on Trace() operator here, but it didn’t give me a solution.
Could you please tell me why this is and how to fix this error?
Thank you so much.
Attachment: HDGmethod.ipynb