1 #include "mesh_error_factory.h" 5 template <
int dim,
int nspecies,
int nstate,
typename real,
typename MeshType>
6 std::unique_ptr <MeshErrorEstimateBase <dim,nspecies, real, MeshType>>
MeshErrorFactory<dim,nspecies, nstate, real, MeshType>::create_mesh_error(std::shared_ptr<
DGBase<dim,nspecies,real,MeshType>> dg)
8 if (!(dg->all_parameters->mesh_adaptation_param.use_goal_oriented_mesh_adaptation) && nspecies==1)
10 return std::make_unique<ResidualErrorEstimate<dim,nspecies, real, MeshType>>(dg);
16 if(dim == dg->all_parameters->dimension && nspecies == 1)
21 if(nstate == dg->all_parameters->nstate)
23 return std::make_unique<DualWeightedResidualError<dim,nspecies, nstate , real, MeshType>>(dg);
25 else if constexpr (nstate > 1)
32 std::cout<<
"Cannot create MeshErrorEstimate. Invalid input"<<std::endl;
Returns pointer to appropriate mesh error class depending on the input parameters.
Files for the baseline physics.
static std::unique_ptr< MeshErrorEstimateBase< dim, nspecies, real, MeshType > > create_mesh_error(std::shared_ptr< DGBase< dim, nspecies, real, MeshType > > dg)
Returns pointer of the mesh error's abstract class.
DGBase is independent of the number of state variables.