/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2016 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
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::CMC::FlameStructure

Description

SourceFiles
    FlameStructureI.H
    FlameStructure.C
    FlameStructureIO.C

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

#ifndef FlameStructure_H
#define FlameStructure_H

#include "error.H"
#include "scalarField.H"

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

namespace Foam
{

// Forward declaration of classes
class Istream;
class Ostream;

namespace CMC
{
class FlameStructure;
}

// Forward declaration of friend functions and operators
Istream& operator>>(Istream&, CMC::FlameStructure&);
Ostream& operator<<(Ostream&, const CMC::FlameStructure&);

namespace CMC
{

/*---------------------------------------------------------------------------*\
                         Class FlameStructure Declaration
\*---------------------------------------------------------------------------*/

class FlameStructure
{
    // Private data
        typedef List<scalarField> scalarFieldArray1d;

        typedef List<scalarFieldArray1d> scalarFieldArray2d;

        typedef List<scalarFieldArray2d> scalarFieldArray3d;

        //- Species mass fraction
        word NstDir_;

        //- Species mass fraction
        scalarList NstList_;

        //- Species mass fraction
        scalarFieldArray2d Y_;

        //- Species production rate
        scalarFieldArray2d W_;

        //- Temperature
        scalarFieldArray1d T_;

        //- Heat source
        scalarFieldArray1d Q_;

        //- Enthalpy
        scalarFieldArray1d h_;

        //- Density
        scalarFieldArray1d rho_;

        //- Specific gas constant for mean W
        scalarFieldArray1d Rgas_;


    // Private Member Functions

        //- Disallow Construct null
        FlameStructure();

        //- Disallow default bitwise copy construct
        FlameStructure(const FlameStructure&);

        //- Disallow default bitwise assignment
        void operator=(const FlameStructure&);

        //- limit value of alpha and beta
        void limitAB();


public:

    // Static data members

        //- Static data staticData
        // static const dataType staticData;


    // Constructors

        //- Construct from components
        FlameStructure(const dictionary &dict, const label nEta, const label nY);

        //- Construct from Istream
        FlameStructure(Istream&);

        //- Construct as copy
        // FlameStructure(const FlameStructure&);


    // Selectors

        //- Select null constructed
        // static autoPtr<FlameStructure> New();


    //- Destructor
    ~FlameStructure();


    // Member Functions

        // Access

            //- Select null constructed
            scalarFieldArray2d& Y() {return Y_;}

            //- Select null constructed
            scalarFieldArray2d& W() {return W_;}

            //- Select null constructed
            scalarFieldArray1d& T() {return T_;}

            //- Select null constructed
            scalarFieldArray1d& Q() {return Q_;}

            //- Select null constructed
            scalarFieldArray1d& rho() {return rho_;}

            //- Select null constructed
            scalarFieldArray1d& h() {return h_;}

            //- Select null constructed
            scalarFieldArray1d& Rgas() {return Rgas_;}

        // Check

        // Edit

        // Write


    // Member Operators

        // void operator=(const FlameStructure&);


    // Friend Functions

    // Friend Operators

    // IOstream Operators

        friend Istream& operator>>(Istream&, FlameStructure&);
        friend Ostream& operator<<(Ostream&, const FlameStructure&);
};


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

} // End namespace CMC
} // End namespace Foam

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

#include "FlameStructureI.H"

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

#endif

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