Yves Renard wrote:
> On Sunday 30 September 2007 19:10, Alex Magnes wrote:
>   
>> hi everybody!
>>
>> another question concerning the generic assembling procedures. i try to
>> assemble a volumic source term "integral grad(Ni).Ts", where Ni are the
>> basis functions of a scalar fem and Ts is a vectorial source term. so i
>> set up a mesh with a data-fem with "FEM_NEDELEC(3)" elements and a
>> "FEM_PK(3,1)" for setting the scalar basis functions.
>> then:
>>
>>     assemble_source_term.push_mi(im);
>>     assemble_source_term.push_mf(mf_scalar);
>>     assemble_source_term.push_mf(mf_Ts);
>>     assemble_source_term.push_data(Ts);     <- input data, length=dof of
>> the nedelec fem.
>>     assemble_source_term.push_vec(result);
>>     assemble_source_term.set("F=data(qdim(#1),#2);" "
>> V(#1)+=comp(Grad(#1).vBase(#2))(???????).F(???);");
>>     assemble_source_term.assembly();
>>
>> my problem is, i do not really understand the reduction operation
>> mentioned in the documentation, because i'm not familiar with tensor
>> notation. the examples i found in the tests folder just showed how to
>> handle something like "comp(Base(#1).vBase(#2))".
>> so how do i have to set these indices to get a result?
>> i hope i did a proper problem description and someone can help me.
>>
>> best regards and thanks in advance, alex
>>     
>
> Dear alex,
>
> What kind of problem do you want to treat ? The Nedelec fems are in fact 
> mainly adapted to electromagnetic problems. If you just want to express a 
> vectorial quantity, you can use a more basic fem as  "FEM_PK(3,1)" and 
> specify on the corresponding mesh_fem object that you need to represent a 
> vectorial field. in you case:
>
> mf_Ts.set_qdim(3).
>
> Then the assembly command should be
>
> assemble_source_term.set("F=data(#2)"
>                     "V(#1)+=comp(Grad(#1).vBase(#2))(:,i,j,i).F(j);");
>
> Best,
>
> Yves.
>
>   
Dear Yves!

Thank you very, very much. It works and now i think i understand the 
indexes for the reduction operation.
I'm currently working on several mixed electromagnetic field 
formulations to calculate current density distributions. Therefor i need 
the nedelec fems as you supposed. My question is regarding to the 
calculation of a magnetic potential via the magnetic field strength.

Thanks again and best regards, alex

_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to