mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Removed more dead and code that was already commented out.
This commit is contained in:
parent
fd78f1c0b9
commit
0da66bf45b
@ -264,8 +264,7 @@ createEllipticPreconditionerPointer(const M& Ae, double relax,
|
|||||||
//Dune::SeqILU0<M,X,X>* ilu=new Dune::SeqILU0<M,X,X>(Ae, relax);
|
//Dune::SeqILU0<M,X,X>* ilu=new Dune::SeqILU0<M,X,X>(Ae, relax);
|
||||||
typedef typename CPRSelector<M,X,X,Dune::OwnerOverlapCopyCommunication<I1,I2> >
|
typedef typename CPRSelector<M,X,X,Dune::OwnerOverlapCopyCommunication<I1,I2> >
|
||||||
::EllipticPreconditionerPointer EllipticPreconditionerPointer;
|
::EllipticPreconditionerPointer EllipticPreconditionerPointer;
|
||||||
return EllipticPreconditionerPointer(new ParallelPreconditioner(Ae, comm, relax));//,
|
return EllipticPreconditionerPointer(new ParallelPreconditioner(Ae, comm, relax));
|
||||||
// createParallelDeleter(*ilu, comm));
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
@ -143,50 +143,15 @@ namespace Opm
|
|||||||
|
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
typedef Dune::OwnerOverlapCopyCommunication<int, int> Comm;
|
typedef Dune::OwnerOverlapCopyCommunication<int, int> Comm;
|
||||||
//typedef Dune::BlockPreconditioner<Vector, Vector, Comm, SeqPreconditioner> ParPreconditioner;
|
|
||||||
typedef ParallelOverlappingILU0<Mat,Vector,Vector,Comm> ParPreconditioner;
|
typedef ParallelOverlappingILU0<Mat,Vector,Vector,Comm> ParPreconditioner;
|
||||||
template <class Operator>
|
template <class Operator>
|
||||||
std::unique_ptr<ParPreconditioner /*,
|
std::unique_ptr<ParPreconditioner>
|
||||||
AdditionalObjectDeleter<SeqPreconditioner> */
|
|
||||||
>
|
|
||||||
constructPrecond(Operator& opA, const Comm& comm) const
|
constructPrecond(Operator& opA, const Comm& comm) const
|
||||||
{
|
{
|
||||||
typedef AdditionalObjectDeleter<SeqPreconditioner> Deleter;
|
|
||||||
//typedef std::unique_ptr<ParPreconditioner, Deleter> Pointer;
|
|
||||||
typedef std::unique_ptr<ParPreconditioner> Pointer;
|
typedef std::unique_ptr<ParPreconditioner> Pointer;
|
||||||
const double relax = 1.0;
|
const double relax = 1.0;
|
||||||
return Pointer(new ParPreconditioner(opA.getmat(), comm, relax));
|
return Pointer(new ParPreconditioner(opA.getmat(), comm, relax));
|
||||||
/*
|
|
||||||
|
|
||||||
int ilu_setup_successful = 1;
|
|
||||||
std::string message;
|
|
||||||
const double relax = 1.0;
|
|
||||||
SeqPreconditioner* seq_precond = nullptr;
|
|
||||||
try {
|
|
||||||
seq_precond = new SeqPreconditioner(opA.getmat(), relax);
|
|
||||||
}
|
|
||||||
catch ( Dune::MatrixBlockError error )
|
|
||||||
{
|
|
||||||
message = error.what();
|
|
||||||
std::cerr<<"Exception occured on process " <<
|
|
||||||
comm.communicator().rank() << " during " <<
|
|
||||||
"setup of ILU0 preconditioner with message: " <<
|
|
||||||
message<<std::endl;
|
|
||||||
ilu_setup_successful = 0;
|
|
||||||
}
|
|
||||||
// Check whether there was a problem on some process
|
|
||||||
if ( comm.communicator().min(ilu_setup_successful) == 0 )
|
|
||||||
{
|
|
||||||
if ( seq_precond ) // not null if constructor succeeded
|
|
||||||
{
|
|
||||||
// prevent memory leak
|
|
||||||
delete seq_precond;
|
|
||||||
throw Dune::MatrixBlockError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Pointer(new ParPreconditioner(*seq_precond, comm),
|
|
||||||
Deleter(*seq_precond));
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user