1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 linearWaveFvPatchField
31 linearWaveFvPatchField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef linearWaveFvPatchField_H
36 #define linearWaveFvPatchField_H
38 #include "mixedFvPatchFields.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class linearWaveFvPatchField Declaration
47 \*---------------------------------------------------------------------------*/
50 class linearWaveFvPatchField
52 public mixedFvPatchField<Type>
56 //- Value above threshold
59 //- Value below threshold
68 //- Surface normal axis
71 //- Current time index
74 //- Name of flux field
80 //- Runtime type information
81 TypeName("linearWave");
86 //- Construct from patch and internal field
87 linearWaveFvPatchField
90 const DimensionedField<Type, volMesh>&
93 //- Construct from patch, internal field and dictionary
94 linearWaveFvPatchField
97 const DimensionedField<Type, volMesh>&,
101 //- Construct by mapping given linearWaveFvPatchField
103 linearWaveFvPatchField
105 const linearWaveFvPatchField<Type>&,
107 const DimensionedField<Type, volMesh>&,
108 const fvPatchFieldMapper&
111 //- Construct and return a clone
112 virtual tmp<fvPatchField<Type> > clone() const
114 return tmp<fvPatchField<Type> >
116 new linearWaveFvPatchField<Type>(*this)
120 //- Construct as copy setting internal field reference
121 linearWaveFvPatchField
123 const linearWaveFvPatchField<Type>&,
124 const DimensionedField<Type, volMesh>&
127 //- Construct and return a clone setting internal field reference
128 virtual tmp<fvPatchField<Type> > clone
130 const DimensionedField<Type, volMesh>& iF
133 return tmp<fvPatchField<Type> >
135 new linearWaveFvPatchField<Type>(*this, iF)
142 // Evaluation functions
144 //- Update the coefficients associated with the patch field
145 virtual void updateCoeffs();
149 virtual void write(Ostream&) const;
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 # include "linearWaveFvPatchField.C"
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 // ************************************************************************* //