- Sep 30, 2021
-
-
mattijs authored
-
- Mar 29, 2021
-
-
- Nov 19, 2020
-
-
Mark OLESEN authored
- easier support for non-mandatory functions. In some boundary conditions it can be desirable to support additional functions, but not necessarily require them. Make this easier to support with a Function1, PatchFunction1 NewIfPresent() selector. - support for compatibility lookups - harmonize branching logic and error handling between Function1 and PatchFunction1. ENH: refactor a base class for Function1, PatchFunction1 - includes base characteristics, patch or scalar information ENH: additional creation macros - makeConcreteFunction1, makeConcretePatchFunction1Type for adding a non-templated function into the correct templated selection table. makeScalarPatchFunction1 for similarity with makeScalarFunction1
-
- Jul 01, 2020
-
-
mattijs authored
-
- May 23, 2020
-
-
Mark OLESEN authored
-
- Oct 31, 2019
-
-
OpenFOAM bot authored
-
- Aug 23, 2019
-
-
Mark OLESEN authored
- reduce code duplication, support returning multiple interpolations as a Field
-
- Feb 06, 2019
-
-
OpenFOAM bot authored
-
- Dec 11, 2018
-
-
Mark OLESEN authored
- makes the intent clearer and avoids the need for additional constructor casting. Eg, labelList(10, Zero) vs. labelList(10, 0) scalarField(10, Zero) vs. scalarField(10, scalar(0)) vectorField(10, Zero) vs. vectorField(10, vector::zero)
-
- Oct 18, 2018
-
-
Mark OLESEN authored
- more dictionary-like methods, enforce keyType::LITERAL for all lookups to avoid any spurious keyword matching. - new readEntry, readIfPresent methods - The get() method replaces the now deprecate lookup() method. - Deprecate lookupOrFailsafe() Failsafe behaviour is now an optional parameter for lookupOrDefault, which makes it easier to tailor behaviour at runtime. - output of the names is now always flatted without line-breaks. Thus, os << flatOutput(someEnumNames.names()) << nl; os << someEnumNames << nl; both generate the same output. - Constructor now uses C-string (const char*) directly instead of Foam::word in its initializer_list. - Remove special enum + initializer_list constructor form since it can create unbounded lookup indices. - Removd old hasEnum, hasName forms that were provided during initial transition from NamedEnum. - Added static_assert on Enum contents to restrict to enum or integral values. Should not likely be using this class to enumerate other things since it internally uses an 'int' for its values. Changed volumeType accordingly to enumerate on its type (enum), not the class itself.
-
- Feb 26, 2018
-
-
Mark OLESEN authored
Improve alignment of its behaviour with std::unique_ptr - element_type typedef - release() method - identical to ptr() method - get() method to get the pointer without checking and without releasing it. - operator*() for dereferencing Method name changes - renamed rawPtr() to get() - renamed rawRef() to ref(), removed unused const version. Removed methods/operators - assignment from a raw pointer was deleted (was rarely used). Can be convenient, but uncontrolled and potentially unsafe. Do allow assignment from a literal nullptr though, since this can never leak (and also corresponds to the unique_ptr API). Additional methods - clone() method: forwards to the clone() method of the underlying data object with argument forwarding. - reset(autoPtr&&) as an alternative to operator=(autoPtr&&) STYLE: avoid implicit conversion from autoPtr to object type in many places - existing implementation has the following: operator const T&() const { return operator*(); } which means that the following code works: autoPtr<mapPolyMesh> map = ...; updateMesh(*map); // OK: explicit dereferencing updateMesh(map()); // OK: explicit dereferencing updateMesh(map); // OK: implicit dereferencing for clarity it may preferable to avoid the implicit dereferencing - prefer operator* to operator() when deferenced a return value so it is clearer that a pointer is involve and not a function call etc Eg, return *meshPtr_; vs. return meshPtr_();
-
- Nov 05, 2017
-
-
Mark OLESEN authored
- makes for clearer code ENH: make writeIfDifferent part of Ostream
-
- Jul 31, 2017
-
-
- Jul 07, 2017
-
-
Mark OLESEN authored
- replace duplicate code with global bounds enums and Enum
-
- May 29, 2017
-
-
Mark OLESEN authored
-
- Nov 28, 2016
-
-
Henry Weller authored
Resolves bug-report http://bugs.openfoam.org/view.php?id=2356
-
- Mar 22, 2016
-
-
Henry Weller authored
-
- Feb 22, 2016
-
-
Henry Weller authored
This change requires that the de-reference operator '()' returns a const-reference to the object stored irrespective of the const-ness of object stored and the new member function 'ref()' is provided to return an non-const reference to stored object which throws a fatal error if the stored object is const. In order to smooth the transition to this new safer 'tmp' the now deprecated and unsafe non-const de-reference operator '()' is still provided by default but may be switched-off with the compilation switch 'CONST_TMP'. The main OpenFOAM library has already been upgraded and '-DCONST_TMP' option specified in the 'options' file to switch to the new 'tmp' behavior. The rest of OpenFOAM-dev will be upgraded over the following few weeks. Henry G. Weller CFD Direct
-
- Feb 10, 2016
-
-
Henry Weller authored
-
- Feb 08, 2016
-
-
Henry Weller authored
Function1 is an abstract base-class of run-time selectable unary functions which may be composed of other Function1's allowing the user to specify complex functions of a single scalar variable, e.g. time. The implementations need not be a simple or continuous functions; interpolated tables and polynomials are also supported. In fact form of mapping between a single scalar input and a single primitive type output is supportable. The primary application of Function1 is in time-varying boundary conditions, it also used for other functions of time, e.g. injected mass is spray simulations but is not limited to functions of time.
-
- Feb 07, 2016
-
-
Henry Weller authored
to avoid name conflicts with these primitive names in the OpenFOAM namespace
-
- Feb 06, 2016
-
-
Henry Weller authored
Removed inconsistent binary output. Removed unused and IO-inconsistent functions. Simplified the handling of backward-compatible constant value: Removed the unnecessary CompatibilityConstant, Updated Constant and DataEntryNew to handle constant value construction.
-
- Jan 10, 2016
-
-
Henry Weller authored
-
- Nov 08, 2015
-
-
Henry Weller authored
Avoids the clutter and maintenance effort associated with providing the function signature string.
-
- Jul 17, 2015
-
-
Henry Weller authored
This resolves issues with and complexities in the virtual function inheritance
-
- Apr 30, 2013
-
-
mattijs authored
-
- Jan 28, 2013
-
-
andy authored
-
- Oct 24, 2012
-
-
mattijs authored
-
- Jun 22, 2012
-
-
mattijs authored
-
- May 02, 2012
-
-
Henry authored
-
- Apr 17, 2012
-
-
mattijs authored
-
- Apr 13, 2012
-
-
sergio authored
-
- Feb 02, 2012
-
-
andy authored
-
- Nov 22, 2011