CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Including PETSc in an OF solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 25, 2017, 09:59
Default Including PETSc in an OF solver
  #1
New Member
 
Basel Abu-sinni
Join Date: Mar 2017
Posts: 6
Rep Power: 2
BaselAS is on a distinguished road
Hello friends,

I'd like to include PETSc's headers in my solver but I can't figure out how to make it compile.

A PETSc program's makefile is as follows:
Code:
include ${PETSC_DIR}/lib/petsc/conf/variables
include ${PETSC_DIR}/lib/petsc/conf/rules

all: src/LinearSystemSolver.o chkopts 
	-${CLINKER} -o LinearSystemSolver src/LinearSystemSolver.o  ${PETSC_KSP_LIB} 
	${RM} LinearSystemSolver.o
And OF's solver's makefile is, as you may already know, split into two files('options' and 'files') under a directory called 'Make':
'options':
Code:
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude
    
EXE_LIBS = 	-lfiniteVolume \
			-lmeshTools
'files':
Code:
myLaplacianFoam.C

EXE = App/myLaplacianFoam
How am I supposed to edit 'options' and 'files' to make it work?

I appreciate your time and thanks in advance!
Basel
BaselAS is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radiation Modeling Using Discrete Ordinates Method and Parallel Solver malicemethods FLUENT 2 April 21, 2015 06:09
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Parallel solver for Poisson equation using PETSc JackNapier Main CFD Forum 0 July 5, 2012 16:53
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


All times are GMT -4. The time now is 22:22.