- 06 Feb, 2019 1 commit
-
-
OpenFOAM bot authored
-
- 02 Jan, 2019 1 commit
-
-
Mark OLESEN authored
-
- 11 Dec, 2018 1 commit
-
-
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)
-
- 09 Nov, 2018 1 commit
-
-
Andrew Heather authored
-
- 06 Nov, 2018 1 commit
-
-
Mark OLESEN authored
-
- 19 Oct, 2018 2 commits
-
-
Mark OLESEN authored
- as part of the cleanup of dictionary access methods (c6520033) made the dictionary class single inheritance from IDLList<entry>. This eliminates any ambiguities for iterators and allows for simple use of range-for looping. Eg, for (const entry& e : topDict)) { Info<< "entry:" << e.keyword() << " is dict:" << e.isDict() << nl; } vs forAllConstIter(dictionary, topDict, iter)) { Info<< "entry:" << iter().keyword() << " is dict:" << iter().isDict() << nl; }
-
Mark OLESEN authored
-
- 15 Oct, 2018 1 commit
-
-
Mark OLESEN authored
- 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.
-
- 01 Oct, 2018 1 commit
-
-
Mark OLESEN authored
Previously the coordinate system functionality was split between coordinateSystem and coordinateRotation. The coordinateRotation stored the rotation tensor and handled all tensor transformations. The functionality has now been revised and consolidated into the coordinateSystem classes. The sole purpose of coordinateRotation is now just to provide a selectable mechanism of how to define the rotation tensor (eg, axis-angle, euler angles, local axes) for user input, but after providing the appropriate rotation tensor it has no further influence on the transformations. -- The coordinateSystem class now contains an origin and a base rotation tensor directly and various transformation methods. - The origin represents the "shift" for a local coordinate system. - The base rotation tensor represents the "tilt" or orientation of the local coordinate system in general (eg, for mapping positions), but may require position-dependent tensors when transforming vectors and tensors. For some coordinate systems (currently the cylindrical coordinate system), the rotation tensor required for rotating a vector or tensor is position-dependent. The new coordinateSystem and its derivates (cartesian, cylindrical, indirect) now provide a uniform() method to define if the rotation tensor is position dependent/independent. The coordinateSystem transform and invTransform methods are now available in two-parameter forms for obtaining position-dependent rotation tensors. Eg, ... = cs.transform(globalPt, someVector); In some cases it can be useful to use query uniform() to avoid storage of redundant values. if (cs.uniform()) { vector xx = cs.transform(someVector); } else { List<vector> xx = cs.transform(manyPoints, someVector); } Support transform/invTransform for common data types: (scalar, vector, sphericalTensor, symmTensor, tensor). ==================== Breaking Changes ==================== - These changes to coordinate systems and rotations may represent a breaking change for existing user coding. - Relocating the rotation tensor into coordinateSystem itself means that the coordinate system 'R()' method now returns the rotation directly instead of the coordinateRotation. The method name 'R()' was chosen for consistency with other low-level entities (eg, quaternion). The following changes will be needed in coding: Old: tensor rot = cs.R().R(); New: tensor rot = cs.R(); Old: cs.R().transform(...); New: cs.transform(...); Accessing the runTime selectable coordinateRotation has moved to the rotation() method: Old: Info<< "Rotation input: " << cs.R() << nl; New: Info<< "Rotation input: " << cs.rotation() << nl; - Naming consistency changes may also cause code to break. Old: transformVector() New: transformPrincipal() The old method name transformTensor() now simply becomes transform(). ==================== New methods ==================== For operations requiring caching of the coordinate rotations, the 'R()' method can be used with multiple input points: tensorField rots(cs.R(somePoints)); and later Foam::transformList(rots, someVectors); The rotation() method can also be used to change the rotation tensor via a new coordinateRotation definition (issue #879). The new methods transformPoint/invTransformPoint provide transformations with an origin offset using Cartesian for both local and global points. These can be used to determine the local position based on the origin/rotation without interpreting it as a r-theta-z value, for example. ================ Input format ================ - Streamline dictionary input requirements * The default type is cartesian. * The default rotation type is the commonly used axes rotation specification (with e1/e2/3), which is assumed if the 'rotation' sub-dictionary does not exist. Example, Compact specification: coordinateSystem { origin (0 0 0); e2 (0 1 0); e3 (0.5 0 0.866025); } Full specification (also accepts the longer 'coordinateRotation' sub-dictionary name): coordinateSystem { type cartesian; origin (0 0 0); rotation { type axes; e2 (0 1 0); e3 (0.5 0 0.866025); } } This simplifies the input for many cases. - Additional rotation specification 'none' (an identity rotation): coordinateSystem { origin (0 0 0); rotation { type none; } } - Additional rotation specification 'axisAngle', which is similar to the -rotate-angle option for transforming points (issue #660). For some cases this can be more intuitive. For example, rotation { type axisAngle; axis (0 1 0); angle 30; } vs. rotation { type axes; e2 (0 1 0); e3 (0.5 0 0.866025); } - shorter names (or older longer names) for the coordinate rotation specification. euler EulerRotation starcd STARCDRotation axes axesRotation ================ Coding Style ================ - use Foam::coordSystem namespace for categories of coordinate systems (cartesian, cylindrical, indirect). This reduces potential name clashes and makes a clearer declaration. Eg, coordSystem::cartesian csys_; The older names (eg, cartesianCS, etc) remain available via typedefs. - added coordinateRotations namespace for better organization and reduce potential name clashes.
-
- 24 Sep, 2018 1 commit
-
-
Mark OLESEN authored
- this provides internal consistency and allows direct use of the coordinate angle with sin(), cos() functions. It eliminates potential issues that could otherwise arise from alternative user input. Eg, in mixerFvMesh it would have previously been possible to specify the coordinate system to use degrees or radians, but these units were not checked when determining the tangential sweep positions. NOTE: this may represent a breaking change if user coding has been relying on cylindrical coordinate system in degrees.
-
- 19 Sep, 2018 1 commit
-
-
Mark OLESEN authored
- safeguard against any change in the default in cylindricalCS
-
- 03 Aug, 2018 1 commit
-
-
Mark OLESEN authored
- do not remove if the dictionary failed to load. - do not remove if -blockTopology was used.
-
- 10 Aug, 2018 1 commit
-
-
Mark OLESEN authored
-
- 30 May, 2018 1 commit
-
-
Mark OLESEN authored
- make the purpose more explicit, and reduces some work for the compiler as well.
-
- 27 Apr, 2018 1 commit
-
-
Mark OLESEN authored
-
- 28 Mar, 2018 1 commit
-
-
Andrew Heather authored
-
- 26 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- in many cases can just use lookupOrDefault("key", bool) instead of lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a bool from an Istream uses the Switch(Istream&) anyhow STYLE: relocated Switch string names into file-local scope
-
- 21 Mar, 2018 1 commit
-
-
Mark OLESEN authored
- both autoPtr and tmp are defined with an implicit construct from nullptr (but with explicit construct from a pointer to null). Thus is it safe to use 'nullptr' when returning an empty autoPtr or tmp.
-
- 05 Mar, 2018 1 commit
-
-
Mark OLESEN authored
This class is largely a pre-C++11 holdover. It is now possible to simply use move construct/assignment directly. In a few rare cases (eg, polyMesh::resetPrimitives) it has been replaced by an autoPtr.
-
- 26 Feb, 2018 2 commits
-
-
Mark OLESEN authored
-
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_();
-
- 18 Nov, 2017 1 commit
-
-
Mark OLESEN authored
- this provides a better typesafe means of locating predefined cell models than relying on strings. The lookup is now ptr() or ref() directly. The lookup functions behave like on-demand singletons when loading "etc/cellModels". Functionality is now located entirely in cellModel but a forwarding version of cellModeller is provided for API (but not ABI) compatibility with older existing user code. STYLE: use constexpr for cellMatcher constants
-
- 10 Aug, 2017 1 commit
-
-
Mark OLESEN authored
- access tokenType enum values more consistently.
-
- 03 Aug, 2017 1 commit
-
-
Mark OLESEN authored
- although this has been supported for many years, the tutorials continued to use "convertToMeters" entry, which is specific to blockMesh. The "scale" is more consistent with other dictionaries. ENH: - ignore "scale 0;" (treat as no scaling) for blockMeshDict, consistent with use elsewhere.
-
- 13 Oct, 2017 1 commit
-
-
Resolves bug report https://bugs.openfoam.org/view.php?id=2710
-
- 09 Oct, 2017 1 commit
-
-
To disable face correspondence checking set checkFaceCorrespondence off; in blockMeshDict. This is necessary in the rare cases where adjacent block faces do not need to correspond because they are geometrically collapsed, e.g. to form a pole/axis. Resolves bug-report https://bugs.openfoam.org/view.php?id=2711
-
- 05 Jul, 2017 1 commit
-
-
Mark OLESEN authored
-
- 03 Jul, 2017 1 commit
-
-
Mark OLESEN authored
-
- 26 May, 2017 1 commit
-
-
Mark OLESEN authored
-
- 25 May, 2017 1 commit
-
-
mattijs authored
-
- 19 May, 2017 1 commit
-
-
Andrew Heather authored
-
- 18 May, 2017 1 commit
-
-
- simplifies organization, includes, linkage etc.
-
- 21 Apr, 2017 1 commit
-
-
Henry Weller authored
-
- 20 Apr, 2017 1 commit
-
-
Henry Weller authored
Corrected the geometry directory name from "triSurface" to "geometry". Resolves bug-report https://bugs.openfoam.org/view.php?id=2529
-
- 08 Feb, 2017 1 commit
-
-
Mark Olesen authored
- constness on local variables, pre-increment on loops, parameter names
-
- 12 Dec, 2016 1 commit
-
-
Andrew Heather authored
-
- 09 Dec, 2016 1 commit
-
-
Henry Weller authored
to clarify purpose. Patch contributed by Mattijs Janssens
-
- 28 Nov, 2016 2 commits
-
-
Henry Weller authored
Resolves bug-report http://bugs.openfoam.org/view.php?id=2356
-
Henry Weller authored
See http://bugs.openfoam.org/view.php?id=2356
-
- 11 Nov, 2016 1 commit
-
-
Henry Weller authored
Patch contributed by Mattijs Janssens
-