Commit fbff74ae authored by Nils Kohl's avatar Nils Kohl 🌝
Browse files

Removing some old template arguments from PetscSparseMatrix instantiations.

parent 527af378
Pipeline #34480 failed with stages
in 8 minutes and 29 seconds
......@@ -128,8 +128,8 @@ class PETScCGSolver : public Solver< OperatorType >
uint_t allocatedLevel_;
MPI_Comm petscCommunicator_;
typename OperatorType::srcType::template FunctionType< PetscInt > num;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > Amat;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > AmatNonEliminatedBC;
PETScSparseMatrix< OperatorType > Amat;
PETScSparseMatrix< OperatorType > AmatNonEliminatedBC;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > xVec;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > bVec;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > nullspaceVec_;
......
......@@ -269,11 +269,11 @@ class PETScLUSolver : public Solver< OperatorType >
uint_t allocatedLevel_;
MPI_Comm petscCommunicator_;
typename OperatorType::srcType::template FunctionType< PetscInt > num;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > Amat;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > AmatUnsymmetric;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > AmatTmp;
PETScSparseMatrix< OperatorType > Amat;
PETScSparseMatrix< OperatorType > AmatUnsymmetric;
PETScSparseMatrix< OperatorType > AmatTmp;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > xVec;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > bVec;
PETScVector< typename FunctionType::valueType, OperatorType::dstType::template FunctionType > bVec;
#if 0
PETScVector<typename FunctionType::valueType, OperatorType::srcType::template FunctionType> inKernel;
#endif
......
......@@ -40,7 +40,7 @@ class PETScMinResSolver : public Solver< OperatorType >
const uint_t& level,
const real_t relativeTolerance = 1e-30,
const real_t absoluteTolerance = 1e-12,
const PetscInt maxIterations = std::numeric_limits< PetscInt >::max() )
const PetscInt maxIterations = std::numeric_limits< PetscInt >::max() )
: allocatedLevel_( level )
, petscCommunicator_( storage->getSplitCommunicatorByPrimitiveDistribution() )
, num( "numerator", storage, level, level )
......@@ -128,8 +128,8 @@ class PETScMinResSolver : public Solver< OperatorType >
uint_t allocatedLevel_;
MPI_Comm petscCommunicator_;
typename OperatorType::srcType::template FunctionType< PetscInt > num;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > Amat;
PETScSparseMatrix< OperatorType, OperatorType::srcType::template FunctionType > AmatNonEliminatedBC;
PETScSparseMatrix< OperatorType > Amat;
PETScSparseMatrix< OperatorType > AmatNonEliminatedBC;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > xVec;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > bVec;
PETScVector< typename FunctionType::valueType, OperatorType::srcType::template FunctionType > nullspaceVec_;
......@@ -138,8 +138,8 @@ class PETScMinResSolver : public Solver< OperatorType >
PC pc;
MatNullSpace nullspace_;
hyteg::DoFType flag_;
bool nullSpaceSet_;
bool reassembleMatrix_;
bool nullSpaceSet_;
bool reassembleMatrix_;
};
} // namespace hyteg
......
......@@ -197,10 +197,10 @@ class PETScSparseMatrix
/// \param rhsVec RHS of the system as PETSc vector - NOTE THAT THIS IS MODIFIED IN PLACE
/// \param level the refinement level
///
void applyDirichletBCSymmetrically( const FunctionTypeSrc< real_t >& dirichletSolution,
const FunctionTypeSrc< PetscInt >& numerator,
PETScVector< real_t, FunctionTypeSrc >& rhsVec,
const uint_t& level )
void applyDirichletBCSymmetrically( const FunctionTypeSrc< real_t >& dirichletSolution,
const FunctionTypeSrc< PetscInt >& numerator,
PETScVector< real_t, OperatorType::dstType::template FunctionType >& rhsVec,
const uint_t& level )
{
std::vector< PetscInt > bcIndices;
hyteg::petsc::applyDirichletBC( numerator, bcIndices, level );
......
......@@ -76,10 +76,10 @@ void compareMatrices( std::shared_ptr< PrimitiveStorage > storage,
OpTypeConst constantOp( storage, level, level );
// assemble matrices
PETScSparseMatrix< OpTypeElem, FuncType > elemWisePETScMat( localDoFs, globalDoFs );
PETScSparseMatrix< OpTypeElem > elemWisePETScMat( localDoFs, globalDoFs );
elemWisePETScMat.createMatrixFromOperator( elemWiseOp, level, enumerator, All );
PETScSparseMatrix< OpTypeConst, FuncType > constantPETScMat( localDoFs, globalDoFs );
PETScSparseMatrix< OpTypeConst > constantPETScMat( localDoFs, globalDoFs );
constantPETScMat.createMatrixFromOperator( constantOp, level, enumerator, All );
// determine difference between matrices and their norms
......@@ -162,19 +162,19 @@ int main( int argc, char* argv[] )
// Run some 2D tests
// -------------------
compareMatrices< P1ConstantLaplaceOperator, P1ElementwiseLaplaceOperator, P1Function >(
storage, "P1Laplace", level, {1e-12, 1e-13, 1e-13}, beVerbose );
storage, "P1Laplace", level, { 1e-12, 1e-13, 1e-13 }, beVerbose );
compareMatrices< P1ConstantMassOperator, P1ElementwiseMassOperator, P1Function >(
storage, "P1Mass", level, {1e-16, 1e-17, 1e-17}, beVerbose );
storage, "P1Mass", level, { 1e-16, 1e-17, 1e-17 }, beVerbose );
level = 3;
compareMatrices< P2ConstantLaplaceOperator, P2ElementwiseLaplaceOperator, P2Function >(
storage, "P2Laplace", level, {1.5e-12, 1.5e-13, 1.5e-13}, beVerbose );
storage, "P2Laplace", level, { 1.5e-12, 1.5e-13, 1.5e-13 }, beVerbose );
compareMatrices< P2ConstantMassOperator, P2ElementwiseMassOperator, P2Function >(
storage, "P2Mass", level, {1e-16, 1e-17, 1e-17}, beVerbose );
storage, "P2Mass", level, { 1e-16, 1e-17, 1e-17 }, beVerbose );
compareMatrices< P2ConstantLaplaceOperator, P2ElementwiseDivKGradOperator, P2Function >(
storage, "P2DivKGrad", level, {1.5e-12, 1e-13, 1.5e-13}, beVerbose );
storage, "P2DivKGrad", level, { 1.5e-12, 1e-13, 1.5e-13 }, beVerbose );
compareMatrices< P2P1TaylorHoodStokesOperator, P2P1ElementwiseConstantCoefficientStokesOperator, P2P1TaylorHoodFunction >(
storage, "P2P1StokesCC", level, {2.0e-12, 1.5e-13, 1.5e-13}, beVerbose );
storage, "P2P1StokesCC", level, { 2.0e-12, 1.5e-13, 1.5e-13 }, beVerbose );
// ----------------------------
// Prepare setup for 3D tests
......@@ -190,16 +190,16 @@ int main( int argc, char* argv[] )
// -------------------
level = 3;
compareMatrices< P1ConstantLaplaceOperator, P1ElementwiseLaplaceOperator, P1Function >(
storage3D, "P1Laplace - 3D", level, {1e-12, 1e-13, 1e-13}, beVerbose );
storage3D, "P1Laplace - 3D", level, { 1e-12, 1e-13, 1e-13 }, beVerbose );
compareMatrices< P1ConstantMassOperator, P1ElementwiseMassOperator, P1Function >(
storage3D, "P1Mass - 3D", level, {1e-16, 1e-17, 1e-17}, beVerbose );
storage3D, "P1Mass - 3D", level, { 1e-16, 1e-17, 1e-17 }, beVerbose );
compareMatrices< P2ConstantLaplaceOperator, P2ElementwiseLaplaceOperator, P2Function >(
storage3D, "P2Laplace - 3D", level, {1e-13, 1e-13, 1e-13}, beVerbose );
storage3D, "P2Laplace - 3D", level, { 1e-13, 1e-13, 1e-13 }, beVerbose );
compareMatrices< P2ConstantMassOperator, P2ElementwiseMassOperator, P2Function >(
storage3D, "P2Mass - 3D", level, {1e-17, 1e-18, 1e-18}, beVerbose );
storage3D, "P2Mass - 3D", level, { 1e-17, 1e-18, 1e-18 }, beVerbose );
compareMatrices< P2P1TaylorHoodStokesOperator, P2P1ElementwiseConstantCoefficientStokesOperator, P2P1TaylorHoodFunction >(
storage3D, "P2P1StokesCC", level, {1.5e-12, 1.5e-13, 1.5e-13}, beVerbose );
storage3D, "P2P1StokesCC", level, { 1.5e-12, 1.5e-13, 1.5e-13 }, beVerbose );
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment