Commit Graph

25 Commits

Author SHA1 Message Date
Mark Olesen
1679c5f157 BUG: SlicedGeometricField, slices into field instead of shallow copy (#3080)
- regression introduced by e98acdc4fc

  Affected versions: (v2206, v2212, v2306, v2312)
2024-01-19 20:19:12 +01:00
Mark Olesen
e98acdc4fc ENH: extend type aliases to include geometric boundary fields (#2348)
STYLE: LduInterfaceFieldPtrsList as alias instead of a class

STYLE: define patch lists typedefs when defining the base patch

- eg, polyPatchList typedef within polyPatch.H

INT: relocate GeometricField::Boundary -> GeometricBoundaryField

- was internal to GeometricField but moving it outside simplifies
  forward declarations etc. Code adapted from openfoam.org
2022-03-30 16:36:03 +02:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Henry Weller
2f431ffd3d made the clone function pure virtual
Avoids potential problems with derived classes which do not define a clone function.
2017-07-13 23:24:14 +01:00
Henry Weller
58f905ff70 C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
2016-08-05 17:19:38 +01:00
Henry Weller
3c053c2fe6 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.
2016-04-30 21:40:09 +01:00
Henry Weller
4a57b9be2e GeometricField: Rationalized and simplified access to the dimensioned internal field
Given that the type of the dimensioned internal field is encapsulated in
the GeometricField class the name need not include "Field"; the type
name is "Internal" so

volScalarField::DimensionedInternalField -> volScalarField::Internal

In addition to the ".dimensionedInternalField()" access function the
simpler "()" de-reference operator is also provided to greatly simplify
FV equation source term expressions which need not evaluate boundary
conditions.  To demonstrate this kEpsilon.C has been updated to use
dimensioned internal field expressions in the k and epsilon equation
source terms.
2016-04-27 21:32:45 +01:00
Henry Weller
9b7521ae0a List: Remove the inherited UList::shallowCopy to avoid accidental misuse 2016-04-07 21:05:26 +01:00
Henry Weller
6e573ad7e8 UList: Rationalize assignment (shallow-copy vs deep-copy)
//- Disallow default shallow-copy assignment
    //
    //  Assignment of UList<T> may need to be either shallow (copy pointer)
    //  or deep (copy elements) depending on context or the particular type
    //  of list derived from UList and it is confusing and prone to error
    //  for the default assignment to be either.  The solution is to
    //  disallow default assignment and provide separate 'shallowCopy' and
    //  'deepCopy' member functions.
    void operator=(const UList<T>&) = delete;

    //- Copy the pointer held by the given UList.
    inline void shallowCopy(const UList<T>&);

    //- Copy elements of the given UList.
    void deepCopy(const UList<T>&);
2016-04-03 10:26:05 +01:00
Henry Weller
c02bf70ea7 tmp: Improved reference count checks to provide better error diagnostics
in case of tmp misuse.

Simplified tmp reuse pattern in field algebra to use tmp copy and
assignment rather than the complex delayed call to 'ptr()'.

Removed support for unused non-const 'REF' storage of non-tmp objects due to C++
limitation in constructor overloading: if both tmp(T&) and tmp(const T&)
constructors are provided resolution is ambiguous.

The turbulence libraries have been upgraded and '-DCONST_TMP' option
specified in the 'options' file to switch to the new 'tmp' behavior.
2016-02-24 12:47:36 +00:00
Henry Weller
56fa7c0906 Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
mattijs
37b873b051 ENH: Sliced: option to slice non-processor coupled patchFields 2012-11-09 16:43:21 +00:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
graham
d79237597e STYLE: Fixing code style requirements for all src. 2010-07-28 13:31:46 +01:00
Mark Olesen
a50f01b079 STYLE: use forAllIter, forAllConstIter instead of long-hand version
STYLE: use 'forAll(' NOT 'forAll (', as per coding guide
2010-04-12 11:18:38 +02:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
mattijs
31dd5faf7d sliced fields as unallocated copies 2009-03-10 13:53:36 +00:00
Mark Olesen
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
Mark Olesen
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
henry
7639571b4b Fixed a bug introduced by maintaining the coupled patch fields in
sliced fields.
2008-06-24 17:01:01 +01:00
OpenFOAM-admin
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00