This file contains hidden or 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
| // An FEM formulation for solving the Jeffery-Hamel ODE: | |
| // f''' + 2 * alpha * Re * f * f' + 4 * alpha^2 * f' = 0 | |
| // using C1 Hermite cubic and quartic finite elements. | |
| // Libmesh includes | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/elem.h" | |
| #include "libmesh/mesh_generation.h" | |
| #include "libmesh/equation_systems.h" | |
| #include "libmesh/linear_implicit_system.h" |
This file contains hidden or 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
| // Compilation requires -std=c++17 | |
| // http://stackoverflow.com/questions/17603666/copy-move-requirements-for-the-key-value-types-in-a-stdmap | |
| #include <map> | |
| #include <vector> | |
| struct foo | |
| { | |
| int i; | |
| foo(int j) : i(j) {} |
This file contains hidden or 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
| // C++ include files that we need | |
| #include <iostream> | |
| // Basic include files needed for the mesh functionality. | |
| #include "libmesh/libmesh.h" | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/mesh_generation.h" | |
| #include "libmesh/linear_implicit_system.h" | |
| #include "libmesh/equation_systems.h" | |
| #include "libmesh/exodusII_io.h" |
This file contains hidden or 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
| #include <iostream> | |
| #include <vector> | |
| struct S | |
| { | |
| S(const S&) { std::cout << "Copied an S\n"; } | |
| S(S&&) { std::cout << "Moved an S\n"; } | |
| S() = default; |
This file contains hidden or 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
| #include "libmesh/node.h" | |
| #include "libmesh/elem.h" | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/face_tri3.h" | |
| #include "libmesh/getpot.h" | |
| using namespace libMesh; | |
| // Commands to approximately generate the Bassi & Rebay meshes: | |
| // In my opinion, the meshes look best when nodes_per_ring = 2 * num_rings |
This file contains hidden or 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
| #include "libmesh/mesh_generation.h" | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/elem.h" | |
| #include "libmesh/getpot.h" | |
| #include "libmesh/string_to_enum.h" | |
| #include "libmesh/elem_range.h" | |
| // C++ includes | |
| #include <chrono> |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys | |
| import os | |
| name = '' | |
| # Process command line args (0 is always the script name) | |
| c = 1 | |
| while (c < len(sys.argv)): |
This file contains hidden or 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
| // Basic include file needed for the mesh functionality. | |
| #include "libmesh/libmesh.h" | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/dof_map.h" | |
| #include "libmesh/elem.h" | |
| #include "libmesh/fe_interface.h" | |
| #include "libmesh/fe_map.h" | |
| #include "libmesh/fe_base.h" | |
| #include "libmesh/quadrature_gauss.h" | |
| #include "libmesh/enum_to_string.h" |
This file contains hidden or 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
| // Basic include file needed for the mesh functionality. | |
| #include "libmesh/libmesh.h" | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/dof_map.h" | |
| #include "libmesh/elem.h" | |
| #include "libmesh/fe_interface.h" | |
| #include "libmesh/fe_map.h" | |
| #include "libmesh/fe_base.h" | |
| #include "libmesh/quadrature_gauss.h" | |
| #include "libmesh/enum_to_string.h" |
This file contains hidden or 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
| // libmesh includes | |
| #include "libmesh/libmesh.h" | |
| #include "libmesh/mesh.h" | |
| #include "libmesh/elem.h" | |
| #include "libmesh/fe.h" | |
| #include "libmesh/quadrature_gauss.h" | |
| #include "libmesh/dense_vector.h" | |
| #include "libmesh/dense_matrix.h" | |
| using namespace libMesh; |