def build_header(dictobject="", version="2.3.x", fileclass="dictionary",
                 incl_foamfile=True):
    """Creates the header for an OpenFOAM dictionary. Inputs are the
    object and version."""
    txt = \
    r"""/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  {}                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/""".format(version)
    if incl_foamfile:
        txt += \
        r"""
FoamFile
{{
    version     2.0;
    format      ascii;
    class       {};
    object      {};
}}""".format(fileclass, dictobject)
    return txt