https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: df2b56d9fed0cc4e2743742efa76f8c0ed443d19 authored by Dmitri Naumov on 25 February 2021, 21:50:39 UTC
[PL] Use constexpr if replacing enable_if.
Tip revision: df2b56d
Location.cpp
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#include "Location.h"
#include <ostream>

namespace MeshLib
{

std::ostream& operator<<(std::ostream& os, MeshItemType const& t)
{
    switch (t)
    {
    case MeshItemType::Node: return os << "N";
    case MeshItemType::Edge: return os << "E";
    case MeshItemType::Face: return os << "F";
    case MeshItemType::Cell: return os << "C";
    case MeshItemType::IntegrationPoint: return os << "I";
    };
    return os;
}

std::ostream& operator<<(std::ostream& os, Location const& l)
{
    return os << "(" << l.mesh_id
        << ", " << l.item_type
        << ", " << l.item_id
        << ")";
}

}   // namespace MeshLib
back to top