[Dune-devel] [GSoC2016]Spline topic discussion

Oliver Sander oliver.sander at tu-dresden.de
Wed Mar 23 06:32:41 CET 2016


Hi Xinyun, hi Maikel,

Maikel, thanks for all these explanations, there isn't really anything I have to
add here.

Xinyun, do have a look at dune-geometry/dune/geometry/axisalignedgeometry.hh.
The interface in there is what you need to replicate.  The documentation in
dune-localfunctions-manual.pdf is okay, but may be a bit outdated.

Enjoy,
Oliver

On 22.03.2016 13:20, Maikel Nadolski wrote:
> Hi Xinyun,
> 
> On 21.03.2016 14:04, Xinyun wrote:
>> Hi Maikel,
>>
>> Hope you enjoyed your vacation. :-)
> 
> Thanks! I had a great time for St. Patricks Day in Ireland. :o)
> 
>> Now I have installed Ubunte on my laptop. You are correct that all my
>> problems result from the operating system. Then I followed you
>> instructions and It seems I can build it now.
>> But I still have some doubts .
> 
> Good!
> 
>> 1. Where can I get the results and how can I visualize them? I think I
>> should get two files called "bsplincure" and "bsplinesurface". But I
>> didn't see them. Also, I didn't get any print out message, for example,
>> "done with curve". Does this mean I didn't build successfully? Or I
>> forgot some further commands?
> 
> Try to use the program `paraview` on the files which get generated by
> the test binary. It simply worked for me and you get to see one 3d curve
> and one surface.
> 
>> 2. I don't quite understand what the "bsplinebasis" file is intended
>> for. This file is much harder for me to understand than the
>> "bsplinepatch". And the test code don't use any function from the this
>> file.
> 
> BSplineBasis implements the very basic and first things which you need
> to implement a geometry. Look back to the first email I wrote about
> this, because I am kinda repeating myself.
> 
> My answer from last week didnt change:
> 
> "The pdf
> 
> http://www.dune-project.org/doc/localfunctions/dune-localfunctions-manual.pdf
> 
> was really helpful for me, also
> 
> http://www.dune-project.org/doc/grid-howto/grid-howto.pdf
> 
> Im orienting myself on the grid/geometry implementations in the
> dune-grid and dune-geometry module. I look for simple examples like
> AxisAlignedCubeGeometry or onedgrid."
> 
> 
>> 3. Where is best to start? What does the Geometry interface mean in the
>> task description? I somehow feel the geometry interface is related to
>> the "bsplinebasis" code. But the basic B-spline algorithm should lie in
>> the BSplineGeometry class. What's your understanding?
> 
> The thing is, that Dune uses the Barton-Nackman trick to emulate
> 'interfaces'. This is also described in the PDFs. One could say, that we
> use "soft" Template Meta Programming and trait classes to enforce
> interfaces. This is because of the performance problems of virtual
> tables, which matter to some users (vtable data is layouted in front
> blocking the cache and such things, i believe). But that is also why it
> might seem unsual to you.
> 
> I think a mentor could answer your questions better to what function you
> should concentrate on. That is why I forwarded the message to Oliver. I
> hope that is ok. I also think these informations could benefit more
> people and maybe you should make these questions more public. It also
> shows what furtherdocumentation might be needed. Like a tutorial on how
> to implement an interface? I would say for now: try to look at the
> existent simple implementations.
> 
> I have to finish my master thesis util next friday so I can't really
> help more than that for now. From april on we can dive together into the
> code.
> 
> Until then, happy coding!
> 
>> Thanks,
>> Xinyun
>>
>>
>>
>> On 03/16/2016 01:29 PM, Maikel Nadolski wrote:
>>> No, no. i wont apply! Take your chances. Im just offering my help.
>>>
>>> On 03/16/2016 01:28 PM, Xinyun Li wrote:
>>>> Hey Maikel,
>>>>
>>>> That would be super nice if I can work with you. I had a quick look at
>>>> their code and I think a lot can be done. I would ask the mentors later
>>>> if they have any suitable prior job for this topic.
>>>> I'm not sure if we can apply together. But I would still be very eager
>>>> to assist you if they can only pick one student for this topic in the
>>>> end. Please update your code so I'm not doing redundant work. Or we may
>>>> have discussion later on more detail and separate the tasks.
>>>>
>>>> Best,
>>>> Xinyun
>>>>
>>>>
>>>>
>>>> 2016-03-16 11:40 GMT+01:00 Maikel Nadolski <nadolski at math.fu-berlin.de
>>>> <mailto:nadolski at math.fu-berlin.de>>:
>>>>
>>>>      Hey Xinyun,
>>>>
>>>>      dont worry, it doesn't bother me. I am interested in the spline
>>>>      implementation too. Actually I already started on some
>>>> improvements of
>>>>      the prototype. If you need any help dont shy to ask. Oliver
>>>> Sander is
>>>>      the mentor of the project: ask him too!
>>>>
>>>>      I strongly dislike that solo aspect of GSoC. I love working in a
>>>> team,
>>>>      so maybe we can work together on the implementations. If you
>>>> keep your
>>>>      fork updated (maybe even better on dunes gitlab) I might review
>>>> your
>>>>      code. ;-)
>>>>
>>>>      Maikel
>>>>
>>>>      On 03/15/2016 10:20 PM, Xinyun Li wrote:
>>>>      > Hi Maikel,
>>>>      >
>>>>      > I'll try to make a virtual machine and build again. I hope I
>>>> don't
>>>>      need to bother you again.
>>>>      >
>>>>      > I'm very interested in machine learning and deep learning. But
>>>>      nowadays it's so hot and everyone likes it. So it's also highly
>>>>      competitive; that's why I didn't search for any project related to
>>>>      that.  :‑D
>>>>      > I always want to do some projects on machine learning but I
>>>> always
>>>>      get something on computer graphics. But the good side is it’s less
>>>>      competitive. Haha, I feel there are less students interested in the
>>>>      B-Spline topic.
>>>>      > Deep learning is not totally different from machine learning, I
>>>>      think it’s more like derived from machine learning and specialized
>>>>      on neutral networks. If you have knowledge on machine learning, it
>>>>      would be much easier for you to understand deep learning. You
>>>>      already know minimization techniques and markov models, that's very
>>>>      necessary for deep learning.
>>>>      >
>>>>      > Enjoy your vacation, the weather is getting nice now.
>>>>      >
>>>>      > Best,
>>>>      > Xinyun
>>>>      >
>>>>      > -----Original Message-----
>>>>      > From: Maikel Nadolski [mailto:nadolski at math.fu-berlin.de
>>>>      <mailto:nadolski at math.fu-berlin.de>]
>>>>      > Sent: Tuesday, March 15, 2016 9:39 PM
>>>>      > To: Xinyun Li <xinyun.li at fau.de <mailto:xinyun.li at fau.de>>
>>>>      > Subject: Re: [Dune-devel] [GSoC2016]Spline topic discussion
>>>>      >
>>>>      > Hi Xinyun,
>>>>      >
>>>>      > On 03/15/2016 07:25 PM, Xinyun Li wrote:
>>>>      >> Hi Maikel,
>>>>      >>
>>>>      >> Thanks for your nice explanation. ^_^
>>>>      >> Sorry to reply you late because I have to work during daytime.
>>>>      >
>>>>      > No problem. I am working during daytime too ... well at least
>>>> most
>>>>      of the time :-)
>>>>      >
>>>>      > I will be traveling until sunday and wont be able to answer
>>>> regularly.
>>>>      >
>>>>      >> I'm really inexperienced with cmake under UNIX, I normally
>>>> use Visual
>>>>      >> Stuidio to work with C++ project. Now I have downloaded the
>>>> modules
>>>>      >> you mentioned separately (in different subfolders) and I
>>>> tried to
>>>>      run  "
>>>>      >> ./dune-common/bin/dunecontrol --module=dune-iga all". But I
>>>> got some
>>>>      >> error message. Actually this command looks very strange to me as
>>>>      >> "dunecontrol" is not a executable. Can you share me with your
>>>>      >> successful experience building DUNE? Any information is welcome.
>>>>      Maybe
>>>>      >> I should get a UNIX environment first.
>>>>      >
>>>>      > I am really not sure if the project works under Windows at
>>>> all. Go
>>>>      ahead and ask on the mailing list, but i highly doubt it.
>>>>      > For example `dunecontrol` should be executable but it is actually
>>>>      a bash script. Just open it in an editor and look into it ;-). That
>>>>      especially means you need a bash terminal to execute it, and i dont
>>>>      know if that is possible in windows (does cygwin provide something
>>>>      like that?) I had the impression that Christoph Grüninger,
>>>>      christoph.grueninger at iws.uni-stuttgart.de
>>>>      <mailto:christoph.grueninger at iws.uni-stuttgart.de>, has most
>>>> insight
>>>>      into the build system (and Dune in general tbh). You can ask him
>>>>      probably for details.
>>>>      >
>>>>      > In the end the installation boils down to having the modules in a
>>>>      folder and executing `dunecontrol all`. That will configure and
>>>>      compile everything. You can install it locally with make install
>>>>      then (with root privileges). If you, like myself, lack root rights
>>>>      on your system (in the university) there also ways to install them
>>>>      locally. But that is a little bit more complicated. But I would
>>>> also
>>>>      recommend to not install dune-iga while you develop it. I do things
>>>>      like this:
>>>>      >
>>>>      > $ ls -l
>>>>      > total 20
>>>>      > drwxr-xr-x 12 maikel maikel 4096 Mar  9 06:56 dune-common/
>>>>      drwxr-xr-x  8 maikel maikel 4096 Mar  9 07:23 dune-geometry/
>>>>      drwxr-xr-x 10 maikel maikel 4096 Mar  9 07:24 dune-grid/ drwxr-xr-x
>>>>      10 maikel maikel 4096 Mar 11 23:07 dune-iga/ drwxr-xr-x  8 maikel
>>>>      maikel 4096 Mar 11 21:47 dune-istl/
>>>>      >
>>>>      > $ ./dune-common/bin/dunecontrol --module=dune-grid all
>>>>      >
>>>>      > [...]
>>>>      >
>>>>      > $ sudo ./dune-common/bin/dunecontrol --module=dune-grid make
>>>> install
>>>>      >
>>>>      > [...]
>>>>      >
>>>>      > $ cd dune-iga/
>>>>      > $ cmake .
>>>>      >
>>>>      > [ ... ]
>>>>      >
>>>>      > $ make
>>>>      >
>>>>      > [ ... ]
>>>>      >
>>>>      > Profit!
>>>>      >
>>>>      >> Do you know Chinese pinyin? Ha, it's interesting you know
>>>> weiqi. I am
>>>>      >> also exicted about this match. Lee Seedol lost today's last
>>>> match.
>>>>      >> AlphaGo is really amazing and I have read some paper on their
>>>>      >> algorithm. They didn't use much go related feature so it can be
>>>>      >> further improved. Deep learning is super coooool.
>>>>      >
>>>>      > Haha, no, no. I do not really know pinyin. Before my study I was
>>>>      just a rather active go player and know that it is called weiqi in
>>>>      china and baduk in korea. And i have to admit, that I know more
>>>>      about japanese or korean go players than chinese ones. Although I
>>>>      really liked replaying Nie Weiping games.
>>>>      >
>>>>      > Do you have interest especially in deep learning? AFAIK that is
>>>>      different from machine learning in general, right? All I know about
>>>>      topics roughly in that direction are just general minimization
>>>>      methods, linear regression stuff and theory about discrete markov
>>>>      processes and such things. When I have time after my thesis i
>>>> wanted
>>>>      to take a look into that direction too.
>>>>      >
>>>>      >> Cheers,
>>>>      >> Xinyun
>>>>      >>
>>>>      >>
>>>>      >> -----Original Message-----
>>>>      >> From: Maikel Nadolski [mailto:nadolski at math.fu-berlin.de
>>>>      <mailto:nadolski at math.fu-berlin.de>]
>>>>      >> Sent: Monday, March 14, 2016 10:45 PM
>>>>      >> To: Xinyun Li <xinyun.li at fau.de <mailto:xinyun.li at fau.de>>
>>>>      >> Subject: Re: [Dune-devel] [GSoC2016]Spline topic discussion
>>>>      >>
>>>>      >> Dune consist of several core modules. Dune-iga depends on
>>>> dune-common
>>>>      >> and i think on dune-geometry and dune-grid (not sure tho).
>>>>      >>
>>>>      >> In dune-iga you find a test in the src folder and important
>>>>      sources in
>>>>      >> the include/dune/iga folder.
>>>>      >>
>>>>      >> Don't panick if you do not understand dune's build system
>>>>      immediately.
>>>>      >> It took my 2 days or so until i understood everything and
>>>> could play
>>>>      >> around with it and I am really experienced with that kind of
>>>> stuff.
>>>>      >>
>>>>      >> The core modules are mirrored on github:
>>>>      >>
>>>>      >> https://github.com/dune-project
>>>>      >>
>>>>      >> But i checked it again and I think you can access their gitlab
>>>>      >> directly here
>>>>      >>
>>>>      >> https://gitlab.dune-project.org/groups/core
>>>>      >>
>>>>      >> https://gitlab.dune-project.org/core/dune-common
>>>>      >> https://gitlab.dune-project.org/core/dune-geometry
>>>>      >> https://gitlab.dune-project.org/core/dune-grid
>>>>      >>
>>>>      >> etc.
>>>>      >>
>>>>      >> Do you know Weiqi? Have you followed the match of AlphaGo
>>>> against Lee
>>>>      >> Seedol? Great stuff. 5th match incoming.
>>>>      >>
>>>>      >> On 03/14/2016 10:13 PM, Xinyun Li wrote:
>>>>      >>> Hi Maikel,
>>>>      >>>
>>>>      >>> I just downloaded the code. Thanks again for your effort. :) Is
>>>>      there
>>>>      >>> only one small piece of code? (dune-iga.cc). Do I need to
>>>>      >> download
>>>>      >>> other packages?
>>>>      >>>
>>>>      >>> Cheers,
>>>>      >>> Xinyun
>>>>      >>>
>>>>      >>> -----Original Message-----
>>>>      >>> From: Maikel Nadolski [mailto:nadolski at math.fu-berlin.de
>>>>      <mailto:nadolski at math.fu-berlin.de>]
>>>>      >>> Sent: Monday, March 14, 2016 9:58 PM
>>>>      >>> To: Xinyun Li <xinyun.li at fau.de <mailto:xinyun.li at fau.de>>
>>>>      >>> Subject: Re: [Dune-devel] [GSoC2016]Spline topic discussion
>>>>      >>>
>>>>      >>> Hey Xinyun,
>>>>      >>>
>>>>      >>> I still have to calculate it through, but it might simply be
>>>> less
>>>>      >>> than social welfare.. I will probably start my PhD in that time
>>>>      >>> anyway so i do not know if I have time throughout the summer.
>>>>      >>>
>>>>      >>> Just feel free to ask questions. The people on the mailing
>>>> list are
>>>>      >>> all nice.
>>>>      >>>
>>>>      >>> Cheers,
>>>>      >>> Maikel
>>>>      >>>
>>>>      >>> On 03/14/2016 09:45 PM, Xinyun Li wrote:
>>>>      >>>> Hi Maikel,
>>>>      >>>>
>>>>      >>>> Thanks a lot. It's very nice of you :) I think you can
>>>> postpone
>>>>      your
>>>>      >>>> graduate and apply for the Gsoc. Did you already register at
>>>>      >>>> university?
>>>>      >>>> I will try downloading from Github and give you feedback.
>>>>      >>>>
>>>>      >>>> Thanks,
>>>>      >>>> Xinyun
>>>>      >>>>
>>>>      >>>> -----Original Message-----
>>>>      >>>> From: Maikel Nadolski [mailto:nadolski at math.fu-berlin.de
>>>>      <mailto:nadolski at math.fu-berlin.de>]
>>>>      >>>> Sent: Monday, March 14, 2016 9:38 PM
>>>>      >>>> To: Xinyun Li <xinyun.li at fau.de <mailto:xinyun.li at fau.de>>
>>>>      >>>> Subject: Re: [Dune-devel] [GSoC2016]Spline topic discussion
>>>>      >>>>
>>>>      >>>> https://github.com/maikel/dune-iga
>>>>      >>>>
>>>>      >>>> Tell me if it works!
>>>>      >>>>
>>>>      >>>> On 03/14/2016 09:33 PM, Maikel Nadolski wrote:
>>>>      >>>>> Oh, I am not sure, but Dune's Gitlab might be "private". That
>>>>      >>>>> means, you need to create an account at
>>>>      >>>>> https://gitlab.dune-project.org/ and wait for an
>>>> administrator
>>>>      to accept.
>>>>      >>>>>
>>>>      >>>>> I will mirror the respository to Github give me a second.
>>>>      >>>>>
>>>>      >>>>> On 03/14/2016 09:24 PM, Xinyun Li wrote:
>>>>      >>>>>> Hello Maikel,
>>>>      >>>>>>
>>>>      >>>>>> Thanks a lot for your quick and helpful reply.  I'm now
>>>> still
>>>>      >> struggling
>>>>      >>>>>> with downloading the code. I'm sorry to bother you with
>>>> these
>>>>      >>>>>> stupid question. But I think you have some experience and
>>>> really
>>>>      >>>>>> wish you can
>>>>      >>>> help.
>>>>      >>>>>
>>>>      >>>>> Actually, I just started looking into Dune a week ago. In two
>>>>      weeks
>>>>      >>>>> i finish my master thesis in numerics and lose my student
>>>>      status...
>>>>      >>>>> unfortunately I think I can not participate in GSoC ... ;-(
>>>>      >>>>>
>>>>      >>>>>> The system of my personal laptop is Windows so I tried to
>>>>      remotely
>>>>      >> login
>>>>      >>>>>> into our Linux machine.
>>>>      >>>>>
>>>>      >>>>> I do not have any experience with Windows, sorry. :-(
>>>>      >>>>>
>>>>      >>>>>> After typing in " git clone
>>>>      >>>>>>
>>>>      ssh://git@gitlab.dune-project.org:22022/oliver.sander/dune-iga.git
>>>>     
>>>> <http://git@gitlab.dune-project.org:22022/oliver.sander/dune-iga.git>
>>>>      >>>>>> ", I got the following error:
>>>>      >>>>>> " ECDSA key fingerprint is
>>>>      >>>> cb:15:d3:92:f0:b0:36:c4:83:d7:1d:8b:ae:d6:73:c0.
>>>>      >>>>>> Are you sure you want to continue connecting (yes/no)? yes
>>>>      >>>>>> Warning: Permanently added
>>>>      >>>>>> '[gitlab.dune-project.org
>>>>      <http://gitlab.dune-project.org>]:22022,[129.206.107.252]:22022'
>>>> (ECDSA)
>>>>      >>>>>> to
>>>>      >> the
>>>>      >>>>>> list of known hosts.
>>>>      >>>>>> Permission denied (publickey).
>>>>      >>>>>> fatal: Could not read from remote repository."
>>>>      >>>>>
>>>>      >>>>> If you already have access to Gitlab, you have to add your
>>>> public
>>>>      >>>>> ssh key in your profile. Under SSH-Keys. Do you need a
>>>> tutorial? I
>>>>      >>>>> think i can look for one.
>>>>      >>>>>
>>>>      >>>>>> Afterwards, I came back to the GitGUI under Windows. I
>>>> tried to
>>>>      >>>>>> add and fetch but got similar access error.  Could you
>>>> please
>>>>      tell
>>>>      >>>>>> me where I
>>>>      >>> was
>>>>      >>>>>> wrong or how you made it successfully?
>>>>      >>>>>
>>>>      >>>>> Wait a sec. Im cloning to Github.
>>>>      >>>>>
>>>>      >>>>>> Thanks for your time in advance.
>>>>      >>>>>> Best regards,
>>>>      >>>>>> Xinyun
>>>>      >>>>>>
>>>>      >>>>>>
>>>>      >>>>>> -----Original Message-----
>>>>      >>>>>> From: Maikel Nadolski [mailto:nadolski at math.fu-berlin.de
>>>>      <mailto:nadolski at math.fu-berlin.de>]
>>>>      >>>>>> Sent: Monday, March 14, 2016 2:32 PM
>>>>      >>>>>> To: Xinyun Li <xinyun.li at fau.de <mailto:xinyun.li at fau.de>>;
>>>>      dune-devel at dune-project.org <mailto:dune-devel at dune-project.org>
>>>>      >>>>>> Subject: Re: [Dune-devel] [GSoC2016]Spline topic discussion
>>>>      >>>>>>
>>>>      >>>>>> Oh i take the part with De Boors algorithm back. What is
>>>>      >>>>>> implemented is actually a straight bottom-up implementation
>>>>      of the
>>>>      >>>>>> recursive Cox De Boor formula.
>>>>      >>>>>>
>>>>      >>>>>> On 14.03.2016 14:20, Maikel Nadolski wrote:
>>>>      >>>>>>> Hi Xinyun,
>>>>      >>>>>>>
>>>>      >>>>>>> I try to answer as a student interested in GSoC myself,
>>>>      because I
>>>>      >> think
>>>>      >>>>>>> I had to overcome similar barriers and feel with you :-)
>>>>      >>>>>>>
>>>>      >>>>>>>> The project tasks sound clear to me. But I have some
>>>> problem
>>>>      >>>>>>>> with accessing your source code.
>>>>      >>>>>>>
>>>>      >>>>>>> Can you clone the prototype
>>>>      >>>>>>>
>>>>      >>>>>>>
>>>>      ssh://git@gitlab.dune-project.org:22022/oliver.sander/dune-iga.git
>>>>     
>>>> <http://git@gitlab.dune-project.org:22022/oliver.sander/dune-iga.git> ?
>>>>      >>>>>>>
>>>>      >>>>>>>
>>>>      >>>>>>>> Could you please kindly give me some tutorial? Also, it
>>>> seems
>>>>      >>>>>>>> you already have the BSplineGeometry class.
>>>>      >>>>>>>
>>>>      >>>>>>> AFAIK there is no "complete" Geometry class yet. But the
>>>>      >>>>>>> prototype
>>>>      >> does
>>>>      >>>>>>> implement a few things already (for example the De Boor
>>>>      Algorithm).
>>>>      >>>>>>> Thats why you can start with implementing any function
>>>>      needed for
>>>>      >>>>>>> the interface. The pdf
>>>>      >>>>>>>
>>>>      >>>>>>>
>>>>      >>>>>>
>>>>      >>>>
>>>>      >>>
>>>>      >>
>>>>     
>>>> http://www.dune-project.org/doc/localfunctions/dune-localfunctions-man
>>>>      >> ual.pd
>>>>      >>>>>> f
>>>>      >>>>>>>
>>>>      >>>>>>> was really helpful for me, also
>>>>      >>>>>>>
>>>>      >>>>>>> http://www.dune-project.org/doc/grid-howto/grid-howto.pdf
>>>>      >>>>>>>
>>>>      >>>>>>> Im orienting myself on the grid/geometry implementations
>>>> in the
>>>>      >>>>>>> dune-grid and dune-geometry module. I look for simple
>>>> examples
>>>>      >>>>>>> like AxisAlignedCubeGeometry or onedgrid.
>>>>      >>>>>>>
>>>>      >>>>>>>  I
>>>>      >>>>>>>> assume you already have the basis functions of
>>>> B-splines so the
>>>>      >>> splines
>>>>      >>>>>>>> can be easily built given the knot vector and the control
>>>>      >>>>>>>> points. I
>>>>      >>>> have
>>>>      >>>>>>>> some thoughts on "small projects to get started". Some
>>>>      functions
>>>>      >>>>>>>> that can be implemented:
>>>>      >>>>>>>>
>>>>      >>>>>>>> 1.    Evalution at a certain parameter (de Boor Algorithm)
>>>>      >>>>>>>>
>>>>      >>>>>>>> 2.    Knot addtiton and deletion (Boehm Algorithm)
>>>>      >>>>>>>>
>>>>      >>>>>>>> 3.    Fitting to a list of points(global or local
>>>>      interpolation)
>>>>      >>>>>>>>
>>>>      >>>>>>>>
>>>>      >>>>>>>>
>>>>      >>>>>>>> Thanks for your time and hope to hear from you soon!
>>>>      >>>>>>>
>>>>      >>>>>>>
>>>>      >>>>>>> HTH, Maikel
>>>>      >>>>>>>
>>>>      >>>>>
>>>>
>>>>
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20160323/d67d69cb/attachment.sig>


More information about the Dune-devel mailing list