1 #ifndef __MESHADAPTATION_H__ 2 #define __MESHADAPTATION_H__ 4 #include <deal.II/distributed/grid_refinement.h> 5 #include <deal.II/distributed/shared_tria.h> 6 #include <deal.II/distributed/tria.h> 7 #include <deal.II/grid/grid_refinement.h> 8 #include <deal.II/grid/tria.h> 10 #include "dg/dg_base.hpp" 11 #include "mesh_error_estimate.h" 12 #include "mesh_error_factory.h" 13 #include "parameters/all_parameters.h" 19 template <
int dim,
typename real,
typename MeshType = dealii::Triangulation<dim>>
21 template <
int dim,
typename real,
typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
38 std::unique_ptr<MeshErrorEstimateBase<dim, real, MeshType>>
mesh_error;
41 std::shared_ptr<DGBase<dim,real,MeshType>>
dg;
64 dealii::ConditionalOStream
pcout;
void adapt_mesh()
Function to adapt the mesh based on input parameters.
const Parameters::MeshAdaptationParam *const mesh_adaptation_param
Holds parameters of mesh adaptation.
MeshAdaptation(std::shared_ptr< DGBase< dim, real, MeshType > > dg_input, const Parameters::MeshAdaptationParam *const mesh_adaptation_param_input)
Constructor to initialize the class with a pointer to DG.
Files for the baseline physics.
~MeshAdaptation()=default
Destructor.
dealii::Vector< real > cellwise_errors
Stores errors in each cell.
std::unique_ptr< MeshErrorEstimateBase< dim, real, MeshType > > mesh_error
Pointer to the error estimator class.
std::shared_ptr< DGBase< dim, real, MeshType > > dg
Pointer to DGBase.
Parameters for Mesh Adaptation.
dealii::ConditionalOStream pcout
Parallel std::cout.
void smoothness_sensor_based_hp_refinement()
Decide whether to perform h or p refinement based on a smoothness indicator.
int current_mesh_adaptation_cycle
Stores the current adaptation cycle.
DGBase is independent of the number of state variables.
void fixed_fraction_isotropic_refinement_and_coarsening()
Performs fixed fraction refinement based on refinement and coarsening fractions.