diff --git a/FileIO/RapidXmlIO/BoostVtuInterface.cpp b/FileIO/RapidXmlIO/BoostVtuInterface.cpp index 52adc39113d3e53f147bde4bc58f7800ae55b105..182140490934b4eb54748d070bbe94f6acb232e3 100644 --- a/FileIO/RapidXmlIO/BoostVtuInterface.cpp +++ b/FileIO/RapidXmlIO/BoostVtuInterface.cpp @@ -71,6 +71,10 @@ MeshLib::Mesh* BoostVtuInterface::readVTUFile(const std::string &file_name) std::cout << "BoostVtuInterface::readVTUFile() - Unknown compression method." << std::endl; return nullptr; } + + // TODO: remove this once compressed data can be handled!! + std::cout << "Handling of compressed meshes not yet implemented." << std::endl; + return nullptr; } //skip to <Piece>-tag and start parsing content diff --git a/MeshLib/ElementStatus.cpp b/MeshLib/ElementStatus.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b87cf58939f73391a269c87a6a1dcdb24a106c87 --- /dev/null +++ b/MeshLib/ElementStatus.cpp @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * + * \file ElementStatus.cpp + * + * Created on 2012-12-18 by Karsten Rink + */ + +#include "ElementStatus.h" + +namespace MeshLib { + +ElementStatus::ElementStatus(Mesh const*const mesh) +: _mesh(mesh), _status(mesh->getNElements(), true) +{ +} + + +} + diff --git a/MeshLib/ElementStatus.h b/MeshLib/ElementStatus.h new file mode 100644 index 0000000000000000000000000000000000000000..ad41759b0fc449b7fed524aad89dac4cc3a6acde --- /dev/null +++ b/MeshLib/ElementStatus.h @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * + * \file ElementStatus.h + * + * Created on 2012-12-18 by Karsten Rink + */ + +#ifndef ELEMENTSTATUS_H_ +#define ELEMENTSTATUS_H_ + +#include "Mesh.h" + +namespace MeshLib { + +/** + * An object to store which elements of the mesh are active and which are inactive + */ +class ElementStatus +{ + +public: + /// Constructor using mesh + ElementStatus(Mesh const*const mesh); + + bool getElementStatus(unsigned i) { return _status[i]; }; + + bool isActive(unsigned i) { return _status[i]; }; + + void setActive(unsigned i) { _status[i] = true; }; + + void setInactive(unsigned i) { _status[i] = false; }; + + void setElementStatus(unsigned i, bool status) { _status[i] = status; }; + + ~ElementStatus() {}; + +protected: + Mesh const*const _mesh; + std::vector<bool> _status; + +}; /* class */ + +} /* namespace */ + +#endif /* ELEMENTSTATUS_H_ */ +