14 template <
int dim, 
int nstate, 
typename real>
    17         manufactured_solution_function(manufactured_solution_function_input)
    18         , mpi_communicator(MPI_COMM_WORLD)
    19         , pcout(
std::cout, dealii::Utilities::MPI::this_mpi_process(mpi_communicator)==0)
    22 template <
int dim, 
int nstate, 
typename real>
    25     const dealii::Point<dim,real> &,
    26     const std::array<real,nstate> &,
    27     const std::array<dealii::Tensor<1,dim,real>,nstate> &,
    28     const dealii::types::global_dof_index )
 const    30     std::array<real,nstate> physical_source;
    31     physical_source.fill(0.0);
    32     return physical_source;
    35 template <
int dim, 
int nstate, 
typename real>
    38     const dealii::Point<dim, real> &,
    39     const dealii::Tensor<1,dim,real> &,
    40     const std::array<real,nstate> &,
    41     const std::array<dealii::Tensor<1,dim,real>,nstate> &,
    42     std::array<real,nstate> &,
    43     std::array<dealii::Tensor<1,dim,real>,nstate> &)
 const    46     if constexpr(nstate>(dim+2)) {
    47         pcout << 
"Error: boundary_manufactured_solution() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
    48         pcout << 
"Aborting..." << std::endl;
    53 template <
int dim, 
int nstate, 
typename real>
    56    std::array<real,nstate> &,
    57    std::array<dealii::Tensor<1,dim,real>,nstate> &)
 const    60     if constexpr(nstate>(dim+2)) {
    61         pcout << 
"Error: boundary_wall() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
    62         pcout << 
"Aborting..." << std::endl;
    67 template <
int dim, 
int nstate, 
typename real>
    70    const std::array<real,nstate> &,
    71    const std::array<dealii::Tensor<1,dim,real>,nstate> &,
    72    std::array<real,nstate> &,
    73    std::array<dealii::Tensor<1,dim,real>,nstate> &)
 const    76     if constexpr(nstate>(dim+2)) {
    77         pcout << 
"Error: boundary_outflow() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
    78         pcout << 
"Aborting..." << std::endl;
    83 template <
int dim, 
int nstate, 
typename real>
    86    const std::array<real,nstate> &,
    87    const std::array<dealii::Tensor<1,dim,real>,nstate> &,
    88    std::array<real,nstate> &,
    89    std::array<dealii::Tensor<1,dim,real>,nstate> &)
 const    92     if constexpr(nstate>(dim+2)) {
    93         pcout << 
"Error: boundary_inflow() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
    94         pcout << 
"Aborting..." << std::endl;
    99 template <
int dim, 
int nstate, 
typename real>
   102    std::array<real,nstate> &)
 const   105     if constexpr(nstate>(dim+2)) {
   106         pcout << 
"Error: boundary_farfield() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
   107         pcout << 
"Aborting..." << std::endl;
   112 template <
int dim, 
int nstate, 
typename real>
   115    const dealii::Tensor<1,dim,real> &,
   116    const std::array<real,nstate> &,
   117    const std::array<dealii::Tensor<1,dim,real>,nstate> &,
   118    std::array<real,nstate> &,
   119    std::array<dealii::Tensor<1,dim,real>,nstate> &)
 const   122     if constexpr(nstate>(dim+2)) {
   123         pcout << 
"Error: boundary_slip_wall() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
   124         pcout << 
"Aborting..." << std::endl;
   129 template <
int dim, 
int nstate, 
typename real>
   132    const dealii::Tensor<1,dim,real> &,
   133    const std::array<real,nstate> &,
   134    std::array<real,nstate> &)
 const   137     if constexpr(nstate>(dim+2)) {
   138         pcout << 
"Error: boundary_riemann() not implemented in class derived from ModelBase with nstate>(dim+2)." << std::endl;
   139         pcout << 
"Aborting..." << std::endl;
   144 template <
int dim, 
int nstate, 
typename real>
   147    const int boundary_type,
   148    const dealii::Point<dim, real> &pos,
   149    const dealii::Tensor<1,dim,real> &normal_int,
   150    const std::array<real,nstate> &soln_int,
   151    const std::array<dealii::Tensor<1,dim,real>,nstate> &soln_grad_int,
   152    std::array<real,nstate> &soln_bc,
   153    std::array<dealii::Tensor<1,dim,real>,nstate> &soln_grad_bc)
 const   155     if (boundary_type == 1000) {
   159     else if (boundary_type == 1001) {
   163     else if (boundary_type == 1002) {
   167     else if (boundary_type == 1003) {
   171     else if (boundary_type == 1004) {
   173         boundary_riemann (normal_int, soln_int, soln_bc);
   175     else if (boundary_type == 1005) {
   179     else if (boundary_type == 1006) {
   181         boundary_slip_wall (normal_int, soln_int, soln_grad_int, soln_bc, soln_grad_bc);
   184         pcout << 
"Invalid boundary_type: " << boundary_type << 
" in ModelBase.cpp" << std::endl;
   190 template <
int dim, 
int nstate, 
typename real>
   193     const dealii::Vector<double>              &uh,
   194     const std::vector<dealii::Tensor<1,dim> > &,
   195     const std::vector<dealii::Tensor<2,dim> > &,
   196     const dealii::Tensor<1,dim>               &,
   197     const dealii::Point<dim>                  &)
 const   199     dealii::Vector<double> computed_quantities(nstate-(dim+2));
   200     for (
unsigned int s=dim+2; s<nstate; ++s) {
   201         computed_quantities(s-(dim+2)) = uh(s);
   203     return computed_quantities;
   206 template <
int dim, 
int nstate, 
typename real>
   210     std::vector<std::string> names;
   211     for (
unsigned int s=dim+2; s<nstate; ++s) {
   212         std::string varname = 
"state" + dealii::Utilities::int_to_string(s,1);
   213         names.push_back(varname);
   218 template <
int dim, 
int nstate, 
typename real>
   222     namespace DCI = dealii::DataComponentInterpretation;
   223     std::vector<DCI::DataComponentInterpretation> interpretation;
   224     for (
unsigned int s=dim+2; s<nstate; ++s) {
   225         interpretation.push_back (DCI::component_is_scalar);
   227     return interpretation;
 virtual std::vector< dealii::DataComponentInterpretation::DataComponentInterpretation > post_get_data_component_interpretation() const
Returns DataComponentInterpretation of the solution to be used by PhysicsPostprocessor to output curr...
virtual void boundary_wall(std::array< real, nstate > &soln_bc, std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_bc) const
Wall boundary condition. 
dealii::ConditionalOStream pcout
Parallel std::cout that only outputs on mpi_rank==0. 
Manufactured solution used for grid studies to check convergence orders. 
virtual void boundary_inflow(const std::array< real, nstate > &soln_int, const std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_int, std::array< real, nstate > &soln_bc, std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_bc) const
Inflow boundary conditions. 
Files for the baseline physics. 
ModelBase(std::shared_ptr< ManufacturedSolutionFunction< dim, real > > manufactured_solution_function_input=nullptr)
Constructor. 
Physics model additional terms and equations to the baseline physics. 
virtual void boundary_farfield(std::array< real, nstate > &soln_bc) const
Farfield boundary conditions based on freestream values. 
virtual std::array< real, nstate > physical_source_term(const dealii::Point< dim, real > &pos, const std::array< real, nstate > &solution, const std::array< dealii::Tensor< 1, dim, real >, nstate > &solution_gradient, const dealii::types::global_dof_index cell_index) const
Physical source terms additional to the baseline physics (including physical source terms in addition...
void boundary_face_values(const int boundary_type, const dealii::Point< dim, real > &pos, const dealii::Tensor< 1, dim, real > &normal, const std::array< real, nstate > &soln_int, const std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_int, std::array< real, nstate > &soln_bc, std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_bc) const
Boundary condition handler. 
virtual void boundary_outflow(const std::array< real, nstate > &soln_int, const std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_int, std::array< real, nstate > &soln_bc, std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_bc) const
Outflow Boundary Condition. 
virtual void boundary_manufactured_solution(const dealii::Point< dim, real > &pos, const dealii::Tensor< 1, dim, real > &normal_int, const std::array< real, nstate > &soln_int, const std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_int, std::array< real, nstate > &soln_bc, std::array< dealii::Tensor< 1, dim, real >, nstate > &soln_grad_bc) const
Evaluate the manufactured solution boundary conditions. 
virtual dealii::Vector< double > post_compute_derived_quantities_vector(const dealii::Vector< double > &uh, const std::vector< dealii::Tensor< 1, dim > > &, const std::vector< dealii::Tensor< 2, dim > > &, const dealii::Tensor< 1, dim > &, const dealii::Point< dim > &) const
Returns current vector solution to be used by PhysicsPostprocessor to output current solution...
virtual std::vector< std::string > post_get_names() const
Returns names of the solution to be used by PhysicsPostprocessor to output current solution...