Commit Graph

689 Commits

Author SHA1 Message Date
8349d89110 construct from dictionary 2009-11-13 16:09:39 +00:00
1d4533a41e >80 line length 2009-11-12 18:25:37 +00:00
13bddac8f0 singleCellFvMesh and application 2009-11-11 11:29:22 +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
c7c9a6e003 Activate the reworked HashTable
- previous draft version was HashTbl
- accidentally still had canonicalSize in templated code
2009-11-04 09:06:26 +01: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
151f30e779 made container constructors explicit 2009-11-03 18:09:52 +00: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
08b74f509f fixes to simpleMatrix ... really need to get a copy from work 2009-11-03 17:33:54 +01:00
d5ffabcd47 HashTbl - extra safety
- don't let automatic resize into integer overflow
- avoid possible overflow in increment()

StaticHashTable - fix erase()/++ as per HashTbl

- might still be worth dropping it, but at least it'll be in better
  condition when it gets chucked!
2009-11-03 17:17:45 +01:00
39159a9231 HashTbl: change allocation of end iterators
- the end iterators and canonicalSize are independent of the templated
  parameters, so move them to HashTblCore

- this avoid allocating separate end iterator at all.

  end(), cend() return a iteratorEnd.
  iterator == iteratorEnd just checks for non-NULL pointer on iterator.
  The compiler should optimize most of it away.
2009-11-03 01:01:59 +01:00
a237b7ce6e HashTbl - iterator/const_iterator implemented in terms of an iteratorBase 2009-11-01 00:54:56 +01:00
3a0c427c7b HashTbl - preparation for using interatorBase 2009-10-31 21:27:52 +01:00
a61c03a6a4 HashTbl: improve efficiency when deleting many keys and in operator==
- fix off by one error in erase/increment code
2009-10-31 00:03:02 +01: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
7e200aecbf optional no wait on Pstream::exchange 2009-10-27 13:09:08 +00:00
d34aee63ed Merge branch 'olesenm' 2009-10-27 11:50:12 +00:00
ec03076d00 Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev 2009-10-27 09:53:25 +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
278e8c5030 Converted constant reference to primitive arguments to constant primitive arguments. 2009-10-26 22:45:21 +00:00
86c3affb5b Added initialising constructor and use it is the BSpline code. 2009-10-26 21:54:53 +00:00
75bfb292e7 Added a switch to control the caching system. 2009-10-26 19:41:32 +00:00
c9a2f4923e templated uniformInterpolationTable 2009-10-26 19:15:32 +00:00
cbe5974c26 adding tabulated U wall function BC and utility to generate tables 2009-10-26 18:54:10 +00:00
2352682afb use Pstream::exchange 2009-10-26 17:36:33 +00:00
b7cf30bdb4 simpleMatrix initialize with coefficients with 0.0
- the element of least surprise
2009-10-26 15:40:55 +01:00
e684a87516 Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev 2009-10-26 14:01:45 +00:00
00cd6ac8b7 Added support for the caching of gradients.
This is controlled by providing a list of the fields to be cached in the "cache"
sub-dictionary of fvSolution.

Debug information about the caching is printed when the solution::debug switch
is on.

There are still a couple of issues to do with the naming of gradients used in
corrected snGrads and limited interpolation schemes that need to be resolved
but these are no different to previously and hence not urgent.
2009-10-26 14:01:39 +00:00
514914207a BSpline bugfix: initialize simpleMatrix with 0.0
- why doesn't simpleMatrix always do this?
2009-10-26 13:50:10 +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
adcb7646f0 unitConversion - don't pull in the entire constant::mathematical namespace
- also, minor doxygen fixup
2009-10-23 08:31:59 +02:00
9120e00a59 Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev 2009-10-22 11:59:45 +01:00
fe45863a11 new mapDistribute constructor; various fixes 2009-10-22 11:59:25 +01:00
d6a278f2b2 Introduced the new file unitConversion.H to hold degToRad, radToDeg
and other unit conversion functions as they are required e.g. slug <-> kg.
2009-10-21 10:55:00 +01: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
327168307d Devirtualised functions which should not be overridden and so than some functions can be inlined for efficiency. 2009-10-20 18:30:10 +01:00
ebe1bda491 cosmetics 2009-10-19 14:56:02 +01:00
ef350447b1 Merge commit 'OpenCFD/master' into olesenm 2009-10-19 14:21:12 +02:00
ffc9d0d97b find/replace pi/180.0 -> degToRad() and 180.0/pi -> radToDeg()
- note left utilities/mesh/advanced/collapseEdges/collapseEdges.C as-is.
  It looks suspicious, but the change was recent, so maybe it means something
2009-10-19 13:53:25 +02:00
61a577c860 minor cleanup on constants/
- removed/renamed one level of directories, not all constants are dimensioned
    global/dimensionedConstants -> global/constants/
    global/dimensionedConstants/constants/* -> global/constants/

- formatting and doxygen cleanup

- added degToRad() and radToDeg() inline functions (in mathematicalConstants)
  removed equivalent degToRad() from engineTime
2009-10-19 13:00:33 +02:00
a8f7488e0f Merge branch 'olesenm' 2009-10-13 12:39:35 +01:00