Category : petsc

I am trying to compile a code from github (https://github.com/whguan/kifmm3d). The makefile is as: # —————————-machine dependent file #MODE = optim MODE = debug ifeq ($(MODE),debug) BOPT = g_c++ else BOPT = O_c++ endif include ${PETSC_DIR}/bmake/common/variables # shell SHELL = /bin/tcsh INCLUDES = ${PETSC_INCLUDE} -I.. LIBS = -Wl,-rpath,${PETSC_DIR}/lib/lib${BOPT}/${PETSC_ARCH} ${PETSC_LIB} -lfftw3 -llapack -lblas -L/usr/local/mpich-1.2.7/lib -lmpich -lstdc++ ..

Read more

I want to use PETSc in a cpp code. I installed PETScand when run the cmd echo $PETSC_DIRI got the path to the library. I make a hello world code and #include "petsc.h" #include <iostream> int main() { std::cout << "Hello Wold" << std:endl; } and the CMakeLists.txtis as follows: cmake_minimum_required(VERSION 3.20.3) project(ddm_library) include_directories(include) file(GLOB ..

Read more

I have a PETSc-matrix, and would like to apply a 1d-FFT on each row of that matrix, preferably while keeping the possibility having the matrix distributed over several nodes. Based on the documentation and examples (such as here: https://www.mcs.anl.gov/petsc/petsc-current/src/mat/tests/ex143.c.html) I have to create an FFT-object ("FFT-matrix") and use this object then to create/initialize the vectors ..

Read more