Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
######################################################################
## CMakeLists.txt --- gsModule
## CMakeLists.txt --- gsPetsc
## This file is part of the G+Smo library.
##
## Author: H. Honnerova
Expand All @@ -25,7 +25,7 @@ if(NOT GISMO_WITH_MPI)
message(WARNING "Please enable MPI by setting -D GISMO_WITH_MPI=ON in order to use PETSc")
endif(NOT GISMO_WITH_MPI)

execute_process( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/FindPETSc.cmake ${CMAKE_SOURCE_DIR}/cmake/)
execute_process( COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindPETSc.cmake ${CMAKE_SOURCE_DIR}/cmake/)
find_package(PETSc REQUIRED)

# Add object library
Expand Down Expand Up @@ -53,13 +53,13 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}"
# Include directory
set (GISMO_INCLUDE_DIRS ${GISMO_INCLUDE_DIRS} ${PETSC_INCLUDES}
CACHE INTERNAL "Gismo include directories" FORCE)

include_directories(${GISMO_INCLUDE_DIRS})

# Linker
set(gismo_LINKER ${gismo_LINKER} ${PETSC_LIBRARY}
CACHE INTERNAL "${PROJECT_NAME} extra linker objects" FORCE)

# add example files
aux_cpp_directory(${CMAKE_CURRENT_SOURCE_DIR}/examples FILES)
foreach(file ${FILES})
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/helloPETSc.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @file helloSubmodule.cpp
/** @file helloPETSc.cpp

@brief First example of submodule

Expand Down
6 changes: 3 additions & 3 deletions src/PETScSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void petsc_getNonzeroCounts(const gsSparseMatrix<T, RowMajor>& mat, const std::p
nnzRowsOffdiag.resize(nRowBlocks * nLocRows, 0);

index_t nRowsPerBlock = mat.rows() / nRowBlocks; // number of rows of one matrix block
index_t nColsPerBlock = mat.cols() / nRowBlocks; // number of columns of one matrix block
index_t nColsPerBlock = mat.cols() / nColBlocks; // number of columns of one matrix block

for (index_t rb = 0; rb < nRowBlocks; rb++)
{
Expand All @@ -249,15 +249,15 @@ void petsc_getNonzeroCounts(const gsSparseMatrix<T, RowMajor>& mat, const std::p
}

/// Copy an already distributed gsSparseMatrix (only local rows of \a gismoMat have nonzeros) to distributed PETSc matrix
/// Also, \a gismoMat is assumed to be of full size
/// Also, \a gismoMat is assumed to be of full size
template<class T>
int petsc_copySparseMat(const gsSparseMatrix<T, RowMajor>& gismoMat, Mat& petscMat, const std::pair<index_t, index_t>& rLocInfo,
const std::pair<index_t, index_t>& cLocInfo, MPI_Comm comm, index_t nRowBlocks = 1, index_t nColBlocks = 1)
{
int M = 0; // global number of rows
int N = 0; // global number of columns
PetscCall( MatGetSize(petscMat, &M, &N) );
GISMO_ASSERT(M*N > 0, "petsc_copySparseMat: PETSc matrix with zero rows and/or columns, the global and local sizes of the matrix must be set before (e.g. in function petsc_setupMatrix).");
GISMO_ASSERT(M > 0 && N > 0, "petsc_copySparseMat: PETSc matrix with zero rows and/or columns, the global and local sizes of the matrix must be set before (e.g. in function petsc_setupMatrix).");
GISMO_ASSERT(M == gismoMat.rows() && N == gismoMat.cols(), "petsc_copySparseMat: Incompatible petscMat and gismoMat sizes.");

int nProc = -1;
Expand Down
40 changes: 0 additions & 40 deletions src/gsClass.h

This file was deleted.

Empty file removed src/gsClass.hpp
Empty file.
Empty file removed src/gsClass_.cpp
Empty file.
38 changes: 0 additions & 38 deletions src/gsHeader2.h

This file was deleted.