Skip to content
Snippets Groups Projects
Commit dbab6b88 authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge pull request #68 from rinkk/elementstatus

Class to store active/inactive status for mesh elements
parents 24813087 406f2d11
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
/**
* 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)
{
}
}
/**
* 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_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment