Commit Graph

28 Commits

Author SHA1 Message Date
4b86d32807 Added error message if databases contain less than three times. 2019-09-19 10:29:38 +02:00
5579b80401 Minor tweaks
Moved the fields controlling if, and under what name, the recurrence matrix is
written to disk to the parent class recModel to make the behaviour common to all
derived classes.

Fixed some formatting and added some diagnostic output in class gerhardsRecModel
2018-09-13 10:48:47 +02:00
9a3cf6a4c2 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-09-07 09:37:25 +02:00
346334d639 Time dilation factor for databases recorded at "high speed". 2018-09-07 09:36:52 +02:00
bed9647047 Check if databases exist. 2018-08-30 07:41:20 +02:00
c25aa8ed46 Allow to use precalculated recurrence matrix. 2018-05-23 12:16:31 +02:00
c764c6c184 clean up whitespaces
get rid of tabs and extra spaces, fix indentation
2018-04-06 13:58:45 +02:00
459d87c47a recModel now contains latest time when a jump has been performed. 2018-04-04 13:19:05 +02:00
52aa18997d Refactoring recurrence path models, databases etc. 2018-03-30 10:56:28 +02:00
237e85a191 Fixed error with wrong dimension sets. 2018-03-13 16:02:20 +01:00
22fd652019 Clean-up of treatment of time-averaged fields per database. 2018-03-13 08:20:45 +01:00
0211f3cc74 Option to store time-averaged fields for each database. 2018-03-12 18:00:26 +01:00
27b67395f9 Cleaned up code of multiIntervalPath. Intervals need now to be given in separated databases. 2018-03-12 17:19:08 +01:00
c311c4000c Allow for multiple databases. 2018-03-12 16:57:43 +01:00
4403f4e191 recurrence model: large, incomplete data bases
The standardRecModel class reads all fields of the data base at once. This
might create a problem in cases with a large number of snapshots and/or
a large mesh, as the machine's memory (RAM) would become a bottleneck.

Thus, the class gerhardsRecModel implements an incomplete data base, with
a user-defined number of slots M. In cases with a larger number of
snapshots on disk N, with N > M, the class will manage its data base
in a fashion similar to an operating system managing memory pages.

The class gerhardsRecModel implements a least-recently used (LRU)
algorithm, which vacates the least-used of the dataBase's M slots.
An integer list is used to track the slots' usage, each access to a
slot is logged, thus the least-used slot can be easily determined.

In order to fully utilize the LRU algorithm, the computation of the
recurrence matrix in sqrDiffNorm.C had to modified such, that three
nested for-loops are used, instead of two nested loops. Thus, a certain
number of additional, essentially no-op, loop iterations are expended
in order to accomodate the LRU algorithm. Keeping the two nested loops
would have reaped only part of LRU's potential gains.

In order to accomodate data base management in the classes derived
from the class recModel, some const specifiers had to be removed.
For informational purposes, a method has been added to the class.

The class gerhardsRecModel first checks the existence of all N
to-be-read fields, and then fills the data base with the first M
fields.

Further features included in this commit:

All elements of the recurrence model are initialized with the value of -1.0
Thus, some form of error checking is introduced, as negative values should not
remain within the matrix after computation has finished.

Skipping the 0 directory of the data base. This, might be useful when
using rStatAnalysis as post-processing tool.

The class multiIntervalPath was adapted to use OpenFOAM's
methods for parallel communication.

Reference:

  Modern Operating Systems
  Andrew S. Tannenbaum,
  Prentice Hall, 1992
2018-03-08 16:31:01 +11:00
708e4c465c fix output message 2018-02-22 12:14:09 +11:00
d2edf97b05 standardRecModel: skip zero time
Add an optional boolean switch to standardRecModel class to allow
ignoring the 0 directory when building the recurrence data base.

This is useful when using rStatAnalysis as a post-processing tool
on a case where OpenFOAM's purgeWrite feature was used.
If purgeWrite is set to 0, then all time steps will be written to disk.
If purgeWrite is set to N, then only the last N time steps will be stored.
As a new time step is written to disk, the oldest one will be discarded.
However, the 0 directory is excluded from removal.

If purgeWrite is set to 5, and we run a simulation with deltaT=1 und endTime=10,
then the time steps on disk will be: 0, 6, 7, 8, 9, 10.
Running rStatAnalysis on this case, will end in fatal error, as the time step
within the data base will be found to be non-uniform.

The quick and dirty fix, would be to remove or rename the 0 directory, so that
it does not get read. However, telling the recurrence model whether to include
0 or not seems the more elegant solution.
2018-02-22 11:57:54 +11:00
fe68694a26 Allow for single-snapshot database. 2018-01-31 14:36:40 +01:00
334e2f224e Allow for optional, alternative name/path of the dataBase
This changes nothing from the previous behaviour, however, this allows
to use rStatAnalysis as a post-processing tool. A demo case will follow
to demonstrate this.

By default, the data base is located in $CASE_DICT/dataBase. By specifying
the case dict as the path to the data base, rStatAnalysis can now act on
the case's actual time steps, thus post-processing data computed by another
solver.
2018-01-16 10:30:10 +11:00
cc4c9a9071 Changed way average field is calculated. 2017-12-20 09:18:46 +01:00
d9411b56bb Minor bugs fixed. 2017-12-19 16:27:30 +01:00
54f04e6604 Some debugging for rSmoother. 2017-12-18 15:31:32 +01:00
bf2940df57 Moved some member from mother to child class of recModel. 2017-12-18 13:10:41 +01:00
056f7e6b56 Started to add functionality to superpose similar fields. 2017-12-07 19:41:50 +01:00
a725249334 fix warning : control reaches end of non-void function [-Wreturn-type] 2017-03-06 16:08:54 +01:00
a83140ee71 Recurrence statistics analysis and some minor changes. 2017-01-17 10:34:54 +01:00
865c52834f Some restructuring. 2016-08-01 14:43:07 +02:00
3ff2ae9daa Some renaming and restructuring. 2016-08-01 07:14:45 +02:00