← Back to team overview

ffc team mailing list archive

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

 

Could be either FFC or FIAT. The error message says

> > self.table[element][cindex[0]][dorder][dindex][vindex]
> > >IndexError: list index out of range

which means that either FFC is indexing the table wrong or FIAT is not
computing the correct table (tabulate_jet). I'm traveling this week
and the next so I will probably not have time to debug until I return
to Chicago.

/Anders

Looks lOn Tue, Aug 16, 2005 at 06:07:05PM +0200, Garth N. Wells wrote:
> 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
> > 
> 
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
> 

-- 
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/



Follow ups

References