This is a demonstration code for the paper Direct Serendipity Finite Elements on Cuboidal Hexahedra.
You should make the files to build an executable file directpoly.$(TARG), where TARG is a variable containing the instruction set architecture of your processor. Note that you need CBLAS, LAPACKE, and UMFPACK library to successfully build the file. Before running, you can change the input parameters in infile
.
make
./directpoly.$(TARG)
We choose vertex basis functions to be linear on each edge, edge basis functions to be chebyshev polynomials times a bubble function on each edge, face basis functions to be nodal basis functions, and cell basis functions to be monomials with regard to directSerendipityFE.cpp
and assembled in ellipticPDE.cpp
to serve as global basis functions.
You can choose the supplemental functions in infile
from smooth functions, piecewise polynomials on marching tetrahedra, and piecewise polynomials on diamond lattice cells.
Problem formulation is given in the heading comments of main.cpp
. Coefficients a, b, c, D, and all the other related data could be modified in fcns.cpp
. Note that the source function as well as Riemann boundary condition are defaultly calculated by true solution. If in your formulation, analytical solution is unknown, please rewrite these parts.
Basic results of running the codes are printed to the terminal. All the output files would be stored preambly in test/
directory, which could be modified in the first line of infile
.
The development of this code has been supported by the U.S. National Science Foundation.
Copyright (C) 2023 Todd Arbogast and Chuning Wang
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.