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
399
399
Auxiliary mesh data may be attached to a mesh by users as a
404
404
Facet orientation (used for assembly over interior facets)
406
* \"facet_orientation\" - :py:class:`MeshFunction` <uint> of dimension D - 1
406
* \"facet_orientation\" - :py:class:`MeshFunction` <std::size_t> of dimension D - 1
408
408
Sub meshes (used by the class SubMesh)
410
* \"parent_vertex_indices\" - :py:class:`MeshFunction` <uint> of dimension 0
410
* \"parent_vertex_indices\" - :py:class:`MeshFunction` <std::size_t> of dimension 0
412
412
Note to developers: use underscore in names in place of spaces.
610
610
local_mesh_data (LocalMeshData)
611
611
Data from which to build the mesh.
613
* Mesh\ (geometry, mesh_resolution)
615
Create mesh defined by Constructive Solid Geometry (CSG)
618
geometry (CSGGeometry)
621
* Mesh\ (geometry, resolution)
623
Create mesh defined by Constructive Solid Geometry (CSG)
626
geometry (CSGGeometry)
614
630
%feature("docstring") dolfin::Mesh::operator= "
623
639
Get number of vertices in mesh.
627
643
Number of vertices.
630
.. code-block:: python
632
>>> mesh = dolfin.UnitSquare(2,2)
633
>>> mesh.num_vertices()
648
No example code available for this function.
637
651
%feature("docstring") dolfin::Mesh::num_edges "
638
652
Get number of edges in mesh.
645
.. code-block:: python
647
>>> mesh = dolfin.UnitSquare(2,2)
661
No example code available for this function.
656
664
%feature("docstring") dolfin::Mesh::num_faces "
657
665
Get number of faces in mesh.
664
.. code-block:: python
666
>>> mesh = dolfin.UnitSquare(2,2)
674
No example code available for this function.
671
677
%feature("docstring") dolfin::Mesh::num_facets "
672
678
Get number of facets in mesh.
676
682
Number of facets.
679
.. code-block:: python
681
>>> mesh = dolfin.UnitSquare(2,2)
682
>>> mesh.num_facets()
685
>>> mesh.num_facets()
687
No example code available for this function.
689
690
%feature("docstring") dolfin::Mesh::num_cells "
690
691
Get number of cells in mesh.
697
.. code-block:: python
699
>>> mesh = dolfin.UnitSquare(2,2)
700
No example code available for this function.
704
703
%feature("docstring") dolfin::Mesh::num_entities "
705
704
Get number of entities of given topological dimension.
709
708
Topological dimension.
713
712
Number of entities of topological dimension d.
716
.. code-block:: python
718
>>> mesh = dolfin.UnitSquare(2,2)
720
>>> mesh.num_entities(0)
722
>>> mesh.num_entities(1)
724
>>> mesh.num_entities(2)
717
No example code available for this function.
728
720
%feature("docstring") dolfin::Mesh::coordinates "
763
755
Get number of local entities of given topological dimension.
767
759
Topological dimension.
771
763
Number of local entities of topological dimension d.
774
.. code-block:: python
776
>>> mesh = dolfin.UnitSquare(2,2)
768
No example code available for this function.
786
771
%feature("docstring") dolfin::Mesh::size_global "
787
772
Get global number of entities of given topological dimension.
791
776
Topological dimension.
795
780
Global number of entities of topological dimension d.
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.
1063
MeshFunction<unsigned int>
1048
MeshFunction<std::size_t>
1064
1049
The colors as a mesh function over the cells of the mesh.
1066
1051
* color\ (coloring_type)
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.
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.
1079
MeshFunction<unsigned int>
1064
MeshFunction<std::size_t>
1080
1065
The colors as a mesh function over entities of the mesh.
1091
1076
point (:py:class:`Point`)
1092
1077
A :py:class:`Point` object.
1079
cells (std::set<std::size_t>)
1095
1080
A set of indices of all intersected cells.
1097
1082
* intersected_cells\ (points, cells)
1102
1087
points (list of :py:class:`Point`)
1103
1088
A vector of :py:class:`Point` objects.
1090
cells (std::set<std::size_t>)
1106
1091
A set of indices of all intersected cells.
1108
1093
* intersected_cells\ (entity, cells)
1113
1098
entity (:py:class:`MeshEntity`)
1114
1099
A :py:class:`MeshEntity` object.
1116
cells (numpy.array(int))
1101
cells (std::vector<std::size_t>)
1117
1102
A vector of indices of all intersected cells.
1119
1104
* intersected_cells\ (entities, cells)
1124
1109
entities (list of :py:class:`MeshEntity`)
1125
1110
A vector of :py:class:`MeshEntity` objects.
1112
cells (std::set<std::size_t>)
1128
1113
A vector of indices of all intersected cells.
1130
1115
* intersected_cells\ (mesh, cells)
1173
1158
A :py:class:`Point` object.
1177
1162
The index of the closest cell.
1180
.. code-block:: python
1182
>>> mesh = dolfin.UnitSquare(1, 1)
1183
>>> point = dolfin.Point(0.0, 2.0)
1184
>>> mesh.closest_cell(point)
1167
No example code available for this function.
1188
1170
%feature("docstring") dolfin::Mesh::closest_point_and_cell "
1193
1175
A :py:class:`Point` object.
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.
1963
1945
No example code available for this function.
1948
%feature("docstring") dolfin::Point::rotate "
1949
Rotate around a given axis
1952
a (:py:class:`Point`)
1953
The axis to rotate around. Must be unit length.
1966
1962
%feature("docstring") dolfin::Point::str "
1967
1963
Return informal string representation (pretty-print)
2380
2376
* set\ (connections)
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)
2386
2382
%feature("docstring") dolfin::MeshConnectivity::set_global_size "
2548
2544
Add vertex v at given point p
2547
local_index (std::size_t)
2552
2548
The vertex (local index).
2549
global_index (std::size_t)
2554
2550
The vertex (global_index).
2555
2551
p (:py:class:`Point`)
2560
2556
Add vertex v at given coordinate x
2559
local_index (std::size_t)
2564
2560
The vertex (local index).
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)
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).
2586
2582
* add_cell\ (c, v0, v1, v2)
2588
2584
Add cell with given vertices (2D)
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).
2600
2596
* add_cell\ (c, v0, v1, v2, v3)
2602
2598
Add cell with given vertices (3D)
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).
2616
2612
* add_cell\ (c, v)
2618
2614
Add cell with given vertices
2622
2618
The cell (index).
2623
v (numpy.array(int))
2619
v (std::vector<std::size_t>)
2624
2620
The vertex indices (local indices)
2626
2622
* add_cell\ (local_index, global_index, v)
2628
2624
Add cell with given vertices
2627
local_index (std::size_t)
2632
2628
The cell (index).
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)
3046
3042
The following mesh data is created:
3048
1. \"global entity indices 0\" (MeshFunction<uint>)
3044
1. \"global entity indices 0\" (MeshFunction<std::size_t>)
3050
3046
This maps each local vertex to its global index.
3052
2. \"overlap\" (std::map<uint, std::vector<uint> >)
3048
2. \"overlap\" (std::map<std::size_t, std::vector<std::size_t> >)
3054
3050
This maps each shared vertex to a list of the processes sharing
3057
3. \"global entity indices %d\" (MeshFunction<uint>)
3053
3. \"global entity indices %d\" (MeshFunction<std::size_t>)
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>)
3064
3060
\"global entity indices 1\"
3065
3061
\"global entity indices 2\"
3068
4. \"num global entities\" (std::vector<uint>)
3064
4. \"num global entities\" (std::vector<std::size_t>)
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
3094
%feature("docstring") dolfin::MeshPartitioning::partition "
3095
Create a partitioned mesh based on local mesh data
3098
%feature("docstring") dolfin::MeshPartitioning::build_mesh_domains "
3099
Create and attach distributed MeshDomains from local_data
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)
3107
3096
// Documentation extracted from: (module=mesh, header=MeshValueCollection.h)
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.
3276
3265
Get all values (const version)
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.
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.
3399
3388
%feature("docstring") dolfin::SubDomain::SubDomain "
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
3440
3429
mesh (:py:class:`Mesh`)
3441
3430
The mesh to be marked.
3431
sub_domain (std::size_t)
3443
3432
The subdomain number.
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
3450
3439
mesh (:py:class:`Mesh`)
3451
3440
The mesh to be marked.
3441
sub_domain (std::size_t)
3453
3442
The subdomain number.
3459
3448
* mark\ (mesh, dim, sub_domain)
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
3465
3454
mesh (:py:class:`Mesh`)
3466
3455
The mesh to be marked.
3468
3457
The topological dimension of entities to be marked.
3458
sub_domain (std::size_t)
3470
3459
The subdomain number.
3472
3461
* mark\ (sub_domains, sub_domain)
3474
Set subdomain markers (uint) for given subdomain number
3463
Set subdomain markers (std::size_t) for given subdomain number
3477
3466
sub_domains (:py:class:`MeshFunction`)
3478
3467
The subdomain markers.
3468
sub_domain (std::size_t)
3480
3469
The subdomain number.
3482
3471
* mark\ (sub_domains, sub_domain)
3512
3501
* mark\ (sub_domains, sub_domain, mesh)
3514
Set subdomain markers (uint) for given subdomain number
3503
Set subdomain markers (std::size_t) for given subdomain number
3517
3506
sub_domains (:py:class:`MeshValueCollection`)
3518
3507
The subdomain markers.
3508
sub_domain (std::size_t)
3520
3509
The subdomain number.
3521
3510
mesn (:py:class:`Mesh`)
3556
3545
Return geometric dimension
3560
3549
The geometric dimension.
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)
3591
3580
Create sub mesh
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.
3590
%feature("docstring") dolfin::Restriction::Restriction "
3591
**Overloaded versions**
3593
* Restriction\ (mesh, sub_domain)
3595
Create cell-based restriction from subdomain
3598
mesh (:py:class:`Mesh`)
3600
sub_domain (:py:class:`SubDomain`)
3601
Sub domain defining the restriction
3603
* Restriction\ (mesh, sub_domain, dim)
3605
Create restriction from subdomain to entities of arbitrary dimension
3608
mesh (:py:class:`Mesh`)
3610
sub_domain (:py:class:`SubDomain`)
3611
Sub domain defining the restriction
3613
Dimension of restriction
3615
* Restriction\ (domain_markers, domain_number)
3617
Create restriction from domain markers
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.
3625
* Restriction\ (domain_markers, domain_number)
3627
Create restriction from domain markers (shared pointer version)
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.
3636
%feature("docstring") dolfin::Restriction::mesh "
3637
Return the full unrestricted mesh
3640
%feature("docstring") dolfin::Restriction::dim "
3641
Return topological dimension of restriction
3644
%feature("docstring") dolfin::Restriction::contains "
3645
**Overloaded versions**
3647
* contains\ (entity)
3649
Check whether restriction contains entity
3653
Check whether restriction contains entity (d, i)
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