DDM solvers

Builder

template<typename CoefficientPrecision, typename CoordinatePrecision = underlying_type<CoefficientPrecision>>
class DDMSolverBuilder

Builder that encapsulates all the implementation details for constructing DDM object.

Template Parameters:
  • CoefficientPrecision

  • CoordinatePrecision

Public Functions

inline DDMSolverBuilder(DistributedOperator<CoefficientPrecision> &distributed_operator, HMatrix<CoefficientPrecision, CoordinatePrecision> &block_diagonal_hmatrix)

Builder for DDM Block Jacobi solver (without overlap). The block_diagonal_hmatrix corresponding to the local subproblem is usually taken from the local diagonal block of the distributed_operator.

Parameters:
  • distributed_operator

  • block_diagonal_hmatrix

inline DDMSolverBuilder(DistributedOperator<CoefficientPrecision> &distributed_operator, HMatrix<CoefficientPrecision, CoordinatePrecision> &block_diagonal_hmatrix, const VirtualGenerator<CoefficientPrecision> &generator, const std::vector<int> &ovr_subdomain_to_global, const std::vector<int> &cluster_to_ovr_subdomain, const std::vector<int> &neighbors, const std::vector<std::vector<int>> &intersections)

Builder for DDM Schwarz solver (with overlap), where block_diagonal_hmatrix correspond to the problem for the subdomain without overlap, usually taken from the local diagonal block of the distributed_operator. The problem in the overlapping subdomain is then assembled as a 2x2 block matrix where one diagonal block is the previous HMatrix, and the other blocks are dense blocks stored in blocks_in_overlap.

Parameters:
  • distributed_operator

  • block_diagonal_hmatrix

  • generator

  • ovr_subdomain_to_global

  • cluster_to_ovr_subdomain

  • neighbors

  • intersections

inline DDMSolverBuilder(DistributedOperator<CoefficientPrecision> &distributed_operator, const std::vector<int> &ovr_subdomain_to_global, const std::vector<int> &cluster_to_ovr_subdomain, const std::vector<int> &neighbors, const std::vector<std::vector<int>> &intersections, const VirtualGenerator<CoefficientPrecision> &generator, int spatial_dimension, const CoordinatePrecision *global_geometry, const CoordinatePrecision *radii, const CoordinatePrecision *weights, const ClusterTreeBuilder<CoordinatePrecision> &cluster_tree_builder, const HMatrixTreeBuilder<CoefficientPrecision, CoordinatePrecision> &local_hmatrix_builder)

Builder for DDM Schwarz solver (with overlap), where a HMatrix for the local subproblem with overlap is assembled and stored in local_hmatrix. It can be useful when the DistributedOperator is not using any HMatrix for local compression.

Parameters:
  • distributed_operator

  • ovr_subdomain_to_global

  • cluster_to_ovr_subdomain

  • neighbors

  • intersections

  • generator

  • spatial_dimension

  • global_geometry

  • radii

  • weights

  • cluster_tree_builder

  • local_hmatrix_builder

inline DDMSolverBuilder(DistributedOperator<CoefficientPrecision> &distributed_operator, const std::vector<int> &ovr_subdomain_to_global, const std::vector<int> &cluster_to_ovr_subdomain, const std::vector<int> &neighbors, const std::vector<std::vector<int>> &intersections, const VirtualGenerator<CoefficientPrecision> &generator, int spatial_dimension, const CoordinatePrecision *global_geometry, const ClusterTreeBuilder<CoordinatePrecision> &cluster_tree_builder, const HMatrixTreeBuilder<CoefficientPrecision, CoordinatePrecision> &local_hmatrix_builder)

Public Members

const std::vector<int> &local_to_global_numbering
std::unique_ptr<HMatrix<CoefficientPrecision, CoordinatePrecision>> local_hmatrix

HMatrix associated with the local problem with overlap. Built only if not using a HMatrix associated h the local problem without overlap.

std::array<Matrix<CoefficientPrecision>, 3> blocks_in_overlap

Dense blocks related to the overlap when using a solver with overlap, and a HMatrix for the local problem without overlap.

DDM<CoefficientPrecision, HPDDMCustomLocalSolver> solver

Resulting solver from builder.

DDM

template<typename CoefficientPrecision, template<class> class LocalSolver>
class DDM

Public Functions

DDM(const DDM&) = delete
DDM &operator=(const DDM&) = delete
DDM(DDM &&cluster) noexcept = default
DDM &operator=(DDM &&cluster) noexcept = default
virtual ~DDM() = default
inline void clean()
inline DDM(int size_w_overlap, const DistributedOperator<CoefficientPrecision> &distributed_operator, std::unique_ptr<HPDDMOperator<CoefficientPrecision, LocalSolver>> hpddm_op)
inline void facto_one_level()
inline void build_coarse_space(VirtualCoarseSpaceBuilder<CoefficientPrecision> &coarse_space_builder, VirtualCoarseOperatorBuilder<CoefficientPrecision> &coarse_operator_builder)
inline void solve(const CoefficientPrecision *const rhs, CoefficientPrecision *const x, const int &mu = 1)
inline void print_infos() const
inline void save_infos(const std::string &outputname, std::ios_base::openmode mode = std::ios_base::app, const std::string &sep = " = ") const
inline void add_infos(std::string key, std::string value) const
inline void set_infos(std::string key, std::string value) const
inline std::string get_information(const std::string &key) const
inline std::map<std::string, std::string> get_information() const
inline int get_nevi() const
inline int get_local_size() const