Commit Graph

2156 Commits

Author SHA1 Message Date
Henry Weller
4fe6ed3c6a BUG: compressibleInterFoam: Corrected handling of thermal diffusivity with mixture turbulence model
Resolves bug-report https://bugs.openfoam.org/view.php?id=2958
2018-05-25 23:43:41 +01:00
Henry Weller
0cdb9d1ca0 BUG: rhoPimpleFoam: Only execute the density predictor if not in simpleRho mode 2018-06-10 22:45:46 +01:00
Mark Olesen
d56744a66a STYLE: Renamed source files to reflect solver names (issue #890) 2018-06-21 16:14:16 +02:00
Mark Olesen
736d358782 STYLE: code tidying for icoReactingMultiPhaseInterFoam
- use Enum instead of NamedEnum
- shorter form for dimensionedScalar

- reduce verbosity about missed seeding for DTRM cloud.
  Re-enable old warnings in debug mode.
2018-06-21 13:35:22 +02:00
sergio
2790f2da4e ENH: Editing tutorials, and Make/files 2018-06-20 12:27:12 -07:00
Andrew Heather
c103331a6a INT: integration updates 2018-06-20 16:28:48 +01:00
mattijs
636328fc1c ENH: icoReactingMultiPhaseInterFoam: thermo sharing T 2018-06-15 14:05:37 +01:00
sergio
4cb073e150 ENH: Up to date icoReactingMultiphaseInterFoam solver and libs
Adding tutorials and other minor changes
2018-06-04 11:25:59 -07:00
sergio
d68adc4d31 ENH: Final stage for laserDTRM model and new icoReactingMultiphaseFoam 2017-08-10 09:17:55 -07:00
Andrew Heather
12e2142db8 COMP: refactoring to resolve compiler warnings - see #886 2018-06-20 10:56:04 +01:00
Andrew Heather
cf7dbcd0e4 STYLE: Minor clean-up 2018-06-19 11:51:38 +01:00
Johan Roenby
e6fd82f173 ENH: interIsoFoam updates
- Reimplemented treatment of alpha1, phi and U in case of
  nOuterCorrectors > 1 based on storePrevIter() to avoid cluttering the
  solver with unnecessary fields in case of nOuterCorrectors = 1.
2018-06-13 11:46:21 +02:00
Johan Roenby
bab72d5139 ENH: multiple updates to interIsoFoam related code
- Updated tutorial headers
- Added copyright note to isoAdvector src
- Removed outcommented code lines in interIsoFoam solver
- Removed all LTS from interIsoFoam since this is not currently supported
- Confirmed that discInConstantFlow gives identical results with N subCylces and time step N*dt
- Confirmed that this also holds when nOuterCorrectors > 1.
2018-06-12 23:14:10 +02:00
Johan Roenby
25a7e4da7b INT: Initial update of isoAdvector and interIsoFoam to work with AMR. 2018-06-11 17:51:54 +02:00
Andrew Heather
c909a5df25 GIT: resolved merge conflict 2018-06-13 14:20:18 +01:00
Andrew Heather
616b91c06e Merge branch 'master' into develop 2018-06-13 14:17:47 +01:00
mattijs
765c2051aa BUG: fftw: missing normalisation. See #867. 2018-06-13 14:09:37 +01:00
Andrew Heather
8f22683615 STYLE: Renamed source files to reflect solver names 2018-06-11 13:44:25 +01:00
Andrew Heather
4e8fd19d3d ENH: Refactored creation of simplified meshes for -dry-run operation
TODO: migrate singleCellFvMesh into simplified mesh framework (?)
2018-06-11 12:42:09 +01:00
Mark Olesen
84b109219a STYLE: reduced usage of Switch
- Since 'bool' and 'Switch' use the _identical_ input mechanism
  (ie, both accept true/false, on/off, yes/no, none, 1/0), the main
  reason to prefer one or the other is the output.

  The output for Switch is as text (eg, "true"), whereas for bool
  it is label (0 or 1). If the output is required for a dictionary,
  Switch may be appropriate. If the output is not required, or is only
  used for Pstream exchange, bool can be more appropriate.
2018-06-01 20:51:48 +02:00
Mark Olesen
1c030f441d STYLE: missing newline in correctPhi.H 2018-05-30 16:18:20 +02:00
Mark Olesen
dc521b95df STYLE: consistent use of '= delete' 2018-05-30 12:03:17 +02:00
Andrew Heather
3530711219 ENH: Refactored the dummyFvMesh code 2018-06-05 16:10:04 +01:00
Mark Olesen
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
Andrew Heather
885c47150e ENH: chemFoam - updated mesh creation 2018-01-11 21:34:27 +00:00
Andrew Heather
b50bbc7ef2 ENH: Added new dry-run options to solvers 2018-01-11 14:23:17 +00:00
mattijs
f51ee9a0e2 Merge remote-tracking branch 'origin/develop' into develop-pre-release 2018-05-31 17:34:16 +01:00
Andrew Heather
ad25e18c7f Merge remote-tracking branch 'origin/develop' into develop-pre-release 2018-05-18 12:18:13 +01:00
Andrew Heather
6180e0db8b INT: Additional integration updates/clean-up 2018-05-18 10:49:10 +01:00
Mark Olesen
48d654cf19 ENH: avoid memory leaks for HashPtrTable, PtrMap insertion (issue #749)
- disallow insert() of raw pointers, since a failed insertion
  (ie, entry already existed) results in an unmanaged pointer.

  Either insert using an autoPtr, or set() with raw pointers or autoPtr.

- IOobjectList::add() now takes an autoPtr instead of an object reference

- IOobjectList::remove() now returns an autoPtr instead of a raw pointer
2018-05-17 09:56:36 +01:00
sergio
b78d37e93c Merge branch 'develop-pre-release' of develop.openfoam.com:Development/OpenFOAM-plus into develop-pre-release 2018-05-18 01:31:17 -07:00
sergio
e0912a058c ENH: Adding pressure work terms for compressibleInterFoam
Removing temporary fix from compressibleInterDyFOAM to re-calculte Uf with morphing mesh
2018-05-18 01:27:13 -07:00
mattijs
d469bbae4b COMP: Allwmake: feed through 'objects' targer for wmakeCollect 2018-05-17 08:39:57 +01:00
Mark Olesen
4fe8ed8245 STYLE: use direct iteration for HashSet
- The iterator for a HashSet dereferences directly to its key.

- Eg,

      for (const label patchi : patchSet)
      {
          ...
      }
  vs.
      forAllConstIter(labelHashSet, patchSet, iter)
      {
          const label patchi = iter.key();
          ...
      }
2018-03-06 00:29:03 +01:00
Mark Olesen
dd8341f659 ENH: make format of ExecutionTime = ... output configurable (issue #788)
- controlled by the the 'printExecutionFormat' InfoSwitch in
  etc/controlDict

      // Style for "ExecutionTime = " output
      // - 0 = seconds (with trailing 's')
      // - 1 = day-hh:mm:ss

   ExecutionTime = 112135.2 s  ClockTime = 113017 s

   ExecutionTime = 1-07:08:55.20  ClockTime = 1-07:23:37

- Callable via the new Time::printExecutionTime() method,
  which also helps to reduce clutter in the applications.
  Eg,

     runTime.printExecutionTime(Info);

  vs

     Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
         << "  ClockTime = " << runTime.elapsedClockTime() << " s"
         << nl << endl;

--

ENH: return elapsedClockTime() and clockTimeIncrement as double

- previously returned as time_t, which is less portable.
2018-04-27 15:00:34 +02:00
Mark Olesen
ebfe46503f STYLE: improve wmkdepend parse error message
- parsing error state only arises from a missing final newline
  in the file (which the dnl macro does not capture).
  Report with a warning instead of modifying the dnl macro since
  we generally wish to know about this anyhow.

- add missing newline to YEqn.H file.
2018-04-25 14:37:59 +02:00
Mark Olesen
bac943e6fc ENH: new bitSet class and improved PackedList class (closes #751)
- The bitSet class replaces the old PackedBoolList class.
  The redesign provides better block-wise access and reduced method
  calls. This helps both in cases where the bitSet may be relatively
  sparse, and in cases where advantage of contiguous operations can be
  made. This makes it easier to work with a bitSet as top-level object.

  In addition to the previously available count() method to determine
  if a bitSet is being used, now have simpler queries:

    - all()  - true if all bits in the addressable range are empty
    - any()  - true if any bits are set at all.
    - none() - true if no bits are set.

  These are faster than count() and allow early termination.

  The new test() method tests the value of a single bit position and
  returns a bool without any ambiguity caused by the return type
  (like the get() method), nor the const/non-const access (like
  operator[] has). The name corresponds to what std::bitset uses.

  The new find_first(), find_last(), find_next() methods provide a faster
  means of searching for bits that are set.

  This can be especially useful when using a bitSet to control an
  conditional:

  OLD (with macro):

      forAll(selected, celli)
      {
          if (selected[celli])
          {
              sumVol += mesh_.cellVolumes()[celli];
          }
      }

  NEW (with const_iterator):

      for (const label celli : selected)
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

      or manually

      for
      (
          label celli = selected.find_first();
          celli != -1;
          celli = selected.find_next()
      )
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

- When marking up contiguous parts of a bitset, an interval can be
  represented more efficiently as a labelRange of start/size.
  For example,

  OLD:

      if (isA<processorPolyPatch>(pp))
      {
          forAll(pp, i)
          {
              ignoreFaces.set(i);
          }
      }

  NEW:

      if (isA<processorPolyPatch>(pp))
      {
          ignoreFaces.set(pp.range());
      }
2018-03-07 11:21:48 +01:00
Mark Olesen
b4d38ab468 ENH: improve handling of ThirdParty packages
- generalize some of the library extensions (.so vs .dylib).
  Provide as wmake 'sysFunctions'

- added note about unsupported/incomplete system support

- centralize detection of ThirdParty packages into wmake/ subdirectory
  by providing a series of scripts in the spirit of GNU autoconfig.
  For example,

      have_boost, have_readline, have_scotch, ...

  Each of the `have_<package>` scripts will generally provide the
  following type of functions:

      have_<package>          # detection
      no_<package>            # reset
      echo_<package>          # echoing

  and the following type of variables:

      HAVE_<package>          # unset or 'true'
      <package>_ARCH_PATH     # root for <package>
      <package>_INC_DIR       # include directory for <package>
      <package>_LIB_DIR       # library directory for <package>

  This simplifies the calling scripts:

      if have_metis
      then
          wmake metisDecomp
      fi

  As well as reducing clutter in the corresponding Make/options:

      EXE_INC = \
          -I$(METIS_INC_DIR) \
          -I../decompositionMethods/lnInclude

      LIB_LIBS = \
          -L$(METIS_LIB_DIR) -lmetis

  Any additional modifications (platform-specific or for an external build
  system) can now be made centrally.
2018-04-24 14:51:19 +02:00
Andrew Heather
ed4564a805 STYLE: Added backwards compatibility for old keywords 2018-04-18 13:32:49 +01:00
Andrew Heather
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
Mark Olesen
018124e3bf STYLE: use 'return nullptr' for empty autoPtr/tmp returns
- 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.
2018-03-21 09:31:09 +01:00
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
f0435beb9c Merge remote-tracking branch 'origin/master' into develop 2018-03-16 23:38:29 +01:00
Andrew Heather
40e7d389d8 ENH: DPMFoam - extended RAS model selection. See #743 2018-03-13 12:48:16 +00:00
Mark Olesen
5d1fb23555 ENH: code reduction in PackedList, PackedBoolList (issue #751)
- eliminate iterators from PackedList since they were unused, had
  lower performance than direct access and added unneeded complexity.

- eliminate auto-vivify for the PackedList '[] operator.
  The set() method provides any required auto-vivification and
  removing this ability from the '[]' operator allows for a lower
  when accessing the values. Replaced the previous cascade of iterators
  with simpler reference class.

PackedBoolList:

- (temporarily) eliminate logic and addition operators since
  these contained partially unclear semantics.

- the new test() method tests the value of a single bit position and
  returns a bool without any ambiguity caused by the return type
  (like the get() method), nor the const/non-const access (like
  operator[] has). The name corresponds to what std::bitset uses.

- more consistent use of PackedBoolList test(), set(), unset() methods
  for fewer operation and clearer code. Eg,

      if (list.test(index)) ...    |  if (list[index]) ...
      if (!list.test(index)) ...   |  if (list[index] == 0u) ...
      list.set(index);             |  list[index] = 1u;
      list.unset(index);           |  list[index] = 0u;

- deleted the operator=(const labelUList&) and replaced with a setMany()
  method for more clarity about the intended operation and to avoid any
  potential inadvertent behaviour.
2018-03-13 08:32:40 +01:00
Andrew Heather
ac3a8bc3cb BUG: simpleCoalParcelFoam - corrected dimensions of Qdot. Fixes #742 2018-02-23 09:04:16 +00:00
Mark Olesen
451f8e0357 Merge remote-tracking branch 'origin/master' into develop 2018-03-07 18:08:07 +01: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
57291e8692 STYLE: use autoPtr::New and tmp::New for simple return types 2018-02-26 14:00:30 +01:00