- 01 Jun, 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.
-
- 28 Mar, 2018 1 commit
-
-
Andrew Heather authored
-
- 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_();
-
- 05 Nov, 2017 1 commit
-
-
Mark Olesen authored
- makes for clearer code ENH: make writeIfDifferent part of Ostream
-
- 22 Nov, 2017 1 commit
-
-
Mark Olesen authored
- in most cases already checked valid() so don't need additional check for setting an existing pointer
-
- 03 Jul, 2017 1 commit
-
-
Mark Olesen authored
-
- 26 May, 2017 1 commit
-
-
Mark Olesen authored
-
- 19 May, 2017 1 commit
-
-
Andrew Heather authored
-
- 13 Jul, 2017 1 commit
-
-
Avoids potential problems with derived classes which do not define a clone function.
-
- 07 Jul, 2017 1 commit
-
-
Andrew Heather authored
Original commit message: ------------------------ Parallel IO: New collated file format When an OpenFOAM simulation runs in parallel, the data for decomposed fields and mesh(es) has historically been stored in multiple files within separate directories for each processor. Processor directories are named 'processorN', where N is the processor number. This commit introduces an alternative "collated" file format where the data for each decomposed field (and mesh) is collated into a single file, which is written and read on the master processor. The files are stored in a single directory named 'processors'. The new format produces significantly fewer files - one per field, instead of N per field. For large parallel cases, this avoids the restriction on the number of open files imposed by the operating system limits. The file writing can be threaded allowing the simulation to continue running while the data is being written to file. NFS (Network File System) is not needed when using the the collated format and additionally, there is an option to run without NFS with the original uncollated approach, known as "masterUncollated". The controls for the file handling are in the OptimisationSwitches of etc/controlDict: OptimisationSwitches { ... //- Parallel IO file handler // uncollated (default), collated or masterUncollated fileHandler uncollated; //- collated: thread buffer size for queued file writes. // If set to 0 or not sufficient for the file size threading is not used. // Default: 2e9 maxThreadFileBufferSize 2e9; //- masterUncollated: non-blocking buffer size. // If the file exceeds this buffer size scheduled transfer is used. // Default: 2e9 maxMasterFileBufferSize 2e9; } When using the collated file handling, memory is allocated for the data in the thread. maxThreadFileBufferSize sets the maximum size of memory in bytes that is allocated. If the data exceeds this size, the write does not use threading. When using the masterUncollated file handling, non-blocking MPI communication requires a sufficiently large memory buffer on the master node. maxMasterFileBufferSize sets the maximum size in bytes of the buffer. If the data exceeds this size, the system uses scheduled communication. The installation defaults for the fileHandler choice, maxThreadFileBufferSize and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within the case controlDict file, like other parameters. Additionally the fileHandler can be set by: - the "-fileHandler" command line argument; - a FOAM_FILEHANDLER environment variable. A foamFormatConvert utility allows users to convert files between the collated and uncollated formats, e.g. mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated An example case demonstrating the file handling methods is provided in: $FOAM_TUTORIALS/IO/fileHandling The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
-
- 10 Mar, 2017 1 commit
-
-
Henry Weller authored
-
- 04 Nov, 2016 1 commit
-
-
Henry Weller authored
which directly applies the constraint to the displacement without external tensor ops. Patch contributed by Mattijs Janssens
-
- 01 Jul, 2016 1 commit
-
-
Henry Weller authored
-
- 17 Jun, 2016 1 commit
-
-
Henry Weller authored
-
- 09 Jun, 2016 1 commit
-
-
Mark Olesen authored
- relocate common dictionary output into codedBase class
-
- 19 May, 2016 1 commit
-
-
Henry Weller authored
-
- 18 May, 2016 2 commits
-
-
Henry Weller authored
of the entry which is to provide the name of the generated class. 'redirectType' is supported for backward-compatibility.
-
Henry Weller authored
-
- 30 Apr, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField() These new names are more consistent and logical because: primitiveField(): primitiveFieldRef(): Provides low-level access to the Field<Type> (primitive field) without dimension or mesh-consistency checking. This should only be used in the low-level functions where dimensional consistency is ensured by careful programming and computational efficiency is paramount. internalField(): internalFieldRef(): Provides access to the DimensionedField<Type, GeoMesh> of values on the internal mesh-type for which the GeometricField is defined and supports dimension and checking and mesh-consistency checking.
-
- 25 Apr, 2016 1 commit
-
-
Andrew Heather authored
-
- 15 Apr, 2016 1 commit
-
-
Henry Weller authored
-
- 22 Mar, 2016 1 commit
-
-
Henry Weller authored
-
- 14 Mar, 2016 1 commit
-
-
Henry Weller authored
Contributed by Bruno Santos Resolves patch report http://www.openfoam.org/mantisbt/view.php?id=2023 Update online documentation http://openfoam.github.io/Documentation-dev/html/
-
- 09 Mar, 2016 1 commit
-
-
Henry Weller authored
Foam::direction is an unsigned type which makes it easier for the compiler to pickup and report errors in the instantiation of VectorSpaces and associated types.
-
- 29 Feb, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
-
- 20 Feb, 2016 1 commit
-
-
Henry Weller authored
To be used instead of zeroGradientFvPatchField for temporary fields for which zero-gradient extrapolation is use to evaluate the boundary field but avoiding fields derived from temporary field using field algebra inheriting the zeroGradient boundary condition by the reuse of the temporary field storage. zeroGradientFvPatchField should not be used as the default patch field for any temporary fields and should be avoided for non-temporary fields except where it is clearly appropriate; extrapolatedCalculatedFvPatchField and calculatedFvPatchField are generally more suitable defaults depending on the manner in which the boundary values are specified or evaluated. The entire OpenFOAM-dev code-base has been updated following the above recommendations. Henry G. Weller CFD Direct
-
- 12 Feb, 2016 1 commit
-
-
Henry Weller authored
valuePointPatchField: Change assignment to use the object's internalField rather than that of the argument Avoids dependency on the state of the argument pointPatchField the internalField of which may have been de-allocated
-
- 08 Feb, 2016 1 commit
-
-
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.
-
- 20 Jan, 2016 1 commit
-
-
Henry Weller authored
-
- 11 Jan, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
-
- 10 Jan, 2016 1 commit
-
-
Henry Weller authored
-
- 19 Dec, 2015 1 commit
-
-
mattijs authored
-
- 08 Dec, 2015 1 commit
-
-
Henry Weller authored
It is better to declare the namespace of each function in the C file rather than "open" the namespace as this may lead to inconsistencies between the declaration in the H files and definition in the C file.
-
- 11 Nov, 2015 2 commits