Loading...
Searching...
No Matches
VTKUnstructured.cpp
1/*---------------------------------------------------------------------------*\
2 *
3 * bitpit
4 *
5 * Copyright (C) 2015-2021 OPTIMAD engineering Srl
6 *
7 * -------------------------------------------------------------------------
8 * License
9 * This file is part of bitpit.
10 *
11 * bitpit is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License v3 (LGPL)
13 * as published by the Free Software Foundation.
14 *
15 * bitpit is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 * License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with bitpit. If not, see <http://www.gnu.org/licenses/>.
22 *
23\*---------------------------------------------------------------------------*/
24
25#include "VTK.hpp"
26
27#include "logger.hpp"
28
29namespace bitpit{
30
46
52
53 m_nCells = n ;
54
55}
56
62
63 m_connectivity = connectivity ;
64
65}
66
73void VTKUnstructuredGrid::HomogeneousInfoStreamer::flushData( std::fstream &str, const std::string &name, VTKFormat format){
74
75 assert( m_type != VTKElementType::UNDEFINED ) ;
76
77 VTKDataType connectivityDataType = m_connectivity->getDataType();
78
79 if(name == "types" ){
80 uint8_t type = (uint8_t) m_type ;
81 for( uint64_t i=0; i<m_nCells; ++i){
82 flushValue(str, format, type );
83 }
84
85 } else if(name == "offsets" ){
86 uint8_t n = vtk::getElementNodeCount(m_type) ;
87 if (connectivityDataType == VTKDataType::Int64 || connectivityDataType == VTKDataType::UInt64) {
88 uint64_t offset(0) ;
89 for( uint64_t i=0; i<m_nCells; ++i){
90 offset += n ;
91 flushValue(str, format, offset );
92 }
93 } else if (connectivityDataType == VTKDataType::Int32 || connectivityDataType == VTKDataType::UInt32) {
94 uint32_t offset(0) ;
95 for( uint64_t i=0; i<m_nCells; ++i){
96 offset += n ;
97 flushValue(str, format, offset );
98 }
99 } else if (connectivityDataType == VTKDataType::Int16 || connectivityDataType == VTKDataType::UInt16) {
100 uint16_t offset(0) ;
101 for( uint64_t i=0; i<m_nCells; ++i){
102 offset += n ;
103 flushValue(str, format, offset );
104 }
105 } else if (connectivityDataType == VTKDataType::Int8 || connectivityDataType == VTKDataType::UInt8) {
106 uint8_t offset(0) ;
107 for( uint64_t i=0; i<m_nCells; ++i){
108 offset += n ;
109 flushValue(str, format, offset );
110 }
111 }
112
113 }
114
115}
116
134
136
137 int nGeomFields = 6;
138
139 m_geometry.resize(nGeomFields);
140
141 m_geometry[getFieldGeomId(VTKUnstructuredField::POINTS)] = VTKField("Points") ;
142 m_geometry[getFieldGeomId(VTKUnstructuredField::OFFSETS)] = VTKField("offsets") ;
143 m_geometry[getFieldGeomId(VTKUnstructuredField::TYPES)] = VTKField("types") ;
144 m_geometry[getFieldGeomId(VTKUnstructuredField::CONNECTIVITY)] = VTKField("connectivity") ;
145 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_STREAMS)] = VTKField("faces") ;
146 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_OFFSETS)] = VTKField("faceoffsets") ;
147
148 for( auto & field : m_geometry ){
149 field.setLocation( VTKLocation::CELL ) ;
150 field.setFieldType( VTKFieldType::SCALAR ) ;
151 field.setDataType( VTKDataType::Int32 ) ;
152 field.setCodification(m_geomCodex);
153 }
154
155 m_geometry[getFieldGeomId(VTKUnstructuredField::POINTS)].setLocation( VTKLocation::POINT ) ;
156 m_geometry[getFieldGeomId(VTKUnstructuredField::POINTS)].setFieldType( VTKFieldType::VECTOR ) ;
157 m_geometry[getFieldGeomId(VTKUnstructuredField::POINTS)].setDataType( VTKDataType::Float64 ) ;
158
159 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_STREAMS)].disable();
160 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_OFFSETS)].disable();
161
164
165 setElementType(elementType);
166
167}
168
176VTKUnstructuredGrid::VTKUnstructuredGrid( const std::string &dir, const std::string &name, VTKElementType elementType ):VTKUnstructuredGrid( elementType ){
177
178 setNames( dir, name ) ;
179
180}
181
188
189 m_elementType = elementType ;
190 if ( m_elementType == VTKElementType::UNDEFINED ) {
191 return;
192 }
193
194 // Set homogeneous info streamer properties
196 m_homogeneousInfoStreamer.setConnectivityField( &(m_geometry[getFieldGeomId(VTKUnstructuredField::CONNECTIVITY)]) );
197
198 // Types
199 int types_gid = getFieldGeomId(VTKUnstructuredField::TYPES);
200 m_geometry[types_gid].setDataType( VTKDataType::UInt8) ;
201 m_geometry[types_gid].setStreamer(m_homogeneousInfoStreamer) ;
202
203 // Offsets
204 if ( m_elementType != VTKElementType::POLYGON && m_elementType != VTKElementType::POLYHEDRON) {
205 int offsets_gid = getFieldGeomId(VTKUnstructuredField::OFFSETS);
206 m_geometry[offsets_gid].setStreamer(m_homogeneousInfoStreamer) ;
207 }
208
209}
210
227void VTKUnstructuredGrid::setDimensions( uint64_t ncells, uint64_t npoints, uint64_t nconn, uint64_t nfacestream ){
228
229 // Grid size
230 m_points = npoints ;
231
232 m_cells = ncells ;
233 if ( m_elementType != VTKElementType::UNDEFINED ) {
235 }
236
237 // Connectivity
238 bool unevenConnectivity = false;
239 unevenConnectivity |= ( m_elementType == VTKElementType::UNDEFINED ) ;
240 unevenConnectivity |= ( m_elementType == VTKElementType::POLYGON ) ;
241 unevenConnectivity |= ( m_elementType == VTKElementType::POLYHEDRON ) ;
242
243 if ( unevenConnectivity ) {
244 m_nConnectivityEntries = nconn ;
245 } else {
247 }
248
249 assert( (m_cells != 0 && m_nConnectivityEntries != 0) || (m_cells == 0 && m_nConnectivityEntries == 0) );
250
251 // Face stream
252 bool faceSteamEnabled = false;
253 faceSteamEnabled |= ( m_elementType == VTKElementType::POLYGON ) ;
254 faceSteamEnabled |= ( m_elementType == VTKElementType::POLYHEDRON ) ;
255 faceSteamEnabled |= ( m_elementType == VTKElementType::UNDEFINED && nfacestream > 0 ) ;
256
257 if ( faceSteamEnabled ) {
258 m_nFaceStreamEntries = nfacestream ;
259
260 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_STREAMS)].enable();
261 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_OFFSETS)].enable();
262 } else {
264
265 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_STREAMS)].disable();
266 m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_OFFSETS)].disable();
267 }
268
269}
270
277
278 int index = getFieldGeomId(fieldEnum) ;
279 VTKField& field = m_geometry[index] ;
280
281 field.setStreamer( *streamer ) ;
282
283}
284
290
291 uint64_t nconn(0) ;
292
293 std::fstream str ;
294 std::fstream::pos_type position_appended;
295 std::string line;
296 char c_ ;
297 uint32_t nbytes32 ;
298 uint64_t nbytes64 ;
299
300 // Geometry id of the connectivity
301 int connectivity_gid = getFieldGeomId(VTKUnstructuredField::CONNECTIVITY);
302 if(connectivity_gid < 0) return nconn;
303
304 if(!m_geometry[connectivity_gid].hasAllMetaData() || !m_geometry[connectivity_gid].isEnabled()){
305 throw std::runtime_error("VTKUnstructuredGrid::readConnectivityEntries. Connectivity field is missing meta information or disabled");
306 }
307
308 if( m_geometry[connectivity_gid].getCodification() == VTKFormat::APPENDED ){
309 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary ) ;
310 //Go to the initial position of the appended section
311 while( getline(str, line) && (! bitpit::utils::string::keywordInString( line, "<AppendedData")) ){}
312 str >> c_;
313 while( c_ != '_') str >> c_;
314 position_appended = str.tellg();
315 str.close();
316 }
317
318 //Open in binary for read
319 if( m_geometry[connectivity_gid].getCodification() == VTKFormat::APPENDED ){
320 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary);
321 str.seekg( position_appended) ;
322 str.seekg( m_geometry[connectivity_gid].getOffset(), std::ios::cur) ;
323
324 int dataSize = VTKTypes::sizeOfType( m_geometry[connectivity_gid].getDataType() ) ;
325 assert(dataSize > 0) ;
326
327 if( m_headerType== "UInt32") {
328 genericIO::absorbBINARY( str, nbytes32 ) ;
329 nconn = nbytes32 / dataSize ;
330 }
331
332 if( m_headerType== "UInt64") {
333 genericIO::absorbBINARY( str, nbytes64 ) ;
334 nconn = nbytes64 / dataSize ;
335 }
336 str.close();
337 }
338
339
340
341 //Open in ascii for read
342 if( m_geometry[connectivity_gid].getCodification() == VTKFormat::ASCII ){
343 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary);
344 str.seekg( m_geometry[connectivity_gid].getPosition() ) ;
345
346 std::string line ;
347 std::vector<uint64_t> temp;
348
349 nconn = 0 ;
350
351 getline( str, line) ;
352 while( ! bitpit::utils::string::keywordInString(line,"/DataArray") ) {
353 temp.clear() ;
355 nconn += temp.size() ;
356 getline( str, line) ;
357 }
358
359 str.close();
360 }
361
362 return nconn ;
363
364}
365
371 uint64_t nface(0) ;
372 std::fstream str ;
373 std::fstream::pos_type position_appended;
374 std::string line;
375 char c_ ;
376 uint32_t nbytes32 ;
377 uint64_t nbytes64 ;
378
379 // Geometry id of the facestream
380 int facestream_gid = getFieldGeomId(VTKUnstructuredField::FACE_STREAMS);
381 if(facestream_gid < 0 ) return nface;
382 if(!m_geometry[facestream_gid].hasAllMetaData() || !m_geometry[facestream_gid].isEnabled()) return nface;
383
384 if( m_geometry[facestream_gid].getCodification() == VTKFormat::APPENDED ){
385 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary ) ;
386 //Go to the initial position of the appended section
387 while( getline(str, line) && (! bitpit::utils::string::keywordInString( line, "<AppendedData")) ){}
388 str >> c_;
389 while( c_ != '_') str >> c_;
390 position_appended = str.tellg();
391 str.close();
392 }
393
394 //Open in binary for read
395 if( m_geometry[facestream_gid].getCodification() == VTKFormat::APPENDED ){
396 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary);
397 str.seekg( position_appended) ;
398 str.seekg( m_geometry[facestream_gid].getOffset(), std::ios::cur) ;
399
400 int dataSize = VTKTypes::sizeOfType( m_geometry[facestream_gid].getDataType() ) ;
401 assert(dataSize > 0) ;
402
403 if( m_headerType== "UInt32") {
404 genericIO::absorbBINARY( str, nbytes32 ) ;
405 nface = nbytes32 / dataSize ;
406 }
407
408 if( m_headerType== "UInt64") {
409 genericIO::absorbBINARY( str, nbytes64 ) ;
410 nface = nbytes64 / dataSize ;
411 }
412 }
413
414 //Open in ASCII for read
415 if( m_geometry[facestream_gid].getCodification() == VTKFormat::ASCII ){
416 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary );
417 str.seekg( m_geometry[facestream_gid].getPosition() ) ;
418
419 std::string line ;
420 std::vector<uint64_t> temp;
421
422 nface = 0 ;
423
424 getline( str, line) ;
425 while( ! bitpit::utils::string::keywordInString(line,"/DataArray") ) {
426 temp.clear() ;
428 nface += temp.size() ;
429 getline( str, line) ;
430 }
431
432 str.close();
433 }
434
435 return nface ;
436}
437
442
443 std::fstream str ;
444
445 //Since we are writing only ASCII information (without retrieving stream
446 //position with seekg/tellg) it is safe to open it in text/ASCII mode.
447 str.open( m_fh.getPath( ), std::ios::out ) ;
448 if (!str.is_open()) {
449 throw std::runtime_error("Cannot create file \"" + m_fh.getName() + "\"" + " inside the directory \"" + m_fh.getDirectory() + "\"");
450 }
451
452 //Writing XML header
453 str << "<?xml version=\"1.0\"?>" << std::endl;
454
455 //Writing Piece Information
456 str << "<VTKFile type=\"UnstructuredGrid\" version=\"1.0\" byte_order=\"LittleEndian\" header_type=\"" << m_headerType << "\">" << std::endl;
457 str << " <UnstructuredGrid>" << std::endl;;
458 str << " <Piece NumberOfPoints=\"" << m_points << "\" NumberOfCells=\"" << m_cells << "\">" << std::endl;
459
460 //Header for Data
461 writeDataHeader( str, false );
462
463 //Wring Geometry Information
464 str << " <Points>" << std::endl ;;
465 writeDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::POINTS)] ) ;
466 str << " </Points>" << std::endl;
467
468 str << " <Cells>" << std::endl ;;
469 writeDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::OFFSETS)] ) ;
470 writeDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::TYPES)] ) ;
471 writeDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::CONNECTIVITY)] ) ;
473 writeDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_STREAMS)] ) ;
474 writeDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_OFFSETS)] ) ;
475 }
476 str << " </Cells>" << std::endl;
477
478 //Closing Piece
479 str << " </Piece>" << std::endl;
480 str << " </UnstructuredGrid>" << std::endl;
481
482 //Appended Section
483 if (isAppendedActive()) {
484 str << " <AppendedData encoding=\"raw\">" << std::endl;
485 str << "_" << std::endl;
486 }
487
488 // Closing XML
489 str << "</VTKFile>" << std::endl;
490
491 str.close() ;
492
493}
494
501void VTKUnstructuredGrid::writeCollection( const std::string &outputName, const std::string &collectionName ) const {
502
503 // Only one process in a parallel output should write the collection
504 if (m_procs <= 1 || m_rank != 0) {
505 return;
506 }
507
508 // Create file handler
509 FileHandler fhp = createCollectionHandler(collectionName) ;
510
511 // Initialize outout stream
512 std::fstream str ;
513 str.open( fhp.getPath( ), std::ios::out ) ;
514 if (!str.is_open()) {
515 throw std::runtime_error("Cannot create file \"" + fhp.getName() + "\"" + " inside the directory \"" + fhp.getDirectory() + "\"");
516 }
517
518 //Writing XML header
519 str << "<?xml version=\"1.0\"?>" << std::endl;
520
521 //Writing Piece Information
522 str << "<VTKFile type=\"PUnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">" << std::endl;
523 str << " <PUnstructuredGrid GhostLevel=\"0\">" << std::endl;;
524
525 //Header for Data
526 writeDataHeader( str, true );
527
528 //Wring Geometry Information
529 str << " <PPoints>" << std::endl;
530 writePDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::POINTS)] ) ;
531 str << " </PPoints>" << std::endl;
532
533 str << " <PCells>" << std::endl;
534 writePDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::OFFSETS)] ) ;
535 writePDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::TYPES)] ) ;
536 writePDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::CONNECTIVITY)] ) ;
538 writePDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_STREAMS)] ) ;
539 writePDataArray( str, m_geometry[getFieldGeomId(VTKUnstructuredField::FACE_OFFSETS)] ) ;
540 }
541 str << " </PCells>" << std::endl;
542
543 FileHandler fho(m_fh) ;
544 fho.setSeries(false) ;
545 fho.setDirectory(".") ;
546 fho.setName(outputName) ;
547 for( int i=0; i<m_procs; i++){
548 fho.setBlock(i) ;
549 str << " <Piece Source=\"" << fho.getPath() << "\"/>" << std::endl;
550 }
551
552 str << " </PUnstructuredGrid>" << std::endl;
553 str << "</VTKFile>" << std::endl;
554
555 str.close() ;
556
557
558}
559
565
566 std::fstream str;
567 std::string line, temp;
568
569 std::fstream::pos_type position;
570
571 //Although we are not explicit calling seekg/tellg on the stream, we still
572 //need to open the file in binary mode because this mode is needed by the
573 //for reading data array information.
574 str.open( m_fh.getPath( ), std::ios::in | std::ios::binary ) ;
575
576 getline( str, line);
577 while( ! bitpit::utils::string::keywordInString( line, "<VTKFile")){
578 getline(str, line);
579 }
580
581 if( bitpit::utils::string::getAfterKeyword( line, "header_type", '\"', temp) ){
582 setHeaderType( temp) ;
583 }
584
585 while( ! bitpit::utils::string::keywordInString( line, "<Piece")){
586 getline(str, line);
587 }
588
589 bitpit::utils::string::getAfterKeyword( line, "NumberOfPoints", '\"', temp) ;
591
592 bitpit::utils::string::getAfterKeyword( line, "NumberOfCells", '\"', temp) ;
594
595
596 position = str.tellg() ;
597 readDataHeader( str ) ;
598
599 // Read metadata information
600 for( auto &field : m_geometry ){
601 str.seekg( position) ;
602 if( ! readDataArray( str, field ) ) {
603#if BITPIT_ENABLE_DEBUG
604 log::cout() <<"Geometry field " << field.getName() << " not found, it will be disabled" << std::endl ;
605#endif
606 field.disable();
607 }
608 }
609
610
611 str.close() ;
612
613 if( m_elementType == VTKElementType::UNDEFINED) {
615 } else {
616 // Metadata information read form file may not match the information
617 // set in our own streamer. If the grid is homogeneous, we need to
618 // reset all metadata that can't be overwritten.
620
621 // Set the dimension of the grid
623 }
624
625
626}
627
633
634 return calcFieldEntries( m_geometry[getFieldGeomId(VTKUnstructuredField::CONNECTIVITY)] ) ;
635}
636
642uint64_t VTKUnstructuredGrid::calcFieldSize( const VTKField &field ) const {
643
644 uint64_t bytes = calcFieldEntries(field) ;
645 bytes *= VTKTypes::sizeOfType( field.getDataType() ) ;
646
647 return bytes ;
648
649}
650
656uint64_t VTKUnstructuredGrid::calcFieldEntries( const VTKField &field ) const {
657
658 uint64_t entries(0) ;
659 const std::string &name = field.getName() ;
660
661 if( name == "Points" ){
662 entries = m_points * VTKField::getComponentCount(VTKFieldType::VECTOR) ;
663
664 } else if( name == "offsets" ){
665 entries = m_cells ;
666
667 } else if( name == "types" ){
668 entries = m_cells ;
669
670 } else if( name == "connectivity"){
671 entries = m_nConnectivityEntries ;
672
673 } else if( name == "faces"){
674 entries = m_nFaceStreamEntries ;
675
676 } else if( name == "faceoffsets"){
677 entries = m_cells ;
678
679 } else{
680
681 VTKLocation location( field.getLocation() ) ;
682 assert( location != VTKLocation::UNDEFINED) ;
683
684 if( location == VTKLocation::CELL ){
685 entries = m_cells ;
686
687 } else if( location == VTKLocation::POINT ){
688 entries = m_points ;
689
690 }
691
692 entries *= field.getComponentCount() ;
693
694 }
695
696 return entries ;
697
698}
699
706
707 uint8_t comp ;
708 const std::string &name = field.getName() ;
709
710 if( name == "Points" ){
711 comp = VTKField::getComponentCount(VTKFieldType::VECTOR) ;
712
713 } else if( name == "offsets" ){
714 comp = 1 ;
715
716 } else if( name == "types" ){
717 comp = 1 ;
718
719 } else if( name == "connectivity" ){
720 if( m_elementType != VTKElementType::UNDEFINED){
722
723 } else {
724 comp = 1;
725
726 }
727
728 } else if( name == "faces" ){
729 comp = 1 ;
730
731 } else if( name == "faceoffsets" ){
732 comp = 1 ;
733
734 } else{
735 comp = field.getComponentCount();
736
737 }
738
739 return comp ;
740
741}
742
748int VTKUnstructuredGrid::getFieldGeomId( VTKUnstructuredField field ) const {
749
750 return static_cast<std::underlying_type<VTKElementType>::type>(field) ;
751}
752
759 return "vtu";
760}
761
762}
Creates file names and checks status.
std::string getPath() const
const std::string & getDirectory() const
void setDirectory(const std::string &d_)
void setName(const std::string &n_)
const std::string & getName() const
void setBlock(int b_)
void setSeries(bool s_)
void setAppendix(const std::string &a_)
std::string getName() const
Definition logger.cpp:842
The base class to be used to derive VTK streamers form.
Definition VTK.hpp:209
VTKField handles geometry and data field information for the VTK format.
Definition VTK.hpp:247
const std::string & getName() const
Definition VTKField.cpp:167
VTKLocation getLocation() const
Definition VTKField.cpp:200
unsigned getComponentCount() const
Definition VTKField.cpp:183
void setStreamer(VTKBaseStreamer &)
Definition VTKField.cpp:145
static unsigned getComponentCount(VTKFieldType fieldType)
Definition VTKField.cpp:40
VTKDataType getDataType() const
Definition VTKField.cpp:192
static uint8_t sizeOfType(VTKDataType type)
Definition VTKTypes.cpp:67
void setConnectivityField(const VTKField *connectivity)
VTK input output for Unstructured Meshes.
Definition VTK.hpp:433
uint8_t calcFieldComponents(const VTKField &) const override
HomogeneousInfoStreamer m_homogeneousInfoStreamer
Definition VTK.hpp:454
uint64_t calcConnectivityEntries() const
std::string getExtension() const override
uint64_t m_nConnectivityEntries
Definition VTK.hpp:451
uint64_t calcFieldSize(const VTKField &) const override
uint64_t m_nFaceStreamEntries
Definition VTK.hpp:452
void setElementType(VTKElementType)
void writeMetaInformation() const override
void setDimensions(uint64_t, uint64_t, uint64_t nconn=0, uint64_t nfacestream=0)
VTKUnstructuredGrid(VTKElementType elementType=VTKElementType::UNDEFINED)
VTKElementType m_elementType
Definition VTK.hpp:453
uint64_t calcFieldEntries(const VTKField &) const override
void setGeomData(VTKUnstructuredField, std::vector< T > &)
Definition VTK.tpp:94
A base class for VTK input output.
Definition VTK.hpp:298
uint16_t m_rank
Definition VTK.hpp:305
uint64_t m_cells
Definition VTK.hpp:303
std::vector< VTKField > m_geometry
Definition VTK.hpp:309
void readDataHeader(std::fstream &)
Definition VTK.cpp:1370
void setNames(const std::string &, const std::string &)
Definition VTK.cpp:108
FileHandler m_fh
Definition VTK.hpp:301
void setHeaderType(const std::string &)
Definition VTK.cpp:83
std::string m_headerType
Definition VTK.hpp:307
bool readDataArray(std::fstream &, VTKField &) const
Definition VTK.cpp:1468
void writeCollection() const
Definition VTK.cpp:789
void writePDataArray(std::fstream &, const VTKField &) const
Definition VTK.cpp:1224
uint16_t m_procs
Definition VTK.hpp:304
void writeDataHeader(std::fstream &, bool parallel=false) const
Definition VTK.cpp:1146
bool isAppendedActive() const
Definition VTK.cpp:603
void writeDataArray(std::fstream &, const VTKField &) const
Definition VTK.cpp:1212
FileHandler createCollectionHandler(const std::string &collectionName) const
Definition VTK.cpp:934
uint64_t m_points
Definition VTK.hpp:302
VTKFormat m_geomCodex
Definition VTK.hpp:310
VTKFormat
Definition VTK.hpp:92
VTKElementType
Definition VTK.hpp:112
VTKDataType
Definition VTK.hpp:74
VTKLocation
Definition VTK.hpp:102
VTKUnstructuredField
Definition VTK.hpp:137
bool keywordInString(const std::string &line, const std::string &key)
void convertString(std::string input, T &output)
bool getAfterKeyword(const std::string &line, const std::string &key, char del, std::string &result)
void absorbBINARY(std::fstream &str, data_T &data)
Logger & cout(log::Level defaultSeverity, log::Visibility defaultVisibility)
Definition logger.cpp:1705
uint8_t getElementNodeCount(VTKElementType)
Definition VTKUtils.cpp:35
--- layout: doxygen_footer ---