Commit Graph

51 Commits

Author SHA1 Message Date
7c1190f0b1 ENH: rationalize some string methods.
- silently deprecate 'startsWith', 'endsWith' methods
  (added in 2016: 2b14360662), in favour of
  'starts_with', 'ends_with' methods, corresponding to C++20 and
  allowing us to cull then in a few years.

- handle single character versions of starts_with, ends_with.

- add single character version of removeEnd and silently deprecate
  removeTrailing which did the same thing.

- drop the const versions of removeRepeated, removeTrailing.
  Unused and with potential confusion.

STYLE: use shrink_to_fit(), erase()
2019-11-11 18:50:00 +01:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
5f42b5df9f ENH: for-range, forAllIters() ... in OpenFOAM/
- reduced clutter when iterating over containers
2019-01-07 09:20:51 +01:00
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
a7a346b206 STYLE: indentation for FatalIOErrorInFunction calls 2018-11-06 09:49:22 +01:00
c6520033c9 ENH: rationalize dictionary access methods
- use keyType::option enum to consolidate searching options.
  These enumeration names should be more intuitive to use
  and improve code readability.

    Eg,   lookupEntry(key, keyType::REGEX);
    vs    lookupEntry(key, false, true);

  or

    Eg,   lookupEntry(key, keyType::LITERAL_RECURSIVE);
    vs    lookupEntry(key, true, false);

- new findEntry(), findDict(), findScoped() methods with consolidated
  search options for shorter naming and access names more closely
  aligned with other components. Behave simliarly to the
  methods lookupEntryPtr(), subDictPtr(), lookupScopedEntryPtr(),
  respectively. Default search parameters consistent with lookupEntry().

    Eg, const entry* e = dict.findEntry(key);
    vs  const entry* e = dict.lookupEntryPtr(key, false, true);

- added '*' and '->' dereference operators to dictionary searchers.
2018-10-15 16:16:12 +02:00
8eddcc072a ENH: avoid readScalar, readLabel etc from dictionary (#762, #1033)
- use the dictionary 'get' methods instead of readScalar for
  additional checking

     Unchecked:  readScalar(dict.lookup("key"));
     Checked:    dict.get<scalar>("key");

- In templated classes that also inherit from a dictionary, an additional
  'template' keyword will be required. Eg,

     this->coeffsDict().template get<scalar>("key");

  For this common use case, the predefined getXXX shortcuts may be
  useful. Eg,

     this->coeffsDict().getScalar("key");
2018-10-12 08:14:47 +02:00
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
8df433860f STYLE: use string substr instead of string::operator()
- makes the purpose clearer.
  In some places, string::resize() is even simpler.

- use C++11 string::back() in preference to str[str.size()-1]
2017-07-21 12:30:42 +02:00
acb5d54e41 STYLE: initializer_list instead of IStringStream for static list construction 2017-07-07 12:54:54 +02:00
19eb6fbc6c Legacy solver wrappers ICCG and BICCG removed
Instead of ICCG use PCG with the DIC preconditioner
Instead of BICCG use PBiCG with the DILU preconditioner
2016-06-14 14:53:28 +01:00
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
263864984e OpenFOAM/matrices/solution: Simplify debug messages for consistency 2016-02-12 14:45:53 +00:00
dc43311e62 src/OpenFOAM: Update ...IOErrorIn -> ...IOErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 21:13:04 +00:00
cad94eb90e fvSolution: fields and equations entries in relaxationFactors are now individually optional 2014-02-03 18:05:09 +00:00
34c274761c solution: added set/unset to field relaxation diagnostics 2013-11-06 09:56:23 +00:00
029f881827 STYLE: solution: moved debug printing 2013-10-03 10:49:10 +01:00
8e968f5647 STYLE: debug: move debug declaration into Foam namespace 2012-12-11 09:33:20 +00:00
9d6def688f ENH: Adding extrudePatchMesh, re-location of extrudeModel and
createShellMesh and introducing io::READ_IF_PRESENT option
in polyMesh constructor from components
2012-04-19 14:07:51 +01:00
2dd3db1384 STYLE: Updated copyright year 2012-04-10 14:27:42 +01:00
2afe6a95c6 BUG: Corrected re-read of under-relaxation factors in fvSolution 2012-04-10 14:23:13 +01:00
9eb1502555 BUG: Corrected pimple control stroring of prev iter 2011-09-09 10:02:24 +01:00
bc952e63de ENH: storePrevIter now handled by solutionControl class 2011-09-08 11:42:05 +01:00
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
c3cb632c24 Documentation: converted javadoc @ to LaTeX style \ in Doxygen code docs 2011-02-08 18:22:00 +00:00
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
4da55e853f BUG: master-only-reading : did not transfer headerClassName 2010-12-10 13:14:45 +00:00
dd7f831225 ENH: solution.C, fvSchemes.C : remove syncPar argument 2010-12-03 13:01:13 +00:00
11979f6a29 ENH: fvSchemes,fvSolution : read file only once. 2010-12-03 11:12:44 +00:00
d79237597e STYLE: Fixing code style requirements for all src. 2010-07-28 13:31:46 +01:00
28b1a9e2c6 Merge branch 'olesenm' 2010-06-03 10:25:03 +01:00
c51a2b0f63 ENH: have MUST_READ_IF_MODIFIED on IOdictionary construction 2010-06-02 09:48:07 +01:00
ff30e6b61a STYLE: can use bool instead of Switch version of dictionary::lookupOrDefault
- both versions handle the same input words.
  Only need the <Switch> version when the destination variable is
  also a Switch and we need to output the word later.
2010-05-20 14:17:18 +02:00
5087125424 STYLE: remove erroneous section-label on doxygen @endcond 2010-05-07 15:30:27 +02:00
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
75bfb292e7 Added a switch to control the caching system. 2009-10-26 19:41:32 +00:00
00cd6ac8b7 Added support for the caching of gradients.
This is controlled by providing a list of the fields to be cached in the "cache"
sub-dictionary of fvSolution.

Debug information about the caching is printed when the solution::debug switch
is on.

There are still a couple of issues to do with the naming of gradients used in
corrected snGrads and limited interpolation schemes that need to be resolved
but these are no different to previously and hence not urgent.
2009-10-26 14:01:39 +00:00
dfd82248e2 First level of support for cached temporary fields. 2009-10-20 18:30:55 +01:00
35adfbf525 minor cosmetic changes
- PackedList comments
- solution.C verbosity about new solver syntax on master only
2009-04-21 14:43:27 +02:00
0bada1e31b dictionary cosmetics
- partial revert for commit d21869b580
  * only add extra newlines for a top-level dictionary that is output as such

- make "#inputMode merge" the default instead of "#inputMode error"
  * this corresponds to a very common usage case
2009-03-18 13:15:17 +01:00
89683498e1 Fixed the case when 'relaxationFactors' entry is not present. 2009-03-12 22:19:31 +00:00
2944ce59c1 Added a 'default' entry to the 'relaxationFactors'. When it is set to 0 it is
equivalent to the 'none' entry in fvSchemes and relaxation factors must be
provided for all fields which might require one.  If it is set to a value
between 0 and 1 this value is used as the default relaxation factor.
2009-03-12 21:49:40 +00:00
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
f7f2d1672a extend fvSolution re-write to also include the 'smooth' entry 2008-12-09 17:04:05 +01:00
4f1bb8345f lduMatrix now takes a dictionary instead of an Istream for the solver controls
- can now use dictionary substitutions and regular expressions in
    system/fvSolution

  - foamUpgradeFvSolution application to convert system/fvSolution
    (with -test option)

motion solver syntax left as-is.
2008-12-08 17:22:01 +01:00
a48bc8746a use dictionary::readIfPresent wherever reasonable 2008-07-20 14:07:49 +02:00
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00