]> Pileus Git - ~andy/sunrise/blob - sci-libs/openfoam-kernel/files/openfoam-kernel-1.4.1_p20080131.patch
sci-libs/openfoam-kernel: Update patches for the OpenFOAM Kernel.
[~andy/sunrise] / sci-libs / openfoam-kernel / files / openfoam-kernel-1.4.1_p20080131.patch
1 Index: LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C
2 ===================================================================
3 --- src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C        (Revision 30)
4 +++ src/LESmodels/compressible/SpalartAllmaras/SpalartAllmaras.C        (Revision 439)
5 @@ -44,29 +44,38 @@
6  
7  
8  // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
9  
10  tmp<volScalarField> SpalartAllmaras::fv1() const
11  {
12      volScalarField chi3 = pow(nuTilda_/(mu()/rho()), 3);
13 -
14      return chi3/(chi3 + pow(Cv1_, 3));
15  }
16  
17  
18  tmp<volScalarField> SpalartAllmaras::fv2() const
19  {
20      volScalarField chi = nuTilda_/(mu()/rho());
21      return scalar(1) - chi/(scalar(1) + chi*fv1());
22  }
23  
24  
25  tmp<volScalarField> SpalartAllmaras::fw(const volScalarField& Stilda) const
26  {
27 -    volScalarField r = nuTilda_/(Stilda*sqr(kappa_*dTilda_));
28 +    volScalarField r = min
29 +    (
30 +        nuTilda_
31 +       /(
32 +           max(Stilda, dimensionedScalar("SMALL", Stilda.dimensions(), SMALL))
33 +          *sqr(kappa_*dTilda_)
34 +        ),
35 +        scalar(10.0)
36 +    );
37 +    r.boundaryField() == 0.0;
38 +
39      volScalarField g = r + Cw2_*(pow(r, 6) - r);
40  
41      return g*pow((1.0 + pow(Cw3_, 6))/(pow(g, 6) + pow(Cw3_, 6)), 1.0/6.0);
42  }
43  
44  
45  // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
46
47 Index: dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C
48 ===================================================================
49 --- src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C       (Revision 30)
50 +++ src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C       (Revision 439)
51 @@ -343,16 +343,16 @@
52              }
53          }
54      }
55  
56  
57      hexRefiner.setRefinement(consistentCells, meshMod);
58  
59 -    // Use inflation
60 -    autoPtr<mapPolyMesh> morphMapPtr = meshMod.changeMesh(mesh, true, true);
61 +    // Change mesh, no inflation
62 +    autoPtr<mapPolyMesh> morphMapPtr = meshMod.changeMesh(mesh, false, true);
63      const mapPolyMesh& morphMap = morphMapPtr();
64  
65      if (morphMap.hasMotionPoints())
66      {
67          mesh.movePoints(morphMap.preMotionPoints());
68      }
69  
70 @@ -365,47 +365,31 @@
71      {
72          Pout<< "multiDirRefinement : updated mesh at time "
73              << mesh.time().timeName() << endl;
74      }
75  
76      hexRefiner.updateMesh(morphMap);
77  
78 -    // Take over split pattern from hex refiner. (should be empty at this
79 -    // point)
80 -
81 -    // From old cell label to index
82 -    Map<label> consistentSet(2*consistentCells.size());
83 -
84 -    forAll(consistentCells, i)
85 -    {
86 -        consistentSet.insert(consistentCells[i], i);
87 -    }
88 -
89      // Collect all cells originating from same old cell (original + 7 extra)
90  
91 -    addedCells_.setSize(consistentCells.size());
92 -    forAll(addedCells_, i)
93 +    forAll(consistentCells, i)
94      {
95 -        addedCells_[i].setSize(8);
96 +        addedCells_[consistentCells[i]].setSize(8);
97      }
98 -    labelList nAddedCells(consistentCells.size(), 0);
99 +    labelList nAddedCells(addedCells_.size(), 0);
100  
101      const labelList& cellMap = morphMap.cellMap();
102  
103      forAll(cellMap, cellI)
104      {
105          label oldCellI = cellMap[cellI];
106  
107 -        Map<label>::const_iterator iter = consistentSet.find(oldCellI);
108 -
109 -        if (iter != consistentSet.end())
110 +        if (addedCells_[oldCellI].size() > 0)
111          {
112 -            label index = iter();
113 -
114 -            addedCells_[nAddedCells[index]++] = cellI;
115 +            addedCells_[oldCellI][nAddedCells[oldCellI]++] = cellI;
116          }
117      }
118  }
119  
120  
121  void Foam::multiDirRefinement::refineAllDirs
122  (
123
124 Index: OpenFOAM/db/error/error.H
125 ===================================================================
126 --- src/OpenFOAM/db/error/error.H       (Revision 30)
127 +++ src/OpenFOAM/db/error/error.H       (Revision 439)
128 @@ -80,14 +80,17 @@
129  
130          //- Construct from title string
131          error(const string& title);
132  
133          //- Construct from dictionary
134          error(const dictionary& errDict);
135  
136 +        //- Construct as copy
137 +        error(const error& err);
138 +
139  
140      // Destructor
141  
142          ~error();
143  
144  
145      // Member functions
146 Index: OpenFOAM/db/error/error.C
147 ===================================================================
148 --- src/OpenFOAM/db/error/error.C       (Revision 30)
149 +++ src/OpenFOAM/db/error/error.C       (Revision 439)
150 @@ -76,14 +76,28 @@
151                 "cannot open error stream"
152              << endl;
153          ::exit(1);
154      }
155  }
156  
157  
158 +error::error(const error& err)
159 +:
160 +    messageStream(err),
161 +    functionName_(err.functionName_),
162 +    sourceFileName_(err.sourceFileName_),
163 +    sourceFileLineNumber_(err.sourceFileLineNumber_),
164 +    abort_(err.abort_),
165 +    throwExceptions_(err.throwExceptions_),
166 +    messageStreamPtr_(new OStringStream(*err.messageStreamPtr_))
167 +{
168 +    //*messageStreamPtr_ << err.message();
169 +}
170 +
171 +
172  error::~error()
173  {
174      delete messageStreamPtr_;
175  }
176  
177  
178  OSstream& error::operator()
179 @@ -251,14 +265,15 @@
180      return os;
181  }
182  
183  
184  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185  // Global error definitions
186  
187 -error FatalError ("--> FOAM FATAL ERROR : ");
188 +error FatalError("--> FOAM FATAL ERROR : ");
189  
190  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191  
192  } // End namespace Foam
193  
194  // ************************************************************************* //
195 +
196 Index: OpenFOAM/db/dictionary/dictionary.C
197 ===================================================================
198 --- src/OpenFOAM/db/dictionary/dictionary.C     (Revision 30)
199 +++ src/OpenFOAM/db/dictionary/dictionary.C     (Revision 439)
200 @@ -119,14 +119,20 @@
201      }
202      else
203      {
204          return -1;
205      }
206  }
207  
208 +// Clear the Dictionary
209 +void Foam::dictionary::clear()
210 +{
211 +    IDLList<entry>::clear();
212 +    hashedEntries_.clear();
213 +}
214  
215  // Find and return entry
216  bool Foam::dictionary::found(const word& keyword) const
217  {
218      return hashedEntries_.found(keyword);
219  }
220  
221 Index: OpenFOAM/db/dictionary/dictionary.H
222 ===================================================================
223 --- src/OpenFOAM/db/dictionary/dictionary.H     (Revision 30)
224 +++ src/OpenFOAM/db/dictionary/dictionary.H     (Revision 439)
225 @@ -126,14 +126,16 @@
226  
227          //- Return line number of first token in dictionary
228          label startLineNumber() const;
229  
230          //- Return line number of last token in dictionary
231          label endLineNumber() const;
232  
233 +        //- Clear the dictionary
234 +        void clear();
235  
236          // Search and lookup
237  
238              //- Search dictionary for given keyword
239              bool found(const word& keyword) const;
240  
241              //- Find and return an entry data stream
242 Index: OpenFOAM/db/IOstreams/StringStreams/OStringStream.H
243 ===================================================================
244 --- src/OpenFOAM/db/IOstreams/StringStreams/OStringStream.H     (Revision 30)
245 +++ src/OpenFOAM/db/IOstreams/StringStreams/OStringStream.H     (Revision 439)
246 @@ -63,21 +63,41 @@
247          (
248              streamFormat format=ASCII,
249              versionNumber version=currentVersion
250          )
251          :
252              OSstream
253              (
254 -                *(new std::ostringstream()),
255 +               *(new std::ostringstream()),
256                  "OStringStream.sinkFile",
257                  format,
258                  version
259              )
260          {}
261  
262 +        //- Construct as copy
263 +        OStringStream(const OStringStream& oss)
264 +        :
265 +            OSstream
266 +            (
267 +               *(
268 +                    new std::ostringstream
269 +                    (
270 +                        dynamic_cast<const std::ostringstream&>
271 +                        (
272 +                            oss.stream()
273 +                        ).str()
274 +                    )
275 +                ),
276 +                oss.name(),
277 +                oss.format(),
278 +                oss.version()
279 +            )
280 +        {}
281 +
282  
283      // Destructor
284  
285          ~OStringStream()
286          {
287              delete &dynamic_cast<std::ostringstream&>(stream());
288          }
289 Index: OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H
290 ===================================================================
291 --- src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H     (Revision 30)
292 +++ src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldFunctions.H     (Revision 439)
293 @@ -214,32 +214,28 @@
294  #undef BINARY_TYPE_OPERATOR_FT
295  
296  
297  #define PRODUCT_OPERATOR(product, op, opFunc)                                 \
298                                                                                \
299  template                                                                      \
300  <                                                                             \
301 -    template<class> class PatchField,                                         \
302 -    class pointPatch,                                                         \
303      class Type1,                                                              \
304      class Type2                                                               \
305  >                                                                             \
306  inline void opFunc                                                            \
307  (                                                                             \
308      pointPatchField                                                           \
309      <typename product<Type1, Type2>::type>& f,                                \
310      const pointPatchField<Type1>& f1,                                         \
311      const pointPatchField<Type2>& f2                                          \
312  )                                                                             \
313  {}                                                                            \
314                                                                                \
315  template                                                                      \
316  <                                                                             \
317 -    template<class> class PatchField,                                         \
318 -    class pointPatch,                                                         \
319      class Type,                                                               \
320      class Form,                                                               \
321      class Cmpt,                                                               \
322      int nCmpt                                                                 \
323  >                                                                             \
324  inline void opFunc                                                            \
325  (                                                                             \
326 @@ -248,16 +244,14 @@
327      const pointPatchField<Type>& f1,                                          \
328      const VectorSpace<Form,Cmpt,nCmpt>& vs                                    \
329  )                                                                             \
330  {}                                                                            \
331                                                                                \
332  template                                                                      \
333  <                                                                             \
334 -    template<class> class PatchField,                                         \
335 -    class pointPatch,                                                         \
336      class Form,                                                               \
337      class Cmpt,                                                               \
338      int nCmpt,                                                                \
339      class Type                                                                \
340  >                                                                             \
341  inline void opFunc                                                            \
342  (                                                                             \
343 @@ -272,112 +266,99 @@
344  PRODUCT_OPERATOR(crossProduct, ^, cross)
345  PRODUCT_OPERATOR(innerProduct, &, dot)
346  PRODUCT_OPERATOR(scalarProduct, &&, dotdot)
347  
348  #undef PRODUCT_OPERATOR
349  
350  
351 -template<template<class> class PatchField, class pointPatch>
352 -void hdual
353 +inline void hdual
354  (
355      pointPatchField<vector>&,
356      const pointPatchField<tensor>&
357  )
358  {}
359  
360 -template<template<class> class PatchField, class pointPatch>
361 -void hdual
362 +inline void hdual
363  (
364      pointPatchField<tensor>&,
365      const pointPatchField<vector>&
366  )
367  {}
368  
369 -template<template<class> class PatchField, class pointPatch>
370 -void diag
371 +inline void diag
372  (
373      pointPatchField<vector>&,
374      const pointPatchField<tensor>&
375  )
376  {}
377  
378 -template<template<class> class PatchField, class pointPatch>
379 -void tr
380 +inline void tr
381  (
382      pointPatchField<scalar>&,
383      const pointPatchField<tensor>&
384  )
385  {}
386  
387 -template<template<class> class PatchField, class pointPatch>
388 -void dev
389 +inline void dev
390  (
391      pointPatchField<tensor>&,
392      const pointPatchField<tensor>&
393  )
394  {}
395  
396 -template<template<class> class PatchField, class pointPatch>
397 -void dev2
398 +inline void dev2
399  (
400      pointPatchField<tensor>&,
401      const pointPatchField<tensor>&
402  )
403  {}
404  
405 -template<template<class> class PatchField, class pointPatch>
406 -void det
407 +inline void det
408  (
409      pointPatchField<scalar>&,
410      const pointPatchField<tensor>&
411  )
412  {}
413  
414 -template<template<class> class PatchField, class pointPatch>
415 -void inv
416 +inline void inv
417  (
418      pointPatchField<tensor>&,
419      const pointPatchField<tensor>&
420  )
421  {}
422  
423 -template<template<class> class PatchField, class pointPatch>
424 -void symm
425 +inline void symm
426  (
427      pointPatchField<tensor>&,
428      const pointPatchField<tensor>&
429  )
430  {}
431  
432 -template<template<class> class PatchField, class pointPatch>
433 -void twoSymm
434 +inline void twoSymm
435  (
436      pointPatchField<tensor>&,
437      const pointPatchField<tensor>&
438  )
439  {}
440  
441 -template<template<class> class PatchField, class pointPatch>
442 -void skew
443 +inline void skew
444  (
445      pointPatchField<tensor>&,
446      const pointPatchField<tensor>&
447  )
448  {}
449  
450 -template<template<class> class PatchField, class pointPatch>
451 -void eigenValues
452 +inline void eigenValues
453  (
454      pointPatchField<vector>&,
455      const pointPatchField<tensor>&
456  )
457  {}
458  
459 -template<template<class> class PatchField, class pointPatch>
460 -void eigenVectors
461 +inline void eigenVectors
462  (
463      pointPatchField<tensor>&,
464      const pointPatchField<tensor>&
465  )
466  {}
467  
468  
469 Index: OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C
470 ===================================================================
471 --- src/OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C        (Revision 30)
472 +++ src/OpenFOAM/fields/Fields/symmTensorField/symmTensorField.C        (Revision 439)
473 @@ -131,16 +131,15 @@
474  
475  template<>
476  tmp<Field<symmTensor> > transformFieldMask<symmTensor>
477  (
478      const tmp<tensorField>& ttf
479  )
480  {
481 -    tmp<Field<symmTensor> > ret =
482 -        transformFieldMask<symmTensor>(ttf());
483 +    tmp<Field<symmTensor> > ret = transformFieldMask<symmTensor>(ttf());
484      ttf.clear();
485      return ret;
486  }
487  
488  
489  template<>
490  tmp<Field<symmTensor> > transformFieldMask<symmTensor>
491 @@ -153,18 +152,15 @@
492  
493  template<>
494  tmp<Field<symmTensor> > transformFieldMask<symmTensor>
495  (
496      const tmp<symmTensorField>& tstf
497  )
498  {
499 -    tmp<Field<symmTensor> > ret =
500 -        transformFieldMask<symmTensor>(tstf());
501 -    tstf.clear();
502 -    return ret;
503 +    return tstf;
504  }
505  
506  
507  // * * * * * * * * * * * * * * * global operators  * * * * * * * * * * * * * //
508  
509  UNARY_OPERATOR(vector, symmTensor, *, hdual)
510  
511 Index: OpenFOAM/primitives/Tensor/TensorI.H
512 ===================================================================
513 --- src/OpenFOAM/primitives/Tensor/TensorI.H    (Revision 30)
514 +++ src/OpenFOAM/primitives/Tensor/TensorI.H    (Revision 439)
515 @@ -358,14 +358,23 @@
516          v1.x()*v2.x(), v1.x()*v2.y(), v1.x()*v2.z(),
517          v1.y()*v2.x(), v1.y()*v2.y(), v1.y()*v2.z(),
518          v1.z()*v2.x(), v1.z()*v2.y(), v1.z()*v2.z()
519      );
520  }
521  
522  
523 +//- Division of a vector by a tensor, i.e. dot-product with the tensor inverse
524 +template <class Cmpt>
525 +inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
526 +operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
527 +{
528 +    return inv(t) & v;
529 +}
530 +
531 +
532  // * * * * * * * * * * * * * * * Global Functions  * * * * * * * * * * * * * //
533  
534  //- Return the trace of a tensor
535  template <class Cmpt>
536  inline Cmpt tr(const Tensor<Cmpt>& t)
537  {
538      return t.xx() + t.yy() + t.zz();
539 @@ -790,46 +799,30 @@
540  //- Double-dot-product between a spherical tensor and a tensor
541  template <class Cmpt>
542  inline Cmpt
543  operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
544  {
545      return
546      (
547 -        st1.xx()*t2.xx() + st1.xy()*t2.yx() + st1.xz()*t2.zx() +
548 -        st1.xx()*t2.xy() + st1.xy()*t2.yy() + st1.xz()*t2.zy() +
549 -        st1.xx()*t2.xz() + st1.xy()*t2.yz() + st1.xz()*t2.zz() +
550 -
551 -        st1.xy()*t2.xx() + st1.yy()*t2.yx() + st1.yz()*t2.zx() +
552 -        st1.xy()*t2.xy() + st1.yy()*t2.yy() + st1.yz()*t2.zy() +
553 -        st1.xy()*t2.xz() + st1.yy()*t2.yz() + st1.yz()*t2.zz() +
554 -
555 -        st1.xz()*t2.xx() + st1.yz()*t2.yx() + st1.zz()*t2.zx() +
556 -        st1.xz()*t2.xy() + st1.yz()*t2.yy() + st1.zz()*t2.zy() +
557 -        st1.xz()*t2.xz() + st1.yz()*t2.yz() + st1.zz()*t2.zz()
558 +        st1.xx()*t2.xx() + st1.xy()*t2.xy() + st1.xz()*t2.xz() +
559 +        st1.xy()*t2.yx() + st1.yy()*t2.yy() + st1.yz()*t2.yz() +
560 +        st1.xz()*t2.zx() + st1.yz()*t2.zy() + st1.zz()*t2.zz()
561      );
562  }
563  
564  
565  //- Double-dot-product between a tensor and a spherical tensor
566  template <class Cmpt>
567  inline Cmpt
568  operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
569  {
570      return
571      (
572          t1.xx()*st2.xx() + t1.xy()*st2.xy() + t1.xz()*st2.xz() +
573 -        t1.xx()*st2.xy() + t1.xy()*st2.yy() + t1.xz()*st2.yz() +
574 -        t1.xx()*st2.xz() + t1.xy()*st2.yz() + t1.xz()*st2.zz() +
575 -
576 -        t1.yx()*st2.xx() + t1.yy()*st2.xy() + t1.yz()*st2.xz() +
577          t1.yx()*st2.xy() + t1.yy()*st2.yy() + t1.yz()*st2.yz() +
578 -        t1.yx()*st2.xz() + t1.yy()*st2.yz() + t1.yz()*st2.zz() +
579 -
580 -        t1.zx()*st2.xx() + t1.zy()*st2.xy() + t1.zz()*st2.xz() +
581 -        t1.zx()*st2.xy() + t1.zy()*st2.yy() + t1.zz()*st2.yz() +
582          t1.zx()*st2.xz() + t1.zy()*st2.yz() + t1.zz()*st2.zz()
583      );
584  }
585  
586  
587  template<class Cmpt>
588  class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
589
590 Index: finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
591 ===================================================================
592 --- src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C        (Revision 30)
593 +++ src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C        (Revision 439)
594 @@ -20,23 +20,18 @@
595  
596      You should have received a copy of the GNU General Public License
597      along with OpenFOAM; if not, write to the Free Software Foundation,
598      Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
599  
600  \*---------------------------------------------------------------------------*/
601  
602 -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
603 -
604 -namespace Foam
605 -{
606 -
607  // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
608  
609  template<class Type>
610 -void fvMatrix<Type>::setComponentReference
611 +void Foam::fvMatrix<Type>::setComponentReference
612  (
613      const label patchi,
614      const label facei,
615      const direction cmpt,
616      const scalar value
617  )
618  {
619 @@ -52,15 +47,18 @@
620                 *value;
621          }
622      }
623  }
624  
625  
626  template<class Type>
627 -lduMatrix::solverPerformance fvMatrix<Type>::solve(Istream& solverControls)
628 +Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve
629 +(
630 +    Istream& solverControls
631 +)
632  {
633      if (debug)
634      {
635          Info<< "fvMatrix<Type>::solve(Istream& solverControls) : "
636                 "solving fvMatrix<Type>"
637              << endl;
638      }
639 @@ -70,15 +68,19 @@
640          "fvMatrix<Type>::solve",
641          psi_.name()
642      );
643  
644      scalarField saveDiag = diag();
645  
646      Field<Type> source = source_;
647 -    addBoundarySource(source, false);
648 +
649 +    // At this point include the boundary source from the coupled boundaries.
650 +    // This is corrected for the implict part by updateMatrixInterfaces within
651 +    // the component loop.
652 +    addBoundarySource(source);
653  
654      typename Type::labelType validComponents
655      (
656          pow
657          (
658              psi_.mesh().directions(),
659              pTraits<typename powProduct<Vector<label>, Type::rank>::type>::zero
660 @@ -105,14 +107,35 @@
661          (
662              internalCoeffs_.component(cmpt)
663          );
664  
665          lduInterfaceFieldPtrsList interfaces = 
666              psi_.boundaryField().interfaces();
667  
668 +        // Use the initMatrixInterfaces and updateMatrixInterfaces to correct
669 +        // bouCoeffsCmpt for the explicit part of the coupled boundary
670 +        // conditions
671 +        initMatrixInterfaces
672 +        (
673 +            bouCoeffsCmpt,
674 +            interfaces,
675 +            psiCmpt,
676 +            sourceCmpt,
677 +            cmpt
678 +        );
679 +
680 +        updateMatrixInterfaces
681 +        (
682 +            bouCoeffsCmpt,
683 +            interfaces,
684 +            psiCmpt,
685 +            sourceCmpt,
686 +            cmpt
687 +        );
688 +
689          lduMatrix::solverPerformance solverPerf;
690  
691          // Solver call
692          solverPerf = lduMatrix::solver::New
693          (
694              psi_.name() + pTraits<Type>::componentNames[cmpt],
695              *this,
696 @@ -140,35 +163,36 @@
697      psi_.correctBoundaryConditions();
698  
699      return solverPerfVec;
700  }
701  
702  
703  template<class Type>
704 -autoPtr<typename fvMatrix<Type>::fvSolver> fvMatrix<Type>::solver()
705 +Foam::autoPtr<typename Foam::fvMatrix<Type>::fvSolver>
706 +Foam::fvMatrix<Type>::solver()
707  {
708      return solver(psi_.mesh().solver(psi_.name()));
709  }
710  
711  template<class Type>
712 -lduMatrix::solverPerformance fvMatrix<Type>::fvSolver::solve()
713 +Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::fvSolver::solve()
714  {
715      return solve(psi_.mesh().solver(psi_.name()));
716  }
717  
718  
719  template<class Type>
720 -lduMatrix::solverPerformance fvMatrix<Type>::solve()
721 +Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve()
722  {
723      return solve(psi_.mesh().solver(psi_.name()));
724  }
725  
726  
727  template<class Type>
728 -tmp<Field<Type> > fvMatrix<Type>::residual() const
729 +Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::residual() const
730  {
731      tmp<Field<Type> > tres(source_);
732      Field<Type>& res = tres();
733  
734      addBoundarySource(res);
735  
736      // Loop over field components
737 @@ -198,12 +222,8 @@
738          );
739      }
740  
741      return tres;
742  }
743  
744  
745 -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
746 -
747 -} // End namespace Foam
748 -
749  // ************************************************************************* //
750 Index: finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C
751 ===================================================================
752 --- src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C (Revision 30)
753 +++ src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C (Revision 439)
754 @@ -181,14 +181,15 @@
755  )
756  :
757      fixedValueFvPatchField<Type>(ptf, iF),
758      setAverage_(ptf.setAverage_),
759      referenceCS_(ptf.referenceCS_),
760      nearestVertex_(ptf.nearestVertex_),
761      nearestVertexWeight_(ptf.nearestVertexWeight_),
762 +    fieldName_(ptf.fieldName_),
763      sampleTimes_(ptf.sampleTimes_),
764      startSampleTime_(ptf.startSampleTime_),
765      startSampledValues_(ptf.startSampledValues_),
766      startAverage_(ptf.startAverage_),
767      endSampleTime_(ptf.endSampleTime_),
768      endSampledValues_(ptf.endSampledValues_),
769      endAverage_(ptf.endAverage_)
770 Index: finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C
771 ===================================================================
772 --- src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C      (Revision 30)
773 +++ src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C      (Revision 439)
774 @@ -323,15 +323,15 @@
775                         *vf.oldTime().internalField()*mesh().V0()
776                        - coefft00*rho.oldTime().oldTime().internalField()
777                         *vf.oldTime().oldTime().internalField()*mesh().V00()
778                      )/mesh().V()
779                  ),
780                  rDeltaT.value()*
781                  (
782 -                    coefft*vf.boundaryField() -
783 +                    coefft*rho.boundaryField()*vf.boundaryField() -
784                      (
785                          coefft0*rho.oldTime().boundaryField()
786                         *vf.oldTime().boundaryField()
787                        - coefft00*rho.oldTime().oldTime().boundaryField()
788                         *vf.oldTime().oldTime().boundaryField()
789                      )
790                  )
791 Index: finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C
792 ===================================================================
793 --- src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C    (Revision 30)
794 +++ src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C    (Revision 439)
795 @@ -150,15 +150,15 @@
796          if (p.coupled())
797          {
798              forAll(pd, patchFacei)
799              {
800                  const vector& d = pd[patchFacei];
801  
802                  dd[faceCells[patchFacei]] +=
803 -                    (pw[patchFacei]*pMagSf[patchFacei]/magSqr(d))*sqr(d);
804 +                    ((1 - pw[patchFacei])*pMagSf[patchFacei]/magSqr(d))*sqr(d);
805              }
806          }
807          else
808          {
809              forAll(pd, patchFacei)
810              {
811                  const vector& d = pd[patchFacei];
812
813 Index: turbulenceModels/compressible/kOmegaSST/kOmegaSST.C
814 ===================================================================
815 --- src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C     (Revision 30)
816 +++ src/turbulenceModels/compressible/kOmegaSST/kOmegaSST.C     (Revision 439)
817 @@ -237,15 +237,15 @@
818      {
819          y_.correct();
820          divU += fvc::div(mesh_.phi());
821      }
822  
823      tmp<volTensorField> tgradU = fvc::grad(U_);
824      volScalarField S2 = magSqr(symm(tgradU()));
825 -    volScalarField GbyMu = 2*mut_*(tgradU() && dev(symm(tgradU())));
826 +    volScalarField GbyMu = 2*(tgradU() && dev(symm(tgradU())));
827      volScalarField G = mut_*GbyMu;
828      tgradU.clear();
829  
830  #   include "kOmegaWallFunctionsI.H"
831  
832      volScalarField CDkOmega =
833          (2*alphaOmega2)*(fvc::grad(k_) & fvc::grad(omega_))/omega_;
834 @@ -280,15 +280,15 @@
835      // Turbulent kinetic energy equation
836      tmp<fvScalarMatrix> kEqn
837      (
838          fvm::ddt(rho_, k_)
839        + fvm::div(phi_, k_)
840        - fvm::laplacian(DkEff(F1), k_)
841       ==
842 -        min(G, c1*betaStar*k_*omega_)
843 +        min(G, (c1*betaStar)*rho_*k_*omega_)
844        - fvm::SuSp(2.0/3.0*rho_*divU, k_)
845        - fvm::Sp(rho_*betaStar*omega_, k_)
846      );
847  
848      kEqn().relax();
849      solve(kEqn);
850      bound(k_, k0_);
851