I have a system of coupled PDEs, and I use the following to generate test and trial functions:
Code:
fesm = HCurl(mesh, order=ord, complex=True, dirichlet="outer")
fes = FESpace([fesm,fesm])
# Define test and trial functions:
E, F = fes.TrialFunction()
Et, Ft = fes.TestFunction()
Now, I want to calculate the following term of a weak form: [tex]\int E \nabla (Et) [/tex].
When I naively try the following for my bilinear form, I get a dimensional mismatch error:
Code:
a = BilinearForm(fes, symmetric=True, eliminate_internal=True)
a += SymbolicBFI(InnerProduct(E,grad(Et)))
but, the following seems to work:
Code:
a += SymbolicBFI(InnerProduct(E,(grad(Et)[0],grad(Et)[1],grad(Et)[2])))
Is this the correct thing to do? I am still learning NGSolve. Thank you all for your hard work.
I saw a different post [1] saying that VectorH1 spaces will allow all div and curl and grad to be used simultaneously, but I wanted to make sure my attempt makes sense too.
[1] /forum/ngspy-forum/781-fe-space-with-curl-and-div