OGS
MeshGenerator.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <array>
14#include <functional>
15#include <string>
16#include <vector>
17
18#include "BaseLib/Subdivision.h"
19#include "MathLib/Point3d.h"
20#include "MeshLib/Mesh.h"
21
22namespace MeshLib
23{
24class Node;
25}
26
27namespace MeshToolsLib
28{
29namespace MeshGenerator
30{
31
38std::vector<MeshLib::Node*> generateRegularNodes(
39 const std::vector<const std::vector<double>*>& vec_xyz_coords,
40 const MathLib::Point3d& origin = MathLib::ORIGIN);
41
48std::vector<MeshLib::Node*> generateRegularNodes(
49 const std::vector<double>& vec_x_coords,
50 const MathLib::Point3d& origin = MathLib::ORIGIN);
51
59std::vector<MeshLib::Node*> generateRegularNodes(
60 std::vector<double>& vec_x_coords,
61 std::vector<double>& vec_y_coords,
62 const MathLib::Point3d& origin = MathLib::ORIGIN);
63
72std::vector<MeshLib::Node*> generateRegularNodes(
73 std::vector<double>& vec_x_coords,
74 std::vector<double>& vec_y_coords,
75 std::vector<double>& vec_z_coords,
76 const MathLib::Point3d& origin = MathLib::ORIGIN);
77
85std::vector<MeshLib::Node*> generateRegularNodes(
86 const std::array<unsigned, 3>& n_cells,
87 const std::array<double, 3>& cell_size,
88 const MathLib::Point3d& origin);
89
98 const BaseLib::ISubdivision& div,
99 MathLib::Point3d const& origin = MathLib::ORIGIN,
100 std::string const& mesh_name = "mesh");
101
111 const double length,
112 const std::size_t subdivision,
113 MathLib::Point3d const& origin = MathLib::ORIGIN,
114 std::string const& mesh_name = "mesh");
115
125 const unsigned n_cells,
126 const double cell_size,
127 MathLib::Point3d const& origin = MathLib::ORIGIN,
128 std::string const& mesh_name = "mesh");
129
140 const BaseLib::ISubdivision& div_x,
141 const BaseLib::ISubdivision& div_y,
142 MathLib::Point3d const& origin = MathLib::ORIGIN,
143 std::string const& mesh_name = "mesh");
144
156 const double length,
157 const std::size_t subdivision,
158 MathLib::Point3d const& origin = MathLib::ORIGIN,
159 std::string const& mesh_name = "mesh");
160
174 const double x_length,
175 const double y_length,
176 const std::size_t x_subdivision,
177 const std::size_t y_subdivision,
178 MathLib::Point3d const& origin = MathLib::ORIGIN,
179 std::string const& mesh_name = "mesh");
180
192 const unsigned n_x_cells,
193 const unsigned n_y_cells,
194 const double cell_size,
195 MathLib::Point3d const& origin = MathLib::ORIGIN,
196 std::string const& mesh_name = "mesh");
197
210 const unsigned n_x_cells,
211 const unsigned n_y_cells,
212 const double cell_size_x,
213 const double cell_size_y,
214 MathLib::Point3d const& origin = MathLib::ORIGIN,
215 std::string const& mesh_name = "mesh");
216
228 const BaseLib::ISubdivision& div_x,
229 const BaseLib::ISubdivision& div_y,
230 const BaseLib::ISubdivision& div_z,
231 MathLib::Point3d const& origin = MathLib::ORIGIN,
232 std::string const& mesh_name = "mesh");
233
243 const double length,
244 const std::size_t subdivision,
245 MathLib::Point3d const& origin = MathLib::ORIGIN,
246 std::string const& mesh_name = "mesh");
247
261 const double x_length,
262 const double y_length,
263 const double z_length,
264 const std::size_t x_subdivision,
265 const std::size_t y_subdivision,
266 const std::size_t z_subdivision,
267 MathLib::Point3d const& origin = MathLib::ORIGIN,
268 std::string const& mesh_name = "mesh");
269
281 const unsigned n_x_cells,
282 const unsigned n_y_cells,
283 const unsigned n_z_cells,
284 const double cell_size,
285 MathLib::Point3d const& origin = MathLib::ORIGIN,
286 std::string const& mesh_name = "mesh");
287
301 const unsigned n_x_cells,
302 const unsigned n_y_cells,
303 const unsigned n_z_cells,
304 const double cell_size_x,
305 const double cell_size_y,
306 const double cell_size_z,
307 MathLib::Point3d const& origin = MathLib::ORIGIN,
308 std::string const& mesh_name = "mesh");
309
324 const BaseLib::ISubdivision& div_x,
325 const BaseLib::ISubdivision& div_y,
326 const BaseLib::ISubdivision& div_z,
327 MathLib::Point3d const& origin = MathLib::ORIGIN,
328 std::string const& mesh_name = "mesh");
329
341 const BaseLib::ISubdivision& div_x,
342 const BaseLib::ISubdivision& div_y,
343 MathLib::Point3d const& origin = MathLib::ORIGIN,
344 std::string const& mesh_name = "mesh");
345
357 const double length,
358 const std::size_t subdivision,
359 MathLib::Point3d const& origin = MathLib::ORIGIN,
360 std::string const& mesh_name = "mesh");
361
375 const double x_length,
376 const double y_length,
377 const std::size_t x_subdivision,
378 const std::size_t y_subdivision,
379 MathLib::Point3d const& origin = MathLib::ORIGIN,
380 std::string const& mesh_name = "mesh");
381
393 const unsigned n_x_cells,
394 const unsigned n_y_cells,
395 const double cell_size,
396 MathLib::Point3d const& origin = MathLib::ORIGIN,
397 std::string const& mesh_name = "mesh");
398
411 const unsigned n_x_cells,
412 const unsigned n_y_cells,
413 const double cell_size_x,
414 const double cell_size_y,
415 MathLib::Point3d const& origin = MathLib::ORIGIN,
416 std::string const& mesh_name = "mesh");
417
432 const double x_length,
433 const double y_length,
434 const double z_length,
435 const std::size_t x_subdivision,
436 const std::size_t y_subdivision,
437 const std::size_t z_subdivision,
438 MathLib::Point3d const& origin = MathLib::ORIGIN,
439 std::string const& mesh_name = "mesh");
440
452 const unsigned n_x_cells,
453 const unsigned n_y_cells,
454 const unsigned n_z_cells,
455 const double cell_size,
456 MathLib::Point3d const& origin = MathLib::ORIGIN,
457 std::string const& mesh_name = "mesh");
458
472 const unsigned n_x_cells,
473 const unsigned n_y_cells,
474 const unsigned n_z_cells,
475 const double cell_size_x,
476 const double cell_size_y,
477 const double cell_size_z,
478 MathLib::Point3d const& origin = MathLib::ORIGIN,
479 std::string const& mesh_name = "mesh");
480
494 const BaseLib::ISubdivision& div_x,
495 const BaseLib::ISubdivision& div_y,
496 const BaseLib::ISubdivision& div_z,
497 MathLib::Point3d const& origin = MathLib::ORIGIN,
498 std::string const& mesh_name = "mesh");
499
516 const double x_length,
517 const double y_length,
518 const double z_length,
519 const std::size_t x_subdivision,
520 const std::size_t y_subdivision,
521 const std::size_t z_subdivision,
522 MathLib::Point3d const& origin = MathLib::ORIGIN,
523 std::string const& mesh_name = "mesh");
524
541 const unsigned n_x_cells,
542 const unsigned n_y_cells,
543 const unsigned n_z_cells,
544 const double cell_size_x,
545 const double cell_size_y,
546 const double cell_size_z,
547 MathLib::Point3d const& origin = MathLib::ORIGIN,
548 std::string const& mesh_name = "mesh");
549
555 std::string const& mesh_name, MathLib::Point3d const& ll,
556 MathLib::Point3d const& ur, std::array<std::size_t, 2> const& n_steps,
557 const std::function<double(double, double)>& f);
558
559} // namespace MeshGenerator
560} // namespace MeshToolsLib
Definition of the Mesh class.
Definition of the Point3d class.
const Point3d ORIGIN
Definition Point3d.h:98
MeshLib::Mesh * generateLineMesh(const BaseLib::ISubdivision &div, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")
MeshLib::Mesh * generateRegularPyramidMesh(const BaseLib::ISubdivision &div_x, const BaseLib::ISubdivision &div_y, const BaseLib::ISubdivision &div_z, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")
MeshLib::Mesh * generateRegularTetMesh(const BaseLib::ISubdivision &div_x, const BaseLib::ISubdivision &div_y, const BaseLib::ISubdivision &div_z, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")
MeshLib::Mesh * generateRegularQuadMesh(const BaseLib::ISubdivision &div_x, const BaseLib::ISubdivision &div_y, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")
MeshLib::Mesh * generateRegularPrismMesh(const double x_length, const double y_length, const double z_length, const std::size_t x_subdivision, const std::size_t y_subdivision, const std::size_t z_subdivision, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")
std::vector< MeshLib::Node * > generateRegularNodes(const std::vector< const std::vector< double > * > &vec_xyz_coords, const MathLib::Point3d &origin=MathLib::ORIGIN)
MeshLib::Mesh * createSurfaceMesh(std::string const &mesh_name, MathLib::Point3d const &ll, MathLib::Point3d const &ur, std::array< std::size_t, 2 > const &n_steps, const std::function< double(double, double)> &f)
MeshLib::Mesh * generateRegularTriMesh(const BaseLib::ISubdivision &div_x, const BaseLib::ISubdivision &div_y, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")
MeshLib::Mesh * generateRegularHexMesh(const BaseLib::ISubdivision &div_x, const BaseLib::ISubdivision &div_y, const BaseLib::ISubdivision &div_z, MathLib::Point3d const &origin=MathLib::ORIGIN, std::string const &mesh_name="mesh")