11#include <yaml-cpp/yaml.h>
24int main(
int argc,
char **argv)
30 ierr = PetscInitialize(&argc, &argv,
nullptr,
nullptr); CHKERRQ(ierr);
31 ierr = PetscLogDefaultBegin(); CHKERRQ(ierr);
41 std::string filePath = config[
"output"].as<std::string>() +
"/grid.h5";
42 char s[PETSC_MAX_PATH_LEN];
43 PetscBool flag = PETSC_FALSE;
44 ierr = PetscOptionsGetString(
nullptr,
nullptr,
"-file", s,
sizeof(s),
45 &flag); CHKERRQ(ierr);
46 if (flag) filePath = s;
47 ierr = mesh->write(filePath); CHKERRQ(ierr);
49 ierr = mesh->destroy(); CHKERRQ(ierr);
50 ierr = PetscFinalize(); CHKERRQ(ierr);
int main(int argc, char **argv)
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
PetscErrorCode createMesh(const MPI_Comm &comm, const YAML::Node &node, type::Mesh &mesh)
Factory function for creating a Mesh object.
PetscErrorCode getSettings(YAML::Node &node)
Get configuration settings.
Prototype of mesh::MeshBase, type::Mesh, and factory function.
Prototypes of parser functions.