https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: 0fde67c0ca8818233131619e1c07b8c4be4094a0 authored by Christoph Lehmann on 01 May 2016, 20:11:48 UTC
[TES] chaged reaction taming strategy
Tip revision: 0fde67c
BoundaryElementsOnSurface.h
/**
 * @copyright
 * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/LICENSE.txt
 */
#ifndef BOUNDARYELEMENTSONSURFACE_H_
#define BOUNDARYELEMENTSONSURFACE_H_

#include <vector>

namespace GeoLib
{
class Surface;
}

namespace MeshLib
{
class Mesh;
class Element;
}

namespace MeshGeoToolsLib
{
class MeshNodeSearcher;

/**
 * This class collects element faces located along a surface.
 * Note that internal faces are not collected in this class.
 */
class BoundaryElementsOnSurface
{
public:
	/**
	 * Constructor
	 * @param mesh             a mesh object
	 * @param mshNodeSearcher  a MeshNodeSearcher object which is internally used to search mesh nodes
	 * @param sfc              a surface object where face elements are searched for
	 */
	BoundaryElementsOnSurface(MeshLib::Mesh const& mesh, MeshNodeSearcher &mshNodeSearcher, GeoLib::Surface const& sfc);

	/// destructor
	virtual ~BoundaryElementsOnSurface();

	/// return the mesh object
	MeshLib::Mesh const& getMesh() const {return _mesh;}

	/**
	 * Deploying this method the user can get access to the underlying
	 * GeoLib::Surface.
	 * @return the underlying GeoLib::Surface
	 */
	GeoLib::Surface const& getSurface() const {return _sfc;}

	/**
	 * Return the vector of boundary elements (i.e. faces). The elements are unsorted.
	 */
	std::vector<MeshLib::Element*> const& getBoundaryElements() const {return _boundary_elements;}

private:
	MeshLib::Mesh const& _mesh;
	GeoLib::Surface const& _sfc;
	std::vector<MeshLib::Element*> _boundary_elements;
};

} // end namespace MeshGeoToolsLib

#endif /* BOUNDARYELEMENTSONSURFACE_H_ */
back to top