Hi all :),
i try to translate the following piece of python code
self.u = self.fes.TrialFunction()
self.v = self.fes.TestFunction()
# StiffnessMatrix depending on material type:
if (self.material.type == "linear"):
self.A = BilinearForm(self.fes)
self.A += 2 * self.material.mu * InnerProduct(1 / 2 * (grad(self.u) + grad(self.u).trans),
1 / 2 * (grad(self.v) + grad(self.v).trans)) * dx
into corresponding C++ code so far i have
ngcomp::ProxyNode u = fes->GetTrialFunction();
ngcomp::ProxyNode v = fes->GetTestFunction();
Flags flags_bfa;
std::shared_ptr<T_BilinearFormSymmetric<double>> bfa = make_shared<T_BilinearFormSymmetric<double>> (fes, "a", flags_bfa);
bfa->AddIntegrator(make_shared<SymbolicBilinearFormIntegrator>(
material.mu * InnerProduct(
0.5f*(u->Deriv() + TransposeCF(u->Deriv())),
0.5f*(v->Deriv() + TransposeCF(v->Deriv()))),
VOL, VOL));
but the TransposeCF leads to
terminate called after throwing an instance of 'ngcore::Exception'
what(): Transpose of non-matrix called
00:46:50: Das Programm ist abgestürzt.
So my question is how can i transpose v->Deriv() and u->Deriv() ?
Thank you for any help