Skip to content
Snippets Groups Projects
Select Git revision
  • 47aa4e4742d6367890c9083b433e5e7770db08f2
  • main default protected
  • ms_diff
  • line_plots_legend_outside
  • BC_visualization
  • sample_probe_api
  • kwargs_streamlines
  • gradient
  • ogs_interactive
  • var_active_fix
  • paper
  • DocuForParameter
  • paperChangesTom
  • release_0_7_0_RC2
  • improve_type_checking
  • logs4
  • fix_het_materials
  • pyvista_045
  • error_plot_probe
  • mesh_converter_better_error_message
  • fix_subdomain
  • 0.7.1
  • 0.7.1.RC1
  • 0.7.0
  • 0.7.0.RC6
  • 0.7.0.RC5
  • 0.7.0.RC4
  • 0.7.0.RC3
  • 0.7.0.RC2
  • 0.7.0.RC1
  • logtest
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.1
  • 0.3.0
  • 0.2.0
  • 0.2.0RC1
  • 0.1.0
  • 0.0.3
  • 0.0.2
41 results

README.md

Blame
  • Forked from ogs / OpenGeoSys Tools / OGSTools
    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_