Commit Graph

230 Commits

Author SHA1 Message Date
bf2865a087 Add missing low-level peek() to ISstream. 2009-12-11 17:31:15 +01:00
497ec32ed8 Add missing low-level peek() to ISstream. 2009-12-11 17:31:15 +01:00
d058c7ceb8 Added Polynomial class test 2009-12-10 12:50:20 +00:00
d2d39c32be HashSet and PackedList get an unset() method
- provides a convenient (and lazy) means of removing entries
2009-12-08 10:01:48 +01:00
16c715ceec Applied Mattijs' PackedList improvements
- 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
2009-12-08 09:42:38 +01:00
45f17a9e6c Merge commit 'OpenCFD/master' into olesenm 2009-12-07 10:41:19 +01:00
73f9f7f780 Remove legacy splines code and use CatmullRomSpline as 'spline'
- 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).
2009-12-07 06:54:06 +01:00
f23e3eb3ea Changing linked library from finiteVolume to meshTools. 2009-12-04 17:11:30 +00:00
6b7dd8160d Adding a function to calculate the moment of inertia of a triangle to
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.
2009-12-04 16:33:46 +00:00
1b0cf102cc testing on fileName Istream construction 2009-12-04 16:22:59 +01:00
066b3158e7 quickly implemented BSpline2 as an alternative B-Spline implementation
- also looks reasonable and doesn't deviate much from Catmull-Rom
2009-12-04 15:34:42 +01:00
79b53a9c6c rename BSplineTest to splineTest and add Catmull-Rom to it
- the current B-Splines deliver rubbish
2009-12-04 12:54:15 +01:00
063d8edea1 PackedBoolList specializaton for operator=
- 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.
2009-12-03 16:33:58 +01:00
67b79d9206 commit existing sizeof test 2009-12-03 14:40:12 +01:00
c091d856ae pedantic changes: 'forAll (' -> 'forAll(' in applications/
- to match coding guidelines
2009-12-03 14:12:08 +01:00
58b7e64185 Use argList::addOption, argList::addBoolOption (almost) everywhere
- ensure that the standard options (eg, from timeSelector) also have
  some usage information
2009-12-03 13:32:12 +01:00
c3457b5152 argList - specializations for optionRead<string> etc.
- new optionLookupOrDefault and additional form of optionReadIfPresent
  with a default value
2009-12-02 13:45:11 +01:00
a4f4a904f4 HashSet enhancement
- allow insert() and set() from a UList of Key
  This complements the existing erase(const UList<Key>&) method
2009-12-01 18:26:18 +01:00
28345f7e97 fixup #remove functionEntry and revert e15e32fdb7d515b
- 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).
2009-12-01 13:50:51 +01:00
80a27fb9da Removed the "#remove" statements which do not appear to work. 2009-12-01 12:04:28 +00:00
909e6b27e4 Apply coding style recommendations:
- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
2009-11-30 08:55:03 +01:00
fa93ce8cd7 coding style adherence
- markup codingStyleGuide.org examples so they actually indent correctly

- use 'Info<<' as per codingStyleGuide instead of 'Info <<'
2009-11-27 15:39:14 +01:00
35c9d7bbd5 Corrected test applications. 2009-11-20 12:40:19 +00:00
b7845edeba updated to new thermo 2009-11-13 16:09:27 +00:00
cad5a703fc Merge branch 'olesenm' 2009-11-06 11:05:21 +00:00
2268ea38a0 Added Container template argument for e.g. construct from faceList 2009-11-04 11:40:12 +00:00
ebe39c4ea4 Merge commit 'OpenCFD/master' into olesenm 2009-11-04 08:56:20 +01:00
53a9208d9f Merge commit 'bundle/home' into olesenm
Conflicts:
	src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.C
	src/OpenFOAM/matrices/simpleMatrix/simpleMatrix.H
	tutorials/incompressible/simpleFoam/airFoil2D/Allclean
	tutorials/multiphase/settlingFoam/ras/tank3D/Allclean
2009-11-04 08:54:34 +01:00
baea3d76a8 CompactListList to use offsets sized one beyond nRows 2009-11-03 18:04:24 +00:00
fe17dd2d1f globalIndex to use procI+1 scheme 2009-11-03 18:02:52 +00:00
946aac500a HashTbl changes
- 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.
2009-10-30 22:37:35 +01:00
1fbcb6e2c0 Added HashTbl::shrink() - but it only be useful in particular situations
- for the hashTableTest3, it seemed to slow things down a bit

loop 0 - Erased 100000 elements (size 2900000 capacity 4194304) 0.31 s
loop 1 - Erased 100000 elements (size 2800000 capacity 4194304) 0.01 s
loop 2 - Erased 100000 elements (size 2700000 capacity 4194304) 0 s
loop 3 - Erased 100000 elements (size 2600000 capacity 4194304) 0 s
loop 4 - Erased 100000 elements (size 2500000 capacity 4194304) 0.01 s
loop 5 - Erased 100000 elements (size 2400000 capacity 4194304) 0 s
loop 6 - Erased 100000 elements (size 2300000 capacity 4194304) 0 s
loop 7 - Erased 100000 elements (size 2200000 capacity 4194304) 0 s
loop 8 - Erased 100000 elements (size 2100000 capacity 4194304) 0.01 s
loop 9 - Erased 100000 elements (size 2000000 capacity 4194304) 0.44 s
loop 10 - Erased 100000 elements (size 1900000 capacity 4194304) 0.44 s
loop 11 - Erased 100000 elements (size 1800000 capacity 4194304) 0.39 s
loop 12 - Erased 100000 elements (size 1700000 capacity 4194304) 0.4 s
loop 13 - Erased 100000 elements (size 1600000 capacity 2097152) 0.15 s
loop 14 - Erased 100000 elements (size 1500000 capacity 2097152) 0.01 s
loop 15 - Erased 100000 elements (size 1400000 capacity 2097152) 0 s
loop 16 - Erased 100000 elements (size 1300000 capacity 2097152) 0 s
loop 17 - Erased 100000 elements (size 1200000 capacity 2097152) 0.01 s
loop 18 - Erased 100000 elements (size 1100000 capacity 2097152) 0 s
loop 19 - Erased 100000 elements (size 1000000 capacity 2097152) 0.27 s
loop 20 - Erased 100000 elements (size 900000 capacity 2097152) 0.2 s
loop 21 - Erased 100000 elements (size 800000 capacity 1048576) 0.1 s
loop 22 - Erased 100000 elements (size 700000 capacity 1048576) 0 s
loop 23 - Erased 100000 elements (size 600000 capacity 1048576) 0 s
loop 24 - Erased 100000 elements (size 500000 capacity 1048576) 0.12 s
loop 25 - Erased 100000 elements (size 400000 capacity 524288) 0.04 s
loop 26 - Erased 100000 elements (size 300000 capacity 524288) 0.01 s
loop 27 - Erased 100000 elements (size 200000 capacity 262144) 0.02 s
loop 28 - Erased 100000 elements (size 100000 capacity 131072) 0.02 s
loop 29 - Erased 100000 elements (size 0 capacity 2) 0 s
2009-10-30 19:28:39 +01:00
2c73afb6ec HashTbl avoid backward search in erase()
- The ideas as discussed in email

- The speedup is really there.

Before
loop 0 - Erased 100000 elements:   3.82 s
loop 1 - Erased 100000 elements:   11.45 s
loop 2 - Erased 100000 elements:   19.46 s
loop 3 - Erased 100000 elements:   27.73 s
loop 4 - Erased 100000 elements:   38.74 s
^C

After
loop 0 - Erased 100000 elements (size 2900000 capacity 8388608) 0.01 s
loop 1 - Erased 100000 elements (size 2800000 capacity 8388608) 0 s
loop 2 - Erased 100000 elements (size 2700000 capacity 8388608) 0.01 s
loop 3 - Erased 100000 elements (size 2600000 capacity 8388608) 0 s
loop 4 - Erased 100000 elements (size 2500000 capacity 8388608) 0 s
loop 5 - Erased 100000 elements (size 2400000 capacity 8388608) 0 s
loop 6 - Erased 100000 elements (size 2300000 capacity 8388608) 0 s
loop 7 - Erased 100000 elements (size 2200000 capacity 8388608) 0 s
...
2009-10-30 18:54:51 +01:00
55a89e9db3 added HashTbl as development replacement for HashTable
- rename to HashTable later when it is considered stable
2009-10-30 18:31:28 +01:00
02e73e2530 Merge branch 'master' of /home/hunt2/mattijs/OpenFOAM/OpenFOAM-dev/. 2009-10-27 16:44:41 +00:00
c100ffc957 Merge commit 'OpenCFD/master' into olesenm
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
2009-10-27 08:29:33 +01:00
2b7dee2c8b add applications/test/BSpline - it fails! 2009-10-26 13:14:40 +01:00
9a139812ed Merge branch 'master' of /home/hunt2/mattijs/OpenFOAM/OpenFOAM-dev/. 2009-10-26 09:59:18 +00:00
46f1df810c unallocated Pstream 2009-10-26 09:59:07 +00:00
427bbd8174 Changed the interface for the upToDate check to avoid unnecessary object lookups
by providing the independent objects directly.
2009-10-20 22:17:37 +01:00
dfd82248e2 First level of support for cached temporary fields. 2009-10-20 18:30:55 +01:00
a8f7488e0f Merge branch 'olesenm' 2009-10-13 12:39:35 +01:00
e9da288118 Reverted the Americanism "math" back to the original "mathematical" and reverted name of
the include file back to mathematicalConstants.H to make upgrading code slightly easier.
2009-10-10 22:58:58 +01:00
f7d9174738 Merge commit 'OpenCFD/master' into olesenm 2009-10-08 16:50:34 +02:00
88e0887a47 fix indentation 2009-10-08 15:09:47 +01:00
c45ea2c4f1 reworked stringListOps to improve the flexibility
- added subsetStrings and inplaceSubsetString

- added class wordReListMatcher to wrap a match() for a UList<wordRe>
2009-10-08 11:32:26 +02:00
2e558acf65 TypeName instead of ClassName 2009-09-22 15:24:59 +01:00
791b5aaeaa replacing isType with isA to enable directMappedWall to work 2009-09-15 17:51:59 +01:00
8dcea0f8cd using new constant definitions 2009-08-28 18:04:22 +01:00
5c90c347f9 mapDistribute non-blocking of non-contiguous data 2009-08-13 17:28:33 +01:00