mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: change wordRes to be a List of wordRe instead of a wrapper (issue #259)
- this permits direct storage of a list with additional matcher capabilities - provide wordRes::matcher class for similar behaviour as previously
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -60,7 +60,7 @@ Foam::rigidBodyMeshMotion::bodyMesh::bodyMesh
|
||||
:
|
||||
name_(name),
|
||||
bodyID_(bodyID),
|
||||
patches_(wordReList(dict.lookup("patches"))),
|
||||
patches_(dict.lookup("patches")),
|
||||
patchSet_(mesh.boundaryMesh().patchSet(patches_)),
|
||||
di_(readScalar(dict.lookup("innerDistance"))),
|
||||
do_(readScalar(dict.lookup("outerDistance"))),
|
||||
@ -113,7 +113,7 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
||||
)
|
||||
: coeffDict()
|
||||
),
|
||||
test_(coeffDict().lookupOrDefault<Switch>("test", false)),
|
||||
test_(coeffDict().lookupOrDefault("test", false)),
|
||||
rhoInf_(1.0),
|
||||
rhoName_(coeffDict().lookupOrDefault<word>("rho", "rho")),
|
||||
ramp_(nullptr),
|
||||
@ -208,12 +208,6 @@ Foam::rigidBodyMeshMotion::rigidBodyMeshMotion
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rigidBodyMeshMotion::~rigidBodyMeshMotion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::pointField>
|
||||
|
||||
@ -68,7 +68,7 @@ class rigidBodyMeshMotion
|
||||
const label bodyID_;
|
||||
|
||||
//- List of mesh patches associated with this body
|
||||
const wordReList patches_;
|
||||
const wordRes patches_;
|
||||
|
||||
//- Patches to integrate forces
|
||||
const labelHashSet patchSet_;
|
||||
@ -107,9 +107,8 @@ class rigidBodyMeshMotion
|
||||
// weighting for each body
|
||||
PtrList<bodyMesh> bodyMeshes_;
|
||||
|
||||
//- Switch for test-mode in which only the
|
||||
// gravitational body-force is applied
|
||||
Switch test_;
|
||||
//- Test-mode in which only the gravitational body-force is applied
|
||||
bool test_;
|
||||
|
||||
//- Reference density required by the forces object for
|
||||
// incompressible calculations, required if rho == rhoInf
|
||||
@ -130,13 +129,10 @@ class rigidBodyMeshMotion
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
rigidBodyMeshMotion
|
||||
(
|
||||
const rigidBodyMeshMotion&
|
||||
);
|
||||
rigidBodyMeshMotion(const rigidBodyMeshMotion&) = delete;
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const rigidBodyMeshMotion&);
|
||||
void operator=(const rigidBodyMeshMotion&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
@ -156,7 +152,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
~rigidBodyMeshMotion();
|
||||
~rigidBodyMeshMotion() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,7 +59,7 @@ Foam::rigidBodyMeshMotionSolver::bodyMesh::bodyMesh
|
||||
:
|
||||
name_(name),
|
||||
bodyID_(bodyID),
|
||||
patches_(wordReList(dict.lookup("patches"))),
|
||||
patches_(dict.lookup("patches")),
|
||||
patchSet_(mesh.boundaryMesh().patchSet(patches_))
|
||||
{}
|
||||
|
||||
@ -96,7 +96,7 @@ Foam::rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver
|
||||
)
|
||||
: coeffDict()
|
||||
),
|
||||
test_(coeffDict().lookupOrDefault<Switch>("test", false)),
|
||||
test_(coeffDict().lookupOrDefault("test", false)),
|
||||
rhoInf_(1.0),
|
||||
rhoName_(coeffDict().lookupOrDefault<word>("rho", "rho")),
|
||||
curTimeIndex_(-1),
|
||||
@ -158,12 +158,6 @@ Foam::rigidBodyMeshMotionSolver::rigidBodyMeshMotionSolver
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::rigidBodyMeshMotionSolver::~rigidBodyMeshMotionSolver()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::pointField>
|
||||
|
||||
@ -64,7 +64,7 @@ class rigidBodyMeshMotionSolver
|
||||
const label bodyID_;
|
||||
|
||||
//- List of mesh patches associated with this body
|
||||
const wordReList patches_;
|
||||
const wordRes patches_;
|
||||
|
||||
//- Patches to integrate forces
|
||||
const labelHashSet patchSet_;
|
||||
@ -93,9 +93,8 @@ class rigidBodyMeshMotionSolver
|
||||
// weighting for each body
|
||||
PtrList<bodyMesh> bodyMeshes_;
|
||||
|
||||
//- Switch for test-mode in which only the
|
||||
// gravitational body-force is applied
|
||||
Switch test_;
|
||||
//- Test-mode in which only the gravitational body-force is applied
|
||||
bool test_;
|
||||
|
||||
//- Reference density required by the forces object for
|
||||
// incompressible calculations, required if rho == rhoInf
|
||||
@ -143,7 +142,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
~rigidBodyMeshMotionSolver();
|
||||
~rigidBodyMeshMotionSolver() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
Reference in New Issue
Block a user