3 #include "dual_weighted_residual_mesh_adaptation.h" 4 #include "flow_solver/flow_solver_factory.h" 9 template <
int dim,
int nstate>
12 const dealii::ParameterHandler ¶meter_handler_input)
14 , parameter_handler(parameter_handler_input)
17 template <
int dim,
int nstate>
25 bool check_for_p_refined_cell =
false;
29 if(mesh_adaptation_type == MeshAdaptationTypeEnum::p_adaptation)
31 check_for_p_refined_cell =
true;
34 if(!use_mesh_adaptation)
36 pcout<<
"This test case checks mesh adaptation. However, total mesh adaptation cycles have been set to 0 in the parameters file. Aborting..."<<std::endl;
44 dealii::Point<dim> refined_cell_coord = flow_solver->dg->coordinates_of_highest_refined_cell(check_for_p_refined_cell);
45 pcout<<
" Coordinates of the most refined cell (x,y) = ("<<refined_cell_coord[0]<<
", "<<refined_cell_coord[1]<<
")"<<std::endl;
47 if ((refined_cell_coord[0] > 0.3) && (refined_cell_coord[0] < 0.6) && (refined_cell_coord[1] > 0.3) && (refined_cell_coord[1] < 0.6))
49 pcout<<
"Mesh is refined near the shock. Test passed!"<<std::endl;
54 pcout<<
"Mesh Adaptation has failed."<<std::endl;
Parameters related to the manufactured convergence study.
DualWeightedResidualMeshAdaptation(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Constructor of DualWeightedResidualConvergence.
int total_mesh_adaptation_cycles
Total/maximum number of mesh adaptation cycles while solving a problem.
Files for the baseline physics.
const dealii::ParameterHandler & parameter_handler
Parameter handler.
Main parameter class that contains the various other sub-parameter classes.
MeshAdaptationParam mesh_adaptation_param
Constains parameters for mesh adaptation.
MeshAdaptationType mesh_adaptation_type
Selection of mesh adaptation type.
ManufacturedConvergenceStudyParam manufactured_convergence_study_param
Contains parameters for manufactured convergence study.
MeshAdaptationType
Choices for mesh adaptation to be used.
static std::unique_ptr< FlowSolver< dim, nstate > > select_flow_case(const Parameters::AllParameters *const parameters_input, const dealii::ParameterHandler ¶meter_handler_input)
Factory to return the correct flow solver given input file.
const Parameters::AllParameters *const all_parameters
Pointer to all parameters.
int run_test() const
Runs the test to check the location of refined cell after performing goal-oriented mesh adaptation...
Test to check the goal-oriented mesh adaptation locations for various manufactured solutions...
dealii::ConditionalOStream pcout
ConditionalOStream.
Base class of all the tests.