GetFEM++  5.3
getfem::mesh_region Class Reference

structure used to hold a set of convexes and/or convex faces. More...

#include <getfem_mesh_region.h>

Classes

class  visitor
 "iterator" class for regions. More...
 

Public Member Functions

 mesh_region (size_type id__)
 a mesh_region can be built from a integer parameter (a region number in a mesh), but it won't be usable until 'from_mesh(m)' has been called Note that these regions are read-only, this constructor is mostly used for backward-compatibility.
 
 mesh_region (mesh &m, size_type id__, size_type type=size_type(-1))
 internal constructor. More...
 
 mesh_region (const dal::bit_vector &bv)
 build a mesh_region from a convex list stored in a bit_vector. More...
 
int region_is_faces_of (const getfem::mesh &m1, const mesh_region &rg2, const getfem::mesh &m2) const
 Test if the region is a boundary of a list of faces of elements of region rg. More...
 
void allow_partitioning ()
 In multithreaded part of the program makes only a partition of the region visible in the index() and size() operations, as well as during iterations with mr_visitor. More...
 
void bounding_box (base_node &Pmin, base_node &Pmax) const
 Return the bounding box [Pmin - Pmax] of the mesh_region. More...
 
void prohibit_partitioning ()
 Disregard partitioning, which means being able to see the whole region in multirheaded code. More...
 
const mesh_regionfrom_mesh (const mesh &m) const
 For regions which have been built with just a number 'id', from_mesh(m) sets the current region to 'm.region(id)'. More...
 
const dal::bit_vector & index () const
 Index of the region convexes, or the convexes from the partition on the current thread. More...
 
size_type size () const
 Region size, or the size of the region partition on the current thread if the region is partitioned.
 
size_type nb_convex () const
 Number of convexes in the region, or on the partition on the current thread.
 
bool is_only_faces () const
 Return true if the region do contain only convex faces.
 
bool is_only_convexes () const
 Return true if the region do not contain any convex face.
 

Static Public Member Functions

static mesh_region all_convexes ()
 provide a default value for the mesh_region parameters of assembly procedures etc. More...
 
static mesh_region intersection (const mesh_region &a, const mesh_region &b)
 return the intersection of two mesh regions
 
static mesh_region merge (const mesh_region &a, const mesh_region &b)
 return the union of two mesh_regions
 
static mesh_region subtract (const mesh_region &a, const mesh_region &b)
 subtract the second region from the first one
 
static size_type free_region_id (const getfem::mesh &m)
 Extract the next region number that does not yet exists in the mesh.
 

Detailed Description

structure used to hold a set of convexes and/or convex faces.

See also
mesh::region

Definition at line 66 of file getfem_mesh_region.h.

Constructor & Destructor Documentation

getfem::mesh_region::mesh_region ( mesh m,
size_type  id__,
size_type  type = size_type(-1) 
)

internal constructor.

You should used m.region(id) instead.

Definition at line 48 of file getfem_mesh_region.cc.

getfem::mesh_region::mesh_region ( const dal::bit_vector &  bv)

build a mesh_region from a convex list stored in a bit_vector.

Definition at line 55 of file getfem_mesh_region.cc.

Member Function Documentation

static mesh_region getfem::mesh_region::all_convexes ( )
inlinestatic

provide a default value for the mesh_region parameters of assembly procedures etc.

Definition at line 154 of file getfem_mesh_region.h.

int getfem::mesh_region::region_is_faces_of ( const getfem::mesh m1,
const mesh_region rg2,
const getfem::mesh m2 
) const

Test if the region is a boundary of a list of faces of elements of region rg.

Return 0 if not, -1 if only partially, 1 if the region contains only some faces which are all faces of elements of rg.

Definition at line 496 of file getfem_mesh_region.cc.

void getfem::mesh_region::allow_partitioning ( )

In multithreaded part of the program makes only a partition of the region visible in the index() and size() operations, as well as during iterations with mr_visitor.

This is a default behaviour

Definition at line 212 of file getfem_mesh_region.cc.

void getfem::mesh_region::bounding_box ( base_node &  Pmin,
base_node &  Pmax 
) const

Return the bounding box [Pmin - Pmax] of the mesh_region.

Definition at line 218 of file getfem_mesh_region.cc.

void getfem::mesh_region::prohibit_partitioning ( )

Disregard partitioning, which means being able to see the whole region in multirheaded code.

Can be used, for instance, for contact problems where master region is partitioned, while the slave region is not

Definition at line 230 of file getfem_mesh_region.cc.

const mesh_region & getfem::mesh_region::from_mesh ( const mesh m) const

For regions which have been built with just a number 'id', from_mesh(m) sets the current region to 'm.region(id)'.

(works only once)

Definition at line 68 of file getfem_mesh_region.cc.

const dal::bit_vector & getfem::mesh_region::index ( void  ) const

Index of the region convexes, or the convexes from the partition on the current thread.

Definition at line 242 of file getfem_mesh_region.cc.


The documentation for this class was generated from the following files: