|
AFEPack
|
命名空间 | |
| namespace | details |
组合类型 | |
| struct | HBuffer |
| 判断一个数据ID是否合法 更多... | |
类型定义 | |
| typedef int | data_id_t |
| typedef std::string | data_name_t |
| 数据 ID 的类型:为有符号整型 | |
| typedef BinaryBuffer | data_buffer_t |
| 数据名称类型:字符串 | |
| typedef std::map< data_id_t, data_buffer_t > | buffer_t |
| 数据缓冲区类型 | |
函数 | |
| data_id_t | name_to_id (const data_name_t &dn) |
| data_id_t | register_data_name (const data_name_t &dn, bool) |
| 从数据名称到ID的转换 | |
| void | initialize () |
| 登记数据名称 | |
| bool | is_valid (const data_id_t &) |
| 初始化数据迁移环境 | |
| template<class HGEO , class STREAM > | |
| void | get_export_stream (HGEO &geo, const data_id_t &data_id, STREAM &os) |
| template<class HGEO , class STREAM > | |
| void | get_import_stream (HGEO &geo, const data_id_t &data_id, STREAM &is) |
| template<class MESH , class STREAM > | |
| void | get_export_stream (MESH &mesh, const data_id_t &data_id, u_int dimension, u_int geo_idx, STREAM &os) |
| template<class MESH , class STREAM > | |
| void | get_import_stream (MESH &mesh, const data_id_t &data_id, u_int dimension, u_int geo_idx, STREAM &is) |
| template<class MESH , class SP , class STREAM > | |
| void | get_dof_export_stream (MESH &mesh, SP &sp, const data_id_t &data_id, int dof, STREAM &os) |
| template<class MESH , class SP , class STREAM > | |
| void | get_dof_import_stream (MESH &mesh, SP &sp, const data_id_t &data_id, int dof, STREAM &is) |
| template<class HTREE > | |
| void | clear_data_buffer (HTREE &tree) |
| void | initialize (MPI_Comm comm) |
| data_id_t | register_data_name (const data_name_t &dn) |
| 对迁移环境进行初始化 | |
| void | load_config (const std::string &filename) |
| 登记数据名称 | |
| void | save_config (const std::string &filename) |
| 载入配置文件 | |
| void | ensured_open_fstream (const std::string &filename, std::ifstream &is) |
| 输出配置文件 | |
| void | ensured_open_filtering_stream (const std::string &filename, filtering_istream &is) |
| template<class FUNC > | |
| void | export_fe_func (const FUNC &fun, const data_id_t &data_id) |
| template<class FUNC > | |
| void | export_fe_func (const std::vector< FUNC > &fun, const data_id_t &data_id) |
| template<class FUNC > | |
| void | import_fe_func (FUNC &fun, const data_id_t &data_id) |
| template<class FUNC > | |
| void | import_fe_func (std::vector< FUNC > &fun, const data_id_t &data_id) |
| template<class HTREE , class T > | |
| void | export_property (const HTREE &htree, const data_id_t &data_id, const property_id_t< T > &pid) |
| template<class HTREE , class T > | |
| void | import_property (const HTREE &htree, const data_id_t &data_id, const property_id_t< T > &pid) |
| template<class HTREE > | |
| void | sync_data_buffer (const HTREE &htree) |
在进行整个环境的序列化以前,我们先构造序列化的环境。我们设定基本前提 为:假定进程上仅仅有一棵几何遗传树,在此树上多个非正则网格,在每个非 正则网格上建立了一个正则网格,在正则网格上则建立了多个有限元空间,每 个有限元空间上有多个有限元函数。
由于在进行网格的拆分和合并的时候,正则网格需要重建,从而有限元空间也 需要进行重建,为了能够对有限元函数的信息进行迁移,我们在猜分以前,将 有限元函数的信息存储到相应的几何遗传树的几何体上去。几何遗传树中的几 何体继承了 HGeomeryBuffer 这个类,从而我们可以将信息存储在这个类的缓 冲区中。比如从有限元函数的出发,每个自由度都能够找到自身所依附的正则 网格中的几何体,而每个正则网格中的几何体则需要能够找寻到在正则化的过 程中相应的几何遗传树中的几何体,我们对正则网格进行了改进,使得这个检 索成为可能。这个是通过在正则网格中加入了h_geometry_ptr数组来完成的。
在此基础上,我们假设在每一个几何体上附着了一组数据,这些数据按照数 据 ID 被分成组,比如一个有限元函数的数据我们可以分为一组。一个几何 体上,属于同一个数据 ID 的数据则必须由用户自己负责分析,也就是说, 这组数据本身必须在上下文中是可以自解释的。具体参考 export_fe_func 和 import_fe_func 这对函数的实现。
| typedef std::map<data_id_t, data_buffer_t> Migration::buffer_t |
数据缓冲区类型
数据 ID 到缓冲区映射表,这个是用在最终存储数据位置的类型。
| typedef BinaryBuffer Migration::data_buffer_t |
数据名称类型:字符串
| typedef int Migration::data_id_t |
| typedef std::string Migration::data_name_t |
数据 ID 的类型:为有符号整型
| void Migration::clear_data_buffer | ( | HTREE & | tree | ) |
将一棵树上的所有数据缓冲清除,将内存释放出来。在数据迁移过后,应 该进行此操作以释放内存;在新一轮数据迁移进行以前,如果数据缓冲没 有清除,则必须进行此操作,否则将会出现数据混乱。
| void Migration::ensured_open_filtering_stream | ( | const std::string & | filename, |
| filtering_istream & | is | ||
| ) |
| void Migration::ensured_open_fstream | ( | const std::string & | filename, |
| std::ifstream & | is | ||
| ) |
输出配置文件
| void Migration::export_fe_func | ( | const FUNC & | fun, |
| const data_id_t & | data_id | ||
| ) |
输出一个有限元函数。对于附着于同一个几何体上的自由度,我们使用自由 度的识别协议旗标和插值点来进行识别。
| fun | 有限元函数 |
| data_id | 数据 ID |
| void Migration::export_fe_func | ( | const std::vector< FUNC > & | fun, |
| const data_id_t & | data_id | ||
| ) |
输出一个有限元函数的向量。对于附着于同一个几何体上的自由度,我们使用自由 度的识别协议旗标和插值点来进行识别。
此函数由邓剑提供。
| fun | 有限元函数的向量 |
| data_id | 数据 ID |
| void Migration::export_property | ( | const HTREE & | htree, |
| const data_id_t & | data_id, | ||
| const property_id_t< T > & | pid | ||
| ) |
| void Migration::get_dof_export_stream | ( | MESH & | mesh, |
| SP & | sp, | ||
| const data_id_t & | data_id, | ||
| int | dof, | ||
| STREAM & | os | ||
| ) |
获取有限元空间上的一个自由度的输出流,用来输出数据。
| mesh | 正则网格 |
| sp | 有限元空间 |
| data_id | 数据 ID |
| dof | 自由度编号 |
| os | 获得的输出流 |
| void Migration::get_dof_import_stream | ( | MESH & | mesh, |
| SP & | sp, | ||
| const data_id_t & | data_id, | ||
| int | dof, | ||
| STREAM & | is | ||
| ) |
获取有限元空间上的一个自由度的输入流,用来输出数据。
| mesh | 正则网格 |
| sp | 有限元空间 |
| data_id | 数据 ID |
| dof | 自由度编号 |
| is | 获得的输入流 |
| void Migration::get_export_stream | ( | HGEO & | geo, |
| const data_id_t & | data_id, | ||
| STREAM & | os | ||
| ) |
获取树结构中的几何体上的一个输出流,用来输出数据。
| geo | 树结构中的几何体 |
| data_id | 数据 ID |
| os | 获得的输出流 |
| void Migration::get_export_stream | ( | MESH & | mesh, |
| const data_id_t & | data_id, | ||
| u_int | dimension, | ||
| u_int | geo_idx, | ||
| STREAM & | os | ||
| ) |
获取网格中的几何体上的一个输出流,用来输出数据。
| mesh | 正则网格 |
| data_id | 数据 ID |
| dimension | 几何体维数 |
| geo_idx | 几何体序号 |
| os | 获得的输出流 |
| void Migration::get_import_stream | ( | HGEO & | geo, |
| const data_id_t & | data_id, | ||
| STREAM & | is | ||
| ) |
获取树结构中几何体上的一个输入流,用来输出数据。
| geo | 树结构中的几何体 |
| data_id | 数据 ID |
| is | 获得的输入流 |
| void Migration::get_import_stream | ( | MESH & | mesh, |
| const data_id_t & | data_id, | ||
| u_int | dimension, | ||
| u_int | geo_idx, | ||
| STREAM & | is | ||
| ) |
获取网格中几何体上的一个输入流,用来输出数据。
| mesh | 正则网格 |
| data_id | 数据 ID |
| dimension | 几何体维数 |
| geo_idx | 几何体序号 |
| is | 获得的输入流 |
| void Migration::import_fe_func | ( | FUNC & | fun, |
| const data_id_t & | data_id | ||
| ) |
载入一个有限元函数。对于附着于同一个几何体上的自由度,我们使用自由 度的识别协议旗标和插值点的局部指标来进行识别。
| fun | 有限元函数 |
| data_id | 数据 ID |
| void Migration::import_fe_func | ( | std::vector< FUNC > & | fun, |
| const data_id_t & | data_id | ||
| ) |
载入一个有限元函数的向量。对于附着于同一个几何体上的自由度,我们使用自由 度的识别协议旗标和插值点的局部指标来进行识别。
此函数由邓剑提供。
| fun | 有限元函数的向量 |
| data_id | 数据 ID |
| void Migration::import_property | ( | const HTREE & | htree, |
| const data_id_t & | data_id, | ||
| const property_id_t< T > & | pid | ||
| ) |
| void Migration::initialize | ( | ) |
登记数据名称
| void Migration::initialize | ( | MPI_Comm | comm | ) |
| bool Migration::is_valid | ( | const data_id_t & | id | ) |
初始化数据迁移环境
| void Migration::load_config | ( | const std::string & | filename | ) |
登记数据名称
| data_id_t Migration::name_to_id | ( | const data_name_t & | dn | ) |
| data_id_t Migration::register_data_name | ( | const data_name_t & | dn, |
| bool | flag | ||
| ) |
从数据名称到ID的转换
| data_id_t Migration::register_data_name | ( | const data_name_t & | dn | ) |
对迁移环境进行初始化
| void Migration::save_config | ( | const std::string & | filename | ) |
载入配置文件
| void Migration::sync_data_buffer | ( | const HTREE & | htree | ) |
1.7.6.1