~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to dolfin/swig/mesh/docstrings.i

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
Hash of coordinate values
310
310
 
311
311
*Returns*
312
 
    int
 
312
    std::size_t
313
313
        A tree-hashed value of the coordinates over all MPI processes
314
314
 
315
315
";
393
393
The class MeshData is a container for auxiliary mesh data,
394
394
represented either as :py:class:`MeshFunction` over topological mesh
395
395
entities, arrays or maps. Each dataset is identified by a unique
396
 
user-specified string. Only uint-valued data are currently
 
396
user-specified string. Only std::size_t-valued data are currently
397
397
supported.
398
398
 
399
399
Auxiliary mesh data may be attached to a mesh by users as a
403
403
 
404
404
Facet orientation (used for assembly over interior facets)
405
405
 
406
 
  * \"facet_orientation\"     - :py:class:`MeshFunction` <uint> of dimension D - 1
 
406
  * \"facet_orientation\"     - :py:class:`MeshFunction` <std::size_t> of dimension D - 1
407
407
 
408
408
Sub meshes (used by the class SubMesh)
409
409
 
410
 
  * \"parent_vertex_indices\" - :py:class:`MeshFunction` <uint> of dimension 0
 
410
  * \"parent_vertex_indices\" - :py:class:`MeshFunction` <std::size_t> of dimension 0
411
411
 
412
412
Note to developers: use underscore in names in place of spaces.
413
413
";
450
450
  *Arguments*
451
451
      name (str)
452
452
          The name of the mesh function.
453
 
      dim (int)
 
453
      dim (std::size_t)
454
454
          The dimension of the mesh function.
455
455
  
456
456
  *Returns*
470
470
          The name of the array.
471
471
  
472
472
  *Returns*
473
 
      numpy.array(int)
 
473
      std::vector<std::size_t>
474
474
          The array.
475
475
 
476
476
* create_array\ (name, size)
480
480
  *Arguments*
481
481
      name (str)
482
482
          The name of the array.
483
 
      size (unit)
 
483
      size (std::size_t)
484
484
          The size (length) of the array.
485
485
  
486
486
  *Returns*
487
 
      numpy.array(int)
 
487
      std::vector<std::size_t>
488
488
          The array.
489
489
";
490
490
 
510
510
        The name of the array.
511
511
 
512
512
*Returns*
513
 
    numpy.array(int)
 
513
    std::vector<std::size_t>
514
514
        The array.
515
515
";
516
516
 
609
609
  *Arguments*
610
610
      local_mesh_data (LocalMeshData)
611
611
          Data from which to build the mesh.
 
612
 
 
613
* Mesh\ (geometry, mesh_resolution)
 
614
 
 
615
  Create mesh defined by Constructive Solid Geometry (CSG)
 
616
  
 
617
  *Arguments*
 
618
      geometry (CSGGeometry)
 
619
          The CSG geometry
 
620
 
 
621
* Mesh\ (geometry, resolution)
 
622
 
 
623
  Create mesh defined by Constructive Solid Geometry (CSG)
 
624
  
 
625
  *Arguments*
 
626
      geometry (CSGGeometry)
 
627
          The CSG geometry
612
628
";
613
629
 
614
630
%feature("docstring")  dolfin::Mesh::operator= "
623
639
Get number of vertices in mesh.
624
640
 
625
641
*Returns*
626
 
    int
 
642
    std::size_t
627
643
        Number of vertices.
628
644
 
629
645
*Example*
630
 
    .. code-block:: python
 
646
    .. note::
631
647
    
632
 
        >>> mesh = dolfin.UnitSquare(2,2)
633
 
        >>> mesh.num_vertices()
634
 
        9
 
648
        No example code available for this function.
635
649
";
636
650
 
637
651
%feature("docstring")  dolfin::Mesh::num_edges "
638
652
Get number of edges in mesh.
639
653
 
640
654
*Returns*
641
 
    int
 
655
    std::size_t
642
656
        Number of edges.
643
657
 
644
658
*Example*
645
 
    .. code-block:: python
 
659
    .. note::
646
660
    
647
 
        >>> mesh = dolfin.UnitSquare(2,2)
648
 
        >>> mesh.num_edges()
649
 
        0
650
 
        >>> mesh.init(1)
651
 
        16
652
 
        >>> mesh.num_edges()
653
 
        16
 
661
        No example code available for this function.
654
662
";
655
663
 
656
664
%feature("docstring")  dolfin::Mesh::num_faces "
657
665
Get number of faces in mesh.
658
666
 
659
667
*Returns*
660
 
    int
 
668
    std::size_t
661
669
        Number of faces.
662
670
 
663
671
*Example*
664
 
    .. code-block:: python
 
672
    .. note::
665
673
    
666
 
        >>> mesh = dolfin.UnitSquare(2,2)
667
 
        >>> mesh.num_faces()
668
 
        8
 
674
        No example code available for this function.
669
675
";
670
676
 
671
677
%feature("docstring")  dolfin::Mesh::num_facets "
672
678
Get number of facets in mesh.
673
679
 
674
680
*Returns*
675
 
    int
 
681
    std::size_t
676
682
        Number of facets.
677
683
 
678
684
*Example*
679
 
    .. code-block:: python
 
685
    .. note::
680
686
    
681
 
        >>> mesh = dolfin.UnitSquare(2,2)
682
 
        >>> mesh.num_facets()
683
 
        0
684
 
        >>> mesh.init(0,1)
685
 
        >>> mesh.num_facets()
686
 
        16
 
687
        No example code available for this function.
687
688
";
688
689
 
689
690
%feature("docstring")  dolfin::Mesh::num_cells "
690
691
Get number of cells in mesh.
691
692
 
692
693
*Returns*
693
 
    int
 
694
    std::size_t
694
695
        Number of cells.
695
696
 
696
697
*Example*
697
 
    .. code-block:: python
 
698
    .. note::
698
699
    
699
 
        >>> mesh = dolfin.UnitSquare(2,2)
700
 
        >>> mesh.num_cells()
701
 
        8
 
700
        No example code available for this function.
702
701
";
703
702
 
704
703
%feature("docstring")  dolfin::Mesh::num_entities "
705
704
Get number of entities of given topological dimension.
706
705
 
707
706
*Arguments*
708
 
    d (int)
 
707
    d (std::size_t)
709
708
        Topological dimension.
710
709
 
711
710
*Returns*
712
 
    int
 
711
    std::size_t
713
712
        Number of entities of topological dimension d.
714
713
 
715
714
*Example*
716
 
    .. code-block:: python
 
715
    .. note::
717
716
    
718
 
        >>> mesh = dolfin.UnitSquare(2,2)
719
 
        >>> mesh.init(0,1)
720
 
        >>> mesh.num_entities(0)
721
 
        9
722
 
        >>> mesh.num_entities(1)
723
 
        16
724
 
        >>> mesh.num_entities(2)
725
 
        8
 
717
        No example code available for this function.
726
718
";
727
719
 
728
720
%feature("docstring")  dolfin::Mesh::coordinates "
750
742
Get cell connectivity.
751
743
 
752
744
*Returns*
753
 
    numpy.array(int)
 
745
    std::vector<std::size_t>
754
746
        Connectivity for all cells.
755
747
 
756
748
*Example*
763
755
Get number of local entities of given topological dimension.
764
756
 
765
757
*Arguments*
766
 
    dim (int)
 
758
    dim (std::size_t)
767
759
        Topological dimension.
768
760
 
769
761
*Returns*
770
 
    int
 
762
    std::size_t
771
763
        Number of local entities of topological dimension d.
772
764
 
773
765
*Example*
774
 
    .. code-block:: python
 
766
    .. note::
775
767
    
776
 
        >>> mesh = dolfin.UnitSquare(2,2)
777
 
        >>> mesh.init(0,1)
778
 
        >>> mesh.size(0)
779
 
        9
780
 
        >>> mesh.size(1)
781
 
        16
782
 
        >>> mesh.size(2)
783
 
        8
 
768
        No example code available for this function.
784
769
";
785
770
 
786
771
%feature("docstring")  dolfin::Mesh::size_global "
787
772
Get global number of entities of given topological dimension.
788
773
 
789
774
*Arguments*
790
 
    dim (int)
 
775
    dim (std::size_t)
791
776
        Topological dimension.
792
777
 
793
778
*Returns*
794
 
    int
 
779
    std::size_t
795
780
        Global number of entities of topological dimension d.
796
781
 
797
782
*Example*
904
889
  Compute entities of given topological dimension.
905
890
  
906
891
  *Arguments*
907
 
      dim (int)
 
892
      dim (std::size_t)
908
893
          Topological dimension.
909
894
  
910
895
  *Returns*
911
 
      int
 
896
      std::size_t
912
897
          Number of created entities.
913
898
 
914
899
* init\ (d0, d1)
916
901
  Compute connectivity between given pair of dimensions.
917
902
  
918
903
  *Arguments*
919
 
      d0 (int)
 
904
      d0 (std::size_t)
920
905
          Topological dimension.
921
906
  
922
 
      d1 (int)
 
907
      d1 (std::size_t)
923
908
          Topological dimension.
924
909
 
925
910
* init\ ()
964
949
  *Arguments*
965
950
      angle (float)
966
951
          The number of degrees (0-360) of rotation
967
 
      axis (int)
 
952
      axis (std::size_t)
968
953
          The coordinate axis around which to rotate the mesh
969
954
 
970
955
* rotate\ (angle, axis, p)
974
959
  *Arguments*
975
960
      angle (float)
976
961
          The number of degrees (0-360) of rotation
977
 
      axis (int)
 
962
      axis (std::size_t)
978
963
          The coordinate axis around which to rotate the mesh
979
964
      point (:py:class:`Point`)
980
965
          The point around which to rotate the mesh
1013
998
Smooth internal vertices of mesh by local averaging.
1014
999
 
1015
1000
*Arguments*
1016
 
    num_iterations (int)
 
1001
    num_iterations (std::size_t)
1017
1002
        Number of iterations to perform smoothing,
1018
1003
        default value is 1.
1019
1004
";
1022
1007
Smooth boundary vertices of mesh by local averaging.
1023
1008
 
1024
1009
*Arguments*
1025
 
    num_iterations (int)
 
1010
    num_iterations (std::size_t)
1026
1011
        Number of iterations to perform smoothing,
1027
1012
        default value is 1.
1028
1013
 
1050
1035
 
1051
1036
  Color the cells of the mesh such that no two neighboring cells
1052
1037
  share the same color. A colored mesh keeps a
1053
 
  CellFunction<unsigned int> named \"cell colors\" as mesh data which
 
1038
  CellFunction<std::size_t> named \"cell colors\" as mesh data which
1054
1039
  holds the colors of the mesh.
1055
1040
  
1056
1041
  *Arguments*
1060
1045
          \"facet\".
1061
1046
  
1062
1047
  *Returns*
1063
 
      MeshFunction<unsigned int>
 
1048
      MeshFunction<std::size_t>
1064
1049
          The colors as a mesh function over the cells of the mesh.
1065
1050
 
1066
1051
* color\ (coloring_type)
1067
1052
 
1068
1053
  Color the cells of the mesh such that no two neighboring cells
1069
1054
  share the same color. A colored mesh keeps a
1070
 
  CellFunction<unsigned int> named \"cell colors\" as mesh data which
 
1055
  CellFunction<std::size_t> named \"cell colors\" as mesh data which
1071
1056
  holds the colors of the mesh.
1072
1057
  
1073
1058
  *Arguments*
1074
 
      coloring_type (numpy.array(int))
 
1059
      coloring_type (std::vector<std::size_t>)
1075
1060
          Coloring type given as list of topological dimensions,
1076
1061
          specifying what relation makes two mesh entinties neighbors.
1077
1062
  
1078
1063
  *Returns*
1079
 
      MeshFunction<unsigned int>
 
1064
      MeshFunction<std::size_t>
1080
1065
          The colors as a mesh function over entities of the mesh.
1081
1066
";
1082
1067
 
1091
1076
      point (:py:class:`Point`)
1092
1077
          A :py:class:`Point` object.
1093
1078
  
1094
 
      cells (set of int)
 
1079
      cells (std::set<std::size_t>)
1095
1080
          A set of indices of all intersected cells.
1096
1081
 
1097
1082
* intersected_cells\ (points, cells)
1102
1087
      points (list of :py:class:`Point`)
1103
1088
          A vector of :py:class:`Point` objects.
1104
1089
  
1105
 
      cells (set of int)
 
1090
      cells (std::set<std::size_t>)
1106
1091
          A set of indices of all intersected cells.
1107
1092
 
1108
1093
* intersected_cells\ (entity, cells)
1113
1098
      entity (:py:class:`MeshEntity`)
1114
1099
          A :py:class:`MeshEntity` object.
1115
1100
  
1116
 
      cells (numpy.array(int))
 
1101
      cells (std::vector<std::size_t>)
1117
1102
          A vector of indices of all intersected cells.
1118
1103
 
1119
1104
* intersected_cells\ (entities, cells)
1124
1109
      entities (list of :py:class:`MeshEntity`)
1125
1110
          A vector of :py:class:`MeshEntity` objects.
1126
1111
  
1127
 
      cells (set of int)
 
1112
      cells (std::set<std::size_t>)
1128
1113
          A vector of indices of all intersected cells.
1129
1114
 
1130
1115
* intersected_cells\ (mesh, cells)
1135
1120
      mesh (:py:class:`Mesh`)
1136
1121
          A :py:class:`Mesh` object.
1137
1122
  
1138
 
      cells (set of int)
 
1123
      cells (std::set<std::size_t>)
1139
1124
          A set of indices of all intersected cells.
1140
1125
";
1141
1126
 
1173
1158
        A :py:class:`Point` object.
1174
1159
 
1175
1160
*Returns*
1176
 
    int
 
1161
    std::size_t
1177
1162
        The index of the closest cell.
1178
1163
 
1179
1164
*Example*
1180
 
    .. code-block:: python
 
1165
    .. note::
1181
1166
    
1182
 
        >>> mesh = dolfin.UnitSquare(1, 1)
1183
 
        >>> point = dolfin.Point(0.0, 2.0)
1184
 
        >>> mesh.closest_cell(point)
1185
 
        1
 
1167
        No example code available for this function.
1186
1168
";
1187
1169
 
1188
1170
%feature("docstring")  dolfin::Mesh::closest_point_and_cell "
1193
1175
        A :py:class:`Point` object.
1194
1176
 
1195
1177
*Returns*
1196
 
    Swig Object< std::pair<:py:class:`Point`, int> >
 
1178
    std::pair<:py:class:`Point`, std::size_t>
1197
1179
        A pair consisting of the closest point and corresponding cell index.
1198
1180
";
1199
1181
 
1248
1230
geometry and mesh topology.
1249
1231
 
1250
1232
*Returns*
1251
 
    int
 
1233
    std::size_t
1252
1234
        A tree-hashed value of the coordinates over all MPI processes
1253
1235
 
1254
1236
";
1292
1274
  *Arguments*
1293
1275
      mesh (:py:class:`Mesh`)
1294
1276
          The mesh.
1295
 
      dim (int)
 
1277
      dim (std::size_t)
1296
1278
          The topological dimension.
1297
 
      index (int)
 
1279
      index (std::size_t)
1298
1280
          The index.
1299
1281
";
1300
1282
 
1304
1286
*Arguments*
1305
1287
    mesh (:py:class:`Mesh`)
1306
1288
        The mesh.
1307
 
    dim (int)
 
1289
    dim (std::size_t)
1308
1290
        The topological dimension.
1309
 
    index (int)
 
1291
    index (std::size_t)
1310
1292
        The index.
1311
1293
";
1312
1294
 
1346
1328
Return topological dimension
1347
1329
 
1348
1330
*Returns*
1349
 
    int
 
1331
    std::size_t
1350
1332
        The dimension.
1351
1333
";
1352
1334
 
1358
1340
  Return index of mesh entity
1359
1341
  
1360
1342
  *Returns*
1361
 
      int
 
1343
      std::size_t
1362
1344
          The index.
1363
1345
 
1364
1346
* index\ (entity)
1371
1353
          The mesh entity.
1372
1354
  
1373
1355
  *Returns*
1374
 
      int
 
1356
      std::size_t
1375
1357
          The local index of given entity.
1376
1358
";
1377
1359
 
1388
1370
Return local number of incident mesh entities of given topological dimension
1389
1371
 
1390
1372
*Arguments*
1391
 
    dim (int)
 
1373
    dim (std::size_t)
1392
1374
        The topological dimension.
1393
1375
 
1394
1376
*Returns*
1395
 
    int
 
1377
    std::size_t
1396
1378
        The number of local incident MeshEntity objects of given dimension.
1397
1379
";
1398
1380
 
1400
1382
Return global number of incident mesh entities of given topological dimension
1401
1383
 
1402
1384
*Arguments*
1403
 
    dim (int)
 
1385
    dim (std::size_t)
1404
1386
        The topological dimension.
1405
1387
 
1406
1388
*Returns*
1407
 
    int
 
1389
    std::size_t
1408
1390
        The number of global incident MeshEntity objects of given dimension.
1409
1391
";
1410
1392
 
1413
1395
topological dimension
1414
1396
 
1415
1397
*Arguments*
1416
 
    dim (int)
 
1398
    dim (std::size_t)
1417
1399
        The topological dimension.
1418
1400
 
1419
1401
*Returns*
1420
 
    int
 
1402
    std::size_t
1421
1403
        The index for incident mesh entities of given dimension.
1422
1404
";
1423
1405
 
1425
1407
Return unique mesh ID
1426
1408
 
1427
1409
*Returns*
1428
 
    int
 
1410
    std::size_t
1429
1411
        The unique mesh ID.
1430
1412
";
1431
1413
 
1760
1742
  Create point from array
1761
1743
  
1762
1744
  *Arguments*
1763
 
      dim (int)
 
1745
      dim (std::size_t)
1764
1746
          Dimension of the array.
1765
1747
      x (float)
1766
1748
          The array to create a Point from.
1787
1769
  Return address of coordinate in direction i
1788
1770
  
1789
1771
  *Arguments*
1790
 
      i (int)
 
1772
      i (std::size_t)
1791
1773
          Direction.
1792
1774
  
1793
1775
  *Returns*
1799
1781
  Return coordinate in direction i
1800
1782
  
1801
1783
  *Arguments*
1802
 
      i (int)
 
1784
      i (std::size_t)
1803
1785
          Direction.
1804
1786
  
1805
1787
  *Returns*
1963
1945
        No example code available for this function.
1964
1946
";
1965
1947
 
 
1948
%feature("docstring")  dolfin::Point::rotate "
 
1949
Rotate around a given axis
 
1950
 
 
1951
*Arguments*
 
1952
    a (:py:class:`Point`)
 
1953
        The axis to rotate around. Must be unit length.
 
1954
    theta (_double_)
 
1955
        The rotation angle.
 
1956
 
 
1957
*Returns*
 
1958
    Point
 
1959
        The rotated point.
 
1960
";
 
1961
 
1966
1962
%feature("docstring")  dolfin::Point::str "
1967
1963
Return informal string representation (pretty-print)
1968
1964
 
2027
2023
  *Arguments*
2028
2024
      mesh (:py:class:`Mesh`)
2029
2025
          The mesh.
2030
 
      index (int)
 
2026
      index (std::size_t)
2031
2027
          Index of the edge.
2032
2028
 
2033
2029
* Edge\ (entity)
2160
2156
  *Arguments*
2161
2157
      mesh (:py:class:`Mesh`)
2162
2158
          The mesh.
2163
 
      index (int)
 
2159
      index (std::size_t)
2164
2160
          The index.
2165
2161
";
2166
2162
 
2172
2168
Compute orientation of cell
2173
2169
 
2174
2170
*Returns*
2175
 
    int
 
2171
    std::size_t
2176
2172
        Orientation of the cell (0 is right, 1 is left).
2177
2173
";
2178
2174
 
2210
2206
  Compute component i of normal of given facet with respect to the cell
2211
2207
  
2212
2208
  *Arguments*
2213
 
      facet (int)
 
2209
      facet (std::size_t)
2214
2210
          Index of facet.
2215
 
      i (int)
 
2211
      i (std::size_t)
2216
2212
          Component.
2217
2213
  
2218
2214
  *Returns*
2224
2220
  Compute normal of given facet with respect to the cell
2225
2221
  
2226
2222
  *Arguments*
2227
 
      facet (int)
 
2223
      facet (std::size_t)
2228
2224
          Index of facet.
2229
2225
  
2230
2226
  *Returns*
2236
2232
Compute the area/length of given facet with respect to the cell
2237
2233
 
2238
2234
*Arguments*
2239
 
    facet (int)
 
2235
    facet (std::size_t)
2240
2236
        Index of the facet.
2241
2237
 
2242
2238
*Returns*
2380
2376
* set\ (connections)
2381
2377
 
2382
2378
  Set all connections for all entities (T is a container, e.g.
2383
 
  a std::vector<uint>, std::set<uint>, etc)
 
2379
  a std::vector<std::size_t>, std::set<std::size_t>, etc)
2384
2380
";
2385
2381
 
2386
2382
%feature("docstring")  dolfin::MeshConnectivity::set_global_size "
2415
2411
  *Arguments*
2416
2412
      mesh (:py:class:`Mesh`)
2417
2413
          The mesh to open.
2418
 
      tdim (int)
 
2414
      tdim (std::size_t)
2419
2415
          The topological dimension.
2420
 
      gdim (int)
 
2416
      gdim (std::size_t)
2421
2417
          The geometrical dimension.
2422
2418
  
2423
2419
  *Example*
2434
2430
          The mesh to open.
2435
2431
      type (CellType::Type)
2436
2432
          Cell type.
2437
 
      tdim (int)
 
2433
      tdim (std::size_t)
2438
2434
          The topological dimension.
2439
 
      gdim (int)
 
2435
      gdim (std::size_t)
2440
2436
          The geometrical dimension.
2441
2437
 
2442
2438
* open\ (mesh, type, tdim, gdim)
2448
2444
          The mesh to open.
2449
2445
      type (str)
2450
2446
          Cell type.
2451
 
      tdim (int)
 
2447
      tdim (std::size_t)
2452
2448
          The topological dimension.
2453
 
      gdim (int)
 
2449
      gdim (std::size_t)
2454
2450
          The geometrical dimension.
2455
2451
";
2456
2452
 
2458
2454
Specify number of vertices
2459
2455
 
2460
2456
*Arguments*
2461
 
    num_vertices (int)
 
2457
    num_vertices (std::size_t)
2462
2458
        The number of vertices.
2463
2459
 
2464
2460
*Example*
2471
2467
Specify number of cells
2472
2468
 
2473
2469
*Arguments*
2474
 
    num_cells (int)
 
2470
    num_cells (std::size_t)
2475
2471
        The number of cells.
2476
2472
 
2477
2473
*Example*
2488
2484
  Add vertex v at given point p
2489
2485
  
2490
2486
  *Arguments*
2491
 
      index (int)
 
2487
      index (std::size_t)
2492
2488
          The vertex (index).
2493
2489
      p (:py:class:`Point`)
2494
2490
          The point.
2498
2494
  Add vertex v at given coordinate x
2499
2495
  
2500
2496
  *Arguments*
2501
 
      index (int)
 
2497
      index (std::size_t)
2502
2498
          The vertex (index).
2503
2499
      x (numpy.array(float))
2504
2500
          The x-coordinates.
2508
2504
  Add vertex v at given point x (for a 1D mesh)
2509
2505
  
2510
2506
  *Arguments*
2511
 
      index (int)
 
2507
      index (std::size_t)
2512
2508
          The vertex (index).
2513
2509
      x (float)
2514
2510
          The x-coordinate.
2518
2514
  Add vertex v at given point (x, y) (for a 2D mesh)
2519
2515
  
2520
2516
  *Arguments*
2521
 
      index (int)
 
2517
      index (std::size_t)
2522
2518
          The vertex (index).
2523
2519
      x (float)
2524
2520
          The x-coordinate.
2530
2526
  Add vertex v at given point (x, y, z) (for a 3D mesh)
2531
2527
  
2532
2528
  *Arguments*
2533
 
      index (int)
 
2529
      index (std::size_t)
2534
2530
          The vertex (index).
2535
2531
      x (float)
2536
2532
          The x-coordinate.
2548
2544
  Add vertex v at given point p
2549
2545
  
2550
2546
  *Arguments*
2551
 
      local_index (int)
 
2547
      local_index (std::size_t)
2552
2548
          The vertex (local index).
2553
 
      global_index (int)
 
2549
      global_index (std::size_t)
2554
2550
          The vertex (global_index).
2555
2551
      p (:py:class:`Point`)
2556
2552
          The point.
2560
2556
  Add vertex v at given coordinate x
2561
2557
  
2562
2558
  *Arguments*
2563
 
      local_index (int)
 
2559
      local_index (std::size_t)
2564
2560
          The vertex (local index).
2565
 
      global_index (int)
 
2561
      global_index (std::size_t)
2566
2562
          The vertex (global_index).
2567
2563
      x (numpy.array(float))
2568
2564
          The x-coordinates.
2576
2572
  Add cell with given vertices (1D)
2577
2573
  
2578
2574
  *Arguments*
2579
 
      c (int)
 
2575
      c (std::size_t)
2580
2576
          The cell (index).
2581
 
      v0 (numpy.array(int))
 
2577
      v0 (std::vector<std::size_t>)
2582
2578
          The first vertex (local index).
2583
 
      v1 (numpy.array(int))
 
2579
      v1 (std::vector<std::size_t>)
2584
2580
          The second vertex (local index).
2585
2581
 
2586
2582
* add_cell\ (c, v0, v1, v2)
2588
2584
  Add cell with given vertices (2D)
2589
2585
  
2590
2586
  *Arguments*
2591
 
      c (int)
 
2587
      c (std::size_t)
2592
2588
          The cell (index).
2593
 
      v0 (numpy.array(int))
 
2589
      v0 (std::vector<std::size_t>)
2594
2590
          The first vertex (local index).
2595
 
      v1 (numpy.array(int))
 
2591
      v1 (std::vector<std::size_t>)
2596
2592
          The second vertex (local index).
2597
 
      v2 (numpy.array(int))
 
2593
      v2 (std::vector<std::size_t>)
2598
2594
          The third vertex (local index).
2599
2595
 
2600
2596
* add_cell\ (c, v0, v1, v2, v3)
2602
2598
  Add cell with given vertices (3D)
2603
2599
  
2604
2600
  *Arguments*
2605
 
      c (int)
 
2601
      c (std::size_t)
2606
2602
          The cell (index).
2607
 
      v0 (numpy.array(int))
 
2603
      v0 (std::vector<std::size_t>)
2608
2604
          The first vertex (local index).
2609
 
      v1 (numpy.array(int))
 
2605
      v1 (std::vector<std::size_t>)
2610
2606
          The second vertex (local index).
2611
 
      v2 (numpy.array(int))
 
2607
      v2 (std::vector<std::size_t>)
2612
2608
          The third vertex (local index).
2613
 
      v3 (numpy.array(int))
 
2609
      v3 (std::vector<std::size_t>)
2614
2610
          The fourth vertex (local index).
2615
2611
 
2616
2612
* add_cell\ (c, v)
2618
2614
  Add cell with given vertices
2619
2615
  
2620
2616
  *Arguments*
2621
 
      c (int)
 
2617
      c (std::size_t)
2622
2618
          The cell (index).
2623
 
      v (numpy.array(int))
 
2619
      v (std::vector<std::size_t>)
2624
2620
          The vertex indices (local indices)
2625
2621
 
2626
2622
* add_cell\ (local_index, global_index, v)
2628
2624
  Add cell with given vertices
2629
2625
  
2630
2626
  *Arguments*
2631
 
      local_index (int)
 
2627
      local_index (std::size_t)
2632
2628
          The cell (index).
2633
 
      global_index (int)
 
2629
      global_index (std::size_t)
2634
2630
          The global (user) cell index.
2635
 
      v (numpy.array(int))
 
2631
      v (std::vector<std::size_t>)
2636
2632
          The vertex indices (local indices)
2637
2633
";
2638
2634
 
2767
2763
  *Arguments*
2768
2764
      mesh (:py:class:`Mesh`)
2769
2765
          The mesh to create mesh function on.
2770
 
      dim (int)
 
2766
      dim (std::size_t)
2771
2767
          The mesh entity dimension for the mesh function.
2772
2768
 
2773
2769
* MeshFunction\ (mesh, dim, value)
2778
2774
  *Arguments*
2779
2775
      mesh (:py:class:`Mesh`)
2780
2776
          The mesh to create mesh function on.
2781
 
      dim (int)
 
2777
      dim (std::size_t)
2782
2778
          The mesh entity dimension.
2783
2779
      value (T)
2784
2780
          The value.
2849
2845
Return topological dimension
2850
2846
 
2851
2847
*Returns*
2852
 
    int
 
2848
    std::size_t
2853
2849
        The dimension.
2854
2850
";
2855
2851
 
2865
2861
Return size (number of entities)
2866
2862
 
2867
2863
*Returns*
2868
 
    int
 
2864
    std::size_t
2869
2865
        The size.
2870
2866
";
2871
2867
 
2921
2917
  Return value at given index
2922
2918
  
2923
2919
  *Arguments*
2924
 
      index (int)
 
2920
      index (std::size_t)
2925
2921
          The index.
2926
2922
  
2927
2923
  *Returns*
2933
2929
  Return value at given index  (const version)
2934
2930
  
2935
2931
  *Arguments*
2936
 
      index (int)
 
2932
      index (std::size_t)
2937
2933
          The index.
2938
2934
  
2939
2935
  *Returns*
2949
2945
  Initialize mesh function for given topological dimension
2950
2946
  
2951
2947
  *Arguments*
2952
 
      dim (int)
 
2948
      dim (std::size_t)
2953
2949
          The dimension.
2954
2950
 
2955
2951
* init\ (dim, size)
2958
2954
  given size
2959
2955
  
2960
2956
  *Arguments*
2961
 
      dim (int)
 
2957
      dim (std::size_t)
2962
2958
          The dimension.
2963
 
      size (int)
 
2959
      size (std::size_t)
2964
2960
          The size.
2965
2961
 
2966
2962
* init\ (mesh, dim)
2970
2966
  *Arguments*
2971
2967
      mesh (:py:class:`Mesh`)
2972
2968
          The mesh.
2973
 
      dim (int)
 
2969
      dim (std::size_t)
2974
2970
          The dimension.
2975
2971
 
2976
2972
* init\ (mesh, dim, size)
2981
2977
  *Arguments*
2982
2978
      mesh (:py:class:`Mesh`)
2983
2979
          The mesh.
2984
 
      dim (int)
 
2980
      dim (std::size_t)
2985
2981
          The dimension.
2986
 
      size (int)
 
2982
      size (std::size_t)
2987
2983
          The size.
2988
2984
";
2989
2985
 
2995
2991
  Set value at given index
2996
2992
  
2997
2993
  *Arguments*
2998
 
      index (int)
 
2994
      index (std::size_t)
2999
2995
          The index.
3000
2996
      value (T)
3001
2997
          The value.
3045
3041
 
3046
3042
The following mesh data is created:
3047
3043
 
3048
 
1. \"global entity indices 0\" (MeshFunction<uint>)
 
3044
1. \"global entity indices 0\" (MeshFunction<std::size_t>)
3049
3045
 
3050
3046
This maps each local vertex to its global index.
3051
3047
 
3052
 
2. \"overlap\" (std::map<uint, std::vector<uint> >)
 
3048
2. \"overlap\" (std::map<std::size_t, std::vector<std::size_t> >)
3053
3049
 
3054
3050
This maps each shared vertex to a list of the processes sharing
3055
3051
the vertex.
3056
3052
 
3057
 
3. \"global entity indices %d\" (MeshFunction<uint>)
 
3053
3. \"global entity indices %d\" (MeshFunction<std::size_t>)
3058
3054
 
3059
3055
After partitioning, the function number_entities() may be called
3060
3056
to create global indices for all entities of a given topological
3061
 
dimension. These are stored as mesh data (MeshFunction<uint>)
 
3057
dimension. These are stored as mesh data (MeshFunction<std::size_t>)
3062
3058
named
3063
3059
 
3064
3060
   \"global entity indices 1\"
3065
3061
   \"global entity indices 2\"
3066
3062
   etc
3067
3063
 
3068
 
4. \"num global entities\" (std::vector<uint>)
 
3064
4. \"num global entities\" (std::vector<std::size_t>)
3069
3065
 
3070
3066
The function number_entities also records the number of global
3071
3067
entities for the dimension of the numbered entities in the array
3091
3087
Create global entity indices for entities of dimension d
3092
3088
";
3093
3089
 
3094
 
%feature("docstring")  dolfin::MeshPartitioning::partition "
3095
 
Create a partitioned mesh based on local mesh data
3096
 
";
3097
 
 
3098
 
%feature("docstring")  dolfin::MeshPartitioning::build_mesh_domains "
3099
 
Create and attach distributed MeshDomains from local_data
3100
 
";
3101
 
 
3102
 
%feature("docstring")  dolfin::MeshPartitioning::build_mesh_value_collection "
3103
 
Create and attach distributed MeshDomains from local_data
3104
 
[entry, (cell_index, local_index, value)]
 
3090
%feature("docstring")  dolfin::MeshPartitioning::num_connected_cells "
 
3091
Compute number of cells connected to each facet (globally). Facets
 
3092
on internal boundaries will be connected to two cells (with the
 
3093
cells residing on neighboring processes)
3105
3094
";
3106
3095
 
3107
3096
// Documentation extracted from: (module=mesh, header=MeshValueCollection.h)
3129
3118
  Create empty mesh value collection of given dimension
3130
3119
  
3131
3120
  *Arguments*
3132
 
      dim (int)
 
3121
      dim (std::size_t)
3133
3122
          The mesh entity dimension for the mesh value collection.
3134
3123
 
3135
3124
* MeshValueCollection\ (mesh_function)
3150
3139
          map collection values to the appropriate process.
3151
3140
      filename (str)
3152
3141
          The XML file name.
3153
 
      dim (int)
 
3142
      dim (std::size_t)
3154
3143
          The mesh entity dimension for the mesh value collection.
3155
3144
";
3156
3145
 
3178
3167
Set the topological dimension
3179
3168
 
3180
3169
*Arguments*
3181
 
    dim (int)
 
3170
    dim (std::size_t)
3182
3171
        The mesh entity dimension for the mesh value collection.
3183
3172
";
3184
3173
 
3186
3175
Return topological dimension
3187
3176
 
3188
3177
*Returns*
3189
 
    int
 
3178
    std::size_t
3190
3179
        The dimension.
3191
3180
";
3192
3181
 
3202
3191
Return size (number of entities in subset)
3203
3192
 
3204
3193
*Returns*
3205
 
    int
 
3194
    std::size_t
3206
3195
        The size.
3207
3196
";
3208
3197
 
3215
3204
  a local entity index
3216
3205
  
3217
3206
  *Arguments*
3218
 
      cell_index (int)
 
3207
      cell_index (std::size_t)
3219
3208
          The index of the cell.
3220
 
      local_entity (int)
 
3209
      local_entity (std::size_t)
3221
3210
          The local index of the entity relative to the cell.
3222
3211
      marker_value (T)
3223
3212
          The value of the marker.
3232
3221
  Set value for given entity index
3233
3222
  
3234
3223
  *Arguments*
3235
 
      entity_index (int)
 
3224
      entity_index (std::size_t)
3236
3225
          Index of the entity.
3237
3226
      value (T)
3238
3227
          The value of the marker.
3250
3239
a local entity index
3251
3240
 
3252
3241
*Arguments*
3253
 
    cell_index (int)
 
3242
    cell_index (std::size_t)
3254
3243
        The index of the cell.
3255
 
    local_entity (int)
 
3244
    local_entity (std::size_t)
3256
3245
        The local index of the entity relative to the cell.
3257
3246
 
3258
3247
*Returns*
3268
3257
  Get all values
3269
3258
  
3270
3259
  *Returns*
3271
 
      std::map<std::pair<uint, uint>, T>
 
3260
      std::map<std::pair<std::size_t, std::size_t>, T>
3272
3261
          A map from positions to values.
3273
3262
 
3274
3263
* values\ ()
3276
3265
  Get all values (const version)
3277
3266
  
3278
3267
  *Returns*
3279
 
      std::map<std::pair<uint, uint>, T>
 
3268
      std::map<std::pair<std::size_t, std::size_t>, T>
3280
3269
          A map from positions to values.
3281
3270
";
3282
3271
 
3354
3343
          The mesh
3355
3344
      angle (float)
3356
3345
          The number of degrees (0-360) of rotation
3357
 
      axis (int)
 
3346
      axis (std::size_t)
3358
3347
          The coordinate axis around which to rotate the mesh
3359
3348
 
3360
3349
* rotate\ (mesh, angle, axis, p)
3366
3355
          The mesh
3367
3356
      angle (float)
3368
3357
          The number of degrees (0-360) of rotation
3369
 
      axis (int)
 
3358
      axis (std::size_t)
3370
3359
          The coordinate axis around which to rotate the mesh
3371
3360
      point (:py:class:`Point`)
3372
3361
          The point around which to rotate the mesh
3393
3382
%feature("docstring")  dolfin::SubDomain "
3394
3383
This class defines the interface for definition of subdomains.
3395
3384
Alternatively, subdomains may be defined by a :py:class:`Mesh` and a
3396
 
:py:class:`MeshFunction` <uint> over the mesh.
 
3385
:py:class:`MeshFunction` <std::size_t> over the mesh.
3397
3386
";
3398
3387
 
3399
3388
%feature("docstring")  dolfin::SubDomain::SubDomain "
3434
3423
";
3435
3424
 
3436
3425
%feature("docstring")  dolfin::SubDomain::mark_cells "
3437
 
Set subdomain markers (uint) on cells for given subdomain number
 
3426
Set subdomain markers (std::size_t) on cells for given subdomain number
3438
3427
 
3439
3428
*Arguments*
3440
3429
    mesh (:py:class:`Mesh`)
3441
3430
        The mesh to be marked.
3442
 
    sub_domain (int)
 
3431
    sub_domain (std::size_t)
3443
3432
        The subdomain number.
3444
3433
";
3445
3434
 
3446
3435
%feature("docstring")  dolfin::SubDomain::mark_facets "
3447
 
Set subdomain markers (uint) on facets for given subdomain number
 
3436
Set subdomain markers (std::size_t) on facets for given subdomain number
3448
3437
 
3449
3438
*Arguments*
3450
3439
    mesh (:py:class:`Mesh`)
3451
3440
        The mesh to be marked.
3452
 
    sub_domain (int)
 
3441
    sub_domain (std::size_t)
3453
3442
        The subdomain number.
3454
3443
";
3455
3444
 
3458
3447
 
3459
3448
* mark\ (mesh, dim, sub_domain)
3460
3449
 
3461
 
  Set subdomain markers (uint) for given topological dimension
 
3450
  Set subdomain markers (std::size_t) for given topological dimension
3462
3451
  and subdomain number
3463
3452
  
3464
3453
  *Arguments*
3465
3454
      mesh (:py:class:`Mesh`)
3466
3455
          The mesh to be marked.
3467
 
      dim (int)
 
3456
      dim (std::size_t)
3468
3457
          The topological dimension of entities to be marked.
3469
 
      sub_domain (int)
 
3458
      sub_domain (std::size_t)
3470
3459
          The subdomain number.
3471
3460
 
3472
3461
* mark\ (sub_domains, sub_domain)
3473
3462
 
3474
 
  Set subdomain markers (uint) for given subdomain number
 
3463
  Set subdomain markers (std::size_t) for given subdomain number
3475
3464
  
3476
3465
  *Arguments*
3477
3466
      sub_domains (:py:class:`MeshFunction`)
3478
3467
          The subdomain markers.
3479
 
      sub_domain (int)
 
3468
      sub_domain (std::size_t)
3480
3469
          The subdomain number.
3481
3470
 
3482
3471
* mark\ (sub_domains, sub_domain)
3511
3500
 
3512
3501
* mark\ (sub_domains, sub_domain, mesh)
3513
3502
 
3514
 
  Set subdomain markers (uint) for given subdomain number
 
3503
  Set subdomain markers (std::size_t) for given subdomain number
3515
3504
  
3516
3505
  *Arguments*
3517
3506
      sub_domains (:py:class:`MeshValueCollection`)
3518
3507
          The subdomain markers.
3519
 
      sub_domain (int)
 
3508
      sub_domain (std::size_t)
3520
3509
          The subdomain number.
3521
3510
      mesn (:py:class:`Mesh`)
3522
3511
          The mesh.
3556
3545
Return geometric dimension
3557
3546
 
3558
3547
*Returns*
3559
 
    int
 
3548
    std::size_t
3560
3549
        The geometric dimension.
3561
3550
";
3562
3551
 
3563
3552
%feature("docstring")  dolfin::SubDomain::apply_markers "
3564
 
Apply marker of type T (most likely an uint) to object of class
 
3553
Apply marker of type T (most likely an std::size_t) to object of class
3565
3554
S (most likely MeshFunction or MeshValueCollection)
3566
3555
";
3567
3556
 
3591
3580
Create sub mesh
3592
3581
";
3593
3582
 
 
3583
// Documentation extracted from: (module=mesh, header=Restriction.h)
 
3584
%feature("docstring")  dolfin::Restriction "
 
3585
This class represents a restriction of a mesh to a subdomain,
 
3586
which can be defined as a subset of all the cells, the facets,
 
3587
or possibly lower dimensional entities of the mesh.
 
3588
";
 
3589
 
 
3590
%feature("docstring")  dolfin::Restriction::Restriction "
 
3591
**Overloaded versions**
 
3592
 
 
3593
* Restriction\ (mesh, sub_domain)
 
3594
 
 
3595
  Create cell-based restriction from subdomain
 
3596
  
 
3597
  *Arguments*
 
3598
      mesh (:py:class:`Mesh`)
 
3599
          The mesh
 
3600
      sub_domain (:py:class:`SubDomain`)
 
3601
          Sub domain defining the restriction
 
3602
 
 
3603
* Restriction\ (mesh, sub_domain, dim)
 
3604
 
 
3605
  Create restriction from subdomain to entities of arbitrary dimension
 
3606
  
 
3607
  *Arguments*
 
3608
      mesh (:py:class:`Mesh`)
 
3609
          The mesh
 
3610
      sub_domain (:py:class:`SubDomain`)
 
3611
          Sub domain defining the restriction
 
3612
      dim (std::size_t)
 
3613
          Dimension of restriction
 
3614
 
 
3615
* Restriction\ (domain_markers, domain_number)
 
3616
 
 
3617
  Create restriction from domain markers
 
3618
  
 
3619
  *Arguments*
 
3620
      domain_markers (:py:class:`MeshFunction`)
 
3621
          Domain markers for the cells of the mesh.
 
3622
      domain_number (std::size_t)
 
3623
          Identifier for domain.
 
3624
 
 
3625
* Restriction\ (domain_markers, domain_number)
 
3626
 
 
3627
  Create restriction from domain markers (shared pointer version)
 
3628
  
 
3629
  *Arguments*
 
3630
      domain_markers (:py:class:`MeshFunction`)
 
3631
          Domain markers for the cells of the mesh.
 
3632
      domain_number (std::size_t)
 
3633
          Identifier for domain.
 
3634
";
 
3635
 
 
3636
%feature("docstring")  dolfin::Restriction::mesh "
 
3637
Return the full unrestricted mesh
 
3638
";
 
3639
 
 
3640
%feature("docstring")  dolfin::Restriction::dim "
 
3641
Return topological dimension of restriction
 
3642
";
 
3643
 
 
3644
%feature("docstring")  dolfin::Restriction::contains "
 
3645
**Overloaded versions**
 
3646
 
 
3647
* contains\ (entity)
 
3648
 
 
3649
  Check whether restriction contains entity
 
3650
 
 
3651
* contains\ (d, i)
 
3652
 
 
3653
  Check whether restriction contains entity (d, i)
 
3654
";
 
3655
 
3594
3656
// Documentation extracted from: (module=mesh, header=DomainBoundary.h)
3595
3657
%feature("docstring")  dolfin::DomainBoundary "
3596
3658
This class provides a SubDomain which picks out the boundary of