I have tried to solve a poissons equation on subdomain with different materials.
but encountered error.
: runfile(’/home/akshay/My file/Q6.py’, wdir=’/home/akshay/My file’)
File “/home/akshay/My file/Q6.py”, line 48
kappa = K(facets=facets,k1,k2,degree=0)
^
SyntaxError: positional argument follows keyword argument
runfile(’/home/akshay/My file/Q6.py’, wdir=’/home/akshay/My file’)
WARNING: user expression has not supplied value_shape method or an element. Assuming scalar element.
Notation dx[meshfunction] is deprecated. Please use dx(subdomain_data=meshfunction) instead.
Traceback (most recent call last):
File “”, line 1, in
runfile(’/home/akshay/My file/Q6.py’, wdir=’/home/akshay/My file’)
File “/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py”, line 705, in runfile
execfile(filename, namespace)
File “/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py”, line 102, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)
File “/home/akshay/My file/Q6.py”, line 66, in
bcs = [DirichletBC(V,Constant(140),edges,1),
File “/usr/lib/python3/dist-packages/dolfin/fem/dirichletbc.py”, line 131, in init
super().init(*args)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
*** fenics-support@googlegroups.com
*** Remember to include the error message listed below and, if possible,
*** include a minimal running example to reproduce the error.
*** -------------------------------------------------------------------------
*** Error: Unable to create Dirichlet boundary condition.
*** Reason: Expecting a vector-valued boundary value but given function is scalar.
*** Where: This error was encountered inside DirichletBC.cpp.
*** Process: 0
*** DOLFIN version: 2019.1.0
*** Git changeset: unknown
*** -------------------------------------------------------------------------