mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Removed unnecessary line continuation chars. Merged unsupported cases in switch
This commit is contained in:
parent
009b5076a4
commit
d29b6a6e5e
@ -205,52 +205,52 @@ void BdaBridge::get_result(BridgeVector &x OPM_UNUSED) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template void BdaBridge::solve_system< \
|
template void BdaBridge::solve_system<
|
||||||
Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>, std::allocator<Opm::MatrixBlock<double, 1, 1> > > , \
|
Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>, std::allocator<Opm::MatrixBlock<double, 1, 1> > > ,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > >
|
||||||
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>, std::allocator<Opm::MatrixBlock<double, 1, 1> > > *mat, \
|
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 1, 1>, std::allocator<Opm::MatrixBlock<double, 1, 1> > > *mat,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > &b, \
|
Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > &b,
|
||||||
WellContributions& wellContribs, \
|
WellContributions& wellContribs,
|
||||||
InverseOperatorResult &res);
|
InverseOperatorResult &res);
|
||||||
|
|
||||||
template void BdaBridge::solve_system< \
|
template void BdaBridge::solve_system<
|
||||||
Dune::BCRSMatrix<Opm::MatrixBlock<double, 2, 2>, std::allocator<Opm::MatrixBlock<double, 2, 2> > > , \
|
Dune::BCRSMatrix<Opm::MatrixBlock<double, 2, 2>, std::allocator<Opm::MatrixBlock<double, 2, 2> > > ,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > >
|
||||||
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 2, 2>, std::allocator<Opm::MatrixBlock<double, 2, 2> > > *mat, \
|
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 2, 2>, std::allocator<Opm::MatrixBlock<double, 2, 2> > > *mat,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > &b, \
|
Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > &b,
|
||||||
WellContributions& wellContribs, \
|
WellContributions& wellContribs,
|
||||||
InverseOperatorResult &res);
|
InverseOperatorResult &res);
|
||||||
|
|
||||||
template void BdaBridge::solve_system< \
|
template void BdaBridge::solve_system<
|
||||||
Dune::BCRSMatrix<Opm::MatrixBlock<double, 3, 3>, std::allocator<Opm::MatrixBlock<double, 3, 3> > > , \
|
Dune::BCRSMatrix<Opm::MatrixBlock<double, 3, 3>, std::allocator<Opm::MatrixBlock<double, 3, 3> > > ,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > >
|
||||||
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 3, 3>, std::allocator<Opm::MatrixBlock<double, 3, 3> > > *mat, \
|
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 3, 3>, std::allocator<Opm::MatrixBlock<double, 3, 3> > > *mat,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > &b, \
|
Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > &b,
|
||||||
WellContributions& wellContribs, \
|
WellContributions& wellContribs,
|
||||||
InverseOperatorResult &res);
|
InverseOperatorResult &res);
|
||||||
|
|
||||||
template void BdaBridge::solve_system< \
|
template void BdaBridge::solve_system<
|
||||||
Dune::BCRSMatrix<Opm::MatrixBlock<double, 4, 4>, std::allocator<Opm::MatrixBlock<double, 4, 4> > > , \
|
Dune::BCRSMatrix<Opm::MatrixBlock<double, 4, 4>, std::allocator<Opm::MatrixBlock<double, 4, 4> > > ,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > >
|
||||||
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 4, 4>, std::allocator<Opm::MatrixBlock<double, 4, 4> > > *mat, \
|
(Dune::BCRSMatrix<Opm::MatrixBlock<double, 4, 4>, std::allocator<Opm::MatrixBlock<double, 4, 4> > > *mat,
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > &b, \
|
Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > &b,
|
||||||
WellContributions& wellContribs, \
|
WellContributions& wellContribs,
|
||||||
InverseOperatorResult &res);
|
InverseOperatorResult &res);
|
||||||
|
|
||||||
template void BdaBridge::get_result< \
|
template void BdaBridge::get_result<
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > >
|
||||||
(Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > &x);
|
(Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > &x);
|
||||||
|
|
||||||
template void BdaBridge::get_result< \
|
template void BdaBridge::get_result<
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > >
|
||||||
(Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > &x);
|
(Dune::BlockVector<Dune::FieldVector<double, 2>, std::allocator<Dune::FieldVector<double, 2> > > &x);
|
||||||
|
|
||||||
template void BdaBridge::get_result< \
|
template void BdaBridge::get_result<
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > >
|
||||||
(Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > &x);
|
(Dune::BlockVector<Dune::FieldVector<double, 3>, std::allocator<Dune::FieldVector<double, 3> > > &x);
|
||||||
|
|
||||||
template void BdaBridge::get_result< \
|
template void BdaBridge::get_result<
|
||||||
Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > > \
|
Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > >
|
||||||
(Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > &x);
|
(Dune::BlockVector<Dune::FieldVector<double, 4>, std::allocator<Dune::FieldVector<double, 4> > > &x);
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,17 +34,17 @@ namespace Opm
|
|||||||
|
|
||||||
// apply WellContributions using y -= C^T * (D^-1 * (B * x))
|
// apply WellContributions using y -= C^T * (D^-1 * (B * x))
|
||||||
#if HAVE_CUDA
|
#if HAVE_CUDA
|
||||||
__global__ void apply_well_contributions( \
|
__global__ void apply_well_contributions(
|
||||||
const double * __restrict__ Cnnzs, \
|
const double * __restrict__ Cnnzs,
|
||||||
const double * __restrict__ Dnnzs, \
|
const double * __restrict__ Dnnzs,
|
||||||
const double * __restrict__ Bnnzs, \
|
const double * __restrict__ Bnnzs,
|
||||||
const int * __restrict__ Ccols, \
|
const int * __restrict__ Ccols,
|
||||||
const int * __restrict__ Bcols, \
|
const int * __restrict__ Bcols,
|
||||||
const double * __restrict__ x, \
|
const double * __restrict__ x,
|
||||||
double * __restrict__ y, \
|
double * __restrict__ y,
|
||||||
const int dim, \
|
const int dim,
|
||||||
const int dim_wells, \
|
const int dim_wells,
|
||||||
const unsigned int * __restrict__ val_pointers \
|
const unsigned int * __restrict__ val_pointers
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const int idx_b = blockIdx.x;
|
const int idx_b = blockIdx.x;
|
||||||
@ -182,14 +182,8 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
cudaMemcpy(d_val_pointers, val_pointers, sizeof(int) * (num_wells+1), cudaMemcpyHostToDevice);
|
cudaMemcpy(d_val_pointers, val_pointers, sizeof(int) * (num_wells+1), cudaMemcpyHostToDevice);
|
||||||
break;
|
break;
|
||||||
case 3:
|
|
||||||
// store (C*D*B)
|
|
||||||
printf("ERROR unsupported matrix ID for WellContributions::addMatrix()\n");
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
printf("ERROR unknown matrix ID for WellContributions::addMatrix()\n");
|
OPM_THROW(std::logic_error,"Error unsupported matrix ID for WellContributions::addMatrix()");
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
cudaCheckLastError("WellContributions::addMatrix() failed");
|
cudaCheckLastError("WellContributions::addMatrix() failed");
|
||||||
if(idx == 2){
|
if(idx == 2){
|
||||||
@ -209,8 +203,7 @@ namespace Opm
|
|||||||
void WellContributions::addSizes(unsigned int nnz, unsigned int numEq, unsigned int numWellEq)
|
void WellContributions::addSizes(unsigned int nnz, unsigned int numEq, unsigned int numWellEq)
|
||||||
{
|
{
|
||||||
if(allocated){
|
if(allocated){
|
||||||
std::cerr << "Error cannot add more sizes after allocated in WellContributions" << std::endl;
|
OPM_THROW(std::logic_error,"Error cannot add more sizes after allocated in WellContributions");
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
num_blocks += nnz;
|
num_blocks += nnz;
|
||||||
dim = numEq;
|
dim = numEq;
|
||||||
|
Loading…
Reference in New Issue
Block a user