This file is indexed.

/usr/include/openturns/swig/Mesh_doc.i is in libopenturns-dev 1.9-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
%feature("docstring") OT::Mesh
"Mesh.

Available constructors:
    Mesh(*dim=1*)

    Mesh(*vertices*)

    Mesh(*vertices, simplices*)

Parameters
----------
dim : int, :math:`dim \\\\geq 0`
    The dimension of the vertices. By default, it creates only one
    vertex of dimension :math:`dim` with components equal to 0.
vertices : 2-d sequence of float
    Vertices' coordinates in :math:`\\\\Rset^{dim}`.
simplices : 2-d sequence of int
    List of simplices defining the topology of the mesh. The simplex
    :math:`[i_1, \\\\dots, i_{dim+1}]` connects the vertices of indices
    :math:`(i_1, \\\\dots, i_{dim+1})` in :math:`\\\\Rset^{dim}`. In dimension 1, a
    simplex is an interval :math:`[i_1, i_2]`; in dimension 2, it is a
    triangle :math:`[i_1, i_2, i_3]`.

See also
--------
RegularGrid

Examples
--------
>>> import openturns as ot
>>> # Define the vertices of the mesh
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [1.5, 1.0]]
>>> # Define the simplices of the mesh
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> # Create the mesh of dimension 2
>>> mesh2d = ot.Mesh(vertices, simplices)"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::ImportFromMSHFile
"Import mesh from FreeFem 2-d mesh files.

Parameters
----------
MSHFile : str
    A MSH ASCII file.

Returns
-------
mesh : :class:`~openturns.Mesh`
    Mesh defined in the file *MSHFile*."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::checkPointInSimplex
"Check if a point is inside a simplex.

Parameters
----------
point : sequence of float
    Point of dimension :math:`dim`, the dimension of the vertices of the mesh.
index : int
    Integer characterizes one simplex of the mesh.

Returns
-------
isInside : bool
    Flag telling whether *point* is inside the simplex of index *index*.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplex = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplex)
>>> # Create a point A inside the simplex
>>> pointA = [0.6, 0.3]
>>> print(mesh2d.checkPointInSimplex(pointA, 0))
True
>>> # Create a point B outside the simplex
>>> pointB = [1.1, 0.6]
>>> print(mesh2d.checkPointInSimplex(pointB, 0))
False"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::checkPointInSimplexWithCoordinates
"Check if a point is inside a simplex and returns its barycentric coordinates.

Parameters
----------
point : sequence of float
    Point of dimension :math:`dim`, the dimension of the vertices of the mesh.
index : int
    Integer characterizes one simplex of the mesh.

Returns
-------
isInside : bool
    Flag telling whether *point* is inside the simplex of index *index*.
coordinates : :class:`~openturns.Point`
    The barycentric coordinates of the given point wrt the vertices of the simplex
.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplex = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplex)
>>> # Create a point A inside the simplex
>>> pointA = [0.6, 0.3]
>>> print(mesh2d.checkPointInSimplexWithCoordinates(pointA, 0))
[True, class=Point name=Unnamed dimension=3 values=[0.4,0.3,0.3]]
>>> # Create a point B outside the simplex
>>> pointB = [1.1, 0.6]
>>> print(mesh2d.checkPointInSimplexWithCoordinates(pointB, 0))
[False, class=Point name=Unnamed dimension=3 values=[-0.1,0.5,0.6]]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::computeSimplexVolume
"Compute the volume of a given simplex.

Parameters
----------
index : int
    Integer characterizes one simplex of the mesh.

Returns
-------
volume : float
    Volume of the simplex of index *index*.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplex = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplex)
>>> print(mesh2d.computeSimplexVolume(0))
0.5"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::computeP1Gram
"Compute the P1 Lagrange finite element gram matrix of the mesh.

Returns
-------
gram : :class:`~openturns.CovarianceMatrix`
    P1 Lagrange finite element gram matrix of the mesh.

Notes
-----
The P1 Lagrange finite element space associated to a mesh with vertices :math:`(\\\\vect{x}_i)_{i=1,\\\\hdots,n}` is the space of piecewise-linear functions generated by the functions :math:`(\\\\phi_i)_{i=1,\\\\hdots,n}`, where :math:`\\\\phi_i(\\\\vect{x_i})=1`, :math:`\\\\phi_i(\\\\vect{x_j})=0` for :math:`j\\\\neq i` and the restriction of :math:`\\\\phi_i` to any simplex is an affine function. The vertices that are not included into at least one simplex are not taken into account.

The gram matrix of the mesh is defined as the symmetric positive definite matrix :math:`\\\\mat{K}` whose generic element :math:`K_{i,j}` is given by:

.. math::

    \\\\forall i,j=1,\\\\hdots,n,\\\\quad K_{i,j}=\\\\int_{\\\\cD}\\\\phi_i(\\\\vect{x})\\\\phi_j(\\\\vect{x})\\\\di{\\\\vect{x}}

This method is used in several algorithms related to stochastic process representation such as the Karhunen-Loeve decomposition.

Examples
--------
>>> import openturns as ot
>>> # Define the vertices of the mesh
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [1.5, 1.0]]
>>> # Define the simplices of the mesh
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> # Create the mesh of dimension 2
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> print(mesh2d.computeP1Gram())
[[ 0.0416667 0.0208333 0.0208333 0         ]
 [ 0.0208333 0.0625    0.03125   0.0104167 ]
 [ 0.0208333 0.03125   0.0625    0.0104167 ]
 [ 0         0.0104167 0.0104167 0.0208333 ]]
"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::draw
"Draw the mesh.

Returns
-------
graph : :class:`~openturns.Graph`
    If the dimension of the mesh is 1, it draws the corresponding interval,
    using the :meth:`draw1D` method; if the dimension is 2, it draws the
    triangular simplices, using the :meth:`draw2D` method; if the dimension is
    3, it projects the simplices on the plane of the two first components,
    using the :meth:`draw3D` method with its default parameters, superposing
    the simplices."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::draw1D
"Draw the mesh of dimension 1.

Returns
-------
graph : :class:`~openturns.Graph`
    Draws the line linking the vertices of the mesh when the mesh is of
    dimension 1.

Examples
--------
>>> import openturns as ot
>>> from openturns.viewer import View
>>> vertices = [[0.5], [1.5], [2.1], [2.7]]
>>> simplices = [[0, 1], [1, 2], [2, 3]]
>>> mesh1d = ot.Mesh(vertices, simplices)
>>> # Create a graph
>>> aGraph = mesh1d.draw1D()
>>> # Draw the mesh
>>> View(aGraph).show()"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::draw2D
"Draw the mesh of dimension 2.

Returns
-------
graph : :class:`~openturns.Graph`
    Draws the edges of each simplex, when the mesh is of dimension 2.

Examples
--------
>>> import openturns as ot
>>> from openturns.viewer import View
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [1.5, 1.0]]
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> # Create a graph
>>> aGraph = mesh2d.draw2D()
>>> # Draw the mesh
>>> View(aGraph).show()"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::draw3D
"Draw the bidimensional projection of the mesh.

Available usages:
    draw3D(*drawEdge=True, thetaX=0.0, thetaY=0.0, thetaZ=0.0, shading=False, rho=1.0*)

    draw3D(*drawEdge, rotation, shading, rho*)

Parameters
----------
drawEdge : bool
    Tells if the edge of each simplex has to be drawn.
thetaX : float
    Gives the value of the rotation along the X axis in radian.
thetaY : float
    Gives the value of the rotation along the Y axis in radian.
thetaZ : float
    Gives the value of the rotation along the Z axis in radian.
rotation : :class:`~openturns.SquareMatrix`
    Operates a rotation on the mesh before its projection of the plane of the
    two first components.
shading  : bool
    Enables to give a visual perception of depth and orientation.
rho : float, :math:`0 \\\\leq \\\\rho \\\\leq 1`
    Contraction factor of the simplices. If :math:`\\\\rho < 1`, all the
    simplices are contracted and appear deconnected: some holes are created,
    which enables to see inside the mesh. If :math:`\\\\rho = 1`, the simplices
    keep their initial size and appear connected. If :math:`\\\\rho = 0`, each
    simplex is reduced to its gravity center.

Returns
-------
graph : :class:`~openturns.Graph`
    Draws the bidimensional projection of the mesh on the :math:`(x,y)` plane.

Examples
--------
>>> import openturns as ot
>>> from openturns.viewer import View
>>> from math import cos, sin, pi
>>> vertices = [[0.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0],
...             [0.0, 1.0, 1.0], [1.0, 0.0, 0.0], [1.0, 0.0, 1.0],
...             [1.0, 1.0, 0.0], [1.0, 1.0, 1.0]]
>>> simplices = [[0, 1, 2, 4], [3, 5, 6, 7],[1, 2, 3, 6],
...              [1, 2, 4, 6], [1, 3, 5, 6], [1, 4, 5, 6]]
>>> mesh3d = ot.Mesh(vertices, simplices)
>>> # Create a graph
>>> aGraph = mesh3d.draw3D()
>>> # Draw the mesh
>>> View(aGraph).show()
>>> rotation = ot.SquareMatrix(3)
>>> rotation[0, 0] = cos(pi / 3.0)
>>> rotation[0, 1] = sin(pi / 3.0)
>>> rotation[1, 0] = -sin(pi / 3.0)
>>> rotation[1, 1] = cos(pi / 3.0)
>>> rotation[2, 2] = 1.0
>>> # Create a graph
>>> aGraph = mesh3d.draw3D(True, rotation, True, 1.0)
>>> # Draw the mesh
>>> View(aGraph).show()"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::exportToVTKFile
"Export the mesh to a VTK file.

Parameters
----------
myVTKFile.vtk : str
    Name of the created file which contains the mesh and the associated random
    values that can be visualized with the open source software
    `Paraview <http://www.paraview.org/>`_."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getDescription
"Get the description of the vertices.

Returns
-------
description : str
    Description of the vertices.

Examples
--------
>>> import openturns as ot
>>> mesh = ot.Mesh()
>>> vertices = ot.Sample([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]])
>>> vertices.setDescription(['X', 'Y'])
>>> mesh.setVertices(vertices)
>>> print(mesh.getDescription())
[X,Y]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getNearestVertex
"Get the nearest vertex of a given point.

Parameters
----------
point : sequence of float
    Point of dimension :math:`dim`, the dimension of the vertices of the mesh.

Returns
-------
vertex : :class:`~openturns.Point`
    Coordinates of the nearest vertex of *point*.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplices = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> point = [0.9, 0.4]
>>> print(mesh2d.getNearestVertex(point))
[1,0]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getNearestVertexIndex
"Get the index of the nearest vertex of a given point.

Parameters
----------
point : sequence of float
    Point of dimension :math:`dim`, the dimension of the vertices of the mesh.

Returns
-------
index : int
    Index of the simplex the nearest of *point* according to the Euclidean
    norm.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplices = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> point = [0.9, 0.4]
>>> print(mesh2d.getNearestVertexIndex(point))
1"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getNearestVertexAndSimplexIndicesWithCoordinates
"Get the index of the nearest vertex of a given point and the containing simplex if any, and returns its barycentric coordinates.

Parameters
----------
point : sequence of float
    Point of dimension :math:`dim`, the dimension of the vertices of the mesh.

Returns
-------
indices : :class:`~openturns.Indices`
    Collecton of 1 or 2 integers, the first one being the index of the vertex the closest to the given point and the second one the index of the containing simplex if the given point is inside of the mesh.
coordinates : :class:`~openturns.Point`
    The barycentric coordinates of the given point wrt the vertices of the containing simplex. It is of dimension 0 if the point is not contained into the mesh.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplex = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplex)
>>> # Create a point A inside the simplex
>>> pointA = [0.6, 0.3]
>>> print(mesh2d.getNearestVertexAndSimplexIndicesWithCoordinates(pointA))
[[1,0], class=Point name=Unnamed dimension=3 values=[0.4,0.3,0.3]]
>>> # Create a point B outside the simplex
>>> pointB = [1.1, 0.6]
>>> print(mesh2d.getNearestVertexAndSimplexIndicesWithCoordinates(pointB))
[[2], class=Point name=Unnamed dimension=0 values=[]]
"
// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getSimplex
"Get the simplex of a given index.

Parameters
----------
index : int
    Index characterizing one simplex of the mesh.

Returns
-------
indices : :class:`~openturns.Indices`
    Indices defining the simplex of index *index*. The simplex
    :math:`[i_1, \\\\dots, i_{n+1}]` relies the vertices of index
    :math:`(i_1, \\\\dots, i_{n+1})` in :math:`\\\\Rset^{dim}`. In dimension 1, a
    simplex is an interval :math:`[i_1, i_2]`; in dimension 2, it is a
    triangle :math:`[i_1, i_2, i_3]`.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [1.5, 1.0]]
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> print(mesh2d.getSimplex(0))
[0,1,2]
>>> print(mesh2d.getSimplex(1))
[1,2,3]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getSimplices
"Get the simplices of the mesh.

Returns
-------
indicesCollection : collection of :class:`~openturns.Indices`
    List of indices defining all the simplices. The simplex
    :math:`[i_1, \\\\dots, i_{n+1}]` relies the vertices of index
    :math:`(i_1, \\\\dots, i_{n+1})` in :math:`\\\\Rset^{dim}`. In dimension 1, a
    simplex is an interval :math:`[i_1, i_2]`; in dimension 2, it is a
    triangle :math:`[i_1, i_2, i_3]`.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [1.5, 1.0]]
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> print(mesh2d.getSimplices())
[[0,1,2],[1,2,3]]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getSimplicesNumber
"Get the number of simplices of the mesh.

Returns
-------
number : int
    Number of simplices of the mesh."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getVertex
"Get the vertex of a given index.

Parameters
----------
index : int
    Index characterizing one vertex of the mesh.

Returns
-------
vertex : :class:`~openturns.Point`
    Coordinates in :math:`\\\\Rset^{dim}` of the vertex of index *index*,
    where :math:`dim` is the dimension of the vertices of the mesh.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplices = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> print(mesh2d.getVertex(1))
[1,0]
>>> print(mesh2d.getVertex(0))
[0,0]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getVertices
"Get the vertices of the mesh.

Returns
-------
vertices : :class:`~openturns.Sample`
    Coordinates in :math:`\\\\Rset^{dim}` of the vertices,
    where :math:`dim` is the dimension of the vertices of the mesh.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplices = [[0, 1, 2]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> print(mesh2d.getVertices())
0 : [ 0 0 ]
1 : [ 1 0 ]
2 : [ 1 1 ]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getVerticesNumber
"Get the number of vertices of the mesh.

Returns
-------
number : int
    Number of vertices of the mesh."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getVolume
"Get the volume of the mesh.

Returns
-------
volume : float
    Geometrical volume of the mesh which is the sum of its simplices' volumes.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [1.5, 1.0]]
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> mesh2d = ot.Mesh(vertices, simplices)
>>> mesh2d.getVolume()
0.75"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::isRegular
"Check if the mesh is regular (only for 1-d meshes).

Returns
-------
isRegular : bool
    Tells if the mesh is regular or not.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.5], [1.5], [2.4], [3.5]]
>>> simplices = [[0, 1], [1, 2], [2, 3]]
>>> mesh1d = ot.Mesh(vertices, simplices)
>>> print(mesh1d.isRegular())
False
>>> vertices = [[0.5], [1.5], [2.5], [3.5]]
>>> mesh1d = ot.Mesh(vertices, simplices)
>>> print(mesh1d.isRegular())
True"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::isValid
"Check the mesh validity.

Returns
-------
validity : bool
    Tells if the mesh is valid i.e. if there is non-overlaping simplices,
    no unused vertex, no simplices with duplicate vertices and no coincident
    vertices."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::setSimplices
"Set the simplices of the mesh.

Parameters
----------
indices : 2-d sequence of int
    List of indices defining all the simplices. The simplex
    :math:`[i_1, \\\\dots, i_{n+1}]` relies the vertices of index
    :math:`(i_1, \\\\dots, i_{n+1})` in :math:`\\\\Rset^{dim}`. In dimension 1, a
    simplex is an interval :math:`[i_1, i_2]`; in dimension 2, it is a
    triangle :math:`[i_1, i_2, i_3]`.

Examples
--------
>>> import openturns as ot
>>> mesh = ot.Mesh()
>>> simplices = [[0, 1, 2], [1, 2, 3]]
>>> mesh.setSimplices(simplices)"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::setVertex
"Set a vertex of a given index.

Parameters
----------
index : int
    Index of the vertex to set.
vertex : sequence of float
    Cordinates in :math:`\\\\Rset^{dim}` of the vertex of index *index*,
    where :math:`dim` is the dimension of the vertices of the mesh.

Examples
--------
>>> import openturns as ot
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> simplices = [[0, 1, 2]]
>>> mesh = ot.Mesh(vertices, simplices)
>>> vertex = [0.0, 0.5]
>>> mesh.setVertex(0, vertex)
>>> print(mesh.getVertices())
0 : [ 0   0.5 ]
1 : [ 1   0   ]
2 : [ 1   1   ]"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::setVertices
"Set the vertices of the mesh.

Parameters
----------
vertices : 2-d sequence of float
    Cordinates in :math:`\\\\Rset^{dim}` of the vertices,
    where :math:`dim` is the dimension of the vertices of the mesh.

Examples
--------
>>> import openturns as ot
>>> mesh = ot.Mesh()
>>> vertices = [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
>>> mesh.setVertices(vertices)"

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::streamToVTKFormat
"Give a VTK representation of the mesh.

Returns
-------
stream : str
    VTK representation of the mesh."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::getVerticesToSimplicesMap
"Accessor to the map between vertices and simplices.

Returns
-------
verticesSimplicesMap : :class:`~openturns.IndicesCollection`
    For each vertex, list the vertices indices it belongs to."

// ---------------------------------------------------------------------

%feature("docstring") OT::Mesh::computeWeights
"Compute an approximation of an integral defined over the mesh.

Returns
-------
weights : :class:`~openturns.Point`
    Weights such that an integral of a function over the mesh
    is a weighted sum of its values at the vertices."