20#ifndef WELLCONTRIBUTIONS_HEADER_INCLUDED
21#define WELLCONTRIBUTIONS_HEADER_INCLUDED
26#if HAVE_SUITESPARSE_UMFPACK
29#include <dune/common/version.hh>
55 static std::unique_ptr<WellContributions> create(
const std::string& accelerator_mode,
bool useWellConn);
57 using UMFPackIndex = SuiteSparse_long;
66 bool allocated =
false;
70 unsigned int dim_wells;
71 unsigned int num_blocks = 0;
72 unsigned int num_std_wells = 0;
73 unsigned int num_ms_wells = 0;
74 unsigned int num_blocks_so_far = 0;
75 unsigned int num_std_wells_so_far = 0;
76 std::vector<unsigned int> val_pointers;
78 std::vector<std::unique_ptr<MultisegmentWellContribution<Scalar>>> multisegments;
81 unsigned int getNumWells(){
82 return num_std_wells + num_ms_wells;
98 void setBlockSize(
unsigned int dim,
unsigned int dim_wells);
125 unsigned int dim_wells,
127 std::vector<Scalar>& Bvalues,
128 std::vector<unsigned int>& BcolIndices,
129 std::vector<unsigned int>& BrowPointers,
130 unsigned int DnumBlocks,
132 UMFPackIndex* DcolPointers,
133 UMFPackIndex* DrowIndices,
134 std::vector<Scalar>& Cvalues);
This class serves to duplicate the functionality of the MultisegmentWell A MultisegmentWell uses C,...
Definition WellContributions.hpp:33
This class serves to eliminate the need to include the WellContributions into the matrix (with –matri...
Definition StandardWellEval.hpp:41
void addMatrix(MatrixType type, int *colIndices, Scalar *values, unsigned int val_size)
Store a matrix in this object, in blocked csr format, can only be called after alloc() is called.
Definition WellContributions.cpp:92
void addMultisegmentWellContribution(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)
Add a MultisegmentWellContribution, actually creates an object on heap that is destroyed in the destr...
Definition WellContributions.cpp:157
void alloc()
Allocate memory for the StandardWells.
Definition WellContributions.cpp:145
void setBlockSize(unsigned int dim, unsigned int dim_wells)
Indicate how large the blocks of the StandardWell (C and B) are.
Definition WellContributions.cpp:114
void addNumBlocks(unsigned int numBlocks)
Indicate how large the next StandardWell is, this function cannot be called after alloc() is called.
Definition WellContributions.cpp:135
void setVectorSize(unsigned N)
Set size of vector that the wells are applied to.
Definition WellContributions.cpp:129
virtual ~WellContributions()
Empty destructor.
virtual void APIaddMatrix(MatrixType, int *, Scalar *, unsigned int)
Api specific upload of matrix.
Definition WellContributions.hpp:140
MatrixType
StandardWell has C, D and B matrices that need to be copied.
Definition WellContributions.hpp:59
virtual void APIalloc()
API specific allocation.
Definition WellContributions.hpp:137
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37