/
conduit_blueprint_mesh_examples.hpp
114 lines (90 loc) · 4.73 KB
/
conduit_blueprint_mesh_examples.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit
// Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
// other details. No copyright assignment is required to contribute to Conduit.
//-----------------------------------------------------------------------------
///
/// file: conduit_blueprint_mesh_examples.hpp
///
//-----------------------------------------------------------------------------
#ifndef CONDUIT_BLUEPRINT_MESH_EXAMPLES_HPP
#define CONDUIT_BLUEPRINT_MESH_EXAMPLES_HPP
//-----------------------------------------------------------------------------
// conduit lib includes
//-----------------------------------------------------------------------------
#include "conduit.hpp"
#include "conduit_blueprint.hpp"
#include "conduit_blueprint_exports.h"
//-----------------------------------------------------------------------------
// -- begin conduit::--
//-----------------------------------------------------------------------------
namespace conduit
{
//-----------------------------------------------------------------------------
// -- begin conduit::blueprint --
//-----------------------------------------------------------------------------
namespace blueprint
{
//-----------------------------------------------------------------------------
// -- begin conduit::blueprint::mesh --
//-----------------------------------------------------------------------------
namespace mesh
{
//-----------------------------------------------------------------------------
/// Methods that generate example meshes.
//-----------------------------------------------------------------------------
namespace examples
{
/// Generates a uniform grid with a scalar field that assigns a unique,
/// monotonically increasing value to each element.
void CONDUIT_BLUEPRINT_API basic(const std::string &mesh_type,
conduit::index_t nx,
conduit::index_t ny,
conduit::index_t nz,
conduit::Node &res);
/// Generates a braid-like example mesh that covers elements defined in a
/// rectilinear grid. The element type (e.g. triangles, quads, their 3D
/// counterparts, or a mixture) and the coordinate set/topology
/// types can be configured by specifying different "mesh_type" values
/// (see the Conduit documentation for details).
void CONDUIT_BLUEPRINT_API braid(const std::string &mesh_type,
conduit::index_t nx,
conduit::index_t ny,
conduit::index_t nz,
conduit::Node &res);
/// Generates a multi-domain fibonacci estimation of a golden spiral.
void CONDUIT_BLUEPRINT_API spiral(conduit::index_t ndomains,
conduit::Node &res);
/// Generates a tessellated heterogeneous polygonal mesh consisting of
/// packed octogons and rectangles.
void CONDUIT_BLUEPRINT_API polytess(conduit::index_t nlevels,
conduit::Node &res);
/// Generates an assortment of extra meshes that demonstrate the use of
/// less common concepts (e.g. adjacency sets, amr blocks, etc.).
void CONDUIT_BLUEPRINT_API misc(const std::string &mesh_type,
conduit::index_t nx,
conduit::index_t ny,
conduit::index_t nz,
conduit::Node &res);
/// Generates a mesh that uses uniform adjsets
void CONDUIT_BLUEPRINT_API adjset_uniform(conduit::Node &res);
// Generates a chain of cubes and triangular prisms
void CONDUIT_BLUEPRINT_API polychain(const conduit::index_t length,
conduit::Node &res);
}
//-----------------------------------------------------------------------------
// -- end conduit::blueprint::mesh::examples --
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
// -- end conduit::blueprint::mesh --
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
// -- end conduit::blueprint --
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
// -- end conduit --
//-----------------------------------------------------------------------------
#endif