Function1LagrangianFieldSource.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2025-2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::Function1LagrangianFieldSource
26 
27 Description
28  Mix-in for source conditions that provides functions for evaluating
29  Function1s at variable times
30 
31 SourceFiles
32  Function1LagrangianFieldSource.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef Function1LagrangianFieldSource_H
37 #define Function1LagrangianFieldSource_H
38 
39 #include "LagrangianFieldsFwd.H"
40 #include "LagrangianSubFieldsFwd.H"
41 #include "dimensionSet.H"
42 #include "Function1.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class LagrangianFieldSourceBase;
50 class LagrangianModel;
51 
52 /*---------------------------------------------------------------------------*\
53  Class Function1LagrangianFieldSource Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58  // Private Data
59 
60  //- Reference to the field source
61  const LagrangianFieldSourceBase& field_;
62 
63 
64 protected:
65 
66  // Protected Member Functions
67 
68  //- Return the source value
69  template<class Type>
71  (
72  const LagrangianSubMesh& subMesh,
73  const Function1<Type>& function
74  ) const;
75 
76 
77 public:
78 
79  // Static Member Functions
80 
81  //- Return the source value
82  template<class OtherType>
84  (
85  const LagrangianSubMesh& subMesh,
86  const dimensionSet& dims,
87  const Function1<OtherType>& function
88  );
89 
90 
91  // Constructors
92 
93  //- Construct with reference to the derived field source
94  template<class Derived>
95  Function1LagrangianFieldSource(const Derived&);
96 };
97 
98 
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100 
101 } // End namespace Foam
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 #ifdef NoRepository
107 #endif
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
Mix-in for source conditions that provides functions for evaluating Function1s at variable times.
Function1LagrangianFieldSource(const Derived &)
Construct with reference to the derived field source.
tmp< LagrangianSubField< Type > > value(const LagrangianSubMesh &subMesh, const Function1< Type > &function) const
Return the source value.
Run-time selectable general function of one variable.
Definition: Function1.H:62
Base class for Lagrangian source conditions.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Dimension set for the base types.
Definition: dimensionSet.H:125
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.