← Back to team overview

ffc team mailing list archive

Re: Problem with vector constants (more the 3 components)

 

This apperas to be a different problem. The constant scalar case is fine now. 

Garth


Quoting kirby@xxxxxxxxxxxx:

> Is this related to the problem we had with constant scalar
> Lagrange, or is this some FFC problem?
> 
> Rob
> 
> ---- Original message ----
> >Date: Tue, 16 Aug 2005 15:53:33 +0200
> >From: "Garth N. Wells" <g.n.wells@xxxxxxxxxxxxxxx>  
> >Subject: [FFC-dev] Problem with vector constants (more the 3
> components)  
> >To: ffc-dev@xxxxxxxxxx
> >
> >An error message is returned with constant vector functions
> when the number of
> >vector components exceeds the spatial dimension. There seems
> to be no problem
> >with higher order functions. Below are some details and an
> example.
> >
> >Garth 
> >
> >
> >
> >element = FiniteElement("Vector Lagrange", "triangle", 1)
> >stress_basis  = FiniteElement("Discontinuous vector
> Lagrange", "triangle", 0, 3)
> >
> >stress = Function(stress_basis) 
> >
> >v = BasisFunction(element)
> >L = stress[2]*v[0].dx(0) *dx 
> > 
> >returns an error for constant "stress_basis". The error is 
> >
> >
> >
> >Traceback (most recent call last):
> >  File "/usr/bin/ffc", line 81, in ?
> >    main(sys.argv[1:])
> >  File "/usr/bin/ffc", line 59, in main
> >    execfile(outname)
> >  File "test.py", line 33, in ?
> >    compile([a, L], name, "C++", "GNU GPL Version 2")
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/compiler.py",
> line 42, in
> >compile
> >    forms = build(sums, name, language)
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/compiler.py",
> line 93, in
> >build
> >    form.AKi = ElementTensor(form.sum, "interior", format)
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/elementtensor.py",
> line
> >37, in __init__
> >    self.terms = [Term(p) for p in sum.products if
> p.integral.type == type]
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/term.py", line
> 19, in __init__
> >    self.A0 = ReferenceTensor(product)
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/referencetensor.py",
> line
> >58, in __init__
> >    self.A0 = self.__compute_reference_tensor()
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/referencetensor.py",
> line
> >121, in __compute_reference_tensor
> >    integral += integrate(self.basisfunctions, i, a, b)
> >  File
> "/usr/lib/python2.4/site-packages/ffc/compiler/integrator.py",
> line 113,
> >in __call__
> >    value =
> self.table[element][cindex[0]][dorder][dindex][vindex]
> >IndexError: list index out of range
> >
> >_______________________________________________
> >FFC-dev mailing list
> >FFC-dev@xxxxxxxxxx
> >http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
> 



Follow ups

References