- 14 Dec, 2016 1 commit
-
-
mattijs authored
-
- 12 Dec, 2016 2 commits
- 09 Dec, 2016 1 commit
-
-
mark authored
-
- 07 Dec, 2016 3 commits
- 06 Dec, 2016 5 commits
-
-
Mark OLESEN authored
ENH: improve objectRegistry functionality (issue #322) - Recursive searching for objects within a registry is now optional (previous it was always done). A recursive search effectively blocks the construction of sub-sub-registries if their names are 'masked' by some parent level sub-registry with the same name! (BUG) - Recursive search is now turned OFF by default, which makes it consistent with dictionary and probably causes the least number of surprises. ---- Various new convenience methods added: lookupObjectRef() - returns a non-const reference. For example, volScalarField& U = mesh().lookupObjectRef<volScalarField>("U"); Instead of volScalarField& U = const_cast<volScalarField&> ( mesh().lookupObject<volScalarField>("U") ); -- lookupObjectPtr() - returns a const pointer, and nullptr on failure. For example, const volScalarField* Uptr = mesh().lookupObjectPtr<volScalarField>("U"); if (Uptr) { const volScalarField& U = *Uptr; ... } Instead of if (mesh().foundObject<volScalarField>("U")) { const volScalarField& U = mesh().lookupObject<volScalarField>("U"); ... } -- lookupObjectRefPtr() - returns a non-const pointer, and nullptr on failure. For example, volScalarField* Uptr = mesh().lookupObjectRefPtr<volScalarField>("U"); if (Uptr) { volScalarField& U = *Uptr; // use as reference (*Uptr) = ...; // or use directly } Instead of if (mesh().foundObject<volScalarField>("U")) { volScalarField& U = const_cast<volScalarField&> ( mesh().lookupObject<volScalarField>("U") ); } -- sortedNames() - now works with template parameters and with regular expression matching as well. For example, wordList names = mesh().sortedNames(); wordList fields = mesh().sortedName<volScalarField>(); Instead of wordList names = mesh().sortedNames(); wordList fields = mesh().names<volScalarField>(); Foam::sort(fields); -- See merge request !83
-
Andrew Heather authored
runTimePostProcessing FO camera update - Removed the camera 'mode' - The (old) static camera was only appropriate when parallel projection was inactive, and the view was centred at (0 0 0) - Camera input now always requires 'position' and 'focalPoint' - Clip box is now optional. Note that this is applied after the camera set-up and so will override the camera position - View angle is only appropriate when not using parallel projection - Zoom now required, applied after all other operations - 1 = do nothing, >1 = zoom in, <1 = zoom out Example input: ``` camera { // Total number of frames to generate nFrameTotal 1; // Parallel projection flag parallelProjection no; focalPoint (0 0 0); up (0 1 0); position (0 0 1); // Optional entries clipBox (-0.0206 -0.0254 -0.0005) (0.29 0.0254 0.0005); viewAngle 20; zoom 1.1; } ``` See merge request !81
-
Andrew Heather authored
-
Andrew Heather authored
-
mattijs authored
-
- 05 Dec, 2016 6 commits
- 02 Dec, 2016 9 commits
-
-
mark authored
- make it easier to transfer triSurface information into MeshedSurface etc.
-
mark authored
- identical code was present in surfaceCheck (original source), and isoSurface, isoSurfaceCell (copies). - add in a MeshedSurface<face> variant as well, since this will likely be needed in the near future
-
mark authored
- add writeObject method
-
mark authored
- otherwise difficult to avoid auto-write etc. - propagate similar changes to MeshedSurfaceAllocator, where is makes the most sense.
-
mark authored
- other sampled surface types use meshCells() throughout. Only cuttingPlane was different.
-
mark authored
-
mark authored
- This is simply the normal helmet geometry, but shifted to where a passenger head may be. It can be used for surface sampling etc.
-
mark authored
- The null constructor already creates a dimensionless Zero, but named "undefined". Provide an constructor for a dimensioned Zero, but named "0" for universal clarity to its value.
-
- 01 Dec, 2016 6 commits
-
-
mark authored
- provide additional filtering methods on names(), sortedNames() For example, IOobjectList objects = ...; wordReList selection = ...; objects.sortedNames(VolFieldType::typeName, selection);
-
mark authored
-
mattijs authored
-
mattijs authored
-
mark authored
- Recursive searching for objects within a registry is now optional (previous it was always done). A recursive search effectively blocks the construction of sub-sub-registries if their names are 'masked' by some parent level sub-registry with the same name! (BUG) - Recursive search is now turned OFF by default, which makes it consistent with dictionary and probably causes the least number of surprises. ---- Various new convenience methods added: lookupObjectRef() - returns a non-const reference. For example, volScalarField& U = mesh().lookupObjectRef<volScalarField>("U"); Instead of volScalarField& U = const_cast<volScalarField&> ( mesh().lookupObject<volScalarField>("U") ); -- lookupObjectPtr() - returns a const pointer, and nullptr on failure. For example, const volScalarField* Uptr = mesh().lookupObjectPtr<volScalarField>("U"); if (Uptr) { const volScalarField& U = *Uptr; ... } Instead of if (mesh().foundObject<volScalarField>("U")) { const volScalarField& U = mesh().lookupObject<volScalarField>("U"); ... } -- lookupObjectRefPtr() - returns a non-const pointer, and nullptr on failure. For example, volScalarField* Uptr = mesh().lookupObjectRefPtr<volScalarField>("U"); if (Uptr) { volScalarField& U = *Uptr; // use as reference (*Uptr) = ...; // or use directly } Instead of if (mesh().foundObject<volScalarField>("U")) { volScalarField& U = const_cast<volScalarField&> ( mesh().lookupObject<volScalarField>("U") ); } -- sortedNames() - now works with template parameters and with regular expression matching as well. For example, wordList names = mesh().sortedNames(); wordList fields = mesh().sortedName<volScalarField>(); Instead of wordList names = mesh().sortedNames(); wordList fields = mesh().names<volScalarField>(); Foam::sort(fields); --
-
mark authored
- test clearly shows failure to insert a sub-registry when it has the same name as one of the parent sub-registry.
-
- 29 Nov, 2016 7 commits
-
-
mark authored
-
mark authored
- the user might otherwise be unaware of the changed location
-
mark authored
- both are typedefs for UList<label>
-
mark authored
- was using direct face ids instead of appropriate sub-lists - also removed typo that wasn't helping much either
-
mark authored
-
mark authored
- remove remnant nullptr check
-
mark authored
-