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 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 LagrangianModel;
50 
51 /*---------------------------------------------------------------------------*\
52  Class Function1LagrangianFieldSource Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class Type>
57 {
58  // Private Member Data
59 
60  //- Reference to the derived field source
61  const LagrangianFieldSource<Type>& field_;
62 
63 
64 protected:
65 
66  // Protected Member Functions
67 
68  //- Return the source value
69  template<class OtherType>
71  (
72  const LagrangianModel& model,
73  const LagrangianSubMesh& subMesh,
74  const dimensionSet& dims,
75  const Function1<OtherType>& function
76  );
77 
78  //- Return the source value
80  (
81  const LagrangianModel& model,
82  const LagrangianSubMesh& subMesh,
83  const Function1<Type>& function
84  ) const;
85 
86 
87 public:
88 
89  // Constructors
90 
91  //- Construct with reference to the derived field source
92  template<class Derived>
93  Function1LagrangianFieldSource(const Derived&);
94 };
95 
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 } // End namespace Foam
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #ifdef NoRepository
105 #endif
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #endif
110 
111 // ************************************************************************* //
Mix-in for source conditions that provides functions for evaluating Function1s at variable times.
static tmp< LagrangianSubField< OtherType > > value(const LagrangianModel &model, const LagrangianSubMesh &subMesh, const dimensionSet &dims, const Function1< OtherType > &function)
Return the source value.
Function1LagrangianFieldSource(const Derived &)
Construct with reference to the derived field source.
Run-time selectable general function of one variable.
Definition: Function1.H:125
Base class for Lagrangian source conditions.
Base class for Lagrangian models.
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.