sampledSet: Added setWriter::clone, and some minor formatting

This commit is contained in:
Will Bainbridge
2023-05-10 16:37:11 +01:00
parent 0b621c2908
commit c077ceda1a
15 changed files with 95 additions and 29 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -118,6 +118,7 @@ class arcUniform
//- Uses calcSamples to obtain samples and copies them into *this
void genSamples();
public:
//- Runtime type information
@ -136,7 +137,7 @@ public:
);
// Destructor
//- Destructor
virtual ~arcUniform();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,9 +97,8 @@ public:
);
// Destructor
virtual ~cellSetSampledSet();
//- Destructor
virtual ~cellSetSampledSet();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -123,9 +123,8 @@ public:
);
// Destructor
virtual ~circleRandom();
//- Destructor
virtual ~circleRandom();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,9 +97,8 @@ public:
);
// Destructor
virtual ~faceSetSampledSet();
//- Destructor
virtual ~faceSetSampledSet();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -118,9 +118,8 @@ public:
);
// Destructor
virtual ~sphereRandom();
//- Destructor
virtual ~sphereRandom();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -72,6 +72,13 @@ Foam::csvSetWriter::csvSetWriter(const dictionary& dict)
{}
Foam::csvSetWriter::csvSetWriter(const csvSetWriter& writer)
:
setWriter(writer),
separator_(writer.separator_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::csvSetWriter::~csvSetWriter()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,6 +87,15 @@ public:
//- Construct from dictionary
csvSetWriter(const dictionary& dict);
//- Construct copy
csvSetWriter(const csvSetWriter& writer);
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const
{
return autoPtr<setWriter>(new csvSetWriter(*this));
}
//- Destructor
virtual ~csvSetWriter();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,6 +60,12 @@ public:
//- Inherit constructors
using setWriter::setWriter;
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const
{
return autoPtr<setWriter>(new ensightSetWriter(*this));
}
//- Destructor
virtual ~ensightSetWriter();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,6 +61,12 @@ public:
//- Inherit constructors
using setWriter::setWriter;
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const
{
return autoPtr<setWriter>(new gnuplotSetWriter(*this));
}
//- Destructor
virtual ~gnuplotSetWriter();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,6 +61,12 @@ public:
//- Inherit constructors
using setWriter::setWriter;
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const
{
return autoPtr<setWriter>(new noSetWriter(*this));
}
//- Destructor
virtual ~noSetWriter();

View File

@ -71,6 +71,13 @@ Foam::rawSetWriter::rawSetWriter(const dictionary& dict)
{}
Foam::rawSetWriter::rawSetWriter(const rawSetWriter& writer)
:
setWriter(writer),
separateSegments_(true)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::rawSetWriter::~rawSetWriter()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,6 +84,15 @@ public:
//- Construct from dictionary
rawSetWriter(const dictionary& dict);
//- Construct copy
rawSetWriter(const rawSetWriter& writer);
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const
{
return autoPtr<setWriter>(new rawSetWriter(*this));
}
//- Destructor
virtual ~rawSetWriter();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -273,6 +273,13 @@ Foam::setWriter::setWriter(const dictionary& dict)
{}
Foam::setWriter::setWriter(const setWriter& writer)
:
writeFormat_(writer.writeFormat_),
writeCompression_(writer.writeCompression_)
{}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::setWriter> Foam::setWriter::New

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,7 +33,7 @@ Description
(
"myDirectory",
"mySet",
coordSet(points, true),
coordSet(true, "position", points),
"p", p,
"U", U
);
@ -340,6 +340,12 @@ public:
//- Construct from dictionary
setWriter(const dictionary& dict);
//- Construct copy
setWriter(const setWriter& writer);
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const = 0;
//- Destructor
virtual ~setWriter() = 0;
@ -397,7 +403,7 @@ public:
// "myDirectory", "mySet",
//
// // Geometry
// coordSet(points, true),
// coordSet(true, "position", points),
//
// // Fields
// "p", Field<scalar>(points.size(), ...),

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,6 +61,12 @@ public:
//- Inherit constructors
using setWriter::setWriter;
//- Construct and return a clone
virtual autoPtr<setWriter> clone() const
{
return autoPtr<setWriter>(new vtkSetWriter(*this));
}
//- Destructor
virtual ~vtkSetWriter();