20#ifndef MULTISEGMENTWELLCONTRIBUTION_HEADER_INCLUDED
21#define MULTISEGMENTWELLCONTRIBUTION_HEADER_INCLUDED
26#include <cuda_runtime.h>
30#include <dune/common/version.hh>
48 unsigned int dim_wells;
58 unsigned int DnumBlocks;
59 std::vector<Scalar> Cvals;
60 std::vector<Scalar> Dvals;
61 std::vector<Scalar> Bvals;
62 std::vector<int> Dcols;
63 std::vector<unsigned int> Bcols;
64 std::vector<int> Drows;
65 std::vector<unsigned int> Brows;
66 std::vector<Scalar> z1;
67 std::vector<Scalar> z2;
68 void *UMFPACK_Symbolic, *UMFPACK_Numeric;
72 unsigned int getColIdx(
unsigned int idx);
75 using UMFPackIndex = SuiteSparse_long;
80 void setCudaStream(cudaStream_t stream);
99 std::vector<Scalar>& Bvalues,
100 std::vector<unsigned int>& BcolIndices,
101 std::vector<unsigned int>& BrowPointers,
102 unsigned int DnumBlocks,
104 UMFPackIndex* DcolPointers,
105 UMFPackIndex* DrowIndices,
106 std::vector<Scalar>& Cvalues);
115 void apply(Scalar* h_x, Scalar* h_y);
MultisegmentWellContribution(unsigned int dim, unsigned int dim_wells, unsigned int Mb, std::vector< Scalar > &Bvalues, std::vector< unsigned int > &BcolIndices, std::vector< unsigned int > &BrowPointers, unsigned int DnumBlocks, Scalar *Dvalues, UMFPackIndex *DcolPointers, UMFPackIndex *DrowIndices, std::vector< Scalar > &Cvalues)
Create a new MultisegmentWellContribution Matrices C and B are passed in Blocked CSR,...
Definition MultisegmentWellContribution.cpp:34
~MultisegmentWellContribution()
Destroy a MultisegmentWellContribution, and free memory.
Definition MultisegmentWellContribution.cpp:71
void apply(Scalar *h_x, Scalar *h_y)
Apply the MultisegmentWellContribution on CPU performs y -= (C^T * (D^-1 * (B*x))) for MultisegmentWe...
Definition MultisegmentWellContribution.cpp:83
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45