Commit 07b957ab authored by Marcus Mohr's avatar Marcus Mohr
Browse files

Further adaptations to get rid of PetscInt at most places

parent c4dce15e
Pipeline #34509 failed with stages
in 24 minutes and 30 seconds
......@@ -92,21 +92,21 @@ class PETScSparseMatrix
petscCommunicator )
{}
PETScSparseMatrix( const FunctionTypeSrc< PetscInt >& enumerator,
const uint_t& level,
const char name[] = "Mat",
const MPI_Comm& petscCommunicator = walberla::mpi::MPIManager::instance()->comm() )
PETScSparseMatrix( const FunctionTypeSrc< idx_t >& enumerator,
const uint_t& level,
const char name[] = "Mat",
const MPI_Comm& petscCommunicator = walberla::mpi::MPIManager::instance()->comm() )
: PETScSparseMatrix( numberOfLocalDoFs( enumerator, level ),
numberOfGlobalDoFs( enumerator, level, petscCommunicator ),
name,
petscCommunicator )
{}
PETScSparseMatrix( const FunctionTypeSrc< PetscInt >& enumeratorSrc,
const FunctionTypeDst< PetscInt >& enumeratorDst,
const uint_t& level,
const char name[] = "Mat",
const MPI_Comm& petscCommunicator = walberla::mpi::MPIManager::instance()->comm() )
PETScSparseMatrix( const FunctionTypeSrc< idx_t >& enumeratorSrc,
const FunctionTypeDst< idx_t >& enumeratorDst,
const uint_t& level,
const char name[] = "Mat",
const MPI_Comm& petscCommunicator = walberla::mpi::MPIManager::instance()->comm() )
: PETScSparseMatrix( numberOfLocalDoFs( enumeratorDst, level ),
numberOfGlobalDoFs( enumeratorDst, level, petscCommunicator ),
numberOfGlobalDoFs( enumeratorSrc, level, petscCommunicator ),
......@@ -217,10 +217,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< idx_t >& numerator,
void applyDirichletBCSymmetrically( const FunctionTypeSrc< real_t >& dirichletSolution,
const FunctionTypeSrc< idx_t >& numerator,
PETScVector< real_t, OperatorType::dstType::template FunctionType >& rhsVec,
const uint_t& level )
const uint_t& level )
{
std::vector< idx_t > bcIndices;
hyteg::petsc::applyDirichletBC( numerator, bcIndices, level );
......
......@@ -125,7 +125,7 @@ void testAssembly( BlockOperator< fKind< real_t >, fKind< real_t > >& oper,
}
typedef BlockOperator< fKind< real_t >, fKind< real_t > > operType;
fKind< PetscInt > enumerator( "enumerator", storage, level, level );
fKind< idx_t > enumerator( "enumerator", storage, level, level );
enumerator.enumerate( level );
PETScManager petscManager;
......
......@@ -50,10 +50,8 @@ template < class P1Form >
using P1ConstOp = P1ConstantOperator< P1Form, false, false, false >;
template < typename rowSumFormType,
template < class >
class funcType,
template < class >
class opType,
template < class > class funcType,
template < class > class opType,
typename opTypeLap,
typename opTypeMass >
bool RowSumTest( const uint_t& level, const std::string& meshFile, rowSumFormType rowSumLaplace, rowSumFormType rowSumMass )
......@@ -95,11 +93,11 @@ bool RowSumTest( const uint_t& level, const std::string& meshFile, rowSumFormTyp
// compare
real_t maxError;
error.assign( { 1.0, -1.0 }, { dstVerificationLaplace, dstRowSumLaplace }, level, All );
error.assign( {1.0, -1.0}, {dstVerificationLaplace, dstRowSumLaplace}, level, All );
maxError = error.getMaxMagnitude( level );
WALBERLA_LOG_INFO_ON_ROOT( " -> error max magnitude Laplace: " << maxError << ", eps: " << eps );
error.assign( { 1.0, -1.0 }, { dstVerificationMass, dstRowSumMass }, level, All );
error.assign( {1.0, -1.0}, {dstVerificationMass, dstRowSumMass}, level, All );
maxError = error.getMaxMagnitude( level );
WALBERLA_LOG_INFO_ON_ROOT( " -> error max magnitude mass: " << maxError << ", eps: " << eps );
......@@ -108,11 +106,11 @@ bool RowSumTest( const uint_t& level, const std::string& meshFile, rowSumFormTyp
#ifdef HYTEG_BUILD_WITH_PETSC
// check if matrices diagonal
PETScManager manager;
typedef typename FunctionTrait< funcType< PetscInt > >::Tag enumTag;
const auto localSize = numberOfLocalDoFs< enumTag >( *storage, level );
const auto globalSize = numberOfGlobalDoFs< enumTag >( *storage, level );
funcType< PetscInt > numerator( "numerator", storage, level, level );
PETScManager manager;
typedef typename FunctionTrait< funcType< idx_t > >::Tag enumTag;
const auto localSize = numberOfLocalDoFs< enumTag >( *storage, level );
const auto globalSize = numberOfGlobalDoFs< enumTag >( *storage, level );
funcType< idx_t > numerator( "numerator", storage, level, level );
numerator.enumerate( level );
......
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