espressomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-devel] c question


From: Florian Weik
Subject: Re: [ESPResSo-devel] c question
Date: Mon, 18 May 2015 14:20:54 +0200

Hi,
I've moved force4 out of the ifdef with 8c00b78e3c8c26f43c9202c1bb4c1ccffcc82f77, so there is no problem anymore. I don't expect any performance effect of this. If so there should be some meta-feature like FOUR_BODY_BOND that compiles in force3 and force4 as most bonded interactions are 2-body, not 3-body. By the way, if your compultational costs are dominated by the bonded interactions it might be worthwhile to profile that code. I don't think that has not yet been done extensively yet as "typical" Espresso simulations are dominated by the non-bonded or long-range interactions. You might get some significant improvement out of this.

Greeting,
Florian

On Mon, May 18, 2015 at 1:28 PM, Ivan Cimrak <address@hidden> wrote:
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




--
Florian Weik, Dipl.-Phys.,
Institut für Computerphysik, Allmandring 3, D-70569 Stuttgart
Phone: +49-711-685-67703
Public Key 0x0562F11D Fingerprint 3294 6360 EC93 37A3 BD40  F597 0BAD 3AF8 0562 F11D


reply via email to

[Prev in Thread] Current Thread [Next in Thread]