Last active
March 26, 2017 15:51
-
-
Save grim-yawn/1c8f0a6760dab5da0d3df030d0929ef4 to your computer and use it in GitHub Desktop.
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
std::shared_ptr<MeshBase> MeshFactory::create_mesh(const json &mesh_properties) | |
{ | |
const std::string mesh_type = mesh_properties["type"].get<std::string>(); | |
const json geometry = mesh_properties["geometry"]; | |
if (mesh_type == "cube") { | |
return create_cube_mesh(geometry); | |
} | |
// Некторое колличество else if (...) | |
else if (mesh_type == "cylinder") { | |
return create_cylinder_mesh(geometry); | |
} | |
else { | |
throw dealii::StandardExceptions::ExcNotImplemented( | |
std::string("Mesh type " + mesh_type + " doesn\'t exist.") | |
); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment