OGS
Location.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
Location.h
"
5
6
#include <ostream>
7
8
namespace
MeshLib
9
{
10
std::ostream&
operator<<
(std::ostream& os,
MeshItemType
const
& t)
11
{
12
switch
(t)
13
{
14
case
MeshItemType::Node
:
15
return
os <<
"N"
;
16
case
MeshItemType::Edge
:
17
return
os <<
"E"
;
18
case
MeshItemType::Face
:
19
return
os <<
"F"
;
20
case
MeshItemType::Cell
:
21
return
os <<
"C"
;
22
case
MeshItemType::IntegrationPoint
:
23
return
os <<
"I"
;
24
};
25
return
os;
26
}
27
28
std::ostream&
operator<<
(std::ostream& os,
Location
const
& l)
29
{
30
return
os <<
"("
<< l.
mesh_id
<<
", "
<< l.
item_type
<<
", "
<< l.
item_id
31
<<
")"
;
32
}
33
34
}
// namespace MeshLib
Location.h
MeshLib
Definition
ProjectData.h:30
MeshLib::MeshItemType
MeshItemType
Definition
MeshEnums.h:12
MeshLib::MeshItemType::Cell
@ Cell
Definition
MeshEnums.h:16
MeshLib::MeshItemType::IntegrationPoint
@ IntegrationPoint
Definition
MeshEnums.h:17
MeshLib::MeshItemType::Node
@ Node
Definition
MeshEnums.h:13
MeshLib::MeshItemType::Face
@ Face
Definition
MeshEnums.h:15
MeshLib::MeshItemType::Edge
@ Edge
Definition
MeshEnums.h:14
MeshLib::operator<<
std::ostream & operator<<(std::ostream &os, Element const &e)
Definition
Element.cpp:97
MeshLib::Location
Definition
Location.h:19
MeshLib::Location::item_id
std::size_t item_id
Definition
Location.h:22
MeshLib::Location::mesh_id
std::size_t mesh_id
Definition
Location.h:20
MeshLib::Location::item_type
MeshItemType item_type
Definition
Location.h:21
MeshLib
Location.cpp
Generated by
1.14.0