Go to the documentation of this file.
21 #ifndef __pointFieldToVTK_hpp__
22 #define __pointFieldToVTK_hpp__
35 systemControl &control,
36 const fileSystem &destPath,
41 systemControl &control,
42 const fileSystem &destPath,
55 const IOfileHeader &header,
60 const IOfileHeader &header,
63 template <
typename IntType>
66 const word &fieldName,
72 const word &fieldName,
78 const word &fieldName,
82 template <
typename Type>
87 template <
typename Type>
93 template <
typename IntType>
104 if (!checkFieldType<IntType>(objectType))
110 auto field = PointFieldType(
113 static_cast<IntType
>(0));
115 const IntType *data = field.deviceViewAll().data();
126 template <
typename IntType>
129 const word &fieldName,
137 if(std::is_same_v<IntType, int> || std::is_same_v<IntType, const int> )
139 os <<
"FIELD FieldData 1\n"
140 << fieldName <<
" 1 " << numData <<
" int\n";
142 else if( std::is_same_v<IntType, unsigned int>|| std::is_same_v<IntType, const unsigned int>)
144 os <<
"FIELD FieldData 1\n"
145 << fieldName <<
" 1 " << numData <<
" unsigned_int\n";
149 WARNING<<
"Field "<< fieldName<<
" has invalid data type for conversion. Type is "
156 for (
uint32 i = 0; i < numData; ++i)
159 os.
stdStream().write(
reinterpret_cast<const char*
>(&val),
sizeof(IntType));
165 for (
uint32 i = 0; i < numData; ++i)
167 os << field[i] <<
'\n';
bool regexCheck(const word &TYPENAME, const word &fieldType)
bool convertTimeFolderPointFields(systemControl &control, const fileSystem &destPath, const word &bName, word &filename)
bool convertIntPointField(Ostream &os, const IOfileHeader &header, pointStructure &pStruct)
bool checkFieldType(word objectType)
virtual std::ostream & stdStream()
Access to underlying std::ostream.
Vector< word > wordVector
bool addUndstrcuturedGridField(Ostream &os, realx3 *position, uint32 numPoints)
bool convertTimeFolderPointFieldsSelected(systemControl &control, const fileSystem &destPath, const word &bName, const wordVector &fieldsName, bool mustExist, word &filename)
bool convertRealTypePointField(Ostream &os, const IOfileHeader &header, pointStructure &pStruct)
bool convertRealx3TypePointField(Ostream &os, const IOfileHeader &header, pointStructure &pStruct)
bool addIntPointField(Ostream &os, const word &fieldName, IntType *field, uint32 numData)
Standard output stream for BINARY and ASCII formats.
bool addRealPointField(Ostream &os, const word &fieldName, const real *field, uint32 numData)
bool addRealx3PointField(Ostream &os, const word &fieldName, const realx3 *field, uint32 numData)