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
// libMesh includes | |
#include "libmesh/libmesh.h" | |
#include "libmesh/elem.h" | |
#include "libmesh/mesh_generation.h" | |
#include "libmesh/replicated_mesh.h" | |
#include "libmesh/mesh_refinement.h" | |
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
// Example of how a non-static member function can be used as the "deleter" for a std::unique_ptr via std::bind. | |
// Note: this approach incurs an additional overhead per unique_ptr object to store a pointer to the deleter | |
// function, so it may not be appropriate in cases where zero-overhead unique_pts are required. | |
// Source: https://stackoverflow.com/questions/29525370/how-to-pass-a-non-static-member-function-as-a-unique-ptr-deleter | |
#include <memory> | |
#include <iostream> | |
#include <functional> | |
#include <exception> | |
/** |
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
#include <set> | |
#include <memory> | |
#include <iostream> | |
template <typename Container> | |
void print_address(const Container & c) | |
{ | |
std::cout << "address of underlying" << std::endl; | |
for (const auto & ptr : c) | |
std::cout << ptr.get() << std::endl; |
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
// clang++ -std=c++11 -o stlsizeof stlsizeof.cpp | |
#include <cstdint> | |
#include <cassert> | |
#include <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <list> | |
#include <queue> | |
#include <cstdint> | |
#include <iostream> |
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
// C++ header files | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <iomanip> | |
#include <cstdlib> // std::exit | |
#include <getopt.h> // getopt_long() | |
void usage(const char * progname) |
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
// 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; |
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
// 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 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 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 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> |
NewerOlder