ChronoEngine:Add contributions

From ChronoWiki

(Redirected from Add contributions)
Jump to: navigation, search

If you are an advanced user of Chrono::Engine, you can apply to join the developer team. Contact us at this page or write to the forum. Note that everybody can fork the GIT, and do changes to the code, or also send pull requests if he/she thinks that his contribution is worth while adding to the official GIT.

Basic guidelines for developers are the following.


GIT directory structure

  • Small modifications (bug removals etc.) just change a single file: no problem, simply push the commit to the official GIT if you are member of the team, or sent a pull request if you are not a member of the team. (Just remember that if you change some low level stuff, you must be sure that you do not break some feature! Do regression testing.)
  • Larger modifications (ex. new features) require new .cpp and .h files:
    • add the new files in preexisting subdirectory of ChronoEngine/source/ if it makes sense, for example if you create a new c++ class for, say, string manipulation, just add its .cc and .h files to the /core/ subdirectory,
    • add the new files to new subdirectories of ChronoEngine/source/ if you start a new set of features, for example create a new directory called ChronoEngine/source/fluids/ if you plan to add many .cpp and .h files related to fluid simulation,
    • add the new files to a new unit if you implement something that could be optionally used: in this way the end user is not forced to link your library if it is not interested; for example create a new directory called ChronoEngine/source/unit_ACIS if you want to develop some additional DLL called ChronoEngine_ACIS.dll that could be linked in order to access features of ACIS-based CAD tools (so if the user does not have all the ACIS tools installed on his system, he is not forced to do). Implementing a new group requires a special CMakeList.txt file for building the dll, just see how we implemented those contained in the existing units.


Coding style

We do not force users to follow strict coding styles and formatting rules -the Chrono::Engine project itself is not 100% coherent- but it would be better if you try to follow these guidelines:

  • source files (and headers) should start with the Ch... prefix, for example ChMyClass.cpp, ChMyClass.h
  • class names should start with a Ch... prefix as well, for instance ChMyFluidElement. If possible, each class has a separate .h file. Same for .cpp.
  • before each class declaration (and before each public member) remember to put a description in form of a comment, using the Doxygen style: /// before each row.


Continuous integration

For the development team, we have nightly build systems, on DroneIO and on TravisCI , that continuously checks out the GIT repository and compiles it with the GCC compiler, to be sure that bugs in new code do not break the code.

If you submit modifications to the main GIT repository, periodically check that the entire system builds correctly.

Personal tools