20#ifndef WELLCONTRIBUTIONS_HEADER_INCLUDED
21#define WELLCONTRIBUTIONS_HEADER_INCLUDED
27#include <dune/common/version.hh>
31template<
class Scalar>
class MultisegmentWellContribution;
53 static std::unique_ptr<WellContributions> create(
const std::string& accelerator_mode,
bool useWellConn);
64 bool allocated =
false;
68 unsigned int dim_wells;
69 unsigned int num_blocks = 0;
70 unsigned int num_std_wells = 0;
71 unsigned int num_ms_wells = 0;
72 unsigned int num_blocks_so_far = 0;
73 unsigned int num_std_wells_so_far = 0;
74 std::vector<unsigned int> val_pointers;
76 std::vector<std::unique_ptr<MultisegmentWellContribution<Scalar>>> multisegments;
79 unsigned int getNumWells(){
80 return num_std_wells + num_ms_wells;
96 void setBlockSize(
unsigned int dim,
unsigned int dim_wells);
123 unsigned int dim_wells,
128 unsigned int DnumBlocks,
This class serves to eliminate the need to include the WellContributions into the matrix (with –matri...
Definition WellContributions.hpp:51
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:138
MatrixType
StandardWell has C, D and B matrices that need to be copied.
Definition WellContributions.hpp:57
virtual void APIalloc()
API specific allocation.
Definition WellContributions.hpp:135
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242