/*------------------------------- phasicFlow --------------------------------- O C enter of O O E ngineering and O O M ultiscale modeling of OOOOOOO F luid flow ------------------------------------------------------------------------------ Copyright (C): www.cemf.ir email: hamid.r.norouzi AT gmail.com ------------------------------------------------------------------------------ Licence: This file is part of phasicFlow code. It is a free software for simulating granular and multiphase flows. You can redistribute it and/or modify it under the terms of GNU General Public License v3 or any other later versions. phasicFlow is distributed to help others in their research in the field of granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -----------------------------------------------------------------------------*/ #ifndef __postprocessOperationFunctions_hpp__ #define __postprocessOperationFunctions_hpp__ #include #include "types.hpp" #include "iOstream.hpp" #include "regionField.hpp" namespace pFlow::postprocessData { /// Type alias for processed region field types. /// Only regionField, regionField, and regionField are supported /// in the postprocessOperation class. using processedRegFieldType = std::variant < regionField, regionField, regionField >; template inline bool writeField ( iOstream& os, timeValue t, const regionField field, uint32 threshold, const T& defValue=T{} ) { const auto& regPoints = field.regPoints(); const uint32 n = field.size(); os<= threshold) { if constexpr(std::is_same_v) { os<) { os << field[i].x() << ' ' << field[i].y() << ' ' << field[i].z() << ' ' << field[i].w() << tab; } else { os<) { os<) { os << defValue.x() << ' ' << defValue.y() << ' ' << defValue.z() << ' ' << defValue.w() << tab; } else { os<