faMatrix.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2017 Wikki Ltd
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::faMatrix
28 
29 Description
30  Finite-Area matrix.
31 
32 SourceFiles
33  faMatrix.C
34  faMatrixSolve.C
35 
36 Author
37  Zeljko Tukovic, FMENA
38  Hrvoje Jasak, Wikki Ltd.
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef faMatrix_H
43 #define faMatrix_H
44 
45 #include "areaFields.H"
46 #include "edgeFields.H"
47 #include "lduMatrix.H"
48 #include "tmp.H"
49 #include "autoPtr.H"
50 #include "dimensionedTypes.H"
51 #include "className.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 
58 // Forward declaration of friend functions and operators
59 
60 template<class Type>
61 class faMatrix;
62 
63 template<class Type>
65 
66 
67 /*---------------------------------------------------------------------------*\
68  Class faMatrix Declaration
69 \*---------------------------------------------------------------------------*/
70 
71 template<class Type>
72 class faMatrix
73 :
74  public refCount,
75  public lduMatrix
76 {
77  // Private data
78 
79  // Reference to GeometricField<Type, faPatchField, areaMesh>
81 
82  //- Dimension set
83  dimensionSet dimensions_;
84 
85  //- Source term
86  Field<Type> source_;
87 
88  //- Boundary scalar field containing pseudo-matrix coeffs
89  // for internal faces
90  FieldField<Field, Type> internalCoeffs_;
91 
92  //- Boundary scalar field containing pseudo-matrix coeffs
93  // for boundary faces
94  FieldField<Field, Type> boundaryCoeffs_;
95 
96 
97  //- Face flux field for non-orthogonal correction
99  *faceFluxCorrectionPtr_;
100 
101 
102  // Private member functions
103 
104  //- Add patch contribution to internal field
105  template<class Type2>
106  void addToInternalField
107  (
108  const labelUList& addr,
109  const Field<Type2>& pf,
110  Field<Type2>& intf
111  ) const;
112 
113  template<class Type2>
114  void addToInternalField
115  (
116  const labelUList& addr,
117  const tmp<Field<Type2>>& tpf,
118  Field<Type2>& intf
119  ) const;
120 
121  //- Subtract patch contribution from internal field
122  template<class Type2>
123  void subtractFromInternalField
124  (
125  const labelUList& addr,
126  const Field<Type2>& pf,
127  Field<Type2>& intf
128  ) const;
129 
130  template<class Type2>
131  void subtractFromInternalField
132  (
133  const labelUList& addr,
134  const tmp<Field<Type2>>& tpf,
135  Field<Type2>& intf
136  ) const;
137 
138 
139  // Matrix completion functionality
140 
141  void addBoundaryDiag
142  (
143  scalarField& diag,
144  const direction cmpt
145  ) const;
146 
147  void addCmptAvBoundaryDiag(scalarField& diag) const;
148 
149  void addBoundarySource
150  (
152  const bool couples = true
153  ) const;
154 
155 
156 public:
157 
158  //- Solver class returned by the solver function
159  class faSolver
160  {
161  faMatrix<Type>& faMat_;
162 
164 
165  public:
166 
167  // Constructors
168 
170  :
171  faMat_(faMat),
172  solver_(sol)
173  {}
174 
175 
176  // Member functions
177 
178  //- Solve returning the solution statistics.
179  // Solver controls read from dictionary
181 
182  //- Solve returning the solution statistics.
183  // Solver controls read from faSolution
185  };
186 
187 
188  ClassName("faMatrix");
189 
190 
191  // Constructors
192 
193  //- Construct given a field to solve for
194  faMatrix
195  (
197  const dimensionSet&
198  );
199 
200  //- Construct as copy
201  faMatrix(const faMatrix<Type>&);
202 
203  //- Construct from Istream given field to solve for
204  faMatrix
205  (
207  Istream&
208  );
209 
210  //- Clone
211  tmp<faMatrix<Type>> clone() const;
212 
213 
214  //- Destructor
215  virtual ~faMatrix();
216 
217 
218  // Member functions
219 
220  // Access
221 
223  {
224  return psi_;
225  }
226 
227  const dimensionSet& dimensions() const
228  {
229  return dimensions_;
230  }
231 
233  {
234  return source_;
235  }
236 
237  const Field<Type>& source() const
238  {
239  return source_;
240  }
241 
242  //- faBoundary scalar field containing pseudo-matrix coeffs
243  // for internal cells
245  {
246  return internalCoeffs_;
247  }
248 
249  //- faBoundary scalar field containing pseudo-matrix coeffs
250  // for boundary cells
252  {
253  return boundaryCoeffs_;
254  }
255 
256 
257  //- Declare return type of the faceFluxCorrectionPtr() function
260 
261  //- Return pointer to face-flux non-orthogonal correction field
263  {
264  return faceFluxCorrectionPtr_;
265  }
266 
267 
268  // Operations
269 
270  //- Set solution in given cells and eliminate corresponding
271  // equations from the matrix
272  void setValues
273  (
274  const labelUList& faces,
275  const UList<Type>& values
276  );
277 
278  //- Set reference level for solution
279  void setReference
280  (
281  const label facei,
282  const Type& value
283  );
284 
285  //- Set reference level for a component of the solution
286  // on a given patch face
288  (
289  const label patchi,
290  const label facei,
291  const direction cmpt,
292  const scalar value
293  );
294 
295  //- Relax matrix (for steady-state solution).
296  // alpha = 1 : diagonally equal
297  // alpha < 1 : ,, dominant
298  // alpha = 0 : do nothing
299  void relax(const scalar alpha);
300 
301  //- Relax matrix (for steady-state solution).
302  // alpha is read from controlDict
303  void relax();
304 
305  //- Solve returning the solution statistics.
306  // Solver controls read Istream
308 
309  //- Solve returning the solution statistics.
310  // Solver controls read from faSolution
312 
313  //- Return the matrix residual
314  tmp<Field<Type>> residual() const;
315 
316  //- Return the matrix diagonal
317  tmp<scalarField> D() const;
318 
319  //- Return the central coefficient
320  tmp<areaScalarField> A() const;
321 
322  //- Return the H operation source
324 
325  //- Return the face-flux field from the matrix
327 
328 
329  // Member operators
330 
331  void operator=(const faMatrix<Type>&);
332  void operator=(const tmp<faMatrix<Type>>&);
333 
334  void negate();
335 
336  void operator+=(const faMatrix<Type>&);
337  void operator+=(const tmp<faMatrix<Type>>&);
338 
339  void operator-=(const faMatrix<Type>&);
340  void operator-=(const tmp<faMatrix<Type>>&);
341 
344 
347 
348  void operator+=(const dimensioned<Type>&);
349  void operator-=(const dimensioned<Type>&);
350 
351  void operator*=(const areaScalarField&);
352  void operator*=(const tmp<areaScalarField>&);
353 
354  void operator*=(const dimensioned<scalar>&);
355 
356 
357  // Ostream operator
358 
359  friend Ostream& operator<< <Type>
360  (
361  Ostream&,
362  const faMatrix<Type>&
363  );
364 };
365 
366 
367 // * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * //
368 
369 template<class Type>
370 void checkMethod
371 (
372  const faMatrix<Type>&,
373  const faMatrix<Type>&,
374  const char*
375 );
376 
377 template<class Type>
378 void checkMethod
379 (
380  const faMatrix<Type>&,
381  const GeometricField<Type, faPatchField, areaMesh>&,
382  const char*
383 );
384 
385 template<class Type>
386 void checkMethod
387 (
388  const faMatrix<Type>&,
389  const dimensioned<Type>&,
390  const char*
391 );
392 
393 
394 //- Solve returning the solution statistics given convergence tolerance
395 // Solver controls read Istream
396 template<class Type>
397 SolverPerformance<Type> solve(faMatrix<Type>&, Istream&);
398 
399 
400 //- Solve returning the solution statistics given convergence tolerance,
401 // deleting temporary matrix after solution.
402 // Solver controls read Istream
403 template<class Type>
404 SolverPerformance<Type> solve(const tmp<faMatrix<Type>>&, Istream&);
405 
406 
407 //- Solve returning the solution statistics given convergence tolerance
408 // Solver controls read faSolution
409 template<class Type>
410 SolverPerformance<Type> solve(faMatrix<Type>&);
411 
412 
413 //- Solve returning the solution statistics given convergence tolerance,
414 // deleting temporary matrix after solution.
415 // Solver controls read faSolution
416 template<class Type>
417 SolverPerformance<Type> solve(const tmp<faMatrix<Type>>&);
418 
419 
420 // * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
421 
422 template<class Type>
423 tmp<faMatrix<Type>> operator-
424 (
425  const faMatrix<Type>&
426 );
427 
428 template<class Type>
429 tmp<faMatrix<Type>> operator-
430 (
431  const tmp<faMatrix<Type>>&
432 );
433 
434 template<class Type>
435 tmp<faMatrix<Type>> operator+
436 (
437  const faMatrix<Type>&,
438  const faMatrix<Type>&
439 );
440 
441 template<class Type>
442 tmp<faMatrix<Type>> operator+
443 (
444  const tmp<faMatrix<Type>>&,
445  const faMatrix<Type>&
446 );
447 
448 template<class Type>
449 tmp<faMatrix<Type>> operator+
450 (
451  const faMatrix<Type>&,
452  const tmp<faMatrix<Type>>&
453 );
454 
455 template<class Type>
456 tmp<faMatrix<Type>> operator+
457 (
458  const tmp<faMatrix<Type>>&,
459  const tmp<faMatrix<Type>>&
460 );
461 
462 template<class Type>
463 tmp<faMatrix<Type>> operator-
464 (
465  const faMatrix<Type>&,
466  const faMatrix<Type>&
467 );
468 
469 template<class Type>
470 tmp<faMatrix<Type>> operator-
471 (
472  const tmp<faMatrix<Type>>&,
473  const faMatrix<Type>&
474 );
475 
476 template<class Type>
477 tmp<faMatrix<Type>> operator-
478 (
479  const faMatrix<Type>&,
480  const tmp<faMatrix<Type>>&
481 );
482 
483 template<class Type>
484 tmp<faMatrix<Type>> operator-
485 (
486  const tmp<faMatrix<Type>>&,
487  const tmp<faMatrix<Type>>&
488 );
489 
490 template<class Type>
491 tmp<faMatrix<Type>> operator==
492 (
493  const faMatrix<Type>&,
494  const faMatrix<Type>&
495 );
496 
497 template<class Type>
498 tmp<faMatrix<Type>> operator==
499 (
500  const tmp<faMatrix<Type>>&,
501  const faMatrix<Type>&
502 );
503 
504 template<class Type>
505 tmp<faMatrix<Type>> operator==
506 (
507  const faMatrix<Type>&,
508  const tmp<faMatrix<Type>>&
509 );
510 
511 template<class Type>
512 tmp<faMatrix<Type>> operator==
513 (
514  const tmp<faMatrix<Type>>&,
515  const tmp<faMatrix<Type>>&
516 );
517 
518 template<class Type>
519 tmp<faMatrix<Type>> operator+
520 (
521  const faMatrix<Type>&,
522  const GeometricField<Type, faPatchField, areaMesh>&
523 );
524 
525 template<class Type>
526 tmp<faMatrix<Type>> operator+
527 (
528  const tmp<faMatrix<Type>>&,
529  const GeometricField<Type, faPatchField, areaMesh>&
530 );
531 
532 template<class Type>
533 tmp<faMatrix<Type>> operator+
534 (
535  const faMatrix<Type>&,
536  const tmp<GeometricField<Type, faPatchField, areaMesh>>&
537 );
538 
539 template<class Type>
540 tmp<faMatrix<Type>> operator+
541 (
542  const tmp<faMatrix<Type>>&,
543  const tmp<GeometricField<Type, faPatchField, areaMesh>>&
544 );
545 
546 template<class Type>
547 tmp<faMatrix<Type>> operator+
548 (
549  const GeometricField<Type, faPatchField, areaMesh>&,
550  const faMatrix<Type>&
551 );
552 
553 template<class Type>
554 tmp<faMatrix<Type>> operator+
555 (
556  const GeometricField<Type, faPatchField, areaMesh>&,
557  const tmp<faMatrix<Type>>&
558 );
559 
560 template<class Type>
561 tmp<faMatrix<Type>> operator+
562 (
563  const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
564  const faMatrix<Type>&
565 );
566 
567 template<class Type>
568 tmp<faMatrix<Type>> operator+
569 (
570  const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
571  const tmp<faMatrix<Type>>&
572 );
573 
574 template<class Type>
575 tmp<faMatrix<Type>> operator-
576 (
577  const faMatrix<Type>&,
578  const GeometricField<Type, faPatchField, areaMesh>&
579 );
580 
581 template<class Type>
582 tmp<faMatrix<Type>> operator-
583 (
584  const tmp<faMatrix<Type>>&,
585  const GeometricField<Type, faPatchField, areaMesh>&
586 );
587 
588 template<class Type>
589 tmp<faMatrix<Type>> operator-
590 (
591  const faMatrix<Type>&,
592  const tmp<GeometricField<Type, faPatchField, areaMesh>>&
593 );
594 
595 template<class Type>
596 tmp<faMatrix<Type>> operator-
597 (
598  const tmp<faMatrix<Type>>&,
599  const tmp<GeometricField<Type, faPatchField, areaMesh>>&
600 );
601 
602 template<class Type>
603 tmp<faMatrix<Type>> operator-
604 (
605  const GeometricField<Type, faPatchField, areaMesh>&,
606  const faMatrix<Type>&
607 );
608 
609 template<class Type>
610 tmp<faMatrix<Type>> operator-
611 (
612  const GeometricField<Type, faPatchField, areaMesh>&,
613  const tmp<faMatrix<Type>>&
614 );
615 
616 template<class Type>
617 tmp<faMatrix<Type>> operator-
618 (
619  const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
620  const faMatrix<Type>&
621 );
622 
623 template<class Type>
624 tmp<faMatrix<Type>> operator-
625 (
626  const tmp<GeometricField<Type, faPatchField, areaMesh>>&,
627  const tmp<faMatrix<Type>>&
628 );
629 
630 template<class Type>
631 tmp<faMatrix<Type>> operator+
632 (
633  const faMatrix<Type>&,
634  const dimensioned<Type>&
635 );
636 
637 template<class Type>
638 tmp<faMatrix<Type>> operator+
639 (
640  const tmp<faMatrix<Type>>&,
641  const dimensioned<Type>&
642 );
643 
644 template<class Type>
645 tmp<faMatrix<Type>> operator+
646 (
647  const dimensioned<Type>&,
648  const faMatrix<Type>&
649 );
650 
651 template<class Type>
652 tmp<faMatrix<Type>> operator+
653 (
654  const dimensioned<Type>&,
655  const tmp<faMatrix<Type>>&
656 );
657 
658 template<class Type>
659 tmp<faMatrix<Type>> operator-
660 (
661  const faMatrix<Type>&,
662  const dimensioned<Type>&
663 );
664 
665 template<class Type>
666 tmp<faMatrix<Type>> operator-
667 (
668  const tmp<faMatrix<Type>>&,
669  const dimensioned<Type>&
670 );
671 
672 template<class Type>
673 tmp<faMatrix<Type>> operator-
674 (
675  const dimensioned<Type>&,
676  const faMatrix<Type>&
677 );
678 
679 template<class Type>
680 tmp<faMatrix<Type>> operator-
681 (
682  const dimensioned<Type>&,
683  const tmp<faMatrix<Type>>&
684 );
685 
686 template<class Type>
687 tmp<faMatrix<Type>> operator==
688 (
689  const faMatrix<Type>&,
690  const GeometricField<Type, faPatchField, areaMesh>&
691 );
692 
693 template<class Type>
694 tmp<faMatrix<Type>> operator==
695 (
696  const tmp<faMatrix<Type>>&,
697  const GeometricField<Type, faPatchField, areaMesh>&
698 );
699 
700 template<class Type>
701 tmp<faMatrix<Type>> operator==
702 (
703  const faMatrix<Type>&,
704  const tmp<GeometricField<Type, faPatchField, areaMesh>>&
705 );
706 
707 template<class Type>
708 tmp<faMatrix<Type>> operator==
709 (
710  const tmp<faMatrix<Type>>&,
711  const tmp<GeometricField<Type, faPatchField, areaMesh>>&
712 );
713 
714 template<class Type>
715 tmp<faMatrix<Type>> operator==
716 (
717  const faMatrix<Type>&,
718  const dimensioned<Type>&
719 );
720 
721 template<class Type>
722 tmp<faMatrix<Type>> operator==
723 (
724  const tmp<faMatrix<Type>>&,
725  const dimensioned<Type>&
726 );
727 
728 
729 template<class Type>
730 tmp<faMatrix<Type>> operator*
731 (
732  const areaScalarField&,
733  const faMatrix<Type>&
734 );
735 
736 template<class Type>
737 tmp<faMatrix<Type>> operator*
738 (
739  const areaScalarField&,
740  const tmp<faMatrix<Type>>&
741 );
742 
743 template<class Type>
744 tmp<faMatrix<Type>> operator*
745 (
746  const tmp<areaScalarField>&,
747  const faMatrix<Type>&
748 );
749 
750 template<class Type>
751 tmp<faMatrix<Type>> operator*
752 (
753  const tmp<areaScalarField>&,
754  const tmp<faMatrix<Type>>&
755 );
756 
757 template<class Type>
758 tmp<faMatrix<Type>> operator*
759 (
760  const dimensioned<scalar>&,
761  const faMatrix<Type>&
762 );
763 
764 template<class Type>
765 tmp<faMatrix<Type>> operator*
766 (
767  const dimensioned<scalar>&,
768  const tmp<faMatrix<Type>>&
769 );
770 
771 
772 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
773 
774 } // End namespace Foam
775 
776 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
777 
778 #ifdef NoRepository
779  #include "faMatrix.C"
780 #endif
781 
782 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
783 
784 #endif
785 
786 // ************************************************************************* //
Foam::checkMethod
void checkMethod(const faMatrix< Type > &, const faMatrix< Type > &, const char *)
Definition: faMatrix.C:957
Foam::faMatrix::operator+=
void operator+=(const faMatrix< Type > &)
Definition: faMatrix.C:768
Foam::faMatrix::dimensions
const dimensionSet & dimensions() const
Definition: faMatrix.H:226
Foam::faMatrix
A special matrix type and solver, designed for finite area solutions of scalar equations....
Definition: faMatrix.H:60
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::faMatrix::negate
void negate()
Definition: faMatrix.C:753
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::faMatrix::operator-=
void operator-=(const faMatrix< Type > &)
Definition: faMatrix.C:802
Foam::refCount
Reference counter for various OpenFOAM components.
Definition: refCount.H:50
Foam::HashTableOps::values
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Definition: HashOps.H:149
Foam::diag
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Definition: pointPatchFieldFunctions.H:287
Foam::faMatrix::faSolver::faSolver
faSolver(faMatrix< Type > &faMat, autoPtr< lduMatrix::solver > sol)
Definition: faMatrix.H:168
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
Foam::faMatrix::boundaryCoeffs
FieldField< Field, Type > & boundaryCoeffs()
faBoundary scalar field containing pseudo-matrix coeffs
Definition: faMatrix.H:250
Foam::lduMatrix
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:83
Foam::faMatrix::faMatrix
faMatrix(const GeometricField< Type, faPatchField, areaMesh > &, const dimensionSet &)
Construct given a field to solve for.
Definition: faMatrix.C:181
Foam::faMatrix::flux
tmp< GeometricField< Type, faePatchField, edgeMesh > > flux() const
Return the face-flux field from the matrix.
Definition: faMatrix.C:630
Foam::faMatrix::source
const Field< Type > & source() const
Definition: faMatrix.H:236
Foam::faMatrix::setComponentReference
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
Set reference level for a component of the solution.
Definition: faMatrixSolve.C:38
lduMatrix.H
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:65
Foam::faMatrix::source
Field< Type > & source()
Definition: faMatrix.H:231
Foam::faMatrix::faSolver
Solver class returned by the solver function.
Definition: faMatrix.H:158
Foam::faMatrix::operator=
void operator=(const faMatrix< Type > &)
Definition: faMatrix.C:712
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
edgeFields.H
className.H
Macro definitions for declaring ClassName(), NamespaceName(), etc.
Foam::faMatrix::solve
SolverPerformance< Type > solve()
Solve returning the solution statistics.
Definition: faMatrixSolve.C:170
Foam::solve
SolverPerformance< Type > solve(faMatrix< Type > &, Istream &)
Solve returning the solution statistics given convergence tolerance.
Foam::faMatrix::relax
void relax()
Relax matrix (for steady-state solution).
Definition: faMatrix.C:534
Foam::faMatrix::internalCoeffs
FieldField< Field, Type > & internalCoeffs()
faBoundary scalar field containing pseudo-matrix coeffs
Definition: faMatrix.H:243
areaFields.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::faMatrix::H
tmp< GeometricField< Type, faPatchField, areaMesh > > H() const
Return the H operation source.
Definition: faMatrix.C:586
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:43
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::areaScalarField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:53
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::faMatrix::setReference
void setReference(const label facei, const Type &value)
Set reference level for solution.
Definition: faMatrix.C:427
tmp.H
Foam::faMatrix::psi
const GeometricField< Type, faPatchField, areaMesh > & psi() const
Definition: faMatrix.H:221
Foam::faMatrix::faceFluxCorrectionPtr
edgeTypeFieldPtr & faceFluxCorrectionPtr()
Return pointer to face-flux non-orthogonal correction field.
Definition: faMatrix.H:261
Foam::faMatrix::operator*=
void operator*=(const areaScalarField &)
Definition: faMatrix.C:899
Foam::UList< label >
Foam::faMatrix::edgeTypeFieldPtr
GeometricField< Type, faePatchField, edgeMesh > * edgeTypeFieldPtr
Declare return type of the faceFluxCorrectionPtr() function.
Definition: faMatrix.H:258
Foam::direction
uint8_t direction
Definition: direction.H:47
Foam::faMatrix::~faMatrix
virtual ~faMatrix()
Destructor.
Definition: faMatrix.C:319
dimensionedTypes.H
faMatrix.C
Foam::faMatrix::D
tmp< scalarField > D() const
Return the matrix diagonal.
Definition: faMatrix.C:550
Foam::faMatrix::A
tmp< areaScalarField > A() const
Return the central coefficient.
Definition: faMatrix.C:559
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::faMatrix::residual
tmp< Field< Type > > residual() const
Return the matrix residual.
Definition: faMatrixSolve.C:177
Foam::faMatrix::faSolver::solve
SolverPerformance< Type > solve()
Solve returning the solution statistics.
Definition: faMatrixSolve.C:163
Foam::faMatrix::clone
tmp< faMatrix< Type > > clone() const
Clone.
Definition: faMatrix.C:306
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::SolverPerformance
SolverPerformance is the class returned by the LduMatrix solver containing performance statistics.
Definition: SolverPerformance.H:51
Foam::faMatrix::setValues
void setValues(const labelUList &faces, const UList< Type > &values)
Set solution in given cells and eliminate corresponding.
Definition: faMatrix.C:333
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &)
Definition: boundaryPatch.C:102
Foam::faMatrix::ClassName
ClassName("faMatrix")
autoPtr.H