← Back to team overview

ffc team mailing list archive

Re: Problem compiling form

 

On Thu, Oct 9, 2008 at 8:38 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> You can't multiply two trial functions or else the form will not be
> multilinear. (But the error message could be better...)

Quite right.  Helps if you think about the formula rather than just
read it off the review paper. =D

-- Andy

>
> --
> Anders
>
>
> On Thu, Oct 09, 2008 at 08:37:00PM +0200, Andy Ray Terrel wrote:
>> Actually I get the error anytime I multiply two trial functions
>> together, for example.
>>
>> family = "Lagrange"
>> shape = "triangle"
>> order = 1
>>
>> SE = FiniteElement(family, shape, order)
>> VE = FiniteElement(family, shape, order)
>> MixedElement = SE + VE
>>
>> tau_00,u = TrialFunctions(MixedElement)
>>
>> a = (tau_00*u)*dx
>>
>>
>> -- Andy
>>
>> On Thu, Oct 9, 2008 at 8:31 PM, Andy Ray Terrel <aterrel@xxxxxxxxxxxx> wrote:
>> > With the following form I'm getting the following error.  Any ideas?
>> >
>> > family = "Lagrange"
>> > shape = "triangle"
>> > order = 2
>> >
>> > SE = FiniteElement(family, shape, order-1)
>> > VE = VectorElement(family, shape, order)
>> > MixedElement = SE + VE
>> >
>> > S_00,v = TestFunctions(MixedElement)
>> > tau_00,u = TrialFunctions(MixedElement)
>> >
>> > a = (S_00*(tau_00*D(u[0],0)))*dx
>> >
>> >
>> > ----------
>> >
>> > $ ffc -d1 TensorTest.form
>> > This is FFC, the FEniCS Form Compiler, version 0.5.0.
>> > For further information, go to http://www.fenics.org/ffc/.
>> >
>> > Preprocessing form file: TensorTest.form --> TensorTest.py
>> >
>> > Phase 1: Analyzing form
>> > -----------------------
>> >
>> >  Checking validity of form... ok
>> >  Reassigning form indices... done
>> >  Checking validity of form... ok
>> >  Simplifying form...
>> >  Reassigning form indices...
>> >  done
>> >  Reassigning form indices... done
>> >  done
>> >  Checking validity of form... ok
>> >  Determining the range of the indices... done
>> >  Checking validity of form... ok
>> >  Extracting form data...
>> > Traceback (most recent call last):
>> >  File "/usr/local/bin/ffc", line 175, in <module>
>> >    sys.exit(main(sys.argv[1:]))
>> >  File "/usr/local/bin/ffc", line 102, in main
>> >    execfile(outname, ns)
>> >  File "TensorTest.py", line 22, in <module>
>> >    compile([a, L, M, element], "TensorTest", {'language': 'ufc',
>> > 'blas': False, 'form_postfix': True, 'precision': '15',
>> > 'split_implementation': False, 'quadrature_points': False,
>> > 'representation': 'tensor', 'optimize': False})
>> >  File "/usr/local/lib/python2.5/site-packages/ffc/compiler/compiler.py",
>> > line 68, in compile
>> >    (form_data, form_representation) = __compile_forms(forms, prefix, options)
>> >  File "/usr/local/lib/python2.5/site-packages/ffc/compiler/compiler.py",
>> > line 95, in __compile_forms
>> >    form_data = analyze_form(form)
>> >  File "/usr/local/lib/python2.5/site-packages/ffc/compiler/compiler.py",
>> > line 187, in analyze_form
>> >    form_data = analyze(form)
>> >  File "/usr/local/lib/python2.5/site-packages/ffc/compiler/analysis/analyze.py",
>> > line 51, in analyze
>> >    form_data = FormData(form)
>> >  File "/usr/local/lib/python2.5/site-packages/ffc/compiler/analysis/formdata.py",
>> > line 60, in __init__
>> >    self.elements                     = self.__extract_elements(form,
>> > self.rank, self.num_coefficients)
>> >  File "/usr/local/lib/python2.5/site-packages/ffc/compiler/analysis/formdata.py",
>> > line 126, in __extract_elements
>> >    raise FormError, (form, "Unable to extract all elements")
>> > ffc.common.exceptions.FormError
>> >
>> _______________________________________________
>> FFC-dev mailing list
>> FFC-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/ffc-dev
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFI7k/ATuwUCDsYZdERAltPAKCGV2HXDeKmnKuCG2N17UZMSprOSACfQ9rx
> 6m0GmUEp9DyR0MfKmU1O7VQ=
> =pSYA
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
>


References