Plugins
Loading...
Searching...
No Matches
grid_generation_tools.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013-2017: G-CSC, Goethe University Frankfurt
3 * Author: 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__grid_generation_tools__
34#define __H__UG__grid_generation_tools__
35
36#include <vector>
37#include "../mesh.h"
41
42#define TOOLTIP_NEW_OBJECT "Creates a new empty object."
43#define TOOLTIP_NEW_CSG_OBJECT "Creates a new csg object."
44#define TOOLTIP_MERGE_OBJECTS "Merges the selected objects into a new one."
45#define TOOLTIP_CLONE_MESH "Creates a new mesh and copies all content from the given mesh into the new instance."
46#define TOOLTIP_COPY_SELECTION "Copies the selected elements to a new mesh."
47#define TOOLTIP_CREATE_VERTEX "Creates a new vertex"
48#define TOOLTIP_CREATE_EDGE "Creates an edge between two selected vertices."
49#define TOOLTIP_CREATE_FACE "Creates a face between selected vertices."
50#define TOOLTIP_CREATE_VOLUME "Creates a volume between selected vertices."
51#define TOOLTIP_CREATE_PLANE "Creates a plane."
52#define TOOLTIP_CREATE_CIRCLE "Creates a circle."
53#define TOOLTIP_CREATE_BOX "Creates a box."
54#define TOOLTIP_CREATE_SPHERE "Creates a sphere."
55#define TOOLTIP_CREATE_TETRAHEDRON "Creates a tetrahedron."
56#define TOOLTIP_CREATE_PYRAMID "Creates a pyramid."
57#define TOOLTIP_CREATE_PRISM "Creates a prism."
58#define TOOLTIP_CREATE_DUALGRID "creates the dual grid consisting of control volumes as used in the finite volume method"
59#define TOOLTIP_CREATE_TKD "Creates a tetrakaidecahedral cell"
60#define TOOLTIP_CREATE_TKD_WITH_OUTER_LAYER "Creates a tetrakaidecahedral cell with a surrounding layer"
61
62namespace ug{
63namespace promesh{
64
67SmartPtr<Mesh> CloneMesh(Mesh* mesh);
68
69void CopySelection(Mesh* srcMesh, Mesh* destMesh);
70
71Vertex* CreateVertex(Mesh* obj, const vector3& pos, int subsetInd);
72
73Edge* CreateEdge(Mesh* obj, int subsetInd);
74
75Face* CreateFace(Mesh* obj, int subsetInd);
76
77Volume* CreateVolume(Mesh* obj, int subsetInd);
78
79void CreatePlane( Mesh* obj,
80 const vector3& upLeft,
81 const vector3& upRight,
82 const vector3& lowLeft,
83 const vector3& lowRight,
84 int subsetInd,
85 bool fill);
86
87void CreatePlane( Mesh* obj,
88 number width,
89 number height,
90 const vector3& center,
91 int subsetInd,
92 bool fill);
93
94void CreateCircle( Mesh* obj,
95 const vector3& center,
96 number radius,
97 int numRimVertices,
98 int subsetInd,
99 bool fill);
100
101void CreateBox( Mesh* obj,
102 const vector3& boxMin,
103 const vector3& boxMax,
104 int subsetInd,
105 bool fill);
106
107void CreateSphere( Mesh* obj,
108 const vector3& center,
109 number radius,
110 int numRefinements,
111 int subsetInd);
112
113void CreateTetrahedron(Mesh* obj, int subsetInd, bool fill);
114
115void CreatePyramid(Mesh* obj, int subsetInd, bool fill);
116
117void CreatePrism(Mesh* obj, int subsetInd, bool fill);
118
119void CreateTKD(Mesh* obj, int subsetInd, number a, number w, number h);
120
121void CreateTKDWithOuterLayer( Mesh* obj,
122 int innerSubsetInd,
123 int outerSubsetInd,
124 number a,
125 number w,
126 number h,
127 number d);
128
130}}// end of namespace
131
132#endif
void CreateTKDWithOuterLayer(Mesh *obj, int innerSubsetInd, int outerSubsetInd, number a, number w, number h, number d)
Definition grid_generation_tools.cpp:656
void CreatePrism(Mesh *obj, int subsetInd, bool fill)
Definition grid_generation_tools.cpp:590
void CreatePlane(Mesh *obj, const vector3 &upLeft, const vector3 &upRight, const vector3 &lowLeft, const vector3 &lowRight, int subsetInd, bool fill)
Definition grid_generation_tools.cpp:301
void CreatePyramid(Mesh *obj, int subsetInd, bool fill)
Definition grid_generation_tools.cpp:546
Volume * CreateVolume(Mesh *obj, int subsetInd)
Definition grid_generation_tools.cpp:233
void CreateTetrahedron(Mesh *obj, int subsetInd, bool fill)
Definition grid_generation_tools.cpp:503
Edge * CreateEdge(Mesh *obj, int subsetInd)
Definition grid_generation_tools.cpp:148
void CreateSphere(Mesh *obj, const vector3 &center, number radius, int numRefinements, int subsetInd)
Definition grid_generation_tools.cpp:483
void CreateTKD(Mesh *obj, int subsetInd, number a, number w, number h)
Definition grid_generation_tools.cpp:636
void CopySelection(Mesh *srcMesh, Mesh *destMesh)
Definition grid_generation_tools.cpp:85
void CreateCircle(Mesh *obj, const vector3 &center, number radius, int numRimVertices, int subsetInd, bool fill)
Definition grid_generation_tools.cpp:370
Vertex * CreateVertex(Mesh *obj, const vector3 &pos, int subsetInd)
Definition grid_generation_tools.cpp:127
SmartPtr< Mesh > CloneMesh(Mesh *mesh)
Definition grid_generation_tools.cpp:43
Face * CreateFace(Mesh *obj, int subsetInd)
Definition grid_generation_tools.cpp:183
void CreateBox(Mesh *obj, const vector3 &boxMin, const vector3 &boxMax, int subsetInd, bool fill)
Definition grid_generation_tools.cpp:431
double number
MathVector< 3, number > vector3