ug4
tkd_info.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017: G-CSC, Goethe University Frankfurt
3  * Author: Martin Scherer, Rebecca Wittum, Sebastian Reiter
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef __H__UG_tkd_info
34 #define __H__UG_tkd_info
35 
36 #include <vector>
38 
39 namespace ug {
40 
41 class TKDInfo
42 {
43 public:
50  TKDInfo (number a, number w, number h, number d);
51 
52  static const int NUM_COORDS = 52;
53  static const int NUM_INNER_COORDS = 26;
54  static const int NUM_OUTER_COORDS = 26;
55 
56  static const int NUM_ELEMENTS = 54;
57  static const int NUM_INNER_ELEMENTS = 18;
58  static const int NUM_OUTER_ELEMENTS = 36;
59 
60  size_t num_coords () const {return (size_t)NUM_COORDS;}
61  size_t num_inner_coords () const {return (size_t)NUM_INNER_COORDS;}
62  size_t num_outer_coords () const {return (size_t)NUM_OUTER_COORDS;}
63 
64  const vector3* coords () const {return &m_coords[0];}
65  const vector3* inner_coords () const {return &m_coords[0];}
66  const vector3* outer_coords () const {return &m_coords[26];}
67 
68  size_t num_elements () const {return NUM_ELEMENTS;}
69  size_t num_inner_elements () const {return NUM_INNER_ELEMENTS;}
70  size_t num_outer_elements () const {return NUM_OUTER_ELEMENTS;}
71 
80  const int* inner_element_indices () const;
81  const int* outer_element_indices () const;
87 
88 private:
89  inline void init_coords ( vector3* coordsOut,
90  number a,
91  number w,
92  number h);
93 
94  std::vector<vector3> m_coords;
98 };
99 
100 }// end of namespace
101 
102 #endif //__H__UG_tkd_info
Definition: tkd_info.h:42
static const int NUM_INNER_COORDS
Definition: tkd_info.h:53
size_t num_outer_elements() const
Definition: tkd_info.h:70
number m_hlip
Definition: tkd_info.h:97
static const int NUM_INNER_ELEMENTS
Definition: tkd_info.h:57
size_t num_coords() const
Definition: tkd_info.h:60
std::vector< vector3 > m_coords
Definition: tkd_info.h:94
const vector3 * outer_coords() const
Definition: tkd_info.h:66
number m_alip
Definition: tkd_info.h:95
const vector3 * coords() const
Definition: tkd_info.h:64
size_t num_elements() const
Definition: tkd_info.h:68
number get_lipid_diameter()
Definition: tkd_info.h:85
const int * inner_element_indices() const
Definition: tkd_info.cpp:184
number get_lipid_edge_length()
Definition: tkd_info.h:84
static const int NUM_OUTER_COORDS
Definition: tkd_info.h:54
number m_wlip
Definition: tkd_info.h:96
size_t num_inner_coords() const
Definition: tkd_info.h:61
static const int NUM_ELEMENTS
Definition: tkd_info.h:56
number get_lipid_height()
Definition: tkd_info.h:86
static const int NUM_OUTER_ELEMENTS
Definition: tkd_info.h:58
size_t num_outer_coords() const
Definition: tkd_info.h:62
const vector3 * inner_coords() const
Definition: tkd_info.h:65
void init_coords(vector3 *coordsOut, number a, number w, number h)
Definition: tkd_info.cpp:141
size_t num_inner_elements() const
Definition: tkd_info.h:69
TKDInfo(number a, number w, number h, number d)
Definition: tkd_info.cpp:120
const int * outer_element_indices() const
Definition: tkd_info.cpp:191
static const int NUM_COORDS
Definition: tkd_info.h:52
double number
Definition: types.h:124
the ug namespace
typedefs for ugmath