mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: minor update of particle methods
This commit is contained in:
@ -37,8 +37,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef functionObjects_eulerianParticle_H
|
||||
#define functionObjects_eulerianParticle_H
|
||||
#ifndef Foam_functionObjects_eulerianParticle_H
|
||||
#define Foam_functionObjects_eulerianParticle_H
|
||||
|
||||
#include "label.H"
|
||||
#include "scalar.H"
|
||||
@ -49,7 +49,7 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
// Forward declaration of classes
|
||||
// Forward Declarations
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
@ -71,10 +71,9 @@ namespace functionObjects
|
||||
|
||||
class eulerianParticle
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
// Public data
|
||||
// Public Data
|
||||
|
||||
//- Index of face in faceZone that this particle hits. Also used to
|
||||
// identify the index of the coarse face of the surface agglomeration
|
||||
@ -95,7 +94,7 @@ public:
|
||||
scalar time;
|
||||
|
||||
|
||||
//- Constructor
|
||||
//- Default construct
|
||||
eulerianParticle();
|
||||
|
||||
|
||||
|
||||
@ -35,8 +35,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef findCellParticle_H
|
||||
#define findCellParticle_H
|
||||
#ifndef Foam_findCellParticle_H
|
||||
#define Foam_findCellParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "autoPtr.H"
|
||||
@ -102,17 +102,11 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
// Member functions
|
||||
// Member Functions
|
||||
|
||||
labelListList& cellToData()
|
||||
{
|
||||
return cellToData_;
|
||||
}
|
||||
labelListList& cellToData() noexcept { return cellToData_; }
|
||||
|
||||
List<List<point>>& cellToEnd()
|
||||
{
|
||||
return cellToEnd_;
|
||||
}
|
||||
List<List<point>>& cellToEnd() noexcept { return cellToEnd_; }
|
||||
};
|
||||
|
||||
|
||||
@ -130,8 +124,8 @@ public:
|
||||
const label data
|
||||
);
|
||||
|
||||
//- Construct from a position and a cell, searching for the rest of the
|
||||
// required topology
|
||||
//- Construct from a position and a cell,
|
||||
//- searching for the rest of the required topology
|
||||
findCellParticle
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -182,40 +176,22 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Point to track from
|
||||
const point& start() const
|
||||
{
|
||||
return start_;
|
||||
}
|
||||
const point& start() const noexcept { return start_; }
|
||||
|
||||
//- Point to track from
|
||||
point& start()
|
||||
{
|
||||
return start_;
|
||||
}
|
||||
point& start() noexcept { return start_; }
|
||||
|
||||
//- Point to track to
|
||||
const point& end() const
|
||||
{
|
||||
return end_;
|
||||
}
|
||||
const point& end() const noexcept { return end_; }
|
||||
|
||||
//- Point to track to
|
||||
point& end()
|
||||
{
|
||||
return end_;
|
||||
}
|
||||
point& end() noexcept { return end_; }
|
||||
|
||||
//- Transported label
|
||||
label data() const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
label data() const noexcept { return data_; }
|
||||
|
||||
//- Transported label
|
||||
label& data()
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
label& data() noexcept { return data_; }
|
||||
|
||||
|
||||
// Tracking
|
||||
|
||||
@ -35,8 +35,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef streamLineParticle_H
|
||||
#define streamLineParticle_H
|
||||
#ifndef Foam_streamLineParticle_H
|
||||
#define Foam_streamLineParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "autoPtr.H"
|
||||
@ -48,8 +48,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
// Forward Declarations
|
||||
class streamLineParticle;
|
||||
class streamLineParticleCloud;
|
||||
|
||||
|
||||
@ -37,8 +37,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wallBoundedParticle_H
|
||||
#define wallBoundedParticle_H
|
||||
#ifndef Foam_wallBoundedParticle_H
|
||||
#define Foam_wallBoundedParticle_H
|
||||
|
||||
#include "particle.H"
|
||||
#include "autoPtr.H"
|
||||
@ -49,8 +49,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
// Forward Declarations
|
||||
class wallBoundedParticle;
|
||||
|
||||
Ostream& operator<<(Ostream&, const wallBoundedParticle&);
|
||||
@ -72,15 +71,14 @@ public:
|
||||
:
|
||||
public particle::trackingData
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
const bitSet& isWallPatch_;
|
||||
|
||||
// Constructors
|
||||
|
||||
template <class TrackCloudType>
|
||||
inline trackingData
|
||||
template<class TrackCloudType>
|
||||
trackingData
|
||||
(
|
||||
const TrackCloudType& cloud,
|
||||
const bitSet& isWallPatch
|
||||
@ -94,7 +92,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
// Protected Data
|
||||
|
||||
//- Particle position is updated locally as opposed to via track
|
||||
// functions of the base Foam::particle class
|
||||
@ -212,19 +210,13 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
// Access
|
||||
|
||||
//- -1 or label of mesh edge
|
||||
inline label meshEdgeStart() const
|
||||
{
|
||||
return meshEdgeStart_;
|
||||
}
|
||||
//- The mesh edge label or -1
|
||||
label meshEdgeStart() const noexcept { return meshEdgeStart_; }
|
||||
|
||||
//- -1 or diagonal edge
|
||||
inline label diagEdge() const
|
||||
{
|
||||
return diagEdge_;
|
||||
}
|
||||
//- The diagonal edge label or -1
|
||||
label diagEdge() const noexcept { return diagEdge_; }
|
||||
|
||||
|
||||
// Track
|
||||
|
||||
@ -36,8 +36,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef wallBoundedStreamLineParticle_H
|
||||
#define wallBoundedStreamLineParticle_H
|
||||
#ifndef Foam_wallBoundedStreamLineParticle_H
|
||||
#define Foam_wallBoundedStreamLineParticle_H
|
||||
|
||||
#include "wallBoundedParticle.H"
|
||||
#include "autoPtr.H"
|
||||
@ -50,12 +50,9 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class wallBoundedStreamLineParticleCloud;
|
||||
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
// Forward Declarations
|
||||
class wallBoundedStreamLineParticle;
|
||||
class wallBoundedStreamLineParticleCloud;
|
||||
|
||||
Ostream& operator<<(Ostream&, const wallBoundedStreamLineParticle&);
|
||||
|
||||
@ -68,7 +65,6 @@ class wallBoundedStreamLineParticle
|
||||
:
|
||||
public wallBoundedParticle
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Class used to pass tracking data to the trackToEdge function
|
||||
@ -76,10 +72,8 @@ public:
|
||||
:
|
||||
public wallBoundedParticle::trackingData
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
const PtrList<interpolation<scalar>>& vsInterp_;
|
||||
const PtrList<interpolation<vector>>& vvInterp_;
|
||||
const label UIndex_;
|
||||
@ -92,7 +86,7 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
template <class TrackCloudType>
|
||||
template<class TrackCloudType>
|
||||
trackingData
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
@ -107,11 +101,7 @@ public:
|
||||
List<DynamicList<vectorList>>& allVectors
|
||||
)
|
||||
:
|
||||
wallBoundedParticle::trackingData
|
||||
(
|
||||
cloud,
|
||||
isWallPatch
|
||||
),
|
||||
wallBoundedParticle::trackingData(cloud, isWallPatch),
|
||||
vsInterp_(vsInterp),
|
||||
vvInterp_(vvInterp),
|
||||
UIndex_(UIndex),
|
||||
@ -128,7 +118,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
// Protected Data
|
||||
|
||||
//- Track with +U or -U
|
||||
bool trackForward_;
|
||||
|
||||
Reference in New Issue
Block a user