Files
OpenFOAM-12/src/dynamicMesh/motionSolvers/componentVelocity/componentVelocityMotionSolver.C
Henry Weller 2e6eb5f2ce polyMeshDistributionMap: renamed mapDistributePolyMesh -> polyMeshDistributionMap
This is a map data structure rather than a class or function which performs the
mapping operation so polyMeshDistributionMap is more logical and comprehensible
than mapDistributePolyMesh.
2022-03-31 18:01:44 +01:00

122 lines
3.2 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
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 "componentVelocityMotionSolver.H"
#include "mapPolyMesh.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(componentVelocityMotionSolver, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::direction Foam::componentVelocityMotionSolver::cmpt
(
const word& cmptName
) const
{
if (cmptName == "x")
{
return vector::X;
}
else if (cmptName == "y")
{
return vector::Y;
}
else if (cmptName == "z")
{
return vector::Z;
}
else
{
FatalErrorInFunction
<< "Given component name " << cmptName << " should be x, y or z"
<< exit(FatalError);
return 0;
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::componentVelocityMotionSolver::componentVelocityMotionSolver
(
const polyMesh& mesh,
const dictionary& dict,
const word& type
)
:
motionSolver(mesh, dict, type),
cmptName_(coeffDict().lookup("component")),
cmpt_(cmpt(cmptName_)),
pointMotionU_
(
IOobject
(
"pointMotionU" + cmptName_,
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
pointMesh::New(mesh)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::componentVelocityMotionSolver::~componentVelocityMotionSolver()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::componentVelocityMotionSolver::movePoints(const pointField& p)
{
// No local data to adapt
}
void Foam::componentVelocityMotionSolver::updateMesh(const mapPolyMesh& mpm)
{
// pointMesh already updates pointFields.
}
void Foam::componentVelocityMotionSolver::distribute
(
const polyMeshDistributionMap& map
)
{}
// ************************************************************************* //