Commit 8fafbe50 authored by Michael Turner's avatar Michael Turner
Browse files

clean up bool operators

parent 666103d6
////////////////////////////////////////////////////////////////////////////////
//
// File: MeshElements.cpp
// File: BooleanOperators.cpp
//
// For more information, please see: http://www.nektar.info/
//
......@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Mesh manipulation objects.
// Description: boolean evaluations of mesh objects.
//
////////////////////////////////////////////////////////////////////////////////
......@@ -43,11 +43,17 @@ namespace Nektar
namespace NekMeshUtils
{
/**
* @brief compares two element config structs
*/
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
{
return (c1.m_e == c2.m_e && c1.m_order == c2.m_order);
}
/**
* @brief compares two element sharedptrs
*/
bool operator==(ElementSharedPtr const &e1, ElementSharedPtr const &e2)
{
return e1->GetId() == e2->GetId();
......@@ -117,6 +123,9 @@ bool operator==(NodeSharedPtr const &p1, NodeSharedPtr const &p2)
return *p1 == *p2;
}
/**
* @brief compares two nodes for inequality
*/
bool operator!=(NodeSharedPtr const &p1, NodeSharedPtr const &p2)
{
if(p1->m_id != p2->m_id)
......@@ -137,6 +146,9 @@ bool operator< (NodeSharedPtr const &p1, NodeSharedPtr const &p2)
return *p1 < *p2;
}
/**
* @brief ostream operator for nodes
*/
std::ostream &operator<<(std::ostream &os, const NodeSharedPtr &n)
{
os << n->m_x << " " << n->m_y << " " << n->m_z;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment