Related Information about Nektar++

Nektar++ is a tensor product based finite element package designed to allow one to construct efficient classical low polynomial order h-type solvers (where h is the size of the finite element) as well as higher p-order piecewise polynomial order solvers [1] [4].

Clean build for Nektar++

Download a copy of the original Nektar++ code

wget https://www.scorec.rpi.edu/~qlu/packages/nektar++-3.4.0.tar.gz

Unpack

Run the following:

tar xvf nektar++-3.4.0.tar.gz

You will see a nektar++-3.4.0 directory.

Create a separate build directory

cd nektar++-3.4.0
mkdir build
cd build

Generate CMake files

ccmake ../

hit c to configure, leave it as default, then hit g to generate and exit

Modules

Nektar++ comes with a few third-party packages, and will pre-build most of them if you use the default cmake configuration. If you receive a message saying that certain boost libraries are missing, then you can do one of two things: (1) hop on to piglet where the necessary boost components exist, or (2) toggle with THIRDPARTY_BUILD_BOOST switch to ON in the cmake configuration step. Nektar++ will download and build boost from scratch, which takes a really really long time...

Build

make -j4 install

This step may take some time, so be patient.

Run unit tests to verify build

ctest

If everything goes well during the build process, all tests should pass. If you chose to build boost from scratch, add the path to the boost libs to LD_LIBRARY_PATH. Otherwise, you may see all the tests fail.

Insert/Replace modified source code to integrate with curve meshadapt

Go to library/, then rename the following:

mv LocalRegions LocalRegions-org
mv SolverUtils SolverUtils-org
mv SpatialDomains SpatialDomains-org
mv StdRegions StdRegions-org

Then, for a quick hack, copy the sub-directories in Kai's development version:

cp -r /lore/qlu/nektar++_newdev/nektar++-3.4.0/library/LocalRegions/ .
cp -r /lore/qlu/nektar++_newdev/nektar++-3.4.0/library/SolverUtils/ .
cp -r /lore/qlu/nektar++_newdev/nektar++-3.4.0/library/SpatialDomains/ .
cp -r /lore/qlu/nektar++_newdev/nektar++-3.4.0/library/StdRegions/ .

First, go to the build/ directory and re-configure cmake.

cd build/
ccmake ../

Since the SCOREC tools depend on MPI, in cmake configuration toggle on NEKTAR_USE_MPI. Then re-run the build process. Some environment variables may need to be set.

make -j4 install

Note, with the changes, not all the built-in unit and regression tests of Nektar++ will pass.

Run the test case – 3D Kova Flow

Make a test directory under nektar++-3.4.0/

mkdir Tests
cd Tests

Copy the input files of the test case over:

cp /lore/qlu/nektar++_newdev/nektar++-3.4.0/solvers/IncNavierStokesSolver/Tests_Kai/3d_KovaFlow/3d_KovaFlow_m4_0init_exactbc_curved.xml .
cp /lore/qlu/nektar++_newdev/nektar++-3.4.0/solvers/IncNavierStokesSolver/Tests_Kai/3d_KovaFlow/3d-kova-flow-curved-domain_nat.xmt_txt .
cp /lore/qlu/nektar++_newdev/nektar++-3.4.0/solvers/IncNavierStokesSolver/Tests_Kai/3d_KovaFlow/3d-kova-flow-curved-domain-linear-mesh-pumi.sms .

Run the test with the newly-built executable:

../dist/bin/IncNavierStokesSolver 3d_KovaFlow_m4_0init_exactbc_curved.xml &> 3d-kova-flow-run.log

Visualization:

Little modification is needed to the PostProcessing code of Nektar++. Again, it might be the easieat thing to just copy from my dev directory:

cd <your>/<nektar>/<dir>/utilities/
mv PostProcessing PostProcessing-org
cp -r /lore/qlu/nektar++_newdev/nektar++-3.4.0/utilities/PostProcessing/ .

Then re-build the libraries and executables:

cd <your>/<nektar>/<dir>/build/
make -j4 install

You should be able to find an executable call FldToVtk in build/dist/bin/. Run it with the input .xml file and the .fld file obtained from the analysis should give you a .vtu file that can be read by ParaView.

<path>/<to>/FldToVtk <input>.xml <field>.fld