5 #include <deal.II/distributed/solution_transfer.h>     6 #include <deal.II/fe/fe_q.h>     7 #include <deal.II/fe/fe_values.h>     8 #include <deal.II/lac/la_parallel_vector.h>    13 #include "dg/dg_base.hpp"    14 #include "functional.h"    15 #include "parameters/all_parameters.h"    16 #include "physics/physics.h"    34  #if PHILIP_DIM==1 // dealii::parallel::distributed::Triangulation<dim> does not work for 1D    35 template <
int dim, 
int nstate, 
typename real, 
typename MeshType = dealii::Triangulation<dim>>
    37 template <
int dim, 
int nstate, 
typename real, 
typename MeshType = dealii::parallel::distributed::Triangulation<dim>>
   121     std::shared_ptr< DGBase<dim,real,MeshType> > 
dg;
   123     std::shared_ptr< Functional<dim, nstate, real, MeshType> > 
functional;
   125     std::shared_ptr< Physics::PhysicsBase<dim,nstate,Sacado::Fad::DFad<real>> > 
physics;
   132     dealii::LinearAlgebra::distributed::Vector<real> 
dIdw_fine;
   159 #endif // __ADJOINT_H__ dealii::LinearAlgebra::distributed::Vector< real > dIdw_coarse
functional derivative (on the coarse grid) 
std::shared_ptr< Functional< dim, nstate, real, MeshType > > functional
Functional class pointer. 
void convert_to_state(AdjointStateEnum state)
Converts the adjoint to specified state. 
AdjointStateEnum adjoint_state
Current adjoint state. 
dealii::LinearAlgebra::distributed::Vector< real > fine_grid_adjoint()
Computes the fine grid adjoint. 
void fine_to_coarse()
Return the problem to the original solution and polynomial distribution. 
dealii::LinearAlgebra::distributed::Vector< real > adjoint_coarse
coarse grid adjoint ( ) 
Base class from which Advection, Diffusion, ConvectionDiffusion, and Euler is derived. 
std::shared_ptr< MeshType > triangulation
Grid. 
Adjoint(std::shared_ptr< DGBase< dim, real, MeshType > > _dg, std::shared_ptr< Functional< dim, nstate, real, MeshType > > _functional, std::shared_ptr< Physics::PhysicsBase< dim, nstate, Sacado::Fad::DFad< real >> > _physics)
Constructor. 
std::shared_ptr< Physics::PhysicsBase< dim, nstate, Sacado::Fad::DFad< real > > > physics
Problem physics (for calling the functional class) 
Files for the baseline physics. 
AdjointStateEnum
For storing the current state in the adjoint. 
dealii::Vector< real > dual_weighted_residual()
compute the Dual Weighted Residual (DWR) 
dealii::LinearAlgebra::distributed::Vector< real > coarse_grid_adjoint()
Computes the coarse grid adjoint. 
dealii::LinearAlgebra::distributed::Vector< real > dIdw_fine
functional derivative (on the fine grid) 
void reinit()
Reinitialize Adjoint with the same pointers. 
dealii::Vector< real > coarse_fe_index
Original FE_index distribution. 
MPI_Comm mpi_communicator
MPI communicator. 
dealii::LinearAlgebra::distributed::Vector< real > solution_coarse
original solution 
std::shared_ptr< DGBase< dim, real, MeshType > > dg
DG class pointer. 
void output_results_vtk(const unsigned int cycle)
Outputs the current solution and adjoint values. 
dealii::Vector< real > dual_weighted_residual_fine
dual weighted residual 
void coarse_to_fine()
Projects the problem to a p-enriched space. 
DGBase is independent of the number of state variables. 
dealii::LinearAlgebra::distributed::Vector< real > adjoint_fine
fine grid adjoint ( ) 
dealii::ConditionalOStream pcout
Parallel std::cout that only outputs on mpi_rank==0.