Dear Kostas

Thanks for your review again.

> why not writing all these lines as a single line
>            size += psl->simplexes(ic).size() * int((val.dim()+1) *
sizeof(int));
>without loops and without the intermediate variable s?
>
>I think, the same applies to several locations of your code.
You're absolutely right. I updated and pushed the branch.

Best regards
Tetsuo

2020年12月28日(月) 22:43 Konstantinos Poulios <[email protected]>:

> Dear Tetsuo,
>
> I see that you have removed 2 redundant loops, but I think the same
> simplification can be applied to several places in your code.
>
> For example, you have removed 1 loop here
> [image: image.png]
> why not writing all these lines as a single line
>             size += psl->simplexes(ic).size() * int((val.dim()+1) *
> sizeof(int));
> without loops and without the intermediate variable s?
>
> I think, the same applies to several locations of your code.
>
> Best regards
> Kostas
>
>
> On Mon, Dec 28, 2020 at 1:35 AM Tetsuo Koyama <[email protected]>
> wrote:
>
>> Dear Kostas
>>
>> Thanks for your review. I fixed the expression of for loop.
>> Could you review the branch again?
>>
>> Best Regard
>> Tetsuo
>>
>> 2020年12月28日(月) 1:35 Konstantinos Poulios <[email protected]>:
>>
>>> Dear Tetsuo,
>>>
>>> Thanks for the quick action. Is there any programmatic reason for writing
>>>           for (const auto &val : s)
>>>             for (size_type j=0; j < val.dim()+1; ++j)
>>>               size += int(sizeof(int));
>>> instead of
>>>           size += int(s.size()*(val.dim()+1)*sizeof(int));
>>> ?
>>>
>>> If not, I would recommend avoiding redundant loops.
>>>
>>> Best regards
>>> Kostas
>>>
>>> On Sun, Dec 27, 2020 at 12:18 PM Tetsuo Koyama <[email protected]>
>>> wrote:
>>>
>>>> Dear Kostas
>>>>
>>>> Thank you for reporting the bug of export_to_vtu.It is the error of
>>>> write_dataset_ method.
>>>> I fixed it in the devel-tetsuo-fix-export-vtu branch.
>>>> Could you merge it?
>>>> I also fixed the error of exporting in the Slice object.
>>>> All I checked about this method is in
>>>> ./interface/tests/python/check_export_vtu.py.
>>>> Sorry for my bug.
>>>>
>>>> Best Regard Tetsuo
>>>>
>>>> 2020年12月27日(日) 8:00 Tetsuo Koyama <[email protected]>:
>>>>
>>>>> Dear Kostas
>>>>>
>>>>> Thanks a lot for your example.
>>>>> And thank you for reporting about vtu exporting.
>>>>> I could reproduce the message.
>>>>> I will check why it happens.
>>>>>
>>>>> Best regards
>>>>> Tetsuo
>>>>>
>>>>> 2020年12月27日(日) 6:22 Konstantinos Poulios <[email protected]>:
>>>>>
>>>>>> Dear Tetsuo
>>>>>>
>>>>>> I have recently uploaded an example with an axisymmetric uniaxial
>>>>>> tension simulation under the contrib folder. You can try it if you like. 
>>>>>> By
>>>>>> the way I have also noticed that when I use your vtu export functions,
>>>>>> instead of vtk, in that file, I get a corrupted vtu output. Paraview
>>>>>> complains with:
>>>>>> [image: image.png]
>>>>>> Maybe you could check that as well.
>>>>>>
>>>>>> Best regards
>>>>>> Kostas
>>>>>>
>>>>>> On Fri, Dec 18, 2020 at 5:44 AM Tetsuo Koyama <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Dear Kostas
>>>>>>>
>>>>>>> Thank you for your email.
>>>>>>> I was impressed that GWFL can do it. I will try it.
>>>>>>> And I was also impressed that we can express  hyperelastic material.
>>>>>>>
>>>>>>> Best regards
>>>>>>> Tetsuo
>>>>>>>
>>>>>>> 2020年12月17日(木) 22:16 Konstantinos Poulios <[email protected]>:
>>>>>>>
>>>>>>>> Dear Tetsuo
>>>>>>>>
>>>>>>>> GWFL can do this. Here is an example of modelling a hyperelastic
>>>>>>>> material in an axisymmetric problem:
>>>>>>>>
>>>>>>>> md.add_initialized_data("K", E/(3.*(1.-2.*nu))) # Bulk modulus
>>>>>>>> md.add_initialized_data("mu", E/(2*(1+nu)))     # Shear modulus
>>>>>>>> md.add_macro("F", "Id(2)+Grad_u")
>>>>>>>> #md.add_macro("F3d",
>>>>>>>> "[1+Grad_u(1,1),Grad_u(1,2),0;Grad_u(2,1),1+Grad_u(2,2),0;0,0,1]")
>>>>>>>> md.add_macro("F3d",
>>>>>>>> "Id(3)+[0,0,0;0,0,0;0,0,1/X(1)]*u(1)+[1,0;0,1;0,0]*Grad_u*[1,0,0;0,1,0]")
>>>>>>>> md.add_macro("J", "Det(F)*(1+u(1)/X(1))")
>>>>>>>> md.add_macro("devlogbe", "Deviator(Logm(Left_Cauchy_Green(F3d)))")
>>>>>>>> md.add_macro("tauH", "K*log(J)")
>>>>>>>> md.add_nonlinear_generic_assembly_brick(mim,
>>>>>>>> "2*pi*X(1)*((tauH*Id(2)+tauD2d):(Grad_Test_u*Inv(F))+(tauH+tauD33)/(X(1)+u(1))*Test_u(1))")
>>>>>>>>
>>>>>>>> Could you try if this works for you?
>>>>>>>>
>>>>>>>> Best regards
>>>>>>>> Kostas
>>>>>>>>
>>>>>>>> On Thu, Dec 17, 2020 at 11:09 AM Tetsuo Koyama <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Dear getfem users.
>>>>>>>>>
>>>>>>>>> Excuse me for my frequent questions.
>>>>>>>>> I would like to solve the problem of axisymmetric elements in
>>>>>>>>> cylindrical coordinate.
>>>>>>>>>
>>>>>>>>> I tried to use a GWFL to simulate a two-dimensional mesh as a mesh
>>>>>>>>> of axisymmetric elements, but I couldn't. As you know, Grad and Div 
>>>>>>>>> are
>>>>>>>>> different for cartesian coordinate and cylindrical coordinate systems.
>>>>>>>>> Is there a good way to solve this problem?
>>>>>>>>>
>>>>>>>>> Best Tetsuo.
>>>>>>>>>
>>>>>>>>

Reply via email to