Skip to content

Commit

Permalink
Add preamble.h to extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulPPelaez committed Oct 22, 2021
1 parent b3a2a58 commit 73a0355
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions
Submodule extensions updated 3 files
+22 −0 LICENSE.txt
+11 −0 README.md
+39 −0 preamble.h
14 changes: 12 additions & 2 deletions src/ParticleData/ParticleData.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@
//List here all the properties with this syntax:
/* ((PropertyName, propertyName, TYPE)) \ */
//The preprocessor ensures that they are included wherever is needed
#define ALL_PROPERTIES_LIST ((Pos, pos, real4)) \
#ifndef EXTRA_PARTICLE_PROPERTIES
#define EXTRA_PARTICLE_PROPERTIES
#endif
#define IMPL_ALL_PROPERTIES_LIST ((Pos, pos, real4)) \
((Id, id, int)) \
((Mass, mass, real)) \
((Force, force, real4)) \
Expand All @@ -112,7 +115,14 @@
((Charge, charge, real)) \
((Torque, torque, real4)) \
((AngVel, angVel, real4)) \
((Dir, dir, real4))
((Dir, dir, real4)) EXTRA_PARTICLE_PROPERTIES
/*
((Torque, torque, real4)) \
((AngVel, angVel, real4)) \
((Dir, dir, real4)) \
*/
#define ALL_PROPERTIES_LIST IMPL_ALL_PROPERTIES_LIST

//Get the Name (first letter capital) from a tuple in the property list
#define PROPNAME_CAPS(tuple) BOOST_PP_TUPLE_ELEM(3, 0 ,tuple)
Expand Down
7 changes: 5 additions & 2 deletions src/misc/ParameterUpdatable.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*Raul P. Pelaez 2017.
/*Raul P. Pelaez 2017-2021.
A parameter communication interface, anything that inherits from ParameterUpdatable can be called through update* to communicate a parameter change using a common interface. Parameters related with the particle data are communicated using ParticleData (like number of particles).
Expand All @@ -20,13 +20,16 @@
#include"utils/Box.cuh"


#ifndef EXTRA_UPDATABLE_PARAMETERS
#define EXTRA_UPDATABLE_PARAMETERS
#endif
//Add here any parameter you want along its type, after adding it here the function updateWHATEVER(type) will
//be available for all ParameterUpdatable modules
#define PARAMETER_LIST ((TimeStep, real)) \
((SimulationTime, real)) \
((Box, Box)) \
((Temperature, real)) \
((Viscosity, real))
((Viscosity, real)) EXTRA_UPDATABLE_PARAMETERS



Expand Down
12 changes: 9 additions & 3 deletions src/uammd.cuh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
/* Raul P. Pelaez 2017-2021. Main UAMMD include.
*/
#ifndef UAMMD_CUH
#define UAMMD_CUH



#ifdef UAMMD_EXTENSIONS
#include "../extensions/preamble.h"
#endif

#include "System/System.h"
#include "ParticleData/ParticleData.cuh"
#include "ParticleData/ParticleGroup.cuh"
#include "ParticleData/ParticleGroup.cuh"
#endif

0 comments on commit 73a0355

Please sign in to comment.