← Back to team overview

dolfin team mailing list archive

Re: MixedElement in ffc

 

On Mon, Mar 16, 2009 at 7:32 PM, Andy Ray Terrel <aterrel@xxxxxxxxxxxx> wrote:
> 2009/3/16 Hatef Monajemi <hmonajem@xxxxxxxxxxxxxxxxxxx>:
>> Hi,
>>
>> I would assume more than 2 elemnts should be O.K for ffc. However, I am
>> getting some error while trying the following code:
>>
>> -----------------------------------
>>
>> P2 = VectorElement("Lagrange", "triangle", 1)
>> P1 = FiniteElement("Lagrange", "triangle", 1)
>> P3 = FiniteElement("Discontinuous Lagrange", "triangle", 0)
>> TH = (P2 + P1)+ P3
> ^^^^^^^^^^^^^^^^^^^^^
>
> To fix the trace back replace the above line with
> TH = MixedElement(P2,P1,P3)

opps copied the wrong line =D, use:

TH = MixedElement([P2,P1,P3])


>
> The above code creates a Mixed element like so ((v,w), q)
>
> -- Andy
>
>>
>> (v,w,q) = TestFunctions(TH)
>> (U,P,Tau) = TrialFunctions(TH)
>>
>>
>>
>> a1 =a1(U,P;v)
>> a2 = a2(U,P;w)
>> a3 = a3(Tau;q)
>>
>> a=a1+a2+a3
>> ----------------------------------------------
>>
>> does anyone know what is wrong here?
>>
>> This is the error I am geting:
>>
>>  ****need more than 2 values to unpack
>>
>> I want to basically add a constant number on every element besides velocity
>> and pressure on nodal points , That's why I used the P3 type of
>> FiniteElement.
>>
>>
>>
>>
>> Thanks ,
>>
>> H! at! ! ef
>>
>> _______________________________________________
>> DOLFIN-dev mailing list
>> DOLFIN-dev@xxxxxxxxxx
>> http://www.fenics.org/mailman/listinfo/dolfin-dev
>>
>>
>


References