|
From: | Florian Weik |
Subject: | Re: [ESPResSo-devel] c question |
Date: | Mon, 18 May 2015 14:20:54 +0200 |
Dear core developer(s),
I would like to add some functionality in our object-in-fluid framework. We did some effort to speed up the computations. For this however we needed to create new local interaction between 4 particles, called oif_local_forces (this interaction replaces all other local interactions from oif).
Unlike the dihedral force, we need 4 different forces to be added to 4 particles involved in the interaction.
Until now, the Espresso defines in function add_bonded_forces only 3 forces (force, force2 and force3). Only when TWIST_STACK is defined, another forces are used.
Here comes my question: How should I add the fourth force? There are basically 2 options:
1. I add force4 in the beginning of add_bonded_force. The drawback of this option is, that there will be always 4 forces compiled in regardless whether our new local bonded interaction will be used or not.
2. I will introduce new preprocessor directive OIF_LOCAL_FORCES that will need to be set in myconfig.hpp in case I will use my new local interaction. And the fourth force will be defined only if OIF_LOCAL_FORCES is defined. I emphasize, that the directive OIF_LOCAL_FORCES would be used only at this single place in the code. We do not need it for anything else.
Thanks for your advice.
Ivan
--
Ivan Cimrak
FRI Zilinska Univerzita v Ziline
personal web: http://www.kst.fri.uniza.sk/~icimrak/
cell-in-fluid group: http://cell-in-fluid.fri.uniza.sk
[Prev in Thread] | Current Thread | [Next in Thread] |