/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | www.openfoam.com
     \\/     M anipulation  |
-------------------------------------------------------------------------------
    Copyright (C) 2013-2015 OpenFOAM Foundation
    Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM 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 General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

Class
    Foam::incompressibleTurbulenceModel

Description
    Abstract base class for turbulence models (RAS, LES and laminar).

SourceFiles
    incompressibleTurbulenceModel.C

\*---------------------------------------------------------------------------*/

#ifndef incompressibleTurbulenceModel_H
#define incompressibleTurbulenceModel_H

#include "turbulenceModel.H"
#include "geometricOneField.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

// Forward declarations
class gpufvMesh;

/*---------------------------------------------------------------------------*\
                Class incompressibleTurbulenceModel Declaration
\*---------------------------------------------------------------------------*/

class incompressibleTurbulenceModel
:
    public turbulenceModel
{

protected:

    // Protected data

        geometricOneField rho_;


    // Protected member functions

        //- ***HGW Temporary function to be removed when the run-time selectable
        //  thermal transport layer is complete
        virtual void correctNut()
        {}


private:

    // Private Member Functions

        //- No copy construct
        incompressibleTurbulenceModel
        (
            const incompressibleTurbulenceModel&
        ) = delete;

        //- No copy assignment
        void operator=(const incompressibleTurbulenceModel&) = delete;


public:

    //- Runtime type information
    TypeName("incompressibleTurbulenceModel");


    // Constructors

        //- Construct from components
        incompressibleTurbulenceModel
        (
            const geometricOneField& rho,
            const volVectorgpuField& U,
            const surfaceScalargpuField& alphaRhoPhi,
            const surfaceScalargpuField& phi,
            const word& propertiesName
        );


    //- Destructor
    virtual ~incompressibleTurbulenceModel() = default;


    // Member Functions

        // Access functipons

            //- Return rho


        //- Return the laminar dynamic viscosity
        virtual tmp<volScalargpuField> mu() const;

        //- Return the laminar dynamic viscosity on patch
        virtual tmp<scalargpuField> mu(const label patchi) const;

        //- Return the turbulence dynamic viscosity
        virtual tmp<volScalargpuField> mut() const;

        //- Return the turbulence dynamic viscosity on patch
        virtual tmp<scalargpuField> mut(const label patchi) const;

        //- Return the effective dynamic viscosity
        virtual tmp<volScalargpuField> muEff() const;

        //- Return the effective dynamic viscosity on patch
        virtual tmp<scalargpuField> muEff(const label patchi) const;

        //- Return the effective stress tensor including the laminar stress
        virtual tmp<volSymmTensorgpuField> devReff() const = 0;

        //- Return the effective stress tensor including
        //- the laminar stress based on a given velocity field
        virtual tmp<volSymmTensorgpuField> devReff
        (
            const volVectorgpuField& U
        ) const = 0;

        //- Return the source term for the momentum equation
        virtual tmp<gpufvVectorMatrix> divDevReff(volVectorgpuField& U) const = 0;
};


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace Foam

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif

// ************************************************************************* //
