mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DEFEATURE: remove explicit regionCoupled methods
- did not perform as well as desired. Slated for replacement with a different approach.
This commit is contained in:
@ -95,7 +95,6 @@ fvAgglomerationMethods/Allwmake $targetType $*
|
||||
wmake $targetType waveModels
|
||||
|
||||
wmake $targetType engine
|
||||
wmake $targetType regionCoupled
|
||||
|
||||
conversion/Allwmake $targetType $*
|
||||
functionObjects/Allwmake $targetType $*
|
||||
|
||||
@ -35,9 +35,6 @@ derivedFvPatches = $(fvPatches)/derived
|
||||
$(derivedFvPatches)/wall/wallFvPatch.C
|
||||
$(derivedFvPatches)/mapped/mappedFvPatch.C
|
||||
$(derivedFvPatches)/mapped/mappedWallFvPatch.C
|
||||
$(derivedFvPatches)/regionCoupled/regionCoupledBaseFvPatch.C
|
||||
$(derivedFvPatches)/regionCoupled/regionCoupledFvPatch.C
|
||||
$(derivedFvPatches)/regionCoupled/regionCoupledWallFvPatch.C
|
||||
|
||||
|
||||
wallDist = fvMesh/wallDist
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledBaseFvPatch.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledBaseFvPatch, 0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,211 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledBaseFvPatch
|
||||
|
||||
Description
|
||||
Base class of regionCoupledFvPatch with common functionality for
|
||||
regionCoupledFvPatch and regionCoupledWallFvPatch
|
||||
|
||||
SourceFiles
|
||||
regionCoupledBaseFvPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledBaseFvPatch_H
|
||||
#define regionCoupledBaseFvPatch_H
|
||||
|
||||
#include "regionCoupledBase.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Time.H"
|
||||
#include "polyPatch.H"
|
||||
#include "regionCoupledLduInterface.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledBaseFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledBaseFvPatch
|
||||
:
|
||||
public regionCoupledLduInterface
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Reference to regionCoupledBase
|
||||
const regionCoupledBase& regionCoupledBase_;
|
||||
|
||||
//- Reference to fvPatch
|
||||
const fvPatch& patch_;
|
||||
|
||||
|
||||
// Protected members
|
||||
|
||||
//- Returns fvMesh
|
||||
const fvMesh& nbrFvMesh() const
|
||||
{
|
||||
return
|
||||
(
|
||||
patch_.boundaryMesh().mesh().time().lookupObject<fvMesh>
|
||||
(
|
||||
regionCoupledBase_.nbrRegionName()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupledBase");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from polyPatch
|
||||
regionCoupledBaseFvPatch
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const fvPatch& patch
|
||||
)
|
||||
:
|
||||
regionCoupledLduInterface(),
|
||||
regionCoupledBase_
|
||||
(
|
||||
refCast<const regionCoupledBase>(pp)
|
||||
),
|
||||
patch_(patch)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledBaseFvPatch() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return neighbour
|
||||
virtual label neighbPatchID() const
|
||||
{
|
||||
return regionCoupledBase_.neighbPatchID();
|
||||
}
|
||||
|
||||
//- Is it the owner?
|
||||
virtual bool owner() const
|
||||
{
|
||||
return regionCoupledBase_.owner();
|
||||
}
|
||||
|
||||
//- Return regionCoupledBase neighbour Patch
|
||||
virtual const regionCoupledBaseFvPatch& neighbPatch() const
|
||||
{
|
||||
return refCast<const regionCoupledBaseFvPatch>
|
||||
(
|
||||
nbrFvMesh().boundary()
|
||||
[
|
||||
regionCoupledBase_.neighbPatchID()
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
//- Return a reference to the AMI interpolator
|
||||
virtual const AMIPatchToPatchInterpolation& AMI() const
|
||||
{
|
||||
return regionCoupledBase_.AMI();
|
||||
}
|
||||
|
||||
//- Returns neighbour polyMesh
|
||||
virtual const polyMesh& nbrMesh() const
|
||||
{
|
||||
return
|
||||
(
|
||||
patch_.boundaryMesh().mesh().time().lookupObject<polyMesh>
|
||||
(
|
||||
regionCoupledBase_.nbrRegionName()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return fvPatch
|
||||
const fvPatch& patch() const
|
||||
{
|
||||
return patch_;
|
||||
}
|
||||
|
||||
//- Returns if it is the same Region
|
||||
bool sameRegion() const
|
||||
{
|
||||
return regionCoupledBase_.sameRegion();
|
||||
}
|
||||
|
||||
//- Return regionCoupledPolyPatch
|
||||
const regionCoupledBase& regionCoupledPatch() const
|
||||
{
|
||||
return regionCoupledBase_;
|
||||
}
|
||||
|
||||
//- Return neighbour fvPatch
|
||||
const fvPatch& neighbFvPatch() const
|
||||
{
|
||||
return refCast<const fvPatch>
|
||||
(
|
||||
nbrFvMesh().boundary()
|
||||
[
|
||||
regionCoupledBase_.neighbPatchID()
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the interface type
|
||||
const word& regionCoupleType() const
|
||||
{
|
||||
return regionCoupledBase_.regionCoupleType();
|
||||
}
|
||||
|
||||
|
||||
//- Return faceCell addressing
|
||||
virtual const labelUList& faceCells() const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,66 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledFvPatch, 0);
|
||||
addToRunTimeSelectionTable(fvPatch, regionCoupledFvPatch, polyPatch);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::regionCoupledFvPatch::interfaceInternalField
|
||||
(
|
||||
const labelUList& internalData
|
||||
) const
|
||||
{
|
||||
return patchInternalField(internalData);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::regionCoupledFvPatch::internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
) const
|
||||
{
|
||||
if (neighbFvPatch().sameRegion())
|
||||
{
|
||||
return neighbFvPatch().patchInternalField(iF);
|
||||
}
|
||||
|
||||
return tmp<labelField>::New(iF.size(), Zero);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,165 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledFvPatch
|
||||
|
||||
Description
|
||||
Common functionality for regionCoupleFvPatch and regionCoupledWallFvPatch
|
||||
|
||||
SourceFiles
|
||||
regionCoupledFvPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledFvPatch_H
|
||||
#define regionCoupledFvPatch_H
|
||||
|
||||
#include "fvPatch.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Time.H"
|
||||
#include "regionCoupledPolyPatch.H"
|
||||
#include "regionCoupledBaseFvPatch.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledFvPatch
|
||||
:
|
||||
public lduInterface,
|
||||
public fvPatch,
|
||||
public regionCoupledBaseFvPatch
|
||||
{
|
||||
// Private data
|
||||
|
||||
const regionCoupledPolyPatch& regionCoupledPolyPatch_;
|
||||
|
||||
// Private members
|
||||
|
||||
//- Return regionCoupledFvPatch nbr
|
||||
const regionCoupledFvPatch& neighbFvPatch() const
|
||||
{
|
||||
return refCast<const regionCoupledFvPatch>
|
||||
(
|
||||
nbrFvMesh().boundary()
|
||||
[
|
||||
neighbPatchID()
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(regionCoupledPolyPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from polyPatch
|
||||
regionCoupledFvPatch(const polyPatch& patch, const fvBoundaryMesh& bm)
|
||||
:
|
||||
fvPatch(patch, bm),
|
||||
regionCoupledBaseFvPatch
|
||||
(
|
||||
patch,
|
||||
*this
|
||||
),
|
||||
regionCoupledPolyPatch_
|
||||
(
|
||||
refCast<const regionCoupledPolyPatch>(patch)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
~regionCoupledFvPatch()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Return faceCell addressing
|
||||
virtual const labelUList& faceCells() const
|
||||
{
|
||||
return fvPatch::faceCells();
|
||||
}
|
||||
|
||||
//- Return true because this patch is coupled
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return regionCoupledPolyPatch_.coupled();
|
||||
}
|
||||
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
//- Return the values of the given internal data adjacent to
|
||||
// the interface as a field
|
||||
virtual tmp<labelField> interfaceInternalField
|
||||
(
|
||||
const labelUList& internalData
|
||||
) const;
|
||||
|
||||
//- Inherit initInternalFieldTransfer from lduInterface
|
||||
using lduInterface::initInternalFieldTransfer;
|
||||
|
||||
//- Initialise neighbour field transfer
|
||||
virtual void initInternalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
labelUList& iF
|
||||
) const
|
||||
{}
|
||||
|
||||
//- Return neighbour field
|
||||
virtual tmp<labelField> internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,68 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledWallFvPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledWallFvPatch, 0);
|
||||
addToRunTimeSelectionTable(fvPatch, regionCoupledWallFvPatch, polyPatch);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::regionCoupledWallFvPatch::
|
||||
interfaceInternalField
|
||||
(
|
||||
const labelUList& internalData
|
||||
) const
|
||||
{
|
||||
return patchInternalField(internalData);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::regionCoupledWallFvPatch::
|
||||
internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
) const
|
||||
{
|
||||
if (neighbFvPatch().sameRegion())
|
||||
{
|
||||
return neighbFvPatch().patchInternalField(iF);
|
||||
}
|
||||
|
||||
return tmp<labelField>::New(iF.size(), Zero);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,169 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledWallFvPatch
|
||||
|
||||
Description
|
||||
Foam::regionCoupledWallFvPatch
|
||||
|
||||
SourceFiles
|
||||
regionCoupledWallFvPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledWallFvPatch_H
|
||||
#define regionCoupledWallFvPatch_H
|
||||
|
||||
#include "wallFvPatch.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Time.H"
|
||||
#include "regionCoupledWallPolyPatch.H"
|
||||
#include "regionCoupledBaseFvPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledWallFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledWallFvPatch
|
||||
:
|
||||
public lduInterface,
|
||||
public wallFvPatch,
|
||||
public regionCoupledBaseFvPatch
|
||||
{
|
||||
|
||||
// Private data
|
||||
|
||||
//- Const reference to regionCoupledWallPolyPatch
|
||||
const regionCoupledWallPolyPatch& regionCoupledPolyPatch_;
|
||||
|
||||
|
||||
// Private members
|
||||
|
||||
//- Return regionCoupledBaseFvPatch nbr
|
||||
const regionCoupledWallFvPatch& neighbFvPatch() const
|
||||
{
|
||||
return refCast<const regionCoupledWallFvPatch>
|
||||
(
|
||||
nbrFvMesh().boundary()[neighbPatchID()]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(regionCoupledWallPolyPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
regionCoupledWallFvPatch
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const fvBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
wallFvPatch(patch, bm),
|
||||
regionCoupledBaseFvPatch
|
||||
(
|
||||
patch,
|
||||
*this
|
||||
),
|
||||
regionCoupledPolyPatch_
|
||||
(
|
||||
refCast<const regionCoupledWallPolyPatch>(patch)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
~regionCoupledWallFvPatch()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Return faceCell addressing
|
||||
virtual const labelUList& faceCells() const
|
||||
{
|
||||
return fvPatch::faceCells();
|
||||
}
|
||||
|
||||
//- Return true because this patch is coupled
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return regionCoupledPolyPatch_.coupled();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
//- Return the values of the given internal data adjacent to
|
||||
// the interface as a field
|
||||
virtual tmp<labelField> interfaceInternalField
|
||||
(
|
||||
const labelUList& internalData
|
||||
) const;
|
||||
|
||||
//- Inherit initInternalFieldTransfer from lduInterface
|
||||
using lduInterface::initInternalFieldTransfer;
|
||||
|
||||
//- Initialise neighbour field transfer
|
||||
virtual void initInternalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
labelUList& iF
|
||||
) const
|
||||
{}
|
||||
|
||||
//- Return neighbour field
|
||||
virtual tmp<labelField> internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -308,19 +308,6 @@ output/foamVtkWriteCellSetFaces.C
|
||||
|
||||
regionModel/regionProperties/regionProperties.C
|
||||
|
||||
regionCoupled/patches/regionCoupledPolyPatch/regionCoupledBase.C
|
||||
regionCoupled/patches/regionCoupledPolyPatch/regionCoupledPolyPatch.C
|
||||
regionCoupled/patches/regionCoupledPolyPatch/regionCoupledWallPolyPatch.C
|
||||
regionCoupled/patches/regionCoupledLduInterface/regionCoupledLduInterface.C
|
||||
regionCoupled/patches/regionCoupledPointPatch/regionCoupledPointPatch.C
|
||||
regionCoupled/patches/regionCoupledPointPatch/regionCoupledWallPointPatch.C
|
||||
|
||||
regionCoupled/GAMG/interfaces/regionCoupledGAMGInterface/regionCoupledBaseGAMGInterface.C
|
||||
regionCoupled/GAMG/interfaces/regionCoupledGAMGInterface/regionCoupledGAMGInterface.C
|
||||
regionCoupled/GAMG/interfaces/regionCoupledGAMGInterface/regionCoupledWallGAMGInterface.C
|
||||
regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledGAMGInterfaceField.C
|
||||
regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledWallGAMGInterfaceField.C
|
||||
|
||||
tetOverlapVolume/tetOverlapVolume.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libmeshTools
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledGAMGInterfaceField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "lduMatrix.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledGAMGInterfaceField, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
GAMGInterfaceField,
|
||||
regionCoupledGAMGInterfaceField,
|
||||
lduInterface
|
||||
);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
GAMGInterfaceField,
|
||||
regionCoupledGAMGInterfaceField,
|
||||
lduInterfaceField
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledGAMGInterfaceField::regionCoupledGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const lduInterfaceField& fineInterface
|
||||
)
|
||||
:
|
||||
GAMGInterfaceField(GAMGCp, fineInterface),
|
||||
regionCoupledGAMGInterface_
|
||||
(
|
||||
refCast<const regionCoupledGAMGInterface>(GAMGCp)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledGAMGInterfaceField::regionCoupledGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const bool doTransform,
|
||||
const int rank
|
||||
)
|
||||
:
|
||||
GAMGInterfaceField(GAMGCp, doTransform, rank),
|
||||
regionCoupledGAMGInterface_
|
||||
(
|
||||
refCast<const regionCoupledGAMGInterface>(GAMGCp)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledGAMGInterfaceField::~regionCoupledGAMGInterfaceField()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,136 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledGAMGInterfaceField
|
||||
|
||||
Description
|
||||
GAMG agglomerated region coupled interface field.
|
||||
|
||||
SourceFiles
|
||||
regionCoupledGAMGInterfaceField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledGAMGInterfaceField_H
|
||||
#define regionCoupledGAMGInterfaceField_H
|
||||
|
||||
#include "GAMGInterfaceField.H"
|
||||
#include "regionCoupledGAMGInterface.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledGAMGInterfaceField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledGAMGInterfaceField
|
||||
:
|
||||
public GAMGInterfaceField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Local reference cast into the cyclic interface
|
||||
const regionCoupledGAMGInterface& regionCoupledGAMGInterface_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
regionCoupledGAMGInterfaceField
|
||||
(
|
||||
const regionCoupledGAMGInterfaceField&
|
||||
) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const regionCoupledGAMGInterfaceField&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupled");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from GAMG interface and fine level interface field
|
||||
regionCoupledGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const lduInterfaceField& fineInterfaceField
|
||||
);
|
||||
|
||||
//- Construct from GAMG interface and fine level interface field
|
||||
regionCoupledGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const bool doTransform,
|
||||
const int rank
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledGAMGInterfaceField();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return size
|
||||
label size() const
|
||||
{
|
||||
return regionCoupledGAMGInterface_.size();
|
||||
}
|
||||
|
||||
|
||||
//- Interface matrix update
|
||||
virtual void updateInterfaceMatrix
|
||||
(
|
||||
solveScalarField&,
|
||||
const bool add,
|
||||
const solveScalarField&,
|
||||
const scalarField&,
|
||||
const direction,
|
||||
const Pstream::commsTypes commsType
|
||||
) const
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,90 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledWallGAMGInterfaceField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "lduMatrix.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledWallGAMGInterfaceField, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
GAMGInterfaceField,
|
||||
regionCoupledWallGAMGInterfaceField,
|
||||
lduInterface
|
||||
);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
GAMGInterfaceField,
|
||||
regionCoupledWallGAMGInterfaceField,
|
||||
lduInterfaceField
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledWallGAMGInterfaceField::regionCoupledWallGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const lduInterfaceField& fineInterface
|
||||
)
|
||||
:
|
||||
GAMGInterfaceField(GAMGCp, fineInterface),
|
||||
regionCoupledGAMGInterface_
|
||||
(
|
||||
refCast<const regionCoupledWallGAMGInterface>(GAMGCp)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledWallGAMGInterfaceField::regionCoupledWallGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const bool doTransform,
|
||||
const int rank
|
||||
)
|
||||
:
|
||||
GAMGInterfaceField(GAMGCp, doTransform, rank),
|
||||
regionCoupledGAMGInterface_
|
||||
(
|
||||
refCast<const regionCoupledWallGAMGInterface>(GAMGCp)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledWallGAMGInterfaceField::~regionCoupledWallGAMGInterfaceField
|
||||
()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,137 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledWallGAMGInterfaceField
|
||||
|
||||
Description
|
||||
GAMG agglomerated region coupled interface field.
|
||||
|
||||
SourceFiles
|
||||
regionCoupledWallGAMGInterfaceField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledWallGAMGInterfaceField_H
|
||||
#define regionCoupledWallGAMGInterfaceField_H
|
||||
|
||||
#include "GAMGInterfaceField.H"
|
||||
#include "regionCoupledWallGAMGInterface.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledWallGAMGInterfaceField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledWallGAMGInterfaceField
|
||||
:
|
||||
public GAMGInterfaceField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Local reference cast into the region coupled interface
|
||||
const regionCoupledWallGAMGInterface& regionCoupledGAMGInterface_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
regionCoupledWallGAMGInterfaceField
|
||||
(
|
||||
const regionCoupledWallGAMGInterfaceField&
|
||||
) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const regionCoupledWallGAMGInterfaceField&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupledWall");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from GAMG interface and fine level interface field
|
||||
regionCoupledWallGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const lduInterfaceField& fineInterfaceField
|
||||
);
|
||||
|
||||
//- Construct from GAMG interface and fine level interface field
|
||||
regionCoupledWallGAMGInterfaceField
|
||||
(
|
||||
const GAMGInterface& GAMGCp,
|
||||
const bool doTransform,
|
||||
const int rank
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledWallGAMGInterfaceField();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return size
|
||||
label size() const
|
||||
{
|
||||
return regionCoupledGAMGInterface_.size();
|
||||
}
|
||||
|
||||
|
||||
//- Interface matrix update
|
||||
virtual void updateInterfaceMatrix
|
||||
(
|
||||
solveScalarField&,
|
||||
const bool add,
|
||||
const solveScalarField&,
|
||||
const scalarField&,
|
||||
const direction,
|
||||
const Pstream::commsTypes commsType
|
||||
) const
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,232 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "AMIInterpolation.H"
|
||||
#include "regionCoupledBaseGAMGInterface.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "Map.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledBaseGAMGInterface::regionCoupledBaseGAMGInterface
|
||||
(
|
||||
const label index,
|
||||
const lduInterfacePtrsList& coarseInterfaces,
|
||||
const lduInterface& fineInterface,
|
||||
const labelField& localRestrictAddressing,
|
||||
const labelField& neighbourRestrictAddressing,
|
||||
const label fineLevelIndex,
|
||||
const label coarseComm
|
||||
)
|
||||
:
|
||||
GAMGInterface
|
||||
(
|
||||
index,
|
||||
coarseInterfaces
|
||||
),
|
||||
fineRegionCoupledLduInterface_
|
||||
(
|
||||
refCast<const regionCoupledLduInterface>(fineInterface)
|
||||
)
|
||||
{
|
||||
// Construct face agglomeration from cell agglomeration
|
||||
{
|
||||
// From coarse face to cell
|
||||
DynamicList<label> dynFaceCells(localRestrictAddressing.size());
|
||||
|
||||
// From face to coarse face
|
||||
DynamicList<label> dynFaceRestrictAddressing
|
||||
(
|
||||
localRestrictAddressing.size()
|
||||
);
|
||||
|
||||
Map<label> masterToCoarseFace(localRestrictAddressing.size());
|
||||
|
||||
forAll(localRestrictAddressing, ffi)
|
||||
{
|
||||
label curMaster = localRestrictAddressing[ffi];
|
||||
|
||||
const auto fnd = masterToCoarseFace.cfind(curMaster);
|
||||
|
||||
if (fnd.found())
|
||||
{
|
||||
// Already have coarse face
|
||||
dynFaceRestrictAddressing.append(fnd.val());
|
||||
}
|
||||
else
|
||||
{
|
||||
// New coarse face
|
||||
const label coarseI = dynFaceCells.size();
|
||||
dynFaceRestrictAddressing.append(coarseI);
|
||||
dynFaceCells.append(curMaster);
|
||||
masterToCoarseFace.insert(curMaster, coarseI);
|
||||
}
|
||||
}
|
||||
|
||||
faceCells_.transfer(dynFaceCells);
|
||||
faceRestrictAddressing_.transfer(dynFaceRestrictAddressing);
|
||||
}
|
||||
|
||||
/*
|
||||
// On the owner side construct the AMI
|
||||
if (fineRegionCoupledLduInterface_.owner())
|
||||
{
|
||||
const polyMesh& nbrMesh =
|
||||
fineRegionCoupledLduInterface_.nbrMesh();
|
||||
|
||||
const GAMGAgglomeration* nbrAggPtr = nbrMesh.thisDb().findObject
|
||||
<GAMGAgglomeration>
|
||||
(
|
||||
GAMGAgglomeration::typeName
|
||||
);
|
||||
|
||||
if (nbrAggPtr)
|
||||
{
|
||||
const GAMGAgglomeration& nbrAgg = *nbrAggPtr;
|
||||
|
||||
label nbrLevel(-1);
|
||||
if (nbrAgg.size() > fineLevelIndex)
|
||||
{
|
||||
nbrLevel = fineLevelIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
nbrLevel = nbrAgg.size() - 1;
|
||||
}
|
||||
|
||||
const labelField& nbrRestrictMap =
|
||||
nbrAgg.restrictAddressing(nbrLevel);
|
||||
|
||||
const labelUList& nbrFaceCells =
|
||||
nbrLduInterface
|
||||
(
|
||||
nbrLevel,
|
||||
neighbPatchID()
|
||||
).faceCells();
|
||||
|
||||
|
||||
const IndirectList<label> nbrPatchRestrictMap
|
||||
(
|
||||
nbrRestrictMap,
|
||||
nbrFaceCells
|
||||
);
|
||||
|
||||
labelList nbrFaceRestrictAddressing;
|
||||
{
|
||||
// From face to coarse face
|
||||
DynamicList<label> dynNbrFaceRestrictAddressing
|
||||
(
|
||||
nbrPatchRestrictMap.size()
|
||||
);
|
||||
|
||||
Map<label> masterToCoarseFace(nbrPatchRestrictMap.size());
|
||||
|
||||
forAll(nbrPatchRestrictMap, ffi)
|
||||
{
|
||||
label curMaster = nbrPatchRestrictMap[ffi];
|
||||
|
||||
const auto fnd = masterToCoarseFace.cfind(curMaster);
|
||||
|
||||
if (fnd.found())
|
||||
{
|
||||
// Already have coarse face
|
||||
dynNbrFaceRestrictAddressing.append(fnd.val());
|
||||
}
|
||||
else
|
||||
{
|
||||
// New coarse face
|
||||
const label coarseI = masterToCoarseFace.size();
|
||||
dynNbrFaceRestrictAddressing.append(coarseI);
|
||||
masterToCoarseFace.insert(curMaster, coarseI);
|
||||
}
|
||||
}
|
||||
|
||||
nbrFaceRestrictAddressing.transfer
|
||||
(
|
||||
dynNbrFaceRestrictAddressing
|
||||
);
|
||||
}
|
||||
|
||||
amiPtr_.reset
|
||||
(
|
||||
new AMIPatchToPatchInterpolation
|
||||
(
|
||||
fineRegionCoupledLduInterface_.AMI(),
|
||||
faceRestrictAddressing_,
|
||||
nbrFaceRestrictAddressing
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< " GAMGAgglomeration was not found in the nbr mesh. "
|
||||
<< " Check on the cacheAgglomeration flag in fvSolution"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledBaseGAMGInterface::~regionCoupledBaseGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::labelField> Foam::regionCoupledBaseGAMGInterface::
|
||||
internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes,
|
||||
const labelUList& iF
|
||||
) const
|
||||
{
|
||||
/*
|
||||
//const labelUList& nbrFaceCells = neighbPatch().faceCells();
|
||||
|
||||
const labelUList& nbrFaceCells = nbrLduInterface().faceCells();
|
||||
|
||||
tmp<labelField> tpnf(new labelField(nbrFaceCells.size()));
|
||||
labelField& pnf = tpnf();
|
||||
|
||||
forAll(pnf, facei)
|
||||
{
|
||||
pnf[facei] = iF[nbrFaceCells[facei]];
|
||||
}
|
||||
*/
|
||||
tmp<labelField> tpnf(new labelField(iF));
|
||||
|
||||
return tpnf;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,175 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledBaseGAMGInterface
|
||||
|
||||
Description
|
||||
Base class for GAMG agglomerated coupled region interface.
|
||||
|
||||
SourceFiles
|
||||
regionCoupledBaseGAMGInterface.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledBaseGAMGInterface_H
|
||||
#define regionCoupledBaseGAMGInterface_H
|
||||
|
||||
#include "GAMGInterface.H"
|
||||
#include "regionCoupledLduInterface.H"
|
||||
#include "GAMGAgglomeration.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledBaseGAMGInterface Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledBaseGAMGInterface
|
||||
:
|
||||
public GAMGInterface,
|
||||
virtual public regionCoupledLduInterface
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Reference for the regionCoupledBaseFvPatch from which this is
|
||||
// agglomerated
|
||||
const regionCoupledLduInterface& fineRegionCoupledLduInterface_;
|
||||
|
||||
//- AMI interface
|
||||
//autoPtr<AMIPatchToPatchInterpolation> amiPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
regionCoupledBaseGAMGInterface
|
||||
(
|
||||
const regionCoupledBaseGAMGInterface&
|
||||
) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const regionCoupledBaseGAMGInterface&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from fine level interface,
|
||||
// local and neighbour restrict addressing
|
||||
regionCoupledBaseGAMGInterface
|
||||
(
|
||||
const label index,
|
||||
const lduInterfacePtrsList& coarseInterfaces,
|
||||
const lduInterface& fineInterface,
|
||||
const labelField& restrictAddressing,
|
||||
const labelField& neighbourRestrictAddressing,
|
||||
const label fineLevelIndex,
|
||||
const label coarseComm
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledBaseGAMGInterface();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Interface transfer functions
|
||||
|
||||
//- Transfer and return internal field adjacent to the interface
|
||||
virtual tmp<labelField> internalFieldTransfer
|
||||
(
|
||||
const Pstream::commsTypes commsType,
|
||||
const labelUList& iF
|
||||
) const;
|
||||
|
||||
|
||||
//- Cyclic interface functions
|
||||
|
||||
//- Return neighbour processor number
|
||||
virtual label neighbPatchID() const
|
||||
{
|
||||
return fineRegionCoupledLduInterface_.neighbPatchID();
|
||||
}
|
||||
|
||||
virtual bool owner() const
|
||||
{
|
||||
return fineRegionCoupledLduInterface_.owner();
|
||||
}
|
||||
|
||||
virtual const regionCoupledBaseGAMGInterface& neighbPatch() const
|
||||
{
|
||||
return dynamic_cast<const regionCoupledBaseGAMGInterface&>
|
||||
(
|
||||
fineRegionCoupledLduInterface_.neighbPatch()
|
||||
);
|
||||
}
|
||||
|
||||
//virtual const AMIPatchToPatchInterpolation& AMI() const
|
||||
//{
|
||||
// return *amiPtr_;
|
||||
//}
|
||||
|
||||
virtual const polyMesh& nbrMesh() const
|
||||
{
|
||||
return fineRegionCoupledLduInterface_.nbrMesh();
|
||||
}
|
||||
|
||||
const lduInterface& nbrLduInterface
|
||||
(
|
||||
const label fineLevelIndex,
|
||||
const label index
|
||||
) const
|
||||
{
|
||||
const GAMGAgglomeration& agg = nbrMesh().thisDb().lookupObject
|
||||
<
|
||||
GAMGAgglomeration
|
||||
>
|
||||
(
|
||||
GAMGAgglomeration::typeName
|
||||
);
|
||||
|
||||
const lduMesh& mesh = agg.meshLevel(fineLevelIndex);
|
||||
return mesh.interfaces()[index];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,77 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledGAMGInterface.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledGAMGInterface, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
GAMGInterface,
|
||||
regionCoupledGAMGInterface,
|
||||
lduInterface
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledGAMGInterface::regionCoupledGAMGInterface
|
||||
(
|
||||
const label index,
|
||||
const lduInterfacePtrsList& coarseInterfaces,
|
||||
const lduInterface& fineInterface,
|
||||
const labelField& localRestrictAddressing,
|
||||
const labelField& neighbourRestrictAddressing,
|
||||
const label fineLevelIndex,
|
||||
const label coarseComm
|
||||
)
|
||||
:
|
||||
regionCoupledBaseGAMGInterface
|
||||
(
|
||||
index,
|
||||
coarseInterfaces,
|
||||
fineInterface,
|
||||
localRestrictAddressing,
|
||||
neighbourRestrictAddressing,
|
||||
fineLevelIndex,
|
||||
coarseComm
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledGAMGInterface::~regionCoupledGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,110 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledGAMGInterface
|
||||
|
||||
Description
|
||||
GAMG agglomerated coupled region interface.
|
||||
|
||||
SourceFiles
|
||||
regionCoupledGAMGInterface.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledGAMGInterface_H
|
||||
#define regionCoupledGAMGInterface_H
|
||||
|
||||
#include "regionCoupledBaseGAMGInterface.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledGAMGInterface Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledGAMGInterface
|
||||
:
|
||||
public regionCoupledBaseGAMGInterface
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
regionCoupledGAMGInterface(const regionCoupledGAMGInterface&) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const regionCoupledGAMGInterface&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupled");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from fine level interface,
|
||||
// local and neighbour restrict addressing
|
||||
regionCoupledGAMGInterface
|
||||
(
|
||||
const label index,
|
||||
const lduInterfacePtrsList& coarseInterfaces,
|
||||
const lduInterface& fineInterface,
|
||||
const labelField& restrictAddressing,
|
||||
const labelField& neighbourRestrictAddressing,
|
||||
const label fineLevelIndex,
|
||||
const label coarseComm
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledGAMGInterface();
|
||||
|
||||
|
||||
// I/O
|
||||
|
||||
//- Write to stream
|
||||
virtual void write(Ostream&) const
|
||||
{
|
||||
//TBD. How to serialise the AMI such that we can stream
|
||||
// regionCoupledGAMGInterface.
|
||||
NotImplemented;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,77 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledWallGAMGInterface.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledWallGAMGInterface, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
GAMGInterface,
|
||||
regionCoupledWallGAMGInterface,
|
||||
lduInterface
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledWallGAMGInterface::regionCoupledWallGAMGInterface
|
||||
(
|
||||
const label index,
|
||||
const lduInterfacePtrsList& coarseInterfaces,
|
||||
const lduInterface& fineInterface,
|
||||
const labelField& localRestrictAddressing,
|
||||
const labelField& neighbourRestrictAddressing,
|
||||
const label fineLevelIndex,
|
||||
const label coarseComm
|
||||
)
|
||||
:
|
||||
regionCoupledBaseGAMGInterface
|
||||
(
|
||||
index,
|
||||
coarseInterfaces,
|
||||
fineInterface,
|
||||
localRestrictAddressing,
|
||||
neighbourRestrictAddressing,
|
||||
fineLevelIndex,
|
||||
coarseComm
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledWallGAMGInterface::~regionCoupledWallGAMGInterface()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,116 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledWallGAMGInterface
|
||||
|
||||
Description
|
||||
GAMG agglomerated coupled region interface.
|
||||
|
||||
SourceFiles
|
||||
regionCoupledWallGAMGInterface.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledWallGAMGInterface_H
|
||||
#define regionCoupledWallGAMGInterface_H
|
||||
|
||||
#include "regionCoupledBaseGAMGInterface.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledWallGAMGInterface Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledWallGAMGInterface
|
||||
:
|
||||
public regionCoupledBaseGAMGInterface
|
||||
{
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- No copy construct
|
||||
regionCoupledWallGAMGInterface
|
||||
(
|
||||
const regionCoupledWallGAMGInterface&
|
||||
) = delete;
|
||||
|
||||
//- No copy assignment
|
||||
void operator=(const regionCoupledWallGAMGInterface&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupledWall");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from fine level interface,
|
||||
// local and neighbour restrict addressing
|
||||
regionCoupledWallGAMGInterface
|
||||
(
|
||||
const label index,
|
||||
const lduInterfacePtrsList& coarseInterfaces,
|
||||
const lduInterface& fineInterface,
|
||||
const labelField& restrictAddressing,
|
||||
const labelField& neighbourRestrictAddressing,
|
||||
const label fineLevelIndex,
|
||||
const label coarseComm
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledWallGAMGInterface();
|
||||
|
||||
|
||||
// I/O
|
||||
|
||||
//- Write to stream
|
||||
virtual void write(Ostream&) const
|
||||
{
|
||||
//TBD. How to serialise the AMI such that we can stream
|
||||
// regionCoupledWallGAMGInterface.
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,42 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledLduInterface.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledLduInterface, 0);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledLduInterface::~regionCoupledLduInterface()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,105 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledLduInterface
|
||||
|
||||
Description
|
||||
An abstract base class for region coupled interfaces
|
||||
|
||||
SourceFiles
|
||||
regionCoupledLduInterface.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledLduInterface_H
|
||||
#define regionCoupledLduInterface_H
|
||||
|
||||
#include "primitiveFieldsFwd.H"
|
||||
#include "AMIPatchToPatchInterpolation.H"
|
||||
#include "polyMesh.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledLduInterface Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledLduInterface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupledLduInterface");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
regionCoupledLduInterface()
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledLduInterface();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return neighbour
|
||||
virtual label neighbPatchID() const = 0;
|
||||
|
||||
//- Is it owner?
|
||||
virtual bool owner() const = 0;
|
||||
|
||||
//- Return neighb regionCoupledLduInterface
|
||||
virtual const regionCoupledLduInterface& neighbPatch() const = 0;
|
||||
|
||||
//- Return AMI
|
||||
//virtual const AMIPatchToPatchInterpolation& AMI() const = 0;
|
||||
|
||||
//- Return nbrMesh
|
||||
virtual const polyMesh& nbrMesh() const = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,50 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledPointPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(regionCoupledPointPatch, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
facePointPatch,
|
||||
regionCoupledPointPatch,
|
||||
polyPatch
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,86 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledPointPatch
|
||||
|
||||
Description
|
||||
Cyclic AMI point patch - place holder only
|
||||
|
||||
SourceFiles
|
||||
regionCoupledPointPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledPointPatch_H
|
||||
#define regionCoupledPointPatch_H
|
||||
|
||||
#include "facePointPatch.H"
|
||||
#include "regionCoupledPolyPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledPointPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledPointPatch
|
||||
:
|
||||
public facePointPatch
|
||||
{
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(regionCoupledPolyPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
regionCoupledPointPatch
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const pointBoundaryMesh& bm
|
||||
):
|
||||
facePointPatch(patch, bm)
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,50 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledWallPointPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(regionCoupledWallPointPatch, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
facePointPatch,
|
||||
regionCoupledWallPointPatch,
|
||||
polyPatch
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,86 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledWallPointPatch
|
||||
|
||||
Description
|
||||
Cyclic AMI point patch - place holder only
|
||||
|
||||
SourceFiles
|
||||
regionCoupledWallPointPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledWallPointPatch_H
|
||||
#define regionCoupledWallPointPatch_H
|
||||
|
||||
#include "facePointPatch.H"
|
||||
#include "regionCoupledWallPolyPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledWallPointPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledWallPointPatch
|
||||
:
|
||||
public facePointPatch
|
||||
{
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(regionCoupledWallPolyPatch::typeName_());
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
regionCoupledWallPointPatch
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const pointBoundaryMesh& bm
|
||||
):
|
||||
facePointPatch(patch, bm)
|
||||
{}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,347 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledBase.H"
|
||||
#include "SubField.H"
|
||||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledBase, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
void Foam::regionCoupledBase::resetAMI() const
|
||||
{
|
||||
if (owner())
|
||||
{
|
||||
AMIPtr_.clear();
|
||||
|
||||
const polyPatch& nbr = refCast<const polyPatch>(neighbPatch());
|
||||
pointField nbrPoints = nbr.localPoints();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
const Time& t = patch_.boundaryMesh().mesh().time();
|
||||
OFstream os(t.path()/patch_.name() + "_neighbourPatch-org.obj");
|
||||
meshTools::writeOBJ(os, nbr.localFaces(), nbrPoints);
|
||||
}
|
||||
|
||||
// transform neighbour patch to local system
|
||||
//transformPosition(nbrPoints);
|
||||
primitivePatch nbrPatch0
|
||||
(
|
||||
SubList<face>
|
||||
(
|
||||
nbr.localFaces(),
|
||||
nbr.size()
|
||||
),
|
||||
nbrPoints
|
||||
);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
const Time& t = patch_.boundaryMesh().mesh().time();
|
||||
OFstream osN(t.path()/patch_.name() + "_neighbourPatch-trans.obj");
|
||||
meshTools::writeOBJ(osN, nbrPatch0.localFaces(), nbrPoints);
|
||||
|
||||
OFstream osO(t.path()/patch_.name() + "_ownerPatch.obj");
|
||||
meshTools::writeOBJ
|
||||
(
|
||||
osO,
|
||||
patch_.localFaces(),
|
||||
patch_.localPoints()
|
||||
);
|
||||
}
|
||||
|
||||
// Construct/apply AMI interpolation to determine addressing and weights
|
||||
AMIPtr_.reset
|
||||
(
|
||||
new AMIPatchToPatchInterpolation
|
||||
(
|
||||
patch_,
|
||||
nbrPatch0,
|
||||
surfPtr(),
|
||||
faceAreaIntersect::tmMesh,
|
||||
true,
|
||||
AMIPatchToPatchInterpolation::imFaceAreaWeight,
|
||||
-1,
|
||||
AMIReverse_
|
||||
)
|
||||
);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "regionCoupledBase : " << patch_.name()
|
||||
<< " constructed AMI with " << nl
|
||||
<< " " << ":srcAddress:" << AMIPtr_().srcAddress().size()
|
||||
<< nl
|
||||
<< " " << " tgAddress :" << AMIPtr_().tgtAddress().size()
|
||||
<< nl << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::regionCoupledBase::clearGeom()
|
||||
{
|
||||
AMIPtr_.clear();
|
||||
surfPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledBase::regionCoupledBase
|
||||
(
|
||||
const polyPatch& pp
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
nbrPatchName_(word::null),
|
||||
nbrPatchID_(-1),
|
||||
nbrRegionName_(word::null),
|
||||
sameRegion_(false),
|
||||
AMIPtr_(nullptr),
|
||||
AMIReverse_(false),
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(fileName("surface"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledBase::regionCoupledBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
nbrPatchName_(dict.lookup("neighbourPatch")),
|
||||
nbrPatchID_(-1),
|
||||
nbrRegionName_(dict.lookup("neighbourRegion")),
|
||||
sameRegion_(nbrRegionName_ == patch_.boundaryMesh().mesh().name()),
|
||||
AMIPtr_(nullptr),
|
||||
AMIReverse_(dict.lookupOrDefault("flipNormals", false)),
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(dict.subOrEmptyDict("surface"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledBase::regionCoupledBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const regionCoupledBase& mpb
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
nbrPatchName_(mpb.nbrPatchName_),
|
||||
nbrPatchID_(mpb.nbrPatchID_),
|
||||
nbrRegionName_(mpb.nbrRegionName_),
|
||||
sameRegion_(mpb.sameRegion_),
|
||||
AMIPtr_(nullptr),
|
||||
AMIReverse_(mpb.AMIReverse_),
|
||||
surfPtr_(mpb.surfPtr_),
|
||||
surfDict_(mpb.surfDict_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledBase::~regionCoupledBase()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::label Foam::regionCoupledBase::neighbPatchID() const
|
||||
{
|
||||
if (nbrPatchID_ == -1)
|
||||
{
|
||||
const polyMesh* meshPtr =
|
||||
patch_.boundaryMesh().mesh().time().findObject<polyMesh>
|
||||
(
|
||||
nbrRegionName_
|
||||
);
|
||||
|
||||
if (meshPtr)
|
||||
{
|
||||
const polyMesh& mesh = *meshPtr;
|
||||
|
||||
nbrPatchID_ = mesh.boundaryMesh().findPatchID(nbrPatchName_);
|
||||
|
||||
if (nbrPatchID_ == -1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Illegal neighbourPatch name " << nbrPatchName_
|
||||
<< nl << "Valid patch names are "
|
||||
<< mesh.boundaryMesh().names()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// Check that it is a cyclic AMI patch
|
||||
const regionCoupledBase& nbrPatch =
|
||||
refCast<const regionCoupledBase>
|
||||
(
|
||||
mesh.boundaryMesh()[nbrPatchID_]
|
||||
);
|
||||
|
||||
if (nbrPatch.nbrPatchName() != patch_.name())
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Patch " << patch_.name()
|
||||
<< " specifies neighbour patch " << nbrPatchName()
|
||||
<< nl << " but that in return specifies "
|
||||
<< nbrPatch.nbrPatchName() << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nbrPatchID_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::regionCoupledBase::owner() const
|
||||
{
|
||||
if (nbrRegionName_ == patch_.boundaryMesh().mesh().name())
|
||||
{
|
||||
return patch_.index() < neighbPatchID();
|
||||
}
|
||||
else
|
||||
{
|
||||
return patch_.boundaryMesh().mesh().name() < nbrRegionName_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const Foam::autoPtr<Foam::searchableSurface>&Foam::regionCoupledBase::
|
||||
surfPtr() const
|
||||
{
|
||||
const word surfType(surfDict_.lookupOrDefault<word>("type", "none"));
|
||||
|
||||
if (!surfPtr_.valid() && owner() && surfType != "none")
|
||||
{
|
||||
word surfName(surfDict_.lookupOrDefault("name", patch_.name()));
|
||||
|
||||
const polyMesh& mesh = patch_.boundaryMesh().mesh();
|
||||
|
||||
surfPtr_ =
|
||||
searchableSurface::New
|
||||
(
|
||||
surfType,
|
||||
IOobject
|
||||
(
|
||||
surfName,
|
||||
mesh.time().constant(),
|
||||
"triSurface",
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
surfDict_
|
||||
);
|
||||
}
|
||||
|
||||
return surfPtr_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::AMIPatchToPatchInterpolation& Foam::regionCoupledBase::AMI() const
|
||||
{
|
||||
if (!owner())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "AMI interpolator only available to owner patch"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (!AMIPtr_.valid())
|
||||
{
|
||||
resetAMI();
|
||||
}
|
||||
|
||||
return *AMIPtr_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::regionCoupledBase&
|
||||
Foam::regionCoupledBase::neighbPatch() const
|
||||
{
|
||||
const polyMesh& mesh =
|
||||
patch_.boundaryMesh().mesh().time().lookupObject<polyMesh>
|
||||
(
|
||||
nbrRegionName_
|
||||
);
|
||||
|
||||
const polyPatch& pp = mesh.boundaryMesh()[neighbPatchID()];
|
||||
return refCast<const regionCoupledBase>(pp);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::regionCoupledBase::order
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const primitivePatch& pp,
|
||||
labelList& faceMap,
|
||||
labelList& rotation
|
||||
) const
|
||||
{
|
||||
faceMap.setSize(pp.size());
|
||||
faceMap = -1;
|
||||
|
||||
rotation.setSize(pp.size());
|
||||
rotation = 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledBase::write(Ostream& os) const
|
||||
{
|
||||
os.writeEntry("neighbourPatch", nbrPatchName_);
|
||||
os.writeEntry("neighbourRegion", nbrRegionName_);
|
||||
|
||||
if (AMIReverse_)
|
||||
{
|
||||
os.writeEntry("flipNormals", AMIReverse_);
|
||||
}
|
||||
|
||||
if (!surfDict_.empty())
|
||||
{
|
||||
surfDict_.writeEntry(surfDict_.dictName(), os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,221 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledBase
|
||||
|
||||
Description
|
||||
Base class with common functinality for regionCoupled polyPatch.
|
||||
It includes AMI.
|
||||
|
||||
|
||||
SourceFiles
|
||||
regionCoupledBase.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledBase_H
|
||||
#define regionCoupledBase_H
|
||||
|
||||
#include "AMIPatchToPatchInterpolation.H"
|
||||
#include "polyBoundaryMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledBase Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledBase
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Patch to sample
|
||||
const polyPatch& patch_;
|
||||
|
||||
//- Name of other half
|
||||
const word nbrPatchName_;
|
||||
|
||||
//- Index of other half
|
||||
mutable label nbrPatchID_;
|
||||
|
||||
//- Name of other region
|
||||
const word nbrRegionName_;
|
||||
|
||||
//- Same region
|
||||
const bool sameRegion_;
|
||||
|
||||
//- AMI interpolation class
|
||||
mutable autoPtr<AMIPatchToPatchInterpolation> AMIPtr_;
|
||||
|
||||
//- Flag to indicate that slave patch should be reversed for AMI
|
||||
const bool AMIReverse_;
|
||||
|
||||
//- Projection surface
|
||||
mutable autoPtr<searchableSurface> surfPtr_;
|
||||
|
||||
//- Dictionary used during projection surface construction
|
||||
const dictionary surfDict_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Reset the AMI interpolator
|
||||
void resetAMI() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//- Clear geometry
|
||||
virtual void clearGeom();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupledBase");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch
|
||||
regionCoupledBase(const polyPatch&);
|
||||
|
||||
//- Construct from dictionary
|
||||
regionCoupledBase(const polyPatch&, const dictionary&);
|
||||
|
||||
//- Construct as copy, resetting patch
|
||||
regionCoupledBase(const polyPatch&, const regionCoupledBase&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledBase();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Neighbour patch name
|
||||
const word& nbrPatchName() const
|
||||
{
|
||||
return nbrPatchName_;
|
||||
}
|
||||
|
||||
//- Neighbour region name
|
||||
const word& nbrRegionName() const
|
||||
{
|
||||
return nbrRegionName_;
|
||||
}
|
||||
|
||||
//- Cached sampleRegion != mesh.name()
|
||||
bool sameRegion() const
|
||||
{
|
||||
return sameRegion_;
|
||||
}
|
||||
|
||||
//- Neighbour patch ID
|
||||
label neighbPatchID() const;
|
||||
|
||||
//- Does this side own the patch?
|
||||
bool owner() const;
|
||||
|
||||
//- Return a reference to the neighbour patch
|
||||
const regionCoupledBase& neighbPatch() const;
|
||||
|
||||
//- Return a reference to the projection surface
|
||||
const autoPtr<searchableSurface>& surfPtr() const;
|
||||
|
||||
//- Return a reference to the AMI interpolator
|
||||
const AMIPatchToPatchInterpolation& AMI() const;
|
||||
|
||||
|
||||
// Interpolations
|
||||
|
||||
//- Interpolate field
|
||||
template<class Type>
|
||||
tmp<Field<Type>> interpolate(const Field<Type>& fld) const;
|
||||
|
||||
//- Interpolate tmp field
|
||||
template<class Type>
|
||||
tmp<Field<Type>> interpolate
|
||||
(
|
||||
const tmp<Field<Type>>& tFld
|
||||
) const;
|
||||
|
||||
//- Low-level interpolate List
|
||||
template<class Type, class BinaryOp>
|
||||
void interpolate
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const BinaryOp& bop,
|
||||
List<Type>& result
|
||||
) const;
|
||||
|
||||
|
||||
//- Return new ordering for primitivePatch.
|
||||
// Ordering is -faceMap: for every face
|
||||
// index of the new face -rotation:for every new face the clockwise
|
||||
// shift of the original face. Return false if nothing changes
|
||||
// (faceMap is identity, rotation is 0), true otherwise.
|
||||
virtual bool order
|
||||
(
|
||||
PstreamBuffers&,
|
||||
const primitivePatch&,
|
||||
labelList& faceMap,
|
||||
labelList& rotation
|
||||
) const;
|
||||
|
||||
|
||||
//- Return the type
|
||||
virtual const word& regionCoupleType() const = 0;
|
||||
|
||||
//- Write the polyPatch data as a dictionary
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "regionCoupledBaseTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,83 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::regionCoupledBase::interpolate
|
||||
(
|
||||
const Field<Type>& fld
|
||||
) const
|
||||
{
|
||||
if (owner())
|
||||
{
|
||||
return AMI().interpolateToSource(fld);
|
||||
}
|
||||
else
|
||||
{
|
||||
return neighbPatch().AMI().interpolateToTarget(fld);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type>> Foam::regionCoupledBase::interpolate
|
||||
(
|
||||
const tmp<Field<Type>>& tFld
|
||||
) const
|
||||
{
|
||||
if (owner())
|
||||
{
|
||||
return AMI().interpolateToSource(tFld);
|
||||
}
|
||||
else
|
||||
{
|
||||
return neighbPatch().AMI().interpolateToTarget(tFld);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type, class BinaryOp>
|
||||
void Foam::regionCoupledBase::interpolate
|
||||
(
|
||||
const UList<Type>& fld,
|
||||
const BinaryOp& bop,
|
||||
List<Type>& result
|
||||
) const
|
||||
{
|
||||
if (owner())
|
||||
{
|
||||
AMI().interpolateToSource(fld, bop, result);
|
||||
}
|
||||
else
|
||||
{
|
||||
neighbPatch().AMI().interpolateToTarget(fld, bop, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,172 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledPolyPatch.H"
|
||||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledPolyPatch, 0);
|
||||
|
||||
addToRunTimeSelectionTable(polyPatch, regionCoupledPolyPatch, word);
|
||||
addToRunTimeSelectionTable(polyPatch, regionCoupledPolyPatch, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledPolyPatch::regionCoupledPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
polyPatch(name, size, start, index, bm, patchType),
|
||||
regionCoupledBase(static_cast<const polyPatch&>(*this))
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledPolyPatch::regionCoupledPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
polyPatch(name, dict, index, bm, patchType),
|
||||
regionCoupledBase(*this, dict)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledPolyPatch::regionCoupledPolyPatch
|
||||
(
|
||||
const regionCoupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm),
|
||||
regionCoupledBase(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledPolyPatch::regionCoupledPolyPatch
|
||||
(
|
||||
const regionCoupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, newSize, newStart),
|
||||
regionCoupledBase(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledPolyPatch::regionCoupledPolyPatch
|
||||
(
|
||||
const regionCoupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
regionCoupledBase(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledPolyPatch::~regionCoupledPolyPatch()
|
||||
{
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::regionCoupledPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
polyPatch::initGeometry(pBufs);
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledPolyPatch::initMovePoints
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
polyPatch::initMovePoints(pBufs, p);
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledPolyPatch::movePoints
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
polyPatch::movePoints(pBufs, p);
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
||||
{
|
||||
polyPatch::initUpdateMesh(pBufs);
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledPolyPatch::updateMesh(PstreamBuffers& pBufs)
|
||||
{
|
||||
polyPatch::updateMesh(pBufs);
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledPolyPatch::write(Ostream& os) const
|
||||
{
|
||||
polyPatch::write(os);
|
||||
regionCoupledBase::write(os);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,225 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledPolyPatch
|
||||
|
||||
Description
|
||||
Region coupled polyPatch
|
||||
|
||||
SourceFiles
|
||||
regionCoupledPolyPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledPolyPatch_H
|
||||
#define regionCoupledPolyPatch_H
|
||||
|
||||
#include "regionCoupledBase.H"
|
||||
#include "polyBoundaryMesh.H"
|
||||
#include "polyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledPolyPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledPolyPatch
|
||||
:
|
||||
public polyPatch,
|
||||
public regionCoupledBase
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Initialise the calculation of the patch geometry
|
||||
virtual void initGeometry(PstreamBuffers&);
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
virtual void initMovePoints(PstreamBuffers& pBufs, const pointField&);
|
||||
|
||||
//- Correct patches after moving points
|
||||
virtual void movePoints(PstreamBuffers& pBufs, const pointField&);
|
||||
|
||||
//- Initialise the update of the patch topology
|
||||
virtual void initUpdateMesh(PstreamBuffers&);
|
||||
|
||||
//- Update of the patch topology
|
||||
virtual void updateMesh(PstreamBuffers&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupled");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from (base coupled patch) components
|
||||
regionCoupledPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
regionCoupledPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct as copy, resetting the boundary mesh
|
||||
regionCoupledPolyPatch
|
||||
(
|
||||
const regionCoupledPolyPatch&,
|
||||
const polyBoundaryMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original patch and resetting the
|
||||
// face list and boundary mesh information
|
||||
regionCoupledPolyPatch
|
||||
(
|
||||
const regionCoupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
regionCoupledPolyPatch
|
||||
(
|
||||
const regionCoupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
return autoPtr<polyPatch>(new regionCoupledPolyPatch(*this, bm));
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new regionCoupledPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
newSize,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new regionCoupledPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledPolyPatch();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Is it coupled?
|
||||
virtual bool coupled() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//- Return the type
|
||||
virtual const word& regionCoupleType() const
|
||||
{
|
||||
return type();
|
||||
}
|
||||
|
||||
|
||||
//- Write the polyPatch data as a dictionary
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,182 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "regionCoupledWallPolyPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "polyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(regionCoupledWallPolyPatch, 0);
|
||||
|
||||
addToRunTimeSelectionTable(polyPatch, regionCoupledWallPolyPatch, word);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
polyPatch,
|
||||
regionCoupledWallPolyPatch,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledWallPolyPatch::regionCoupledWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
wallPolyPatch(name, size, start, index, bm, patchType),
|
||||
regionCoupledBase(static_cast<const polyPatch&>(*this))
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledWallPolyPatch::regionCoupledWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
wallPolyPatch(name, dict, index, bm, patchType),
|
||||
regionCoupledBase(static_cast<const polyPatch&>(*this), dict)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledWallPolyPatch::regionCoupledWallPolyPatch
|
||||
(
|
||||
const regionCoupledWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
wallPolyPatch(pp, bm),
|
||||
regionCoupledBase(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledWallPolyPatch::regionCoupledWallPolyPatch
|
||||
(
|
||||
const regionCoupledWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
wallPolyPatch(pp, bm, index, newSize, newStart),
|
||||
regionCoupledBase(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
Foam::regionCoupledWallPolyPatch::regionCoupledWallPolyPatch
|
||||
(
|
||||
const regionCoupledWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
wallPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
regionCoupledBase(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::regionCoupledWallPolyPatch::~regionCoupledWallPolyPatch()
|
||||
{
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
wallPolyPatch::initGeometry(pBufs);
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::calcGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
wallPolyPatch::calcGeometry(pBufs);
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::initMovePoints
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
wallPolyPatch::initMovePoints(pBufs, p);
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::movePoints
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
const pointField& p
|
||||
)
|
||||
{
|
||||
wallPolyPatch::movePoints(pBufs, p);
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
|
||||
{
|
||||
wallPolyPatch::initUpdateMesh(pBufs);
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::updateMesh(PstreamBuffers& pBufs)
|
||||
{
|
||||
wallPolyPatch::updateMesh(pBufs);
|
||||
regionCoupledBase::clearGeom();
|
||||
}
|
||||
|
||||
|
||||
void Foam::regionCoupledWallPolyPatch::write(Ostream& os) const
|
||||
{
|
||||
wallPolyPatch::write(os);
|
||||
regionCoupledBase::write(os);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,224 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionCoupledWallPolyPatch
|
||||
|
||||
Description
|
||||
regionCoupledWall
|
||||
|
||||
SourceFiles
|
||||
regionCoupledWallPolyPatch.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef regionCoupledWallPolyPatch_H
|
||||
#define regionCoupledWallPolyPatch_H
|
||||
|
||||
#include "wallPolyPatch.H"
|
||||
#include "regionCoupledBase.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class polyMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class regionCoupledWallPolyPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class regionCoupledWallPolyPatch
|
||||
:
|
||||
public wallPolyPatch,
|
||||
public regionCoupledBase
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
//- Initialise the calculation of the patch geometry
|
||||
virtual void initGeometry(PstreamBuffers&);
|
||||
|
||||
//- Calculate the patch geometry
|
||||
virtual void calcGeometry(PstreamBuffers&);
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
virtual void initMovePoints(PstreamBuffers&, const pointField&);
|
||||
|
||||
//- Correct patches after moving points
|
||||
virtual void movePoints(PstreamBuffers&, const pointField&);
|
||||
|
||||
//- Initialise the update of the patch topology
|
||||
virtual void initUpdateMesh(PstreamBuffers&);
|
||||
|
||||
//- Update of the patch topology
|
||||
virtual void updateMesh(PstreamBuffers&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("regionCoupledWall");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
regionCoupledWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
|
||||
//- Construct from dictionary
|
||||
regionCoupledWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const label index,
|
||||
const polyBoundaryMesh& bm,
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct as copy, resetting the boundary mesh
|
||||
regionCoupledWallPolyPatch
|
||||
(
|
||||
const regionCoupledWallPolyPatch&,
|
||||
const polyBoundaryMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original patch and resetting the
|
||||
// face list and boundary mesh information
|
||||
regionCoupledWallPolyPatch
|
||||
(
|
||||
const regionCoupledWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
regionCoupledWallPolyPatch
|
||||
(
|
||||
const regionCoupledWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<wallPolyPatch::polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm
|
||||
) const
|
||||
{
|
||||
return autoPtr<wallPolyPatch::polyPatch>
|
||||
(
|
||||
new regionCoupledWallPolyPatch(*this, bm)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<wallPolyPatch::polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const label newSize,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<wallPolyPatch::polyPatch>
|
||||
(
|
||||
new regionCoupledWallPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
newSize,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new regionCoupledWallPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~regionCoupledWallPolyPatch();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the type
|
||||
virtual const word& regionCoupleType() const
|
||||
{
|
||||
return type();
|
||||
}
|
||||
|
||||
//- Write the polyPatch data as a dictionary
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,3 +0,0 @@
|
||||
derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libregionCoupled
|
||||
@ -1,15 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels
|
||||
@ -1,469 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "energyRegionCoupledFvPatchScalarField.H"
|
||||
#include "Time.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "PrecisionAdaptor.H"
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::Enum
|
||||
<
|
||||
Foam::energyRegionCoupledFvPatchScalarField::kappaMethodType
|
||||
>
|
||||
Foam::energyRegionCoupledFvPatchScalarField::methodTypeNames_
|
||||
({
|
||||
{ kappaMethodType::SOLID, "solid" },
|
||||
{ kappaMethodType::FLUID, "fluid" },
|
||||
{ kappaMethodType::UNDEFINED, "undefined" },
|
||||
});
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Private members * * * * * * * * * * * * *//
|
||||
|
||||
void Foam::energyRegionCoupledFvPatchScalarField::setMethod() const
|
||||
{
|
||||
if (method_ == UNDEFINED)
|
||||
{
|
||||
if
|
||||
(
|
||||
this->db().foundObject<compressible::turbulenceModel>
|
||||
(
|
||||
turbulenceModel::propertiesName
|
||||
)
|
||||
)
|
||||
{
|
||||
method_ = FLUID;
|
||||
}
|
||||
else
|
||||
{
|
||||
method_ = SOLID;
|
||||
}
|
||||
}
|
||||
|
||||
if (!nbrThermoPtr_)
|
||||
{
|
||||
nbrThermoPtr_ =
|
||||
regionCoupledPatch_.nbrMesh().findObject<basicThermo>
|
||||
(
|
||||
basicThermo::dictName
|
||||
);
|
||||
}
|
||||
|
||||
if (!thermoPtr_)
|
||||
{
|
||||
thermoPtr_ =
|
||||
this->db().findObject<basicThermo>
|
||||
(
|
||||
basicThermo::dictName
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
|
||||
kappa() const
|
||||
{
|
||||
switch (method_)
|
||||
{
|
||||
case FLUID:
|
||||
{
|
||||
const compressible::turbulenceModel& turbModel =
|
||||
this->db().lookupObject<compressible::turbulenceModel>
|
||||
(
|
||||
turbulenceModel::propertiesName
|
||||
);
|
||||
|
||||
return turbModel.kappaEff(patch().index());
|
||||
}
|
||||
break;
|
||||
|
||||
case SOLID:
|
||||
{
|
||||
const basicThermo& thermo =
|
||||
this->db().lookupObject<basicThermo>
|
||||
(
|
||||
basicThermo::dictName
|
||||
);
|
||||
|
||||
return thermo.kappa(patch().index());
|
||||
}
|
||||
break;
|
||||
|
||||
case UNDEFINED:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< " on mesh " << this->db().name() << " patch "
|
||||
<< patch().name()
|
||||
<< " could not find a method in. Methods are: "
|
||||
<< methodTypeNames_
|
||||
<< " Not turbulenceModel or thermophysicalProperties"
|
||||
<< " were found"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return scalarField(0);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
|
||||
weights() const
|
||||
{
|
||||
const fvPatch& patch = regionCoupledPatch_.patch();
|
||||
|
||||
const scalarField deltas
|
||||
(
|
||||
patch.nf() & patch.delta()
|
||||
);
|
||||
|
||||
const scalarField alphaDelta(kappa()/deltas);
|
||||
|
||||
const fvPatch& nbrPatch = regionCoupledPatch_.neighbFvPatch();
|
||||
|
||||
const energyRegionCoupledFvPatchScalarField& nbrField =
|
||||
refCast
|
||||
<
|
||||
const energyRegionCoupledFvPatchScalarField
|
||||
>
|
||||
(
|
||||
nbrPatch.lookupPatchField<volScalarField, scalar>("T")
|
||||
);
|
||||
|
||||
// Needed in the first calculation of weights
|
||||
nbrField.setMethod();
|
||||
|
||||
const scalarField nbrAlpha
|
||||
(
|
||||
regionCoupledPatch_.regionCoupledPatch().interpolate
|
||||
(
|
||||
nbrField.kappa()
|
||||
)
|
||||
);
|
||||
|
||||
const scalarField nbrDeltas
|
||||
(
|
||||
regionCoupledPatch_.regionCoupledPatch().interpolate
|
||||
(
|
||||
nbrPatch.nf() & nbrPatch.delta()
|
||||
)
|
||||
);
|
||||
|
||||
const scalarField nbrAlphaDelta(nbrAlpha/nbrDeltas);
|
||||
|
||||
tmp<scalarField> tw(new scalarField(deltas.size()));
|
||||
scalarField& w = tw.ref();
|
||||
|
||||
forAll(alphaDelta, facei)
|
||||
{
|
||||
scalar di = alphaDelta[facei];
|
||||
scalar dni = nbrAlphaDelta[facei];
|
||||
|
||||
w[facei] = di/(di + dni);
|
||||
}
|
||||
|
||||
return tw;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::energyRegionCoupledFvPatchScalarField::
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
coupledFvPatchField<scalar>(p, iF),
|
||||
regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)),
|
||||
method_(UNDEFINED),
|
||||
nbrThermoPtr_(nullptr),
|
||||
thermoPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::energyRegionCoupledFvPatchScalarField::
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const energyRegionCoupledFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
coupledFvPatchField<scalar>(ptf, p, iF, mapper),
|
||||
regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)),
|
||||
method_(ptf.method_),
|
||||
nbrThermoPtr_(nullptr),
|
||||
thermoPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::energyRegionCoupledFvPatchScalarField::
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
coupledFvPatchField<scalar>(p, iF, dict),
|
||||
regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p, dict)),
|
||||
method_(UNDEFINED),
|
||||
nbrThermoPtr_(nullptr),
|
||||
thermoPtr_(nullptr)
|
||||
{
|
||||
|
||||
if (!isA<regionCoupledBase>(this->patch().patch()))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "' not type '" << regionCoupledBase::typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << internalField().name()
|
||||
<< " in file " << internalField().objectPath()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::energyRegionCoupledFvPatchScalarField::
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const energyRegionCoupledFvPatchScalarField& ptf
|
||||
)
|
||||
:
|
||||
coupledFvPatchField<scalar>(ptf),
|
||||
regionCoupledPatch_(ptf.regionCoupledPatch_),
|
||||
method_(ptf.method_),
|
||||
nbrThermoPtr_(nullptr),
|
||||
thermoPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::energyRegionCoupledFvPatchScalarField::
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const energyRegionCoupledFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
coupledFvPatchField<scalar>(ptf, iF),
|
||||
regionCoupledPatch_(ptf.regionCoupledPatch_),
|
||||
method_(ptf.method_),
|
||||
nbrThermoPtr_(nullptr),
|
||||
thermoPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
|
||||
snGrad() const
|
||||
{
|
||||
return
|
||||
regionCoupledPatch_.patch().deltaCoeffs()
|
||||
*(*this - patchInternalField());
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
|
||||
snGrad(const scalarField&) const
|
||||
{
|
||||
return snGrad();
|
||||
}
|
||||
|
||||
|
||||
void Foam::energyRegionCoupledFvPatchScalarField::evaluate
|
||||
(
|
||||
const Pstream::commsTypes
|
||||
)
|
||||
{
|
||||
if (!updated())
|
||||
{
|
||||
updateCoeffs();
|
||||
}
|
||||
|
||||
label patchi = patch().index();
|
||||
const scalarField& pp = thermoPtr_->p().boundaryField()[patchi];
|
||||
|
||||
const scalarField lWeights(weights());
|
||||
|
||||
scalarField::operator=
|
||||
(
|
||||
thermoPtr_->he
|
||||
(
|
||||
pp,
|
||||
lWeights*patchInternalTemperatureField()
|
||||
+ (1.0 - lWeights)*patchNeighbourTemperatureField(),
|
||||
patchi
|
||||
)
|
||||
);
|
||||
|
||||
fvPatchScalarField::evaluate();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::Field<Foam::scalar>>
|
||||
Foam::energyRegionCoupledFvPatchScalarField::
|
||||
patchNeighbourField() const
|
||||
{
|
||||
const fvPatch& nbrPatch = regionCoupledPatch_.neighbFvPatch();
|
||||
|
||||
const labelUList& nbrFaceCells = nbrPatch.faceCells();
|
||||
|
||||
setMethod();
|
||||
|
||||
const scalarField nbrIntT
|
||||
(
|
||||
nbrThermoPtr_->T().primitiveField(), nbrFaceCells
|
||||
);
|
||||
|
||||
scalarField intNbrT
|
||||
(
|
||||
regionCoupledPatch_.regionCoupledPatch().interpolate(nbrIntT)
|
||||
);
|
||||
|
||||
label patchi = patch().index();
|
||||
const scalarField& pp = thermoPtr_->p().boundaryField()[patchi];
|
||||
tmp<scalarField> tmyHE = thermoPtr_->he(pp, intNbrT, patchi);
|
||||
|
||||
return tmyHE;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
|
||||
patchNeighbourTemperatureField() const
|
||||
{
|
||||
const fvPatch& nbrPatch = regionCoupledPatch_.neighbFvPatch();
|
||||
|
||||
const labelUList& nbrFaceCells = nbrPatch.faceCells();
|
||||
|
||||
const scalarField nbrIntT
|
||||
(
|
||||
nbrThermoPtr_->T().primitiveField(), nbrFaceCells
|
||||
);
|
||||
|
||||
tmp<scalarField> tintNbrT =
|
||||
regionCoupledPatch_.regionCoupledPatch().interpolate(nbrIntT);
|
||||
|
||||
return tintNbrT;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::energyRegionCoupledFvPatchScalarField::
|
||||
patchInternalTemperatureField() const
|
||||
{
|
||||
const labelUList& faceCells = regionCoupledPatch_.faceCells();
|
||||
|
||||
tmp<scalarField> tintT
|
||||
(
|
||||
new scalarField(thermoPtr_->T().primitiveField(), faceCells)
|
||||
);
|
||||
|
||||
return tintT;
|
||||
}
|
||||
|
||||
|
||||
void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
|
||||
(
|
||||
solveScalarField& result,
|
||||
const bool add,
|
||||
const solveScalarField& psiInternal,
|
||||
const scalarField& coeffs,
|
||||
const direction cmpt,
|
||||
const Pstream::commsTypes
|
||||
) const
|
||||
{
|
||||
setMethod();
|
||||
|
||||
scalarField myHE(this->size());
|
||||
|
||||
if
|
||||
(
|
||||
reinterpret_cast<const void*>(&psiInternal)
|
||||
== reinterpret_cast<const void*>(&primitiveField())
|
||||
)
|
||||
{
|
||||
label patchi = this->patch().index();
|
||||
const scalarField& pp = thermoPtr_->p().boundaryField()[patchi];
|
||||
const scalarField& Tp = thermoPtr_->T().boundaryField()[patchi];
|
||||
|
||||
myHE = thermoPtr_->he(pp, Tp, patchi);
|
||||
}
|
||||
else
|
||||
{
|
||||
//NOTE: This is not correct for preconditioned solvers
|
||||
// psiInternal is not the information needed of the slave
|
||||
forAll(*this, facei)
|
||||
{
|
||||
myHE[facei] = psiInternal[regionCoupledPatch_.faceCells()[facei]];
|
||||
}
|
||||
}
|
||||
|
||||
ConstPrecisionAdaptor<solveScalar, scalar> tHE(myHE);
|
||||
|
||||
// Multiply the field by coefficients and add into the result
|
||||
this->addToInternalField(result, !add, coeffs, tHE());
|
||||
}
|
||||
|
||||
|
||||
void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
|
||||
(
|
||||
Field<scalar>& result,
|
||||
const bool add,
|
||||
const Field<scalar>& psiInternal,
|
||||
const scalarField& coeffs,
|
||||
const Pstream::commsTypes
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
|
||||
void Foam::energyRegionCoupledFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,263 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::energyRegionCoupledFvPatchScalarField
|
||||
|
||||
Description
|
||||
Energy region coupled implicit boundary condition.
|
||||
The fvPatch is treated as uncoupled from the delta point of view.
|
||||
In the mesh the fvPatch is an interface and is incorporated
|
||||
into the matrix implicitly.
|
||||
|
||||
SourceFiles
|
||||
energyRegionCoupledFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef energyRegionCoupledFvPatchScalarField_H
|
||||
#define energyRegionCoupledFvPatchScalarField_H
|
||||
|
||||
#include "regionCoupledBaseFvPatch.H"
|
||||
#include "LduInterfaceField.H"
|
||||
#include "fvPatchField.H"
|
||||
#include "Enum.H"
|
||||
#include "basicThermo.H"
|
||||
#include "coupledFvPatchField.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class energyRegionCoupledFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class energyRegionCoupledFvPatchScalarField
|
||||
:
|
||||
public coupledFvPatchField<scalar>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
enum kappaMethodType
|
||||
{
|
||||
SOLID,
|
||||
FLUID,
|
||||
UNDEFINED
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Local reference to region couple patch
|
||||
const regionCoupledBaseFvPatch& regionCoupledPatch_;
|
||||
|
||||
//- Method to extract kappa
|
||||
static const Enum<kappaMethodType> methodTypeNames_;
|
||||
|
||||
//- How to get K
|
||||
mutable kappaMethodType method_;
|
||||
|
||||
//- An autoPtr to nbr thermo
|
||||
mutable const basicThermo* nbrThermoPtr_;
|
||||
|
||||
//- An autoPtr to my thermo
|
||||
mutable const basicThermo* thermoPtr_;
|
||||
|
||||
|
||||
// Private functions
|
||||
|
||||
//- Local weight for this coupled field
|
||||
tmp<scalarField> weights() const;
|
||||
|
||||
//- Return nbr temperature internal field
|
||||
tmp<scalarField> patchNeighbourTemperatureField() const;
|
||||
|
||||
//- Return local temperature internal field
|
||||
tmp<scalarField> patchInternalTemperatureField() const;
|
||||
|
||||
//- Return kappa
|
||||
tmp<scalarField> kappa() const;
|
||||
|
||||
//- Set method
|
||||
void setMethod() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::energyRegionCoupled");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given energyRegionCoupledFvPatchScalarField
|
||||
// onto a new patch
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const energyRegionCoupledFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const energyRegionCoupledFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchField<scalar>> clone() const
|
||||
{
|
||||
return tmp<fvPatchField<scalar>>
|
||||
(
|
||||
new energyRegionCoupledFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
energyRegionCoupledFvPatchScalarField
|
||||
(
|
||||
const energyRegionCoupledFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchField<scalar>> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchField<scalar>>
|
||||
(
|
||||
new energyRegionCoupledFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~energyRegionCoupledFvPatchScalarField() = default;
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Method to obtain K
|
||||
word kappaMethod() const
|
||||
{
|
||||
return methodTypeNames_[method_];
|
||||
}
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Return neighbour coupled internal cell data
|
||||
virtual tmp<scalarField> patchNeighbourField() const;
|
||||
|
||||
//- Return patch-normal gradient
|
||||
virtual tmp<scalarField> snGrad() const;
|
||||
|
||||
//- Return patch-normal gradient
|
||||
// Note: the deltaCoeffs supplied are not used
|
||||
virtual tmp<scalarField> snGrad
|
||||
(
|
||||
const scalarField& deltaCoeffs
|
||||
) const;
|
||||
|
||||
|
||||
//- Evaluate the patch field
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType
|
||||
);
|
||||
|
||||
|
||||
// Coupled interface functionality
|
||||
|
||||
//- Update result field based on interface functionality
|
||||
virtual void updateInterfaceMatrix
|
||||
(
|
||||
solveScalarField& result,
|
||||
const bool add,
|
||||
const solveScalarField& psiInternal,
|
||||
const scalarField& coeffs,
|
||||
const direction cmpt,
|
||||
const Pstream::commsTypes commsType
|
||||
) const;
|
||||
|
||||
//- Update result field based on interface functionality
|
||||
virtual void updateInterfaceMatrix
|
||||
(
|
||||
Field<scalar>&,
|
||||
const bool,
|
||||
const Field<scalar>&,
|
||||
const scalarField&,
|
||||
const Pstream::commsTypes commsType
|
||||
) const;
|
||||
|
||||
//- Return the interface type
|
||||
virtual const word& interfaceFieldType() const
|
||||
{
|
||||
return regionCoupledPatch_.regionCoupleType();
|
||||
}
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -113,10 +113,6 @@ Foam::wordList Foam::basicThermo::heBoundaryTypes()
|
||||
{
|
||||
hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
|
||||
}
|
||||
else if (tbf[patchi].type() == "energyRegionCoupledFvPatchScalarField")
|
||||
{
|
||||
hbt[patchi] = "energyRegionCoupledFvPatchScalarField";
|
||||
}
|
||||
}
|
||||
|
||||
return hbt;
|
||||
|
||||
Reference in New Issue
Block a user