The OpenFOAM Foundation provides an Unsupported Contributions Repository to enable users to place their code contributions into the public domain. Those contributions may from time to time be migrated into the official OpenFOAM distribution, subject to general quality standards of OpenFOAM described below.
Software that is included in the OpenFOAM source code base must conform to quality standards. Software quality can be split into two areas:
- functional quality: how well it performs to a given design, based on requirements, i.e. its fitness for purpose;
- structural quality: how well it meets requirements to be able to deliver functional quality, through sound architecture, robustness, ease of maintenance, etc.
Functional quality can be assessed through software testing , both functional testing where the actions of individual functions are verified, or non-functional testing, where the ability of a solver to simulate a problem in CFD can be assessed, for example. Contributed code must follow sound principles of science and engineering.
Structural quality relates to attributes that are more difficult to measure, such as maintainability, reliability and efficiency. All contributed code must conform to the standards of structural quality within the existing OpenFOAM code. One particular area that is considered critical by the Foundation is maintainability. For that, contributed code must:
- minimise code size and duplication, e.g. deriving new classes from existing classes, rather than duplicating existing classes;
- target broad applicability, e.g. not be highly specific to a particular simulation case;
- be consistent with the rest of OpenFOAM, e.g. using OpenFOAM’s own container classes than those from the C++ Standard Template Library ;
- conform to the OpenFOAM coding style guidelines.