18 #ifndef __PETSC_DM_COLLECTION_H 19 #define __PETSC_DM_COLLECTION_H 27 #include <dolfin/common/MPI.h> 28 #include <dolfin/la/PETScMatrix.h> 29 #include <dolfin/log/log.h> 35 class BoundingBoxTree;
50 PETScDMCollection(std::vector<std::shared_ptr<const FunctionSpace>> function_spaces);
68 static std::shared_ptr<PETScMatrix>
75 static void find_exterior_points(MPI_Comm mpi_comm,
76 std::shared_ptr<const BoundingBoxTree> treec,
77 int dim,
int data_size,
78 const std::vector<double>& send_points,
79 const std::vector<int>& send_indices,
80 std::vector<int>& indices,
81 std::vector<std::size_t>& cell_ids,
82 std::vector<double>& points);
86 static PetscErrorCode create_global_vector(DM dm, Vec* vec);
87 static PetscErrorCode create_interpolation(DM dmc, DM dmf, Mat *mat,
89 static PetscErrorCode coarsen(DM dmf, MPI_Comm comm, DM* dmc);
90 static PetscErrorCode refine(DM dmc, MPI_Comm comm, DM* dmf);
95 std::vector<std::shared_ptr<const FunctionSpace>> _spaces;
static std::shared_ptr< PETScMatrix > create_transfer_matrix(const FunctionSpace &coarse_space, const FunctionSpace &fine_space)
Definition: PETScDMCollection.cpp:212
DM get_dm(int i)
Definition: PETScDMCollection.cpp:186
Definition: FunctionSpace.h:53
Definition: PETScDMCollection.h:43
void check_ref_count() const
These are test/debugging functions that will be removed.
Definition: PETScDMCollection.cpp:193
void reset(int i)
Debugging use - to be removed.
Definition: PETScDMCollection.cpp:203
~PETScDMCollection()
Destructor.
Definition: PETScDMCollection.cpp:176
Definition: PETScObject.h:33
PETScDMCollection(std::vector< std::shared_ptr< const FunctionSpace >> function_spaces)
Definition: PETScDMCollection.cpp:135