... | ... | @@ -3,6 +3,7 @@ |
|
|
[![home](/icons/home.svg "wiki home")](/home)
|
|
|
[![code](/icons/code.svg "coding patterns")][code-patterns]
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
|Version | User | Developer | Release notes |
|
|
|
|--------|------|------------|---------------|
|
... | ... | @@ -20,12 +21,55 @@ |
|
|
|_v2106(develop)_ | [User][v2106-user] | [Developer][v2106-devel] | - |
|
|
|
|
|
|
|
|
|
## General reference
|
|
|
## General
|
|
|
|
|
|
Developer-related pages of [Coding Patterns](/coding/patterns/patterns),
|
|
|
initiated Dec-2019.
|
|
|
To ease migration and enhance compatibility, OpenFOAM provides a
|
|
|
number of macro definitions and dictionary compatibility lookups.
|
|
|
|
|
|
***We are happy to incorporate content from volunteers!!***
|
|
|
### API-level
|
|
|
|
|
|
The OpenFOAM `wmake` rules provide an API-level definition that can be
|
|
|
used within the code. For example,
|
|
|
```
|
|
|
#if (OPENFOAM >= 1912)
|
|
|
...
|
|
|
#endif
|
|
|
```
|
|
|
|
|
|
### Compatibility with .org
|
|
|
|
|
|
when porting some existing code from the openfoam.org variant, the
|
|
|
`COMPAT_OPENFOAM_ORG` define can be used to provide some assistance.
|
|
|
It primarily handles deviations in dictionary methods and the names of
|
|
|
some constants (eg, `GREAT` vs `great`).
|
|
|
|
|
|
### Deprecations
|
|
|
|
|
|
Changing the meaning of methods and their parameters is avoided
|
|
|
wherever possible. When a method _is_ replaced with a new method, or
|
|
|
uses a different preferred type of parameters, a `FOAM_DEPRECATED_FOR`
|
|
|
deprecation macro is used to create a compile-time warning message.
|
|
|
This allows ample time to migrate methods, generally with a suggested
|
|
|
replacement. At some point in the future, these deprecated methods may
|
|
|
be removed entirely.
|
|
|
|
|
|
There may also be various methods where we would wish to deprecate
|
|
|
them, but they are still used too heavily. For some of these, we have
|
|
|
defines within the header to track or selectively enable/disable them.
|
|
|
|
|
|
A non-exhaustive list (check the corresponding files for more detail):
|
|
|
|
|
|
|
|
|
|File | Defines |
|
|
|
|--------|---------|
|
|
|
| argList.H | Foam_argList_1712 |
|
|
|
| autoPtr.H | Foam_autoPtr_castOperator |
|
|
|
| autoPtr.H | Foam_autoPtr_copyConstruct |
|
|
|
| autoPtr.H | Foam_autoPtr_deprecate_setMethod |
|
|
|
| doubleScalar.H | Foam_no_besselFunc |
|
|
|
| floatScalar.H | Foam_no_besselFunc |
|
|
|
| IOstream.H | Foam_IOstream_extras |
|
|
|
| surfaceWriter.H | Foam_surfaceWriter_directAccess |
|
|
|
|
|
|
|
|
|
## Repository migration
|
... | ... | @@ -42,7 +86,7 @@ as a repository, you should read information about [repository migration](/Repos |
|
|
|
|
|
----
|
|
|
|
|
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
|
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
|
|
|
|
|
[v2106-user]: /upgrade/v2106-User-Upgrade-Guide
|
|
|
[v2106-devel]: /upgrade/v2106-Developer-Upgrade-Guide
|
... | ... | |