e.g. in tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/T
hot
{
type externalCoupledTemperature;
commsDir "${FOAM_CASE}/comms";
file "data";
initByExternal yes;
log true;
value uniform 307.75; // 34.6 degC
}
Previously both 'file' and 'fileName' were used inconsistently in different
classes and given that there is no confusion or ambiguity introduced by using
the simpler 'file' rather than 'fileName' this change simplifies the use and
maintenance of OpenFOAM.
- As the names describe, check if the string starts or ends with a
particular value. Always true if the given text is empty or if the
string is identical to the given text.
- add an extension to the file name
- remove a file extension
- check if a file name has an extension
- check if a file name has a particular extension (as word),
or matches a particular grouping of extensions (as wordRe).
This slightly more convenient when working with char[] input:
fileName file1{ "path", "name", "to", "file.ext" };
vs. fileName file1 = fileName(path)/"name"/"to"/"file.ext";
But is a bit more efficient since it avoid most of the intermediate
copying and resizing incurred by the '/' operator.
ENH: improve objectRegistry functionality (issue #322)
- Recursive searching for objects within a registry is now optional
(previous it was always done).
A recursive search effectively blocks the construction of sub-sub-registries
if their names are 'masked' by some parent level sub-registry with
the same name! (BUG)
- Recursive search is now turned OFF by default, which makes it consistent
with dictionary and probably causes the least number of surprises.
----
Various new convenience methods added:
lookupObjectRef()
- returns a non-const reference.
For example,
volScalarField& U = mesh().lookupObjectRef<volScalarField>("U");
Instead of
volScalarField& U = const_cast<volScalarField&>
(
mesh().lookupObject<volScalarField>("U")
);
--
lookupObjectPtr()
- returns a const pointer, and nullptr on failure.
For example,
const volScalarField* Uptr = mesh().lookupObjectPtr<volScalarField>("U");
if (Uptr)
{
const volScalarField& U = *Uptr;
...
}
Instead of
if (mesh().foundObject<volScalarField>("U"))
{
const volScalarField& U = mesh().lookupObject<volScalarField>("U");
...
}
--
lookupObjectRefPtr()
- returns a non-const pointer, and nullptr on failure.
For example,
volScalarField* Uptr = mesh().lookupObjectRefPtr<volScalarField>("U");
if (Uptr)
{
volScalarField& U = *Uptr; // use as reference
(*Uptr) = ...; // or use directly
}
Instead of
if (mesh().foundObject<volScalarField>("U"))
{
volScalarField& U = const_cast<volScalarField&>
(
mesh().lookupObject<volScalarField>("U")
);
}
--
sortedNames()
- now works with template parameters and with regular expression
matching as well.
For example,
wordList names = mesh().sortedNames();
wordList fields = mesh().sortedName<volScalarField>();
Instead of
wordList names = mesh().sortedNames();
wordList fields = mesh().names<volScalarField>();
Foam::sort(fields);
--
See merge request !83
- Recursive searching for objects within a registry is now optional
(previous it was always done).
A recursive search effectively blocks the construction of sub-sub-registries
if their names are 'masked' by some parent level sub-registry with
the same name! (BUG)
- Recursive search is now turned OFF by default, which makes it consistent
with dictionary and probably causes the least number of surprises.
----
Various new convenience methods added:
lookupObjectRef()
- returns a non-const reference.
For example,
volScalarField& U = mesh().lookupObjectRef<volScalarField>("U");
Instead of
volScalarField& U = const_cast<volScalarField&>
(
mesh().lookupObject<volScalarField>("U")
);
--
lookupObjectPtr()
- returns a const pointer, and nullptr on failure.
For example,
const volScalarField* Uptr = mesh().lookupObjectPtr<volScalarField>("U");
if (Uptr)
{
const volScalarField& U = *Uptr;
...
}
Instead of
if (mesh().foundObject<volScalarField>("U"))
{
const volScalarField& U = mesh().lookupObject<volScalarField>("U");
...
}
--
lookupObjectRefPtr()
- returns a non-const pointer, and nullptr on failure.
For example,
volScalarField* Uptr = mesh().lookupObjectRefPtr<volScalarField>("U");
if (Uptr)
{
volScalarField& U = *Uptr; // use as reference
(*Uptr) = ...; // or use directly
}
Instead of
if (mesh().foundObject<volScalarField>("U"))
{
volScalarField& U = const_cast<volScalarField&>
(
mesh().lookupObject<volScalarField>("U")
);
}
--
sortedNames()
- now works with template parameters and with regular expression
matching as well.
For example,
wordList names = mesh().sortedNames();
wordList fields = mesh().sortedName<volScalarField>();
Instead of
wordList names = mesh().sortedNames();
wordList fields = mesh().names<volScalarField>();
Foam::sort(fields);
--
- The null constructor already creates a dimensionless Zero,
but named "undefined".
Provide an constructor for a dimensioned Zero,
but named "0" for universal clarity to its value.
- triFace() now initialized with '-1', which makes it behave
equivalently to face(label).
- supply default region=0 for some labelledTri constructors.
This allows labelledTri to work more like a triFace and makes it
easier to use in templated methods and eases conversion from
triFace to a labelledTri.
- labelledTri(const labelUList&) can now be used when converting
from a face. It can have 3 values (use default region)
or 4 values (with region).
- face, triFace, labelledTri now all support construction with
initializer lists. This can be useful for certain types of code.
Eg,
triFace f1{a, b, c};
face f2{a, b, c};
labelledTri f3{a, b, c};
Work without ambiguity.
Also useful for templated methods:
FaceType f{remap[a], remap[b], remap[c]};
- Cannot pass through to underlying list constructor directly.
- As this constructor was broken, there seem to be a number of
workarounds scattered in the code. Could revisit them in the future
as part of code-style:
edgeMesh(const Xfer<pointField>&, const Xfer<edgeList>&);
CompactIOField(const IOobject&, const Xfer<Field<T>>&);
GlobalIOField(const IOobject&, const Xfer<Field<Type>>&);
IOField(const IOobject&, const Xfer<Field<Type>>&);
ENH: Support more C++11 initializer lists (issue #261)
DynamicList
-----------
- construction, assignment and append
HashSet
-------
- construction, insert, set.
- assignment will use the implicit List constructor
hashedWordList
--------------
- construction, assignment
- additional sort() and uniq() methods.
- Readonly access to HashTable information via lookup() method.
- NB: could avoid 'const char**' constructors in the future
Some tests are included
See merge request !67
DynamicList
-----------
- construction, assignment and append
HashSet
-------
- construction, insert, set.
- assignment will use the implicit List constructor
hashedWordList
--------------
- construction, assignment
- additional sort() and uniq() methods.
- Readonly access to HashTable information via lookup() method.
- NB: could avoid 'const char**' constructors in the future
- Place common code under OSspecific.
By including "endian.H", either one of WM_BIG_ENDIAN or WM_LITTLE_ENDIAN
will be defined.
Provides inline 32-bit and 64-bit byte swap routines that can be
used/re-used elsewhere.
The inplace memory swaps currently used by the VTK output are left for
the moment pending further cleanup of that code.
Until C++ supports 'concepts' the only way to support construction from
two iterators is to provide a constructor of the form:
template<class InputIterator>
List(InputIterator first, InputIterator last);
which for some types conflicts with
//- Construct with given size and value for all elements
List(const label, const T&);
e.g. to construct a list of 5 scalars initialized to 0:
List<scalar> sl(5, 0);
causes a conflict because the initialization type is 'int' rather than
'scalar'. This conflict may be resolved by specifying the type of the
initialization value:
List<scalar> sl(5, scalar(0));
The new initializer list contructor provides a convenient and efficient alternative
to using 'IStringStream' to provide an initial list of values:
List<vector> list4(IStringStream("((0 1 2) (3 4 5) (6 7 8))")());
or
List<vector> list4
{
vector(0, 1, 2),
vector(3, 4, 5),
vector(6, 7, 8)
};
- there are some cases in which the C-style sprintf is much more
convenient, albeit problematic for buffer overwrites.
Provide a formatting version of Foam::name() for language
primitives that is buffer-safe.
Returns a Foam::word, so that further output will be unquoted, but
without any checking that the characters are indeed entirely valid
word characters.
Example use,
i = 1234;
s = Foam::name("%08d", i);
produces '00001234'
Alternative using string streams:
std::ostringstream buf;
buf.fill('0');
buf << setw(8) << i;
s = buf.str();
Note that the format specification can also be slightly more complex:
Foam::name("output%08d.vtk", i);
Foam::name("timing=%.2fs", time);
It remains the caller's responsibility to ensure that the format mask
is valid.
- Introduce dictionary::writeEntries for better code-reuse.
Before
======
os << nl << indent << "name";
dict.write(os);
After
=====
dict.write(os, "name");
replace system() call with vfork/exec combination (issue #185)
Tested systemCall function object, dynamicCode, but should be rechecked with IB+openmpi
@Prashant
See merge request !55
ENH: OSspecific - softlink handling (fixes#164)
Links are followed in most cases, with some notable exceptions:
- mv, mvBak:
renames the link, not the underlying file/directory
- rmDir:
remove the symlink to a directory, does not recurse into the
underlying directory
See merge request !51
- Translate a list of C++ strings into C-style (argc, argv) pair.
- Translate C-style (argc, argv) pair to list of C++ strings.
Useful when interfacing to external C-code and some libraries
- basic cpuInfo (model identification, MHz, etc)
- process memInfo
- profiling is activated via the case system/controlDict by
adding a "profiling" sub-dictionary.
Simply add the following (everything enabled):
profiling
{}
Which corresponds to the longer form:
profiling
{
active true; // default: true
cpuInfo true; // default: true
memInfo true; // default: true
sysInfo true; // default: true
}
This can be used to selectively disable any extra information
(eg, you don't want anyone else to know what hardware was used).
- most notably the '%' which is used as a separator in places
caused problems.
EHN: only use valid ensight file/variable names for writers
- fixed: foamToEnsightParts, ensightSurfaceWriter
- pending: foamToEnsight
BUG: no geometry written for foamToEnsightParts with moving mesh (fixes#142)
- an incorrect path was causing the issue
- only affects transfer of C-style string with a single character
remaining after whitespace stripping. Test added into Test-parallel.
- Note some idiosyncrasies in the behaviour:
send | receives
-------------------------+-------------------------
string("a b c") | string "a b c"
string("a") | string "a"
"a b c" | word "abc"
'd' | char 'd'
"d" | char 'd'
"d " | char 'd'
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.
Non-const access to the internal field now obtained from a specifically
named access function consistent with the new names for non-canst access
to the boundary field boundaryFieldRef() and dimensioned internal field
dimensionedInternalFieldRef().
See also commit 22f4ad32b1
both of which return the dimensionedInternalField for volFields only.
These will be useful in FV equation source term expressions which need
not evaluate boundary conditions.
inline Foam::vector Foam::septernion::transformPoint(const vector& v) const
{
return r().transform(v - t());
}
Now there is a 1:1 correspondence between septernion and
spatialTransform and a septernion constructor from spatialTransform
provided.
Additionally "septernion::transform" has been renamed
"septernion::transformPoint" to clarify that it transforms coordinate
points rather than displacements or other relative vectors.
'w' is now obtained from 'v' using the relation w = sqrt(1 - |sqr(v)|)
and 'v' is stored in the joint state field 'q' and integrated in the
usual manner but corrected using quaternion transformations.
Currently supported solvers: symplectic, Newmark, CrankNicolson
The symplectic solver should only be used if iteration over the forces
and body-motion is not required. Newmark and CrankNicolson both require
iteration to provide 2nd-order behavior.
See applications/test/rigidBodyDynamics/spring for an example of the
application of the Newmark solver.
This development is sponsored by Carnegie Wave Energy Ltd.
This is a more convenient way of maintaining the state or multiple
states (for higher-order integration), storing, retrieving and passing
between processors.
applications/test/rigidBodyDynamics/spring: Test of the linear spring with damper restraint
Damped simple harmonic motion of a weight on a spring is simulated and
the results compared with analytical solution
Test-spring
gnuplot spring.gnuplot
evince spring.eps
This development is sponsored by Carnegie Wave Energy Ltd.
//- 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>&);
Contributed by Mattijs Janssens.
1. Any non-blocking data exchange needs to know in advance the sizes to
receive so it can size the buffer. For "halo" exchanges this is not
a problem since the sizes are known in advance but or all other data
exchanges these sizes need to be exchanged in advance.
This was previously done by having all processors send the sizes of data to
send to the master and send it back such that all processors
- had the same information
- all could work out who was sending what to where and hence what needed to
be received.
This is now changed such that we only send the size to the
destination processor (instead of to all as previously). This means
that
- the list of sizes to send is now of size nProcs v.s. nProcs*nProcs before
- we cut out the route to the master and back by using a native MPI
call
It causes a small change to the API of exchange and PstreamBuffers -
they now return the sizes of the local buffers only (a labelList) and
not the sizes of the buffers on all processors (labelListList)
2. Reversing the order of the way in which the sending is done when
scattering information from the master processor to the other
processors. This is done in a tree like fashion. Each processor has a
set of processors to receive from/ send to. When receiving it will
first receive from the processors with the least amount of
sub-processors (i.e. the ones which return first). When sending it
needs to do the opposite: start sending to the processor with the
most amount of sub-tree since this is the critical path.
The particular rotation sequence is specified via the enumeration:
//- Euler-angle rotation sequence
enum rotationSequence
{
ZYX, ZYZ, ZXY, ZXZ, YXZ, YXY, YZX, YZY, XYZ, XYX, XZY, XZX
};
and provided as an argument to the constructor from Euler-angles
//- Construct a quaternion given the three Euler angles:
inline quaternion
(
const rotationSequence rs,
const vector& angles
);
and conversion to Euler-angles:
//- Return a vector of euler angles corresponding to the
// specified rotation sequence
inline vector eulerAngles(const rotationSequence rs) const;
DebugInfo:
Report an information message using Foam::Info if the local debug
switch is true
DebugInFunction:
Report an information message using Foam::Info for FUNCTION_NAME in
file __FILE__ at line __LINE__ if the local debug switch is true
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.
Now solvers return solver performance information for all components
with backward compatibility provided by the "max" function which created
the scalar solverPerformance from the maximum component residuals from
the SolverPerformance<Type>.
The residuals functionObject has been upgraded to support
SolverPerformance<Type> so that now the initial residuals for all
(valid) components are tabulated, e.g. for the cavity tutorial case the
residuals for p, Ux and Uy are listed vs time.
Currently the residualControl option of pimpleControl and simpleControl
is supported in backward compatibility mode (only the maximum component
residual is considered) but in the future this will be upgraded to
support convergence control for the components individually.
This development started from patches provided by Bruno Santos, See
http://www.openfoam.org/mantisbt/view.php?id=1824
The implementation now correspond to the definitions in the readily
available reference:
http://personalpages.manchester.ac.uk/staff/david.d.apsley/specturb.pdf
in which a large number of linear and non-linear models are presented in
a clean and consistent manner. This has made re-implementation and
checking far easier than working from the original references which anyway
are no longer available for the LienCubicKE and ShihQuadraticKE models.
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
Currently these vectors are generated at the same time as the wall-distance field
by the same run-time selected algorithm. This will be changed so that the wall-reflection
vectors are only generated and stored if required.
When using models which require the wallDist e.g. kOmegaSST it will
request the method to be used from the wallDist sub-dictionary in
fvSchemes e.g.
wallDist
{
method meshWave;
}
specifies the mesh-wave method as hard-coded in previous OpenFOAM versions.
Links are followed in most cases, with some notable exceptions:
- mv, mvBak:
renames the link, not the underlying file/directory
- rmDir:
remove the symlink to a directory, does not recurse into the
underlying directory
- syntax as per Bourne/Korn shell
${parameter:+altValue}
If parameter is unset or null, nothing is substituted.
Otherwise the \c altValue is substituted.
- syntax as per Bourne/Korn shell
${parameter:-defValue}
If parameter is unset or null, the \c defValue is substituted.
Otherwise, the value of parameter is substituted.
- eg,
"$USER $(PWD) $USER" -> "username $(PWD) $USER"
instead of
"$USER $(PWD) $USER" -> "username $(PWD) username"
this is noticable in some dynamicCode usages
STYLE: consolidate all string expand code into stringOps
STYLE: integrateLimits() -> integrate() for consistency with
DataEntry/polynomial. Rename old 'integrate', 'integrateMinus1'
methods to 'integral', 'integralMinus1' (ie, substantive instead of
verb for clarity).
Conflicts:
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/createShellMesh.C
applications/utilities/surface/surfaceCheck/surfaceCheck.C
src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C
src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
NOTE: also needed to strip trailing space/lines in various files
OLD timings:
~~~~~~~~~~~~~~~~~~
evaluate: -6.82572e+31 in 10.38 s
hard-coded 0: -6.82572e+31 in 0.2 s
hard-coded 1: -6.82572e+31 in 10.37 s
hard-coded 2: -6.82572e+31 in 0.24 s
New timings:
~~~~~~~~~~~~~~~~~~
evaluate: -6.82572e+31 in 0.11 s
- previously using an '|=' or '^=' would increase the list size to
match the RHS. Now it only increases to last bit set.
- limit bit-wise operations to addressable range for minor efficiency
improvement
- trim results from '&' and '^' operations for more consistent
behaviour
The compact ASCII format is a block of index/value tuples for the
non-zero entries:
{ (index1 value1) (index2 value2) (index3 value3) }
For PackedList<1>, and thus PackedBoolList, the compact ASCII format is
a block of indices for the non-zero entries:
{ index1 index2 index3 }
Thus either of the following could be used - for PackedList<2>:
- a list of all values:
16(0 3 0 2 0 0 3 1 0 0 0 0 0 0 0 1)
- a block of index/value tuples:
{(1 3) (3 2) (7 3) (8 1) (15 1)}
For PackedList<1> and PackedBoolList, either of the following could be
used:
- a list of all values, using any valid bool representation:
16(0 1 0 true 0 0 t 1 0 n n 0 0 0 0 yes)
- a block of the indices for non-zero entries:
{1 3 7 8 15}
ENH: adjust internal storage of PackedList to ensure that all unused
internal storage elements are guaranteed to always be bit-wise
zero. This makes the PackedBoolList implementation easier, and
also greatly eases much of the book-keeping.
Bits are now also zeroed on PackedList::clear()
Note: in PackedList, require packing at least 2 items otherwise it is
more efficient to use a normal list.
reduce(dist, sumOp< Distribution<scalar> >());
operations for parallel data. Combines distributions using the
coarsest binWidth.
Changed write function to write normalised and raw to the same file.
BUG: Distribution. Corrected inaccurate median calculation.
a Map.
Resizing by doubling and mapping data when a new entry is added that
is outside of the current bounds. Trimming the output (normalised or
raw) to only the entries that contain data.
Overriding List clear method to enable the Distribution to be reset,
but retaining the correct number of components.
- handles basic operations, references to other dictionary entries
(with '$name' syntax) and assorted mathematical functions:
pi(), degToRad, radToDeg, asin, acos, atan, sin, cos, tan, log,
log10, mag, atan2, pow
The basic syntax: #calc{ ... };
NOTE the trailing ';' is required for the primitiveEntry to be
properly defined.
- Rewrote globalPoints to use globalIndex class so now only transfers
single label instead of labelPair
- Added addressing in globalMeshData
- from coupled master points to slave points
- ,, edges ,, edges
- from coupled points (master or slave) to uncoupled boundary faces
- ,, ,, cells
- See test/globalMeshData for simple test
- Previously had just 'Warning' instead of '::Foam::Warning', which
meant that an identically named class method would inadvertently be
used - resulting in a compile failure.
- resize with factor 2 as per DynamicList
Old insertion speed:
1000000 in 0.61 s
2000000 in 2.24 s
3000000 in 3.97 s
4000000 in 5.76 s
5000000 in 7.54 s
6000000 in 9.41 s
7000000 in 11.5 s
New insertion speed:
1000000 in 0.01 s
2000000 in 0.02 s
3000000 in 0.01 s
4000000 in 0.02 s
5000000 in 0.01 s
6000000 in 0.01 s
7000000 in 0.01 s
- compatibility:
* 'polySpline' and 'simpleSpline' accepted
* detect and discard end tangent specifications
- a BSpline is also included (eg, for future support of NURBS), but is
not selectable from blockMesh since it really isn't as nice as the
Catmull-Rom (ie, doesn't *exactly* go through each point).
triangle, from:
http://en.wikipedia.org/wiki/Inertia_tensor_of_triangle
Adding the ability to calculate the inertia tensor of a polygon face
by summing the triangle inertias.
Added a test application to draw a test face with its principal
axes and moments of inertia.
triangle, from:
http://en.wikipedia.org/wiki/Inertia_tensor_of_triangle
Adding the ability to calculate the inertia tensor of a polygon face
by summing the triangle inertias.
Added a test application to draw a test face with its principal
axes and moments of inertia.
- now that I re-examined the code, the note in commit 51fd6327a6
can be mostly ignored
PackedList isMaster(nPoints, 1u);
is not really inefficient at all, since the '1u' is packed into
32/64-bits before the subsequent assignment and doesn't involve
shifts/masking for each index
The same misinformation applies to the PackedList(size, 0u) form.
It isn't much slower at all.
Nonetheless, add bool specialization so that it is a simple assign.
- forgot to use readList in removeEntry, which caused the test failure.
- remaining problem:
it doesn't work as might be expected
This is the problem:
dict
{
foo xxx;
bar yyy;
}
dict
{
baz zzz;
#remove foo
}
This only removes 'foo' from the current scope (the second dict), since
it occurs before the dictionary merge does.
To remove from the final, merged dictionary, we'd need a new
deleteEntry type that would do the right thing on the merge before
self-destructing (ie, removing itself too).
Changed the underlying map to be a Map<scalar> to allow the addition
of a value to the Distribution to be weighted (by timestep or by cell
size for example) component by-component - default weight is one.
Adding normalisation, write, mean snd median functions.
Test application DistributionTest draws numbers from the Random class
and creates distributions of them, writing to disk, for the main
types: scalar, vector, symmTensior, sphericalTensor and tensor.
Creating a labelVector distibution, but need to check what is
happening to the mean and median values and what happens when an odd
number is used as a binWidth, as truncation to label will be
occurring.
- iterators store pointers instead of references to the HashTbl.
This lets us use the default bitwise copy/assignment
- add empty constructor for iterators. It returns the equivalent to end().
This lets us do this:
HashTbl<label>::iterator iter;
// some time later
iter = find(Value);
- erase(const HashTbl<AnyType, Key, AnyHash>&) is now more generous.
Only the Key type matters, not the hashing function.
Conflicts:
src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C
src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H
src/mesh/blockMesh/curvedEdges/BSpline.C
src/mesh/blockMesh/curvedEdges/spline.C
src/mesh/blockMesh/curvedEdges/spline.H
- Also adjusted chemistrySolver/EulerImplicit/EulerImplicit.C
to use simpleMatrix with initialized values
- following Andy's idea to return values as label whenever possible
eg, 1.2e6 -> 1200000
but left it commented out
- avoid buffer overflow in ISstream::read(word&).
Is the 'if (fail())' check itself actually in the correct place??
- other minor cosmetic changes
- allow construct with Xfer container for the addressing
- Replaced non-const addressing() method in BiIndirectList with
resetAddressing() method as per IndirectList