- 19 Feb, 2020 1 commit
-
-
- was missing cast to symmTensor
-
- 18 Feb, 2020 6 commits
-
-
Mark Olesen authored
* Support default values for format/compress enum lookups. - Avoids situations where the preferred default format is not ASCII. For example, with dictionary input: format binar; The typing mistake would previously have caused formatEnum to default to ASCII. We can now properly control its behaviour. IOstream::formatEnum ( dict.get<word>("format"), IOstream::BINARY ); Allowing us to switch ascii/binary, using BINARY by default even in the case of spelling mistakes. The mistakes are flagged, but the return value can be non-ASCII. * The format/compression lookup behave as pass-through if the lookup string is empty. - Allows the following to work without complaint IOstream::formatEnum ( dict.getOrDefault("format", word::null), IOstream::BINARY ); - Or use constructor-like failsafe method IOstream::formatEnum("format", dict, IOstream::BINARY); - Apply the same behaviour with setting stream format/compression from a word. is.format("binar"); will emit a warning, but leave the stream format UNCHANGED * Rationalize versionNumber construction - constexpr constructors where possible. Default construct is the "currentVersion" - Construct from token to shift the burden to versionNumber. Support token as argument to version(). Now: is.version(headerDict.get<token>("version")); or failsafe constructor method is.version ( IOstreamOption::versionNumber("version", headerDict) ); Before (controlled input): is.version ( IOstreamOption::versionNumber ( headerDict.get<float>("version") ) ); Old, uncontrolled input - has been removed: is.version(headerDict.lookup("version")); * improve consistency, default behaviour for IOstreamOption construct - constexpr constructors where possible - add copy construct with change of format. - construct IOstreamOption from streamFormat is now non-explicit. This is a commonly expected result with no ill-effects
-
Mark Olesen authored
-
Mark Olesen authored
- renamed 'core/' -> 'base/' to avoid gitignore masking when re-adding files - rename 'nas/' to 'nastran/' for more clarity - relocated OBJstream from surfMesh to fileFormats STYLE: remove unused parseNASCoord. Was deprecated 2017-09
-
- `tensor` and `tensor2D` returns complex eigenvalues/vectors - `symmTensor` and `symmTensor2D` returns real eigenvalues/vectors - adds new test routines for eigendecompositions - improves numerical stability by: - using new robust algorithms, - reordering the conditional branches in root-type selection
-
- ensures each Tensor-container operates for the following base types: - floatScalar - doubleScalar - complex - adds/improves test applications for each container and base type: - constructors - member functions - global functions - global operators - misc: - silently removes `invariantIII()` for `tensor2D` and `symmTensor2D` since the 3rd invariant does not exist for 2x2 matrices - fixes `invariantII()` algorithm for `tensor2D` and `symmTensor2D` - adds `Cmpt` multiplication to `Vector2D` and `Vector` - adds missing access funcs for symmetric containers - improves func/header documentations
-
- replaces floating-point equal comparisons in `linearEqn`, `quadraticEqn`, and `cubicEqn`, - ensures `quadraticEqn` and `cubicEqn` can return `complex` roots, - reorders if-branches in `quadraticEqn` and `cubicEqn` to avoid zero-equal comparison, - adds Kahan's cancellation-avoiding algorithm into `quadraticEqn` and `cubicEqn` for the numerically-sensitive discriminant computation, - adds/improves `polynomialEqns` tests: * adds Test-linearEqn.C * adds Test-quadraticEqn.C * improves Test-cubicEqn.C
-
- 06 Feb, 2020 1 commit
-
-
Mark Olesen authored
-
- 31 Jan, 2020 1 commit
-
-
Mark Olesen authored
- provides an indirect access to a sub-section of a list that is somewhat less efficient than a Foam::SubList, but supports the following: * adjustment of its addressing range after construction * recovery of the original, underlying list at any time This can be more convenient for some coding cases. For example, template<class Addr> void renumberFaces(IndirectListBase<face, Addr>& faces, ...); which can be called for * Specific faces: UIndirectList<face>(mesh.faces(), facesToChange) * A sub-range of faces: IndirectSubList<face>(mesh.faces(), pp.range()) * All faces: IndirectSubList<face>(mesh.faces()) CONFIG: added IndirectListsFwd.H with some common forwarding
-
- 22 Jan, 2020 1 commit
-
-
OpenFOAM bot authored
-
- 23 Dec, 2019 1 commit
-
-
Andrew Heather authored
-
- 19 Dec, 2019 1 commit
-
-
Mark Olesen authored
- now use debug 2 for scanner and debug 4 for parser. Provided better feedback about what is being parsed (debug mode) - relocate debug application to applications/tools/foamExprParserInfo
-
- 17 Dec, 2019 1 commit
-
-
Mark Olesen authored
- follows the principle of least surprise if the expansion behaviour for #eval and expressions (eg, exprFixedValue) are the same. This is possible now that we harness the regular stringOps::expand() within exprString::expand()
-
- 16 Dec, 2019 1 commit
-
-
Mark Olesen authored
- remove unused local functions from volumeExprDriver
-
- 13 Dec, 2019 4 commits
-
-
Mark Olesen authored
- reuse more of stringOps expansions to reduce code and improve the syntax flexiblity. We can now embed "pre-calculated" values into an expression. For example, angle 35; valueExpr "vector(${{cos(degToRad($angle))}}, 2, 3)"; and the ${{..}} will be evaluated with the regular string evaluation and used to build the entire expression for boundary condition evaluation. Could also use for fairly wild indirect referencing: axis1 (1 0 0); axis2 (0 1 0); axis3 (0 0 1); index 100; expr "$[(vector) axis${{ ($index % 3) +1 }}] / ${{max(1,$index)}}";
-
Mark Olesen authored
-
Mark Olesen authored
- finds beg/end indices of string trimmed of leading/trailing whitespace
-
Mark Olesen authored
-
- 12 Dec, 2019 2 commits
-
-
Kutalmis Bercin authored
QRMatrix (i.e. QR decomposition, QR factorisation or orthogonal-triangular decomposition) decomposes a scalar/complex matrix \c A into the following matrix product: \verbatim A = Q*R, \endverbatim where \c Q is a unitary similarity matrix, \c R is an upper triangular matrix. Usage Input types: - \c A can be a \c SquareMatrix<Type> or \c RectangularMatrix<Type> Output types: - \c Q is always of the type of the matrix \c A - \c R is always of the type of the matrix \c A Options for the output forms of \c QRMatrix (for an (m-by-n) input matrix \c A with k = min(m, n)): - outputTypes::FULL_R: computes only \c R (m-by-n) - outputTypes::FULL_QR: computes both \c R and \c Q (m-by-m) - outputTypes::REDUCED_R: computes only reduced \c R (k-by-n) Options where to store \c R: - storeMethods::IN_PLACE: replaces input matrix content with \c R - storeMethods::OUT_OF_PLACE: creates new object of \c R Options for the computation of column pivoting: - colPivoting::FALSE: switches off column pivoting - colPivoting::TRUE: switches on column pivoting Direct solution of linear systems A x = b is possible by solve() alongside the following limitations: - \c A = a scalar square matrix - output type = outputTypes::FULL_QR - store method = storeMethods::IN_PLACE Notes - QR decomposition is not unique if \c R is not positive diagonal \c R. - The option combination: - outputTypes::REDUCED_R - storeMethods::IN_PLACE will not modify the rows of input matrix \c A after its nth row. - Both FULL_R and REDUCED_R QR decompositions execute the same number of operations. Yet REDUCED_R QR decomposition returns only the first n rows of \c R if m > n for an input m-by-n matrix \c A. - For m <= n, FULL_R and REDUCED_R will produce the same matrices
-
Kutalmis Bercin authored
- query func `symmetric()` - query func `tridiagonal()` - `resize()` - `labelpair` identity constructor STYLE: add `#if(0 | RUNALL)` to improve test control in Test-Matrix
-
- 11 Dec, 2019 1 commit
-
-
Mark Olesen authored
COMP: delay evaluation of fieldToken enumeration types - lazy evaluation at runTime instead of compile-time to make the code independent of initialization order. Otherwise triggers problems on gcc-4.8.5 on some systems where glibc is the same age, or older.
-
- 09 Dec, 2019 1 commit
-
-
Mark Olesen authored
- replace stringOps::toScalar with a more generic stringOps::evaluate method that handles scalars, vectors etc. - improve #eval to handle various mathematical operations. Previously only handled scalars. Now produce vectors, tensors etc for the entries. These tokens are streamed directly into the entry.
-
- 06 Dec, 2019 1 commit
-
-
Mark Olesen authored
- ITstream append() would previously have used the append from the underlying tokenList, which leaves the tokenIndex untouched and renders the freshly appended tokens effectively invisible if interspersed with primitiveEntry::read() that itself uses tokenIndex when building the list. The new append() method makes this hidden ITstream bi-directionality easier to manage. For efficiency, we only append lists (not individual tokens) and support a 'lazy' resizing that allows the final resizing to occur later when all tokens have been appended. - The new ITstream seek() method provides a conveniently means to move to the end of the list or reposition to the middle. Using rewind() and using seek(0) are identical. ENH: added OTstream to output directly to a list of tokens --- BUG: List::newElem resized incorrectly - had a simple doubling of the List size without checking that this would indeed be sufficient for the requested index. Bug was not triggered since primitiveEntry was the only class using this call, and it added the tokens sequentially.
-
- 07 Dec, 2019 1 commit
-
-
Mark Olesen authored
- add functor versions of floor/ceil/round for scalar
-
- 26 Nov, 2019 1 commit
-
-
Mark Olesen authored
- previously only had 'opt<..>()' for options, but 'get<..>()' provides more similarity with dictionary methods. The 'opt<..>()' method is retained.
-
- 25 Nov, 2019 1 commit
-
-
Mark Olesen authored
- allows use of Enum in more situations where a tiny Map/HashTable replacement is desirable. The new methods can be combined with null constructed for to have a simple low-weight caching system for words/integers instead of fitting in a HashTable.
-
- 21 Nov, 2019 1 commit
-
-
Mark Olesen authored
- can be used in combination with std::generate, or as a substitute unary operator to supply random numbers for std::transform.
-
- 19 Nov, 2019 2 commits
-
-
Mark Olesen authored
Example, ($radius > 10) ? sin(degToRad(45)) : cos(degToRad(30)) - protect division and modulo against zero-divide. - add scanner/parser debugging switches in the namespace, selectable as "stringToScalar". For example, debug parser: foamDictionary -debug-switch stringToScalar=2 debug scanner: foamDictionary -debug-switch stringToScalar=4 debug both: foamDictionary -debug-switch stringToScalar=6
-
Mattijs Janssens authored
-
- 18 Nov, 2019 1 commit
-
-
Mark Olesen authored
-
- 15 Nov, 2019 4 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
Mark Olesen authored
- the full tensor also supports zip/unzip rows/cols and unzipRow, unzipCol, unzipDiag
-
Mark Olesen authored
-
- 13 Nov, 2019 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
- 11 Nov, 2019 1 commit
-
-
Mark Olesen authored
- silently deprecate 'startsWith', 'endsWith' methods (added in 2016: 2b143606), 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()
-
- 31 Oct, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 10 Nov, 2019 1 commit
-
-
Mark Olesen authored
- move left/right positions prior to substr
-
- 06 Nov, 2019 1 commit
-
-
Mark Olesen authored
-