NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
The PETSc Interface

At present, NOX supports a concrete implementation of the NOX::Abstract::Group and NOX::Abstract::Vector using PETSc data structures in the namespace NOX::Petsc. The current implementation has been tested against PETSc 3.0.0-p5.

Building the Library

To compile the NOX/PETSc library libnoxpetsc.a, use the following configuration sequence:

setenv PETSC_DIR ${HOME}/petsc-3.0.0-p5
setenv PETSC_ARCH linux
configure --enable-nox-petsc

This will build libnoxpetsc.a using a pre-built PETSc version 2.1.6 installed in the user's home directory on a linux machine:

If the environment variables PETSC_DIR and PETSC_ARCH have already been defined, simply use:

configure --enable-nox-petsc

A third option is to specify PETSC_DIR and PETSC_ARCH as arguments to the configure script, eg

configure --enable-nox-petsc PETSC_DIR=${HOME}/petsc-3.0.0-p5 PETSC_ARCH=linux

Building the Examples

To compile the examples for NOX/PETSc, an additional environment variable, PETSC_BOPT, must be defined and set to the value of BOPT used to build the user's PETSc installation. For example, for PETSc previously built debug-enabled for C++ using BOPT=g_c++, simply set PETSC_BOPT=g_c++. The configure script then allows the examples to be built using the following:

configure --enable-nox-petsc --enable-nox-petsc-examples.

Additional Information

Depending on the user's PETSc build, dynamically linked libraries may be used. If an error occurs when trying to run the example executable, make sure the environment variable LD_LIBRARY_PATH points to the PETSc library directory. From the example above, setting the path would likely require: