COMP: remove template-id for constructor/destructor

- not allowed in C++20

COMP: avoid hidden overloaded-virtual (edgeMesh, surfMesh)
This commit is contained in:
Mark Olesen
2024-04-30 14:00:15 +02:00
parent e22edc5dee
commit 3fed41547f
36 changed files with 407 additions and 215 deletions

View File

@ -337,10 +337,10 @@ public:
TypeNameNoDebug("Compound<T>"); TypeNameNoDebug("Compound<T>");
//- No copy construct //- No copy construct
Compound<T>(const Compound<T>&) = delete; Compound(const Compound<T>&) = delete;
//- No copy assignment //- No copy assignment
Compound<T>& operator=(const Compound<T>&) = delete; void operator=(const Compound<T>&) = delete;
// Constructors // Constructors

View File

@ -39,8 +39,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef DiagonalMatrix_H #ifndef Foam_DiagonalMatrix_H
#define DiagonalMatrix_H #define Foam_DiagonalMatrix_H
#include "List.H" #include "List.H"
#include <numeric> #include <numeric>
@ -78,18 +78,18 @@ public:
// Constructors // Constructors
//- Construct empty from size //- Construct from size, uninitialised content
explicit DiagonalMatrix<Type>(const label n); explicit DiagonalMatrix(const label n);
//- Construct from size and initialise all elems to zero //- Construct from size and initialise all elems to zero
DiagonalMatrix<Type>(const label n, const Foam::zero); DiagonalMatrix(const label n, const Foam::zero);
//- Construct from size and initialise all elems to value //- Construct from size and initialise all elems to value
DiagonalMatrix<Type>(const label n, const Type& val); DiagonalMatrix(const label n, const Type& val);
//- Construct from the diagonal of a Matrix //- Construct from the diagonal of a Matrix
template<class Form> template<class Form>
DiagonalMatrix<Type>(const Matrix<Form, Type>& mat); DiagonalMatrix(const Matrix<Form, Type>& mat);
// Member Functions // Member Functions

View File

@ -225,30 +225,30 @@ public:
// Access // Access
//- Return real eigenvalues or real part of complex eigenvalues //- Return real eigenvalues or real part of complex eigenvalues
const DiagonalMatrix<cmptType>& EValsRe() const const DiagonalMatrix<cmptType>& EValsRe() const noexcept
{ {
return EValsRe_; return EValsRe_;
} }
//- Return zero-matrix for real eigenvalues //- Return zero-matrix for real eigenvalues
//- or imaginary part of complex eigenvalues //- or imaginary part of complex eigenvalues
const DiagonalMatrix<cmptType>& EValsIm() const const DiagonalMatrix<cmptType>& EValsIm() const noexcept
{ {
return EValsIm_; return EValsIm_;
} }
//- Return right eigenvectors matrix where each column is //- Return right eigenvectors matrix where each column is
//- a right eigenvector that corresponds to an eigenvalue //- a right eigenvector that corresponds to an eigenvalue
const SquareMatrix<cmptType>& EVecs() const const SquareMatrix<cmptType>& EVecs() const noexcept
{ {
return EVecs_; return EVecs_;
} }
//- Return right eigenvectors in unpacked form //- Return right eigenvectors in unpacked form
const SquareMatrix<complex> complexEVecs() const; const SquareMatrix<complex> complexEVecs() const;
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -136,7 +136,7 @@ public:
//- Default construct (empty matrix) //- Default construct (empty matrix)
inline Matrix() noexcept; inline Matrix() noexcept;
//- Construct given number of rows/columns //- Construct given number of rows/columns, uninitialised content
Matrix(const label m, const label n); Matrix(const label m, const label n);
//- Construct with given number of rows/columns //- Construct with given number of rows/columns

View File

@ -252,7 +252,7 @@ public:
// Constructors // Constructors
//- Construct null //- No default construct
QRMatrix() = delete; QRMatrix() = delete;
//- Construct with a matrix and perform QR decomposition //- Construct with a matrix and perform QR decomposition

View File

@ -39,8 +39,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef RectangularMatrix_H #ifndef Foam_RectangularMatrix_H
#define RectangularMatrix_H #define Foam_RectangularMatrix_H
#include "Matrix.H" #include "Matrix.H"
#include "SquareMatrix.H" #include "SquareMatrix.H"
@ -59,7 +59,6 @@ class RectangularMatrix
: :
public Matrix<RectangularMatrix<Type>, Type> public Matrix<RectangularMatrix<Type>, Type>
{ {
public: public:
// Generated Methods // Generated Methods
@ -76,7 +75,7 @@ public:
// Constructors // Constructors
//- Construct a square matrix (rows == columns) //- Construct a square matrix (rows == columns), uninitialised content
inline explicit RectangularMatrix(const label n); inline explicit RectangularMatrix(const label n);
//- Construct given number of rows/columns //- Construct given number of rows/columns

View File

@ -81,7 +81,7 @@ public:
// Constructors // Constructors
//- Construct for given size (rows == cols) //- Construct for given size (rows == cols), uninitialised content
inline explicit SquareMatrix(const label n); inline explicit SquareMatrix(const label n);
//- Construct for given size (rows == cols) //- Construct for given size (rows == cols)

View File

@ -40,8 +40,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef SymmetricSquareMatrix_H #ifndef Foam_SymmetricSquareMatrix_H
#define SymmetricSquareMatrix_H #define Foam_SymmetricSquareMatrix_H
#include "SquareMatrix.H" #include "SquareMatrix.H"
@ -59,7 +59,6 @@ class SymmetricSquareMatrix
: :
public Matrix<SymmetricSquareMatrix<Type>, Type> public Matrix<SymmetricSquareMatrix<Type>, Type>
{ {
public: public:
// Generated Methods // Generated Methods
@ -71,12 +70,13 @@ public:
SymmetricSquareMatrix(const SymmetricSquareMatrix&) = default; SymmetricSquareMatrix(const SymmetricSquareMatrix&) = default;
//- Copy assignment //- Copy assignment
SymmetricSquareMatrix& operator=(const SymmetricSquareMatrix&) = default; SymmetricSquareMatrix&
operator=(const SymmetricSquareMatrix&) = default;
// Constructors // Constructors
//- Construct for given size (rows == cols) //- Construct for given size (rows == cols), uninitialised content
inline explicit SymmetricSquareMatrix(const label n); inline explicit SymmetricSquareMatrix(const label n);
//- Construct for given size (rows == cols) //- Construct for given size (rows == cols)
@ -113,6 +113,8 @@ public:
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global Functions // Global Functions
//- Return the LU decomposed SymmetricSquareMatrix inverse //- Return the LU decomposed SymmetricSquareMatrix inverse

View File

@ -140,8 +140,8 @@ public:
} }
//- Destructor //- Destructor, resets pointers to avoid deletion of underlying field
virtual ~slicedFaPatchField<Type>(); virtual ~slicedFaPatchField();
// Member Functions // Member Functions

View File

@ -132,8 +132,8 @@ public:
} }
//- Destructor //- Destructor, resets pointers to avoid deletion of underlying field
virtual ~slicedFaePatchField<Type>(); virtual ~slicedFaePatchField();
// Member Functions // Member Functions

View File

@ -138,8 +138,8 @@ public:
} }
//- Destructor //- Destructor, resets pointers to avoid deletion of underlying field
virtual ~slicedFvPatchField<Type>(); virtual ~slicedFvPatchField();
// Member Functions // Member Functions

View File

@ -233,7 +233,7 @@ public:
//- Destructor //- Destructor
virtual ~mappedPatchFieldBase<Type>() = default; virtual ~mappedPatchFieldBase() = default;
// Member Functions // Member Functions

View File

@ -134,8 +134,8 @@ public:
} }
//- Destructor //- Destructor, resets pointers to avoid deletion of underlying field
virtual ~slicedFvsPatchField<Type>(); virtual ~slicedFvsPatchField();
// Member Functions // Member Functions

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd. Copyright (C) 2021-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -38,8 +38,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef edgeMeshFormat_H #ifndef Foam_edgeMeshFormat_H
#define edgeMeshFormat_H #define Foam_edgeMeshFormat_H
#include "edgeMesh.H" #include "edgeMesh.H"
#include "Ostream.H" #include "Ostream.H"
@ -60,15 +60,6 @@ class edgeMeshFormat
: :
public edgeMesh public edgeMesh
{ {
// Private Member Functions
//- No copy construct
edgeMeshFormat(const edgeMeshFormat&) = delete;
//- No copy assignment
void operator=(const edgeMeshFormat&) = delete;
protected: protected:
// Protected Member Functions // Protected Member Functions
@ -87,7 +78,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
explicit edgeMeshFormat(const fileName&); explicit edgeMeshFormat(const fileName& filename);
// Selectors // Selectors
@ -134,7 +125,7 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& name); virtual bool read(const fileName& filename) override;
//- Write edge mesh to file //- Write edge mesh to file
virtual void write virtual void write
@ -142,7 +133,19 @@ public:
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, *this, streamOpt, options);
}
//- Write edge mesh to file
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, *this, streamOpt, options); write(name, *this, streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2021 OpenCFD Ltd. Copyright (C) 2017-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -42,8 +42,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef NASedgeFormat_H #ifndef Foam_NASedgeFormat_H
#define NASedgeFormat_H #define Foam_NASedgeFormat_H
#include "edgeMesh.H" #include "edgeMesh.H"
#include "NASCore.H" #include "NASCore.H"
@ -64,14 +64,6 @@ class NASedgeFormat
public edgeMesh, public edgeMesh,
public NASCore public NASCore
{ {
// Private Member Functions
//- No copy construct
NASedgeFormat(const NASedgeFormat&) = delete;
//- No copy assignment
void operator=(const NASedgeFormat&) = delete;
public: public:
// Constructors // Constructors
@ -96,7 +88,7 @@ public:
// Member Functions // Member Functions
//- Read from a file //- Read from a file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
}; };

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd. Copyright (C) 2021-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -37,8 +37,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef OBJedgeFormat_H #ifndef Foam_OBJedgeFormat_H
#define OBJedgeFormat_H #define Foam_OBJedgeFormat_H
#include "edgeMesh.H" #include "edgeMesh.H"
#include "Fstream.H" #include "Fstream.H"
@ -59,21 +59,12 @@ class OBJedgeFormat
: :
public edgeMesh public edgeMesh
{ {
// Private Member Functions
//- No copy construct
OBJedgeFormat(const OBJedgeFormat&) = delete;
//- No copy assignment
void operator=(const OBJedgeFormat&) = delete;
public: public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
OBJedgeFormat(const fileName&); explicit OBJedgeFormat(const fileName& filename);
// Selectors // Selectors
@ -89,9 +80,9 @@ public:
virtual ~OBJedgeFormat() = default; virtual ~OBJedgeFormat() = default;
// Member Functions // Static Functions
//- Write edge mesh to file //- Write edge mesh to file in OBJ format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -104,7 +95,7 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& name); virtual bool read(const fileName& filename) override;
//- Write to file //- Write to file
virtual void write virtual void write
@ -112,7 +103,19 @@ public:
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, *this, streamOpt, options);
}
//- Write to file
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, *this, streamOpt, options); write(name, *this, streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2021 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -41,8 +41,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef STARCDedgeFormat_H #ifndef Foam_STARCDedgeFormat_H
#define STARCDedgeFormat_H #define Foam_STARCDedgeFormat_H
#include "edgeMesh.H" #include "edgeMesh.H"
#include "STARCDCore.H" #include "STARCDCore.H"
@ -75,14 +75,6 @@ class STARCDedgeFormat
label starCellId = 1 // 1-based cellId label starCellId = 1 // 1-based cellId
); );
//- No copy construct
STARCDedgeFormat(const STARCDedgeFormat&) = delete;
//- No copy assignment
void operator=(const STARCDedgeFormat&) = delete;
protected: protected:
// Protected Member Functions // Protected Member Functions
@ -118,7 +110,7 @@ public:
// Static Functions // Static Functions
//- Write edge mesh to file //- Write edge mesh to file in STARCD format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -131,7 +123,7 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& name); virtual bool read(const fileName& name) override;
//- Write to file //- Write to file
virtual void write virtual void write
@ -139,7 +131,19 @@ public:
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, *this, streamOpt, options);
}
//- Write to file
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, *this, streamOpt, options); write(name, *this, streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd. Copyright (C) 2021-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef VTKedgeFormat_H #ifndef Foam_VTKedgeFormat_H
#define VTKedgeFormat_H #define Foam_VTKedgeFormat_H
#include "edgeMesh.H" #include "edgeMesh.H"
@ -78,7 +78,7 @@ public:
// Static Functions // Static Functions
//- Write edge mesh to file //- Write edge mesh to file in legacy VTK format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -91,7 +91,7 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& name); virtual bool read(const fileName& filename) override;
//- Write to file //- Write to file
virtual void write virtual void write
@ -99,7 +99,19 @@ public:
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, *this, streamOpt, options);
}
//- Write to file
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, *this, streamOpt, options); write(name, *this, streamOpt, options);
} }

View File

@ -41,8 +41,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef edgeMesh_H #ifndef Foam_edgeMesh_H
#define edgeMesh_H #define Foam_edgeMesh_H
#include "pointField.H" #include "pointField.H"
#include "edgeList.H" #include "edgeList.H"

View File

@ -116,7 +116,7 @@ public:
//- Destructor //- Destructor
virtual ~adjointBoundaryCondition<Type>() = default; virtual ~adjointBoundaryCondition() = default;
// Member Functions // Member Functions

View File

@ -46,8 +46,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef UnsortedMeshedSurface_H #ifndef Foam_UnsortedMeshedSurface_H
#define UnsortedMeshedSurface_H #define Foam_UnsortedMeshedSurface_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "surfZoneIdentifierList.H" #include "surfZoneIdentifierList.H"

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd. Copyright (C) 2020-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -40,8 +40,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef ABAQUSsurfaceFormat_H #ifndef Foam_ABAQUSsurfaceFormat_H
#define ABAQUSsurfaceFormat_H #define Foam_ABAQUSsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -95,7 +95,7 @@ public:
// Static Member Functions // Static Member Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in ABAQUS format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -108,18 +108,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read virtual bool read(const fileName& filename) override;
(
const fileName& filename
);
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -48,8 +48,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef AC3DsurfaceFormat_H #ifndef Foam_AC3DsurfaceFormat_H
#define AC3DsurfaceFormat_H #define Foam_AC3DsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -78,7 +78,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
AC3DsurfaceFormat(const fileName& filename); explicit AC3DsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -109,15 +109,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -45,8 +45,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef FLMAsurfaceFormat_H #ifndef Foam_FLMAsurfaceFormat_H
#define FLMAsurfaceFormat_H #define Foam_FLMAsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -79,14 +79,14 @@ protected:
// Protected Member Functions // Protected Member Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy)
static void write static void write
( (
OSstream& os, OSstream& os,
const MeshedSurfaceProxy<Face>& surf const MeshedSurfaceProxy<Face>& surf
); );
//- Write surface mesh components by proxy with/without compression //- Write surface mesh components (by proxy) with/without compression
static void write static void write
( (
IOstreamOption::compressionType comp, IOstreamOption::compressionType comp,
@ -109,7 +109,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy)
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -121,13 +121,25 @@ public:
// Member Functions // Member Functions
//- Write surface mesh as flma file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }
@ -157,7 +169,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy)
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -169,13 +181,25 @@ public:
// Member Functions // Member Functions
//- Write surface mesh as flmaz file //- Write surface mesh as flmaz file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh as flmaz file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,8 +44,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef GTSsurfaceFormat_H #ifndef Foam_GTSsurfaceFormat_H
#define GTSsurfaceFormat_H #define Foam_GTSsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -79,7 +79,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
GTSsurfaceFormat(const fileName& filename); explicit GTSsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -110,7 +110,7 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file
virtual void write virtual void write
@ -118,7 +118,19 @@ public:
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, *this, streamOpt, options);
}
//- Write surface mesh to file
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, *this, streamOpt, options); write(name, *this, streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -51,8 +51,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef NASsurfaceFormat_H #ifndef Foam_NASsurfaceFormat_H
#define NASsurfaceFormat_H #define Foam_NASsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -93,7 +93,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
NASsurfaceFormat(const fileName& filename); explicit NASsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -102,7 +102,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in NAS format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -115,15 +115,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -43,8 +43,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef OBJsurfaceFormat_H #ifndef Foam_OBJsurfaceFormat_H
#define OBJsurfaceFormat_H #define Foam_OBJsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -71,7 +71,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
OBJsurfaceFormat(const fileName& filename); explicit OBJsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -80,7 +80,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in OBJ format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -93,15 +93,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -50,8 +50,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef OFFsurfaceFormat_H #ifndef Foam_OFFsurfaceFormat_H
#define OFFsurfaceFormat_H #define Foam_OFFsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -78,7 +78,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
OFFsurfaceFormat(const fileName& filename); explicit OFFsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -87,7 +87,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in OFF format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -100,15 +100,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -45,8 +45,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef SMESHsurfaceFormat_H #ifndef Foam_SMESHsurfaceFormat_H
#define SMESHsurfaceFormat_H #define Foam_SMESHsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -82,7 +82,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in SMESH format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -94,13 +94,25 @@ public:
// Member Functions // Member Functions
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -47,8 +47,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef STARCDsurfaceFormat_H #ifndef Foam_STARCDsurfaceFormat_H
#define STARCDsurfaceFormat_H #define Foam_STARCDsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -88,7 +88,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
STARCDsurfaceFormat(const fileName& filename); explicit STARCDsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -110,15 +110,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2021 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -44,8 +44,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef STLsurfaceFormat_H #ifndef Foam_STLsurfaceFormat_H
#define STLsurfaceFormat_H #define Foam_STLsurfaceFormat_H
#include "STLReader.H" #include "STLReader.H"
#include "MeshedSurface.H" #include "MeshedSurface.H"
@ -94,7 +94,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
STLsurfaceFormat(const fileName& filename); explicit STLsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -133,8 +133,8 @@ public:
const UnsortedMeshedSurface<Face>& surf const UnsortedMeshedSurface<Face>& surf
); );
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in STL format
// as ASCII or BINARY or dependent on the extension //- as ASCII or BINARY or dependent on the extension
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -154,8 +154,8 @@ public:
); );
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in STL format
// as ASCII or BINARY, depending on the extension //- as ASCII or BINARY, depending on the extension
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -165,7 +165,7 @@ public:
); );
//- Write UnsortedMeshedSurface //- Write UnsortedMeshedSurface
// as ASCII or BINARY, depending on the extension //- as ASCII or BINARY, depending on the extension
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -178,15 +178,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -45,8 +45,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef TRIsurfaceFormat_H #ifndef Foam_TRIsurfaceFormat_H
#define TRIsurfaceFormat_H #define Foam_TRIsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -84,7 +84,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
TRIsurfaceFormat(const fileName& filename); explicit TRIsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -93,7 +93,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in TRI format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -115,15 +115,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -46,8 +46,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef VTKsurfaceFormat_H #ifndef Foam_VTKsurfaceFormat_H
#define VTKsurfaceFormat_H #define Foam_VTKsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -86,7 +86,7 @@ public:
// Constructors // Constructors
//- Construct from file name //- Construct from file name
VTKsurfaceFormat(const fileName& filename); explicit VTKsurfaceFormat(const fileName& filename);
//- Destructor //- Destructor
@ -95,7 +95,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in legacy VTK format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -117,15 +117,27 @@ public:
// Member Functions // Member Functions
//- Read from file //- Read from file
virtual bool read(const fileName& filename); virtual bool read(const fileName& filename) override;
//- Write meshed surface to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd. Copyright (C) 2017-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -46,8 +46,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef VTPsurfaceFormat_H #ifndef Foam_VTPsurfaceFormat_H
#define VTPsurfaceFormat_H #define Foam_VTPsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -95,7 +95,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in VTP format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -116,13 +116,25 @@ public:
// Member Functions // Member Functions
//- Write meshed surface to a file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd. Copyright (C) 2016-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -41,8 +41,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef X3DsurfaceFormat_H #ifndef Foam_X3DsurfaceFormat_H
#define X3DsurfaceFormat_H #define Foam_X3DsurfaceFormat_H
#include "MeshedSurface.H" #include "MeshedSurface.H"
#include "MeshedSurfaceProxy.H" #include "MeshedSurfaceProxy.H"
@ -80,7 +80,7 @@ public:
// Static Functions // Static Functions
//- Write surface mesh components by proxy //- Write surface mesh components (by proxy) in X3D format
static void write static void write
( (
const fileName& filename, const fileName& filename,
@ -92,13 +92,25 @@ public:
// Member Functions // Member Functions
//- Write surface mesh to file //- Write surface mesh to file (by proxy)
virtual void write virtual void write
( (
const fileName& name, const fileName& name,
IOstreamOption streamOpt = IOstreamOption(), IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null const dictionary& options = dictionary::null
) const ) const override
{
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
}
//- Write surface mesh to file (by proxy)
virtual void write
(
const fileName& name,
const word& fileType, /* ignored */
IOstreamOption streamOpt = IOstreamOption(),
const dictionary& options = dictionary::null
) const override
{ {
write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options); write(name, MeshedSurfaceProxy<Face>(*this), streamOpt, options);
} }

View File

@ -237,7 +237,7 @@ protected:
const tmp<Field<Type>>& tfield const tmp<Field<Type>>& tfield
) const; ) const;
#undef declareSurfaceFieldMethod #undef declareSurfaceFieldMethods
#define declareSurfaceFieldMethods(Type) \ #define declareSurfaceFieldMethods(Type) \
\ \
tmp<Field<Type>> mergeField(const Field<Type>& fld) const; \ tmp<Field<Type>> mergeField(const Field<Type>& fld) const; \