mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- The writers have changed from being a generic state-less set of routines to more properly conforming to the normal notion of a writer. These changes allow us to combine output fields (eg, in a single VTK/vtp file for each timestep). Parallel data reduction and any associated bookkeeping is now part of the surface writers. This improves their re-usability and avoids unnecessary and premature data reduction at the sampling stage. It is now possible to have different output formats on a per-surface basis. - A new feature of the surface sampling is the ability to "store" the sampled surfaces and fields onto a registry for reuse by other function objects. Additionally, the "store" can be triggered at the execution phase as well
70 lines
2.9 KiB
C++
70 lines
2.9 KiB
C++
/*---------------------------------------------------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration |
|
|
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
|
\\/ 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/>.
|
|
|
|
InClass
|
|
Foam::surfaceWriterMethods
|
|
|
|
Description
|
|
Convenience macros for instantiating surfaceWriter methods.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#ifndef surfaceWriterMethods_H
|
|
#define surfaceWriterMethods_H
|
|
|
|
namespace Foam
|
|
{
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
// Instantiate templated method for standard types
|
|
#define defineSurfaceWriterWriteField(ThisClass, FieldType) \
|
|
Foam::fileName ThisClass::write \
|
|
( \
|
|
const word& fieldName, \
|
|
const Field<FieldType>& values \
|
|
) \
|
|
{ \
|
|
return writeTemplate(fieldName, values); \
|
|
}
|
|
|
|
|
|
#define defineSurfaceWriterWriteFields(ThisClass) \
|
|
defineSurfaceWriterWriteField(ThisClass, label); \
|
|
defineSurfaceWriterWriteField(ThisClass, scalar); \
|
|
defineSurfaceWriterWriteField(ThisClass, vector); \
|
|
defineSurfaceWriterWriteField(ThisClass, sphericalTensor); \
|
|
defineSurfaceWriterWriteField(ThisClass, symmTensor); \
|
|
defineSurfaceWriterWriteField(ThisClass, tensor)
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
} // End namespace Foam
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#endif
|
|
|
|
// ************************************************************************* //
|