[Gfs-devel] How these lines of code works in Gerris

22 views
Skip to first unread message

HE, He CM [ME]

unread,
Apr 26, 2016, 2:48:02 AM4/26/16
to Gfs-...@lists.sourceforge.net

Dear Gerris developers, 


I have been using Gerris code to do lots of simulations on droplets collision recently. However, I am really want to step into the source code. Thus, I am writing to ask for several instructions that how to get it started easily. 


During the code reading, I quite know the ingenious code inplement, however, I don't know how ingenious it is. 

Specifically, take several lines of code as example:


GfsEventClass * gfs_adapt_thickness_class (void)
{
  static GfsEventClass * klass = NULL;

  if (klass == NULL) {
    GtsObjectClassInfo info = {
      "GfsAdaptThickness",
      sizeof (GfsAdaptThickness),
      sizeof (GfsEventClass),
      (GtsObjectClassInitFunc) gfs_adapt_thickness_class_init,
      (GtsObjectInitFunc) gfs_adapt_thickness_init,
      (GtsArgSetFunc) NULL,
      (GtsArgGetFunc) NULL
    };
    klass = gts_object_class_new (GTS_OBJECT_CLASS (gfs_adapt_class ()), &info);
  }

  return klass; 
}

This kind of code occurs almost in every class definition. However, for me, it is where hardly to follow. 
I appreciate a lot if anyone could give me some guidances about how to get into the code from the begining. for example, the book which contains the class inplements that very close to that in Gerris, or some prerequsites to read the code. Actually, I have some programming experience, but far more simple simulation. 

Thanks in advance and best regards,
Andy He




Disclaimer:

This message (including any attachments) contains confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this message and notify the sender and The Hong Kong Polytechnic University (the University) immediately. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited and may be unlawful.

The University specifically denies any responsibility for the accuracy or quality of information obtained through University E-mail Facilities. Any views and opinions expressed are only those of the author(s) and do not necessarily represent those of the University and the University accepts no liability whatsoever for any losses or damages incurred or caused to any party as a result of the use of such information.

HE, He CM [ME]

unread,
Apr 26, 2016, 2:48:03 AM4/26/16
to gfs-...@lists.sourceforge.net, Gfs-...@lists.sourceforge.net
Reply all
Reply to author
Forward
0 new messages