-
Notifications
You must be signed in to change notification settings - Fork 4
/
coarse_solver.h
35 lines (25 loc) · 1.05 KB
/
coarse_solver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#include "definitions.h"
#include "coarse_assembly.h"
#include "cholmod.h"
struct CoarseSolverData {
cholmod_common *cholmodCommon;
cholmod_sparse *sparseMatrix;
cholmod_factor *factoredMatrix;
cholmod_dense *rhs;
cholmod_dense *solution;
cholmod_dense *Y_workspace;
cholmod_dense *E_workspace;
};
void initializeCoarseSolver(const struct gridContext gc, const int l,
struct CoarseSolverData *ssolverData,
const struct CSRMatrix M);
void freeCoarseSolver(const struct gridContext gc, const int l,
struct CoarseSolverData *solverData,
const struct CSRMatrix M);
void factorizeSubspaceMatrix(const struct gridContext gc, const int l,
struct CoarseSolverData solverData,
const struct CSRMatrix M);
void solveSubspaceMatrix(const struct gridContext gc, const int l,
struct CoarseSolverData solverData, const CTYPE *in,
CTYPE *out);