|
BEM++
2.0
|
Segment of a grid. More...
#include </home/wojtek/Projects/BEM/bempp-sven/bempp/lib/grid/grid_segment.hpp>
Public Member Functions | |
| GridSegment (const Grid &grid, const std::set< int > &excludedEntitiesCodim0, const std::set< int > &excludedEntitiesCodim1, const std::set< int > &excludedEntitiesCodim2, const std::set< int > &excludedEntitiesCodim3, int level=0) | |
| Constructor. More... | |
| GridSegment (int entityCountCodim0, int entityCountCodim1, int entityCountCodim2, int entityCountCodim3, const std::set< int > &excludedEntitiesCodim0, const std::set< int > &excludedEntitiesCodim1, const std::set< int > &excludedEntitiesCodim2, const std::set< int > &excludedEntitiesCodim3) | |
| Constructor. More... | |
| bool | contains (int codim, int index) const |
Return true if the segment contains the entity of codimension codim and index index, false otherwise. | |
| void | markExcludedEntities (int codim, std::vector< int > &marks, int mark=-1) const |
| Mark array elements corresponding to entities that do not belong to this GridSegment. More... | |
| GridSegment | complement () const |
| Return the complement of this grid segment. More... | |
| GridSegment | union_ (const GridSegment &other) const |
Return the union of this GridSegment and the GridSegment other. More... | |
| GridSegment | difference (const GridSegment &other) const |
Return the difference of this GridSegment and the GridSegment other. More... | |
| GridSegment | intersection (const GridSegment &other) const |
Return the intersection of this GridSegment and the GridSegment other. More... | |
Static Public Member Functions | |
| static GridSegment | wholeGrid (const Grid &grid, int level=0) |
Return a GridSegment representing the whole grid grid at a given level (level = -1 for leafView). | |
| static GridSegment | openDomain (const Grid &grid, int domain, int level=0) |
| Return a GridSegment representing an open domain of a grid. More... | |
| static GridSegment | closedDomain (const Grid &grid, int domain, int level=0) |
| Return a GridSegment representing a closed domain of a grid. More... | |
Private Attributes | |
| boost::array< int, 4 > | m_entityCounts |
| boost::array< std::set< int >, 4 > | m_excludedEntities |
Segment of a grid.
This class represent a segment (part) of a grid. You can use it to create spaces of functions defined only on subsets of grids, for example to impose different boundary conditions on different parts of a single grid.
Technically, a grid segment is defined by means of the sets of indices of entities of different codimensions (vertices, edges and elements, for 2D grids) that it contains.
| Bempp::GridSegment::GridSegment | ( | const Grid & | grid, |
| const std::set< int > & | excludedEntitiesCodim0, | ||
| const std::set< int > & | excludedEntitiesCodim1, | ||
| const std::set< int > & | excludedEntitiesCodim2, | ||
| const std::set< int > & | excludedEntitiesCodim3, | ||
| int | level = 0 |
||
| ) |
Constructor.
Construct a new segment of the grid grid including all its constituent entities except those listed in excludedEntitiesCodim0, excludedEntitiesCodim1 and so on (each set contains the indices of entities of a particular codimension that should be excluded from the segment). The indices should correspond to those defined by the leaf view of the grid. The grid reference is used only in the constructor and is not stored in the constructed GridSegment.
References Bempp::Grid::leafView(), and Bempp::Grid::levelView().
Referenced by closedDomain(), complement(), intersection(), openDomain(), union_(), and wholeGrid().
| Bempp::GridSegment::GridSegment | ( | int | entityCountCodim0, |
| int | entityCountCodim1, | ||
| int | entityCountCodim2, | ||
| int | entityCountCodim3, | ||
| const std::set< int > & | excludedEntitiesCodim0, | ||
| const std::set< int > & | excludedEntitiesCodim1, | ||
| const std::set< int > & | excludedEntitiesCodim2, | ||
| const std::set< int > & | excludedEntitiesCodim3 | ||
| ) |
Constructor.
Construct a new segment of a grid including all its constituent entities except those listed in excludedEntitiesCodim0, excludedEntitiesCodim1 and so on (each set contains the indices of entities of a particular codimension that should be excluded from the segment). The indices should correspond to those defined by the leaf view of the grid. The arguments entityCountCodim0, entityCountCodim1 and so on should contain the number of entities of a particular codimension contained in the grid.
|
static |
Return a GridSegment representing a closed domain of a grid.
This function returns a GridSegment representing the domain with index domain of the grid grid, including its boundary. The domain index corresponds to the <it>physical entity index</it> in Gmsh files.
References Bempp::acc(), Bempp::Grid::dim(), Bempp::Entity< 0 >::domain(), Bempp::IndexSet::entityIndex(), GridSegment(), Bempp::Grid::leafView(), Bempp::Grid::levelView(), Bempp::Entity< 0 >::subEntityCount(), and Bempp::IndexSet::subEntityIndex().
| GridSegment Bempp::GridSegment::complement | ( | ) | const |
Return the complement of this grid segment.
The returned GridSegment contains those and only those entities that do not belong to this GridSegment.
References GridSegment().
Referenced by difference().
| GridSegment Bempp::GridSegment::difference | ( | const GridSegment & | other | ) | const |
Return the difference of this GridSegment and the GridSegment other.
The returned GridSegment contains those and only those entities that belong to this GridSegment, but do not belong to the GridSegment other.
References complement(), and intersection().
| GridSegment Bempp::GridSegment::intersection | ( | const GridSegment & | other | ) | const |
Return the intersection of this GridSegment and the GridSegment other.
The returned GridSegment contains those and only those entities that belong to both this GridSegment and the GridSegment other.
References GridSegment().
Referenced by difference().
| void Bempp::GridSegment::markExcludedEntities | ( | int | codim, |
| std::vector< int > & | marks, | ||
| int | mark = -1 |
||
| ) | const |
Mark array elements corresponding to entities that do not belong to this GridSegment.
This function assigns the value mark to all the elements of the vector marks whose indices correspond to entities of codimension codim that do not belong to this GridSegment. All other elements are set to 0.
References Bempp::acc().
|
static |
Return a GridSegment representing an open domain of a grid.
This function returns a GridSegment representing the domain with index domain of the grid grid, not including its boundary. The domain index corresponds to the <it>physical entity index</it> in Gmsh files.
References Bempp::acc(), Bempp::Grid::dim(), Bempp::Entity< 0 >::domain(), Bempp::IndexSet::entityIndex(), GridSegment(), Bempp::Grid::leafView(), Bempp::Grid::levelView(), Bempp::Entity< 0 >::subEntityCount(), and Bempp::IndexSet::subEntityIndex().
| GridSegment Bempp::GridSegment::union_ | ( | const GridSegment & | other | ) | const |
Return the union of this GridSegment and the GridSegment other.
The returned GridSegment contains those and only those entities that belong to this GridSegment and/or the GridSegment other.
References GridSegment().
1.8.5