Skip to content
Snippets Groups Projects
Select Git revision
  • 830b3278241c7bb98ee035c42ffb3750be0cbd5c
  • master default protected
  • TH2MPF_fixed_stress
  • TH2MPF
  • THMPF-REBASED
  • THMPhF
  • v6.4.1
  • v6.4.0
  • v6.3.3
  • v6.3.3-ci-test
  • 6.4.1
  • 6.4.0
  • 6.3.3
  • data-explorer-5
  • 6.3.2
  • 6.3.1
  • 6.3.0
  • 6.2.2
  • 6.2.1
  • 6.2.0
  • 6.2.0-rc1
  • 6.1.0
  • 6.1.0-rc1
  • 6.0.8-insitu
  • 6.0.8
  • 6.0.7
  • 6.0.6
  • tes-works-again
  • 6.0.5
  • ode-pre-review
30 results

Location.h

Blame
  • Forked from ogs / ogs
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Location.h 1.16 KiB
    /**
     * \author Norihiro Watanabe
     * \date   2013-04-16
     *
     * \copyright
     * Copyright (c) 2013, 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 <iostream>
    
    #ifndef LOCATION_H_
    #define LOCATION_H_
    
    namespace MeshLib
    {
    
    enum class MeshItemType { Node, Edge, Face, Cell };
    
    std::ostream& operator<<(std::ostream& os, MeshItemType const& t);
    
    /// Spatial location description.
    ///
    /// The spatial location is given by a mesh by its \c mesh_id, item's type (face,
    /// cell, etc. see MeshItemType), and item's number by its \c item_id.
    struct Location
    {
        std::size_t          mesh_id;
        MeshItemType         item_type;
        std::size_t          item_id;
    
        Location(std::size_t meshid, MeshItemType itemtype, std::size_t itemid)
        : mesh_id(meshid), item_type(itemtype), item_id(itemid){}
    };
    
    /// Lexicographic order of Location.
    bool operator<(const Location& left, const Location& right);
    
    std::ostream& operator<<(std::ostream& os, Location const& l);
    
    }   // namespace MeshLib
    
    #endif  // LOCATION_H_