- Thank you received: 3
SOLVED: RuntimeError: no real evaluate for ConstantCF_Complex
7 years 4 months ago - 7 years 4 months ago #47
by ddrake
Hi, I'm getting an error when assembling a linear form:
RuntimeError: no real evaluate for ConstantCF_Complex in CalcElementVector<St7complexIdE>, type = N5ngfem21NeumannEdgeIntegratorILi3ENS_18HCurlFiniteElementILi2EEEE in Assemble LinearForm
Using NETGEN-6.2-dev with NGSolve-6.2.1706-136-g1974759
I'm attaching a PDF file with a gdb stack trace which I added some code context to. It seems that there may be an issue in coefficient.hpp or coefficient.cpp.
Below is (I hope) the relevant part of the code (which is using a non-standard space, but standard integrators for the linear form).
Thanks for looking at this!
Dow Drake
UPDATE 6/28/2017: I'm no longer able to reproduce this error in my current build of NGSolve 6.2.1706-163-g0ed4994 Sincere thanks to the development team for the updates!
RuntimeError: no real evaluate for ConstantCF_Complex in CalcElementVector<St7complexIdE>, type = N5ngfem21NeumannEdgeIntegratorILi3ENS_18HCurlFiniteElementILi2EEEE in Assemble LinearForm
Using NETGEN-6.2-dev with NGSolve-6.2.1706-136-g1974759
I'm attaching a PDF file with a gdb stack trace which I added some code context to. It seems that there may be an issue in coefficient.hpp or coefficient.cpp.
Below is (I hope) the relevant part of the code (which is using a non-standard space, but standard integrators for the linear form).
Code:
from ngsolve import *
from ctypes import CDLL
libDPG = CDLL("../libDPG.so")
mesh = Mesh("../pde/periodiclayers.vol.gz")
k1 = 1.0 # bot material
k2 = 10.0 # top material
k = CoefficientFunction( [k1, k2] )
f = CoefficientFunction( (-k*k*z, -2-k*k*z*z, -k*k*z*z*z) )
igxn = CoefficientFunction([( 0j , 0j , 0j ),
( 0 , 1j , 0 ),
( -2j - k2 , 1j + k2 , 0 ),
( 0 , 0 , 0 )])
ikbarg=CoefficientFunction([(0 , 0 , 0),
( 1j * k1 , 0 , 0),
(-k2 * (1j+k2), -k2*(2*1j+k2) , 0),
(0 , 0 , 0)])
p = 3
S0 = FESpace("hcurlho", mesh, order=p+3, complex=True,
flags={"discontinuous":True})
S1 = FESpace("hcurlho_periodic", mesh, order=p, complex=True,
flags={'xends':[0,1], 'yends':[0,1] })
S2 = FESpace("hcurlho_periodic", mesh, order=p+1, complex=True,
flags={"orderinner": 0, 'xends':[0,1], 'yends':[0,1]})
S = FESpace( [S0,S1,S2], flags={"complex":True})
b = LinearForm(S)
a = BilinearForm(S, symmetric=False, flags={"eliminate_internal" : True})
b.components[0] += LFI("sourceedge", coef=f)
b.components[2] += LFI("neumannedge", coef=igxn )
b.components[1] += LFI("neumannedge", coef=ikbarg)
b.Assemble()
Thanks for looking at this!
Dow Drake
UPDATE 6/28/2017: I'm no longer able to reproduce this error in my current build of NGSolve 6.2.1706-163-g0ed4994 Sincere thanks to the development team for the updates!
Attachments:
Last edit: 7 years 4 months ago by ddrake. Reason: Error is no longer present in my current build of NGSolve 6.2.1706-163-g0ed4994
Time to create page: 0.098 seconds