Plugins
Loading...
Searching...
No Matches
segment_network.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Gesellschaft fuer Anlagen- und Reaktorsicherheit gGmbH
3 * SPDX-License-Identifier: EUPL-1.2
4 * SPDX-FileContributor: Sebastian Reiter
5 * SPDX-FileContributor: Goethe Universität Frankfurt
6 * SPDX-FileType: SOURCE
7 *
8 * This file is part of d3f++.
9 * d3f++ is an extension for UG4. Licensing information and citation requirements of UG4 are provided in LICENSES/UG4-LGPL_2.1
10 */
11
12
13#ifndef __H__UG_segment_network
14#define __H__UG_segment_network
15
16#include "lib_grid/grid/grid.h"
20
21namespace ug{
22namespace d3f{
23
25
32{
33 public:
34 static const int dim = 3;
35
39
40 typedef number gauge_t;
43
44 public:
54
57
60 (
61 const char* name,
62 number maxEdgeLen
63 );
64
67 (
69 );
70
73 (
74 gauge_accessor_t& z_acc,
75 const char* name
76 );
77
80 (
81 const char* name
82 )
83 {
85 }
86
88
89 size_t find_vertices
90 (
91 std::vector<Vertex*>& vrtsOut,
92 const vector_t& center,
93 number radius
94 ) const;
95
96 inline Grid& grid() {return m_grid;}
97
100
103
105
106 private:
113};
114
115}// end of namespace
116}// end of namespace
117
118#endif //__H__UG_segment_network
119
bool access(Grid &grid, TAttachment &a)
void attach_to_vertices(IAttachment &attachment)
void assign_grid(Grid &grid)
Represents a network of segments, like, e.g. a low dimensional river network.
Definition segment_network.h:32
Grid::VertexAttachmentAccessor< position_attachment_t > position_accessor_t
Definition segment_network.h:38
position_attachment_t position_attachment()
Definition segment_network.h:98
SegmentNetwork()
Constructor:
Definition segment_network.h:46
gauge_accessor_t gauge_accessor()
Definition segment_network.h:102
Attachment< gauge_t > gauge_attachment_t
Definition segment_network.h:41
~SegmentNetwork()
Destructor:
Definition segment_network.h:56
Attachment< vector_t > position_attachment_t
Definition segment_network.h:37
void save_to_file_with_(gauge_accessor_t &z_acc, const char *name)
saves the segment network into a file (mainly for plotting) using the given gauge values
Definition segment_network.cpp:106
static const int dim
Definition segment_network.h:34
gauge_attachment_t gauge_attachment()
Definition segment_network.h:101
gauge_attachment_t m_aGauge
Definition segment_network.h:110
size_t find_vertices(std::vector< Vertex * > &vrtsOut, const vector_t &center, number radius) const
finds the vertices in the specified sphere to vrtsOut
Definition segment_network.cpp:132
vector2 vector_t
Definition segment_network.h:36
Grid m_grid
Definition segment_network.h:107
position_accessor_t m_aaPos
Definition segment_network.h:109
void load_from_file(const char *name, number maxEdgeLen)
loads a segment network from a grid file
Definition segment_network.cpp:30
Grid & grid()
Definition segment_network.h:96
GridSubsetHandler m_SH
Definition segment_network.h:112
GridSubsetHandler & subset_handler()
Definition segment_network.h:104
void set_gauge_values(SmartPtr< UserData< number, dim > > h)
sets the gauge values from a UserData object
Definition segment_network.cpp:87
void save_to_file(const char *name)
saves the segment network into a file (mainly for plotting)
Definition segment_network.h:80
gauge_accessor_t m_aaGauge
Definition segment_network.h:111
Grid::VertexAttachmentAccessor< gauge_attachment_t > gauge_accessor_t
Definition segment_network.h:42
position_accessor_t position_accessor()
Definition segment_network.h:99
number gauge_t
Definition segment_network.h:40
position_attachment_t m_aPos
Definition segment_network.h:108
double number