⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mesh_refinement.h

📁 一个用来实现偏微分方程中网格的计算库
💻 H
📖 第 1 页 / 共 2 页
字号:
   */  Real& absolute_global_tolerance();  /**   * If \p face_level_mismatch_limit is set to a nonzero value, then   * refinement and coarsening will produce meshes in which the   * refinement level of two face neighbors will not differ by more than   * that limit.  If \p face_level_mismatch_limit is 0, then level   * differences will be unlimited.   *   * \p face_level_mismatch_limit is 1 by default.  Currently the only   * supported options are 0 and 1.   */  unsigned char& face_level_mismatch_limit();  /**   * If \p edge_level_mismatch_limit is set to a nonzero value, then   * refinement and coarsening will produce meshes in which the   * refinement level of two edge neighbors will not differ by more than   * that limit.  If \p edge_level_mismatch_limit is 0, then level   * differences will be unlimited.   *   * \p edge_level_mismatch_limit is 0 by default.   */  unsigned char& edge_level_mismatch_limit();  /**   * If \p node_level_mismatch_limit is set to a nonzero value, then   * refinement and coarsening will produce meshes in which the   * refinement level of two nodal neighbors will not differ by more than   * that limit.  If \p node_level_mismatch_limit is 0, then level   * differences will be unlimited.   *   * \p node_level_mismatch_limit is 0 by default.   */  unsigned char& node_level_mismatch_limit();private:  /**   * Coarsens user-requested elements.  Both coarsen_elements   * and refine_elements used to be in the public interface for the   * MeshRefinement object.  Unfortunately, without proper   * preparation (make_refinement_compatible, make_coarsening_compatible)   * at least coarsen_elements() did not work alone.  By making them   * private, we signal to the user that they are not part of the   * interface.   *   * It is possible that for a given set of refinement flags there   * is actually no change upon calling this member function.  Consequently,   * this function returns \p true if the mesh actually changed (hence   * data needs to be projected) and \p false otherwise.   */  bool _coarsen_elements ();    /**   * Refines user-requested elements.   *   * It is possible that for a given set of refinement flags there   * is actually no change upon calling this member function.  Consequently,   * this function returns \p true if the mesh actually changed (hence   * data needs to be projected) and \p false otherwise.   */  bool _refine_elements ();  //------------------------------------------------------  // "Smoothing" algorthms for refined meshes    /**   * This algorithm restricts the maximum level mismatch   * at any node in the mesh.  Calling this with \p max_mismatch   * equal to 1 would transform this mesh:   \verbatim   o---o---o---o---o-------o-------o   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o       |       |   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o-------o-------o   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o       |       |   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o-------o-------o   |       |       |               |   |       |       |               |   |       |       |               |   |       |       |               |   |       |       |               |   o-------o-------o               |   |       |       |               |   |       |       |               |   |       |       |               |   |       |       |               |   |       |       |               |   o-------o-------o---------------o        \endverbatim   * into this:      \verbatim   o---o---o---o---o-------o-------o   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o       |       |   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o-------o-------o   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o       |       |   |   |   |   |   |       |       |   |   |   |   |   |       |       |   o---o---o---o---o-------o-------o   |       |       |       :       |   |       |       |       :       |   |       |       |       :       |   |       |       |       :       |   |       |       |       :       |   o-------o-------o.......o.......o   |       |       |       :       |   |       |       |       :       |   |       |       |       :       |   |       |       |       :       |   |       |       |       :       |   o-------o-------o-------o-------o        \endverbatim   by refining the indicated element      */  bool limit_level_mismatch_at_node (const unsigned int max_mismatch);  /*   * This algorithm restricts the maximum level mismatch   * at any edge in the mesh.  See the ASCII art in the comment of   * limit_level_mismatch_at_node, and pretend they're hexes.   */  bool limit_level_mismatch_at_edge (const unsigned int max_mismatch);  /**   * This algorithm selects an element for refinement   * if all of its neighbors are (or will be) refined.   * This algorithm will transform this mesh:   \verbatim   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   |   |   |       |   |   |   |   |   |       |   |   |   o---o---o       o---o---o   |   |   |       |   |   |   |   |   |       |   |   |   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   \endverbatim   into this:   \verbatim   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   |   |   |   :   |   |   |   |   |   |   :   |   |   |   o---o---o...o...o---o---o   |   |   |   :   |   |   |   |   |   |   :   |   |   |   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   |   |   |   |   |   |   |   |   |   |   |   |   |   |   o---o---o---o---o---o---o   \endverbatim   by refining the indicated element      */  bool eliminate_unrefined_patches ();  //---------------------------------------------  // Utility algorithms  /**   * Calculates the error on all coarsenable parents.   * error_per_parent[parent_id] stores this error if parent_id corresponds   * to a coarsenable parent, and stores -1 otherwise.   */  void create_parent_error_vector (const ErrorVector& error_per_cell,				   ErrorVector& error_per_parent,				   Real &parent_error_min,				   Real &parent_error_max);  /**   * Updates the \p _new_nodes_map   */  void update_nodes_map ();  /**   * Sets the refinement flag to \p Elem::DO_NOTHING   * for each element in the mesh.   */  void clean_refinement_flags ();    /**   * Take user-specified coarsening flags and augment them   * so that level-one dependency is satisfied.   */  bool make_coarsening_compatible (const bool);  /**   * Take user-specified refinement flags and augment them   * so that level-one dependency is satisfied.   */  bool make_refinement_compatible (const bool);    /**   * Copy refinement flags on ghost elements from their   * local processors.  Return true if any flags changed.   */  bool make_flags_parallel_consistent ();    /**   * Data structure that holds the new nodes information.   */    LocationMap<Node> _new_nodes_map;  /**   * Reference to the mesh.   */  MeshBase& _mesh;  /**   * For backwards compatibility, we initialize this   * as false and then set it to true if the user uses   * any of the refinement parameter accessor functions   */  bool _use_member_parameters;  /**   * Refinement parameter values   */  bool _coarsen_by_parents;  Real _refine_fraction;  Real _coarsen_fraction;  unsigned int _max_h_level;  Real _coarsen_threshold;  unsigned int _nelem_target;  Real _absolute_global_tolerance;  unsigned char _face_level_mismatch_limit, _edge_level_mismatch_limit,	        _node_level_mismatch_limit;};// ------------------------------------------------------------// MeshRefinement class inline membersinline bool& MeshRefinement::coarsen_by_parents(){  _use_member_parameters = true;  return _coarsen_by_parents;}inline Real& MeshRefinement::refine_fraction(){  _use_member_parameters = true;  return _refine_fraction;}inline Real& MeshRefinement::coarsen_fraction(){  _use_member_parameters = true;  return _coarsen_fraction;}inline unsigned int& MeshRefinement::max_h_level(){  _use_member_parameters = true;  return _max_h_level;}inline Real& MeshRefinement::coarsen_threshold(){  _use_member_parameters = true;  return _coarsen_threshold;}inline unsigned int& MeshRefinement::nelem_target(){  _use_member_parameters = true;  return _nelem_target;}inline Real& MeshRefinement::absolute_global_tolerance(){  _use_member_parameters = true;  return _absolute_global_tolerance;}inline unsigned char& MeshRefinement::face_level_mismatch_limit(){  return _face_level_mismatch_limit;}inline unsigned char& MeshRefinement::edge_level_mismatch_limit(){  return _edge_level_mismatch_limit;}inline unsigned char& MeshRefinement::node_level_mismatch_limit(){  return _node_level_mismatch_limit;}#endif // end #ifdef ENABLE_AMR#endif // end #ifndef __mesh_refinement_h__ 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -