This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This utility lists all nodes on a given boundary ID. | |
#include "libmesh/libmesh.h" | |
#include "libmesh/serial_mesh.h" | |
#include "libmesh/parallel_mesh.h" | |
#include "libmesh/mesh_generation.h" | |
#include "libmesh/equation_systems.h" | |
#include "libmesh/explicit_system.h" | |
#include "libmesh/dof_map.h" | |
#include "libmesh/numeric_vector.h" | |
#include "libmesh/exodusII_io.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The libMesh Finite Element Library. */ | |
/* Copyright (C) 2003 Benjamin S. Kirk */ | |
/* This library is free software; you can redistribute it and/or */ | |
/* modify it under the terms of the GNU Lesser General Public */ | |
/* License as published by the Free Software Foundation; either */ | |
/* version 2.1 of the License, or (at your option) any later version. */ | |
/* This library is distributed in the hope that it will be useful, */ | |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compute second derivatives of Hex20 basis functions using Maple | |
hex20 := proc() | |
uses LinearAlgebra; | |
local N, i, phi, phi_x, phi_xx, phi_y, phi_yy, phi_z, phi_zz, phi_xy, phi_xz, phi_yz, indexes; | |
N:=20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shape functions, first, and second derivatives of PRISM15 basis functions using Maple | |
prism15 := proc() | |
uses LinearAlgebra; | |
local | |
x, phi, i, j, nodal_val, xi_degree, eta_degree, zeta_degree, phi_xi, | |
phi_eta, phi_zeta, indexes, phi_xixi, phi_etaeta, phi_zetazeta, | |
phi_xieta, phi_xizeta, phi_etazeta, phi_sum, sum_phi_xi, sum_phi_eta, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shape functions, first, and second derivatives of PYRAMID5 basis functions using Maple | |
pyramid5 := proc() | |
uses LinearAlgebra; | |
local | |
phi, i, t, phi_xi, phi_eta, phi_zeta, phi_xixi, phi_etaeta, phi_zetazeta, | |
phi_xieta, phi_xizeta, phi_etazeta, x, n, xi_vec, planes, phi_sum, | |
phi_xi_sum, phi_eta_sum, phi_zeta_sum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quadratic shape functions, as defined in R. Graglia, "Higher order | |
# bases on pyramidal elements", IEEE Trans Antennas and Propagation, | |
# vol 47, no 5, May 1999. | |
pyramid14 := proc() | |
uses LinearAlgebra; | |
local p, phi, x, phi_val, i, j, k, phi_sum, n, xi_vec, true_phi_sums, phi_sums, | |
phi_restrict, eqns, phi_xi, phi_eta, phi_zeta, phi_xixi, | |
phi_etaeta, phi_zetazeta, phi_xieta, phi_xizeta, phi_etazeta, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "Serendipity" pyramid element functions, as defined in: | |
# | |
# G. Bedrosian, "Shape functions and integration formulas for | |
# three-dimensional finite element analysis", Int. J. Numerical | |
# Methods Engineering, vol 35, p. 95-108, 1992. | |
# | |
# This pyramid has 13 nodes and a "serendipity" quad on the bottom. | |
# Bedrosian uses the same size reference element as we want to use, | |
# but a different node numbering. The purpose of this script is to | |
# make sure his basis functions check out. Bedrosian also uses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This example tests out the calculation of second derivatives | |
// Run me with: | |
// ./second_derivs-opt -d 2 -n 2 -o FIRST -ksp_monitor -pc_type hypre -pc_hypre_type boomeramg > second_derivs.log | |
// C++ include files that we need | |
#include <iostream> | |
#include <algorithm> | |
#include <math.h> | |
#include <set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This test code is to investigate David Knezevic's bad Tet10 | |
#include "libmesh/libmesh.h" | |
#include "libmesh/mesh.h" | |
#include "libmesh/elem.h" | |
#include "libmesh/cell_tet10.h" | |
// Bring in the libmesh namespace | |
using namespace libMesh; | |
int main (int argc, char** argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This utility code is used for generating the embedding matrix for the Prism15 element | |
#include <iomanip> // std::setw | |
#include "libmesh/libmesh.h" | |
#include "libmesh/mesh.h" | |
#include "libmesh/elem.h" | |
#include "libmesh/mesh_generation.h" | |
#include "libmesh/mesh_modification.h" | |
#include "libmesh/getpot.h" | |
#include "libmesh/fe_interface.h" |
OlderNewer