1 #include "periodic_cube_flow.h" 5 #include "mesh/grids/straight_periodic_cube.hpp" 6 #include "mesh/gmsh_reader.hpp" 10 namespace FlowSolver {
14 template <
int dim,
int nstate>
17 , number_of_cells_per_direction(this->all_param.flow_solver_param.number_of_grid_elements_per_dimension)
18 , domain_left(this->all_param.flow_solver_param.grid_left_bound)
19 , domain_right(this->all_param.flow_solver_param.grid_right_bound)
20 , domain_size(pow(this->domain_right - this->domain_left, dim))
23 template <
int dim,
int nstate>
27 if constexpr(dim == 3) {
29 this->
pcout <<
"- Generating grid using input mesh: " << mesh_filename << std::endl;
31 std::shared_ptr <HighOrderGrid<dim, double>> cube_mesh = read_gmsh<dim, dim>(
45 return cube_mesh->triangulation;
48 this->
pcout <<
"ERROR: read_gmsh() has not been tested with periodic_cube_flow() for 1D and 2D. Aborting..." << std::endl;
52 this->
pcout <<
"- Generating grid using dealii GridGenerator" << std::endl;
54 std::shared_ptr<Triangulation> grid = std::make_shared<Triangulation> (
66 template <
int dim,
int nstate>
69 const std::string grid_type_string =
"straight_periodic_cube";
71 this->
pcout <<
"- Grid type: " << grid_type_string << std::endl;
73 this->
pcout <<
"- - Domain dimensionality: " << dim << std::endl;
77 if constexpr(dim==1) this->
pcout <<
"- - Domain length: " << this->
domain_size << std::endl;
78 if constexpr(dim==2) this->
pcout <<
"- - Domain area: " << this->
domain_size << std::endl;
79 if constexpr(dim==3) this->
pcout <<
"- - Domain volume: " << this->
domain_size << std::endl;
82 template <
int dim,
int nstate>
const Parameters::AllParameters all_param
All parameters.
int y_periodic_id_face_2
Custom Boundary IDs for the second periodic face in the y-direction.
const MPI_Comm mpi_communicator
MPI communicator.
int y_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the y-direction.
int x_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the x-direction.
int z_periodic_id_face_2
Custom Boundary IDs for the first periodic face in the z-direction.
FlowSolverParam flow_solver_param
Contains the parameters for simulation cases (flow solver test)
int z_periodic_id_face_1
Custom Boundary IDs for the first periodic face in the z-direction.
unsigned int grid_degree
Parameters related to mesh generation.
bool use_periodic_BC_in_z
Flag for using periodic boundary conditions in the z-direction.
Files for the baseline physics.
const double domain_left
Domain left-boundary value for generating the grid.
const int number_of_cells_per_direction
Number of cells per direction for the grid.
bool mesh_reader_verbose_output
< Flag for verbose (true) or quiet (false) mesh reader output
Main parameter class that contains the various other sub-parameter classes.
PeriodicCubeFlow(const Parameters::AllParameters *const parameters_input)
Constructor.
bool do_renumber_dofs
Flag for renumbering DOFs.
std::shared_ptr< Triangulation > generate_grid() const override
Function to generate the grid.
bool use_periodic_BC_in_y
Flag for using periodic boundary conditions in the y-direction.
std::string input_mesh_filename
bool use_gmsh_mesh
< Flag for using input mesh file
const double domain_size
Domain size (length in 1D, area in 2D, and volume in 3D)
const double domain_right
Domain right-boundary value for generating the grid.
int x_periodic_id_face_2
Custom Boundary IDs for the second periodic face in the x-direction.
virtual void display_additional_flow_case_specific_parameters() const override
Display additional more specific flow case parameters.
dealii::ConditionalOStream pcout
ConditionalOStream.
void display_grid_parameters() const
Display grid parameters.
bool use_periodic_BC_in_x
Flag for using periodic boundary conditions in the x-direction.