Commit Graph

44 Commits

Author SHA1 Message Date
Mark Olesen
2f86cdc712 STYLE: more consistent use of dimensioned Zero
- when constructing dimensioned fields that are to be zero-initialized,
  it is preferrable to use a form such as

      dimensionedScalar(dims, Zero)
      dimensionedVector(dims, Zero)

  rather than

      dimensionedScalar("0", dims, 0)
      dimensionedVector("zero", dims, vector::zero)

  This reduces clutter and also avoids any suggestion that the name of
  the dimensioned quantity has any influence on the field's name.

  An even shorter version is possible. Eg,

      dimensionedScalar(dims)

  but reduces the clarity of meaning.

- NB: UniformDimensionedField is an exception to these style changes
  since it does use the name of the dimensioned type (instead of the
  regIOobject).
2018-03-16 10:24:03 +01:00
Mark Olesen
36719bf55b STYLE: consistent lookupOrDefault template parameters
- 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
2018-03-26 09:09:09 +02:00
Mark Olesen
3d608bf06a ENH: remove reliance on the Xfer class (issue #639)
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.
2018-03-05 13:28:53 +01:00
Mark Olesen
3814762785 ENH: relocate triSurface classes into surfMesh library (issue #294)
- simplifies organization, includes, linkage etc.
2017-05-18 10:42:05 +02:00
Mark Olesen
49d0b7552e STYLE: use initializer_list syntax when building system command 2017-03-10 10:34:37 +01:00
Andrew Heather
b9940cbbb1 COMP: Multiple changes - first clean build after latest merge - UNTESTED 2016-09-23 15:36:53 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
b8614eca07 Make/options: Removed duplicate entries
Thanks to Bruno Santos for providing the script to check the files
Resolves bug-report http://bugs.openfoam.org/view.php?id=2169
2016-08-01 20:55:16 +01:00
Mark Olesen
8bb78dda60 ENH: provide a vfork/exec version of system (issue #185)
The normal library system() command uses 'fork', which causes
problems on IB+OPENMPI.

STYLE: add Foam:: qualifier to system calls to make them easier to spot.
2016-07-18 13:37:39 +02:00
Henry Weller
ea5401c770 GeometricField::GeometricBoundaryField -> GeometricField::Boundary
When the GeometricBoundaryField template class was originally written it
was a separate class in the Foam namespace rather than a sub-class of
GeometricField as it is now.  Without loss of clarity and simplifying
code which access the boundary field of GeometricFields it is better
that GeometricBoundaryField be renamed Boundary for consistency with the
new naming convention for the type of the dimensioned internal field:
Internal, see commit 4a57b9be2e

This is a very simple text substitution change which can be applied to
any code which compiles with the OpenFOAM-dev libraries.
2016-04-28 07:22:02 +01:00
Henry Weller
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
Henry Weller
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
Henry Weller
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
Henry Weller
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +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
730f89dc9d Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required 2016-03-22 17:46:52 +00:00
Henry Weller
caf8776f9b SquareMatrix, SymmetricSquareMatrix: Changed the constructor from size to require only n
This avoids the need to check that the m and n dimensions are the same.
2016-03-22 14:13:48 +00:00
Andrew Heather
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
Andrew Heather
b9313ef2fe ENH: Consistency updates after Foundation merge and code tidying 2016-04-25 16:46:56 +01:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01: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
Henry Weller
75cf86b769 Correct formatting: "forAll (" -> "forAll("
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1967
2016-01-09 23:10:16 +00:00
mattijs
92b5ee3487 Merge branch 'develop' into radiation
Conflicts:
	applications/utilities/preProcessing/viewFactorsGen/shootRays.H
	src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
	src/thermophysicalModels/radiation/derivedFvPatchFields/radiationCoupledBase/radiationCoupledBase.C
	src/thermophysicalModels/radiation/derivedFvPatchFields/radiationCoupledBase/radiationCoupledBase.H
	src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
	src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
	tutorials/mesh/parallel/filter/0.org/T
2015-12-11 09:50:43 +00:00
Andrew Heather
3f55f752fc GIT: Resolve conflict with upstream merge from Foundation 2015-12-07 17:07:20 +00:00
mattijs
b6f350f6f7 STYLE: viewFactorsGen: spelling 2015-11-24 13:42:58 +00:00
Henry Weller
e2ef006b91 applications: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 17:53:31 +00:00
sergio
eedbd182d1 ENH: Adding solar radiation modelling and tutorial changes 2015-11-02 11:54:27 -08:00
Henry
a9374358fe viewFactorsGen: Correct container resizing
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1712
2015-05-28 16:13:29 +01:00
Henry
30d396ae28 viewFactorsGen: Handle baffles
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1680
2015-04-30 22:25:40 +01:00
Henry
56e9699cb0 viewFactorsGen: Add support for 2D slab geometries
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1649
2015-04-11 11:44:02 +01:00
Henry
315ab1225c Update headers 2015-02-12 12:34:27 +00:00
Henry
d01afadbc1 Name fields to avoid duplicate registration 2015-02-12 12:33:45 +00:00
Henry
d3c40298db viewFactorsGen/shootRays: Allow the specification of maxDynListLength in viewFactorsDict
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1501
2015-01-27 10:49:23 +00:00
Henry
2aec249647 Updated the whole of OpenFOAM to use the new templated TurbulenceModels library
The old separate incompressible and compressible libraries have been removed.

Most of the commonly used RANS and LES models have been upgraded to the
new framework but there are a few missing which will be added over the
next few days, in particular the realizable k-epsilon model.  Some of
the less common incompressible RANS models have been introduced into the
new library instantiated for incompressible flow only.  If they prove to
be generally useful they can be templated for compressible and
multiphase application.

The Spalart-Allmaras DDES and IDDES models have been thoroughly
debugged, removing serious errors concerning the use of S rather than
Omega.

The compressible instances of the models have been augmented by a simple
backward-compatible eddyDiffusivity model for thermal transport based on
alphat and alphaEff.  This will be replaced with a separate run-time
selectable thermal transport model framework in a few weeks.

For simplicity and ease of maintenance and further development the
turbulent transport and wall modeling is based on nut/nuEff rather than
mut/muEff for compressible models so that all forms of turbulence models
can use the same wall-functions and other BCs.

All turbulence model selection made in the constant/turbulenceProperties
dictionary with RAS and LES as sub-dictionaries rather than in separate
files which added huge complexity for multiphase.

All tutorials have been updated so study the changes and update your own
cases by comparison with similar cases provided.

Sorry for the inconvenience in the break in backward-compatibility but
this update to the turbulence modeling is an essential step in the
future of OpenFOAM to allow more models to be added and maintained for a
wider range of cases and physics.  Over the next weeks and months more
turbulence models will be added of single and multiphase flow, more
additional sub-models and further development and testing of existing
models.  I hope this brings benefits to all OpenFOAM users.

Henry G. Weller
2015-01-21 19:21:39 +00:00
mattijs
f2c6dc97a2 BUG: viewFactorsGen: unused variables #1146 2014-01-31 10:34:00 +00:00
andy
2aba2c995b STYLE: minor code formatting 2014-01-10 16:02:37 +00:00
mattijs
5f68e587e6 ENH: viewFactorsGen: exclude AMI 2013-05-16 11:28:02 +01:00
Sergio Ferraris
5da306b1c1 ENH: viewFactorsGen:
Modification of shootRays algorithm. Rays that hit themselfs are continued
 	 until they hit(or not) the agglomeration target. If they do the surfaces can see
	 each other.
     faceAgglomerate:
	 The agglomeration now stops when the global nCoarse is reached (not per-processor)
2013-05-03 15:59:41 +01:00
andy
951c8436aa ENH: Applying Gijs' patch: Update header documentation for utilities 2013-02-21 10:54:34 +00:00
Henry
cd51a5eea3 Consistency: Changed exponent FORTRAN style 'E' to C style 'e' 2012-04-17 16:48:27 +01:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
sergio
cf54434499 BUG: Proper handling of zero size patches 2011-07-08 09:43:48 +01:00
andy
cb684c42ba STYLE: Code conformance tweaks 2011-06-14 13:23:45 +01:00
sergio
42a2ce3321 STY: mnaking viewFactorsGen folder consisten 2011-05-26 15:14:59 +01:00