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