Loading...
Searching...
No Matches
parProfilingSolver.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) 2023 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::parProfilingSolver
28
29Description
30 Wrapper to switch on parProfiling around a linear solver.
31
32 Used in combination with parProfiling functionObject.
33
34Usage
35 Example of linear solver specification in fvSolution:
36 \verbatim
37 solvers
38 {
39 p
40 {
41 solver parProfiling;
42 // Actual solver to use
43 baseSolver PCG;
44 preconditioner DIC;
45 ..
46 }
47 }
48 \endverbatim
49
50SourceFiles
51 parProfiling.C
52
53\*---------------------------------------------------------------------------*/
54
55#ifndef Foam_parProfilingSolver_H
56#define Foam_parProfilingSolver_H
57
58#include "lduMatrix.H"
59
60// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61
62namespace Foam
63{
65/*---------------------------------------------------------------------------*\
66 Class parProfilingSolver Declaration
67\*---------------------------------------------------------------------------*/
68
69class parProfilingSolver
70:
72{
73 // Private Data
74
75 //- Underlying solver
77
78
79 // Private Member Functions
80
81 //- No copy construct
82 parProfilingSolver(const parProfilingSolver&) = delete;
83
84 //- No copy assignment
85 void operator=(const parProfilingSolver&) = delete;
86
87
88public:
89
90 //- Runtime type information
91 TypeName("parProfilingSolver");
92
93
94 // Constructors
95
96 //- Construct from matrix components and solver controls
97 parProfilingSolver
98 (
99 const word& fieldName,
100 const lduMatrix& matrix,
104 const dictionary& solverControls
105 );
106
107
108 //- Destructor
109 virtual ~parProfilingSolver() = default;
110
111
112 // Member Functions
113
114 //- Solve the matrix with forwarding to the base solver
118 const scalarField& source,
119 const direction cmpt=0
120 ) const;
121};
122
123
124// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126} // End namespace Foam
127
128// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129
130#endif
131
132// ************************************************************************* //
A field of fields is a PtrList of fields with reference counting.
Definition FieldField.H:77
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Abstract base-class for lduMatrix solvers.
Definition lduMatrix.H:152
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
Definition lduMatrix.H:338
const lduInterfaceFieldPtrsList & interfaces() const noexcept
Definition lduMatrix.H:343
const lduMatrix & matrix() const noexcept
Definition lduMatrix.H:328
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
Definition lduMatrix.H:333
const word & fieldName() const noexcept
Definition lduMatrix.H:323
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition lduMatrix.H:81
TypeName("parProfilingSolver")
Runtime type information.
virtual ~parProfilingSolver()=default
Destructor.
A class for handling words, derived from Foam::string.
Definition word.H:66
const volScalarField & psi
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
uint8_t direction
Definition direction.H:49
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
SolverPerformance< scalar > solverPerformance
SolverPerformance instantiated for a scalar.
CEqn solve()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68