fvMeshToFvMesh.C
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) 2022-2024 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 \*---------------------------------------------------------------------------*/
25 
26 #include "fvMeshToFvMesh.H"
27 
28 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
29 
30 namespace Foam
31 {
33 }
34 
35 
36 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37 
39 (
40  const fvMesh& srcMesh,
41  const fvMesh& tgtMesh,
42  const word& engineType,
43  const HashTable<word>& patchMap
44 )
45 :
46  meshToMesh(srcMesh, tgtMesh, engineType, patchMap),
47  srcMesh_(srcMesh),
48  tgtMesh_(tgtMesh)
49 {
50  if (debug)
51  {
52  Info<< typeName << ": Writing target coverage" << endl;
53 
55  (
56  "tgtCoverage",
57  srcToTgt<scalar>
58  (
60  (
61  "1",
62  srcMesh,
63  dimensionedScalar(dimless, scalar(1))
64  )(),
66  (
67  "0",
68  srcMesh,
69  dimensionedScalar(dimless, scalar(0))
70  )()
71  )
72  ).write();
73  }
74 }
75 
76 
77 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
78 
80 {}
81 
82 
83 // ************************************************************************* //
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &, const Field< Type > &)
Return a temporary field constructed from name, mesh,.
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
An STL-conforming hash table.
Definition: HashTable.H:127
virtual ~fvMeshToFvMesh()
Destructor.
fvMeshToFvMesh(const fvMesh &srcMesh, const fvMesh &tgtMesh, const word &engineType, const HashTable< word > &patchMap=NullObjectRef< HashTable< word >>())
Construct from source and target meshes. If a patchMap is supplied,.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Class to calculate interpolative addressing and weights between the cells and patches of two overlapp...
Definition: meshToMesh.H:54
const polyMesh & srcMesh() const
Return const access to the source mesh.
Definition: meshToMeshI.H:127
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:257
const dimensionSet dimless
messageStream Info
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.