/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2512                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 0;

_mappedMixedField
{
    type            mappedMixedField;

    // What/how to sample:
    sampleMode      nearestPatchFaceAMI;

    // Simulation world to sample
    // Overwrite -> sampleWorld     slabN;

    // Region to sample
    sampleRegion    region0;

    // If sampleMode is nearestPatchFace : patch to find faces of
    samplePatch     to_top;

    // Use database to get data from (one-way or loose coupling in
    // combination with functionObject)
    //sampleDatabase    false;    //true;

    // According to offsetMode (see above) supply one of
    // offset, offsets or distance
    offset          (0 0 0);

    value           uniform 0.0;

    // For mappedMixed
    //weightField     DTV;
    refValue        $value;
    refGradient     uniform 0.0;
    valueFraction   uniform 1.0;
}


boundaryField
{
    top_to_1
    {
        $_mappedMixedField;
        sampleWorld     slab1;
    }

    top_to_2
    {
        $_mappedMixedField;
        sampleWorld     slab2;
    }

    top_to_3
    {
        $_mappedMixedField;
        sampleWorld     slab3;
    }

    top_to_4
    {
        $_mappedMixedField;
        sampleWorld     slab4;
    }

    top
    {
        type            zeroGradient;
    }

    interface
    {
        type            zeroGradient;
    }

    left
    {
        type            fixedValue;
        value           uniform 1.2;
    }

    right
    {
        type            fixedValue;
        value           uniform 0.2;
    }

    frontAndBack
    {
        type            empty;
    }
}

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