Go to the documentation of this file.
    2 #include "libmesh/mesh_generation.h" 
    3 #include "libmesh/numeric_vector.h" 
    4 #include "libmesh/replicated_mesh.h" 
    5 #include "libmesh/auto_ptr.h"  
   41   if (energy == 
"double_well")
 
   43   else if (energy == 
"double_obstacle")
 
   45   else if (energy == 
"log_double_well")
 
   47   else if (energy == 
"log_double_obstacle")
 
   50     libmesh_error_msg(
"Unknown energy type: " << energy);
 
   60     libMesh::out << 
"WARNING: no truncation is being used for the logarithmic free energy term.\nWARNING: division by zero possible!\n";
 
   66   libmesh_assert_msg((
_dim <= 3) && (
_dim > 0), 
"Invalid mesh dimension");
 
   71   libmesh_assert_msg(
_N > 0, 
"Invalid mesh size");
 
   82       MeshTools::Generation::build_cube(
_mesh, 
_N, 
_N, 
_N, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 
HEX8);
 
   85       libmesh_assert_msg((
_dim <= 3) && (
_dim > 0), 
"Invalid mesh dimension");
 
   91   libmesh_assert_msg(
_dt0>=0, 
"Negative initial timestep");
 
   95   libmesh_assert_msg(
_t1 >= 
_t0, 
"Final time less than initial time");
 
   99   libmesh_assert_msg(_cnWeight <= 1 && _cnWeight >= 0, 
"Crank-Nicholson weight must be between 0 and 1");
 
  105   if (initialState == std::string(
"ball"))
 
  107   else if (initialState == std::string(
"strip"))
 
  109   else if (initialState == std::string(
"rod"))
 
  112     libmesh_error_msg(
"Unknown initial state: neither ball nor rod nor strip");
 
  114   std::vector<Real> icenter;
 
  118   if (icenter.size() > 
_dim)
 
  119     libmesh_assert_msg(icenter.size() > 
_dim, 
"Invalid dimension for the initial state center of mass");
 
  123   for (std::size_t i = icenter.size(); i < 
_dim; ++i)
 
  126   for (
unsigned int i = 
_dim; i < 3; ++i)
 
  133   _jr = &(add_system<Biharmonic::JR>(std::string(
"Biharmonic::JR")));
 
  136 #ifdef LIBMESH_HAVE_EXODUS_API 
  159   _exio = libmesh_make_unique<ExodusII_IO>(
_mesh);
 
  161 #endif // #ifdef LIBMESH_HAVE_EXODUS_API 
  241   *(
_jr->old_local_solution) = *(
_jr->current_local_solution);
 
  250 #ifdef LIBMESH_HAVE_EXODUS_API 
  256   if (!force && t - o_t < 
_o_dt)
 
  268                  << 
"; output a total of " 
  270                  << 
" states so far\n";
 
  283 #endif // #ifdef LIBMESH_HAVE_EXODUS_API 
  293   output(timestep, t, o_t, 
true);
 
  301         libMesh::out << 
"Solving for state " << timestep << 
", time " << t << 
"\n";
 
  314   output(timestep, t, o_t, 
true);
 
  
The libMesh namespace provides an interface to certain functionality in the library.
 
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
 
void init(triangulateio &t)
Initializes the fields of t to nullptr/0 as necessary.
 
A Point defines a location in LIBMESH_DIM dimensional Real space.
 
void output(int timestep, const Real &t, Real &o_t, bool force=false)
 
T command_line_value(const std::string &, T)
 
This is the EquationSystems class.
 
InitialStateEnum _initialState
 
void command_line_vector(const std::string &, std::vector< T > &)
 
bool on_command_line(std::string arg)
 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
void step(const Real &dt=-1.0)
 
void init()
Initialize all the systems.
 
std::unique_ptr< ExodusII_IO > _exio
 
Biharmonic(ReplicatedMesh &mesh)
Constructor retrieves command-line options, setting defaults, if necessary.
 
void ErrorVector unsigned int