Commit Graph

208 Commits

Author SHA1 Message Date
mattijs
f1ab396a66 STYLE: remove all references to wallPoint::greatPoint.
Replaced with point::max wherever possible. Is VGREAT, not GREAT so be
careful with calculations.
2010-03-17 11:48:44 +00:00
Mark Olesen
78e41f78bd STYLE: avoid spaces around fileName::operator/ except when split across lines 2010-02-18 10:51:56 +01:00
Mark Olesen
689d4b2860 ENH: provide operator[] for accessing argList options.
- operator[] with label -> get args at index
- operator[] with word  -> get named option
2010-02-17 11:43:42 +01:00
Mark Olesen
d857d671ac STYLE: use new argList argRead() method and operator[] for cleaner code.
- deprecate argList::additionalArgs() method and remove uses of it
2010-02-16 17:57:49 +01:00
andy
7b3da686d8 Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev 2010-02-08 19:13:37 +00:00
mattijs
4e3efc9d0c STYLE: explain only collocated points addressed 2010-02-08 17:35:39 +00:00
Mark Olesen
00616b72ff ENH: Add functionEntry '#calc' to dictionary
- 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.
2010-02-07 13:58:10 +01:00
Mark Olesen
7dd1ad1e23 Adjust Make options for calcEntry. 2010-01-15 19:25:12 +01:00
Mark Olesen
6a8db69cf7 Merge remote branch 'bundle/olesenm' into home 2010-01-15 18:51:21 +01:00
Mark Olesen
cf3e2a8abf Update calcEntry grammar to include copyright.
Include character class (wchar_t or char) as a template parameter in
CocoParserErrors.
2010-01-06 12:27:14 +01:00
mattijs
aac29d740a Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev 2010-01-04 13:37:37 +00:00
mattijs
c6d4035ced Added master-slave addressing for coupled points.
- 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
2010-01-04 13:25:30 +00:00
Mark Olesen
e0ba4cbb02 Adjust line number before/after #calc{} scanner for improved error messages. 2010-01-03 21:45:32 +01:00
Mark Olesen
ebfdafad7f Add preliminary wmake rule for using CoCo/R. 2010-01-03 00:39:28 +01:00
Mark Olesen
d1a2be7872 Reorganize runTimeSelection to include new macros from calcEntry.
Added globalFunctionSelectionTables, staticMemberFunctionSelectionTables
2010-01-02 16:09:08 +01:00
Mark Olesen
cf91174880 Use global lookup tables for the calcEntry scalar functions.
Handle leading signs on functions etc.
2010-01-02 15:09:17 +01:00
Mark Olesen
f8147f5bb5 Add basic scalar functions to calcEntry. 2010-01-02 13:01:37 +01:00
Mark Olesen
c0d37d9a6b Merge commit 'OpenCFD/master' into olesenm 2009-12-21 15:06:31 +01:00
Mark Olesen
8bf3807c3e Update dictionary calcEntry testing for updated CoCo/R 2009-12-21 15:02:33 +01:00
Mark Olesen
ccdbf4735f Move CocoParserErrors.H template class into src/OpenFOAM/db/error 2009-12-21 14:14:30 +01:00
graham
d241c43ac7 Adding hard-coded tetraherdal solid inertia calculation. Can be used
in a similar way to calculate the inertia of cells.
2009-12-21 10:29:05 +00:00
Mark Olesen
438a83fc81 Update experimental dictionary #calc for new Coco pragmas 2009-12-21 09:28:17 +01:00
mattijs
3bfec62cee Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev 2009-12-17 15:55:21 +00:00
Mark Olesen
e434b51914 Add namespace qualifier to WarningIn, FatalErrorIn, etc. macros.
- 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.
2009-12-16 08:55:04 +01:00
Mark Olesen
a5217d7be3 Merge commit 'bundle/home' into olesenm 2009-12-16 08:08:23 +01:00
Mark Olesen
ad2204a818 Add in calcEntry as a very rough draft
- needs Coco/R 16 Dec 2009 version
2009-12-16 01:31:44 +01:00
mattijs
e325814c80 Test application for syncTools functionality 2009-12-15 16:00:47 +00:00
Mark Olesen
2760c3db5f Merge commit 'OpenCFD/master' into olesenm 2009-12-15 10:48:51 +01:00
Mark Olesen
bf2865a087 Add missing low-level peek() to ISstream. 2009-12-11 17:31:15 +01:00
Mark Olesen
497ec32ed8 Add missing low-level peek() to ISstream. 2009-12-11 17:31:15 +01:00
andy
d058c7ceb8 Added Polynomial class test 2009-12-10 12:50:20 +00:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
45f17a9e6c Merge commit 'OpenCFD/master' into olesenm 2009-12-07 10:41:19 +01:00
Mark Olesen
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
graham
f23e3eb3ea Changing linked library from finiteVolume to meshTools. 2009-12-04 17:11:30 +00:00
graham
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
Mark Olesen
1b0cf102cc testing on fileName Istream construction 2009-12-04 16:22:59 +01:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mark Olesen
67b79d9206 commit existing sizeof test 2009-12-03 14:40:12 +01:00
Mark Olesen
c091d856ae pedantic changes: 'forAll (' -> 'forAll(' in applications/
- to match coding guidelines
2009-12-03 14:12:08 +01:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
henry
80a27fb9da Removed the "#remove" statements which do not appear to work. 2009-12-01 12:04:28 +00:00
Mark Olesen
909e6b27e4 Apply coding style recommendations:
- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
2009-11-30 08:55:03 +01:00
Mark Olesen
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