<commit_before>//-----------------------------------------------------------------------bl-
//--------------------------------------------------------------------------
//
// GRINS - General Reacting Incompressible Navier-Stokes
//
// Copyright (C) 2014-2015 <NAME>, <NAME>
// Copyright (C) 2010-2013 The PECOS Development Team
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the Version 2.1 GNU Lesser General
// Public License as published by the Free Software Foundation.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc. 51 Franklin Street, Fifth Floor,
// Boston, MA  02110-1301  USA
//
//-----------------------------------------------------------------------el-


#ifndef GRINS_MULTIPHYSICS_SYS_H
#define GRINS_MULTIPHYSICS_SYS_H

// C++
#include <string>

// GRINS
#include "grins_config.h"
#include "grins/physics.h"

// libMesh
#include "libmesh/fem_system.h"

#ifdef GRINS_HAVE_GRVY
// GRVY timers
#include "grvy.h"
#endif

// libMesh forward declartions
class GetPot;

namespace libMesh
{
  class EquationSystems;
  class DiffContext;

  template <typename Scalar>
  class ParameterMultiAccessor;
}

namespace GRINS
{
  // Forward Declarations
  template <typename Scalar>
  class PostProcessedQuantities;

  //! Interface with libMesh for solving Multiphysics problems.
  /*!
    MultiphysicsSystem (through libMesh::FEMSystem) solves the following equation:

    \f$M(u)\dot{u} = F(u)\f$

    M = mass matrix
    u = solution vector
    F = time derivative

    Note that for the nonlinear system that is solved for implicit
    time stepping is:

    \f$M(u_{\theta})(u^n - u^{n+1}) + \Delta t F(u) = 0\f$

    *_time_derivative correspond to calculating terms for \f$F(u)\f$
    *_mass_residual correspond to calculating terms for \f$M(u)\dot{u}\f$
   */
  //TODO: is it F(u) or F(u_{\theta})?
  class MultiphysicsSystem : public libMesh::FEMSystem
  {
  public:

    //! Constructor. Will be called by libMesh only.
    MultiphysicsSystem( libMesh::EquationSystems& es,
			const std::string& name,
			const unsigned int number );

    //! Destructor. Clean up all physics allocations.
    ~MultiphysicsSystem(){};

    //! PhysicsList gets built by GRINS::PhysicsFactory and attached here.
    void attach_physics_list( PhysicsList physics_list );

    //! Reads input options for this class and all physics that are enabled
    /*!
      This function reads the input options for the MultiphysicsSystem class and then
      enables each of the requested physics in the system. Finally, the input options
      for each of the physics will be read.
     */
    virtual void read_input_options( const GetPot& input );

    //! System initialization. Calls each physics implementation of init_variables()
    virtual void init_data();

    //! Each Physics will register their postprocessed quantities with this call
    void register_postprocessing_vars( const GetPot& input,
                                       PostProcessedQuantities<libMesh::Real>& postprocessing );<commit_msg>Accessor for PhysicsList from MultiphysicsSystem<commit_after>//-----------------------------------------------------------------------bl-
//--------------------------------------------------------------------------
//
// GRINS - General Reacting Incompressible Navier-Stokes
//
// Copyright (C) 2014-2015 <NAME>, <NAME>
// Copyright (C) 2010-2013 The PECOS Development Team
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the Version 2.1 GNU Lesser General
// Public License as published by the Free Software Foundation.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc. 51 Franklin Street, Fifth Floor,
// Boston, MA  02110-1301  USA
//
//-----------------------------------------------------------------------el-


#ifndef GRINS_MULTIPHYSICS_SYS_H
#define GRINS_MULTIPHYSICS_SYS_H

// C++
#include <string>

// GRINS
#include "grins_config.h"
#include "grins/physics.h"

// libMesh
#include "libmesh/fem_system.h"

#ifdef GRINS_HAVE_GRVY
// GRVY timers
#include "grvy.h"
#endif

// libMesh forward declartions
class GetPot;

namespace libMesh
{
  class EquationSystems;
  class DiffContext;

  template <typename Scalar>
  class ParameterMultiAccessor;
}

namespace GRINS
{
  // Forward Declarations
  template <typename Scalar>
  class PostProcessedQuantities;

  //! Interface with libMesh for solving Multiphysics problems.
  /*!
    MultiphysicsSystem (through libMesh::FEMSystem) solves the following equation:

    \f$M(u)\dot{u} = F(u)\f$

    M = mass matrix
    u = solution vector
    F = time derivative

    Note that for the nonlinear system that is solved for implicit
    time stepping is:

    \f$M(u_{\theta})(u^n - u^{n+1}) + \Delta t F(u) = 0\f$

    *_time_derivative correspond to calculating terms for \f$F(u)\f$
    *_mass_residual correspond to calculating terms for \f$M(u)\dot{u}\f$
   */
  //TODO: is it F(u) or F(u_{\theta})?
  class MultiphysicsSystem : public libMesh::FEMSystem
  {
  public:

    //! Constructor. Will be called by libMesh only.
    MultiphysicsSystem( libMesh::EquationSystems& es,
			const std::string& name,
			const unsigned int number );

    //! Destructor. Clean up all physics allocations.
    ~MultiphysicsSystem(){};

    //! PhysicsList gets built by GRINS::PhysicsFactory and attached here.
    void attach_physics_list( PhysicsList physics_list );

    const PhysicsList& get_physics_list() const
    { return _physics_list; }

    //! Reads input options for this class and all physics that are enabled
    /*!
      This function reads the input options for the MultiphysicsSystem class and then
      enables each of the requested physics in the system. Finally, the input options
      for each of the physics will be read.
     */
    virtual void read_input_options( const GetPot& input );

    //! System initialization. Calls each physics implementation of init_variables()
    virtual void init_data();

    //! Each Physics will register their postprocessed quantities with this call
    void register_postprocessing_vars( const GetPot& input,
                                       PostProcessedQuantities<libMesh::Real>& postprocessing );
{'fraction_non_alphanumeric': 0.14614499424626007, 'fraction_numerical': 0.008918296892980437, 'mean_word_length': 2.584020618556701, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5704558', 'n_tokens_mistral': 1990, 'n_tokens_neox': 1862, 'n_words': 722}