20 #ifndef FPGA_BILU0_HEADER_INCLUDED
21 #define FPGA_BILU0_HEADER_INCLUDED
25 #include <opm/simulators/linalg/bda/ILUReorder.hpp>
26 #include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
39 template <
unsigned int block_size>
48 std::unique_ptr<BlockedMatrix> LMat =
nullptr, UMat =
nullptr, LUMat =
nullptr;
49 std::shared_ptr<BlockedMatrix> rMat =
nullptr;
50 double *invDiagVals =
nullptr;
51 std::vector<int> diagIndex;
52 std::vector<int> toOrder, fromOrder;
53 std::vector<int> rowsPerColor;
58 std::vector<std::vector<double> > nnzValues, LnnzValues, UnnzValues;
59 std::vector<short int> colIndices, LColIndices, UColIndices;
60 std::vector<unsigned char> NROffsets, LNROffsets, UNROffsets;
61 std::vector<int> PIndicesAddr, LPIndicesAddr, UPIndicesAddr;
62 std::vector<int> colorSizes, LColorSizes, UColorSizes;
63 std::vector<int> nnzValsSizes, LnnzValsSizes, UnnzValsSizes;
64 std::vector<std::vector<int> > colIndicesInColor, LColIndicesInColor, UColIndicesInColor;
67 int LRowSize, LValSize, LNumColors;
68 int URowSize, UValSize, UNumColors;
69 std::vector<double> blockDiag;
70 ILUReorder opencl_ilu_reorder;
71 bool level_scheduling =
false, graph_coloring =
false;
72 int numResultPointers = 21;
73 std::vector<void *> resultPointers;
74 int numResultSizes = 18;
75 std::vector<int> resultSizes;
76 int maxRowsPerColor, maxColsPerColor, maxNNZsPerRow, maxNumColors;
80 FPGABILU0(ILUReorder opencl_ilu_reorder,
int verbosity,
int maxRowsPerColor,
int maxColsPerColor,
int maxNNZsPerRow,
int maxNumColors);
92 return toOrder.data();
97 return fromOrder.data();
105 void **getResultPointers()
107 return resultPointers.data();
110 int *getResultSizes()
112 return resultSizes.data();
This struct resembles a blocked csr matrix, like Dune::BCRSMatrix.
Definition: BlockedMatrix.hpp:37
Definition: FPGABILU0.hpp:41
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27