62 if( format==VTKFormat::ASCII){
65 }
else if( format==VTKFormat::APPENDED) {
83 if( format==VTKFormat::ASCII){
86 }
else if( format==VTKFormat::APPENDED) {
90 throw std::runtime_error(
"VTK format not supported.") ;
105 if( format==VTKFormat::ASCII){
108 }
else if( format==VTKFormat::APPENDED) {
112 throw std::runtime_error(
"VTK format not supported.") ;
129 resize( std::is_fundamental<T>{}, entries, components) ;
131 if( format==VTKFormat::ASCII){
134 }
else if( format==VTKFormat::APPENDED) {
151 m_ptr->resize(entries) ;
164 uint64_t elements = entries /components ;
165 m_ptr->resize(elements) ;
167 for(
auto & element : (*m_ptr) ){
182 auto fieldItr = m_field.find(name) ;
184 if( fieldItr!=m_field.end() ){
185 m_field.erase(fieldItr) ;
188 std::unique_ptr<VTKBaseContainer> temp = std::unique_ptr<VTKBaseContainer>(
new VTKVectorContainer<T>(data) ) ;
189 m_field.emplace( name, std::move(temp) ) ;
void flushValue(std::fstream &, VTKFormat, const T &value) const
void addData(const std::string &, std::vector< T > &)
Implementation of VTKBaseContainer in order to support natively std::vector in VTK.
void absorbData(std::fstream &, VTKFormat, uint64_t, uint8_t) override
VTKVectorContainer * clone() const override
VTKVectorContainer(std::vector< T > &)
void flushData(std::fstream &, VTKFormat) override
void resize(std::true_type, uint64_t, uint8_t)
#define BITPIT_UNUSED(variable)
void flushASCII(std::fstream &str, const uint8_t &data)
void absorbBINARY(std::fstream &str, data_T &data)
void absorbASCII(std::fstream &str, data_T &data)
void flushBINARY(std::fstream &str, const data_T &data)
void allocate(std::vector< T > &, int)