AFEPack
|
#include <MPI_HGeometry.h>
公有类型 | |
enum | { dim = DIM, dow = DOW } |
typedef HGeometryTree< DIM, DOW > | tree_t |
typedef MATCHER | matcher_t |
typedef BirdView< this_t > | birdview_t |
typedef BirdViewSet< this_t > | birdview_set_t |
typedef HLoadBalance< this_t > | load_balancer_t |
公有成员 | |
template<int D> | |
const Shared_ptr_list < HGeometry< D, DOW > > & | get_shared_list () const |
template<int GDIM> | |
bool | is_on_primary_rank (const HGeometry< GDIM, DOW > &geo) const |
template<int GDIM> | |
int | primary_rank (const HGeometry< GDIM, DOW > &geo) const |
template<int GDIM> | |
bool | is_primary_geometry (const HGeometry< GDIM, DOW > &geo) const |
bool | is_geometry_shared (const RegularMesh< DIM, DOW > &mesh, int dim, int idx) const |
const matcher_t & | matcher () const |
matcher_t & | matcher () |
OBJ * | get_shared_info (const GEO &geo) const |
OBJ * | new_shared_info (GEO &geo) |
void | erase_shared_info (GEO &geo) |
OBJ * | get_shared_info (const GEO &geo) const |
OBJ * | new_shared_info (GEO &geo) |
void | erase_shared_info (GEO &geo) |
OBJ * | get_shared_info (const GEO &geo) const |
OBJ * | new_shared_info (GEO &geo) |
void | erase_shared_info (GEO &geo) |
OBJ * | get_shared_info (const GEO &geo) const |
OBJ * | new_shared_info (GEO &geo) |
void | erase_shared_info (GEO &geo) |
bool | lock () |
void | unlock () |
HGeometryForest () | |
HGeometryForest (MPI_Comm comm) | |
virtual | ~HGeometryForest () |
void | clear () |
void | new_property () |
void | free_property () |
void | set_communicator (MPI_Comm comm) |
MPI_Comm | communicator () const |
int | rank () const |
int | n_rank () const |
void | readMesh (const std::string &) |
void | eraseRootElement (u_int level=1) |
void | renumerateRootElement (void(*f)(double, double, double, double &, double &, double &)=NULL) |
void | set_is_used_up () |
template<class HGEO > | |
void | set_is_used_up (HGEO &geo) const |
void | set_shared_info_sent () const |
template<int D> | |
void | set_dim_shared_info_sent () const |
template<int GDIM> | |
void | pack_verify_shared_object (HGeometry< GDIM, dow > *geo, int remote_rank, AFEPack::ostream<> &os) |
template<int GDIM> | |
void | unpack_verify_shared_object (HGeometry< GDIM, dow > *geo, int remote_rank, AFEPack::istream<> &is) |
void | verify_shared_object () |
私有类型 | |
typedef HGeometryForest< DIM, DOW, MATCHER > | this_t |
私有成员 | |
template<class GEO > | |
bool | is_shared_info_sent (GEO &geo) const |
template<class GEO > | |
void | set_shared_info_sent (GEO &geo) const |
template<class GEO > | |
void | clear_shared_info_sent (GEO &geo) const |
template<class GEO > | |
bool | is_dummy (GEO &geo) const |
template<class GEO > | |
void | dummy (GEO &geo) const |
template<class GEO > | |
void | undummy (GEO &geo) const |
void | collect_parent_element (const property_id_t< bool > &pid, HGeometry< dim, dow > &geo, typename tree_t::container_t &nre) const |
void | eraseRootElementOneLevel () |
template<class GEO > | |
void | nullParent (GEO &geo) |
template<class GEO > | |
void | tryDeleteGeometry (GEO *p_geo, const property_id_t< bool > &pid) |
template<class GEO > | |
void | deleteGeometry (GEO *p_geo) |
私有属性 | |
MPI_Comm | _comm |
int | _rank |
int | _n_rank |
matcher_t | _matcher |
property_id_t | _pid_shared_info_sent |
property_id_t | _pid_dummy |
property_id_t< OBJ > | _pid_so_0d |
Shared_ptr_list< GEO > | _shared_list_0d |
property_id_t< OBJ > | _pid_so_1d |
Shared_ptr_list< GEO > | _shared_list_1d |
property_id_t< OBJ > | _pid_so_2d |
Shared_ptr_list< GEO > | _shared_list_2d |
property_id_t< OBJ > | _pid_so_3d |
Shared_ptr_list< GEO > | _shared_list_3d |
友元 | |
class | BirdView< this_t > |
class | HGeometryMatcher< this_t > |
class | HLoadBalance< this_t > |
HGeometryForest 作为 HGeometryTree 的派生类,并不是一系列的 HGeometryTree 的组合,而只是对 HGeometryTree 作了进一步的包装,使 得其可以完成不同分区之间的数据交换。
其重新实现的 readMesh 函数可以实现对具有分区类型的网格的读入。
typedef BirdViewSet<this_t> MPI::HGeometryForest< DIM, DOW, MATCHER >::birdview_set_t |
typedef BirdView<this_t> MPI::HGeometryForest< DIM, DOW, MATCHER >::birdview_t |
typedef HLoadBalance<this_t> MPI::HGeometryForest< DIM, DOW, MATCHER >::load_balancer_t |
typedef MATCHER MPI::HGeometryForest< DIM, DOW, MATCHER >::matcher_t |
typedef HGeometryForest<DIM,DOW,MATCHER> MPI::HGeometryForest< DIM, DOW, MATCHER >::this_t [private] |
typedef HGeometryTree<DIM,DOW> MPI::HGeometryForest< DIM, DOW, MATCHER >::tree_t |
MPI::HGeometryForest< DIM, DOW, MATCHER >::HGeometryForest | ( | ) | [inline] |
MPI::HGeometryForest< DIM, DOW, MATCHER >::HGeometryForest | ( | MPI_Comm | comm | ) | [inline] |
virtual MPI::HGeometryForest< DIM, DOW, MATCHER >::~HGeometryForest | ( | ) | [inline, virtual] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::clear | ( | ) | [inline] |
考虑到在使用 ULoadBalance 进行负载平衡以后,根单元可能不是最粗 的背景单元了,直接调用基类的 clear 函数可能造成内存泄漏,我们此 处先将最粗的背景单元列表进行重建,然后再调用基类的 clear 函数对 内存进行清空的操作。
使用重建的根单元
然后进行内存清除
void MPI::HGeometryForest< DIM, DOW, MATCHER >::clear_shared_info_sent | ( | GEO & | geo | ) | const [inline, private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::collect_parent_element | ( | const property_id_t< bool > & | pid, |
HGeometry< dim, dow > & | geo, | ||
typename tree_t::container_t & | nre | ||
) | const [inline, private] |
MPI_Comm MPI::HGeometryForest< DIM, DOW, MATCHER >::communicator | ( | ) | const [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::deleteGeometry | ( | GEO * | p_geo | ) | [inline, private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::dummy | ( | GEO & | geo | ) | const [inline, private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::erase_shared_info | ( | GEO & | geo | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::erase_shared_info | ( | GEO & | geo | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::erase_shared_info | ( | GEO & | geo | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::erase_shared_info | ( | GEO & | geo | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::eraseRootElement | ( | u_int | level = 1 | ) |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::eraseRootElementOneLevel | ( | ) | [private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::free_property | ( | ) | [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::get_shared_info | ( | const GEO & | geo | ) | const [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::get_shared_info | ( | const GEO & | geo | ) | const [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::get_shared_info | ( | const GEO & | geo | ) | const [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::get_shared_info | ( | const GEO & | geo | ) | const [inline] |
const Shared_ptr_list<HGeometry<D,DOW> >& MPI::HGeometryForest< DIM, DOW, MATCHER >::get_shared_list | ( | ) | const [inline] |
bool MPI::HGeometryForest< DIM, DOW, MATCHER >::is_dummy | ( | GEO & | geo | ) | const [inline, private] |
bool MPI::HGeometryForest< DIM, DOW, MATCHER >::is_geometry_shared | ( | const RegularMesh< DIM, DOW > & | mesh, |
int | dim, | ||
int | idx | ||
) | const [inline] |
作为来源于本几何遗传树的正则网格 mesh,返回其 dim 维的第 idx 个几 何体是否是共享的几何体。
bool MPI::HGeometryForest< DIM, DOW, MATCHER >::is_on_primary_rank | ( | const HGeometry< GDIM, DOW > & | geo | ) | const [inline] |
一个几何体的多份拷贝中,其中部分拷贝所在的进程的秩是所有拷贝中最 小的,这些拷贝所在的秩我们称为`首秩'(primary rank)。此函数返回一 个几何体是否是在首秩上。GEO 需要为 HGeometry 类型。
bool MPI::HGeometryForest< DIM, DOW, MATCHER >::is_primary_geometry | ( | const HGeometry< GDIM, DOW > & | geo | ) | const [inline] |
判断一个几何体是否是主对象。
bool MPI::HGeometryForest< DIM, DOW, MATCHER >::is_shared_info_sent | ( | GEO & | geo | ) | const [inline, private] |
bool MPI::HGeometryForest< DIM, DOW, MATCHER >::lock | ( | ) | [inline] |
const matcher_t& MPI::HGeometryForest< DIM, DOW, MATCHER >::matcher | ( | ) | const [inline] |
matcher_t& MPI::HGeometryForest< DIM, DOW, MATCHER >::matcher | ( | ) | [inline] |
int MPI::HGeometryForest< DIM, DOW, MATCHER >::n_rank | ( | ) | const [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::new_property | ( | ) | [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::new_shared_info | ( | GEO & | geo | ) | [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::new_shared_info | ( | GEO & | geo | ) | [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::new_shared_info | ( | GEO & | geo | ) | [inline] |
OBJ* MPI::HGeometryForest< DIM, DOW, MATCHER >::new_shared_info | ( | GEO & | geo | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::nullParent | ( | GEO & | geo | ) | [inline, private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::pack_verify_shared_object | ( | HGeometry< GDIM, dow > * | geo, |
int | remote_rank, | ||
AFEPack::ostream<> & | os | ||
) | [inline] |
调试用代码:对分区之间的共享几何体的信息进行验证,确证一个几何体的 共享列表中的其它拷贝也将自己作为共享几何体。
发送出去本身的指针
int MPI::HGeometryForest< DIM, DOW, MATCHER >::primary_rank | ( | const HGeometry< GDIM, DOW > & | geo | ) | const [inline] |
返回一个几何体的首秩。
int MPI::HGeometryForest< DIM, DOW, MATCHER >::rank | ( | ) | const [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::readMesh | ( | const std::string & | ) |
This is the routine used to read in the mesh data in the internal data format.
void MPI::HGeometryForest< DIM, DOW, MATCHER >::renumerateRootElement | ( | void(*)(double, double, double, double &, double &, double &) | f = NULL | ) |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::set_communicator | ( | MPI_Comm | comm | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::set_dim_shared_info_sent | ( | ) | const [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::set_is_used_up | ( | ) |
从根单元开始,向祖先方向设置几何体被使用的旗标。
void MPI::HGeometryForest< DIM, DOW, MATCHER >::set_is_used_up | ( | HGEO & | geo | ) | const |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::set_shared_info_sent | ( | GEO & | geo | ) | const [inline, private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::set_shared_info_sent | ( | ) | const [inline] |
将所有的共享几何体的共享信息发送旗标(_pid_shared_info_sent)设为已 经发送过了。此函数在数据从存储上读入以后使用,使得旧有的共享信息 不必重新在几何体匹配的时候发送。
void MPI::HGeometryForest< DIM, DOW, MATCHER >::tryDeleteGeometry | ( | GEO * | p_geo, |
const property_id_t< bool > & | pid | ||
) | [inline, private] |
顺手将其共享信息列表中入口删除
void MPI::HGeometryForest< DIM, DOW, MATCHER >::undummy | ( | GEO & | geo | ) | const [inline, private] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::unlock | ( | ) | [inline] |
void MPI::HGeometryForest< DIM, DOW, MATCHER >::unpack_verify_shared_object | ( | HGeometry< GDIM, dow > * | geo, |
int | remote_rank, | ||
AFEPack::istream<> & | is | ||
) | [inline] |
读入远程几何体的指针
void MPI::HGeometryForest< DIM, DOW, MATCHER >::verify_shared_object | ( | ) | [inline] |
friend class BirdView< this_t > [friend] |
friend class HGeometryMatcher< this_t > [friend] |
friend class HLoadBalance< this_t > [friend] |
MPI_Comm MPI::HGeometryForest< DIM, DOW, MATCHER >::_comm [private] |
matcher_t MPI::HGeometryForest< DIM, DOW, MATCHER >::_matcher [private] |
int MPI::HGeometryForest< DIM, DOW, MATCHER >::_n_rank [private] |
property_id_t MPI::HGeometryForest< DIM, DOW, MATCHER >::_pid_dummy [private] |
在使用不是基于最初背景单元的负载平衡的时候(MPI_ULoadbalance.h),有 些几何体会在分区上存储为哑几何体。在这样的情况下,每个分区上存储的 几何体中,有部分将永远不可能出现在网格中。所谓哑几何体,我们定义其 为将不可能会在分区的网格中出现的几何体,包括根单元的前辈几何体和根 单元的那些不是根单元兄弟,以及这些哑单元几何体的部分边界和顶点。
property_id_t MPI::HGeometryForest< DIM, DOW, MATCHER >::_pid_shared_info_sent [private] |
表示几何体的匹配信息是否已经发送的性质。几何体对所有应该进行匹配 的进程都已经发送了自身的匹配信息之后,此性质将会被设置。函数 is_shared_info_sent 和 set_shared_info_sent 对此性质进行设置和查 询。
property_id_t<OBJ> MPI::HGeometryForest< DIM, DOW, MATCHER >::_pid_so_0d [private] |
property_id_t<OBJ> MPI::HGeometryForest< DIM, DOW, MATCHER >::_pid_so_1d [private] |
property_id_t<OBJ> MPI::HGeometryForest< DIM, DOW, MATCHER >::_pid_so_2d [private] |
property_id_t<OBJ> MPI::HGeometryForest< DIM, DOW, MATCHER >::_pid_so_3d [private] |
int MPI::HGeometryForest< DIM, DOW, MATCHER >::_rank [private] |
Shared_ptr_list<GEO> MPI::HGeometryForest< DIM, DOW, MATCHER >::_shared_list_0d [private] |
Shared_ptr_list<GEO> MPI::HGeometryForest< DIM, DOW, MATCHER >::_shared_list_1d [private] |
Shared_ptr_list<GEO> MPI::HGeometryForest< DIM, DOW, MATCHER >::_shared_list_2d [private] |
Shared_ptr_list<GEO> MPI::HGeometryForest< DIM, DOW, MATCHER >::_shared_list_3d [private] |