diff --git a/applications/solvers/finiteArea/liquidFilmFoam/Make/files b/applications/solvers/finiteArea/liquidFilmFoam/Make/files new file mode 100755 index 0000000000000000000000000000000000000000..39ee7f75e9fd96e69ec0014df7442229447acd91 --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/Make/files @@ -0,0 +1,3 @@ +liquidFilmFoam.C + +EXE = $(FOAM_APPBIN)/liquidFilmFoam diff --git a/applications/solvers/finiteArea/liquidFilmFoam/Make/options b/applications/solvers/finiteArea/liquidFilmFoam/Make/options new file mode 100755 index 0000000000000000000000000000000000000000..02549914ffc92d8b583348b725ec0206b9ba66df --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/cfdTools/general/lnInclude + +EXE_LIBS = \ + -lfiniteArea \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H b/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H new file mode 100644 index 0000000000000000000000000000000000000000..701b4635a11fabba02ec4fb6f6c20779eef66789 --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H @@ -0,0 +1,7 @@ +{ + // Stabilisation of friction factor calculation + // Friction factor is defined with standard gravity + frictionFactor.primitiveFieldRef() = + mag(2*9.81*sqr(manningField.primitiveField())/ + pow(mag(h.primitiveField()) + 1e-7, 1.0/3.0)); +} diff --git a/applications/solvers/finiteArea/liquidFilmFoam/capillaryCourantNo.H b/applications/solvers/finiteArea/liquidFilmFoam/capillaryCourantNo.H new file mode 100644 index 0000000000000000000000000000000000000000..8e66fd171f24aea459ddd3f72bc2479d9c93d3b5 --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/capillaryCourantNo.H @@ -0,0 +1,13 @@ +{ + scalar CoNumSigma = max + ( + sqrt + ( + 2*M_PI*sigma*sqr(aMesh.edgeInterpolation::deltaCoeffs()) + *aMesh.edgeInterpolation::deltaCoeffs() + /rhol + ) + ).value()*runTime.deltaT().value(); + + Info<< "Max Capillary Courant Number = " << CoNumSigma << '\n' << endl; +} diff --git a/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H b/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H new file mode 100644 index 0000000000000000000000000000000000000000..dba96b7fdc53d50a4caae75ac055d89bfb9d276c --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H @@ -0,0 +1,158 @@ + Info<< "Reading field h" << endl; + areaScalarField h + ( + IOobject + ( + "h", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + aMesh + ); + + + Info<< "Reading field Us" << endl; + areaVectorField Us + ( + IOobject + ( + "Us", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + aMesh + ); + + + edgeScalarField phis + ( + IOobject + ( + "phis", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + fac::interpolate(Us) & aMesh.Le() + ); + + + edgeScalarField phi2s + ( + IOobject + ( + "phi2s", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + fac::interpolate(h*Us) & aMesh.Le() + ); + + + const areaVectorField& Ns = aMesh.faceAreaNormals(); + areaVectorField Gs = g - Ns*(Ns & g); + areaScalarField Gn = mag(g - Gs); + + // Mass source + areaScalarField Sm + ( + IOobject + ( + "Sm", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + aMesh, + dimensionedScalar("Sm", dimLength/dimTime, 0) + ); + + // Mass sink + areaScalarField Sd + ( + IOobject + ( + "Sd", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + aMesh, + dimensionedScalar("Sd", dimLength/dimTime, 0) + ); + + areaVectorField Ug + ( + IOobject + ( + "Sg", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + aMesh, + dimensionedVector("Ug", dimVelocity, vector::zero) + ); + + + // Surface pressure + areaScalarField ps + ( + IOobject + ( + "ps", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + rhol*Gn*h - sigma*fac::laplacian(h) + ); + + // Friction factor + areaScalarField dotProduct + ( + aMesh.faceAreaNormals() & (g/mag(g)) + ); + + Info<< "View factor: min = " << min(dotProduct.internalField()) + << " max = " << max(dotProduct.internalField()) << endl; + + areaScalarField manningField + ( + IOobject + ( + "manningField", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + aMesh + ); + + areaScalarField frictionFactor + ( + IOobject + ( + "frictionFactor", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + aMesh, + dimensionedScalar("one", dimless, 0.01) + ); + + aMesh.schemesDict().setFluxRequired("h"); diff --git a/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H b/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H new file mode 100644 index 0000000000000000000000000000000000000000..788b155588bee39bb83c0d2d7617dcadeedb60cb --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H @@ -0,0 +1,31 @@ +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedVector("0", dimVelocity, vector::zero) +); + + +volScalarField H +( + IOobject + ( + "H", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("0", dimLength, 0) +); + +// Create volume-to surface mapping object +volSurfaceMapping vsm(aMesh); diff --git a/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C b/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..ce1b06fb8e2bd173c8ddf8c7bc2a05c4edaef55f --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/liquidFilmFoam.C @@ -0,0 +1,155 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Application + liquidFilmFoam + +Description + Transient solver for incompressible, laminar flow of Newtonian fluids in + liquid film formulation. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "faCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFaMesh.H" + #include "readGravitationalAcceleration.H" + #include "readTransportProperties.H" + #include "createFaFields.H" + #include "createFvFields.H" + #include "createTimeControls.H" + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readSolutionControls.H" + #include "readTimeControls.H" + #include "surfaceCourantNo.H" + #include "capillaryCourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + while (runTime.loop()) + { + phi2s = fac::interpolate(h)*phis; + + #include "calcFrictionFactor.H" + + faVectorMatrix UsEqn + ( + fam::ddt(h, Us) + + fam::div(phi2s, Us) + + fam::Sp(0.0125*frictionFactor*mag(Us), Us) + == + Gs*h + - fam::Sp(Sd, Us) + ); + + UsEqn.relax(); + solve(UsEqn == - fac::grad(ps*h)/rhol + ps*fac::grad(h)/rhol); + + areaScalarField UsA = UsEqn.A(); + + Us = UsEqn.H()/UsA; + Us.correctBoundaryConditions(); + + phis = (fac::interpolate(Us) & aMesh.Le()) + - fac::interpolate(1.0/(rhol*UsA)) + *fac::lnGrad(ps*h)*aMesh.magLe() + + fac::interpolate(ps/(rhol*UsA)) + *fac::lnGrad(h)*aMesh.magLe(); + + faScalarMatrix hEqn + ( + fam::ddt(h) + + fam::div(phis, h) + == + Sm + - fam::Sp + ( + Sd/(h + dimensionedScalar("small", dimLength, SMALL)), + h + ) + ); + + hEqn.relax(); + hEqn.solve(); + + phi2s = hEqn.flux(); + + // Bound h + h.primitiveFieldRef() = max + ( + max + ( + h.primitiveField(), + fac::average(max(h, h0))().primitiveField() + *pos(h0.value() - h.primitiveField()) + ), + h0.value() + ); + + ps = rhol*Gn*h - sigma*fac::laplacian(h); + ps.correctBoundaryConditions(); + + Us -= (1.0/(rhol*UsA))*fac::grad(ps*h) + - (ps/(rhol*UsA))*fac::grad(h); + Us.correctBoundaryConditions(); + } + + if (runTime.outputTime()) + { + vsm.mapToVolume(h, H.boundaryFieldRef()); + vsm.mapToVolume(Us, U.boundaryFieldRef()); + + runTime.write(); + } + + Info<< "ExecutionTime = " + << scalar(runTime.elapsedCpuTime()) + << " s\n" << endl << endl; + } + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/finiteArea/liquidFilmFoam/readSolutionControls.H b/applications/solvers/finiteArea/liquidFilmFoam/readSolutionControls.H new file mode 100644 index 0000000000000000000000000000000000000000..dda7bf0d8279643e1700a92a3a00667448d79611 --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/readSolutionControls.H @@ -0,0 +1,13 @@ +int nCorr = 0; + +if (aMesh.solutionDict().found("nOuterCorrectors")) +{ + nCorr = + readInt(aMesh.solutionDict().lookup("nOuterCorrectors")); +} +else +{ + FatalErrorIn(args.executable()) + << "Cannot find number of correctors" + << abort(FatalError); +} diff --git a/applications/solvers/finiteArea/liquidFilmFoam/readTransportProperties.H b/applications/solvers/finiteArea/liquidFilmFoam/readTransportProperties.H new file mode 100644 index 0000000000000000000000000000000000000000..2f2c99ffda77789e16235e7e8213a0dcd0e874c6 --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/readTransportProperties.H @@ -0,0 +1,41 @@ +IOdictionary transportProperties +( + IOobject + ( + "transportProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) +); + +dimensionedScalar mug +( + transportProperties.lookup("mug") +); + +dimensionedScalar mul +( + transportProperties.lookup("mul") +); + +dimensionedScalar sigma +( + transportProperties.lookup("sigma") +); + +dimensionedScalar rhol +( + transportProperties.lookup("rhol") +); + +dimensionedScalar rhog +( + transportProperties.lookup("rhog") +); + +dimensionedScalar h0 +( + transportProperties.lookup("h0") +); diff --git a/applications/solvers/finiteArea/liquidFilmFoam/surfaceCourantNo.H b/applications/solvers/finiteArea/liquidFilmFoam/surfaceCourantNo.H new file mode 100644 index 0000000000000000000000000000000000000000..b73cadb0b23627f007cd812e8e26ce69fe00dd0d --- /dev/null +++ b/applications/solvers/finiteArea/liquidFilmFoam/surfaceCourantNo.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Global + surfaceCourantNo + +Author + Hrvoje Jasak, Wikki Ltd. + +Description + Calculates and outputs the mean and maximum Courant Numbers for the + Finite Area method. + +\*---------------------------------------------------------------------------*/ + +scalar CoNum = 0.0; +scalar meanCoNum = 0.0; +scalar velMag = 0.0; + +if (aMesh.nInternalEdges()) +{ + edgeScalarField SfUfbyDelta = + aMesh.edgeInterpolation::deltaCoeffs()*mag(phis); + + CoNum = max(SfUfbyDelta/aMesh.magLe()) + .value()*runTime.deltaT().value(); + + meanCoNum = (sum(SfUfbyDelta)/sum(aMesh.magLe())) + .value()*runTime.deltaT().value(); + + velMag = max(mag(phis)/aMesh.magLe()).value(); +} + +Info<< "Courant Number mean: " << meanCoNum + << " max: " << CoNum + << " velocity magnitude: " << velMag << endl; + +// ************************************************************************* // diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/Make/files b/applications/solvers/finiteArea/sphereSurfactantFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..574a497031f858abb4cc989b38b2692bb48ab3b7 --- /dev/null +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/Make/files @@ -0,0 +1,3 @@ +surfactantFoam.C + +EXE = $(FOAM_USER_APPBIN)/sphereSurfactantFoam diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/Make/options b/applications/solvers/finiteArea/sphereSurfactantFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..02549914ffc92d8b583348b725ec0206b9ba66df --- /dev/null +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/cfdTools/general/lnInclude + +EXE_LIBS = \ + -lfiniteArea \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H new file mode 100644 index 0000000000000000000000000000000000000000..4ec416f95b6ee4f3ee14b89c2b285316191bb76f --- /dev/null +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H @@ -0,0 +1,78 @@ +Info<< "Reading field Cs" << endl; +areaScalarField Cs +( + IOobject + ( + "Cs", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + aMesh +); + +dimensioned<scalar> Cs0 +( + "Cs0", + dimensionSet(1, -2, 0, 0, 0, 0, 0), + 1.0 +); + +const areaVectorField& R = aMesh.areaCentres(); + +Cs = Cs0*(1.0 + R.component(vector::X)/mag(R)); + + +dimensioned<scalar> Ds +( + "Ds", + dimensionSet(0, 2, -1, 0, 0, 0, 0), + 1.0 +); + + +areaVectorField Us +( + IOobject + ( + "Us", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + aMesh, + dimensioned<vector>("Us", dimVelocity, vector::zero) +); + +dimensioned<scalar> Uinf("Uinf", dimVelocity, 1.0); + +forAll (Us, faceI) +{ + Us[faceI].x() = + Uinf.value()*(0.25*(3.0 + sqr(R[faceI].x()/mag(R[faceI]))) - 1.0); + + Us[faceI].y() = + Uinf.value()*0.25*R[faceI].x()*R[faceI].y()/sqr(mag(R[faceI])); + + Us[faceI].z() = + Uinf.value()*0.25*R[faceI].x()*R[faceI].z()/sqr(mag(R[faceI])); +} + +Us -= aMesh.faceAreaNormals()*(aMesh.faceAreaNormals() & Us); + + +edgeScalarField phis +( + IOobject + ( + "phis", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + linearEdgeInterpolate(Us) & aMesh.Le() +); + diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createFaMesh.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createFaMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..905c8e7405cc918d0b3c4fd25557c3fb79788078 --- /dev/null +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/createFaMesh.H @@ -0,0 +1,2 @@ + // Create Finite Area mesh + faMesh aMesh(mesh); diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H new file mode 100644 index 0000000000000000000000000000000000000000..fed56e0409da47a092e5cd4b24a1ac4a3aeb2ba0 --- /dev/null +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H @@ -0,0 +1,36 @@ + // Create volume-to surface mapping object + volSurfaceMapping vsm(aMesh); + + volScalarField Cvf + ( + IOobject + ( + "Cvf", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("0", dimless/dimLength, 0) + ); + + vsm.mapToVolume(Cs, Cvf.boundaryFieldRef()); + Cvf.write(); + + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedVector("zero", dimVelocity, vector::zero) + ); + + vsm.mapToVolume(Us, U.boundaryFieldRef()); + U.write(); diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C b/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..e99f01b19aeb93d0095b66d1b32de9da7b105ead --- /dev/null +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/surfactantFoam.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Application + surfactantFoam for sphere transport + +Description + Passive scalar transport equation solver on a sphere + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "faCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + + #include "createFaMesh.H" + #include "createFaFields.H" + #include "createVolFields.H" + + Info<< "Total mass of surfactant: " + << sum(Cs.internalField()*aMesh.S()) << endl; + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.loop()) + { + Info<< "Time = " << runTime.value() << endl; + + faScalarMatrix CsEqn + ( + fam::ddt(Cs) + + fam::div(phis, Cs) + - fam::laplacian(Ds, Cs) + ); + + CsEqn.solve(); + + if (runTime.outputTime()) + { + vsm.mapToVolume(Cs, Cvf.boundaryFieldRef()); + + runTime.write(); + } + + Info<< "Total mass of surfactant: " + << sum(Cs.internalField()*aMesh.S()) << endl; + + Info<< "ExecutionTime = " + << scalar(runTime.elapsedCpuTime()) + << " s\n" << endl << endl; + } + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/finiteArea/surfactantFoam/Make/files b/applications/solvers/finiteArea/surfactantFoam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..b4086fd8250b43878872a99f7727c6feb443876d --- /dev/null +++ b/applications/solvers/finiteArea/surfactantFoam/Make/files @@ -0,0 +1,3 @@ +surfactantFoam.C + +EXE = $(FOAM_APPBIN)/surfactantFoam diff --git a/applications/solvers/finiteArea/surfactantFoam/Make/options b/applications/solvers/finiteArea/surfactantFoam/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..02549914ffc92d8b583348b725ec0206b9ba66df --- /dev/null +++ b/applications/solvers/finiteArea/surfactantFoam/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/cfdTools/general/lnInclude + +EXE_LIBS = \ + -lfiniteArea \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/finiteArea/surfactantFoam/createFaFields.H b/applications/solvers/finiteArea/surfactantFoam/createFaFields.H new file mode 100644 index 0000000000000000000000000000000000000000..a285b21cee0cd930f7024973f84659e40a690219 --- /dev/null +++ b/applications/solvers/finiteArea/surfactantFoam/createFaFields.H @@ -0,0 +1,63 @@ +Info<< "Reading field Cs" << endl; +areaScalarField Cs +( + IOobject + ( + "Cs", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + aMesh +); + +Info<< "Reading transportProperties\n" << endl; + +IOdictionary transportProperties +( + IOobject + ( + "transportProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) +); + + +Info<< "Reading diffusivity D\n" << endl; + +dimensionedScalar Ds +( + transportProperties.lookup("Ds") +); + +areaVectorField Us +( + IOobject + ( + "Us", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + aMesh +); + + +edgeScalarField phis +( + IOobject + ( + "phis", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + linearEdgeInterpolate(Us) & aMesh.Le() +); + diff --git a/applications/solvers/finiteArea/surfactantFoam/createFaMesh.H b/applications/solvers/finiteArea/surfactantFoam/createFaMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..905c8e7405cc918d0b3c4fd25557c3fb79788078 --- /dev/null +++ b/applications/solvers/finiteArea/surfactantFoam/createFaMesh.H @@ -0,0 +1,2 @@ + // Create Finite Area mesh + faMesh aMesh(mesh); diff --git a/applications/solvers/finiteArea/surfactantFoam/createVolFields.H b/applications/solvers/finiteArea/surfactantFoam/createVolFields.H new file mode 100644 index 0000000000000000000000000000000000000000..fed56e0409da47a092e5cd4b24a1ac4a3aeb2ba0 --- /dev/null +++ b/applications/solvers/finiteArea/surfactantFoam/createVolFields.H @@ -0,0 +1,36 @@ + // Create volume-to surface mapping object + volSurfaceMapping vsm(aMesh); + + volScalarField Cvf + ( + IOobject + ( + "Cvf", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("0", dimless/dimLength, 0) + ); + + vsm.mapToVolume(Cs, Cvf.boundaryFieldRef()); + Cvf.write(); + + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedVector("zero", dimVelocity, vector::zero) + ); + + vsm.mapToVolume(Us, U.boundaryFieldRef()); + U.write(); diff --git a/applications/solvers/finiteArea/surfactantFoam/surfactantFoam.C b/applications/solvers/finiteArea/surfactantFoam/surfactantFoam.C new file mode 100644 index 0000000000000000000000000000000000000000..c72984127c3098c0bd85762a08cb56893892d809 --- /dev/null +++ b/applications/solvers/finiteArea/surfactantFoam/surfactantFoam.C @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Application + surfactantFoam + +Group + grpBasicSolvers + +Description + Passive scalar transport equation solver. + + \heading Solver details + The equation is given by: + + \f[ + \ddt{Cs} + \div \left(\vec{U} Cs\right) - \div \left(D_T \grad Cs \right) + = 0 + \f] + + Where: + \vartable + Cs | Passive scalar + Ds | Diffusion coefficient + \endvartable + + \heading Required fields + \plaintable + Cs | Passive scalar + Us | Velocity [m/s] + \endplaintable + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "faCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFaMesh.H" + #include "createFaFields.H" + #include "createVolFields.H" + + Info<< "Total mass of surfactant: " + << sum(Cs.internalField()*aMesh.S()) << endl; + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.loop()) + { + Info<< "Time = " << runTime.value() << endl; + + faScalarMatrix CsEqn + ( + fam::ddt(Cs) + + fam::div(phis, Cs) + - fam::laplacian(Ds, Cs) + ); + + CsEqn.solve(); + + if (runTime.outputTime()) + { + vsm.mapToVolume(Cs, Cvf.boundaryFieldRef()); + + runTime.write(); + } + + Info<< "Total mass of surfactant: " + << sum(Cs.internalField()*aMesh.S()) << endl; + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/utilities/finiteArea/checkFaMesh/Make/files b/applications/utilities/finiteArea/checkFaMesh/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..14a2b163969f4cfbafc19e98d07784c9cbb34f81 --- /dev/null +++ b/applications/utilities/finiteArea/checkFaMesh/Make/files @@ -0,0 +1,3 @@ +checkFaMesh.C + +EXE = $(FOAM_APPBIN)/checkFaMesh diff --git a/applications/utilities/finiteArea/checkFaMesh/Make/options b/applications/utilities/finiteArea/checkFaMesh/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..7ab09dc4b6e00bb5c4a20fc377572e899036f61f --- /dev/null +++ b/applications/utilities/finiteArea/checkFaMesh/Make/options @@ -0,0 +1,9 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lfiniteArea diff --git a/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C b/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C new file mode 100644 index 0000000000000000000000000000000000000000..27b8990e5e943d0b2a74009ce28182980422ff6b --- /dev/null +++ b/applications/utilities/finiteArea/checkFaMesh/checkFaMesh.C @@ -0,0 +1,83 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Application + makeFaMesh + +Description + Check a Finite Area mesh + +Author + Zeljko Tukovic, FAMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "faCFD.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ +# include "addRegionOption.H" + +# include "setRootCase.H" +# include "createTime.H" +# include "createNamedMesh.H" +# include "createFaMesh.H" + + Info<< "Time = " << runTime.timeName() << nl << endl; + + // General mesh statistics + Info<< "Number of points: " << aMesh.nPoints() << nl + << "Number of internal edges: " << aMesh.nInternalEdges() << nl + << "Number of edges: " << aMesh.nEdges() << nl + << "Number of faces: " << aMesh.nFaces() << nl + << endl; + + // Check geometry + Info<< "Face area: min = " << min(aMesh.S().field()) + << " max = " << max(aMesh.S().field()) << nl + << "Internal edge length: min = " + << min(aMesh.magLe().internalField()) << nl + << " max = " << max(aMesh.magLe().internalField()) << nl + << "Edge length: min = " + << min(aMesh.magLe()).value() << nl + << " max = " << max(aMesh.magLe()).value() << nl + << "Face area normals: min = " << min(aMesh.faceAreaNormals().field()) + << " max = " << max(aMesh.faceAreaNormals().field()) << nl + << endl; + + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/utilities/finiteArea/makeFaMesh/Make/files b/applications/utilities/finiteArea/makeFaMesh/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..fbd0f40cd06ba3261bf2ba47ec77e520813a9026 --- /dev/null +++ b/applications/utilities/finiteArea/makeFaMesh/Make/files @@ -0,0 +1,3 @@ +makeFaMesh.C + +EXE = $(FOAM_APPBIN)/makeFaMesh diff --git a/applications/utilities/finiteArea/makeFaMesh/Make/options b/applications/utilities/finiteArea/makeFaMesh/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..98ba4f7225daeac475fec261a9a17f85c892c959 --- /dev/null +++ b/applications/utilities/finiteArea/makeFaMesh/Make/options @@ -0,0 +1,8 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteArea/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/cfdTools/general/lnInclude + +EXE_LIBS = \ + -lfiniteArea \ + -lfiniteVolume diff --git a/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C b/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C new file mode 100644 index 0000000000000000000000000000000000000000..5440932530d64b6e8cb637afd76146485e00dda7 --- /dev/null +++ b/applications/utilities/finiteArea/makeFaMesh/makeFaMesh.C @@ -0,0 +1,356 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Application + makeFaMesh + +Description + A mesh generator for finite area mesh. + +Author + Zeljko Tukovic, FAMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#include "objectRegistry.H" +#include "Time.H" +#include "argList.H" +#include "OSspecific.H" +#include "faMesh.H" +#include "fvMesh.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +class faPatchData +{ +public: + word name_; + word type_; + dictionary dict_; + label ownPolyPatchID_; + label ngbPolyPatchID_; + labelList edgeLabels_; + faPatchData() + : + name_(word::null), + type_(word::null), + ownPolyPatchID_(-1), + ngbPolyPatchID_(-1) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ +# include "addRegionOption.H" + +# include "setRootCase.H" +# include "createTime.H" +# include "createNamedMesh.H" + + // Reading faMeshDefinition dictionary + IOdictionary faMeshDefinition + ( + IOobject + ( + "faMeshDefinition", + runTime.constant(), + "faMesh", + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + wordList polyMeshPatches + ( + faMeshDefinition.lookup("polyMeshPatches") + ); + + dictionary bndDict = faMeshDefinition.subDict("boundary"); + + wordList faPatchNames = bndDict.toc(); + + List<faPatchData> faPatches(faPatchNames.size()+1); + + forAll (faPatchNames, patchI) + { + dictionary curPatchDict = + bndDict.subDict(faPatchNames[patchI]); + + faPatches[patchI].name_ = faPatchNames[patchI]; + + faPatches[patchI].type_ = + word(curPatchDict.lookup("type")); + + word ownName = curPatchDict.lookup("ownerPolyPatch"); + + faPatches[patchI].ownPolyPatchID_ = + mesh.boundaryMesh().findPatchID(ownName); + + if ( faPatches[patchI].ownPolyPatchID_ < 0 ) + { + FatalErrorIn("makeFaMesh:") + << "neighbourPolyPatch " << ownName << " does not exist" + << exit(FatalError); + } + + word neiName = curPatchDict.lookup("neighbourPolyPatch"); + + faPatches[patchI].ngbPolyPatchID_ = + mesh.boundaryMesh().findPatchID(neiName); + + if ( faPatches[patchI].ngbPolyPatchID_ < 0 ) + { + FatalErrorIn("makeFaMesh:") + << "neighbourPolyPatch " << neiName << " does not exist" + << exit(FatalError); + } + } + + // Setting faceLabels list size + label size = 0; + + labelList patchIDs(polyMeshPatches.size(), -1); + + forAll (polyMeshPatches, patchI) + { + patchIDs[patchI] = + mesh.boundaryMesh().findPatchID(polyMeshPatches[patchI]); + + if ( patchIDs[patchI] < 0 ) + { + FatalErrorIn("makeFaMesh:") + << "Patch " << polyMeshPatches[patchI] << " does not exist" + << exit(FatalError); + } + + size += mesh.boundaryMesh()[patchIDs[patchI]].size(); + } + + labelList faceLabels(size, -1); + + sort(patchIDs); + + + // Filling of faceLabels list + label faceI = -1; + + forAll (polyMeshPatches, patchI) + { + label start = mesh.boundaryMesh()[patchIDs[patchI]].start(); + + label size = mesh.boundaryMesh()[patchIDs[patchI]].size(); + + for(label i = 0; i < size; i++) + { + faceLabels[++faceI] = start + i; + } + } + + // Creating faMesh + Info << "Create faMesh ... "; + + faMesh areaMesh + ( + mesh, + faceLabels + ); + Info << "Done" << endl; + + + // Determination of faPatch ID for each boundary edge. + // Result is in the bndEdgeFaPatchIDs list + const indirectPrimitivePatch& patch = areaMesh.patch(); + + labelList faceCells(faceLabels.size(), -1); + + forAll (faceCells, faceI) + { + label faceID = faceLabels[faceI]; + + faceCells[faceI] = mesh.faceOwner()[faceID]; + } + + labelList meshEdges = + patch.meshEdges + ( + mesh.edges(), + mesh.cellEdges(), + faceCells + ); + + const labelListList& edgeFaces = mesh.edgeFaces(); + + const label nTotalEdges = patch.nEdges(); + const label nInternalEdges = patch.nInternalEdges(); + + labelList bndEdgeFaPatchIDs(nTotalEdges - nInternalEdges, -1); + + for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++) + { + label curMeshEdge = meshEdges[edgeI]; + + labelList curEdgePatchIDs(2, -1); + + label patchI = -1; + + forAll (edgeFaces[curMeshEdge], faceI) + { + label curFace = edgeFaces[curMeshEdge][faceI]; + + label curPatchID = mesh.boundaryMesh().whichPatch(curFace); + + if (curPatchID != -1) + { + curEdgePatchIDs[++patchI] = curPatchID; + } + } + + for(label pI = 0; pI < faPatches.size() - 1; pI++) + { + if + ( + ( + curEdgePatchIDs[0] == faPatches[pI].ownPolyPatchID_ + && curEdgePatchIDs[1] == faPatches[pI].ngbPolyPatchID_ + ) + || + ( + curEdgePatchIDs[1] == faPatches[pI].ownPolyPatchID_ + && curEdgePatchIDs[0] == faPatches[pI].ngbPolyPatchID_ + ) + ) + { + bndEdgeFaPatchIDs[edgeI - nInternalEdges] = pI; + break; + } + } + } + + + // Set edgeLabels for each faPatch + for(label pI=0; pI<(faPatches.size()-1); pI++) + { + SLList<label> tmpList; + + forAll (bndEdgeFaPatchIDs, eI) + { + if (bndEdgeFaPatchIDs[eI] == pI) + { + tmpList.append(nInternalEdges + eI); + } + } + + faPatches[pI].edgeLabels_ = tmpList; + } + + // Check for undefined edges + SLList<label> tmpList; + + forAll (bndEdgeFaPatchIDs, eI) + { + if (bndEdgeFaPatchIDs[eI] == -1) + { + tmpList.append(nInternalEdges + eI); + } + } + + if (tmpList.size() > 0) + { + label pI = faPatches.size()-1; + + faPatches[pI].name_ = "undefined"; + faPatches[pI].type_ = "patch"; + faPatches[pI].edgeLabels_ = tmpList; + } + + // Add good patches to faMesh + SLList<faPatch*> faPatchLst; + + for(label pI = 0; pI < faPatches.size(); pI++) + { + faPatches[pI].dict_.add("type", faPatches[pI].type_); + faPatches[pI].dict_.add("edgeLabels", faPatches[pI].edgeLabels_); + faPatches[pI].dict_.add + ( + "ngbPolyPatchIndex", + faPatches[pI].ngbPolyPatchID_ + ); + + if(faPatches[pI].edgeLabels_.size() > 0) + { + faPatchLst.append + ( + faPatch::New + ( + faPatches[pI].name_, + faPatches[pI].dict_, + pI, + areaMesh.boundary() + ).ptr() + ); + } + } + + if (args.optionFound("addEmptyPatch")) + { + word emptyPatchName(args.optionLookup("addEmptyPatch")()); + dictionary emptyPatchDict; + emptyPatchDict.add("type", "empty"); + emptyPatchDict.add("edgeLabels", labelList()); + emptyPatchDict.add("ngbPolyPatchIndex", -1); + + faPatchLst.append + ( + faPatch::New + ( + emptyPatchName, + emptyPatchDict, + faPatchLst.size(), + areaMesh.boundary() + ).ptr() + ); + } + + Info << "Add faPatches ... "; + areaMesh.addFaPatches(List<faPatch*>(faPatchLst)); + Info << "Done" << endl; + + // Writing faMesh + Info << "Write finite area mesh ... "; + areaMesh.write(); + + Info << "Done" << endl; + + return(0); +} + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/Make/files b/applications/utilities/parallelProcessing/decomposePar/Make/files index cad5ac1ce3fba213b585ad2d7e3dff96b3bb9054..8f6475590edfe898786a67be9199f02bdfbddcce 100644 --- a/applications/utilities/parallelProcessing/decomposePar/Make/files +++ b/applications/utilities/parallelProcessing/decomposePar/Make/files @@ -4,6 +4,8 @@ domainDecompositionMesh.C domainDecompositionDistribute.C dimFieldDecomposer.C pointFieldDecomposer.C +faMeshDecomposition.C +faFieldDecomposer.C lagrangianFieldDecomposer.C EXE = $(FOAM_APPBIN)/decomposePar diff --git a/applications/utilities/parallelProcessing/decomposePar/Make/options b/applications/utilities/parallelProcessing/decomposePar/Make/options index 7e74790e00d943133bf8c778fb538b16c218e400..356c74b40f233e7b8c32d9326db975aa8dd67d87 100644 --- a/applications/utilities/parallelProcessing/decomposePar/Make/options +++ b/applications/utilities/parallelProcessing/decomposePar/Make/options @@ -2,6 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/finiteArea/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -14,6 +15,7 @@ EXE_LIBS = \ -ldecompositionMethods \ -L$(FOAM_LIBBIN)/dummy \ -lkahipDecomp -lmetisDecomp -lscotchDecomp \ + -lfiniteArea \ -llagrangian \ -ldynamicMesh \ -lregionModels diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 37de5137e73b1bb5e2bac4c7ba471c400fac96c7..d4df33c02e5ca7f284f25c9bdfe319d1c8c1491d 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -106,6 +106,11 @@ Usage #include "decompositionModel.H" #include "collatedFileOperation.H" +#include "faCFD.H" +#include "emptyFaPatch.H" +#include "faMeshDecomposition.H" +#include "faFieldDecomposer.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -1239,6 +1244,178 @@ int main(int argc, char *argv[]) processorDbList.set(proci, nullptr); } } + + // Finite area mesh and field decomposition + + IOobject faMeshBoundaryIOobj + ( + "faBoundary", + mesh.time().findInstance + ( + mesh.dbDir()/polyMesh::meshSubDir, + "boundary" + ), + faMesh::meshSubDir, + mesh, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ); + + + if (faMeshBoundaryIOobj.typeHeaderOk<faBoundaryMesh>(true)) + { + Info << "\nFinite area mesh decomposition" << endl; + + faMeshDecomposition aMesh(mesh); + + aMesh.decomposeMesh(); + + aMesh.writeDecomposition(); + + + // Construct the area fields + // ~~~~~~~~~~~~~~~~~~~~~~~~ + PtrList<areaScalarField> areaScalarFields; + readFields(aMesh, objects, areaScalarFields); + + PtrList<areaVectorField> areaVectorFields; + readFields(aMesh, objects, areaVectorFields); + + PtrList<areaSphericalTensorField> areaSphericalTensorFields; + readFields(aMesh, objects, areaSphericalTensorFields); + + PtrList<areaSymmTensorField> areaSymmTensorFields; + readFields(aMesh, objects, areaSymmTensorFields); + + PtrList<areaTensorField> areaTensorFields; + readFields(aMesh, objects, areaTensorFields); + + + // Construct the edge fields + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + PtrList<edgeScalarField> edgeScalarFields; + readFields(aMesh, objects, edgeScalarFields); + + Info << endl; + + // Split the fields over processors + for (label procI = 0; procI < mesh.nProcs(); procI++) + { + Info<< "Processor " << procI + << ": finite area field transfer" << endl; + + // open the database + Time processorDb + ( + Time::controlDictName, + args.rootPath(), + args.caseName()/ + fileName(word("processor") + name(procI)) + ); + + processorDb.setTime(runTime); + + // Read the mesh + fvMesh procFvMesh + ( + IOobject + ( + regionName, + processorDb.timeName(), + processorDb + ) + ); + + faMesh procMesh(procFvMesh); + + // // Does not work. HJ, 15/Aug/2017 + // const labelIOList& faceProcAddressing = + // procAddressing + // ( + // procMeshList, + // procI, + // "faceProcAddressing", + // faceProcAddressingList + // ); + + // const labelIOList& boundaryProcAddressing = + // procAddressing + // ( + // procMeshList, + // procI, + // "boundaryProcAddressing", + // boundaryProcAddressingList + // ); + + labelIOList faceProcAddressing + ( + IOobject + ( + "faceProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + labelIOList boundaryProcAddressing + ( + IOobject + ( + "boundaryProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + // FA fields + if + ( + areaScalarFields.size() + || areaVectorFields.size() + || areaSphericalTensorFields.size() + || areaSymmTensorFields.size() + || areaTensorFields.size() + || edgeScalarFields.size() + ) + { + labelIOList edgeProcAddressing + ( + IOobject + ( + "edgeProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + faFieldDecomposer fieldDecomposer + ( + aMesh, + procMesh, + edgeProcAddressing, + faceProcAddressing, + boundaryProcAddressing + ); + + fieldDecomposer.decomposeFields(areaScalarFields); + fieldDecomposer.decomposeFields(areaVectorFields); + fieldDecomposer.decomposeFields(areaSphericalTensorFields); + fieldDecomposer.decomposeFields(areaSymmTensorFields); + fieldDecomposer.decomposeFields(areaTensorFields); + + fieldDecomposer.decomposeFields(edgeScalarFields); + } + } + } } } } diff --git a/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposer.C new file mode 100644 index 0000000000000000000000000000000000000000..80d94f900cc0fb3124bb9aecb7f340327f420466 --- /dev/null +++ b/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposer.C @@ -0,0 +1,238 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faFieldDecomposer.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +faFieldDecomposer::patchFieldDecomposer::patchFieldDecomposer +( + const label sizeBeforeMapping, + const labelUList& addressingSlice, + const label addressingOffset +) +: + sizeBeforeMapping_(sizeBeforeMapping), + directAddressing_(addressingSlice) +{ + forAll (directAddressing_, i) + { + // Subtract one to align addressing. + // directAddressing_[i] -= addressingOffset + 1; + // ZT, 12/Nov/2010 + directAddressing_[i] -= addressingOffset; + } +} + + +faFieldDecomposer::processorAreaPatchFieldDecomposer:: +processorAreaPatchFieldDecomposer +( + const faMesh& mesh, + const labelUList& addressingSlice +) +: + sizeBeforeMapping_(mesh.nFaces()), + addressing_(addressingSlice.size()), + weights_(addressingSlice.size()) +{ + const scalarField& weights = mesh.weights().internalField(); + const labelList& own = mesh.edgeOwner(); + const labelList& neighb = mesh.edgeNeighbour(); + + forAll (addressing_, i) + { + // Subtract one to align addressing. + label ai = addressingSlice[i]; +// label ai = mag(addressingSlice[i]) - 1; + + if (ai < neighb.size()) + { + // This is a regular edge. it has been an internal edge + // of the original mesh and now it has become a edge + // on the parallel boundary + addressing_[i].setSize(2); + weights_[i].setSize(2); + + addressing_[i][0] = own[ai]; + addressing_[i][1] = neighb[ai]; + + weights_[i][0] = weights[ai]; + weights_[i][1] = 1.0 - weights[ai]; + } + else + { + // This is a edge that used to be on a cyclic boundary + // but has now become a parallel patch edge. I cannot + // do the interpolation properly (I would need to look + // up the different (edge) list of data), so I will + // just grab the value from the owner face + // + addressing_[i].setSize(1); + weights_[i].setSize(1); + + addressing_[i][0] = own[ai]; + + weights_[i][0] = 1.0; + } + } +} + + +faFieldDecomposer::processorEdgePatchFieldDecomposer:: +processorEdgePatchFieldDecomposer +( + label sizeBeforeMapping, + const labelUList& addressingSlice +) +: + sizeBeforeMapping_(sizeBeforeMapping), + addressing_(addressingSlice.size()), + weights_(addressingSlice.size()) +{ + forAll (addressing_, i) + { + addressing_[i].setSize(1); + weights_[i].setSize(1); + + addressing_[i][0] = mag(addressingSlice[i]) - 1; + weights_[i][0] = sign(addressingSlice[i]); + } +} + + +faFieldDecomposer::faFieldDecomposer +( + const faMesh& completeMesh, + const faMesh& procMesh, + const labelList& edgeAddressing, + const labelList& faceAddressing, + const labelList& boundaryAddressing +) +: + completeMesh_(completeMesh), + procMesh_(procMesh), + edgeAddressing_(edgeAddressing), + faceAddressing_(faceAddressing), + boundaryAddressing_(boundaryAddressing), + patchFieldDecomposerPtrs_ + ( + procMesh_.boundary().size(), + static_cast<patchFieldDecomposer*>(NULL) + ), + processorAreaPatchFieldDecomposerPtrs_ + ( + procMesh_.boundary().size(), + static_cast<processorAreaPatchFieldDecomposer*>(NULL) + ), + processorEdgePatchFieldDecomposerPtrs_ + ( + procMesh_.boundary().size(), + static_cast<processorEdgePatchFieldDecomposer*>(NULL) + ) +{ + forAll (boundaryAddressing_, patchi) + { + if (boundaryAddressing_[patchi] >= 0) + { + patchFieldDecomposerPtrs_[patchi] = new patchFieldDecomposer + ( + completeMesh_.boundary()[boundaryAddressing_[patchi]].size(), + procMesh_.boundary()[patchi].patchSlice(edgeAddressing_), +// completeMesh_.boundaryMesh() + completeMesh_.boundary() + [ + boundaryAddressing_[patchi] + ].start() + ); + } + else + { + processorAreaPatchFieldDecomposerPtrs_[patchi] = + new processorAreaPatchFieldDecomposer + ( + completeMesh_, + procMesh_.boundary()[patchi].patchSlice(edgeAddressing_) + ); + + processorEdgePatchFieldDecomposerPtrs_[patchi] = + new processorEdgePatchFieldDecomposer + ( + procMesh_.boundary()[patchi].size(), + static_cast<const labelUList&> + ( + procMesh_.boundary()[patchi].patchSlice + ( + edgeAddressing_ + ) + ) + ); + } + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +faFieldDecomposer::~faFieldDecomposer() +{ + forAll (patchFieldDecomposerPtrs_, patchi) + { + if (patchFieldDecomposerPtrs_[patchi]) + { + delete patchFieldDecomposerPtrs_[patchi]; + } + } + + forAll (processorAreaPatchFieldDecomposerPtrs_, patchi) + { + if (processorAreaPatchFieldDecomposerPtrs_[patchi]) + { + delete processorAreaPatchFieldDecomposerPtrs_[patchi]; + } + } + + forAll (processorEdgePatchFieldDecomposerPtrs_, patchi) + { + if (processorEdgePatchFieldDecomposerPtrs_[patchi]) + { + delete processorEdgePatchFieldDecomposerPtrs_[patchi]; + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposer.H b/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposer.H new file mode 100644 index 0000000000000000000000000000000000000000..08f9b4a3855a344c8c8522d2b8652a169bc10f67 --- /dev/null +++ b/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposer.H @@ -0,0 +1,319 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faFieldDecomposer + +Description + Finite Area area and edge field decomposer. + +Author + Zeljko Tukovic, FSB Zagreb + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faFieldDecomposer.C + faFieldDecomposerDecomposeFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faFieldDecomposer_H +#define faFieldDecomposer_H + +#include "faMesh.H" +#include "faPatchFieldMapper.H" +#include "edgeFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class IOobjectList; + +/*---------------------------------------------------------------------------*\ + Class faFieldDecomposer Declaration +\*---------------------------------------------------------------------------*/ + +class faFieldDecomposer +{ +public: + + //- Patch field decomposer class + class patchFieldDecomposer + : + public faPatchFieldMapper + { + // Private data + + label sizeBeforeMapping_; + labelList directAddressing_; + + public: + + // Constructors + + //- Construct given addressing + patchFieldDecomposer + ( + const label sizeBeforeMapping, + const labelUList& addressingSlice, + const label addressingOffset + ); + + + // Member functions + + label size() const + { + return directAddressing_.size(); + } + + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + bool direct() const + { + return true; + } + + virtual bool hasUnmapped() const + { + return false; + } + + const labelUList& directAddressing() const + { + return directAddressing_; + } + }; + + + //- Processor patch field decomposer class + class processorAreaPatchFieldDecomposer + : + public faPatchFieldMapper + { + // Private data + + label sizeBeforeMapping_; + labelListList addressing_; + scalarListList weights_; + + public: + + //- Construct given addressing + processorAreaPatchFieldDecomposer + ( + const faMesh& mesh, + const labelUList& addressingSlice + ); + + + // Member functions + + label size() const + { + return addressing_.size(); + } + + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + bool direct() const + { + return false; + } + + virtual bool hasUnmapped() const + { + return false; + } + + const labelListList& addressing() const + { + return addressing_; + } + + const scalarListList& weights() const + { + return weights_; + } + }; + + + //- Processor patch field decomposer class + class processorEdgePatchFieldDecomposer + : + public faPatchFieldMapper + { + label sizeBeforeMapping_; + labelListList addressing_; + scalarListList weights_; + + public: + + //- Construct given addressing + processorEdgePatchFieldDecomposer + ( + label sizeBeforeMapping, + const labelUList& addressingSlice + ); + + + // Member functions + + label size() const + { + return addressing_.size(); + } + + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + bool direct() const + { + return false; + } + + virtual bool hasUnmapped() const + { + return false; + } + + const labelListList& addressing() const + { + return addressing_; + } + + const scalarListList& weights() const + { + return weights_; + } + }; + + +private: + + // Private data + + //- Reference to complete mesh + const faMesh& completeMesh_; + + //- Reference to processor mesh + const faMesh& procMesh_; + + //- Reference to edge addressing + const labelList& edgeAddressing_; + + //- Reference to face addressing + const labelList& faceAddressing_; + + //- Reference to boundary addressing + const labelList& boundaryAddressing_; + + //- List of patch field decomposers + List<patchFieldDecomposer*> patchFieldDecomposerPtrs_; + + List<processorAreaPatchFieldDecomposer*> + processorAreaPatchFieldDecomposerPtrs_; + + List<processorEdgePatchFieldDecomposer*> + processorEdgePatchFieldDecomposerPtrs_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faFieldDecomposer(const faFieldDecomposer&); + + //- Disallow default bitwise assignment + void operator=(const faFieldDecomposer&); + + +public: + + // Constructors + + //- Construct from components + faFieldDecomposer + ( + const faMesh& completeMesh, + const faMesh& procMesh, + const labelList& edgeAddressing, + const labelList& faceAddressing, + const labelList& boundaryAddressing + ); + + + // Destructor + + ~faFieldDecomposer(); + + + // Member Functions + + //- Decompose area field + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > + decomposeField + ( + const GeometricField<Type, faPatchField, areaMesh>& field + ) const; + + //- Decompose surface field + template<class Type> + tmp<GeometricField<Type, faePatchField, edgeMesh> > + decomposeField + ( + const GeometricField<Type, faePatchField, edgeMesh>& field + ) const; + + template<class GeoField> + void decomposeFields(const PtrList<GeoField>& fields) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faFieldDecomposerDecomposeFields.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposerDecomposeFields.C b/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposerDecomposeFields.C new file mode 100644 index 0000000000000000000000000000000000000000..13b6f7e173bd230f9c8ee39b74ae22089774a2e0 --- /dev/null +++ b/applications/utilities/parallelProcessing/decomposePar/faFieldDecomposerDecomposeFields.C @@ -0,0 +1,237 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faFieldDecomposer.H" +#include "processorFaPatchField.H" +#include "processorFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +faFieldDecomposer::decomposeField +( + const GeometricField<Type, faPatchField, areaMesh>& field +) const +{ + // Create and map the internal field values + Field<Type> internalField(field.internalField(), faceAddressing_); + + // Create and map the patch field values + PtrList<faPatchField<Type> > patchFields(boundaryAddressing_.size()); + + forAll (boundaryAddressing_, patchi) + { + if (boundaryAddressing_[patchi] >= 0) + { + patchFields.set + ( + patchi, + faPatchField<Type>::New + ( + field.boundaryField()[boundaryAddressing_[patchi]], + procMesh_.boundary()[patchi], + DimensionedField<Type, areaMesh>::null(), + *patchFieldDecomposerPtrs_[patchi] + ) + ); + } + else + { + patchFields.set + ( + patchi, + new processorFaPatchField<Type> + ( + procMesh_.boundary()[patchi], + DimensionedField<Type, areaMesh>::null(), + Field<Type> + ( + field.internalField(), + *processorAreaPatchFieldDecomposerPtrs_[patchi] + ) + ) + ); + } + } + + // Create the field for the processor + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + field.name(), + procMesh_.time().timeName(), + procMesh_(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + procMesh_, + field.dimensions(), + internalField, + patchFields + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +faFieldDecomposer::decomposeField +( + const GeometricField<Type, faePatchField, edgeMesh>& field +) const +{ + labelList mapAddr + ( + labelList::subList + ( + edgeAddressing_, + procMesh_.nInternalEdges() + ) + ); + forAll (mapAddr, i) + { + mapAddr[i] -= 1; + } + + // Create and map the internal field values + Field<Type> internalField + ( + field.internalField(), + mapAddr + ); + + // Problem with addressing when a processor patch picks up both internal + // edges and edges from cyclic boundaries. This is a bit of a hack, but + // I cannot find a better solution without making the internal storage + // mechanism for edgeFields correspond to the one of edges in polyMesh + // (i.e. using slices) + Field<Type> allEdgeField(field.mesh().nEdges()); + + forAll (field.internalField(), i) + { + allEdgeField[i] = field.internalField()[i]; + } + + forAll (field.boundaryField(), patchi) + { + const Field<Type> & p = field.boundaryField()[patchi]; + + const label patchStart = field.mesh().boundary()[patchi].start(); + + forAll (p, i) + { + allEdgeField[patchStart + i] = p[i]; + } + } + + // Create and map the patch field values + PtrList<faePatchField<Type> > patchFields(boundaryAddressing_.size()); + + forAll (boundaryAddressing_, patchi) + { + if (boundaryAddressing_[patchi] >= 0) + { + patchFields.set + ( + patchi, + faePatchField<Type>::New + ( + field.boundaryField()[boundaryAddressing_[patchi]], + procMesh_.boundary()[patchi], + DimensionedField<Type, edgeMesh>::null(), + *patchFieldDecomposerPtrs_[patchi] + ) + ); + } + else + { + patchFields.set + ( + patchi, + new processorFaePatchField<Type> + ( + procMesh_.boundary()[patchi], + DimensionedField<Type, edgeMesh>::null(), + Field<Type> + ( + allEdgeField, + *processorEdgePatchFieldDecomposerPtrs_[patchi] + ) + ) + ); + } + } + + // Create the field for the processor + return tmp<GeometricField<Type, faePatchField, edgeMesh> > + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + field.name(), + procMesh_.time().timeName(), + procMesh_(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + procMesh_, + field.dimensions(), + internalField, + patchFields + ) + ); +} + + +template<class GeoField> +void faFieldDecomposer::decomposeFields +( + const PtrList<GeoField>& fields +) const +{ + forAll (fields, fieldI) + { + decomposeField(fields[fieldI])().write(); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C new file mode 100644 index 0000000000000000000000000000000000000000..48ecae45133d9b29f4575afdb25ed48530e3f8c8 --- /dev/null +++ b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C @@ -0,0 +1,1414 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faMeshDecomposition.H" +#include "Time.H" +#include "dictionary.H" +#include "labelIOList.H" +#include "processorFaPatch.H" +#include "faMesh.H" +#include "OSspecific.H" +#include "Map.H" +#include "globalMeshData.H" + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void faMeshDecomposition::distributeFaces() +{ + Info<< "\nCalculating distribution of faces" << endl; + + cpuTime decompositionTime; + + for (label procI = 0; procI < nProcs(); procI++) + { + Time processorDb + ( + Time::controlDictName, + time().rootPath(), + time().caseName()/fileName(word("processor") + Foam::name(procI)) + ); + + fvMesh procMesh + ( + IOobject + ( + GeoMesh<polyMesh>::mesh_.name(), + processorDb.timeName(), + processorDb + ) + ); + + // If faMesh's fvPatch is a part of the global face zones, faces of that + // patch will be present on all processors. Because of that, looping + // through faceProcAddressing will decompose global faMesh faces to the + // very last processor regardless of where fvPatch is really decomposed. + // Since global faces which do not belong to specific processor are + // located at the end of the faceProcAddressing, cutting it at + // i = owner.size() will correctly decompose faMesh faces. + // Vanja Skuric, 2016-04-21 + if (decompositionDict_.found("globalFaceZones")) + { + labelList faceProcAddressing + ( + labelIOList + ( + IOobject + ( + "faceProcAddressing", + "constant", + procMesh.meshSubDir, + procMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + + const label ownerSize = + ( + labelIOList + ( + IOobject + ( + "owner", + "constant", + procMesh.meshSubDir, + procMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ).size(); + + labelHashSet faceProcAddressingHash(ownerSize); + + for (int i = 0; i < ownerSize; ++i) + { + faceProcAddressingHash.insert(faceProcAddressing[i]); + } + + forAll (faceLabels(), faceI) + { + if (faceProcAddressingHash.found(faceLabels()[faceI] + 1)) + { + faceToProc_[faceI] = procI; + } + } + } + else + { + labelHashSet faceProcAddressingHash + ( + labelIOList + ( + IOobject + ( + "faceProcAddressing", + "constant", + procMesh.meshSubDir, + procMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + + forAll (faceLabels(), faceI) + { + if (faceProcAddressingHash.found(faceLabels()[faceI] + 1)) + { + faceToProc_[faceI] = procI; + } + } + } + } + + Info<< "\nFinished decomposition in " + << decompositionTime.elapsedCpuTime() + << " s" << endl; +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// from components +faMeshDecomposition::faMeshDecomposition(const fvMesh& mesh) +: + faMesh(mesh), + decompositionDict_ + ( + IOobject + ( + "decomposeParDict", + time().system(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + nProcs_(readInt(decompositionDict_.lookup("numberOfSubdomains"))), + distributed_(false), + faceToProc_(nFaces()), + procFaceLabels_(nProcs_), + procMeshEdgesMap_(nProcs_), + procNInternalEdges_(nProcs_, 0), + procPatchEdgeLabels_(nProcs_), + procPatchPointAddressing_(nProcs_), + procPatchEdgeAddressing_(nProcs_), + procEdgeAddressing_(nProcs_), + procFaceAddressing_(nProcs_), + procBoundaryAddressing_(nProcs_), + procPatchSize_(nProcs_), + procPatchStartIndex_(nProcs_), + procNeighbourProcessors_(nProcs_), + procProcessorPatchSize_(nProcs_), + procProcessorPatchStartIndex_(nProcs_), + globallySharedPoints_(0), + cyclicParallel_(false) +{ + if (decompositionDict_.found("distributed")) + { + distributed_ = Switch(decompositionDict_.lookup("distributed")); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +faMeshDecomposition::~faMeshDecomposition() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void faMeshDecomposition::decomposeMesh() +{ + // Decide which cell goes to which processor + distributeFaces(); + + Info<< "\nDistributing faces to processors" << endl; + + // Memory management + { + List<SLList<label> > procFaceList(nProcs()); + + forAll (faceToProc_, faceI) + { + if (faceToProc_[faceI] >= nProcs()) + { + FatalErrorIn("Finite area mesh decomposition") + << "Impossible processor label " << faceToProc_[faceI] + << "for face " << faceI + << abort(FatalError); + } + else + { + procFaceList[faceToProc_[faceI]].append(faceI); + } + } + + // Convert linked lists into normal lists + forAll (procFaceList, procI) + { + procFaceAddressing_[procI] = procFaceList[procI]; + } + } + + + // Find processor mesh faceLabels and ... + + for (label procI = 0; procI < nProcs(); procI++) + { + Time processorDb + ( + Time::controlDictName, + time().rootPath(), + time().caseName()/fileName(word("processor") + Foam::name(procI)) + ); + + fvMesh procFvMesh + ( + IOobject + ( + GeoMesh<polyMesh>::mesh_.name(), + processorDb.timeName(), + processorDb + ) + ); + + labelIOList fvPointProcAddressing + ( + IOobject + ( + "pointProcAddressing", + "constant", + procFvMesh.meshSubDir, + procFvMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + HashTable<label, label, Hash<label> > fvFaceProcAddressingHash; + + { + labelIOList fvFaceProcAddressing + ( + IOobject + ( + "faceProcAddressing", + "constant", + procFvMesh.meshSubDir, + procFvMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + forAll(fvFaceProcAddressing, faceI) + { + fvFaceProcAddressingHash.insert + ( + fvFaceProcAddressing[faceI], faceI + ); + } + }; + + const labelList& curProcFaceAddressing = procFaceAddressing_[procI]; + + labelList& curFaceLabels = procFaceLabels_[procI]; + + curFaceLabels = labelList(curProcFaceAddressing.size(), -1); + + forAll(curProcFaceAddressing, faceI) + { + curFaceLabels[faceI] = + fvFaceProcAddressingHash.find + ( + faceLabels()[curProcFaceAddressing[faceI]] + 1 + )(); + } + + // create processor finite area mesh + faMesh procMesh + ( + procFvMesh, + procFaceLabels_[procI] + ); + + const indirectPrimitivePatch& patch = this->patch(); + const Map<label>& map = patch.meshPointMap(); + + HashTable<label, edge, Hash<edge> > edgesHash; + + label edgeI = -1; + + label nIntEdges = patch.nInternalEdges(); + + for (label curEdge = 0; curEdge < nIntEdges; curEdge++) + { + edgesHash.insert(patch.edges()[curEdge], ++edgeI); + } + + forAll (boundary(), patchI) + { + // Include emptyFaPatch + + label size = boundary()[patchI].labelList::size(); + + for(int eI=0; eI<size; eI++) + { + edgesHash.insert(patch.edges()[boundary()[patchI][eI]], ++edgeI); + } + } + + + const indirectPrimitivePatch& procPatch = procMesh.patch(); + const vectorField& procPoints = procPatch.localPoints(); + const labelList& procMeshPoints = procPatch.meshPoints(); + const edgeList& procEdges = procPatch.edges(); + + labelList& curPatchPointAddressing = procPatchPointAddressing_[procI]; + curPatchPointAddressing.setSize(procPoints.size(), -1); + + forAll(procPoints, pointI) + { + curPatchPointAddressing[pointI] = + map[fvPointProcAddressing[procMeshPoints[pointI]]]; + } + + labelList& curPatchEdgeAddressing = procPatchEdgeAddressing_[procI]; + curPatchEdgeAddressing.setSize(procEdges.size(), -1); + + forAll(procEdges, edgeI) + { + edge curGlobalEdge = procEdges[edgeI]; + curGlobalEdge[0] = curPatchPointAddressing[curGlobalEdge[0]]; + curGlobalEdge[1] = curPatchPointAddressing[curGlobalEdge[1]]; + + curPatchEdgeAddressing[edgeI] = edgesHash.find(curGlobalEdge)(); + } + + Map<label>& curMap = procMeshEdgesMap_[procI]; + + curMap = Map<label>(2*procEdges.size()); + + forAll(curPatchEdgeAddressing, edgeI) + { + curMap.insert(curPatchEdgeAddressing[edgeI], edgeI); + } + + procNInternalEdges_[procI] = procPatch.nInternalEdges(); + } + + + Info << "\nDistributing edges to processors" << endl; + + // Loop through all internal edges and decide which processor they + // belong to. First visit all internal edges. + + // set references to the original mesh + const faBoundaryMesh& patches = boundary(); + const edgeList& edges = this->edges(); + const labelList& owner = edgeOwner(); + const labelList& neighbour = edgeNeighbour(); + + // Memory management + { + List<SLList<label> > procEdgeList(nProcs()); + + forAll(procEdgeList, procI) + { + for(label i=0; i<procNInternalEdges_[procI]; i++) + { + procEdgeList[procI].append(procPatchEdgeAddressing_[procI][i]); + } + } + + + // Detect inter-processor boundaries + + // Neighbour processor for each subdomain + List<SLList<label> > interProcBoundaries(nProcs()); + + // Edge labels belonging to each inter-processor boundary + List<SLList<SLList<label> > > interProcBEdges(nProcs()); + + List<SLList<label> > procPatchIndex(nProcs()); + + forAll (neighbour, edgeI) + { + if (faceToProc_[owner[edgeI]] != faceToProc_[neighbour[edgeI]]) + { + // inter - processor patch edge found. Go through the list of + // inside boundaries for the owner processor and try to find + // this inter-processor patch. + + label ownerProc = faceToProc_[owner[edgeI]]; + label neighbourProc = faceToProc_[neighbour[edgeI]]; + + SLList<label>::iterator curInterProcBdrsOwnIter = + interProcBoundaries[ownerProc].begin(); + + SLList<SLList<label> >::iterator curInterProcBEdgesOwnIter = + interProcBEdges[ownerProc].begin(); + + bool interProcBouFound = false; + + // WARNING: Synchronous SLList iterators + + for + ( + ; + curInterProcBdrsOwnIter + != interProcBoundaries[ownerProc].end() + && curInterProcBEdgesOwnIter + != interProcBEdges[ownerProc].end(); + ++curInterProcBdrsOwnIter, ++curInterProcBEdgesOwnIter + ) + { + if (curInterProcBdrsOwnIter() == neighbourProc) + { + // the inter - processor boundary exists. Add the face + interProcBouFound = true; + + curInterProcBEdgesOwnIter().append(edgeI); + + SLList<label>::iterator curInterProcBdrsNeiIter = + interProcBoundaries[neighbourProc].begin(); + + SLList<SLList<label> >::iterator + curInterProcBEdgesNeiIter = + interProcBEdges[neighbourProc].begin(); + + bool neighbourFound = false; + + // WARNING: Synchronous SLList iterators + + for + ( + ; + curInterProcBdrsNeiIter != + interProcBoundaries[neighbourProc].end() + && curInterProcBEdgesNeiIter != + interProcBEdges[neighbourProc].end(); + ++curInterProcBdrsNeiIter, + ++curInterProcBEdgesNeiIter + ) + { + if (curInterProcBdrsNeiIter() == ownerProc) + { + // boundary found. Add the face + neighbourFound = true; + + curInterProcBEdgesNeiIter().append(edgeI); + } + + if (neighbourFound) break; + } + + if (interProcBouFound && !neighbourFound) + { + FatalErrorIn + ("faDomainDecomposition::decomposeMesh()") + << "Inconsistency in inter - " + << "processor boundary lists for processors " + << ownerProc << " and " << neighbourProc + << abort(FatalError); + } + } + + if (interProcBouFound) break; + } + + if (!interProcBouFound) + { + // inter - processor boundaries do not exist and need to + // be created + + // set the new addressing information + + // owner + interProcBoundaries[ownerProc].append(neighbourProc); + interProcBEdges[ownerProc].append(SLList<label>(edgeI)); + + // neighbour + interProcBoundaries[neighbourProc].append(ownerProc); + interProcBEdges[neighbourProc].append + ( + SLList<label>(edgeI) + ); + } + } + } + + + // Loop through patches. For cyclic boundaries detect inter-processor + // edges; for all other, add edges to the edge list and remember start + // and size of all patches. + + // for all processors, set the size of start index and patch size + // lists to the number of patches in the mesh + forAll (procPatchSize_, procI) + { + procPatchSize_[procI].setSize(patches.size()); + procPatchStartIndex_[procI].setSize(patches.size()); + } + + forAll (patches, patchI) + { + // Reset size and start index for all processors + forAll (procPatchSize_, procI) + { + procPatchSize_[procI][patchI] = 0; + procPatchStartIndex_[procI][patchI] = + procEdgeList[procI].size(); + } + + const label patchStart = patches[patchI].start(); + +// if (typeid(patches[patchI]) != typeid(cyclicFaPatch)) + if (true) + { + // Normal patch. Add edges to processor where the face + // next to the edge lives + + const labelListList& eF = patch().edgeFaces(); + + label size = patches[patchI].labelList::size(); + + labelList patchEdgeFaces(size, -1); + + for(int eI=0; eI<size; eI++) + { + patchEdgeFaces[eI] = eF[patches[patchI][eI]][0]; + } + + forAll (patchEdgeFaces, edgeI) + { + const label curProc = faceToProc_[patchEdgeFaces[edgeI]]; + + // add the face + procEdgeList[curProc].append(patchStart + edgeI); + + // increment the number of edges for this patch + procPatchSize_[curProc][patchI]++; + } + } + else + { + // Cyclic patch special treatment + + const faPatch& cPatch = patches[patchI]; + + const label cycOffset = cPatch.size()/2; + + // Set reference to faceCells for both patches + const labelList::subList firstEdgeFaces + ( + cPatch.edgeFaces(), + cycOffset + ); + + const labelList::subList secondEdgeFaces + ( + cPatch.edgeFaces(), + cycOffset, + cycOffset + ); + + forAll (firstEdgeFaces, edgeI) + { + if + ( + faceToProc_[firstEdgeFaces[edgeI]] + != faceToProc_[secondEdgeFaces[edgeI]] + ) + { + // This edge becomes an inter-processor boundary edge + // inter - processor patch edge found. Go through + // the list of inside boundaries for the owner + // processor and try to find this inter-processor + // patch. + + cyclicParallel_ = true; + + label ownerProc = faceToProc_[firstEdgeFaces[edgeI]]; + label neighbourProc = + faceToProc_[secondEdgeFaces[edgeI]]; + + SLList<label>::iterator curInterProcBdrsOwnIter = + interProcBoundaries[ownerProc].begin(); + + SLList<SLList<label> >::iterator + curInterProcBEdgesOwnIter = + interProcBEdges[ownerProc].begin(); + + bool interProcBouFound = false; + + // WARNING: Synchronous SLList iterators + + for + ( + ; + curInterProcBdrsOwnIter != + interProcBoundaries[ownerProc].end() + && curInterProcBEdgesOwnIter != + interProcBEdges[ownerProc].end(); + ++curInterProcBdrsOwnIter, + ++curInterProcBEdgesOwnIter + ) + { + if (curInterProcBdrsOwnIter() == neighbourProc) + { + // the inter - processor boundary exists. + // Add the face + interProcBouFound = true; + + curInterProcBEdgesOwnIter().append + (patchStart + edgeI); + + SLList<label>::iterator curInterProcBdrsNeiIter + = interProcBoundaries[neighbourProc].begin(); + + SLList<SLList<label> >::iterator + curInterProcBEdgesNeiIter = + interProcBEdges[neighbourProc].begin(); + + bool neighbourFound = false; + + // WARNING: Synchronous SLList iterators + + for + ( + ; + curInterProcBdrsNeiIter + != interProcBoundaries[neighbourProc].end() + && curInterProcBEdgesNeiIter + != interProcBEdges[neighbourProc].end(); + ++curInterProcBdrsNeiIter, + ++curInterProcBEdgesNeiIter + ) + { + if (curInterProcBdrsNeiIter() == ownerProc) + { + // boundary found. Add the face + neighbourFound = true; + + curInterProcBEdgesNeiIter() + .append + ( + patchStart + + cycOffset + + edgeI + ); + } + + if (neighbourFound) break; + } + + if (interProcBouFound && !neighbourFound) + { + FatalErrorIn + ( + "faDomainDecomposition::decomposeMesh()" + ) << "Inconsistency in inter-processor " + << "boundary lists for processors " + << ownerProc << " and " << neighbourProc + << " in cyclic boundary matching" + << abort(FatalError); + } + } + + if (interProcBouFound) break; + } + + if (!interProcBouFound) + { + // inter - processor boundaries do not exist + // and need to be created + + // set the new addressing information + + // owner + interProcBoundaries[ownerProc] + .append(neighbourProc); + interProcBEdges[ownerProc] + .append(SLList<label>(patchStart + edgeI)); + + // neighbour + interProcBoundaries[neighbourProc] + .append(ownerProc); + interProcBEdges[neighbourProc] + .append + ( + SLList<label> + ( + patchStart + + cycOffset + + edgeI + ) + ); + } + } + else + { + // This cyclic edge remains on the processor + label ownerProc = faceToProc_[firstEdgeFaces[edgeI]]; + + // add the edge + procEdgeList[ownerProc].append(patchStart + edgeI); + + // increment the number of edges for this patch + procPatchSize_[ownerProc][patchI]++; + + // Note: I cannot add the other side of the cyclic + // boundary here because this would violate the order. + // They will be added in a separate loop below + } + } + + // Ordering in cyclic boundaries is important. + // Add the other half of cyclic edges for cyclic boundaries + // that remain on the processor + forAll (secondEdgeFaces, edgeI) + { + if + ( + faceToProc_[firstEdgeFaces[edgeI]] + == faceToProc_[secondEdgeFaces[edgeI]] + ) + { + // This cyclic edge remains on the processor + label ownerProc = faceToProc_[firstEdgeFaces[edgeI]]; + + // add the second edge + procEdgeList[ownerProc].append + (patchStart + cycOffset + edgeI); + + // increment the number of edges for this patch + procPatchSize_[ownerProc][patchI]++; + } + } + } + } + + // Convert linked lists into normal lists + // Add inter-processor boundaries and remember start indices + forAll (procEdgeList, procI) + { + // Get internal and regular boundary processor faces + SLList<label>& curProcEdges = procEdgeList[procI]; + + // Get reference to processor edge addressing + labelList& curProcEdgeAddressing = procEdgeAddressing_[procI]; + + labelList& curProcNeighbourProcessors = + procNeighbourProcessors_[procI]; + + labelList& curProcProcessorPatchSize = + procProcessorPatchSize_[procI]; + + labelList& curProcProcessorPatchStartIndex = + procProcessorPatchStartIndex_[procI]; + + // calculate the size + label nEdgesOnProcessor = curProcEdges.size(); + + for + ( + SLList<SLList<label> >::iterator curInterProcBEdgesIter = + interProcBEdges[procI].begin(); + curInterProcBEdgesIter != interProcBEdges[procI].end(); + ++curInterProcBEdgesIter + ) + { + nEdgesOnProcessor += curInterProcBEdgesIter().size(); + } + + curProcEdgeAddressing.setSize(nEdgesOnProcessor); + + // Fill in the list. Calculate turning index. + // Turning index will be -1 only for some edges on processor + // boundaries, i.e. the ones where the current processor ID + // is in the face which is a edge neighbour. + // Turning index is stored as the sign of the edge addressing list + + label nEdges = 0; + + // Add internal and boundary edges + // Remember to increment the index by one such that the + // turning index works properly. + for + ( + SLList<label>::iterator curProcEdgeIter = curProcEdges.begin(); + curProcEdgeIter != curProcEdges.end(); + ++curProcEdgeIter + ) + { + curProcEdgeAddressing[nEdges] = curProcEdgeIter(); +// curProcEdgeAddressing[nEdges] = curProcEdgeIter() + 1; + nEdges++; + } + + // Add inter-processor boundary edges. At the beginning of each + // patch, grab the patch start index and size + + curProcNeighbourProcessors.setSize + ( + interProcBoundaries[procI].size() + ); + + curProcProcessorPatchSize.setSize + ( + interProcBoundaries[procI].size() + ); + + curProcProcessorPatchStartIndex.setSize + ( + interProcBoundaries[procI].size() + ); + + label nProcPatches = 0; + + SLList<label>::iterator curInterProcBdrsIter = + interProcBoundaries[procI].begin(); + + SLList<SLList<label> >::iterator curInterProcBEdgesIter = + interProcBEdges[procI].begin(); + + for + ( + ; + curInterProcBdrsIter != interProcBoundaries[procI].end() + && curInterProcBEdgesIter != interProcBEdges[procI].end(); + ++curInterProcBdrsIter, ++curInterProcBEdgesIter + ) + { + curProcNeighbourProcessors[nProcPatches] = + curInterProcBdrsIter(); + + // Get start index for processor patch + curProcProcessorPatchStartIndex[nProcPatches] = nEdges; + + label& curSize = + curProcProcessorPatchSize[nProcPatches]; + + curSize = 0; + + // add faces for this processor boundary + + for + ( + SLList<label>::iterator curEdgesIter = + curInterProcBEdgesIter().begin(); + curEdgesIter != curInterProcBEdgesIter().end(); + ++curEdgesIter + ) + { + // add the edges + + // Remember to increment the index by one such that the + // turning index works properly. + if (faceToProc_[owner[curEdgesIter()]] == procI) + { + curProcEdgeAddressing[nEdges] = curEdgesIter(); +// curProcEdgeAddressing[nEdges] = curEdgesIter() + 1; + } + else + { + // turning edge + curProcEdgeAddressing[nEdges] = curEdgesIter(); +// curProcEdgeAddressing[nEdges] = -(curEdgesIter() + 1); + } + + // increment the size + curSize++; + + nEdges++; + } + + nProcPatches++; + } + } + } + + Info << "\nCalculating processor boundary addressing" << endl; + // For every patch of processor boundary, find the index of the original + // patch. Mis-alignment is caused by the fact that patches with zero size + // are omitted. For processor patches, set index to -1. + // At the same time, filter the procPatchSize_ and procPatchStartIndex_ + // lists to exclude zero-size patches + forAll (procPatchSize_, procI) + { + // Make a local copy of old lists + const labelList oldPatchSizes = procPatchSize_[procI]; + + const labelList oldPatchStarts = procPatchStartIndex_[procI]; + + labelList& curPatchSizes = procPatchSize_[procI]; + + labelList& curPatchStarts = procPatchStartIndex_[procI]; + + const labelList& curProcessorPatchSizes = + procProcessorPatchSize_[procI]; + + labelList& curBoundaryAddressing = procBoundaryAddressing_[procI]; + + curBoundaryAddressing.setSize + ( + oldPatchSizes.size() + + curProcessorPatchSizes.size() + ); + + label nPatches = 0; + + forAll (oldPatchSizes, patchI) + { + if (oldPatchSizes[patchI] > 0) + { + curBoundaryAddressing[nPatches] = patchI; + + curPatchSizes[nPatches] = oldPatchSizes[patchI]; + + curPatchStarts[nPatches] = oldPatchStarts[patchI]; + + nPatches++; + } + } + + // reset to the size of live patches + curPatchSizes.setSize(nPatches); + curPatchStarts.setSize(nPatches); + + forAll (curProcessorPatchSizes, procPatchI) + { + curBoundaryAddressing[nPatches] = -1; + + nPatches++; + } + + curBoundaryAddressing.setSize(nPatches); + } + + + // Gather data about globally shared points + + labelList globallySharedPoints_(0); + + // Memory management + { + labelList pointsUsage(nPoints(), 0); + + // Globally shared points are the ones used by more than 2 processors + // Size the list approximately and gather the points + labelHashSet gSharedPoints + ( + min(100, nPoints()/1000) + ); + + // Loop through all the processors and mark up points used by + // processor boundaries. When a point is used twice, it is a + // globally shared point + + for (label procI = 0; procI < nProcs(); procI++) + { + // Get list of edge labels + const labelList& curEdgeLabels = procEdgeAddressing_[procI]; + + // Get start of processor faces + const labelList& curProcessorPatchStarts = + procProcessorPatchStartIndex_[procI]; + + const labelList& curProcessorPatchSizes = + procProcessorPatchSize_[procI]; + + // Reset the lookup list + pointsUsage = 0; + + forAll (curProcessorPatchStarts, patchI) + { + const label curStart = curProcessorPatchStarts[patchI]; + const label curEnd = curStart + curProcessorPatchSizes[patchI]; + + for + ( + label edgeI = curStart; + edgeI < curEnd; + edgeI++ + ) + { + // Mark the original edge as used + // Remember to decrement the index by one (turning index) + const label curE = curEdgeLabels[edgeI]; + + const edge& e = edges[curE]; + + forAll (e, pointI) + { + if (pointsUsage[e[pointI]] == 0) + { + // Point not previously used + pointsUsage[e[pointI]] = patchI + 1; + } + else if (pointsUsage[e[pointI]] != patchI + 1) + { + // Point used by some other patch = global point! + gSharedPoints.insert(e[pointI]); + } + } + } + } + } + + // Grab the result from the hash list + globallySharedPoints_ = gSharedPoints.toc(); + sort(globallySharedPoints_); + } + + + // Edge label for faPatches + + for (label procI = 0; procI < nProcs(); procI++) + { + fileName processorCasePath + ( + time().caseName()/fileName(word("processor") + + Foam::name(procI)) + ); + + // create a database + Time processorDb + ( + Time::controlDictName, + time().rootPath(), + processorCasePath + ); + + + // read finite volume mesh + fvMesh procFvMesh + ( + IOobject + ( + GeoMesh<polyMesh>::mesh_.name(), + processorDb.timeName(), + processorDb + ) + ); + + // create finite area mesh + faMesh procMesh + ( + procFvMesh, + procFaceLabels_[procI] + ); + + + const labelList& curEdgeAddressing = procEdgeAddressing_[procI]; + + const labelList& curPatchStartIndex = procPatchStartIndex_[procI]; + const labelList& curPatchSize = procPatchSize_[procI]; + + const labelList& curProcessorPatchStartIndex = + procProcessorPatchStartIndex_[procI]; + + const labelList& curProcessorPatchSize = + procProcessorPatchSize_[procI]; + + labelListList& curPatchEdgeLabels = procPatchEdgeLabels_[procI]; + curPatchEdgeLabels = + labelListList + ( + curPatchSize.size() + + curProcessorPatchSize.size() + ); + + forAll(curPatchSize, patchI) + { + labelList& curEdgeLabels = curPatchEdgeLabels[patchI]; + curEdgeLabels.setSize(curPatchSize[patchI], -1); + + label edgeI = 0; + + for + ( + int i=curPatchStartIndex[patchI]; + i<(curPatchStartIndex[patchI]+curPatchSize[patchI]); + i++ + ) + { + curEdgeLabels[edgeI] = + procMeshEdgesMap_[procI][curEdgeAddressing[i]]; + edgeI++; + } + } + + forAll(curProcessorPatchSize, patchI) + { + labelList& curEdgeLabels = + curPatchEdgeLabels[curPatchSize.size() + patchI]; + curEdgeLabels.setSize(curProcessorPatchSize[patchI], -1); + + label edgeI = 0; + + for + ( + int i=curProcessorPatchStartIndex[patchI]; + i<(curProcessorPatchStartIndex[patchI] + +curProcessorPatchSize[patchI]); + i++ + ) + { + curEdgeLabels[edgeI] = + procMeshEdgesMap_[procI][curEdgeAddressing[i]]; + edgeI++; + } + } + } +} + + +bool faMeshDecomposition::writeDecomposition() +{ + Info<< "\nConstructing processor FA meshes" << endl; + + + // Make a lookup map for globally shared points + Map<label> sharedPointLookup(2*globallySharedPoints_.size()); + + forAll (globallySharedPoints_, pointi) + { + sharedPointLookup.insert(globallySharedPoints_[pointi], pointi); + } + + label totProcEdges = 0; + label maxProcPatches = 0; + label maxProcEdges = 0; + + // Write out the meshes + for (label procI = 0; procI < nProcs(); procI++) + { + // Create processor mesh without a boundary + + fileName processorCasePath + ( + time().caseName()/fileName(word("processor") + Foam::name(procI)) + ); + + // create a database + Time processorDb + ( + Time::controlDictName, + time().rootPath(), + processorCasePath + ); + + // read finite volume mesh + fvMesh procFvMesh + ( + IOobject + ( + GeoMesh<polyMesh>::mesh_.name(), + processorDb.timeName(), + processorDb + ) + ); + + labelIOList fvBoundaryProcAddressing + ( + IOobject + ( + "boundaryProcAddressing", + "constant", + procFvMesh.meshSubDir, + procFvMesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + + // create finite area mesh + faMesh procMesh + ( + procFvMesh, + procFaceLabels_[procI] + ); + + // Create processor boundary patches + const labelList& curBoundaryAddressing = + procBoundaryAddressing_[procI]; + + const labelList& curPatchSizes = procPatchSize_[procI]; + + const labelList& curNeighbourProcessors = + procNeighbourProcessors_[procI]; + + const labelList& curProcessorPatchSizes = + procProcessorPatchSize_[procI]; + + const labelListList& curPatchEdgeLabels = + procPatchEdgeLabels_[procI]; + + const faPatchList& meshPatches = boundary(); + + List<faPatch*> procPatches + ( + curPatchSizes.size() + + curProcessorPatchSizes.size(), + reinterpret_cast<faPatch*>(NULL) + ); + + label nPatches = 0; + + forAll (curPatchSizes, patchi) + { + const labelList& curEdgeLabels = curPatchEdgeLabels[nPatches]; + + label ngbPolyPatchIndex = + findIndex + ( + fvBoundaryProcAddressing, + meshPatches[curBoundaryAddressing[patchi]] + .ngbPolyPatchIndex() + ); + + procPatches[nPatches] = + meshPatches[curBoundaryAddressing[patchi]].clone + ( + procMesh.boundary(), + curEdgeLabels, + nPatches, + ngbPolyPatchIndex + ).ptr(); + + nPatches++; + } + + forAll (curProcessorPatchSizes, procPatchI) + { + const labelList& curEdgeLabels = curPatchEdgeLabels[nPatches]; + + procPatches[nPatches] = + new processorFaPatch + ( + word("procBoundary") + Foam::name(procI) + + word("to") + + Foam::name(curNeighbourProcessors[procPatchI]), + curEdgeLabels, + nPatches, + procMesh.boundary(), + -1, + procI, + curNeighbourProcessors[procPatchI] + ); + + nPatches++; + } + + // Add boundary patches + procMesh.addFaPatches(procPatches); + + // Set the precision of the points data to 10 + IOstream::defaultPrecision(10); + + procMesh.write(); + + Info<< endl + << "Processor " << procI << nl + << " Number of faces = " << procMesh.nFaces() + << endl; + + label nBoundaryEdges = 0; + label nProcPatches = 0; + label nProcEdges = 0; + + forAll (procMesh.boundary(), patchi) + { + if + ( + procMesh.boundary()[patchi].type() + == processorFaPatch::typeName + ) + { + const processorFaPatch& ppp = + refCast<const processorFaPatch> + ( + procMesh.boundary()[patchi] + ); + + Info<< " Number of edges shared with processor " + << ppp.neighbProcNo() << " = " << ppp.size() << endl; + + nProcPatches++; + nProcEdges += ppp.size(); + } + else + { + nBoundaryEdges += procMesh.boundary()[patchi].size(); + } + } + + Info<< " Number of processor patches = " << nProcPatches << nl + << " Number of processor edges = " << nProcEdges << nl + << " Number of boundary edges = " << nBoundaryEdges << endl; + + totProcEdges += nProcEdges; + maxProcPatches = max(maxProcPatches, nProcPatches); + maxProcEdges = max(maxProcEdges, nProcEdges); + + // create and write the addressing information + labelIOList pointProcAddressing + ( + IOobject + ( + "pointProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + procPatchPointAddressing_[procI] + ); + pointProcAddressing.write(); + + labelIOList edgeProcAddressing + ( + IOobject + ( + "edgeProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + procEdgeAddressing_[procI] + ); + edgeProcAddressing.write(); + + labelIOList faceProcAddressing + ( + IOobject + ( + "faceProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + procFaceAddressing_[procI] + ); + faceProcAddressing.write(); + + labelIOList boundaryProcAddressing + ( + IOobject + ( + "boundaryProcAddressing", + "constant", + procMesh.meshSubDir, + procFvMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + procBoundaryAddressing_[procI] + ); + boundaryProcAddressing.write(); + } + + Info<< nl + << "Number of processor edges = " << totProcEdges/2 << nl + << "Max number of processor patches = " << maxProcPatches << nl + << "Max number of faces between processors = " << maxProcEdges + << endl; + + return true; +} diff --git a/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.H b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.H new file mode 100644 index 0000000000000000000000000000000000000000..48aff29ec4cb1701a00aa4f6a2abbf297f4e5eac --- /dev/null +++ b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.H @@ -0,0 +1,178 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faMeshDecomposition + +Description + Automatic faMesh decomposition class + +Author + Zeljko Tukovic, FSB Zagreb + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faMeshDecomposition.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faMeshDecomposition_H +#define faMeshDecomposition_H + +#include "fvMesh.H" +#include "faMesh.H" +#include "labelList.H" +#include "SLList.H" +#include "PtrList.H" +#include "point.H" + +#ifndef namespaceFoam +#define namespaceFoam + using namespace Foam; +#endif + +/*---------------------------------------------------------------------------*\ + Class faMeshDecomposition Declaration +\*---------------------------------------------------------------------------*/ + +class faMeshDecomposition +: + public faMesh +{ + // Private data + + //- Mesh decomposition control dictionary + IOdictionary decompositionDict_; + + //- Number of processors in decomposition + label nProcs_; + + //- Is the decomposition data to be distributed for each processor + bool distributed_; + + //- Processor label for each cell + labelList faceToProc_; + + //- Face labels for each processor mesh + labelListList procFaceLabels_; + + //- + List<Map<label> > procMeshEdgesMap_; + + //- Number of internal edges for each processor mesh + labelList procNInternalEdges_; + + //- Edge labels for patches of processor meshes + List<List<List<label> > > procPatchEdgeLabels_; + + //- Labels of points for each processor + labelListList procPatchPointAddressing_; + + //- Labels of edges for each processor + labelListList procPatchEdgeAddressing_; + + //- Labels of edges for each processor + labelListList procEdgeAddressing_; + + //- Labels of faces for each processor + labelListList procFaceAddressing_; + + //- Original patch index for every processor patch + labelListList procBoundaryAddressing_; + + //- Sizes for processor mesh patches + // Excludes inter-processor boundaries + labelListList procPatchSize_; + + //- Start indices for processor patches + // Excludes inter-processor boundaries + labelListList procPatchStartIndex_; + + //- Neighbour processor ID for inter-processor boundaries + labelListList procNeighbourProcessors_; + + //- Sizes for inter-processor patches + labelListList procProcessorPatchSize_; + + //- Start indices for inter-processor patches + labelListList procProcessorPatchStartIndex_; + + //- List of globally shared point labels + labelList globallySharedPoints_; + + //- Are there cyclic-parallel faces + bool cyclicParallel_; + + + // Private Member Functions + + void distributeFaces(); + +public: + + // Constructors + + //- Construct from fvMesh + faMeshDecomposition(const fvMesh& mesh); + + + // Destructor + + ~faMeshDecomposition(); + + + // Member Functions + + //- Number of processor in decomposition + label nProcs() const + { + return nProcs_; + } + + //- Is the decomposition data to be distributed for each processor + bool distributed() const + { + return distributed_; + } + + //- Decompose mesh + void decomposeMesh(); + + //- Write decomposition + bool writeDecomposition(); + + //- Cell-processor decomposition labels + const labelList& faceToProc() const + { + return faceToProc_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/files b/applications/utilities/parallelProcessing/reconstructPar/Make/files index 37acabe62dbc9c7eb1c485f2ee7df91c734e1bc2..660641033b0b5ba9bfb380cb125176cc5e285806 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/files +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/files @@ -1,3 +1,5 @@ +processorFaMeshes.C +faFieldReconstructor.C reconstructPar.C EXE = $(FOAM_APPBIN)/reconstructPar diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/options b/applications/utilities/parallelProcessing/reconstructPar/Make/options index 1ebb8c02d314fb6230eef50e44957be3befdfdda..ceb6da204cb90e9ae228106f8d497da4f5178d2a 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/options +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/finiteArea/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -10,6 +11,7 @@ EXE_LIBS = \ -lfiniteVolume \ -lgenericPatchFields \ -llagrangian \ + -lfiniteArea \ -ldynamicMesh \ -lmeshTools \ -lreconstruct \ diff --git a/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructor.C b/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructor.C new file mode 100644 index 0000000000000000000000000000000000000000..9e7b39aed61f267e70d06a1986d5d021e16c2d14 --- /dev/null +++ b/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructor.C @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faFieldReconstructor.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faFieldReconstructor::faFieldReconstructor +( + faMesh& mesh, + const PtrList<faMesh>& procMeshes, + const PtrList<labelIOList>& edgeProcAddressing, + const PtrList<labelIOList>& faceProcAddressing, + const PtrList<labelIOList>& boundaryProcAddressing +) +: + mesh_(mesh), + procMeshes_(procMeshes), + edgeProcAddressing_(edgeProcAddressing), + faceProcAddressing_(faceProcAddressing), + boundaryProcAddressing_(boundaryProcAddressing) +{} + + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructor.H b/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructor.H new file mode 100644 index 0000000000000000000000000000000000000000..3b15fc31e91c4402485a4fe5535f06a7a6b9e45a --- /dev/null +++ b/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructor.H @@ -0,0 +1,205 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faFieldReconstructor + +Description + FA area and edge field reconstructor. + +Author + Zeljko Tukovic, FSB Zagreb + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faFieldReconstructor.C + faFieldReconstructorReconstructFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faFieldReconstructor_H +#define faFieldReconstructor_H + +#include "PtrList.H" +#include "faMesh.H" +#include "IOobjectList.H" +#include "faPatchFieldMapper.H" +#include "labelIOList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + + +/*---------------------------------------------------------------------------*\ + Class faFieldReconstructor Declaration +\*---------------------------------------------------------------------------*/ + +class faFieldReconstructor +{ + // Private data + + //- Reconstructed mesh reference + faMesh& mesh_; + + //- List of processor meshes + const PtrList<faMesh>& procMeshes_; + + //- List of processor edge addressing lists + const PtrList<labelIOList>& edgeProcAddressing_; + + //- List of processor face addressing lists + const PtrList<labelIOList>& faceProcAddressing_; + + //- List of processor boundary addressing lists + const PtrList<labelIOList>& boundaryProcAddressing_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faFieldReconstructor(const faFieldReconstructor&); + + //- Disallow default bitwise assignment + void operator=(const faFieldReconstructor&); + + +public: + + class faPatchFieldReconstructor + : + public faPatchFieldMapper + { + label size_; + label sizeBeforeMapping_; + + public: + + // Constructors + + //- Construct given size + faPatchFieldReconstructor + ( + const label size, + const label sizeBeforeMapping + ) + : + size_(size), + sizeBeforeMapping_(sizeBeforeMapping) + {} + + + // Member functions + + virtual label size() const + { + return size_; + } + + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + virtual bool direct() const + { + return true; + } + + virtual bool hasUnmapped() const + { + return false; + } + + virtual const labelUList& directAddressing() const + { + return labelUList::null(); + } + }; + + + // Constructors + + //- Construct from components + faFieldReconstructor + ( + faMesh& mesh, + const PtrList<faMesh>& procMeshes, + const PtrList<labelIOList>& edgeProcAddressing, + const PtrList<labelIOList>& faceProcAddressing, + const PtrList<labelIOList>& boundaryProcAddressing + ); + + + // Member Functions + + //- Reconstruct area field + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > + reconstructFaAreaField + ( + const IOobject& fieldIoObject + ); + + //- Reconstruct edge field + template<class Type> + tmp<GeometricField<Type, faePatchField, edgeMesh> > + reconstructFaEdgeField + ( + const IOobject& fieldIoObject + ); + + //- Reconstruct and write all area fields + template<class Type> + void reconstructFaAreaFields + ( + const IOobjectList& objects + ); + + //- Reconstruct and write all area fields + template<class Type> + void reconstructFaEdgeFields + ( + const IOobjectList& objects + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faFieldReconstructorReconstructFields.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructorReconstructFields.C b/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructorReconstructFields.C new file mode 100644 index 0000000000000000000000000000000000000000..294f9996074b297815f4dd735df055cc62957af6 --- /dev/null +++ b/applications/utilities/parallelProcessing/reconstructPar/faFieldReconstructorReconstructFields.C @@ -0,0 +1,642 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faFieldReconstructor.H" +#include "Time.H" +#include "PtrList.H" +#include "faPatchFields.H" +#include "emptyFaPatch.H" +#include "emptyFaPatchField.H" +#include "emptyFaePatchField.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Foam::tmp<Foam::GeometricField<Type, Foam::faPatchField, Foam::areaMesh> > +Foam::faFieldReconstructor::reconstructFaAreaField +( + const IOobject& fieldIoObject +) +{ + // Read the field for all the processors + PtrList<GeometricField<Type, faPatchField, areaMesh> > procFields + ( + procMeshes_.size() + ); + + forAll (procMeshes_, procI) + { + procFields.set + ( + procI, + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + fieldIoObject.name(), + procMeshes_[procI].time().timeName(), + procMeshes_[procI](), + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + procMeshes_[procI] + ) + ); + } + + // Create the internalField + Field<Type> internalField(mesh_.nFaces()); + + // Create the patch fields + PtrList<faPatchField<Type> > patchFields(mesh_.boundary().size()); + + + // Create global mesh patchs starts + + labelList gStarts(mesh_.boundary().size(), -1); + + if (mesh_.boundary().size() > 0) + { + gStarts[0] = mesh_.nInternalEdges(); + } + + for(label i=1; i<mesh_.boundary().size(); i++) + { + gStarts[i] = gStarts[i-1] + mesh_.boundary()[i-1].labelList::size(); + } + + forAll (procMeshes_, procI) + { + const GeometricField<Type, faPatchField, areaMesh>& procField = + procFields[procI]; + + // Set the face values in the reconstructed field + internalField.rmap + ( + procField.internalField(), + faceProcAddressing_[procI] + ); + + + + // Set the boundary patch values in the reconstructed field + + labelList starts(procMeshes_[procI].boundary().size(), -1); + + if(procMeshes_[procI].boundary().size() > 0) + { + starts[0] = procMeshes_[procI].nInternalEdges(); + } + + for(label i=1; i<procMeshes_[procI].boundary().size(); i++) + { + starts[i] = + starts[i-1] + + procMeshes_[procI].boundary()[i-1].labelList::size(); + } + + forAll(boundaryProcAddressing_[procI], patchI) + { + // Get patch index of the original patch + const label curBPatch = boundaryProcAddressing_[procI][patchI]; + + // Get addressing slice for this patch + +// const labelList::subList cp = +// procMeshes_[procI].boundary()[patchI].patchSlice +// ( +// edgeProcAddressing_[procI] +// ); + + const labelList::subList cp = + labelList::subList + ( + edgeProcAddressing_[procI], + procMeshes_[procI].boundary()[patchI].size(), + starts[patchI] + ); + + // check if the boundary patch is not a processor patch + if (curBPatch >= 0) + { + // Regular patch. Fast looping + + if (!patchFields(curBPatch)) + { + patchFields.set + ( + curBPatch, + faPatchField<Type>::New + ( + procField.boundaryField()[patchI], + mesh_.boundary()[curBPatch], + DimensionedField<Type, areaMesh>::null(), + faPatchFieldReconstructor + ( + mesh_.boundary()[curBPatch].size(), + procField.boundaryField()[patchI].size() + ) + ) + ); + } + + const label curPatchStart = gStarts[curBPatch]; +// mesh_.boundary()[curBPatch].start(); + + labelList reverseAddressing(cp.size()); + + forAll(cp, edgeI) + { + // Subtract one to take into account offsets for + // face direction. +// reverseAddressing[edgeI] = cp[edgeI] - 1 - curPatchStart; + reverseAddressing[edgeI] = cp[edgeI] - curPatchStart; + } + + patchFields[curBPatch].rmap + ( + procField.boundaryField()[patchI], + reverseAddressing + ); + } + else + { + const Field<Type>& curProcPatch = + procField.boundaryField()[patchI]; + + // In processor patches, there's a mix of internal faces (some + // of them turned) and possible cyclics. Slow loop + forAll(cp, edgeI) + { + // Subtract one to take into account offsets for + // face direction. +// label curE = cp[edgeI] - 1; + label curE = cp[edgeI]; + + // Is the face on the boundary? + if (curE >= mesh_.nInternalEdges()) + { +// label curBPatch = mesh_.boundary().whichPatch(curE); + label curBPatch = -1; + + forAll (mesh_.boundary(), pI) + { + if + ( + curE >= gStarts[pI] + && curE < + ( + gStarts[pI] + + mesh_.boundary()[pI].labelList::size() + ) + ) + { + curBPatch = pI; + } + } + + if (!patchFields(curBPatch)) + { + patchFields.set + ( + curBPatch, + faPatchField<Type>::New + ( + mesh_.boundary()[curBPatch].type(), + mesh_.boundary()[curBPatch], + DimensionedField<Type, areaMesh>::null() + ) + ); + } + + // add the edge +// label curPatchEdge = +// mesh_.boundary() +// [curBPatch].whichEdge(curE); + + label curPatchEdge = curE - gStarts[curBPatch]; + + patchFields[curBPatch][curPatchEdge] = + curProcPatch[edgeI]; + } + } + } + } + } + + forAll(mesh_.boundary(), patchI) + { + // add empty patches + if + ( + typeid(mesh_.boundary()[patchI]) == typeid(emptyFaPatch) + && !patchFields(patchI) + ) + { + patchFields.set + ( + patchI, + faPatchField<Type>::New + ( + emptyFaPatchField<Type>::typeName, + mesh_.boundary()[patchI], + DimensionedField<Type, areaMesh>::null() + ) + ); + } + } + + + // Now construct and write the field + // setting the internalField and patchFields + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + fieldIoObject.name(), + mesh_.time().timeName(), + mesh_(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + procFields[0].dimensions(), + internalField, + patchFields + ) + ); +} + + +template<class Type> +Foam::tmp<Foam::GeometricField<Type, Foam::faePatchField, Foam::edgeMesh> > +Foam::faFieldReconstructor::reconstructFaEdgeField +( + const IOobject& fieldIoObject +) +{ + // Read the field for all the processors + PtrList<GeometricField<Type, faePatchField, edgeMesh> > procFields + ( + procMeshes_.size() + ); + + forAll (procMeshes_, procI) + { + procFields.set + ( + procI, + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + fieldIoObject.name(), + procMeshes_[procI].time().timeName(), + procMeshes_[procI](), + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + procMeshes_[procI] + ) + ); + } + + + // Create the internalField + Field<Type> internalField(mesh_.nInternalEdges()); + + // Create the patch fields + PtrList<faePatchField<Type> > patchFields(mesh_.boundary().size()); + + + labelList gStarts(mesh_.boundary().size(), -1); + + if(mesh_.boundary().size() > 0) + { + gStarts[0] = mesh_.nInternalEdges(); + } + + for(label i=1; i<mesh_.boundary().size(); i++) + { + gStarts[i] = gStarts[i-1] + mesh_.boundary()[i-1].labelList::size(); + } + + + forAll (procMeshes_, procI) + { + const GeometricField<Type, faePatchField, edgeMesh>& procField = + procFields[procI]; + + // Set the face values in the reconstructed field + + // It is necessary to create a copy of the addressing array to + // take care of the face direction offset trick. + // + { + labelList curAddr(edgeProcAddressing_[procI]); + +// forAll (curAddr, addrI) +// { +// curAddr[addrI] -= 1; +// } + + internalField.rmap + ( + procField.internalField(), + curAddr + ); + } + + // Set the boundary patch values in the reconstructed field + + labelList starts(procMeshes_[procI].boundary().size(), -1); + + if(procMeshes_[procI].boundary().size() > 0) + { + starts[0] = procMeshes_[procI].nInternalEdges(); + } + + for(label i=1; i<procMeshes_[procI].boundary().size(); i++) + { + starts[i] = + starts[i-1] + + procMeshes_[procI].boundary()[i-1].labelList::size(); + } + + forAll(boundaryProcAddressing_[procI], patchI) + { + // Get patch index of the original patch + const label curBPatch = boundaryProcAddressing_[procI][patchI]; + + // Get addressing slice for this patch + +// const labelList::subList cp = +// procMeshes_[procI].boundary()[patchI].patchSlice +// ( +// faceProcAddressing_[procI] +// ); + + const labelList::subList cp = + labelList::subList + ( + edgeProcAddressing_[procI], + procMeshes_[procI].boundary()[patchI].size(), + starts[patchI] + ); + + // check if the boundary patch is not a processor patch + if (curBPatch >= 0) + { + // Regular patch. Fast looping + + if (!patchFields(curBPatch)) + { + patchFields.set + ( + curBPatch, + faePatchField<Type>::New + ( + procField.boundaryField()[patchI], + mesh_.boundary()[curBPatch], + DimensionedField<Type, edgeMesh>::null(), + faPatchFieldReconstructor + ( + mesh_.boundary()[curBPatch].size(), + procField.boundaryField()[patchI].size() + ) + ) + ); + } + + const label curPatchStart = gStarts[curBPatch]; +// mesh_.boundary()[curBPatch].start(); + + labelList reverseAddressing(cp.size()); + + forAll(cp, edgeI) + { + // Subtract one to take into account offsets for + // face direction. +// reverseAddressing[faceI] = cp[faceI] - 1 - curPatchStart; + reverseAddressing[edgeI] = cp[edgeI] - curPatchStart; + } + + patchFields[curBPatch].rmap + ( + procField.boundaryField()[patchI], + reverseAddressing + ); + } + else + { + const Field<Type>& curProcPatch = + procField.boundaryField()[patchI]; + + // In processor patches, there's a mix of internal faces (some + // of them turned) and possible cyclics. Slow loop + forAll(cp, edgeI) + { +// label curF = cp[edgeI] - 1; + label curE = cp[edgeI]; + + // Is the face turned the right side round + if (curE >= 0) + { + // Is the face on the boundary? + if (curE >= mesh_.nInternalEdges()) + { +// label curBPatch = +// mesh_.boundary().whichPatch(curF); + + label curBPatch = -1; + + forAll (mesh_.boundary(), pI) + { + if + ( + curE >= gStarts[pI] + && curE < + ( + gStarts[pI] + + mesh_.boundary()[pI].labelList::size() + ) + ) + { + curBPatch = pI; + } + } + + if (!patchFields(curBPatch)) + { + patchFields.set + ( + curBPatch, + faePatchField<Type>::New + ( + mesh_.boundary()[curBPatch].type(), + mesh_.boundary()[curBPatch], + DimensionedField<Type, edgeMesh> + ::null() + ) + ); + } + + // add the face +// label curPatchFace = +// mesh_.boundary() +// [curBPatch].whichEdge(curF); + + label curPatchEdge = curE - gStarts[curBPatch]; + + patchFields[curBPatch][curPatchEdge] = + curProcPatch[edgeI]; + } + else + { + // Internal face + internalField[curE] = curProcPatch[edgeI]; + } + } + } + } + } + } + + forAll(mesh_.boundary(), patchI) + { + // add empty patches + if + ( + typeid(mesh_.boundary()[patchI]) == typeid(emptyFaPatch) + && !patchFields(patchI) + ) + { + patchFields.set + ( + patchI, + faePatchField<Type>::New + ( + emptyFaePatchField<Type>::typeName, + mesh_.boundary()[patchI], + DimensionedField<Type, edgeMesh>::null() + ) + ); + } + } + + + // Now construct and write the field + // setting the internalField and patchFields + return tmp<GeometricField<Type, faePatchField, edgeMesh> > + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + fieldIoObject.name(), + mesh_.time().timeName(), + mesh_(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + procFields[0].dimensions(), + internalField, + patchFields + ) + ); +} + + +// Reconstruct and write all area fields +template<class Type> +void Foam::faFieldReconstructor::reconstructFaAreaFields +( + const IOobjectList& objects +) +{ + const word& fieldClassName = + GeometricField<Type, faPatchField, areaMesh>::typeName; + + IOobjectList fields = objects.lookupClass(fieldClassName); + + if (fields.size()) + { + Info<< " Reconstructing " << fieldClassName << "s\n" << endl; + + for + ( + IOobjectList::const_iterator fieldIter = fields.begin(); + fieldIter != fields.end(); + ++fieldIter + ) + { + Info << " " << fieldIter()->name() << endl; + + reconstructFaAreaField<Type>(*fieldIter())().write(); + } + + Info<< endl; + } +} + +// Reconstruct and write all edge fields +template<class Type> +void Foam::faFieldReconstructor::reconstructFaEdgeFields +( + const IOobjectList& objects +) +{ + const word& fieldClassName = + GeometricField<Type, faePatchField, edgeMesh>::typeName; + + IOobjectList fields = objects.lookupClass(fieldClassName); + + if (fields.size()) + { + Info<< " Reconstructing " << fieldClassName << "s\n" << endl; + + for + ( + IOobjectList::const_iterator fieldIter = fields.begin(); + fieldIter != fields.end(); + ++fieldIter + ) + { + Info<< " " << fieldIter()->name() << endl; + + reconstructFaEdgeField<Type>(*fieldIter())().write(); + } + + Info<< endl; + } +} + + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/processorFaMeshes.C b/applications/utilities/parallelProcessing/reconstructPar/processorFaMeshes.C new file mode 100644 index 0000000000000000000000000000000000000000..3f764eff59b60327acaed713ad99d7f2b8c6fb52 --- /dev/null +++ b/applications/utilities/parallelProcessing/reconstructPar/processorFaMeshes.C @@ -0,0 +1,260 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "processorFaMeshes.H" +#include "Time.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::processorFaMeshes::read() +{ + forAll (fvMeshes_, procI) + { + meshes_.set + ( + procI, + new faMesh(fvMeshes_[procI]) + ); + + pointProcAddressing_.set + ( + procI, + new labelIOList + ( + IOobject + ( + "pointProcAddressing", + meshes_[procI].time().findInstance + ( + meshes_[procI].meshDir(), + "pointProcAddressing" + ), + meshes_[procI].meshSubDir, + fvMeshes_[procI], + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + + edgeProcAddressing_.set + ( + procI, + new labelIOList + ( + IOobject + ( + "edgeProcAddressing", + meshes_[procI].time().findInstance + ( + meshes_[procI].meshDir(), + "edgeProcAddressing" + ), + meshes_[procI].meshSubDir, + fvMeshes_[procI], + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + + faceProcAddressing_.set + ( + procI, + new labelIOList + ( + IOobject + ( + "faceProcAddressing", + meshes_[procI].time().findInstance + ( + meshes_[procI].meshDir(), + "faceProcAddressing" + ), + meshes_[procI].meshSubDir, + fvMeshes_[procI], + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + + boundaryProcAddressing_.set + ( + procI, + new labelIOList + ( + IOobject + ( + "boundaryProcAddressing", + meshes_[procI].time().findInstance + ( + meshes_[procI].meshDir(), + "faceProcAddressing" + ), + meshes_[procI].meshSubDir, + fvMeshes_[procI], + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::processorFaMeshes::processorFaMeshes +( + const PtrList<fvMesh>& processorFvMeshes +) +: + fvMeshes_(processorFvMeshes), + meshes_(processorFvMeshes.size()), + pointProcAddressing_(processorFvMeshes.size()), + edgeProcAddressing_(processorFvMeshes.size()), + faceProcAddressing_(processorFvMeshes.size()), + boundaryProcAddressing_(processorFvMeshes.size()) +{ + read(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Foam::fvMesh::readUpdateState Foam::processorFaMeshes::readUpdate() +// { +// fvMesh::readUpdateState stat = fvMesh::UNCHANGED; + +// forAll (databases_, procI) +// { +// // Check if any new meshes need to be read. +// fvMesh::readUpdateState procStat = meshes_[procI].readUpdate(); + +// /* +// if (procStat != fvMesh::UNCHANGED) +// { +// Info<< "Processor " << procI +// << " at time " << databases_[procI].timeName() +// << " detected mesh change " << procStat +// << endl; +// } +// */ + +// // Combine into overall mesh change status +// if (stat == fvMesh::UNCHANGED) +// { +// stat = procStat; +// } +// else +// { +// if (stat != procStat) +// { +// FatalErrorIn("processorFaMeshes::readUpdate()") +// << "Processor " << procI +// << " has a different polyMesh at time " +// << databases_[procI].timeName() +// << " compared to any previous processors." << nl +// << "Please check time " << databases_[procI].timeName() +// << " directories on all processors for consistent" +// << " mesh files." +// << exit(FatalError); +// } +// } +// } + +// if +// ( +// stat == fvMesh::TOPO_CHANGE +// || stat == fvMesh::TOPO_PATCH_CHANGE +// ) +// { +// // Reread all meshes and addresssing +// read(); +// } +// return stat; +// } + + +// void Foam::processorFaMeshes::reconstructPoints(fvMesh& mesh) +// { +// // Read the field for all the processors +// PtrList<pointIOField> procsPoints(meshes_.size()); + +// forAll (meshes_, procI) +// { +// procsPoints.set +// ( +// procI, +// new pointIOField +// ( +// IOobject +// ( +// "points", +// meshes_[procI].time().timeName(), +// polyMesh::meshSubDir, +// meshes_[procI], +// IOobject::MUST_READ, +// IOobject::NO_WRITE +// ) +// ) +// ); +// } + +// // Create the new points +// vectorField newPoints(mesh.nPoints()); + +// forAll (meshes_, procI) +// { +// const vectorField& procPoints = procsPoints[procI]; + +// // Set the cell values in the reconstructed field + +// const labelList& pointProcAddressingI = pointProcAddressing_[procI]; + +// if (pointProcAddressingI.size() != procPoints.size()) +// { +// FatalErrorIn("processorFaMeshes") +// << "problem :" +// << " pointProcAddressingI:" << pointProcAddressingI.size() +// << " procPoints:" << procPoints.size() +// << abort(FatalError); +// } + +// forAll(pointProcAddressingI, pointI) +// { +// newPoints[pointProcAddressingI[pointI]] = procPoints[pointI]; +// } +// } + +// mesh.movePoints(newPoints); +// mesh.write(); +// } + + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/processorFaMeshes.H b/applications/utilities/parallelProcessing/reconstructPar/processorFaMeshes.H new file mode 100644 index 0000000000000000000000000000000000000000..dd179adaa2d446e28ee29494148d10e0ac786d1b --- /dev/null +++ b/applications/utilities/parallelProcessing/reconstructPar/processorFaMeshes.H @@ -0,0 +1,142 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + processorFaMeshes + +Description + Container for processor mesh addressing. + +Author + Zeljko Tukovic, FSB Zagreb + +SourceFiles + processorFaMeshes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaMeshes_H +#define processorFaMeshes_H + +#include "PtrList.H" +#include "fvMesh.H" +#include "faMesh.H" +#include "IOobjectList.H" +#include "labelIOList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + + +/*---------------------------------------------------------------------------*\ + Class processorFaMeshes Declaration +\*---------------------------------------------------------------------------*/ + +class processorFaMeshes +{ + // Private data + + //- List of processor finite volume meshes + const PtrList<fvMesh>& fvMeshes_; + + //- List of processor finite area meshes + PtrList<faMesh> meshes_; + + //- List of processor point addressing lists + PtrList<labelIOList> pointProcAddressing_; + + //- List of processor face addressing lists + PtrList<labelIOList> edgeProcAddressing_; + + //- List of processor cell addressing lists + PtrList<labelIOList> faceProcAddressing_; + + //- List of processor boundary addressing lists + PtrList<labelIOList> boundaryProcAddressing_; + + + // Private Member Functions + + //- Read all meshes + void read(); + + //- Disallow default bitwise copy construct + processorFaMeshes(const processorFaMeshes&); + + //- Disallow default bitwise assignment + void operator=(const processorFaMeshes&); + + +public: + + // Constructors + + //- Construct from components + processorFaMeshes(const PtrList<fvMesh>& processorFvMeshes); + + + // Member Functions + + //- Update the meshes based on the mesh files saved in + // time directories +// fvMesh::readUpdateState readUpdate(); + + //- Reconstruct point position after motion in parallel +// void reconstructPoints(faMesh& mesh); + + PtrList<faMesh>& meshes() + { + return meshes_; + } + const PtrList<labelIOList>& pointProcAddressing() const + { + return pointProcAddressing_; + } + PtrList<labelIOList>& edgeProcAddressing() + { + return edgeProcAddressing_; + } + const PtrList<labelIOList>& faceProcAddressing() const + { + return faceProcAddressing_; + } + const PtrList<labelIOList>& boundaryProcAddressing() const + { + return boundaryProcAddressing_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index cabee6ef3904dcb5cb3cd5b35ae6304d839d1f18..6b6e3bb535842350bf4f59e72f94c535c7308e0a 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -44,6 +44,11 @@ Description #include "pointFieldReconstructor.H" #include "reconstructLagrangian.H" +#include "faCFD.H" +#include "faMesh.H" +#include "processorFaMeshes.H" +#include "faFieldReconstructor.H" + #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" @@ -710,6 +715,47 @@ int main(int argc, char *argv[]) } + // If there are any FA fields, reconstruct them + + if + ( + objects.lookupClass(areaScalarField::typeName).size() + || objects.lookupClass(areaVectorField::typeName).size() + || objects.lookupClass(areaSphericalTensorField::typeName).size() + || objects.lookupClass(areaSymmTensorField::typeName).size() + || objects.lookupClass(areaTensorField::typeName).size() + || objects.lookupClass(edgeScalarField::typeName).size() + ) + { + Info << "Reconstructing FA fields" << nl << endl; + + faMesh aMesh(mesh); + + processorFaMeshes procFaMeshes(procMeshes.meshes()); + + faFieldReconstructor faReconstructor + ( + aMesh, + procFaMeshes.meshes(), + procFaMeshes.edgeProcAddressing(), + procFaMeshes.faceProcAddressing(), + procFaMeshes.boundaryProcAddressing() + ); + + faReconstructor.reconstructFaAreaFields<scalar>(objects); + faReconstructor.reconstructFaAreaFields<vector>(objects); + faReconstructor + .reconstructFaAreaFields<sphericalTensor>(objects); + faReconstructor.reconstructFaAreaFields<symmTensor>(objects); + faReconstructor.reconstructFaAreaFields<tensor>(objects); + + faReconstructor.reconstructFaEdgeFields<scalar>(objects); + } + else + { + Info << "No FA fields" << nl << endl; + } + if (!noReconstructSets) { // Scan to find all sets diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index 8bd95eea84ef4df84b33abdf400e237ec8c86efb..4e92ec6e159a61925284c50ed4a51a91ea45b65b 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -147,6 +147,12 @@ cleanUcomponents() } +cleanFaMesh () +{ + rm -rf ./constant/faMesh/{faceLabels*,faBoundary*} \ + > /dev/null 2>&1 +} + cleanApplication() { echo "Cleaning application $PWD" diff --git a/src/Allwmake b/src/Allwmake index d897043005c5260b51d35136c11a8dd4d7cbba5d..51ddcf05cc88fcc2e758ecc69041b65222191fb4 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -42,6 +42,8 @@ wmake $targetType lagrangian/basic wmake $targetType lagrangian/distributionModels wmake $targetType genericPatchFields +wmake $targetType finiteArea + conversion/Allwmake $targetType $* wmake $targetType mesh/extrudeModel wmake $targetType dynamicMesh diff --git a/src/finiteArea/Make/files b/src/finiteArea/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..9e8ffce8691aa0be041eb2435f137e74ed973088 --- /dev/null +++ b/src/finiteArea/Make/files @@ -0,0 +1,125 @@ +faMesh/faGlobalMeshData/faGlobalMeshData.C +faMesh/faMesh.C +faMesh/faMeshDemandDrivenData.C +faMesh/faMeshUpdate.C +faMesh/faBoundaryMesh/faBoundaryMesh.C + +faPatches = faMesh/faPatches +$(faPatches)/faPatch/faPatch.C +$(faPatches)/faPatch/newFaPatch.C +$(faPatches)/basic/coupled/coupledFaPatch.C +$(faPatches)/constraint/empty/emptyFaPatch.C +$(faPatches)/constraint/processor/processorFaPatch.C +$(faPatches)/constraint/wedge/wedgeFaPatch.C +$(faPatches)/constraint/cyclic/cyclicFaPatch.C +$(faPatches)/constraint/symmetry/symmetryFaPatch.C + +faMeshMapper = faMesh/faMeshMapper +$(faMeshMapper)/faMeshMapper.C +$(faMeshMapper)/faAreaMapper.C +$(faMeshMapper)/faEdgeMapper.C +$(faMeshMapper)/faPatchMapper.C + +faPatchFields = fields/faPatchFields +$(faPatchFields)/faPatchField/faPatchFields.C + +basicFaPatchFields = $(faPatchFields)/basic +$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchFields.C +$(basicFaPatchFields)/basicSymmetry/basicSymmetryFaPatchScalarField.C +$(basicFaPatchFields)/calculated/calculatedFaPatchFields.C +$(basicFaPatchFields)/coupled/coupledFaPatchFields.C +$(basicFaPatchFields)/zeroGradient/zeroGradientFaPatchFields.C +$(basicFaPatchFields)/fixedValue/fixedValueFaPatchFields.C +$(basicFaPatchFields)/fixedGradient/fixedGradientFaPatchFields.C +$(basicFaPatchFields)/mixed/mixedFaPatchFields.C +$(basicFaPatchFields)/transform/transformFaPatchFields.C +$(basicFaPatchFields)/transform/transformFaPatchScalarField.C + +constraintFaPatchFields = $(faPatchFields)/constraint +$(constraintFaPatchFields)/empty/emptyFaPatchFields.C +$(constraintFaPatchFields)/processor/processorFaPatchFields.C +$(constraintFaPatchFields)/processor/processorFaPatchScalarField.C +$(constraintFaPatchFields)/wedge/wedgeFaPatchFields.C +$(constraintFaPatchFields)/wedge/wedgeFaPatchScalarField.C +$(constraintFaPatchFields)/cyclic/cyclicFaPatchFields.C +$(constraintFaPatchFields)/symmetry/symmetryFaPatchFields.C + +derivedFaPatchFields = $(faPatchFields)/derived +$(derivedFaPatchFields)/fixedValueOutflow/fixedValueOutflowFaPatchFields.C +$(derivedFaPatchFields)/inletOutlet/inletOutletFaPatchFields.C +$(derivedFaPatchFields)/slip/slipFaPatchFields.C +$(derivedFaPatchFields)/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.C +$(derivedFaPatchFields)/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.C + +faePatchFields = fields/faePatchFields +$(faePatchFields)/faePatchField/faePatchFields.C + +basicFaePatchFields = $(faePatchFields)/basic +$(basicFaePatchFields)/calculated/calculatedFaePatchFields.C +$(basicFaePatchFields)/coupled/coupledFaePatchFields.C +$(basicFaePatchFields)/fixedValue/fixedValueFaePatchFields.C + +constraintFaePatchFields = $(faePatchFields)/constraint +$(constraintFaePatchFields)/empty/emptyFaePatchFields.C +$(constraintFaePatchFields)/processor/processorFaePatchFields.C +$(constraintFaePatchFields)/wedge/wedgeFaePatchFields.C +$(constraintFaePatchFields)/cyclic/cyclicFaePatchFields.C +$(constraintFaePatchFields)/symmetry/symmetryFaePatchFields.C + +fields/areaFields/areaFields.C +fields/edgeFields/edgeFields.C + +faMatrices/faMatrices.C +faMatrices/faScalarMatrix/faScalarMatrix.C + +edgeInterpolation = interpolation/edgeInterpolation +$(edgeInterpolation)/edgeInterpolation.C +$(edgeInterpolation)/edgeInterpolationScheme/edgeInterpolationSchemes.C + +schemes = $(edgeInterpolation)/schemes +$(schemes)/linear/linearEdgeInterpolationMake.C +$(schemes)/upwind/upwindEdgeInterpolationMake.C +$(schemes)/linearUpwind/linearUpwindEdgeInterpolationMake.C +$(schemes)/Gamma/GammaEdgeInterpolationMake.C +$(schemes)/blended/blendedEdgeInterpolationMake.C + +finiteArea/fa/fa.C +finiteArea/faSchemes/faSchemes.C + +ddtSchemes = finiteArea/ddtSchemes +$(ddtSchemes)/faDdtScheme/faDdtSchemes.C +$(ddtSchemes)/steadyStateFaDdtScheme/steadyStateFaDdtSchemes.C +$(ddtSchemes)/EulerFaDdtScheme/EulerFaDdtSchemes.C +$(ddtSchemes)/backwardFaDdtScheme/backwardFaDdtSchemes.C +$(ddtSchemes)/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C + +divSchemes = finiteArea/divSchemes +finiteArea/fam/vectorFamDiv.C +$(divSchemes)/faDivScheme/faDivSchemes.C +$(divSchemes)/gaussFaDivScheme/gaussFaDivSchemes.C + +gradSchemes = finiteArea/gradSchemes +$(gradSchemes)/faGradScheme/faGradSchemes.C +$(gradSchemes)/gaussFaGrad/gaussFaGrads.C +$(gradSchemes)/leastSquaresFaGrad/leastSquaresFaVectors.C +$(gradSchemes)/leastSquaresFaGrad/leastSquaresFaGrads.C + +limitedGradSchemes = $(gradSchemes)/limitedGradSchemes +$(limitedGradSchemes)/faceLimitedFaGrad/faceLimitedFaGrads.C +$(limitedGradSchemes)/edgeLimitedFaGrad/edgeLimitedFaGrads.C + +lnGradSchemes = finiteArea/lnGradSchemes +$(lnGradSchemes)/lnGradScheme/lnGradSchemes.C +$(lnGradSchemes)/correctedLnGrad/correctedLnGrads.C +$(lnGradSchemes)/limitedLnGrad/limitedLnGrads.C +$(lnGradSchemes)/fourthLnGrad/fourthLnGrads.C + +laplacianSchemes = finiteArea/laplacianSchemes +$(laplacianSchemes)/faLaplacianScheme/faLaplacianSchemes.C +$(laplacianSchemes)/gaussFaLaplacianScheme/gaussFaLaplacianSchemes.C + +convectionSchemes = finiteArea/convectionSchemes +$(convectionSchemes)/faConvectionScheme/faConvectionSchemes.C +$(convectionSchemes)/gaussFaConvectionScheme/gaussFaConvectionSchemes.C + +LIB = $(FOAM_LIBBIN)/libfiniteArea diff --git a/src/finiteArea/Make/options b/src/finiteArea/Make/options new file mode 100644 index 0000000000000000000000000000000000000000..4b2f0a059fbac055ee17d31b510b95445907d34c --- /dev/null +++ b/src/finiteArea/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude + +LIB_LIBS = \ + -lmeshTools diff --git a/src/finiteArea/areaMesh/areaFaMesh.H b/src/finiteArea/areaMesh/areaFaMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..9899b376d181912ceb44ef13d33046c8a3c753c7 --- /dev/null +++ b/src/finiteArea/areaMesh/areaFaMesh.H @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + areaMesh + +Description + Mesh data needed to do the Finite Area discretisation. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef areaFaMesh_H +#define areaFaMesh_H + +#include "GeoMesh.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class areaMesh Declaration +\*---------------------------------------------------------------------------*/ + +class areaMesh +: + public GeoMesh<faMesh> +{ + +public: + + explicit areaMesh(const faMesh& mesh) + : + GeoMesh<faMesh>(mesh) + {} + + label size() const + { + return size(mesh_); + } + + static label size(const Mesh& mesh) + { + return mesh.nFaces(); + } + + const areaVectorField& C() + { + return mesh_.areaCentres(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/edgeMesh/edgeFaMesh.H b/src/finiteArea/edgeMesh/edgeFaMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..f5c5dca6356c561a381164a43417e65ea0dcddce --- /dev/null +++ b/src/finiteArea/edgeMesh/edgeFaMesh.H @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + edgeMesh + +Description + Mesh data needed to do the Finite Area discretisation. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeFaMesh_H +#define edgeFaMesh_H + +#include "GeoMesh.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class edgeMesh Declaration +\*---------------------------------------------------------------------------*/ + +class edgeMesh +: + public GeoMesh<faMesh> +{ + +public: + + explicit edgeMesh(const faMesh& mesh) + : + GeoMesh<faMesh>(mesh) + {} + + label size() const + { + return size(mesh_); + } + + static label size(const Mesh& mesh) + { + return mesh.nInternalEdges(); + } + + const edgeVectorField& C() + { + return mesh_.edgeCentres(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faMatrices.C b/src/finiteArea/faMatrices/faMatrices.C new file mode 100644 index 0000000000000000000000000000000000000000..3d79fc229075e808cca7c646bc930471638bb02e --- /dev/null +++ b/src/finiteArea/faMatrices/faMatrices.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Finite-Volume matrix member static data members + +\*---------------------------------------------------------------------------*/ + +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTemplateTypeNameAndDebug(faScalarMatrix, 0); +defineTemplateTypeNameAndDebug(faVectorMatrix, 0); +defineTemplateTypeNameAndDebug(faTensorMatrix, 0); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faMatrices.H b/src/finiteArea/faMatrices/faMatrices.H new file mode 100644 index 0000000000000000000000000000000000000000..30d12db5dbc9a5b1e1a40dfd76eeced75e64b705 --- /dev/null +++ b/src/finiteArea/faMatrices/faMatrices.H @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faMatrix + +Description + A special matrix type and solver, designed for finite area + solutions of scalar equations. + Face addressing is used to make all matrix assembly + and solution loops vectorise. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faMatrices_H +#define faMatrices_H + +#include "faScalarMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +typedef faMatrix<scalar> faScalarMatrix; +typedef faMatrix<vector> faVectorMatrix; +typedef faMatrix<tensor> faTensorMatrix; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.C b/src/finiteArea/faMatrices/faMatrix/faMatrix.C new file mode 100644 index 0000000000000000000000000000000000000000..a1323bb109b1736d40bff64c7a8b4159858a37bb --- /dev/null +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.C @@ -0,0 +1,1816 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Finite-Area matrix + +\*---------------------------------------------------------------------------*/ + +#include "areaFields.H" +#include "edgeFields.H" +#include "calculatedFaPatchFields.H" +#include "zeroGradientFaPatchFields.H" +#include "coupledFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template<class Type> +template<class Type2> +void faMatrix<Type>::addToInternalField +( + const labelUList& addr, + const Field<Type2>& pf, + Field<Type2>& intf +) const +{ + if (addr.size() != pf.size()) + { + FatalErrorIn + ( + "faMatrix<Type>::addToInternalField(const labelUList&, " + "const Field&, Field&)" + ) << "sizes of addressing and field are different" + << abort(FatalError); + } + + forAll(addr, faceI) + { + intf[addr[faceI]] += pf[faceI]; + } +} + + +template<class Type> +template<class Type2> +void faMatrix<Type>::addToInternalField +( + const labelUList& addr, + const tmp<Field<Type2> >& tpf, + Field<Type2>& intf +) const +{ + addToInternalField(addr, tpf(), intf); + tpf.clear(); +} + + +template<class Type> +template<class Type2> +void faMatrix<Type>::subtractFromInternalField +( + const labelUList& addr, + const Field<Type2>& pf, + Field<Type2>& intf +) const +{ + if (addr.size() != pf.size()) + { + FatalErrorIn + ( + "faMatrix<Type>::addToInternalField(const labelUList&, " + "const Field&, Field&)" + ) << "sizes of addressing and field are different" + << abort(FatalError); + } + + forAll(addr, faceI) + { + intf[addr[faceI]] -= pf[faceI]; + } +} + + +template<class Type> +template<class Type2> +void faMatrix<Type>::subtractFromInternalField +( + const labelUList& addr, + const tmp<Field<Type2> >& tpf, + Field<Type2>& intf +) const +{ + subtractFromInternalField(addr, tpf(), intf); + tpf.clear(); +} + + +template<class Type> +void faMatrix<Type>::addBoundaryDiag +( + scalarField& diag, + const direction solveCmpt +) const +{ + forAll(internalCoeffs_, patchI) + { + addToInternalField + ( + lduAddr().patchAddr(patchI), + internalCoeffs_[patchI].component(solveCmpt), + diag + ); + } +} + + +template<class Type> +void faMatrix<Type>::addCmptAvBoundaryDiag(scalarField& diag) const +{ + forAll(internalCoeffs_, patchI) + { + addToInternalField + ( + lduAddr().patchAddr(patchI), + cmptAv(internalCoeffs_[patchI]), + diag + ); + } +} + + +template<class Type> +void faMatrix<Type>::addBoundarySource +( + Field<Type>& source, + const bool couples +) const +{ + forAll(psi_.boundaryField(), patchI) + { + const faPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + const Field<Type>& pbc = boundaryCoeffs_[patchI]; + + if (!ptf.coupled()) + { + addToInternalField(lduAddr().patchAddr(patchI), pbc, source); + } + else if (couples) + { + tmp<Field<Type> > tpnf = ptf.patchNeighbourField(); + const Field<Type>& pnf = tpnf(); + + const labelUList& addr = lduAddr().patchAddr(patchI); + + forAll(addr, facei) + { + source[addr[facei]] += cmptMultiply(pbc[facei], pnf[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // + +template<class Type> +faMatrix<Type>::faMatrix +( + const GeometricField<Type, faPatchField, areaMesh>& psi, + const dimensionSet& ds +) +: + lduMatrix(psi.mesh()), + psi_(psi), + dimensions_(ds), + source_(psi.size(), pTraits<Type>::zero), + internalCoeffs_(psi.mesh().boundary().size()), + boundaryCoeffs_(psi.mesh().boundary().size()), + faceFluxCorrectionPtr_(NULL) +{ + if (debug) + { + Info<< "faMatrix<Type>(const GeometricField<Type, faPatchField, areaMesh>&," + " const dimensionSet&) : " + "constructing faMatrix<Type> for field " << psi_.name() + << endl; + } + + // Initialise coupling coefficients + forAll (psi.mesh().boundary(), patchI) + { + internalCoeffs_.set + ( + patchI, + new Field<Type> + ( + psi.mesh().boundary()[patchI].size(), + pTraits<Type>::zero + ) + ); + + boundaryCoeffs_.set + ( + patchI, + new Field<Type> + ( + psi.mesh().boundary()[patchI].size(), + pTraits<Type>::zero + ) + ); + } + + // Update the boundary coefficients of psi without changing its event No. + GeometricField<Type, faPatchField, areaMesh>& psiRef = + const_cast<GeometricField<Type, faPatchField, areaMesh>&>(psi_); + + label currentStatePsi = psiRef.eventNo(); + psiRef.boundaryFieldRef().updateCoeffs(); + psiRef.eventNo() = currentStatePsi; +} + + +template<class Type> +faMatrix<Type>::faMatrix(const faMatrix<Type>& fam) +: + refCount(), + lduMatrix(fam), + psi_(fam.psi_), + dimensions_(fam.dimensions_), + source_(fam.source_), + internalCoeffs_(fam.internalCoeffs_), + boundaryCoeffs_(fam.boundaryCoeffs_), + faceFluxCorrectionPtr_(NULL) +{ + if (debug) + { + Info<< "faMatrix<Type>::faMatrix(const faMatrix<Type>&) : " + << "copying faMatrix<Type> for field " << psi_.name() + << endl; + } + + if (fam.faceFluxCorrectionPtr_) + { + faceFluxCorrectionPtr_ = new + GeometricField<Type, faePatchField, edgeMesh> + ( + *(fam.faceFluxCorrectionPtr_) + ); + } +} + + +template<class Type> +faMatrix<Type>::faMatrix +( + const GeometricField<Type, faPatchField, areaMesh>& psi, + Istream& is +) +: + lduMatrix(psi.mesh()), + psi_(psi), + dimensions_(is), + source_(is), + internalCoeffs_(psi.mesh().boundary().size()), + boundaryCoeffs_(psi.mesh().boundary().size()), + faceFluxCorrectionPtr_(NULL) +{ + if (debug) + { + Info<< "faMatrix<Type>(const GeometricField<Type, faPatchField, areaMesh>&," + " Istream&) : " + "constructing faMatrix<Type> for field " << psi_.name() + << endl; + } + + // Initialise coupling coefficients + forAll (psi.mesh().boundary(), patchI) + { + internalCoeffs_.set + ( + patchI, + new Field<Type> + ( + psi.mesh().boundary()[patchI].size(), + pTraits<Type>::zero + ) + ); + + boundaryCoeffs_.set + ( + patchI, + new Field<Type> + ( + psi.mesh().boundary()[patchI].size(), + pTraits<Type>::zero + ) + ); + } + +} + + +template<class Type> +faMatrix<Type>::~faMatrix() +{ + if (debug) + { + Info<< "faMatrix<Type>::~faMatrix<Type>() : " + << "destroying faMatrix<Type> for field " << psi_.name() + << endl; + } + + if (faceFluxCorrectionPtr_) + { + delete faceFluxCorrectionPtr_; + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Set solution in given faces and eliminate corresponding +// equations from the matrix +template<class Type> +void faMatrix<Type>::setValues +( + const labelUList& faceLabels, + const UList<Type>& values +) +{ + const faMesh& mesh = psi_.mesh(); + + // Record face labels of eliminated equations + forAll (faceLabels, i) + { + this->eliminatedEqns().insert(faceLabels[i]); + } + + const labelListList& edges = mesh.patch().faceEdges(); + const labelUList& own = mesh.owner(); + const labelUList& nei = mesh.neighbour(); + + scalarField& Diag = diag(); + Field<Type>& psi = + const_cast + < + GeometricField<Type, faPatchField, areaMesh>& + >(psi_).internalField(); + + + forAll(faceLabels, i) + { + label facei = faceLabels[i]; + + psi[facei] = values[i]; + source_[facei] = values[i]*Diag[facei]; + + if (symmetric() || asymmetric()) + { + const labelList& c= edges[facei]; + + forAll(c, j) + { + label edgei = c[j]; + + if (mesh.isInternalEdge(edgei)) + { + if (symmetric()) + { + if (facei == own[edgei]) + { + source_[nei[edgei]] -= upper()[edgei]*values[i]; + } + else + { + source_[own[edgei]] -= upper()[edgei]*values[i]; + } + + upper()[edgei] = 0.0; + } + else + { + if (facei == own[edgei]) + { + source_[nei[edgei]] -= lower()[edgei]*values[i]; + } + else + { + source_[own[edgei]] -= upper()[edgei]*values[i]; + } + + upper()[edgei] = 0.0; + lower()[edgei] = 0.0; + } + } + else + { + label patchi = mesh.boundary().whichPatch(edgei); + + if (internalCoeffs_[patchi].size()) + { + label patchEdgei = + mesh.boundary()[patchi].whichEdge(edgei); + + internalCoeffs_[patchi][patchEdgei] = + pTraits<Type>::zero; + + boundaryCoeffs_[patchi][patchEdgei] = + pTraits<Type>::zero; + } + } + } + } + } +} + + +// Set reference level for solution +template<class Type> +void faMatrix<Type>::setReference +( + const label facei, + const Type& value +) +{ + if (psi_.needReference()) + { + if (Pstream::master()) + { + source()[facei] += diag()[facei]*value; + diag()[facei] += diag()[facei]; + } + } +} + + +template<class Type> +void faMatrix<Type>::relax(const scalar alpha) +{ + if (alpha <= 0) + { + return; + } + + Field<Type>& S = source(); + scalarField& D = diag(); + + // Store the current unrelaxed diagonal for use in updating the source + scalarField D0(D); + + // Calculate the sum-mag off-diagonal from the interior faces + scalarField sumOff(D.size(), 0.0); + sumMagOffDiag(sumOff); + + // Handle the boundary contributions to the diagonal + forAll(psi_.boundaryField(), patchI) + { + const faPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + + if (ptf.size()) + { + const labelUList& pa = lduAddr().patchAddr(patchI); + Field<Type>& iCoeffs = internalCoeffs_[patchI]; + + if (ptf.coupled()) + { + const Field<Type>& pCoeffs = boundaryCoeffs_[patchI]; + + // For coupled boundaries add the diagonal and + // off-diagonal contributions + forAll(pa, face) + { + D[pa[face]] += component(iCoeffs[face], 0); + sumOff[pa[face]] += mag(component(pCoeffs[face], 0)); + } + } + else + { + // For non-coupled boundaries subtract the diagonal + // contribution off-diagonal sum which avoids having to remove + // it from the diagonal later. + // Also add the source contribution from the relaxation + forAll(pa, face) + { + Type iCoeff0 = iCoeffs[face]; + iCoeffs[face] = cmptMag(iCoeffs[face]); + sumOff[pa[face]] -= cmptMin(iCoeffs[face]); + iCoeffs[face] /= alpha; + S[pa[face]] += + cmptMultiply(iCoeffs[face] - iCoeff0, psi_[pa[face]]); + } + } + } + } + + // Ensure the matrix is diagonally dominant... + max(D, D, sumOff); + + // ... then relax + D /= alpha; + + // Now remove the diagonal contribution from coupled boundaries + forAll(psi_.boundaryField(), patchI) + { + const faPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + + if (ptf.size()) + { + const labelUList& pa = lduAddr().patchAddr(patchI); + Field<Type>& iCoeffs = internalCoeffs_[patchI]; + + if (ptf.coupled()) + { + forAll(pa, face) + { + D[pa[face]] -= component(iCoeffs[face], 0); + } + } + } + } + + // Finally add the relaxation contribution to the source. + S += (D - D0)*psi_.internalField(); +} + + +template<class Type> +void faMatrix<Type>::relax() +{ + if (psi_.mesh().solutionDict().relaxEquation(psi_.name())) + { + relax(psi_.mesh().solutionDict().equationRelaxationFactor(psi_.name())); + } + else + { + if (debug) + { + InfoIn("void faMatrix<Type>::relax()") + << "Relaxation factor for field " << psi_.name() + << " not found. Relaxation will not be used." << endl; + } + } +} + + +template<class Type> +tmp<scalarField> faMatrix<Type>::D() const +{ + tmp<scalarField> tdiag(new scalarField(diag())); + addCmptAvBoundaryDiag(tdiag.ref()); + return tdiag; +} + + +template<class Type> +tmp<areaScalarField> faMatrix<Type>::A() const +{ + tmp<areaScalarField> tAphi + ( + new areaScalarField + ( + IOobject + ( + "A("+psi_.name()+')', + psi_.instance(), + psi_.db() + ), + psi_.mesh(), + dimensions_/psi_.dimensions()/dimArea, + zeroGradientFaPatchScalarField::typeName + ) + ); + + tAphi.ref().primitiveFieldRef() = D()/psi_.mesh().S(); + tAphi.ref().correctBoundaryConditions(); + + return tAphi; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > faMatrix<Type>::H() const +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > tHphi + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "H("+psi_.name()+')', + psi_.instance(), + psi_.db() + ), + psi_.mesh(), + dimensions_/dimArea, + zeroGradientFaPatchScalarField::typeName + ) + ); + GeometricField<Type, faPatchField, areaMesh>& Hphi = tHphi.ref(); + + // Loop over field components + for (direction cmpt=0; cmpt<Type::nComponents; cmpt++) + { + scalarField psiCmpt = psi_.primitiveField().component(cmpt); + + scalarField boundaryDiagCmpt(psi_.size(), 0.0); + addBoundaryDiag(boundaryDiagCmpt, cmpt); + boundaryDiagCmpt.negate(); + addCmptAvBoundaryDiag(boundaryDiagCmpt); + + Hphi.primitiveFieldRef().replace(cmpt, boundaryDiagCmpt*psiCmpt); + } + + Hphi.primitiveFieldRef() += lduMatrix::H(psi_.internalField()) + source_; + addBoundarySource(Hphi.primitiveFieldRef()); + + Hphi.primitiveFieldRef() /= psi_.mesh().S(); + Hphi.correctBoundaryConditions(); + + return tHphi; +} + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > faMatrix<Type>:: +flux() const +{ + if (!psi_.mesh().schemesDict().fluxRequired(psi_.name())) + { + FatalErrorIn("faMatrix<Type>::flux()") + << "flux requested but " << psi_.name() + << " not specified in the fluxRequired sub-dictionary of faSchemes" + << abort(FatalError); + } + + // construct GeometricField<Type, faePatchField, edgeMesh> + tmp<GeometricField<Type, faePatchField, edgeMesh> > tfieldFlux + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + "flux("+psi_.name()+')', + psi_.instance(), + psi_.db() + ), + psi_.mesh(), + dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& fieldFlux = + tfieldFlux.ref(); + + for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++) + { + fieldFlux.primitiveFieldRef().replace + ( + cmpt, + lduMatrix::faceH(psi_.primitiveField().component(cmpt)) + ); + } + + FieldField<Field, Type> InternalContrib = internalCoeffs_; + + forAll(InternalContrib, patchI) + { + InternalContrib[patchI] = + cmptMultiply + ( + InternalContrib[patchI], + psi_.boundaryField()[patchI].patchInternalField() + ); + } + + FieldField<Field, Type> NeighbourContrib = boundaryCoeffs_; + + forAll(NeighbourContrib, patchI) + { + if (psi_.boundaryField()[patchI].coupled()) + { + NeighbourContrib[patchI] = + cmptMultiply + ( + NeighbourContrib[patchI], + psi_.boundaryField()[patchI].patchNeighbourField() + ); + } + } + + forAll(fieldFlux.boundaryField(), patchI) + { + fieldFlux.boundaryFieldRef()[patchI] = + InternalContrib[patchI] - NeighbourContrib[patchI]; + } + + if (faceFluxCorrectionPtr_) + { + fieldFlux += *faceFluxCorrectionPtr_; + } + + return tfieldFlux; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Type> +void faMatrix<Type>::operator=(const faMatrix<Type>& famv) +{ + if (this == &famv) + { + FatalErrorIn("faMatrix<Type>::operator=(const faMatrix<Type>&)") + << "attempted to assignment to self" + << abort(FatalError); + } + + if (&psi_ != &(famv.psi_)) + { + FatalErrorIn("faMatrix<Type>::operator=(const faMatrix<Type>&)") + << "different fields" + << abort(FatalError); + } + + lduMatrix::operator=(famv); + source_ = famv.source_; + internalCoeffs_ = famv.internalCoeffs_; + boundaryCoeffs_ = famv.boundaryCoeffs_; + + if (faceFluxCorrectionPtr_ && famv.faceFluxCorrectionPtr_) + { + *faceFluxCorrectionPtr_ = *famv.faceFluxCorrectionPtr_; + } + else if (famv.faceFluxCorrectionPtr_) + { + faceFluxCorrectionPtr_ = + new GeometricField<Type, faePatchField, edgeMesh> + (*famv.faceFluxCorrectionPtr_); + } +} + + +template<class Type> +void faMatrix<Type>::operator=(const tmp<faMatrix<Type> >& tfamv) +{ + operator=(tfamv()); + tfamv.clear(); +} + + +template<class Type> +void faMatrix<Type>::negate() +{ + lduMatrix::negate(); + source_.negate(); + internalCoeffs_.negate(); + boundaryCoeffs_.negate(); + + if (faceFluxCorrectionPtr_) + { + faceFluxCorrectionPtr_->negate(); + } +} + + +template<class Type> +void faMatrix<Type>::operator+=(const faMatrix<Type>& famv) +{ + checkMethod(*this, famv, "+="); + + dimensions_ += famv.dimensions_; + lduMatrix::operator+=(famv); + source_ += famv.source_; + internalCoeffs_ += famv.internalCoeffs_; + boundaryCoeffs_ += famv.boundaryCoeffs_; + + if (faceFluxCorrectionPtr_ && famv.faceFluxCorrectionPtr_) + { + *faceFluxCorrectionPtr_ += *famv.faceFluxCorrectionPtr_; + } + else if (famv.faceFluxCorrectionPtr_) + { + faceFluxCorrectionPtr_ = new + GeometricField<Type, faePatchField, edgeMesh> + ( + *famv.faceFluxCorrectionPtr_ + ); + } +} + + +template<class Type> +void faMatrix<Type>::operator+=(const tmp<faMatrix<Type> >& tfamv) +{ + operator+=(tfamv()); + tfamv.clear(); +} + + +template<class Type> +void faMatrix<Type>::operator-=(const faMatrix<Type>& famv) +{ + checkMethod(*this, famv, "+="); + + dimensions_ -= famv.dimensions_; + lduMatrix::operator-=(famv); + source_ -= famv.source_; + internalCoeffs_ -= famv.internalCoeffs_; + boundaryCoeffs_ -= famv.boundaryCoeffs_; + + if (faceFluxCorrectionPtr_ && famv.faceFluxCorrectionPtr_) + { + *faceFluxCorrectionPtr_ -= *famv.faceFluxCorrectionPtr_; + } + else if (famv.faceFluxCorrectionPtr_) + { + faceFluxCorrectionPtr_ = + new GeometricField<Type, faePatchField, edgeMesh> + (-*famv.faceFluxCorrectionPtr_); + } +} + + +template<class Type> +void faMatrix<Type>::operator-=(const tmp<faMatrix<Type> >& tfamv) +{ + operator-=(tfamv()); + tfamv.clear(); +} + + +template<class Type> +void faMatrix<Type>::operator+= +( + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(*this, su, "+="); + source() -= su.mesh().S()*su.internalField(); +} + + +template<class Type> +void faMatrix<Type>::operator+= +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + operator+=(tsu()); + tsu.clear(); +} + + +template<class Type> +void faMatrix<Type>::operator-= +( + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(*this, su, "-="); + source() += su.mesh().S()*su.internalField(); +} + + +template<class Type> +void faMatrix<Type>::operator-= +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + operator-=(tsu()); + tsu.clear(); +} + + +template<class Type> +void faMatrix<Type>::operator+= +( + const dimensioned<Type>& su +) +{ + source() -= su.mesh().S()*su; +} + + +template<class Type> +void faMatrix<Type>::operator-= +( + const dimensioned<Type>& su +) +{ + source() += su.mesh().S()*su; +} + + +template<class Type> +void faMatrix<Type>::operator*= +( + const areaScalarField& vsf +) +{ + dimensions_ *= vsf.dimensions(); + lduMatrix::operator*=(vsf.internalField()); + source_ *= vsf.internalField(); + + forAll(boundaryCoeffs_, patchI) + { + scalarField psf = vsf.boundaryField()[patchI].patchInternalField(); + internalCoeffs_[patchI] *= psf; + boundaryCoeffs_[patchI] *= psf; + } + + if (faceFluxCorrectionPtr_) + { + FatalErrorIn("faMatrix<Type>::operator*=(const tmp<areaScalarField>&)") + << "cannot scale a matrix containing a faceFluxCorrection" + << abort(FatalError); + } +} + + +template<class Type> +void faMatrix<Type>::operator*= +( + const tmp<areaScalarField>& tvsf +) +{ + operator*=(tvsf()); + tvsf.clear(); +} + + +template<class Type> +void faMatrix<Type>::operator*= +( + const dimensioned<scalar>& ds +) +{ + dimensions_ *= ds.dimensions(); + lduMatrix::operator*=(ds.value()); + source_ *= ds.value(); + internalCoeffs_ *= ds.value(); + boundaryCoeffs_ *= ds.value(); + + if (faceFluxCorrectionPtr_) + { + *faceFluxCorrectionPtr_ *= ds.value(); + } +} + + +// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * // + +template<class Type> +void checkMethod +( + const faMatrix<Type>& fam1, + const faMatrix<Type>& fam2, + const char* op +) +{ + if (&fam1.psi() != &fam2.psi()) + { + FatalErrorIn + ( + "checkMethod(const faMatrix<Type>&, const faMatrix<Type>&)" + ) << "incompatible fields for operation " + << endl << " " + << "[" << fam1.psi().name() << "] " + << op + << " [" << fam2.psi().name() << "]" + << abort(FatalError); + } + + if (dimensionSet::debug && fam1.dimensions() != fam2.dimensions()) + { + FatalErrorIn + ( + "checkMethod(const faMatrix<Type>&, const faMatrix<Type>&)" + ) << "incompatible dimensions for operation " + << endl << " " + << "[" << fam1.psi().name() << fam1.dimensions()/dimArea << " ] " + << op + << " [" << fam2.psi().name() << fam2.dimensions()/dimArea << " ]" + << abort(FatalError); + } +} + + +template<class Type> +void checkMethod +( + const faMatrix<Type>& fam, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const char* op +) +{ + if (dimensionSet::debug && fam.dimensions()/dimArea != vf.dimensions()) + { + FatalErrorIn + ( + "checkMethod(const faMatrix<Type>&, const GeometricField<Type, " + "faPatchField, areaMesh>&)" + ) << "incompatible dimensions for operation " + << endl << " " + << "[" << fam.psi().name() << fam.dimensions()/dimArea << " ] " + << op + << " [" << vf.name() << vf.dimensions() << " ]" + << abort(FatalError); + } +} + + +template<class Type> +void checkMethod +( + const faMatrix<Type>& fam, + const dimensioned<Type>& dt, + const char* op +) +{ + if (dimensionSet::debug && fam.dimensions()/dimArea != dt.dimensions()) + { + FatalErrorIn + ( + "checkMethod(const faMatrix<Type>&, const dimensioned<Type>&)" + ) << "incompatible dimensions for operation " + << endl << " " + << "[" << fam.psi().name() << fam.dimensions()/dimArea << " ] " + << op + << " [" << dt.name() << dt.dimensions() << " ]" + << abort(FatalError); + } +} + + +template<class Type> +SolverPerformance<Type> solve +( + faMatrix<Type>& fam, + Istream& solverControls +) +{ + return fam.solve(solverControls); +} + +template<class Type> +SolverPerformance<Type> solve +( + const tmp<faMatrix<Type> >& tfam, + Istream& solverControls +) +{ + SolverPerformance<Type> solverPerf = + const_cast<faMatrix<Type>&>(tfam()).solve(solverControls); + + tfam.clear(); + return solverPerf; +} + + +template<class Type> +SolverPerformance<Type> solve(faMatrix<Type>& fam) +{ + return fam.solve(); +} + +template<class Type> +SolverPerformance<Type> solve(const tmp<faMatrix<Type> >& tfam) +{ + SolverPerformance<Type> solverPerf = + const_cast<faMatrix<Type>&>(tfam()).solve(); + + tfam.clear(); + return solverPerf; +} + + +// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>& A, + const faMatrix<Type>& B +) +{ + checkMethod(A, B, "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref() += B; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >& tA, + const faMatrix<Type>& B +) +{ + checkMethod(tA(), B, "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() += B; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>& A, + const tmp<faMatrix<Type> >& tB +) +{ + checkMethod(A, tB(), "+"); + tmp<faMatrix<Type> > tC(tB.ptr()); + tC.ref() += A; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >& tA, + const tmp<faMatrix<Type> >& tB +) +{ + checkMethod(tA(), tB(), "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() += tB(); + tB.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& A +) +{ + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().negate(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& tA +) +{ + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().negate(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& A, + const faMatrix<Type>& B +) +{ + checkMethod(A, B, "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref() -= B; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& tA, + const faMatrix<Type>& B +) +{ + checkMethod(tA(), B, "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() -= B; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& A, + const tmp<faMatrix<Type> >& tB +) +{ + checkMethod(A, tB(), "-"); + tmp<faMatrix<Type> > tC(tB.ptr()); + tC.ref() -= A; + tC.ref().negate(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& tA, + const tmp<faMatrix<Type> >& tB +) +{ + checkMethod(tA(), tB(), "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() -= tB(); + tB.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>& A, + const faMatrix<Type>& B +) +{ + checkMethod(A, B, "=="); + return (A - B); +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >& tA, + const faMatrix<Type>& B +) +{ + checkMethod(tA(), B, "=="); + return (tA - B); +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>& A, + const tmp<faMatrix<Type> >& tB +) +{ + checkMethod(A, tB(), "=="); + return (A - tB); +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >& tA, + const tmp<faMatrix<Type> >& tB +) +{ + checkMethod(tA(), tB(), "=="); + return (tA - tB); +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>& A, + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(A, su, "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() -= su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >& tA, + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(tA(), su, "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() -= su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>& A, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + checkMethod(A, tsu(), "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() -= tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >& tA, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + checkMethod(tA(), tsu(), "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() -= tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const GeometricField<Type, faPatchField, areaMesh>& su, + const faMatrix<Type>& A +) +{ + checkMethod(A, su, "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() -= su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const GeometricField<Type, faPatchField, areaMesh>& su, + const tmp<faMatrix<Type> >& tA +) +{ + checkMethod(tA(), su, "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() -= su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu, + const faMatrix<Type>& A +) +{ + checkMethod(A, tsu(), "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() -= tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu, + const tmp<faMatrix<Type> >& tA +) +{ + checkMethod(tA(), tsu(), "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() -= tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& A, + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(A, su, "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() += su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& tA, + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(tA(), su, "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() += su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& A, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + checkMethod(A, tsu(), "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() += tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& tA, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + checkMethod(tA(), tsu(), "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() += tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const GeometricField<Type, faPatchField, areaMesh>& su, + const faMatrix<Type>& A +) +{ + checkMethod(A, su, "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().negate(); + tC.ref().source() -= su.mesh().S()*su.internalField(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const GeometricField<Type, faPatchField, areaMesh>& su, + const tmp<faMatrix<Type> >& tA +) +{ + checkMethod(tA(), su, "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().negate(); + tC.ref().source() -= su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu, + const faMatrix<Type>& A +) +{ + checkMethod(A, tsu(), "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().negate(); + tC.ref().source() -= tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu, + const tmp<faMatrix<Type> >& tA +) +{ + checkMethod(tA(), tsu(), "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().negate(); + tC.ref().source() -= tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>& A, + const dimensioned<Type>& su +) +{ + checkMethod(A, su, "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() -= su.value()*A.psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >& tA, + const dimensioned<Type>& su +) +{ + checkMethod(tA(), su, "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() -= su.value()*tC().psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const dimensioned<Type>& su, + const faMatrix<Type>& A +) +{ + checkMethod(A, su, "+"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() -= su.value()*A.psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const dimensioned<Type>& su, + const tmp<faMatrix<Type> >& tA +) +{ + checkMethod(tA(), su, "+"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() -= su.value()*tC().psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& A, + const dimensioned<Type>& su +) +{ + checkMethod(A, su, "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() += su.value()*tC().psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& tA, + const dimensioned<Type>& su +) +{ + checkMethod(tA(), su, "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() += su.value()*tC().psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const dimensioned<Type>& su, + const faMatrix<Type>& A +) +{ + checkMethod(A, su, "-"); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().negate(); + tC.ref().source() -= su.value()*A.psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const dimensioned<Type>& su, + const tmp<faMatrix<Type> >& tA +) +{ + checkMethod(tA(), su, "-"); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().negate(); + tC.ref().source() -= su.value()*tC().psi().mesh().S(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>& A, + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(A, su, "=="); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() += su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >& tA, + const GeometricField<Type, faPatchField, areaMesh>& su +) +{ + checkMethod(tA(), su, "=="); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() += su.mesh().S()*su.internalField(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>& A, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + checkMethod(A, tsu(), "=="); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() += tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >& tA, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu +) +{ + checkMethod(tA(), tsu(), "=="); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() += tsu().mesh().S()*tsu().internalField(); + tsu.clear(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>& A, + const dimensioned<Type>& su +) +{ + checkMethod(A, su, "=="); + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref().source() += A.psi().mesh().S()*su.value(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >& tA, + const dimensioned<Type>& su +) +{ + checkMethod(tA(), su, "=="); + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref().source() += tC().psi().mesh().S()*su.value(); + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const areaScalarField& vsf, + const faMatrix<Type>& A +) +{ + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref() *= vsf; + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const tmp<areaScalarField>& tvsf, + const faMatrix<Type>& A +) +{ + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref() *= tvsf; + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const areaScalarField& vsf, + const tmp<faMatrix<Type> >& tA +) +{ + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() *= vsf; + return tC; +} + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const tmp<areaScalarField>& tvsf, + const tmp<faMatrix<Type> >& tA +) +{ + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() *= tvsf; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const dimensioned<scalar>& ds, + const faMatrix<Type>& A +) +{ + tmp<faMatrix<Type> > tC(new faMatrix<Type>(A)); + tC.ref() *= ds; + return tC; +} + + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const dimensioned<scalar>& ds, + const tmp<faMatrix<Type> >& tA +) +{ + tmp<faMatrix<Type> > tC(tA.ptr()); + tC.ref() *= ds; + return tC; +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Type> +Ostream& operator<<(Ostream& os, const faMatrix<Type>& fam) +{ + os << static_cast<const lduMatrix&>(fam) << nl + << fam.dimensions_ << nl + << fam.source_ << nl + << fam.internalCoeffs_ << nl + << fam.boundaryCoeffs_ << endl; + + os.check("Ostream& operator<<(Ostream&, faMatrix<Type>&"); + + return os; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * Solvers * * * * * * * * * * * * * * * * * // + +#include "faMatrixSolve.C" + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.H b/src/finiteArea/faMatrices/faMatrix/faMatrix.H new file mode 100644 index 0000000000000000000000000000000000000000..6172216a4b928e82405259d7ba9b0950490e1d72 --- /dev/null +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.H @@ -0,0 +1,756 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faMatrix<Type> + +Description + Finite-Area matrix. + +SourceFiles + faMatrix.C + faMatrixSolve.C + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faMatrix_H +#define faMatrix_H + +#include "areaFields.H" +#include "edgeFields.H" +#include "lduMatrix.H" +#include "tmp.H" +#include "autoPtr.H" +#include "dimensionedTypes.H" +#include "className.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * Forward declaration of template friend fuctions * * * * * * * // + +template<class Type> +class faMatrix; + +template<class Type> +Ostream& operator<<(Ostream&, const faMatrix<Type>&); + + +/*---------------------------------------------------------------------------*\ + Class faMatrix Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class faMatrix +: + public tmp<faMatrix<Type>>::refCount, + public lduMatrix +{ + // Private data + + // Reference to GeometricField<Type, faPatchField, areaMesh> + const GeometricField<Type, faPatchField, areaMesh>& psi_; + + //- Dimension set + dimensionSet dimensions_; + + //- Source term + Field<Type> source_; + + //- Boundary scalar field containing pseudo-matrix coeffs + // for internal faces + FieldField<Field, Type> internalCoeffs_; + + //- Boundary scalar field containing pseudo-matrix coeffs + // for boundary faces + FieldField<Field, Type> boundaryCoeffs_; + + + //- Face flux field for non-orthogonal correction + mutable GeometricField<Type, faePatchField, edgeMesh> + *faceFluxCorrectionPtr_; + + + // Private member functions + + //- Add patch contribution to internal field + template<class Type2> + void addToInternalField + ( + const labelUList& addr, + const Field<Type2>& pf, + Field<Type2>& intf + ) const; + + template<class Type2> + void addToInternalField + ( + const labelUList& addr, + const tmp<Field<Type2> >& tpf, + Field<Type2>& intf + ) const; + + //- Subtract patch contribution from internal field + template<class Type2> + void subtractFromInternalField + ( + const labelUList& addr, + const Field<Type2>& pf, + Field<Type2>& intf + ) const; + + template<class Type2> + void subtractFromInternalField + ( + const labelUList& addr, + const tmp<Field<Type2> >& tpf, + Field<Type2>& intf + ) const; + + + // Matrix completion functionality + + void addBoundaryDiag + ( + scalarField& diag, + const direction cmpt + ) const; + + void addCmptAvBoundaryDiag(scalarField& diag) const; + + void addBoundarySource + ( + Field<Type>& source, + const bool couples = true + ) const; + + +public: + + //- Solver class returned by the solver function + class faSolver + { + faMatrix<Type>& faMat_; + + autoPtr<lduMatrix::solver> solver_; + + public: + + // Constructors + + faSolver(faMatrix<Type>& faMat, autoPtr<lduMatrix::solver> sol) + : + faMat_(faMat), + solver_(sol) + {} + + + // Member functions + + //- Solve returning the solution statistics. + // Solver controls read from dictionary + SolverPerformance<Type> solve(const dictionary&); + + //- Solve returning the solution statistics. + // Solver controls read from faSolution + SolverPerformance<Type> solve(); + }; + + + ClassName("faMatrix"); + + + // Constructors + + //- Construct given a field to solve for + faMatrix + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const dimensionSet& + ); + + //- Construct as copy + faMatrix(const faMatrix<Type>&); + + //- Construct from Istream given field to solve for + faMatrix + ( + const GeometricField<Type, faPatchField, areaMesh>&, + Istream& + ); + + + //- Destructor + virtual ~faMatrix(); + + + // Member functions + + // Access + + const GeometricField<Type, faPatchField, areaMesh>& psi() const + { + return psi_; + } + + const dimensionSet& dimensions() const + { + return dimensions_; + } + + Field<Type>& source() + { + return source_; + } + + const Field<Type>& source() const + { + return source_; + } + + //- faBoundary scalar field containing pseudo-matrix coeffs + // for internal cells + FieldField<Field, Type>& internalCoeffs() + { + return internalCoeffs_; + } + + //- faBoundary scalar field containing pseudo-matrix coeffs + // for boundary cells + FieldField<Field, Type>& boundaryCoeffs() + { + return boundaryCoeffs_; + } + + + //- Declare return type of the faceFluxCorrectionPtr() function + typedef GeometricField<Type, faePatchField, edgeMesh> + *edgeTypeFieldPtr; + + //- Return pointer to face-flux non-orthogonal correction field + edgeTypeFieldPtr& faceFluxCorrectionPtr() + { + return faceFluxCorrectionPtr_; + } + + + // Operations + + //- Set solution in given cells and eliminate corresponding + // equations from the matrix + void setValues + ( + const labelUList& faces, + const UList<Type>& values + ); + + //- Set reference level for solution + void setReference + ( + const label facei, + const Type& value + ); + + //- Set reference level for a component of the solution + // on a given patch face + void setComponentReference + ( + const label patchi, + const label facei, + const direction cmpt, + const scalar value + ); + + //- Relax matrix (for steady-state solution). + // alpha = 1 : diagonally equal + // alpha < 1 : ,, dominant + // alpha = 0 : do nothing + void relax(const scalar alpha); + + //- Relax matrix (for steadty-state solution). + // alpha is read from controlDict + void relax(); + + //- Solve returning the solution statistics. + // Solver controls read Istream + SolverPerformance<Type> solve(const dictionary&); + + //- Solve returning the solution statistics. + // Solver controls read from faSolution + SolverPerformance<Type> solve(); + + //- Return the matrix residual + tmp<Field<Type> > residual() const; + + //- Return the matrix diagonal + tmp<scalarField> D() const; + + //- Return the central coefficient + tmp<areaScalarField> A() const; + + //- Return the H operation source + tmp<GeometricField<Type, faPatchField, areaMesh> > H() const; + + //- Return the face-flux field from the matrix + tmp<GeometricField<Type, faePatchField, edgeMesh> > flux() const; + + + // Member operators + + void operator=(const faMatrix<Type>&); + void operator=(const tmp<faMatrix<Type> >&); + + void negate(); + + void operator+=(const faMatrix<Type>&); + void operator+=(const tmp<faMatrix<Type> >&); + + void operator-=(const faMatrix<Type>&); + void operator-=(const tmp<faMatrix<Type> >&); + + void operator+=(const GeometricField<Type,faPatchField,areaMesh>&); + void operator+=(const tmp<GeometricField<Type,faPatchField,areaMesh> >&); + + void operator-=(const GeometricField<Type,faPatchField,areaMesh>&); + void operator-=(const tmp<GeometricField<Type,faPatchField,areaMesh> >&); + + void operator+=(const dimensioned<Type>&); + void operator-=(const dimensioned<Type>&); + + void operator*=(const areaScalarField&); + void operator*=(const tmp<areaScalarField>&); + + void operator*=(const dimensioned<scalar>&); + + + // Ostream operator + + friend Ostream& operator<< <Type> + ( + Ostream&, + const faMatrix<Type>& + ); +}; + + +// * * * * * * * * * * * * * * * Global functions * * * * * * * * * * * * * // + +template<class Type> +void checkMethod +( + const faMatrix<Type>&, + const faMatrix<Type>&, + const char* +); + +template<class Type> +void checkMethod +( + const faMatrix<Type>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const char* +); + +template<class Type> +void checkMethod +( + const faMatrix<Type>&, + const dimensioned<Type>&, + const char* +); + + +//- Solve returning the solution statistics given convergence tolerance +// Solver controls read Istream +template<class Type> +SolverPerformance<Type> solve(faMatrix<Type>&, Istream&); + + +//- Solve returning the solution statistics given convergence tolerance, +// deleting temporary matrix after solution. +// Solver controls read Istream +template<class Type> +SolverPerformance<Type> solve(const tmp<faMatrix<Type> >&, Istream&); + + +//- Solve returning the solution statistics given convergence tolerance +// Solver controls read faSolution +template<class Type> +SolverPerformance<Type> solve(faMatrix<Type>&); + + +//- Solve returning the solution statistics given convergence tolerance, +// deleting temporary matrix after solution. +// Solver controls read faSolution +template<class Type> +SolverPerformance<Type> solve(const tmp<faMatrix<Type> >&); + + +// * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>&, + const GeometricField<Type, faPatchField, areaMesh>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >&, + const GeometricField<Type, faPatchField, areaMesh>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const faMatrix<Type>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const GeometricField<Type, faPatchField, areaMesh>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const GeometricField<Type, faPatchField, areaMesh>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>&, + const GeometricField<Type, faPatchField, areaMesh>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >&, + const GeometricField<Type, faPatchField, areaMesh>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const faMatrix<Type>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const GeometricField<Type, faPatchField, areaMesh>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const GeometricField<Type, faPatchField, areaMesh>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const tmp<faMatrix<Type> >&, + const dimensioned<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator+ +( + const dimensioned<Type>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const tmp<faMatrix<Type> >&, + const dimensioned<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator- +( + const dimensioned<Type>&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>&, + const GeometricField<Type, faPatchField, areaMesh>& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >&, + const GeometricField<Type, faPatchField, areaMesh>& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const faMatrix<Type>&, + const dimensioned<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator== +( + const tmp<faMatrix<Type> >&, + const dimensioned<Type>& +); + + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const areaScalarField&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const areaScalarField&, + const tmp<faMatrix<Type> >& +); + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const tmp<areaScalarField>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const tmp<areaScalarField>&, + const tmp<faMatrix<Type> >& +); + + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const dimensioned<scalar>&, + const faMatrix<Type>& +); + +template<class Type> +tmp<faMatrix<Type> > operator* +( + const dimensioned<scalar>&, + const tmp<faMatrix<Type> >& +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faMatrix.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C b/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C new file mode 100644 index 0000000000000000000000000000000000000000..701fb8de494cb0d447547f318cb161b22c33666a --- /dev/null +++ b/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C @@ -0,0 +1,233 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Finite-Area matrix basic solvers. + +\*---------------------------------------------------------------------------*/ + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Set reference level for a component of the solution +// on a given patch face +template<class Type> +void faMatrix<Type>::setComponentReference +( + const label patchi, + const label facei, + const direction cmpt, + const scalar value +) +{ + internalCoeffs_[patchi][facei].component(cmpt) += + diag()[psi_.mesh().boundary()[patchi].faceCells()[facei]]; + + boundaryCoeffs_[patchi][facei].component(cmpt) += + diag()[psi_.mesh().boundary()[patchi].faceCells()[facei]]*value; +} + + +template<class Type> +SolverPerformance<Type> faMatrix<Type>::solve(const dictionary& solverControls) +{ + if (debug) + { + Info<< "faMatrix<Type>::solve(const dictionary&) : " + "solving faMatrix<Type>" + << endl; + } + + SolverPerformance<Type> solverPerfVec + ( + "faMatrix<Type>::solve", + psi_.name() + ); + + scalarField saveDiag = diag(); + + Field<Type> source = source_; + addBoundarySource(source); + + // Make a copy of interfaces: no longer a reference + // HJ, 20/Nov/2007 + lduInterfaceFieldPtrsList interfaces = + psi_.boundaryField().scalarInterfaces(); + + // Cast into a non-const to solve. HJ, 6/May/2016 + GeometricField<Type, faPatchField, areaMesh>& psi = + const_cast<GeometricField<Type, faPatchField, areaMesh>&>(psi_); + + for (direction cmpt = 0; cmpt < Type::nComponents; cmpt++) + { + // copy field and source + + scalarField psiCmpt = psi_.primitiveField().component(cmpt); + addBoundaryDiag(diag(), cmpt); + + scalarField sourceCmpt = source.component(cmpt); + + FieldField<Field, scalar> bouCoeffsCmpt + ( + boundaryCoeffs_.component(cmpt) + ); + + FieldField<Field, scalar> intCoeffsCmpt + ( + internalCoeffs_.component(cmpt) + ); + + // Use the initMatrixInterfaces and updateMatrixInterfaces to correct + // bouCoeffsCmpt for the explicit part of the coupled boundary + // conditions + initMatrixInterfaces + ( + true, + bouCoeffsCmpt, + interfaces, + psiCmpt, + sourceCmpt, + cmpt + ); + + updateMatrixInterfaces + ( + true, + bouCoeffsCmpt, + interfaces, + psiCmpt, + sourceCmpt, + cmpt + ); + + solverPerformance solverPerf; + + // Solver call + solverPerf = lduMatrix::solver::New + ( + psi_.name() + pTraits<Type>::componentNames[cmpt], + *this, + bouCoeffsCmpt, + intCoeffsCmpt, + interfaces, + solverControls + )->solve(psiCmpt, sourceCmpt, cmpt); + + if (SolverPerformance<Type>::debug) + { + solverPerf.print(Info); + } + + solverPerfVec.replace(cmpt, solverPerf); + solverPerfVec.solverName() = solverPerf.solverName(); + + psi.primitiveFieldRef().replace(cmpt, psiCmpt); + diag() = saveDiag; + } + + psi.correctBoundaryConditions(); + + return solverPerfVec; +} + + +template<class Type> +SolverPerformance<Type> faMatrix<Type>::faSolver::solve() +{ + return solvei + ( + faMat_.psi().mesh().solutionDict().solverDict + ( + faMat_.psi().name() + ) + ); +} + + +template<class Type> +SolverPerformance<Type> faMatrix<Type>::solve() +{ + return solve + ( + this->psi().mesh().solutionDict().solverDict + ( + this->psi().name() + ) + ); +} + + +// Return the matrix residual +template<class Type> +tmp<Field<Type> > faMatrix<Type>::residual() const +{ + tmp<Field<Type> > tres(source_); + Field<Type>& res = tres(); + + addBoundarySource(res); + + // Make a copy of interfaces: no longer a reference + // HJ, 20/Nov/2007 + lduInterfaceFieldPtrsList interfaces = + psi_.boundaryField().scalarInterfaces(); + + // Loop over field components + for (direction cmpt = 0; cmpt < Type::nComponents; cmpt++) + { + scalarField psiCmpt = psi_.internalField().component(cmpt); + + scalarField boundaryDiagCmpt(psi_.size(), 0.0); + addBoundaryDiag(boundaryDiagCmpt, cmpt); + + FieldField<Field, scalar> bouCoeffsCmpt + ( + boundaryCoeffs_.component(cmpt) + ); + + res.replace + ( + cmpt, + lduMatrix::residual + ( + psiCmpt, + res.component(cmpt) - boundaryDiagCmpt*psiCmpt, + bouCoeffsCmpt, + interfaces, + cmpt + ) + ); + } + + return tres; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C new file mode 100644 index 0000000000000000000000000000000000000000..f7e8a81e7588e3ae55d3709f6595d60250f792fd --- /dev/null +++ b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C @@ -0,0 +1,167 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Finite-Area scalar matrix member functions and operators + +\*---------------------------------------------------------------------------*/ + +#include "faScalarMatrix.H" +#include "zeroGradientFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Set reference level for a component of the solution +// on a given patch face +template<> +void faMatrix<scalar>::setComponentReference +( + const label patchI, + const label edgeI, + const direction, + const scalar value +) +{ + const labelUList& faceLabels = + psi_.mesh().boundary()[patchI].edgeFaces(); + + internalCoeffs_[patchI][edgeI] += + diag()[faceLabels[edgeI]]; + + boundaryCoeffs_[patchI][edgeI] = value; +} + + +template<> +solverPerformance faMatrix<scalar>::solve +( + const dictionary& solverControls +) +{ + if (debug) + { + Info<< "faMatrix<scalar>::solve(const dictionary&) : " + "solving faMatrix<scalar>" + << endl; + } + + GeometricField<scalar, faPatchField, areaMesh>& psi = + const_cast<GeometricField<scalar, faPatchField, areaMesh>&>(psi_); + + scalarField saveDiag = diag(); + addBoundaryDiag(diag(), 0); + + scalarField totalSource = source_; + addBoundarySource(totalSource, 0); + + // Solver call + solverPerformance solverPerf = lduMatrix::solver::New + ( + psi_.name(), + *this, + boundaryCoeffs_, + internalCoeffs_, + psi_.boundaryField().scalarInterfaces(), + solverControls + )->solve(psi.ref(), totalSource); + + solverPerf.print(Info); + + diag() = saveDiag; + + psi.correctBoundaryConditions(); + + return solverPerf; +} + + +// Return the matrix residual +template<> +tmp<scalarField> faMatrix<scalar>::residual() const +{ + scalarField boundaryDiag(psi_.size(), 0.0); + addBoundaryDiag(boundaryDiag, 0); + + tmp<scalarField> tres + ( + lduMatrix::residual + ( + psi_.internalField(), + source_ - boundaryDiag*psi_.internalField(), + boundaryCoeffs_, + psi_.boundaryField().scalarInterfaces(), + 0 + ) + ); + + addBoundarySource(tres.ref()); + + return tres; +} + + +// H operator +template<> +tmp<areaScalarField> faMatrix<scalar>::H() const +{ + tmp<areaScalarField> tHphi + ( + new areaScalarField + ( + IOobject + ( + "H("+psi_.name()+')', + psi_.instance(), + psi_.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + psi_.mesh(), + dimensions_/dimArea, + zeroGradientFaPatchScalarField::typeName + ) + ); + areaScalarField Hphi = tHphi(); + + Hphi.primitiveFieldRef() = (lduMatrix::H(psi_.primitiveField()) + source_); + addBoundarySource(Hphi.primitiveFieldRef()); + + Hphi.ref() /= psi_.mesh().S(); + Hphi.correctBoundaryConditions(); + + return tHphi; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.H b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.H new file mode 100644 index 0000000000000000000000000000000000000000..e865b9e9306027c56d0ab15b0895035874eef6c9 --- /dev/null +++ b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.H @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faScalarMatrix + +Description + Template specialisation for scalar faMatrix + +SourceFiles + faScalarMatrix.C + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faScalarMatrix_H +#define faScalarMatrix_H + +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Set reference level for a component of the solution +// on a given patch face +template<> +void faMatrix<scalar>::setComponentReference +( + const label patchi, + const label facei, + const direction, + const scalar value +); + +template<> +SolverPerformance<scalar> faMatrix<scalar>::solve(const dictionary&); + +// Return the matrix residual +template<> +tmp<scalarField> faMatrix<scalar>::residual() const; + +// H operator +template<> +tmp<areaScalarField> faMatrix<scalar>::H() const; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C new file mode 100644 index 0000000000000000000000000000000000000000..3968894470617a3d3105288f08423c9195870959 --- /dev/null +++ b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.C @@ -0,0 +1,400 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faBoundaryMesh.H" +#include "faMesh.H" +#include "primitiveMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(faBoundaryMesh, 0); + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from dictionary +faBoundaryMesh::faBoundaryMesh +( + const IOobject& io, + const faMesh& mesh +) +: + faPatchList(), + regIOobject(io), + mesh_(mesh) +{ + if (readOpt() == IOobject::MUST_READ) + { + faPatchList& patches = *this; + + // Read polyPatchList + Istream& is = readStream(typeName); + + PtrList<entry> patchEntries(is); + patches.setSize(patchEntries.size()); + + forAll(patches, patchI) + { + patches.set + ( + patchI, + faPatch::New + ( + patchEntries[patchI].keyword(), + patchEntries[patchI].dict(), + patchI, + *this + ) + ); + } + + // Check state of IOstream + is.check + ( + "faBoundaryMesh::polyBoundaryMesh" + "(const IOobject&, const faMesh&)" + ); + + close(); + } +} + + +// Construct given size. Patches will be set later +faBoundaryMesh::faBoundaryMesh +( + const IOobject& io, + const faMesh& pm, + const label size +) +: + faPatchList(size), + regIOobject(io), + mesh_(pm) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Calculate the geometry for the patches (transformation tensors etc.) +void faBoundaryMesh::calcGeometry() +{ + forAll(*this, patchi) + { + operator[](patchi).initGeometry(); + } + + forAll(*this, patchi) + { + operator[](patchi).calcGeometry(); + } +} + + +// Return the mesh reference +const faMesh& faBoundaryMesh::mesh() const +{ + return mesh_; +} + + +lduInterfacePtrsList faBoundaryMesh::interfaces() const +{ + lduInterfacePtrsList interfaces(size()); + + forAll (interfaces, patchi) + { + if (isA<lduInterface>(this->operator[](patchi))) + { + interfaces.set + ( + patchi, + &refCast<const lduInterface>(this->operator[](patchi)) + ); + } + } + + return interfaces; +} + + +// Return a list of patch types +wordList faBoundaryMesh::types() const +{ + const faPatchList& patches = *this; + + wordList t(patches.size()); + + forAll (patches, patchI) + { + t[patchI] = patches[patchI].type(); + } + + return t; +} + + +// Return a list of patch names +wordList faBoundaryMesh::names() const +{ + const faPatchList& patches = *this; + + wordList t(patches.size()); + + forAll (patches, patchI) + { + t[patchI] = patches[patchI].name(); + } + + return t; +} + + +label faBoundaryMesh::findPatchID(const word& patchName) const +{ + const faPatchList& patches = *this; + + forAll (patches, patchI) + { + if (patches[patchI].name() == patchName) + { + return patchI; + } + } + + // Patch not found + return -1; +} + + +Foam::labelList Foam::faBoundaryMesh::findIndices +( + const keyType& key, + const bool usePatchGroups +) const +{ + DynamicList<label> indices; + + if (!key.empty()) + { + if (key.isPattern()) + { + indices = findStrings(key, this->names()); + } + else + { + // Literal string. Special version of above to avoid + // unnecessary memory allocations + + indices.setCapacity(1); + forAll(*this, i) + { + if (key == operator[](i).name()) + { + indices.append(i); + break; + } + } + } + } + + return indices; +} + + +// Return patch index for a given edge label +label faBoundaryMesh::whichPatch(const label edgeIndex) const +{ + // Find out which patch the current face belongs to by comparing label + // with patch start labels. + // If the face is internal, return -1; + // if it is off the end of the list, abort + if (edgeIndex >= mesh().nEdges()) + { + FatalErrorIn + ( + "faBoundaryMesh::whichPatch(const label edgeIndex) const" + ) << "given label greater than the number of edges" + << abort(FatalError); + } + + if (edgeIndex < mesh().nInternalEdges()) + { + return -1; + } + + forAll (*this, patchI) + { + label start = mesh_.patchStarts()[patchI]; + label size = operator[](patchI).faPatch::size(); + + if + ( + edgeIndex >= start + && edgeIndex < start + size + ) + { + return patchI; + } + } + + // If not in any of above, it's trouble! + FatalErrorIn + ( + "label faBoundaryMesh::whichPatch(const label edgeIndex) const" + ) << "error in patch search algorithm" + << abort(FatalError); + + return -1; +} + + +bool faBoundaryMesh::checkDefinition(const bool report) const +{ + label nextPatchStart = mesh().nInternalEdges(); + const faBoundaryMesh& bm = *this; + + bool boundaryError = false; + + forAll (bm, patchI) + { + if (bm[patchI].start() != nextPatchStart) + { + boundaryError = true; + + Info + << "bool faBoundaryMesh::checkDefinition(" + << "const bool report) const : " + << "Problem with boundary patch " << patchI + << ".\nThe patch should start on face no " << nextPatchStart + << " and the boundary file specifies " << bm[patchI].start() + << "." << nl << endl; + } + + nextPatchStart += bm[patchI].faPatch::size(); + } + + if (boundaryError) + { + SeriousErrorIn + ( + "bool faBoundaryMesh::checkDefinition(" + "const bool report) const" + ) << "This mesh is not valid: boundary definition is in error." + << endl; + } + else + { + if (debug || report) + { + Info << "Boundary definition OK." << endl; + } + } + + return boundaryError; +} + + +// Correct faBoundaryMesh after moving points +void faBoundaryMesh::movePoints(const pointField& p) +{ + faPatchList& patches = *this; + + forAll (patches, patchI) + { + patches[patchI].initMovePoints(p); + } + + forAll (patches, patchI) + { + patches[patchI].movePoints(p); + } +} + + +void faBoundaryMesh::updateMesh() +{ + faPatchList& patches = *this; + + forAll(patches, patchi) + { + patches[patchi].initUpdateMesh(); + } + + forAll(patches, patchi) + { + patches[patchi].updateMesh(); + } +} + + +// writeData member function required by regIOobject +bool faBoundaryMesh::writeData(Ostream& os) const +{ + const faPatchList& patches = *this; + + os << patches.size() << nl << token::BEGIN_LIST << incrIndent << nl; + + forAll(patches, patchi) + { + os << indent << patches[patchi].name() << nl + << indent << token::BEGIN_BLOCK << nl + << incrIndent << patches[patchi] << decrIndent + << indent << token::END_BLOCK << endl; + } + + os << decrIndent << token::END_LIST; + + // Check state of IOstream + os.check("polyBoundaryMesh::writeData(Ostream& os) const"); + + return os.good(); +} + + +Ostream& operator<<(Ostream& os, const faBoundaryMesh& bm) +{ + bm.writeData(os); + return os; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..93355ead802423eef0b48627916905993a9b7ef3 --- /dev/null +++ b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H @@ -0,0 +1,171 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faBoundaryMesh + +Description + Finite area boundary mesh + +SourceFiles + faBoundaryMesh.C + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faBoundaryMesh_H +#define faBoundaryMesh_H + +#include "faPatchList.H" +#include "lduInterfacePtrsList.H" +#include "wordList.H" +#include "pointField.H" +#include "regIOobject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +class faMesh; + +/*---------------------------------------------------------------------------*\ + Class faBoundaryMesh Declaration +\*---------------------------------------------------------------------------*/ + +class faBoundaryMesh +: + public faPatchList, + public regIOobject +{ + // private data + + //- Reference to mesh + const faMesh& mesh_; + + //- Disallow construct as copy + faBoundaryMesh(const faBoundaryMesh&); + + //- Disallow assignment + void operator=(const faBoundaryMesh&); + + +public: + + //- Runtime type information + TypeName("faBoundaryMesh"); + + + // Constructors + + //- Construct from dictionary + faBoundaryMesh + ( + const IOobject& io, + const faMesh& fam + ); + + //- Construct given size + faBoundaryMesh + ( + const IOobject& io, + const faMesh& fam, + const label size + ); + + + // Destructor - default + + + // Member functions + + // Access + + //- Calculate the geometry for the patches + // (transformation tensors etc.) + void calcGeometry(); + + //- Return the mesh reference + const faMesh& mesh() const; + + //- Return a list of pointers for each patch + // with only those pointing to interfaces being set + lduInterfacePtrsList interfaces() const; + + //- Return a list of patch types + wordList types() const; + + //- Return a list of patch names + wordList names() const; + + //- Find patch index given a name + label findPatchID(const word& patchName) const; + + //- Find patch indices given a name + // Compatibility change HJ, 12/Aug/2017 + labelList findIndices + ( + const keyType&, + const bool useGroups = false + ) const; + + //- Return patch index for a given edge label + label whichPatch(const label edgeIndex) const; + + //- Check boundary definition + bool checkDefinition(const bool report = false) const; + + // Edit + + //- Correct faBoundaryMesh after moving points + void movePoints(const pointField&); + + //- Correct faBoundaryMesh after topology update + void updateMesh(); + + //- writeData member function required by regIOobject + bool writeData(Ostream&) const; + + + // Ostream operator + + friend Ostream& operator<<(Ostream&, const faBoundaryMesh&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C b/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C new file mode 100644 index 0000000000000000000000000000000000000000..00bbc4edf6cdb3cd9ea108d7ca54c5aaa26ba15a --- /dev/null +++ b/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +Author + Hrvoje Jasak + +\*----------------------------------------------------------------------------*/ + +#include "faGlobalMeshData.H" +#include "faMesh.H" +#include "globalMeshData.H" +#include "PstreamCombineReduceOps.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faGlobalMeshData::faGlobalMeshData(const faMesh& mesh) +: + faProcessorTopology(mesh.boundary(), UPstream::worldComm), + mesh_(mesh), + nGlobalPoints_(-1), + sharedPointLabels_(0), + sharedPointAddr_(0) +{ + updateMesh(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::faGlobalMeshData::~faGlobalMeshData() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::faMesh& Foam::faGlobalMeshData::mesh() const +{ + return mesh_; +} + + +// Update all data after morph +void Foam::faGlobalMeshData::updateMesh() +{ + label polyMeshNGlobalPoints = + mesh_().globalData().nGlobalPoints(); + + const labelList& polyMeshSharedPointLabels = + mesh_().globalData().sharedPointLabels(); + + const labelList& polyMeshSharedPointAddr = + mesh_().globalData().sharedPointAddr(); + + labelHashSet sharedPointLabels; + + labelField globalList(polyMeshNGlobalPoints, 0); + + forAll(mesh_.boundary(), patchI) + { + if(mesh_.boundary()[patchI].type() == processorFaPatch::typeName) + { + const labelList& localPointLabels = + mesh_.boundary()[patchI].pointLabels(); + + forAll(localPointLabels, pointI) + { + label polyMeshPoint = + mesh_.patch().meshPoints()[localPointLabels[pointI]]; + + label sharedPolyMeshPoint = + findIndex(polyMeshSharedPointLabels, polyMeshPoint); + + if + ( + sharedPolyMeshPoint != -1 + && !sharedPointLabels.found(localPointLabels[pointI]) + ) + { + globalList[polyMeshSharedPointAddr[sharedPolyMeshPoint]] + += 1; + + sharedPointLabels.insert(localPointLabels[pointI]); + } + } + } + } + + sharedPointLabels_ = sharedPointLabels.toc(); + + combineReduce(globalList, plusEqOp<labelField >()); + + nGlobalPoints_ = 0; + for (label i=0; i<globalList.size(); i++) + { + if(globalList[i] > 0) + { + globalList[i] = ++nGlobalPoints_; + } + } + + sharedPointAddr_.setSize(sharedPointLabels_.size()); + forAll(sharedPointAddr_, pointI) + { + label polyMeshSharedPointIndex = findIndex + ( + polyMeshSharedPointLabels, + mesh_.patch().meshPoints()[sharedPointLabels_[pointI]] + ); + + sharedPointAddr_[pointI] = + globalList[polyMeshSharedPointAddr[polyMeshSharedPointIndex]] + - 1; + } +} + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.H b/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.H new file mode 100644 index 0000000000000000000000000000000000000000..87b7ba7eda675193a25909f9557eb2f74faaaa7b --- /dev/null +++ b/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.H @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faGlobalMeshData + +Description + Various mesh related information for a parallel run + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faGlobalMeshData_H +#define faGlobalMeshData_H + +#include "faProcessorTopology.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Class forward declarations +class faMesh; + +/*---------------------------------------------------------------------------*\ + Class faGlobalMeshData Declaration +\*---------------------------------------------------------------------------*/ + +class faGlobalMeshData +: + public faProcessorTopology +{ + // Private data + + //- Reference to mesh + const faMesh& mesh_; + + // Globally shared point addressing + + //- Total number of global points + label nGlobalPoints_; + + //- Indices of local points that are globally shared + labelList sharedPointLabels_; + + //- Indices of globally shared points in the master list + // This list contains all the shared points in the mesh + labelList sharedPointAddr_; + + // Private Member Functions + + //- Disallow default bitwise copy construct + faGlobalMeshData(const faGlobalMeshData&); + + //- Disallow default bitwise assignment + void operator=(const faGlobalMeshData&); + + +public: + + //- Runtime type information + ClassName("faGlobalMeshData"); + + + // Constructors + + //- Construct from mesh + faGlobalMeshData(const faMesh& mesh); + + + // Destructor + + ~faGlobalMeshData(); + + + // Member Functions + + // Access + + //- Return mesh reference + const faMesh& mesh() const; + + // Globally shared point addressing + + //- Return number of globally shared points + label nGlobalPoints() const + { + return nGlobalPoints_; + } + + //- Return indices of local points that are globally shared + const labelList& sharedPointLabels() const + { + return sharedPointLabels_; + } + + //- Return addressing into the complete globally shared points + // list + const labelList& sharedPointAddr() const + { + return sharedPointAddr_; + } + + //- Change global mesh data given a topological change. + void updateMesh(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faGlobalMeshData/faProcessorTopology.H b/src/finiteArea/faMesh/faGlobalMeshData/faProcessorTopology.H new file mode 100644 index 0000000000000000000000000000000000000000..cc72fc5299717fdc4cf50b3f87444f506415775d --- /dev/null +++ b/src/finiteArea/faMesh/faGlobalMeshData/faProcessorTopology.H @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faProcessorTopology + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faProcessorTopology_H +#define faProcessorTopology_H + +#include "ProcessorTopology.H" +#include "faPatchList.H" +#include "processorFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +typedef ProcessorTopology<faPatchList, processorFaPatch> faProcessorTopology; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMesh.C b/src/finiteArea/faMesh/faMesh.C new file mode 100644 index 0000000000000000000000000000000000000000..d103934c92d841e7ac69b2bc3f9cb199910a3c4c --- /dev/null +++ b/src/finiteArea/faMesh/faMesh.C @@ -0,0 +1,1387 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "faGlobalMeshData.H" +#include "Time.H" +#include "polyMesh.H" +#include "primitiveMesh.H" +#include "demandDrivenData.H" +#include "IndirectList.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "faMeshLduAddressing.H" +#include "wedgeFaPatch.H" +#include "faPatchData.H" +#include "SortableList.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(faMesh, 0); +} + +Foam::word Foam::faMesh::meshSubDir = "faMesh"; + +const int Foam::faMesh::quadricsFit_ = 0; + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::faMesh::setPrimitiveMeshData() +{ + if (debug) + { + Info<< "void faMesh::setPrimitiveMeshData() const : " + << "Setting primitive data" << endl; + } + + const indirectPrimitivePatch& bp = patch(); + + // Set faMesh edges + edges_.setSize(bp.nEdges()); + + label edgeI = -1; + + + label nIntEdges = bp.nInternalEdges(); + + for (label curEdge = 0; curEdge < nIntEdges; curEdge++) + { + edges_[++edgeI] = bp.edges()[curEdge]; + } + + forAll (boundary(), patchI) + { + const labelList& curP = boundary()[patchI]; + + forAll (curP, eI) + { + edges_[++edgeI] = bp.edges()[curP[eI]]; + } + } + + nEdges_ = edges_.size(); + nInternalEdges_ = nIntEdges; + + + // Set edge owner and neighbour + edgeOwner_.setSize(nEdges()); + edgeNeighbour_.setSize(nInternalEdges()); + + edgeI = -1; + + const labelListList& bpef = bp.edgeFaces(); + + for (label curEdge = 0; curEdge < nIntEdges; curEdge++) + { + edgeOwner_[++edgeI] = bpef[curEdge][0]; + + edgeNeighbour_[edgeI] = bpef[curEdge][1]; + } + + forAll (boundary(), patchI) + { + const labelList& curP = boundary()[patchI]; + + forAll (curP, eI) + { + edgeOwner_[++edgeI] = bpef[curP[eI]][0]; + } + } + + // Set number of faces + nFaces_ = bp.size(); + + // Set number of points + nPoints_ = bp.nPoints(); +} + + +void Foam::faMesh::clearGeomNotAreas() const +{ + if (debug) + { + Info<< "void faMesh::clearGeomNotAreas() const : " + << "Clearing geometry" << endl; + } + + deleteDemandDrivenData(SPtr_); + deleteDemandDrivenData(patchPtr_); + deleteDemandDrivenData(patchStartsPtr_); + deleteDemandDrivenData(LePtr_); + deleteDemandDrivenData(magLePtr_); + deleteDemandDrivenData(centresPtr_); + deleteDemandDrivenData(edgeCentresPtr_); + deleteDemandDrivenData(faceAreaNormalsPtr_); + deleteDemandDrivenData(edgeAreaNormalsPtr_); + deleteDemandDrivenData(pointAreaNormalsPtr_); + deleteDemandDrivenData(faceCurvaturesPtr_); + deleteDemandDrivenData(edgeTransformTensorsPtr_); +} + + +void Foam::faMesh::clearGeom() const +{ + if (debug) + { + Info<< "void faMesh::clearGeom() const : " + << "Clearing geometry" << endl; + } + + clearGeomNotAreas(); + deleteDemandDrivenData(S0Ptr_); + deleteDemandDrivenData(S00Ptr_); + deleteDemandDrivenData(correctPatchPointNormalsPtr_); +} + + +void Foam::faMesh::clearAddressing() const +{ + if (debug) + { + Info<< "void faMesh::clearAddressing() const : " + << "Clearing addressing" << endl; + } + + deleteDemandDrivenData(lduPtr_); +} + + +void Foam::faMesh::clearOut() const +{ + clearGeom(); + clearAddressing(); + deleteDemandDrivenData(globalMeshDataPtr_); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faMesh::faMesh(const polyMesh& pMesh) +: + GeoMesh<polyMesh>(pMesh), + MeshObject<polyMesh, UpdateableMeshObject, faMesh>(pMesh), + edgeInterpolation(*this), + faceLabels_ + ( + IOobject + ( + "faceLabels", + time().findInstance(meshDir(), "faceLabels"), + meshSubDir, + mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + boundary_ + ( + IOobject + ( + "faBoundary", + time().findInstance(meshDir(), "faBoundary"), + meshSubDir, + mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + *this + ), + comm_(Pstream::worldComm), + patchPtr_(NULL), + lduPtr_(NULL), + curTimeIndex_(time().timeIndex()), + SPtr_(NULL), + S0Ptr_(NULL), + S00Ptr_(NULL), + patchStartsPtr_(NULL), + LePtr_(NULL), + magLePtr_(NULL), + centresPtr_(NULL), + edgeCentresPtr_(NULL), + faceAreaNormalsPtr_(NULL), + edgeAreaNormalsPtr_(NULL), + pointAreaNormalsPtr_(NULL), + faceCurvaturesPtr_(NULL), + edgeTransformTensorsPtr_(NULL), + correctPatchPointNormalsPtr_(NULL), + globalMeshDataPtr_(NULL) +{ + if (debug) + { + Info<< "faMesh::faMesh(...) : " + << "Creating faMesh from IOobject" << endl; + } + + setPrimitiveMeshData(); + + // Create global mesh data + if (Pstream::parRun()) + { + globalData(); + } + + // Calculate topology for the patches (processor-processor comms etc.) + boundary_.updateMesh(); + + // Calculate the geometry for the patches (transformation tensors etc.) + boundary_.calcGeometry(); + + if (isFile(pMesh.time().timePath()/"S0")) + { + S0Ptr_ = new DimensionedField<scalar, areaMesh> + ( + IOobject + ( + "S0", + time().timeName(), + meshSubDir, + mesh(), + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + *this + ); + } +} + + +// Construct from components without boundary. +Foam::faMesh::faMesh +( + const polyMesh& pMesh, + const labelList& faceLabels +) +: + GeoMesh<polyMesh>(pMesh), + MeshObject<polyMesh, UpdateableMeshObject, faMesh>(pMesh), + edgeInterpolation(*this), + faceLabels_ + ( + IOobject + ( + "faceLabels", + mesh().facesInstance(), + meshSubDir, + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + faceLabels + ), + boundary_ + ( + IOobject + ( + "faBoundary", + mesh().facesInstance(), + meshSubDir, + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + *this, + 0 + ), + comm_(Pstream::worldComm), + patchPtr_(NULL), + lduPtr_(NULL), + curTimeIndex_(time().timeIndex()), + SPtr_(NULL), + S0Ptr_(NULL), + S00Ptr_(NULL), + patchStartsPtr_(NULL), + LePtr_(NULL), + magLePtr_(NULL), + centresPtr_(NULL), + edgeCentresPtr_(NULL), + faceAreaNormalsPtr_(NULL), + edgeAreaNormalsPtr_(NULL), + pointAreaNormalsPtr_(NULL), + faceCurvaturesPtr_(NULL), + edgeTransformTensorsPtr_(NULL), + correctPatchPointNormalsPtr_(NULL), + globalMeshDataPtr_(NULL) +{ + if (debug) + { + Info<< "faMesh::faMesh(...) : " + << "Creating faMesh from components" << endl; + } +} + + +// Construct from definition field +Foam::faMesh::faMesh +( + const polyMesh& pMesh, + const fileName& defFile +) +: + GeoMesh<polyMesh>(pMesh), + MeshObject<polyMesh, UpdateableMeshObject, faMesh>(pMesh), + edgeInterpolation(*this), + faceLabels_ + ( + IOobject + ( + "faceLabels", + mesh().facesInstance(), + meshSubDir, + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + List<label>(0) + ), + boundary_ + ( + IOobject + ( + "faBoundary", + mesh().facesInstance(), + meshSubDir, + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + *this, + 0 + ), + comm_(Pstream::worldComm), + patchPtr_(NULL), + lduPtr_(NULL), + curTimeIndex_(time().timeIndex()), + SPtr_(NULL), + S0Ptr_(NULL), + S00Ptr_(NULL), + patchStartsPtr_(NULL), + LePtr_(NULL), + magLePtr_(NULL), + centresPtr_(NULL), + edgeCentresPtr_(NULL), + faceAreaNormalsPtr_(NULL), + edgeAreaNormalsPtr_(NULL), + pointAreaNormalsPtr_(NULL), + faceCurvaturesPtr_(NULL), + edgeTransformTensorsPtr_(NULL), + correctPatchPointNormalsPtr_(NULL), + globalMeshDataPtr_(NULL) +{ + if (debug) + { + Info<< "faMesh::faMesh(...) : " + << "Creating faMesh from definition file" << endl; + } + + // Reading faMeshDefinition dictionary + IOdictionary faMeshDefinition + ( + IOobject + ( + defFile, + mesh().time().constant(), + meshSubDir, + mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + wordList polyMeshPatches + ( + faMeshDefinition.lookup("polyMeshPatches") + ); + + dictionary bndDict = faMeshDefinition.subDict("boundary"); + + wordList faPatchNames = bndDict.toc(); + + List<faPatchData> faPatches(faPatchNames.size() + 1); + + forAll (faPatchNames, patchI) + { + dictionary curPatchDict = + bndDict.subDict(faPatchNames[patchI]); + + faPatches[patchI].name_ = faPatchNames[patchI]; + + faPatches[patchI].type_ = + word(curPatchDict.lookup("type")); + + faPatches[patchI].ownPolyPatchID_ = + mesh().boundaryMesh().findPatchID + ( + word(curPatchDict.lookup("ownerPolyPatch")) + ); + + faPatches[patchI].ngbPolyPatchID_ = + mesh().boundaryMesh().findPatchID + ( + word(curPatchDict.lookup("neighbourPolyPatch")) + ); + } + + + // Setting faceLabels list size + label size = 0; + + labelList patchIDs(polyMeshPatches.size(), -1); + + forAll (polyMeshPatches, patchI) + { + patchIDs[patchI] = + mesh().boundaryMesh().findPatchID(polyMeshPatches[patchI]); + + size += mesh().boundaryMesh()[patchIDs[patchI]].size(); + } + + faceLabels_ = labelList(size, -1); + + + // Filling of faceLabels list + label faceI = -1; + + sort(patchIDs); + + forAll (polyMeshPatches, patchI) + { + label start = mesh().boundaryMesh()[patchIDs[patchI]].start(); + label size = mesh().boundaryMesh()[patchIDs[patchI]].size(); + + for (label i = 0; i < size; i++) + { + faceLabels_[++faceI] = start + i; + } + } + + + // Determination of faPatch ID for each boundary edge. + // Result is in the bndEdgeFaPatchIDs list + labelList faceCells(faceLabels_.size(), -1); + + forAll (faceCells, faceI) + { + label faceID = faceLabels_[faceI]; + + faceCells[faceI] = mesh().faceOwner()[faceID]; + } + + labelList meshEdges = + patch().meshEdges + ( + mesh().edges(), + mesh().cellEdges(), + faceCells + ); + + const labelListList& edgeFaces = mesh().edgeFaces(); + + const label nTotalEdges = patch().nEdges(); + const label nInternalEdges = patch().nInternalEdges(); + + labelList bndEdgeFaPatchIDs(nTotalEdges - nInternalEdges, -1); + + for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++) + { + label curMeshEdge = meshEdges[edgeI]; + + labelList curEdgePatchIDs(2, -1); + + label patchI = -1; + + forAll (edgeFaces[curMeshEdge], faceI) + { + label curFace = edgeFaces[curMeshEdge][faceI]; + + label curPatchID = mesh().boundaryMesh().whichPatch(curFace); + + if (curPatchID != -1) + { + curEdgePatchIDs[++patchI] = curPatchID; + } + } + + for (label pI = 0; pI < faPatches.size() - 1; pI++) + { + if + ( + ( + curEdgePatchIDs[0] == faPatches[pI].ownPolyPatchID_ + && curEdgePatchIDs[1] == faPatches[pI].ngbPolyPatchID_ + ) + || + ( + curEdgePatchIDs[1] == faPatches[pI].ownPolyPatchID_ + && curEdgePatchIDs[0] == faPatches[pI].ngbPolyPatchID_ + ) + ) + { + bndEdgeFaPatchIDs[edgeI - nInternalEdges] = pI; + break; + } + } + } + + + // Set edgeLabels for each faPatch + for (label pI = 0; pI < (faPatches.size() - 1); pI++) + { + SLList<label> tmpList; + + forAll (bndEdgeFaPatchIDs, eI) + { + if (bndEdgeFaPatchIDs[eI] == pI) + { + tmpList.append(nInternalEdges + eI); + } + } + + faPatches[pI].edgeLabels_ = tmpList; + } + + // Check for undefined edges + SLList<label> tmpList; + + forAll (bndEdgeFaPatchIDs, eI) + { + if (bndEdgeFaPatchIDs[eI] == -1) + { + tmpList.append(nInternalEdges + eI); + } + } + + if (tmpList.size() > 0) + { + // Check for processor edges + labelList allUndefEdges = labelList(tmpList); + labelList ngbPolyPatch(allUndefEdges.size(), -1); + forAll (ngbPolyPatch, edgeI) + { + label curEdge = allUndefEdges[edgeI]; + + label curPMeshEdge = meshEdges[curEdge]; + + forAll (edgeFaces[curPMeshEdge], faceI) + { + label curFace = edgeFaces[curPMeshEdge][faceI]; + + if (findIndex(faceLabels_, curFace) == -1) + { + label polyPatchID = + pMesh.boundaryMesh().whichPatch(curFace); + + if (polyPatchID != -1) + { + ngbPolyPatch[edgeI] = polyPatchID; + } + } + } + } + + // Count ngb processorPolyPatch-es + labelHashSet processorPatchSet; + forAll (ngbPolyPatch, edgeI) + { + if (ngbPolyPatch[edgeI] != -1) + { + if + ( + isA<processorPolyPatch> + ( + pMesh.boundaryMesh()[ngbPolyPatch[edgeI]] + ) + ) + { + if (!processorPatchSet.found(ngbPolyPatch[edgeI])) + { + processorPatchSet.insert(ngbPolyPatch[edgeI]); + } + } + } + } + labelList processorPatches(processorPatchSet.toc()); + faPatches.setSize(faPatches.size() + processorPatches.size()); + + for (label i = 0; i < processorPatches.size(); i++) + { + SLList<label> tmpLst; + + forAll (ngbPolyPatch, eI) + { + if (ngbPolyPatch[eI] == processorPatches[i]) + { + tmpLst.append(allUndefEdges[eI]); + } + } + + faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst; + + faPatches[faPatchNames.size() + i].name_ = + pMesh.boundaryMesh()[processorPatches[i]].name(); + + faPatches[faPatchNames.size() + i].type_ = + processorFaPatch::typeName; + + faPatches[faPatchNames.size() + i].ngbPolyPatchID_ = + processorPatches[i]; + } + + // Remaining undefined edges + SLList<label> undefEdges; + forAll (ngbPolyPatch, eI) + { + if (ngbPolyPatch[eI] == -1) + { + undefEdges.append(allUndefEdges[eI]); + } + else if + ( + !isA<processorPolyPatch> + ( + pMesh.boundaryMesh()[ngbPolyPatch[eI]] + ) + ) + { + undefEdges.append(allUndefEdges[eI]); + } + } + + if (undefEdges.size() > 0) + { + label pI = faPatches.size()-1; + + faPatches[pI].name_ = "undefined"; + faPatches[pI].type_ = "patch"; + faPatches[pI].edgeLabels_ = undefEdges; + } + else + { + faPatches.setSize(faPatches.size() - 1); + } + } + else + { + faPatches.setSize(faPatches.size() - 1); + } + + + // Reorder processorFaPatch using + // ordering of ngb processorPolyPatch + forAll (faPatches, patchI) + { + if (faPatches[patchI].type_ == processorFaPatch::typeName) + { + labelList ngbFaces(faPatches[patchI].edgeLabels_.size(), -1); + + forAll (ngbFaces, edgeI) + { + label curEdge = faPatches[patchI].edgeLabels_[edgeI]; + + label curPMeshEdge = meshEdges[curEdge]; + + forAll (edgeFaces[curPMeshEdge], faceI) + { + label curFace = edgeFaces[curPMeshEdge][faceI]; + + label curPatchID = + pMesh.boundaryMesh().whichPatch(curFace); + + if (curPatchID == faPatches[patchI].ngbPolyPatchID_) + { + ngbFaces[edgeI] = curFace; + } + } + } + + SortableList<label> sortedNgbFaces(ngbFaces); + labelList reorderedEdgeLabels(ngbFaces.size(), -1); + for (label i = 0; i < reorderedEdgeLabels.size(); i++) + { + reorderedEdgeLabels[i] = + faPatches[patchI].edgeLabels_ + [ + sortedNgbFaces.indices()[i] + ]; + } + + faPatches[patchI].edgeLabels_ = reorderedEdgeLabels; + } + } + + + // Add good patches to faMesh + SLList<faPatch*> faPatchLst; + + for (label pI = 0; pI < faPatches.size(); pI++) + { + faPatches[pI].dict_.add("type", faPatches[pI].type_); + faPatches[pI].dict_.add("edgeLabels", faPatches[pI].edgeLabels_); + faPatches[pI].dict_.add + ( + "ngbPolyPatchIndex", + faPatches[pI].ngbPolyPatchID_ + ); + + if (faPatches[pI].type_ == processorFaPatch::typeName) + { + if (faPatches[pI].ngbPolyPatchID_ == -1) + { + FatalErrorIn + ( + "void faMesh::faMesh(const polyMesh&, const fileName&)" + ) + << "ngbPolyPatch is not defined for processorFaPatch: " + << faPatches[pI].name_ + << abort(FatalError); + } + + const processorPolyPatch& procPolyPatch = + refCast<const processorPolyPatch> + ( + pMesh.boundaryMesh()[faPatches[pI].ngbPolyPatchID_] + ); + + faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo()); + faPatches[pI].dict_.add + ( + "neighbProcNo", + procPolyPatch.neighbProcNo() + ); + } + + faPatchLst.append + ( + faPatch::New + ( + faPatches[pI].name_, + faPatches[pI].dict_, + pI, + boundary() + ).ptr() + ); + } + + addFaPatches(List<faPatch*>(faPatchLst)); + + // Create global mesh data + if (Pstream::parRun()) + { + globalData(); + } + + // Calculate topology for the patches (processor-processor comms etc.) + boundary_.updateMesh(); + + // Calculate the geometry for the patches (transformation tensors etc.) + boundary_.calcGeometry(); + + if (isFile(mesh().time().timePath()/"S0")) + { + S0Ptr_ = new DimensionedField<scalar, areaMesh> + ( + IOobject + ( + "S0", + time().timeName(), + meshSubDir, + mesh(), + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + *this + ); + } +} + + +// Construct from polyPatch +Foam::faMesh::faMesh +( + const polyMesh& pMesh, + const label polyPatchID +) +: + GeoMesh<polyMesh>(pMesh), + MeshObject<polyMesh, UpdateableMeshObject, faMesh>(pMesh), + edgeInterpolation(*this), + faceLabels_ + ( + IOobject + ( + "faceLabels", + mesh().facesInstance(), + meshSubDir, + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + labelList(pMesh.boundaryMesh()[polyPatchID].size(), -1) + ), + boundary_ + ( + IOobject + ( + "faBoundary", + mesh().facesInstance(), + meshSubDir, + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + *this, + 0 + ), + comm_(Pstream::worldComm), + patchPtr_(NULL), + lduPtr_(NULL), + curTimeIndex_(time().timeIndex()), + SPtr_(NULL), + S0Ptr_(NULL), + S00Ptr_(NULL), + patchStartsPtr_(NULL), + LePtr_(NULL), + magLePtr_(NULL), + centresPtr_(NULL), + edgeCentresPtr_(NULL), + faceAreaNormalsPtr_(NULL), + edgeAreaNormalsPtr_(NULL), + pointAreaNormalsPtr_(NULL), + faceCurvaturesPtr_(NULL), + edgeTransformTensorsPtr_(NULL), + correctPatchPointNormalsPtr_(NULL), + globalMeshDataPtr_(NULL) +{ + if (debug) + { + Info<< "faMesh::faMesh(...) : " + << "Creating faMesh from polyPatch" << endl; + } + + // Set faceLabels + forAll (faceLabels_, faceI) + { + faceLabels_[faceI] = + mesh().boundaryMesh()[polyPatchID].start() + faceI; + } + + // Add one faPatch + const indirectPrimitivePatch& bp = patch(); + + const label nTotalEdges = bp.nEdges(); + + const label nInternalEdges = bp.nInternalEdges(); + + labelList edgeLabels(nTotalEdges - nInternalEdges, -1); + + forAll (edgeLabels, edgeI) + { + edgeLabels[edgeI] = nInternalEdges + edgeI; + } + + dictionary patchDict; + + patchDict.add("type", "patch"); + patchDict.add("edgeLabels", edgeLabels); + patchDict.add("ngbPolyPatchIndex", -1); + + List<faPatch*> faPatchLst(1); + + faPatchLst[0] = + faPatch::New("default", patchDict, 0, boundary()).ptr(); + + addFaPatches(faPatchLst); + + setPrimitiveMeshData(); + + // Calculate topology for the patches (processor-processor comms etc.) + boundary_.updateMesh(); + + // Calculate the geometry for the patches (transformation tensors etc.) + boundary_.calcGeometry(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::faMesh::~faMesh() +{ + clearOut(); +} + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::fileName Foam::faMesh::meshDir() const +{ + return mesh().dbDir()/meshSubDir; +} + + +const Foam::Time& Foam::faMesh::time() const +{ + return mesh().time(); +} + + +const Foam::fileName& Foam::faMesh::pointsInstance() const +{ + return mesh().pointsInstance(); +} + + +const Foam::fileName& Foam::faMesh::facesInstance() const +{ + return mesh().facesInstance(); +} + + +const Foam::indirectPrimitivePatch& Foam::faMesh::patch() const +{ + if (!patchPtr_) + { + patchPtr_ = new indirectPrimitivePatch + ( + IndirectList<face> + ( + mesh().faces(), + faceLabels_ + ), + mesh().points() + ); + } + + return *patchPtr_; +} + + +Foam::indirectPrimitivePatch& Foam::faMesh::patch() +{ + if (!patchPtr_) + { + patchPtr_ = new indirectPrimitivePatch + ( + IndirectList<face> + ( + mesh().faces(), + faceLabels_ + ), + mesh().points() + ); + } + + return *patchPtr_; +} + + +const Foam::pointField& Foam::faMesh::points() const +{ + return patch().localPoints(); +} + + +const Foam::edgeList& Foam::faMesh::edges() const +{ + return edges_; +} + + +const Foam::faceList& Foam::faMesh::faces() const +{ + return patch().localFaces(); +} + + +void Foam::faMesh::addFaPatches(const List<faPatch*>& p) +{ + if (debug) + { + Info<< "void faMesh::addFaPatches(const List<faPatch*>& p) : " + << "Adding patches to faMesh" << endl; + } + + if (boundary().size() > 0) + { + FatalErrorIn("void faMesh::addPatches(const List<faPatch*>& p)") + << "boundary already exists" + << abort(FatalError); + } + + boundary_.setSize(p.size()); + + forAll (p, patchI) + { + boundary_.set(patchI, p[patchI]); + } + + setPrimitiveMeshData(); + + boundary_.checkDefinition(); +} + + +Foam::label Foam::faMesh::comm() const +{ + return comm_; +} + + +Foam::label& Foam::faMesh::comm() +{ + return comm_; +} + + +const Foam::objectRegistry& Foam::faMesh::thisDb() const +{ + return mesh().thisDb(); +} + + +const Foam::faBoundaryMesh& Foam::faMesh::boundary() const +{ + return boundary_; +} + + +const Foam::labelList& Foam::faMesh::patchStarts() const +{ + if (!patchStartsPtr_) + { + calcPatchStarts(); + } + + return *patchStartsPtr_; +} + + +const Foam::edgeVectorField& Foam::faMesh::Le() const +{ + if (!LePtr_) + { + calcLe(); + } + + return *LePtr_; +} + + +const Foam::edgeScalarField& Foam::faMesh::magLe() const +{ + if (!magLePtr_) + { + calcMagLe(); + } + + return *magLePtr_; +} + + +const Foam::areaVectorField& Foam::faMesh::areaCentres() const +{ + if (!centresPtr_) + { + calcAreaCentres(); + } + + return *centresPtr_; +} + + +const Foam::edgeVectorField& Foam::faMesh::edgeCentres() const +{ + if (!edgeCentresPtr_) + { + calcEdgeCentres(); + } + + return *edgeCentresPtr_; +} + + +const Foam::DimensionedField<Foam::scalar, Foam::areaMesh>& +Foam::faMesh::S() const +{ + if (!SPtr_) + { + calcS(); + } + + return *SPtr_; +} + + +const Foam::DimensionedField<Foam::scalar, Foam::areaMesh>& +Foam::faMesh::S0() const +{ + if (!S0Ptr_) + { + FatalErrorIn("faMesh::S0() const") + << "S0 is not available" + << abort(FatalError); + } + + return *S0Ptr_; +} + + +const Foam::DimensionedField<Foam::scalar, Foam::areaMesh>& +Foam::faMesh::S00() const +{ + if (!S00Ptr_) + { + S00Ptr_ = new DimensionedField<scalar, areaMesh> + ( + IOobject + ( + "S00", + time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + S0() + ); + + S0Ptr_->writeOpt() = IOobject::AUTO_WRITE; + } + + return *S00Ptr_; +} + + +const Foam::areaVectorField& Foam::faMesh::faceAreaNormals() const +{ + if (!faceAreaNormalsPtr_) + { + calcFaceAreaNormals(); + } + + return *faceAreaNormalsPtr_; +} + + +const Foam::edgeVectorField& Foam::faMesh::edgeAreaNormals() const +{ + if (!edgeAreaNormalsPtr_) + { + calcEdgeAreaNormals(); + } + + return *edgeAreaNormalsPtr_; +} + + +const Foam::vectorField& Foam::faMesh::pointAreaNormals() const +{ + if (!pointAreaNormalsPtr_) + { + calcPointAreaNormals(); + + if (quadricsFit_ > 0) + { + calcPointAreaNormalsByQuadricsFit(); + } + } + + return *pointAreaNormalsPtr_; +} + + +const Foam::areaScalarField& Foam::faMesh::faceCurvatures() const +{ + if (!faceCurvaturesPtr_) + { + calcFaceCurvatures(); + } + + return *faceCurvaturesPtr_; +} + + +const Foam::FieldField<Foam::Field, Foam::tensor>& +Foam::faMesh::edgeTransformTensors() const +{ + if (!edgeTransformTensorsPtr_) + { + calcEdgeTransformTensors(); + } + + return *edgeTransformTensorsPtr_; +} + + +// Return global mesh data +const Foam::faGlobalMeshData& Foam::faMesh::globalData() const +{ + if (!globalMeshDataPtr_) + { + globalMeshDataPtr_ = new faGlobalMeshData(*this); + } + + return *globalMeshDataPtr_; +} + + +const Foam::lduAddressing& Foam::faMesh::lduAddr() const +{ + if (!lduPtr_) + { + calcLduAddressing(); + } + + return *lduPtr_; +} + + +bool Foam::faMesh::movePoints() +{ + // Grab point motion from polyMesh + const vectorField& newPoints = mesh().points(); + + // Grab old time areas if the time has been incremented + if (curTimeIndex_ < time().timeIndex()) + { + if (S00Ptr_ && S0Ptr_) + { + Info<< "Copy old-old S" << endl; + *S00Ptr_ = *S0Ptr_; + } + + if (S0Ptr_) + { + Info<< "Copy old S" << endl; + *S0Ptr_ = S(); + } + else + { + if (debug) + { + InfoIn("bool faMesh::movePoints()") + << "Creating old cell volumes." << endl; + } + + S0Ptr_ = new DimensionedField<scalar, areaMesh> + ( + IOobject + ( + "S0", + time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + S() + ); + } + + curTimeIndex_ = time().timeIndex(); + } + + clearGeomNotAreas(); + + // To satisfy the motion interface for MeshObject, const cast is needed + // HJ, 5/Aug/2011 + if (patchPtr_) + { + patchPtr_->movePoints(newPoints); + } + + // Move boundary points + const_cast<faBoundaryMesh&>(boundary_).movePoints(newPoints); + + // Move interpolation + const edgeInterpolation& cei = *this; + const_cast<edgeInterpolation&>(cei).edgeInterpolation::movePoints(); + + // Fluxes were dummy? HJ, 28/Jul/2011 + + return true; +} + + +bool Foam::faMesh::correctPatchPointNormals(const label patchID) const +{ + if ((patchID < 0) || (patchID >= boundary().size())) + { + FatalErrorIn + ( + "bool correctPatchPointNormals(const label patchID) const" + ) << "patchID is not in the valid range" + << abort(FatalError); + } + + if (correctPatchPointNormalsPtr_) + { + return (*correctPatchPointNormalsPtr_)[patchID]; + } + + return false; +} + + +//- Set patch point normals corrections +Foam::boolList& Foam::faMesh::correctPatchPointNormals() const +{ + if (!correctPatchPointNormalsPtr_) + { + correctPatchPointNormalsPtr_ = + new boolList(boundary().size(), false); + } + + return *correctPatchPointNormalsPtr_; +} + + +bool Foam::faMesh::write() const +{ + faceLabels_.write(); + boundary_.write(); + + return false; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +bool Foam::faMesh::operator!=(const faMesh& m) const +{ + return &m != this; +} + + +bool Foam::faMesh::operator==(const faMesh& m) const +{ + return &m == this; +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMesh.H b/src/finiteArea/faMesh/faMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..e54390e68926aa942ccdbd046c7a11ce8a4d2892 --- /dev/null +++ b/src/finiteArea/faMesh/faMesh.H @@ -0,0 +1,552 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faMesh + +Description + Finite area mesh. Used for 2-D non-Euclidian finite area method. + +SourceFiles + faMesh.C + faMeshDemandDrivenData.C + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faMesh_H +#define faMesh_H + +#include "GeoMesh.H" +#include "MeshObject.H" +#include "polyMesh.H" +#include "lduMesh.H" +#include "faBoundaryMesh.H" +#include "edgeList.H" +#include "faceList.H" +#include "primitiveFieldsFwd.H" +#include "DimensionedField.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "indirectPrimitivePatch.H" +#include "edgeInterpolation.H" +#include "labelIOList.H" +#include "scalarIOField.H" +#include "FieldFields.H" +#include "faGlobalMeshData.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Class forward declarations +class faMeshLduAddressing; +class faMeshMapper; + +/*---------------------------------------------------------------------------*\ + Class faMesh Declaration +\*---------------------------------------------------------------------------*/ + +class faMesh +: + public GeoMesh<polyMesh>, + public MeshObject<polyMesh, UpdateableMeshObject, faMesh>, + public lduMesh, + public edgeInterpolation +{ + // Private data + + //- Face labels + labelIOList faceLabels_; + + //- Boundary mesh + faBoundaryMesh boundary_; + + + // Primitive mesh data + + //- Edges, addressing into local point list + edgeList edges_; + + //- Edge owner + labelList edgeOwner_; + + //- Edge neighbour + labelList edgeNeighbour_; + + + // Primitive size data + + //- Number of points + mutable label nPoints_; + + //- Number of edges + mutable label nEdges_; + + //- Number of internal edges + mutable label nInternalEdges_; + + //- Number of faces + mutable label nFaces_; + + + // Communication support + + //- Communicator used for parallel communication + label comm_; + + + // Demand-driven data + + //- Primitive patch + mutable indirectPrimitivePatch* patchPtr_; + + //- Ldu addressing data + mutable faMeshLduAddressing* lduPtr_; + + //- Current time index for motion + // Note. The whole mechanism will be replaced once the + // dimensionedField is created and the dimensionedField + // will take care of the old-time levels. + mutable label curTimeIndex_; + + //- Face areas + mutable DimensionedField<scalar, areaMesh>* SPtr_; + + //- Face areas old time level + mutable DimensionedField<scalar, areaMesh>* S0Ptr_; + + //- Face areas old-old time level + mutable DimensionedField<scalar, areaMesh>* S00Ptr_; + + //- Patch starts in the edge list + mutable labelList* patchStartsPtr_; + + //- Edge length vectors + mutable edgeVectorField* LePtr_; + + //- Mag edge length vectors + mutable edgeScalarField* magLePtr_; + + //- Face centres + mutable areaVectorField* centresPtr_; + + //- Edge centres + mutable edgeVectorField* edgeCentresPtr_; + + //- Face area normals + mutable areaVectorField* faceAreaNormalsPtr_; + + //- Edge area normals + mutable edgeVectorField* edgeAreaNormalsPtr_; + + //- Edge area normals + mutable vectorField* pointAreaNormalsPtr_; + + //- Face curvatures + mutable areaScalarField* faceCurvaturesPtr_; + + //- Edge transformation tensors + mutable FieldField<Field, tensor>* edgeTransformTensorsPtr_; + + //- Whether point normals must be corrected for a patch + mutable boolList* correctPatchPointNormalsPtr_; + + // Other mesh-related data + + //- Parallel info + mutable faGlobalMeshData* globalMeshDataPtr_; + + + // Static Private Data + + //- Use quadrics fit + static const int quadricsFit_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faMesh(const faMesh&); + + //- Disallow default bitwise assignment + void operator=(const faMesh&); + + + //- Set primitive mesh data + void setPrimitiveMeshData(); + + // Private member functions to calculate demand driven data + + //- Calculate ldu addressing + void calcLduAddressing() const; + + //- Calculate patch starts in the edge list + void calcPatchStarts() const; + + //- Calculate edge lengths + void calcLe() const; + + //- Calculate mag edge lengths + void calcMagLe() const; + + //- Calculate face centres + void calcAreaCentres() const; + + //- Calculate edge centres + void calcEdgeCentres() const; + + //- Calculate face areas + void calcS() const; + + //- Calculate face area normals + void calcFaceAreaNormals() const; + + //- Calculate edge area normals + void calcEdgeAreaNormals() const; + + //- Calculate point area normals + void calcPointAreaNormals() const; + + //- Calculate point area normals by quadrics fit + void calcPointAreaNormalsByQuadricsFit() const; + + //- Calculate face curvatures + void calcFaceCurvatures() const; + + //- Calculate edge transformation tensors + void calcEdgeTransformTensors() const; + + //- Clear geometry but not the face areas + void clearGeomNotAreas() const; + + //- Clear geometry + void clearGeom() const; + + //- Clear addressing + void clearAddressing() const; + + //- Clear demand-driven data + void clearOut() const; + +public: + + // Public typedefs + + typedef faMesh Mesh; + typedef faBoundaryMesh BoundaryMesh; + + + //- Runtime type information + TypeName("faMesh"); + + + //- Return the mesh sub-directory name (usually "faMesh") + static word meshSubDir; + + + // Constructors + + //- Construct from polyMesh + explicit faMesh(const polyMesh& m); + + //- Construct from components without boundary. + // Boundary is added using addFaPatches() member function + faMesh + ( + const polyMesh& m, + const labelList& faceLabels + ); + + //- Construct from finite area mesh definition file + faMesh + ( + const polyMesh& m, + const fileName& defFile + ); + + //- Construct from polyPatch + faMesh + ( + const polyMesh& m, + const label polyPatchID + ); + + + //- Destructor + virtual ~faMesh(); + + + // Member Functions + + // Helpers + + //- Add boundary patches. Constructor helper + void addFaPatches(const List<faPatch*> &); + + + // Database + + //- Return access to polyMesh + const polyMesh& mesh() const + { + return + MeshObject<polyMesh, UpdateableMeshObject, faMesh>::mesh(); + } + + //- Return the local mesh directory (dbDir()/meshSubDir) + fileName meshDir() const; + + //- Return reference to time + const Time& time() const; + + //- Return the current instance directory for points + // Used in the consruction of gemometric mesh data dependent + // on points + const fileName& pointsInstance() const; + + //- Return the current instance directory for faces + const fileName& facesInstance() const; + + + //- Mesh size parameters + + inline label nPoints() const + { + return nPoints_; + } + + inline label nEdges() const + { + return nEdges_; + } + + inline label nInternalEdges() const + { + return nInternalEdges_; + } + + inline label nFaces() const + { + return nFaces_; + } + + // Primitive mesh data + + //- Return mesh points + const pointField& points() const; + + //- Return edges + const edgeList& edges() const; + + //- Return faces + const faceList& faces() const; + + //- Edge owner addresing + inline const labelList& edgeOwner() const + { + return edgeOwner_; + } + + //- Edge neighbour addressing + inline const labelList& edgeNeighbour() const + { + return edgeNeighbour_; + } + + + // Communication support + + //- Return communicator used for parallel communication + label comm() const; + + //- Return communicator used for parallel communication + label& comm(); + + + // Access + + //- Return reference to the mesh database + virtual const objectRegistry& thisDb() const; + + //- Return constant reference to boundary mesh + const faBoundaryMesh& boundary() const; + + //- Return faMesh face labels + const labelList& faceLabels() const + { + return faceLabels_; + } + + + //- Return parallel info + const faGlobalMeshData& globalData() const; + + //- Return ldu addressing + virtual const lduAddressing& lduAddr() const; + + //- Return a list of pointers for each patch + // with only those pointing to interfaces being set + virtual lduInterfacePtrsList interfaces() const + { + return boundary().interfaces(); + } + + //- Internal face owner + const labelUList& owner() const + { + return lduAddr().lowerAddr(); + } + + //- Internal face neighbour + const labelUList& neighbour() const + { + return lduAddr().upperAddr(); + } + + //- Return true if given edge label is internal to the mesh + inline bool isInternalEdge(const label edgeIndex) const + { + return edgeIndex < nInternalEdges(); + } + + + // Mesh motion and mophing + + //- Is mesh moving + bool moving() const + { + return mesh().moving(); + } + + //- Update after mesh motion + virtual bool movePoints(); + + //- Update after topo change + virtual void updateMesh(const mapPolyMesh&); + + + // Mapping + + //- Map all fields in time using given map. + virtual void mapFields(const faMeshMapper& mapper) const; + + //- Map face areas in time using given map. + virtual void mapOldAreas(const faMeshMapper& mapper) const; + + + // Demand-driven data + + //- Return constant reference to primitive patch + const indirectPrimitivePatch& patch() const; + + //- Return reference to primitive patch + indirectPrimitivePatch& patch(); + + //- Return patch starts + const labelList& patchStarts() const; + + //- Return edge length vectors + const edgeVectorField& Le() const; + + //- Return edge length magnitudes + const edgeScalarField& magLe() const; + + //- Return face centres as areaVectorField + const areaVectorField& areaCentres() const; + + //- Return edge centres as edgeVectorField + const edgeVectorField& edgeCentres() const; + + //- Return face areas + const DimensionedField<scalar, areaMesh>& S() const; + + //- Return old-time face areas + const DimensionedField<scalar, areaMesh>& S0() const; + + //- Return old-old-time face areas + const DimensionedField<scalar, areaMesh>& S00() const; + + //- Return face area normals + const areaVectorField& faceAreaNormals() const; + + //- Return edge area normals + const edgeVectorField& edgeAreaNormals() const; + + //- Return point area normals + const vectorField& pointAreaNormals() const; + + //- Return face curvatures + const areaScalarField& faceCurvatures() const; + + //- Return edge transformation tensors + const FieldField<Field, tensor>& edgeTransformTensors() const; + + //- Return internal point labels + labelList internalPoints() const; + + //- Return boundary point labels + labelList boundaryPoints() const; + + //- Return edge length correction + tmp<edgeScalarField> edgeLengthCorrection() const; + + //- Whether point normals should be corrected for a patch + bool correctPatchPointNormals(const label patchID) const; + + //- Set whether point normals should be corrected for a patch + boolList& correctPatchPointNormals() const; + + //- Write mesh + virtual bool write() const; + + + // Member Operators + + bool operator!=(const faMesh& m) const; + + bool operator==(const faMesh& m) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faPatchFaMeshTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshDemandDrivenData.C b/src/finiteArea/faMesh/faMeshDemandDrivenData.C new file mode 100644 index 0000000000000000000000000000000000000000..a51a94b3386253ae4797691f21a08b1d6995270a --- /dev/null +++ b/src/finiteArea/faMesh/faMeshDemandDrivenData.C @@ -0,0 +1,2028 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "faMeshLduAddressing.H" +#include "dimensionSet.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "primitiveFacePatch.H" +#include "fac.H" +#include "processorFaPatch.H" +#include "wedgeFaPatch.H" +#include "PstreamCombineReduceOps.H" +#include "coordinateSystem.H" +#include "scalarMatrices.H" +#include "processorFaPatchFields.H" +#include "emptyFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void faMesh::calcLduAddressing() const +{ + if (debug) + { + Info<< "void faMesh::calcLduAddressing() const : " + << "Calculating addressing" << endl; + } + + if (lduPtr_) + { + FatalErrorIn + ( + "void faMesh::calcLduAddressing() const" + ) << "lduPtr_ already allocated" + << abort(FatalError); + } + + lduPtr_ = new faMeshLduAddressing(*this); +} + + +void faMesh::calcPatchStarts() const +{ + if (debug) + { + Info<< "void faMesh::calcPatchStarts() const : " + << "Calculating patch starts" << endl; + } + + if (patchStartsPtr_) + { + FatalErrorIn + ( + "void faMesh::calcPatchStarts() const" + ) << "patchStartsPtr_ already allocated" + << abort(FatalError); + } + + patchStartsPtr_ = new labelList(boundary().size(), -1); + labelList& patchStarts = *patchStartsPtr_; + + patchStarts[0] = nInternalEdges(); + + for (label i = 1; i < boundary().size(); i++) + { + patchStarts[i] = + patchStarts[i - 1] + boundary()[i - 1].faPatch::size(); + } +} + + +void faMesh::calcLe() const +{ + if (debug) + { + Info<< "void faMesh::calcLe() const : " + << "Calculating local edges" << endl; + } + + if (LePtr_) + { + FatalErrorIn + ( + "void faMesh::calcLe() const" + ) << "LePtr_ already allocated" + << abort(FatalError); + } + + LePtr_ = + new edgeVectorField + ( + IOobject + ( + "Le", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimLength + ); + + edgeVectorField& Le = *LePtr_; + + + const pointField& pPoints = points(); + const edgeList& pEdges = edges(); + + const edgeVectorField& eCentres = edgeCentres(); + const areaVectorField& fCentres = areaCentres(); + + const edgeVectorField& edgeNormals = edgeAreaNormals(); + + vectorField& leInternal = Le.ref(); + const vectorField& edgeNormalsInternal = edgeNormals.internalField(); + const vectorField& fCentresInternal = fCentres.internalField(); + const vectorField& eCentresInternal = eCentres.internalField(); + const scalarField& magLeInternal = magLe().internalField(); + + forAll (leInternal, edgeI) + { + leInternal[edgeI] = + pEdges[edgeI].vec(pPoints) ^ edgeNormalsInternal[edgeI]; + + leInternal[edgeI] *= + - sign + ( + leInternal[edgeI] & + ( + fCentresInternal[owner()[edgeI]] + - eCentresInternal[edgeI] + ) + ); + + leInternal[edgeI] *= + magLeInternal[edgeI]/mag(leInternal[edgeI]); + } + + forAll (boundary(), patchI) + { + const labelUList& bndEdgeFaces = + boundary()[patchI].edgeFaces(); + + const edgeList::subList bndEdges = + boundary()[patchI].patchSlice(pEdges); + + const vectorField& bndEdgeNormals = + edgeNormals.boundaryField()[patchI]; + + vectorField& patchLe = Le.boundaryFieldRef()[patchI]; + const vectorField& patchECentres = eCentres.boundaryField()[patchI]; + + forAll (patchLe, edgeI) + { + patchLe[edgeI] = + bndEdges[edgeI].vec(pPoints) ^ bndEdgeNormals[edgeI]; + + patchLe[edgeI] *= + - sign + ( + patchLe[edgeI]& + ( + fCentresInternal[bndEdgeFaces[edgeI]] + - patchECentres[edgeI] + ) + ); + + patchLe[edgeI] *= + magLe().boundaryField()[patchI][edgeI] + /mag(patchLe[edgeI]); + } + } +} + + +void faMesh::calcMagLe() const +{ + if (debug) + { + Info<< "void faMesh::calcMagLe() const : " + << "Calculating local edge magnitudes" << endl; + } + + if (magLePtr_) + { + FatalErrorIn + ( + "void faMesh::calcMagLe() const" + ) << "magLePtr_ already allocated" + << abort(FatalError); + } + + magLePtr_ = + new edgeScalarField + ( + IOobject + ( + "magLe", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimLength + ); + + edgeScalarField& magLe = *magLePtr_; + + + const pointField& localPoints = points(); + + const edgeList::subList internalEdges = + edgeList::subList(edges(), nInternalEdges()); + + + forAll (internalEdges, edgeI) + { + magLe.ref()[edgeI] = + internalEdges[edgeI].mag(localPoints); + } + + + forAll (boundary(), patchI) + { + const edgeList::subList patchEdges = + boundary()[patchI].patchSlice(edges()); + + forAll (patchEdges, edgeI) + { + magLe.boundaryFieldRef()[patchI][edgeI] = + patchEdges[edgeI].mag(localPoints); + } + } +} + + +void faMesh::calcAreaCentres() const +{ + if (debug) + { + Info<< "void faMesh::calcAreaCentres() const : " + << "Calculating face centres" << endl; + } + + if (centresPtr_) + { + FatalErrorIn + ( + "void faMesh::calcAreaCentres() const" + ) << "centresPtr_ already allocated" + << abort(FatalError); + } + + centresPtr_ = + new areaVectorField + ( + IOobject + ( + "centres", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimLength + ); + areaVectorField& centres = *centresPtr_; + + const pointField& localPoints = points(); + const faceList& localFaces = faces(); + + forAll (localFaces, faceI) + { + centres.ref()[faceI] = + localFaces[faceI].centre(localPoints); + } + + forAll (boundary(), patchI) + { + const edgeList::subList patchEdges = + boundary()[patchI].patchSlice(edges()); + + forAll (patchEdges, edgeI) + { + centres.boundaryFieldRef()[patchI][edgeI] = + patchEdges[edgeI].centre(localPoints); + } + } + + forAll(centres.boundaryField(), patchI) + { + //HJ: this is wrong! 5/Aug/2011 + if + ( + isA<processorFaPatchVectorField> + ( + centres.boundaryField()[patchI] + ) + ) + { + centres.boundaryFieldRef()[patchI].initEvaluate(); + centres.boundaryFieldRef()[patchI].evaluate(); + } + } +} + + +void faMesh::calcEdgeCentres() const +{ + if (debug) + { + Info<< "void faMesh::calcEdgeCentres() const : " + << "Calculating edge centres" << endl; + } + + if (edgeCentresPtr_) + { + FatalErrorIn + ( + "void faMesh::calcEdgeCentres() const" + ) << "edgeCentresPtr_ already allocated" + << abort(FatalError); + } + + edgeCentresPtr_ = + new edgeVectorField + ( + IOobject + ( + "edgeCentres", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimLength + ); + + edgeVectorField& edgeCentres = *edgeCentresPtr_; + + const pointField& localPoints = points(); + + const edgeList::subList internalEdges = + edgeList::subList(edges(), nInternalEdges()); + + + forAll (internalEdges, edgeI) + { + edgeCentres.ref()[edgeI] = + internalEdges[edgeI].centre(localPoints); + } + + + forAll (boundary(), patchI) + { + const edgeList::subList patchEdges = + boundary()[patchI].patchSlice(edges()); + + forAll (patchEdges, edgeI) + { + edgeCentres.boundaryFieldRef()[patchI][edgeI] = + patchEdges[edgeI].centre(localPoints); + } + } +} + + +void faMesh::calcS() const +{ + if (debug) + { + Info<< "void faMesh::calcS() const : " + << "Calculating areas" << endl; + } + + if (SPtr_) + { + FatalErrorIn + ( + "void faMesh::calcS() const" + ) << "SPtr_ already allocated" + << abort(FatalError); + } + + SPtr_ = new DimensionedField<scalar, areaMesh> + ( + IOobject + ( + "S", + time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + *this, + dimArea + ); + DimensionedField<scalar, areaMesh>& S = *SPtr_; + + const pointField& localPoints = points(); + const faceList& localFaces = faces(); + + forAll (S, faceI) + { + S[faceI] = localFaces[faceI].mag(localPoints); + } +} + + +void faMesh::calcFaceAreaNormals() const +{ + if (debug) + { + Info<< "void faMesh::calcFaceAreaNormals() const : " + << "Calculating face area normals" << endl; + } + + if (faceAreaNormalsPtr_) + { + FatalErrorIn + ( + "void faMesh::calcFaceAreaNormals() const" + ) << "faceAreaNormalsPtr_ already allocated" + << abort(FatalError); + } + + faceAreaNormalsPtr_ = + new areaVectorField + ( + IOobject + ( + "faceAreaNormals", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimless + ); + + areaVectorField& faceAreaNormals = *faceAreaNormalsPtr_; + + const pointField& localPoints = points(); + const faceList& localFaces = faces(); + + vectorField& nInternal = faceAreaNormals.ref(); + forAll (localFaces, faceI) + { + nInternal[faceI] = + localFaces[faceI].normal(localPoints)/ + localFaces[faceI].mag(localPoints); + } + + forAll (boundary(), patchI) + { + faceAreaNormals.boundaryFieldRef()[patchI] = + edgeAreaNormals().boundaryField()[patchI]; + } + + forAll(faceAreaNormals.boundaryField(), patchI) + { + if + ( + isA<processorFaPatchVectorField> + ( + faceAreaNormals.boundaryField()[patchI] + ) + ) + { + faceAreaNormals.boundaryFieldRef()[patchI].initEvaluate(); + faceAreaNormals.boundaryFieldRef()[patchI].evaluate(); + } + } +} + + +void faMesh::calcEdgeAreaNormals() const +{ + if (debug) + { + Info<< "void faMesh::calcEdgeAreaNormals() const : " + << "Calculating edge area normals" << endl; + } + + if (edgeAreaNormalsPtr_) + { + FatalErrorIn + ( + "void faMesh::calcEdgeAreaNormals() const" + ) << "edgeAreaNormalsPtr_ already allocated" + << abort(FatalError); + } + + edgeAreaNormalsPtr_ = + new edgeVectorField + ( + IOobject + ( + "edgeAreaNormals", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimless + ); + + edgeVectorField& edgeAreaNormals = *edgeAreaNormalsPtr_; + + + // Point area normals + const vectorField& pointNormals = pointAreaNormals(); + + +// // Primitive patch edge normals +// const labelListList& patchPointEdges = patch().pointEdges(); + +// vectorField patchEdgeNormals(nEdges(), vector::zero); + +// forAll (pointNormals, pointI) +// { +// const labelList& curPointEdges = patchPointEdges[pointI]; + +// forAll (curPointEdges, edgeI) +// { +// label curEdge = curPointEdges[edgeI]; + +// patchEdgeNormals[curEdge] += 0.5*pointNormals[pointI]; +// } +// } + +// patchEdgeNormals /= mag(patchEdgeNormals); + + +// // Edge area normals +// label nIntEdges = patch().nInternalEdges(); + +// for (label edgeI = 0; edgeI < nIntEdges; edgeI++) +// { +// edgeAreaNormals.ref()[edgeI] = +// patchEdgeNormals[edgeI]; +// } + +// forAll (boundary(), patchI) +// { +// const labelList& edgeLabels = boundary()[patchI]; + +// forAll (edgeAreaNormals.boundaryFieldRef()[patchI], edgeI) +// { +// edgeAreaNormals.boundaryFieldRef()[patchI][edgeI] = +// patchEdgeNormals[edgeLabels[edgeI]]; +// } +// } + + + forAll (edgeAreaNormals.internalField(), edgeI) + { + vector e = edges()[edgeI].vec(points()); + e /= mag(e); + +// scalar wStart = +// 1.0 - sqr(mag(e^pointNormals[edges()[edgeI].end()])); + +// scalar wEnd = +// 1.0 - sqr(mag(e^pointNormals[edges()[edgeI].start()])); + +// wStart = 1.0; +// wEnd = 1.0; + +// edgeAreaNormals.ref()[edgeI] = +// wStart*pointNormals[edges()[edgeI].start()] +// + wEnd*pointNormals[edges()[edgeI].end()]; + +// vector eC = 0.5*(points()[edges()[edgeI].start()] + points()[edges()[edgeI].end()]); + +// vector eCp = 0.5* +// ( +// points()[edges()[edgeI].start()] + pointNormals[edges()[edgeI].start()] +// points()[edges()[edgeI].end()] + +// ); + + edgeAreaNormals.ref()[edgeI] = + pointNormals[edges()[edgeI].start()] + + pointNormals[edges()[edgeI].end()]; + + edgeAreaNormals.ref()[edgeI] -= + e*(e&edgeAreaNormals.internalField()[edgeI]); + } + + edgeAreaNormals.ref() /= + mag(edgeAreaNormals.internalField()); + + forAll (boundary(), patchI) + { + const edgeList::subList patchEdges = + boundary()[patchI].patchSlice(edges()); + + forAll (patchEdges, edgeI) + { + edgeAreaNormals.boundaryFieldRef()[patchI][edgeI] = + pointNormals[patchEdges[edgeI].start()] + + pointNormals[patchEdges[edgeI].end()]; + + vector e = patchEdges[edgeI].vec(points()); + e /= mag(e); + + edgeAreaNormals.boundaryFieldRef()[patchI][edgeI] -= + e*(e&edgeAreaNormals.boundaryField()[patchI][edgeI]); + } + + edgeAreaNormals.boundaryFieldRef()[patchI] /= + mag(edgeAreaNormals.boundaryField()[patchI]); + } +} + + +void faMesh::calcFaceCurvatures() const +{ + if (debug) + { + Info<< "void faMesh::calcFaceCurvatures() const : " + << "Calculating face curvatures" << endl; + } + + if (faceCurvaturesPtr_) + { + FatalErrorIn + ( + "void faMesh::calcFaceCurvatures() const" + ) << "faceCurvaturesPtr_ already allocated" + << abort(FatalError); + } + + faceCurvaturesPtr_ = + new areaScalarField + ( + IOobject + ( + "faceCurvatures", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimless/dimLength + ); + + areaScalarField& faceCurvatures = *faceCurvaturesPtr_; + + +// faceCurvatures = +// fac::edgeIntegrate(Le()*edgeLengthCorrection()) +// &faceAreaNormals(); + + areaVectorField kN = + fac::edgeIntegrate(Le()*edgeLengthCorrection()); + + faceCurvatures = sign(kN&faceAreaNormals())*mag(kN); +} + + +void faMesh::calcEdgeTransformTensors() const +{ + if (debug) + { + Info<< "void faMesh::calcEdgeTransformTensors() const : " + << "Calculating edge transformation tensors" << endl; + } + + if (edgeTransformTensorsPtr_) + { + FatalErrorIn + ( + "void faMesh::calcEdgeTransformTensors() const" + ) << "edgeTransformTensorsPtr_ already allocated" + << abort(FatalError); + } + + edgeTransformTensorsPtr_ = new FieldField<Field, tensor>(nEdges()); + FieldField<Field, tensor>& edgeTransformTensors = + *edgeTransformTensorsPtr_; + + const areaVectorField& Nf = faceAreaNormals(); + const areaVectorField& Cf = areaCentres(); + + const edgeVectorField& Ne = edgeAreaNormals(); + const edgeVectorField& Ce = edgeCentres(); + + // Internal edges transformation tensors + for (label edgeI=0; edgeI<nInternalEdges(); edgeI++) + { + edgeTransformTensors.set(edgeI, new Field<tensor>(3, I)); + + vector E = Ce.internalField()[edgeI]; + + if (skew()) + { + E -= skewCorrectionVectors().internalField()[edgeI]; + } + + // Edge transformation tensor + vector il = E - Cf.internalField()[owner()[edgeI]]; + + il -= Ne.internalField()[edgeI] + *(Ne.internalField()[edgeI]&il); + + il /= mag(il); + + vector kl = Ne.internalField()[edgeI]; + vector jl = kl^il; + + edgeTransformTensors[edgeI][0] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + + // Owner transformation tensor + il = E - Cf.internalField()[owner()[edgeI]]; + + il -= Nf.internalField()[owner()[edgeI]] + *(Nf.internalField()[owner()[edgeI]]&il); + + il /= mag(il); + + kl = Nf.internalField()[owner()[edgeI]]; + jl = kl^il; + + edgeTransformTensors[edgeI][1] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + + // Neighbour transformation tensor + il = Cf.internalField()[neighbour()[edgeI]] - E; + + il -= Nf.internalField()[neighbour()[edgeI]] + *(Nf.internalField()[neighbour()[edgeI]]&il); + + il /= mag(il); + + kl = Nf.internalField()[neighbour()[edgeI]]; + jl = kl^il; + + edgeTransformTensors[edgeI][2] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + } + + // Boundary edges transformation tensors + forAll (boundary(), patchI) + { + if (boundary()[patchI].coupled()) + { + const labelUList& edgeFaces = + boundary()[patchI].edgeFaces(); + + vectorField ngbCf = + Cf.boundaryField()[patchI].patchNeighbourField(); + + vectorField ngbNf = + Nf.boundaryField()[patchI].patchNeighbourField(); + + forAll(edgeFaces, edgeI) + { + edgeTransformTensors.set + ( + boundary()[patchI].start() + edgeI, + new Field<tensor>(3, I) + ); + + vector E = Ce.boundaryField()[patchI][edgeI]; + + if (skew()) + { + E -= skewCorrectionVectors() + .boundaryField()[patchI][edgeI]; + } + + // Edge transformation tensor + vector il = E - Cf.internalField()[edgeFaces[edgeI]]; + + il -= Ne.boundaryField()[patchI][edgeI] + *(Ne.boundaryField()[patchI][edgeI]&il); + + il /= mag(il); + + vector kl = Ne.boundaryField()[patchI][edgeI]; + vector jl = kl^il; + + edgeTransformTensors[boundary()[patchI].start() + edgeI][0] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + + // Owner transformation tensor + il = E - Cf.internalField()[edgeFaces[edgeI]]; + + il -= Nf.internalField()[edgeFaces[edgeI]] + *(Nf.internalField()[edgeFaces[edgeI]]&il); + + il /= mag(il); + + kl = Nf.internalField()[edgeFaces[edgeI]]; + jl = kl^il; + + edgeTransformTensors[boundary()[patchI].start() + edgeI][1] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + + // Neighbour transformation tensor + il = ngbCf[edgeI] - E; + + il -= ngbNf[edgeI]*(ngbNf[edgeI]&il); + + il /= mag(il); + + kl = ngbNf[edgeI]; + + jl = kl^il; + + edgeTransformTensors[boundary()[patchI].start() + edgeI][2] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + } + } + else + { + const labelUList& edgeFaces = boundary()[patchI].edgeFaces(); + + forAll(edgeFaces, edgeI) + { + edgeTransformTensors.set + ( + boundary()[patchI].start() + edgeI, + new Field<tensor>(3, I) + ); + + vector E = Ce.boundaryField()[patchI][edgeI]; + + if (skew()) + { + E -= skewCorrectionVectors() + .boundaryField()[patchI][edgeI]; + } + + // Edge transformation tensor + vector il = E - Cf.internalField()[edgeFaces[edgeI]]; + + il -= Ne.boundaryField()[patchI][edgeI] + *(Ne.boundaryField()[patchI][edgeI]&il); + + il /= mag(il); + + vector kl = Ne.boundaryField()[patchI][edgeI]; + vector jl = kl^il; + + edgeTransformTensors[boundary()[patchI].start() + edgeI][0] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + + // Owner transformation tensor + il = E - Cf.internalField()[edgeFaces[edgeI]]; + + il -= Nf.internalField()[edgeFaces[edgeI]] + *(Nf.internalField()[edgeFaces[edgeI]]&il); + + il /= mag(il); + + kl = Nf.internalField()[edgeFaces[edgeI]]; + jl = kl^il; + + edgeTransformTensors[boundary()[patchI].start() + edgeI][1] = + tensor + ( + il.x(), il.y(), il.z(), + jl.x(), jl.y(), jl.z(), + kl.x(), kl.y(), kl.z() + ); + } + } + } +} + + +labelList faMesh::internalPoints() const +{ + if (debug) + { + Info<< "labelList faMesh::internalPoints() const : " + << "Calculating internal points" << endl; + } + + const edgeList& edges = patch().edges(); + label nIntEdges = patch().nInternalEdges(); + + List<bool> internal (nPoints(), true); + + for (label curEdge = nIntEdges; curEdge < edges.size(); curEdge++) + { + internal[edges[curEdge].start()] = false; + + internal[edges[curEdge].end()] = false; + } + + SLList<label> internalPoints; + + forAll (internal, pointI) + { + if (internal[pointI]) + { + internalPoints.append(pointI); + } + } + + labelList result(internalPoints); + + return result; +} + + +labelList faMesh::boundaryPoints() const +{ + if (debug) + { + Info<< "labelList faMesh::boundaryPoints() const : " + << "Calculating boundary points" << endl; + } + + const edgeList& edges = patch().edges(); + label nIntEdges = patch().nInternalEdges(); + + List<bool> internal (nPoints(), true); + + for (label curEdge = nIntEdges; curEdge < edges.size(); curEdge++) + { + internal[edges[curEdge].start()] = false; + + internal[edges[curEdge].end()] = false; + } + + SLList<label> boundaryPoints; + + forAll (internal, pointI) + { + if (!internal[pointI]) + { + boundaryPoints.append(pointI); + } + } + + labelList result(boundaryPoints); + + return result; +} + + +void faMesh::calcPointAreaNormals() const +{ + if (pointAreaNormalsPtr_) + { + FatalErrorIn + ( + "void faMesh::calcPointAreaNormals() const" + ) << "pointAreaNormalsPtr_ already allocated" + << abort(FatalError); + } + + + pointAreaNormalsPtr_ = + new vectorField + ( + nPoints(), + vector::zero + ); + + vectorField& result = *pointAreaNormalsPtr_; + + labelList intPoints = internalPoints(); + labelList bndPoints = boundaryPoints(); + + const pointField& points = patch().localPoints(); + const faceList& faces = patch().localFaces(); + const labelListList& pointFaces = patch().pointFaces(); + + forAll (intPoints, pointI) + { + label curPoint = intPoints[pointI]; + + faceList curFaceList(pointFaces[curPoint].size()); + + forAll (curFaceList, faceI) + { + curFaceList[faceI] = faces[pointFaces[curPoint][faceI]]; + } + + primitiveFacePatch curPatch(curFaceList, points); + + labelList curPointPoints = curPatch.edgeLoops()[0]; + + for (int i = 0; i < curPointPoints.size(); i++) + { + vector d1 = + points[curPatch.meshPoints()[curPointPoints[i]]] + - points[curPoint]; + + label p = i + 1; + + if (i == (curPointPoints.size() - 1)) + { + p = 0; + } + + vector d2 = + points[curPatch.meshPoints()[curPointPoints[p]]] + - points[curPoint]; + + vector n = (d1 ^ d2)/(mag(d1 ^ d2) + SMALL); + + scalar sinAlpha = mag(d1^d2)/(mag(d1)*mag(d2)); + + scalar w = sinAlpha/(mag(d1)*mag(d2)); + + result[curPoint] += w*n; + } + } + + forAll (bndPoints, pointI) + { + label curPoint = bndPoints[pointI]; + + faceList curFaceList(pointFaces[curPoint].size()); + + forAll (curFaceList, faceI) + { + curFaceList[faceI] = faces[pointFaces[curPoint][faceI]]; + } + + primitiveFacePatch curPatch (curFaceList, points); + + labelList agglomFacePoints = curPatch.edgeLoops()[0]; + + SLList<label> slList; + + label curPointLabel = -1; + + for (label i=0; i<agglomFacePoints.size(); i++) + { + if (curPatch.meshPoints()[agglomFacePoints[i]] == curPoint) + { + curPointLabel = i; + } + else if ( curPointLabel != -1 ) + { + slList.append(curPatch.meshPoints()[agglomFacePoints[i]]); + } + } + + for (label i=0; i<curPointLabel; i++) + { + slList.append(curPatch.meshPoints()[agglomFacePoints[i]]); + } + + labelList curPointPoints(slList); + + for (label i=0; i < (curPointPoints.size() - 1); i++) + { + vector d1 = points[curPointPoints[i]] - points[curPoint]; + + vector d2 = points[curPointPoints[i + 1]] - points[curPoint]; + + vector n = (d1 ^ d2)/(mag(d1 ^ d2) + SMALL); + + scalar sinAlpha = mag(d1 ^ d2)/(mag(d1)*mag(d2)); + + scalar w = sinAlpha/(mag(d1)*mag(d2)); + + result[curPoint] += w*n; + } + } + + // Correcte wedge points + forAll (boundary(), patchI) + { + if (boundary()[patchI].type() == wedgeFaPatch::typeName) + { + const wedgeFaPatch& wedgePatch = + refCast<const wedgeFaPatch>(boundary()[patchI]); + + labelList patchPoints = wedgePatch.pointLabels(); + + vector N = + transform + ( + wedgePatch.edgeT(), + wedgePatch.centreNormal() + ); + + N /= mag(N); + + forAll (patchPoints, pointI) + { + result[patchPoints[pointI]] + -= N*(N&result[patchPoints[pointI]]); + } + } + } + + // Axis point correction + forAll (boundary(), patchI) + { + if (boundary()[patchI].type() == wedgeFaPatch::typeName) + { + const wedgeFaPatch& wedgePatch = + refCast<const wedgeFaPatch>(boundary()[patchI]); + + if (wedgePatch.axisPoint() > -1) + { + result[wedgePatch.axisPoint()] = + wedgePatch.axis() + *( + wedgePatch.axis() + &result[wedgePatch.axisPoint()] + ); + } + + break; + } + } + + + // Processor patch points correction + forAll (boundary(), patchI) + { + if(boundary()[patchI].type() == processorFaPatch::typeName) + { + const processorFaPatch& procPatch = + refCast<const processorFaPatch>(boundary()[patchI]); + + labelList patchPointLabels = procPatch.pointLabels(); + + vectorField patchPointNormals + ( + patchPointLabels.size(), + vector::zero + ); + + forAll (patchPointNormals, pointI) + { + patchPointNormals[pointI] = + result[patchPointLabels[pointI]]; + } + + { + OPstream::write + ( + Pstream::commsTypes::blocking, + procPatch.neighbProcNo(), + reinterpret_cast<const char*>(patchPointNormals.begin()), + patchPointNormals.byteSize() + ); + } + + vectorField ngbPatchPointNormals + ( + procPatch.neighbPoints().size(), + vector::zero + ); + + { + IPstream::read + ( + Pstream::commsTypes::blocking, + procPatch.neighbProcNo(), + reinterpret_cast<char*>(ngbPatchPointNormals.begin()), + ngbPatchPointNormals.byteSize() + ); + } + + const labelList& nonGlobalPatchPoints = + procPatch.nonGlobalPatchPoints(); + + forAll (nonGlobalPatchPoints, pointI) + { + result[patchPointLabels[nonGlobalPatchPoints[pointI]]] += + ngbPatchPointNormals + [ + procPatch.neighbPoints()[nonGlobalPatchPoints[pointI]] + ]; + } + } + } + + + // Correct global points + if (globalData().nGlobalPoints() > 0) + { + const labelList& spLabels = + globalData().sharedPointLabels(); + + vectorField spNormals(spLabels.size(), vector::zero); + forAll (spNormals, pointI) + { + spNormals[pointI] = result[spLabels[pointI]]; + } + + const labelList& addr = globalData().sharedPointAddr(); + + vectorField gpNormals + ( + globalData().nGlobalPoints(), + vector::zero + ); + + forAll (addr, i) + { + gpNormals[addr[i]] += spNormals[i]; + } + + combineReduce(gpNormals, plusEqOp<vectorField>()); + + // Extract local data + forAll (addr, i) + { + spNormals[i] = gpNormals[addr[i]]; + } + + forAll (spNormals, pointI) + { + result[spLabels[pointI]] = spNormals[pointI]; + } + } + + + // Boundary points correction + forAll (boundary(), patchI) + { + if (correctPatchPointNormals(patchI) && !boundary()[patchI].coupled()) + { + if (boundary()[patchI].ngbPolyPatchIndex() == -1) + { + FatalErrorIn + ( + "void faMesh::calcPointAreaNormals const" + ) << "Neighbour polyPatch index is not defined " + << "for faPatch " << boundary()[patchI].name() + << abort(FatalError); + } + + labelList patchPoints = boundary()[patchI].pointLabels(); + + vectorField N = boundary()[patchI].ngbPolyPatchPointNormals(); + + forAll (patchPoints, pointI) + { + result[patchPoints[pointI]] + -= N[pointI]*(N[pointI]&result[patchPoints[pointI]]); + } + } + } + + result /= mag(result); +} + + +void faMesh::calcPointAreaNormalsByQuadricsFit() const +{ + vectorField& result = *pointAreaNormalsPtr_; + + + labelList intPoints = internalPoints(); + labelList bndPoints = boundaryPoints(); + + const pointField& points = patch().localPoints(); + const faceList& faces = patch().localFaces(); + const labelListList& pointFaces = patch().pointFaces(); + + forAll(intPoints, pointI) + { + label curPoint = intPoints[pointI]; + + labelHashSet faceSet; + forAll(pointFaces[curPoint], faceI) + { + faceSet.insert(pointFaces[curPoint][faceI]); + } + labelList curFaces = faceSet.toc(); + + labelHashSet pointSet; + + pointSet.insert(curPoint); + for(label i=0; i<curFaces.size(); i++) + { + const labelList& facePoints = faces[curFaces[i]]; + for(label j=0; j<facePoints.size(); j++) + { + if(!pointSet.found(facePoints[j])) + { + pointSet.insert(facePoints[j]); + } + } + } + pointSet.erase(curPoint); + labelList curPoints = pointSet.toc(); + + if (curPoints.size() < 5) + { + if (debug) + { + Info << "WARNING: Extending point set for fitting." << endl; + } + + labelHashSet faceSet; + forAll(pointFaces[curPoint], faceI) + { + faceSet.insert(pointFaces[curPoint][faceI]); + } + labelList curFaces = faceSet.toc(); + forAll(curFaces, faceI) + { + const labelList& curFaceFaces = + patch().faceFaces()[curFaces[faceI]]; + + forAll(curFaceFaces, fI) + { + label curFaceFace = curFaceFaces[fI]; + + if(!faceSet.found(curFaceFace)) + { + faceSet.insert(curFaceFace); + } + } + } + curFaces = faceSet.toc(); + + labelHashSet pointSet; + + pointSet.insert(curPoint); + for(label i=0; i<curFaces.size(); i++) + { + const labelList& facePoints = faces[curFaces[i]]; + for(label j=0; j<facePoints.size(); j++) + { + if(!pointSet.found(facePoints[j])) + { + pointSet.insert(facePoints[j]); + } + } + } + + pointSet.erase(curPoint); + curPoints = pointSet.toc(); + } + + vectorField allPoints(curPoints.size()); + scalarField W(curPoints.size(), 1.0); + for(label i=0; i<curPoints.size(); i++) + { + allPoints[i] = points[curPoints[i]]; + W[i] = 1.0/magSqr(allPoints[i] - points[curPoint]); + } + + // Transforme points + vector origin = points[curPoint]; + vector axis = result[curPoint]/mag(result[curPoint]); + vector dir = (allPoints[0] - points[curPoint]); + dir -= axis*(axis&dir); + dir /= mag(dir); + coordinateSystem cs("cs", origin, axis, dir); + + forAll(allPoints, pI) + { + allPoints[pI] = cs.localPosition(allPoints[pI]); + } + + scalarRectangularMatrix M + ( + allPoints.size(), + 5, + 0.0 + ); + + for(label i = 0; i < allPoints.size(); i++) + { + M[i][0] = sqr(allPoints[i].x()); + M[i][1] = sqr(allPoints[i].y()); + M[i][2] = allPoints[i].x()*allPoints[i].y(); + M[i][3] = allPoints[i].x(); + M[i][4] = allPoints[i].y(); + } + + scalarSquareMatrix MtM(5, 0.0); + + for (label i = 0; i < MtM.n(); i++) + { + for (label j = 0; j < MtM.m(); j++) + { + for (label k = 0; k < M.n(); k++) + { + MtM[i][j] += M[k][i]*M[k][j]*W[k]; + } + } + } + + scalarField MtR(5, 0); + + for (label i=0; i<MtR.size(); i++) + { + for (label j=0; j<M.n(); j++) + { + MtR[i] += M[j][i]*allPoints[j].z()*W[j]; + } + } + + LUsolve(MtM, MtR); + + vector curNormal = vector(MtR[3], MtR[4], -1); + + curNormal = cs.globalVector(curNormal); + + curNormal *= sign(curNormal&result[curPoint]); + + result[curPoint] = curNormal; + } + + + forAll (boundary(), patchI) + { + if(boundary()[patchI].type() == processorFaPatch::typeName) + { + const processorFaPatch& procPatch = + refCast<const processorFaPatch>(boundary()[patchI]); + + labelList patchPointLabels = procPatch.pointLabels(); + + labelList toNgbProcLsPointStarts(patchPointLabels.size(), 0); + vectorField toNgbProcLsPoints + ( + 10*patchPointLabels.size(), + vector::zero + ); + label nPoints = 0; + + for (label pointI=0; pointI<patchPointLabels.size(); pointI++) + { + label curPoint = patchPointLabels[pointI]; + + toNgbProcLsPointStarts[pointI] = nPoints; + + labelHashSet faceSet; + forAll(pointFaces[curPoint], faceI) + { + faceSet.insert(pointFaces[curPoint][faceI]); + } + labelList curFaces = faceSet.toc(); + + labelHashSet pointSet; + + pointSet.insert(curPoint); + for (label i=0; i<curFaces.size(); i++) + { + const labelList& facePoints = faces[curFaces[i]]; + for (label j=0; j<facePoints.size(); j++) + { + if(!pointSet.found(facePoints[j])) + { + pointSet.insert(facePoints[j]); + } + } + } + pointSet.erase(curPoint); + labelList curPoints = pointSet.toc(); + + for (label i=0; i<curPoints.size(); i++) + { + toNgbProcLsPoints[nPoints++] = + points[curPoints[i]]; + } + } + + toNgbProcLsPoints.setSize(nPoints); + + { + OPstream toNeighbProc + ( + Pstream::commsTypes::blocking, + procPatch.neighbProcNo(), + toNgbProcLsPoints.byteSize() + + toNgbProcLsPointStarts.byteSize() + + 10*sizeof(label) + ); + + toNeighbProc << toNgbProcLsPoints + << toNgbProcLsPointStarts; + } + } + } + + forAll (boundary(), patchI) + { + if(boundary()[patchI].type() == processorFaPatch::typeName) + { + const processorFaPatch& procPatch = + refCast<const processorFaPatch>(boundary()[patchI]); + + labelList patchPointLabels = procPatch.pointLabels(); + + labelList fromNgbProcLsPointStarts(patchPointLabels.size(), 0); + vectorField fromNgbProcLsPoints; + + { + IPstream fromNeighbProc + ( + Pstream::commsTypes::blocking, + procPatch.neighbProcNo(), + 10*patchPointLabels.size()*sizeof(vector) + + fromNgbProcLsPointStarts.byteSize() + + 10*sizeof(label) + ); + + fromNeighbProc >> fromNgbProcLsPoints + >> fromNgbProcLsPointStarts; + } + + const labelList& nonGlobalPatchPoints = + procPatch.nonGlobalPatchPoints(); + + forAll(nonGlobalPatchPoints, pointI) + { + label curPoint = + patchPointLabels[nonGlobalPatchPoints[pointI]]; + label curNgbPoint = + procPatch.neighbPoints()[nonGlobalPatchPoints[pointI]]; + + labelHashSet faceSet; + forAll(pointFaces[curPoint], faceI) + { + faceSet.insert(pointFaces[curPoint][faceI]); + } + labelList curFaces = faceSet.toc(); + + labelHashSet pointSet; + + pointSet.insert(curPoint); + for(label i=0; i<curFaces.size(); i++) + { + const labelList& facePoints = faces[curFaces[i]]; + for(label j=0; j<facePoints.size(); j++) + { + if(!pointSet.found(facePoints[j])) + { + pointSet.insert(facePoints[j]); + } + } + } + pointSet.erase(curPoint); + labelList curPoints = pointSet.toc(); + + label nAllPoints = curPoints.size(); + + if (curNgbPoint == fromNgbProcLsPointStarts.size() - 1) + { + nAllPoints += + fromNgbProcLsPoints.size() + - fromNgbProcLsPointStarts[curNgbPoint]; + } + else + { + nAllPoints += + fromNgbProcLsPointStarts[curNgbPoint + 1] + - fromNgbProcLsPointStarts[curNgbPoint]; + } + + vectorField allPointsExt(nAllPoints); + label counter = 0; + for (label i=0; i<curPoints.size(); i++) + { + allPointsExt[counter++] = points[curPoints[i]]; + } + + if (curNgbPoint == fromNgbProcLsPointStarts.size() - 1) + { + for + ( + label i=fromNgbProcLsPointStarts[curNgbPoint]; + i<fromNgbProcLsPoints.size(); + i++ + ) + { + allPointsExt[counter++] = fromNgbProcLsPoints[i]; + } + } + else + { + for + ( + label i=fromNgbProcLsPointStarts[curNgbPoint]; + i<fromNgbProcLsPointStarts[curNgbPoint+1]; + i++ + ) + { + allPointsExt[counter++] = fromNgbProcLsPoints[i]; + } + } + + // Remove duplicate points + vectorField allPoints(nAllPoints, vector::zero); + boundBox bb(allPointsExt, false); + scalar tol = 0.001*mag(bb.max() - bb.min()); + + nAllPoints = 0; + forAll(allPointsExt, pI) + { + bool duplicate = false; + for (label i=0; i<nAllPoints; i++) + { + if + ( + mag + ( + allPoints[i] + - allPointsExt[pI] + ) + < tol + ) + { + duplicate = true; + break; + } + } + + if (!duplicate) + { + allPoints[nAllPoints++] = + allPointsExt[pI]; + } + } + + allPoints.setSize(nAllPoints); + + if (nAllPoints < 5) + { + FatalErrorIn + ( + "void faMesh::calcPointAreaNormals() const" + ) << "There are no enough points for quadrics " + << "fitting for a point at processor patch" + << abort(FatalError); + } + + // Transforme points + vector origin = points[curPoint]; + vector axis = result[curPoint]/mag(result[curPoint]); + vector dir = (allPoints[0] - points[curPoint]); + dir -= axis*(axis&dir); + dir /= mag(dir); + coordinateSystem cs("cs", origin, axis, dir); + + scalarField W(allPoints.size(), 1.0); + + forAll(allPoints, pI) + { + W[pI] = 1.0/magSqr(allPoints[pI] - points[curPoint]); + + allPoints[pI] = + cs.localPosition(allPoints[pI]); + } + + scalarRectangularMatrix M + ( + allPoints.size(), + 5, + 0.0 + ); + + for(label i=0; i<allPoints.size(); i++) + { + M[i][0] = sqr(allPoints[i].x()); + M[i][1] = sqr(allPoints[i].y()); + M[i][2] = allPoints[i].x()*allPoints[i].y(); + M[i][3] = allPoints[i].x(); + M[i][4] = allPoints[i].y(); + } + + scalarSquareMatrix MtM(5, 0.0); + + for (label i = 0; i < MtM.n(); i++) + { + for (label j = 0; j < MtM.m(); j++) + { + for (label k = 0; k < M.n(); k++) + { + MtM[i][j] += M[k][i]*M[k][j]*W[k]; + } + } + } + + scalarField MtR(5, 0); + + for (label i = 0; i < MtR.size(); i++) + { + for (label j = 0; j < M.n(); j++) + { + MtR[i] += M[j][i]*allPoints[j].z()*W[j]; + } + } + + LUsolve(MtM, MtR); + + vector curNormal = vector(MtR[3], MtR[4], -1); + + curNormal = cs.globalVector(curNormal); + + curNormal *= sign(curNormal&result[curPoint]); + + result[curPoint] = curNormal; + } + } + } + + // Correct global points + if (globalData().nGlobalPoints() > 0) + { + const labelList& spLabels = + globalData().sharedPointLabels(); + + const labelList& addr = globalData().sharedPointAddr(); + + for (label k=0; k<globalData().nGlobalPoints(); k++) + { + List<List<vector> > procLsPoints(Pstream::nProcs()); + + label curSharedPointIndex = findIndex(addr, k); + + scalar tol = 0.0; + + if (curSharedPointIndex != -1) + { + label curPoint = spLabels[curSharedPointIndex]; + + labelHashSet faceSet; + forAll(pointFaces[curPoint], faceI) + { + faceSet.insert(pointFaces[curPoint][faceI]); + } + labelList curFaces = faceSet.toc(); + + labelHashSet pointSet; + pointSet.insert(curPoint); + for (label i=0; i<curFaces.size(); i++) + { + const labelList& facePoints = faces[curFaces[i]]; + for (label j=0; j<facePoints.size(); j++) + { + if (!pointSet.found(facePoints[j])) + { + pointSet.insert(facePoints[j]); + } + } + } + pointSet.erase(curPoint); + labelList curPoints = pointSet.toc(); + + vectorField locPoints(points, curPoints); + + procLsPoints[Pstream::myProcNo()] = locPoints; + + boundBox bb(locPoints, false); + tol = 0.001*mag(bb.max() - bb.min()); + } + + Pstream::gatherList(procLsPoints); + Pstream::scatterList(procLsPoints); + + if (curSharedPointIndex != -1) + { + label curPoint = spLabels[curSharedPointIndex]; + + label nAllPoints = 0; + forAll(procLsPoints, procI) + { + nAllPoints += procLsPoints[procI].size(); + } + + vectorField allPoints(nAllPoints, vector::zero); + + nAllPoints = 0; + forAll(procLsPoints, procI) + { + forAll(procLsPoints[procI], pointI) + { + bool duplicate = false; + for (label i=0; i<nAllPoints; i++) + { + if + ( + mag + ( + allPoints[i] + - procLsPoints[procI][pointI] + ) + < tol + ) + { + duplicate = true; + break; + } + } + + if (!duplicate) + { + allPoints[nAllPoints++] = + procLsPoints[procI][pointI]; + } + } + } + + allPoints.setSize(nAllPoints); + + if (nAllPoints < 5) + { + FatalErrorIn + ( + "void faMesh::calcPointAreaNormals() const" + ) << "There are no enough points for quadrics " + << "fitting for a global processor point " + << abort(FatalError); + } + + // Transforme points + vector origin = points[curPoint]; + vector axis = result[curPoint]/mag(result[curPoint]); + vector dir = (allPoints[0] - points[curPoint]); + dir -= axis*(axis&dir); + dir /= mag(dir); + coordinateSystem cs("cs", origin, axis, dir); + + scalarField W(allPoints.size(), 1.0); + + forAll(allPoints, pointI) + { + W[pointI]= + 1.0/magSqr(allPoints[pointI] - points[curPoint]); + + allPoints[pointI] = + cs.localPosition(allPoints[pointI]); + } + + scalarRectangularMatrix M + ( + allPoints.size(), + 5, + 0.0 + ); + + for (label i=0; i<allPoints.size(); i++) + { + M[i][0] = sqr(allPoints[i].x()); + M[i][1] = sqr(allPoints[i].y()); + M[i][2] = allPoints[i].x()*allPoints[i].y(); + M[i][3] = allPoints[i].x(); + M[i][4] = allPoints[i].y(); + } + + scalarSquareMatrix MtM(5, 0.0); + for (label i = 0; i < MtM.n(); i++) + { + for (label j = 0; j < MtM.m(); j++) + { + for (label k = 0; k < M.n(); k++) + { + MtM[i][j] += M[k][i]*M[k][j]*W[k]; + } + } + } + + scalarField MtR(5, 0); + for (label i = 0; i < MtR.size(); i++) + { + for (label j = 0; j < M.n(); j++) + { + MtR[i] += M[j][i]*allPoints[j].z()*W[j]; + } + } + + LUsolve(MtM, MtR); + + vector curNormal = vector(MtR[3], MtR[4], -1); + + curNormal = cs.globalVector(curNormal); + + curNormal *= sign(curNormal&result[curPoint]); + + result[curPoint] = curNormal; + } + } + } + + result /= mag(result); +} + + +tmp<edgeScalarField> faMesh::edgeLengthCorrection() const +{ + if (debug) + { + Info<< "tmp<edgeScalarField> faMesh::edgeLengthCorrection() const : " + << "Calculating edge length correction" << endl; + } + + tmp<edgeScalarField> tcorrection + ( + new edgeScalarField + ( + IOobject + ( + "edgeLengthCorrection", + mesh().pointsInstance(), + meshSubDir, + mesh() + ), + *this, + dimless + ) + ); + edgeScalarField& correction = tcorrection.ref(); + + + const vectorField& pointNormals = pointAreaNormals(); + + + forAll (correction.internalField(), edgeI) + { + scalar sinAlpha = mag + ( + pointNormals[edges()[edgeI].start()]^ + pointNormals[edges()[edgeI].end()] + ); + + scalar alpha = asin(sinAlpha); + + correction.ref()[edgeI] = cos(alpha/2.0); + } + + + forAll (boundary(), patchI) + { + const edgeList::subList patchEdges = + boundary()[patchI].patchSlice(edges()); + + forAll (patchEdges, edgeI) + { + scalar sinAlpha = mag + ( + pointNormals[patchEdges[edgeI].start()]^ + pointNormals[patchEdges[edgeI].end()] + ); + + scalar alpha = asin(sinAlpha); + + correction.boundaryFieldRef()[patchI][edgeI] = cos(alpha/2.0); + } + } + + return tcorrection; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshLduAddressing.H b/src/finiteArea/faMesh/faMeshLduAddressing.H new file mode 100644 index 0000000000000000000000000000000000000000..ba0c180b0ee7292a10891deffc029d112d61792c --- /dev/null +++ b/src/finiteArea/faMesh/faMeshLduAddressing.H @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faMeshLduAddressing + +Description + lduAddressing wrapper for faMesh + +SourceFiles + faMeshLduAddressing.C + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faMeshLduAddressing_H +#define faMeshLduAddressing_H + +#include "lduAddressing.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faMeshLduAddressing Declaration +\*---------------------------------------------------------------------------*/ + +class faMeshLduAddressing +: + public lduAddressing +{ + // Private data + + //- Lower as a subList of allOwner + labelList::subList lowerAddr_; + + //- Upper as a reference to neighbour + const labelList& upperAddr_; + + //- Patch addressing as a list of sublists + List<const labelUList*> patchAddr_; + + //- Patch field evaluation schedule + const lduSchedule& patchSchedule_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faMeshLduAddressing(const faMeshLduAddressing&); + + //- Disallow default bitwise assignment + void operator=(const faMeshLduAddressing&); + + +public: + + // Constructors + + //- Construct from components + faMeshLduAddressing(const faMesh& mesh) + : + lduAddressing(mesh.nFaces()), + lowerAddr_ + ( + labelList::subList + ( + mesh.edgeOwner(), + mesh.nInternalEdges() + ) + ), + upperAddr_(mesh.edgeNeighbour()), + patchAddr_(mesh.boundary().size()), + patchSchedule_(mesh.globalData().patchSchedule()) + { + forAll (mesh.boundary(), patchI) + { + patchAddr_[patchI] = &mesh.boundary()[patchI].edgeFaces(); + } + } + + // Destructor + + virtual ~faMeshLduAddressing() + {} + + + // Member Functions + + //- Return number of interfaces + virtual label nPatches() const + { + return patchAddr_.size(); + } + + //- Return lower addressing (i.e. lower label = upper triangle) + virtual const labelUList& lowerAddr() const + { + return lowerAddr_; + } + + //- Return upper addressing (i.e. upper label) + virtual const labelUList& upperAddr() const + { + return upperAddr_; + } + + //- Return patch addressing + virtual const labelUList& patchAddr(const label i) const + { + return *patchAddr_[i]; + } + + // Return patch field evaluation schedule + virtual const lduSchedule& patchSchedule() const + { + return patchSchedule_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C new file mode 100644 index 0000000000000000000000000000000000000000..be0d37503e4e9e4d678fce26b6de7af23b3154b3 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C @@ -0,0 +1,434 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + FV surface mapper. + +\*---------------------------------------------------------------------------*/ + +#include "faAreaMapper.H" +#include "mapPolyMesh.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::faAreaMapper::calcAddressing() const +{ + if + ( + newFaceLabelsPtr_ + || newFaceLabelsMapPtr_ + || directAddrPtr_ + || interpolationAddrPtr_ + || weightsPtr_ + || insertedObjectLabelsPtr_ + ) + { + FatalErrorIn("void faAreaMapper::calcAddressing() const)") + << "Addressing already calculated" + << abort(FatalError); + } + + // Mapping + + const label oldNInternal = mpm_.nOldInternalFaces(); + + hasUnmapped_ = false; + + // Calculate new face labels + + // Copy old face labels + const labelList& oldFaces = mesh_.faceLabels(); + + // Prepare a list of new face labels and (preliminary) addressing + // Note: dimensioned to number of boundary faces of polyMesh + // HJ, 10/Aug/2011 + newFaceLabelsPtr_ = new labelList + ( + mesh_().nFaces() - mesh_().nInternalFaces(), + -1 + ); + labelList& newFaceLabels = *newFaceLabelsPtr_; + + newFaceLabelsMapPtr_ = new labelList + ( + mesh_().nFaces() - mesh_().nInternalFaces(), + -1 + ); + labelList& newFaceLabelsMap = *newFaceLabelsMapPtr_; + label nNewFaces = 0; + + Info<< "Old face list size: " << oldFaces.size() + << " estimated new size " << newFaceLabels.size() << endl; + + // Get reverse face map + const labelList& reverseFaceMap = mpm_.reverseFaceMap(); + + // Pick up live old faces + forAll (oldFaces, faceI) + { + if (reverseFaceMap[oldFaces[faceI]] > -1) + { + // Face is live, add it and record addressing + newFaceLabels[nNewFaces] = reverseFaceMap[oldFaces[faceI]]; + newFaceLabelsMap[nNewFaces] = faceI; + + nNewFaces++; + } + } + + // Assemble the maps + if (direct()) + { + Info<< "Direct"<< endl; + // Direct mapping: no further faces to add. Resize list + newFaceLabels.setSize(nNewFaces); + + directAddrPtr_ = new labelList(newFaceLabels.size()); + labelList& addr = *directAddrPtr_; + + // Adjust for creation of a boundary face from an internal face + forAll (addr, faceI) + { + if (newFaceLabelsMap[faceI] < oldNInternal) + { + addr[faceI] = 0; + } + else + { + addr[faceI] = newFaceLabelsMap[faceI]; + } + } + } + else + { + // There are further faces to add. Prepare interpolation addressing + // and weights to full size + interpolationAddrPtr_ = new labelListList(newFaceLabels.size()); + labelListList& addr = *interpolationAddrPtr_; + + weightsPtr_ = new scalarListList(newFaceLabels.size()); + scalarListList& w = *weightsPtr_; + + // Insert single addressing and weights + for (label addrI = 0; addrI < nNewFaces; addrI++) + { + addr[addrI] = labelList(1, newFaceLabelsMap[addrI]); + w[addrI] = scalarList(1, scalar(1)); + } + + // Pick up faces from points, edges and faces where the origin + // Only map from faces which were previously in the faMesh, using + // fast lookup + + // Set of faces previously in the mesh + labelHashSet oldFaceLookup(oldFaces); + + // Go through faces-from lists and add the ones where all + // old face labels belonged to the faMesh + + const List<objectMap>& ffp = mpm_.facesFromPointsMap(); + + forAll (ffp, ffpI) + { + // Get addressing + const labelList& mo = ffp[ffpI].masterObjects(); + + // Check if master objects are in faMesh + labelList validMo(mo.size()); + label nValidMo = 0; + + forAll (mo, moI) + { + if (oldFaceLookup.found(mo[moI])) + { + validMo[nValidMo] = oldFaceLookup[mo[moI]]; + nValidMo++; + } + } + + if (nValidMo > 0) + { + // Some objects found: add face and interpolation to list + newFaceLabels[nNewFaces] = ffp[ffpI].index(); + + // No old face available + newFaceLabelsMap[nNewFaces] = -1; + + // Map from masters, uniform weights + addr[nNewFaces] = validMo; + w[nNewFaces] = scalarList(validMo.size(), 1.0/validMo.size()); + + nNewFaces++; + } + } + + const List<objectMap>& ffe = mpm_.facesFromEdgesMap(); + + forAll (ffe, ffeI) + { + // Get addressing + const labelList& mo = ffe[ffeI].masterObjects(); + + // Check if master objects are in faMesh + labelList validMo(mo.size()); + label nValidMo = 0; + + forAll (mo, moI) + { + if (oldFaceLookup.found(mo[moI])) + { + validMo[nValidMo] = oldFaceLookup[mo[moI]]; + nValidMo++; + } + } + + if (nValidMo > 0) + { + // Some objects found: add face and interpolation to list + newFaceLabels[nNewFaces] = ffe[ffeI].index(); + + // No old face available + newFaceLabelsMap[nNewFaces] = -1; + + // Map from masters, uniform weights + addr[nNewFaces] = validMo; + w[nNewFaces] = scalarList(validMo.size(), 1.0/validMo.size()); + + nNewFaces++; + } + } + + const List<objectMap>& fff = mpm_.facesFromFacesMap(); + + forAll (fff, fffI) + { + // Get addressing + const labelList& mo = fff[fffI].masterObjects(); + + // Check if master objects are in faMesh + labelList validMo(mo.size()); + label nValidMo = 0; + + forAll (mo, moI) + { + if (oldFaceLookup.found(mo[moI])) + { + validMo[nValidMo] = oldFaceLookup[mo[moI]]; + nValidMo++; + } + } + + if (nValidMo > 0) + { + // Some objects found: add face and interpolation to list + newFaceLabels[nNewFaces] = fff[fffI].index(); + + // No old face available + newFaceLabelsMap[nNewFaces] = -1; + + // Map from masters, uniform weights + addr[nNewFaces] = validMo; + w[nNewFaces] = scalarList(validMo.size(), 1.0/validMo.size()); + + nNewFaces++; + } + } + + // All faces collected. Reset sizes of lists + newFaceLabels.setSize(nNewFaces); + newFaceLabelsMap.setSize(nNewFaces); + addr.setSize(nNewFaces); + w.setSize(nNewFaces); + Info<< "addr: " << addr << nl + << "w: " << w << endl; + } + + // Inserted objects cannot appear in the new faMesh as they have no master + // HJ, 10/Aug/2011 + insertedObjectLabelsPtr_ = new labelList(0); +} + + +void Foam::faAreaMapper::clearOut() +{ + deleteDemandDrivenData(newFaceLabelsPtr_); + deleteDemandDrivenData(newFaceLabelsMapPtr_); + + deleteDemandDrivenData(directAddrPtr_); + deleteDemandDrivenData(interpolationAddrPtr_); + deleteDemandDrivenData(weightsPtr_); + + deleteDemandDrivenData(insertedObjectLabelsPtr_); + hasUnmapped_ = false; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +Foam::faAreaMapper::faAreaMapper +( + const faMesh& mesh, + const mapPolyMesh& mpm +) +: + mesh_(mesh), + mpm_(mpm), + insertedFaces_(false), + direct_(false), + hasUnmapped_(false), + sizeBeforeMapping_(mesh.nFaces()), + newFaceLabelsPtr_(NULL), + newFaceLabelsMapPtr_(NULL), + directAddrPtr_(NULL), + interpolationAddrPtr_(NULL), + weightsPtr_(NULL), + insertedObjectLabelsPtr_(NULL) +{ + // Check for possibility of direct mapping + if + ( + mpm_.facesFromPointsMap().empty() + && mpm_.facesFromEdgesMap().empty() + && mpm_.facesFromFacesMap().empty() + ) + { + direct_ = true; + } + else + { + direct_ = false; + } + + // Inserted objects not suported: no master + // HJ, 10/Aug/2011 +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::faAreaMapper::~faAreaMapper() +{ + clearOut(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::labelList& Foam::faAreaMapper::newFaceLabels() const +{ + if (!newFaceLabelsPtr_) + { + calcAddressing(); + } + + return *newFaceLabelsPtr_; +} + + +const Foam::labelList& Foam::faAreaMapper::newFaceLabelsMap() const +{ + if (!newFaceLabelsMapPtr_) + { + calcAddressing(); + } + + return *newFaceLabelsMapPtr_; +} + + +const Foam::labelUList& Foam::faAreaMapper::directAddressing() const +{ + if (!direct()) + { + FatalErrorIn + ( + "const labelUList& faAreaMapper::" + "directAddressing() const" + ) << "Requested direct addressing for an interpolative mapper." + << abort(FatalError); + } + + if (!directAddrPtr_) + { + calcAddressing(); + } + + return *directAddrPtr_; +} + + +const Foam::labelListList& Foam::faAreaMapper::addressing() const +{ + if (direct()) + { + FatalErrorIn + ( + "const labelListList& faAreaMapper::addressing() const" + ) << "Requested interpolative addressing for a direct mapper." + << abort(FatalError); + } + + if (!interpolationAddrPtr_) + { + calcAddressing(); + } + + return *interpolationAddrPtr_; +} + + +const Foam::scalarListList& Foam::faAreaMapper::weights() const +{ + if (direct()) + { + FatalErrorIn + ( + "const scalarListList& faAreaMapper::weights() const" + ) << "Requested interpolative weights for a direct mapper." + << abort(FatalError); + } + + if (!weightsPtr_) + { + calcAddressing(); + } + + return *weightsPtr_; +} + + +const Foam::labelList& Foam::faAreaMapper::insertedObjectLabels() const +{ + if (!insertedObjectLabelsPtr_) + { + calcAddressing(); + } + + return *insertedObjectLabelsPtr_; +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H new file mode 100644 index 0000000000000000000000000000000000000000..6e1f23803bf00847ff6647078846ea12f0326666 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.H @@ -0,0 +1,200 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::faAreaMapper + +Description + FA area mapper. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faAreaMapper.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faAreaMapper_H +#define faAreaMapper_H + +#include "morphFieldMapper.H" +#include "faMesh.H" +#include "faceMapper.H" +#include "HashSet.H" +#include "mapPolyMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faAreaMapper Declaration +\*---------------------------------------------------------------------------*/ + +class faAreaMapper +: + public morphFieldMapper +{ + // Private data + + //- Reference to mesh mapper + const faMesh& mesh_; + + //- Reference to mapPolyMesh + const mapPolyMesh& mpm_; + + //- Are there any inserted (unmapped) faces + bool insertedFaces_; + + //- Is the mapping direct + bool direct_; + + + // Demand-driven private data + + mutable bool hasUnmapped_; + + //- Old mesh size + label sizeBeforeMapping_; + + //- New face labels after mapping + mutable labelList* newFaceLabelsPtr_; + + //- New face labels after mapping + mutable labelList* newFaceLabelsMapPtr_; + + + //- Direct addressing (only one form of addressing is used) + mutable labelList* directAddrPtr_; + + //- Interpolated addressing (only one form of addressing is used) + mutable labelListList* interpolationAddrPtr_; + + //- Interpolation weights + mutable scalarListList* weightsPtr_; + + //- Inserted faces + mutable labelList* insertedObjectLabelsPtr_; + + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faAreaMapper(const faAreaMapper&); + + //- Disallow default bitwise assignment + void operator=(const faAreaMapper&); + + + //- Calculate addressing + void calcAddressing() const; + + //- Clear out local storage + void clearOut(); + + +public: + + // Constructors + + //- Construct from components + faAreaMapper + ( + const faMesh& mesh, + const mapPolyMesh& mpm + ); + + + // Destructor + + virtual ~faAreaMapper(); + + + // Member Functions + + //- Return new face labels + const labelList& newFaceLabels() const; + + //- Return new face labels map + // For new faces return old face index if it exists + // If the face has been added, index will be -1 + const labelList& newFaceLabelsMap() const; + + //- Return size + virtual label size() const + { + return newFaceLabels().size(); + } + + //- Return size of field before mapping + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + //- Is the mapping direct + virtual bool direct() const + { + return direct_; + } + + virtual bool hasUnmapped() const + { + return hasUnmapped_; + } + + //- Return direct addressing + virtual const labelUList& directAddressing() const; + + //- Return interpolated addressing + virtual const labelListList& addressing() const; + + //- Return interpolaion weights + virtual const scalarListList& weights() const; + + //- Are there any inserted faces + virtual bool insertedObjects() const + { + return !insertedObjectLabels().empty(); + } + + //- Return list of inserted faces + virtual const labelList& insertedObjectLabels() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H b/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H new file mode 100644 index 0000000000000000000000000000000000000000..c3f2937df8fa147f408025e05c8fa795436c5101 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faBoundaryMeshMapper.H @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::faBoundaryMeshMapper + +Description + Foam::faBoundaryMeshMapper + +\*---------------------------------------------------------------------------*/ + +#ifndef faBoundaryMeshMapper_H +#define faBoundaryMeshMapper_H + +#include "PtrList.H" +#include "faPatchMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faBoundaryMeshMapper Declaration +\*---------------------------------------------------------------------------*/ + +class faBoundaryMeshMapper +: + public PtrList<faPatchMapper> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + faBoundaryMeshMapper(const faBoundaryMeshMapper&); + + //- Disallow default bitwise assignment + void operator=(const faBoundaryMeshMapper&); + + +public: + + // Constructors + + //- Construct from components + faBoundaryMeshMapper + ( + const faMesh& mesh, + const mapPolyMesh& mpm + ) + : + PtrList<faPatchMapper>(mesh.boundary().size()) + { + const faBoundaryMesh& patches = mesh.boundary(); + + forAll (patches, patchI) + { + set + ( + patchI, + new faPatchMapper + ( + patches[patchI], + mpm + ) + ); + } + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C new file mode 100644 index 0000000000000000000000000000000000000000..5a3a7837d91c10f2896629c89f091618d35aa795 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + FV edge mapper. + +\*---------------------------------------------------------------------------*/ + +#include "faEdgeMapper.H" +#include "mapPolyMesh.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::faEdgeMapper::calcAddressing() const +{ + if (directAddrPtr_) + { + FatalErrorIn("void faEdgeMapper::calcAddressing() const)") + << "Addressing already calculated" + << abort(FatalError); + } + + hasUnmapped_ = false; + + // Dummy mapping: take value from edge 0 + directAddrPtr_ = new labelList(size(), 0); +} + + +void Foam::faEdgeMapper::clearOut() +{ + deleteDemandDrivenData(directAddrPtr_); + hasUnmapped_ = false; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +Foam::faEdgeMapper::faEdgeMapper +( + const faMesh& mesh, + const mapPolyMesh& mpm +) +: + mesh_(mesh), + mpm_(mpm), + sizeBeforeMapping_(mesh.nInternalEdges()), + hasUnmapped_(false), + directAddrPtr_(NULL) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::faEdgeMapper::~faEdgeMapper() +{ + clearOut(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::labelUList& Foam::faEdgeMapper::directAddressing() const +{ + if (!directAddrPtr_) + { + calcAddressing(); + } + + return *directAddrPtr_; +} + + +const Foam::labelListList& Foam::faEdgeMapper::addressing() const +{ + FatalErrorIn + ( + "const labelListList& faEdgeMapper::addressing() const" + ) << "Requested interpolative addressing for a direct mapper." + << abort(FatalError); + + return labelListList::null(); +} + + +const Foam::scalarListList& Foam::faEdgeMapper::weights() const +{ + FatalErrorIn + ( + "const scalarListList& faEdgeMapper::weights() const" + ) << "Requested interpolative weights for a direct mapper." + << abort(FatalError); + + return scalarListList::null(); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H new file mode 100644 index 0000000000000000000000000000000000000000..c95c2273c49df2b54808906c4e37068f1b5860cc --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.H @@ -0,0 +1,173 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::faEdgeMapper + +Description + FA edge mapper. Currently, edge-based finite area data is not mapped, + but only resized, since edge-based mapping data is not available + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faEdgeMapper.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faEdgeMapper_H +#define faEdgeMapper_H + +#include "morphFieldMapper.H" +#include "faMesh.H" +#include "faceMapper.H" +#include "HashSet.H" +#include "mapPolyMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faEdgeMapper Declaration +\*---------------------------------------------------------------------------*/ + +class faEdgeMapper +: + public morphFieldMapper +{ + // Private data + + //- Reference to mesh + const faMesh& mesh_; + + //- Reference to mapPolyMesh + const mapPolyMesh& mpm_; + + //- Old mesh size + label sizeBeforeMapping_; + + + // Demand-driven private data + + mutable bool hasUnmapped_; + + //- Direct addressing + mutable labelList* directAddrPtr_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faEdgeMapper(const faEdgeMapper&); + + //- Disallow default bitwise assignment + void operator=(const faEdgeMapper&); + + + //- Calculate addressing + void calcAddressing() const; + + //- Clear out local storage + void clearOut(); + + +public: + + // Constructors + + //- Construct from components + faEdgeMapper + ( + const faMesh& mesh, + const mapPolyMesh& mpm + ); + + + // Destructor + + virtual ~faEdgeMapper(); + + + // Member Functions + + //- Return size + virtual label size() const + { + return mesh_.nInternalEdges(); + } + + //- Return size of field before mapping + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + //- Is the mapping direct + virtual bool direct() const + { + return true; + } + + virtual bool hasUnmapped() const + { + return hasUnmapped_; + } + + //- Return direct addressing + virtual const labelUList& directAddressing() const; + + //- Return interpolated addressing + virtual const labelListList& addressing() const; + + //- Return interpolaion weights + virtual const scalarListList& weights() const; + + //- Are there any inserted faces + virtual bool insertedObjects() const + { + return false; + } + + //- Return list of inserted faces + virtual const labelList& insertedObjectLabels() const + { + return labelList::null(); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faMeshMapper.C b/src/finiteArea/faMesh/faMeshMapper/faMeshMapper.C new file mode 100644 index 0000000000000000000000000000000000000000..a1c12352fc4bf541c3dd279542f611acf2006821 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faMeshMapper.C @@ -0,0 +1,66 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faMeshMapper.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faMeshMapper::faMeshMapper +( + const faMesh& mesh, + const mapPolyMesh& mpm +) +: + mesh_(mesh), + nOldPoints_(mesh.nPoints()), + nOldEdges_(mesh.nEdges()), + nOldInternalEdges_(mesh.nInternalEdges()), + nOldFaces_(mesh.nFaces()), + oldPatchSizes_(mesh.boundary().size(), 0), + oldPatchStarts_(mesh.boundary().size(), -1), + oldPatchEdgeFaces_(mesh.boundary().size()), + areaMap_(mesh, mpm), + edgeMap_(mesh, mpm), + boundaryMap_(mesh, mpm) +{ + // Capture old patch information + const faBoundaryMesh& patches = mesh.boundary(); + + forAll (patches, patchI) + { + oldPatchSizes_[patchI] = patches[patchI].size(); + oldPatchStarts_[patchI] = patches[patchI].start(); + + oldPatchEdgeFaces_[patchI] = patches[patchI].edgeFaces(); + } +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faMeshMapper.H b/src/finiteArea/faMesh/faMeshMapper/faMeshMapper.H new file mode 100644 index 0000000000000000000000000000000000000000..529b60c0623ffaddb9a9bf5b32eb7352262954f4 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faMeshMapper.H @@ -0,0 +1,221 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::faMeshMapper + +Description + Class holds all the necessary information for mapping fields associated + with faMesh + +Note + In order to capture all necessary mesh sizes and mapping data, mapper + is created with the OLD mesh, and provides new mesh data. + In the process, field mapping information is assembled from the old faMesh + and the mapping data + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faMeshMapper.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faMeshMapper_H +#define faMeshMapper_H + +#include "faceMapper.H" +#include "faAreaMapper.H" +#include "faEdgeMapper.H" +#include "faBoundaryMeshMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class faMesh; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class faMeshMapper Declaration +\*---------------------------------------------------------------------------*/ + +class faMeshMapper +{ + // Private data + + //- Reference to mesh + const faMesh& mesh_; + + + // Old mesh data + + //- Number of old points + label nOldPoints_; + + //- Number of old edges + label nOldEdges_; + + //- Number of old internal edges + label nOldInternalEdges_; + + //- Number of old faces + label nOldFaces_; + + //- Old patch sizes + labelList oldPatchSizes_; + + //- Old patch starts + labelList oldPatchStarts_; + + //- Old patch edgeFaces + labelListList oldPatchEdgeFaces_; + + + // Mappers + + //- Area mapper + faAreaMapper areaMap_; + + //- Edge mapper + faEdgeMapper edgeMap_; + + //- Boundary mapper + faBoundaryMeshMapper boundaryMap_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faMeshMapper(const faMeshMapper&); + + //- Disallow default bitwise assignment + void operator=(const faMeshMapper&); + + +public: + + // Constructors + + //- Construct from components + faMeshMapper(const faMesh& mesh, const mapPolyMesh& mpm); + + + // Member Functions + + //- Return reference to mesh + const faMesh& mesh() const + { + return mesh_; + } + + //- Return reference to objectRegistry storing fields. Can be + // removed once fields stored on pointMesh. + const objectRegistry& thisDb() const + { + return mesh_.thisDb(); + } + + + // Basic sizing information + + //- Return number of old points + label nOldPoints() const + { + return nOldPoints_; + } + + //- Return number of old edges + label nOldEdges() const + { + return nOldEdges_; + }; + + //- Return number of old internal edges + label nOldInternalEdges() const + { + return nOldInternalEdges_; + }; + + //- Return number of old faces + label nOldFaces() const + { + return nOldFaces_; + }; + + //- Return old patch sizes + const labelList& oldPatchSizes() const + { + return oldPatchSizes_; + }; + + //- Return old patch starts + const labelList& oldPatchStarts() const + { + return oldPatchStarts_; + }; + + //- Return old patch edgeFaces + const labelListList& oldPatchEdgeFaces() const + { + return oldPatchEdgeFaces_; + }; + + + // Mappers + + //- Return surface mapper + const faAreaMapper& areaMap() const + { + return areaMap_; + } + + //- Return edge mapper + const faEdgeMapper& edgeMap() const + { + return edgeMap_; + } + + //- Return boundary mapper + const faBoundaryMeshMapper& boundaryMap() const + { + return boundaryMap_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C b/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C new file mode 100644 index 0000000000000000000000000000000000000000..4d9142f37bc869829856605248e69cf9c26afe1c --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C @@ -0,0 +1,162 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faPatchMapper.H" +#include "faPatch.H" +#include "faBoundaryMesh.H" +#include "faMesh.H" +#include "mapPolyMesh.H" +#include "faceMapper.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::faPatchMapper::calcAddressing() const +{ + if (directAddrPtr_) + { + FatalErrorIn + ( + "void faPatchMapper::calcAddressing() const)" + ) << "Addressing already calculated" + << abort(FatalError); + } + + // Compatibility change HJ, 12/Aug/2017 + hasUnmapped_ = false; + + directAddrPtr_ = new labelList(patch_.size(), 0); + labelList& addr = *directAddrPtr_; + + // Make a map of old edgeFaces, giving edge index in patch given the new + // face label next to the patch + + // Create edge index lookup + Map<label> edgeIndexLookup; + + const labelList& reverseFaceMap = mpm_.reverseFaceMap(); + + forAll (oldEdgeFaces_, oefI) + { + if (reverseFaceMap[oldEdgeFaces_[oefI]] > -1) + { + // Face has survived. Insert its label under new face index + edgeIndexLookup.insert(reverseFaceMap[oldEdgeFaces_[oefI]], oefI); + } + } + + // Go through new edgeFaces and for each edge try to locate old index + const labelList& ef = patch_.edgeFaces(); + + forAll (ef, efI) + { + if (edgeIndexLookup.found(ef[efI])) + { + addr[efI] = edgeIndexLookup[ef[efI]]; + } + else + { + // Not found: map from zero + addr[efI] = 0; + + // Compatibility change HJ, 12/Aug/2017 + hasUnmapped_ = true; + } + } +} + + +void Foam::faPatchMapper::clearOut() +{ + deleteDemandDrivenData(directAddrPtr_); + hasUnmapped_ = false; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +Foam::faPatchMapper::faPatchMapper +( + const faPatch& patch, + const mapPolyMesh& mpm +) +: + patch_(patch), + mpm_(mpm), + sizeBeforeMapping_(patch.size()), + oldEdgeFaces_(patch.edgeFaces()), + hasUnmapped_(false), + directAddrPtr_(NULL) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::faPatchMapper::~faPatchMapper() +{ + clearOut(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::labelUList& Foam::faPatchMapper::directAddressing() const +{ + if (!directAddrPtr_) + { + calcAddressing(); + } + + return *directAddrPtr_; +} + + +const Foam::labelListList& Foam::faPatchMapper::addressing() const +{ + FatalErrorIn + ( + "const labelListList& faPatchMapper::addressing() const" + ) << "Requested interpolative addressing for a direct mapper." + << abort(FatalError); + + return labelListList::null(); +} + + +const Foam::scalarListList& Foam::faPatchMapper::weights() const +{ + FatalErrorIn + ( + "const scalarListList& faPatchMapper::weights() const" + ) << "Requested interpolative weights for a direct mapper." + << abort(FatalError); + + return scalarListList::null(); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.H b/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.H new file mode 100644 index 0000000000000000000000000000000000000000..bcc6e0dd3dc022009aa49f5b108178a1ee44134f --- /dev/null +++ b/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.H @@ -0,0 +1,166 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::faPatchMapper + +Description + Mapping class for a faPatchField. Edge mapping is calculated based on + faceCells comparison of old and new patch + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faPatchMapper.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchMapper_H +#define faPatchMapper_H + +#include "faPatchFieldMapper.H" +#include "faceMapper.H" +#include "faPatch.H" +#include "primitiveFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes +class faPatch; +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class faPatchMapper Declaration +\*---------------------------------------------------------------------------*/ + +class faPatchMapper +: + public faPatchFieldMapper +{ + // Private data + + //- Reference to patch + const faPatch& patch_; + + //- Reference to mapPolyMesh + const mapPolyMesh& mpm_; + + //- Size before mapping + const label sizeBeforeMapping_; + + //- faceCells before mapping + const labelList oldEdgeFaces_; + + + // Demand-driven private data + + mutable bool hasUnmapped_; + + //- Direct addressing + mutable labelList* directAddrPtr_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faPatchMapper(const faPatchMapper&); + + //- Disallow default bitwise assignment + void operator=(const faPatchMapper&); + + + //- Calculate addressing for mapping with inserted cells + void calcAddressing() const; + + //- Clear out local storage + void clearOut(); + + +public: + + // Constructors + + //- Construct from mappers + faPatchMapper + ( + const faPatch& patch, + const mapPolyMesh& mpm + ); + + + // Destructor + virtual ~faPatchMapper(); + + + // Member Functions + + //- Return size + virtual label size() const + { + return patch_.size(); + } + + //- Return size of field before mapping + virtual label sizeBeforeMapping() const + { + return sizeBeforeMapping_; + } + + //- Is the mapping direct + virtual bool direct() const + { + return true; + } + + virtual bool hasUnmapped() const + { + return hasUnmapped_; + } + + //- Return direct addressing + virtual const labelUList& directAddressing() const; + + //- Return interpolated addressing + virtual const labelListList& addressing() const; + + //- Return interpolaion weights + virtual const scalarListList& weights() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faMeshUpdate.C b/src/finiteArea/faMesh/faMeshUpdate.C new file mode 100644 index 0000000000000000000000000000000000000000..4af70380672b35f0d68585078081b85bb81de7e9 --- /dev/null +++ b/src/finiteArea/faMesh/faMeshUpdate.C @@ -0,0 +1,246 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "mapPolyMesh.H" +#include "MapFaFields.H" +#include "faMeshMapper.H" +#include "areaFields.H" +#include "edgeFields.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::faMesh::updateMesh(const mapPolyMesh& mpm) +{ + if (debug) + { + Info<< "bool faMesh::updateMesh(const mapPolyMesh& mpm) : " + << "Updating mesh" << endl; + } + + // if (!mpm.morphing()) + // { + // // No topo change + // return false; + // } + + // Create fa mesh mapper, using the old mesh + const faMeshMapper mapper(*this, mpm); + + + // Rebuild mesh + + // Cast away const for interface reasons. HJ, 12/Aug/2011 + faMesh& m = const_cast<faMesh&>(*this); + + + // Clear existing mesh data + clearOut(); + + // Set new labels + m.faceLabels_ = mapper.areaMap().newFaceLabels(); + + const indirectPrimitivePatch& bp = patch(); + + // Collect patch data + const label nTotalEdges = bp.nEdges(); + const label nInternalEdges = bp.nInternalEdges(); + const labelListList& edgeFaces = bp.edgeFaces(); + + labelListList patchEdges(boundary_.size()); + + // Special handling required for faces that have more than one edge + // Each patch will be visited separately + + labelList edgeToPatch(nTotalEdges - nInternalEdges, -1); + const labelList& newFaceLabelsMap = mapper.areaMap().newFaceLabelsMap(); + + const labelListList& oldPatchEdgeFaces = mapper.oldPatchEdgeFaces(); + + forAll (oldPatchEdgeFaces, patchI) + { + labelList& curPatchEdges = patchEdges[patchI]; + curPatchEdges.setSize(nTotalEdges - nInternalEdges); + label nCurPatchEdges = 0; + + // Note: it is possible to pick up the old-to-new boundary patch + // mapping, but currently this is not done. HJ, 13/Aug/2011 + + // Make a fast lookup + labelHashSet oldFaceLookup(oldPatchEdgeFaces[patchI]); + + for (label edgeI = nInternalEdges; edgeI < nTotalEdges; edgeI++) + { + if (edgeToPatch[edgeI - nInternalEdges] > -1) + { + // Edge already found; continue with the next one + continue; + } + + // Boundary edges will only have one face next to them + const label oldFaceIndex = newFaceLabelsMap[edgeFaces[edgeI][0]]; + + if (oldFaceIndex > -1) + { + // Old face exists. See if it has got an edge in this patch + if (oldFaceLookup.found(oldFaceIndex)) + { + // Face found, add it to the patch + curPatchEdges[nCurPatchEdges] = edgeI; + nCurPatchEdges++; + + edgeToPatch[edgeI - nInternalEdges] = patchI; + } + } + } + + // Collected all faces for the current patch + curPatchEdges.setSize(nCurPatchEdges); + } + + // Set new edges for all patches + forAll (m.boundary_, patchI) + { + m.boundary_[patchI].resetEdges(patchEdges[patchI]); + } + + m.setPrimitiveMeshData(); + + // Create global mesh data + if (Pstream::parRun()) + { + globalData(); + } + + // Calculate topology for the patches (processor-processor comms etc.) + m.boundary_.updateMesh(); + + // Calculate the geometry for the patches (transformation tensors etc.) + m.boundary_.calcGeometry(); + + + // Map fields + mapFields(mapper); + + // Map old areas + mapOldAreas(mapper); + + // Update edge interpolation + edgeInterpolation::movePoints(); + + return; +} + + +void Foam::faMesh::mapFields(const faMeshMapper& mapper) const +{ + // Map all the areaFields in the objectRegistry + MapGeometricFields<scalar, faPatchField, faMeshMapper, areaMesh>(mapper); + MapGeometricFields<vector, faPatchField, faMeshMapper, areaMesh>(mapper); + MapGeometricFields<sphericalTensor, faPatchField, faMeshMapper, areaMesh> + (mapper); + MapGeometricFields<symmTensor, faPatchField, faMeshMapper, areaMesh> + (mapper); + MapGeometricFields<tensor, faPatchField, faMeshMapper, areaMesh>(mapper); + + // Map all the edgeFields in the objectRegistry + MapGeometricFields<scalar, faePatchField, faMeshMapper, edgeMesh>(mapper); + MapGeometricFields<vector, faePatchField, faMeshMapper, edgeMesh>(mapper); + MapGeometricFields<sphericalTensor, faePatchField, faMeshMapper, edgeMesh> + (mapper); + MapGeometricFields<symmTensor, faePatchField, faMeshMapper, edgeMesh> + (mapper); + MapGeometricFields<tensor, faePatchField, faMeshMapper, edgeMesh>(mapper); +} + + +void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const +{ + if (S0Ptr_) + { + if (debug) + { + InfoIn("void faMesh::mapOldAreas(const faMeshMapper& mapper)") + << "Mapping old face areas." << endl; + } + + scalarField& S0 = *S0Ptr_; + + scalarField savedS0(S0); + S0.setSize(nFaces()); + + const labelList& faceMap = mapper.areaMap().newFaceLabelsMap(); + + // Map existing old areas; for new faces set area to zero + forAll (faceMap, faceI) + { + if (faceMap[faceI] > -1) + { + S0[faceI] = savedS0[faceMap[faceI]]; + } + else + { + S0[faceI] = 0; + } + } + } + + if (S00Ptr_) + { + if (debug) + { + InfoIn("void faMesh::mapOldAreas(const faMeshMapper& mapper)") + << "Mapping old-old face areas." << endl; + } + + scalarField& S00 = *S00Ptr_; + + scalarField savedS00(S00); + S00.setSize(nFaces()); + + const labelList& faceMap = mapper.areaMap().newFaceLabelsMap(); + + // Map old areas for existing faces; for new faces, set area to zero + forAll (faceMap, faceI) + { + if (faceMap[faceI] > -1) + { + S00[faceI] = savedS00[faceMap[faceI]]; + } + else + { + S00[faceI] = 0; + } + } + } + +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/basic/coupled/coupledFaPatch.C b/src/finiteArea/faMesh/faPatches/basic/coupled/coupledFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..bff34eab7a1796dc241cb760cac87170835ef617 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/basic/coupled/coupledFaPatch.C @@ -0,0 +1,132 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "coupledFaPatch.H" +#include "transform.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(coupledFaPatch, 0); + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +void coupledFaPatch::calcTransformTensors +( + const vector& Cf, + const vector& Cr, + const vector& nf, + const vector& nr +) const +{ + if (mag(nf & nr) < 1 - SMALL) + { + separation_.setSize(0); + + forwardT_ = tensorField(1, rotationTensor(-nr, nf)); + reverseT_ = tensorField(1, rotationTensor(nf, -nr)); + } + else + { + forwardT_.setSize(0); + reverseT_.setSize(0); + + vector separation = (nf & (Cr - Cf))*nf; + + if (mag(separation) > SMALL) + { + separation_ = vectorField(1, separation); + } + else + { + separation_.setSize(0); + } + } +} + + +void coupledFaPatch::calcTransformTensors +( + const vectorField& Cf, + const vectorField& Cr, + const vectorField& nf, + const vectorField& nr +) const +{ + if (sum(mag(nf & nr)) < Cf.size() - SMALL) + { + separation_.setSize(0); + + forwardT_.setSize(size()); + reverseT_.setSize(size()); + + forAll (forwardT_, facei) + { + forwardT_[facei] = rotationTensor(-nr[facei], nf[facei]); + reverseT_[facei] = rotationTensor(nf[facei], -nr[facei]); + } + + if (sum(mag(forwardT_ - forwardT_[0])) < SMALL) + { + forwardT_.setSize(1); + reverseT_.setSize(1); + } + } + else + { + forwardT_.setSize(0); + reverseT_.setSize(0); + + separation_ = (nf&(Cr - Cf))*nf; + + if (sum(mag(separation_)) < SMALL) + { + separation_.setSize(0); + } + else if (sum(mag(separation_ - separation_[0])) < SMALL) + { + separation_.setSize(1); + } + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +coupledFaPatch::~coupledFaPatch() +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/basic/coupled/coupledFaPatch.H b/src/finiteArea/faMesh/faPatches/basic/coupled/coupledFaPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..43bd4198e336e3752459856a8df10b67fb69213a --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/basic/coupled/coupledFaPatch.H @@ -0,0 +1,279 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + coupledFaPatch + +Author + Zeljko Tukovic and Hrvoje Jasak + +Description + coupledFaPatch is an abstract base class for patches that couple regions + of the computational domain e.g. cyclic, arbitrary interfaces, sliding + interfaces and processor-processor links. + +SourceFiles + coupledFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaPatch_H +#define coupledFaPatch_H + +#include "lduInterface.H" +#include "faPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class coupledFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class coupledFaPatch +: + public lduInterface, + public faPatch +{ + // Private data + + //- offset (distance) vector from one side of the couple to the other + mutable vectorField separation_; + + //- Face transformation tensor + mutable tensorField forwardT_; + + //- Neighbour-cell transformation tensor + mutable tensorField reverseT_; + + +protected: + + // Protected Member Functions + + //- Make patch weighting factors + virtual void makeWeights(scalarField&) const = 0; + + //- Make patch face - neighbour cell distances + virtual void makeDeltaCoeffs(scalarField&) const = 0; + + //- Calculate the uniform transformation tensors + void calcTransformTensors + ( + const vector& Cf, + const vector& Cr, + const vector& nf, + const vector& nr + ) const; + + //- Calculate the transformation tensors + void calcTransformTensors + ( + const vectorField& Cf, + const vectorField& Cr, + const vectorField& nf, + const vectorField& nr + ) const; + + +public: + + //- Runtime type information + TypeName("coupled"); + + + // Constructors + + //- Construct from components + coupledFaPatch + ( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex + ) + : + faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex) + {} + + //- Construct from dictionary + coupledFaPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ) + : + faPatch(name, dict, index, bm) + {} + + + //- Destructor + virtual ~coupledFaPatch(); + + + // Member Functions + + // Access + + //- Return true because this patch is coupled + virtual bool coupled() const + { + return true; + } + + + //- Are the coupled planes separated + bool separated() const + { + return separation_.size(); + } + + //- Return the offset (distance) vector from one side of the couple + // to the other + const vectorField& separation() const + { + if (!separation_.size()) + { + FatalErrorIn("coupledFaPatch::separation() const") + << "Coupled patches are not separated" + << abort(FatalError); + } + + return separation_; + } + + //- Return face transformation tensor + const tensorField& forwardT() const + { + if (!forwardT_.size()) + { + FatalErrorIn("coupledFaPatch::forwardT() const") + << "Coupled planes do not need transformation" + << abort(FatalError); + } + + return forwardT_; + } + + //- Return neighbour-cell transformation tensor + const tensorField& reverseT() const + { + if (!reverseT_.size()) + { + FatalErrorIn("coupledFaPatch::forwardT() const") + << "Coupled planes do not need transformation" + << abort(FatalError); + } + + return reverseT_; + } + + //- Are the cyclic planes parallel + bool parallel() const + { + return forwardT_.size() == 0; + } + + + //- Initialise the calculation of the patch geometry + virtual void initGeometry() = 0; + + //- Calculate the patch geometry + virtual void calcGeometry() = 0; + + //- Initialise the patches for moving points + virtual void initMovePoints(const pointField&) = 0; + + //- Correct patches after moving points + virtual void movePoints(const pointField&) = 0; + + + // Access functions for demand driven data + + //- Return delta (P to N) vectors across coupled patch + virtual tmp<vectorField> delta() const = 0; + + + // Interface transfer functions + + //- Return faceCell addressing: lduInterface virtual function + virtual const labelUList& faceCells() const + { + return edgeFaces(); + } + + //- Return the values of the given internal data adjacent to + // the interface as a field + virtual tmp<labelField> interfaceInternalField + ( + const labelUList& internalData + ) const = 0; + + //- Initialise interface data transfer + virtual void initTransfer + ( + const Pstream::commsTypes commsType, + const labelUList& interfaceData + ) const + {} + + //- Transfer and return neighbour field + virtual tmp<labelField> transfer + ( + const Pstream::commsTypes commsType, + const labelUList& interfaceData + ) const = 0; + + //- Initialise neighbour field transfer + virtual void initInternalFieldTransfer + ( + const Pstream::commsTypes commsType, + labelUList& iF + ) const + {} + + //- Return neighbour field + virtual tmp<labelField> internalFieldTransfer + ( + const Pstream::commsTypes commsType, + const labelUList& iF + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/cyclic/cyclicFaPatch.C b/src/finiteArea/faMesh/faPatches/constraint/cyclic/cyclicFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..5156c97e2d04e373a87395a442795b57b33af9f6 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/cyclic/cyclicFaPatch.C @@ -0,0 +1,356 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "cyclicFaPatch.H" +#include "coupledPolyPatch.H" +#include "addToRunTimeSelectionTable.H" +#include "transform.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(cyclicFaPatch, 0); +addToRunTimeSelectionTable(faPatch, cyclicFaPatch, dictionary); + +const Foam::scalar cyclicFaPatch::matchTol_ = 1e-3; + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::cyclicFaPatch::calcTransforms() +{ + if (size() > 0) + { + pointField half0Ctrs(size()/2); + pointField half1Ctrs(size()/2); + for (label i=0; i<size()/2; i++) + { + half0Ctrs[i] = this->edgeCentres()[i]; + half1Ctrs[i] = this->edgeCentres()[i+size()/2]; + } + + vectorField half0Normals(size()/2); + vectorField half1Normals(size()/2); + + vectorField eN = edgeNormals()*magEdgeLengths(); + + scalar maxMatchError = 0; + label errorEdge = -1; + + for (label edgei = 0; edgei < size()/2; edgei++) + { + half0Normals[edgei] = eN[edgei]; + label nbrEdgei = edgei + size()/2; + half1Normals[edgei] = eN[nbrEdgei]; + + scalar magLe = mag(half0Normals[edgei]); + scalar nbrMagLe = mag(half1Normals[edgei]); + scalar avLe = (magLe + nbrMagLe)/2.0; + + if (magLe < ROOTVSMALL && nbrMagLe < ROOTVSMALL) + { + // Undetermined normal. Use dummy normal to force separation + // check. (note use of sqrt(VSMALL) since that is how mag + // scales) + half0Normals[edgei] = point(1, 0, 0); + half1Normals[edgei] = half0Normals[edgei]; + } + else if(mag(magLe - nbrMagLe)/avLe > matchTol_) + { + // Error in area matching. Find largest error + maxMatchError = + Foam::max(maxMatchError, mag(magLe - nbrMagLe)/avLe); + errorEdge = edgei; + } + else + { + half0Normals[edgei] /= magLe; + half1Normals[edgei] /= nbrMagLe; + } + } + + // Check for error in edge matching + if (maxMatchError > matchTol_) + { + label nbrEdgei = errorEdge + size()/2; + scalar magLe = mag(half0Normals[errorEdge]); + scalar nbrMagLe = mag(half1Normals[errorEdge]); + scalar avLe = (magLe + nbrMagLe)/2.0; + + FatalErrorIn + ( + "cyclicFaPatch::calcTransforms()" + ) << "edge " << errorEdge + << " area does not match neighbour " + << nbrEdgei << " by " + << 100*mag(magLe - nbrMagLe)/avLe + << "% -- possible edge ordering problem." << endl + << "patch:" << name() + << " my area:" << magLe + << " neighbour area:" << nbrMagLe + << " matching tolerance:" << matchTol_ + << endl + << "Mesh edge:" << start() + errorEdge + << endl + << "Neighbour edge:" << start() + nbrEdgei + << endl + << "Other errors also exist, only the largest is reported. " + << "Please rerun with cyclic debug flag set" + << " for more information." << exit(FatalError); + } + + // Calculate transformation tensors + calcTransformTensors + ( + half0Ctrs, + half1Ctrs, + half0Normals, + half1Normals + ); + + // Check transformation tensors + if (!parallel()) + { + if (forwardT().size() > 1 || reverseT().size() > 1) + { + SeriousErrorIn + ( + "void cyclicFaPatch::calcTransforms()" + ) << "Transformation tensor is not constant for the cyclic " + << "patch. Please reconsider your setup and definition of " + << "cyclic boundaries." << endl; + } + } + } +} + + +// Make patch weighting factors +void cyclicFaPatch::makeWeights(scalarField& w) const +{ + const scalarField& magL = magEdgeLengths(); + + scalarField deltas = edgeNormals() & faPatch::delta(); + label sizeby2 = deltas.size()/2; + + scalar maxMatchError = 0; + label errorEdge = -1; + + for (label edgei = 0; edgei < sizeby2; edgei++) + { + scalar avL = (magL[edgei] + magL[edgei + sizeby2])/2.0; + + if + ( + mag(magL[edgei] - magL[edgei + sizeby2])/avL + > matchTol_ + ) + { + // Found error. Look for largest matching error + maxMatchError = + Foam::max + ( + maxMatchError, + mag(magL[edgei] - magL[edgei + sizeby2])/avL + ); + + errorEdge = edgei; + } + + scalar di = deltas[edgei]; + scalar dni = deltas[edgei + sizeby2]; + + w[edgei] = dni/(di + dni); + w[edgei + sizeby2] = 1 - w[edgei]; + } + + // Check for error in matching + if (maxMatchError > matchTol_) + { + scalar avL = (magL[errorEdge] + magL[errorEdge + sizeby2])/2.0; + + FatalErrorIn("cyclicFaPatch::makeWeights(scalarField& w) const") + << "edge " << errorEdge << " and " << errorEdge + sizeby2 + << " areas do not match by " + << 100*mag(magL[errorEdge] - magL[errorEdge + sizeby2])/avL + << "% -- possible edge ordering problem." << nl + << "Cyclic area match tolerance = " + << matchTol_ << " patch: " << name() + << abort(FatalError); + } +} + + +// Make patch edge - neighbour cell distances +void cyclicFaPatch::makeDeltaCoeffs(scalarField& dc) const +{ + scalarField deltas = edgeNormals() & faPatch::delta(); + label sizeby2 = deltas.size()/2; + + for (label edgei = 0; edgei < sizeby2; edgei++) + { + scalar di = deltas[edgei]; + scalar dni = deltas[edgei + sizeby2]; + + dc[edgei] = 1.0/(di + dni); + dc[edgei + sizeby2] = dc[edgei]; + } +} + + +void Foam::cyclicFaPatch::initGeometry() +{ + faPatch::initGeometry(); +} + + +void Foam::cyclicFaPatch::calcGeometry() +{ + faPatch::calcGeometry(); + calcTransforms(); +} + + +void Foam::cyclicFaPatch::initMovePoints(const pointField& p) +{ + faPatch::initMovePoints(p); +} + + +void Foam::cyclicFaPatch::movePoints(const pointField& p) +{ + faPatch::movePoints(p); + calcTransforms(); +} + +// Return delta (P to N) vectors across coupled patch +tmp<vectorField> cyclicFaPatch::delta() const +{ + vectorField patchD = faPatch::delta(); + label sizeby2 = patchD.size()/2; + + tmp<vectorField> tpdv(new vectorField(patchD.size())); + vectorField& pdv = tpdv.ref(); + + // Do the transformation if necessary + if (parallel()) + { + for (label edgei = 0; edgei < sizeby2; edgei++) + { + vector ddi = patchD[edgei]; + vector dni = patchD[edgei + sizeby2]; + + pdv[edgei] = ddi - dni; + pdv[edgei + sizeby2] = -pdv[edgei]; + } + } + else + { + for (label edgei = 0; edgei < sizeby2; edgei++) + { + vector ddi = patchD[edgei]; + vector dni = patchD[edgei + sizeby2]; + + pdv[edgei] = ddi - transform(forwardT()[0], dni); + pdv[edgei + sizeby2] = -transform(reverseT()[0], pdv[edgei]); + } + } + + return tpdv; +} + + +label Foam::cyclicPolyPatch::neighbPatchID() const +{ + NotImplemented; + return -1; +} + + +tmp<labelField> cyclicFaPatch::interfaceInternalField +( + const labelUList& internalData +) const +{ + return patchInternalField(internalData); +} + + +tmp<labelField> cyclicFaPatch::transfer +( + const Pstream::commsTypes, + const labelUList& interfaceData +) const +{ + tmp<labelField> tpnf(new labelField(this->size())); + labelField& pnf = tpnf.ref(); + + label sizeby2 = this->size()/2; + + for (label edgei=0; edgei<sizeby2; edgei++) + { + pnf[edgei] = interfaceData[edgei + sizeby2]; + pnf[edgei + sizeby2] = interfaceData[edgei]; + } + + return tpnf; +} + + +tmp<labelField> cyclicFaPatch::internalFieldTransfer +( + const Pstream::commsTypes commsType, + const labelUList& iF +) const +{ + const labelUList& edgeCells = this->faceCells(); + + tmp<labelField> tpnf(new labelField(this->size())); + labelField& pnf = tpnf.ref(); + + label sizeby2 = this->size()/2; + + for (label edgei=0; edgei<sizeby2; edgei++) + { + pnf[edgei] = iF[edgeCells[edgei + sizeby2]]; + pnf[edgei + sizeby2] = iF[edgeCells[edgei]]; + } + + return tpnf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/cyclic/cyclicFaPatch.H b/src/finiteArea/faMesh/faPatches/constraint/cyclic/cyclicFaPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..1d74e11287718dc7ecf59ee79fce1126e2fbb228 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/cyclic/cyclicFaPatch.H @@ -0,0 +1,201 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::cyclicFaPatch + +Description + Cyclic-plane patch. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + cyclicFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaPatch_H +#define cyclicFaPatch_H + +#include "coupledFaPatch.H" +#include "cyclicLduInterface.H" +#include "cyclicPolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cyclicFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class cyclicFaPatch +: + public coupledFaPatch, + public cyclicLduInterface +{ + // Private data + + // Private member functions + + void calcTransforms(); + +protected: + + // Protected static data + + //- Relative tolerance (for geometric matching). Is factor of + // maximum edge length per face. + static const scalar matchTol_; + + // Protected Member functions + + //- Make patch weighting factors + void makeWeights(scalarField&) const; + + //- Make patch face - neighbour cell distances + void makeDeltaCoeffs(scalarField&) const; + + +public: + + //- Runtime type information + TypeName("cyclic"); + + + // Constructors + + //- Construct from dictionary + cyclicFaPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ) + : + coupledFaPatch(name, dict, index, bm) + {} + + + //- Destructor + virtual ~cyclicFaPatch() + {} + + + // Member functions + + // Access + + //- Is this the master side? Yes: it contains both sets of faces + virtual bool master() const + { + return true; + } + + //- Return neighbour + virtual label neighbPatchID() const + { + NotImplemented; + return index(); + } + + virtual bool owner() const + { + return master(); + } + + //- Return processor number + virtual const cyclicLduInterface& neighbPatch() const + { + NotImplemented; + return *this; + } + + //- Return face transformation tensor + virtual const tensorField& forwardT() const + { + return coupledFaPatch::forwardT(); + } + + //- Return neighbour-cell transformation tensor + virtual const tensorField& reverseT() const + { + return coupledFaPatch::reverseT(); + } + + //- Initialise the calculation of the patch geometry + virtual void initGeometry(); + + //- Calculate the patch geometry + virtual void calcGeometry(); + + //- Initialise the patches for moving points + virtual void initMovePoints(const pointField&); + + //- Correct patches after moving points + virtual void movePoints(const pointField&); + + //- Return delta (P to N) vectors across coupled patch + virtual tmp<vectorField> delta() const; + + + // Interface transfer functions + + //- Return the values of the given internal data adjacent to + // the interface as a field + virtual tmp<labelField> interfaceInternalField + ( + const labelUList& internalData + ) const; + + //- Transfer and return neighbour field + virtual tmp<labelField> transfer + ( + const Pstream::commsTypes commsType, + const labelUList& interfaceData + ) const; + + //- Return neighbour field + virtual tmp<labelField> internalFieldTransfer + ( + const Pstream::commsTypes commsType, + const labelUList& internalData + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/empty/emptyFaPatch.C b/src/finiteArea/faMesh/faPatches/constraint/empty/emptyFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..58d98fd48c418034400218f7ba1a727004dbf241 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/empty/emptyFaPatch.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "emptyFaPatch.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Patch name +defineTypeNameAndDebug(emptyFaPatch, 0); + +// Add the patch constructor functions to the hash tables +addToRunTimeSelectionTable(faPatch, emptyFaPatch, dictionary); + +// Over-riding the face normals return from the underlying patch +// This is the only piece of info used out of the underlying primitivePatch +// I choose to store it there because it is used in primitive patch operations +// and it should not be duplicated as before. However, to ensure everything +// in the empty patch is sized to zero, we shall here return a regerence to +// a zero-sized field (it does not matter what the field is +// +// const vectorField& emptyFaPatch::edgeNormals() const +// { +// return faceAreas(); +// } + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/empty/emptyFaPatch.H b/src/finiteArea/faMesh/faPatches/constraint/empty/emptyFaPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..38c5f2a316a45d89936fe9484b07142a0bf661fa --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/empty/emptyFaPatch.H @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + emptyFaPatch + +Description + A patch which will not exist in the faMesh. Typical example is a front and + back plane of a 2-D geometry + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + emptyFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaPatch_H +#define emptyFaPatch_H + +#include "faPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class emptyFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class emptyFaPatch +: + public faPatch +{ + +public: + + //- Runtime type information + TypeName("empty"); + + + // Constructors + + //- Construct from components + emptyFaPatch + ( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex + ) + : + faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex) + {} + + //- Construct from dictionary + emptyFaPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ) + : + faPatch(name, dict, index, bm) + {} + + //- Construct and return a clone, resetting the edge list + // and boundary mesh + virtual autoPtr<faPatch> clone + ( + const faBoundaryMesh& bm, + const labelList& edgeLabels, + const label index, + const label ngbPolyPatchIndex + ) const + { + return autoPtr<faPatch> + ( + new emptyFaPatch + ( + name(), + edgeLabels, + index, + bm, + ngbPolyPatchIndex + ) + ); + } + + // Member Functions + + virtual label size() const + { + return 0; + } + + //- Return face normals. Over-riding base class return to get zero size + // +// virtual const vectorField& edgeNormals() const; + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.C b/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..e7e3646df59139dc1d9306f3493c7a03c29ef22a --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.C @@ -0,0 +1,534 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "processorFaPatch.H" +#include "addToRunTimeSelectionTable.H" +#include "IPstream.H" +#include "OPstream.H" +#include "transformField.H" +#include "faBoundaryMesh.H" +#include "faMesh.H" +#include "globalMeshData.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(processorFaPatch, 0); +addToRunTimeSelectionTable(faPatch, processorFaPatch, dictionary); + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +processorFaPatch::~processorFaPatch() +{ + deleteDemandDrivenData(neighbPointsPtr_); + deleteDemandDrivenData(nonGlobalPatchPointsPtr_); +} + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::label Foam::processorFaPatch::comm() const +{ + return boundaryMesh().mesh().comm(); +} + + +int Foam::processorFaPatch::tag() const +{ + return Pstream::msgType(); +} + + +void processorFaPatch::makeNonGlobalPatchPoints() const +{ + // If it is not runing parallel or there are no global points + // create a 1->1 map + + // Can not use faGlobalMeshData at this point yet + + if + ( + !Pstream::parRun() + || !boundaryMesh().mesh()().globalData().nGlobalPoints() +// || !boundaryMesh().mesh().globalData().nGlobalPoints() + ) + { + nonGlobalPatchPointsPtr_ = new labelList(nPoints()); + labelList& ngpp = *nonGlobalPatchPointsPtr_; + forAll(ngpp, i) + { + ngpp[i] = i; + } + } + else + { + + // Get reference to shared points + const labelList& sharedPoints = + boundaryMesh().mesh()().globalData().sharedPointLabels(); + + nonGlobalPatchPointsPtr_ = new labelList(nPoints()); + labelList& ngpp = *nonGlobalPatchPointsPtr_; + + const labelList& faMeshPatchPoints = pointLabels(); + + const labelList& meshPoints = + boundaryMesh().mesh().patch().meshPoints(); + + label noFiltPoints = 0; + + forAll (faMeshPatchPoints, pointI) + { + label curP = meshPoints[faMeshPatchPoints[pointI]]; + + bool found = false; + + forAll (sharedPoints, sharedI) + { + if (sharedPoints[sharedI] == curP) + { + found = true; + break; + } + } + + if (!found) + { + ngpp[noFiltPoints] = pointI; + noFiltPoints++; + } + } + + ngpp.setSize(noFiltPoints); + + +// // Get reference to shared points +// const labelList& sharedPoints = +// boundaryMesh().mesh().globalData().sharedPointLabels(); + +// nonGlobalPatchPointsPtr_ = new labelList(nPoints()); +// labelList& ngpp = *nonGlobalPatchPointsPtr_; + +// const labelList& patchPoints = pointLabels(); + +// label noFiltPoints = 0; + +// forAll (patchPoints, pointI) +// { +// label curP = patchPoints[pointI]; + +// bool found = false; + +// forAll (sharedPoints, pI) +// { +// if (sharedPoints[pI] == curP) +// { +// found = true; +// break; +// } +// } + +// if (!found) +// { +// ngpp[noFiltPoints] = pointI; +// noFiltPoints++; +// } +// } + +// ngpp.setSize(noFiltPoints); + } +} + + +void processorFaPatch::initGeometry() +{ + if (Pstream::parRun()) + { + OPstream toNeighbProc + ( + Pstream::commsTypes::blocking, + neighbProcNo(), + 3*(sizeof(label) + size()*sizeof(vector)) + ); + + toNeighbProc + << edgeCentres() + << edgeLengths() + << edgeFaceCentres(); + } +} + + +void processorFaPatch::calcGeometry() +{ + if (Pstream::parRun()) + { + { + IPstream fromNeighbProc + ( + Pstream::commsTypes::blocking, + neighbProcNo(), + 3*(sizeof(label) + size()*sizeof(vector)) + ); + fromNeighbProc + >> neighbEdgeCentres_ + >> neighbEdgeLengths_ + >> neighbEdgeFaceCentres_; + } + + const scalarField& magEl = magEdgeLengths(); + + forAll(magEl, edgei) + { + scalar nmagEl = mag(neighbEdgeLengths_[edgei]); + scalar avEl = (magEl[edgei] + nmagEl)/2.0; + + if (mag(magEl[edgei] - nmagEl)/avEl > 1e-6) + { + FatalErrorIn + ( + "processorFvPatch::makeWeights(scalarField& w) const" + ) << "edge " << edgei + << " length does not match neighbour by " + << 100*mag(magEl[edgei] - nmagEl)/avEl + << "% -- possible edge ordering problem" + << exit(FatalError); + } + } + + calcTransformTensors + ( + edgeCentres(), + neighbEdgeCentres_, + edgeNormals(), + neighbEdgeLengths_/mag(neighbEdgeLengths_) + ); + } +} + + +void processorFaPatch::initMovePoints(const pointField& p) +{ + faPatch::movePoints(p); + initGeometry(); +} + + +void processorFaPatch::movePoints(const pointField&) +{ + calcGeometry(); +} + + +void processorFaPatch::initUpdateMesh() +{ + // For completeness + faPatch::initUpdateMesh(); + + deleteDemandDrivenData(neighbPointsPtr_); + + if (Pstream::parRun()) + { + // Express all points as patch edge and index in edge. + labelList patchEdge(nPoints()); + labelList indexInEdge(nPoints()); + + const edgeList::subList patchEdges = + patchSlice(boundaryMesh().mesh().edges()); + + const labelListList& ptEdges = pointEdges(); + + for (label patchPointI = 0; patchPointI < nPoints(); patchPointI++) + { + label edgeI = ptEdges[patchPointI][0]; + + patchEdge[patchPointI] = edgeI; + + const edge& e = patchEdges[edgeI]; + + indexInEdge[patchPointI] = + findIndex + ( + e, + pointLabels()[patchPointI] + ); + } + + OPstream toNeighbProc + ( + Pstream::commsTypes::blocking, + neighbProcNo(), + 2*sizeof(label) + 2*nPoints()*sizeof(label) + ); + + toNeighbProc + << patchEdge + << indexInEdge; + } +} + + +void processorFaPatch::updateMesh() +{ + // For completeness + faPatch::updateMesh(); + + if (Pstream::parRun()) + { + labelList nbrPatchEdge(nPoints()); + labelList nbrIndexInEdge(nPoints()); + + { + // Note cannot predict exact size since edgeList not (yet) sent as + // binary entity but as List of edges. + IPstream fromNeighbProc + ( + Pstream::commsTypes::blocking, + neighbProcNo() + ); + + fromNeighbProc + >> nbrPatchEdge + >> nbrIndexInEdge; + } + + if (nbrPatchEdge.size() == nPoints()) + { + // Convert neighbour edges and indices into face back into + // my edges and points. + neighbPointsPtr_ = new labelList(nPoints()); + labelList& neighbPoints = *neighbPointsPtr_; + + const edgeList::subList patchEdges = + patchSlice(boundaryMesh().mesh().edges()); + + forAll(nbrPatchEdge, nbrPointI) + { + // Find edge and index in edge on this side. + const edge& e = patchEdges[nbrPatchEdge[nbrPointI]]; + + label index = 1 - nbrIndexInEdge[nbrPointI]; + + label patchPointI = findIndex(pointLabels(), e[index]); + + neighbPoints[patchPointI] = nbrPointI; + } + } + else + { + // Differing number of points. Probably patch includes + // part of a cyclic. + neighbPointsPtr_ = NULL; + } + } +} + + +const labelList& processorFaPatch::neighbPoints() const +{ + if (!neighbPointsPtr_) + { + // Was probably created from cyclic patch and hence the + // number of edges or points might differ on both + // sides of the processor patch since one side might have + // it merged with another bit of geometry + + FatalErrorIn("processorFaPatch::neighbPoints() const") + << "No extended addressing calculated for patch " << name() + << nl + << "This can happen if the number of points on both" + << " sides of the two coupled patches differ." << nl + << "This happens if the processorPatch was constructed from" + << " part of a cyclic patch." + << abort(FatalError); + } + + return *neighbPointsPtr_; +} + + +// Make patch weighting factors +void processorFaPatch::makeWeights(scalarField& w) const +{ + if (Pstream::parRun()) + { + // The face normals point in the opposite direction on the other side + scalarField neighbEdgeCentresCn + ( + ( + neighbEdgeLengths() + /mag(neighbEdgeLengths()) + ) + & ( + neighbEdgeCentres() + - neighbEdgeFaceCentres()) + ); + + w = neighbEdgeCentresCn/ + ( + (edgeNormals() & faPatch::delta()) + + neighbEdgeCentresCn + ); + } + else + { + w = 1.0; + } +} + + +// Make patch edge - neighbour face distances +void processorFaPatch::makeDeltaCoeffs(scalarField& dc) const +{ + if (Pstream::parRun()) + { + dc = (1.0 - weights())/(edgeNormals() & faPatch::delta()); + } + else + { + dc = 1.0/(edgeNormals() & faPatch::delta()); + } +} + + +// Return delta (P to N) vectors across coupled patch +tmp<vectorField> processorFaPatch::delta() const +{ + if (Pstream::parRun()) + { + // To the transformation if necessary + if (parallel()) + { + return + faPatch::delta() + - ( + neighbEdgeCentres() + - neighbEdgeFaceCentres() + ); + } + else + { + return + faPatch::delta() + - transform + ( + forwardT(), + ( + neighbEdgeCentres() + - neighbEdgeFaceCentres() + ) + ); + } + } + else + { + return faPatch::delta(); + } +} + + +const labelList& processorFaPatch::nonGlobalPatchPoints() const +{ + if (!nonGlobalPatchPointsPtr_) + { + makeNonGlobalPatchPoints(); + } + + return *nonGlobalPatchPointsPtr_; +} + +tmp<labelField> processorFaPatch::interfaceInternalField +( + const labelUList& internalData +) const +{ + return patchInternalField(internalData); +} + + +void processorFaPatch::initTransfer +( + const Pstream::commsTypes commsType, + const labelUList& interfaceData +) const +{ + send(commsType, interfaceData); +} + + +tmp<labelField> processorFaPatch::transfer +( + const Pstream::commsTypes commsType, + const labelUList& +) const +{ + return receive<label>(commsType, this->size()); +} + + +void processorFaPatch::initInternalFieldTransfer +( + const Pstream::commsTypes commsType, + const labelUList& iF +) const +{ + send(commsType, patchInternalField(iF)()); +} + + +tmp<labelField> processorFaPatch::internalFieldTransfer +( + const Pstream::commsTypes commsType, + const labelUList& +) const +{ + return receive<label>(commsType, this->size()); +} + + +// Write +void processorFaPatch::write(Ostream& os) const +{ + faPatch::write(os); + os.writeKeyword("myProcNo") << myProcNo_ + << token::END_STATEMENT << nl; + os.writeKeyword("neighbProcNo") << neighbProcNo_ + << token::END_STATEMENT << nl; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H b/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..f931a85243ef2b08e7c349ae7cd63666fc750456 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/processor/processorFaPatch.H @@ -0,0 +1,315 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + processorFaPatch + +Description + Processor patch. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + processorFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaPatch_H +#define processorFaPatch_H + +#include "coupledFaPatch.H" +#include "processorLduInterface.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class processorFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class processorFaPatch +: + public coupledFaPatch, + public processorLduInterface +{ + // Private data + + //- My processro number + int myProcNo_; + + //- Neighbour processor number + int neighbProcNo_; + + //- Processor-neighbbour patch edge centres + vectorField neighbEdgeCentres_; + + //- Processor-neighbbour patch edge lengths + vectorField neighbEdgeLengths_; + + //- Processor-neighbbour patch neighbour face centres + vectorField neighbEdgeFaceCentres_; + + //- Corresponding neighbouring local point label for every local point + // (so localPoints()[i] == neighb.localPoints()[neighbPoints_[i]]) + mutable labelList* neighbPointsPtr_; + + //- The set of labels of the processor patch points which are + // non-global, i.e. present in this processor patch + mutable labelList* nonGlobalPatchPointsPtr_; + + +protected: + + // Protected Member functions + + //- Make patch weighting factors + void makeWeights(scalarField&) const; + + //- Make patch face - neighbour cell distances + void makeDeltaCoeffs(scalarField&) const; + + //- Find non-globa patch points + void makeNonGlobalPatchPoints() const; + + + // Geometry functions + + //- Initialise the calculation of the patch geometry + void initGeometry(); + + //- Calculate the patch geometry + void calcGeometry(); + + //- Initialise the patches for moving points + void initMovePoints(const pointField&); + + //- Correct patches after moving points + void movePoints(const pointField&); + + //- Initialise the update of the patch topology + virtual void initUpdateMesh(); + + //- Update of the patch topology + virtual void updateMesh(); + + +public: + + //- Runtime type information +// TypeName(processorPolyPatch::typeName_()); + TypeName("processor"); + + + // Constructors + + //- Construct from components + processorFaPatch + ( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex, + const label myProcNo, + const label neighbProcNo + ) + : + coupledFaPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex), + myProcNo_(myProcNo), + neighbProcNo_(neighbProcNo), + neighbEdgeCentres_(), + neighbEdgeLengths_(), + neighbEdgeFaceCentres_(), + neighbPointsPtr_(NULL), + nonGlobalPatchPointsPtr_(NULL) + {} + + //- Construct from dictionary + processorFaPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ) + : + coupledFaPatch(name, dict, index, bm), + myProcNo_(readLabel(dict.lookup("myProcNo"))), + neighbProcNo_(readLabel(dict.lookup("neighbProcNo"))), + neighbEdgeCentres_(), + neighbEdgeLengths_(), + neighbEdgeFaceCentres_(), + neighbPointsPtr_(NULL), + nonGlobalPatchPointsPtr_(NULL) + {} + + + //- Destructor + virtual ~processorFaPatch(); + + + // Member functions + + //- Return interface size + virtual label interfaceSize() const + { + return size(); + } + + //- Return processor number + int myProcNo() const + { + return myProcNo_; + } + + //- Return neigbour processor number + int neighbProcNo() const + { + return neighbProcNo_; + } + + //- Return true if running parallel + virtual bool coupled() const + { + if (Pstream::parRun()) + { + return true; + } + else + { + return false; + } + } + + //- Is this the master side? + virtual bool master() const + { + return (myProcNo_ < neighbProcNo_); + } + + + // Communications support + + //- Return communicator used for communication + virtual label comm() const; + + //- Return message tag to use for communication + virtual int tag() const; + + + //- Return face transformation tensor + virtual const tensorField& forwardT() const + { + return coupledFaPatch::forwardT(); + } + + //- Return delta (P to N) vectors across coupled patch + virtual tmp<vectorField> delta() const; + + + //- Return processor-neighbbour patch edge centres + const vectorField& neighbEdgeCentres() const + { + return neighbEdgeCentres_; + } + + //- Return processor-neighbbour patch edge lengths + const vectorField& neighbEdgeLengths() const + { + return neighbEdgeLengths_; + } + + //- Return processor-neighbbour patch neighbour face centres + const vectorField& neighbEdgeFaceCentres() const + { + return neighbEdgeFaceCentres_; + } + + //- Return neighbour point labels. This is for my local point the + // corresponding local point on the other side. Call + // faBoundaryMesh::updateMesh() on all processors + // before using this. + const labelList& neighbPoints() const; + + //- Return the set of labels of the processor patch points which are + // non-global, i.e. present in this processorFaPatch + const labelList& nonGlobalPatchPoints() const; + + + // Interface transfer functions + + //- Return the values of the given internal data adjacent to + // the interface as a field + virtual tmp<labelField> interfaceInternalField + ( + const labelUList& internalData + ) const; + + //- Initialise interface data transfer + virtual void initTransfer + ( + const Pstream::commsTypes commsType, + const labelUList& interfaceData + ) const; + + //- Transfer and return neighbour field + virtual tmp<labelField> transfer + ( + const Pstream::commsTypes commsType, + const labelUList& interfaceData + ) const; + + //- Initialise neighbour field transfer + virtual void initInternalFieldTransfer + ( + const Pstream::commsTypes commsType, + const labelUList& internalData + ) const; + + //- Return neighbour field + virtual tmp<labelField> internalFieldTransfer + ( + const Pstream::commsTypes commsType, + const labelUList& internalData + ) const; + + //- Write the patch data as a dictionary + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/symmetry/symmetryFaPatch.C b/src/finiteArea/faMesh/faPatches/constraint/symmetry/symmetryFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..4cb746b4f597c21c9c39605ea4a5ffb780622885 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/symmetry/symmetryFaPatch.C @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "symmetryFaPatch.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(symmetryFaPatch, 0); +addToRunTimeSelectionTable(faPatch, symmetryFaPatch, dictionary); + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void symmetryFaPatch::makeCorrVecs(vectorField& cv) const +{ + // Non-orthogonal correction not allowed. HJ, 16/Apr/2009 + cv = vector::zero; +} + + +// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // + +// Construct from components +symmetryFaPatch::symmetryFaPatch +( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex +) +: + faPatch(name, edgeLabels, index, bm, ngbPolyPatchIndex) +{} + +//- Construct from dictionary +symmetryFaPatch::symmetryFaPatch +( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm +) +: + faPatch(name, dict, index, bm) +{ + if(ngbPolyPatchIndex() == -1) + { + FatalErrorIn + ( + "symmetryFaPatch::symmetryFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)" + ) << "Neighbour polyPatch index is not specified for faPatch " + << this->name() << exit(FatalError); + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/symmetry/symmetryFaPatch.H b/src/finiteArea/faMesh/faPatches/constraint/symmetry/symmetryFaPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..ecbb6f21fa2b30e9b55d883f8c5865443f824e9b --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/symmetry/symmetryFaPatch.H @@ -0,0 +1,130 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::symmetryFaPatch + +Description + Symmetry-plane patch. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + symmetryFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaPatch_H +#define symmetryFaPatch_H + +#include "faPatch.H" +#include "symmetryPolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class symmetryFaPatch +: + public faPatch +{ + +protected: + + // Protected Member Functions + + //- Make patch face non-orthogonality correction vectors + virtual void makeCorrVecs(vectorField&) const; + + +public: + + //- Runtime type information + TypeName(symmetryPolyPatch::typeName_()); + + + // Constructors + + //- Construct from components + symmetryFaPatch + ( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex + ); + + //- Construct from dictionary + symmetryFaPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ); + + //- Construct and return a clone, resetting the edge list + // and boundary mesh + virtual autoPtr<faPatch> clone + ( + const faBoundaryMesh& bm, + const labelList& edgeLabels, + const label index, + const label ngbPolyPatchIndex + ) const + { + return autoPtr<faPatch> + ( + new symmetryFaPatch + ( + name(), edgeLabels, index, bm, ngbPolyPatchIndex + ) + ); + } + + // Destructor + + virtual ~symmetryFaPatch() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/wedge/wedgeFaPatch.C b/src/finiteArea/faMesh/faPatches/constraint/wedge/wedgeFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..28c488b5c19be80954e54634b680217cdbb6c218 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/wedge/wedgeFaPatch.C @@ -0,0 +1,134 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "wedgeFaPatch.H" +#include "addToRunTimeSelectionTable.H" +#include "faBoundaryMesh.H" +#include "wedgePolyPatch.H" +#include "polyMesh.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(wedgeFaPatch, 0); +addToRunTimeSelectionTable(faPatch, wedgeFaPatch, dictionary); + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +void wedgeFaPatch::findAxisPoint() const +{ + // Find axis point + + labelList ptLabels = pointLabels(); + + labelListList ptEdges = pointEdges(); + + const vectorField& points = boundaryMesh().mesh().points(); + + const scalarField& magL = magEdgeLengths(); + + forAll(ptEdges, pointI) + { + if( ptEdges[pointI].size() == 1 ) + { + scalar r = mag((I-axis()*axis())&points[ptLabels[pointI]]); + + if( r < magL[ptEdges[pointI][0]] ) + { + axisPoint_ = ptLabels[pointI]; + break; + } + } + } + + axisPointChecked_ = true; +} + + +// * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * // + +//- Construct from polyPatch +wedgeFaPatch::wedgeFaPatch +( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm +) +: + faPatch(name, dict, index, bm), + wedgePolyPatchPtr_(NULL), + axisPoint_(-1), + axisPointChecked_(false) +{ + if(ngbPolyPatchIndex() == -1) + { + FatalErrorIn + ( + "wedgeFaPatch::wedgeFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)" + ) << "Neighbour polyPatch index is not specified for faPatch " + << this->name() << exit(FatalError); + } + + if + ( + bm.mesh()().boundaryMesh()[ngbPolyPatchIndex()].type() + == wedgePolyPatch::typeName + ) + { + const wedgePolyPatch& wedge = + refCast<const wedgePolyPatch> + ( + bm.mesh()().boundaryMesh()[ngbPolyPatchIndex()] + ); + + wedgePolyPatchPtr_ = ∧ + } + else + { + FatalErrorIn + ( + "wedgeFaPatch::wedgeFaPatch(const word&, const dictionary&, const label, const faBoundaryMesh&)" + ) << "Neighbour polyPatch is not of type " + << wedgePolyPatch::typeName + << exit(FatalError); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/constraint/wedge/wedgeFaPatch.H b/src/finiteArea/faMesh/faPatches/constraint/wedge/wedgeFaPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..c06500aa28f7a01021907e706a0c1cf811ecd5f1 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/constraint/wedge/wedgeFaPatch.H @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + wedgeFaPatch + +Description + Wedge front and back plane patch. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + wedgeFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaPatch_H +#define wedgeFaPatch_H + +#include "faPatch.H" +#include "wedgePolyPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class wedgeFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class wedgeFaPatch +: + public faPatch +{ + // Private data + + const wedgePolyPatch* wedgePolyPatchPtr_; + + //- Axis point label + mutable label axisPoint_; + + //- Is it axis point looked for? + mutable bool axisPointChecked_; + + //- Finde axis point + void findAxisPoint() const; + +public: + + //- Runtime type information + TypeName("wedge"); + + + // Constructors + + //- Construct from dictionary + wedgeFaPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ); + + + // Destructor + + virtual ~wedgeFaPatch() + {} + + + // Member functions + + // Access + + //- Return axis of the wedge + const vector& axis() const + { + return wedgePolyPatchPtr_->axis(); + } + + //- Return plane normal between the wedge boundaries + const vector& centreNormal() const + { + return wedgePolyPatchPtr_->centreNormal(); + } + + //- Return face transformation tensor + const tensor& edgeT() const + { + return wedgePolyPatchPtr_->faceT(); + } + + //- Return neighbour-cell transformation tensor + const tensor& faceT() const + { + return wedgePolyPatchPtr_->cellT(); + } + + //- Return axis point label + label axisPoint() const + { + if(axisPoint_ == -1 && !axisPointChecked_) + { + findAxisPoint(); + } + + return axisPoint_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..5061aecb5fb0d83d0db5b866d62b547188364e6c --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C @@ -0,0 +1,504 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faPatch.H" +#include "addToRunTimeSelectionTable.H" +#include "faBoundaryMesh.H" +#include "faMesh.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "polyMesh.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(faPatch, 0); + defineRunTimeSelectionTable(faPatch, dictionary); + addToRunTimeSelectionTable(faPatch, faPatch, dictionary); +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::faPatch::clearOut() +{ + deleteDemandDrivenData(edgeFacesPtr_); + deleteDemandDrivenData(pointLabelsPtr_); + deleteDemandDrivenData(pointEdgesPtr_); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +Foam::faPatch::faPatch +( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex +) +: + labelList(edgeLabels), + patchIdentifier(name, index), + ngbPolyPatchIndex_(ngbPolyPatchIndex), + boundaryMesh_(bm), + edgeFacesPtr_(NULL), + pointLabelsPtr_(NULL), + pointEdgesPtr_(NULL) +{} + + +// Construct from dictionary +Foam::faPatch::faPatch +( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm +) +: + labelList(dict.lookup("edgeLabels")), + patchIdentifier(name, dict, index), + ngbPolyPatchIndex_(readInt(dict.lookup("ngbPolyPatchIndex"))), + boundaryMesh_(bm), + edgeFacesPtr_(NULL), + pointLabelsPtr_(NULL), + pointEdgesPtr_(NULL) +{} + +Foam::faPatch::faPatch(const faPatch& p, const faBoundaryMesh& bm) +: + labelList(p), + patchIdentifier(p, p.index()), + ngbPolyPatchIndex_(p.ngbPolyPatchIndex_), + boundaryMesh_(bm), + edgeFacesPtr_(NULL), + pointLabelsPtr_(NULL), + pointEdgesPtr_(NULL) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::faPatch::~faPatch() +{ + clearOut(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::label Foam::faPatch::ngbPolyPatchIndex() const +{ + return ngbPolyPatchIndex_; +} + +const Foam::faBoundaryMesh& Foam::faPatch::boundaryMesh() const +{ + return boundaryMesh_; +} + + +Foam::label Foam::faPatch::start() const +{ + return boundaryMesh().mesh().patchStarts()[index()]; +} + + +const Foam::labelList& Foam::faPatch::pointLabels() const +{ + if (!pointLabelsPtr_) + { + calcPointLabels(); + } + + return *pointLabelsPtr_; +} + + +void Foam::faPatch::calcPointLabels() const +{ + SLList<label> labels; + + UList<edge> edges = + patchSlice(boundaryMesh().mesh().edges()); + + forAll(edges, edgeI) + { + bool existStart = false; + bool existEnd = false; + + for + ( + SLList<label>::iterator iter = labels.begin(); + iter != labels.end(); + ++iter + ) + { + if(*iter == edges[edgeI].start()) + { + existStart = true; + } + + if(*iter == edges[edgeI].end()) + { + existEnd = true; + } + } + + if(!existStart) + { + labels.append(edges[edgeI].start()); + } + + if(!existEnd) + { + labels.append(edges[edgeI].end()); + } + } + + pointLabelsPtr_ = new labelList(labels); +} + + +void Foam::faPatch::calcPointEdges() const +{ + labelList points = pointLabels(); + + const edgeList::subList e = + patchSlice(boundaryMesh().mesh().edges()); + + // set up storage for pointEdges + List<SLList<label> > pointEdgs(points.size()); + + forAll (e, edgeI) + { + const edge& curPoints = e[edgeI]; + + forAll (curPoints, pointI) + { + label localPointIndex = + findIndex(points, curPoints[pointI]); + + pointEdgs[localPointIndex].append(edgeI); + } + } + + // sort out the list + pointEdgesPtr_ = new labelListList(pointEdgs.size()); + labelListList& pEdges = *pointEdgesPtr_; + + forAll (pointEdgs, pointI) + { + pEdges[pointI].setSize(pointEdgs[pointI].size()); + + label i = 0; + for + ( + SLList<label>::iterator curEdgesIter = pointEdgs[pointI].begin(); + curEdgesIter != pointEdgs[pointI].end(); + ++curEdgesIter, ++i + ) + { + pEdges[pointI][i] = curEdgesIter(); + } + } +} + + +const Foam::labelListList& Foam::faPatch::pointEdges() const +{ + if (!pointEdgesPtr_) + { + calcPointEdges(); + } + + return *pointEdgesPtr_; +} + + +Foam::labelList Foam::faPatch::ngbPolyPatchFaces() const +{ + labelList ngbFaces; + + if(ngbPolyPatchIndex() == -1) + { + return ngbFaces; + } + + ngbFaces.setSize(faPatch::size()); + + const faMesh& aMesh = boundaryMesh().mesh(); + const polyMesh& pMesh = aMesh(); + const indirectPrimitivePatch& patch = aMesh.patch(); + + const labelListList& edgeFaces = pMesh.edgeFaces(); + + labelList faceCells (patch.size(), -1); + + forAll (faceCells, faceI) + { + label faceID = aMesh.faceLabels()[faceI]; + + faceCells[faceI] = pMesh.faceOwner()[faceID]; + } + + labelList meshEdges = + patch.meshEdges + ( + pMesh.edges(), + pMesh.cellEdges(), + faceCells + ); + + forAll(ngbFaces, edgeI) + { + ngbFaces[edgeI] = -1; + + label curEdge = (*this)[edgeI]; + + label curPMeshEdge = meshEdges[curEdge]; + + forAll(edgeFaces[curPMeshEdge], faceI) + { + label curFace = edgeFaces[curPMeshEdge][faceI]; + + label curPatchID = pMesh.boundaryMesh().whichPatch(curFace); + + if (curPatchID == ngbPolyPatchIndex()) + { + ngbFaces[edgeI] = curFace; + } + } + + if(ngbFaces[edgeI] == -1) + { + Info<< "faPatch::edgeNgbPolyPatchFaces(): " + << "Problem with determination of edge ngb faces!" << endl; + } + } + + return ngbFaces; +} + + +Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchFaceNormals() const +{ + tmp<vectorField> tfN(new vectorField()); + vectorField& fN = tfN.ref(); + + if (ngbPolyPatchIndex() == -1) + { + return tfN; + } + + fN.setSize(faPatch::size()); + + labelList ngbFaces = ngbPolyPatchFaces(); + + const polyMesh& pMesh = boundaryMesh().mesh()(); + + const faceList& faces = pMesh.faces(); + const pointField& points = pMesh.points(); + + forAll(fN, faceI) + { + fN[faceI] = faces[ngbFaces[faceI]].normal(points) + /faces[ngbFaces[faceI]].mag(points); + } + + return tfN; +} + + +Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchPointNormals() const +{ + if (ngbPolyPatchIndex() == -1) + { + return tmp<vectorField>(new vectorField()); + } + + labelListList pntEdges = pointEdges(); + + tmp<vectorField> tpN(new vectorField(pntEdges.size(), vector::zero)); + vectorField& pN = tpN.ref(); + + vectorField faceNormals = ngbPolyPatchFaceNormals(); + + forAll(pN, pointI) + { + forAll(pntEdges[pointI], edgeI) + { + pN[pointI] += faceNormals[pntEdges[pointI][edgeI]]; + } + } + + pN /= mag(pN); + + return tpN; +} + + +const Foam::labelUList& Foam::faPatch::edgeFaces() const +{ + if (!edgeFacesPtr_) + { + edgeFacesPtr_ = new labelList::subList + ( + patchSlice(boundaryMesh().mesh().edgeOwner()) + ); + } + + return *edgeFacesPtr_; +} + + +// Return the patch edge centres +const Foam::vectorField& Foam::faPatch::edgeCentres() const +{ + return boundaryMesh().mesh().edgeCentres().boundaryField()[index()]; +} + + +// Return the patch edges length vectors +const Foam::vectorField& Foam::faPatch::edgeLengths() const +{ + return boundaryMesh().mesh().Le().boundaryField()[index()]; +} + + +// Return the patch edge length magnitudes +const Foam::scalarField& Foam::faPatch::magEdgeLengths() const +{ + return boundaryMesh().mesh().magLe().boundaryField()[index()]; +} + + +// Return the patch edge unit normals +Foam::tmp<Foam::vectorField> Foam::faPatch::edgeNormals() const +{ + tmp<vectorField> eN(new vectorField(size())); + + eN.ref() = edgeLengths()/magEdgeLengths(); + + return eN; +} + + +// Return the patch edge neighbour face centres +Foam::tmp<Foam::vectorField> Foam::faPatch::edgeFaceCentres() const +{ + tmp<vectorField> tfc(new vectorField(size())); + vectorField& fc = tfc.ref(); + + // get reference to global face centres + const vectorField& gfc = + boundaryMesh().mesh().areaCentres().internalField(); + + const labelUList& faceLabels = edgeFaces(); + + forAll (faceLabels, edgeI) + { + fc[edgeI] = gfc[faceLabels[edgeI]]; + } + + return tfc; +} + + +// Return cell-centre to face-centre vector +Foam::tmp<Foam::vectorField> Foam::faPatch::delta() const +{ + return edgeCentres() - edgeFaceCentres(); +} + + +// Make delta coefficients as patch face - neighbour cell distances +void Foam::faPatch::makeDeltaCoeffs(scalarField& dc) const +{ + dc = 1.0/(edgeNormals() & delta()); +} + + +// Return delta coefficients +const Foam::scalarField& Foam::faPatch::deltaCoeffs() const +{ + return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()]; +} + + +void Foam::faPatch::makeWeights(scalarField& w) const +{ + w = 1.0; +} + + +const Foam::scalarField& Foam::faPatch::weights() const +{ + return boundaryMesh().mesh().weights().boundaryField()[index()]; +} + + +void Foam::faPatch::movePoints(const pointField& points) +{} + + +void Foam::faPatch::resetEdges(const labelList& newEdges) +{ + Info<< "Resetting patch edges" << endl; + labelList::operator=(newEdges); + + clearOut(); +} + + +void Foam::faPatch::write(Ostream& os) const +{ + os.writeKeyword("type") << type() << token::END_STATEMENT << nl; + patchIdentifier::write(os); + + const labelList& edgeLabels = *this; + edgeLabels.writeEntry("edgeLabels", os); + os.writeKeyword("ngbPolyPatchIndex") << ngbPolyPatchIndex_ + << token::END_STATEMENT << nl; +} + + +// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // + +Foam::Ostream& Foam::operator<<(Ostream& os, const faPatch& p) +{ + p.write(os); + os.check("Ostream& operator<<(Ostream& f, const faPatch& p)"); + return os; +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatch.H b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.H new file mode 100644 index 0000000000000000000000000000000000000000..4c59be02eea8dfebec7ada48b63a1acad6a892c1 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.H @@ -0,0 +1,380 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faPatch + +Description + Finite area patch class. Used for 2-D non-Euclidian finite area method. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faPatch.C + newFaPatch.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatch_H +#define faPatch_H + +#include "patchIdentifier.H" +#include "labelList.H" +#include "pointField.H" +#include "typeInfo.H" +#include "faPatchFieldsFwd.H" +#include "autoPtr.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class faBoundaryMesh; + +/*---------------------------------------------------------------------------*\ + Class faPatch Declaration +\*---------------------------------------------------------------------------*/ + +class faPatch +: + public labelList, + public patchIdentifier +{ +private: + + // Private data + + //- Neighbour polyPatch index + const label ngbPolyPatchIndex_; + + //- Reference to boundary mesh + const faBoundaryMesh& boundaryMesh_; + + + // Demand-driven private data + + //- Edge-face addressing + mutable labelList::subList* edgeFacesPtr_; + + //- Local points labels + mutable labelList* pointLabelsPtr_; + + //- Point-edge addressing + mutable labelListList* pointEdgesPtr_; + + + // Private Member Functions + + //- Disallow construct as copy + faPatch(const faPatch&); + + //- Disallow assignment + void operator=(const faPatch&); + + + //- Clear out topological patch data + void clearOut(); + + +protected: + + // The faPatch geometry initialisation is called by faBoundaryMesh + friend class faBoundaryMesh; + + //- Calculate patch point labels + void calcPointLabels() const; + + //- Calculate patch point-edge addressing + void calcPointEdges() const; + + //- Initialise the calculation of the patch geometry + virtual void initGeometry() + {} + + //- Calculate the patch geometry + virtual void calcGeometry() + {} + + //- Initialise the patches for moving points + virtual void initMovePoints(const pointField&) + {} + + //- Correct patch after moving points + virtual void movePoints(const pointField&); + + //- Initialise the update of the patch topology + virtual void initUpdateMesh() + {} + + //- Update of the patch topology + virtual void updateMesh() + {} + + +public: + + typedef faBoundaryMesh BoundaryMesh; + + + //- Runtime type information + TypeName("patch"); + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + autoPtr, + faPatch, + dictionary, + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ), + (name, dict, index, bm) + ); + + + // Constructors + + //- Construct from components + faPatch + ( + const word& name, + const labelList& edgeLabels, + const label index, + const faBoundaryMesh& bm, + const label ngbPolyPatchIndex + ); + + //- Construct from dictionary + faPatch + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ); + + //- Construct as copy, resetting the boundary mesh + faPatch(const faPatch&, const faBoundaryMesh&); + + //- Construct and return a clone, resetting the edge list + // and boundary mesh + virtual autoPtr<faPatch> clone + ( + const faBoundaryMesh& bm, + const labelList& edgeLabels, + const label index, + const label ngbPolyPatchIndex + ) const + { + return autoPtr<faPatch> + ( + new faPatch(name(), edgeLabels, index, bm, ngbPolyPatchIndex) + ); + } + + + // Selectors + + //- Return a pointer to a new patch created + // on freestore from dictionary + static autoPtr<faPatch> New + ( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm + ); + + + // Destructor + + virtual ~faPatch(); + + + // Member Functions + + //- Return number of patch points + label nPoints() const + { + return pointLabels().size(); + } + + //- Return neighbour polyPatch index + label ngbPolyPatchIndex() const; + + //- Return boundaryMesh reference + const faBoundaryMesh& boundaryMesh() const; + + //- Return true if this patch is coupled + virtual bool coupled() const + { + return false; + } + + //- Patch start in edge list + label start() const; + + //- Patch size + virtual label size() const + { + return labelList::size(); + } + + //- Return label of edge in patch from global edge label + inline label whichEdge(const label l) const + { + return l - start(); + } + + //- Slice list to patch + template<class T> + typename List<T>::subList patchSlice(const List<T>& l) const + { + return typename List<T>::subList(l, size(), start()); + } + + + //- Write + virtual void write(Ostream&) const; + + + // Acces functions for geometrical data + + //- Return patch point labels + const labelList& pointLabels() const; + + //- Return patch point-edge addressing + const labelListList& pointEdges() const; + + //- Return edge neighbour polyPatch faces + labelList ngbPolyPatchFaces() const; + + //- Return normals of neighbour polyPatch faces + tmp<vectorField> ngbPolyPatchFaceNormals() const; + + //- Return normals of neighbour polyPatch joined points + tmp<vectorField> ngbPolyPatchPointNormals() const; + + //- Return edge-face addressing + const labelUList& edgeFaces() const; + + //- Return edge centres + const vectorField& edgeCentres() const; + + //- Return edge length vectors + const vectorField& edgeLengths() const; + + //- Return edge length magnitudes + const scalarField& magEdgeLengths() const; + + //- Return edge normals + tmp<vectorField> edgeNormals() const; + + //- Return neighbour face centres + tmp<vectorField> edgeFaceCentres() const; + + //- Return cell-centre to face-centre vector + // except for coupled patches for which the cell-centre + // to coupled-cell-centre vector is returned + virtual tmp<vectorField> delta() const; + + + // Access functions for demand driven data + + //- Make patch weighting factors + virtual void makeWeights(scalarField&) const; + + //- Return patch weighting factors + const scalarField& weights() const; + + //- Make patch edge - neighbour face distances + virtual void makeDeltaCoeffs(scalarField&) const; + + //- Return patch edge - neighbour face distances + const scalarField& deltaCoeffs() const; + + + // Topological changes + + //- Reset edge list + void resetEdges(const labelList&); + + + // Evaluation functions + + //- Return given internal field next to patch as patch field + template<class Type> + tmp<Field<Type> > patchInternalField(const UList<Type>&) const; + + //- Return the corresponding patchField of the named field + template<class GeometricField, class Type> + const typename GeometricField::Patch& patchField + ( + const GeometricField& + ) const; + + //- Lookup and return the patchField of the named field from the + // local objectRegistry. + // N.B. The dummy pointer arguments are used if this function is + // instantiated within a templated function to avoid a bug in gcc. + // See inletOutletFvPatchField.C and outletInletFvPatchField.C + template<class GeometricField, class Type> + const typename GeometricField::Patch& lookupPatchField + ( + const word& name, + const GeometricField* = NULL, + const Type* = NULL + ) const; + + + // Ostream Operator + + friend Ostream& operator<<(Ostream&, const faPatch&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faPatchTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatchData.H b/src/finiteArea/faMesh/faPatches/faPatch/faPatchData.H new file mode 100644 index 0000000000000000000000000000000000000000..888394eea5b049a133491046c219b57f75c100b8 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatchData.H @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faPatchData + +Description + Class which holds data needed for faPatch construction + +SourceFiles + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchData_H +#define faPatchData_H + +#include "labelList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faPatchData Declaration +\*---------------------------------------------------------------------------*/ + +struct faPatchData +{ + word name_; + word type_; + dictionary dict_; + label ownPolyPatchID_; + label ngbPolyPatchID_; + labelList edgeLabels_; + faPatchData() + : + name_(word::null), + type_(word::null), + ownPolyPatchID_(-1), + ngbPolyPatchID_(-1) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatchFaMeshTemplates.C b/src/finiteArea/faMesh/faPatches/faPatch/faPatchFaMeshTemplates.C new file mode 100644 index 0000000000000000000000000000000000000000..3ebcb53b6530d13e63d543d4125cfc9796060de3 --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatchFaMeshTemplates.C @@ -0,0 +1,50 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faPatch.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class GeometricField, class Type> +const typename GeometricField::Patch& Foam::faPatch::lookupPatchField +( + const word& name, + const GeometricField*, + const Type* +) const +{ + return patchField<GeometricField, Type> + ( + boundaryMesh().mesh()().objectRegistry::lookupObject<GeometricField> + ( + name + ) + ); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatchList.H b/src/finiteArea/faMesh/faPatches/faPatch/faPatchList.H new file mode 100644 index 0000000000000000000000000000000000000000..75a51067823c3044254c40fb096dd16e24d547ea --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatchList.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Typedef + faPatchList + +Description + Container classes for faPatch + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchList_H +#define faPatchList_H + +#include "faPatch.H" +#include "PtrList.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +typedef PtrList<faPatch> faPatchList; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatchTemplates.C b/src/finiteArea/faMesh/faPatches/faPatch/faPatchTemplates.C new file mode 100644 index 0000000000000000000000000000000000000000..30bec5a7495c809ccbe983e4a00231bf1211a2ad --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatchTemplates.C @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*----------------------------------------------------------------------------*/ + +#include "faPatch.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Foam::tmp<Foam::Field<Type> > Foam::faPatch::patchInternalField +( + const UList<Type>& f +) const +{ + tmp<Field<Type> > tpif(new Field<Type>(size())); + Field<Type>& pif = tpif.ref(); + + const labelUList& edgeFaces = this->edgeFaces(); + + forAll(pif, facei) + { + pif[facei] = f[edgeFaces[facei]]; + } + + return tpif; +} + + +template<class GeometricField, class Type> +const typename GeometricField::Patch& Foam::faPatch::patchField +( + const GeometricField& gf +) const +{ + return gf.boundaryField()[index()]; +} + + +// ************************************************************************* // diff --git a/src/finiteArea/faMesh/faPatches/faPatch/newFaPatch.C b/src/finiteArea/faMesh/faPatches/faPatch/newFaPatch.C new file mode 100644 index 0000000000000000000000000000000000000000..61b1e07f4436e0193122dd34ca5fb4b04076544f --- /dev/null +++ b/src/finiteArea/faMesh/faPatches/faPatch/newFaPatch.C @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatch.H" +#include "dictionary.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +autoPtr<faPatch> faPatch::New +( + const word& name, + const dictionary& dict, + const label index, + const faBoundaryMesh& bm +) +{ + if (debug) + { + Info<< "faPatch::New(const word&, const dictionary&, const label, " + "const faBoundaryMesh&) : constructing faPatch" + << endl; + } + + word patchType(dict.lookup("type")); + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(patchType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "faPatch::New(const word&, const dictionary&, " + "const label, const faBoundaryMesh&)", + dict + ) << "Unknown faPatch type " << patchType << endl << endl + << "Valid faPatch types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return autoPtr<faPatch>(cstrIter()(name, dict, index, bm)); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/faSolution/faSolution.H b/src/finiteArea/faSolution/faSolution.H new file mode 100644 index 0000000000000000000000000000000000000000..290cc60f4371e31b8126893d1c0fc12dcb5ef333 --- /dev/null +++ b/src/finiteArea/faSolution/faSolution.H @@ -0,0 +1,85 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faSolution + +Description + Selector class for finite area solution. + faMesh is derived from faSolution so that all fields have access to the + faSolution from the mesh reference they hold. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef faSolution_H +#define faSolution_H + +#include "solution.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faSolution Declaration +\*---------------------------------------------------------------------------*/ + +class faSolution +: + public solution +{ + // Private Member Functions + + //- Disallow default bitwise copy construct and assignment + faSolution(const faSolution&); + void operator=(const faSolution&); + + +public: + + // Constructors + + //- Construct from objectRegistry + faSolution(const objectRegistry& obr) + : + solution(obr, "faSolution") + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/areaFields/areaFields.C b/src/finiteArea/fields/areaFields/areaFields.C new file mode 100644 index 0000000000000000000000000000000000000000..ead1ca58866d16ce5243dd96fbb4727b068dac0a --- /dev/null +++ b/src/finiteArea/fields/areaFields/areaFields.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTemplate2TypeNameAndDebug(areaScalarField::Internal, 0); +defineTemplate2TypeNameAndDebug(areaVectorField::Internal, 0); +defineTemplate2TypeNameAndDebug(areaSphericalTensorField::Internal, 0); +defineTemplate2TypeNameAndDebug(areaSymmTensorField::Internal, 0); +defineTemplate2TypeNameAndDebug(areaTensorField::Internal, 0); + +defineTemplateTypeNameAndDebug(areaScalarField, 0); +defineTemplateTypeNameAndDebug(areaVectorField, 0); +defineTemplateTypeNameAndDebug(areaSphericalTensorField, 0); +defineTemplateTypeNameAndDebug(areaSymmTensorField, 0); +defineTemplateTypeNameAndDebug(areaTensorField, 0); + +template<> +tmp<GeometricField<scalar, faPatchField, areaMesh> > +GeometricField<scalar, faPatchField, areaMesh>::component +( + const direction +) const +{ + return *this; +} + +template<> +void GeometricField<scalar, faPatchField, areaMesh>::replace +( + const direction, + const GeometricField<scalar, faPatchField, areaMesh>& gsf +) +{ + *this == gsf; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + diff --git a/src/finiteArea/fields/areaFields/areaFields.H b/src/finiteArea/fields/areaFields/areaFields.H new file mode 100644 index 0000000000000000000000000000000000000000..2a9eb20130afae1287fc068d9124a2812cc27b30 --- /dev/null +++ b/src/finiteArea/fields/areaFields/areaFields.H @@ -0,0 +1,82 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + areaFields + +Description + Finite area area (element) fields + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + areaFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef areaFields_H +#define areaFields_H + +#include "objectRegistry.H" +#include "GeometricFields.H" +#include "areaFaMesh.H" +#include "faMesh.H" +#include "faPatchFields.H" +#include "areaFieldsFwd.H" +#include "calculatedFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +tmp<GeometricField<scalar, faPatchField, areaMesh> > +GeometricField<scalar, faPatchField, areaMesh>::component +( + const direction +) const; + +template<> +void GeometricField<scalar, faPatchField, areaMesh>::replace +( + const direction, + const GeometricField<scalar, faPatchField, areaMesh>& sf +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/areaFields/areaFieldsFwd.H b/src/finiteArea/fields/areaFields/areaFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..e1fcfb072f76fe920cbcbb4ea4426bd5a061518a --- /dev/null +++ b/src/finiteArea/fields/areaFields/areaFieldsFwd.H @@ -0,0 +1,72 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + areaFields + +Description + +SourceFiles + areaFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef areaFieldsFwd_H +#define areaFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +class areaMesh; + +template<class Type> +class faPatchField; + +template<class Type, template<class> class PatchField, class GeoMesh> +class GeometricField; + +typedef GeometricField<scalar, faPatchField, areaMesh> areaScalarField; +typedef GeometricField<vector, faPatchField, areaMesh> areaVectorField; +typedef GeometricField<sphericalTensor, faPatchField, areaMesh> + areaSphericalTensorField; +typedef GeometricField<symmTensor, faPatchField, areaMesh> areaSymmTensorField; +typedef GeometricField<tensor, faPatchField, areaMesh> areaTensorField; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/edgeFields/edgeFields.C b/src/finiteArea/fields/edgeFields/edgeFields.C new file mode 100644 index 0000000000000000000000000000000000000000..0b5c86d3edf3bf69d151ddcf3098ddfe991633b6 --- /dev/null +++ b/src/finiteArea/fields/edgeFields/edgeFields.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "edgeFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTemplate2TypeNameAndDebug(edgeScalarField::Internal, 0); +defineTemplate2TypeNameAndDebug(edgeVectorField::Internal, 0); +defineTemplate2TypeNameAndDebug(edgeSphericalTensorField::Internal, 0); +defineTemplate2TypeNameAndDebug(edgeSymmTensorField::Internal, 0); +defineTemplate2TypeNameAndDebug(edgeTensorField::Internal, 0); + +defineTemplateTypeNameAndDebug(edgeScalarField, 0); +defineTemplateTypeNameAndDebug(edgeVectorField, 0); +defineTemplateTypeNameAndDebug(edgeSphericalTensorField, 0); +defineTemplateTypeNameAndDebug(edgeSymmTensorField, 0); +defineTemplateTypeNameAndDebug(edgeTensorField, 0); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + diff --git a/src/finiteArea/fields/edgeFields/edgeFields.H b/src/finiteArea/fields/edgeFields/edgeFields.H new file mode 100644 index 0000000000000000000000000000000000000000..f61e67f31f69e630c19c5459eb1636a555ae78e7 --- /dev/null +++ b/src/finiteArea/fields/edgeFields/edgeFields.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + edgeFields + +Description + Finite area edge fields + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + edgeFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeFields_H +#define edgeFields_H + +#include "objectRegistry.H" +#include "GeometricFields.H" +#include "edgeFaMesh.H" +#include "fieldTypes.H" +#include "faMesh.H" +#include "faePatchFields.H" +#include "edgeFieldsFwd.H" +#include "calculatedFaePatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/edgeFields/edgeFieldsFwd.H b/src/finiteArea/fields/edgeFields/edgeFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..8f5af7d64ed7ae0ae5c976376081956818db8865 --- /dev/null +++ b/src/finiteArea/fields/edgeFields/edgeFieldsFwd.H @@ -0,0 +1,72 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + edgeFields + +Description + +SourceFiles + edgeFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeFieldsFwd_H +#define edgeFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +class edgeMesh; + +template<class Type> +class faePatchField; + +template<class Type, template<class> class PatchField, class GeoMesh> +class GeometricField; + +typedef GeometricField<scalar, faePatchField, edgeMesh> edgeScalarField; +typedef GeometricField<vector, faePatchField, edgeMesh> edgeVectorField; +typedef GeometricField<sphericalTensor, faePatchField, edgeMesh> + edgeSphericalTensorField; +typedef GeometricField<symmTensor, faePatchField, edgeMesh> edgeSymmTensorField; +typedef GeometricField<tensor, faePatchField, edgeMesh> edgeTensorField; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..5a28e331d549937e93badd010ff7056f66a5b880 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.C @@ -0,0 +1,153 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "basicSymmetryFaPatchField.H" +#include "symmTransformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + transformFaPatchField<Type>(p, iF) +{} + + +template<class Type> +basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField +( + const basicSymmetryFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + transformFaPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + transformFaPatchField<Type>(p, iF, dict) +{ + this->evaluate(); +} + + +template<class Type> +basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField +( + const basicSymmetryFaPatchField<Type>& ptf +) +: + transformFaPatchField<Type>(ptf) +{} + + +template<class Type> +basicSymmetryFaPatchField<Type>::basicSymmetryFaPatchField +( + const basicSymmetryFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + transformFaPatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Return gradient at boundary +template<class Type> +tmp<Field<Type> > basicSymmetryFaPatchField<Type>::snGrad() const +{ + vectorField nHat = this->patch().edgeNormals(); + return + ( + transform(I - 2.0*sqr(nHat), this->patchInternalField()) + - this->patchInternalField() + )*(this->patch().deltaCoeffs()/2.0); +} + + +// Evaluate the field on the patch +template<class Type> +void basicSymmetryFaPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + vectorField nHat = this->patch().edgeNormals(); + Field<Type>::operator= + ( + ( + this->patchInternalField() + + transform(I - 2.0*sqr(nHat), this->patchInternalField()) + )/2.0 + ); + + transformFaPatchField<Type>::evaluate(); +} + + +// Return defining fields +template<class Type> +tmp<Field<Type> > basicSymmetryFaPatchField<Type>::snGradTransformDiag() const +{ + vectorField nHat = this->patch().edgeNormals(); + vectorField diag(nHat.size()); + + diag.replace(vector::X, mag(nHat.component(vector::X))); + diag.replace(vector::Y, mag(nHat.component(vector::Y))); + diag.replace(vector::Z, mag(nHat.component(vector::Z))); + + return transformFieldMask<Type>(pow<vector, pTraits<Type>::rank>(diag)); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..e1fedec6d90b091b2c1eba2d5ba2b896995324a5 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchField.H @@ -0,0 +1,175 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::basicSymmetryFaPatchField + +Description + A symmetry patch + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + basicSymmetryFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef basicSymmetryFaPatchField_H +#define basicSymmetryFaPatchField_H + +#include "transformFaPatchField.H" +#include "symmetryFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class basicSymmetryFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class basicSymmetryFaPatchField +: + public transformFaPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(symmetryFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + basicSymmetryFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + basicSymmetryFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given basicSymmetryFaPatchField onto a new patch + basicSymmetryFaPatchField + ( + const basicSymmetryFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + basicSymmetryFaPatchField + ( + const basicSymmetryFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new basicSymmetryFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + basicSymmetryFaPatchField + ( + const basicSymmetryFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new basicSymmetryFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const; + + //- Evaluate the patch field + // Default argument needed to allow call in constructors + // HJ, 30/Jun/2009 + virtual void evaluate + ( + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + ); + + //- Return face-gradient transform diagonal + virtual tmp<Field<Type> > snGradTransformDiag() const; +}; + + +// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * // + +template<> +tmp<scalarField > basicSymmetryFaPatchField<scalar>::snGrad() const; + +template<> +void basicSymmetryFaPatchField<scalar>::evaluate +( + const Pstream::commsTypes commsType +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "basicSymmetryFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..6130c9bb4e45f2c826a33cfe85f8381e64b4ac3b --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchFields.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "basicSymmetryFaPatchFields.H" +#include "faPatchFields.H" +#include "areaFaMesh.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(basicSymmetry); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..e4871bd3e5904e5372e545101810f37ceeefa7e8 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef basicSymmetryFaPatchFields_H +#define basicSymmetryFaPatchFields_H + +#include "basicSymmetryFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(basicSymmetry) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchScalarField.C b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchScalarField.C new file mode 100644 index 0000000000000000000000000000000000000000..4317d76a266be60883919cb35dcd6dc739c83e37 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/basicSymmetry/basicSymmetryFaPatchScalarField.C @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "basicSymmetryFaPatchField.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<> +tmp<scalarField > basicSymmetryFaPatchField<scalar>::snGrad() const +{ + return tmp<scalarField >(new scalarField(size(), 0.0)); +} + + +template<> +void basicSymmetryFaPatchField<scalar>::evaluate(const Pstream::commsTypes) +{ + if (!updated()) + { + updateCoeffs(); + } + scalarField::operator=(patchInternalField()); + transformFaPatchField<scalar>::evaluate(); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..5fea0f97eca9d90735d5ccb8fe1c095f013b0606 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.C @@ -0,0 +1,236 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "calculatedFaPatchField.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +const word& faPatchField<Type>::calculatedType() +{ + return calculatedFaPatchField<Type>::typeName; +} + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +calculatedFaPatchField<Type>::calculatedFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF) +{} + + +template<class Type> +calculatedFaPatchField<Type>::calculatedFaPatchField +( + const calculatedFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +calculatedFaPatchField<Type>::calculatedFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF, Field<Type>("value", dict, p.size())) +{} + + +template<class Type> +calculatedFaPatchField<Type>::calculatedFaPatchField +( + const calculatedFaPatchField<Type>& ptf +) +: + faPatchField<Type>(ptf) +{} + + +template<class Type> +calculatedFaPatchField<Type>::calculatedFaPatchField +( + const calculatedFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf, iF) +{} + + +template<class Type> +template<class Type2> +tmp<faPatchField<Type> > faPatchField<Type>::NewCalculatedType +( + const faPatchField<Type2>& pf +) +{ + typename patchConstructorTable::iterator patchTypeCstrIter = + patchConstructorTablePtr_->find(pf.patch().type()); + + if (patchTypeCstrIter != patchConstructorTablePtr_->end()) + { + return patchTypeCstrIter() + ( + pf.patch(), + DimensionedField<Type, areaMesh>::null() + ); + } + else + { + return tmp<faPatchField<Type> > + ( + new calculatedFaPatchField<Type> + ( + pf.patch(), + DimensionedField<Type, areaMesh>::null() + ) + ); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<Field<Type> > calculatedFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& +) const +{ + FatalErrorIn + ( + "calculatedFaPatchField<Type>::" + "valueInternalCoeffs(const tmp<scalarField>&) const" + ) << "\n " + "valueInternalCoeffs cannot be called for a calculatedFaPatchField" + << "\n on patch " << this->patch().name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << "\n You are probably trying to solve for a field with a " + "default boundary condition." + << exit(FatalError); + + return *this; +} + + +template<class Type> +tmp<Field<Type> > calculatedFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& +) const +{ + FatalErrorIn + ( + "calculatedFaPatchField<Type>::" + "valueBoundaryCoeffs(const tmp<scalarField>&) const" + ) << "\n " + "valueBoundaryCoeffs cannot be called for a calculatedFaPatchField" + << "\n on patch " << this->patch().name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << "\n You are probably trying to solve for a field with a " + "default boundary condition." + << exit(FatalError); + + return *this; +} + + +template<class Type> +tmp<Field<Type> > calculatedFaPatchField<Type>::gradientInternalCoeffs() const +{ + FatalErrorIn + ( + "calculatedFaPatchField<Type>::" + "gradientInternalCoeffs() const" + ) << "\n " + "gradientInternalCoeffs cannot be called for a " + "calculatedFaPatchField" + << "\n on patch " << this->patch().name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << "\n You are probably trying to solve for a field with a " + "default boundary condition." + << exit(FatalError); + + return *this; +} + + +template<class Type> +tmp<Field<Type> > calculatedFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + FatalErrorIn + ( + "calculatedFaPatchField<Type>::" + "gradientBoundaryCoeffs() const" + ) << "\n " + "gradientBoundaryCoeffs cannot be called for a " + "calculatedFaPatchField" + << "\n on patch " << this->patch().name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << "\n You are probably trying to solve for a field with a " + "default boundary condition." + << exit(FatalError); + + return *this; +} + + +// Write +template<class Type> +void calculatedFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..afa4209bd1aa2a4ed3250d54f964ec16c72ecd1e --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchField.H @@ -0,0 +1,184 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + calculatedFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + calculatedFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef calculatedFaPatchField_H +#define calculatedFaPatchField_H + +#include "faPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class calculatedFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class calculatedFaPatchField +: + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("calculated"); + + + // Constructors + + //- Construct from patch and internal field + calculatedFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + calculatedFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given patchField<Type> onto a new patch + calculatedFaPatchField + ( + const calculatedFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + calculatedFaPatchField + ( + const calculatedFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new calculatedFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + calculatedFaPatchField + ( + const calculatedFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new calculatedFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return true; + } + + + // Evaluation functions + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "calculatedFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..d04b60212fc57fc810edf1fb401fa9fa4d6fe466 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFields.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "calculatedFaPatchFields.H" +#include "areaFaMesh.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(calculated); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..c72d998fd68f3370197e1d6e68797715888f4968 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFields.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + calculatedFaPatchFields + +Description + +SourceFiles + calculatedFaPatchFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef calculatedFaPatchFields_H +#define calculatedFaPatchFields_H + +#include "calculatedFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(calculated) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..a65743b7181e40022e9e176e727f9eff703128f7 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/calculated/calculatedFaPatchFieldsFwd.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + calculatedFaPatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef calculatedFaPatchFieldsFwd_H +#define calculatedFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class calculatedFaPatchField; + +makeFaPatchTypeFieldTypedefs(calculated) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..8c721fd5882f75fe7006203855019717c46adcfe --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C @@ -0,0 +1,190 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "coupledFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +coupledFaPatchField<Type>::coupledFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + lduInterfaceField(refCast<const lduInterface>(p)), + faPatchField<Type>(p, iF) +{} + + +template<class Type> +coupledFaPatchField<Type>::coupledFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const Field<Type>& f +) +: + lduInterfaceField(refCast<const lduInterface>(p)), + faPatchField<Type>(p, iF, f) +{} + + +template<class Type> +coupledFaPatchField<Type>::coupledFaPatchField +( + const coupledFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + lduInterfaceField(refCast<const lduInterface>(p)), + faPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +coupledFaPatchField<Type>::coupledFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + lduInterfaceField(refCast<const lduInterface>(p)), + faPatchField<Type>(p, iF, dict) +{} + + +template<class Type> +coupledFaPatchField<Type>::coupledFaPatchField +( + const coupledFaPatchField<Type>& ptf +) +: + lduInterfaceField(refCast<const lduInterface>(ptf.patch())), + faPatchField<Type>(ptf) +{} + + +template<class Type> +coupledFaPatchField<Type>::coupledFaPatchField +( + const coupledFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + lduInterfaceField(refCast<const lduInterface>(ptf.patch())), + faPatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<Field<Type> > coupledFaPatchField<Type>::snGrad() const +{ + return + (patchNeighbourField() - this->patchInternalField()) + *this->patch().deltaCoeffs(); +} + + +template<class Type> +void coupledFaPatchField<Type>::initEvaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } +} + + +template<class Type> +void coupledFaPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + Field<Type>::operator= + ( + this->patch().weights()*this->patchInternalField() + + (1.0 - this->patch().weights())*patchNeighbourField() + ); +} + + +template<class Type> +tmp<Field<Type> > coupledFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& w +) const +{ + return Type(pTraits<Type>::one)*w; +} + + +template<class Type> +tmp<Field<Type> > coupledFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& w +) const +{ + return Type(pTraits<Type>::one)*(1.0 - w); +} + + +template<class Type> +tmp<Field<Type> > coupledFaPatchField<Type>::gradientInternalCoeffs() const +{ + return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs(); +} + + +template<class Type> +tmp<Field<Type> > coupledFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return -gradientInternalCoeffs(); +} + + +template<class Type> +void coupledFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..eb33453e11fda0f4f59cc6553d9284bebb6623fd --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H @@ -0,0 +1,230 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + coupledFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + coupledFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaPatchField_H +#define coupledFaPatchField_H + +#include "lduInterfaceField.H" +#include "faPatchField.H" +#include "coupledFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class coupledFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class coupledFaPatchField +: + public lduInterfaceField, + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(coupledFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + coupledFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch and internal field and patch field + coupledFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const Field<Type>& + ); + + //- Construct from patch, internal field and dictionary + coupledFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given coupledFaPatchField onto a new patch + coupledFaPatchField + ( + const coupledFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + coupledFaPatchField + ( + const coupledFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const = 0; + + //- Construct as copy setting internal field reference + coupledFaPatchField + ( + const coupledFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& + ) const = 0; + + + // Member functions + + // Access + + //- Return true if this patch field is derived from + // coupledFaPatchField<Type>. + virtual bool coupled() const + { + return true; + } + + //- Return neighbour field of internal field + virtual tmp<Field<Type> > patchNeighbourField() const = 0; + + + // Evaluation functions + + //- Return patch-normal gradient + virtual tmp<Field<Type> > snGrad() const; + + //- Initialise the evaluation of the patch field + virtual void initEvaluate + ( + const Pstream::commsTypes commsType + ); + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType + ); + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + // Coupled interface functionality + + //- Transform given patch component field + virtual void transformCoupleField + ( + scalarField& f, + const direction cmpt + ) const = 0; + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction, + const Pstream::commsTypes commsType + ) const = 0; + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + Field<Type>& result, + const bool add, + const Field<Type>&, + const scalarField& coeffs, + const Pstream::commsTypes commsType + ) const = 0; + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "coupledFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..93dc32f601718172dc4cde4017298d0a0df0a54a --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "coupledFaPatchFields.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFieldsTypeName(coupled); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..32bbef426fbe4e55535bbcf603cd46c775f04575 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaPatchFields_H +#define coupledFaPatchFields_H + +#include "coupledFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(coupled) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..9d468f06a52c0181c4d960ecf9b50a5cd0491385 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaPatchFieldsFwd_H +#define coupledFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class coupledFaPatchField; + +makeFaPatchTypeFieldTypedefs(coupled) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..d48684fafdaaa165bf1f90cc88fee8600b9a055a --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C @@ -0,0 +1,199 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "fixedGradientFaPatchField.H" +#include "dictionary.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +fixedGradientFaPatchField<Type>::fixedGradientFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF), + gradient_(p.size(), pTraits<Type>::zero) +{} + + +template<class Type> +fixedGradientFaPatchField<Type>::fixedGradientFaPatchField +( + const fixedGradientFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper), + gradient_(ptf.gradient_, mapper) +{} + + +template<class Type> +fixedGradientFaPatchField<Type>::fixedGradientFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF), + gradient_("gradient", dict, p.size()) +{ + evaluate(); +} + + +template<class Type> +fixedGradientFaPatchField<Type>::fixedGradientFaPatchField +( + const fixedGradientFaPatchField<Type>& ptf +) +: + faPatchField<Type>(ptf), + gradient_(ptf.gradient_) +{} + + +template<class Type> +fixedGradientFaPatchField<Type>::fixedGradientFaPatchField +( + const fixedGradientFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf, iF), + gradient_(ptf.gradient_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void fixedGradientFaPatchField<Type>::autoMap +( + const faPatchFieldMapper& m +) +{ + Field<Type>::autoMap(m); + gradient_.autoMap(m); +} + + +template<class Type> +void fixedGradientFaPatchField<Type>::rmap +( + const faPatchField<Type>& ptf, + const labelList& addr +) +{ + faPatchField<Type>::rmap(ptf, addr); + + const fixedGradientFaPatchField<Type>& fgptf = + refCast<const fixedGradientFaPatchField<Type> >(ptf); + + gradient_.rmap(fgptf.gradient_, addr); +} + + +template<class Type> +void fixedGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + Field<Type>::operator= + ( + this->patchInternalField() + gradient_/this->patch().deltaCoeffs() + ); + + faPatchField<Type>::evaluate(); +} + + +template<class Type> +tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& +) const +{ + return tmp<Field<Type> >(new Field<Type>(this->size(), pTraits<Type>::one)); +} + + +template<class Type> +tmp<Field<Type> > fixedGradientFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& +) const +{ + return gradient()/this->patch().deltaCoeffs(); +} + + +template<class Type> +tmp<Field<Type> > +fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const +{ + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::zero) + ); +} + + +template<class Type> +tmp<Field<Type> > +fixedGradientFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return gradient(); +} + + +template<class Type> +void fixedGradientFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + gradient_.writeEntry("gradient", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..0b801f9f0db387a24afbd7ba84614ee91e7a9bac --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.H @@ -0,0 +1,221 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedGradientFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + fixedGradientFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedGradientFaPatchField_H +#define fixedGradientFaPatchField_H + +#include "faPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedGradientFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class fixedGradientFaPatchField +: + public faPatchField<Type> +{ + // Private data + + Field<Type> gradient_; + + +public: + + //- Runtime type information + TypeName("fixedGradient"); + + + // Constructors + + //- Construct from patch and internal field + fixedGradientFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + fixedGradientFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given fixedGradientFaPatchField<Type> + // onto a new patch + fixedGradientFaPatchField + ( + const fixedGradientFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + fixedGradientFaPatchField + ( + const fixedGradientFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new fixedGradientFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + fixedGradientFaPatchField + ( + const fixedGradientFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new fixedGradientFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Return defining fields + + //- Return gradient at boundary + virtual Field<Type>& gradient() + { + return gradient_; + } + + virtual const Field<Type>& gradient() const + { + return gradient_; + } + + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ); + + //- Reverse map the given faPatchField onto this faPatchField + virtual void rmap + ( + const faPatchField<Type>&, + const labelList& + ); + + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const + { + return gradient_; + } + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + ); + + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "fixedGradientFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..12cd211755b90410aeb043a6bcce4644c32fce33 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFields.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "fixedGradientFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(fixedGradient); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..239d691a1d8e927711525fcdbb08c243278dd4a7 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFields.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedGradientFaPatchFields + +Description + +SourceFiles + fixedGradientFaPatchFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedGradientFaPatchFields_H +#define fixedGradientFaPatchFields_H + +#include "fixedGradientFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(fixedGradient) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..6c65004ba672f112ca4e569ad77425269aac66de --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchFieldsFwd.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedGradientFaPatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedGradientFaPatchFieldsFwd_H +#define fixedGradientFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class fixedGradientFaPatchField; + +makeFaPatchTypeFieldTypedefs(fixedGradient) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..33e8e46721cfd46fc8ac93e6f97aaeeabd6ee538 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "fixedValueFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +fixedValueFaPatchField<Type>::fixedValueFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF) +{} + + +template<class Type> +fixedValueFaPatchField<Type>::fixedValueFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF, Field<Type>("value", dict, p.size())) +{} + + +template<class Type> +fixedValueFaPatchField<Type>::fixedValueFaPatchField +( + const fixedValueFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf, iF) +{} + + +template<class Type> +fixedValueFaPatchField<Type>::fixedValueFaPatchField +( + const fixedValueFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +fixedValueFaPatchField<Type>::fixedValueFaPatchField +( + const fixedValueFaPatchField<Type>& ptf +) +: + faPatchField<Type>(ptf) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<Field<Type> > fixedValueFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& +) const +{ + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::zero) + ); +} + + +template<class Type> +tmp<Field<Type> > fixedValueFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& +) const +{ + return *this; +} + + +template<class Type> +tmp<Field<Type> > fixedValueFaPatchField<Type>::gradientInternalCoeffs() const +{ + return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs(); +} + + +template<class Type> +tmp<Field<Type> > fixedValueFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return this->patch().deltaCoeffs()*(*this); +} + + +// Write +template<class Type> +void fixedValueFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..bdee03dad5a21918a01eae396dbe5502805ba3ec --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.H @@ -0,0 +1,208 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedValueFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + fixedValueFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueFaPatchField_H +#define fixedValueFaPatchField_H + +#include "faPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedValueFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class fixedValueFaPatchField +: + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("fixedValue"); + + + // Constructors + + //- Construct from patch and internal field + fixedValueFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + fixedValueFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given fixedValueFaPatchField<Type> + // onto a new patch + fixedValueFaPatchField + ( + const fixedValueFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + fixedValueFaPatchField + ( + const fixedValueFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new fixedValueFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + fixedValueFaPatchField + ( + const fixedValueFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new fixedValueFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return true; + } + + + // Evaluation functions + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + //- Write + virtual void write(Ostream&) const; + + + // Member operators + + virtual void operator=(const UList<Type>&) {} + + virtual void operator=(const faPatchField<Type>&) {} + virtual void operator+=(const faPatchField<Type>&) {} + virtual void operator-=(const faPatchField<Type>&) {} + virtual void operator*=(const faPatchField<scalar>&) {} + virtual void operator/=(const faPatchField<scalar>&) {} + + virtual void operator+=(const Field<Type>&) {} + virtual void operator-=(const Field<Type>&) {} + + virtual void operator*=(const Field<scalar>&) {} + virtual void operator/=(const Field<scalar>&) {} + + virtual void operator=(const Type&) {} + virtual void operator+=(const Type&) {} + virtual void operator-=(const Type&) {} + virtual void operator*=(const scalar) {} + virtual void operator/=(const scalar) {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "fixedValueFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..7c8697492fca462e50d6c87eaf43e203b518ce6a --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFields.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "fixedValueFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(fixedValue); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..9f4b372eb1189d5bed4fd75107b70458789d0944 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueFaPatchFields_H +#define fixedValueFaPatchFields_H + +#include "fixedValueFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(fixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..f6530ceccc6c5eb557191a6c8371eadbcf131ab8 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueFaPatchFieldsFwd_H +#define fixedValueFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class fixedValueFaPatchField; + +makeFaPatchTypeFieldTypedefs(fixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..83fb2184701aadc15f36541e3fd7c8a47272de02 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.C @@ -0,0 +1,232 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "mixedFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +mixedFaPatchField<Type>::mixedFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF), + refValue_(p.size()), + refGrad_(p.size()), + valueFraction_(p.size()) +{} + + +template<class Type> +mixedFaPatchField<Type>::mixedFaPatchField +( + const mixedFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper), + refValue_(ptf.refValue_, mapper), + refGrad_(ptf.refGrad_, mapper), + valueFraction_(ptf.valueFraction_, mapper) +{} + + +template<class Type> +mixedFaPatchField<Type>::mixedFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF), + refValue_("refValue", dict, p.size()), + refGrad_("refGradient", dict, p.size()), + valueFraction_("valueFraction", dict, p.size()) +{ + evaluate(); +} + + +template<class Type> +mixedFaPatchField<Type>::mixedFaPatchField +( + const mixedFaPatchField<Type>& ptf +) +: + faPatchField<Type>(ptf), + refValue_(ptf.refValue_), + refGrad_(ptf.refGrad_), + valueFraction_(ptf.valueFraction_) +{} + + +template<class Type> +mixedFaPatchField<Type>::mixedFaPatchField +( + const mixedFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf, iF), + refValue_(ptf.refValue_), + refGrad_(ptf.refGrad_), + valueFraction_(ptf.valueFraction_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void mixedFaPatchField<Type>::autoMap +( + const faPatchFieldMapper& m +) +{ + Field<Type>::autoMap(m); + refValue_.autoMap(m); + refGrad_.autoMap(m); + valueFraction_.autoMap(m); +} + + +template<class Type> +void mixedFaPatchField<Type>::rmap +( + const faPatchField<Type>& ptf, + const labelList& addr +) +{ + faPatchField<Type>::rmap(ptf, addr); + + const mixedFaPatchField<Type>& mptf = + refCast<const mixedFaPatchField<Type> >(ptf); + + refValue_.rmap(mptf.refValue_, addr); + refGrad_.rmap(mptf.refGrad_, addr); + valueFraction_.rmap(mptf.valueFraction_, addr); +} + + +template<class Type> +void mixedFaPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + Field<Type>::operator= + ( + valueFraction_*refValue_ + + + (1.0 - valueFraction_)* + ( + this->patchInternalField() + + refGrad_/this->patch().deltaCoeffs() + ) + ); + + faPatchField<Type>::evaluate(); +} + + +template<class Type> +tmp<Field<Type> > mixedFaPatchField<Type>::snGrad() const +{ + return + valueFraction_ + *(refValue_ - this->patchInternalField()) + *this->patch().deltaCoeffs() + + (1.0 - valueFraction_)*refGrad_; +} + + +template<class Type> +tmp<Field<Type> > mixedFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& +) const +{ + return Type(pTraits<Type>::one)*(1.0 - valueFraction_); + +} + + +template<class Type> +tmp<Field<Type> > mixedFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& +) const +{ + return + valueFraction_*refValue_ + + (1.0 - valueFraction_)*refGrad_/this->patch().deltaCoeffs(); +} + + +template<class Type> +tmp<Field<Type> > mixedFaPatchField<Type>::gradientInternalCoeffs() const +{ + return -Type(pTraits<Type>::one)*valueFraction_*this->patch().deltaCoeffs(); +} + + +template<class Type> +tmp<Field<Type> > mixedFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return + valueFraction_*this->patch().deltaCoeffs()*refValue_ + + (1.0 - valueFraction_)*refGrad_; +} + + +template<class Type> +void mixedFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + refValue_.writeEntry("refValue", os); + refGrad_.writeEntry("refGradient", os); + valueFraction_.writeEntry("valueFraction", os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..16ae6ca0cb04e9eccd2967afb95509c5c5024471 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchField.H @@ -0,0 +1,276 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + mixedFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + mixedFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef mixedFaPatchField_H +#define mixedFaPatchField_H + +#include "faPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class mixedFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class mixedFaPatchField +: + public faPatchField<Type> +{ + // Private data + + //- Value field + Field<Type> refValue_; + + //- Normal gradient field + Field<Type> refGrad_; + + //- Fraction (0-1) of value used for boundary condition + scalarField valueFraction_; + + +public: + + //- Runtime type information + TypeName("mixed"); + + + // Constructors + + //- Construct from patch and internal field + mixedFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + mixedFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given mixedFaPatchField onto a new patch + mixedFaPatchField + ( + const mixedFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + mixedFaPatchField + ( + const mixedFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new mixedFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + mixedFaPatchField + ( + const mixedFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new mixedFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return true; + } + + + // Return defining fields + + virtual Field<Type>& refValue() + { + return refValue_; + } + + virtual const Field<Type>& refValue() const + { + return refValue_; + } + + virtual Field<Type>& refGrad() + { + return refGrad_; + } + + virtual const Field<Type>& refGrad() const + { + return refGrad_; + } + + virtual scalarField& valueFraction() + { + return valueFraction_; + } + + virtual const scalarField& valueFraction() const + { + return valueFraction_; + } + + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ); + + //- Reverse map the given faPatchField onto this faPatchField + virtual void rmap + ( + const faPatchField<Type>&, + const labelList& + ); + + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const; + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + ); + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + //- Write + virtual void write(Ostream&) const; + + + // Member operators + + virtual void operator=(const UList<Type>&) {} + + virtual void operator=(const faPatchField<Type>&) {} + virtual void operator+=(const faPatchField<Type>&) {} + virtual void operator-=(const faPatchField<Type>&) {} + virtual void operator*=(const faPatchField<scalar>&) {} + virtual void operator/=(const faPatchField<scalar>&) {} + + virtual void operator+=(const Field<Type>&) {} + virtual void operator-=(const Field<Type>&) {} + + virtual void operator*=(const Field<scalar>&) {} + virtual void operator/=(const Field<scalar>&) {} + + virtual void operator=(const Type&) {} + virtual void operator+=(const Type&) {} + virtual void operator-=(const Type&) {} + virtual void operator*=(const scalar) {} + virtual void operator/=(const scalar) {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "mixedFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..bb95f3812c7693aa1bada5ac8dcd2804c4f0fa48 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "mixedFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(mixed); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..89a5280aec4d9c6c7962e60dc6c1bfe8dcccc1ae --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef mixedFaPatchFields_H +#define mixedFaPatchFields_H + +#include "mixedFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(mixed) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..a40a2416fc39e08928008721cfa120223f6a3bc3 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/mixed/mixedFaPatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef mixedFaPatchFieldsFwd_H +#define mixedFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class mixedFaPatchField; + +makeFaPatchTypeFieldTypedefs(mixed) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..fcf518d7654d1398065becda317ec262524d878a --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.C @@ -0,0 +1,154 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "transformFaPatchField.H" +#include "IOstreams.H" +#include "transformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +transformFaPatchField<Type>::transformFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF) +{} + + +template<class Type> +transformFaPatchField<Type>::transformFaPatchField +( + const transformFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +transformFaPatchField<Type>::transformFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF, dict) +{} + + +template<class Type> +transformFaPatchField<Type>::transformFaPatchField +( + const transformFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Return the matrix diagonal coefficients corresponding to the +// evaluation of the value of this patchField +template<class Type> +tmp<Field<Type> > transformFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& +) const +{ + return pTraits<Type>::one - snGradTransformDiag(); +} + + +// Return the matrix source coefficients corresponding to the +// evaluation of the value of this patchField +template<class Type> +tmp<Field<Type> > transformFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& +) const +{ + return + *this + - cmptMultiply + ( + valueInternalCoeffs(this->patch().weights()), + this->patchInternalField() + ); +} + + +// Return the matrix diagonal coefficients corresponding to the +// evaluation of the gradient of this patchField +template<class Type> +tmp<Field<Type> > transformFaPatchField<Type>::gradientInternalCoeffs() const +{ + return -this->patch().deltaCoeffs()*snGradTransformDiag(); +} + + +// Return the matrix source coefficients corresponding to the +// evaluation of the gradient of this patchField +template<class Type> +tmp<Field<Type> > transformFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return + snGrad() + - cmptMultiply(gradientInternalCoeffs(), this->patchInternalField()); +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Type> +void transformFaPatchField<Type>::operator= +( + const faPatchField<Type>& ptf +) +{ + this->evaluate(); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..9b51107305625e071afed9fe5ebd41b4bc8cb936 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchField.H @@ -0,0 +1,170 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + transformFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + transformFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef transformFaPatchField_H +#define transformFaPatchField_H + +#include "faPatchField.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class transformFvPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class transformFaPatchField +: + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("transform"); + + + // Constructors + + //- Construct from patch and internal field + transformFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + transformFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given transformFaPatchField<Type> + // onto a new patch + transformFaPatchField + ( + const transformFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const = 0; + + //- Construct as copy setting internal field reference + transformFaPatchField + ( + const transformFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& + ) const = 0; + + + // Member functions + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const = 0; + + //- Return face-gradient transform diagonal + virtual tmp<Field<Type> > snGradTransformDiag() const = 0; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + // Member operators + + virtual void operator=(const faPatchField<Type>&); +}; + + +// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * // + +template<> +tmp<scalarField > transformFaPatchField<scalar>::gradientInternalCoeffs() const; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "transformFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..eabaa7ef0277bdbd50dee9933c1b8ecd751ef8bb --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFields.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "transformFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFieldsTypeName(transform); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..048321a45d20797627aff507a87bced0fccdbf2c --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFields.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + transformFaPatchFields + +Description + +SourceFiles + transformFaPatchFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef transformFaPatchFields_H +#define transformFaPatchFields_H + +#include "transformFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(transform) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..7a638052a8f91ac9b86e3283f09bdd436fe81bd4 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchFieldsFwd.H @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + transformFvPatchField + +\*---------------------------------------------------------------------------*/ + +#ifndef transformFaPatchFieldsFwd_H +#define transformFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class transformFaPatchField; + +// typedef transformFaPatchField<scalar> transformFaPatchScalarField; +// typedef transformFaPatchField<vector> transformFaPatchVectorField; +// typedef transformFaPatchField<tensor> transformFaPatchTensorField; + +// template<class Type> class transformFaPatchField; + +makeFaPatchTypeFieldTypedefs(transform) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchScalarField.C b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchScalarField.C new file mode 100644 index 0000000000000000000000000000000000000000..57fd7c7a90c97ba4930e8ea6226b3ae6b322d059 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/transform/transformFaPatchScalarField.C @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "transformFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Return the matrix diagonal coefficients corresponding to the +// evaluation of the gradient of this patchField +template<> +tmp<scalarField > transformFaPatchField<scalar>::gradientInternalCoeffs() const +{ + return tmp<scalarField >(new scalarField(size(), 0.0)); +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..68e1ab76fd596bb448233069475a2ec309687f44 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C @@ -0,0 +1,162 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "zeroGradientFaPatchField.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +zeroGradientFaPatchField<Type>::zeroGradientFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF) +{} + + +template<class Type> +zeroGradientFaPatchField<Type>::zeroGradientFaPatchField +( + const zeroGradientFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +zeroGradientFaPatchField<Type>::zeroGradientFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& +) +: + faPatchField<Type>(p, iF) +{ + faPatchField<Type>::operator=(this->patchInternalField()); +} + + +template<class Type> +zeroGradientFaPatchField<Type>::zeroGradientFaPatchField +( + const zeroGradientFaPatchField& zgpf +) +: + faPatchField<Type>(zgpf) +{} + + +template<class Type> +zeroGradientFaPatchField<Type>::zeroGradientFaPatchField +( + const zeroGradientFaPatchField& zgpf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(zgpf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void zeroGradientFaPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + this->operator==(this->patchInternalField()); + faPatchField<Type>::evaluate(); +} + + +template<class Type> +tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& +) const +{ + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::one) + ); +} + + +template<class Type> +tmp<Field<Type> > zeroGradientFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& +) const +{ + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::zero) + ); +} + + +template<class Type> +tmp<Field<Type> > zeroGradientFaPatchField<Type>::gradientInternalCoeffs() const +{ + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::zero) + ); +} + + +template<class Type> +tmp<Field<Type> > zeroGradientFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::zero) + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..21c2a8bfeacb1c306882b92b780c6b2b203f6b46 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H @@ -0,0 +1,190 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + zeroGradientFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + zeroGradientFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef zeroGradientFaPatchField_H +#define zeroGradientFaPatchField_H + +#include "faPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class zeroGradientFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class zeroGradientFaPatchField +: + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("zeroGradient"); + + + // Constructors + + //- Construct from patch and internal field + zeroGradientFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + zeroGradientFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given zeroGradientFaPatchField<Type> + // onto a new patch + zeroGradientFaPatchField + ( + const zeroGradientFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + zeroGradientFaPatchField + ( + const zeroGradientFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new zeroGradientFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + zeroGradientFaPatchField + ( + const zeroGradientFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new zeroGradientFaPatchField<Type>(*this, iF) + ); + } + + + //- Destructor + virtual ~zeroGradientFaPatchField<Type>() + {} + + + // Member functions + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const + { + return tmp<Field<Type> > + ( + new Field<Type>(this->size(), pTraits<Type>::zero) + ); + } + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + ); + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "zeroGradientFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFields.C b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..3bff218aff1b2babadfce8796c03b014cb0fa6f8 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFields.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "zeroGradientFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(zeroGradient); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFields.H b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..d6ee8ea3a5d51189afad04fefee366d88b61a9fc --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFields.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + zeroGradientFaPatchFields + +Description + +SourceFiles + zeroGradientFaPatchFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef zeroGradientFaPatchFields_H +#define zeroGradientFaPatchFields_H + +#include "zeroGradientFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(zeroGradient) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..7ee71349f3c4c7f562b8d2ac6282bfa4ead26a5e --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchFieldsFwd.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + zeroGradientFaPatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef zeroGradientFaPatchFieldsFwd_H +#define zeroGradientFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class zeroGradientFaPatchField; + +makeFaPatchTypeFieldTypedefs(zeroGradient) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..aa7f01600854262924984234bfd39c88b66d39de --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C @@ -0,0 +1,267 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "cyclicFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +cyclicFaPatchField<Type>::cyclicFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + coupledFaPatchField<Type>(p, iF), + cyclicPatch_(refCast<const cyclicFaPatch>(p)) +{} + + +template<class Type> +cyclicFaPatchField<Type>::cyclicFaPatchField +( + const cyclicFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + coupledFaPatchField<Type>(ptf, p, iF, mapper), + cyclicPatch_(refCast<const cyclicFaPatch>(p)) +{ + if (!isType<cyclicFaPatch>(this->patch())) + { + FatalErrorIn + ( + "cyclicFaPatchField<Type>::cyclicFaPatchField\n" + "(\n" + " const cyclicFaPatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, areaMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +cyclicFaPatchField<Type>::cyclicFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + coupledFaPatchField<Type>(p, iF, dict), + cyclicPatch_(refCast<const cyclicFaPatch>(p)) +{ + if (!isType<cyclicFaPatch>(p)) + { + FatalIOErrorIn + ( + "cyclicFaPatchField<Type>::cyclicFaPatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } + + this->evaluate(Pstream::commsTypes::blocking); +} + + +template<class Type> +cyclicFaPatchField<Type>::cyclicFaPatchField +( + const cyclicFaPatchField<Type>& ptf +) +: + cyclicLduInterfaceField(), + coupledFaPatchField<Type>(ptf), + cyclicPatch_(ptf.cyclicPatch_) +{} + + +template<class Type> +cyclicFaPatchField<Type>::cyclicFaPatchField +( + const cyclicFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + coupledFaPatchField<Type>(ptf, iF), + cyclicPatch_(ptf.cyclicPatch_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<Field<Type> > cyclicFaPatchField<Type>::patchNeighbourField() const +{ + const Field<Type>& iField = this->internalField(); + const labelUList& faceCells = cyclicPatch_.faceCells(); + + tmp<Field<Type> > tpnf(new Field<Type>(this->size())); + Field<Type>& pnf = tpnf.ref(); + + label sizeby2 = this->size()/2; + + if (doTransform()) + { + for (label facei=0; facei<sizeby2; facei++) + { + pnf[facei] = transform + ( + forwardT()[0], iField[faceCells[facei + sizeby2]] + ); + + pnf[facei + sizeby2] = transform + ( + reverseT()[0], iField[faceCells[facei]] + ); + } + } + else + { + for (label facei=0; facei<sizeby2; facei++) + { + pnf[facei] = iField[faceCells[facei + sizeby2]]; + pnf[facei + sizeby2] = iField[faceCells[facei]]; + } + } + + return tpnf; +} + + +template<class Type> +void cyclicFaPatchField<Type>::updateInterfaceMatrix +( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction cmpt, + const Pstream::commsTypes commsType +) const +{ + scalarField pnf(this->size()); + + label sizeby2 = this->size()/2; + const labelUList& faceCells = cyclicPatch_.faceCells(); + + for (label facei = 0; facei < sizeby2; facei++) + { + pnf[facei] = psiInternal[faceCells[facei + sizeby2]]; + pnf[facei + sizeby2] = psiInternal[faceCells[facei]]; + } + + // Transform according to the transformation tensors + transformCoupleField(pnf, cmpt); + + // Multiply the field by coefficients and add into the result + if (add) + { + forAll(faceCells, elemI) + { + result[faceCells[elemI]] += coeffs[elemI]*pnf[elemI]; + } + } + else + { + forAll(faceCells, elemI) + { + result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI]; + } + } +} + + +template<class Type> +void cyclicFaPatchField<Type>::updateInterfaceMatrix +( + Field<Type>& result, + const bool add, + const Field<Type>& psiInternal, + const scalarField& coeffs, + const Pstream::commsTypes commsType +) const +{ + Field<Type> pnf(this->size()); + + label sizeby2 = this->size()/2; + const labelUList& faceCells = cyclicPatch_.faceCells(); + + for (label facei = 0; facei < sizeby2; facei++) + { + pnf[facei] = psiInternal[faceCells[facei + sizeby2]]; + pnf[facei + sizeby2] = psiInternal[faceCells[facei]]; + } + + // Multiply the field by coefficients and add into the result + if (add) + { + forAll(faceCells, elemI) + { + result[faceCells[elemI]] += coeffs[elemI]*pnf[elemI]; + } + } + else + { + forAll(faceCells, elemI) + { + result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI]; + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..88f0ef002f625cde7425a6a3d0e1439104732165 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H @@ -0,0 +1,240 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::cyclicFaPatchField + +Description + Foam::cyclicFaPatchField + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + cyclicFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaPatchField_H +#define cyclicFaPatchField_H + +#include "coupledFaPatchField.H" +#include "cyclicLduInterfaceField.H" +#include "cyclicFaPatch.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cyclicFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class cyclicFaPatchField +: + virtual public cyclicLduInterfaceField, + public coupledFaPatchField<Type> +{ + // Private data + + //- Local reference cast into the cyclic patch + const cyclicFaPatch& cyclicPatch_; + + + // Private member functions + + //- Return neighbour side field given internal fields + template<class Type2> + tmp<Field<Type2> > neighbourSideField + ( + const Field<Type2>& + ) const; + + +public: + + //- Runtime type information + TypeName(cyclicFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + cyclicFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + cyclicFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given cyclicFaPatchField onto a new patch + cyclicFaPatchField + ( + const cyclicFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + cyclicFaPatchField + ( + const cyclicFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new cyclicFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + cyclicFaPatchField + ( + const cyclicFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new cyclicFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Retirn local reference cast into the cyclic patch + const cyclicFaPatch& cyclicPatch() const + { + return cyclicPatch_; + } + + + // Evaluation functions + + //- Return neighbour coupled given internal cell data + virtual tmp<Field<Type> > patchNeighbourField() const; + + + // Coupled interface functionality + + //- Transform neighbour field + virtual void transformCoupleField + ( + scalarField& f, + const direction cmpt + ) const + { + cyclicLduInterfaceField::transformCoupleField(f, cmpt); + } + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction cmpt, + const Pstream::commsTypes commsType + ) const; + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + Field<Type>& result, + const bool add, + const Field<Type>&, + const scalarField& coeffs, + const Pstream::commsTypes commsType + ) const; + + + //- Cyclic coupled interface functions + + //- Does the patch field perform the transfromation + virtual bool doTransform() const + { + return !(cyclicPatch_.parallel() || pTraits<Type>::rank == 0); + } + + //- Return face transformation tensor + virtual const tensorField& forwardT() const + { + return cyclicPatch_.forwardT(); + } + + //- Return neighbour-cell transformation tensor + virtual const tensorField& reverseT() const + { + return cyclicPatch_.reverseT(); + } + + //- Return rank of component for transform + virtual int rank() const + { + return pTraits<Type>::rank; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "cyclicFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFields.C b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..f8d98051e55e3db6bf2e9af9b8741b0d95ba84ca --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFields.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "cyclicFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFaMesh.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(cyclic); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFields.H b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..35be1d46374abf8b5ea14d4a70e02494c94da829 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaPatchFields_H +#define cyclicFaPatchFields_H + +#include "cyclicFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(cyclic) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..2548b6fac3beabc8d25f35c994552e479717626c --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchFieldsFwd.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaPatchFieldsFwd_H +#define cyclicFaPatchFieldsFwd_H + +// #include "faPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class cyclicFaPatchField; + +makeFaPatchTypeFieldTypedefs(cyclic) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..c2a1dee752cb1f3b5e4bbdf44263c39400f6e434 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.C @@ -0,0 +1,167 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "emptyFaPatchField.H" +#include "faPatchFieldMapper.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +emptyFaPatchField<Type>::emptyFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF, Field<Type>(0)) +{} + + +template<class Type> +emptyFaPatchField<Type>::emptyFaPatchField +( + const emptyFaPatchField<Type>&, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& +) +: + faPatchField<Type>(p, iF, Field<Type>(0)) +{ + if (!isType<emptyFaPatch>(p)) + { + FatalErrorIn + ( + "emptyFaPatchField<Type>::emptyFaPatchField\n" + "(\n" + " const emptyFaPatchField<Type>&,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, areaMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +emptyFaPatchField<Type>::emptyFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF, Field<Type>(0)) +{ + if (typeid(p) != typeid(emptyFaPatch)) + { + FatalIOErrorIn + ( + "emptyFaPatchField<Type>::emptyFaPatchField\n" + "(\n" + " const faPatch& p,\n" + " const DimensionedField<Type, areaMesh>& iF,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +emptyFaPatchField<Type>::emptyFaPatchField +( + const emptyFaPatchField<Type>& ptf +) +: + faPatchField<Type> + ( + ptf.patch(), + ptf.dimensionedInternalField(), + Field<Type>(0) + ) +{} + + +template<class Type> +emptyFaPatchField<Type>::emptyFaPatchField +( + const emptyFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf.patch(), iF, Field<Type>(0)) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void emptyFaPatchField<Type>::updateCoeffs() +{ + // ZT, 26/06/2010, bug-fix for faMesh of zero size + if (this->dimensionedInternalField().mesh().nFaces()) + { + if + ( + this->patch().faPatch::size() + % this->dimensionedInternalField().mesh().nFaces() + ) + { + FatalErrorIn("emptyFaPatchField<Type>::updateCoeffs()") + << "This mesh contains patches of type empty but is not 1D or 2D\n" + " by virtue of the fact that the number of faces of this\n" + " empty patch is not divisible by the number of cells." + << exit(FatalError); + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..fc23c61a187473d625d6d84da2af9365b6606fac --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchField.H @@ -0,0 +1,206 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + emptyFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + emptyFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaPatchField_H +#define emptyFaPatchField_H + +#include "faPatchField.H" +#include "emptyFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class emptyFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class emptyFaPatchField +: + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(emptyFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + emptyFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + emptyFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given emptyFaPatchField onto a new patch + emptyFaPatchField + ( + const emptyFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + emptyFaPatchField + ( + const emptyFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new emptyFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + emptyFaPatchField + ( + const emptyFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new emptyFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ) + {} + + //- Reverse map the given faPatchField onto this faPatchField + virtual void rmap + ( + const faPatchField<Type>&, + const labelList& + ) + {} + + + // Evaluation functions + + //- Update the coefficients associated with the patch field + // This only checks to see the case is actually 1D or 2D + // for which this boundary condition is valid + void updateCoeffs(); + + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const + { + return tmp<Field<Type> >(new Field<Type>(0)); + } + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const + { + return tmp<Field<Type> >(new Field<Type>(0)); + } + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + tmp<Field<Type> > gradientInternalCoeffs() const + { + return tmp<Field<Type> >(new Field<Type>(0)); + } + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + tmp<Field<Type> > gradientBoundaryCoeffs() const + { + return tmp<Field<Type> >(new Field<Type>(0)); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "emptyFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFields.C b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..87a3c879362dfadfd2066e5be6b4e144a8e7f555 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFields.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "emptyFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(empty); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFields.H b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..d9e086fe0900dc247092958c7bd5f34bb1f02325 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFields.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + emptyFaPatchFields + +Description + +SourceFiles + emptyFaPatchFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaPatchFields_H +#define emptyFaPatchFields_H + +#include "emptyFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(empty) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..7f63458ba409f5800159ca0149c1aa4918807ddb --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/empty/emptyFaPatchFieldsFwd.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + emptyFaPatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaPatchFieldsFwd_H +#define emptyFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class emptyFaPatchField; + +makeFaPatchTypeFieldTypedefs(empty) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..810d20968137229562502438bff69ac25d38330f --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C @@ -0,0 +1,328 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "processorFaPatchField.H" +#include "processorFaPatch.H" +#include "IPstream.H" +#include "OPstream.H" +#include "demandDrivenData.H" +#include "transformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +processorFaPatchField<Type>::processorFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + coupledFaPatchField<Type>(p, iF), + procPatch_(refCast<const processorFaPatch>(p)) +{} + + +template<class Type> +processorFaPatchField<Type>::processorFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const Field<Type>& f +) +: + coupledFaPatchField<Type>(p, iF, f), + procPatch_(refCast<const processorFaPatch>(p)) +{} + + +// Construct by mapping given processorFaPatchField<Type> +template<class Type> +processorFaPatchField<Type>::processorFaPatchField +( + const processorFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + coupledFaPatchField<Type>(ptf, p, iF, mapper), + procPatch_(refCast<const processorFaPatch>(p)) +{ + if (!isType<processorFaPatch>(this->patch())) + { + FatalErrorIn + ( + "processorFaPatchField<Type>::processorFaPatchField\n" + "(\n" + " const processorFaPatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, volMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +processorFaPatchField<Type>::processorFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + coupledFaPatchField<Type>(p, iF, dict), + procPatch_(refCast<const processorFaPatch>(p)) +{ + if (!isType<processorFaPatch>(p)) + { + FatalIOErrorIn + ( + "processorFaPatchField<Type>::processorFaPatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +processorFaPatchField<Type>::processorFaPatchField +( + const processorFaPatchField<Type>& ptf +) +: + processorLduInterfaceField(), + coupledFaPatchField<Type>(ptf), + procPatch_(refCast<const processorFaPatch>(ptf.patch())) +{} + + +template<class Type> +processorFaPatchField<Type>::processorFaPatchField +( + const processorFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + coupledFaPatchField<Type>(ptf, iF), + procPatch_(refCast<const processorFaPatch>(ptf.patch())) +{} + + +// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +template<class Type> +processorFaPatchField<Type>::~processorFaPatchField() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<Field<Type> > processorFaPatchField<Type>::patchNeighbourField() const +{ + return *this; +} + + +template<class Type> +void processorFaPatchField<Type>::initEvaluate +( + const Pstream::commsTypes commsType +) +{ + if (Pstream::parRun()) + { + procPatch_.send(commsType, this->patchInternalField()()); + } +} + + +template<class Type> +void processorFaPatchField<Type>::evaluate +( + const Pstream::commsTypes commsType +) +{ + if (Pstream::parRun()) + { + procPatch_.receive<Type>(commsType, *this); + + if (doTransform()) + { + transform(*this, procPatch_.forwardT(), *this); + } + } +} + + +template<class Type> +tmp<Field<Type> > processorFaPatchField<Type>::snGrad() const +{ + return this->patch().deltaCoeffs()*(*this - this->patchInternalField()); +} + + +template<class Type> +void processorFaPatchField<Type>::initInterfaceMatrixUpdate +( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction, + const Pstream::commsTypes commsType +) const +{ + procPatch_.send + ( + commsType, + this->patch().patchInternalField(psiInternal)() + ); +} + + +template<class Type> +void processorFaPatchField<Type>::updateInterfaceMatrix +( + scalarField& result, + const bool add, + const scalarField&, + const scalarField& coeffs, + const direction cmpt, + const Pstream::commsTypes commsType +) const +{ + scalarField pnf + ( + procPatch_.receive<scalar>(commsType, this->size())() + ); + + // Transform according to the transformation tensor + transformCoupleField(pnf, cmpt); + + // Multiply the field by coefficients and add into the result + + const labelUList& edgeFaces = this->patch().edgeFaces(); + + if (add) + { + forAll(edgeFaces, elemI) + { + result[edgeFaces[elemI]] += coeffs[elemI]*pnf[elemI]; + } + } + else + { + forAll(edgeFaces, elemI) + { + result[edgeFaces[elemI]] -= coeffs[elemI]*pnf[elemI]; + } + } +} + + +template<class Type> +void processorFaPatchField<Type>::initInterfaceMatrixUpdate +( + Field<Type>& result, + const bool add, + const Field<Type>& psiInternal, + const scalarField& coeffs, + const Pstream::commsTypes commsType +) const +{ + procPatch_.send + ( + commsType, + this->patch().patchInternalField(psiInternal)() + ); +} + + +template<class Type> +void processorFaPatchField<Type>::updateInterfaceMatrix +( + Field<Type>& result, + const bool add, + const Field<Type>&, + const scalarField& coeffs, + const Pstream::commsTypes commsType +) const +{ + Field<Type> pnf + ( + procPatch_.receive<Type>(commsType, this->size())() + ); + + // Multiply the field by coefficients and add into the result + + const labelUList& edgeFaces = this->patch().edgeFaces(); + + if (add) + { + forAll(edgeFaces, elemI) + { + result[edgeFaces[elemI]] += coeffs[elemI]*pnf[elemI]; + } + } + else + { + forAll(edgeFaces, elemI) + { + result[edgeFaces[elemI]] -= coeffs[elemI]*pnf[elemI]; + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..4f1e0718e6d3d275b4a41a68e78576ed390e0124 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H @@ -0,0 +1,286 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + processorFvPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + processorFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaPatchField_H +#define processorFaPatchField_H + +#include "coupledFaPatchField.H" +#include "processorLduInterfaceField.H" +#include "processorFaPatch.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class processorFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class processorFaPatchField +: + public processorLduInterfaceField, + public coupledFaPatchField<Type> +{ + // Private data + + //- Local reference cast into the processor patch + const processorFaPatch& procPatch_; + + +public: + + //- Runtime type information + TypeName(processorFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + processorFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch and internal field and patch field + processorFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const Field<Type>& + ); + + //- Construct from patch, internal field and dictionary + processorFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given processorFaPatchField onto a new patch + processorFaPatchField + ( + const processorFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + processorFaPatchField(const processorFaPatchField<Type>&); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new processorFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + processorFaPatchField + ( + const processorFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new processorFaPatchField<Type>(*this, iF) + ); + } + + + // Destructor + + ~processorFaPatchField(); + + + // Member functions + + // Access + + //- Return true if running parallel + virtual bool coupled() const + { + if (Pstream::parRun()) + { + return true; + } + else + { + return false; + } + } + + //- Return neighbour field given internal field + tmp<Field<Type> > patchNeighbourField() const; + + + // Evaluation functions + + //- Initialise the evaluation of the patch field + virtual void initEvaluate(const Pstream::commsTypes commsType); + + //- Evaluate the patch field + virtual void evaluate(const Pstream::commsTypes commsType); + + //- Return patch-normal gradient + virtual tmp<Field<Type> > snGrad() const; + + // Coupled interface functionality + + //- Transform neighbour field + virtual void transformCoupleField + ( + scalarField& f, + const direction cmpt + ) const + { + processorLduInterfaceField::transformCoupleField(f, cmpt); + } + + //- Initialise neighbour matrix update + virtual void initInterfaceMatrixUpdate + ( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction cmpt, + const Pstream::commsTypes commsType + ) const; + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction cmpt, + const Pstream::commsTypes commsType + ) const; + + //- Initialise neighbour matrix update + virtual void initInterfaceMatrixUpdate + ( + Field<Type>& result, + const bool add, + const Field<Type>&, + const scalarField& coeffs, + const Pstream::commsTypes commsType + ) const; + + //- Update result field based on interface functionality + virtual void updateInterfaceMatrix + ( + Field<Type>& result, + const bool add, + const Field<Type>&, + const scalarField& coeffs, + const Pstream::commsTypes commsType + ) const; + + //- Processor coupled interface functions + + //- Return communicator used for comms + virtual label comm() const + { + return UPstream::worldComm; + } + + //- Return processor number + virtual int myProcNo() const + { + return procPatch_.myProcNo(); + } + + //- Return neigbour processor number + virtual int neighbProcNo() const + { + return procPatch_.neighbProcNo(); + } + + //- Does the patch field perform the transfromation + virtual bool doTransform() const + { + return !(procPatch_.parallel() || pTraits<Type>::rank == 0); + } + + //- Return face transformation tensor + virtual const tensorField& forwardT() const + { + return procPatch_.forwardT(); + } + + //- Return rank of component for transform + virtual int rank() const + { + return pTraits<Type>::rank; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "processorFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFields.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..c0a686db6f913f7d1d39bd96d1e15788bd33ee24 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFields.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "processorFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFaMesh.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(processor); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFields.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..e0e25c3b10d74ea0187c942da12c653d7a376e4b --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaPatchFields_H +#define processorFaPatchFields_H + +#include "processorFaPatchScalarField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(processor) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..01a359c8042a64aa9b205b65e70958c6f0e08062 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaPatchFieldsFwd_H +#define processorFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class processorFaPatchField; + +makeFaPatchTypeFieldTypedefs(processor) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C new file mode 100644 index 0000000000000000000000000000000000000000..49e2bc8e16d0d8bfab85c50a73d504c2baa5cc12 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "processorFaPatchScalarField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<> +void processorFaPatchField<scalar>::transformCoupleField +( + scalarField& f, + const direction cmpt +) const +{} + +template<> +void processorFaPatchField<scalar>::initInterfaceMatrixUpdate +( + scalarField& result, + const bool add, + const scalarField& psiInternal, + const scalarField& coeffs, + const direction, + const Pstream::commsTypes commsType +) const +{ + procPatch_.send + ( + commsType, + patch().patchInternalField(psiInternal)() + ); +} + + +template<> +void processorFaPatchField<scalar>::updateInterfaceMatrix +( + scalarField& result, + const bool add, + const scalarField&, + const scalarField& coeffs, + const direction, + const Pstream::commsTypes commsType +) const +{ + scalarField pnf + ( + procPatch_.receive<scalar>(commsType, this->size())() + ); + + const labelUList& edgeFaces = patch().edgeFaces(); + + if (add) + { + forAll(edgeFaces, facei) + { + result[edgeFaces[facei]] -= coeffs[facei]*pnf[facei]; + } + } + else + { + forAll(edgeFaces, facei) + { + result[edgeFaces[facei]] -= coeffs[facei]*pnf[facei]; + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H new file mode 100644 index 0000000000000000000000000000000000000000..4db957540c5a81d0b969bd1a8e7ef9a47610e227 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaPatchScalarField_H +#define processorFaPatchScalarField_H + +#include "processorFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<> +void processorFaPatchField<scalar>::transformCoupleField +( + scalarField& f, + const direction cmpt +) const; + + +template<> +void processorFaPatchField<scalar>::initInterfaceMatrixUpdate +( + scalarField& result, + const bool add, + const scalarField&, + const scalarField& coeffs, + const direction, + const Pstream::commsTypes commsType +) const; + + +template<> +void processorFaPatchField<scalar>::updateInterfaceMatrix +( + scalarField& result, + const bool add, + const scalarField&, + const scalarField& coeffs, + const direction, + const Pstream::commsTypes commsType +) const; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..593441cfdc50c7b463f4a6ea09260eb26b3756da --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.C @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +symmetryFaPatchField<Type>::symmetryFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + basicSymmetryFaPatchField<Type>(p, iF) +{} + + +template<class Type> +symmetryFaPatchField<Type>::symmetryFaPatchField +( + const symmetryFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + basicSymmetryFaPatchField<Type>(ptf, p, iF, mapper) +{ + if (!isType<symmetryFaPatch>(this->patch())) + { + FatalErrorIn + ( + "symmetryFaPatchField<Type>::symmetryFaPatchField\n" + "(\n" + " const symmetryFaPatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, areaMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +symmetryFaPatchField<Type>::symmetryFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + basicSymmetryFaPatchField<Type>(p, iF, dict) +{ + if (!isType<symmetryFaPatch>(p)) + { + FatalIOErrorIn + ( + "symmetryFaPatchField<Type>::symmetryFaPatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "\n patch type '" << p.type() + << "' not constraint type '" << typeName << "'" + << "\n for patch " << p.name() + << " of field " << this->dimensionedInternalField().name() + << " in file " << this->dimensionedInternalField().objectPath() + << exit(FatalIOError); + } +} + + +template<class Type> +symmetryFaPatchField<Type>::symmetryFaPatchField +( + const symmetryFaPatchField<Type>& ptf +) +: + basicSymmetryFaPatchField<Type>(ptf) +{} + + +template<class Type> +symmetryFaPatchField<Type>::symmetryFaPatchField +( + const symmetryFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + basicSymmetryFaPatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..d6dc2c4c73ec8ec2279ade0147584af3e22f6faa --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchField.H @@ -0,0 +1,144 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::symmetryFaPatchField + +Description + Foam::symmetryFaPatchField + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + symmetryFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaPatchField_H +#define symmetryFaPatchField_H + +#include "basicSymmetryFaPatchField.H" +#include "symmetryFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class symmetryFaPatchField +: + public basicSymmetryFaPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(symmetryFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + symmetryFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + symmetryFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given symmetryFaPatchField onto a new patch + symmetryFaPatchField + ( + const symmetryFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + symmetryFaPatchField + ( + const symmetryFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new symmetryFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + symmetryFaPatchField + ( + const symmetryFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new symmetryFaPatchField<Type>(*this, iF) + ); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "symmetryFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFields.C b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..821e2a95be7eb13ccbb81b1cad968e646b89ed47 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(symmetry); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFields.H b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..e732bffcb9cff2864c46e65b98e11d2248d2fe48 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaPatchFields_H +#define symmetryFaPatchFields_H + +#include "symmetryFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(symmetry) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..6cd9aaac231d7cc383d2849acbabd713fe4264d8 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/symmetry/symmetryFaPatchFieldsFwd.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaPatchFieldsFwd_H +#define symmetryFaPatchFieldsFwd_H + +#include "faPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class symmetryFaPatchField; + +makeFaPatchTypeFieldTypedefs(symmetry) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..27a96d83ef36e5bac19aad35c0b8d5d6cc6c420f --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.C @@ -0,0 +1,192 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "wedgeFaPatch.H" +#include "wedgeFaPatchField.H" +#include "transformField.H" +#include "symmTransform.H" +#include "diagTensor.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +wedgeFaPatchField<Type>::wedgeFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + transformFaPatchField<Type>(p, iF) +{} + + +template<class Type> +wedgeFaPatchField<Type>::wedgeFaPatchField +( + const wedgeFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + transformFaPatchField<Type>(ptf, p, iF, mapper) +{ + if (!isType<wedgeFaPatch>(this->patch())) + { + FatalErrorIn + ( + "wedgeFaPatchField<Type>::wedgeFaPatchField\n" + "(\n" + " const wedgeFaPatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const Field<Type>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +wedgeFaPatchField<Type>::wedgeFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + transformFaPatchField<Type>(p, iF, dict) +{ + if (!isType<wedgeFaPatch>(p)) + { + FatalIOErrorIn + ( + "wedgeFaPatchField<Type>::wedgeFaPatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not wedge type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } + + this->evaluate(); +} + + +template<class Type> +wedgeFaPatchField<Type>::wedgeFaPatchField +( + const wedgeFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + transformFaPatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Return gradient at boundary +template<class Type> +tmp<Field<Type> > wedgeFaPatchField<Type>::snGrad() const +{ + Field<Type> pif = this->patchInternalField(); + + return + ( + transform(refCast<const wedgeFaPatch>(this->patch()).faceT(), pif) + - pif + )*(0.5*this->patch().deltaCoeffs()); +} + + +// Evaluate the patch field +template<class Type> +void wedgeFaPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + faPatchField<Type>::operator== + ( + transform + ( + refCast<const wedgeFaPatch>(this->patch()).edgeT(), + this->patchInternalField() + ) + ); +} + + +// Return defining fields +template<class Type> +tmp<Field<Type> > wedgeFaPatchField<Type>::snGradTransformDiag() const +{ + const diagTensor diagT = + 0.5*diag(I - refCast<const wedgeFaPatch>(this->patch()).faceT()); + + const vector diagV(diagT.xx(), diagT.yy(), diagT.zz()); + + return tmp<Field<Type> > + ( + new Field<Type> + ( + this->size(), + transformMask<Type> + ( + pow + ( + diagV, + pTraits<typename powProduct<vector, pTraits<Type>::rank> + ::type>::zero + ) + ) + ) + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..9115a4a8a0d950d1e68e078ab3b0de383971f191 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchField.H @@ -0,0 +1,168 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + wedgeFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + wedgeFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaPatchField_H +#define wedgeFaPatchField_H + +#include "transformFaPatchField.H" +#include "wedgeFaPatch.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class wedgeFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class wedgeFaPatchField +: + public transformFaPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(wedgeFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + wedgeFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + wedgeFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given wedgeFaPatchField onto a new patch + wedgeFaPatchField + ( + const wedgeFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new wedgeFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + wedgeFaPatchField + ( + const wedgeFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new wedgeFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Evaluation functions + + //- Return gradient at boundary + virtual tmp<Field<Type> > snGrad() const; + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType = Pstream::commsTypes::blocking + ); + + + //- Return face-gradient transform diagonal + virtual tmp<Field<Type> > snGradTransformDiag() const; +}; + + +// * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * // + +template<> +tmp<scalarField> wedgeFaPatchField<scalar>::snGrad() const; + +template<> +void wedgeFaPatchField<scalar>::evaluate +( + const Pstream::commsTypes commsType +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "wedgeFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFields.C b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..d45edc7bb3dee7ff489e949da08ba51e5e51c3b4 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFields.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "wedgeFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(wedge); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFields.H b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..fa7006246d4add5161e5cacd883484781b0ce371 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFields.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + wedgeFaPatchFields + +Description + +SourceFiles + wedgeFaPatchFields.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaPatchFields_H +#define wedgeFaPatchFields_H + +#include "wedgeFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(wedge) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..73206a87bbfa53fe7bdd52fd44728ef2b692f1d8 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchFieldsFwd.H @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + wedgeFvPatchField + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaPatchFieldsFwd_H +#define wedgeFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class wedgeFaPatchField; + +// typedef wedgeFaPatchField<scalar> wedgeFaPatchScalarField; +// typedef wedgeFaPatchField<vector> wedgeFaPatchVectorField; +// typedef wedgeFaPatchField<tensor> wedgeFaPatchTensorField; + +// template<class Type> class wedgeFvPatchField; + +makeFaPatchTypeFieldTypedefs(wedge) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchScalarField.C b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchScalarField.C new file mode 100644 index 0000000000000000000000000000000000000000..d3114174d8fe7a6fcd21adf4ffcc340b28230641 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/constraint/wedge/wedgeFaPatchScalarField.C @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "wedgeFaPatchField.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Return gradient at boundary +template<> +tmp<scalarField> wedgeFaPatchField<scalar>::snGrad() const +{ + return tmp<scalarField >(new scalarField(size(), 0.0)); +} + + +// Evaluate the patch field +template<> +void wedgeFaPatchField<scalar>::evaluate(const Pstream::commsTypes) +{ + if (!updated()) + { + updateCoeffs(); + } + + this->operator==(patchInternalField()); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.C b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.C new file mode 100644 index 0000000000000000000000000000000000000000..903ecd4e806999956880653ef5281da959746d65 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.C @@ -0,0 +1,157 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "edgeNormalFixedValueFaPatchVectorField.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::edgeNormalFixedValueFaPatchVectorField:: +edgeNormalFixedValueFaPatchVectorField +( + const faPatch& p, + const DimensionedField<vector, areaMesh>& iF +) +: + fixedValueFaPatchVectorField(p, iF), + refValue_(p.size(), 0) +{} + + +Foam::edgeNormalFixedValueFaPatchVectorField:: +edgeNormalFixedValueFaPatchVectorField +( + const edgeNormalFixedValueFaPatchVectorField& ptf, + const faPatch& p, + const DimensionedField<vector, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + fixedValueFaPatchVectorField(ptf, p, iF, mapper), + refValue_(ptf.refValue_, mapper) +{} + + +Foam::edgeNormalFixedValueFaPatchVectorField:: +edgeNormalFixedValueFaPatchVectorField +( + const faPatch& p, + const DimensionedField<vector, areaMesh>& iF, + const dictionary& dict +) +: + fixedValueFaPatchVectorField(p, iF, dict), + refValue_("refValue", dict, p.size()) +{} + + +Foam::edgeNormalFixedValueFaPatchVectorField:: +edgeNormalFixedValueFaPatchVectorField +( + const edgeNormalFixedValueFaPatchVectorField& pivpvf +) +: + fixedValueFaPatchVectorField(pivpvf), + refValue_(pivpvf.refValue_) +{} + + +Foam::edgeNormalFixedValueFaPatchVectorField:: +edgeNormalFixedValueFaPatchVectorField +( + const edgeNormalFixedValueFaPatchVectorField& pivpvf, + const DimensionedField<vector, areaMesh>& iF +) +: + fixedValueFaPatchVectorField(pivpvf, iF), + refValue_(pivpvf.refValue_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::edgeNormalFixedValueFaPatchVectorField::autoMap +( + const faPatchFieldMapper& m +) +{ + fixedValueFaPatchVectorField::autoMap(m); + refValue_.autoMap(m); +} + + +void Foam::edgeNormalFixedValueFaPatchVectorField::rmap +( + const faPatchVectorField& ptf, + const labelList& addr +) +{ + fixedValueFaPatchVectorField::rmap(ptf, addr); + + const edgeNormalFixedValueFaPatchVectorField& tiptf = + refCast<const edgeNormalFixedValueFaPatchVectorField>(ptf); + + refValue_.rmap(tiptf.refValue_, addr); +} + + +void Foam::edgeNormalFixedValueFaPatchVectorField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // Bug fix: update for moving mesh. HJ, 15/Oct/2010 + operator==(refValue_*patch().edgeNormals()); +} + + +void Foam::edgeNormalFixedValueFaPatchVectorField::write(Ostream& os) const +{ + fixedValueFaPatchVectorField::write(os); + refValue_.writeEntry("refValue", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +makeFaPatchTypeField +( + faPatchVectorField, + edgeNormalFixedValueFaPatchVectorField +); + +} // End namespace Foam + + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H new file mode 100644 index 0000000000000000000000000000000000000000..5588f350c9bb024caf978d59f0f29ac656637030 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/edgeNormalFixedValue/edgeNormalFixedValueFaPatchVectorField.H @@ -0,0 +1,179 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::edgeNormalFixedValueFaPatchVectorField + +Description + Edge normal fixed value vector field finite area boundary condition + + Describes a surface normal vector boundary condition by its magnitude. + Note: The value is positive for outward-pointing vectors + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + edgeNormalFixedValueFaPatchVectorField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeNormalFixedValueFaPatchVectorField_H +#define edgeNormalFixedValueFaPatchVectorField_H + +#include "faPatchFields.H" +#include "fixedValueFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class edgeNormalFixedValueFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +class edgeNormalFixedValueFaPatchVectorField +: + public fixedValueFaPatchVectorField +{ + // Private data + + //- Surface-normal velocity value + scalarField refValue_; + + +public: + + //- Runtime type information + TypeName("edgeNormalFixedValue"); + + + // Constructors + + //- Construct from patch and internal field + edgeNormalFixedValueFaPatchVectorField + ( + const faPatch&, + const DimensionedField<vector, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + edgeNormalFixedValueFaPatchVectorField + ( + const faPatch&, + const DimensionedField<vector, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given + // edgeNormalFixedValueFaPatchVectorField + // onto a new patch + edgeNormalFixedValueFaPatchVectorField + ( + const edgeNormalFixedValueFaPatchVectorField&, + const faPatch&, + const DimensionedField<vector, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + edgeNormalFixedValueFaPatchVectorField + ( + const edgeNormalFixedValueFaPatchVectorField& + ); + + //- Construct and return a clone + virtual tmp<faPatchVectorField> clone() const + { + return tmp<faPatchVectorField> + ( + new edgeNormalFixedValueFaPatchVectorField(*this) + ); + } + + //- Construct as copy setting internal field reference + edgeNormalFixedValueFaPatchVectorField + ( + const edgeNormalFixedValueFaPatchVectorField&, + const DimensionedField<vector, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchVectorField> clone + ( + const DimensionedField<vector, areaMesh>& iF + ) const + { + return tmp<faPatchVectorField> + ( + new edgeNormalFixedValueFaPatchVectorField + ( + *this, + iF + ) + ); + } + + + + // Member functions + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ); + + //- Reverse map the given faPatchField onto this faPatchField + virtual void rmap + ( + const faPatchVectorField&, + const labelList& + ); + + + // Member functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.C b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..90e7bd724e9d314f5b75ead868a4adf2b490b112 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.C @@ -0,0 +1,148 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "fixedValueOutflowFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +fixedValueOutflowFaPatchField<Type>::fixedValueOutflowFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(p, iF) +{} + + +template<class Type> +fixedValueOutflowFaPatchField<Type>::fixedValueOutflowFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + faPatchField<Type>(p, iF, Field<Type>("value", dict, p.size())) +{} + + +template<class Type> +fixedValueOutflowFaPatchField<Type>::fixedValueOutflowFaPatchField +( + const fixedValueOutflowFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + faPatchField<Type>(ptf, iF) +{} + + +template<class Type> +fixedValueOutflowFaPatchField<Type>::fixedValueOutflowFaPatchField +( + const fixedValueOutflowFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +fixedValueOutflowFaPatchField<Type>::fixedValueOutflowFaPatchField +( + const fixedValueOutflowFaPatchField<Type>& ptf +) +: + faPatchField<Type>(ptf) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<Field<Type> > fixedValueOutflowFaPatchField<Type>::valueInternalCoeffs +( + const tmp<scalarField>& weights +) const +{ + return tmp<Field<Type> > + ( + new Field<Type>(Type(pTraits<Type>::one)*weights) + ); +} + + +template<class Type> +tmp<Field<Type> > fixedValueOutflowFaPatchField<Type>::valueBoundaryCoeffs +( + const tmp<scalarField>& weights +) const +{ + return (1.0 - weights)*(*this); +} + + +template<class Type> +tmp<Field<Type> > +fixedValueOutflowFaPatchField<Type>::gradientInternalCoeffs() const +{ + return -Type(pTraits<Type>::one)*this->patch().deltaCoeffs(); +} + + +template<class Type> +tmp<Field<Type> > +fixedValueOutflowFaPatchField<Type>::gradientBoundaryCoeffs() const +{ + return this->patch().deltaCoeffs()*(*this); +} + + +// Write +template<class Type> +void fixedValueOutflowFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..6a817b6374be95e8b69ab9af6e1dc1b3a5a0c1b2 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchField.H @@ -0,0 +1,208 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedValueOutflowFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + fixedValueOutflowFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueOutflowFaPatchField_H +#define fixedValueOutflowFaPatchField_H + +#include "faPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedValueOutflowFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class fixedValueOutflowFaPatchField +: + public faPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("fixedValueOutflow"); + + + // Constructors + + //- Construct from patch and internal field + fixedValueOutflowFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + fixedValueOutflowFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given fixedValueOutflowFaPatchField<Type> + // onto a new patch + fixedValueOutflowFaPatchField + ( + const fixedValueOutflowFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + fixedValueOutflowFaPatchField + ( + const fixedValueOutflowFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new fixedValueOutflowFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + fixedValueOutflowFaPatchField + ( + const fixedValueOutflowFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new fixedValueOutflowFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return true; + } + + + // Evaluation functions + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<scalarField>& + ) const; + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const; + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const; + + + //- Write + virtual void write(Ostream&) const; + + + // Member operators + + virtual void operator=(const UList<Type>&) {} + + virtual void operator=(const faPatchField<Type>&) {} + virtual void operator+=(const faPatchField<Type>&) {} + virtual void operator-=(const faPatchField<Type>&) {} + virtual void operator*=(const faPatchField<scalar>&) {} + virtual void operator/=(const faPatchField<scalar>&) {} + + virtual void operator+=(const Field<Type>&) {} + virtual void operator-=(const Field<Type>&) {} + + virtual void operator*=(const Field<scalar>&) {} + virtual void operator/=(const Field<scalar>&) {} + + virtual void operator=(const Type&) {} + virtual void operator+=(const Type&) {} + virtual void operator-=(const Type&) {} + virtual void operator*=(const scalar) {} + virtual void operator/=(const scalar) {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "fixedValueOutflowFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFields.C b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..b2deecf61cfa2717deecacbdd194054628892400 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFields.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" +#include "fixedValueOutflowFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(fixedValueOutflow); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFields.H b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..8c1a5dc1d3a26a433145d46938b94a23eda78ba9 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFields.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedValueOutflowFaPatchFields + +Description + +SourceFiles + fixedValueOutflowFaPatchFields.C + + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueOutflowFaPatchFields_H +#define fixedValueOutflowFaPatchFields_H + +#include "fixedValueOutflowFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(fixedValueOutflow) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..389aec1d7f119e201d3d74e3191309125a266643 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/fixedValueOutflow/fixedValueOutflowFaPatchFieldsFwd.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedValueOutflowFaPatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueOutflowFaPatchFieldsFwd_H +#define fixedValueOutflowFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class fixedValueOutflowFaPatchField; + +makeFaPatchTypeFieldTypedefs(fixedValueOutflow) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..9b311b7777827bb92ccb862a999e034636281d44 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C @@ -0,0 +1,165 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "inletOutletFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +inletOutletFaPatchField<Type>::inletOutletFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + mixedFaPatchField<Type>(p, iF), + phiName_("phi") +{ + this->refValue() = pTraits<Type>::zero; + this->refGrad() = pTraits<Type>::zero; + this->valueFraction() = 0.0; +} + + +template<class Type> +inletOutletFaPatchField<Type>::inletOutletFaPatchField +( + const inletOutletFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + mixedFaPatchField<Type>(ptf, p, iF, mapper), + phiName_(ptf.phiName_) +{} + + +template<class Type> +inletOutletFaPatchField<Type>::inletOutletFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + mixedFaPatchField<Type>(p, iF), + phiName_("phi") +{ + this->refValue() = Field<Type>("inletValue", dict, p.size()); + + if (dict.found("value")) + { + faPatchField<Type>::operator= + ( + Field<Type>("value", dict, p.size()) + ); + } + else + { + faPatchField<Type>::operator=(this->refValue()); + } + + this->refGrad() = pTraits<Type>::zero; + this->valueFraction() = 0.0; + + if (dict.found("phi")) + { + dict.lookup("phi") >> phiName_; + } +} + + +template<class Type> +inletOutletFaPatchField<Type>::inletOutletFaPatchField +( + const inletOutletFaPatchField<Type>& ptf +) +: + mixedFaPatchField<Type>(ptf), + phiName_(ptf.phiName_) +{} + + +template<class Type> +inletOutletFaPatchField<Type>::inletOutletFaPatchField +( + const inletOutletFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + mixedFaPatchField<Type>(ptf, iF), + phiName_(ptf.phiName_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void inletOutletFaPatchField<Type>::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + const Field<scalar>& phip = + this->patch(). template lookupPatchField<edgeScalarField, scalar> + ( + phiName_ + ); + + this->valueFraction() = 1.0 - pos(phip); + + mixedFaPatchField<Type>::updateCoeffs(); +} + + +template<class Type> +void inletOutletFaPatchField<Type>::write(Ostream& os) const +{ + faPatchField<Type>::write(os); + if (phiName_ != "phi") + { + os.writeKeyword("phi") + << phiName_ << token::END_STATEMENT << nl; + } + this->refValue().writeEntry("inletValue", os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..154dbfc64f56501f6b7ca7251fcfe1aa6e21d977 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.H @@ -0,0 +1,173 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + inletOutletFaPatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + inletOutletFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef inletOutletFaPatchField_H +#define inletOutletFaPatchField_H + +#include "mixedFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class inletOutletFaPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class inletOutletFaPatchField +: + public mixedFaPatchField<Type> +{ + +protected: + + // Protected data + + word phiName_; + + +public: + + //- Runtime type information + TypeName("inletOutlet"); + + + // Constructors + + //- Construct from patch and internal field + inletOutletFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + inletOutletFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given inletOutletFaPatchField onto a new patch + inletOutletFaPatchField + ( + const inletOutletFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + inletOutletFaPatchField + ( + const inletOutletFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new inletOutletFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + inletOutletFaPatchField + ( + const inletOutletFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new inletOutletFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return the name of phi + const word& phiName() const + { + return phiName_; + } + + //- Return reference to the name of phi to allow adjustment + word& phiName() + { + return phiName_; + } + + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "inletOutletFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFields.C b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..af93e38918763bed712afe9c3a6290b13ebdecd3 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFields.C @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "areaFields.H" +#include "edgeFields.H" +#include "inletOutletFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(inletOutlet); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFields.H b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..cd989c01715ffbfaf3931deee2c04a1022f00e8f --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef inletOutletFaPatchFields_H +#define inletOutletFaPatchFields_H + +#include "inletOutletFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(inletOutlet) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..df3de5b62d620bdeaeef1d35091e975f334313bc --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef inletOutletFaPatchFieldsFwd_H +#define inletOutletFaPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class inletOutletFaPatchField; + +makeFaPatchTypeFieldTypedefs(inletOutlet) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.C b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..b8381c38f5a61a5718fce1557a636df20c952f09 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.C @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "slipFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +slipFaPatchField<Type>::slipFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + basicSymmetryFaPatchField<Type>(p, iF) +{} + + +template<class Type> +slipFaPatchField<Type>::slipFaPatchField +( + const slipFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + basicSymmetryFaPatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +slipFaPatchField<Type>::slipFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + basicSymmetryFaPatchField<Type>(p, iF, dict) +{} + + +template<class Type> +slipFaPatchField<Type>::slipFaPatchField +( + const slipFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + basicSymmetryFaPatchField<Type>(ptf, iF) +{} + + +template<class Type> +slipFaPatchField<Type>::slipFaPatchField +( + const slipFaPatchField<Type>& ptf +) +: + basicSymmetryFaPatchField<Type>(ptf) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..9a8b4e1c09ca6fcd76c3bb9c265dd26ea4bc7b26 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchField.H @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::slipFaPatchField + +Description + Foam::slipFaPatchField + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + slipFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef slipFaPatchField_H +#define slipFaPatchField_H + +#include "basicSymmetryFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class slipFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class slipFaPatchField +: + public basicSymmetryFaPatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("slip"); + + + // Constructors + + //- Construct from patch and internal field + slipFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + slipFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given slipFaPatchField onto a new patch + slipFaPatchField + ( + const slipFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + slipFaPatchField + ( + const slipFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new slipFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + slipFaPatchField + ( + const slipFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new slipFaPatchField<Type>(*this, iF) + ); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "slipFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFields.C b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..6c2731d97fdfd07a50b79249db97a62c643c61a6 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "slipFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(slip); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFields.H b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..6669285e55889a6917974d3f23a1fda510245d9d --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef slipFaPatchFields_H +#define slipFaPatchFields_H + +#include "slipFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(slip) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..62f6fbc4001bc05db15d55b9bcfcc4b4b5be58f0 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/slip/slipFaPatchFieldsFwd.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef slipFaPatchFieldsFwd_H +#define slipFaPatchFieldsFwd_H + +#include "faPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class slipFaPatchField; + +makeFaPatchTypeFieldTypedefs(slip) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.C b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..f1ea1dcff011dad3aa69204aa2c43828efccead3 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.C @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "timeVaryingUniformFixedValueFaPatchField.H" +#include "Time.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +Foam::timeVaryingUniformFixedValueFaPatchField<Type>:: +timeVaryingUniformFixedValueFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + fixedValueFaPatchField<Type>(p, iF), + timeSeries_() +{} + + +template<class Type> +Foam::timeVaryingUniformFixedValueFaPatchField<Type>:: +timeVaryingUniformFixedValueFaPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + fixedValueFaPatchField<Type>(p, iF), + timeSeries_(dict) +{ + if (dict.found("value")) + { + faPatchField<Type>::operator==(Field<Type>("value", dict, p.size())); + } + else + { + updateCoeffs(); + } +} + + +template<class Type> +Foam::timeVaryingUniformFixedValueFaPatchField<Type>:: +timeVaryingUniformFixedValueFaPatchField +( + const timeVaryingUniformFixedValueFaPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + fixedValueFaPatchField<Type>(ptf, p, iF, mapper), + timeSeries_(ptf.timeSeries_) +{} + + +template<class Type> +Foam::timeVaryingUniformFixedValueFaPatchField<Type>:: +timeVaryingUniformFixedValueFaPatchField +( + const timeVaryingUniformFixedValueFaPatchField<Type>& ptf +) +: + fixedValueFaPatchField<Type>(ptf), + timeSeries_(ptf.timeSeries_) +{} + + +template<class Type> +Foam::timeVaryingUniformFixedValueFaPatchField<Type>:: +timeVaryingUniformFixedValueFaPatchField +( + const timeVaryingUniformFixedValueFaPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + fixedValueFaPatchField<Type>(ptf, iF), + timeSeries_(ptf.timeSeries_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void Foam::timeVaryingUniformFixedValueFaPatchField<Type>::updateCoeffs() +{ + if (this->updated()) + { + return; + } + + faPatchField<Type>::operator== + ( + timeSeries_(this->db().time().timeOutputValue()) + ); + fixedValueFaPatchField<Type>::updateCoeffs(); +} + + +template<class Type> +void Foam::timeVaryingUniformFixedValueFaPatchField<Type>::write +( + Ostream& os +) const +{ + faPatchField<Type>::write(os); + timeSeries_.write(os); + this->writeEntry("value", os); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..12e6e9dae4aade90f8ca9f90fc304490a74e2ae4 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchField.H @@ -0,0 +1,188 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::timeVaryingUniformFixedValueFaPatchField + +Description + A time-varying form of a uniform fixed value finite area + boundary condition. + + Example of the boundary condition specification: + @verbatim + inlet + { + type timeVaryingUniformFixedValue; + fileName "$FOAM_CASE/time-series"; + outOfBounds clamp; // (error|warn|clamp|repeat) + } + @endverbatim + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +Note + This class is derived directly from a fixedValue patch rather than from + a uniformFixedValue patch. + +See Also + Foam::interpolationTable and Foam::fixedValueFaPatchField + +SourceFiles + timeVaryingUniformFixedValueFaPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef timeVaryingUniformFixedValueFaPatchField_H +#define timeVaryingUniformFixedValueFaPatchField_H + +#include "fixedValueFaPatchField.H" +#include "interpolationTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class timeVaryingUniformFixedValueFaPatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class timeVaryingUniformFixedValueFaPatchField +: + public fixedValueFaPatchField<Type> +{ + // Private data + + //- The time series being used, including the bounding treatment + interpolationTable<Type> timeSeries_; + + +public: + + //- Runtime type information + TypeName("timeVaryingUniformFixedValue"); + + + // Constructors + + //- Construct from patch and internal field + timeVaryingUniformFixedValueFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch, internal field and dictionary + timeVaryingUniformFixedValueFaPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping given patch field onto a new patch + timeVaryingUniformFixedValueFaPatchField + ( + const timeVaryingUniformFixedValueFaPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + timeVaryingUniformFixedValueFaPatchField + ( + const timeVaryingUniformFixedValueFaPatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> > + ( + new timeVaryingUniformFixedValueFaPatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + timeVaryingUniformFixedValueFaPatchField + ( + const timeVaryingUniformFixedValueFaPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> > + ( + new timeVaryingUniformFixedValueFaPatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return the time series used + const interpolationTable<Type>& timeSeries() const + { + return timeSeries_; + } + + + // Evaluation functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "timeVaryingUniformFixedValueFaPatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.C b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..31e5b6cf2944af9de632e68f29a9fde1f01c75d5 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "timeVaryingUniformFixedValueFaPatchFields.H" +#include "addToRunTimeSelectionTable.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaPatchFields(timeVaryingUniformFixedValue); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.H b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..7811318b5ee0253a13f3497dc86695bfb23f766c --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef timeVaryingUniformFixedValueFaPatchFields_H +#define timeVaryingUniformFixedValueFaPatchFields_H + +#include "timeVaryingUniformFixedValueFaPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaPatchTypeFieldTypedefs(timeVaryingUniformFixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..67ef16ce27ebd4904a15898687f04233cd538e61 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/derived/timeVaryingUniformFixedValue/timeVaryingUniformFixedValueFaPatchFieldsFwd.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef timeVaryingUniformFixedValueFaPatchFieldsFwd_H +#define timeVaryingUniformFixedValueFaPatchFieldsFwd_H + +#include "faPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class timeVaryingUniformFixedValueFaPatchField; + +makeFaPatchTypeFieldTypedefs(timeVaryingUniformFixedValue); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..e2ce0f8d9e5a8d68e280008004d7b99879373e92 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.C @@ -0,0 +1,442 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "IOobject.H" +#include "dictionary.H" +#include "faMesh.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +faPatchField<Type>::faPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +: + Field<Type>(p.size()), + patch_(p), + internalField_(iF), + updated_(false) +{} + + +template<class Type> +faPatchField<Type>::faPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const Field<Type>& f +) +: + Field<Type>(f), + patch_(p), + internalField_(iF), + updated_(false) +{} + + +template<class Type> +faPatchField<Type>::faPatchField +( + const faPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& mapper +) +: + Field<Type>(ptf, mapper), + patch_(p), + internalField_(iF), + updated_(false) +{} + + +template<class Type> +faPatchField<Type>::faPatchField +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +: + Field<Type>(p.size()), + patch_(p), + internalField_(iF), + updated_(false) +{ + if (dict.found("value")) + { + faPatchField<Type>::operator= + ( + Field<Type>("value", dict, p.size()) + ); + } + else + { + faPatchField<Type>::operator=(pTraits<Type>::zero); + } +} + + +template<class Type> +faPatchField<Type>::faPatchField +( + const faPatchField<Type>& ptf +) +: + Field<Type>(ptf), + patch_(ptf.patch_), + internalField_(ptf.internalField_), + updated_(false) +{} + + +template<class Type> +faPatchField<Type>::faPatchField +( + const faPatchField<Type>& ptf, + const DimensionedField<Type, areaMesh>& iF +) +: + Field<Type>(ptf), + patch_(ptf.patch_), + internalField_(iF), + updated_(false) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +const objectRegistry& faPatchField<Type>::db() const +{ + //HR 12.3.10: Lookup fields from the field DB rather than the mesh + return internalField_.db(); +} + + +template<class Type> +void faPatchField<Type>::check(const faPatchField<Type>& ptf) const +{ + if (&patch_ != &(ptf.patch_)) + { + FatalErrorIn("PatchField<Type>::check(const faPatchField<Type>&)") + << "different patches for faPatchField<Type>s" + << abort(FatalError); + } +} + + +// Return gradient at boundary +template<class Type> +tmp<Field<Type> > faPatchField<Type>::snGrad() const +{ + return (*this - patchInternalField())*patch_.deltaCoeffs(); +} + + +// Return internal field next to patch as patch field +template<class Type> +tmp<Field<Type> > faPatchField<Type>::patchInternalField() const +{ + return patch_.patchInternalField(internalField_); +} + + +template<class Type> +void faPatchField<Type>::autoMap +( + const faPatchFieldMapper& m +) +{ + Field<Type>::autoMap(m); +} + + +template<class Type> +void faPatchField<Type>::rmap +( + const faPatchField<Type>& ptf, + const labelList& addr +) +{ + Field<Type>::rmap(ptf, addr); +} + + +template<class Type> +void faPatchField<Type>::evaluate(const Pstream::commsTypes) +{ + if (!updated_) + { + updateCoeffs(); + } + + updated_ = false; +} + + +template<class Type> +void faPatchField<Type>::write(Ostream& os) const +{ + os.writeKeyword("type") << type() << token::END_STATEMENT << nl; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Type> +void faPatchField<Type>::operator= +( + const UList<Type>& ul +) +{ + Field<Type>::operator=(ul); +} + + +template<class Type> +void faPatchField<Type>::operator= +( + const faPatchField<Type>& ptf +) +{ + check(ptf); + Field<Type>::operator=(ptf); +} + + +template<class Type> +void faPatchField<Type>::operator+= +( + const faPatchField<Type>& ptf +) +{ + check(ptf); + Field<Type>::operator+=(ptf); +} + + +template<class Type> +void faPatchField<Type>::operator-= +( + const faPatchField<Type>& ptf +) +{ + check(ptf); + Field<Type>::operator-=(ptf); +} + + +template<class Type> +void faPatchField<Type>::operator*= +( + const faPatchField<scalar>& ptf +) +{ + if (&patch_ != &ptf.patch()) + { + FatalErrorIn + ( + "PatchField<Type>::operator*=(const faPatchField<scalar>& ptf)" + ) << "incompatible patches for patch fields" + << abort(FatalError); + } + + Field<Type>::operator*=(ptf); +} + + +template<class Type> +void faPatchField<Type>::operator/= +( + const faPatchField<scalar>& ptf +) +{ + if (&patch_ != &ptf.patch()) + { + FatalErrorIn + ( + "PatchField<Type>::operator/=(const faPatchField<scalar>& ptf)" + ) << " incompatible patches for patch fields" + << abort(FatalError); + } + + Field<Type>::operator/=(ptf); +} + + +template<class Type> +void faPatchField<Type>::operator+= +( + const Field<Type>& tf +) +{ + Field<Type>::operator+=(tf); +} + + +template<class Type> +void faPatchField<Type>::operator-= +( + const Field<Type>& tf +) +{ + Field<Type>::operator-=(tf); +} + + +template<class Type> +void faPatchField<Type>::operator*= +( + const scalarField& tf +) +{ + Field<Type>::operator*=(tf); +} + + +template<class Type> +void faPatchField<Type>::operator/= +( + const scalarField& tf +) +{ + Field<Type>::operator/=(tf); +} + + +template<class Type> +void faPatchField<Type>::operator= +( + const Type& t +) +{ + Field<Type>::operator=(t); +} + + +template<class Type> +void faPatchField<Type>::operator+= +( + const Type& t +) +{ + Field<Type>::operator+=(t); +} + + +template<class Type> +void faPatchField<Type>::operator-= +( + const Type& t +) +{ + Field<Type>::operator-=(t); +} + + +template<class Type> +void faPatchField<Type>::operator*= +( + const scalar s +) +{ + Field<Type>::operator*=(s); +} + + +template<class Type> +void faPatchField<Type>::operator/= +( + const scalar s +) +{ + Field<Type>::operator/=(s); +} + + +// Force an assignment, overriding fixedValue status +template<class Type> +void faPatchField<Type>::operator== +( + const faPatchField<Type>& ptf +) +{ + Field<Type>::operator=(ptf); +} + + +template<class Type> +void faPatchField<Type>::operator== +( + const Field<Type>& tf +) +{ + Field<Type>::operator=(tf); +} + + +template<class Type> +void faPatchField<Type>::operator== +( + const Type& t +) +{ + Field<Type>::operator=(t); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Type> +Ostream& operator<<(Ostream& os, const faPatchField<Type>& ptf) +{ + ptf.write(os); + + os.check("Ostream& operator<<(Ostream&, const faPatchField<Type>&"); + + return os; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +# include "newFaPatchField.C" + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..44f7637de47d9f4b1913ddc6b8b94d5445ce53ec --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchField.H @@ -0,0 +1,557 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faPatchField + +Description + faPatchField<Type> abstract base class. This class gives a fat-interface + to all derived classes covering all possible ways in which they might be + used. The first level of derivation is to basic patchFields which cover + zero-gradient, fixed-gradient, fixed-value and mixed conditions. The next + level of derivation covers all the specialised typed with specific + evaluation proceedures, particularly with respect to specific fields. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faPatchField.C + newPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchField_H +#define faPatchField_H + +#include "faPatch.H" +#include "DimensionedField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Class forward declarations + +class objectRegistry; +class dictionary; +class faPatchFieldMapper; +class areaMesh; + + +// * * * * * * Forward declaration of template friend fuctions * * * * * * * // + +template<class Type> +class faPatchField; + +template<class Type> +class calculatedFaPatchField; + +template<class Type> +Ostream& operator<<(Ostream&, const faPatchField<Type>&); + +/*---------------------------------------------------------------------------*\ + Class faPatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class faPatchField +: + public Field<Type> +{ + // Private data + + //- Reference to a patch + const faPatch& patch_; + + //- Reference to internal field + const DimensionedField<Type, areaMesh>& internalField_; + + //- Update index used so that updateCoeffs is called only once during + // the construction of the matrix + bool updated_; + + +public: + + typedef faPatch Patch; + typedef calculatedFaPatchField<Type> Calculated; + + + //- Runtime type information + TypeName("faPatchField"); + + //- Debug switch to disallow the use of + static int disallowGenericFaPatchField; + + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + faPatchField, + patch, + ( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF + ), + (p, iF) + ); + + declareRunTimeSelectionTable + ( + tmp, + faPatchField, + patchMapper, + ( + const faPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& m + ), + (dynamic_cast<const faPatchFieldType&>(ptf), p, iF, m) + ); + + declareRunTimeSelectionTable + ( + tmp, + faPatchField, + dictionary, + ( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict + ), + (p, iF, dict) + ); + + + // Constructors + + //- Construct from patch and internal field + faPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct from patch and internal field and patch field + faPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const Field<Type>& + ); + + //- Construct from patch, internal field and dictionary + faPatchField + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Construct by mapping the given faPatchField onto a new patch + faPatchField + ( + const faPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + faPatchField(const faPatchField<Type>&); + + //- Construct and return a clone + virtual tmp<faPatchField<Type> > clone() const + { + return tmp<faPatchField<Type> >(new faPatchField<Type>(*this)); + } + + //- Construct as copy setting internal field reference + faPatchField + ( + const faPatchField<Type>&, + const DimensionedField<Type, areaMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faPatchField<Type> > clone + ( + const DimensionedField<Type, areaMesh>& iF + ) const + { + return tmp<faPatchField<Type> >(new faPatchField<Type>(*this, iF)); + } + + + // Selectors + + //- Return a pointer to a new patchField created on freestore given + // patch and internal field + // (does not set the patch field values) + static tmp<faPatchField<Type> > New + ( + const word&, + const faPatch&, + const DimensionedField<Type, areaMesh>& + ); + + //- Return a pointer to a new patchField created on freestore from + // a given faPatchField mapped onto a new patch + static tmp<faPatchField<Type> > New + ( + const faPatchField<Type>&, + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const faPatchFieldMapper& + ); + + //- Return a pointer to a new patchField created on freestore + // from dictionary + static tmp<faPatchField<Type> > New + ( + const faPatch&, + const DimensionedField<Type, areaMesh>&, + const dictionary& + ); + + //- Return a pointer to a new calculatedFaPatchField created on + // freestore without setting patchField values + template<class Type2> + static tmp<faPatchField<Type> > NewCalculatedType + ( + const faPatchField<Type2>& + ); + + + // Destructor + + virtual ~faPatchField<Type>() + {} + + + // Member functions + + // Access + + //- Return local objectRegistry + const objectRegistry& db() const; + + //- Return patch + const faPatch& patch() const + { + return patch_; + } + + //- Return dimensioned internal field reference + const DimensionedField<Type, areaMesh>& + dimensionedInternalField() const + { + return internalField_; + } + + //- Return internal field reference + const Field<Type>& internalField() const + { + return internalField_; + } + + //- Return the type of the calculated for of faPatchField + static const word& calculatedType(); + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return false; + } + + //- Return true if this patch field is coupled + virtual bool coupled() const + { + return false; + } + + //- Return true if the boundary condition has already been updated + bool updated() const + { + return updated_; + } + + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ); + + //- Reverse map the given faPatchField onto this faPatchField + virtual void rmap + ( + const faPatchField<Type>&, + const labelList& + ); + + + // Evaluation functions + + //- Return patch-normal gradient + virtual tmp<Field<Type> > snGrad() const; + + //- Update the coefficients associated with the patch field + // Sets Updated to true + virtual void updateCoeffs() + { + updated_ = true; + } + + //- Return internal field next to patch as patch field + virtual tmp<Field<Type> > patchInternalField() const; + + //- Return patchField on the opposite patch of a coupled patch + virtual tmp<Field<Type> > patchNeighbourField() const + { + notImplemented(type() + "patchNeighbourField()"); + return *this; + } + + //- Initialise the evaluation of the patch field + virtual void initEvaluate + ( + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking + ) + {} + + //- Evaluate the patch field, sets Updated to false + virtual void evaluate + ( + const Pstream::commsTypes commsType = + Pstream::commsTypes::blocking + ); + + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueInternalCoeffs + ( + const tmp<Field<scalar> >& + ) const + { + notImplemented + ( + type() + + "::valueInternalCoeffs(const tmp<Field<scalar> >&)" + ); + return *this; + } + + //- Return the matrix source coefficients corresponding to the + // evaluation of the value of this patchField with given weights + virtual tmp<Field<Type> > valueBoundaryCoeffs + ( + const tmp<Field<scalar> >& + ) const + { + notImplemented + ( + type() + + "::valueBoundaryCoeffs(const tmp<Field<scalar> >&)" + ); + return *this; + } + + //- Return the matrix diagonal coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientInternalCoeffs() const + { + notImplemented(type() + "::gradientInternalCoeffs()"); + return *this; + } + + //- Return the matrix source coefficients corresponding to the + // evaluation of the gradient of this patchField + virtual tmp<Field<Type> > gradientBoundaryCoeffs() const + { + notImplemented(type() + "::gradientBoundaryCoeffs()"); + return *this; + } + + + //- Write + virtual void write(Ostream&) const; + + + // Check + + //- Check faPatchField<Type> against given faPatchField<Type> + void check(const faPatchField<Type>&) const; + + + // Member operators + + virtual void operator=(const UList<Type>&); + + virtual void operator=(const faPatchField<Type>&); + virtual void operator+=(const faPatchField<Type>&); + virtual void operator-=(const faPatchField<Type>&); + virtual void operator*=(const faPatchField<scalar>&); + virtual void operator/=(const faPatchField<scalar>&); + + virtual void operator+=(const Field<Type>&); + virtual void operator-=(const Field<Type>&); + + virtual void operator*=(const Field<scalar>&); + virtual void operator/=(const Field<scalar>&); + + virtual void operator=(const Type&); + virtual void operator+=(const Type&); + virtual void operator-=(const Type&); + virtual void operator*=(const scalar); + virtual void operator/=(const scalar); + + + // Force an assignment irrespective of form of patch + + virtual void operator==(const faPatchField<Type>&); + virtual void operator==(const Field<Type>&); + virtual void operator==(const Type&); + + + // Ostream operator + + friend Ostream& operator<< <Type>(Ostream&, const faPatchField<Type>&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faPatchField.C" +# include "calculatedFaPatchField.H" +#endif + + +#define addToFaPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \ + \ +addToRunTimeSelectionTable \ +( \ + PatchTypeField, typePatchTypeField, patch \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + PatchTypeField, \ + typePatchTypeField, \ + patchMapper \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + PatchTypeField, typePatchTypeField, dictionary \ +); + + +#define makeFaPatchTypeFieldTypeName(typePatchTypeField) \ + \ +defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); + + +#define makeFaPatchFieldsTypeName(typePatchField) \ + \ +makeFaPatchTypeFieldTypeName(typePatchField##FaPatchScalarField); \ +makeFaPatchTypeFieldTypeName(typePatchField##FaPatchVectorField); \ +makeFaPatchTypeFieldTypeName(typePatchField##FaPatchSphericalTensorField); \ +makeFaPatchTypeFieldTypeName(typePatchField##FaPatchSymmTensorField); \ +makeFaPatchTypeFieldTypeName(typePatchField##FaPatchTensorField); + + +#define makeFaPatchTypeField(PatchTypeField, typePatchTypeField) \ + \ +defineTypeNameAndDebug(typePatchTypeField, 0); \ + \ +addToFaPatchFieldRunTimeSelection \ +( \ + PatchTypeField, typePatchTypeField \ +); + +#define makeTemplateFaPatchTypeField(PatchTypeField, typePatchTypeField) \ + \ +defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \ + \ +addToFaPatchFieldRunTimeSelection \ +( \ + PatchTypeField, typePatchTypeField \ +); + + +#define makeFaPatchFields(type) \ + \ +makeTemplateFaPatchTypeField(faPatchScalarField, type##FaPatchScalarField); \ +makeTemplateFaPatchTypeField(faPatchVectorField, type##FaPatchVectorField); \ +makeTemplateFaPatchTypeField \ +( \ + faPatchSphericalTensorField, \ + type##FaPatchSphericalTensorField \ +); \ +makeTemplateFaPatchTypeField \ +( \ + faPatchSymmTensorField, \ + type##FaPatchSymmTensorField \ +); \ +makeTemplateFaPatchTypeField \ +( \ + faPatchTensorField, \ + type##FaPatchTensorField \ +); + + +#define makeFaPatchTypeFieldTypedefs(type) \ + \ +typedef type##FaPatchField<scalar> type##FaPatchScalarField; \ +typedef type##FaPatchField<vector> type##FaPatchVectorField; \ +typedef type##FaPatchField<sphericalTensor> \ + type##FaPatchSphericalTensorField; \ +typedef type##FaPatchField<symmTensor> type##FaPatchSymmTensorField; \ +typedef type##FaPatchField<tensor> type##FaPatchTensorField; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H new file mode 100644 index 0000000000000000000000000000000000000000..2ee01748e7a52f1e151a49f9c1e2f9e8b35afe78 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapper.H @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faPatchFieldMapper + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchFieldMapper_H +#define faPatchFieldMapper_H + +#include "primitiveFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faPatchFieldMapper Declaration +\*---------------------------------------------------------------------------*/ + +class faPatchFieldMapper +: + public FieldMapper +{ + +public: + + // Constructors + + //- Null constructor + faPatchFieldMapper() + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapperPatchRef.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapperPatchRef.H new file mode 100644 index 0000000000000000000000000000000000000000..629df8fa87e740e986b4efa269fa6719cc36b675 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldMapperPatchRef.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faPatchFieldMapperPatchRef + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchFieldMapperPatchRef_H +#define faPatchFieldMapperPatchRef_H + +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faPatchFieldMapperPatchRef Declaration +\*---------------------------------------------------------------------------*/ + +class faPatchFieldMapperPatchRef +: + public faPatchFieldMapper +{ + // Private data + + const faPatch& sourcePatch_; + const faPatch& targetPatch_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faPatchFieldMapperPatchRef(const faPatchFieldMapperPatchRef&); + + //- Disallow default bitwise assignment + void operator=(const faPatchFieldMapperPatchRef&); + + +public: + + // Constructors + + //- Construct from components + faPatchFieldMapperPatchRef(const faPatch& source, const faPatch& target) + : + sourcePatch_(source), + targetPatch_(target) + {} + + + // Member functions + + const faPatch& sourcePatch() const + { + return sourcePatch_; + } + + const faPatch& targetPatch() const + { + return targetPatch_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFields.C b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..1e607cd604e8280a4fd4d46fcc3127d51dbc73c7 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFields.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +#define makeFaPatchField(faPatchTypeField) \ + \ +defineNamedTemplateTypeNameAndDebug(faPatchTypeField, 0); \ +template<> \ +int \ +faPatchTypeField::disallowGenericFaPatchField \ +( \ + debug::debugSwitch("disallowGenericFaPatchField", 0) \ +); \ +defineTemplateRunTimeSelectionTable(faPatchTypeField, patch); \ +defineTemplateRunTimeSelectionTable(faPatchTypeField, patchMapper); \ +defineTemplateRunTimeSelectionTable(faPatchTypeField, dictionary); + +makeFaPatchField(faPatchScalarField) +makeFaPatchField(faPatchVectorField) +makeFaPatchField(faPatchSphericalTensorField) +makeFaPatchField(faPatchSymmTensorField) +makeFaPatchField(faPatchTensorField) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFields.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..391369a9dedc81c5fb8b8eb19840f54d1c7d6734 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFields.H @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchFields_H +#define faPatchFields_H + +#include "faPatchField.H" +#include "faPatchFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldsFwd.H b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..a63a66ffae25db6aa0804a7e55158b9a930422ef --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/faPatchFieldsFwd.H @@ -0,0 +1,56 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef faPatchFieldsFwd_H +#define faPatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class faPatchField; + +typedef faPatchField<scalar> faPatchScalarField; +typedef faPatchField<vector> faPatchVectorField; +typedef faPatchField<sphericalTensor> faPatchSphericalTensorField; +typedef faPatchField<symmTensor> faPatchSymmTensorField; +typedef faPatchField<tensor> faPatchTensorField; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faPatchFields/faPatchField/newFaPatchField.C b/src/finiteArea/fields/faPatchFields/faPatchField/newFaPatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..89541a917c9dfbf63dc4cdb8567dd2d737b1ec87 --- /dev/null +++ b/src/finiteArea/fields/faPatchFields/faPatchField/newFaPatchField.C @@ -0,0 +1,198 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faPatchField<Type> > faPatchField<Type>::New +( + const word& patchFieldType, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF +) +{ + if (debug) + { + Info<< "faPatchField<Type>::New(const word&, const faPatch&, " + "const DimensionedField<Type, areaMesh>&) : " + "constructing faPatchField<Type>" + << endl; + } + + typename patchConstructorTable::iterator cstrIter = + patchConstructorTablePtr_->find(patchFieldType); + + if (cstrIter == patchConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "faPatchField<Type>::New(const word&, const faPatch&, " + "const DimensionedField<Type, areaMesh>&)" + ) << "Unknown patchTypefield type " << patchFieldType + << endl << endl + << "Valid patchField types are :" << endl + << patchConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + typename patchConstructorTable::iterator patchTypeCstrIter = + patchConstructorTablePtr_->find(p.type()); + + if (patchTypeCstrIter != patchConstructorTablePtr_->end()) + { + return patchTypeCstrIter()(p, iF); + } + else + { + return cstrIter()(p, iF); + } +} + + +template<class Type> +tmp<faPatchField<Type> > faPatchField<Type>::New +( + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const dictionary& dict +) +{ + if (debug) + { + Info<< "faPatchField<Type>::New(const faPatch&, " + "const DimensionedField<Type, areaMesh>&, const dictionary&) : " + "constructing faPatchField<Type>" + << endl; + } + + word patchFieldType(dict.lookup("type")); + + typename dictionaryConstructorTable::iterator cstrIter + = dictionaryConstructorTablePtr_->find(patchFieldType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + if (!disallowGenericFaPatchField) + { + cstrIter = dictionaryConstructorTablePtr_->find("generic"); + } + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "faPatchField<Type>::New(const faPatch&, " + "const DimensionedField<Type, areaMesh>&, const dictionary&)", + dict + ) << "Unknown patchField type " << patchFieldType + << " for patch type " << p.type() << endl << endl + << "Valid patchField types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + } + + typename dictionaryConstructorTable::iterator patchTypeCstrIter + = dictionaryConstructorTablePtr_->find(p.type()); + + if + ( + patchTypeCstrIter != dictionaryConstructorTablePtr_->end() + && *patchTypeCstrIter != *cstrIter + ) + { + FatalIOErrorIn + ( + "faPatchField<Type>const faPatch&, " + "const DimensionedField<Type, areaMesh>&, const dictionary&)", + dict + ) << "inconsistent patch and patchField types for \n" + " patch type " << p.type() + << " and patchField type " << patchFieldType + << exit(FatalIOError); + } + + return cstrIter()(p, iF, dict); +} + + +template<class Type> +tmp<faPatchField<Type> > faPatchField<Type>::New +( + const faPatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, areaMesh>& iF, + const faPatchFieldMapper& pfMapper +) +{ + if (debug) + { + Info<< "faPatchField<Type>::New(const faPatchField<Type>&," + " const faPatch&, const DimensionedField<Type, areaMesh>&, " + "const faPatchFieldMapper&) : " + "constructing faPatchField<Type>" + << endl; + } + + typename patchMapperConstructorTable::iterator cstrIter = + patchMapperConstructorTablePtr_->find(ptf.type()); + + if (cstrIter == patchMapperConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "faPatchField<Type>::New(const faPatchField<Type>&, " + "const faPatch&, const DimensionedField<Type, areaMesh>&, " + "const faPatchFieldMapper&)" + ) << "unknown patchTypefield type " << ptf.type() << endl << endl + << "Valid patchField types are :" << endl + << patchMapperConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + typename patchMapperConstructorTable::iterator + patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type()); + + if (patchTypeCstrIter != patchMapperConstructorTablePtr_->end()) + { + return patchTypeCstrIter()(ptf, p, iF, pfMapper); + } + else + { + return cstrIter()(ptf, p, iF, pfMapper); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..f16b242f499aacc991c3e701de509cafabbf055e --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.C @@ -0,0 +1,148 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "calculatedFaePatchField.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +const word& faePatchField<Type>::calculatedType() +{ + return calculatedFaePatchField<Type>::typeName; +} + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +calculatedFaePatchField<Type>::calculatedFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(p, iF) +{} + + +template<class Type> +calculatedFaePatchField<Type>::calculatedFaePatchField +( + const calculatedFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faePatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +calculatedFaePatchField<Type>::calculatedFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + faePatchField<Type>(p, iF, Field<Type>("value", dict, p.size())) +{} + + +template<class Type> +calculatedFaePatchField<Type>::calculatedFaePatchField +( + const calculatedFaePatchField<Type>& ptf +) +: + faePatchField<Type>(ptf) +{} + + +template<class Type> +calculatedFaePatchField<Type>::calculatedFaePatchField +( + const calculatedFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(ptf, iF) +{} + + +template<class Type> +template<class Type2> +tmp<faePatchField<Type> > faePatchField<Type>::NewCalculatedType +( + const faePatchField<Type2>& pf +) +{ + typename patchConstructorTable::iterator patchTypeCstrIter = + patchConstructorTablePtr_->find(pf.patch().type()); + + if (patchTypeCstrIter != patchConstructorTablePtr_->end()) + { + return patchTypeCstrIter() + ( + pf.patch(), + DimensionedField<Type, edgeMesh>::null() + ); + } + else + { + return tmp<faePatchField<Type> > + ( + new calculatedFaePatchField<Type> + ( + pf.patch(), + DimensionedField<Type, edgeMesh>::null() + ) + ); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// Write +template<class Type> +void calculatedFaePatchField<Type>::write(Ostream& os) const +{ + faePatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..f19660bb5911ecbf536f481b75aea0cba379a7ca --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchField.H @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + calculatedFaePatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + calculatedFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef calculatedFaePatchField_H +#define calculatedFaePatchField_H + +#include "faePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class calculatedFaePatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class calculatedFaePatchField +: + public faePatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("calculated"); + + + // Constructors + + //- Construct from patch and internal field + calculatedFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch, internal field and dictionary + calculatedFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping given patchField<Type> onto a new patch + calculatedFaePatchField + ( + const calculatedFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + calculatedFaePatchField + ( + const calculatedFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new calculatedFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + calculatedFaePatchField + ( + const calculatedFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new calculatedFaePatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return true; + } + + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "calculatedFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFields.C b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..d1acfb6c11eb36b737f307f36b831e86ed6a6181 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faePatchFields.H" +#include "calculatedFaePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFields(calculated); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFields.H b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..0e483b820f730ebaffb248857fb8a6c017a8730f --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef calculatedFaePatchFields_H +#define calculatedFaePatchFields_H + +#include "calculatedFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(calculated) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..052f18611160d477caeaedd01501a3b8e1a27f93 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/calculated/calculatedFaePatchFieldsFwd.H @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + calculatedFaePatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef calculatedFaePatchFieldsFwd_H +#define calculatedFaePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class calculatedFaePatchField; + +makeFaePatchTypeFieldTypedefs(calculated) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..3720ecdae922d908b351bef012a48f1d07518e94 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.C @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "coupledFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +coupledFaePatchField<Type>::coupledFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(p, iF) +{} + + +template<class Type> +coupledFaePatchField<Type>::coupledFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const Field<Type>& f +) +: + faePatchField<Type>(p, iF, f) +{} + + +template<class Type> +coupledFaePatchField<Type>::coupledFaePatchField +( + const coupledFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faePatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +coupledFaePatchField<Type>::coupledFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + faePatchField<Type>(p, iF, dict) +{} + + +template<class Type> +coupledFaePatchField<Type>::coupledFaePatchField +( + const coupledFaePatchField<Type>& ptf +) +: + faePatchField<Type>(ptf) +{} + + +template<class Type> +coupledFaePatchField<Type>::coupledFaePatchField +( + const coupledFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void coupledFaePatchField<Type>::write(Ostream& os) const +{ + faePatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..ec0ba18f178bef3438d5dc0399f98a0817bd2d98 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchField.H @@ -0,0 +1,155 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + coupledFaePatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + coupledFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaePatchField_H +#define coupledFaePatchField_H + +#include "faePatchField.H" +#include "coupledFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class coupledFaePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class coupledFaePatchField +: + public faePatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(coupledFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + coupledFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch and internal field and patch field + coupledFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const Field<Type>& + ); + + //- Construct from patch, internal field and dictionary + coupledFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping the given coupledFaePatchField onto a new patch + coupledFaePatchField + ( + const coupledFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + coupledFaePatchField + ( + const coupledFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const = 0; + + //- Construct as copy setting internal field reference + coupledFaePatchField + ( + const coupledFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& + ) const = 0; + + + // Member functions + + // Access + + //- Return true if this patch field is derived from + // coupledFaePatchField<Type>. + virtual bool coupled() const + { + return true; + } + + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "coupledFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFields.C b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..b05b64619c17dd13ae9f03ead36b53419b9c599d --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faePatchFields.H" +#include "coupledFaePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFieldsTypeName(coupled); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFields.H b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..06e0c043e002acec542f3fe616b80d4ef7fb99b9 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaePatchFields_H +#define coupledFaePatchFields_H + +#include "coupledFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(coupled) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..5616dd0213c93edd0c447b177319849e6c959fd8 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/coupled/coupledFaePatchFieldsFwd.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + coupledFaePatchField + +\*---------------------------------------------------------------------------*/ + +#ifndef coupledFaePatchFieldsFwd_H +#define coupledFaePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class coupledFaePatchField; + +makeFaePatchTypeFieldTypedefs(coupled) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.C b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..1b35a0cc8e633d2a02352a9390cb33200e4b41c5 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.C @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "fixedValueFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +fixedValueFaePatchField<Type>::fixedValueFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(p, iF) +{} + + +template<class Type> +fixedValueFaePatchField<Type>::fixedValueFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + faePatchField<Type>(p, iF, Field<Type>("value", dict, p.size())) +{} + + +template<class Type> +fixedValueFaePatchField<Type>::fixedValueFaePatchField +( + const fixedValueFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(ptf, iF) +{} + + +template<class Type> +fixedValueFaePatchField<Type>::fixedValueFaePatchField +( + const fixedValueFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faePatchField<Type>(ptf, p, iF, mapper) +{} + + +template<class Type> +fixedValueFaePatchField<Type>::fixedValueFaePatchField +( + const fixedValueFaePatchField<Type>& ptf +) +: + faePatchField<Type>(ptf) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +void fixedValueFaePatchField<Type>::write(Ostream& os) const +{ + faePatchField<Type>::write(os); + this->writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..4ddd9d5590b2735f0297718264038336366a349c --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchField.H @@ -0,0 +1,183 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fixedValueFaePatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + fixedValueFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueFaePatchField_H +#define fixedValueFaePatchField_H + +#include "faePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class fixedValueFaePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class fixedValueFaePatchField +: + public faePatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("fixedValue"); + + + // Constructors + + //- Construct from patch and internal field + fixedValueFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch, internal field and dictionary + fixedValueFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping the given fixedValueFaePatchField<Type> + // onto a new patch + fixedValueFaePatchField + ( + const fixedValueFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + fixedValueFaePatchField + ( + const fixedValueFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new fixedValueFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + fixedValueFaePatchField + ( + const fixedValueFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new fixedValueFaePatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Access + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return true; + } + + + //- Write + virtual void write(Ostream&) const; + + + // Member operators + + virtual void operator=(const UList<Type>&) {} + + virtual void operator=(const faePatchField<Type>&) {} + virtual void operator+=(const faePatchField<Type>&) {} + virtual void operator-=(const faePatchField<Type>&) {} + virtual void operator*=(const faePatchField<scalar>&) {} + virtual void operator/=(const faePatchField<scalar>&) {} + + virtual void operator+=(const Field<Type>&) {} + virtual void operator-=(const Field<Type>&) {} + + virtual void operator*=(const Field<scalar>&) {} + virtual void operator/=(const Field<scalar>&) {} + + virtual void operator=(const Type&) {} + virtual void operator+=(const Type&) {} + virtual void operator-=(const Type&) {} + virtual void operator*=(const scalar) {} + virtual void operator/=(const scalar) {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "fixedValueFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFields.C b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..c4014a06ce2bcd7b4f242f5b1574c6df23d44819 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faePatchFields.H" +#include "fixedValueFaePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFields(fixedValue); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFields.H b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..436790abb528c5c82678ae3905e686db04791689 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueFaePatchFields_H +#define fixedValueFaePatchFields_H + +#include "fixedValueFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(fixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..d70f981d7d84048efe54b482d65cd23b88081cf9 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/basic/fixedValue/fixedValueFaePatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef fixedValueFaePatchFieldsFwd_H +#define fixedValueFaePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class fixedValueFaePatchField; + +makeFaePatchTypeFieldTypedefs(fixedValue) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..2ba8fd1ac7adfdd40fd685492aba2bb0d6e3ccf1 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C @@ -0,0 +1,137 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "cyclicFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +cyclicFaePatchField<Type>::cyclicFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + coupledFaePatchField<Type>(p, iF), + cyclicPatch_(refCast<const cyclicFaPatch>(p)) +{} + + +template<class Type> +cyclicFaePatchField<Type>::cyclicFaePatchField +( + const cyclicFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + coupledFaePatchField<Type>(ptf, p, iF, mapper), + cyclicPatch_(refCast<const cyclicFaPatch>(p)) +{ + if (!isType<cyclicFaPatch>(this->patch())) + { + FatalErrorIn + ( + "cyclicFaePatchField<Type>::cyclicFaePatchField\n" + "(\n" + " const cyclicFaePatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, edgeMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +cyclicFaePatchField<Type>::cyclicFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + coupledFaePatchField<Type>(p, iF, dict), + cyclicPatch_(refCast<const cyclicFaPatch>(p)) +{ + if (!isType<cyclicFaPatch>(p)) + { + FatalIOErrorIn + ( + "cyclicFaePatchField<Type>::cyclicFaePatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not cyclic type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +cyclicFaePatchField<Type>::cyclicFaePatchField +( + const cyclicFaePatchField<Type>& ptf +) +: + coupledFaePatchField<Type>(ptf), + cyclicPatch_(ptf.cyclicPatch_) +{} + + +template<class Type> +cyclicFaePatchField<Type>::cyclicFaePatchField +( + const cyclicFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + coupledFaePatchField<Type>(ptf, iF), + cyclicPatch_(ptf.cyclicPatch_) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..6f52c913fd650c9cc542505d7e2cbb1bd9e56f83 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.H @@ -0,0 +1,149 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::cyclicFaePatchField + +Description + Foam::cyclicFaePatchField + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + cyclicFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaePatchField_H +#define cyclicFaePatchField_H + +#include "coupledFaePatchField.H" +#include "cyclicFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cyclicFaePatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class cyclicFaePatchField +: + public coupledFaePatchField<Type> +{ + // Private data + + //- Local reference cast into the cyclic patch + const cyclicFaPatch& cyclicPatch_; + + +public: + + //- Runtime type information + TypeName(cyclicFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + cyclicFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch, internal field and dictionary + cyclicFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping given cyclicFaePatchField onto a new patch + cyclicFaePatchField + ( + const cyclicFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + cyclicFaePatchField + ( + const cyclicFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new cyclicFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + cyclicFaePatchField + ( + const cyclicFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new cyclicFaePatchField<Type>(*this, iF) + ); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "cyclicFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.C b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..b489d55f226d11aec29208918450c01db454c602 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "cyclicFaePatchFields.H" +#include "faePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFields(cyclic); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.H b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..dd5c768024b1f8d216be8aa93bc00c7a148f67df --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaePatchFields_H +#define cyclicFaePatchFields_H + +#include "cyclicFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(cyclic) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..f292c0b74b4a130b59e6154a9ca9d9d07138dd35 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchFieldsFwd.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef cyclicFaePatchFieldsFwd_H +#define cyclicFaePatchFieldsFwd_H + +#include "faePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class cyclicFaePatchField; + +makeFaePatchTypeFieldTypedefs(cyclic) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..181a009ab294984dbca71a52d364b7a7e6eddc60 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.C @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "emptyFaePatchField.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +emptyFaePatchField<Type>::emptyFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(p, iF, Field<Type>(0)) +{} + + +template<class Type> +emptyFaePatchField<Type>::emptyFaePatchField +( + const emptyFaePatchField<Type>&, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& +) +: + faePatchField<Type>(p, iF, Field<Type>(0)) +{ + if (!isType<emptyFaPatch>(this->patch())) + { + FatalErrorIn + ( + "emptyFaePatchField<Type>::emptyFaePatchField\n" + "(\n" + " const emptyFaePatchField<Type>&,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, edgeMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +emptyFaePatchField<Type>::emptyFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + faePatchField<Type>(p, iF, Field<Type>(0)) +{ + if (!isType<emptyFaPatch>(p)) + { + FatalIOErrorIn + ( + "emptyFaePatchField<Type>::emptyFaePatchField\n" + "(\n" + " const faPatch& p,\n" + " const DimensionedField<Type, edgeMesh>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not empty type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +emptyFaePatchField<Type>::emptyFaePatchField +( + const emptyFaePatchField<Type>& ptf +) +: + faePatchField<Type> + ( + ptf.patch(), + ptf.dimensionedInternalField(), + Field<Type>(0) + ) +{} + + +template<class Type> +emptyFaePatchField<Type>::emptyFaePatchField +( + const emptyFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(ptf.patch(), iF, Field<Type>(0)) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..f0f9233eeaed8ddc5f832db9520d5e8136a7eb78 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchField.H @@ -0,0 +1,163 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + emptyFaePatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + emptyFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaePatchField_H +#define emptyFaePatchField_H + +#include "faePatchField.H" +#include "emptyFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class emptyFaePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class emptyFaePatchField +: + public faePatchField<Type> +{ + +public: + + //- Runtime type information + TypeName("empty"); + + + // Constructors + + //- Construct from patch and internal field + emptyFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch, internal field and dictionary + emptyFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping given emptyFaePatchField onto a new patch + emptyFaePatchField + ( + const emptyFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + emptyFaePatchField + ( + const emptyFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new emptyFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + emptyFaePatchField + ( + const emptyFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new emptyFaePatchField<Type>(*this, iF) + ); + } + + + // Member functions + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ) + {} + + //- Reverse map the given fvsPatchField onto this fvsPatchField + virtual void rmap + ( + const faePatchField<Type>&, + const labelList& + ) + {} +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "emptyFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFields.C b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..6ff3ec408915ba93bb571ea7fa0f9a745b42fe22 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFields.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "faePatchFields.H" +#include "emptyFaePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFields(empty); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFields.H b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..23efb8f29e22e6be02fa338a22800aab0153bf3f --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaePatchFields_H +#define emptyFaePatchFields_H + +#include "emptyFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(empty) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..8d04c8880d04f78a0640b2b50c18a9e8ad9b00e2 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/empty/emptyFaePatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef emptyFaePatchFieldsFwd_H +#define emptyFaePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class emptyFaePatchField; + +makeFaePatchTypeFieldTypedefs(empty) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..e2b745cabb013927a03c807542af89ad3468ca0d --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "processorFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +processorFaePatchField<Type>::processorFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + coupledFaePatchField<Type>(p, iF), + procPatch_(refCast<const processorFaPatch>(p)) +{} + + +template<class Type> +processorFaePatchField<Type>::processorFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const Field<Type>& f +) +: + coupledFaePatchField<Type>(p, iF, f), + procPatch_(refCast<const processorFaPatch>(p)) +{} + + +// Construct by mapping given processorFaePatchField<Type> +template<class Type> +processorFaePatchField<Type>::processorFaePatchField +( + const processorFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + coupledFaePatchField<Type>(ptf, p, iF, mapper), + procPatch_(refCast<const processorFaPatch>(p)) +{ + if (!isType<processorFaPatch>(this->patch())) + { + FatalErrorIn + ( + "processorFaePatchField<Type>::processorFaePatchField\n" + "(\n" + " const processorFaePatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, edgeMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +processorFaePatchField<Type>::processorFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + coupledFaePatchField<Type>(p, iF, dict), + procPatch_(refCast<const processorFaPatch>(p)) +{ + if (!isType<processorFaPatch>(p)) + { + FatalIOErrorIn + ( + "processorFaePatchField<Type>::processorFaePatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not processor type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +processorFaePatchField<Type>::processorFaePatchField +( + const processorFaePatchField<Type>& ptf +) +: + coupledFaePatchField<Type>(ptf), + procPatch_(refCast<const processorFaPatch>(ptf.patch())) +{} + + +template<class Type> +processorFaePatchField<Type>::processorFaePatchField +( + const processorFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + coupledFaePatchField<Type>(ptf, iF), + procPatch_(refCast<const processorFaPatch>(ptf.patch())) +{} + + +// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * // + +template<class Type> +processorFaePatchField<Type>::~processorFaePatchField() +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..7b03766538e731a876a496045f6641dbd8ad459e --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.H @@ -0,0 +1,176 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + processorFaePatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + processorFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaePatchField_H +#define processorFaePatchField_H + +#include "coupledFaePatchField.H" +#include "processorFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class processorFaePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class processorFaePatchField +: + public coupledFaePatchField<Type> +{ + // Private data + + //- Local reference cast into the processor patch + const processorFaPatch& procPatch_; + + +public: + + //- Runtime type information + TypeName(processorFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + processorFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch and internal field and patch field + processorFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const Field<Type>& + ); + + //- Construct from patch, internal field and dictionary + processorFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping given processorFaePatchField onto a new patch + processorFaePatchField + ( + const processorFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + processorFaePatchField(const processorFaePatchField<Type>&); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new processorFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + processorFaePatchField + ( + const processorFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new processorFaePatchField<Type>(*this, iF) + ); + } + + + // Destructor + + ~processorFaePatchField(); + + + // Member functions + + // Access + + //- Return true if running parallel + virtual bool coupled() const + { + if (Pstream::parRun()) + { + return true; + } + else + { + return false; + } + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "processorFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFields.C b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..65366f8ad2b069829d279e5051519fbc2d1074b4 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "processorFaePatchFields.H" +#include "faePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFields(processor); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFields.H b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..33f26711015af5cabc0d5eb7b333b8ab6a7e26b9 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaePatchFields_H +#define processorFaePatchFields_H + +#include "processorFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(processor) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..6b5699a4937be8e4aa13cbd4080b4bcc18fb2724 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef processorFaePatchFieldsFwd_H +#define processorFaePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class processorFaePatchField; + +makeFaePatchTypeFieldTypedefs(processor) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..66996057b3fa7aa74015566111ebe9eb01d67789 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.C @@ -0,0 +1,132 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +symmetryFaePatchField<Type>::symmetryFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(p, iF) +{} + + +template<class Type> +symmetryFaePatchField<Type>::symmetryFaePatchField +( + const symmetryFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faePatchField<Type>(ptf, p, iF, mapper) +{ + if (!isType<symmetryFaPatch>(this->patch())) + { + FatalErrorIn + ( + "symmetryFaePatchField<Type>::symmetryFaePatchField\n" + "(\n" + " const symmetryFaePatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, edgeMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +symmetryFaePatchField<Type>::symmetryFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + faePatchField<Type>(p, iF, dict) +{ + if (!isType<symmetryFaPatch>(p)) + { + FatalIOErrorIn + ( + "symmetryFaePatchField<Type>::symmetryFaePatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " const dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not symmetry type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +symmetryFaePatchField<Type>::symmetryFaePatchField +( + const symmetryFaePatchField<Type>& ptf +) +: + faePatchField<Type>(ptf) +{} + + +template<class Type> +symmetryFaePatchField<Type>::symmetryFaePatchField +( + const symmetryFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..25f2d5b444e76c3cfe23681f6f079dc10ee37c5f --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchField.H @@ -0,0 +1,144 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::symmetryFaePatchField + +Description + Foam::symmetryFaePatchField + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + symmetryFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaePatchField_H +#define symmetryFaePatchField_H + +#include "faePatchField.H" +#include "symmetryFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symmetryFaePatch Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class symmetryFaePatchField +: + public faePatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(symmetryFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + symmetryFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch, internal field and dictionary + symmetryFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping given symmetryFaePatchField onto a new patch + symmetryFaePatchField + ( + const symmetryFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + symmetryFaePatchField + ( + const symmetryFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new symmetryFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + symmetryFaePatchField + ( + const symmetryFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new symmetryFaePatchField<Type>(*this, iF) + ); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "symmetryFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFields.C b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..bf360f00e64181f8509bf3fd6f493cf286ba69c0 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "symmetryFaePatchFields.H" +#include "faePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +makeFaePatchFields(symmetry); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFields.H b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..a01a874547286d3dc7b82bd0418106c2dade6d46 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaePatchFields_H +#define symmetryFaePatchFields_H + +#include "symmetryFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(symmetry) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..4ffc83f3675e5c370ef6829927842e7eda85e8aa --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/symmetry/symmetryFaePatchFieldsFwd.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef symmetryFaePatchFieldsFwd_H +#define symmetryFaePatchFieldsFwd_H + +#include "faPatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class symmetryFaePatchField; + +makeFaePatchTypeFieldTypedefs(symmetry) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..71290c22fd293aca8342e0d70cd4b3661638a0f4 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.C @@ -0,0 +1,132 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "wedgeFaePatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +wedgeFaePatchField<Type>::wedgeFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(p, iF) +{} + + +template<class Type> +wedgeFaePatchField<Type>::wedgeFaePatchField +( + const wedgeFaePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + faePatchField<Type>(ptf, p, iF, mapper) +{ + if (!isType<wedgeFaPatch>(this->patch())) + { + FatalErrorIn + ( + "wedgeFaePatchField<Type>::wedgeFaePatchField\n" + "(\n" + " const wedgeFaePatchField<Type>& ptf,\n" + " const faPatch& p,\n" + " const DimensionedField<Type, edgeMesh>& iF,\n" + " const faPatchFieldMapper& mapper\n" + ")\n" + ) << "Field type does not correspond to patch type for patch " + << this->patch().index() << "." << endl + << "Field type: " << typeName << endl + << "Patch type: " << this->patch().type() + << exit(FatalError); + } +} + + +template<class Type> +wedgeFaePatchField<Type>::wedgeFaePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + faePatchField<Type>(p, iF, dict) +{ + if (!isType<wedgeFaPatch>(p)) + { + FatalIOErrorIn + ( + "wedgeFaePatchField<Type>::wedgeFaePatchField\n" + "(\n" + " const faPatch& p,\n" + " const Field<Type>& field,\n" + " dictionary& dict\n" + ")\n", + dict + ) << "patch " << this->patch().index() << " not wedge type. " + << "Patch type = " << p.type() + << exit(FatalIOError); + } +} + + +template<class Type> +wedgeFaePatchField<Type>::wedgeFaePatchField +( + const wedgeFaePatchField<Type>& ptf +) +: + faePatchField<Type>(ptf) +{} + + +template<class Type> +wedgeFaePatchField<Type>::wedgeFaePatchField +( + const wedgeFaePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + faePatchField<Type>(ptf, iF) +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..c4bdbbb8a62a5f317fbc277694c5843b709061d5 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchField.H @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + wedgeFaePatchField + +Description + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + wedgeFaePatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaePatchField_H +#define wedgeFaePatchField_H + +#include "faePatchField.H" +#include "wedgeFaPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class wedgeFaePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class wedgeFaePatchField +: + public faePatchField<Type> +{ + +public: + + //- Runtime type information + TypeName(wedgeFaPatch::typeName_()); + + + // Constructors + + //- Construct from patch and internal field + wedgeFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch, internal field and dictionary + wedgeFaePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping given wedgeFaePatchField onto a new patch + wedgeFaePatchField + ( + const wedgeFaePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + wedgeFaePatchField + ( + const wedgeFaePatchField<Type>& + ); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> > + ( + new wedgeFaePatchField<Type>(*this) + ); + } + + //- Construct as copy setting internal field reference + wedgeFaePatchField + ( + const wedgeFaePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new wedgeFaePatchField<Type>(*this, iF) + ); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "wedgeFaePatchField.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFields.C b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..427e16d1227c42c1bcbf892b1f2980f01479b50e --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFields.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "wedgeFaePatchFields.H" +#include "faePatchFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Member * * * * * * * * * * * * * // + +makeFaePatchFields(wedge); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFields.H b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..6022f3faaa887d9573d3842e6d16a5a68f4162f8 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFields.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaePatchFields_H +#define wedgeFaePatchFields_H + +#include "wedgeFaePatchField.H" +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaePatchTypeFieldTypedefs(wedge) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..64b8d0b2369a575290c2216ec681da89bb7b7eaa --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/constraint/wedge/wedgeFaePatchFieldsFwd.H @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#ifndef wedgeFaePatchFieldsFwd_H +#define wedgeFaePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class wedgeFaePatchField; + +makeFaePatchTypeFieldTypedefs(wedge) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..3a6795a96604f1788ac5752b6f6cab337fb0ecb0 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.C @@ -0,0 +1,411 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "IOobject.H" +#include "dictionary.H" +#include "faMesh.H" +#include "faPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +faePatchField<Type>::faePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +: + Field<Type>(p.size()), + patch_(p), + internalField_(iF) +{} + + +template<class Type> +faePatchField<Type>::faePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const Field<Type>& f +) +: + Field<Type>(f), + patch_(p), + internalField_(iF) +{} + + +template<class Type> +faePatchField<Type>::faePatchField +( + const faePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& mapper +) +: + Field<Type>(ptf, mapper), + patch_(p), + internalField_(iF) +{} + + +template<class Type> +faePatchField<Type>::faePatchField +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +: + Field<Type>(p.size()), + patch_(p), + internalField_(iF) +{ + if (dict.found("value")) + { + faePatchField<Type>::operator= + ( + Field<Type>("value", dict, p.size()) + ); + } + else + { + faePatchField<Type>::operator=(pTraits<Type>::zero); + } +} + + +template<class Type> +faePatchField<Type>::faePatchField +( + const faePatchField<Type>& ptf +) +: + Field<Type>(ptf), + patch_(ptf.patch_), + internalField_(ptf.internalField_) +{} + + +template<class Type> +faePatchField<Type>::faePatchField +( + const faePatchField<Type>& ptf, + const DimensionedField<Type, edgeMesh>& iF +) +: + Field<Type>(ptf), + patch_(ptf.patch_), + internalField_(iF) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +const objectRegistry& faePatchField<Type>::db() const +{ + //HR 12.3.10: Lookup fields from the field DB rather than the mesh + return internalField_.db(); +} + + +template<class Type> +void faePatchField<Type>::check(const faePatchField<Type>& ptf) const +{ + if (&patch_ != &(ptf.patch_)) + { + FatalErrorIn("PatchField<Type>::check(const faePatchField<Type>&)") + << "different patches for faePatchField<Type>s" + << abort(FatalError); + } +} + + +// Map from self +template<class Type> +void faePatchField<Type>::autoMap +( + const faPatchFieldMapper& m +) +{ + Field<Type>::autoMap(m); +} + + +// Reverse-map the given faePatchField onto this faePatchField +template<class Type> +void faePatchField<Type>::rmap +( + const faePatchField<Type>& ptf, + const labelList& addr +) +{ + Field<Type>::rmap(ptf, addr); +} + + +// Write +template<class Type> +void faePatchField<Type>::write(Ostream& os) const +{ + os.writeKeyword("type") << type() << token::END_STATEMENT << nl; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Type> +void faePatchField<Type>::operator= +( + const UList<Type>& ul +) +{ + Field<Type>::operator=(ul); +} + + +template<class Type> +void faePatchField<Type>::operator= +( + const faePatchField<Type>& ptf +) +{ + check(ptf); + Field<Type>::operator=(ptf); +} + + +template<class Type> +void faePatchField<Type>::operator+= +( + const faePatchField<Type>& ptf +) +{ + check(ptf); + Field<Type>::operator+=(ptf); +} + + +template<class Type> +void faePatchField<Type>::operator-= +( + const faePatchField<Type>& ptf +) +{ + check(ptf); + Field<Type>::operator-=(ptf); +} + + +template<class Type> +void faePatchField<Type>::operator*= +( + const faePatchField<scalar>& ptf +) +{ + if (&patch_ != &ptf.patch()) + { + FatalErrorIn + ( + "PatchField<Type>::operator*=(const faePatchField<scalar>& ptf)" + ) << "incompatible patches for patch fields" + << abort(FatalError); + } + + Field<Type>::operator*=(ptf); +} + + +template<class Type> +void faePatchField<Type>::operator/= +( + const faePatchField<scalar>& ptf +) +{ + if (&patch_ != &ptf.patch()) + { + FatalErrorIn + ( + "PatchField<Type>::operator/=(const faePatchField<scalar>& ptf)" + ) << " incompatible patches for patch fields" + << abort(FatalError); + } + + Field<Type>::operator/=(ptf); +} + + +template<class Type> +void faePatchField<Type>::operator+= +( + const Field<Type>& tf +) +{ + Field<Type>::operator+=(tf); +} + + +template<class Type> +void faePatchField<Type>::operator-= +( + const Field<Type>& tf +) +{ + Field<Type>::operator-=(tf); +} + + +template<class Type> +void faePatchField<Type>::operator*= +( + const scalarField& tf +) +{ + Field<Type>::operator*=(tf); +} + + +template<class Type> +void faePatchField<Type>::operator/= +( + const scalarField& tf +) +{ + Field<Type>::operator/=(tf); +} + + +template<class Type> +void faePatchField<Type>::operator= +( + const Type& t +) +{ + Field<Type>::operator=(t); +} + + +template<class Type> +void faePatchField<Type>::operator+= +( + const Type& t +) +{ + Field<Type>::operator+=(t); +} + + +template<class Type> +void faePatchField<Type>::operator-= +( + const Type& t +) +{ + Field<Type>::operator-=(t); +} + + +template<class Type> +void faePatchField<Type>::operator*= +( + const scalar s +) +{ + Field<Type>::operator*=(s); +} + + +template<class Type> +void faePatchField<Type>::operator/= +( + const scalar s +) +{ + Field<Type>::operator/=(s); +} + + +// Force an assignment, overriding fixedValue status +template<class Type> +void faePatchField<Type>::operator== +( + const faePatchField<Type>& ptf +) +{ + Field<Type>::operator=(ptf); +} + + +template<class Type> +void faePatchField<Type>::operator== +( + const Field<Type>& tf +) +{ + Field<Type>::operator=(tf); +} + + +template<class Type> +void faePatchField<Type>::operator== +( + const Type& t +) +{ + Field<Type>::operator=(t); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Type> +Ostream& operator<<(Ostream& os, const faePatchField<Type>& ptf) +{ + ptf.write(os); + + os.check("Ostream& operator<<(Ostream&, const faePatchField<Type>&"); + + return os; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +# include "newFaePatchField.C" + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H new file mode 100644 index 0000000000000000000000000000000000000000..0c5a6149202a6259227eb427d4c0eb3d734b0875 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchField.H @@ -0,0 +1,439 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faePatchField + +Description + faePatchField<Type> abstract base class. This class gives a fat-interface + to all derived classes covering all possible ways in which they might be + used. The first level of derivation is to basic patchFields which cover + zero-gradient, fixed-gradient, fixed-value and mixed conditions. The next + level of derivation covers all the specialised typed with specific + evaluation proceedures, particularly with respect to specific fields. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faePatchField.C + newPatchField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faePatchField_H +#define faePatchField_H + +#include "faPatch.H" +#include "DimensionedField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Class forward declarations + +class objectRegistry; +class dictionary; +class faPatchFieldMapper; +class edgeMesh; + + +// * * * * * * Forward declaration of template friend fuctions * * * * * * * // + +template<class Type> +class faePatchField; + +template<class Type> +class calculatedFaePatchField; + +template<class Type> +Ostream& operator<<(Ostream&, const faePatchField<Type>&); + + +/*---------------------------------------------------------------------------*\ + Class faePatchField Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class faePatchField +: + public Field<Type> +{ + // Private data + + //- Reference to a patch + const faPatch& patch_; + + //- Reference to internal field + const DimensionedField<Type, edgeMesh>& internalField_; + + +public: + + typedef faPatch Patch; + typedef calculatedFaePatchField<Type> Calculated; + + + //- Runtime type information + TypeName("faePatchField"); + + //- Debug switch to disallow the use of + static int disallowGenericFaePatchField; + + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + faePatchField, + patch, + ( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF + ), + (p, iF) + ); + + declareRunTimeSelectionTable + ( + tmp, + faePatchField, + patchMapper, + ( + const faePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& m + ), + (dynamic_cast<const faePatchFieldType&>(ptf), p, iF, m) + ); + + declareRunTimeSelectionTable + ( + tmp, + faePatchField, + dictionary, + ( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict + ), + (p, iF, dict) + ); + + + // Constructors + + //- Construct from patch and internal field + faePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct from patch and internal field and patch field + faePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const Field<Type>& + ); + + //- Construct from patch, internal field and dictionary + faePatchField + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Construct by mapping the given faePatchField onto a new patch + faePatchField + ( + const faePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Construct as copy + faePatchField(const faePatchField<Type>&); + + //- Construct and return a clone + virtual tmp<faePatchField<Type> > clone() const + { + return tmp<faePatchField<Type> >(new faePatchField<Type>(*this)); + } + + //- Construct as copy setting internal field reference + faePatchField + ( + const faePatchField<Type>&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<faePatchField<Type> > clone + ( + const DimensionedField<Type, edgeMesh>& iF + ) const + { + return tmp<faePatchField<Type> > + ( + new faePatchField<Type>(*this, iF) + ); + } + + + // Selectors + + //- Return a pointer to a new patchField created on freestore given + // patch and internal field + // (does not set the patch field values) + static tmp<faePatchField<Type> > New + ( + const word&, + const faPatch&, + const DimensionedField<Type, edgeMesh>& + ); + + //- Return a pointer to a new patchField created on freestore from + // a given faePatchField mapped onto a new patch + static tmp<faePatchField<Type> > New + ( + const faePatchField<Type>&, + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const faPatchFieldMapper& + ); + + //- Return a pointer to a new patchField created on freestore + // from dictionary + static tmp<faePatchField<Type> > New + ( + const faPatch&, + const DimensionedField<Type, edgeMesh>&, + const dictionary& + ); + + //- Return a pointer to a new calculatedFaePatchField created on + // freestore without setting patchField values + template<class Type2> + static tmp<faePatchField<Type> > NewCalculatedType + ( + const faePatchField<Type2>& + ); + + + //- Destructor + virtual ~faePatchField<Type>() + {} + + + // Member functions + + // Access + + //- Return local objectRegistry + const objectRegistry& db() const; + + //- Return patch + const faPatch& patch() const + { + return patch_; + } + + //- Return dimensioned internal field reference + const DimensionedField<Type, edgeMesh>& + dimensionedInternalField() const + { + return internalField_; + } + + //- Return internal field reference + const Field<Type>& internalField() const + { + return internalField_; + } + + //- Return the type of the calculated for of faePatchField + static const word& calculatedType(); + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return false; + } + + //- Return true if this patch field is coupled + virtual bool coupled() const + { + return false; + } + + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const faPatchFieldMapper& + ); + + //- Reverse map the given faePatchField onto this faePatchField + virtual void rmap + ( + const faePatchField<Type>&, + const labelList& + ); + + + //- Write + virtual void write(Ostream&) const; + + + // Check + + //- Check faePatchField<Type> against given faePatchField<Type> + void check(const faePatchField<Type>&) const; + + + // Member operators + + virtual void operator=(const UList<Type>&); + + virtual void operator=(const faePatchField<Type>&); + virtual void operator+=(const faePatchField<Type>&); + virtual void operator-=(const faePatchField<Type>&); + virtual void operator*=(const faePatchField<scalar>&); + virtual void operator/=(const faePatchField<scalar>&); + + virtual void operator+=(const Field<Type>&); + virtual void operator-=(const Field<Type>&); + + virtual void operator*=(const Field<scalar>&); + virtual void operator/=(const Field<scalar>&); + + virtual void operator=(const Type&); + virtual void operator+=(const Type&); + virtual void operator-=(const Type&); + virtual void operator*=(const scalar); + virtual void operator/=(const scalar); + + + // Force an assignment irrespective of form of patch + + virtual void operator==(const faePatchField<Type>&); + virtual void operator==(const Field<Type>&); + virtual void operator==(const Type&); + + + // Ostream operator + + friend Ostream& operator<< <Type>(Ostream&, const faePatchField<Type>&); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faePatchField.C" +# include "calculatedFaePatchField.H" +#endif + + +#define makeFaePatchTypeFieldTypeName(typePatchTypeField) \ + \ +defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); + +#define makeFaePatchFieldsTypeName(typePatchField) \ + \ +makeFaePatchTypeFieldTypeName(typePatchField##FaePatchScalarField); \ +makeFaePatchTypeFieldTypeName(typePatchField##FaePatchVectorField); \ +makeFaePatchTypeFieldTypeName(typePatchField##FaePatchSphericalTensorField); \ +makeFaePatchTypeFieldTypeName(typePatchField##FaePatchSymmTensorField); \ +makeFaePatchTypeFieldTypeName(typePatchField##FaePatchTensorField); + + +#define makeFaePatchTypeField(PatchTypeField, typePatchTypeField) \ + \ +defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \ + \ +addToRunTimeSelectionTable \ +( \ + PatchTypeField, typePatchTypeField, patch \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + PatchTypeField, \ + typePatchTypeField, \ + patchMapper \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + PatchTypeField, typePatchTypeField, dictionary \ +); + + +#define makeFaePatchFields(type) \ + \ +makeFaePatchTypeField(faePatchScalarField, type##FaePatchScalarField); \ +makeFaePatchTypeField(faePatchVectorField, type##FaePatchVectorField); \ +makeFaePatchTypeField \ +( \ + faePatchSphericalTensorField, \ + type##FaePatchSphericalTensorField \ +); \ +makeFaePatchTypeField(faePatchSymmTensorField, type##FaePatchSymmTensorField); \ +makeFaePatchTypeField(faePatchTensorField, type##FaePatchTensorField); + + +#define makeFaePatchTypeFieldTypedefs(type) \ + \ +typedef type##FaePatchField<scalar> type##FaePatchScalarField; \ +typedef type##FaePatchField<vector> type##FaePatchVectorField; \ +typedef type##FaePatchField<sphericalTensor> \ + type##FaePatchSphericalTensorField; \ +typedef type##FaePatchField<symmTensor> type##FaePatchSymmTensorField; \ +typedef type##FaePatchField<tensor> type##FaePatchTensorField; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFields.C b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFields.C new file mode 100644 index 0000000000000000000000000000000000000000..a318f9bf4110ccc261997fd6db4da8809a2574b5 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFields.C @@ -0,0 +1,64 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Finite area edge-based patch fields + +\*---------------------------------------------------------------------------*/ + +#include "faePatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +#define makeFaePatchField(faePatchTypeField) \ + \ +defineNamedTemplateTypeNameAndDebug(faePatchTypeField, 0); \ +template<> \ +int \ +faePatchTypeField::disallowGenericFaePatchField \ +( \ + debug::debugSwitch("disallowGenericFaPatchField", 0) \ +); \ +defineTemplateRunTimeSelectionTable(faePatchTypeField, patch); \ +defineTemplateRunTimeSelectionTable(faePatchTypeField, patchMapper); \ +defineTemplateRunTimeSelectionTable(faePatchTypeField, dictionary); + +makeFaePatchField(faePatchScalarField) +makeFaePatchField(faePatchVectorField) +makeFaePatchField(faePatchSphericalTensorField) +makeFaePatchField(faePatchSymmTensorField) +makeFaePatchField(faePatchTensorField) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFields.H b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFields.H new file mode 100644 index 0000000000000000000000000000000000000000..3f2f2c81ca008b52f9046d4e7b881620e0711daf --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFields.H @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faePatchField + +Description + Finite area edge-based patch fields + +\*---------------------------------------------------------------------------*/ + +#ifndef faePatchFields_H +#define faePatchFields_H + +#include "faePatchField.H" +#include "faePatchFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldsFwd.H b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldsFwd.H new file mode 100644 index 0000000000000000000000000000000000000000..8ae8bf623079b3a3532e6139c28d467754972ae3 --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/faePatchField/faePatchFieldsFwd.H @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faePatchField + +Description + +\*---------------------------------------------------------------------------*/ + +#ifndef faePatchFieldsFwd_H +#define faePatchFieldsFwd_H + +#include "fieldTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> class faePatchField; + +typedef faePatchField<scalar> faePatchScalarField; +typedef faePatchField<vector> faePatchVectorField; +typedef faePatchField<sphericalTensor> faePatchSphericalTensorField; +typedef faePatchField<symmTensor> faePatchSymmTensorField; +typedef faePatchField<tensor> faePatchTensorField; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/fields/faePatchFields/faePatchField/newFaePatchField.C b/src/finiteArea/fields/faePatchFields/faePatchField/newFaePatchField.C new file mode 100644 index 0000000000000000000000000000000000000000..0a83d477653124f72c036e8a90648bec3ba71e3f --- /dev/null +++ b/src/finiteArea/fields/faePatchFields/faePatchField/newFaePatchField.C @@ -0,0 +1,205 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faePatchField<Type> > faePatchField<Type>::New +( + const word& patchFieldType, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF +) +{ + if (debug) + { + Info<< "faePatchField<Type>::New(const word&, const faPatch&, " + "const DimensionedField<Type, edgeMesh>&) : " + "constructing faePatchField<Type>" + << endl; + } + + typename patchConstructorTable::iterator cstrIter = + patchConstructorTablePtr_->find(patchFieldType); + + if (cstrIter == patchConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "faePatchField<Type>::New(const word&, const faPatch&, " + "const DimensionedField<Type, edgeMesh>&)" + ) << "Unknown patchTypefield type " << patchFieldType + << endl << endl + << "Valid patchField types are :" << endl + << patchConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + typename patchConstructorTable::iterator patchTypeCstrIter = + patchConstructorTablePtr_->find(p.type()); + + if (patchTypeCstrIter != patchConstructorTablePtr_->end()) + { + return patchTypeCstrIter()(p, iF); + } + else + { + return cstrIter()(p, iF); + } +} + + +template<class Type> +tmp<faePatchField<Type> > faePatchField<Type>::New +( + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const dictionary& dict +) +{ + if (debug) + { + Info<< "faePatchField<Type>::New(const faPatch&, " + "const DimensionedField<Type, edgeMesh>&, " + "const dictionary&) : " + "constructing faePatchField<Type>" + << endl; + } + + word patchFieldType(dict.lookup("type")); + + typename dictionaryConstructorTable::iterator cstrIter + = dictionaryConstructorTablePtr_->find(patchFieldType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + if (!disallowGenericFaePatchField) + { + cstrIter = dictionaryConstructorTablePtr_->find("generic"); + } + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "faePatchField<Type>::New(const faPatch&, " + "const DimensionedField<Type, edgeMesh>&, " + "const dictionary&)", + dict + ) << "Unknown patchField type " << patchFieldType + << " for patch type " << p.type() << endl << endl + << "Valid patchField types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + } + + typename dictionaryConstructorTable::iterator patchTypeCstrIter + = dictionaryConstructorTablePtr_->find(p.type()); + + if + ( + patchTypeCstrIter != dictionaryConstructorTablePtr_->end() + && *patchTypeCstrIter != *cstrIter + ) + { + FatalIOErrorIn + ( + "faePatchField<Type>const faPatch&, " + "const DimensionedField<Type, edgeMesh>&, " + "const dictionary&)", + dict + ) << "inconsistent patch and patchField types for \n" + " patch type " << p.type() + << " and patchField type " << patchFieldType + << exit(FatalIOError); + } + + return cstrIter()(p, iF, dict); +} + + +// Return a pointer to a new patch created on freestore from +// a given faePatchField<Type> mapped onto a new patch +template<class Type> +tmp<faePatchField<Type> > faePatchField<Type>::New +( + const faePatchField<Type>& ptf, + const faPatch& p, + const DimensionedField<Type, edgeMesh>& iF, + const faPatchFieldMapper& pfMapper +) +{ + if (debug) + { + Info<< "faePatchField<Type>::New(const faePatchField<Type>&," + " const faPatch&, const DimensionedField<Type, edgeMesh>&, " + "const faPatchFieldMapper&) : " + "constructing faePatchField<Type>" + << endl; + } + + typename patchMapperConstructorTable::iterator cstrIter = + patchMapperConstructorTablePtr_->find(ptf.type()); + + if (cstrIter == patchMapperConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "faePatchField<Type>::New(const faePatchField<Type>&, " + "const faPatch&, const DimensionedField<Type, edgeMesh>&, " + "const faPatchFieldMapper&)" + ) << "unknown patchTypefield type " << ptf.type() << endl << endl + << "Valid patchField types are :" << endl + << patchMapperConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + typename patchMapperConstructorTable::iterator + patchTypeCstrIter = patchMapperConstructorTablePtr_->find(p.type()); + + if (patchTypeCstrIter != patchMapperConstructorTablePtr_->end()) + { + return patchTypeCstrIter()(ptf, p, iF, pfMapper); + } + else + { + return cstrIter()(ptf, p, iF, pfMapper); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionScheme.C b/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..3281589530cf371abe3be03c414f2d3065d1926d --- /dev/null +++ b/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionScheme.C @@ -0,0 +1,117 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus convection schemes. + +\*---------------------------------------------------------------------------*/ + +#include "faConvectionScheme.H" +#include "fa.H" +#include "HashTable.H" +#include "linearEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class Type> +tmp<convectionScheme<Type> > convectionScheme<Type>::New +( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& schemeData +) +{ + if (fa::debug) + { + Info<< "convectionScheme<Type>::New" + "(const faMesh&, const edgeScalarField&, Istream&) : " + "constructing convectionScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "convectionScheme<Type>::New" + "(const faMesh&, const edgeScalarField&, Istream&)", + schemeData + ) << "Convection scheme not specified" << endl << endl + << "Valid convection schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_->find(schemeName); + + if (cstrIter == IstreamConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "convectionScheme<Type>::New" + "(const faMesh&, const edgeScalarField&, Istream&)", + schemeData + ) << "Unknown convection scheme " << schemeName << nl << nl + << "Valid convection schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return cstrIter()(mesh, faceFlux, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +convectionScheme<Type>::~convectionScheme() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionScheme.H b/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..38a58a1cee02de2d24b6aac1ece01eeaa4e8b01f --- /dev/null +++ b/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionScheme.H @@ -0,0 +1,201 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + convectionScheme + +Description + Abstract base class for convection schemes. + +SourceFiles + faConvectionScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faConvectionScheme_H +#define faConvectionScheme_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +class faMatrix; + +class faMesh; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class convectionScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class convectionScheme +: + public refCount +{ + // Private data + + const faMesh& mesh_; + + + // Private Member Functions + + //- Disallow copy construct + convectionScheme(const convectionScheme&); + + //- Disallow default bitwise assignment + void operator=(const convectionScheme&); + + +public: + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + convectionScheme, + Istream, + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& schemeData + ), + (mesh, faceFlux, schemeData) + ); + + + // Constructors + + //- Construct from mesh, flux and Istream + convectionScheme + ( + const faMesh& mesh, + const edgeScalarField& faceFlux + ) + : + mesh_(mesh) + {} + + + // Selectors + + //- Return a pointer to a new convectionScheme created on freestore + static tmp<convectionScheme<Type> > New + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& schemeData + ); + + + // Destructor + + virtual ~convectionScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > flux + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) const = 0; + + virtual tmp<faMatrix<Type> > famDiv + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) const = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDiv + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeFaConvectionTypeScheme(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \ + \ + namespace Foam \ + { \ + namespace fa \ + { \ + convectionScheme<Type>::addIstreamConstructorToTable<SS<Type> > \ + add##SS##Type##IstreamConstructorToTable_; \ + } \ + } + + +#define makeFaConvectionScheme(SS) \ + \ +makeFaConvectionTypeScheme(SS, scalar) \ +makeFaConvectionTypeScheme(SS, vector) \ +makeFaConvectionTypeScheme(SS, tensor) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faConvectionScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionSchemes.C b/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..14ef9690b9e8a9c50eb553a1e11c3acf1d6cf5ff --- /dev/null +++ b/src/finiteArea/finiteArea/convectionSchemes/faConvectionScheme/faConvectionSchemes.C @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus convection schemes. + +\*---------------------------------------------------------------------------*/ + +#include "faConvectionScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Define the constructor function hash tables + +defineTemplateRunTimeSelectionTable +( + convectionScheme<scalar>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + convectionScheme<vector>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + convectionScheme<tensor>, + Istream +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionScheme.C b/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..09d8a5761245753bd5ecefa0378623dd66441de6 --- /dev/null +++ b/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionScheme.C @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaConvectionScheme.H" +#include "facEdgeIntegrate.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +gaussConvectionScheme<Type>::flux +( + const edgeScalarField& faceFlux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + return faceFlux*tinterpScheme_().interpolate(vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +gaussConvectionScheme<Type>::famDiv +( + const edgeScalarField& faceFlux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + tmp<edgeScalarField> tweights = tinterpScheme_().weights(vf); + const edgeScalarField& weights = tweights(); + + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + faceFlux.dimensions()*vf.dimensions() + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + fam.lower() = -weights.internalField()*faceFlux.internalField(); + fam.upper() = fam.lower() + faceFlux.internalField(); + fam.negSumDiag(); + + forAll(fam.psi().boundaryField(), patchI) + { + const faPatchField<Type>& psf = fam.psi().boundaryField()[patchI]; + const faePatchScalarField& patchFlux = faceFlux.boundaryField()[patchI]; + const faePatchScalarField& pw = weights.boundaryField()[patchI]; + + fam.internalCoeffs()[patchI] = patchFlux*psf.valueInternalCoeffs(pw); + fam.boundaryCoeffs()[patchI] = -patchFlux*psf.valueBoundaryCoeffs(pw); + } + +// if (tinterpScheme_().corrected()) +// { +// fam += fac::edgeIntegrate(faceFlux*tinterpScheme_().correction(vf)); +// } + + // Non-euclidian and other corrections + GeometricField<Type, faePatchField, edgeMesh> convFluxCorr = + flux(faceFlux, vf) + - faceFlux*tinterpScheme_().euclidianInterpolate(vf);; + + fam += fac::edgeIntegrate(convFluxCorr); + + return tfam; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +gaussConvectionScheme<Type>::facDiv +( + const edgeScalarField& faceFlux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > tConvection + ( + fac::edgeIntegrate(flux(faceFlux, vf)) + ); + + tConvection.ref().rename + ( + "convection(" + faceFlux.name() + ',' + vf.name() + ')' + ); + + return tConvection; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionScheme.H b/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..8c0f563c5cbd78d2ace1f2e730aeb320d9b61a5a --- /dev/null +++ b/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionScheme.H @@ -0,0 +1,151 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + gaussConvectionScheme + +Description + Basic second-order convection using face-gradients and Gauss' theorem. + +SourceFiles + gaussFaConvectionScheme.C + gaussFaConvectionSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef gaussFaConvectionScheme_H +#define gaussFaConvectionScheme_H + +#include "faConvectionScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class gaussConvectionScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class gaussConvectionScheme +: + public fa::convectionScheme<Type> +{ + // Private data + + tmp<edgeInterpolationScheme<Type> > tinterpScheme_; + + // Private Member Functions + + //- Disallow default bitwise copy construct + gaussConvectionScheme(const gaussConvectionScheme&); + + //- Disallow default bitwise assignment + void operator=(const gaussConvectionScheme&); + + +public: + + //- Runtime type information + TypeName("Gauss"); + + + // Constructors + + //- Construct from flux and interpolation scheme + gaussConvectionScheme + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + const tmp<edgeInterpolationScheme<Type> >& scheme + ) + : + convectionScheme<Type>(mesh, faceFlux), + tinterpScheme_(scheme) + {} + + //- Construct from flux and Istream + gaussConvectionScheme + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& is + ) + : + convectionScheme<Type>(mesh, faceFlux), + tinterpScheme_ + ( + edgeInterpolationScheme<Type>::New(mesh, faceFlux, is) + ) + {} + + + // Member Functions + + tmp<GeometricField<Type, faePatchField, edgeMesh> > flux + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) const; + + tmp<faMatrix<Type> > famDiv + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) const; + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDiv + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "gaussFaConvectionScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionSchemes.C b/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..5979a9d744102f4868dc90830166e6491fad985d --- /dev/null +++ b/src/finiteArea/finiteArea/convectionSchemes/gaussFaConvectionScheme/gaussFaConvectionSchemes.C @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaConvectionScheme.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaConvectionScheme(gaussConvectionScheme) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..11c88ea24fa52b329a9398fb3b917367fe2d07f9 --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C @@ -0,0 +1,573 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "EulerFaDdtScheme.H" +#include "facDiv.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt +( + const dimensioned<Type> dt +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + tmp<GeometricField<Type, faPatchField, areaMesh> > tdtdt + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + dimensioned<Type> + ( + "0", + dt.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); + + tdtdt.ref().primitiveFieldRef() = + rDeltaT.value()*dt.value()*(1.0 - mesh().S0()/mesh().S()); + + return tdtdt; + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + dimensioned<Type> + ( + "0", + dt.dimensions()/dimTime, + pTraits<Type>::zero + ), + calculatedFaPatchField<Type>::typeName + ) + ); + } +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt0 +( + const dimensioned<Type> dt +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tdtdt0 + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + -rDeltaT*dt + ) + ); + + if (mesh().moving()) + { + tdtdt0.ref().primitiveFieldRef() = + (-rDeltaT.value()*dt.value())*mesh().S0()/mesh().S(); + } + + return tdtdt0; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + vf() + - vf.oldTime()()*mesh().S0()/mesh().S() + ), + rDeltaT.value()* + ( + vf.boundaryField() - vf.oldTime().boundaryField() + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT*(vf - vf.oldTime()) + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt0 +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*vf.dimensions(), + (-rDeltaT.value())*vf.oldTime().internalField(), + (-rDeltaT.value())*vf.oldTime().boundaryField() + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + (-rDeltaT)*vf.oldTime() + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()*rho.value()* + ( + vf() + - vf.oldTime()()*mesh().S0()/mesh().S() + ), + rDeltaT.value()*rho.value()* + ( + vf.boundaryField() - vf.oldTime().boundaryField() + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT*rho*(vf - vf.oldTime()) + ) + ); + } +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt0 +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + (-rDeltaT.value())*rho.value()* + vf.oldTime()()*mesh().S0()/mesh().S(), + (-rDeltaT.value())*rho.value()* + vf.oldTime().boundaryField() + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + (-rDeltaT)*rho*vf.oldTime() + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + rho()*vf() + - rho.oldTime()() + *vf.oldTime()()*mesh().S0()/mesh().S() + ), + rDeltaT.value()* + ( + rho.boundaryField()*vf.boundaryField() + - rho.oldTime().boundaryField() + *vf.oldTime().boundaryField() + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT*(rho*vf - rho.oldTime()*vf.oldTime()) + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +EulerFaDdtScheme<Type>::facDdt0 +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + - rho.oldTime()() + *vf.oldTime()()*mesh().S0()/mesh().S() + ), + rDeltaT.value()* + ( + - rho.oldTime().boundaryField() + *vf.oldTime().boundaryField() + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + (-rDeltaT)*rho.oldTime()*vf.oldTime() + ) + ); + } +} + +template<class Type> +tmp<faMatrix<Type> > +EulerFaDdtScheme<Type>::famDdt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + vf.dimensions()*dimArea/dimTime + ) + ); + + faMatrix<Type>& fam = tfam.ref(); + + scalar rDeltaT = 1.0/mesh().time().deltaT().value(); + + fam.diag() = rDeltaT*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT*vf.oldTime().primitiveField()*mesh().S0(); + } + else + { + fam.source() = rDeltaT*vf.oldTime().primitiveField()*mesh().S(); + } + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +EulerFaDdtScheme<Type>::famDdt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + scalar rDeltaT = 1.0/mesh().time().deltaT().value(); + + fam.diag() = rDeltaT*rho.value()*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT + *rho.value()*vf.oldTime().primitiveField()*mesh().S0(); + } + else + { + fam.source() = rDeltaT + *rho.value()*vf.oldTime().primitiveField()*mesh().S(); + } + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +EulerFaDdtScheme<Type>::famDdt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + scalar rDeltaT = 1.0/mesh().time().deltaT().value(); + + fam.diag() = rDeltaT*rho.primitiveField()*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT + *rho.oldTime().primitiveField() + *vf.oldTime().primitiveField()*mesh().S0(); + } + else + { + fam.source() = rDeltaT + *rho.oldTime().primitiveField() + *vf.oldTime().primitiveField()*mesh().S(); + } + + return tfam; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.H b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..78b8fa7e26bf6703da9ba9ae45c55ad5852d192b --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.H @@ -0,0 +1,181 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + EulerDdtScheme + +Description + Basic first-order Euler implicit/explicit ddt using only the current and + previous time-step values. + +SourceFiles + EulerDdtScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef EulerFaDdtScheme_H +#define EulerFaDdtScheme_H + +#include "faDdtScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class EulerFaDdtScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class EulerFaDdtScheme +: + public fa::faDdtScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + EulerFaDdtScheme(const EulerFaDdtScheme&); + + //- Disallow default bitwise assignment + void operator=(const EulerFaDdtScheme&); + + +public: + + //- Runtime type information + TypeName("Euler"); + + + // Constructors + + //- Construct from mesh + EulerFaDdtScheme(const faMesh& mesh) + : + faDdtScheme<Type>(mesh) + {} + + //- Construct from mesh and Istream + EulerFaDdtScheme(const faMesh& mesh, Istream& is) + : + faDdtScheme<Type>(mesh, is) + {} + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return fa::faDdtScheme<Type>::mesh(); + } + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensioned<Type> + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensioned<Type> + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "EulerFaDdtScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtSchemes.C b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..601ef607598723ae6b39bcdbfa06d9f74a9da9cb --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtSchemes.C @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "EulerFaDdtScheme.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaDdtScheme(EulerFaDdtScheme) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..bb7c94c1965552953a6adfcac24d516e8e0f924c --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C @@ -0,0 +1,796 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "backwardFaDdtScheme.H" +#include "facDiv.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +scalar backwardFaDdtScheme<Type>::deltaT_() const +{ + return mesh().time().deltaT().value(); +} + + +template<class Type> +scalar backwardFaDdtScheme<Type>::deltaT0_() const +{ + return mesh().time().deltaT0().value(); +} + + +template<class Type> +template<class GeoField> +scalar backwardFaDdtScheme<Type>::deltaT0_(const GeoField& vf) const +{ + if (vf.oldTime().timeIndex() == vf.oldTime().oldTime().timeIndex()) + { + return GREAT; + } + else + { + return deltaT0_(); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt +( + const dimensioned<Type> dt +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + tmp<GeometricField<Type, faPatchField, areaMesh> > tdtdt + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + dimensioned<Type> + ( + "0", + dt.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); + + tdtdt.ref().primitiveFieldRef() = rDeltaT.value()*dt.value()* + ( + coefft - (coefft0*mesh().S0() - coefft00*mesh().S00())/mesh().S() + ); + + return tdtdt; + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + dimensioned<Type> + ( + "0", + dt.dimensions()/dimTime, + pTraits<Type>::zero + ), + calculatedFaPatchField<Type>::typeName + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt0 +( + const dimensioned<Type> dt +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + tmp<GeometricField<Type, faPatchField, areaMesh> > tdtdt0 + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + -rDeltaT*(coefft0 - coefft00)*dt + ) + ); + + if (mesh().moving()) + { + tdtdt0.ref().primitiveFieldRef() = (-rDeltaT.value()*dt.value())* + ( + (coefft0*mesh().S0() - coefft00*mesh().S00())/mesh().S() + ); + } + + return tdtdt0; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + coefft*vf() - + ( + coefft0*vf.oldTime()()*mesh().S0() + - coefft00*vf.oldTime().oldTime()() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + coefft*vf.boundaryField() - + ( + coefft0*vf.oldTime().boundaryField() + - coefft00*vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT* + ( + coefft*vf + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt0 +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + - ( + coefft0*vf.oldTime()()*mesh().S0() + - coefft00*vf.oldTime().oldTime()() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + - ( + coefft0*vf.oldTime().boundaryField() + - coefft00*vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT* + ( + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()*rho.value()* + ( + coefft*vf.internalField() - + ( + coefft0*vf.oldTime()()*mesh().S0() + - coefft00*vf.oldTime().oldTime()() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()*rho.value()* + ( + coefft*vf.boundaryField() - + ( + coefft0*vf.oldTime().boundaryField() + - coefft00*vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT*rho* + ( + coefft*vf + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt0 +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()*rho.value()* + ( + -( + coefft0*vf.oldTime()()*mesh().S0() + - coefft00*vf.oldTime().oldTime()() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()*rho.value()* + ( + -( + coefft0*vf.oldTime().boundaryField() + - coefft00*vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT*rho* + ( + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + coefft*rho.internalField()*vf.internalField() - + ( + coefft0*rho.oldTime()() + *vf.oldTime()()*mesh().S0() + - coefft00*rho.oldTime().oldTime()() + *vf.oldTime().oldTime()()*mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + coefft*vf.boundaryField() - + ( + coefft0*rho.oldTime().boundaryField() + *vf.oldTime().boundaryField() + - coefft00*rho.oldTime().oldTime().boundaryField() + *vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT* + ( + coefft*rho*vf + - coefft0*rho.oldTime()*vf.oldTime() + + coefft00*rho.oldTime().oldTime()*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +backwardFaDdtScheme<Type>::facDdt0 +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + - ( + coefft0*rho.oldTime()() + *vf.oldTime()()*mesh().S0() + - coefft00*rho.oldTime().oldTime()() + *vf.oldTime().oldTime()()*mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + - ( + coefft0*rho.oldTime().boundaryField() + *vf.oldTime().boundaryField() + - coefft00*rho.oldTime().oldTime().boundaryField() + *vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + ddtIOobject, + rDeltaT* + ( + - coefft0*rho.oldTime()*vf.oldTime() + + coefft00*rho.oldTime().oldTime()*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +template<class Type> +tmp<faMatrix<Type> > +backwardFaDdtScheme<Type>::famDdt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + vf.dimensions()*dimArea/dimTime + ) + ); + + faMatrix<Type>& fam = tfam.ref(); + + scalar rDeltaT = 1.0/deltaT_(); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + fam.diag() = (coefft*rDeltaT)*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT* + ( + coefft0*vf.oldTime().primitiveField()*mesh().S0() + - coefft00*vf.oldTime().oldTime().primitiveField() + *mesh().S00() + ); + } + else + { + fam.source() = rDeltaT*mesh().S()* + ( + coefft0*vf.oldTime().primitiveField() + - coefft00*vf.oldTime().oldTime().primitiveField() + ); + } + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +backwardFaDdtScheme<Type>::famDdt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + scalar rDeltaT = 1.0/deltaT_(); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + fam.diag() = (coefft*rDeltaT*rho.value())*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT*rho.value()* + ( + coefft0*vf.oldTime().primitiveField()*mesh().S0() + - coefft00*vf.oldTime().oldTime().primitiveField() + *mesh().S00() + ); + } + else + { + fam.source() = rDeltaT*mesh().S()*rho.value()* + ( + coefft0*vf.oldTime().primitiveField() + - coefft00*vf.oldTime().oldTime().primitiveField() + ); + } + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +backwardFaDdtScheme<Type>::famDdt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + scalar rDeltaT = 1.0/deltaT_(); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + fam.diag() = (coefft*rDeltaT)*rho.primitiveField()*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT* + ( + coefft0*rho.oldTime().primitiveField() + *vf.oldTime().primitiveField()*mesh().S0() + - coefft00*rho.oldTime().oldTime().primitiveField() + *vf.oldTime().oldTime().primitiveField()*mesh().S00() + ); + } + else + { + fam.source() = rDeltaT*mesh().S()* + ( + coefft0*rho.oldTime().primitiveField() + *vf.oldTime().primitiveField() + - coefft00*rho.oldTime().oldTime().primitiveField() + *vf.oldTime().oldTime().primitiveField() + ); + } + + return tfam; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.H b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..4cd4df4673d68fc967a41b4691b50e980fabd12e --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.H @@ -0,0 +1,192 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + backwardFaDdtScheme + +Description + Second-order backward-differencing implicit ddt using the current and + two previous time-step values. + +SourceFiles + backwardFaDdtScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef backwardFaDdtScheme_H +#define backwardFaDdtScheme_H + +#include "faDdtScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class backwardFaDdtScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class backwardFaDdtScheme +: + public fa::faDdtScheme<Type> +{ + // Private Member Functions + + //- Return the current time-step + scalar deltaT_() const; + + //- Return the previous time-step + scalar deltaT0_() const; + + //- Return the previous time-step or GREAT if the old timestep field + // wasn't available in which case Euler ddt is used + template<class GeoField> + scalar deltaT0_(const GeoField&) const; + + //- Disallow default bitwise copy construct + backwardFaDdtScheme(const backwardFaDdtScheme&); + + //- Disallow default bitwise assignment + void operator=(const backwardFaDdtScheme&); + + +public: + + //- Runtime type information + TypeName("backward"); + + + // Constructors + + //- Construct from mesh + backwardFaDdtScheme(const faMesh& mesh) + : + faDdtScheme<Type>(mesh) + {} + + //- Construct from mesh and Istream + backwardFaDdtScheme(const faMesh& mesh, Istream& is) + : + faDdtScheme<Type>(mesh, is) + {} + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return fa::faDdtScheme<Type>::mesh(); + } + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensioned<Type> + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensioned<Type> + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "backwardFaDdtScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtSchemes.C b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..daa48db6a913c0c8a3205aaa528b084859d5f1aa --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtSchemes.C @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "backwardFaDdtScheme.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaDdtScheme(backwardFaDdtScheme) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..0addaac77e0cc5fcc80625056ba0743e16e3c04c --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C @@ -0,0 +1,986 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "boundedBackwardFaDdtScheme.H" +#include "facDiv.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scalar boundedBackwardFaDdtScheme::deltaT_() const +{ + return mesh().time().deltaT().value(); +} + + +scalar boundedBackwardFaDdtScheme::deltaT0_() const +{ + return mesh().time().deltaT0().value(); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt +( + const dimensionedScalar dt +) +{ + // No change compared to backward + + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + tmp<areaScalarField> tdtdt + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + dimensionedScalar + ( + "0", + dt.dimensions()/dimTime, + 0.0 + ) + ) + ); + + tdtdt.ref().primitiveFieldRef() = rDeltaT.value()*dt.value()* + ( + coefft - (coefft0*mesh().S0() - coefft00*mesh().S00())/mesh().S() + ); + + return tdtdt; + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + dimensionedScalar + ( + "0", + dt.dimensions()/dimTime, + 0.0 + ), + calculatedFaPatchScalarField::typeName + ) + ); + } +} + + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt0 +( + const dimensionedScalar dt +) +{ + // No change compared to backward + + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(); + + scalar coefft = 1 + deltaT/(deltaT + deltaT0); + scalar coefft00 = deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalar coefft0 = coefft + coefft00; + + tmp<areaScalarField> tdtdt0 + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + -rDeltaT*(coefft0 - coefft00)*dt + ) + ); + + if (mesh().moving()) + { + tdtdt0.ref().primitiveFieldRef() = (-rDeltaT.value()*dt.value())* + ( + (coefft0*mesh().S0() - coefft00*mesh().S00())/mesh().S() + ); + } + + return tdtdt0; +} + + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt +( + const areaScalarField& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + areaScalarField phict = + mag + ( + vf.oldTime().oldTime() + - vf.oldTime().oldTime().oldTime() + )/ + ( + mag + ( + vf.oldTime() + - vf.oldTime().oldTime() + ) + + dimensionedScalar("small", vf.dimensions(), SMALL) + ); + + areaScalarField limiter = pos(phict) - pos(phict - scalar(1)); + + areaScalarField coefft = scalar(1) + limiter*deltaT/(deltaT + deltaT0); + areaScalarField coefft00 = limiter*sqr(deltaT)/(deltaT0*(deltaT + deltaT0)); + areaScalarField coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + coefft*vf.primitiveField() - + ( + coefft0.primitiveField() + *vf.oldTime().primitiveField()*mesh().S0() + - coefft00.primitiveField() + *vf.oldTime().oldTime().primitiveField() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + coefft.boundaryField()*vf.boundaryField() - + ( + coefft0.boundaryField()* + vf.oldTime().boundaryField() + - coefft00.boundaryField()* + vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + rDeltaT* + ( + coefft*vf + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt0 +( + const areaScalarField& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + areaScalarField phict = + mag + ( + vf.oldTime().oldTime() + - vf.oldTime().oldTime().oldTime() + )/ + ( + mag + ( + vf.oldTime() + - vf.oldTime().oldTime() + ) + + dimensionedScalar("small", vf.dimensions(), SMALL) + ); + + areaScalarField limiter = pos(phict) - pos(phict - scalar(1)); + + areaScalarField coefft = scalar(1) + limiter*deltaT/(deltaT + deltaT0); + areaScalarField coefft00 = limiter*sqr(deltaT)/(deltaT0*(deltaT + deltaT0)); + areaScalarField coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + - ( + coefft0.primitiveField()* + vf.oldTime().primitiveField()*mesh().S0() + - coefft00.primitiveField()* + vf.oldTime().oldTime().primitiveField() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + - ( + coefft0.boundaryField()* + vf.oldTime().boundaryField() + - coefft00.boundaryField()* + vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + rDeltaT* + ( + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt +( + const dimensionedScalar& rho, + const areaScalarField& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + areaScalarField phict = + mag + ( + vf.oldTime().oldTime() + - vf.oldTime().oldTime().oldTime() + )/ + ( + mag + ( + vf.oldTime() + - vf.oldTime().oldTime() + ) + + dimensionedScalar("small", vf.dimensions(), SMALL) + ); + + areaScalarField limiter = pos(phict) - pos(phict - scalar(1)); + + areaScalarField coefft = scalar(1) + limiter*deltaT/(deltaT + deltaT0); + areaScalarField coefft00 = limiter*sqr(deltaT)/(deltaT0*(deltaT + deltaT0)); + areaScalarField coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()*rho.value()* + ( + coefft*vf.primitiveField() - + ( + coefft0.primitiveField()* + vf.oldTime().primitiveField()*mesh().S0() + - coefft00.primitiveField()* + vf.oldTime().oldTime().primitiveField() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()*rho.value()* + ( + coefft.boundaryField()*vf.boundaryField() - + ( + coefft0.boundaryField()* + vf.oldTime().boundaryField() + - coefft00.boundaryField()* + vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + rDeltaT*rho* + ( + coefft*vf + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt0 +( + const dimensionedScalar& rho, + const areaScalarField& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + areaScalarField phict = + mag + ( + vf.oldTime().oldTime() + - vf.oldTime().oldTime().oldTime() + )/ + ( + mag + ( + vf.oldTime() + - vf.oldTime().oldTime() + ) + + dimensionedScalar("small", vf.dimensions(), SMALL) + ); + + areaScalarField limiter = pos(phict) - pos(phict - scalar(1)); + + areaScalarField coefft = scalar(1) + limiter*deltaT/(deltaT + deltaT0); + areaScalarField coefft00 = limiter*sqr(deltaT)/(deltaT0*(deltaT + deltaT0)); + areaScalarField coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()*rho.value()* + ( + -( + coefft0.primitiveField()* + vf.oldTime().primitiveField()*mesh().S0() + - coefft00.primitiveField()* + vf.oldTime().oldTime().primitiveField() + *mesh().S00() + )/mesh().S() + ), + rDeltaT.value()*rho.value()* + ( + -( + coefft0.boundaryField()* + vf.oldTime().boundaryField() + - coefft00.boundaryField()* + vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + rDeltaT*rho* + ( + - coefft0*vf.oldTime() + + coefft00*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt +( + const areaScalarField& rho, + const areaScalarField& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + areaScalarField phict = + mag + ( + rho.oldTime().oldTime()*vf.oldTime().oldTime() + - rho.oldTime().oldTime().oldTime()*vf.oldTime().oldTime().oldTime() + )/ + ( + mag + ( + rho.oldTime()*vf.oldTime() + - rho.oldTime().oldTime()*vf.oldTime().oldTime() + ) + + dimensionedScalar("small", rho.dimensions()*vf.dimensions(), SMALL) + ); + + areaScalarField limiter = pos(phict) - pos(phict - scalar(1)); + + areaScalarField coefft = scalar(1) + limiter*deltaT/(deltaT + deltaT0); + areaScalarField coefft00 = limiter*sqr(deltaT)/(deltaT0*(deltaT + deltaT0)); + areaScalarField coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + coefft*rho.primitiveField()*vf.primitiveField() - + ( + coefft0.primitiveField()* + rho.oldTime().primitiveField()* + vf.oldTime().primitiveField()*mesh().S0() + - coefft00.primitiveField()* + rho.oldTime().oldTime().primitiveField() + *vf.oldTime().oldTime().primitiveField()*mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + coefft.boundaryField()*vf.boundaryField() - + ( + coefft0.boundaryField()* + rho.oldTime().boundaryField()* + vf.oldTime().boundaryField() + - coefft00.boundaryField()* + rho.oldTime().oldTime().boundaryField()* + vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + rDeltaT* + ( + coefft*rho*vf + - coefft0*rho.oldTime()*vf.oldTime() + + coefft00*rho.oldTime().oldTime()*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +tmp<areaScalarField> +boundedBackwardFaDdtScheme::facDdt0 +( + const areaScalarField& rho, + const areaScalarField& vf +) +{ + dimensionedScalar rDeltaT = 1.0/mesh().time().deltaT(); + + IOobject ddtIOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE + ); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + areaScalarField phict = + mag + ( + rho.oldTime().oldTime()*vf.oldTime().oldTime() + - rho.oldTime().oldTime().oldTime()*vf.oldTime().oldTime().oldTime() + )/ + ( + mag + ( + rho.oldTime()*vf.oldTime() + - rho.oldTime().oldTime()*vf.oldTime().oldTime() + ) + + dimensionedScalar("small", rho.dimensions()*vf.dimensions(), SMALL) + ); + + areaScalarField limiter = pos(phict) - pos(phict - scalar(1)); + + areaScalarField coefft = scalar(1) + limiter*deltaT/(deltaT + deltaT0); + areaScalarField coefft00 = limiter*sqr(deltaT)/(deltaT0*(deltaT + deltaT0)); + areaScalarField coefft0 = coefft + coefft00; + + if (mesh().moving()) + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + mesh(), + rDeltaT.dimensions()*rho.dimensions()*vf.dimensions(), + rDeltaT.value()* + ( + - ( + coefft0.primitiveField()* + rho.oldTime().primitiveField()* + vf.oldTime().primitiveField()*mesh().S0() + - coefft00.primitiveField()* + rho.oldTime().oldTime().primitiveField()* + vf.oldTime().oldTime().primitiveField()*mesh().S00() + )/mesh().S() + ), + rDeltaT.value()* + ( + - ( + coefft0.boundaryField()* + rho.oldTime().boundaryField()* + vf.oldTime().boundaryField() + - coefft00.boundaryField()* + rho.oldTime().oldTime().boundaryField()* + vf.oldTime().oldTime().boundaryField() + ) + ) + ) + ); + } + else + { + return tmp<areaScalarField> + ( + new areaScalarField + ( + ddtIOobject, + rDeltaT* + ( + - coefft0*rho.oldTime()*vf.oldTime() + + coefft00*rho.oldTime().oldTime()*vf.oldTime().oldTime() + ) + ) + ); + } +} + + +tmp<faScalarMatrix> +boundedBackwardFaDdtScheme::famDdt +( + const areaScalarField& vf +) +{ + tmp<faScalarMatrix> tfam + ( + new faScalarMatrix + ( + vf, + vf.dimensions()*dimArea/dimTime + ) + ); + + faScalarMatrix& fam = tfam.ref(); + + scalar rDeltaT = 1.0/deltaT_(); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + scalarField phict = + mag + ( + vf.oldTime().oldTime().internalField() + - vf.oldTime().oldTime().oldTime().internalField() + )/ + ( + mag + ( + vf.oldTime().internalField() + - vf.oldTime().oldTime().internalField() + ) + + SMALL + ); + + scalarField limiter(pos(phict) - pos(phict - 1.0)); + + scalarField coefft = 1.0 + limiter*deltaT/(deltaT + deltaT0); + scalarField coefft00 = limiter*deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalarField coefft0 = coefft + coefft00; + + fam.diag() = (coefft*rDeltaT)*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT* + ( + coefft0*vf.oldTime().primitiveField()*mesh().S0() + - coefft00*vf.oldTime().oldTime().primitiveField() + *mesh().S00() + ); + } + else + { + fam.source() = rDeltaT*mesh().S()* + ( + coefft0*vf.oldTime().primitiveField() + - coefft00*vf.oldTime().oldTime().primitiveField() + ); + } + + return tfam; +} + + +tmp<faScalarMatrix> +boundedBackwardFaDdtScheme::famDdt +( + const dimensionedScalar& rho, + const areaScalarField& vf +) +{ + tmp<faScalarMatrix> tfam + ( + new faScalarMatrix + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + faScalarMatrix& fam = tfam.ref(); + + scalar rDeltaT = 1.0/deltaT_(); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + scalarField phict = + mag + ( + vf.oldTime().oldTime().internalField() + - vf.oldTime().oldTime().oldTime().internalField() + )/ + ( + mag + ( + vf.oldTime().internalField() + - vf.oldTime().oldTime().internalField() + ) + + SMALL + ); + + scalarField limiter(pos(phict) - pos(phict - 1.0)); + + scalarField coefft = 1.0 + limiter*deltaT/(deltaT + deltaT0); + scalarField coefft00 = limiter*deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalarField coefft0 = coefft + coefft00; + + fam.diag() = (coefft*rDeltaT*rho.value())*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT*rho.value()* + ( + coefft0*vf.oldTime().primitiveField()*mesh().S0() + - coefft00*vf.oldTime().oldTime().primitiveField() + *mesh().S00() + ); + } + else + { + fam.source() = rDeltaT*mesh().S()*rho.value()* + ( + coefft0*vf.oldTime().primitiveField() + - coefft00*vf.oldTime().oldTime().primitiveField() + ); + } + + return tfam; +} + + +tmp<faScalarMatrix> +boundedBackwardFaDdtScheme::famDdt +( + const areaScalarField& rho, + const areaScalarField& vf +) +{ + tmp<faScalarMatrix> tfam + ( + new faScalarMatrix + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + faScalarMatrix& fam = tfam.ref(); + + scalar rDeltaT = 1.0/deltaT_(); + + scalar deltaT = deltaT_(); + scalar deltaT0 = deltaT0_(vf); + + // Calculate unboundedness indicator + // Note: all times moved by one because access to internal field + // copies current field into the old-time level. + scalarField phict = + mag + ( + rho.oldTime().oldTime().internalField()* + vf.oldTime().oldTime().internalField() + - rho.oldTime().oldTime().oldTime().internalField()* + vf.oldTime().oldTime().oldTime().internalField() + )/ + ( + mag + ( + rho.oldTime().internalField()* + vf.oldTime().internalField() + - rho.oldTime().oldTime().internalField()* + vf.oldTime().oldTime().internalField() + ) + + SMALL + ); + + scalarField limiter(pos(phict) - pos(phict - 1.0)); + + scalarField coefft = 1.0 + limiter*deltaT/(deltaT + deltaT0); + scalarField coefft00 = limiter*deltaT*deltaT/(deltaT0*(deltaT + deltaT0)); + scalarField coefft0 = coefft + coefft00; + + fam.diag() = (coefft*rDeltaT)*rho.primitiveField()*mesh().S(); + + if (mesh().moving()) + { + fam.source() = rDeltaT* + ( + coefft0*rho.oldTime().primitiveField() + *vf.oldTime().primitiveField()*mesh().S0() + - coefft00*rho.oldTime().oldTime().primitiveField() + *vf.oldTime().oldTime().primitiveField()*mesh().S00() + ); + } + else + { + fam.source() = rDeltaT*mesh().S()* + ( + coefft0*rho.oldTime().primitiveField() + *vf.oldTime().primitiveField() + - coefft00*rho.oldTime().oldTime().primitiveField() + *vf.oldTime().oldTime().primitiveField() + ); + } + + return tfam; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defineTypeNameAndDebug(boundedBackwardFaDdtScheme, 0); + +faDdtScheme<scalar>::addIstreamConstructorToTable<boundedBackwardFaDdtScheme> + addboundedBackwardFaDdtSchemeIstreamConstructorToTable_; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.H b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..be94319466dd51cde85d9b796fddc62d4f9acbfd --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.H @@ -0,0 +1,197 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + boundedBackwardFaDdtScheme + +Description + Second-order backward-differencing implicit ddt using the current and + two previous time-step values. + +SourceFiles + boundedBackwardFaDdtScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef boundedBackwardFaDdtScheme_H +#define boundedBackwardFaDdtScheme_H + +#include "faDdtScheme.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class boundedBackwardFaDdtScheme Declaration +\*---------------------------------------------------------------------------*/ + +class boundedBackwardFaDdtScheme +: + public fa::faDdtScheme<scalar> +{ + // Private Member Functions + + //- Return the current time-step + scalar deltaT_() const; + + //- Return the previous time-step + scalar deltaT0_() const; + + //- Return the previous time-step or GREAT if the old timestep field + // wasn't available in which case Euler ddt is used + template<class GeoField> + scalar deltaT0_(const GeoField& vf) const + { + if (vf.oldTime().timeIndex() == vf.oldTime().oldTime().timeIndex()) + { + return GREAT; + } + else + { + return deltaT0_(); + } + } + + + //- Disallow default bitwise copy construct + boundedBackwardFaDdtScheme(const boundedBackwardFaDdtScheme&); + + //- Disallow default bitwise assignment + void operator=(const boundedBackwardFaDdtScheme&); + + +public: + + //- Runtime type information + TypeName("boundedBackward"); + + + // Constructors + + //- Construct from mesh + boundedBackwardFaDdtScheme(const faMesh& mesh) + : + faDdtScheme<scalar>(mesh) + {} + + //- Construct from mesh and Istream + boundedBackwardFaDdtScheme(const faMesh& mesh, Istream& is) + : + faDdtScheme<scalar>(mesh, is) + {} + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return fa::faDdtScheme<scalar>::mesh(); + } + + tmp<areaScalarField> facDdt + ( + const dimensionedScalar + ); + + tmp<areaScalarField> facDdt0 + ( + const dimensionedScalar + ); + + tmp<areaScalarField> facDdt + ( + const areaScalarField& + ); + + tmp<areaScalarField> facDdt0 + ( + const areaScalarField& + ); + + tmp<areaScalarField> facDdt + ( + const dimensionedScalar&, + const areaScalarField& + ); + + tmp<areaScalarField> facDdt0 + ( + const dimensionedScalar&, + const areaScalarField& + ); + + tmp<areaScalarField> facDdt + ( + const areaScalarField&, + const areaScalarField& + ); + + tmp<areaScalarField> facDdt0 + ( + const areaScalarField&, + const areaScalarField& + ); + + tmp<faScalarMatrix> famDdt + ( + const areaScalarField& + ); + + tmp<faScalarMatrix> famDdt + ( + const dimensionedScalar&, + const areaScalarField& + ); + + tmp<faScalarMatrix> famDdt + ( + const areaScalarField&, + const areaScalarField& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..806f192d2bb9ead12464a352323b844a85066fc5 --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtScheme.C @@ -0,0 +1,108 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite volume calculus ddt schemes. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" +#include "HashTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faDdtScheme<Type> > faDdtScheme<Type>::New +( + const faMesh& mesh, + Istream& schemeData +) +{ + if (fa::debug) + { + Info<< "faDdtScheme<Type>::New(const faMesh&, Istream&) : " + "constructing faDdtScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "faDdtScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Ddt scheme not specified" << nl << nl + << "Valid ddt schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_->find(schemeName); + + if (cstrIter == IstreamConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "faDdtScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Unknown ddt scheme " << schemeName << nl << nl + << "Valid ddt schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return cstrIter()(mesh, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +faDdtScheme<Type>::~faDdtScheme() +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtScheme.H b/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..f2dc6770a39d0b9f05a054b035a1769d7a80a5e3 --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtScheme.H @@ -0,0 +1,250 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faDdtScheme + +Description + Abstract base class for ddt schemes. + +SourceFiles + faDdtScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faDdtScheme_H +#define faDdtScheme_H + +#include "tmp.H" +#include "dimensionedType.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +class faMatrix; + +class faMesh; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class faDdtScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class faDdtScheme +: + public refCount +{ + +protected: + + // Protected data + + const faMesh& mesh_; + + + // Private Member Functions + + //- Disallow copy construct + faDdtScheme(const faDdtScheme&); + + //- Disallow default bitwise assignment + void operator=(const faDdtScheme&); + + +public: + + //- Runtime type information + virtual const word& type() const = 0; + + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + faDdtScheme, + Istream, + (const faMesh& mesh, Istream& schemeData), + (mesh, schemeData) + ); + + + // Constructors + + //- Construct from mesh + faDdtScheme(const faMesh& mesh) + : + mesh_(mesh) + {} + + //- Construct from mesh and Istream + faDdtScheme(const faMesh& mesh, Istream&) + : + mesh_(mesh) + {} + + + // Selectors + + //- Return a pointer to a new faDdtScheme created on freestore + static tmp<faDdtScheme<Type> > New + ( + const faMesh& mesh, + Istream& schemeData + ); + + + // Destructor + + virtual ~faDdtScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensioned<Type> + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensioned<Type> + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<faMatrix<Type> > famDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<faMatrix<Type> > famDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<faMatrix<Type> > famDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeFaDdtTypeScheme(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \ + \ + namespace Foam \ + { \ + namespace fa \ + { \ + faDdtScheme<Type>::addIstreamConstructorToTable<SS<Type> > \ + add##SS##Type##IstreamConstructorToTable_; \ + } \ + } + + +#define makeFaDdtScheme(SS) \ + \ +makeFaDdtTypeScheme(SS, scalar) \ +makeFaDdtTypeScheme(SS, vector) \ +makeFaDdtTypeScheme(SS, tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faDdtScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtSchemes.C b/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..d1b1a6bfff9f3a84389fd3d05ac25b0141fd996c --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/faDdtScheme/faDdtSchemes.C @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite volume calculus ddt schemes. + +\*---------------------------------------------------------------------------*/ + +#include "faDdtScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Define the constructor function hash tables + +defineTemplateRunTimeSelectionTable +( + faDdtScheme<scalar>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + faDdtScheme<vector>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + faDdtScheme<tensor>, + Istream +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..28f80c9698d2260f350228ea016c034f2271b31d --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C @@ -0,0 +1,350 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "steadyStateFaDdtScheme.H" +#include "facDiv.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt +( + const dimensioned<Type> dt +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + dt.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt0 +( + const dimensioned<Type> dt +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + dt.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt("+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + vf.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt0 +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt0("+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + vf.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + rho.dimensions()*vf.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt0 +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + rho.dimensions()*vf.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + rho.dimensions()*vf.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +steadyStateFaDdtScheme<Type>::facDdt0 +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return tmp<GeometricField<Type, faPatchField, areaMesh> > + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type> + ( + "0", + rho.dimensions()*vf.dimensions()/dimTime, + pTraits<Type>::zero + ) + ) + ); +} + +template<class Type> +tmp<faMatrix<Type> > +steadyStateFaDdtScheme<Type>::famDdt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + vf.dimensions()*dimArea/dimTime + ) + ); + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +steadyStateFaDdtScheme<Type>::famDdt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +steadyStateFaDdtScheme<Type>::famDdt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + rho.dimensions()*vf.dimensions()*dimArea/dimTime + ) + ); + + return tfam; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.H b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..6a33f58ee862e1907de01a680ff034d9b25befdb --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.H @@ -0,0 +1,180 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + steadyStateFaDdtScheme + +Description + SteadyState implicit/explicit ddt which returns 0. + +SourceFiles + steadyStateFaDdtScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef steadyStateFaDdtScheme_H +#define steadyStateFaDdtScheme_H + +#include "faDdtScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class steadyStateFaDdtScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class steadyStateFaDdtScheme +: + public fa::faDdtScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + steadyStateFaDdtScheme(const steadyStateFaDdtScheme&); + + //- Disallow default bitwise assignment + void operator=(const steadyStateFaDdtScheme&); + + +public: + + //- Runtime type information + TypeName("steadyState"); + + + // Constructors + + //- Construct from mesh + steadyStateFaDdtScheme(const faMesh& mesh) + : + faDdtScheme<Type>(mesh) + {} + + //- Construct from mesh and Istream + steadyStateFaDdtScheme(const faMesh& mesh, Istream& is) + : + faDdtScheme<Type>(mesh, is) + {} + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return fa::faDdtScheme<Type>::mesh(); + } + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensioned<Type> + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensioned<Type> + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facDdt0 + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<faMatrix<Type> > famDdt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "steadyStateFaDdtScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtSchemes.C b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..16573604af26d4f5f7c0c664e6abfc3ee6b0874f --- /dev/null +++ b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtSchemes.C @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "steadyStateFaDdtScheme.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaDdtScheme(steadyStateFaDdtScheme) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivScheme.C b/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..e0e8d72108d497bda4b9096514c68f0485819749 --- /dev/null +++ b/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivScheme.C @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus div schemes. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" +#include "HashTable.H" +#include "linearEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class Type> +tmp<divScheme<Type> > divScheme<Type>::New +( + const faMesh& mesh, + Istream& schemeData +) +{ + if (fa::debug) + { + Info<< "divScheme<Type>::New(const faMesh&, Istream&) : " + "constructing divScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "divScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Div scheme not specified" << endl << endl + << "Valid div schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_->find(schemeName); + + if (cstrIter == IstreamConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "divScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Unknown div scheme " + << schemeName << nl << nl + << "Valid div schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return cstrIter()(mesh, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +divScheme<Type>::~divScheme() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivScheme.H b/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..cffdcf325b1367675701ec59fa05234bc12fc1af --- /dev/null +++ b/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivScheme.H @@ -0,0 +1,196 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + divScheme + +Description + Abstract base class for div schemes. + +SourceFiles + faDivScheme.C + faDivSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faDivScheme_H +#define faDivScheme_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "linearEdgeInterpolation.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +class faMatrix; + +class faMesh; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class divScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class divScheme +: + public refCount +{ + +protected: + + // Protected data + + const faMesh& mesh_; + tmp<edgeInterpolationScheme<Type> > tinterpScheme_; + + + // Private Member Functions + + //- Disallow copy construct + divScheme(const divScheme&); + + //- Disallow default bitwise assignment + void operator=(const divScheme&); + + +public: + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + divScheme, + Istream, + (const faMesh& mesh, Istream& schemeData), + (mesh, schemeData) + ); + + + // Constructors + + //- Construct from mesh + divScheme(const faMesh& mesh) + : + mesh_(mesh), + tinterpScheme_(new linearEdgeInterpolation<Type>(mesh)) + {} + + //- Construct from mesh and Istream + divScheme(const faMesh& mesh, Istream& is) + : + mesh_(mesh), + tinterpScheme_(edgeInterpolationScheme<Type>::New(mesh, is)) + {} + + + // Selectors + + //- Return a pointer to a new divScheme created on freestore + static tmp<divScheme<Type> > New + ( + const faMesh& mesh, + Istream& schemeData + ); + + + // Destructor + + virtual ~divScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + virtual tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > facDiv + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeFaDivTypeScheme(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \ + \ + namespace Foam \ + { \ + namespace fa \ + { \ + divScheme<Type>::addIstreamConstructorToTable<SS<Type> > \ + add##SS##Type##IstreamConstructorToTable_; \ + } \ + } + +#define makeFaDivScheme(SS) \ + \ +makeFaDivTypeScheme(SS, vector) \ +makeFaDivTypeScheme(SS, tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faDivScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivSchemes.C b/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..47acea7076fed04c724c03c409e4bf5cc5ad6422 --- /dev/null +++ b/src/finiteArea/finiteArea/divSchemes/faDivScheme/faDivSchemes.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus divergence schemes. + +\*---------------------------------------------------------------------------*/ + +#include "faDivScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Define the constructor function hash tables + +defineTemplateRunTimeSelectionTable +( + divScheme<vector>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + divScheme<tensor>, + Istream +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivScheme.C b/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..2cb0e310551195a4bc30eb4258f2dcb18a37e518 --- /dev/null +++ b/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivScheme.C @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaDivScheme.H" +#include "facEdgeIntegrate.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp +< + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> +> +gaussDivScheme<Type>::facDiv +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > tDiv + ( + fac::edgeIntegrate + ( + this->mesh_.Le() & this->tinterpScheme_().interpolate(vf) + ) + // Removed for consistencty. Matthias Rauter, 6/Dec/2016 + ); + + tDiv.ref().rename("div(" + vf.name() + ')'); + + return tDiv; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivScheme.H b/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..51737357235a264b2efd1d4528933c2a08fb1932 --- /dev/null +++ b/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivScheme.H @@ -0,0 +1,123 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + gaussDivScheme + +Description + Basic second-order div using face-gradients and Gauss' theorem. + +SourceFiles + gaussFaDivScheme.C + gaussFaDivSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef gaussFaDivScheme_H +#define gaussFaDivScheme_H + +#include "faDivScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class gaussDivScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class gaussDivScheme +: + public fa::divScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + gaussDivScheme(const gaussDivScheme&); + + //- Disallow default bitwise assignment + void operator=(const gaussDivScheme&); + + +public: + + //- Runtime type information + TypeName("Gauss"); + + + // Constructors + + //- Construct null + gaussDivScheme(const faMesh& mesh) + : + divScheme<Type>(mesh) + {} + + //- Construct from Istream + gaussDivScheme(const faMesh& mesh, Istream& is) + : + divScheme<Type>(mesh, is) + {} + + + // Member Functions + + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > facDiv + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "gaussFaDivScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivSchemes.C b/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..4f7d8dc1daa1d54a2177a2b2c4f831cdbbb620a3 --- /dev/null +++ b/src/finiteArea/finiteArea/divSchemes/gaussFaDivScheme/gaussFaDivSchemes.C @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaDivScheme.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaDivScheme(gaussDivScheme) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fa/fa.C b/src/finiteArea/finiteArea/fa/fa.C new file mode 100644 index 0000000000000000000000000000000000000000..2fa18b3045d1739f46f8bf8b0916732a7e2f31b2 --- /dev/null +++ b/src/finiteArea/finiteArea/fa/fa.C @@ -0,0 +1,40 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Namespace for finite-area. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +defineTypeNameAndDebug(fa, 0); +} + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fa/fa.H b/src/finiteArea/finiteArea/fa/fa.H new file mode 100644 index 0000000000000000000000000000000000000000..70de700feba9bd2addee80ef81ac1686c0f9919f --- /dev/null +++ b/src/finiteArea/finiteArea/fa/fa.H @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fa + +Description + Namespace for finite-area. + +\*---------------------------------------------------------------------------*/ + +#ifndef fa_H +#define fa_H + +#include "className.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + namespace fa + { + NamespaceName("fa"); + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/faSchemes/faSchemes.C b/src/finiteArea/finiteArea/faSchemes/faSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..cb4c58c9f671793ab66e0eca9bff2571b55cf535 --- /dev/null +++ b/src/finiteArea/finiteArea/faSchemes/faSchemes.C @@ -0,0 +1,554 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faSchemes.H" +#include "Time.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +int Foam::faSchemes::debug(Foam::debug::debugSwitch("faSchemes", false)); + + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // + +void Foam::faSchemes::clear() +{ + ddtSchemes_.clear(); + defaultDdtScheme_.clear(); + d2dt2Schemes_.clear(); + defaultD2dt2Scheme_.clear(); + interpolationSchemes_.clear(); + defaultInterpolationScheme_.clear(); + divSchemes_.clear(); // optional + defaultDivScheme_.clear(); + gradSchemes_.clear(); // optional + defaultGradScheme_.clear(); + lnGradSchemes_.clear(); + defaultLnGradScheme_.clear(); + laplacianSchemes_.clear(); // optional + defaultLaplacianScheme_.clear(); + fluxRequired_.clear(); + defaultFluxRequired_ = false; +} + + +void Foam::faSchemes::read(const dictionary& dict) +{ + if (dict.found("ddtSchemes")) + { + ddtSchemes_ = dict.subDict("ddtSchemes"); + } + else + { + ddtSchemes_.set("default", "none"); + } + + if + ( + ddtSchemes_.found("default") + && word(ddtSchemes_.lookup("default")) != "none" + ) + { + defaultDdtScheme_ = ddtSchemes_.lookup("default"); + + } + + + if (dict.found("d2dt2Schemes")) + { + d2dt2Schemes_ = dict.subDict("d2dt2Schemes"); + } + else + { + d2dt2Schemes_.set("default", "none"); + } + + if + ( + d2dt2Schemes_.found("default") + && word(d2dt2Schemes_.lookup("default")) != "none" + ) + { + defaultD2dt2Scheme_ = d2dt2Schemes_.lookup("default"); + } + + + if (dict.found("interpolationSchemes")) + { + interpolationSchemes_ = dict.subDict("interpolationSchemes"); + } + else if (!interpolationSchemes_.found("default")) + { + interpolationSchemes_.add("default", "linear"); + } + + if + ( + interpolationSchemes_.found("default") + && word(interpolationSchemes_.lookup("default")) != "none" + ) + { + defaultInterpolationScheme_ = + interpolationSchemes_.lookup("default"); + } + + + divSchemes_ = dict.subDict("divSchemes"); + + if + ( + divSchemes_.found("default") + && word(divSchemes_.lookup("default")) != "none" + ) + { + defaultDivScheme_ = divSchemes_.lookup("default"); + } + + + gradSchemes_ = dict.subDict("gradSchemes"); + + if + ( + gradSchemes_.found("default") + && word(gradSchemes_.lookup("default")) != "none" + ) + { + defaultGradScheme_ = gradSchemes_.lookup("default"); + } + + + if (dict.found("lnGradSchemes")) + { + lnGradSchemes_ = dict.subDict("lnGradSchemes"); + } + else if (!lnGradSchemes_.found("default")) + { + lnGradSchemes_.add("default", "corrected"); + } + + if + ( + lnGradSchemes_.found("default") + && word(lnGradSchemes_.lookup("default")) != "none" + ) + { + defaultLnGradScheme_ = lnGradSchemes_.lookup("default"); + } + + + laplacianSchemes_ = dict.subDict("laplacianSchemes"); + + if + ( + laplacianSchemes_.found("default") + && word(laplacianSchemes_.lookup("default")) != "none" + ) + { + defaultLaplacianScheme_ = laplacianSchemes_.lookup("default"); + } + + + if (dict.found("fluxRequired")) + { + fluxRequired_.merge(dict.subDict("fluxRequired")); + + if + ( + fluxRequired_.found("default") + && word(fluxRequired_.lookup("default")) != "none" + ) + { + defaultFluxRequired_ = Switch(fluxRequired_.lookup("default")); + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::faSchemes::faSchemes(const objectRegistry& obr) +: + IOdictionary + ( + IOobject + ( + "faSchemes", + obr.time().system(), + obr, + ( + obr.readOpt() == IOobject::MUST_READ + || obr.readOpt() == IOobject::READ_IF_PRESENT + ? IOobject::MUST_READ_IF_MODIFIED + : obr.readOpt() + ), + IOobject::NO_WRITE + ) + ), + ddtSchemes_ + ( + ITstream + ( + objectPath() + ".ddtSchemes", + tokenList() + )() + ), + defaultDdtScheme_ + ( + ddtSchemes_.name() + ".default", + tokenList() + ), + d2dt2Schemes_ + ( + ITstream + ( + objectPath() + ".d2dt2Schemes", + tokenList() + )() + ), + defaultD2dt2Scheme_ + ( + d2dt2Schemes_.name() + ".default", + tokenList() + ), + interpolationSchemes_ + ( + ITstream + ( + objectPath() + ".interpolationSchemes", + tokenList() + )() + ), + defaultInterpolationScheme_ + ( + interpolationSchemes_.name() + ".default", + tokenList() + ), + divSchemes_ + ( + ITstream + ( + objectPath() + ".divSchemes", + tokenList() + )() + ), + defaultDivScheme_ + ( + divSchemes_.name() + ".default", + tokenList() + ), + gradSchemes_ + ( + ITstream + ( + objectPath() + ".gradSchemes", + tokenList() + )() + ), + defaultGradScheme_ + ( + gradSchemes_.name() + ".default", + tokenList() + ), + lnGradSchemes_ + ( + ITstream + ( + objectPath() + ".snGradSchemes", + tokenList() + )() + ), + defaultLnGradScheme_ + ( + lnGradSchemes_.name() + ".default", + tokenList() + ), + laplacianSchemes_ + ( + ITstream + ( + objectPath() + ".laplacianSchemes", + tokenList() + )() + ), + defaultLaplacianScheme_ + ( + laplacianSchemes_.name() + ".default", + tokenList() + ), + fluxRequired_ + ( + ITstream + ( + objectPath() + ".fluxRequired", + tokenList() + )() + ), + defaultFluxRequired_(false) +{ + if + ( + readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED + || (readOpt() == IOobject::READ_IF_PRESENT && headerOk()) + ) + { + read(schemesDict()); + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::faSchemes::read() +{ + if (regIOobject::read()) + { + // Clear current settings except fluxRequired + clear(); + + read(schemesDict()); + + return true; + } + else + { + return false; + } +} + + +const Foam::dictionary& Foam::faSchemes::schemesDict() const +{ + if (found("select")) + { + return subDict(word(lookup("select"))); + } + else + { + return *this; + } +} + + +Foam::ITstream& Foam::faSchemes::ddtScheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup ddtScheme for " << name << endl; + } + + if (ddtSchemes_.found(name) || defaultDdtScheme_.empty()) + { + return ddtSchemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultDdtScheme_).rewind(); + return const_cast<ITstream&>(defaultDdtScheme_); + } +} + + +Foam::ITstream& Foam::faSchemes::d2dt2Scheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup d2dt2Scheme for " << name << endl; + } + + if (d2dt2Schemes_.found(name) || defaultD2dt2Scheme_.empty()) + { + return d2dt2Schemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultD2dt2Scheme_).rewind(); + return const_cast<ITstream&>(defaultD2dt2Scheme_); + } +} + + +Foam::ITstream& Foam::faSchemes::interpolationScheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup interpolationScheme for " << name << endl; + } + + if + ( + interpolationSchemes_.found(name) + || defaultInterpolationScheme_.empty() + ) + { + return interpolationSchemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultInterpolationScheme_).rewind(); + return const_cast<ITstream&>(defaultInterpolationScheme_); + } +} + + +Foam::ITstream& Foam::faSchemes::divScheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup divScheme for " << name << endl; + } + + if (divSchemes_.found(name) || defaultDivScheme_.empty()) + { + return divSchemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultDivScheme_).rewind(); + return const_cast<ITstream&>(defaultDivScheme_); + } +} + + +Foam::ITstream& Foam::faSchemes::gradScheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup gradScheme for " << name << endl; + } + + if (gradSchemes_.found(name) || defaultGradScheme_.empty()) + { + return gradSchemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultGradScheme_).rewind(); + return const_cast<ITstream&>(defaultGradScheme_); + } +} + + +Foam::ITstream& Foam::faSchemes::lnGradScheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup snGradScheme for " << name << endl; + } + + if (lnGradSchemes_.found(name) || defaultLnGradScheme_.empty()) + { + return lnGradSchemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultLnGradScheme_).rewind(); + return const_cast<ITstream&>(defaultLnGradScheme_); + } +} + + +Foam::ITstream& Foam::faSchemes::laplacianScheme(const word& name) const +{ + if (debug) + { + Info<< "Lookup laplacianScheme for " << name << endl; + } + + if (laplacianSchemes_.found(name) || defaultLaplacianScheme_.empty()) + { + return laplacianSchemes_.lookup(name); + } + else + { + const_cast<ITstream&>(defaultLaplacianScheme_).rewind(); + return const_cast<ITstream&>(defaultLaplacianScheme_); + } +} + + +void Foam::faSchemes::setFluxRequired(const word& name) const +{ + if (debug) + { + Info<< "Setting fluxRequired for " << name << endl; + } + + fluxRequired_.add(name, true, true); +} + + +bool Foam::faSchemes::fluxRequired(const word& name) const +{ + if (debug) + { + Info<< "Lookup fluxRequired for " << name << endl; + } + + if (fluxRequired_.found(name)) + { + return true; + } + else + { + return defaultFluxRequired_; + } +} + + +bool Foam::faSchemes::writeData(Ostream& os) const +{ + // Write dictionaries + os << nl << "ddtSchemes"; + ddtSchemes_.write(os, true); + + os << nl << "d2dt2Schemes"; + d2dt2Schemes_.write(os, true); + + os << nl << "interpolationSchemes"; + interpolationSchemes_.write(os, true); + + os << nl << "divSchemes"; + divSchemes_.write(os, true); + + os << nl << "gradSchemes"; + gradSchemes_.write(os, true); + + os << nl << "lnGradSchemes"; + lnGradSchemes_.write(os, true); + + os << nl << "laplacianSchemes"; + laplacianSchemes_.write(os, true); + + os << nl << "fluxRequired"; + fluxRequired_.write(os, true); + + return true; +} + + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/faSchemes/faSchemes.H b/src/finiteArea/finiteArea/faSchemes/faSchemes.H new file mode 100644 index 0000000000000000000000000000000000000000..ee89a2eb9c122a7bbd27c2ddf498c8e8cd5c6bb2 --- /dev/null +++ b/src/finiteArea/finiteArea/faSchemes/faSchemes.H @@ -0,0 +1,208 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faSchemes + +Description + Selector class for finite area differencing schemes. + faMesh is derived from faShemes so that all fields have access to the + faSchemes from the mesh reference they hold. + +SourceFiles + faSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faSchemes_H +#define faSchemes_H + +#include "IOdictionary.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faSchemes Declaration +\*---------------------------------------------------------------------------*/ + +class faSchemes +: + public IOdictionary +{ + // Private data + + dictionary ddtSchemes_; + ITstream defaultDdtScheme_; + + dictionary d2dt2Schemes_; + ITstream defaultD2dt2Scheme_; + + dictionary interpolationSchemes_; + ITstream defaultInterpolationScheme_; + + dictionary divSchemes_; + ITstream defaultDivScheme_; + + dictionary gradSchemes_; + ITstream defaultGradScheme_; + + dictionary lnGradSchemes_; + ITstream defaultLnGradScheme_; + + dictionary laplacianSchemes_; + ITstream defaultLaplacianScheme_; + + mutable dictionary fluxRequired_; + bool defaultFluxRequired_; + + + // Private Member Functions + + //- Clear the dictionaries and streams before reading + void clear(); + + //- Read settings from the dictionary + void read(const dictionary&); + + //- Disallow default bitwise copy construct + faSchemes(const faSchemes&); + + //- Disallow default bitwise assignment + void operator=(const faSchemes&); + + +public: + + //- Debug switch + static int debug; + + + // Constructors + + //- Construct from objectRegistry + faSchemes(const objectRegistry& obr); + + + // Member Functions + + // Access + + const dictionary& schemesDict() const; + + ITstream& ddtScheme(const word& name) const; + + ITstream& d2dt2Scheme(const word& name) const; + + ITstream& interpolationScheme(const word& name) const; + + ITstream& divScheme(const word& name) const; + + ITstream& gradScheme(const word& name) const; + + ITstream& lnGradScheme(const word& name) const; + + ITstream& laplacianScheme(const word& name) const; + + void setFluxRequired(const word& name) const; + + bool fluxRequired(const word& name) const; + + + // Edit + + //- Return access to ddt schemes + dictionary& ddtSchemes() + { + return ddtSchemes_; + } + + //- Return access to d2dt2 schemes + dictionary& d2dt2Schemes() + { + return d2dt2Schemes_; + } + + //- Return access to interpolation schemes + dictionary& interpolationSchemes() + { + return interpolationSchemes_; + } + + //- Return access to div schemes + dictionary& divSchemes() + { + return divSchemes_; + } + + //- Return access to grad schemes + dictionary& gradSchemes() + { + return gradSchemes_; + } + + //- Return access to lnGrad schemes + dictionary& lnGradSchemes() + { + return lnGradSchemes_; + } + + //- Return access to laplacian schemes + dictionary& laplacianSchemes() + { + return laplacianSchemes_; + } + + //- Return access to flux required + dictionary& fluxRequired() + { + return fluxRequired_; + } + + + // Read + + //- Read the faSchemes + bool read(); + + + // Write + + //- WriteData function required for regIOobject write operation + virtual bool writeData(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/fac.H b/src/finiteArea/finiteArea/fac/fac.H new file mode 100644 index 0000000000000000000000000000000000000000..1dc7ec1a052fa454024b45dc17b2e4b90c8da5a1 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/fac.H @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Namespace of functions to calculate explicit derivatives. + +\*---------------------------------------------------------------------------*/ + +#ifndef fac_H +#define fac_H + +#include "fa.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "facDiv.H" +#include "facGrad.H" +#include "facLaplacian.H" +#include "facEdgeIntegrate.H" +#include "facAverage.H" +#include "facLnGrad.H" +#include "facDdt.H" +#include "facNGrad.H" +#include "facNDiv.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facAverage.C b/src/finiteArea/finiteArea/fac/facAverage.C new file mode 100644 index 0000000000000000000000000000000000000000..f28e4c7a028bace3acc0c4733949d963978c0871 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facAverage.C @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facAverage.H" +#include "facEdgeIntegrate.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +average +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const faMesh& mesh = ssf.mesh(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > taverage + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "average("+ssf.name()+')', + ssf.instance(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + ssf.dimensions() + ) + ); + + GeometricField<Type, faPatchField, areaMesh>& av = taverage.ref(); + + av.ref() = + ( + edgeSum(mesh.magLe()*ssf)/edgeSum(mesh.magLe()) + )().internalField(); + + forAll(av.boundaryField(), patchi) + { + av.boundaryFieldRef()[patchi] = ssf.boundaryField()[patchi]; + } + + av.correctBoundaryConditions(); + + return taverage; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +average +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > taverage + ( + fac::average(tssf()) + ); + tssf.clear(); + return taverage; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +average +( + const GeometricField<Type, faPatchField, areaMesh>& vtf +) +{ + return fac::average(linearEdgeInterpolate(vtf)); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +average +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvtf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > taverage + ( + fac::average(tvtf()) + ); + tvtf.clear(); + return taverage; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facAverage.H b/src/finiteArea/finiteArea/fac/facAverage.H new file mode 100644 index 0000000000000000000000000000000000000000..a43159b281e3c9fde712ad3e8f970d52d4f78b65 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facAverage.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +InNamespace + Foam::fac + +Description + Edge-weighted average a edgeField creating a areaField + +SourceFiles + facAverage.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facAverage_H +#define facAverage_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + //- Area-weighted average a edgeField creating a areaField + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > average + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + //- Area-weighted average a edgeField creating a areaField + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > average + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); + + + //- Area-weighted average a edgeField creating a areaField + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > average + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + //- Area-weighted average a edgeField creating a areaField + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > average + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facAverage.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facDdt.C b/src/finiteArea/finiteArea/fac/facDdt.C new file mode 100644 index 0000000000000000000000000000000000000000..520c549c264bc8cbb466ee63be33b22504676d9e --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facDdt.C @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facDdt.H" +#include "faMesh.H" +#include "faDdtScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ddt +( + const dimensioned<Type> dt, + const faMesh& mesh +) +{ + return fa::faDdtScheme<Type>::New + ( + mesh, + mesh.schemesDict().ddtScheme("ddt(" + dt.name() + ')') + )().facDdt(dt); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ddt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fa::faDdtScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme("ddt(" + vf.name() + ')') + )().facDdt(vf); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ddt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fa::faDdtScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme + ( + "ddt(" + rho.name() + ',' + vf.name() + ')' + ) + )().facDdt(rho, vf); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ddt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fa::faDdtScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme + ( + "ddt(" + rho.name() + ',' + vf.name() + ')' + ) + )().facDdt(rho, vf); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facDdt.H b/src/finiteArea/finiteArea/fac/facDdt.H new file mode 100644 index 0000000000000000000000000000000000000000..0172fec7ec28a96f213784f445802a1c1b1b0728 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facDdt.H @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the first temporal derivative. + +SourceFiles + facDdt.C + +Author + Zeljko Tukovic + +\*---------------------------------------------------------------------------*/ + + +#ifndef facDdt_H +#define facDdt_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "dimensionedTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ddt + ( + const dimensioned<Type>, + const faMesh& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ddt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ddt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ddt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facDdt.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facDiv.C b/src/finiteArea/finiteArea/fac/facDiv.C new file mode 100644 index 0000000000000000000000000000000000000000..09d1a88bcb3098bc64a97d8352c1638d05266a1f --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facDiv.C @@ -0,0 +1,353 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facDiv.H" +#include "faMesh.H" +#include "facEdgeIntegrate.H" +#include "faDivScheme.H" +#include "faConvectionScheme.H" +#include "transformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const areaVectorField& n = ssf.mesh().faceAreaNormals(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tDiv = + fac::edgeIntegrate(ssf); + + GeometricField<Type, faPatchField, areaMesh>& Div = tDiv.ref(); + + Div.primitiveFieldRef() = + transform(tensor::I - sqr(n), Div.internalField()); + Div.correctBoundaryConditions(); + + return tDiv; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div(fac::div(tssf())); + tssf.clear(); + return Div; +} + + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +div +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField& n = vf.mesh().faceAreaNormals(); + + tmp + < + GeometricField + < + typename innerProduct<vector, Type>::type, + faPatchField, + areaMesh + > + > tDiv + ( + fa::divScheme<Type>::New + ( + vf.mesh(), vf.mesh().schemesDict().divScheme(name) + )().facDiv(vf) + ); + GeometricField + < + typename innerProduct<vector, Type>::type, + faPatchField, + areaMesh + >& Div = tDiv(); + + Div.primitiveFieldRef() = + transform(tensor::I - sqr(n), Div.internalField()); + + Div.correctBoundaryConditions(); + + return tDiv; +} + + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +div +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvvf, + const word& name +) +{ + typedef typename innerProduct<vector, Type>::type DivType; + tmp<GeometricField<DivType, faPatchField, areaMesh> > Div + ( + fac::div(tvvf(), name) + ); + tvvf.clear(); + return Div; +} + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +div +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::div(vf, "div("+vf.name()+')'); +} + + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +div +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvvf +) +{ + typedef typename innerProduct<vector, Type>::type DivType; + tmp<GeometricField<DivType, faPatchField, areaMesh> > Div + ( + fac::div(tvvf()) + ); + + tvvf.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const edgeScalarField& flux, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField& n = vf.mesh().faceAreaNormals(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tDiv + ( + fa::convectionScheme<Type>::New + ( + vf.mesh(), + flux, + vf.mesh().schemesDict().divScheme(name) + )().facDiv(flux, vf) + ); + GeometricField<Type, faPatchField, areaMesh>& Div = tDiv(); + + Div.internalField() = transform(tensor::I - sqr(n), Div.internalField()); + Div.correctBoundaryConditions(); + + return tDiv; + +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const tmp<edgeScalarField>& tflux, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::div(tflux(), vf, name) + ); + tflux.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const edgeScalarField& flux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::div(flux, tvf(), name) + ); + tvf.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const tmp<edgeScalarField>& tflux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::div(tflux(), tvf(), name) + ); + tflux.clear(); + tvf.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const edgeScalarField& flux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::div + ( + flux, vf, "div("+flux.name()+','+vf.name()+')' + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const tmp<edgeScalarField>& tflux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::div(tflux(), vf) + ); + tflux.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const edgeScalarField& flux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::div(flux, tvf()) + ); + tvf.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +div +( + const tmp<edgeScalarField>& tflux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::div(tflux(), tvf()) + ); + tflux.clear(); + tvf.clear(); + return Div; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facDiv.H b/src/finiteArea/finiteArea/fac/facDiv.H new file mode 100644 index 0000000000000000000000000000000000000000..ef570f6d87246c67dd47fa881e96300e5b09868c --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facDiv.H @@ -0,0 +1,189 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the divergence of the given field. + +SourceFiles + facDiv.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facDiv_H +#define facDiv_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); + + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > div + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > div + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > div + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > div + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const edgeScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const tmp<edgeScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const edgeScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > div + ( + const tmp<edgeScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facDiv.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C new file mode 100644 index 0000000000000000000000000000000000000000..da34e5fe772773c02fbb8af4657f065ecf8c4135 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C @@ -0,0 +1,196 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facEdgeIntegrate.H" +#include "faMesh.H" +#include "zeroGradientFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +edgeIntegrate +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const faMesh& mesh = ssf.mesh(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tvf + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "edgeIntegrate("+ssf.name()+')', + ssf.instance(), + ssf.db() + ), + mesh, + dimensioned<Type> + ( + "0", + ssf.dimensions()/dimArea, + pTraits<Type>::zero + ), + zeroGradientFaPatchField<Type>::typeName + ) + ); + GeometricField<Type, faPatchField, areaMesh>& vf = tvf.ref(); + + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + forAll(owner, faceI) + { + vf[owner[faceI]] += ssf[faceI]; + vf[neighbour[faceI]] -= ssf[faceI]; + } + + forAll(mesh.boundary(), patchI) + { + const labelUList& pEdgeFaces = + mesh.boundary()[patchI].edgeFaces(); + + const faePatchField<Type>& pssf = ssf.boundaryField()[patchI]; + + forAll(mesh.boundary()[patchI], faceI) + { + vf[pEdgeFaces[faceI]] += pssf[faceI]; + } + } + + vf.primitiveFieldRef() /= mesh.S(); + vf.correctBoundaryConditions(); + + return tvf; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +edgeIntegrate +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > tvf + ( + fac::edgeIntegrate(tssf()) + ); + tssf.clear(); + return tvf; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +edgeSum +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const faMesh& mesh = ssf.mesh(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tvf + ( + new GeometricField<Type, faPatchField, areaMesh> + ( + IOobject + ( + "edgeSum("+ssf.name()+')', + ssf.instance(), + ssf.db() + ), + mesh, + dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero), + zeroGradientFaPatchField<Type>::typeName + ) + ); + GeometricField<Type, faPatchField, areaMesh>& vf = tvf.ref(); + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + forAll(owner, faceI) + { + vf[owner[faceI]] += ssf[faceI]; + vf[neighbour[faceI]] += ssf[faceI]; + } + + forAll(mesh.boundary(), patchI) + { + const labelUList& pEdgeFaces = + mesh.boundary()[patchI].edgeFaces(); + + const faePatchField<Type>& pssf = ssf.boundaryField()[patchI]; + + forAll(mesh.boundary()[patchI], faceI) + { + vf[pEdgeFaces[faceI]] += pssf[faceI]; + } + } + + vf.correctBoundaryConditions(); + + return tvf; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > edgeSum +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > tvf = + edgeSum(tssf()); + tssf.clear(); + return tvf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.H b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.H new file mode 100644 index 0000000000000000000000000000000000000000..d5ca2d52221c8775b312711a631190a203b53e60 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.H @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Edge integrate edgeField creating a areaField. + Edge sum a edgeField creating a areaField. + +SourceFiles + facEdgeIntegrate.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facEdgeIntegrate_H +#define facEdgeIntegrate_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > + edgeIntegrate + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > + edgeIntegrate + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > edgeSum + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > edgeSum + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facEdgeIntegrate.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facGrad.C b/src/finiteArea/finiteArea/fac/facGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..c92cb0216d7b05d5828e773e9e73f4d8f3d26ecf --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facGrad.C @@ -0,0 +1,207 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facGrad.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "facEdgeIntegrate.H" +#include "faMesh.H" +#include "faGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +grad +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const areaVectorField &n = ssf.mesh().faceAreaNormals(); + typedef typename outerProduct<vector,Type>::type GradType; + + tmp<GeometricField<GradType, faPatchField, areaMesh> > tgGrad = + fac::edgeIntegrate(ssf.mesh().Sf()*ssf); + + GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad(); + + gGrad -= n*(n & gGrad); + gGrad.correctBoundaryConditions(); + + return tgGrad; +} + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +grad +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + typedef typename outerProduct<vector, Type>::type GradType; + tmp<GeometricField<GradType, faPatchField, areaMesh> > Grad + ( + fac::grad(tssf()) + ); + tssf.clear(); + return Grad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +grad +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField &n = vf.mesh().faceAreaNormals(); + typedef typename outerProduct<vector,Type>::type GradType; + + tmp<GeometricField<GradType, faPatchField, areaMesh> > tgGrad = + fa::gradScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().gradScheme(name) + )().grad(vf); + + GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad.ref(); + + gGrad -= n*(n & gGrad); + gGrad.correctBoundaryConditions(); + + return tgGrad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +grad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp + < + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + > + > tGrad + ( + fac::grad(tvf(), name) + ); + tvf.clear(); + return tGrad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +grad +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::grad(vf, "grad(" + vf.name() + ')'); +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +grad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + typedef typename outerProduct<vector, Type>::type GradType; + tmp<GeometricField<GradType, faPatchField, areaMesh> > Grad + ( + fac::grad(tvf()) + ); + tvf.clear(); + return Grad; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facGrad.H b/src/finiteArea/finiteArea/fac/facGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..dc14c406d49bff7896f898cc221b8c593d7f4c0b --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facGrad.H @@ -0,0 +1,133 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the gradient of the given field. + +SourceFiles + facGrad.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facGrad_H +#define facGrad_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facLaplacian.C b/src/finiteArea/finiteArea/fac/facLaplacian.C new file mode 100644 index 0000000000000000000000000000000000000000..56f99b323b9e817b8af97440daac0383de4616e8 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facLaplacian.C @@ -0,0 +1,583 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Namespace of functions to calculate explicit derivatives. + Time derivatives are calculated using Euler-implicit, backward differencing + or Crank-Nicholson. Spatial derivatives are calculated using Gauss' Theorem + +\*---------------------------------------------------------------------------*/ + +#include "facLaplacian.H" +#include "faMesh.H" +#include "faLaplacianScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::laplacianScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().laplacianScheme(name) + ).ref().facLaplacian(vf); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tvf(), name) + ); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::laplacian(vf, "laplacian(" + vf.name() + ')'); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tvf()) + ); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const dimensionedScalar& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return gamma*fac::laplacian(vf, name); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const dimensionedScalar& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf(), name) + ); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const dimensionedScalar& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return gamma*fac::laplacian + ( + vf, "laplacian(" + gamma.name() + ',' + vf.name() + ')' + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const dimensionedScalar& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf()) + ); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const areaScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::laplacianScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().laplacianScheme(name) + ).ref().facLaplacian(gamma, vf); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<areaScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), vf, name) + ); + tgamma.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const areaScalarField& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf(), name) + ); + tvf.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<areaScalarField>& tgamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), tvf(), name) + ); + tgamma.clear(); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const areaScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::laplacian + ( + gamma, + vf, + "laplacian(" + gamma.name() + ',' + vf.name() + ')' + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<areaScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::laplacian + ( + tgamma, + vf, + "laplacian(" + tgamma().name() + ',' + vf.name() + ')' + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const areaScalarField& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + return fac::laplacian + ( + gamma, + tvf, + "laplacian(" + gamma.name() + ',' + tvf().name() + ')' + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<areaScalarField>& tgamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + return fac::laplacian + ( + tgamma, + tvf, + "laplacian(" + tgamma().name() + ',' + tvf().name() + ')' + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const edgeScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::laplacianScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().laplacianScheme(name) + ).ref().facLaplacian(gamma, vf); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<edgeScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), vf, name) + ); + tgamma.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const edgeScalarField& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf(), name) + ); + tvf.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian +( + const tmp<edgeScalarField>& tgamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), tvf(), name) + ); + tgamma.clear(); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const edgeScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::laplacian + ( + gamma, + vf, + "laplacian(" + gamma.name() + ',' + vf.name() + ')' + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<edgeScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), vf) + ); + tgamma.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const edgeScalarField& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf()) + ); + tvf.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian +( + const tmp<edgeScalarField>& tgamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), tvf()) + ); + tgamma.clear(); + tvf.clear(); + return Laplacian; +} + + +/* +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const areaTensorField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = tvf().mesh(); + return fac::laplacian + ( + ( + mesh.Sf() & fac::interpolate(tgamma) & mesh.Sf() + )/sqr(mesh.magSf()), + tvf + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const areaTensorField& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf()) + ); + tvf.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<areaTensorField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), vf) + ); + tgamma.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<areaTensorField>& tgamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), tvf()) + ); + tgamma.clear(); + tvf.clear(); + return Laplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian +( + const edgeTensorField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = tvf().mesh(); + + return fac::laplacian + ( + ( + mesh.Sf() & + gamma + & mesh.Sf() + )/sqr(mesh.magSf()), + vf + ); +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const edgeTensorField& gamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(gamma, tvf()) + ); + tvf.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<edgeTensorField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), tvf()) + ); + tgamma.clear(); + return Laplacian; +} + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacian +( + const tmp<edgeTensorField>& tgamma, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Laplacian + ( + fac::laplacian(tgamma(), tvf()) + ); + tgamma.clear(); + tvf.clear(); + return Laplacian; +} +*/ + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facLaplacian.H b/src/finiteArea/finiteArea/fac/facLaplacian.H new file mode 100644 index 0000000000000000000000000000000000000000..fb703bac638db77aaca372963e9f5bb979ac7040 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facLaplacian.H @@ -0,0 +1,318 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the laplacian of the given field. + +SourceFiles + facLaplacian.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facLaplacian_H +#define facLaplacian_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "dimensionedTypes.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const dimensionedScalar&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const dimensionedScalar&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<areaScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const areaScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<areaScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<areaScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const areaScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<areaScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const edgeScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<edgeScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const edgeScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<edgeScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + /* + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const areaTensorField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<areaTensorField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const areaTensorField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<areaTensorField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const edgeTensorField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<edgeTensorField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const edgeTensorField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > laplacian + ( + const tmp<edgeTensorField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + */ +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facLaplacian.C" +#else +# ifdef xlC +# pragma implementation("facLaplacian.C") +# endif +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facLnGrad.C b/src/finiteArea/finiteArea/fac/facLnGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..540c330725883e7f9471a478c271768ab83c26c5 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facLnGrad.C @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facLnGrad.H" +#include "faMesh.H" +#include "lnGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGrad +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::lnGradScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().lnGradScheme(name) + )().lnGrad(vf); +} + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGrad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > LnGrad + ( + fac::lnGrad(tvf(), name) + ); + tvf.clear(); + return LnGrad; +} + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGrad +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::lnGrad(vf, "lnGrad(" + vf.name() + ')'); +} + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGrad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > LnGrad + ( + fac::lnGrad(tvf()) + ); + tvf.clear(); + return LnGrad; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facLnGrad.H b/src/finiteArea/finiteArea/fac/facLnGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..318e1030edcfc96e71fa7b286a573cf6a33a488e --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facLnGrad.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the lnGrad of the given areaField. + +SourceFiles + facLnGrad.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facLnGrad_H +#define facLnGrad_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp<GeometricField<Type, faePatchField, edgeMesh> > lnGrad + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faePatchField, edgeMesh> > lnGrad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faePatchField, edgeMesh> > lnGrad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faePatchField, edgeMesh> > lnGrad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facLnGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facNDiv.C b/src/finiteArea/finiteArea/fac/facNDiv.C new file mode 100644 index 0000000000000000000000000000000000000000..2e72b970d13ddb5add83d04f7f05e37b749993ff --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facNDiv.C @@ -0,0 +1,341 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facNDiv.H" +#include "faMesh.H" +#include "facEdgeIntegrate.H" +#include "faDivScheme.H" +#include "faConvectionScheme.H" +#include "transformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const areaVectorField& n = ssf.mesh().faceAreaNormals(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > v = + fac::edgeIntegrate(ssf); + + v.internalField() = n*(n & v.internalField()); + v.correctBoundaryConditions(); + + return v; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div(fac::ndiv(tssf())); + tssf.clear(); + return Div; +} + + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +ndiv +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField& n = vf.mesh().faceAreaNormals(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tDiv + ( + fa::divScheme<Type>::New + ( + vf.mesh(), vf.mesh().schemesDict().divScheme(name) + )().facDiv(vf) + ); + GeometricField<Type, faPatchField, areaMesh>& Div = tDiv(); + + Div.internalField() = n*(n & Div.internalField()); + Div.correctBoundaryConditions(); + + return tDiv; +} + + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +ndiv +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvvf, + const word& name +) +{ + typedef typename innerProduct<vector, Type>::type DivType; + tmp<GeometricField<DivType, faPatchField, areaMesh> > Div + ( + fac::ndiv(tvvf(), name) + ); + tvvf.clear(); + + return Div; +} + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +ndiv +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::ndiv(vf, "div("+vf.name()+')'); +} + + +template<class Type> +tmp +< + GeometricField + < + typename innerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +ndiv +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvvf +) +{ + typedef typename innerProduct<vector, Type>::type DivType; + tmp<GeometricField<DivType, faPatchField, areaMesh> > Div + ( + fac::ndiv(tvvf()) + ); + + tvvf.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const edgeScalarField& flux, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField& n = vf.mesh().faceAreaNormals(); + + tmp<GeometricField<Type, faPatchField, areaMesh> > tDiv + ( + fa::convectionScheme<Type>::New + ( + vf.mesh(), + flux, + vf.mesh().schemesDict().divScheme(name) + )().facDiv(flux, vf) + ); + + GeometricField<Type, faPatchField, areaMesh>& Div = tDiv(); + + Div.internalField() = n*(n &Div.internalField()); + Div.correctBoundaryConditions(); + + return tDiv; + +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const tmp<edgeScalarField>& tflux, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::ndiv(tflux(), vf, name) + ); + tflux.clear(); + + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const edgeScalarField& flux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::ndiv(flux, tvf(), name) + ); + tvf.clear(); + + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const tmp<edgeScalarField>& tflux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::ndiv(tflux(), tvf(), name) + ); + tflux.clear(); + tvf.clear(); + + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const edgeScalarField& flux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::ndiv + ( + flux, vf, "div("+flux.name()+','+vf.name()+')' + ); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const tmp<edgeScalarField>& tflux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::ndiv(tflux(), vf) + ); + tflux.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const edgeScalarField& flux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::ndiv(flux, tvf()) + ); + tvf.clear(); + return Div; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +ndiv +( + const tmp<edgeScalarField>& tflux, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > Div + ( + fac::ndiv(tflux(), tvf()) + ); + tflux.clear(); + tvf.clear(); + + return Div; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facNDiv.H b/src/finiteArea/finiteArea/fac/facNDiv.H new file mode 100644 index 0000000000000000000000000000000000000000..2cd99f9b2ca4c7b0dd0f55d59ecbb51c41bdf8ca --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facNDiv.H @@ -0,0 +1,189 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the divergence of the given field. + +SourceFiles + facDiv.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facNDiv_H +#define facNDiv_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); + + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > ndiv + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > ndiv + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > ndiv + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp + < + GeometricField + <typename innerProduct<vector, Type>::type, faPatchField, areaMesh> + > ndiv + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const edgeScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const tmp<edgeScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const edgeScalarField&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); + + template<class Type> + tmp<GeometricField<Type, faPatchField, areaMesh> > ndiv + ( + const tmp<edgeScalarField>&, + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facNDiv.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facNGrad.C b/src/finiteArea/finiteArea/fac/facNGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..f2aa1b033afbca1fba8a685b6937dd91b8eb5b03 --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facNGrad.C @@ -0,0 +1,212 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "facNGrad.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "facEdgeIntegrate.H" +#include "faMesh.H" +#include "faGradScheme.H" +#include "transformField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +ngrad +( + const GeometricField<Type, faePatchField, edgeMesh>& ssf +) +{ + const areaVectorField& n = ssf.mesh().faceAreaNormals(); + typedef typename outerProduct<vector,Type>::type GradType; + + tmp<GeometricField<GradType, faPatchField, areaMesh> > tgGrad = + fac::edgeIntegrate(ssf.mesh().Sf() * ssf); + + GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad(); + + gGrad = n*(n & gGrad); + gGrad.correctBoundaryConditions(); + + return tgGrad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +ngrad +( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& tssf +) +{ + typedef typename outerProduct<vector, Type>::type GradType; + tmp<GeometricField<GradType, faPatchField, areaMesh> > Grad + ( + fac::ngrad(tssf()) + ); + tssf.clear(); + + return Grad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +ngrad +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField& n = vf.mesh().faceAreaNormals(); + typedef typename outerProduct<vector,Type>::type GradType; + + tmp<GeometricField<GradType, faPatchField, areaMesh> > tgGrad = + fa::gradScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().gradScheme(name) + )().grad(vf); + + GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad(); + + gGrad = n*(n & gGrad); + gGrad.correctBoundaryConditions(); + + return tgGrad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +ngrad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp + < + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + > + > tGrad + ( + fac::ngrad(tvf(), name) + ); + tvf.clear(); + + return tGrad; +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +ngrad +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fac::ngrad(vf, "grad(" + vf.name() + ')'); +} + + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector,Type>::type, faPatchField, areaMesh + > +> +ngrad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + typedef typename outerProduct<vector, Type>::type GradType; + tmp<GeometricField<GradType, faPatchField, areaMesh> > Grad + ( + fac::ngrad(tvf()) + ); + tvf.clear(); + + return Grad; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fac/facNGrad.H b/src/finiteArea/finiteArea/fac/facNGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..0e6d4fc623429407629168567514a2222ff61c4e --- /dev/null +++ b/src/finiteArea/finiteArea/fac/facNGrad.H @@ -0,0 +1,133 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + Calculate the gradient normal to the surface of the given field. + +SourceFiles + facGrad.C + +\*---------------------------------------------------------------------------*/ + + +#ifndef facNGrad_H +#define facNGrad_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fac functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > ngrad + ( + const GeometricField<Type, faePatchField, edgeMesh>& + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > ngrad + ( + const tmp<GeometricField<Type, faePatchField, edgeMesh> >& + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + >ngrad + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + >ngrad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const word& name + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + >ngrad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + >ngrad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "facNGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/fam.H b/src/finiteArea/finiteArea/fam/fam.H new file mode 100644 index 0000000000000000000000000000000000000000..13e825ab40ac1bd0ef870f51430e5edc220aad82 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/fam.H @@ -0,0 +1,54 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fam + +Description + Namespace of functions to calculate implicit derivatives returning a matrix. + Time derivatives are calculated using Euler-implicit, backward differencing + or Crank-Nicholson. Spatial derivatives are calculated using Gauss' Theorem. + +SourceFiles + fam.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fam_H +#define fam_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "famDdt.H" +#include "famDiv.H" +#include "famLaplacian.H" +#include "famSup.H" +#include "famNDiv.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famDdt.C b/src/finiteArea/finiteArea/fam/famDdt.C new file mode 100644 index 0000000000000000000000000000000000000000..c4e9d58b5eb60b80dca74087431a0374bde5ec24 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famDdt.C @@ -0,0 +1,106 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "areaFields.H" +#include "edgeFields.H" +#include "faMatrix.H" +#include "faDdtScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +ddt +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fa::faDdtScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme("ddt(" + vf.name() + ')') + ).ref().famDdt(vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +ddt +( + const dimensionedScalar& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fa::faDdtScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme + ( + "ddt(" + rho.name() + ',' + vf.name() + ')' + ) + ).ref().famDdt(rho, vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +ddt +( + const areaScalarField& rho, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fa::faDdtScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().ddtScheme + ( + "ddt(" + rho.name() + ',' + vf.name() + ')' + ) + ).ref().famDdt(rho, vf); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famDdt.H b/src/finiteArea/finiteArea/fam/famDdt.H new file mode 100644 index 0000000000000000000000000000000000000000..6bc17837f2e6630e6d2a8fe71b5e1b04a1d2c17b --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famDdt.H @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fam + +Description + Calulate the matrix for the first temporal derivative. + +SourceFiles + famDdt.C + +\*---------------------------------------------------------------------------*/ + +#ifndef famDdt_H +#define famDdt_H + +#include "areaFieldsFwd.H" +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fam functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fam +{ + template<class Type> + tmp<faMatrix<Type> > ddt + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > ddt + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > ddt + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "famDdt.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famDiv.C b/src/finiteArea/finiteArea/fam/famDiv.C new file mode 100644 index 0000000000000000000000000000000000000000..88cf12e3ff20f97d01ee2f5f09b62d372d17eb59 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famDiv.C @@ -0,0 +1,134 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "famDiv.H" +#include "faMesh.H" +#include "faMatrix.H" +#include "faConvectionScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +div +( + const edgeScalarField& flux, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const areaVectorField& n = vf.mesh().faceAreaNormals(); + + tmp<faMatrix<Type> > tM + ( + fa::convectionScheme<Type>::New + ( + vf.mesh(), + flux, + vf.mesh().schemesDict().divScheme(name) + ).ref().famDiv(flux, vf) + ); + faMatrix<Type>& M = tM.ref(); + + GeometricField<Type, faPatchField, areaMesh> v + ( + fa::convectionScheme<Type>::New + ( + vf.mesh(), + flux, + vf.mesh().schemesDict().divScheme(name) + ).ref().facDiv(flux, vf) + ); + + //HJ Check if the product is from left or right. HJ, 6/Dec/2016 + M -= n*(n & v); + + return tM; +} + + +template<class Type> +tmp<faMatrix<Type> > +div +( + const tmp<edgeScalarField>& tflux, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<faMatrix<Type> > Div(fam::div(tflux(), vf, name)); + tflux.clear(); + + return Div; +} + + +template<class Type> +tmp<faMatrix<Type> > +div +( + const edgeScalarField& flux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fam::div(flux, vf, "div("+flux.name()+','+vf.name()+')'); +} + +template<class Type> +tmp<faMatrix<Type> > +div +( + const tmp<edgeScalarField>& tflux, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > Div(fam::div(tflux(), vf)); + tflux.clear(); + + return Div; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famDiv.H b/src/finiteArea/finiteArea/fam/famDiv.H new file mode 100644 index 0000000000000000000000000000000000000000..1265c904c0a96cc7e0260dd68b9043bfaafb4afa --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famDiv.H @@ -0,0 +1,106 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fam + +Description + Calculate the matrix for the divergence of the given field and flux. + +SourceFiles + famDiv.C + vectorFamDiv.C + +\*---------------------------------------------------------------------------*/ + +#ifndef famDiv_H +#define famDiv_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "edgeInterpolationScheme.H" +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fam functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fam +{ + template<class Type> + tmp<faMatrix<Type> > div + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<faMatrix<Type> > div + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<faMatrix<Type> > div + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > div + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Template specialisation +#include "vectorFamDiv.H" + +#ifdef NoRepository +# include "famDiv.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famLaplacian.C b/src/finiteArea/finiteArea/fam/famLaplacian.C new file mode 100644 index 0000000000000000000000000000000000000000..d3d72dee3567d75af52d6dbabe46159153173ea8 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famLaplacian.C @@ -0,0 +1,376 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "areaFields.H" +#include "edgeFields.H" +#include "faMatrix.H" +#include "faLaplacianScheme.H" +#include "edgeInterpolate.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + edgeScalarField Gamma + ( + IOobject + ( + "gamma", + vf.time().constant(), + vf.db(), + IOobject::NO_READ + ), + vf.mesh(), + dimensionedScalar("1", dimless, 1.0) + ); + + return fam::laplacian(Gamma, vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + edgeScalarField Gamma + ( + IOobject + ( + "gamma", + vf.time().constant(), + vf.db(), + IOobject::NO_READ + ), + vf.mesh(), + dimensionedScalar("1", dimless, 1.0) + ); + + return fam::laplacian(Gamma, vf, name); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const dimensionedScalar& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + edgeScalarField Gamma + ( + IOobject + ( + gamma.name(), + vf.instance(), + vf.db(), + IOobject::NO_READ + ), + vf.mesh(), + gamma + ); + + return fam::laplacian(Gamma, vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const dimensionedScalar& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + edgeScalarField Gamma + ( + IOobject + ( + gamma.name(), + vf.instance(), + vf.db(), + IOobject::NO_READ + ), + vf.mesh(), + gamma + ); + + return fam::laplacian(Gamma, vf, name); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const areaScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fam::laplacian + ( + gamma, + vf, + "laplacian(" + gamma.name() + ',' + vf.name() + ')' + ); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const areaScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::laplacianScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().laplacianScheme(name) + ).ref().famLaplacian(gamma, vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<areaScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > Laplacian(fam::laplacian(tgamma(), vf)); + tgamma.clear(); + return Laplacian; +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<areaScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<faMatrix<Type> > Laplacian(fam::laplacian(tgamma(), vf, name)); + tgamma.clear(); + return Laplacian; +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const edgeScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::laplacianScheme<Type>::New + ( + vf.mesh(), + vf.mesh().schemesDict().laplacianScheme(name) + ).ref().famLaplacian(gamma, vf); +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<edgeScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<faMatrix<Type> > tLaplacian = fam::laplacian(tgamma(), vf, name); + tgamma.clear(); + return tLaplacian; +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const edgeScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fam::laplacian + ( + gamma, + vf, + "laplacian(" + gamma.name() + ',' + vf.name() + ')' + ); +} + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<edgeScalarField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam(fam::laplacian(tgamma(), vf)); + tgamma.clear(); + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const areaTensorField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = vf.mesh(); + + return fam::laplacian + ( + (mesh.Le() & fac::interpolate(gamma) & mesh.Le()) + /sqr(mesh.magLe()), + vf + ); +} + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<areaTensorField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > Laplacian = fam::laplacian(tgamma(), vf); + tgamma.clear(); + return Laplacian; +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const edgeTensorField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = vf.mesh(); + + return fam::laplacian + ( + (mesh.Le() & gamma & mesh.Le())/sqr(mesh.magLe()), + vf + ); +} + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<edgeTensorField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > Laplacian = fam::laplacian(tgamma(), vf); + tgamma.clear(); + return Laplacian; +} + + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const edgeTensorField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + const faMesh& mesh = vf.mesh(); + + return fam::laplacian + ( + (mesh.Le() & gamma & mesh.Le())/sqr(mesh.magLe()), + vf, + name + ); +} + +template<class Type> +tmp<faMatrix<Type> > +laplacian +( + const tmp<edgeTensorField>& tgamma, + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<faMatrix<Type> > Laplacian = fam::laplacian(tgamma(), vf, name); + tgamma.clear(); + return Laplacian; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famLaplacian.H b/src/finiteArea/finiteArea/fam/famLaplacian.H new file mode 100644 index 0000000000000000000000000000000000000000..b4f68cf69d08bad58783f0cc3efe643b4541cc64 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famLaplacian.H @@ -0,0 +1,219 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + famLaplacian + +Description + Calculate the matrix for the laplacian of the field. + +SourceFiles + famLaplacian.C + +\*---------------------------------------------------------------------------*/ + +#ifndef famLaplacian_H +#define famLaplacian_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fam functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fam +{ + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<areaScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<areaScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<edgeScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const areaTensorField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<areaTensorField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const edgeTensorField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<edgeTensorField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const edgeTensorField&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<faMatrix<Type> > laplacian + ( + const tmp<edgeTensorField>&, + const GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "famLaplacian.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famNDiv.C b/src/finiteArea/finiteArea/fam/famNDiv.C new file mode 100644 index 0000000000000000000000000000000000000000..23e7b5193685edc87b067eba6b89c82723651810 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famNDiv.C @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "famNDiv.H" +#include "faMesh.H" +#include "faMatrix.H" +#include "faConvectionScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +ndiv +( + const edgeScalarField& flux, + GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::convectionScheme<Type>::New + ( + vf.mesh(), + flux, + vf.mesh().schemesDict().divScheme(name) + )().famDiv(flux, vf);//TODO calculate normal +} + +template<class Type> +tmp<faMatrix<Type> > +ndiv +( + const tmp<edgeScalarField>& tflux, + GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ + tmp<faMatrix<Type> > Div(fam::ndiv(tflux(), vf, name)); + tflux.clear(); + + return Div; +} + + +template<class Type> +tmp<faMatrix<Type> > +ndiv +( + const edgeScalarField& flux, + GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return fam::ndiv(flux, vf, "div("+flux.name()+','+vf.name()+')'); +} + +template<class Type> +tmp<faMatrix<Type> > +ndiv +( + const tmp<edgeScalarField>& tflux, + GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > Div(fam::ndiv(tflux(), vf)); + tflux.clear(); + + return Div; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famNDiv.H b/src/finiteArea/finiteArea/fam/famNDiv.H new file mode 100644 index 0000000000000000000000000000000000000000..cf206538d7eb86b7de7c93a841630e75e307d2e5 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famNDiv.H @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fam + +Description + Calculate the matrix for the divergence of the given field and flux. + +SourceFiles + famDiv.C + +\*---------------------------------------------------------------------------*/ + +#ifndef famNDiv_H +#define famNDiv_H + +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "edgeInterpolationScheme.H" +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fam functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fam +{ + template<class Type> + tmp<faMatrix<Type> > ndiv + ( + const edgeScalarField&, + GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<faMatrix<Type> > ndiv + ( + const tmp<edgeScalarField>&, + GeometricField<Type, faPatchField, areaMesh>&, + const word& name + ); + + template<class Type> + tmp<faMatrix<Type> > ndiv + ( + const edgeScalarField&, + GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > ndiv + ( + const tmp<edgeScalarField>&, + GeometricField<Type, faPatchField, areaMesh>& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "famNDiv.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famSup.C b/src/finiteArea/finiteArea/fam/famSup.C new file mode 100644 index 0000000000000000000000000000000000000000..1dc253fcccae8ba944f4b4cf9cc0ec42973fb400 --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famSup.C @@ -0,0 +1,201 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + + +\*---------------------------------------------------------------------------*/ + +#include "areaFields.H" +#include "edgeFields.H" +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +Su +( + const GeometricField<Type, faPatchField, areaMesh>& su, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = vf.mesh(); + + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + dimArea*su.dimensions() + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + fam.source() -= mesh.S()*su.internalField(); + + return tfam; +} + +template<class Type> +tmp<faMatrix<Type> > +Su +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tsu, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam = fam::Su(tsu(), vf); + tsu.clear(); + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +Sp +( + const areaScalarField& sp, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = vf.mesh(); + + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + dimArea*sp.dimensions()*vf.dimensions() + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + fam.diag() += mesh.S()*sp.internalField(); + + return tfam; +} + +template<class Type> +tmp<faMatrix<Type> > +Sp +( + const tmp<areaScalarField>& tsp, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam = fam::Sp(tsp(), vf); + tsp.clear(); + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +Sp +( + const dimensionedScalar& sp, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = vf.mesh(); + + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + dimArea*sp.dimensions()*vf.dimensions() + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + fam.diag() += mesh.S()*sp.value(); + + return tfam; +} + + +template<class Type> +tmp<faMatrix<Type> > +SuSp +( + const areaScalarField& sp, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + const faMesh& mesh = vf.mesh(); + + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + dimArea*sp.dimensions()*vf.dimensions() + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + fam.diag() += mesh.S()*max(sp.internalField(), scalar(0)); + + fam.source() -= mesh.S()*min(sp.internalField(), scalar(0)) + *vf.internalField(); + + return tfam; +} + +template<class Type> +tmp<faMatrix<Type> > +SuSp +( + const tmp<areaScalarField>& tsp, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<faMatrix<Type> > tfam = fam::SuSp(tsp(), vf); + tsp.clear(); + return tfam; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/famSup.H b/src/finiteArea/finiteArea/fam/famSup.H new file mode 100644 index 0000000000000000000000000000000000000000..f803ddf9ff5bb377b11bbbab2773fb08975fb8aa --- /dev/null +++ b/src/finiteArea/finiteArea/fam/famSup.H @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fam + +Description + Calculate the matrix for implicit and explicit sources. + +SourceFiles + famSup.C + +\*---------------------------------------------------------------------------*/ + +#ifndef famSup_H +#define famSup_H + +#include "areaFieldsFwd.H" +#include "faMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fam functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fam +{ + // Explicit source + + template<class Type> + tmp<faMatrix<Type> > Su + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > Su + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + // Implicit source + + template<class Type> + tmp<faMatrix<Type> > Sp + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > Sp + ( + const tmp<areaScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + template<class Type> + tmp<faMatrix<Type> > Sp + ( + const dimensionedScalar&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + + // Implicit/Explicit source depending on sign of coefficient + + template<class Type> + tmp<faMatrix<Type> > SuSp + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + template<class Type> + tmp<faMatrix<Type> > SuSp + ( + const tmp<areaScalarField>&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "famSup.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/vectorFamDiv.C b/src/finiteArea/finiteArea/fam/vectorFamDiv.C new file mode 100644 index 0000000000000000000000000000000000000000..50aa8febaff7d5fb9666edc018d6d0c142b6046c --- /dev/null +++ b/src/finiteArea/finiteArea/fam/vectorFamDiv.C @@ -0,0 +1,71 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "vectorFamDiv.H" +#include "faMesh.H" +#include "faMatrix.H" +#include "faConvectionScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +tmp<faMatrix<scalar> > +div +( + const edgeScalarField& flux, + const GeometricField<scalar, faPatchField, areaMesh>& vf, + const word& name +) +{ + return fa::convectionScheme<scalar>::New + ( + vf.mesh(), + flux, + vf.mesh().schemesDict().divScheme(name) + )().famDiv(flux, vf); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/fam/vectorFamDiv.H b/src/finiteArea/finiteArea/fam/vectorFamDiv.H new file mode 100644 index 0000000000000000000000000000000000000000..88037baea6a0ddf415031432f503b307d4ca27ef --- /dev/null +++ b/src/finiteArea/finiteArea/fam/vectorFamDiv.H @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Typedef + Foam::fam + +Description + Specialisation of fam div for a flux. + +SourceFiles + vectorFamDiv.C + +\*---------------------------------------------------------------------------*/ + +#ifndef vectorFamDiv_H +#define vectorFamDiv_H + +#include "famDiv.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +namespace fam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fam functions Declaration +\*---------------------------------------------------------------------------*/ + +template<> +tmp<faMatrix<scalar> > +div +( + const edgeScalarField& flux, + const GeometricField<scalar, faPatchField, areaMesh>& vf, + const word& name +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradScheme.C b/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..4001dc6452d8e95df570e1ec76459b2341626cbc --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradScheme.C @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus gradient schemes. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" +#include "HashTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class Type> +tmp<gradScheme<Type> > gradScheme<Type>::New +( + const faMesh& mesh, + Istream& schemeData +) +{ + if (fa::debug) + { + Info<< "gradScheme<Type>::New(Istream& schemeData) : " + "constructing gradScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "gradScheme<Type>::New" + "(const faMesh& mesh, Istream& schemeData)", + schemeData + ) << "Grad scheme not specified" << endl << endl + << "Valid grad schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_->find(schemeName); + + if (cstrIter == IstreamConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "gradScheme<Type>::New" + "(const faMesh& mesh, Istream& schemeData)", + schemeData + ) << "Unknown grad scheme " << schemeName << nl << nl + << "Valid grad schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return cstrIter()(mesh, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +gradScheme<Type>::~gradScheme() +{} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradScheme.H b/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..88d857222ed5508fad6902635e6524d34cc3c753 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradScheme.H @@ -0,0 +1,182 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + gradScheme + +Description + Abstract base class for gradient schemes. + +SourceFiles + faGradScheme.C + faGradSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faGradScheme_H +#define faGradScheme_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class faMesh; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class gradScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class gradScheme +: + public refCount +{ + // Private data + + const faMesh& mesh_; + + + // Private Member Functions + + //- Disallow copy construct + gradScheme(const gradScheme&); + + //- Disallow default bitwise assignment + void operator=(const gradScheme&); + + +public: + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + gradScheme, + Istream, + (const faMesh& mesh, Istream& schemeData), + (mesh, schemeData) + ); + + + // Constructors + + //- Construct from mesh + gradScheme(const faMesh& mesh) + : + mesh_(mesh) + {} + + + // Selectors + + //- Return a pointer to a new gradScheme created on freestore + static tmp<gradScheme<Type> > New + ( + const faMesh& mesh, + Istream& schemeData + ); + + + // Destructor + + virtual ~gradScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + //- Calculate and return the grad of the given field + virtual tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeFaGradTypeScheme(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \ + \ + namespace Foam \ + { \ + namespace fa \ + { \ + gradScheme<Type>::addIstreamConstructorToTable<SS<Type> > \ + add##SS##Type##IstreamConstructorToTable_; \ + } \ + } + + +#define makeFaGradScheme(SS) \ + \ +makeFaGradTypeScheme(SS, scalar) \ +makeFaGradTypeScheme(SS, vector) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faGradScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradSchemes.C b/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..0e7c10187428a8a20435d6b4dea4065c52524a15 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/faGradScheme/faGradSchemes.C @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus grad schemes. + +\*---------------------------------------------------------------------------*/ + +#include "faGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Define the constructor function hash tables + +defineTemplateRunTimeSelectionTable +( + gradScheme<scalar>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + gradScheme<vector>, + Istream +); + +// defineTemplateRunTimeSelectionTable +// ( +// gradScheme<tensor>, +// Istream +// ); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrad.C b/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..ed8f56d5b4fa77544cbdddd25e38dd178d9f7462 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrad.C @@ -0,0 +1,117 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaGrad.H" +#include "facGrad.H" +#include "areaFields.H" +#include "edgeFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +gaussGrad<Type>::grad +( + const GeometricField<Type, faPatchField, areaMesh>& vsf +) const +{ + typedef typename outerProduct<vector, Type>::type GradType; + + tmp<GeometricField<GradType, faPatchField, areaMesh> > tgGrad + ( + fac::edgeIntegrate + ( + vsf.mesh().Le() + *tinterpScheme_().interpolate(vsf) + ) + ); + + GeometricField<GradType, faPatchField, areaMesh>& gGrad = tgGrad.ref(); + + // Removed for consistencty. Matthias Rauter, 6/Dec/2016 + gGrad.correctBoundaryConditions(); + + gGrad.rename("grad(" + vsf.name() + ')'); + correctBoundaryConditions(vsf, gGrad); + + return tgGrad; +} + + +template<class Type> +void gaussGrad<Type>::correctBoundaryConditions +( + const GeometricField<Type, faPatchField, areaMesh>& vsf, + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + >& gGrad +) +{ + forAll(vsf.boundaryField(), patchI) + { + if (!vsf.boundaryField()[patchI].coupled()) + { + vectorField m = + vsf.mesh().Le().boundaryField()[patchI]/ + vsf.mesh().magLe().boundaryField()[patchI]; + + gGrad.boundaryFieldRef()[patchI] += m* + ( + vsf.boundaryField()[patchI].snGrad() + - (m & gGrad.boundaryField()[patchI]) + ); + } + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrad.H b/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..b48429fa88cfa5689d8e6053eb1e141ff1f42ed4 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrad.H @@ -0,0 +1,161 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + gaussGrad + +Description + Basic second-order gradient scheme using face-interpolation + and Gauss' theorem. + +SourceFiles + gaussFaGrad.C + gaussFaGrads.C + +\*---------------------------------------------------------------------------*/ + +#ifndef gaussFaGrad_H +#define gaussFaGrad_H + +#include "faGradScheme.H" +#include "edgeInterpolationScheme.H" +#include "linearEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class gaussGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class gaussGrad +: + public fa::gradScheme<Type> +{ + // Private data + + tmp<edgeInterpolationScheme<Type> > tinterpScheme_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + gaussGrad(const gaussGrad&); + + //- Disallow default bitwise assignment + void operator=(const gaussGrad&); + + +public: + + //- Runtime type information + TypeName("Gauss"); + + + // Constructors + + //- Construct from mesh + gaussGrad(const faMesh& mesh) + : + gradScheme<Type>(mesh), + tinterpScheme_(new linearEdgeInterpolation<Type>(mesh)) + {} + + //- Construct from Istream + gaussGrad(const faMesh& mesh, Istream& is) + : + gradScheme<Type>(mesh), + tinterpScheme_(NULL) + { + if (is.eof()) + { + tinterpScheme_ = + tmp<edgeInterpolationScheme<Type> > + ( + new linearEdgeInterpolation<Type>(mesh) + ); + } + else + { + tinterpScheme_ = + tmp<edgeInterpolationScheme<Type> > + ( + edgeInterpolationScheme<Type>::New(mesh, is) + ); + } + } + + + // Member Functions + + //- Return the gradient of the given field calculated + // using Gauss' theorem on the interpolated field + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const; + + //- Correct the boundary values of the gradient using the patchField + // snGrad functions + static void correctBoundaryConditions + ( + const GeometricField<Type, faPatchField, areaMesh>&, + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "gaussFaGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrads.C b/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..713cbf2960dc3477c510ffe378df48b1a375eff3 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/gaussFaGrad/gaussFaGrads.C @@ -0,0 +1,35 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaGrad.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaGradScheme(gaussGrad) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..7bac7a8e1b1a273311d87f3a18ee083923436082 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C @@ -0,0 +1,161 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "leastSquaresFaGrad.H" +#include "leastSquaresFaVectors.H" +#include "gaussFaGrad.H" +#include "faMesh.H" +#include "areaFaMesh.H" +#include "edgeFaMesh.H" +#include "GeometricField.H" +#include "zeroGradientFaPatchField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp +< + GeometricField + < + typename outerProduct<vector, Type>::type, faPatchField, areaMesh + > +> +leastSquaresFaGrad<Type>::grad +( + const GeometricField<Type, faPatchField, areaMesh>& vsf +) const +{ + typedef typename outerProduct<vector, Type>::type GradType; + + const faMesh& mesh = vsf.mesh(); + + tmp<GeometricField<GradType, faPatchField, areaMesh> > tlsGrad + ( + new GeometricField<GradType, faPatchField, areaMesh> + ( + IOobject + ( + "grad(" + vsf.name() + ')', + vsf.instance(), + vsf.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensioned<GradType> + ( + "zero", + vsf.dimensions()/dimLength, + pTraits<GradType>::zero + ), + zeroGradientFaPatchField<GradType>::typeName + ) + ); + GeometricField<GradType, faPatchField, areaMesh>& lsGrad = tlsGrad.ref(); + + // Get reference to least square vectors + const leastSquaresFaVectors& lsv = leastSquaresFaVectors::New(mesh); + + const edgeVectorField& ownLs = lsv.pVectors(); + const edgeVectorField& neiLs = lsv.nVectors(); + + const labelUList& own = mesh.owner(); + const labelUList& nei = mesh.neighbour(); + + forAll(own, edgei) + { + register label ownEdgeI = own[edgei]; + register label neiEdgeI = nei[edgei]; + + Type deltaVsf = vsf[neiEdgeI] - vsf[ownEdgeI]; + + lsGrad[ownEdgeI] += ownLs[edgei]*deltaVsf; + lsGrad[neiEdgeI] -= neiLs[edgei]*deltaVsf; + } + + // Boundary edges + forAll(vsf.boundaryField(), patchi) + { + const faePatchVectorField& patchOwnLs = ownLs.boundaryField()[patchi]; + + const labelUList& edgeFaces = + lsGrad.boundaryField()[patchi].patch().edgeFaces(); + + if (vsf.boundaryField()[patchi].coupled()) + { + Field<Type> neiVsf = + vsf.boundaryField()[patchi].patchNeighbourField(); + + forAll(neiVsf, patchEdgeI) + { + lsGrad[edgeFaces[patchEdgeI]] += + patchOwnLs[patchEdgeI] + *(neiVsf[patchEdgeI] - vsf[edgeFaces[patchEdgeI]]); + } + } + else + { + const faPatchField<Type>& patchVsf = vsf.boundaryField()[patchi]; + + forAll(patchVsf, patchEdgeI) + { + lsGrad[edgeFaces[patchEdgeI]] += + patchOwnLs[patchEdgeI] + *(patchVsf[patchEdgeI] - vsf[edgeFaces[patchEdgeI]]); + } + } + } + + // Remove component of gradient normal to surface (area) + // Removed for consistencty. Matthias Rauter, 6/Dec/2016 + lsGrad.correctBoundaryConditions(); + + gaussGrad<Type>::correctBoundaryConditions(vsf, lsGrad); + + return tlsGrad; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.H b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..eb2bf40d2b5a477b1a6da806bc08eaa1c46b4aa8 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.H @@ -0,0 +1,125 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::fa::leastSquaresFaGrad + +Description + Second-order gradient scheme using least-squares. + +Author + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + leastSquaresFaGrad.C + +\*---------------------------------------------------------------------------*/ + +#ifndef leastSquaresFaGrad_H +#define leastSquaresFaGrad_H + +#include "faGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class leastSquaresFaGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class leastSquaresFaGrad +: + public fa::gradScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + leastSquaresFaGrad(const leastSquaresFaGrad&); + + //- Disallow default bitwise assignment + void operator=(const leastSquaresFaGrad&); + + +public: + + //- Runtime type information + TypeName("leastSquares"); + + + // Constructors + + //- Construct from mesh + leastSquaresFaGrad(const faMesh& mesh) + : + gradScheme<Type>(mesh) + {} + + //- Construct from Istream + leastSquaresFaGrad(const faMesh& mesh, Istream&) + : + gradScheme<Type>(mesh) + {} + + + // Member Functions + + virtual tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "leastSquaresFaGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrads.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..4023a279dd70aced1aeb41ce1ca8d0cfc4d24045 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrads.C @@ -0,0 +1,35 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "leastSquaresFaGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaGradScheme(leastSquaresFaGrad) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C new file mode 100644 index 0000000000000000000000000000000000000000..c914cf187e2fff62e091ba061723bc3af0422294 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C @@ -0,0 +1,262 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "leastSquaresFaVectors.H" +#include "edgeFields.H" +#include "areaFields.H" +#include "mapPolyMesh.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(leastSquaresFaVectors, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::leastSquaresFaVectors::leastSquaresFaVectors(const faMesh& mesh) +: + MeshObject<faMesh, MoveableMeshObject, leastSquaresFaVectors>(mesh), + pVectorsPtr_(NULL), + nVectorsPtr_(NULL) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::leastSquaresFaVectors::~leastSquaresFaVectors() +{ + deleteDemandDrivenData(pVectorsPtr_); + deleteDemandDrivenData(nVectorsPtr_); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::leastSquaresFaVectors::makeLeastSquaresVectors() const +{ + if (debug) + { + Info<< "leastSquaresFaVectors::makeLeastSquaresVectors() :" + << "Constructing finite area least square gradient vectors" + << endl; + } + + pVectorsPtr_ = new edgeVectorField + ( + IOobject + ( + "LeastSquaresP", + mesh().pointsInstance(), + mesh().thisDb(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedVector("zero", dimless/dimLength, vector::zero) + ); + edgeVectorField& lsP = *pVectorsPtr_; + + nVectorsPtr_ = new edgeVectorField + ( + IOobject + ( + "LeastSquaresN", + mesh().pointsInstance(), + mesh().thisDb(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedVector("zero", dimless/dimLength, vector::zero) + ); + edgeVectorField& lsN = *nVectorsPtr_; + + // Set local references to mesh data + const labelUList& owner = mesh().owner(); + const labelUList& neighbour = mesh().neighbour(); + + const areaVectorField& C = mesh().areaCentres(); + const edgeScalarField& w = mesh().weights(); + + + // Set up temporary storage for the dd tensor (before inversion) + symmTensorField dd(mesh().nFaces(), symmTensor::zero); + + forAll(owner, facei) + { + label own = owner[facei]; + label nei = neighbour[facei]; + + vector d = C[nei] - C[own]; + symmTensor wdd = (1.0/magSqr(d))*sqr(d); + + dd[own] += wdd; + dd[nei] += wdd; + } + + + forAll(lsP.boundaryField(), patchi) + { + const faePatchScalarField& pw = w.boundaryField()[patchi]; + + const faPatch& p = pw.patch(); + const labelUList& edgeFaces = p.edgeFaces(); + + // Build the d-vectors + // HJ, reconsider deltas at the boundary, consistent with FVM + // Current implementation is good for fixedValue boudaries, but may + // cause problems with fixedGradient. HJ, 4/Oct/2010 + vectorField pd = p.delta(); + + if (p.coupled()) + { + forAll(pd, patchFacei) + { + const vector& d = pd[patchFacei]; + + dd[edgeFaces[patchFacei]] += + (1.0/magSqr(d))*sqr(d); + } + } + else + { + forAll(pd, patchFacei) + { + const vector& d = pd[patchFacei]; + + dd[edgeFaces[patchFacei]] += + (1.0/magSqr(d))*sqr(d); + } + } + } + + + // Invert the dd tensor + symmTensorField invDd = inv(dd); + + + // Revisit all faces and calculate the lsP and lsN vectors + forAll(owner, facei) + { + label own = owner[facei]; + label nei = neighbour[facei]; + + vector d = C[nei] - C[own]; + scalar magSfByMagSqrd = 1.0/magSqr(d); + + lsP[facei] = magSfByMagSqrd*(invDd[own] & d); + lsN[facei] = -magSfByMagSqrd*(invDd[nei] & d); + } + + forAll(lsP.boundaryField(), patchi) + { + faePatchVectorField& patchLsP = lsP.boundaryFieldRef()[patchi]; + + const faePatchScalarField& pw = w.boundaryField()[patchi]; + + const faPatch& p = pw.patch(); + const labelUList& edgeFaces = p.edgeFaces(); + + // Build the d-vectors + vectorField pd = p.delta(); + + if (p.coupled()) + { + forAll(pd, patchFacei) + { + const vector& d = pd[patchFacei]; + + patchLsP[patchFacei] = + (1.0/magSqr(d)) + *(invDd[edgeFaces[patchFacei]] & d); + } + } + else + { + forAll(pd, patchFacei) + { + const vector& d = pd[patchFacei]; + + patchLsP[patchFacei] = + (1.0/magSqr(d)) + *(invDd[edgeFaces[patchFacei]] & d); + } + } + } + + if (debug) + { + Info<< "leastSquaresFaVectors::makeLeastSquaresVectors() :" + << "Finished constructing finite area least square gradient vectors" + << endl; + } +} + + +const Foam::edgeVectorField& Foam::leastSquaresFaVectors::pVectors() const +{ + if (!pVectorsPtr_) + { + makeLeastSquaresVectors(); + } + + return *pVectorsPtr_; +} + + +const Foam::edgeVectorField& Foam::leastSquaresFaVectors::nVectors() const +{ + if (!nVectorsPtr_) + { + makeLeastSquaresVectors(); + } + + return *nVectorsPtr_; +} + + +bool Foam::leastSquaresFaVectors::movePoints() +{ + if (debug) + { + InfoIn("bool leastSquaresFaVectors::movePoints()") + << "Clearing least square data" << endl; + } + + deleteDemandDrivenData(pVectorsPtr_); + deleteDemandDrivenData(nVectorsPtr_); + + return true; +} + + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H new file mode 100644 index 0000000000000000000000000000000000000000..1395c8e6eb59941ab6bce4d6f005c4f440287e94 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.H @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::leastSquaresFaVectors + +Description + Least-squares gradient scheme vectors for the Finite Area method + +Author + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + leastSquaresFaVectors.C + +\*---------------------------------------------------------------------------*/ + +#ifndef leastSquaresFaVectors_H +#define leastSquaresFaVectors_H + +#include "MeshObject.H" +#include "faMesh.H" +#include "edgeFieldsFwd.H" +#include "labelPair.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class mapPolyMesh; + +/*---------------------------------------------------------------------------*\ + Class leastSquaresFaVectors Declaration +\*---------------------------------------------------------------------------*/ + +class leastSquaresFaVectors +: + public MeshObject<faMesh, MoveableMeshObject, leastSquaresFaVectors> +{ + // Private data + + //- Least-squares gradient vectors + mutable edgeVectorField* pVectorsPtr_; + mutable edgeVectorField* nVectorsPtr_; + + + // Private member functions + + //- Construct Least-squares gradient vectors + void makeLeastSquaresVectors() const; + + +public: + + // Declare name of the class and its debug switch + TypeName("leastSquaresFaVectors"); + + + // Constructors + + //- Construct given an faMesh + explicit leastSquaresFaVectors(const faMesh&); + + + //- Destructor + virtual ~leastSquaresFaVectors(); + + + // Member functions + + //- Return reference to owner least square vectors + const edgeVectorField& pVectors() const; + + //- Return reference to neighbour least square vectors + const edgeVectorField& nVectors() const; + + + //- Delete the least square vectors when the mesh moves + virtual bool movePoints(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/edgeLimitedFaGrad/edgeLimitedFaGrad.H b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/edgeLimitedFaGrad/edgeLimitedFaGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..09016f293f85d6703d83fba841e1886c19f0da31 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/edgeLimitedFaGrad/edgeLimitedFaGrad.H @@ -0,0 +1,145 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::fa::edgeLimitedGrad + +Description + edgeLimitedGrad gradient scheme applied to a runTime selected base gradient + scheme. + + The scalar limiter based on limiting the extrapolated edge values + between the edge-neighbour cell values and is applied to all components + of the gradient. + +SourceFiles + edgeLimitedFaGrads.C + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeLimitedGrad_H +#define edgeLimitedGrad_H + +#include "faGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class edgeLimitedGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class edgeLimitedGrad +: + public fa::gradScheme<Type> +{ + // Private Data + + tmp<fa::gradScheme<Type> > basicGradScheme_; + + //- Limiter coefficient + scalar k_; + + + // Private Member Functions + + inline void limitEdge + ( + scalar& limiter, + const scalar maxDelta, + const scalar minDelta, + const scalar extrapolate + ) const; + + + //- Disallow default bitwise copy construct + edgeLimitedGrad(const edgeLimitedGrad&); + + //- Disallow default bitwise assignment + void operator=(const edgeLimitedGrad&); + + +public: + + //- RunTime type information + TypeName("edgeLimited"); + + + // Constructors + + //- Construct from mesh and schemeData + edgeLimitedGrad(const faMesh& mesh, Istream& schemeData) + : + gradScheme<Type>(mesh), + basicGradScheme_(fa::gradScheme<Type>::New(mesh, schemeData)), + k_(readScalar(schemeData)) + { + if (k_ < 0 || k_ > 1) + { + FatalIOErrorIn + ( + "edgeLimitedGrad(const faMesh& mesh, Istream& schemeData)", + schemeData + ) << "coefficient = " << k_ + << " should be >= 0 and <= 1" + << exit(FatalIOError); + } + } + + + // Member Functions + + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/edgeLimitedFaGrad/edgeLimitedFaGrads.C b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/edgeLimitedFaGrad/edgeLimitedFaGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..faa83de8de69f3bdcd4f757b1b75d5bbc10c6013 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/edgeLimitedFaGrad/edgeLimitedFaGrads.C @@ -0,0 +1,375 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "edgeLimitedFaGrad.H" +#include "gaussFaGrad.H" +#include "faMesh.H" +#include "areaFaMesh.H" +#include "edgeFaMesh.H" +#include "areaFields.H" +#include "fixedValueFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaGradScheme(edgeLimitedGrad) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +inline void edgeLimitedGrad<Type>::limitEdge +( + scalar& limiter, + const scalar maxDelta, + const scalar minDelta, + const scalar extrapolate +) const +{ + if (extrapolate > maxDelta + VSMALL) + { + limiter = min(limiter, maxDelta/extrapolate); + } + else if (extrapolate < minDelta - VSMALL) + { + limiter = min(limiter, minDelta/extrapolate); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +tmp<areaVectorField> edgeLimitedGrad<scalar>::grad +( + const areaScalarField& vsf +) const +{ + const faMesh& mesh = vsf.mesh(); + + tmp<areaVectorField> tGrad = basicGradScheme_().grad(vsf); + + if (k_ < SMALL) + { + return tGrad; + } + + areaVectorField& g = tGrad.ref(); + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + const areaVectorField& C = mesh.areaCentres(); + const edgeVectorField& Cf = mesh.edgeCentres(); + + // create limiter + scalarField limiter(vsf.internalField().size(), 1.0); + + scalar rk = (1.0/k_ - 1.0); + + forAll(owner, edgei) + { + label own = owner[edgei]; + label nei = neighbour[edgei]; + + scalar vsfOwn = vsf[own]; + scalar vsfNei = vsf[nei]; + + scalar maxEdge = max(vsfOwn, vsfNei); + scalar minEdge = min(vsfOwn, vsfNei); + scalar maxMinEdge = rk*(maxEdge - minEdge); + maxEdge += maxMinEdge; + minEdge -= maxMinEdge; + + // owner side + limitEdge + ( + limiter[own], + maxEdge - vsfOwn, minEdge - vsfOwn, + (Cf[edgei] - C[own]) & g[own] + ); + + // neighbour side + limitEdge + ( + limiter[nei], + maxEdge - vsfNei, minEdge - vsfNei, + (Cf[edgei] - C[nei]) & g[nei] + ); + } + + const areaScalarField::Boundary& bsf = vsf.boundaryField(); + + forAll(bsf, patchi) + { + const faPatchScalarField& psf = bsf[patchi]; + + const labelUList& pOwner = mesh.boundary()[patchi].edgeFaces(); + const vectorField& pCf = Cf.boundaryField()[patchi]; + + if (psf.coupled()) + { + scalarField psfNei = psf.patchNeighbourField(); + + forAll(pOwner, pEdgei) + { + label own = pOwner[pEdgei]; + + scalar vsfOwn = vsf[own]; + scalar vsfNei = psfNei[pEdgei]; + + scalar maxEdge = max(vsfOwn, vsfNei); + scalar minEdge = min(vsfOwn, vsfNei); + scalar maxMinEdge = rk*(maxEdge - minEdge); + maxEdge += maxMinEdge; + minEdge -= maxMinEdge; + + limitEdge + ( + limiter[own], + maxEdge - vsfOwn, minEdge - vsfOwn, + (pCf[pEdgei] - C[own]) & g[own] + ); + } + } + else if (psf.fixesValue()) + { + forAll(pOwner, pEdgei) + { + label own = pOwner[pEdgei]; + + scalar vsfOwn = vsf[own]; + scalar vsfNei = psf[pEdgei]; + + scalar maxEdge = max(vsfOwn, vsfNei); + scalar minEdge = min(vsfOwn, vsfNei); + scalar maxMinEdge = rk*(maxEdge - minEdge); + maxEdge += maxMinEdge; + minEdge -= maxMinEdge; + + limitEdge + ( + limiter[own], + maxEdge - vsfOwn, minEdge - vsfOwn, + (pCf[pEdgei] - C[own]) & g[own] + ); + } + } + } + + if (fa::debug) + { + Info<< "gradient limiter for: " << vsf.name() + << " max = " << gMax(limiter) + << " min = " << gMin(limiter) + << " average: " << gAverage(limiter) << endl; + } + + g.primitiveFieldRef() *= limiter; + g.correctBoundaryConditions(); + gaussGrad<scalar>::correctBoundaryConditions(vsf, g); + + return tGrad; +} + + +template<> +tmp<areaTensorField> edgeLimitedGrad<vector>::grad +( + const areaVectorField& vvf +) const +{ + const faMesh& mesh = vvf.mesh(); + + tmp<areaTensorField> tGrad = basicGradScheme_().grad(vvf); + + if (k_ < SMALL) + { + return tGrad; + } + + areaTensorField& g = tGrad.ref(); + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + const areaVectorField& C = mesh.areaCentres(); + const edgeVectorField& Cf = mesh.edgeCentres(); + + // create limiter + scalarField limiter(vvf.internalField().size(), 1.0); + + scalar rk = (1.0/k_ - 1.0); + + forAll(owner, edgei) + { + label own = owner[edgei]; + label nei = neighbour[edgei]; + + vector vvfOwn = vvf[own]; + vector vvfNei = vvf[nei]; + + // owner side + vector gradf = (Cf[edgei] - C[own]) & g[own]; + + scalar vsfOwn = gradf & vvfOwn; + scalar vsfNei = gradf & vvfNei; + + scalar maxEdge = max(vsfOwn, vsfNei); + scalar minEdge = min(vsfOwn, vsfNei); + scalar maxMinEdge = rk*(maxEdge - minEdge); + maxEdge += maxMinEdge; + minEdge -= maxMinEdge; + + limitEdge + ( + limiter[own], + maxEdge - vsfOwn, minEdge - vsfOwn, + magSqr(gradf) + ); + + + // neighbour side + gradf = (Cf[edgei] - C[nei]) & g[nei]; + + vsfOwn = gradf & vvfOwn; + vsfNei = gradf & vvfNei; + + maxEdge = max(vsfOwn, vsfNei); + minEdge = min(vsfOwn, vsfNei); + + limitEdge + ( + limiter[nei], + maxEdge - vsfNei, minEdge - vsfNei, + magSqr(gradf) + ); + } + + + const areaVectorField::Boundary& bvf = vvf.boundaryField(); + + forAll(bvf, patchi) + { + const faPatchVectorField& psf = bvf[patchi]; + + const labelUList& pOwner = mesh.boundary()[patchi].edgeFaces(); + const vectorField& pCf = Cf.boundaryField()[patchi]; + + if (psf.coupled()) + { + vectorField psfNei = psf.patchNeighbourField(); + + forAll(pOwner, pEdgei) + { + label own = pOwner[pEdgei]; + + vector vvfOwn = vvf[own]; + vector vvfNei = psfNei[pEdgei]; + + vector gradf = (pCf[pEdgei] - C[own]) & g[own]; + + scalar vsfOwn = gradf & vvfOwn; + scalar vsfNei = gradf & vvfNei; + + scalar maxEdge = max(vsfOwn, vsfNei); + scalar minEdge = min(vsfOwn, vsfNei); + scalar maxMinEdge = rk*(maxEdge - minEdge); + maxEdge += maxMinEdge; + minEdge -= maxMinEdge; + + limitEdge + ( + limiter[own], + maxEdge - vsfOwn, minEdge - vsfOwn, + magSqr(gradf) + ); + } + } + else if (psf.fixesValue()) + { + forAll(pOwner, pEdgei) + { + label own = pOwner[pEdgei]; + + vector vvfOwn = vvf[own]; + vector vvfNei = psf[pEdgei]; + + vector gradf = (pCf[pEdgei] - C[own]) & g[own]; + + scalar vsfOwn = gradf & vvfOwn; + scalar vsfNei = gradf & vvfNei; + + scalar maxEdge = max(vsfOwn, vsfNei); + scalar minEdge = min(vsfOwn, vsfNei); + scalar maxMinEdge = rk*(maxEdge - minEdge); + maxEdge += maxMinEdge; + minEdge -= maxMinEdge; + + limitEdge + ( + limiter[own], + maxEdge - vsfOwn, minEdge - vsfOwn, + magSqr(gradf) + ); + } + } + } + + if (fa::debug) + { + Info<< "gradient limiter for: " << vvf.name() + << " max = " << gMax(limiter) + << " min = " << gMin(limiter) + << " average: " << gAverage(limiter) << endl; + } + + g.primitiveFieldRef() *= limiter; + g.correctBoundaryConditions(); + gaussGrad<vector>::correctBoundaryConditions(vvf, g); + + return tGrad; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/faceLimitedFaGrad/faceLimitedFaGrad.H b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/faceLimitedFaGrad/faceLimitedFaGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..218c5fd297f146da5cf596a51e1cde7d11203295 --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/faceLimitedFaGrad/faceLimitedFaGrad.H @@ -0,0 +1,148 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::fa::faceLimitedGrad + +Description + faceLimitedGrad gradient scheme applied to a runTime selected base gradient + scheme. + + The scalar limiter based on limiting the extrapolated face values + between the maximum and minumum cell and cell neighbour values and is + applied to all components of the gradient. + +Author + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + faceLimitedFaGrads.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faceLimitedFaGrad_H +#define faceLimitedFaGrad_H + +#include "faGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class faceLimitedGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class faceLimitedGrad +: + public fa::gradScheme<Type> +{ + // Private Data + + tmp<fa::gradScheme<Type> > basicGradScheme_; + + //- Limiter coefficient + scalar k_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + faceLimitedGrad(const faceLimitedGrad&); + + //- Disallow default bitwise assignment + void operator=(const faceLimitedGrad&); + + +public: + + //- RunTime type information + TypeName("faceLimited"); + + + // Constructors + + //- Construct from mesh and schemeData + faceLimitedGrad(const faMesh& mesh, Istream& schemeData) + : + gradScheme<Type>(mesh), + basicGradScheme_(fa::gradScheme<Type>::New(mesh, schemeData)), + k_(readScalar(schemeData)) + { + if (k_ < 0 || k_ > 1) + { + FatalIOErrorIn + ( + "faceLimitedGrad(const faMesh& mesh, Istream& schemeData)", + schemeData + ) << "coefficient = " << k_ + << " should be >= 0 and <= 1" + << exit(FatalIOError); + } + } + + + // Member Functions + + static inline void limitEdge + ( + Type& limiter, + const Type& maxDelta, + const Type& minDelta, + const Type& extrapolate + ); + + + tmp + < + GeometricField + <typename outerProduct<vector, Type>::type, faPatchField, areaMesh> + > grad + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/faceLimitedFaGrad/faceLimitedFaGrads.C b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/faceLimitedFaGrad/faceLimitedFaGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..9d52bd87b294265344dfddd822b6cc372b57f19d --- /dev/null +++ b/src/finiteArea/finiteArea/gradSchemes/limitedGradSchemes/faceLimitedFaGrad/faceLimitedFaGrads.C @@ -0,0 +1,415 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "faceLimitedFaGrad.H" +#include "gaussFaGrad.H" +#include "faMesh.H" +#include "areaFaMesh.H" +#include "edgeFaMesh.H" +#include "areaFields.H" +#include "fixedValueFaPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaGradScheme(faceLimitedGrad) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +inline void faceLimitedGrad<scalar>::limitEdge +( + scalar& limiter, + const scalar& maxDelta, + const scalar& minDelta, + const scalar& extrapolate +) +{ + if (extrapolate > maxDelta + VSMALL) + { + limiter = min(limiter, maxDelta/extrapolate); + } + else if (extrapolate < minDelta - VSMALL) + { + limiter = min(limiter, minDelta/extrapolate); + } +} + + +template<class Type> +inline void faceLimitedGrad<Type>::limitEdge +( + Type& limiter, + const Type& maxDelta, + const Type& minDelta, + const Type& extrapolate +) +{ + for(direction cmpt = 0; cmpt < Type::nComponents; cmpt++) + { + faceLimitedGrad<scalar>::limitEdge + ( + limiter.component(cmpt), + maxDelta.component(cmpt), + minDelta.component(cmpt), + extrapolate.component(cmpt) + ); + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +tmp<areaVectorField> faceLimitedGrad<scalar>::grad +( + const areaScalarField& vsf +) const +{ + const faMesh& mesh = vsf.mesh(); + + tmp<areaVectorField> tGrad = basicGradScheme_().grad(vsf); + + if (k_ < SMALL) + { + return tGrad; + } + + areaVectorField& g = tGrad.ref(); + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + const areaVectorField& C = mesh.areaCentres(); + const edgeVectorField& Cf = mesh.edgeCentres(); + + scalarField maxVsf(vsf.internalField()); + scalarField minVsf(vsf.internalField()); + + forAll(owner, facei) + { + label own = owner[facei]; + label nei = neighbour[facei]; + + scalar vsfOwn = vsf[own]; + scalar vsfNei = vsf[nei]; + + maxVsf[own] = max(maxVsf[own], vsfNei); + minVsf[own] = min(minVsf[own], vsfNei); + + maxVsf[nei] = max(maxVsf[nei], vsfOwn); + minVsf[nei] = min(minVsf[nei], vsfOwn); + } + + + const areaScalarField::Boundary& bsf = vsf.boundaryField(); + + forAll(bsf, patchi) + { + const faPatchScalarField& psf = bsf[patchi]; + + const labelUList& pOwner = mesh.boundary()[patchi].edgeFaces(); + + if (psf.coupled()) + { + scalarField psfNei = psf.patchNeighbourField(); + + forAll(pOwner, pFacei) + { + label own = pOwner[pFacei]; + scalar vsfNei = psfNei[pFacei]; + + maxVsf[own] = max(maxVsf[own], vsfNei); + minVsf[own] = min(minVsf[own], vsfNei); + } + } + else + { + forAll(pOwner, pFacei) + { + label own = pOwner[pFacei]; + scalar vsfNei = psf[pFacei]; + + maxVsf[own] = max(maxVsf[own], vsfNei); + minVsf[own] = min(minVsf[own], vsfNei); + } + } + } + + maxVsf -= vsf; + minVsf -= vsf; + + if (k_ < 1.0) + { + scalarField maxMinVsf = (1.0/k_ - 1.0)*(maxVsf - minVsf); + maxVsf += maxMinVsf; + minVsf -= maxMinVsf; + } + + + // create limiter + scalarField limiter(vsf.internalField().size(), 1.0); + + forAll(owner, facei) + { + label own = owner[facei]; + label nei = neighbour[facei]; + + // owner side + limitEdge + ( + limiter[own], + maxVsf[own], + minVsf[own], + (Cf[facei] - C[own]) & g[own] + ); + + // neighbour side + limitEdge + ( + limiter[nei], + maxVsf[nei], + minVsf[nei], + (Cf[facei] - C[nei]) & g[nei] + ); + } + + forAll(bsf, patchi) + { + const labelUList& pOwner = mesh.boundary()[patchi].edgeFaces(); + const vectorField& pCf = Cf.boundaryField()[patchi]; + + forAll(pOwner, pFacei) + { + label own = pOwner[pFacei]; + + limitEdge + ( + limiter[own], + maxVsf[own], + minVsf[own], + (pCf[pFacei] - C[own]) & g[own] + ); + } + } + + if (fa::debug) + { + Info<< "gradient limiter for: " << vsf.name() + << " max = " << gMax(limiter) + << " min = " << gMin(limiter) + << " average: " << gAverage(limiter) << endl; + } + + g.primitiveFieldRef() *= limiter; + g.correctBoundaryConditions(); + gaussGrad<scalar>::correctBoundaryConditions(vsf, g); + + return tGrad; +} + + +template<> +tmp<areaTensorField> faceLimitedGrad<vector>::grad +( + const areaVectorField& vsf +) const +{ + const faMesh& mesh = vsf.mesh(); + + tmp<areaTensorField> tGrad = basicGradScheme_().grad(vsf); + + if (k_ < SMALL) + { + return tGrad; + } + + areaTensorField& g = tGrad.ref(); + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + const areaVectorField& C = mesh.areaCentres(); + const edgeVectorField& Cf = mesh.edgeCentres(); + + vectorField maxVsf(vsf.internalField()); + vectorField minVsf(vsf.internalField()); + + forAll(owner, facei) + { + label own = owner[facei]; + label nei = neighbour[facei]; + + const vector& vsfOwn = vsf[own]; + const vector& vsfNei = vsf[nei]; + + maxVsf[own] = max(maxVsf[own], vsfNei); + minVsf[own] = min(minVsf[own], vsfNei); + + maxVsf[nei] = max(maxVsf[nei], vsfOwn); + minVsf[nei] = min(minVsf[nei], vsfOwn); + } + + + const areaVectorField::Boundary& bsf = vsf.boundaryField(); + + forAll(bsf, patchi) + { + const faPatchVectorField& psf = bsf[patchi]; + const labelUList& pOwner = mesh.boundary()[patchi].edgeFaces(); + + if (psf.coupled()) + { + vectorField psfNei = psf.patchNeighbourField(); + + forAll(pOwner, pFacei) + { + label own = pOwner[pFacei]; + const vector& vsfNei = psfNei[pFacei]; + + maxVsf[own] = max(maxVsf[own], vsfNei); + minVsf[own] = min(minVsf[own], vsfNei); + } + } + else + { + forAll(pOwner, pFacei) + { + label own = pOwner[pFacei]; + const vector& vsfNei = psf[pFacei]; + + maxVsf[own] = max(maxVsf[own], vsfNei); + minVsf[own] = min(minVsf[own], vsfNei); + } + } + } + + maxVsf -= vsf; + minVsf -= vsf; + + if (k_ < 1.0) + { + vectorField maxMinVsf = (1.0/k_ - 1.0)*(maxVsf - minVsf); + maxVsf += maxMinVsf; + minVsf -= maxMinVsf; + + //maxVsf *= 1.0/k_; + //minVsf *= 1.0/k_; + } + + + // create limiter + vectorField limiter(vsf.internalField().size(), vector::one); + + forAll(owner, facei) + { + label own = owner[facei]; + label nei = neighbour[facei]; + + // owner side + limitEdge + ( + limiter[own], + maxVsf[own], + minVsf[own], + (Cf[facei] - C[own]) & g[own] + ); + + // neighbour side + limitEdge + ( + limiter[nei], + maxVsf[nei], + minVsf[nei], + (Cf[facei] - C[nei]) & g[nei] + ); + } + + forAll(bsf, patchi) + { + const labelUList& pOwner = mesh.boundary()[patchi].edgeFaces(); + const vectorField& pCf = Cf.boundaryField()[patchi]; + + forAll(pOwner, pFacei) + { + label own = pOwner[pFacei]; + + limitEdge + ( + limiter[own], + maxVsf[own], + minVsf[own], + ((pCf[pFacei] - C[own]) & g[own]) + ); + } + } + + if (fa::debug) + { + Info<< "gradient limiter for: " << vsf.name() + << " max = " << gMax(limiter) + << " min = " << gMin(limiter) + << " average: " << gAverage(limiter) << endl; + } + + tensorField& gIf = g.primitiveFieldRef(); + + forAll(gIf, celli) + { + gIf[celli] = tensor + ( + cmptMultiply(limiter[celli], gIf[celli].x()), + cmptMultiply(limiter[celli], gIf[celli].y()), + cmptMultiply(limiter[celli], gIf[celli].z()) + ); + } + + g.correctBoundaryConditions(); + gaussGrad<vector>::correctBoundaryConditions(vsf, g); + + return tGrad; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianScheme.C b/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..770c0a7404859bc6bbcac968de9c8fbe368cc962 --- /dev/null +++ b/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianScheme.C @@ -0,0 +1,135 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus laplacian schemes. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" +#include "HashTable.H" +#include "linearEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class Type> +tmp<laplacianScheme<Type> > laplacianScheme<Type>::New +( + const faMesh& mesh, + Istream& schemeData +) +{ + if (fa::debug) + { + Info<< "laplacianScheme<Type>::New(const faMesh&, Istream&) : " + "constructing laplacianScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "laplacianScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Laplacian scheme not specified" << nl << nl + << "Valid laplacian schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_->find(schemeName); + + if (cstrIter == IstreamConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "laplacianScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Unknown laplacian scheme " << schemeName << nl << nl + << "Valid laplacian schemes are :" << endl + << IstreamConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return cstrIter()(mesh, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +laplacianScheme<Type>::~laplacianScheme() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +laplacianScheme<Type>::famLaplacian +( + const areaScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return famLaplacian(tinterpGammaScheme_().interpolate(gamma)(), vf); +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +laplacianScheme<Type>::facLaplacian +( + const areaScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + return facLaplacian(tinterpGammaScheme_().interpolate(gamma)(), vf); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianScheme.H b/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..de38c6d24f0fca9db6a87fa513570d93394b7839 --- /dev/null +++ b/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianScheme.H @@ -0,0 +1,247 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + faLaplacianScheme + +Description + Abstract base class for laplacian schemes. + +SourceFiles + faLaplacianScheme.C + faLaplacianSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faLaplacianScheme_H +#define faLaplacianScheme_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "linearEdgeInterpolation.H" +#include "correctedLnGrad.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +class faMatrix; + +class faMesh; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class laplacianScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class laplacianScheme +: + public refCount +{ + +protected: + + // Protected data + + const faMesh& mesh_; + tmp<edgeInterpolationScheme<scalar> > tinterpGammaScheme_; + tmp<lnGradScheme<Type> > tlnGradScheme_; + + + // Private Member Functions + + //- Disallow copy construct + laplacianScheme(const laplacianScheme&); + + //- Disallow default bitwise assignment + void operator=(const laplacianScheme&); + + +public: + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + laplacianScheme, + Istream, + (const faMesh& mesh, Istream& schemeData), + (mesh, schemeData) + ); + + + // Constructors + + //- Construct from mesh + laplacianScheme(const faMesh& mesh) + : + mesh_(mesh), + tinterpGammaScheme_(new linearEdgeInterpolation<scalar>(mesh)), + tlnGradScheme_(new correctedLnGrad<Type>(mesh)) + {} + + //- Construct from mesh and Istream + laplacianScheme(const faMesh& mesh, Istream& is) + : + mesh_(mesh), + tinterpGammaScheme_(NULL), + tlnGradScheme_(NULL) + { + if (is.eof()) + { + tinterpGammaScheme_ = tmp<edgeInterpolationScheme<scalar> > + ( + new linearEdgeInterpolation<scalar>(mesh) + ); + + tlnGradScheme_ = tmp<lnGradScheme<Type> > + ( + new correctedLnGrad<Type>(mesh) + ); + } + else + { + tinterpGammaScheme_ = tmp<edgeInterpolationScheme<scalar> > + ( + edgeInterpolationScheme<scalar>::New(mesh, is) + ); + + tlnGradScheme_ = tmp<lnGradScheme<Type> > + ( + lnGradScheme<Type>::New(mesh, is) + ); + } + } + + + // Selectors + + //- Return a pointer to a new laplacianScheme created on freestore + static tmp<laplacianScheme<Type> > New + ( + const faMesh& mesh, + Istream& schemeData + ); + + + // Destructor + + virtual ~laplacianScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + virtual tmp<faMatrix<Type> > famLaplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<faMatrix<Type> > famLaplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facLaplacian + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facLaplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ) = 0; + + virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facLaplacian + ( + const areaScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeFaLaplacianTypeScheme(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \ + \ + namespace Foam \ + { \ + namespace fa \ + { \ + laplacianScheme<Type>::addIstreamConstructorToTable<SS<Type> > \ + add##SS##Type##IstreamConstructorToTable_; \ + } \ + } + + +#define makeFaLaplacianScheme(SS) \ + \ +makeFaLaplacianTypeScheme(SS, scalar) \ +makeFaLaplacianTypeScheme(SS, vector) \ +makeFaLaplacianTypeScheme(SS, tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faLaplacianScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianSchemes.C b/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..6f1ac8d355b4d8731a53abb83c0e4410a084da9d --- /dev/null +++ b/src/finiteArea/finiteArea/laplacianSchemes/faLaplacianScheme/faLaplacianSchemes.C @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for finite area calculus laplacian schemes. + +\*---------------------------------------------------------------------------*/ + +#include "faLaplacianScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Define the constructor function hash tables + +defineTemplateRunTimeSelectionTable +( + laplacianScheme<scalar>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + laplacianScheme<vector>, + Istream +); + +defineTemplateRunTimeSelectionTable +( + laplacianScheme<tensor>, + Istream +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianScheme.C b/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..4ed91cf61fd75d43322fdf05e8fdc4d825aa8c6e --- /dev/null +++ b/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianScheme.C @@ -0,0 +1,161 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaLaplacianScheme.H" +#include "facDiv.H" +#include "faMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +tmp<faMatrix<Type> > +gaussLaplacianScheme<Type>::famLaplacian +( + const edgeScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<edgeScalarField> tdeltaCoeffs = this->tlnGradScheme_().deltaCoeffs(vf); + const edgeScalarField& deltaCoeffs = tdeltaCoeffs(); + + edgeScalarField gammaMagSf = gamma*this->mesh().magLe(); + + tmp<faMatrix<Type> > tfam + ( + new faMatrix<Type> + ( + vf, + deltaCoeffs.dimensions()*gammaMagSf.dimensions()*vf.dimensions() + ) + ); + faMatrix<Type>& fam = tfam.ref(); + + fam.upper() = deltaCoeffs.internalField()*gammaMagSf.internalField(); + fam.negSumDiag(); + + forAll(fam.psi().boundaryField(), patchI) + { + const faPatchField<Type>& psf = fam.psi().boundaryField()[patchI]; + const faePatchScalarField& patchGamma = + gammaMagSf.boundaryField()[patchI]; + + fam.internalCoeffs()[patchI] = patchGamma*psf.gradientInternalCoeffs(); + fam.boundaryCoeffs()[patchI] = + -patchGamma*psf.gradientBoundaryCoeffs(); + } + + if (this->tlnGradScheme_().corrected()) + { + if (this->mesh().schemesDict().fluxRequired(vf.name())) + { + fam.faceFluxCorrectionPtr() = new + GeometricField<Type, faePatchField, edgeMesh> + ( + gammaMagSf*this->tlnGradScheme_().correction(vf) + ); + + fam.source() -= + this->mesh().S()* + fac::div + ( + *fam.faceFluxCorrectionPtr() + )().internalField(); + } + else + { + fam.source() -= + this->mesh().S()* + fac::div + ( + gammaMagSf*this->tlnGradScheme_().correction(vf) + )().internalField(); + } + } + + return tfam; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +gaussLaplacianScheme<Type>::facLaplacian +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > tLaplacian + ( + fac::div(this->tlnGradScheme_().lnGrad(vf)*vf.mesh().magLe()) + ); + + tLaplacian.ref().rename("laplacian(" + vf.name() + ')'); + + return tLaplacian; +} + + +template<class Type> +tmp<GeometricField<Type, faPatchField, areaMesh> > +gaussLaplacianScheme<Type>::facLaplacian +( + const edgeScalarField& gamma, + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + tmp<GeometricField<Type, faPatchField, areaMesh> > tLaplacian + ( + fac::div(gamma*this->tlnGradScheme_().lnGrad(vf)*vf.mesh().magLe()) + ); + + tLaplacian.ref().rename + ( + "laplacian(" + gamma.name() + ',' + vf.name() + ')' + ); + + return tLaplacian; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianScheme.H b/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..f9519fb46666ff0739afbd62cfa0970fcf49e7a8 --- /dev/null +++ b/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianScheme.H @@ -0,0 +1,131 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + gaussFaLaplacianScheme + +Description + Basic second-order laplacian using face-gradients and Gauss' theorem. + +SourceFiles + gaussFaLaplacianScheme.C + gaussFaLaplacianSchemes.C + +\*---------------------------------------------------------------------------*/ + +#ifndef gaussFaLaplacianScheme_H +#define gaussFaLaplacianScheme_H + +#include "faLaplacianScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class gaussLaplacianScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class gaussLaplacianScheme +: + public fa::laplacianScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + gaussLaplacianScheme(const gaussLaplacianScheme&); + + //- Disallow default bitwise assignment + void operator=(const gaussLaplacianScheme&); + + +public: + + //- Runtime type information + TypeName("Gauss"); + + + // Constructors + + //- Construct null + gaussLaplacianScheme(const faMesh& mesh) + : + laplacianScheme<Type>(mesh) + {} + + //- Construct from Istream + gaussLaplacianScheme(const faMesh& mesh, Istream& is) + : + laplacianScheme<Type>(mesh, is) + {} + + + // Member Functions + + tmp<faMatrix<Type> > famLaplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facLaplacian + ( + const GeometricField<Type, faPatchField, areaMesh>& + ); + + tmp<GeometricField<Type, faPatchField, areaMesh> > facLaplacian + ( + const edgeScalarField&, + const GeometricField<Type, faPatchField, areaMesh>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "gaussFaLaplacianScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianSchemes.C b/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..64c4a7e9b3139e648b26fec444749f904f8a9669 --- /dev/null +++ b/src/finiteArea/finiteArea/laplacianSchemes/gaussFaLaplacianScheme/gaussFaLaplacianSchemes.C @@ -0,0 +1,37 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "gaussFaLaplacianScheme.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeFaLaplacianScheme(gaussLaplacianScheme) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrad.C b/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..b9343e064efa2265aa0f6e77f9c4521581b9d0a8 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrad.C @@ -0,0 +1,116 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Simple central-difference lnGrad scheme with non-orthogonal correction. + +\*---------------------------------------------------------------------------*/ + +#include "correctedLnGrad.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "linearEdgeInterpolation.H" +#include "gaussFaGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +correctedLnGrad<Type>::~correctedLnGrad() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +correctedLnGrad<Type>::correction +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + const faMesh& mesh = this->mesh(); + + // construct GeometricField<Type, faePatchField, edgeMesh> + tmp<GeometricField<Type, faePatchField, edgeMesh> > tssf + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + "lnGradCorr("+vf.name()+')', + vf.instance(), + vf.db() + ), + mesh, + vf.dimensions()*mesh.deltaCoeffs().dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& ssf = tssf.ref(); + + for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++) + { + ssf.replace + ( + cmpt, + mesh.correctionVectors() + & linearEdgeInterpolation + < + typename + outerProduct<vector, typename pTraits<Type>::cmptType>::type + >(mesh).interpolate + ( + gradScheme<typename pTraits<Type>::cmptType>::New + ( + mesh, + mesh.schemesDict().gradScheme(ssf.name()) + )() + .grad(vf.component(cmpt)) + ) + ); + } + + return tssf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrad.H b/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..c23390521b0006b16dc72e163aae455fbfe4994b --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrad.H @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + correctedLnGrad + +Description + Simple central-difference lnGrad scheme with non-orthogonal correction. + +SourceFiles + correctedLnGrad.C + +\*---------------------------------------------------------------------------*/ + +#ifndef correctedLnGrad_H +#define correctedLnGrad_H + +#include "lnGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class correctedLnGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class correctedLnGrad +: + public lnGradScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const correctedLnGrad&); + + +public: + + //- Runtime type information + TypeName("corrected"); + + + // Constructors + + //- Construct from mesh + correctedLnGrad(const faMesh& mesh) + : + lnGradScheme<Type>(mesh) + {} + + + //- Construct from mesh and data stream + correctedLnGrad(const faMesh& mesh, Istream&) + : + lnGradScheme<Type>(mesh) + {} + + + // Destructor + + virtual ~correctedLnGrad(); + + + // Member Functions + + //- Return the interpolation weighting factors for the given field + virtual tmp<edgeScalarField> deltaCoeffs + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const + { + return this->mesh().deltaCoeffs(); + } + + //- Return true if this scheme uses an explicit correction + virtual bool corrected() const + { + return !this->mesh().orthogonal(); + } + + //- Return the explicit correction to the correctedLnGrad + // for the given field + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + correction(const GeometricField<Type, faPatchField, areaMesh>&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "correctedLnGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrads.C b/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..d39914452fc6ab094b958b11ac8a04eaa409e872 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/correctedLnGrad/correctedLnGrads.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Simple central-difference lnGrad scheme with non-orthogonal correction. + +\*---------------------------------------------------------------------------*/ + +#include "correctedLnGrad.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeLnGradScheme(correctedLnGrad) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrad.C b/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..7b2c1c2588068695e6c183f582ad324b6b9cfdcc --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrad.C @@ -0,0 +1,133 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Fourth-order snGrad scheme with non-orthogonal correction. + +\*---------------------------------------------------------------------------*/ + +#include "fourthLnGrad.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "correctedLnGrad.H" +#include "linearEdgeInterpolation.H" +#include "gaussFaGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +fourthLnGrad<Type>::~fourthLnGrad() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +fourthLnGrad<Type>::correction +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + const faMesh& mesh = this->mesh(); + + tmp<GeometricField<Type, faePatchField, edgeMesh> > tcorr + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + "lnGradCorr("+vf.name()+')', + vf.instance(), + vf.db() + ), + mesh, + vf.dimensions()*this->mesh().deltaCoeffs().dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& corr = tcorr.ref(); + + edgeVectorField m = mesh.Le()/mesh.magLe(); + + for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++) + { + corr.replace + ( + cmpt, + - (1.0/15.0)*m + & linearEdgeInterpolation + < + typename + outerProduct<vector, typename pTraits<Type>::cmptType>::type + >(mesh).interpolate + ( + gaussGrad<typename pTraits<Type>::cmptType>(mesh) + .grad(vf.component(cmpt)) + ) + ); + } + + corr += (1.0/15.0)*correctedLnGrad<Type>(mesh).lnGrad(vf); + + +// tmp<GeometricField<Type, faePatchField, edgeMesh> > tcorr +// ( +// (1.0/15.0) +// *( +// correctedLnGrad<Type>(mesh).lnGrad(vf) +// - ( +// linearEdgeInterpolate(gaussGrad<Type>(mesh).grad(vf)) & mesh.Le() +// )/mesh.magLe() +// ) +// ); + + if (correctedLnGrad<Type>(mesh).corrected()) + { + tcorr.ref() += correctedLnGrad<Type>(mesh).correction(vf); + } + + return tcorr; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrad.H b/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..19ac7e6552fd6f942e69c949eb1e41ffc80925b4 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrad.H @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + fourthLnGrad + +Description + Fourth-order snGrad scheme with non-orthogonal correction. + +SourceFiles + fourthLnGrad.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fourthLnGrad_H +#define fourthLnGrad_H + +#include "lnGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class fourthLnGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class fourthLnGrad +: + public lnGradScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const fourthLnGrad&); + + +public: + + //- Runtime type information + TypeName("fourth"); + + + // Constructors + + //- Construct from mesh + fourthLnGrad(const faMesh& mesh) + : + lnGradScheme<Type>(mesh) + {} + + + //- Construct from mesh and data stream + fourthLnGrad(const faMesh& mesh, Istream&) + : + lnGradScheme<Type>(mesh) + {} + + + // Destructor + + virtual ~fourthLnGrad(); + + + // Member Functions + + //- Return the interpolation weighting factors for the given field + virtual tmp<edgeScalarField> deltaCoeffs + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const + { + return this->mesh().deltaCoeffs(); + } + + //- Return true if this scheme uses an explicit correction + virtual bool corrected() const + { + return true; + } + + //- Return the explicit correction to the fourthLnGrad + // for the given field + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + correction(const GeometricField<Type, faPatchField, areaMesh>&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "fourthLnGrad.C" +#else +# ifdef xlC +# pragma implementation("fourthLnGrad.C") +# endif +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrads.C b/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..48d48e8e45085209995c8ca5442eab44029ccec0 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/fourthLnGrad/fourthLnGrads.C @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Simple central-difference lnGrad scheme with non-orthogonal correction. + +\*---------------------------------------------------------------------------*/ + +#include "fourthLnGrad.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeLnGradScheme(fourthLnGrad) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrad.C b/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrad.C new file mode 100644 index 0000000000000000000000000000000000000000..95fd607eb5ef496966f5374888e7e29cb6bf3e97 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrad.C @@ -0,0 +1,106 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + lnGrad scheme with limited non-orthogonal correction. + + The limiter is controlled by a coefficient with a value between 0 and 1 + which when 0 switches the correction off and the scheme behaves as + uncorrectedLnGrad, when set to 1 the full correction is applied and the + scheme behaves as correctedLnGrad and when set to 0.5 the limiter is + calculated such that the non-orthogonal contribution does not exceed the + orthogonal part. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" +#include "limitedLnGrad.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "correctedLnGrad.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * *< * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +limitedLnGrad<Type>::~limitedLnGrad() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +limitedLnGrad<Type>::correction +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + GeometricField<Type, faePatchField, edgeMesh> corr = + correctedLnGrad<Type>(this->mesh()).correction(vf); + + edgeScalarField limiter + ( + min + ( + limitCoeff_ + *mag(lnGradScheme<Type>::lnGrad(vf, deltaCoeffs(vf), "orthSnGrad")) + /( + (1 - limitCoeff_)*mag(corr) + + dimensionedScalar("small", corr.dimensions(), SMALL) + ), + dimensionedScalar("one", dimless, 1.0) + ) + ); + + if (fa::debug) + { + Info<< "limitedLnGrad :: limiter min: " << min(limiter.internalField()) + << " max: "<< max(limiter.internalField()) + << " avg: " << average(limiter.internalField()) << endl; + } + + return limiter*corr; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrad.H b/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrad.H new file mode 100644 index 0000000000000000000000000000000000000000..d2c3636e03e7a753c641ed26dbaf20f189e65791 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrad.H @@ -0,0 +1,164 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::fa::limitedLnGrad + +Description + Central-difference lnGrad scheme with limited non-orthogonal correction. + + The limiter is controlled by a coefficient with a value between 0 and 1 + which when 0 switches the correction off and the scheme behaves as + uncorrectedSnGrad, when set to 1 the full correction is applied and the + scheme behaves as correctedSnGrad and when set to 0.5 the limiter is + calculated such that the non-orthogonal contribution does not exceed the + orthogonal part. + +Author + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + limitedLnGrad.C + +\*---------------------------------------------------------------------------*/ + +#ifndef limitedLnGrad_H +#define limitedLnGrad_H + +#include "lnGradScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class limitedLnGrad Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class limitedLnGrad +: + public lnGradScheme<Type> +{ + // Private data + + //- Limiter. 0 = no limiting, 1 = full limiting + scalar limitCoeff_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const limitedLnGrad&); + + +public: + + //- Runtime type information + TypeName("limited"); + + + // Constructors + + //- Construct from mesh + limitedLnGrad(const faMesh& mesh) + : + lnGradScheme<Type>(mesh) + {} + + + //- Construct from mesh and data stream + limitedLnGrad(const faMesh& mesh, Istream& is) + : + lnGradScheme<Type>(mesh), + limitCoeff_(readScalar(is)) + { + if (limitCoeff_ < 0 || limitCoeff_ > 1) + { + FatalIOErrorIn + ( + "limitedLnGrad(const faMesh& mesh, Istream& is) : ", + is + ) << "limitCoeff is specified as " << limitCoeff_ + << " but should be >= 0 && <= 1" + << exit(FatalIOError); + } + } + + + // Destructor + + virtual ~limitedLnGrad(); + + + // Member Functions + + //- Return the interpolation weighting factors for the given field + virtual tmp<edgeScalarField> deltaCoeffs + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const + { + return this->mesh().deltaCoeffs(); + } + + //- Return true if this scheme uses an explicit correction + virtual bool corrected() const + { + return !this->mesh().orthogonal(); + } + + //- Return the explicit correction to the limitedLnGrad + // for the given field + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + correction(const GeometricField<Type, faPatchField, areaMesh>&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "limitedLnGrad.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrads.C b/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrads.C new file mode 100644 index 0000000000000000000000000000000000000000..dbfa9b39a6e29c897de358ea3cfc5b25a18fd520 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/limitedLnGrad/limitedLnGrads.C @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Central-difference snGrad scheme with limited non-orthogonal correction. + The limiter is controlled by a coefficient with a value between 0 and 1 + which when zero switches the limiter off and the scheme behaves as + correctedSnGrad, and when set to 1 the limiter is calculated such that the + non-orthogonal contribution does not exceed the orthogonal part. + +\*---------------------------------------------------------------------------*/ + +#include "limitedLnGrad.H" +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeLnGradScheme(limitedLnGrad) + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..42162e8843e5da39d9767f51293c59d189e73de9 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.C @@ -0,0 +1,206 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for lnGrad schemes. + +\*---------------------------------------------------------------------------*/ + +#include "fa.H" +#include "lnGradScheme.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "HashTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +template<class Type> +tmp<lnGradScheme<Type> > lnGradScheme<Type>::New +( + const faMesh& mesh, + Istream& schemeData +) +{ + if (fa::debug) + { + Info<< "lnGradScheme<Type>::New(const faMesh&, Istream&)" + " : constructing lnGradScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "lnGradScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Discretisation scheme not specified" + << endl << endl + << "Valid schemes are :" << endl + << MeshConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename MeshConstructorTable::iterator constructorIter = + MeshConstructorTablePtr_->find(schemeName); + + if (constructorIter == MeshConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "lnGradScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Unknown discretisation scheme " + << schemeName << nl << nl + << "Valid schemes are :" << endl + << MeshConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return constructorIter()(mesh, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +lnGradScheme<Type>::~lnGradScheme() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +//- Return the face-lnGrad of the given cell field +// with the given weigting factors +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGradScheme<Type>::lnGrad +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const tmp<edgeScalarField>& tdeltaCoeffs, + const word& lnGradName +) +{ + const faMesh& mesh = vf.mesh(); + + // construct GeometricField<Type, faePatchField, edgeMesh> + tmp<GeometricField<Type, faePatchField, edgeMesh> > tssf + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + lnGradName + "("+vf.name()+')', + vf.instance(), + vf.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + vf.dimensions()*tdeltaCoeffs().dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& ssf = tssf.ref(); + + // set reference to difference factors array + const scalarField& deltaCoeffs = tdeltaCoeffs().internalField(); + + // owner/neighbour addressing + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + + forAll(owner, faceI) + { + ssf[faceI] = + deltaCoeffs[faceI]*(vf[neighbour[faceI]] - vf[owner[faceI]]); + } + + forAll(vf.boundaryField(), patchI) + { + ssf.boundaryFieldRef()[patchI] = vf.boundaryField()[patchI].snGrad(); + } + + return tssf; +} + + +//- Return the face-lnGrad of the given cell field +// with explicit correction +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGradScheme<Type>::lnGrad +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf + = lnGrad(vf, deltaCoeffs(vf)); + + if (corrected()) + { + tsf.ref() += correction(vf); + } + + return tsf; +} + + +//- Return the face-lnGrad of the given cell field +// with explicit correction +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +lnGradScheme<Type>::lnGrad +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) const +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tinterpVf + = lnGrad(tvf()); + tvf.clear(); + return tinterpVf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.H b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..a52da0265eb7a9920d4dfcaaf385bcdb6ef419c5 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradScheme.H @@ -0,0 +1,212 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + lnGradScheme + +Description + Abstract base class for lnGrad schemes. + +SourceFiles + lnGradScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef lnGradScheme_H +#define lnGradScheme_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class faMesh; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +/*---------------------------------------------------------------------------*\ + Class lnGradScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class lnGradScheme +: + public refCount +{ + // Private data + + //- Hold reference to mesh + const faMesh& mesh_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const lnGradScheme&); + + +public: + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + lnGradScheme, + Mesh, + (const faMesh& mesh, Istream& schemeData), + (mesh, schemeData) + ); + + + // Constructors + + //- Construct from mesh + lnGradScheme(const faMesh& mesh) + : + mesh_(mesh) + {} + + + // Selectors + + //- Return new tmp interpolation scheme + static tmp<lnGradScheme<Type> > New + ( + const faMesh& mesh, + Istream& schemeData + ); + + + // Destructor + + virtual ~lnGradScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + //- Return the lnGrad of the given cell field + // with the given weigting factors + static tmp<GeometricField<Type, faePatchField, edgeMesh> > + lnGrad + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const tmp<edgeScalarField>&, + const word& snGradName = "lnGrad" + ); + + //- Return the interpolation weighting factors for the given field + virtual tmp<edgeScalarField> deltaCoeffs + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const = 0; + + //- Return true if this scheme uses an explicit correction + virtual bool corrected() const + { + return false; + } + + //- Return the explicit correction to the lnGrad + // for the given field + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + correction(const GeometricField<Type, faPatchField, areaMesh>&) const + { + return tmp<GeometricField<Type, faePatchField, edgeMesh> >(NULL); + } + + //- Return the lnGrad of the given cell field + // with explicit correction + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + lnGrad(const GeometricField<Type, faPatchField, areaMesh>&) const; + + //- Return the lnGrad of the given tmp cell field + // with explicit correction + tmp<GeometricField<Type, faePatchField, edgeMesh> > + lnGrad + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeLnGradTypeScheme(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(Foam::fa::SS<Foam::Type>, 0); \ + \ + namespace Foam \ + { \ + namespace fa \ + { \ + lnGradScheme<Type>::addMeshConstructorToTable<SS<Type> > \ + add##SS##Type##MeshConstructorToTable_; \ + } \ + } + +#define makeLnGradScheme(SS) \ + \ +makeLnGradTypeScheme(SS, scalar) \ +makeLnGradTypeScheme(SS, vector) \ +makeLnGradTypeScheme(SS, tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "lnGradScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradSchemes.C b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..e7d79e2d84795d7b08bd83735307067e16c54356 --- /dev/null +++ b/src/finiteArea/finiteArea/lnGradSchemes/lnGradScheme/lnGradSchemes.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for lnGrad schemes. + +\*---------------------------------------------------------------------------*/ + +#include "lnGradScheme.H" +#include "HashTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fa +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Define the constructor function hash tables + +defineTemplateRunTimeSelectionTable(lnGradScheme<scalar>, Mesh); +defineTemplateRunTimeSelectionTable(lnGradScheme<vector>, Mesh); +defineTemplateRunTimeSelectionTable(lnGradScheme<tensor>, Mesh); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fa + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/include/createFaMesh.H b/src/finiteArea/include/createFaMesh.H new file mode 100644 index 0000000000000000000000000000000000000000..303a3ee1706f5d5317bf6bd4a19e2faa951c8c5c --- /dev/null +++ b/src/finiteArea/include/createFaMesh.H @@ -0,0 +1,2 @@ + + faMesh aMesh(mesh); diff --git a/src/finiteArea/include/faCFD.H b/src/finiteArea/include/faCFD.H new file mode 100644 index 0000000000000000000000000000000000000000..4343da9f6bb7f49e995436540c34d29b64991e24 --- /dev/null +++ b/src/finiteArea/include/faCFD.H @@ -0,0 +1,24 @@ +#ifndef faCFD_H +#define faCFD_H + +#include "parRun.H" + +#include "Time.H" +#include "faMesh.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "faMatrices.H" +#include "fam.H" +#include "fac.H" +#include "volSurfaceMapping.H" + +#include "OSspecific.H" +#include "argList.H" +#include "timeSelector.H" + +#ifndef namespaceFoam +#define namespaceFoam + using namespace Foam; +#endif + +#endif diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolate.C b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolate.C new file mode 100644 index 0000000000000000000000000000000000000000..d6eec71b4739696b02979d359abf91301b3434a5 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolate.C @@ -0,0 +1,328 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "edgeInterpolate.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fac +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Return weighting factors for scheme given by name in dictionary +template<class Type> +tmp<edgeInterpolationScheme<Type> > scheme +( + const edgeScalarField& faceFlux, + Istream& streamData +) +{ + return edgeInterpolationScheme<Type>::New + ( + faceFlux.mesh(), + faceFlux, + streamData + ); +} + + +// Return weighting factors for scheme given by name in dictionary +template<class Type> +tmp<edgeInterpolationScheme<Type> > scheme +( + const edgeScalarField& faceFlux, + const word& name +) +{ + return edgeInterpolationScheme<Type>::New + ( + faceFlux.mesh(), + faceFlux, + faceFlux.mesh().schemesDict().interpolationScheme(name) + ); +} + + +// Return weighting factors for scheme given by name in dictionary +template<class Type> +tmp<edgeInterpolationScheme<Type> > scheme +( + const faMesh& mesh, + Istream& streamData +) +{ + return edgeInterpolationScheme<Type>::New + ( + mesh, + streamData + ); +} + + +// Return weighting factors for scheme given by name in dictionary +template<class Type> +tmp<edgeInterpolationScheme<Type> > scheme +( + const faMesh& mesh, + const word& name +) +{ + return edgeInterpolationScheme<Type>::New + ( + mesh, + mesh.schemesDict().interpolationScheme(name) + ); +} + + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const edgeScalarField& faceFlux, + Istream& schemeData +) +{ +# ifdef DEBUGInterpolations + if (edgeInterpolation::debug) + { + Info<< "interpolate" + << "(const GeometricField<Type, faPatchField, areaMesh>&, " + << "const edgeScalarField&, Istream&) : " + << "interpolating GeometricField<Type, faPatchField, areaMesh> " + << endl; + } +# endif + + return scheme<Type>(faceFlux, schemeData)().interpolate(vf); +} + + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const edgeScalarField& faceFlux, + const word& name +) +{ +# ifdef DEBUGInterpolations + if (edgeInterpolation::debug) + { + Info<< "interpolate" + << "(const GeometricField<Type, faPatchField, areaMesh>&, " + << "const edgeScalarField&, const word&) : " + << "interpolating GeometricField<Type, faPatchField, areaMesh> " + << "using " << name + << endl; + } +# endif + + return scheme<Type>(faceFlux, name)().interpolate(vf); +} + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const edgeScalarField& faceFlux, + const word& name +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf = + interpolate(tvf(), faceFlux, name); + + tvf.clear(); + + return tsf; +} + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const tmp<edgeScalarField>& tFaceFlux, + const word& name +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf = + interpolate(vf, tFaceFlux(), name); + + tFaceFlux.clear(); + + return tsf; +} + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const tmp<edgeScalarField>& tFaceFlux, + const word& name +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf = + interpolate(tvf(), tFaceFlux(), name); + + tvf.clear(); + tFaceFlux.clear(); + + return tsf; +} + + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + Istream& schemeData +) +{ +# ifdef DEBUGInterpolations + if (edgeInterpolation::debug) + { + Info<< "interpolate" + << "(const GeometricField<Type, faPatchField, areaMesh>&, " + << "Istream&) : " + << "interpolating GeometricField<Type, faPatchField, areaMesh> " + << endl; + } +# endif + + return scheme<Type>(vf.mesh(), schemeData)().interpolate(vf); +} + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const word& name +) +{ +# ifdef DEBUGInterpolations + if (edgeInterpolation::debug) + { + Info<< "interpolate" + << "(const GeometricField<Type, faPatchField, areaMesh>&, " + << "const word&) : " + << "interpolating GeometricField<Type, faPatchField, areaMesh> " + << "using " << name + << endl; + } +# endif + + return scheme<Type>(vf.mesh(), name)().interpolate(vf); +} + +// Interpolate field onto faces using scheme given by name in dictionary +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf = + interpolate(tvf(), name); + + tvf.clear(); + + return tsf; +} + + +// Interpolate field onto faces using central differencing +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) +{ + +# ifdef DEBUGInterpolations + if (edgeInterpolation::debug) + { + Info<< "interpolate" + << "(const GeometricField<Type, faPatchField, areaMesh>&) : " + << "interpolating GeometricField<Type, faPatchField, areaMesh> " + << "using run-time selected scheme" + << endl; + } +# endif + + return interpolate(vf, "interpolate(" + vf.name() + ')'); +} + + +// Interpolate field onto faces using central differencing +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +interpolate +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf = + interpolate(tvf()); + tvf.clear(); + return tsf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fac + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolate.H b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolate.H new file mode 100644 index 0000000000000000000000000000000000000000..7cf993d3498f9285860f132cb7019aa32ede9ac2 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolate.H @@ -0,0 +1,190 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Namespace + fac + +Description + +SourceFiles + edgeInterpolate.C + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeInterpolate_H +#define edgeInterpolate_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "edgeInterpolationScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Namespace fa functions Declaration +\*---------------------------------------------------------------------------*/ + +namespace fac +{ + //- Return weighting factors for scheme given from Istream + template<class Type> + static tmp<edgeInterpolationScheme<Type> > scheme + ( + const edgeScalarField& faceFlux, + Istream& schemeData + ); + + //- Return weighting factors for scheme given by name in dictionary + template<class Type> + static tmp<edgeInterpolationScheme<Type> > scheme + ( + const edgeScalarField& faceFlux, + const word& name + ); + + + //- Return weighting factors for scheme given from Istream + template<class Type> + static tmp<edgeInterpolationScheme<Type> > scheme + ( + const faMesh& mesh, + Istream& schemeData + ); + + //- Return weighting factors for scheme given by name in dictionary + template<class Type> + static tmp<edgeInterpolationScheme<Type> > scheme + ( + const faMesh& mesh, + const word& name + ); + + + //- Interpolate field onto faces using scheme given by Istream + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& tvf, + const edgeScalarField& faceFlux, + Istream& schemeData + ); + + //- Interpolate field onto faces using scheme given by name in faSchemes + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& tvf, + const edgeScalarField& faceFlux, + const word& name + ); + + //- Interpolate field onto faces using scheme given by name in faSchemes + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const edgeScalarField& faceFlux, + const word& name + ); + + //- Interpolate field onto faces using scheme given by name in faSchemes + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& tvf, + const tmp<edgeScalarField>& faceFlux, + const word& name + ); + + //- Interpolate field onto faces using scheme given by name in faSchemes + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const tmp<edgeScalarField>& faceFlux, + const word& name + ); + + + //- Interpolate field onto faces using scheme given by Istream + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& tvf, + Istream& schemeData + ); + + //- Interpolate field onto faces using scheme given by name in faSchemes + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& tvf, + const word& name + ); + + //- Interpolate field onto faces using scheme given by name in faSchemes + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf, + const word& name + ); + + + //- Interpolate tmp field onto faces using central differencing + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf + ); + + //- Interpolate field onto faces using central differencing + template<class Type> + static tmp<GeometricField<Type, faePatchField, edgeMesh> > interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& tvf + ); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "edgeInterpolate.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C new file mode 100644 index 0000000000000000000000000000000000000000..f39499b452e83be850a545e91c09317205471237 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C @@ -0,0 +1,758 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Face to edge interpolation scheme. Included in faMesh. + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "demandDrivenData.H" +#include "faPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(edgeInterpolation, 0); + + +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void edgeInterpolation::clearOut() +{ + deleteDemandDrivenData(lPN_); + deleteDemandDrivenData(weightingFactors_); + deleteDemandDrivenData(differenceFactors_); + deleteDemandDrivenData(correctionVectors_); + deleteDemandDrivenData(skewCorrectionVectors_); +// deleteDemandDrivenData(leastSquarePvectors_); +// deleteDemandDrivenData(leastSquareNvectors_); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +edgeInterpolation::edgeInterpolation(const faMesh& fam) +: + faMesh_(fam), + schemesDict_(fam()), + solutionDict_(fam()), + lPN_(NULL), + weightingFactors_(NULL), + differenceFactors_(NULL), + orthogonal_(false), + correctionVectors_(NULL), + skew_(true), + skewCorrectionVectors_(NULL) +// leastSquarePvectors_(NULL), +// leastSquareNvectors_(NULL) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +edgeInterpolation::~edgeInterpolation() +{ + clearOut(); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const edgeScalarField& edgeInterpolation::lPN() const +{ + if (!lPN_) + { + makeLPN(); + } + + return (*lPN_); +} + + +const edgeScalarField& edgeInterpolation::weights() const +{ + if (!weightingFactors_) + { + makeWeights(); + } + + return (*weightingFactors_); +} + + +const edgeScalarField& edgeInterpolation::deltaCoeffs() const +{ + if (!differenceFactors_) + { + makeDeltaCoeffs(); + } + + return (*differenceFactors_); +} + + +bool edgeInterpolation::orthogonal() const +{ + if (orthogonal_ == false && !correctionVectors_) + { + makeCorrectionVectors(); + } + + return orthogonal_; +} + + +const edgeVectorField& edgeInterpolation::correctionVectors() const +{ + if (orthogonal()) + { + FatalErrorIn("edgeInterpolation::correctionVectors()") + << "cannot return correctionVectors; mesh is orthogonal" + << abort(FatalError); + } + + return (*correctionVectors_); +} + + +bool edgeInterpolation::skew() const +{ + if (skew_ == true && !skewCorrectionVectors_) + { + makeSkewCorrectionVectors(); + } + + return skew_; +} + + +const edgeVectorField& edgeInterpolation::skewCorrectionVectors() const +{ + if (!skew()) + { + FatalErrorIn("edgeInterpolation::skewCorrectionVectors()") + << "cannot return skewCorrectionVectors; mesh is now skewed" + << abort(FatalError); + } + + return (*skewCorrectionVectors_); +} + + +// const edgeVectorField& edgeInterpolation::leastSquarePvectors() const +// { +// if (!leastSquarePvectors_) +// { +// makeLeastSquareVectors(); +// } + +// return (*leastSquarePvectors_); +// } + + +// const edgeVectorField& edgeInterpolation::leastSquareNvectors() const +// { +// if (!leastSquareNvectors_) +// { +// makeLeastSquareVectors(); +// } + +// return (*leastSquareNvectors_); +// } + + +// Do what is neccessary if the mesh has moved +bool edgeInterpolation::movePoints() const +{ + deleteDemandDrivenData(lPN_); + deleteDemandDrivenData(weightingFactors_); + deleteDemandDrivenData(differenceFactors_); + + orthogonal_ = false; + deleteDemandDrivenData(correctionVectors_); + + skew_ = true; + deleteDemandDrivenData(skewCorrectionVectors_); + +// deleteDemandDrivenData(leastSquarePvectors_); +// deleteDemandDrivenData(leastSquareNvectors_); + + return true; +} + + +void edgeInterpolation::makeLPN() const +{ + if (debug) + { + Info<< "edgeInterpolation::makeLPN() : " + << "Constructing geodesic distance between points P and N" + << endl; + } + + + lPN_ = new edgeScalarField + ( + IOobject + ( + "lPN", + faMesh_.time().constant(), + faMesh_.db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimLength + ); + edgeScalarField& lPN = *lPN_; + + // Set local references to mesh data + const edgeVectorField& edgeCentres = mesh().edgeCentres(); + const areaVectorField& faceCentres = mesh().areaCentres(); + const labelUList& owner = mesh().owner(); + const labelUList& neighbour = mesh().neighbour(); + + scalarField& lPNIn = lPN.primitiveFieldRef(); + + forAll(owner, edgeI) + { + vector curSkewCorrVec = vector::zero; + + if (skew()) + { + curSkewCorrVec = skewCorrectionVectors()[edgeI]; + } + + scalar lPE = + mag + ( + edgeCentres[edgeI] + - curSkewCorrVec + - faceCentres[owner[edgeI]] + ); + + scalar lEN = + mag + ( + faceCentres[neighbour[edgeI]] + - edgeCentres[edgeI] + + curSkewCorrVec + ); + + lPNIn[edgeI] = (lPE + lEN); + } + + + forAll(lPN.boundaryField(), patchI) + { + mesh().boundary()[patchI].makeDeltaCoeffs + ( + lPN.boundaryFieldRef()[patchI] + ); + + lPN.boundaryFieldRef()[patchI] = 1.0/lPN.boundaryField()[patchI]; + } + + + if (debug) + { + Info<< "edgeInterpolation::makeLPN() : " + << "Finished constructing geodesic distance PN" + << endl; + } +} + + +void edgeInterpolation::makeWeights() const +{ + if (debug) + { + Info<< "edgeInterpolation::makeWeights() : " + << "Constructing weighting factors for edge interpolation" + << endl; + } + + + weightingFactors_ = new edgeScalarField + ( + IOobject + ( + "weightingFactors", + mesh()().pointsInstance(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimless + ); + edgeScalarField& weightingFactors = *weightingFactors_; + + + // Set local references to mesh data + const edgeVectorField& edgeCentres = mesh().edgeCentres(); + const areaVectorField& faceCentres = mesh().areaCentres(); + const labelUList& owner = mesh().owner(); + const labelUList& neighbour = mesh().neighbour(); + + + scalarField& weightingFactorsIn = weightingFactors.primitiveFieldRef(); + + forAll(owner, edgeI) + { + vector curSkewCorrVec = vector::zero; + + if (skew()) + { + curSkewCorrVec = skewCorrectionVectors()[edgeI]; + } + + scalar lPE = + mag + ( + edgeCentres[edgeI] + - curSkewCorrVec + - faceCentres[owner[edgeI]] + ); + + scalar lEN = + mag + ( + faceCentres[neighbour[edgeI]] + - edgeCentres[edgeI] + + curSkewCorrVec + ); + + weightingFactorsIn[edgeI] = + lEN + /( + lPE +# ifdef BAD_MESH_STABILISATION + + VSMALL +# endif + + lEN + ); + } + + forAll(mesh().boundary(), patchI) + { + mesh().boundary()[patchI].makeWeights + ( + weightingFactors.boundaryFieldRef()[patchI] + ); + } + + if (debug) + { + Info<< "edgeInterpolation::makeWeights() : " + << "Finished constructing weighting factors for face interpolation" + << endl; + } +} + + +void edgeInterpolation::makeDeltaCoeffs() const +{ + if (debug) + { + Info<< "edgeInterpolation::makeDeltaCoeffs() : " + << "Constructing differencing factors array for edge gradient" + << endl; + } + + // Force the construction of the weighting factors + // needed to make sure deltaCoeffs are calculated for parallel runs. + weights(); + + differenceFactors_ = new edgeScalarField + ( + IOobject + ( + "differenceFactors_", + mesh()().pointsInstance(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimless/dimLength + ); + edgeScalarField& DeltaCoeffs = *differenceFactors_; + scalarField& dc = DeltaCoeffs.primitiveFieldRef(); + + // Set local references to mesh data + const edgeVectorField& edgeCentres = mesh().edgeCentres(); + const areaVectorField& faceCentres = mesh().areaCentres(); + const labelUList& owner = mesh().owner(); + const labelUList& neighbour = mesh().neighbour(); + const edgeVectorField& lengths = mesh().Le(); + + const edgeList& edges = mesh().edges(); + const pointField& points = mesh().points(); + + + forAll(owner, edgeI) + { + // Edge normal - area normal + vector edgeNormal = lengths[edgeI]^edges[edgeI].vec(points); + edgeNormal /= mag(edgeNormal); + + + // Unit delta vector + vector unitDelta = + faceCentres[neighbour[edgeI]] + - faceCentres[owner[edgeI]]; + + unitDelta -= + edgeNormal*(edgeNormal&unitDelta); + + unitDelta /= mag(unitDelta); + + + // Calc PN arc length + vector curSkewCorrVec = vector::zero; + + if (skew()) + { + curSkewCorrVec = skewCorrectionVectors()[edgeI]; + } + + scalar lPE = + mag + ( + edgeCentres[edgeI] + - curSkewCorrVec + - faceCentres[owner[edgeI]] + ); + + scalar lEN = + mag + ( + faceCentres[neighbour[edgeI]] + - edgeCentres[edgeI] + + curSkewCorrVec + ); + + scalar lPN = lPE + lEN; + + + // Edge normal - area tangent + edgeNormal = lengths[edgeI]/mag(lengths[edgeI]); + + // Delta coefficient as per definition +// dc[edgeI] = 1.0/(lPN*(unitDelta & edgeNormal)); + + // Stabilised form for bad meshes. HJ, 23/Jul/2009 + dc[edgeI] = 1.0/max((lPN*(unitDelta & edgeNormal)), 0.05*lPN); + } + + + forAll(DeltaCoeffs.boundaryField(), patchI) + { + mesh().boundary()[patchI].makeDeltaCoeffs + ( + DeltaCoeffs.boundaryFieldRef()[patchI] + ); + } +} + + +void edgeInterpolation::makeCorrectionVectors() const +{ + if (debug) + { + Info<< "edgeInterpolation::makeCorrectionVectors() : " + << "Constructing non-orthogonal correction vectors" + << endl; + } + + correctionVectors_ = new edgeVectorField + ( + IOobject + ( + "correctionVectors", + mesh()().pointsInstance(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimless + ); + edgeVectorField& CorrVecs = *correctionVectors_; + + // Set local references to mesh data + const areaVectorField& faceCentres = mesh().areaCentres(); + + const labelUList& owner = mesh().owner(); + const labelUList& neighbour = mesh().neighbour(); + + const edgeVectorField& lengths = mesh().Le(); + const edgeScalarField& magLengths = mesh().magLe(); + + const edgeList& edges = mesh().edges(); + const pointField& points = mesh().points(); + + scalarField deltaCoeffs(owner.size()); + + vectorField& CorrVecsIn = CorrVecs.primitiveFieldRef(); + + forAll(owner, edgeI) + { + // Edge normal - area normal + vector edgeNormal = lengths[edgeI] ^ edges[edgeI].vec(points); + edgeNormal /= mag(edgeNormal); + + // Unit delta vector + vector unitDelta = + faceCentres[neighbour[edgeI]] + - faceCentres[owner[edgeI]]; + + unitDelta -= edgeNormal*(edgeNormal & unitDelta); + + unitDelta /= mag(unitDelta); + + // Edge normal - area tangent + edgeNormal = lengths[edgeI]/magLengths[edgeI]; + + // Delta coeffs + deltaCoeffs[edgeI] = 1.0/(unitDelta & edgeNormal); + + // Edge correction vector + CorrVecsIn[edgeI] = + edgeNormal + - deltaCoeffs[edgeI]*unitDelta; + } + + forAll(CorrVecs.boundaryField(), patchI) + { + faePatchVectorField& patchCorrVecs = + CorrVecs.boundaryFieldRef()[patchI]; + + patchCorrVecs = vector::zero; + } + + scalar NonOrthogCoeff = 0.0; + + if (owner.size() > 0) + { + scalarField sinAlpha = deltaCoeffs*mag(CorrVecs.internalField()); + + forAll(sinAlpha, edgeI) + { + sinAlpha[edgeI] = max(-1, min(sinAlpha[edgeI], 1)); + } + + NonOrthogCoeff = max(Foam::asin(sinAlpha)*180.0/M_PI); + } + + // ZT, 12/Nov/2010 + reduce(NonOrthogCoeff, maxOp<scalar>()); + + if (debug) + { + Info<< "edgeInterpolation::makeCorrectionVectors() : " + << "non-orthogonality coefficient = " << NonOrthogCoeff << " deg." + << endl; + } + + if (NonOrthogCoeff < 0.1) + { + orthogonal_ = true; + deleteDemandDrivenData(correctionVectors_); + } + else + { + orthogonal_ = false; + } + + if (debug) + { + Info<< "edgeInterpolation::makeCorrectionVectors() : " + << "Finished constructing non-orthogonal correction vectors" + << endl; + } +} + + +void edgeInterpolation::makeSkewCorrectionVectors() const +{ + if (debug) + { + Info<< "edgeInterpolation::makeSkewCorrectionVectors() : " + << "Constructing skew correction vectors" + << endl; + } + + skewCorrectionVectors_ = new edgeVectorField + ( + IOobject + ( + "skewCorrectionVectors", + mesh()().pointsInstance(), + mesh()(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimless + ); + edgeVectorField& SkewCorrVecs = *skewCorrectionVectors_; + + // Set local references to mesh data + const areaVectorField& C = mesh().areaCentres(); + const edgeVectorField& Ce = mesh().edgeCentres(); + + const labelUList& owner = mesh().owner(); + const labelUList& neighbour = mesh().neighbour(); + + const pointField& points = mesh().points(); + const edgeList& edges = mesh().edges(); + + + forAll(neighbour, edgeI) + { + vector P = C[owner[edgeI]]; + vector N = C[neighbour[edgeI]]; + vector S = points[edges[edgeI].start()]; + vector e = edges[edgeI].vec(points); + + scalar alpha = - ( ( (N - P)^(S - P) )&( (N - P)^e ) )/ + ( ( (N - P)^e )&( (N - P)^e ) ); + + vector E = S + alpha*e; + + SkewCorrVecs[edgeI] = Ce[edgeI] - E; + } + + + forAll(SkewCorrVecs.boundaryField(), patchI) + { + faePatchVectorField& patchSkewCorrVecs = + SkewCorrVecs.boundaryFieldRef()[patchI]; + + if (patchSkewCorrVecs.coupled()) + { + const labelUList& edgeFaces = + mesh().boundary()[patchI].edgeFaces(); + + const edgeList::subList patchEdges = + mesh().boundary()[patchI].patchSlice(edges); + + vectorField ngbC = + C.boundaryField()[patchI].patchNeighbourField(); + + forAll (patchSkewCorrVecs, edgeI) + { + vector P = C[edgeFaces[edgeI]]; + vector N = ngbC[edgeI]; + vector S = points[patchEdges[edgeI].start()]; + vector e = patchEdges[edgeI].vec(points); + + scalar alpha = - ( ( (N - P)^(S - P) )&( (N - P)^e ) )/ + ( ( (N - P)^e )&( (N - P)^e ) ); + + vector E = S + alpha*e; + + patchSkewCorrVecs[edgeI] = + Ce.boundaryField()[patchI][edgeI] - E; + } + } + else + { + patchSkewCorrVecs = vector::zero; + } + } + + + scalar skewCoeff = 0.0; + + // Calculating PN arc length + scalarField lPN(owner.size()); + + forAll (owner, edgeI) + { + lPN[edgeI] = + mag + ( + Ce[edgeI] + - SkewCorrVecs[edgeI] + - C[owner[edgeI]] + ) + + mag + ( + C[neighbour[edgeI]] + - Ce[edgeI] + + SkewCorrVecs[edgeI] + ); + } + + if (lPN.size() > 0) + { + skewCoeff = max(mag(SkewCorrVecs.internalField())/mag(lPN)); + } + + if (debug) + { + Info<< "edgeInterpolation::makeSkewCorrectionVectors() : " + << "skew coefficient = " << skewCoeff << endl; + } + + if (skewCoeff < 0.1) + { + skew_ = false; + deleteDemandDrivenData(skewCorrectionVectors_); + } + else + { + skew_ = true; + } + + if (debug) + { + Info<< "edgeInterpolation::makeSkewCorrectionVectors() : " + << "Finished constructing skew correction vectors" + << endl; + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.H b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.H new file mode 100644 index 0000000000000000000000000000000000000000..4ccfbd7f5408eb1b967c0eaaf27297f0c67d1fad --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.H @@ -0,0 +1,215 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + edgeInterpolation + +Description + Cell to edge interpolation scheme. Included in faMesh. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + edgeInterpolation.C + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeInterpolation_H +#define edgeInterpolation_H + +#include "tmp.H" +#include "scalar.H" +#include "faSchemes.H" +#include "faSolution.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "className.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class polyMesh; + +/*---------------------------------------------------------------------------*\ + Class edgeInterpolation Declaration +\*---------------------------------------------------------------------------*/ + +class edgeInterpolation +{ + // Private data + + // Reference to faMesh + const faMesh& faMesh_; + + //- Discretisation schemes + faSchemes schemesDict_; + + //- Solver settings + faSolution solutionDict_; + + + // Demand-driven data + + //- Geodesic distance between centroides of neighbour finite areas + mutable edgeScalarField* lPN_; + + //- Cenral-differencing weighting factors + mutable edgeScalarField* weightingFactors_; + + //- Face-gradient difference factors + mutable edgeScalarField* differenceFactors_; + + //- Is mesh orthogonal + mutable bool orthogonal_; + + //- Non-orthogonality correction vectors + mutable edgeVectorField* correctionVectors_; + + //- Is mesh skew + mutable bool skew_; + + //- Skew correction vectors + mutable edgeVectorField* skewCorrectionVectors_; + + + // Private member functions + + //- Construct geodesic distance between P and N + void makeLPN() const; + + //- Construct central-differencing weighting factors + void makeWeights() const; + + //- Construct face-gradient difference factors + void makeDeltaCoeffs() const; + + //- Construct non-orthogonality correction vectors + void makeCorrectionVectors() const; + + //- Construct skewness correction vectors + void makeSkewCorrectionVectors() const; + +// //- Construct Least-squares gradient vectors +// void makeLeastSquareVectors() const; + + +protected: + + // Protected member functions + + // Storage management + + //- Clear all geometry and addressing + void clearOut(); + + +public: + + // Declare name of the class and it's debug switch + ClassName("edgeInterpolation"); + + + // Constructors + + //- Construct given an faMesh + explicit edgeInterpolation(const faMesh&); + + + //- Destructor + ~edgeInterpolation(); + + + // Member functions + + //- Return mesh reference + const faMesh& mesh() const + { + return faMesh_; + } + + //- Return schemes + const faSchemes& schemesDict() const + { + return schemesDict_; + } + + //- Return access to schemes + faSchemes& schemesDict() + { + return schemesDict_; + } + + //- Return solver settings + const faSolution& solutionDict() const + { + return solutionDict_; + } + + //- Return access to solver settings + faSolution& solutionDict() + { + return solutionDict_; + } + + //- Return reference to PN geodesic distance + const edgeScalarField& lPN() const; + + //- Return reference to weighting factors array + const edgeScalarField& weights() const; + + //- Return reference to difference factors array + const edgeScalarField& deltaCoeffs() const; + + //- Return whether mesh is orthogonal or not + bool orthogonal() const; + + //- Return reference to non-orthogonality correction vectors array + const edgeVectorField& correctionVectors() const; + + //- Return whether mesh is skew or not + bool skew() const; + + //- Return reference to skew vectors array + const edgeVectorField& skewCorrectionVectors() const; + + + //- Do what is neccessary if the mesh has moved + bool movePoints() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C new file mode 100644 index 0000000000000000000000000000000000000000..dbbdd6c1b1a06ead8d0c96af8545f0288cb926a5 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.C @@ -0,0 +1,559 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Abstract base class for edge interpolation schemes. + +\*---------------------------------------------------------------------------*/ + +#include "edgeInterpolationScheme.H" +#include "areaFields.H" +#include "edgeFields.H" +#include "faPatchFields.H" +#include "coupledFaPatchField.H" +#include "transform.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // + +// Return weighting factors for scheme given by name in dictionary +template<class Type> +tmp<edgeInterpolationScheme<Type> > edgeInterpolationScheme<Type>::New +( + const faMesh& mesh, + Istream& schemeData +) +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::New(const faMesh&, Istream&)" + " : constructing edgeInterpolationScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "edgeInterpolationScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Discretisation scheme not specified" + << endl << endl + << "Valid schemes are :" << endl + << MeshConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename MeshConstructorTable::iterator constructorIter = + MeshConstructorTablePtr_->find(schemeName); + + if (constructorIter == MeshConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "edgeInterpolationScheme<Type>::New(const faMesh&, Istream&)", + schemeData + ) << "Unknown discretisation scheme " + << schemeName << nl << nl + << "Valid schemes are :" << endl + << MeshConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return constructorIter()(mesh, schemeData); +} + + +// Return weighting factors for scheme given by name in dictionary +template<class Type> +tmp<edgeInterpolationScheme<Type> > edgeInterpolationScheme<Type>::New +( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& schemeData +) +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::New" + "(const faMesh&, const edgeScalarField&, Istream&) : " + "constructing edgeInterpolationScheme<Type>" + << endl; + } + + if (schemeData.eof()) + { + FatalIOErrorIn + ( + "edgeInterpolationScheme<Type>::New" + "(const faMesh&, const edgeScalarField&, Istream&)", + schemeData + ) << "Discretisation scheme not specified" + << endl << endl + << "Valid schemes are :" << endl + << MeshConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + const word schemeName(schemeData); + + typename MeshFluxConstructorTable::iterator constructorIter = + MeshFluxConstructorTablePtr_->find(schemeName); + + if (constructorIter == MeshFluxConstructorTablePtr_->end()) + { + FatalIOErrorIn + ( + "edgeInterpolationScheme<Type>::New" + "(const faMesh&, const edgeScalarField&, Istream&)", + schemeData + ) << "Unknown discretisation scheme " + << schemeName << nl << nl + << "Valid schemes are :" << endl + << MeshFluxConstructorTablePtr_->sortedToc() + << exit(FatalIOError); + } + + return constructorIter()(mesh, faceFlux, schemeData); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +edgeInterpolationScheme<Type>::~edgeInterpolationScheme() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +//- Return the face-interpolate of the given cell field +// with the given owner and neighbour weighting factors +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +edgeInterpolationScheme<Type>::interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const tmp<edgeScalarField>& tlambdas, + const tmp<edgeScalarField>& tys +) +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::uncorrectedInterpolate" + "(const GeometricField<Type, faPatchField, areaMesh>&, " + "const tmp<edgeScalarField>&, " + "const tmp<edgeScalarField>&) : " + "interpolating " + << vf.type() << " " + << vf.name() + << " from areas to edges " + "without explicit correction" + << endl; + } + + const edgeScalarField& lambdas = tlambdas(); + const edgeScalarField& ys = tys(); + + const Field<Type>& vfi = vf.internalField(); + const scalarField& lambda = lambdas.internalField(); + const scalarField& y = ys.internalField(); + + const faMesh& mesh = vf.mesh(); + const labelUList& P = mesh.owner(); + const labelUList& N = mesh.neighbour(); + + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + "interpolate("+vf.name()+')', + vf.instance(), + vf.db() + ), + mesh, + vf.dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref(); + + Field<Type>& sfi = sf.primitiveFieldRef(); + + for (register label fi=0; fi<P.size(); fi++) + { + // ZT, 22/Apr/2003 + const tensorField& curT = mesh.edgeTransformTensors()[fi]; + + const tensor& Te = curT[0]; + const tensor& TP = curT[1]; + const tensor& TN = curT[2]; + + sfi[fi] = + transform + ( + Te.T(), + lambda[fi]*transform(TP, vfi[P[fi]]) + + y[fi]*transform(TN, vfi[N[fi]]) + ); + } + + + // Interpolate across coupled patches using given lambdas and ys + + forAll (lambdas.boundaryField(), pi) + { + const faePatchScalarField& pLambda = lambdas.boundaryField()[pi]; + const faePatchScalarField& pY = ys.boundaryField()[pi]; + + if (vf.boundaryField()[pi].coupled()) + { + label size = vf.boundaryField()[pi].patch().size(); + label start = vf.boundaryField()[pi].patch().start(); + + Field<Type> pOwnVf = vf.boundaryField()[pi].patchInternalField(); + Field<Type> pNgbVf = vf.boundaryField()[pi].patchNeighbourField(); + + Field<Type>& pSf = sf.boundaryFieldRef()[pi]; + + for (label i=0; i<size; i++) + { + const tensorField& curT = + mesh.edgeTransformTensors()[start + i]; + + const tensor& Te = curT[0]; + const tensor& TP = curT[1]; + const tensor& TN = curT[2]; + + pSf[i] = + transform + ( + Te.T(), + pLambda[i]*transform(TP, pOwnVf[i]) + + pY[i]*transform(TN, pNgbVf[i]) + ); + } + +// sf.boundaryFieldRef()[pi] = +// pLambda*vf.boundaryField()[pi].patchInternalField() +// + pY*vf.boundaryField()[pi].patchNeighbourField(); + } + else + { + sf.boundaryFieldRef()[pi] = vf.boundaryField()[pi]; + } + } + + tlambdas.clear(); + tys.clear(); + + return tsf; +} + + +//- Return the face-interpolate of the given cell field +// with the given weigting factors +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +edgeInterpolationScheme<Type>::interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const tmp<edgeScalarField>& tlambdas +) +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::interpolate" + "(const GeometricField<Type, faPatchField, areaMesh>&, " + "const tmp<edgeScalarField>&) : " + "interpolating " + << vf.type() << " " + << vf.name() + << " from area to edges " + "without explicit correction" + << endl; + } + + const edgeScalarField& lambdas = tlambdas(); + + const Field<Type>& vfi = vf.internalField(); + const scalarField& lambda = lambdas.internalField(); + + const faMesh& mesh = vf.mesh(); + const labelUList& P = mesh.owner(); + const labelUList& N = mesh.neighbour(); + + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + "interpolate("+vf.name()+')', + vf.instance(), + vf.db() + ), + mesh, + vf.dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref(); + + Field<Type>& sfi = sf.primitiveFieldRef(); + + for (register label eI = 0; eI < P.size(); eI++) + { + // ZT, 22/Apr/2003 + const tensorField& curT = mesh.edgeTransformTensors()[eI]; + + const tensor& Te = curT[0]; + const tensor& TP = curT[1]; + const tensor& TN = curT[2]; + + sfi[eI] = + transform + ( + Te.T(), + lambda[eI]*transform(TP, vfi[P[eI]]) + + (1 - lambda[eI])*transform(TN, vfi[N[eI]]) + ); + } + + + // Interpolate across coupled patches using given lambdas + + forAll (lambdas.boundaryField(), pi) + { + const faePatchScalarField& pLambda = lambdas.boundaryField()[pi]; + + if (vf.boundaryField()[pi].coupled()) + { + label size = vf.boundaryField()[pi].patch().size(); + label start = vf.boundaryField()[pi].patch().start(); + + Field<Type> pOwnVf = vf.boundaryField()[pi].patchInternalField(); + Field<Type> pNgbVf = vf.boundaryField()[pi].patchNeighbourField(); + + Field<Type>& pSf = sf.boundaryFieldRef()[pi]; + + for (label i=0; i<size; i++) + { + const tensorField& curT = + mesh.edgeTransformTensors()[start + i]; + + const tensor& Te = curT[0]; + const tensor& TP = curT[1]; + const tensor& TN = curT[2]; + + pSf[i] = + transform + ( + Te.T(), + pLambda[i]*transform(TP, pOwnVf[i]) + + (1 - pLambda[i])*transform(TN, pNgbVf[i]) + ); + } + +// tsf().boundaryFieldRef()[pi] = +// pLambda*vf.boundaryField()[pi].patchInternalField() +// + (1 - pLambda)*vf.boundaryField()[pi].patchNeighbourField(); + } + else + { + sf.boundaryFieldRef()[pi] = vf.boundaryField()[pi]; + } + } + + tlambdas.clear(); + + return tsf; +} + + +//- Return the euclidian edge-interpolate of the given area field +// with the given weigting factors +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +edgeInterpolationScheme<Type>::euclidianInterpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf, + const tmp<edgeScalarField>& tlambdas +) +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::euclidianInterpolate" + "(const GeometricField<Type, faPatchField, areaMesh>&, " + "const tmp<edgeScalarField>&) : " + << "interpolating " + << vf.type() << " " + << vf.name() + << " from area to edges " + "without explicit correction" + << endl; + } + + const edgeScalarField& lambdas = tlambdas(); + + const Field<Type>& vfi = vf.internalField(); + const scalarField& lambda = lambdas.internalField(); + + const faMesh& mesh = vf.mesh(); + const labelUList& P = mesh.owner(); + const labelUList& N = mesh.neighbour(); + + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf + ( + new GeometricField<Type, faePatchField, edgeMesh> + ( + IOobject + ( + "interpolate("+vf.name()+')', + vf.instance(), + vf.db() + ), + mesh, + vf.dimensions() + ) + ); + GeometricField<Type, faePatchField, edgeMesh>& sf = tsf.ref(); + + Field<Type>& sfi = sf.primitiveFieldRef(); + + for (register label eI = 0; eI < P.size(); eI++) + { + sfi[eI] = lambda[eI]*vfi[P[eI]] + (1 - lambda[eI])*vfi[N[eI]]; + } + + + // Interpolate across coupled patches using given lambdas + + forAll (lambdas.boundaryField(), pi) + { + const faePatchScalarField& pLambda = lambdas.boundaryField()[pi]; + + if (vf.boundaryField()[pi].coupled()) + { + tsf.ref().boundaryFieldRef()[pi] = + pLambda*vf.boundaryField()[pi].patchInternalField() + + (1.0 - pLambda)*vf.boundaryField()[pi].patchNeighbourField(); + } + else + { + sf.boundaryFieldRef()[pi] = vf.boundaryField()[pi]; + } + } + + tlambdas.clear(); + + return tsf; +} + + +//- Return the face-interpolate of the given cell field +// with explicit correction +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +edgeInterpolationScheme<Type>::interpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::interpolate" + "(const GeometricField<Type, faPatchField, areaMesh>&) : " + "interpolating " + << vf.type() << " " + << vf.name() + << " from areas to edges" + << endl; + } + + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf + = interpolate(vf, weights(vf)); + + if (corrected()) + { + tsf.ref() += correction(vf); + } + + return tsf; +} + +//- Return the euclidian edge-interpolate of the given area field +// without explicit correction +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +edgeInterpolationScheme<Type>::euclidianInterpolate +( + const GeometricField<Type, faPatchField, areaMesh>& vf +) const +{ + if (edgeInterpolation::debug) + { + Info<< "edgeInterpolationScheme<Type>::interpolate" + "(const GeometricField<Type, faPatchField, areaMesh>&) : " + << "interpolating " + << vf.type() << " " + << vf.name() + << " from area to edges " + << endl; + } + + tmp<GeometricField<Type, faePatchField, edgeMesh> > tsf + = euclidianInterpolate(vf, weights(vf)); + + return tsf; +} + +//- Return the face-interpolate of the given cell field +// with explicit correction +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +edgeInterpolationScheme<Type>::interpolate +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) const +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tinterpVf + = interpolate(tvf()); + tvf.clear(); + return tinterpVf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.H b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.H new file mode 100644 index 0000000000000000000000000000000000000000..36b1973c3838a84aa462b56771eb28ea773a46f0 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationScheme.H @@ -0,0 +1,253 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + edgeInterpolationScheme + +Description + Abstract base class for edge interpolation schemes. + +SourceFiles + edgeInterpolationScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef edgeInterpolationScheme_H +#define edgeInterpolationScheme_H + +#include "tmp.H" +#include "areaFieldsFwd.H" +#include "edgeFieldsFwd.H" +#include "typeInfo.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class faMesh; + +/*---------------------------------------------------------------------------*\ + Class edgeInterpolationScheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class edgeInterpolationScheme +: + public refCount +{ + // Private data + + //- Hold reference to mesh + const faMesh& mesh_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const edgeInterpolationScheme&); + + +public: + + // Declare run-time constructor selection tables + + declareRunTimeSelectionTable + ( + tmp, + edgeInterpolationScheme, + Mesh, + ( + const faMesh& mesh, + Istream& schemeData + ), + (mesh, schemeData) + ); + + declareRunTimeSelectionTable + ( + tmp, + edgeInterpolationScheme, + MeshFlux, + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& schemeData + ), + (mesh, faceFlux, schemeData) + ); + + + // Constructors + + //- Construct from mesh + edgeInterpolationScheme(const faMesh& mesh) + : + mesh_(mesh) + {} + + + // Selectors + + //- Return new tmp interpolation scheme + static tmp<edgeInterpolationScheme<Type> > New + ( + const faMesh& mesh, + Istream& schemeData + ); + + //- Return new tmp interpolation scheme + static tmp<edgeInterpolationScheme<Type> > New + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& schemeData + ); + + + // Destructor + + virtual ~edgeInterpolationScheme(); + + + // Member Functions + + //- Return mesh reference + const faMesh& mesh() const + { + return mesh_; + } + + + //- Return the face-interpolate of the given cell field + // with the given owner and neighbour weigting factors + static tmp<GeometricField<Type, faePatchField, edgeMesh> > + interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const tmp<edgeScalarField>&, + const tmp<edgeScalarField>& + ); + + //- Return the face-interpolate of the given cell field + // with the given weigting factors + static tmp<GeometricField<Type, faePatchField, edgeMesh> > + interpolate + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const tmp<edgeScalarField>& + ); + + + //- Return the euclidian edge-interpolate of the given area field + // with the given weigting factors + static tmp<GeometricField<Type, faePatchField, edgeMesh> > + euclidianInterpolate + ( + const GeometricField<Type, faPatchField, areaMesh>&, + const tmp<edgeScalarField>& + ); + + + //- Return the interpolation weighting factors for the given field + virtual tmp<edgeScalarField> weights + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const = 0; + + //- Return true if this scheme uses an explicit correction + virtual bool corrected() const + { + return false; + } + + //- Return the explicit correction to the face-interpolate + // for the given field + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + correction(const GeometricField<Type, faPatchField, areaMesh>&) const + { + return tmp<GeometricField<Type, faePatchField, edgeMesh> >(NULL); + } + + //- Return the face-interpolate of the given cell field + // with explicit correction + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + interpolate(const GeometricField<Type, faPatchField, areaMesh>&) const; + + //- Return the euclidian edge-interpolate of the given area field + // without explicit correction + virtual tmp<GeometricField<Type, faePatchField, edgeMesh> > + euclidianInterpolate + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const; + + //- Return the face-interpolate of the given tmp cell field + // with explicit correction + tmp<GeometricField<Type, faePatchField, edgeMesh> > + interpolate + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeEdgeInterpolationTypeScheme(SS, Type) \ + \ +defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \ + \ +edgeInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \ + add##SS##Type##MeshConstructorToTable_; \ + \ +edgeInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> > \ + add##SS##Type##MeshFluxConstructorToTable_; + +#define makeEdgeInterpolationScheme(SS) \ + \ +makeEdgeInterpolationTypeScheme(SS, scalar) \ +makeEdgeInterpolationTypeScheme(SS, vector) \ +makeEdgeInterpolationTypeScheme(SS, tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "edgeInterpolationScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationSchemes.C b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationSchemes.C new file mode 100644 index 0000000000000000000000000000000000000000..4f16fe7f9c3dc1561b4ad753a18c944378a4cf14 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolationScheme/edgeInterpolationSchemes.C @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + +\*---------------------------------------------------------------------------*/ + +#include "edgeInterpolationScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTemplateRunTimeSelectionTable(edgeInterpolationScheme<scalar>, Mesh); +defineTemplateRunTimeSelectionTable(edgeInterpolationScheme<vector>, Mesh); +defineTemplateRunTimeSelectionTable(edgeInterpolationScheme<tensor>, Mesh); + +defineTemplateRunTimeSelectionTable(edgeInterpolationScheme<scalar>, MeshFlux); +defineTemplateRunTimeSelectionTable(edgeInterpolationScheme<vector>, MeshFlux); +defineTemplateRunTimeSelectionTable(edgeInterpolationScheme<tensor>, MeshFlux); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/Gamma/Gamma.H b/src/finiteArea/interpolation/edgeInterpolation/schemes/Gamma/Gamma.H new file mode 100644 index 0000000000000000000000000000000000000000..c574a830a94a3ece9b36282a2ea633ee0ea0986c --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/Gamma/Gamma.H @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + Gamma + +Description + Class with operator() which returns the weighting factors for the + Gamma differencing scheme. Used in conjunction with the template class + NVDscheme. + +SourceFiles + GammaMake.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Gamma_H +#define Gamma_H + +#include "scalar.H" +#include "vector.H" +#include "Istream.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class GammaWeight Declaration +\*---------------------------------------------------------------------------*/ + +class GammaWeight +{ + scalar k_; + +public: + + GammaWeight(Istream& is) + : + k_(readScalar(is)) + { + if (k_ < 0 || k_ > 1) + { + FatalIOErrorIn("GammaWeight(Istream& is)", is) + << "coefficient = " << k_ + << " should be >= 0 and <= 1" + << exit(FatalIOError); + } + + // Rescale k_ to be >= 0 and <= 0.5 (TVD conformant) + // and avoid the /0 when k_ = 0 + k_ = max(k_/2.0, SMALL); + } + + + scalar weight + ( + scalar cdWeight, + scalar faceFlux, + scalar phiP, + scalar phiN, + const vector& gradcP, + const vector& gradcN, + const vector& d + ) const + { + scalar magd = mag(d); + vector dHat = d/mag(d); + + scalar gradf = (phiN - phiP)/magd; + + scalar gradcf; + scalar udWeight; + + if (faceFlux > 0) + { + gradcf = dHat & gradcP; + udWeight = 1; + } + else + { + gradcf = dHat & gradcN; + udWeight = 0; + } + + // Stabilise for division + gradcf = stabilise(gradcf, SMALL); + + scalar phict = 1 - 0.5*gradf/gradcf; + scalar limiter = min(max(phict/k_, 0), 1); + + return limiter*cdWeight + (1 - limiter)*udWeight; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/Gamma/GammaEdgeInterpolationMake.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/Gamma/GammaEdgeInterpolationMake.C new file mode 100644 index 0000000000000000000000000000000000000000..6d1466463c9e76462ec5d159818587d2f335cd9e --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/Gamma/GammaEdgeInterpolationMake.C @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Gamma interpolation scheme class + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "faNVDscheme.H" +#include "Gamma.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeNVDedgeInterpolationScheme(GammaEdgeInterpolation, GammaWeight, "Gamma") +} + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C new file mode 100644 index 0000000000000000000000000000000000000000..bf0c11d37bc584b2e9489eff38c839ae83577cad --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C @@ -0,0 +1,221 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Class to create the weighting-factors based on the NVD + (Normalised Variable Diagram). + The particular differencing scheme class is supplied as a template argument, + the weight function of which is called by the weight function of this class + for the internal edges as well as edges of coupled patches + (e.g. processor-processor patches). The weight function is supplied the + central-differencing weighting factor, the edge-flux, the cell and edge + gradients (from which the normalised variable distribution may be created) + and the cell centre distance. + + This code organisation is both neat and efficient, allowing for convenient + implementation of new schemes to run on parallelised cases. + +\*---------------------------------------------------------------------------*/ + +#include "areaFields.H" +#include "edgeFields.H" +#include "facGrad.H" +#include "coupledFaPatchFields.H" +#include "upwindEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +inline tmp<areaScalarField> limiter(const areaScalarField& phi) +{ + return phi; +} + +inline tmp<areaScalarField> limiter(const areaVectorField& phi) +{ + return magSqr(phi); +} + +inline tmp<areaScalarField> limiter(const areaTensorField& phi) +{ + return magSqr(phi); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +//- Return the interpolation weighting factors + +template<class Type, class NVDweight> +tmp<edgeScalarField> faNVDscheme<Type,NVDweight>::weights +( + const GeometricField<Type, faPatchField, areaMesh>& phi +) const +{ + const faMesh& mesh = this->mesh(); + + tmp<edgeScalarField> tWeightingFactors + ( + new edgeScalarField(mesh.edgeInterpolation::weights()) + ); + edgeScalarField& weightingFactors = tWeightingFactors.ref(); + + scalarField& weights = weightingFactors.primitiveFieldRef(); + + tmp<areaScalarField> tvf = limiter(phi); + const areaScalarField& vf = tvf(); + + areaVectorField gradc(fac::grad(vf)); + +// edgeVectorField d = +// mesh.Le() +// /(mesh.magLe()*mesh.edgeInterpolation::deltaCoeffs()); + +// if (!mesh.orthogonal()) +// { +// d -= +// mesh.edgeInterpolation::correctionVectors() +// /mesh.edgeInterpolation::deltaCoeffs(); +// } + + const labelUList& owner = mesh.owner(); + const labelUList& neighbour = mesh.neighbour(); + const vectorField& n = mesh.faceAreaNormals().internalField(); + const vectorField& c = mesh.areaCentres().internalField(); + + forAll(weights, edge) + { + vector d = vector::zero; + + if(edgeFlux_[edge] > 0) + { + d = c[neighbour[edge]] - c[owner[edge]]; + d -= n[owner[edge]]*(n[owner[edge]]&d); + d /= mag(d)/mesh.edgeInterpolation::lPN().internalField()[edge]; + } + else + { + d = c[neighbour[edge]] - c[owner[edge]]; + d -= n[neighbour[edge]]*(n[neighbour[edge]]&d); + d /= mag(d)/mesh.edgeInterpolation::lPN().internalField()[edge]; + } + + weights[edge] = + this->weight + ( + weights[edge], + edgeFlux_[edge], + vf[owner[edge]], + vf[neighbour[edge]], + gradc[owner[edge]], + gradc[neighbour[edge]], + d + ); + } + + + GeometricField<scalar, faePatchField, edgeMesh>::Boundary& + bWeights = weightingFactors.boundaryFieldRef(); + + forAll(bWeights, patchI) + { + if (bWeights[patchI].coupled()) + { + scalarField& pWeights = bWeights[patchI]; + + const scalarField& pEdgeFlux = edgeFlux_.boundaryField()[patchI]; + + scalarField pVfP = + vf.boundaryField()[patchI].patchInternalField(); + + scalarField pVfN = + vf.boundaryField()[patchI].patchNeighbourField(); + + vectorField pGradcP = + gradc.boundaryField()[patchI].patchInternalField(); + + vectorField pGradcN = + gradc.boundaryField()[patchI].patchNeighbourField(); + + vectorField CP = mesh.areaCentres().boundaryField()[patchI] + .patchInternalField(); + + vectorField CN = + mesh.areaCentres().boundaryField()[patchI] + .patchNeighbourField(); + + vectorField nP = + mesh.faceAreaNormals().boundaryField()[patchI] + .patchInternalField(); + + vectorField nN = + mesh.faceAreaNormals().boundaryField()[patchI] + .patchNeighbourField(); + + scalarField pLPN = + mesh.edgeInterpolation::lPN().boundaryField()[patchI]; + + forAll(pWeights, edgeI) + { + vector d = vector::zero; + + if(pEdgeFlux[edgeI] > 0) + { + d = CN[edgeI] - CP[edgeI]; + d -= nP[edgeI]*(nP[edgeI]&d); + d /= mag(d)/pLPN[edgeI]; + } + else + { + d = CN[edgeI] - CP[edgeI]; + d -= nN[edgeI]*(nN[edgeI]&d); + d /= mag(d)/pLPN[edgeI]; + } + + pWeights[edgeI] = + this->weight + ( + pWeights[edgeI], + pEdgeFlux[edgeI], + pVfP[edgeI], + pVfN[edgeI], + pGradcP[edgeI], + pGradcN[edgeI], + d + ); + } + } + } + + return tWeightingFactors; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.H b/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.H new file mode 100644 index 0000000000000000000000000000000000000000..ab58008a1aba3a481818ce3865c79f8a6dbab407 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.H @@ -0,0 +1,196 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + Gamma + +Description + + Class to create the weighting-factors based on the NVD + (Normalised Variable Diagram). + The particular differencing scheme class is supplied as a template argument, + the weight function of which is called by the weight function of this class + for the internal edges as well as edges of coupled patches + (e.g. processor-processor patches). The weight function is supplied the + central-differencing weighting factor, the edge-flux, the cell and edge + gradients (from which the normalised variable distribution may be created) + and the cell centre distance. + + This code organisation is both neat and efficient, allowing for convenient + implementation of new schemes to run on parallelised cases. + +SourceFiles + faNVDscheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef faNVDscheme_H +#define faNVDscheme_H + +#include "edgeInterpolationScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class faNVDscheme Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type, class NVDweight> +class faNVDscheme +: + public edgeInterpolationScheme<Type>, + public NVDweight +{ + +protected: + + // Protected data + + const edgeScalarField& edgeFlux_; + + +private: + + // Private Member Functions + + //- Disallow default bitwise copy construct + faNVDscheme(const faNVDscheme&); + + //- Disallow default bitwise assignment + void operator=(const faNVDscheme&); + + +public: + + //- Define a typedef for the NVDweight + typedef NVDweight Weight; + + + //- Runtime type information + TypeName("faNVDscheme"); + + + // Constructors + + //- Construct from mesh and edgeFlux and blendingFactor + faNVDscheme + ( + const faMesh& mesh, + const edgeScalarField& edgeFlux, + const NVDweight& weight + ) + : + edgeInterpolationScheme<Type>(mesh), + NVDweight(weight), + edgeFlux_(edgeFlux) + {} + + //- Construct from mesh and Istream. + // The name of the flux field is read from the Istream and looked-up + // from the database + faNVDscheme + ( + const faMesh& mesh, + Istream& is + ) + : + edgeInterpolationScheme<Type>(mesh), + NVDweight(is), + edgeFlux_ + ( + mesh().objectRegistry::lookupObject<edgeScalarField> + ( + word(is) + ) + ) + {} + + //- Construct from mesh, edgeFlux and Istream + faNVDscheme + ( + const faMesh& mesh, + const edgeScalarField& edgeFlux, + Istream& is + ) + : + edgeInterpolationScheme<Type>(mesh), + NVDweight(is), + edgeFlux_(edgeFlux) + {} + + + // Member Functions + + //- Return the interpolation weighting factors + virtual tmp<edgeScalarField> weights + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Add the patch constructor functions to the hash tables + +#define makeNVDedgeInterpolationTypeScheme(SS, WEIGHT, NAME, TYPE) \ + \ +typedef faNVDscheme<TYPE, WEIGHT> faNVDscheme##TYPE##WEIGHT_; \ +defineTemplateTypeNameAndDebugWithName(faNVDscheme##TYPE##WEIGHT_, NAME, 0); \ + \ +edgeInterpolationScheme<TYPE>::addMeshConstructorToTable \ +<faNVDscheme<TYPE, WEIGHT> > \ + add##SS##TYPE##MeshConstructorToTable_; \ + \ +edgeInterpolationScheme<TYPE>::addMeshFluxConstructorToTable \ +<faNVDscheme<TYPE, WEIGHT> > \ + add##SS##TYPE##MeshFluxConstructorToTable_; + + +#define makeNVDedgeInterpolationScheme(SS, WEIGHT, NAME) \ + \ +makeNVDedgeInterpolationTypeScheme(SS, WEIGHT, NAME, scalar) \ +makeNVDedgeInterpolationTypeScheme(SS, WEIGHT, NAME, vector) \ +makeNVDedgeInterpolationTypeScheme(SS, WEIGHT, NAME, tensor) + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "faNVDscheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/blended/blendedEdgeInterpolation.H b/src/finiteArea/interpolation/edgeInterpolation/schemes/blended/blendedEdgeInterpolation.H new file mode 100644 index 0000000000000000000000000000000000000000..08cec6dd0b97bb879f9ac1ba0cb9f5705d4ef673 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/blended/blendedEdgeInterpolation.H @@ -0,0 +1,157 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + blendedEdgeInterpolation + +Description + linear/upwind blended differencing scheme. + +SourceFiles + blendedEdgeInterpolationMake.C + +\*---------------------------------------------------------------------------*/ + +#ifndef blendedEdgeInterpolation_H +#define blendedEdgeInterpolation_H + +#include "linearEdgeInterpolation.H" +#include "upwindEdgeInterpolation.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class blendedEdgeInterpolation Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class blendedEdgeInterpolation +: + public linearEdgeInterpolation<Type>, + public upwindEdgeInterpolation<Type> +{ + // Private data + + const scalar blendingFactor_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + blendedEdgeInterpolation(const blendedEdgeInterpolation&); + + //- Disallow default bitwise assignment + void operator=(const blendedEdgeInterpolation&); + + +public: + + //- Runtime type information + TypeName("blended"); + + + // Constructors + + //- Construct from mesh, faceFlux and blendingFactor + blendedEdgeInterpolation + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + const scalar blendingFactor + ) + : + edgeInterpolationScheme<Type>(mesh), + linearEdgeInterpolation<Type>(mesh), + upwindEdgeInterpolation<Type>(mesh, faceFlux), + blendingFactor_(blendingFactor) + {} + + //- Construct from mesh and Istream. + // The name of the flux field is read from the Istream and looked-up + // from the database + blendedEdgeInterpolation + ( + const faMesh& mesh, + Istream& is + ) + : + edgeInterpolationScheme<Type>(mesh), + linearEdgeInterpolation<Type>(mesh), + upwindEdgeInterpolation<Type> + ( + mesh, + mesh().objectRegistry::lookupObject<edgeScalarField> + ( + word(is) + ) + ), + blendingFactor_(readScalar(is)) + {} + + //- Construct from mesh, faceFlux and Istream + blendedEdgeInterpolation + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& is + ) + : + edgeInterpolationScheme<Type>(mesh), + linearEdgeInterpolation<Type>(mesh), + upwindEdgeInterpolation<Type>(mesh, faceFlux), + blendingFactor_(readScalar(is)) + {} + + + // Member Functions + + //- Return the interpolation weighting factors + virtual tmp<edgeScalarField> weights + ( + const GeometricField<Type, faPatchField, areaMesh>& vf + ) const + { + return + blendingFactor_* + linearEdgeInterpolation<Type>::weights(vf) + + (1 - blendingFactor_)* + upwindEdgeInterpolation<Type>::weights(vf); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/blended/blendedEdgeInterpolationMake.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/blended/blendedEdgeInterpolationMake.C new file mode 100644 index 0000000000000000000000000000000000000000..5464d2f5b8e66b6d0d276062888b0c0944c964c9 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/blended/blendedEdgeInterpolationMake.C @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Blended interpolation scheme class + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "blendedEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeEdgeInterpolationScheme(blendedEdgeInterpolation) +} + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/linear/linearEdgeInterpolation.H b/src/finiteArea/interpolation/edgeInterpolation/schemes/linear/linearEdgeInterpolation.H new file mode 100644 index 0000000000000000000000000000000000000000..e936f06b69f44cc8b190d5317871b4c87bb13fa0 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/linear/linearEdgeInterpolation.H @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + linearEdgeInterpolation + +Description + Central-differencing interpolation scheme class + +SourceFiles + linearEdgeInterpolation.C + +\*---------------------------------------------------------------------------*/ + +#ifndef linearEdgeInterpolation_H +#define linearEdgeInterpolation_H + +#include "edgeInterpolationScheme.H" +#include "areaFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class linear Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class linearEdgeInterpolation +: + virtual public edgeInterpolationScheme<Type> +{ + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const linearEdgeInterpolation&); + +public: + + //- Runtime type information + TypeName("linear"); + + + // Constructors + + //- Construct from mesh + linearEdgeInterpolation(const faMesh& mesh) + : + edgeInterpolationScheme<Type>(mesh) + {} + + //- Construct from Istream + linearEdgeInterpolation(const faMesh& mesh, Istream&) + : + edgeInterpolationScheme<Type>(mesh) + {} + + //- Construct from faceFlux and Istream + linearEdgeInterpolation + ( + const faMesh& mesh, + const edgeScalarField&, + Istream& + ) + : + edgeInterpolationScheme<Type>(mesh) + {} + + + // Member Functions + + //- Return the interpolation weighting factors + tmp<edgeScalarField> weights + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const + { + return this->mesh().edgeInterpolation::weights(); + } +}; + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +linearEdgeInterpolate(const GeometricField<Type, faPatchField, areaMesh>& vf) +{ + return edgeInterpolationScheme<Type>::interpolate + ( + vf, + vf.mesh().edgeInterpolation::weights() + ); +} + + +template<class Type> +tmp<GeometricField<Type, faePatchField, edgeMesh> > +linearEdgeInterpolate +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& tvf +) +{ + tmp<GeometricField<Type, faePatchField, edgeMesh> > tinterp = + linearEdgeInterpolate(tvf()); + tvf.clear(); + return tinterp; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/linear/linearEdgeInterpolationMake.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/linear/linearEdgeInterpolationMake.C new file mode 100644 index 0000000000000000000000000000000000000000..c1a98d9b119ab13966eafd5e3dc836af6bd48c08 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/linear/linearEdgeInterpolationMake.C @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Central-differencing interpolation scheme class + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "linearEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeEdgeInterpolationScheme(linearEdgeInterpolation) +} + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/linearUpwind/linearUpwind.H b/src/finiteArea/interpolation/edgeInterpolation/schemes/linearUpwind/linearUpwind.H new file mode 100644 index 0000000000000000000000000000000000000000..e9f0eb2fef9c4466bc9e282f9898bd1e24adbf30 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/linearUpwind/linearUpwind.H @@ -0,0 +1,106 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + linearUpwind + +Description + Class with operator() which returns the weighting factors for the + linear-upwind differencing scheme. Note that the weighting factors are + not bounded between upwind and central-differencing, some downwind + contribution is possible although the interpolate is limited to be between + the upwind and downwind cell values. + + Used in conjunction with the template class NVDscheme although this scheme + is not NVD. + +SourceFiles + linearUpwindMake.C + +\*---------------------------------------------------------------------------*/ + +#ifndef linearUpwind_H +#define linearUpwind_H + +#include "scalar.H" +#include "vector.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class linearUpwindWeight Declaration +\*---------------------------------------------------------------------------*/ + +class linearUpwindWeight +{ + +public: + + linearUpwindWeight(Istream&) + {} + + scalar weight + ( + scalar cdWeight, + scalar faceFlux, + scalar phiP, + scalar phiN, + const vector& gradcP, + const vector& gradcN, + const vector& d + ) const + { + scalar phif; + if (faceFlux > 0) + { + phif = phiP + (1 - cdWeight)*(d & gradcP); + } + else + { + phif = phiN - cdWeight*(d & gradcN); + } + + // Limit the estimated face value between the upwind and downwind cell + // values + phif = min(phif, max(phiN, phiP)); + phif = max(phif, min(phiN, phiP)); + + return (phif - phiN)/stabilise(phiP - phiN, SMALL); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/linearUpwind/linearUpwindEdgeInterpolationMake.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/linearUpwind/linearUpwindEdgeInterpolationMake.C new file mode 100644 index 0000000000000000000000000000000000000000..354eece99f5f755cb6e6a242467df38673748eb3 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/linearUpwind/linearUpwindEdgeInterpolationMake.C @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + linearUpwind interpolation scheme class + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "faNVDscheme.H" +#include "linearUpwind.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeNVDedgeInterpolationScheme(linearUpwindEdgeInterpolation, linearUpwindWeight, "linearUpwind") +} + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/upwind/upwindEdgeInterpolation.H b/src/finiteArea/interpolation/edgeInterpolation/schemes/upwind/upwindEdgeInterpolation.H new file mode 100644 index 0000000000000000000000000000000000000000..76f6088af1edfefb60050bdfaec63b1b0936aed7 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/upwind/upwindEdgeInterpolation.H @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + upwindEdgeInterpolation + +Description + Upwind differencing scheme class. + +SourceFiles + upwindEdgeInterpolation.C + +\*---------------------------------------------------------------------------*/ + +#ifndef upwindEdgeInterpolation_H +#define upwindEdgeInterpolation_H + +#include "edgeInterpolationScheme.H" +#include "areaFields.H" +#include "edgeFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class upwind Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class upwindEdgeInterpolation +: + virtual public edgeInterpolationScheme<Type> +{ + // Private data + + const edgeScalarField& faceFlux_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const upwindEdgeInterpolation&); + + +public: + + //- Runtime type information + TypeName("upwind"); + + + // Constructors + + //- Construct from faceFlux + upwindEdgeInterpolation + ( + const faMesh& mesh, + const edgeScalarField& faceFlux + ) + : + edgeInterpolationScheme<Type>(mesh), + faceFlux_(faceFlux) + {} + + //- Construct from Istream. + // The name of the flux field is read from the Istream and looked-up + // from the database + upwindEdgeInterpolation + ( + const faMesh& mesh, + Istream& is + ) + : + edgeInterpolationScheme<Type>(mesh), + faceFlux_ + ( + mesh().objectRegistry::lookupObject<edgeScalarField> + ( + word(is) + ) + ) + {} + + //- Construct from faceFlux and Istream + upwindEdgeInterpolation + ( + const faMesh& mesh, + const edgeScalarField& faceFlux, + Istream& + ) + : + edgeInterpolationScheme<Type>(mesh), + faceFlux_(faceFlux) + {} + + + // Member Functions + + //- Return the interpolation weighting factors + virtual tmp<edgeScalarField> weights + ( + const GeometricField<Type, faPatchField, areaMesh>& + ) const + { + return pos(faceFlux_); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/upwind/upwindEdgeInterpolationMake.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/upwind/upwindEdgeInterpolationMake.C new file mode 100644 index 0000000000000000000000000000000000000000..8a8dd6aef5c9f35cd7b787d5ae5f753c12b00ad8 --- /dev/null +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/upwind/upwindEdgeInterpolationMake.C @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Central-differencing interpolation scheme class + +\*---------------------------------------------------------------------------*/ + +#include "faMesh.H" +#include "upwindEdgeInterpolation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeEdgeInterpolationScheme(upwindEdgeInterpolation) +} + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaAreaField.H b/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaAreaField.H new file mode 100644 index 0000000000000000000000000000000000000000..6f1c5a041b2e03889ddcdee1ce48847ccef4d48d --- /dev/null +++ b/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaAreaField.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::MapFaAreaField + +Description + Map area internal field on topology change. This is a partial + template specialisation, see MapGeometricFields. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef MapFaAreaField_H +#define MapFaAreaField_H + +#include "Field.H" +#include "areaFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type, class MeshMapper> +class MapInternalField<Type, MeshMapper, areaMesh> +{ +public: + + MapInternalField() + {} + + void operator() + ( + Field<Type>& field, + const MeshMapper& mapper + ) const; +}; + + +template<class Type, class MeshMapper> +void MapInternalField<Type, MeshMapper, areaMesh>::operator() +( + Field<Type>& field, + const MeshMapper& mapper +) const +{ + if (field.size() != mapper.areaMap().sizeBeforeMapping()) + { + FatalErrorIn + ( + "void MapInternalField<Type, MeshMapper, areaMesh>::operator()\n" + "(\n" + " Field<Type>& field,\n" + " const MeshMapper& mapper\n" + ") const" + ) << "Incompatible size before mapping. Field size: " << field.size() + << " map size: " << mapper.areaMap().sizeBeforeMapping() + << abort(FatalError); + } + + field.autoMap(mapper.areaMap()); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaEdgeField.H b/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaEdgeField.H new file mode 100644 index 0000000000000000000000000000000000000000..cf28c7af21537e545b7fc3d189446193f5dd665a --- /dev/null +++ b/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaEdgeField.H @@ -0,0 +1,113 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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::MapFaEdgeField + +Description + Map edge internal field on topology change. This is a partial + template specialisation, see MapGeometricFields. + +Author + Zeljko Tukovic, FMENA + Hrvoje Jasak, Wikki Ltd. + +\*---------------------------------------------------------------------------*/ + +#ifndef MapFaEdgeField_H +#define MapFaEdgeField_H + +#include "Field.H" +#include "edgeFaMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type, class MeshMapper> +class MapInternalField<Type, MeshMapper, edgeMesh> +{ +public: + + MapInternalField() + {} + + void operator() + ( + Field<Type>& field, + const MeshMapper& mapper + ) const; +}; + + +template<class Type, class MeshMapper> +void MapInternalField<Type, MeshMapper, edgeMesh>::operator() +( + Field<Type>& field, + const MeshMapper& mapper +) const +{ + if (field.size() != mapper.edgeMap().sizeBeforeMapping()) + { + FatalErrorIn + ( + "void MapInternalField<Type, MeshMapper, edgeMesh>::operator()\n" + "(\n" + " Field<Type>& field,\n" + " const MeshMapper& mapper\n" + ") const" + ) << "Incompatible size before mapping. Field size: " << field.size() + << " map size: " << mapper.edgeMap().sizeBeforeMapping() + << abort(FatalError); + } + + Info<< "Note: No mapping of FA edge fields. Please reconsider algorithm" + << endl; + + field.autoMap(mapper.edgeMap()); + + // Flip the flux +// const labelList flipFaces = mapper.edgeMap().flipFaceFlux().toc(); + +// forAll (flipFaces, i) +// { +// if (flipFaces[i] < field.size()) +// { +// field[flipFaces[i]] *= -1.0; +// } +// } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaFields.H b/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaFields.H new file mode 100644 index 0000000000000000000000000000000000000000..2e8954e513d3419de26c1d2ba680e755e248c0aa --- /dev/null +++ b/src/finiteArea/interpolation/mapping/faFieldMappers/MapFaFields.H @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +Description + Finite area field mapping + +\*---------------------------------------------------------------------------*/ + +#ifndef MapFaFields_H +#define MapFaFields_H + +#include "MapGeometricFields.H" +#include "MapFaEdgeField.H" +#include "MapFaAreaField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C b/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C new file mode 100644 index 0000000000000000000000000000000000000000..4a56e68fed3857d931e432ff901eb912dff88828 --- /dev/null +++ b/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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/>. + +\*----------------------------------------------------------------------------*/ + +#include "volSurfaceMapping.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<template<class> class PatchField, class Type> +Foam::tmp<Foam::Field<Type> > Foam::volSurfaceMapping::mapToSurface +( + const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& df +) const +{ + // Grab labels for all faces in faMesh + const labelList& faceLabels = mesh_.faceLabels(); + + tmp<Field<Type> > tresult + ( + new Field<Type> + ( + faceLabels.size(), + pTraits<Type>::zero + ) + ); + Field<Type>& result = tresult(); + + // Get reference to volume mesh + const polyMesh& pMesh = mesh_(); + const polyBoundaryMesh& bm = pMesh.boundaryMesh(); + + label patchID, faceID; + + // Grab droplet cloud source by identifying patch and face + forAll (faceLabels, i) + { + // Escape if face is beyond active faces, eg belongs to a face zone + if (faceLabels[i] < pMesh.nFaces()) + { + patchID = bm.whichPatch(faceLabels[i]); + faceID = bm[patchID].whichFace(faceLabels[i]); + + result[i] = df[patchID][faceID]; + } + } + + return tresult; +} + + +template<class Type> +void Foam::volSurfaceMapping::mapToVolume +( + const GeometricField<Type, faPatchField, areaMesh>& af, + typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf +) const +{ + // Grab labels for all faces in faMesh + const labelList& faceLabels = mesh_.faceLabels(); + + // Get reference to volume mesh + const polyMesh& pMesh = mesh_(); + const polyBoundaryMesh& bm = pMesh.boundaryMesh(); + + label patchID, faceID; + + const Field<Type>& afi = af.internalField(); + + forAll (faceLabels, i) + { + // Escape if face is beyond active faces, eg belongs to a face zone + if (faceLabels[i] < pMesh.nFaces()) + { + patchID = bm.whichPatch(faceLabels[i]); + faceID = bm[patchID].whichFace(faceLabels[i]); + + bf[patchID][faceID] = afi[i]; + } + } +} + + +template<class Type> +void Foam::volSurfaceMapping::mapToVolume +( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& taf, + typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf +) const +{ + mapToVolume(taf(), bf); + + taf.clear(); +} + + +// ************************************************************************* // diff --git a/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.H b/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.H new file mode 100644 index 0000000000000000000000000000000000000000..a7c23438e06f1b275c6b2c27af84fc0d40e235b2 --- /dev/null +++ b/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.H @@ -0,0 +1,131 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | + \\/ M anipulation | +------------------------------------------------------------------------------- + | Copyright (C) 2016-2017 Wikki 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 + volSurfaceMapping + +Description + Volume to surface and surface to volume mapping + +Author + Hrvoje Jasak, Wikki Ltd. + +SourceFiles + volSurfaceMapping.C + +\*---------------------------------------------------------------------------*/ + +#ifndef volSurfaceMapping_H +#define volSurfaceMapping_H + +#include "faMesh.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> class fvPatchField; + +/*---------------------------------------------------------------------------*\ + Class volSurfaceMapping Declaration +\*---------------------------------------------------------------------------*/ + +class volSurfaceMapping +{ + // Private data + + //- Reference to mesh + const faMesh& mesh_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + volSurfaceMapping(const volSurfaceMapping&); + + //- Disallow default bitwise assignment + void operator=(const volSurfaceMapping&); + + +public: + + // Constructors + + //- Construct null + volSurfaceMapping(); + + //- Construct from mesh + volSurfaceMapping(const faMesh& mesh) + : + mesh_(mesh) + {} + + + // Destructor - default + + + // Member Functions + + //- Map droplet cloud sources to surface + template<template<class> class PatchField, class Type> + tmp<Field<Type> > mapToSurface + ( + const typename + GeometricField<Type, fvPatchField, volMesh>::Boundary& df + ) const; + + //- Map surface field to volume boundary field + template<class Type> + void mapToVolume + ( + const GeometricField<Type, faPatchField, areaMesh>& af, + typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf + ) const; + + template<class Type> + void mapToVolume + ( + const tmp<GeometricField<Type, faPatchField, areaMesh> >& taf, + typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bf + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "volSurfaceMapping.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/.gitignore b/tutorials/finiteArea/liquidFilmFoam/cylinder/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..44fa1a7e009acf5df4da12e2a7587fa0c1f2a406 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/.gitignore @@ -0,0 +1,52 @@ +# git-ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. + +# editor and misc backup files - anywhere +*~ +.*~ +*.bak +*.bak[0-9][0-9] +*.orig +*.orig[0-9][0-9] +\#*\# + +# file-browser settings - anywhere +.directory + +# CVS recovered versions - anywhere +.#* + +# SVN directories - anywhere + +.svn/ + +# OpenFOAM results + +[0-9]*/ +!/0/ +processor* +*/polyMesh/* +!*/polyMesh/blockMeshDict +cellToRegion* +log* + +# packages - anywhere + +*.tar.bz2 +*.tar.gz +*.tar +*.tgz +*.gtgz + +# Pictures and movies + +*.png +*.jpg +*.jpeg +*.bmp +*.png +*.avi +*.mp4 +*.mpg + +#end-of-file diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0/Us b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/Us new file mode 100644 index 0000000000000000000000000000000000000000..1548ab6ce80872f74230a1f774e5f821dcfca8cd --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/Us @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaVectorField; + location "0"; + object Us; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } + + side + { + type slip; + } + + symmetry + { + type symmetry; + } + + cylinder + { + type slip; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h new file mode 100644 index 0000000000000000000000000000000000000000..6f281f1fb593698ab6809671abaa0870d585b8a6 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/h @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + location "0"; + object h; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0.000141; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.000141; + } + + outlet + { + type zeroGradient; + } + + side + { + type zeroGradient; + } + + symmetry + { + type symmetry; + } + + cylinder + { + type zeroGradient; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/0/manningField b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/manningField new file mode 100644 index 0000000000000000000000000000000000000000..a361f00976c9b0e9bbb30f635dfa04ba8c509a58 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/0/manningField @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + location "0"; + object manningField; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } + + side + { + type zeroGradient; + } + + symmetry + { + type symmetry; + } + + cylinder + { + type zeroGradient; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..df6032b209b80bc7bd90cb5b457e796bdd3ce430 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +cleanFaMesh diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..1891bf2b349cb476e55755d1158717996b85f3f9 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/Allrun @@ -0,0 +1,10 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application="liquidFilmFoam" + +runApplication blockMesh +runApplication makeFaMesh +runApplication $application diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faBoundary b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faBoundary new file mode 100644 index 0000000000000000000000000000000000000000..9abff9640881af5ac46feeeaa11bf4e6770855f1 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faBoundary @@ -0,0 +1,292 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class faBoundaryMesh; + location "constant/faMesh"; + object faBoundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + inlet + { + type patch; + edgeLabels List<label> +30 +( +4020 +4021 +4022 +4023 +4024 +4025 +4026 +4027 +4028 +4029 +4030 +4031 +4032 +4033 +4034 +4035 +4036 +4037 +4038 +4039 +4060 +4062 +4063 +4064 +4065 +4066 +4067 +4068 +4069 +4070 +) +; + ngbPolyPatchIndex 3; + } + outlet + { + type patch; + edgeLabels List<label> +30 +( +3929 +3931 +3932 +3933 +3934 +3935 +3936 +3937 +3938 +3939 +3959 +3960 +3961 +3962 +3963 +3964 +3965 +3966 +3967 +3968 +3969 +3970 +3971 +3972 +3973 +3974 +3975 +3976 +3977 +3979 +) +; + ngbPolyPatchIndex 1; + } + side + { + type patch; + edgeLabels List<label> +60 +( +3940 +3941 +3942 +3943 +3944 +3945 +3946 +3947 +3948 +3949 +3950 +3951 +3952 +3953 +3954 +3955 +3956 +3957 +3958 +3978 +3980 +3981 +3982 +3983 +3984 +3985 +3986 +3987 +3988 +3989 +4000 +4001 +4002 +4003 +4004 +4005 +4006 +4007 +4008 +4009 +4040 +4041 +4042 +4043 +4044 +4045 +4046 +4047 +4048 +4049 +4050 +4051 +4052 +4053 +4054 +4055 +4056 +4057 +4058 +4059 +) +; + ngbPolyPatchIndex 2; + } + symmetry + { + type symmetry; + edgeLabels List<label> +60 +( +3891 +3901 +3902 +3903 +3904 +3905 +3906 +3907 +3908 +3909 +3910 +3911 +3912 +3913 +3914 +3915 +3916 +3917 +3918 +3919 +3920 +3921 +3922 +3923 +3924 +3925 +3926 +3927 +3928 +3930 +4061 +4071 +4072 +4073 +4074 +4075 +4076 +4077 +4078 +4079 +4080 +4081 +4082 +4083 +4084 +4085 +4086 +4087 +4088 +4089 +4090 +4091 +4092 +4093 +4094 +4095 +4096 +4097 +4098 +4100 +) +; + ngbPolyPatchIndex 0; + } + cylinder + { + type patch; + edgeLabels List<label> +40 +( +3890 +3892 +3893 +3894 +3895 +3896 +3897 +3898 +3899 +3900 +3990 +3991 +3992 +3993 +3994 +3995 +3996 +3997 +3998 +3999 +4010 +4011 +4012 +4013 +4014 +4015 +4016 +4017 +4018 +4019 +4099 +4101 +4102 +4103 +4104 +4105 +4106 +4107 +4108 +4109 +) +; + ngbPolyPatchIndex 4; + } +) + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faMeshDefinition b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faMeshDefinition new file mode 100644 index 0000000000000000000000000000000000000000..3547bf31a7dc6e776ffb53a924ebb7bb281374d7 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faMeshDefinition @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant/faMesh"; + object faMeshDefinition; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +polyMeshPatches 1( film ); + +boundary +{ + inlet + { + type patch; + ownerPolyPatch film; + neighbourPolyPatch inlet; + } + + outlet + { + type patch; + ownerPolyPatch film; + neighbourPolyPatch outlet; + } + + side + { + type patch; + ownerPolyPatch film; + neighbourPolyPatch side; + } + + symmetry + { + type symmetry; + ownerPolyPatch film; + neighbourPolyPatch symmetry; + } + + cylinder + { + type patch; + ownerPolyPatch film; + neighbourPolyPatch cylinder; + } +} + + +// ************************************************************************** // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faceLabels b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faceLabels new file mode 100644 index 0000000000000000000000000000000000000000..26a38d284c58cc043c76f3140c7fe8acffd95b55 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/faMesh/faceLabels @@ -0,0 +1,2024 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class labelList; + location "constant/faMesh"; + object faceLabels; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +2000 +( +4110 +4111 +4112 +4113 +4114 +4115 +4116 +4117 +4118 +4119 +4120 +4121 +4122 +4123 +4124 +4125 +4126 +4127 +4128 +4129 +4130 +4131 +4132 +4133 +4134 +4135 +4136 +4137 +4138 +4139 +4140 +4141 +4142 +4143 +4144 +4145 +4146 +4147 +4148 +4149 +4150 +4151 +4152 +4153 +4154 +4155 +4156 +4157 +4158 +4159 +4160 +4161 +4162 +4163 +4164 +4165 +4166 +4167 +4168 +4169 +4170 +4171 +4172 +4173 +4174 +4175 +4176 +4177 +4178 +4179 +4180 +4181 +4182 +4183 +4184 +4185 +4186 +4187 +4188 +4189 +4190 +4191 +4192 +4193 +4194 +4195 +4196 +4197 +4198 +4199 +4200 +4201 +4202 +4203 +4204 +4205 +4206 +4207 +4208 +4209 +4210 +4211 +4212 +4213 +4214 +4215 +4216 +4217 +4218 +4219 +4220 +4221 +4222 +4223 +4224 +4225 +4226 +4227 +4228 +4229 +4230 +4231 +4232 +4233 +4234 +4235 +4236 +4237 +4238 +4239 +4240 +4241 +4242 +4243 +4244 +4245 +4246 +4247 +4248 +4249 +4250 +4251 +4252 +4253 +4254 +4255 +4256 +4257 +4258 +4259 +4260 +4261 +4262 +4263 +4264 +4265 +4266 +4267 +4268 +4269 +4270 +4271 +4272 +4273 +4274 +4275 +4276 +4277 +4278 +4279 +4280 +4281 +4282 +4283 +4284 +4285 +4286 +4287 +4288 +4289 +4290 +4291 +4292 +4293 +4294 +4295 +4296 +4297 +4298 +4299 +4300 +4301 +4302 +4303 +4304 +4305 +4306 +4307 +4308 +4309 +4310 +4311 +4312 +4313 +4314 +4315 +4316 +4317 +4318 +4319 +4320 +4321 +4322 +4323 +4324 +4325 +4326 +4327 +4328 +4329 +4330 +4331 +4332 +4333 +4334 +4335 +4336 +4337 +4338 +4339 +4340 +4341 +4342 +4343 +4344 +4345 +4346 +4347 +4348 +4349 +4350 +4351 +4352 +4353 +4354 +4355 +4356 +4357 +4358 +4359 +4360 +4361 +4362 +4363 +4364 +4365 +4366 +4367 +4368 +4369 +4370 +4371 +4372 +4373 +4374 +4375 +4376 +4377 +4378 +4379 +4380 +4381 +4382 +4383 +4384 +4385 +4386 +4387 +4388 +4389 +4390 +4391 +4392 +4393 +4394 +4395 +4396 +4397 +4398 +4399 +4400 +4401 +4402 +4403 +4404 +4405 +4406 +4407 +4408 +4409 +4410 +4411 +4412 +4413 +4414 +4415 +4416 +4417 +4418 +4419 +4420 +4421 +4422 +4423 +4424 +4425 +4426 +4427 +4428 +4429 +4430 +4431 +4432 +4433 +4434 +4435 +4436 +4437 +4438 +4439 +4440 +4441 +4442 +4443 +4444 +4445 +4446 +4447 +4448 +4449 +4450 +4451 +4452 +4453 +4454 +4455 +4456 +4457 +4458 +4459 +4460 +4461 +4462 +4463 +4464 +4465 +4466 +4467 +4468 +4469 +4470 +4471 +4472 +4473 +4474 +4475 +4476 +4477 +4478 +4479 +4480 +4481 +4482 +4483 +4484 +4485 +4486 +4487 +4488 +4489 +4490 +4491 +4492 +4493 +4494 +4495 +4496 +4497 +4498 +4499 +4500 +4501 +4502 +4503 +4504 +4505 +4506 +4507 +4508 +4509 +4510 +4511 +4512 +4513 +4514 +4515 +4516 +4517 +4518 +4519 +4520 +4521 +4522 +4523 +4524 +4525 +4526 +4527 +4528 +4529 +4530 +4531 +4532 +4533 +4534 +4535 +4536 +4537 +4538 +4539 +4540 +4541 +4542 +4543 +4544 +4545 +4546 +4547 +4548 +4549 +4550 +4551 +4552 +4553 +4554 +4555 +4556 +4557 +4558 +4559 +4560 +4561 +4562 +4563 +4564 +4565 +4566 +4567 +4568 +4569 +4570 +4571 +4572 +4573 +4574 +4575 +4576 +4577 +4578 +4579 +4580 +4581 +4582 +4583 +4584 +4585 +4586 +4587 +4588 +4589 +4590 +4591 +4592 +4593 +4594 +4595 +4596 +4597 +4598 +4599 +4600 +4601 +4602 +4603 +4604 +4605 +4606 +4607 +4608 +4609 +4610 +4611 +4612 +4613 +4614 +4615 +4616 +4617 +4618 +4619 +4620 +4621 +4622 +4623 +4624 +4625 +4626 +4627 +4628 +4629 +4630 +4631 +4632 +4633 +4634 +4635 +4636 +4637 +4638 +4639 +4640 +4641 +4642 +4643 +4644 +4645 +4646 +4647 +4648 +4649 +4650 +4651 +4652 +4653 +4654 +4655 +4656 +4657 +4658 +4659 +4660 +4661 +4662 +4663 +4664 +4665 +4666 +4667 +4668 +4669 +4670 +4671 +4672 +4673 +4674 +4675 +4676 +4677 +4678 +4679 +4680 +4681 +4682 +4683 +4684 +4685 +4686 +4687 +4688 +4689 +4690 +4691 +4692 +4693 +4694 +4695 +4696 +4697 +4698 +4699 +4700 +4701 +4702 +4703 +4704 +4705 +4706 +4707 +4708 +4709 +4710 +4711 +4712 +4713 +4714 +4715 +4716 +4717 +4718 +4719 +4720 +4721 +4722 +4723 +4724 +4725 +4726 +4727 +4728 +4729 +4730 +4731 +4732 +4733 +4734 +4735 +4736 +4737 +4738 +4739 +4740 +4741 +4742 +4743 +4744 +4745 +4746 +4747 +4748 +4749 +4750 +4751 +4752 +4753 +4754 +4755 +4756 +4757 +4758 +4759 +4760 +4761 +4762 +4763 +4764 +4765 +4766 +4767 +4768 +4769 +4770 +4771 +4772 +4773 +4774 +4775 +4776 +4777 +4778 +4779 +4780 +4781 +4782 +4783 +4784 +4785 +4786 +4787 +4788 +4789 +4790 +4791 +4792 +4793 +4794 +4795 +4796 +4797 +4798 +4799 +4800 +4801 +4802 +4803 +4804 +4805 +4806 +4807 +4808 +4809 +4810 +4811 +4812 +4813 +4814 +4815 +4816 +4817 +4818 +4819 +4820 +4821 +4822 +4823 +4824 +4825 +4826 +4827 +4828 +4829 +4830 +4831 +4832 +4833 +4834 +4835 +4836 +4837 +4838 +4839 +4840 +4841 +4842 +4843 +4844 +4845 +4846 +4847 +4848 +4849 +4850 +4851 +4852 +4853 +4854 +4855 +4856 +4857 +4858 +4859 +4860 +4861 +4862 +4863 +4864 +4865 +4866 +4867 +4868 +4869 +4870 +4871 +4872 +4873 +4874 +4875 +4876 +4877 +4878 +4879 +4880 +4881 +4882 +4883 +4884 +4885 +4886 +4887 +4888 +4889 +4890 +4891 +4892 +4893 +4894 +4895 +4896 +4897 +4898 +4899 +4900 +4901 +4902 +4903 +4904 +4905 +4906 +4907 +4908 +4909 +4910 +4911 +4912 +4913 +4914 +4915 +4916 +4917 +4918 +4919 +4920 +4921 +4922 +4923 +4924 +4925 +4926 +4927 +4928 +4929 +4930 +4931 +4932 +4933 +4934 +4935 +4936 +4937 +4938 +4939 +4940 +4941 +4942 +4943 +4944 +4945 +4946 +4947 +4948 +4949 +4950 +4951 +4952 +4953 +4954 +4955 +4956 +4957 +4958 +4959 +4960 +4961 +4962 +4963 +4964 +4965 +4966 +4967 +4968 +4969 +4970 +4971 +4972 +4973 +4974 +4975 +4976 +4977 +4978 +4979 +4980 +4981 +4982 +4983 +4984 +4985 +4986 +4987 +4988 +4989 +4990 +4991 +4992 +4993 +4994 +4995 +4996 +4997 +4998 +4999 +5000 +5001 +5002 +5003 +5004 +5005 +5006 +5007 +5008 +5009 +5010 +5011 +5012 +5013 +5014 +5015 +5016 +5017 +5018 +5019 +5020 +5021 +5022 +5023 +5024 +5025 +5026 +5027 +5028 +5029 +5030 +5031 +5032 +5033 +5034 +5035 +5036 +5037 +5038 +5039 +5040 +5041 +5042 +5043 +5044 +5045 +5046 +5047 +5048 +5049 +5050 +5051 +5052 +5053 +5054 +5055 +5056 +5057 +5058 +5059 +5060 +5061 +5062 +5063 +5064 +5065 +5066 +5067 +5068 +5069 +5070 +5071 +5072 +5073 +5074 +5075 +5076 +5077 +5078 +5079 +5080 +5081 +5082 +5083 +5084 +5085 +5086 +5087 +5088 +5089 +5090 +5091 +5092 +5093 +5094 +5095 +5096 +5097 +5098 +5099 +5100 +5101 +5102 +5103 +5104 +5105 +5106 +5107 +5108 +5109 +5110 +5111 +5112 +5113 +5114 +5115 +5116 +5117 +5118 +5119 +5120 +5121 +5122 +5123 +5124 +5125 +5126 +5127 +5128 +5129 +5130 +5131 +5132 +5133 +5134 +5135 +5136 +5137 +5138 +5139 +5140 +5141 +5142 +5143 +5144 +5145 +5146 +5147 +5148 +5149 +5150 +5151 +5152 +5153 +5154 +5155 +5156 +5157 +5158 +5159 +5160 +5161 +5162 +5163 +5164 +5165 +5166 +5167 +5168 +5169 +5170 +5171 +5172 +5173 +5174 +5175 +5176 +5177 +5178 +5179 +5180 +5181 +5182 +5183 +5184 +5185 +5186 +5187 +5188 +5189 +5190 +5191 +5192 +5193 +5194 +5195 +5196 +5197 +5198 +5199 +5200 +5201 +5202 +5203 +5204 +5205 +5206 +5207 +5208 +5209 +5210 +5211 +5212 +5213 +5214 +5215 +5216 +5217 +5218 +5219 +5220 +5221 +5222 +5223 +5224 +5225 +5226 +5227 +5228 +5229 +5230 +5231 +5232 +5233 +5234 +5235 +5236 +5237 +5238 +5239 +5240 +5241 +5242 +5243 +5244 +5245 +5246 +5247 +5248 +5249 +5250 +5251 +5252 +5253 +5254 +5255 +5256 +5257 +5258 +5259 +5260 +5261 +5262 +5263 +5264 +5265 +5266 +5267 +5268 +5269 +5270 +5271 +5272 +5273 +5274 +5275 +5276 +5277 +5278 +5279 +5280 +5281 +5282 +5283 +5284 +5285 +5286 +5287 +5288 +5289 +5290 +5291 +5292 +5293 +5294 +5295 +5296 +5297 +5298 +5299 +5300 +5301 +5302 +5303 +5304 +5305 +5306 +5307 +5308 +5309 +5310 +5311 +5312 +5313 +5314 +5315 +5316 +5317 +5318 +5319 +5320 +5321 +5322 +5323 +5324 +5325 +5326 +5327 +5328 +5329 +5330 +5331 +5332 +5333 +5334 +5335 +5336 +5337 +5338 +5339 +5340 +5341 +5342 +5343 +5344 +5345 +5346 +5347 +5348 +5349 +5350 +5351 +5352 +5353 +5354 +5355 +5356 +5357 +5358 +5359 +5360 +5361 +5362 +5363 +5364 +5365 +5366 +5367 +5368 +5369 +5370 +5371 +5372 +5373 +5374 +5375 +5376 +5377 +5378 +5379 +5380 +5381 +5382 +5383 +5384 +5385 +5386 +5387 +5388 +5389 +5390 +5391 +5392 +5393 +5394 +5395 +5396 +5397 +5398 +5399 +5400 +5401 +5402 +5403 +5404 +5405 +5406 +5407 +5408 +5409 +5410 +5411 +5412 +5413 +5414 +5415 +5416 +5417 +5418 +5419 +5420 +5421 +5422 +5423 +5424 +5425 +5426 +5427 +5428 +5429 +5430 +5431 +5432 +5433 +5434 +5435 +5436 +5437 +5438 +5439 +5440 +5441 +5442 +5443 +5444 +5445 +5446 +5447 +5448 +5449 +5450 +5451 +5452 +5453 +5454 +5455 +5456 +5457 +5458 +5459 +5460 +5461 +5462 +5463 +5464 +5465 +5466 +5467 +5468 +5469 +5470 +5471 +5472 +5473 +5474 +5475 +5476 +5477 +5478 +5479 +5480 +5481 +5482 +5483 +5484 +5485 +5486 +5487 +5488 +5489 +5490 +5491 +5492 +5493 +5494 +5495 +5496 +5497 +5498 +5499 +5500 +5501 +5502 +5503 +5504 +5505 +5506 +5507 +5508 +5509 +5510 +5511 +5512 +5513 +5514 +5515 +5516 +5517 +5518 +5519 +5520 +5521 +5522 +5523 +5524 +5525 +5526 +5527 +5528 +5529 +5530 +5531 +5532 +5533 +5534 +5535 +5536 +5537 +5538 +5539 +5540 +5541 +5542 +5543 +5544 +5545 +5546 +5547 +5548 +5549 +5550 +5551 +5552 +5553 +5554 +5555 +5556 +5557 +5558 +5559 +5560 +5561 +5562 +5563 +5564 +5565 +5566 +5567 +5568 +5569 +5570 +5571 +5572 +5573 +5574 +5575 +5576 +5577 +5578 +5579 +5580 +5581 +5582 +5583 +5584 +5585 +5586 +5587 +5588 +5589 +5590 +5591 +5592 +5593 +5594 +5595 +5596 +5597 +5598 +5599 +5600 +5601 +5602 +5603 +5604 +5605 +5606 +5607 +5608 +5609 +5610 +5611 +5612 +5613 +5614 +5615 +5616 +5617 +5618 +5619 +5620 +5621 +5622 +5623 +5624 +5625 +5626 +5627 +5628 +5629 +5630 +5631 +5632 +5633 +5634 +5635 +5636 +5637 +5638 +5639 +5640 +5641 +5642 +5643 +5644 +5645 +5646 +5647 +5648 +5649 +5650 +5651 +5652 +5653 +5654 +5655 +5656 +5657 +5658 +5659 +5660 +5661 +5662 +5663 +5664 +5665 +5666 +5667 +5668 +5669 +5670 +5671 +5672 +5673 +5674 +5675 +5676 +5677 +5678 +5679 +5680 +5681 +5682 +5683 +5684 +5685 +5686 +5687 +5688 +5689 +5690 +5691 +5692 +5693 +5694 +5695 +5696 +5697 +5698 +5699 +5700 +5701 +5702 +5703 +5704 +5705 +5706 +5707 +5708 +5709 +5710 +5711 +5712 +5713 +5714 +5715 +5716 +5717 +5718 +5719 +5720 +5721 +5722 +5723 +5724 +5725 +5726 +5727 +5728 +5729 +5730 +5731 +5732 +5733 +5734 +5735 +5736 +5737 +5738 +5739 +5740 +5741 +5742 +5743 +5744 +5745 +5746 +5747 +5748 +5749 +5750 +5751 +5752 +5753 +5754 +5755 +5756 +5757 +5758 +5759 +5760 +5761 +5762 +5763 +5764 +5765 +5766 +5767 +5768 +5769 +5770 +5771 +5772 +5773 +5774 +5775 +5776 +5777 +5778 +5779 +5780 +5781 +5782 +5783 +5784 +5785 +5786 +5787 +5788 +5789 +5790 +5791 +5792 +5793 +5794 +5795 +5796 +5797 +5798 +5799 +5800 +5801 +5802 +5803 +5804 +5805 +5806 +5807 +5808 +5809 +5810 +5811 +5812 +5813 +5814 +5815 +5816 +5817 +5818 +5819 +5820 +5821 +5822 +5823 +5824 +5825 +5826 +5827 +5828 +5829 +5830 +5831 +5832 +5833 +5834 +5835 +5836 +5837 +5838 +5839 +5840 +5841 +5842 +5843 +5844 +5845 +5846 +5847 +5848 +5849 +5850 +5851 +5852 +5853 +5854 +5855 +5856 +5857 +5858 +5859 +5860 +5861 +5862 +5863 +5864 +5865 +5866 +5867 +5868 +5869 +5870 +5871 +5872 +5873 +5874 +5875 +5876 +5877 +5878 +5879 +5880 +5881 +5882 +5883 +5884 +5885 +5886 +5887 +5888 +5889 +5890 +5891 +5892 +5893 +5894 +5895 +5896 +5897 +5898 +5899 +5900 +5901 +5902 +5903 +5904 +5905 +5906 +5907 +5908 +5909 +5910 +5911 +5912 +5913 +5914 +5915 +5916 +5917 +5918 +5919 +5920 +5921 +5922 +5923 +5924 +5925 +5926 +5927 +5928 +5929 +5930 +5931 +5932 +5933 +5934 +5935 +5936 +5937 +5938 +5939 +5940 +5941 +5942 +5943 +5944 +5945 +5946 +5947 +5948 +5949 +5950 +5951 +5952 +5953 +5954 +5955 +5956 +5957 +5958 +5959 +5960 +5961 +5962 +5963 +5964 +5965 +5966 +5967 +5968 +5969 +5970 +5971 +5972 +5973 +5974 +5975 +5976 +5977 +5978 +5979 +5980 +5981 +5982 +5983 +5984 +5985 +5986 +5987 +5988 +5989 +5990 +5991 +5992 +5993 +5994 +5995 +5996 +5997 +5998 +5999 +6000 +6001 +6002 +6003 +6004 +6005 +6006 +6007 +6008 +6009 +6010 +6011 +6012 +6013 +6014 +6015 +6016 +6017 +6018 +6019 +6020 +6021 +6022 +6023 +6024 +6025 +6026 +6027 +6028 +6029 +6030 +6031 +6032 +6033 +6034 +6035 +6036 +6037 +6038 +6039 +6040 +6041 +6042 +6043 +6044 +6045 +6046 +6047 +6048 +6049 +6050 +6051 +6052 +6053 +6054 +6055 +6056 +6057 +6058 +6059 +6060 +6061 +6062 +6063 +6064 +6065 +6066 +6067 +6068 +6069 +6070 +6071 +6072 +6073 +6074 +6075 +6076 +6077 +6078 +6079 +6080 +6081 +6082 +6083 +6084 +6085 +6086 +6087 +6088 +6089 +6090 +6091 +6092 +6093 +6094 +6095 +6096 +6097 +6098 +6099 +6100 +6101 +6102 +6103 +6104 +6105 +6106 +6107 +6108 +6109 +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/g b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/g new file mode 100644 index 0000000000000000000000000000000000000000..474a1c1fae22cc41afb8b3867db4620c84263aa2 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (4.905 0 -8.4957); + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/transportProperties b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..429cb8bc3ffd5ba42fc00037b783c2cdf5e3f7c2 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/constant/transportProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +mug mug [0 2 -1 0 0 0 0] 0; +mul mul [0 2 -1 0 0 0 0] 1e-3; + +rhog rhog [ 1 -3 0 0 0 0 0 ] 1; +rhol rhol [ 1 -3 0 0 0 0 0 ] 100; + +sigma sigma [ 1 0 -2 0 0 0 0 ] 0.1; + +h0 h0 [ 0 1 0 0 0 0 0] 1e-10; + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/blockMeshDict b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..a61d185662327f31a07824b316339ab9120c3a89 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/blockMeshDict @@ -0,0 +1,162 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.016; + +vertices +( + (0.5 0 0) + (1 0 0) + (2 0 0) + (2 0.707107 0) + (0.707107 0.707107 0) + (0.353553 0.353553 0) + (2 2 0) + (0.707107 2 0) + (0 2 0) + (0 1 0) + (0 0.5 0) + (-0.5 0 0) + (-1 0 0) + (-2 0 0) + (-2 0.707107 0) + (-0.707107 0.707107 0) + (-0.353553 0.353553 0) + (-2 2 0) + (-0.707107 2 0) + + (0.5 0 0.5) + (1 0 0.5) + (2 0 0.5) + (2 0.707107 0.5) + (0.707107 0.707107 0.5) + (0.353553 0.353553 0.5) + (2 2 0.5) + (0.707107 2 0.5) + (0 2 0.5) + (0 1 0.5) + (0 0.5 0.5) + (-0.5 0 0.5) + (-1 0 0.5) + (-2 0 0.5) + (-2 0.707107 0.5) + (-0.707107 0.707107 0.5) + (-0.353553 0.353553 0.5) + (-2 2 0.5) + (-0.707107 2 0.5) +); + +blocks +( + hex (5 4 9 10 24 23 28 29) (10 10 1) simpleGrading (1 1 1) + hex (0 1 4 5 19 20 23 24) (10 10 1) simpleGrading (1 1 1) + hex (1 2 3 4 20 21 22 23) (20 10 1) simpleGrading (1 1 1) + hex (4 3 6 7 23 22 25 26) (20 20 1) simpleGrading (1 1 1) + hex (9 4 7 8 28 23 26 27) (10 20 1) simpleGrading (1 1 1) + hex (15 16 10 9 34 35 29 28) (10 10 1) simpleGrading (1 1 1) + hex (12 11 16 15 31 30 35 34) (10 10 1) simpleGrading (1 1 1) + hex (13 12 15 14 32 31 34 33) (20 10 1) simpleGrading (1 1 1) + hex (14 15 18 17 33 34 37 36) (20 20 1) simpleGrading (1 1 1) + hex (15 9 8 18 34 28 27 37) (10 20 1) simpleGrading (1 1 1) +); + +edges +( + arc 0 5 (0.469846 0.17101 0) + arc 5 10 (0.17101 0.469846 0) + arc 1 4 (0.939693 0.34202 0) + arc 4 9 (0.34202 0.939693 0) + arc 19 24 (0.469846 0.17101 0.5) + arc 24 29 (0.17101 0.469846 0.5) + arc 20 23 (0.939693 0.34202 0.5) + arc 23 28 (0.34202 0.939693 0.5) + arc 11 16 (-0.469846 0.17101 0) + arc 16 10 (-0.17101 0.469846 0) + arc 12 15 (-0.939693 0.34202 0) + arc 15 9 (-0.34202 0.939693 0) + arc 30 35 (-0.469846 0.17101 0.5) + arc 35 29 (-0.17101 0.469846 0.5) + arc 31 34 (-0.939693 0.34202 0.5) + arc 34 28 (-0.34202 0.939693 0.5) +); + +patches +( + symmetry symmetry + ( + (0 1 20 19) + (1 2 21 20) + (12 11 30 31) + (13 12 31 32) + ) + patch outlet + ( + (2 3 22 21) + (3 6 25 22) + ) + patch side + ( + (7 8 27 26) + (6 7 26 25) + (8 18 37 27) + (18 17 36 37) + ) + patch inlet + ( + (14 13 32 33) + (17 14 33 36) + ) + wall cylinder + ( + (10 5 24 29) + (5 0 19 24) + (16 10 29 35) + (11 16 35 30) + ) + patch film + ( + (5 4 1 0) + (4 3 2 1) + (7 6 3 4) + (8 7 4 9) + (9 4 5 10) + (18 8 9 15) + (15 9 10 16) + (17 18 15 14) + (14 15 12 13) + (15 16 11 12) + ) + patch top + ( + (19 20 23 24) + (20 21 22 23) + (23 22 25 26) + (29 24 23 28) + (28 23 26 27) + (35 29 28 34) + (34 28 27 37) + (32 31 34 33) + (33 34 37 36) + (31 30 35 34) + ) +); + +mergePatchPairs +( +); + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/controlDict b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..dbc8dd2a72865c8f42e5155763a2f9b72bd8aa85 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/controlDict @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs +( + "liblduSolvers.so" +) + +application liquidFilmFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.0002; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 5; + +maxDeltaT 0.1; + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSchemes b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSchemes new file mode 100644 index 0000000000000000000000000000000000000000..831585e90aa470bc3985bcc2fb6cdb0884e2e19c --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSchemes @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + ddt(h,Us) Euler; + ddt(h) Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phis,h) Gauss Gamma 0.5; + div(phi2s,Us) Gauss linearUpwind; +} + +laplacianSchemes +{ + default none; + laplacian(h) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSolution b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSolution new file mode 100644 index 0000000000000000000000000000000000000000..afb0bd268a31a358bf95e835a8315948414b5936 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/faSolution @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + Us + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-07; + relTol 0.01; + } + + h + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-07; + relTol 0.01; + } +} + +nOuterCorrectors 15; + +relaxationFactors +{ + h 0.5; + Us 0.5; +} + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/fvSchemes b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..80abef1dc50b9d61a6990f0f900b56730f025659 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/fvSchemes @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default none; +} + +gradSchemes +{ + default none; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; +} + +interpolationSchemes +{ + default none; +} + +snGradSchemes +{ + default none; +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/liquidFilmFoam/cylinder/system/fvSolution b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..13739aa7057b9502994722907ffba9ef76c153b9 --- /dev/null +++ b/tutorials/finiteArea/liquidFilmFoam/cylinder/system/fvSolution @@ -0,0 +1,19 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/0/Cs b/tutorials/finiteArea/sphereTransport/0/Cs new file mode 100644 index 0000000000000000000000000000000000000000..a0a0b7fda7f57b4138322445a95d401becb76886 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/0/Cs @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + location "0"; + object Cs; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -2 0 0 0 0 0]; + +internalField uniform 0; + +referenceLevel 0; + +boundaryField +{ +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/sphereTransport/0/Cvf b/tutorials/finiteArea/sphereTransport/0/Cvf new file mode 100644 index 0000000000000000000000000000000000000000..a693153779c829b9431d2b576244d2095157d6ca --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/0/Cvf @@ -0,0 +1,637 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object Cvf; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -1 0 0 0 0 0]; + + +internalField uniform 0; + +boundaryField +{ + outer + { + type calculated; + value nonuniform List<scalar> +600 +( +0.348943 +0.476101 +0.616384 +0.766135 +0.921548 +0.356306 +0.481012 +0.619778 +0.768336 +0.922379 +0.377139 +0.496138 +0.630511 +0.775003 +0.924894 +0.405258 +0.516249 +0.643909 +0.783663 +0.928214 +0.435004 +0.532596 +0.653511 +0.789268 +0.93059 +0.930107 +0.927725 +0.924605 +0.922458 +0.921832 +0.789466 +0.783664 +0.774232 +0.76854 +0.766506 +0.653551 +0.643067 +0.629552 +0.62035 +0.617113 +0.531965 +0.515366 +0.49608 +0.48233 +0.477801 +0.434902 +0.406247 +0.379363 +0.35886 +0.350129 +0.240238 +0.148513 +0.0780792 +0.030225 +0.00605315 +0.252478 +0.164769 +0.0975922 +0.0526838 +0.0302134 +0.279804 +0.19911 +0.137985 +0.0977651 +0.0779713 +0.319125 +0.250333 +0.198837 +0.164283 +0.148215 +0.36463 +0.317854 +0.278039 +0.250799 +0.239222 +1.07005 +1.07279 +1.07582 +1.07812 +1.07863 +1.21168 +1.2186 +1.22764 +1.23355 +1.23457 +1.34774 +1.35941 +1.37293 +1.38254 +1.38436 +1.46873 +1.48683 +1.50668 +1.52025 +1.52426 +1.5658 +1.59657 +1.62468 +1.64451 +1.65126 +1.76106 +1.85216 +1.92235 +1.9699 +1.99394 +1.7502 +1.83695 +1.90304 +1.94725 +1.96964 +1.72349 +1.80264 +1.86229 +1.9015 +1.92154 +1.68321 +1.75047 +1.80008 +1.83387 +1.85086 +1.63568 +1.68045 +1.71871 +1.74615 +1.75949 +1.64961 +1.52189 +1.38227 +1.23306 +1.07801 +1.64011 +1.51615 +1.37793 +1.22974 +1.07677 +1.61876 +1.50111 +1.36751 +1.22355 +1.07442 +1.59195 +1.48204 +1.35473 +1.21478 +1.07134 +1.56431 +1.46714 +1.34611 +1.21019 +1.06941 +1.75792 +1.84994 +1.92096 +1.9693 +1.99382 +1.74018 +1.82936 +1.89804 +1.94486 +1.96904 +1.70651 +1.78937 +1.85302 +1.89669 +1.92019 +1.65989 +1.73124 +1.78652 +1.82621 +1.84851 +1.60748 +1.65628 +1.70051 +1.73459 +1.75556 +1.6449 +1.51846 +1.37935 +1.23125 +1.07753 +1.62661 +1.50373 +1.36831 +1.22441 +1.07515 +1.59818 +1.48132 +1.35211 +1.21446 +1.07137 +1.5653 +1.45724 +1.33671 +1.20522 +1.06817 +1.53456 +1.44078 +1.32735 +1.19987 +1.06612 +1.06583 +1.06858 +1.07294 +1.07609 +1.07779 +1.19924 +1.20597 +1.21788 +1.22709 +1.23219 +1.32847 +1.3406 +1.358 +1.37281 +1.38104 +1.44285 +1.46332 +1.4886 +1.50963 +1.52006 +1.53679 +1.5703 +1.60536 +1.63312 +1.64757 +0.350388 +0.478114 +0.617731 +0.766941 +0.92199 +0.359881 +0.483846 +0.622067 +0.770262 +0.923231 +0.38123 +0.49888 +0.632488 +0.776446 +0.925576 +0.40804 +0.517956 +0.645263 +0.785224 +0.928656 +0.435681 +0.532851 +0.653885 +0.789807 +0.930589 +0.929952 +0.927211 +0.924181 +0.921882 +0.921369 +0.788324 +0.781403 +0.772359 +0.766454 +0.765429 +0.652252 +0.640585 +0.627072 +0.617462 +0.615643 +0.531262 +0.513157 +0.493317 +0.479747 +0.475743 +0.434186 +0.403424 +0.375315 +0.355488 +0.348736 +0.238945 +0.147843 +0.0776541 +0.0301033 +0.00605517 +0.249794 +0.163051 +0.0969598 +0.0527514 +0.0303636 +0.276507 +0.197359 +0.13771 +0.0984969 +0.0784608 +0.316785 +0.249528 +0.199922 +0.166131 +0.149143 +0.364309 +0.31954 +0.281289 +0.253852 +0.240507 +1.76106 +1.85216 +1.92235 +1.9699 +1.99394 +1.75021 +1.83696 +1.90304 +1.94725 +1.96964 +1.7235 +1.80265 +1.86229 +1.9015 +1.92154 +1.68321 +1.75048 +1.80008 +1.83387 +1.85086 +1.63569 +1.68046 +1.71871 +1.74615 +1.75949 +1.64961 +1.52189 +1.38227 +1.23306 +1.07801 +1.64011 +1.51615 +1.37793 +1.22974 +1.07677 +1.61876 +1.50111 +1.36751 +1.22355 +1.07442 +1.59196 +1.48204 +1.35473 +1.21478 +1.07134 +1.56432 +1.46715 +1.34611 +1.21019 +1.06941 +1.07005 +1.07279 +1.07582 +1.07812 +1.07863 +1.21168 +1.2186 +1.22764 +1.23355 +1.23457 +1.34775 +1.35942 +1.37293 +1.38254 +1.38436 +1.46874 +1.48684 +1.50668 +1.52025 +1.52426 +1.56581 +1.59657 +1.62468 +1.64451 +1.65126 +0.930107 +0.927725 +0.924606 +0.922458 +0.921832 +0.789466 +0.783664 +0.774232 +0.76854 +0.766506 +0.653562 +0.64308 +0.629555 +0.620351 +0.617113 +0.531967 +0.515379 +0.496084 +0.482331 +0.477802 +0.434894 +0.406249 +0.379365 +0.358861 +0.350129 +0.240238 +0.148513 +0.0780792 +0.030225 +0.00605315 +0.252479 +0.164769 +0.0975922 +0.0526838 +0.0302134 +0.279805 +0.199111 +0.137986 +0.0977653 +0.0779714 +0.319127 +0.250335 +0.198838 +0.164283 +0.148215 +0.364629 +0.317855 +0.278042 +0.2508 +0.239222 +0.348944 +0.476101 +0.616384 +0.766135 +0.921548 +0.356308 +0.481012 +0.619778 +0.768336 +0.922379 +0.377141 +0.496141 +0.630512 +0.775003 +0.924894 +0.405258 +0.516249 +0.643911 +0.783664 +0.928214 +0.434993 +0.53259 +0.653512 +0.789268 +0.93059 +1.06989 +1.07228 +1.07539 +1.07754 +1.07817 +1.21053 +1.21634 +1.22577 +1.23146 +1.23349 +1.34644 +1.35692 +1.37044 +1.37965 +1.38289 +1.46803 +1.48462 +1.50392 +1.51767 +1.5222 +1.56511 +1.59375 +1.62064 +1.64114 +1.64987 +1.75976 +1.85149 +1.92192 +1.96977 +1.99395 +1.74752 +1.83523 +1.90241 +1.94732 +1.96979 +1.72019 +1.80089 +1.86201 +1.90223 +1.92203 +1.68087 +1.74967 +1.80116 +1.83572 +1.85178 +1.63537 +1.68214 +1.72196 +1.7492 +1.76078 +1.65106 +1.5239 +1.38362 +1.23387 +1.07845 +1.64369 +1.51899 +1.38022 +1.23166 +1.07762 +1.62286 +1.50386 +1.36949 +1.225 +1.07511 +1.59474 +1.48375 +1.35609 +1.21634 +1.07179 +1.56501 +1.46741 +1.34649 +1.21073 +1.06941 +0.244265 +0.151271 +0.0795249 +0.0308113 +0.00617021 +0.264719 +0.173068 +0.10265 +0.0550666 +0.0308156 +0.298372 +0.21278 +0.146814 +0.102366 +0.0793794 +0.343215 +0.268974 +0.211167 +0.171406 +0.150274 +0.392761 +0.340891 +0.294473 +0.260235 +0.242325 +0.352754 +0.480259 +0.61957 +0.768196 +0.92233 +0.367628 +0.492209 +0.628883 +0.774495 +0.924569 +0.396526 +0.514457 +0.644934 +0.784123 +0.927909 +0.431672 +0.539696 +0.662147 +0.795759 +0.932188 +0.464189 +0.558387 +0.672626 +0.801918 +0.93473 +0.93474 +0.932335 +0.928286 +0.924613 +0.922378 +0.801497 +0.795382 +0.784442 +0.774301 +0.768212 +0.672617 +0.661661 +0.645246 +0.629251 +0.619849 +0.558078 +0.539734 +0.515622 +0.494365 +0.480935 +0.464723 +0.432967 +0.399936 +0.372307 +0.354783 +) +; + } +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/0/U b/tutorials/finiteArea/sphereTransport/0/U new file mode 100644 index 0000000000000000000000000000000000000000..5f69e1b687aed2c63bc2fca791ac53b48b4bb80e --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/0/U @@ -0,0 +1,637 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + + +internalField uniform (0 0 0); + +boundaryField +{ + outer + { + type calculated; + value nonuniform List<vector> +600 +( +(-0.144039 -0.122998 0.0114965) +(-0.181448 -0.111056 0.00942614) +(-0.213291 -0.0880811 0.007138) +(-0.236364 -0.0565118 0.00450908) +(-0.248464 -0.0194524 0.00153468) +(-0.146423 -0.118314 0.0341417) +(-0.182731 -0.107182 0.0280504) +(-0.213935 -0.0851149 0.0212509) +(-0.236606 -0.054634 0.013365) +(-0.248488 -0.0188791 0.00455398) +(-0.153112 -0.10914 0.0538318) +(-0.186618 -0.0990266 0.0447246) +(-0.215938 -0.0786515 0.0339405) +(-0.237377 -0.0503611 0.0212629) +(-0.248596 -0.0172067 0.0071616) +(-0.16157 -0.0976548 0.0689292) +(-0.191706 -0.0880897 0.0579906) +(-0.218409 -0.0699808 0.0444412) +(-0.23834 -0.0446595 0.0278309) +(-0.248715 -0.0152054 0.00934666) +(-0.170632 -0.0852947 0.0784703) +(-0.195686 -0.0765875 0.0684611) +(-0.220138 -0.0608045 0.0532793) +(-0.238957 -0.038766 0.0334866) +(-0.248811 -0.012977 0.0111145) +(-0.248784 -0.0112606 0.0132061) +(-0.248696 -0.00937438 0.0153538) +(-0.248589 -0.00711991 0.0172503) +(-0.2485 -0.0044843 0.0187583) +(-0.248485 -0.00150553 0.0192655) +(-0.238984 -0.0330868 0.0390063) +(-0.238377 -0.0272811 0.0447994) +(-0.237296 -0.0208834 0.0506849) +(-0.236658 -0.0129988 0.0545496) +(-0.236419 -0.0043873 0.0563854) +(-0.220164 -0.051969 0.0618465) +(-0.218278 -0.0431521 0.0709232) +(-0.215826 -0.0327547 0.0791778) +(-0.214077 -0.0204265 0.0851196) +(-0.213434 -0.00688488 0.0879546) +(-0.195591 -0.0660657 0.0786632) +(-0.191524 -0.0555398 0.0897455) +(-0.186575 -0.0425237 0.100053) +(-0.18303 -0.0264223 0.107485) +(-0.18197 -0.00883432 0.11075) +(-0.170654 -0.075233 0.0880783) +(-0.161849 -0.0655638 0.0998622) +(-0.15377 -0.0507596 0.110471) +(-0.147257 -0.0317426 0.118812) +(-0.144402 -0.0106058 0.123044) +(-0.105683 -0.0123962 0.122882) +(-0.0686226 -0.0144134 0.110764) +(-0.0374066 -0.016537 0.0877846) +(-0.0148277 -0.0182814 0.0562757) +(-0.00299764 -0.0192895 0.0193205) +(-0.110214 -0.0371198 0.118536) +(-0.0755021 -0.042749 0.106636) +(-0.0462643 -0.0486662 0.0842315) +(-0.025562 -0.0534726 0.0538448) +(-0.0148321 -0.0562073 0.0184491) +(-0.12008 -0.0590575 0.110342) +(-0.0894293 -0.0678333 0.0990552) +(-0.0640459 -0.0765274 0.0781011) +(-0.0464066 -0.0836612 0.049704) +(-0.0373747 -0.0876651 0.0168642) +(-0.133748 -0.0754512 0.0997192) +(-0.109048 -0.086537 0.0894121) +(-0.0893197 -0.0971459 0.0704853) +(-0.0752871 -0.105707 0.0447938) +(-0.0685588 -0.110568 0.015114) +(-0.148161 -0.0857842 0.0891989) +(-0.133343 -0.0969705 0.0789527) +(-0.119475 -0.108487 0.0622865) +(-0.109603 -0.117627 0.0396197) +(-0.105303 -0.122717 0.0133301) +(-0.248788 0.0131134 -0.0112216) +(-0.248675 0.0154715 -0.00949903) +(-0.248569 0.0173824 -0.00721385) +(-0.248474 0.0189387 -0.0045554) +(-0.24846 0.0194691 -0.00153419) +(-0.238857 0.0389629 -0.0335961) +(-0.23809 0.0451867 -0.0280139) +(-0.237082 0.0509588 -0.0213612) +(-0.236397 0.0550347 -0.0133718) +(-0.23628 0.0566779 -0.00450739) +(-0.219901 0.061151 -0.0533505) +(-0.217815 0.0706865 -0.0445694) +(-0.215357 0.0792389 -0.0339132) +(-0.213465 0.085639 -0.0212737) +(-0.213142 0.0882414 -0.00712572) +(-0.195394 0.0768716 -0.0684102) +(-0.190997 0.0886223 -0.0579055) +(-0.185876 0.0995396 -0.0446841) +(-0.182391 0.107369 -0.0280865) +(-0.18135 0.11111 -0.00942625) +(-0.170423 0.0854309 -0.0784136) +(-0.161031 0.0978751 -0.0688937) +(-0.152476 0.109362 -0.0538695) +(-0.146162 0.118351 -0.034171) +(-0.143976 0.123003 -0.011501) +(-0.105202 0.122698 -0.0133195) +(-0.0683967 0.110489 -0.0151145) +(-0.0372205 0.0875138 -0.0169067) +(-0.0147743 0.0560846 -0.018507) +(-0.00299899 0.0192675 -0.0193487) +(-0.109237 0.117573 -0.0396024) +(-0.0747715 0.105464 -0.0447933) +(-0.0459888 0.0832069 -0.0499403) +(-0.025599 0.0531611 -0.0542088) +(-0.0148989 0.0182218 -0.0564253) +(-0.118869 0.108419 -0.0624544) +(-0.0887357 0.0967047 -0.0707794) +(-0.0639119 0.075987 -0.0785474) +(-0.0467047 0.0483629 -0.0847671) +(-0.0375873 0.0164516 -0.0879737) +(-0.13298 0.0968228 -0.0791705) +(-0.108712 0.0860812 -0.089839) +(-0.0897837 0.0674256 -0.0994232) +(-0.0760466 0.0428113 -0.10689) +(-0.0689301 0.0145077 -0.110864) +(-0.148049 0.0857207 -0.0893066) +(-0.133901 0.0752034 -0.0998817) +(-0.120683 0.0588988 -0.110376) +(-0.11075 0.037301 -0.118521) +(-0.105756 0.0125582 -0.122907) +(-0.144493 0.0106926 -0.123015) +(-0.182053 0.00892928 -0.110698) +(-0.213562 0.00695271 -0.0878062) +(-0.236461 0.00442062 -0.056321) +(-0.248488 0.0015073 -0.0192574) +(-0.147589 0.0318768 -0.118712) +(-0.183444 0.0265585 -0.1072) +(-0.214389 0.0205304 -0.0847864) +(-0.236858 0.0129899 -0.0541347) +(-0.248528 0.00445155 -0.0185903) +(-0.154382 0.0507592 -0.110275) +(-0.187305 0.0426137 -0.0995325) +(-0.216354 0.0327748 -0.0785821) +(-0.237536 0.0207857 -0.0502103) +(-0.248626 0.00703653 -0.0170177) +(-0.162406 0.0655301 -0.0996478) +(-0.192131 0.0556221 -0.0892713) +(-0.218666 0.043158 -0.0704108) +(-0.238544 0.0271822 -0.0444383) +(-0.248732 0.00924505 -0.0151308) +(-0.170852 0.0752883 -0.0879654) +(-0.195769 0.066205 -0.0784359) +(-0.220244 0.0520421 -0.0616178) +(-0.239026 0.0330541 -0.0388932) +(-0.248801 0.0111854 -0.0131073) +(-0.106338 0.0132773 0.122935) +(-0.0692896 0.015476 0.11095) +(-0.0378737 0.0174635 0.0880333) +(-0.0150886 0.0189321 0.0565041) +(-0.00307458 0.0195367 0.0194581) +(-0.11297 0.0391875 0.118155) +(-0.077895 0.0453619 0.106697) +(-0.0482707 0.0511356 0.0845614) +(-0.0267635 0.0551787 0.0542396) +(-0.015214 0.0568337 0.018672) +(-0.124977 0.0615357 0.109073) +(-0.0940346 0.0710128 0.0983384) +(-0.0679086 0.079607 0.0779317) +(-0.0489046 0.0857895 0.0499541) +(-0.0382349 0.0884528 0.0171005) +(-0.140735 0.0776099 0.0972337) +(-0.115921 0.0892622 0.087603) +(-0.0951573 0.0997499 0.0695093) +(-0.0792482 0.107519 0.0446664) +(-0.0699467 0.111247 0.0152752) +(-0.156822 0.0867719 0.0855031) +(-0.141957 0.0982113 0.0760485) +(-0.127103 0.109594 0.060536) +(-0.115023 0.118425 0.0389714) +(-0.107268 0.12303 0.0133456) +(-0.146007 0.122724 0.0112889) +(-0.182851 0.110368 0.00918576) +(-0.214107 0.0872693 0.00693435) +(-0.236674 0.0558898 0.00439735) +(-0.248504 0.0191824 0.0015027) +(-0.151828 0.117535 0.0330677) +(-0.186618 0.10531 0.0269203) +(-0.216167 0.0829524 0.0203064) +(-0.237439 0.0530218 0.0128087) +(-0.248586 0.0182433 0.00437846) +(-0.160638 0.10808 0.0514772) +(-0.19217 0.0964371 0.0423272) +(-0.21908 0.0757193 0.0319615) +(-0.238539 0.0481759 0.0200879) +(-0.248736 0.016314 0.00675686) +(-0.170132 0.0965276 0.0653082) +(-0.197959 0.0854104 0.0543124) +(-0.221772 0.0670738 0.0416236) +(-0.23952 0.0425817 0.0261657) +(-0.248845 0.0144131 0.00882483) +(-0.179015 0.0844053 0.0739542) +(-0.201755 0.0744732 0.0640722) +(-0.223387 0.0584271 0.0498697) +(-0.240081 0.0370286 0.0315166) +(-0.248926 0.0123367 0.0105118) +(-0.248923 0.0106295 0.0123934) +(-0.248822 0.00896602 0.0146075) +(-0.248675 0.00694599 0.0167378) +(-0.24855 0.00444121 0.0184747) +(-0.248493 0.0015115 0.0192574) +(-0.240147 0.0316539 0.0366921) +(-0.239463 0.0264043 0.0425287) +(-0.238154 0.0205467 0.0489198) +(-0.237127 0.0130228 0.053646) +(-0.23656 0.00444385 0.0561286) +(-0.223209 0.0504654 0.0582002) +(-0.221107 0.0425079 0.0674834) +(-0.218045 0.0328043 0.0766162) +(-0.215351 0.0207771 0.0836989) +(-0.21376 0.00707837 0.0876468) +(-0.201349 0.0650272 0.0739739) +(-0.196485 0.0556769 0.0858899) +(-0.190397 0.0432732 0.0972409) +(-0.185082 0.0273587 0.10613) +(-0.182515 0.00925792 0.110449) +(-0.178368 0.0753042 0.083694) +(-0.168748 0.0665551 0.0962649) +(-0.158441 0.0523487 0.108408) +(-0.149802 0.0332652 0.117899) +(-0.145145 0.0112391 0.122871) +(-0.144493 -0.0106925 -0.123015) +(-0.182053 -0.00892927 -0.110698) +(-0.213562 -0.00695271 -0.0878062) +(-0.236461 -0.00442062 -0.056321) +(-0.248488 -0.0015073 -0.0192574) +(-0.147585 -0.0318746 -0.118715) +(-0.183445 -0.0265565 -0.107199) +(-0.214389 -0.0205303 -0.0847865) +(-0.236858 -0.0129899 -0.0541347) +(-0.248528 -0.00445155 -0.0185903) +(-0.15438 -0.0507563 -0.110276) +(-0.187301 -0.0426124 -0.0995365) +(-0.216354 -0.0327743 -0.0785821) +(-0.237536 -0.0207856 -0.0502103) +(-0.248626 -0.00703651 -0.0170177) +(-0.162404 -0.0655298 -0.0996488) +(-0.192129 -0.0556217 -0.089273) +(-0.218665 -0.043158 -0.0704118) +(-0.238544 -0.0271822 -0.0444385) +(-0.248732 -0.00924508 -0.0151308) +(-0.170848 -0.0752891 -0.087967) +(-0.195767 -0.0662053 -0.0784369) +(-0.220244 -0.0520425 -0.0616183) +(-0.239026 -0.0330542 -0.0388934) +(-0.248801 -0.0111854 -0.0131073) +(-0.248788 -0.0131134 -0.0112216) +(-0.248675 -0.0154715 -0.00949903) +(-0.248569 -0.0173824 -0.00721385) +(-0.248474 -0.0189387 -0.0045554) +(-0.24846 -0.0194691 -0.00153419) +(-0.238857 -0.0389629 -0.0335961) +(-0.23809 -0.0451867 -0.0280139) +(-0.237082 -0.0509588 -0.0213612) +(-0.236397 -0.0550347 -0.0133718) +(-0.23628 -0.0566779 -0.00450738) +(-0.2199 -0.0611522 -0.053351) +(-0.217814 -0.070687 -0.0445694) +(-0.215357 -0.0792391 -0.0339132) +(-0.213465 -0.085639 -0.0212737) +(-0.213142 -0.0882414 -0.00712572) +(-0.195391 -0.0768728 -0.0684114) +(-0.190995 -0.088624 -0.0579062) +(-0.185875 -0.0995402 -0.0446842) +(-0.182391 -0.107369 -0.0280865) +(-0.18135 -0.11111 -0.00942624) +(-0.17042 -0.0854316 -0.0784145) +(-0.161028 -0.0978756 -0.0688944) +(-0.152475 -0.109362 -0.0538696) +(-0.146162 -0.118351 -0.0341709) +(-0.143976 -0.123003 -0.0115009) +(-0.105202 -0.122698 -0.0133195) +(-0.0683967 -0.110489 -0.0151145) +(-0.0372205 -0.0875138 -0.0169067) +(-0.0147743 -0.0560846 -0.018507) +(-0.00299899 -0.0192675 -0.0193487) +(-0.109237 -0.117573 -0.0396022) +(-0.0747713 -0.105464 -0.0447932) +(-0.0459888 -0.0832069 -0.0499403) +(-0.0255989 -0.0531611 -0.0542088) +(-0.0148989 -0.0182218 -0.0564253) +(-0.118868 -0.108419 -0.0624542) +(-0.0887351 -0.0967046 -0.0707792) +(-0.0639117 -0.075987 -0.0785473) +(-0.0467046 -0.0483629 -0.084767) +(-0.0375873 -0.0164516 -0.0879737) +(-0.132978 -0.096823 -0.0791705) +(-0.108711 -0.0860813 -0.0898387) +(-0.0897831 -0.0674256 -0.0994231) +(-0.0760464 -0.0428113 -0.10689) +(-0.0689301 -0.0145077 -0.110864) +(-0.148046 -0.0857209 -0.0893068) +(-0.133898 -0.0752039 -0.0998817) +(-0.120682 -0.0588983 -0.110376) +(-0.110748 -0.0373004 -0.118522) +(-0.105756 -0.0125582 -0.122907) +(-0.105202 -0.122698 0.0133195) +(-0.0683967 -0.110489 0.0151145) +(-0.0372205 -0.0875138 0.0169067) +(-0.0147743 -0.0560846 0.018507) +(-0.00299899 -0.0192675 0.0193487) +(-0.109238 -0.117573 0.0395986) +(-0.0747672 -0.105464 0.0447903) +(-0.0459887 -0.0832068 0.0499402) +(-0.0255989 -0.0531611 0.0542087) +(-0.0148989 -0.0182218 0.0564253) +(-0.118865 -0.108421 0.0624518) +(-0.0887339 -0.0967061 0.0707747) +(-0.0639106 -0.075987 0.0785466) +(-0.0467043 -0.0483628 0.0847668) +(-0.0375872 -0.0164515 0.0879737) +(-0.132978 -0.0968229 0.0791712) +(-0.108709 -0.0860817 0.0898379) +(-0.0897819 -0.0674258 0.0994224) +(-0.0760459 -0.0428113 0.10689) +(-0.0689299 -0.0145077 0.110864) +(-0.148046 -0.0857206 0.0893075) +(-0.133898 -0.0752035 0.0998819) +(-0.120682 -0.0588988 0.110376) +(-0.110749 -0.0373009 0.118521) +(-0.105756 -0.0125582 0.122907) +(-0.144493 -0.0106926 0.123015) +(-0.182053 -0.00892927 0.110698) +(-0.213562 -0.00695271 0.0878062) +(-0.236461 -0.00442062 0.056321) +(-0.248488 -0.0015073 0.0192574) +(-0.147588 -0.0318768 0.118712) +(-0.183444 -0.0265585 0.1072) +(-0.214389 -0.0205304 0.0847864) +(-0.236858 -0.0129899 0.0541347) +(-0.248528 -0.00445155 0.0185903) +(-0.154381 -0.0507592 0.110275) +(-0.187305 -0.0426137 0.0995325) +(-0.216354 -0.0327748 0.0785822) +(-0.237536 -0.0207857 0.0502103) +(-0.248626 -0.00703654 0.0170177) +(-0.162405 -0.06553 0.0996486) +(-0.19213 -0.0556221 0.0892718) +(-0.218666 -0.043158 0.0704109) +(-0.238544 -0.0271822 0.0444383) +(-0.248732 -0.00924505 0.0151308) +(-0.170849 -0.0752883 0.0879677) +(-0.195768 -0.0662046 0.0784366) +(-0.220244 -0.0520424 0.0616181) +(-0.239026 -0.0330542 0.0388933) +(-0.248801 -0.0111854 0.0131073) +(-0.248788 -0.0131134 0.0112216) +(-0.248675 -0.0154715 0.00949903) +(-0.248569 -0.0173824 0.00721385) +(-0.248474 -0.0189387 0.0045554) +(-0.24846 -0.0194691 0.00153419) +(-0.238857 -0.0389629 0.0335961) +(-0.23809 -0.0451867 0.0280139) +(-0.237082 -0.0509588 0.0213613) +(-0.236397 -0.0550347 0.0133718) +(-0.23628 -0.0566779 0.00450739) +(-0.2199 -0.0611522 0.0533511) +(-0.217814 -0.0706871 0.0445696) +(-0.215357 -0.0792392 0.0339133) +(-0.213465 -0.0856391 0.0212737) +(-0.213142 -0.0882414 0.00712573) +(-0.195391 -0.0768723 0.068412) +(-0.190995 -0.0886236 0.0579066) +(-0.185875 -0.0995402 0.0446846) +(-0.182391 -0.10737 0.0280866) +(-0.18135 -0.11111 0.00942626) +(-0.170421 -0.0854301 0.078415) +(-0.16103 -0.0978741 0.0688948) +(-0.152475 -0.109362 0.0538705) +(-0.146162 -0.11835 0.0341707) +(-0.143976 -0.123003 0.011501) +(-0.248784 0.0112606 -0.013206) +(-0.248696 0.00937437 -0.0153538) +(-0.248589 0.00711991 -0.0172503) +(-0.2485 0.0044843 -0.0187583) +(-0.248485 0.00150553 -0.0192655) +(-0.238984 0.0330868 -0.0390062) +(-0.238377 0.0272811 -0.0447993) +(-0.237296 0.0208834 -0.0506849) +(-0.236658 0.0129987 -0.0545496) +(-0.236419 0.0043873 -0.0563854) +(-0.220166 0.0519676 -0.0618447) +(-0.21828 0.0431506 -0.0709212) +(-0.215827 0.0327543 -0.0791771) +(-0.214077 0.0204264 -0.0851194) +(-0.213434 0.00688486 -0.0879546) +(-0.195591 0.066066 -0.0786633) +(-0.191527 0.0555389 -0.0897435) +(-0.186576 0.0425234 -0.100053) +(-0.18303 0.0264222 -0.107485) +(-0.18197 0.00883432 -0.11075) +(-0.170653 0.0752332 -0.0880785) +(-0.161849 0.0655636 -0.0998621) +(-0.153771 0.0507595 -0.110471) +(-0.147258 0.0317426 -0.118812) +(-0.144402 0.0106058 -0.123044) +(-0.105683 0.0123962 -0.122882) +(-0.0686226 0.0144134 -0.110764) +(-0.0374066 0.016537 -0.0877846) +(-0.0148277 0.0182814 -0.0562757) +(-0.00299764 0.0192895 -0.0193205) +(-0.110214 0.0371198 -0.118536) +(-0.0755022 0.042749 -0.106636) +(-0.0462643 0.0486662 -0.0842315) +(-0.025562 0.0534726 -0.0538448) +(-0.0148321 0.0562073 -0.0184491) +(-0.12008 0.0590574 -0.110342) +(-0.0894296 0.0678333 -0.0990553) +(-0.0640461 0.0765274 -0.0781012) +(-0.0464066 0.0836612 -0.0497041) +(-0.0373747 0.0876651 -0.0168643) +(-0.133749 0.075451 -0.0997194) +(-0.109049 0.0865368 -0.0894124) +(-0.0893202 0.0971459 -0.0704856) +(-0.0752873 0.105707 -0.044794) +(-0.0685589 0.110568 -0.015114) +(-0.148161 0.0857838 -0.0891993) +(-0.133343 0.0969702 -0.0789533) +(-0.119476 0.108486 -0.062287) +(-0.109603 0.117627 -0.0396199) +(-0.105303 0.122717 -0.0133301) +(-0.144039 0.122998 -0.0114965) +(-0.181448 0.111056 -0.00942614) +(-0.213291 0.0880811 -0.007138) +(-0.236364 0.0565118 -0.00450908) +(-0.248464 0.0194524 -0.00153468) +(-0.146424 0.118314 -0.034142) +(-0.182731 0.107183 -0.0280505) +(-0.213935 0.0851149 -0.0212509) +(-0.236606 0.054634 -0.013365) +(-0.248488 0.0188791 -0.00455398) +(-0.153113 0.10914 -0.0538324) +(-0.186618 0.0990259 -0.0447248) +(-0.215938 0.0786514 -0.0339406) +(-0.237377 0.0503611 -0.0212629) +(-0.248596 0.0172067 -0.0071616) +(-0.16157 0.0976543 -0.0689298) +(-0.191706 0.0880894 -0.0579909) +(-0.218409 0.0699804 -0.0444412) +(-0.23834 0.0446594 -0.0278309) +(-0.248715 0.0152054 -0.00934664) +(-0.170629 0.0852963 -0.0784714) +(-0.195685 0.0765877 -0.0684615) +(-0.220138 0.0608044 -0.0532795) +(-0.238957 0.038766 -0.0334866) +(-0.248811 0.0129769 -0.0111145) +(-0.248784 -0.0112606 -0.013206) +(-0.248696 -0.00937437 -0.0153538) +(-0.248589 -0.00711991 -0.0172503) +(-0.2485 -0.0044843 -0.0187583) +(-0.248485 -0.00150553 -0.0192655) +(-0.238984 -0.0330868 -0.0390062) +(-0.238377 -0.0272811 -0.0447993) +(-0.237296 -0.0208834 -0.0506849) +(-0.236658 -0.0129987 -0.0545496) +(-0.236419 -0.0043873 -0.0563854) +(-0.220166 -0.0519676 -0.0618447) +(-0.21828 -0.0431506 -0.0709212) +(-0.215827 -0.0327543 -0.0791771) +(-0.214077 -0.0204264 -0.0851194) +(-0.213434 -0.00688486 -0.0879546) +(-0.195591 -0.066066 -0.0786633) +(-0.191527 -0.0555389 -0.0897435) +(-0.186576 -0.0425234 -0.100053) +(-0.18303 -0.0264222 -0.107485) +(-0.18197 -0.00883432 -0.11075) +(-0.170653 -0.0752332 -0.0880785) +(-0.161849 -0.0655636 -0.0998621) +(-0.153771 -0.0507595 -0.110471) +(-0.147258 -0.0317426 -0.118812) +(-0.144402 -0.0106058 -0.123044) +(-0.105683 -0.0123962 -0.122882) +(-0.0686226 -0.0144134 -0.110764) +(-0.0374066 -0.016537 -0.0877846) +(-0.0148277 -0.0182814 -0.0562757) +(-0.00299764 -0.0192895 -0.0193205) +(-0.110214 -0.0371198 -0.118536) +(-0.0755022 -0.042749 -0.106636) +(-0.0462643 -0.0486662 -0.0842315) +(-0.025562 -0.0534726 -0.0538448) +(-0.0148321 -0.0562073 -0.0184491) +(-0.12008 -0.0590574 -0.110342) +(-0.0894296 -0.0678333 -0.0990553) +(-0.0640461 -0.0765274 -0.0781012) +(-0.0464066 -0.0836612 -0.0497041) +(-0.0373747 -0.0876651 -0.0168643) +(-0.133749 -0.075451 -0.0997194) +(-0.109049 -0.0865368 -0.0894124) +(-0.0893202 -0.0971459 -0.0704856) +(-0.0752873 -0.105707 -0.044794) +(-0.0685589 -0.110568 -0.015114) +(-0.148161 -0.0857838 -0.0891993) +(-0.133343 -0.0969702 -0.0789533) +(-0.119476 -0.108486 -0.062287) +(-0.109603 -0.117627 -0.0396199) +(-0.105303 -0.122717 -0.0133301) +(-0.144039 -0.122998 -0.0114965) +(-0.181448 -0.111056 -0.00942614) +(-0.213291 -0.0880811 -0.007138) +(-0.236364 -0.0565118 -0.00450908) +(-0.248464 -0.0194524 -0.00153468) +(-0.146424 -0.118314 -0.034142) +(-0.182731 -0.107183 -0.0280505) +(-0.213935 -0.0851149 -0.0212509) +(-0.236606 -0.054634 -0.013365) +(-0.248488 -0.0188791 -0.00455398) +(-0.153113 -0.10914 -0.0538324) +(-0.186618 -0.0990259 -0.0447248) +(-0.215938 -0.0786514 -0.0339406) +(-0.237377 -0.0503611 -0.0212629) +(-0.248596 -0.0172067 -0.0071616) +(-0.16157 -0.0976543 -0.0689298) +(-0.191706 -0.0880894 -0.0579909) +(-0.218409 -0.0699804 -0.0444412) +(-0.23834 -0.0446594 -0.0278309) +(-0.248715 -0.0152054 -0.00934664) +(-0.170629 -0.0852963 -0.0784714) +(-0.195685 -0.0765877 -0.0684615) +(-0.220138 -0.0608044 -0.0532795) +(-0.238957 -0.038766 -0.0334866) +(-0.248811 -0.0129769 -0.0111145) +(-0.107204 0.123017 0.013347) +(-0.0698528 0.1112 0.0152905) +(-0.0380992 0.0883114 0.0171722) +(-0.0151372 0.0566724 0.0187399) +(-0.00307022 0.0194923 0.0194813) +(-0.114771 0.118385 0.0390225) +(-0.0789439 0.107356 0.0447663) +(-0.0485809 0.0853445 0.0502884) +(-0.0267261 0.0547387 0.0546187) +(-0.0151445 0.0188093 0.056652) +(-0.126656 0.109496 0.060836) +(-0.0948718 0.0992898 0.0700616) +(-0.0678644 0.0788771 0.0785962) +(-0.0484454 0.0505207 0.0850973) +(-0.0380352 0.0172925 0.0882207) +(-0.141789 0.0979874 0.0763774) +(-0.116005 0.0886687 0.0882073) +(-0.094228 0.0703173 0.0989213) +(-0.0782905 0.0448313 0.107006) +(-0.0693607 0.0152607 0.111036) +(-0.156903 0.0866074 0.0856274) +(-0.141004 0.0772916 0.097427) +(-0.125356 0.0612127 0.109216) +(-0.11309 0.0390006 0.118264) +(-0.106469 0.0131487 0.122931) +(-0.145286 0.0113076 0.122806) +(-0.182592 0.00937375 0.110404) +(-0.213889 0.00715658 0.0874911) +(-0.236591 0.00448533 0.0560893) +(-0.248494 0.00151519 0.0192655) +(-0.150003 0.0332918 0.117887) +(-0.185618 0.027429 0.105725) +(-0.215644 0.0209003 0.0833829) +(-0.23731 0.0130253 0.0532549) +(-0.248573 0.00441581 0.0183339) +(-0.159063 0.0522065 0.108223) +(-0.191134 0.0432741 0.0967513) +(-0.21855 0.0328122 0.0760234) +(-0.238366 0.0204598 0.0484799) +(-0.248706 0.00687436 0.0165351) +(-0.169308 0.0664529 0.0960814) +(-0.197138 0.0556566 0.0854195) +(-0.221587 0.0423788 0.0668519) +(-0.239639 0.0262611 0.042148) +(-0.248851 0.00884844 0.014405) +(-0.178613 0.0752894 0.0835767) +(-0.20163 0.0650298 0.0736672) +(-0.223394 0.050437 0.0579001) +(-0.240266 0.0315051 0.0364325) +(-0.24894 0.0105587 0.0123031) +(-0.248952 0.0122001 0.010388) +(-0.24886 0.0143473 0.00876177) +(-0.248724 0.0164018 0.00677286) +(-0.248582 0.0182348 0.00436355) +(-0.248502 0.019177 0.00150009) +(-0.240214 0.0368515 0.0312495) +(-0.239576 0.0425489 0.0260019) +(-0.23843 0.0484343 0.0200248) +(-0.237303 0.0532905 0.0127851) +(-0.236611 0.0560174 0.00439463) +(-0.223396 0.058522 0.0497042) +(-0.221511 0.0674361 0.0416016) +(-0.218636 0.0762096 0.0320087) +(-0.215671 0.0835415 0.0203954) +(-0.213947 0.0874429 0.00693569) +(-0.201499 0.0747211 0.0640967) +(-0.197268 0.085886 0.0544842) +(-0.191424 0.0968848 0.0425009) +(-0.186133 0.10556 0.0270643) +(-0.182689 0.110458 0.00920119) +(-0.178817 0.0844853 0.0740158) +(-0.169643 0.0966706 0.0654274) +(-0.160024 0.108253 0.0516593) +(-0.151496 0.117573 0.0331787) +(-0.145907 0.122737 0.011307) +) +; + } +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/Allclean b/tutorials/finiteArea/sphereTransport/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..f9c09b1ff70c3c0740ba7314a0b4b04e493bba52 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanTimeDirectories +cleanFaMesh \ No newline at end of file diff --git a/tutorials/finiteArea/sphereTransport/Allrun b/tutorials/finiteArea/sphereTransport/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..8efec031cc3a1cb07a74d7e199417c331e7c4257 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/Allrun @@ -0,0 +1,8 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application="sphereSurfactantFoam" + +runApplication makeFaMesh +runApplication $application diff --git a/tutorials/finiteArea/sphereTransport/constant/faMesh/faMeshDefinition b/tutorials/finiteArea/sphereTransport/constant/faMesh/faMeshDefinition new file mode 100644 index 0000000000000000000000000000000000000000..ec8cef7969e613339a5bebf5fca1f8b419c4a3bd --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/faMesh/faMeshDefinition @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faMeshDefinition; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +polyMeshPatches 1( outer ); + +boundary +{ +} + + +// ************************************************************************** // diff --git a/tutorials/finiteArea/sphereTransport/constant/polyMesh/boundary b/tutorials/finiteArea/sphereTransport/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..8c540d0f52630bc91fac20ab65a9b4ceea90200c --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/polyMesh/boundary @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1 +( +outer +{ + type patch; + nFaces 600; + startFace 4500; +} +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/constant/polyMesh/cells b/tutorials/finiteArea/sphereTransport/constant/polyMesh/cells new file mode 100644 index 0000000000000000000000000000000000000000..d7657128dd9a69ec061a6868f4205c5298324696 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/polyMesh/cells @@ -0,0 +1,1623 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class cellList; + location "constant/polyMesh"; + object cells; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1600 +( +6(0 1 2 5054 3 4) +6(5 6 7 5053 8 3) +6(9 10 11 5052 12 8) +6(13 14 15 5051 16 12) +6(17 18 19 5050 20 16) +6(21 22 23 1 24 5059) +6(25 5058 6 26 22 27) +6(28 5057 10 29 27 30) +6(31 5056 14 32 30 33) +6(34 5055 18 35 33 36) +6(37 38 39 23 40 5064) +6(41 5063 26 42 38 43) +6(44 5062 29 45 43 46) +6(47 5061 32 48 46 49) +6(50 5060 35 51 49 52) +6(53 54 55 39 56 5069) +6(57 5068 42 58 54 59) +6(60 5067 45 61 59 62) +6(63 5066 48 64 62 65) +6(66 5065 51 67 65 68) +6(69 70 71 55 72 5074) +6(73 5073 58 74 70 75) +6(76 5072 61 77 75 78) +6(79 5071 64 80 78 81) +6(82 5070 67 83 81 84) +6(85 86 87 88 89 90) +6(91 92 93 94 95 89) +6(96 97 98 99 100 95) +6(101 102 103 104 105 100) +6(106 107 108 109 2 105) +6(110 111 112 113 114 86) +6(115 116 117 112 118 92) +6(119 120 121 117 122 97) +6(123 124 125 121 126 102) +6(127 128 24 125 129 107) +6(130 131 132 133 134 114) +6(135 136 137 132 138 118) +6(139 140 141 137 142 122) +6(143 144 145 141 146 126) +6(147 148 40 145 149 129) +6(150 151 152 153 154 134) +6(155 156 157 152 158 138) +6(159 160 161 157 162 142) +6(163 164 165 161 166 146) +6(167 168 56 165 169 149) +6(170 171 172 173 174 154) +6(175 176 177 172 178 158) +6(179 180 181 177 182 162) +6(183 184 185 181 186 166) +6(187 188 72 185 189 169) +6(190 191 192 87 193 194) +6(195 196 197 93 198 193) +6(199 200 201 98 202 198) +6(203 204 205 103 206 202) +6(207 208 209 108 7 206) +6(210 211 212 191 213 111) +6(214 211 116 215 196 216) +6(217 214 120 218 200 219) +6(220 217 124 221 204 222) +6(223 208 128 224 25 220) +6(225 226 227 212 228 131) +6(229 226 136 230 216 231) +6(232 229 140 233 219 234) +6(235 232 144 236 222 237) +6(238 223 148 239 41 235) +6(240 241 242 227 243 151) +6(244 241 156 245 231 246) +6(247 244 160 248 234 249) +6(250 247 164 251 237 252) +6(253 238 168 254 57 250) +6(255 256 257 242 258 171) +6(259 256 176 260 246 261) +6(262 259 180 263 249 264) +6(265 262 184 266 252 267) +6(268 253 188 269 73 265) +6(270 271 272 192 273 274) +6(275 276 277 197 278 273) +6(279 280 281 201 282 278) +6(283 284 285 205 286 282) +6(287 288 289 209 11 286) +6(290 291 292 271 293 213) +6(294 291 215 295 276 296) +6(297 294 218 298 280 299) +6(300 297 221 301 284 302) +6(303 288 224 304 28 300) +6(305 306 307 292 308 228) +6(309 306 230 310 296 311) +6(312 309 233 313 299 314) +6(315 312 236 316 302 317) +6(318 303 239 319 44 315) +6(320 321 322 307 323 243) +6(324 321 245 325 311 326) +6(327 324 248 328 314 329) +6(330 327 251 331 317 332) +6(333 318 254 334 60 330) +6(335 336 337 322 338 258) +6(339 336 260 340 326 341) +6(342 339 263 343 329 344) +6(345 342 266 346 332 347) +6(348 333 269 349 76 345) +6(350 351 352 272 353 354) +6(355 356 357 277 358 353) +6(359 360 361 281 362 358) +6(363 364 365 285 366 362) +6(367 368 369 289 15 366) +6(370 371 372 351 373 293) +6(374 371 295 375 356 376) +6(377 374 298 378 360 379) +6(380 377 301 381 364 382) +6(383 368 304 384 31 380) +6(385 386 387 372 388 308) +6(389 386 310 390 376 391) +6(392 389 313 393 379 394) +6(395 392 316 396 382 397) +6(398 383 319 399 47 395) +6(400 401 402 387 403 323) +6(404 401 325 405 391 406) +6(407 404 328 408 394 409) +6(410 407 331 411 397 412) +6(413 398 334 414 63 410) +6(415 416 417 402 418 338) +6(419 416 340 420 406 421) +6(422 419 343 423 409 424) +6(425 422 346 426 412 427) +6(428 413 349 429 79 425) +6(430 431 432 352 433 434) +6(435 436 437 357 438 433) +6(439 440 441 361 442 438) +6(443 444 445 365 446 442) +6(447 448 449 369 19 446) +6(450 451 452 431 453 373) +6(454 451 375 455 436 456) +6(457 454 378 458 440 459) +6(460 457 381 461 444 462) +6(463 448 384 464 34 460) +6(465 466 467 452 468 388) +6(469 466 390 470 456 471) +6(472 469 393 473 459 474) +6(475 472 396 476 462 477) +6(478 463 399 479 50 475) +6(480 481 482 467 483 403) +6(484 481 405 485 471 486) +6(487 484 408 488 474 489) +6(490 487 411 491 477 492) +6(493 478 414 494 66 490) +6(495 496 497 482 498 418) +6(499 496 420 500 486 501) +6(502 499 423 503 489 504) +6(505 502 426 506 492 507) +6(508 493 429 509 82 505) +6(510 511 174 5079 512 513) +6(514 515 178 5078 516 512) +6(517 518 182 5077 519 516) +6(520 521 186 5076 522 519) +6(523 524 189 5075 71 522) +6(525 526 527 511 257 5084) +6(528 526 5083 261 515 529) +6(530 528 5082 264 518 531) +6(532 530 5081 267 521 533) +6(534 524 5080 268 74 532) +6(535 536 537 527 337 5089) +6(538 536 5088 341 529 539) +6(540 538 5087 344 531 541) +6(542 540 5086 347 533 543) +6(544 534 5085 348 77 542) +6(545 546 547 537 417 5094) +6(548 546 5093 421 539 549) +6(550 548 5092 424 541 551) +6(552 550 5091 427 543 553) +6(554 544 5090 428 80 552) +6(555 556 557 547 497 5099) +6(558 556 5098 501 549 559) +6(560 558 5097 504 551 561) +6(562 560 5096 507 553 563) +6(564 554 5095 508 83 562) +6(565 566 567 568 432 5029) +6(569 570 571 567 437 5034) +6(572 573 574 571 441 5039) +6(575 576 577 574 445 5044) +6(578 579 20 577 449 5049) +6(580 581 453 5028 582 566) +6(583 581 570 584 5033 455) +6(585 583 573 586 5038 458) +6(587 585 576 588 5043 461) +6(589 579 5048 464 587 36) +6(590 591 468 5027 592 582) +6(593 591 584 594 5032 470) +6(595 593 586 596 5037 473) +6(597 595 588 598 5042 476) +6(599 589 5047 479 597 52) +6(600 601 483 5026 602 592) +6(603 601 594 604 5031 485) +6(605 603 596 606 5036 488) +6(607 605 598 608 5041 491) +6(609 599 5046 494 607 68) +6(610 611 498 5025 557 602) +6(612 611 604 559 5030 500) +6(613 612 606 561 5035 503) +6(614 613 608 563 5040 506) +6(5045 509 614 84 564 609) +6(615 616 617 618 619 4879) +6(620 621 622 4878 623 616) +6(624 625 626 4877 627 623) +6(628 629 630 4876 631 627) +6(632 633 634 4875 635 631) +6(636 637 638 617 639 4884) +6(640 637 4883 641 621 642) +6(643 640 4882 644 625 645) +6(646 643 4881 647 629 648) +6(649 646 4880 650 633 651) +6(652 653 654 638 655 4889) +6(656 653 4888 657 642 658) +6(659 656 4887 660 645 661) +6(662 659 4886 663 648 664) +6(665 662 4885 666 651 667) +6(668 669 670 654 671 4894) +6(672 669 4893 673 658 674) +6(675 672 4892 676 661 677) +6(678 675 4891 679 664 680) +6(681 678 4890 682 667 683) +6(684 685 686 670 687 4899) +6(688 685 4898 689 674 690) +6(691 688 4897 692 677 693) +6(694 691 4896 695 680 696) +6(697 694 4895 698 683 699) +6(700 701 702 513 703 4929) +6(704 705 706 702 707 4934) +6(708 709 710 706 711 4939) +6(712 713 714 710 715 4944) +6(716 717 635 714 718 4949) +6(719 525 701 720 4928 721) +6(722 719 705 723 4933 724) +6(725 722 709 726 4938 727) +6(728 725 713 729 4943 730) +6(731 4948 717 732 649 728) +6(733 535 720 734 4927 735) +6(736 733 723 737 4932 738) +6(739 736 726 740 4937 741) +6(742 739 729 743 4942 744) +6(745 4947 732 746 665 742) +6(747 545 734 748 4926 749) +6(750 747 737 751 4931 752) +6(753 750 740 754 4936 755) +6(756 753 743 757 4941 758) +6(759 4946 746 760 681 756) +6(761 555 748 762 4925 763) +6(764 761 751 765 4930 766) +6(767 764 754 768 4935 769) +6(770 767 757 771 4940 772) +6(773 4945 760 774 697 770) +6(775 776 777 90 778 779) +6(780 781 782 777 783 784) +6(785 786 787 782 788 789) +6(790 791 792 787 793 794) +6(795 796 619 792 797 798) +6(799 800 801 194 802 778) +6(803 804 805 801 806 783) +6(807 808 809 805 810 788) +6(811 812 813 809 814 793) +6(815 816 639 813 817 797) +6(818 819 820 274 821 802) +6(822 823 824 820 825 806) +6(826 827 828 824 829 810) +6(830 831 832 828 833 814) +6(834 835 655 832 836 817) +6(837 838 839 354 840 821) +6(841 842 843 839 844 825) +6(845 846 847 843 848 829) +6(849 850 851 847 852 833) +6(853 854 671 851 855 836) +6(856 857 858 434 859 840) +6(860 861 862 858 863 844) +6(864 865 866 862 867 848) +6(868 869 870 866 871 852) +6(872 873 687 870 874 855) +6(875 876 877 776 878 113) +6(879 880 881 781 882 878) +6(883 884 885 786 886 882) +6(887 888 889 791 890 886) +6(891 892 893 796 622 890) +6(894 210 800 895 876 896) +6(897 894 804 898 880 899) +6(900 897 808 901 884 902) +6(903 900 812 904 888 905) +6(906 892 816 907 641 903) +6(908 290 819 909 896 910) +6(911 908 823 912 899 913) +6(914 911 827 915 902 916) +6(917 914 831 918 905 919) +6(920 906 835 921 657 917) +6(922 370 838 923 910 924) +6(925 922 842 926 913 927) +6(928 925 846 929 916 930) +6(931 928 850 932 919 933) +6(934 920 854 935 673 931) +6(936 450 857 937 924 938) +6(939 936 861 940 927 941) +6(942 939 865 943 930 944) +6(945 942 869 946 933 947) +6(948 934 873 949 689 945) +6(950 951 952 877 953 133) +6(954 955 956 881 957 953) +6(958 959 960 885 961 957) +6(962 963 964 889 965 961) +6(966 967 968 893 626 965) +6(969 225 895 970 951 971) +6(972 969 898 973 955 974) +6(975 972 901 976 959 977) +6(978 975 904 979 963 980) +6(981 967 907 982 644 978) +6(983 305 909 984 971 985) +6(986 983 912 987 974 988) +6(989 986 915 990 977 991) +6(992 989 918 993 980 994) +6(995 981 921 996 660 992) +6(997 385 923 998 985 999) +6(1000 997 926 1001 988 1002) +6(1003 1000 929 1004 991 1005) +6(1006 1003 932 1007 994 1008) +6(1009 995 935 1010 676 1006) +6(1011 465 937 1012 999 1013) +6(1014 1011 940 1015 1002 1016) +6(1017 1014 943 1018 1005 1019) +6(1020 1017 946 1021 1008 1022) +6(1023 1009 949 1024 692 1020) +6(1025 1026 1027 952 1028 153) +6(1029 1030 1031 956 1032 1028) +6(1033 1034 1035 960 1036 1032) +6(1037 1038 1039 964 1040 1036) +6(1041 1042 1043 968 630 1040) +6(1044 240 970 1045 1026 1046) +6(1047 1044 973 1048 1030 1049) +6(1050 1047 976 1051 1034 1052) +6(1053 1050 979 1054 1038 1055) +6(1056 1042 982 1057 647 1053) +6(1058 320 984 1059 1046 1060) +6(1061 1058 987 1062 1049 1063) +6(1064 1061 990 1065 1052 1066) +6(1067 1064 993 1068 1055 1069) +6(1070 1056 996 1071 663 1067) +6(1072 400 998 1073 1060 1074) +6(1075 1072 1001 1076 1063 1077) +6(1078 1075 1004 1079 1066 1080) +6(1081 1078 1007 1082 1069 1083) +6(1084 1070 1010 1085 679 1081) +6(1086 480 1012 1087 1074 1088) +6(1089 1086 1015 1090 1077 1091) +6(1092 1089 1018 1093 1080 1094) +6(1095 1092 1021 1096 1083 1097) +6(1098 1084 1024 1099 695 1095) +6(1100 1101 703 1027 1102 173) +6(1103 1104 707 1031 1105 1102) +6(1106 1107 711 1035 1108 1105) +6(1109 1110 715 1039 1111 1108) +6(1112 1113 718 1043 634 1111) +6(1114 255 1045 721 1101 1115) +6(1116 1114 1048 724 1104 1117) +6(1118 1116 1051 727 1107 1119) +6(1120 1118 1054 730 1110 1121) +6(1122 1113 1057 731 650 1120) +6(1123 335 1059 735 1115 1124) +6(1125 1123 1062 738 1117 1126) +6(1127 1125 1065 741 1119 1128) +6(1129 1127 1068 744 1121 1130) +6(1131 1122 1071 745 666 1129) +6(1132 415 1073 749 1124 1133) +6(1134 1132 1076 752 1126 1135) +6(1136 1134 1079 755 1128 1137) +6(1138 1136 1082 758 1130 1139) +6(1140 1131 1085 759 682 1138) +6(1141 495 1087 763 1133 1142) +6(1143 1141 1090 766 1135 1144) +6(1145 1143 1093 769 1137 1146) +6(1147 1145 1096 772 1139 1148) +6(1149 1140 1099 773 698 1147) +6(1150 1151 859 4904 1152 568) +6(1153 1154 863 4903 1155 1152) +6(1156 1157 867 4902 1158 1155) +6(1159 1160 871 4901 1161 1158) +6(1162 1163 874 4900 686 1161) +6(1164 580 4909 938 1151 1165) +6(1166 1164 4908 941 1154 1167) +6(1168 1166 4907 944 1157 1169) +6(1170 1168 4906 947 1160 1171) +6(1172 1163 4905 948 690 1170) +6(1173 590 4914 1013 1165 1174) +6(1175 1173 4913 1016 1167 1176) +6(1177 1175 4912 1019 1169 1178) +6(1179 1177 4911 1022 1171 1180) +6(1181 1172 4910 1023 693 1179) +6(1182 600 4919 1088 1174 1183) +6(1184 1182 4918 1091 1176 1185) +6(1186 1184 4917 1094 1178 1187) +6(1188 1186 4916 1097 1180 1189) +6(1190 1181 4915 1098 696 1188) +6(1191 610 4924 1142 1183 762) +6(1192 1191 4923 1144 1185 765) +6(1193 1192 4922 1146 1187 768) +6(1194 1193 4921 1148 1189 771) +6(4920 1149 1190 774 699 1194) +6(1195 1196 1197 4 1198 4954) +6(1199 4953 21 1200 1196 1201) +6(1202 4952 37 1203 1201 1204) +6(1205 4951 53 1206 1204 1207) +6(1208 4950 69 1209 1207 1210) +6(1211 1212 1213 1197 1214 4959) +6(1215 4958 1200 1216 1212 1217) +6(1218 4957 1203 1219 1217 1220) +6(1221 4956 1206 1222 1220 1223) +6(1224 4955 1209 1225 1223 1226) +6(1227 1228 1229 1213 1230 4964) +6(1231 4963 1216 1232 1228 1233) +6(1234 4962 1219 1235 1233 1236) +6(1237 4961 1222 1238 1236 1239) +6(1240 4960 1225 1241 1239 1242) +6(1243 1244 1245 1229 1246 4969) +6(1247 4968 1232 1248 1244 1249) +6(1250 4967 1235 1251 1249 1252) +6(1253 4966 1238 1254 1252 1255) +6(1256 4965 1241 1257 1255 1258) +6(1259 1260 1261 1245 1262 4974) +6(1263 4973 1248 1264 1260 1265) +6(1266 4972 1251 1267 1265 1268) +6(1269 4971 1254 1270 1268 1271) +6(1272 4970 1257 1273 1271 1274) +6(1275 1276 1277 1278 1279 88) +6(1280 1281 1282 1277 1283 94) +6(1284 1285 1286 1282 1287 99) +6(1288 1289 1290 1286 1291 104) +6(1292 1293 1198 1290 1294 109) +6(1295 1296 1297 1298 1299 1279) +6(1300 1301 1302 1297 1303 1283) +6(1304 1305 1306 1302 1307 1287) +6(1308 1309 1310 1306 1311 1291) +6(1312 1313 1214 1310 1314 1294) +6(1315 1316 1317 1318 1319 1299) +6(1320 1321 1322 1317 1323 1303) +6(1324 1325 1326 1322 1327 1307) +6(1328 1329 1330 1326 1331 1311) +6(1332 1333 1230 1330 1334 1314) +6(1335 1336 1337 1338 1339 1319) +6(1340 1341 1342 1337 1343 1323) +6(1344 1345 1346 1342 1347 1327) +6(1348 1349 1350 1346 1351 1331) +6(1352 1353 1246 1350 1354 1334) +6(1355 1356 1357 1358 1359 1339) +6(1360 1361 1362 1357 1363 1343) +6(1364 1365 1366 1362 1367 1347) +6(1368 1369 1370 1366 1371 1351) +6(1372 1373 1262 1370 1374 1354) +6(1375 1376 1377 110 1378 1276) +6(1379 1376 1281 1380 115 1381) +6(1382 1379 1285 1383 119 1384) +6(1385 1382 1289 1386 123 1387) +6(1388 127 1293 1389 1199 1385) +6(1390 1391 1392 1377 1393 1296) +6(1394 1391 1301 1395 1381 1396) +6(1397 1394 1305 1398 1384 1399) +6(1400 1397 1309 1401 1387 1402) +6(1403 1388 1313 1404 1215 1400) +6(1405 1406 1407 1392 1408 1316) +6(1409 1406 1321 1410 1396 1411) +6(1412 1409 1325 1413 1399 1414) +6(1415 1412 1329 1416 1402 1417) +6(1418 1403 1333 1419 1231 1415) +6(1420 1421 1422 1407 1423 1336) +6(1424 1421 1341 1425 1411 1426) +6(1427 1424 1345 1428 1414 1429) +6(1430 1427 1349 1431 1417 1432) +6(1433 1418 1353 1434 1247 1430) +6(1435 1436 1437 1422 1438 1356) +6(1439 1436 1361 1440 1426 1441) +6(1442 1439 1365 1443 1429 1444) +6(1445 1442 1369 1446 1432 1447) +6(1448 1433 1373 1449 1263 1445) +6(1450 1451 1452 130 1453 1378) +6(1454 1451 1380 1455 135 1456) +6(1457 1454 1383 1458 139 1459) +6(1460 1457 1386 1461 143 1462) +6(1463 147 1389 1464 1202 1460) +6(1465 1466 1467 1452 1468 1393) +6(1469 1466 1395 1470 1456 1471) +6(1472 1469 1398 1473 1459 1474) +6(1475 1472 1401 1476 1462 1477) +6(1478 1463 1404 1479 1218 1475) +6(1480 1481 1482 1467 1483 1408) +6(1484 1481 1410 1485 1471 1486) +6(1487 1484 1413 1488 1474 1489) +6(1490 1487 1416 1491 1477 1492) +6(1493 1478 1419 1494 1234 1490) +6(1495 1496 1497 1482 1498 1423) +6(1499 1496 1425 1500 1486 1501) +6(1502 1499 1428 1503 1489 1504) +6(1505 1502 1431 1506 1492 1507) +6(1508 1493 1434 1509 1250 1505) +6(1510 1511 1512 1497 1513 1438) +6(1514 1511 1440 1515 1501 1516) +6(1517 1514 1443 1518 1504 1519) +6(1520 1517 1446 1521 1507 1522) +6(1523 1508 1449 1524 1266 1520) +6(1525 1526 1527 150 1528 1453) +6(1529 1526 1455 1530 155 1531) +6(1532 1529 1458 1533 159 1534) +6(1535 1532 1461 1536 163 1537) +6(1538 167 1464 1539 1205 1535) +6(1540 1541 1542 1527 1543 1468) +6(1544 1541 1470 1545 1531 1546) +6(1547 1544 1473 1548 1534 1549) +6(1550 1547 1476 1551 1537 1552) +6(1553 1538 1479 1554 1221 1550) +6(1555 1556 1557 1542 1558 1483) +6(1559 1556 1485 1560 1546 1561) +6(1562 1559 1488 1563 1549 1564) +6(1565 1562 1491 1566 1552 1567) +6(1568 1553 1494 1569 1237 1565) +6(1570 1571 1572 1557 1573 1498) +6(1574 1571 1500 1575 1561 1576) +6(1577 1574 1503 1578 1564 1579) +6(1580 1577 1506 1581 1567 1582) +6(1583 1568 1509 1584 1253 1580) +6(1585 1586 1587 1572 1588 1513) +6(1589 1586 1515 1590 1576 1591) +6(1592 1589 1518 1593 1579 1594) +6(1595 1592 1521 1596 1582 1597) +6(1598 1583 1524 1599 1269 1595) +6(1600 1601 1602 170 1603 1528) +6(1604 1601 1530 1605 175 1606) +6(1607 1604 1533 1608 179 1609) +6(1610 1607 1536 1611 183 1612) +6(1613 187 1539 1614 1208 1610) +6(1615 1616 1617 1602 1618 1543) +6(1619 1616 1545 1620 1606 1621) +6(1622 1619 1548 1623 1609 1624) +6(1625 1622 1551 1626 1612 1627) +6(1628 1613 1554 1629 1224 1625) +6(1630 1631 1632 1617 1633 1558) +6(1634 1631 1560 1635 1621 1636) +6(1637 1634 1563 1638 1624 1639) +6(1640 1637 1566 1641 1627 1642) +6(1643 1628 1569 1644 1240 1640) +6(1645 1646 1647 1632 1648 1573) +6(1649 1646 1575 1650 1636 1651) +6(1652 1649 1578 1653 1639 1654) +6(1655 1652 1581 1656 1642 1657) +6(1658 1643 1584 1659 1256 1655) +6(1660 1661 1662 1647 1663 1588) +6(1664 1661 1590 1665 1651 1666) +6(1667 1664 1593 1668 1654 1669) +6(1670 1667 1596 1671 1657 1672) +6(1673 1658 1599 1674 1272 1670) +6(1675 1676 1359 4979 1677 1678) +6(1679 1680 1363 4978 1681 1677) +6(1682 1683 1367 4977 1684 1681) +6(1685 1686 1371 4976 1687 1684) +6(1688 1689 1374 4975 1261 1687) +6(1690 1691 1692 1676 1437 4984) +6(1693 1691 4983 1441 1680 1694) +6(1695 1693 4982 1444 1683 1696) +6(1697 1695 4981 1447 1686 1698) +6(1699 1689 4980 1448 1264 1697) +6(1700 1701 1702 1692 1512 4989) +6(1703 1701 4988 1516 1694 1704) +6(1705 1703 4987 1519 1696 1706) +6(1707 1705 4986 1522 1698 1708) +6(1709 1699 4985 1523 1267 1707) +6(1710 1711 1712 1702 1587 4994) +6(1713 1711 4993 1591 1704 1714) +6(1715 1713 4992 1594 1706 1716) +6(1717 1715 4991 1597 1708 1718) +6(1719 1709 4990 1598 1270 1717) +6(1720 1721 1722 1712 1662 4999) +6(1723 1721 4998 1666 1714 1724) +6(1725 1723 4997 1669 1716 1726) +6(1727 1725 4996 1672 1718 1728) +6(1729 1719 4995 1673 1273 1727) +6(1730 1731 1603 5004 1732 510) +6(1733 1731 514 1734 5009 1605) +6(1735 1733 517 1736 5014 1608) +6(1737 1735 520 1738 5019 1611) +6(1739 523 5024 1614 1737 1210) +6(1740 1741 1618 5003 1742 1732) +6(1743 1741 1734 1744 5008 1620) +6(1745 1743 1736 1746 5013 1623) +6(1747 1745 1738 1748 5018 1626) +6(1749 1739 5023 1629 1747 1226) +6(1750 1751 1633 5002 1752 1742) +6(1753 1751 1744 1754 5007 1635) +6(1755 1753 1746 1756 5012 1638) +6(1757 1755 1748 1758 5017 1641) +6(1759 1749 5022 1644 1757 1242) +6(1760 1761 1648 5001 1762 1752) +6(1763 1761 1754 1764 5006 1650) +6(1765 1763 1756 1766 5011 1653) +6(1767 1765 1758 1768 5016 1656) +6(1769 1759 5021 1659 1767 1258) +6(1770 1771 1663 5000 1722 1762) +6(1772 1771 1764 1724 5005 1665) +6(1773 1772 1766 1726 5010 1668) +6(1774 1773 1768 1728 5015 1671) +6(5020 1674 1774 1274 1729 1769) +6(1775 1776 1777 4829 1778 618) +6(1779 1780 1781 4828 1782 1778) +6(1783 1784 1785 4827 1786 1782) +6(1787 1788 1789 4826 1790 1786) +6(1791 1792 1793 4825 1794 1790) +6(1795 620 4834 1796 1776 1797) +6(1798 1795 4833 1799 1780 1800) +6(1801 1798 4832 1802 1784 1803) +6(1804 1801 4831 1805 1788 1806) +6(1807 1804 4830 1808 1792 1809) +6(1810 624 4839 1811 1797 1812) +6(1813 1810 4838 1814 1800 1815) +6(1816 1813 4837 1817 1803 1818) +6(1819 1816 4836 1820 1806 1821) +6(1822 1819 4835 1823 1809 1824) +6(1825 628 4844 1826 1812 1827) +6(1828 1825 4843 1829 1815 1830) +6(1831 1828 4842 1832 1818 1833) +6(1834 1831 4841 1835 1821 1836) +6(1837 1834 4840 1838 1824 1839) +6(1840 632 4849 1841 1827 1842) +6(1843 1840 4848 1844 1830 1845) +6(1846 1843 4847 1847 1833 1848) +6(1849 1846 4846 1850 1836 1851) +6(1852 1849 4845 1853 1839 1854) +6(1855 1856 1857 1678 1858 4804) +6(1859 1860 1861 1857 1862 4809) +6(1863 1864 1865 1861 1866 4814) +6(1867 1868 1869 1865 1870 4819) +6(1871 1872 1794 1869 1873 4824) +6(1874 1690 1856 1875 4803 1876) +6(1877 1874 1860 1878 4808 1879) +6(1880 1877 1864 1881 4813 1882) +6(1883 1880 1868 1884 4818 1885) +6(1886 4823 1872 1887 1807 1883) +6(1888 1700 1875 1889 4802 1890) +6(1891 1888 1878 1892 4807 1893) +6(1894 1891 1881 1895 4812 1896) +6(1897 1894 1884 1898 4817 1899) +6(1900 4822 1887 1901 1822 1897) +6(1902 1710 1889 1903 4801 1904) +6(1905 1902 1892 1906 4806 1907) +6(1908 1905 1895 1909 4811 1910) +6(1911 1908 1898 1912 4816 1913) +6(1914 4821 1901 1915 1837 1911) +6(1916 1720 1903 1917 4800 1918) +6(1919 1916 1906 1920 4805 1921) +6(1922 1919 1909 1923 4810 1924) +6(1925 1922 1912 1926 4815 1927) +6(1928 4820 1915 1929 1852 1925) +6(1930 1931 1932 779 1933 1278) +6(1934 1935 1936 784 1937 1933) +6(1938 1939 1940 789 1941 1937) +6(1942 1943 1944 794 1945 1941) +6(1946 1947 1948 798 1777 1945) +6(1949 1375 875 1950 1931 1951) +6(1952 1949 879 1953 1935 1954) +6(1955 1952 883 1956 1939 1957) +6(1958 1955 887 1959 1943 1960) +6(1961 1947 891 1962 1796 1958) +6(1963 1450 950 1964 1951 1965) +6(1966 1963 954 1967 1954 1968) +6(1969 1966 958 1970 1957 1971) +6(1972 1969 962 1973 1960 1974) +6(1975 1961 966 1976 1811 1972) +6(1977 1525 1025 1978 1965 1979) +6(1980 1977 1029 1981 1968 1982) +6(1983 1980 1033 1984 1971 1985) +6(1986 1983 1037 1987 1974 1988) +6(1989 1975 1041 1990 1826 1986) +6(1991 1600 1100 1992 1979 1993) +6(1994 1991 1103 1995 1982 1996) +6(1997 1994 1106 1998 1985 1999) +6(2000 1997 1109 2001 1988 2002) +6(2003 1989 1112 2004 1841 2000) +6(2005 2006 2007 1932 2008 1298) +6(2009 2010 2011 1936 2012 2008) +6(2013 2014 2015 1940 2016 2012) +6(2017 2018 2019 1944 2020 2016) +6(2021 2022 2023 1948 1781 2020) +6(2024 1390 1950 2025 2006 2026) +6(2027 2024 1953 2028 2010 2029) +6(2030 2027 1956 2031 2014 2032) +6(2033 2030 1959 2034 2018 2035) +6(2036 2022 1962 2037 1799 2033) +6(2038 1465 1964 2039 2026 2040) +6(2041 2038 1967 2042 2029 2043) +6(2044 2041 1970 2045 2032 2046) +6(2047 2044 1973 2048 2035 2049) +6(2050 2036 1976 2051 1814 2047) +6(2052 1540 1978 2053 2040 2054) +6(2055 2052 1981 2056 2043 2057) +6(2058 2055 1984 2059 2046 2060) +6(2061 2058 1987 2062 2049 2063) +6(2064 2050 1990 2065 1829 2061) +6(2066 1615 1992 2067 2054 2068) +6(2069 2066 1995 2070 2057 2071) +6(2072 2069 1998 2073 2060 2074) +6(2075 2072 2001 2076 2063 2077) +6(2078 2064 2004 2079 1844 2075) +6(2080 2081 2082 2007 2083 1318) +6(2084 2085 2086 2011 2087 2083) +6(2088 2089 2090 2015 2091 2087) +6(2092 2093 2094 2019 2095 2091) +6(2096 2097 2098 2023 1785 2095) +6(2099 1405 2025 2100 2081 2101) +6(2102 2099 2028 2103 2085 2104) +6(2105 2102 2031 2106 2089 2107) +6(2108 2105 2034 2109 2093 2110) +6(2111 2097 2037 2112 1802 2108) +6(2113 1480 2039 2114 2101 2115) +6(2116 2113 2042 2117 2104 2118) +6(2119 2116 2045 2120 2107 2121) +6(2122 2119 2048 2123 2110 2124) +6(2125 2111 2051 2126 1817 2122) +6(2127 1555 2053 2128 2115 2129) +6(2130 2127 2056 2131 2118 2132) +6(2133 2130 2059 2134 2121 2135) +6(2136 2133 2062 2137 2124 2138) +6(2139 2125 2065 2140 1832 2136) +6(2141 1630 2067 2142 2129 2143) +6(2144 2141 2070 2145 2132 2146) +6(2147 2144 2073 2148 2135 2149) +6(2150 2147 2076 2151 2138 2152) +6(2153 2139 2079 2154 1847 2150) +6(2155 2156 2157 2082 2158 1338) +6(2159 2160 2161 2086 2162 2158) +6(2163 2164 2165 2090 2166 2162) +6(2167 2168 2169 2094 2170 2166) +6(2171 2172 2173 2098 1789 2170) +6(2174 1420 2100 2175 2156 2176) +6(2177 2174 2103 2178 2160 2179) +6(2180 2177 2106 2181 2164 2182) +6(2183 2180 2109 2184 2168 2185) +6(2186 2172 2112 2187 1805 2183) +6(2188 1495 2114 2189 2176 2190) +6(2191 2188 2117 2192 2179 2193) +6(2194 2191 2120 2195 2182 2196) +6(2197 2194 2123 2198 2185 2199) +6(2200 2186 2126 2201 1820 2197) +6(2202 1570 2128 2203 2190 2204) +6(2205 2202 2131 2206 2193 2207) +6(2208 2205 2134 2209 2196 2210) +6(2211 2208 2137 2212 2199 2213) +6(2214 2200 2140 2215 1835 2211) +6(2216 1645 2142 2217 2204 2218) +6(2219 2216 2145 2220 2207 2221) +6(2222 2219 2148 2223 2210 2224) +6(2225 2222 2151 2226 2213 2227) +6(2228 2214 2154 2229 1850 2225) +6(2230 2231 1858 2157 2232 1358) +6(2233 2234 1862 2161 2235 2232) +6(2236 2237 1866 2165 2238 2235) +6(2239 2240 1870 2169 2241 2238) +6(2242 2243 1873 2173 1793 2241) +6(2244 1435 2175 1876 2231 2245) +6(2246 2244 2178 1879 2234 2247) +6(2248 2246 2181 1882 2237 2249) +6(2250 2248 2184 1885 2240 2251) +6(2252 2243 2187 1886 1808 2250) +6(2253 1510 2189 1890 2245 2254) +6(2255 2253 2192 1893 2247 2256) +6(2257 2255 2195 1896 2249 2258) +6(2259 2257 2198 1899 2251 2260) +6(2261 2252 2201 1900 1823 2259) +6(2262 1585 2203 1904 2254 2263) +6(2264 2262 2206 1907 2256 2265) +6(2266 2264 2209 1910 2258 2267) +6(2268 2266 2212 1913 2260 2269) +6(2270 2261 2215 1914 1838 2268) +6(2271 1660 2217 1918 2263 2272) +6(2273 2271 2220 1921 2265 2274) +6(2275 2273 2223 1924 2267 2276) +6(2277 2275 2226 1927 2269 2278) +6(2279 2270 2229 1928 1853 2277) +6(2280 1730 4854 1993 700 2281) +6(2282 2280 4853 1996 704 2283) +6(2284 2282 4852 1999 708 2285) +6(2286 2284 4851 2002 712 2287) +6(2288 716 4850 2003 1842 2286) +6(2289 1740 4859 2068 2281 2290) +6(2291 2289 4858 2071 2283 2292) +6(2293 2291 4857 2074 2285 2294) +6(2295 2293 4856 2077 2287 2296) +6(2297 2288 4855 2078 1845 2295) +6(2298 1750 4864 2143 2290 2299) +6(2300 2298 4863 2146 2292 2301) +6(2302 2300 4862 2149 2294 2303) +6(2304 2302 4861 2152 2296 2305) +6(2306 2297 4860 2153 1848 2304) +6(2307 1760 4869 2218 2299 2308) +6(2309 2307 4868 2221 2301 2310) +6(2311 2309 4867 2224 2303 2312) +6(2313 2311 4866 2227 2305 2314) +6(2315 2306 4865 2228 1851 2313) +6(2316 1770 4874 2272 2308 1917) +6(2317 2316 4873 2274 2310 1920) +6(2318 2317 4872 2276 2312 1923) +6(2319 2318 4871 2278 2314 1926) +6(4870 2279 2315 1929 1854 2319) +6(2320 2321 2322 4529 2323 0) +6(2324 2325 2326 4528 2327 2323) +6(2328 2329 2330 4527 2331 2327) +6(2332 2333 2334 4526 2335 2331) +6(2336 2337 2338 4525 2339 2335) +6(2340 4534 2321 2341 5 2342) +6(2343 4533 2325 2344 2342 2345) +6(2346 4532 2329 2347 2345 2348) +6(2349 4531 2333 2350 2348 2351) +6(2352 4530 2337 2353 2351 2354) +6(2355 4539 2341 2356 9 2357) +6(2358 4538 2344 2359 2357 2360) +6(2361 4537 2347 2362 2360 2363) +6(2364 4536 2350 2365 2363 2366) +6(2367 4535 2353 2368 2366 2369) +6(2370 4544 2356 2371 13 2372) +6(2373 4543 2359 2374 2372 2375) +6(2376 4542 2362 2377 2375 2378) +6(2379 4541 2365 2380 2378 2381) +6(2382 4540 2368 2383 2381 2384) +6(2385 4549 2371 2386 17 2387) +6(2388 4548 2374 2389 2387 2390) +6(2391 4547 2377 2392 2390 2393) +6(2394 4546 2380 2395 2393 2396) +6(2397 4545 2383 2398 2396 2399) +6(2400 2401 2402 85 2403 2404) +6(2405 2406 2407 91 2408 2403) +6(2409 2410 2411 96 2412 2408) +6(2413 2414 2415 101 2416 2412) +6(2417 2418 2419 106 2322 2416) +6(2420 2421 2422 2401 2423 190) +6(2424 2421 195 2425 2406 2426) +6(2427 2424 199 2428 2410 2429) +6(2430 2427 203 2431 2414 2432) +6(2433 2418 207 2434 2340 2430) +6(2435 2436 2437 2422 2438 270) +6(2439 2436 275 2440 2426 2441) +6(2442 2439 279 2443 2429 2444) +6(2445 2442 283 2446 2432 2447) +6(2448 2433 287 2449 2355 2445) +6(2450 2451 2452 2437 2453 350) +6(2454 2451 355 2455 2441 2456) +6(2457 2454 359 2458 2444 2459) +6(2460 2457 363 2461 2447 2462) +6(2463 2448 367 2464 2370 2460) +6(2465 2466 2467 2452 2468 430) +6(2469 2466 435 2470 2456 2471) +6(2472 2469 439 2473 2459 2474) +6(2475 2472 443 2476 2462 2477) +6(2478 2463 447 2479 2385 2475) +6(2480 2481 2482 2402 2483 2484) +6(2485 2486 2487 2407 2488 2483) +6(2489 2490 2491 2411 2492 2488) +6(2493 2494 2495 2415 2496 2492) +6(2497 2498 2499 2419 2326 2496) +6(2500 2501 2502 2481 2503 2423) +6(2504 2501 2425 2505 2486 2506) +6(2507 2504 2428 2508 2490 2509) +6(2510 2507 2431 2511 2494 2512) +6(2513 2498 2434 2514 2343 2510) +6(2515 2516 2517 2502 2518 2438) +6(2519 2516 2440 2520 2506 2521) +6(2522 2519 2443 2523 2509 2524) +6(2525 2522 2446 2526 2512 2527) +6(2528 2513 2449 2529 2358 2525) +6(2530 2531 2532 2517 2533 2453) +6(2534 2531 2455 2535 2521 2536) +6(2537 2534 2458 2538 2524 2539) +6(2540 2537 2461 2541 2527 2542) +6(2543 2528 2464 2544 2373 2540) +6(2545 2546 2547 2532 2548 2468) +6(2549 2546 2470 2550 2536 2551) +6(2552 2549 2473 2553 2539 2554) +6(2555 2552 2476 2556 2542 2557) +6(2558 2543 2479 2559 2388 2555) +6(2560 2561 2562 2482 2563 2564) +6(2565 2566 2567 2487 2568 2563) +6(2569 2570 2571 2491 2572 2568) +6(2573 2574 2575 2495 2576 2572) +6(2577 2578 2579 2499 2330 2576) +6(2580 2581 2582 2561 2583 2503) +6(2584 2581 2505 2585 2566 2586) +6(2587 2584 2508 2588 2570 2589) +6(2590 2587 2511 2591 2574 2592) +6(2593 2578 2514 2594 2346 2590) +6(2595 2596 2597 2582 2598 2518) +6(2599 2596 2520 2600 2586 2601) +6(2602 2599 2523 2603 2589 2604) +6(2605 2602 2526 2606 2592 2607) +6(2608 2593 2529 2609 2361 2605) +6(2610 2611 2612 2597 2613 2533) +6(2614 2611 2535 2615 2601 2616) +6(2617 2614 2538 2618 2604 2619) +6(2620 2617 2541 2621 2607 2622) +6(2623 2608 2544 2624 2376 2620) +6(2625 2626 2627 2612 2628 2548) +6(2629 2626 2550 2630 2616 2631) +6(2632 2629 2553 2633 2619 2634) +6(2635 2632 2556 2636 2622 2637) +6(2638 2623 2559 2639 2391 2635) +6(2640 2641 2642 2562 2643 2644) +6(2645 2646 2647 2567 2648 2643) +6(2649 2650 2651 2571 2652 2648) +6(2653 2654 2655 2575 2656 2652) +6(2657 2658 2659 2579 2334 2656) +6(2660 2661 2662 2641 2663 2583) +6(2664 2661 2585 2665 2646 2666) +6(2667 2664 2588 2668 2650 2669) +6(2670 2667 2591 2671 2654 2672) +6(2673 2658 2594 2674 2349 2670) +6(2675 2676 2677 2662 2678 2598) +6(2679 2676 2600 2680 2666 2681) +6(2682 2679 2603 2683 2669 2684) +6(2685 2682 2606 2686 2672 2687) +6(2688 2673 2609 2689 2364 2685) +6(2690 2691 2692 2677 2693 2613) +6(2694 2691 2615 2695 2681 2696) +6(2697 2694 2618 2698 2684 2699) +6(2700 2697 2621 2701 2687 2702) +6(2703 2688 2624 2704 2379 2700) +6(2705 2706 2707 2692 2708 2628) +6(2709 2706 2630 2710 2696 2711) +6(2712 2709 2633 2713 2699 2714) +6(2715 2712 2636 2716 2702 2717) +6(2718 2703 2639 2719 2394 2715) +6(2720 2721 2722 2642 2723 2724) +6(2725 2726 2727 2647 2728 2723) +6(2729 2730 2731 2651 2732 2728) +6(2733 2734 2735 2655 2736 2732) +6(2737 2738 2739 2659 2338 2736) +6(2740 2741 2742 2721 2743 2663) +6(2744 2741 2665 2745 2726 2746) +6(2747 2744 2668 2748 2730 2749) +6(2750 2747 2671 2751 2734 2752) +6(2753 2738 2674 2754 2352 2750) +6(2755 2756 2757 2742 2758 2678) +6(2759 2756 2680 2760 2746 2761) +6(2762 2759 2683 2763 2749 2764) +6(2765 2762 2686 2766 2752 2767) +6(2768 2753 2689 2769 2367 2765) +6(2770 2771 2772 2757 2773 2693) +6(2774 2771 2695 2775 2761 2776) +6(2777 2774 2698 2778 2764 2779) +6(2780 2777 2701 2781 2767 2782) +6(2783 2768 2704 2784 2382 2780) +6(2785 2786 2787 2772 2788 2708) +6(2789 2786 2710 2790 2776 2791) +6(2792 2789 2713 2793 2779 2794) +6(2795 2792 2716 2796 2782 2797) +6(2798 2783 2719 2799 2397 2795) +6(2800 2801 2802 565 2467 4554) +6(2803 2801 4553 2471 569 2804) +6(2805 2803 4552 2474 572 2806) +6(2807 2805 4551 2477 575 2808) +6(2809 578 4550 2478 2386 2807) +6(2810 2811 2812 2802 2547 4559) +6(2813 2811 4558 2551 2804 2814) +6(2815 2813 4557 2554 2806 2816) +6(2817 2815 4556 2557 2808 2818) +6(2819 2809 4555 2558 2389 2817) +6(2820 2821 2822 2812 2627 4564) +6(2823 2821 4563 2631 2814 2824) +6(2825 2823 4562 2634 2816 2826) +6(2827 2825 4561 2637 2818 2828) +6(2829 2819 4560 2638 2392 2827) +6(2830 2831 2832 2822 2707 4569) +6(2833 2831 4568 2711 2824 2834) +6(2835 2833 4567 2714 2826 2836) +6(2837 2835 4566 2717 2828 2838) +6(2839 2829 4565 2718 2395 2837) +6(2840 2841 2842 2832 2787 4574) +6(2843 2841 4573 2791 2834 2844) +6(2845 2843 4572 2794 2836 2846) +6(2847 2845 4571 2797 2838 2848) +6(2849 2839 4570 2798 2398 2847) +6(2850 2851 2852 2853 2722 4504) +6(2854 2855 2856 2852 2727 4509) +6(2857 2858 2859 2856 2731 4514) +6(2860 2861 2862 2859 2735 4519) +6(2863 2864 2339 2862 2739 4524) +6(2865 2866 2743 4503 2867 2851) +6(2868 2866 2855 2869 4508 2745) +6(2870 2868 2858 2871 4513 2748) +6(2872 2870 2861 2873 4518 2751) +6(2874 2864 4523 2754 2872 2354) +6(2875 2876 2758 4502 2877 2867) +6(2878 2876 2869 2879 4507 2760) +6(2880 2878 2871 2881 4512 2763) +6(2882 2880 2873 2883 4517 2766) +6(2884 2874 4522 2769 2882 2369) +6(2885 2886 2773 4501 2887 2877) +6(2888 2886 2879 2889 4506 2775) +6(2890 2888 2881 2891 4511 2778) +6(2892 2890 2883 2893 4516 2781) +6(2894 2884 4521 2784 2892 2384) +6(2895 2896 2788 4500 2842 2887) +6(2897 2896 2889 2844 4505 2790) +6(2898 2897 2891 2846 4510 2793) +6(2899 2898 2893 2848 4515 2796) +6(4520 2799 2899 2399 2849 2894) +6(2900 2901 2902 615 2903 4729) +6(2904 2901 4728 2905 636 2906) +6(2907 2904 4727 2908 652 2909) +6(2910 2907 4726 2911 668 2912) +6(2913 2910 4725 2914 684 2915) +6(2916 2917 2918 2902 2919 4734) +6(2920 2917 4733 2921 2906 2922) +6(2923 2920 4732 2924 2909 2925) +6(2926 2923 4731 2927 2912 2928) +6(2929 2926 4730 2930 2915 2931) +6(2932 2933 2934 2918 2935 4739) +6(2936 2933 4738 2937 2922 2938) +6(2939 2936 4737 2940 2925 2941) +6(2942 2939 4736 2943 2928 2944) +6(2945 2942 4735 2946 2931 2947) +6(2948 2949 2950 2934 2951 4744) +6(2952 2949 4743 2953 2938 2954) +6(2955 2952 4742 2956 2941 2957) +6(2958 2955 4741 2959 2944 2960) +6(2961 2958 4740 2962 2947 2963) +6(2964 2965 2966 2950 2967 4749) +6(2968 2965 4748 2969 2954 2970) +6(2971 2968 4747 2972 2957 2973) +6(2974 2971 4746 2975 2960 2976) +6(2977 2974 4745 2978 2963 2979) +6(2980 2800 1150 2981 4779 2982) +6(2983 2980 1153 2984 4784 2985) +6(2986 2983 1156 2987 4789 2988) +6(2989 2986 1159 2990 4794 2991) +6(2992 4799 1162 2993 2913 2989) +6(2994 2810 2981 2995 4778 2996) +6(2997 2994 2984 2998 4783 2999) +6(3000 2997 2987 3001 4788 3002) +6(3003 3000 2990 3004 4793 3005) +6(3006 4798 2993 3007 2929 3003) +6(3008 2820 2995 3009 4777 3010) +6(3011 3008 2998 3012 4782 3013) +6(3014 3011 3001 3015 4787 3016) +6(3017 3014 3004 3018 4792 3019) +6(3020 4797 3007 3021 2945 3017) +6(3022 2830 3009 3023 4776 3024) +6(3025 3022 3012 3026 4781 3027) +6(3028 3025 3015 3029 4786 3030) +6(3031 3028 3018 3032 4791 3033) +6(3034 4796 3021 3035 2961 3031) +6(3036 2840 3023 3037 4775 3038) +6(3039 3036 3026 3040 4780 3041) +6(3042 3039 3029 3043 4785 3044) +6(3045 3042 3032 3046 4790 3047) +6(3048 4795 3035 3049 2977 3045) +6(3050 3051 3052 2404 3053 775) +6(3054 3055 3056 3052 3057 780) +6(3058 3059 3060 3056 3061 785) +6(3062 3063 3064 3060 3065 790) +6(3066 3067 2903 3064 3068 795) +6(3069 3070 3071 2484 3072 3053) +6(3073 3074 3075 3071 3076 3057) +6(3077 3078 3079 3075 3080 3061) +6(3081 3082 3083 3079 3084 3065) +6(3085 3086 2919 3083 3087 3068) +6(3088 3089 3090 2564 3091 3072) +6(3092 3093 3094 3090 3095 3076) +6(3096 3097 3098 3094 3099 3080) +6(3100 3101 3102 3098 3103 3084) +6(3104 3105 2935 3102 3106 3087) +6(3107 3108 3109 2644 3110 3091) +6(3111 3112 3113 3109 3114 3095) +6(3115 3116 3117 3113 3118 3099) +6(3119 3120 3121 3117 3122 3103) +6(3123 3124 2951 3121 3125 3106) +6(3126 3127 3128 2724 3129 3110) +6(3130 3131 3132 3128 3133 3114) +6(3134 3135 3136 3132 3137 3118) +6(3138 3139 3140 3136 3141 3122) +6(3142 3143 2967 3140 3144 3125) +6(3145 2420 3051 3146 799 3147) +6(3148 3145 3055 3149 803 3150) +6(3151 3148 3059 3152 807 3153) +6(3154 3151 3063 3155 811 3156) +6(3157 815 3067 3158 2905 3154) +6(3159 2500 3070 3160 3147 3161) +6(3162 3159 3074 3163 3150 3164) +6(3165 3162 3078 3166 3153 3167) +6(3168 3165 3082 3169 3156 3170) +6(3171 3157 3086 3172 2921 3168) +6(3173 2580 3089 3174 3161 3175) +6(3176 3173 3093 3177 3164 3178) +6(3179 3176 3097 3180 3167 3181) +6(3182 3179 3101 3183 3170 3184) +6(3185 3171 3105 3186 2937 3182) +6(3187 2660 3108 3188 3175 3189) +6(3190 3187 3112 3191 3178 3192) +6(3193 3190 3116 3194 3181 3195) +6(3196 3193 3120 3197 3184 3198) +6(3199 3185 3124 3200 2953 3196) +6(3201 2740 3127 3202 3189 3203) +6(3204 3201 3131 3205 3192 3206) +6(3207 3204 3135 3208 3195 3209) +6(3210 3207 3139 3211 3198 3212) +6(3213 3199 3143 3214 2969 3210) +6(3215 2435 3146 3216 818 3217) +6(3218 3215 3149 3219 822 3220) +6(3221 3218 3152 3222 826 3223) +6(3224 3221 3155 3225 830 3226) +6(3227 834 3158 3228 2908 3224) +6(3229 2515 3160 3230 3217 3231) +6(3232 3229 3163 3233 3220 3234) +6(3235 3232 3166 3236 3223 3237) +6(3238 3235 3169 3239 3226 3240) +6(3241 3227 3172 3242 2924 3238) +6(3243 2595 3174 3244 3231 3245) +6(3246 3243 3177 3247 3234 3248) +6(3249 3246 3180 3250 3237 3251) +6(3252 3249 3183 3253 3240 3254) +6(3255 3241 3186 3256 2940 3252) +6(3257 2675 3188 3258 3245 3259) +6(3260 3257 3191 3261 3248 3262) +6(3263 3260 3194 3264 3251 3265) +6(3266 3263 3197 3267 3254 3268) +6(3269 3255 3200 3270 2956 3266) +6(3271 2755 3202 3272 3259 3273) +6(3274 3271 3205 3275 3262 3276) +6(3277 3274 3208 3278 3265 3279) +6(3280 3277 3211 3281 3268 3282) +6(3283 3269 3214 3284 2972 3280) +6(3285 2450 3216 3286 837 3287) +6(3288 3285 3219 3289 841 3290) +6(3291 3288 3222 3292 845 3293) +6(3294 3291 3225 3295 849 3296) +6(3297 853 3228 3298 2911 3294) +6(3299 2530 3230 3300 3287 3301) +6(3302 3299 3233 3303 3290 3304) +6(3305 3302 3236 3306 3293 3307) +6(3308 3305 3239 3309 3296 3310) +6(3311 3297 3242 3312 2927 3308) +6(3313 2610 3244 3314 3301 3315) +6(3316 3313 3247 3317 3304 3318) +6(3319 3316 3250 3320 3307 3321) +6(3322 3319 3253 3323 3310 3324) +6(3325 3311 3256 3326 2943 3322) +6(3327 2690 3258 3328 3315 3329) +6(3330 3327 3261 3331 3318 3332) +6(3333 3330 3264 3334 3321 3335) +6(3336 3333 3267 3337 3324 3338) +6(3339 3325 3270 3340 2959 3336) +6(3341 2770 3272 3342 3329 3343) +6(3344 3341 3275 3345 3332 3346) +6(3347 3344 3278 3348 3335 3349) +6(3350 3347 3281 3351 3338 3352) +6(3353 3339 3284 3354 2975 3350) +6(3355 2465 3286 2982 856 3356) +6(3357 3355 3289 2985 860 3358) +6(3359 3357 3292 2988 864 3360) +6(3361 3359 3295 2991 868 3362) +6(3363 872 3298 2992 2914 3361) +6(3364 2545 3300 2996 3356 3365) +6(3366 3364 3303 2999 3358 3367) +6(3368 3366 3306 3002 3360 3369) +6(3370 3368 3309 3005 3362 3371) +6(3372 3363 3312 3006 2930 3370) +6(3373 2625 3314 3010 3365 3374) +6(3375 3373 3317 3013 3367 3376) +6(3377 3375 3320 3016 3369 3378) +6(3379 3377 3323 3019 3371 3380) +6(3381 3372 3326 3020 2946 3379) +6(3382 2705 3328 3024 3374 3383) +6(3384 3382 3331 3027 3376 3385) +6(3386 3384 3334 3030 3378 3387) +6(3388 3386 3337 3033 3380 3389) +6(3390 3381 3340 3034 2962 3388) +6(3391 2785 3342 3038 3383 3392) +6(3393 3391 3345 3041 3385 3394) +6(3395 3393 3348 3044 3387 3396) +6(3397 3395 3351 3047 3389 3398) +6(3399 3390 3354 3048 2978 3397) +6(3400 3401 3129 4754 3402 2853) +6(3403 3404 3133 4753 3405 3402) +6(3406 3407 3137 4752 3408 3405) +6(3409 3410 3141 4751 3411 3408) +6(3412 3413 3144 4750 2966 3411) +6(3414 2865 4759 3203 3401 3415) +6(3416 3414 4758 3206 3404 3417) +6(3418 3416 4757 3209 3407 3419) +6(3420 3418 4756 3212 3410 3421) +6(3422 3413 4755 3213 2970 3420) +6(3423 2875 4764 3273 3415 3424) +6(3425 3423 4763 3276 3417 3426) +6(3427 3425 4762 3279 3419 3428) +6(3429 3427 4761 3282 3421 3430) +6(3431 3422 4760 3283 2973 3429) +6(3432 2885 4769 3343 3424 3433) +6(3434 3432 4768 3346 3426 3435) +6(3436 3434 4767 3349 3428 3437) +6(3438 3436 4766 3352 3430 3439) +6(3440 3431 4765 3353 2976 3438) +6(3441 2895 4774 3392 3433 3037) +6(3442 3441 4773 3394 3435 3040) +6(3443 3442 4772 3396 3437 3043) +6(3444 3443 4771 3398 3439 3046) +6(4770 3399 3440 3049 2979 3444) +6(3445 4629 1195 3446 2320 3447) +6(3448 4628 1211 3449 3447 3450) +6(3451 4627 1227 3452 3450 3453) +6(3454 4626 1243 3455 3453 3456) +6(3457 4625 1259 3458 3456 3459) +6(3460 4634 3446 3461 2324 3462) +6(3463 4633 3449 3464 3462 3465) +6(3466 4632 3452 3467 3465 3468) +6(3469 4631 3455 3470 3468 3471) +6(3472 4630 3458 3473 3471 3474) +6(3475 4639 3461 3476 2328 3477) +6(3478 4638 3464 3479 3477 3480) +6(3481 4637 3467 3482 3480 3483) +6(3484 4636 3470 3485 3483 3486) +6(3487 4635 3473 3488 3486 3489) +6(3490 4644 3476 3491 2332 3492) +6(3493 4643 3479 3494 3492 3495) +6(3496 4642 3482 3497 3495 3498) +6(3499 4641 3485 3500 3498 3501) +6(3502 4640 3488 3503 3501 3504) +6(3505 4649 3491 3506 2336 3507) +6(3508 4648 3494 3509 3507 3510) +6(3511 4647 3497 3512 3510 3513) +6(3514 4646 3500 3515 3513 3516) +6(3517 4645 3503 3518 3516 3519) +6(3520 3521 3522 1275 3523 2400) +6(3524 3521 2405 3525 1280 3526) +6(3527 3524 2409 3528 1284 3529) +6(3530 3527 2413 3531 1288 3532) +6(3533 1292 2417 3534 3445 3530) +6(3535 3536 3537 3522 3538 2480) +6(3539 3536 2485 3540 3526 3541) +6(3542 3539 2489 3543 3529 3544) +6(3545 3542 2493 3546 3532 3547) +6(3548 3533 2497 3549 3460 3545) +6(3550 3551 3552 3537 3553 2560) +6(3554 3551 2565 3555 3541 3556) +6(3557 3554 2569 3558 3544 3559) +6(3560 3557 2573 3561 3547 3562) +6(3563 3548 2577 3564 3475 3560) +6(3565 3566 3567 3552 3568 2640) +6(3569 3566 2645 3570 3556 3571) +6(3572 3569 2649 3573 3559 3574) +6(3575 3572 2653 3576 3562 3577) +6(3578 3563 2657 3579 3490 3575) +6(3580 3581 3582 3567 3583 2720) +6(3584 3581 2725 3585 3571 3586) +6(3587 3584 2729 3588 3574 3589) +6(3590 3587 2733 3591 3577 3592) +6(3593 3578 2737 3594 3505 3590) +6(3595 3596 3597 1295 3598 3523) +6(3599 3596 3525 3600 1300 3601) +6(3602 3599 3528 3603 1304 3604) +6(3605 3602 3531 3606 1308 3607) +6(3608 1312 3534 3609 3448 3605) +6(3610 3611 3612 3597 3613 3538) +6(3614 3611 3540 3615 3601 3616) +6(3617 3614 3543 3618 3604 3619) +6(3620 3617 3546 3621 3607 3622) +6(3623 3608 3549 3624 3463 3620) +6(3625 3626 3627 3612 3628 3553) +6(3629 3626 3555 3630 3616 3631) +6(3632 3629 3558 3633 3619 3634) +6(3635 3632 3561 3636 3622 3637) +6(3638 3623 3564 3639 3478 3635) +6(3640 3641 3642 3627 3643 3568) +6(3644 3641 3570 3645 3631 3646) +6(3647 3644 3573 3648 3634 3649) +6(3650 3647 3576 3651 3637 3652) +6(3653 3638 3579 3654 3493 3650) +6(3655 3656 3657 3642 3658 3583) +6(3659 3656 3585 3660 3646 3661) +6(3662 3659 3588 3663 3649 3664) +6(3665 3662 3591 3666 3652 3667) +6(3668 3653 3594 3669 3508 3665) +6(3670 3671 3672 1315 3673 3598) +6(3674 3671 3600 3675 1320 3676) +6(3677 3674 3603 3678 1324 3679) +6(3680 3677 3606 3681 1328 3682) +6(3683 1332 3609 3684 3451 3680) +6(3685 3686 3687 3672 3688 3613) +6(3689 3686 3615 3690 3676 3691) +6(3692 3689 3618 3693 3679 3694) +6(3695 3692 3621 3696 3682 3697) +6(3698 3683 3624 3699 3466 3695) +6(3700 3701 3702 3687 3703 3628) +6(3704 3701 3630 3705 3691 3706) +6(3707 3704 3633 3708 3694 3709) +6(3710 3707 3636 3711 3697 3712) +6(3713 3698 3639 3714 3481 3710) +6(3715 3716 3717 3702 3718 3643) +6(3719 3716 3645 3720 3706 3721) +6(3722 3719 3648 3723 3709 3724) +6(3725 3722 3651 3726 3712 3727) +6(3728 3713 3654 3729 3496 3725) +6(3730 3731 3732 3717 3733 3658) +6(3734 3731 3660 3735 3721 3736) +6(3737 3734 3663 3738 3724 3739) +6(3740 3737 3666 3741 3727 3742) +6(3743 3728 3669 3744 3511 3740) +6(3745 3746 3747 1335 3748 3673) +6(3749 3746 3675 3750 1340 3751) +6(3752 3749 3678 3753 1344 3754) +6(3755 3752 3681 3756 1348 3757) +6(3758 1352 3684 3759 3454 3755) +6(3760 3761 3762 3747 3763 3688) +6(3764 3761 3690 3765 3751 3766) +6(3767 3764 3693 3768 3754 3769) +6(3770 3767 3696 3771 3757 3772) +6(3773 3758 3699 3774 3469 3770) +6(3775 3776 3777 3762 3778 3703) +6(3779 3776 3705 3780 3766 3781) +6(3782 3779 3708 3783 3769 3784) +6(3785 3782 3711 3786 3772 3787) +6(3788 3773 3714 3789 3484 3785) +6(3790 3791 3792 3777 3793 3718) +6(3794 3791 3720 3795 3781 3796) +6(3797 3794 3723 3798 3784 3799) +6(3800 3797 3726 3801 3787 3802) +6(3803 3788 3729 3804 3499 3800) +6(3805 3806 3807 3792 3808 3733) +6(3809 3806 3735 3810 3796 3811) +6(3812 3809 3738 3813 3799 3814) +6(3815 3812 3741 3816 3802 3817) +6(3818 3803 3744 3819 3514 3815) +6(3820 3821 3822 1355 3823 3748) +6(3824 3821 3750 3825 1360 3826) +6(3827 3824 3753 3828 1364 3829) +6(3830 3827 3756 3831 1368 3832) +6(3833 1372 3759 3834 3457 3830) +6(3835 3836 3837 3822 3838 3763) +6(3839 3836 3765 3840 3826 3841) +6(3842 3839 3768 3843 3829 3844) +6(3845 3842 3771 3846 3832 3847) +6(3848 3833 3774 3849 3472 3845) +6(3850 3851 3852 3837 3853 3778) +6(3854 3851 3780 3855 3841 3856) +6(3857 3854 3783 3858 3844 3859) +6(3860 3857 3786 3861 3847 3862) +6(3863 3848 3789 3864 3487 3860) +6(3865 3866 3867 3852 3868 3793) +6(3869 3866 3795 3870 3856 3871) +6(3872 3869 3798 3873 3859 3874) +6(3875 3872 3801 3876 3862 3877) +6(3878 3863 3804 3879 3502 3875) +6(3880 3881 3882 3867 3883 3808) +6(3884 3881 3810 3885 3871 3886) +6(3887 3884 3813 3888 3874 3889) +6(3890 3887 3816 3891 3877 3892) +6(3893 3878 3819 3894 3517 3890) +6(3895 3896 3897 2850 3582 4579) +6(3898 3896 4578 3586 2854 3899) +6(3900 3898 4577 3589 2857 3901) +6(3902 3900 4576 3592 2860 3903) +6(3904 2863 4575 3593 3506 3902) +6(3905 3906 3907 3897 3657 4584) +6(3908 3906 4583 3661 3899 3909) +6(3910 3908 4582 3664 3901 3911) +6(3912 3910 4581 3667 3903 3913) +6(3914 3904 4580 3668 3509 3912) +6(3915 3916 3917 3907 3732 4589) +6(3918 3916 4588 3736 3909 3919) +6(3920 3918 4587 3739 3911 3921) +6(3922 3920 4586 3742 3913 3923) +6(3924 3914 4585 3743 3512 3922) +6(3925 3926 3927 3917 3807 4594) +6(3928 3926 4593 3811 3919 3929) +6(3930 3928 4592 3814 3921 3931) +6(3932 3930 4591 3817 3923 3933) +6(3934 3924 4590 3818 3515 3932) +6(3935 3936 3937 3927 3882 4599) +6(3938 3936 4598 3886 3929 3939) +6(3940 3938 4597 3889 3931 3941) +6(3942 3940 4596 3892 3933 3943) +6(3944 3934 4595 3893 3518 3942) +6(3945 3946 3823 4604 3947 1675) +6(3948 3946 1679 3949 4609 3825) +6(3950 3948 1682 3951 4614 3828) +6(3952 3950 1685 3953 4619 3831) +6(3954 1688 4624 3834 3952 3459) +6(3955 3956 3838 4603 3957 3947) +6(3958 3956 3949 3959 4608 3840) +6(3960 3958 3951 3961 4613 3843) +6(3962 3960 3953 3963 4618 3846) +6(3964 3954 4623 3849 3962 3474) +6(3965 3966 3853 4602 3967 3957) +6(3968 3966 3959 3969 4607 3855) +6(3970 3968 3961 3971 4612 3858) +6(3972 3970 3963 3973 4617 3861) +6(3974 3964 4622 3864 3972 3489) +6(3975 3976 3868 4601 3977 3967) +6(3978 3976 3969 3979 4606 3870) +6(3980 3978 3971 3981 4611 3873) +6(3982 3980 3973 3983 4616 3876) +6(3984 3974 4621 3879 3982 3504) +6(3985 3986 3883 4600 3937 3977) +6(3987 3986 3979 3939 4605 3885) +6(3988 3987 3981 3941 4610 3888) +6(3989 3988 3983 3943 4615 3891) +6(4620 3894 3989 3519 3944 3984) +6(3990 1775 4704 3991 2900 3992) +6(3993 3990 4703 3994 2916 3995) +6(3996 3993 4702 3997 2932 3998) +6(3999 3996 4701 4000 2948 4001) +6(4002 3999 4700 4003 2964 4004) +6(4005 1779 4709 4006 3992 4007) +6(4008 4005 4708 4009 3995 4010) +6(4011 4008 4707 4012 3998 4013) +6(4014 4011 4706 4015 4001 4016) +6(4017 4014 4705 4018 4004 4019) +6(4020 1783 4714 4021 4007 4022) +6(4023 4020 4713 4024 4010 4025) +6(4026 4023 4712 4027 4013 4028) +6(4029 4026 4711 4030 4016 4031) +6(4032 4029 4710 4033 4019 4034) +6(4035 1787 4719 4036 4022 4037) +6(4038 4035 4718 4039 4025 4040) +6(4041 4038 4717 4042 4028 4043) +6(4044 4041 4716 4045 4031 4046) +6(4047 4044 4715 4048 4034 4049) +6(4050 1791 4724 4051 4037 4052) +6(4053 4050 4723 4054 4040 4055) +6(4056 4053 4722 4057 4043 4058) +6(4059 4056 4721 4060 4046 4061) +6(4062 4059 4720 4063 4049 4064) +6(4065 3895 3400 4066 4679 4067) +6(4068 4065 3403 4069 4684 4070) +6(4071 4068 3406 4072 4689 4073) +6(4074 4071 3409 4075 4694 4076) +6(4077 4699 3412 4078 4002 4074) +6(4079 3905 4066 4080 4678 4081) +6(4082 4079 4069 4083 4683 4084) +6(4085 4082 4072 4086 4688 4087) +6(4088 4085 4075 4089 4693 4090) +6(4091 4698 4078 4092 4017 4088) +6(4093 3915 4080 4094 4677 4095) +6(4096 4093 4083 4097 4682 4098) +6(4099 4096 4086 4100 4687 4101) +6(4102 4099 4089 4103 4692 4104) +6(4105 4697 4092 4106 4032 4102) +6(4107 3925 4094 4108 4676 4109) +6(4110 4107 4097 4111 4681 4112) +6(4113 4110 4100 4114 4686 4115) +6(4116 4113 4103 4117 4691 4118) +6(4119 4696 4106 4120 4047 4116) +6(4121 3935 4108 4122 4675 4123) +6(4124 4121 4111 4125 4680 4126) +6(4127 4124 4114 4128 4685 4129) +6(4130 4127 4117 4131 4690 4132) +6(4133 4695 4120 4134 4062 4130) +6(4135 3520 1930 4136 3050 4137) +6(4138 4135 1934 4139 3054 4140) +6(4141 4138 1938 4142 3058 4143) +6(4144 4141 1942 4145 3062 4146) +6(4147 3066 1946 4148 3991 4144) +6(4149 3595 2005 4150 4137 4151) +6(4152 4149 2009 4153 4140 4154) +6(4155 4152 2013 4156 4143 4157) +6(4158 4155 2017 4159 4146 4160) +6(4161 4147 2021 4162 4006 4158) +6(4163 3670 2080 4164 4151 4165) +6(4166 4163 2084 4167 4154 4168) +6(4169 4166 2088 4170 4157 4171) +6(4172 4169 2092 4173 4160 4174) +6(4175 4161 2096 4176 4021 4172) +6(4177 3745 2155 4178 4165 4179) +6(4180 4177 2159 4181 4168 4182) +6(4183 4180 2163 4184 4171 4185) +6(4186 4183 2167 4187 4174 4188) +6(4189 4175 2171 4190 4036 4186) +6(4191 3820 2230 4192 4179 4193) +6(4194 4191 2233 4195 4182 4196) +6(4197 4194 2236 4198 4185 4199) +6(4200 4197 2239 4201 4188 4202) +6(4203 4189 2242 4204 4051 4200) +6(4205 3535 4136 4206 3069 4207) +6(4208 4205 4139 4209 3073 4210) +6(4211 4208 4142 4212 3077 4213) +6(4214 4211 4145 4215 3081 4216) +6(4217 3085 4148 4218 3994 4214) +6(4219 3610 4150 4220 4207 4221) +6(4222 4219 4153 4223 4210 4224) +6(4225 4222 4156 4226 4213 4227) +6(4228 4225 4159 4229 4216 4230) +6(4231 4217 4162 4232 4009 4228) +6(4233 3685 4164 4234 4221 4235) +6(4236 4233 4167 4237 4224 4238) +6(4239 4236 4170 4240 4227 4241) +6(4242 4239 4173 4243 4230 4244) +6(4245 4231 4176 4246 4024 4242) +6(4247 3760 4178 4248 4235 4249) +6(4250 4247 4181 4251 4238 4252) +6(4253 4250 4184 4254 4241 4255) +6(4256 4253 4187 4257 4244 4258) +6(4259 4245 4190 4260 4039 4256) +6(4261 3835 4192 4262 4249 4263) +6(4264 4261 4195 4265 4252 4266) +6(4267 4264 4198 4268 4255 4269) +6(4270 4267 4201 4271 4258 4272) +6(4273 4259 4204 4274 4054 4270) +6(4275 3550 4206 4276 3088 4277) +6(4278 4275 4209 4279 3092 4280) +6(4281 4278 4212 4282 3096 4283) +6(4284 4281 4215 4285 3100 4286) +6(4287 3104 4218 4288 3997 4284) +6(4289 3625 4220 4290 4277 4291) +6(4292 4289 4223 4293 4280 4294) +6(4295 4292 4226 4296 4283 4297) +6(4298 4295 4229 4299 4286 4300) +6(4301 4287 4232 4302 4012 4298) +6(4303 3700 4234 4304 4291 4305) +6(4306 4303 4237 4307 4294 4308) +6(4309 4306 4240 4310 4297 4311) +6(4312 4309 4243 4313 4300 4314) +6(4315 4301 4246 4316 4027 4312) +6(4317 3775 4248 4318 4305 4319) +6(4320 4317 4251 4321 4308 4322) +6(4323 4320 4254 4324 4311 4325) +6(4326 4323 4257 4327 4314 4328) +6(4329 4315 4260 4330 4042 4326) +6(4331 3850 4262 4332 4319 4333) +6(4334 4331 4265 4335 4322 4336) +6(4337 4334 4268 4338 4325 4339) +6(4340 4337 4271 4341 4328 4342) +6(4343 4329 4274 4344 4057 4340) +6(4345 3565 4276 4346 3107 4347) +6(4348 4345 4279 4349 3111 4350) +6(4351 4348 4282 4352 3115 4353) +6(4354 4351 4285 4355 3119 4356) +6(4357 3123 4288 4358 4000 4354) +6(4359 3640 4290 4360 4347 4361) +6(4362 4359 4293 4363 4350 4364) +6(4365 4362 4296 4366 4353 4367) +6(4368 4365 4299 4369 4356 4370) +6(4371 4357 4302 4372 4015 4368) +6(4373 3715 4304 4374 4361 4375) +6(4376 4373 4307 4377 4364 4378) +6(4379 4376 4310 4380 4367 4381) +6(4382 4379 4313 4383 4370 4384) +6(4385 4371 4316 4386 4030 4382) +6(4387 3790 4318 4388 4375 4389) +6(4390 4387 4321 4391 4378 4392) +6(4393 4390 4324 4394 4381 4395) +6(4396 4393 4327 4397 4384 4398) +6(4399 4385 4330 4400 4045 4396) +6(4401 3865 4332 4402 4389 4403) +6(4404 4401 4335 4405 4392 4406) +6(4407 4404 4338 4408 4395 4409) +6(4410 4407 4341 4411 4398 4412) +6(4413 4399 4344 4414 4060 4410) +6(4415 3580 4346 4067 3126 4416) +6(4417 4415 4349 4070 3130 4418) +6(4419 4417 4352 4073 3134 4420) +6(4421 4419 4355 4076 3138 4422) +6(4423 3142 4358 4077 4003 4421) +6(4424 3655 4360 4081 4416 4425) +6(4426 4424 4363 4084 4418 4427) +6(4428 4426 4366 4087 4420 4429) +6(4430 4428 4369 4090 4422 4431) +6(4432 4423 4372 4091 4018 4430) +6(4433 3730 4374 4095 4425 4434) +6(4435 4433 4377 4098 4427 4436) +6(4437 4435 4380 4101 4429 4438) +6(4439 4437 4383 4104 4431 4440) +6(4441 4432 4386 4105 4033 4439) +6(4442 3805 4388 4109 4434 4443) +6(4444 4442 4391 4112 4436 4445) +6(4446 4444 4394 4115 4438 4447) +6(4448 4446 4397 4118 4440 4449) +6(4450 4441 4400 4119 4048 4448) +6(4451 3880 4402 4123 4443 4452) +6(4453 4451 4405 4126 4445 4454) +6(4455 4453 4408 4129 4447 4456) +6(4457 4455 4411 4132 4449 4458) +6(4459 4450 4414 4133 4063 4457) +6(4460 3945 4654 4193 1855 4461) +6(4462 4460 4653 4196 1859 4463) +6(4464 4462 4652 4199 1863 4465) +6(4466 4464 4651 4202 1867 4467) +6(4468 1871 4650 4203 4052 4466) +6(4469 3955 4659 4263 4461 4470) +6(4471 4469 4658 4266 4463 4472) +6(4473 4471 4657 4269 4465 4474) +6(4475 4473 4656 4272 4467 4476) +6(4477 4468 4655 4273 4055 4475) +6(4478 3965 4664 4333 4470 4479) +6(4480 4478 4663 4336 4472 4481) +6(4482 4480 4662 4339 4474 4483) +6(4484 4482 4661 4342 4476 4485) +6(4486 4477 4660 4343 4058 4484) +6(4487 3975 4669 4403 4479 4488) +6(4489 4487 4668 4406 4481 4490) +6(4491 4489 4667 4409 4483 4492) +6(4493 4491 4666 4412 4485 4494) +6(4495 4486 4665 4413 4061 4493) +6(4496 3985 4674 4452 4488 4122) +6(4497 4496 4673 4454 4490 4125) +6(4498 4497 4672 4456 4492 4128) +6(4499 4498 4671 4458 4494 4131) +6(4670 4459 4495 4134 4064 4499) +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/constant/polyMesh/faces b/tutorials/finiteArea/sphereTransport/constant/polyMesh/faces new file mode 100644 index 0000000000000000000000000000000000000000..3bbd368be4c5360101d1f8a14b60b6681a283664 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/polyMesh/faces @@ -0,0 +1,5123 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class faceList; + location "constant/polyMesh"; + object faces; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5100 +( +4(614 612 2 87) +4(706 582 39 648) +4(614 706 648 612) +4(614 87 582 706) +4(612 648 39 2) +4(615 614 87 88) +4(707 578 582 706) +4(615 707 706 614) +4(615 88 578 707) +4(616 615 88 89) +4(708 574 578 707) +4(616 708 707 615) +4(616 89 574 708) +4(617 616 89 90) +4(709 570 574 708) +4(617 709 708 616) +4(617 90 570 709) +4(613 617 90 91) +4(698 542 570 709) +4(613 698 709 617) +4(613 91 542 698) +4(649 38 39 648) +4(710 706 582 583) +4(649 710 583 38) +4(649 648 706 710) +4(706 707 711 710) +4(710 711 579 583) +4(707 578 579 711) +4(707 708 712 711) +4(711 712 575 579) +4(708 574 575 712) +4(708 709 713 712) +4(712 713 571 575) +4(709 570 571 713) +4(709 698 699 713) +4(713 699 543 571) +4(698 542 543 699) +4(650 37 38 649) +4(714 710 583 584) +4(650 714 584 37) +4(650 649 710 714) +4(710 711 715 714) +4(714 715 580 584) +4(711 579 580 715) +4(711 712 716 715) +4(715 716 576 580) +4(712 575 576 716) +4(712 713 717 716) +4(716 717 572 576) +4(713 571 572 717) +4(713 699 700 717) +4(717 700 544 572) +4(699 543 544 700) +4(651 36 37 650) +4(718 714 584 585) +4(651 718 585 36) +4(651 650 714 718) +4(714 715 719 718) +4(718 719 581 585) +4(715 580 581 719) +4(715 716 720 719) +4(719 720 577 581) +4(716 576 577 720) +4(716 717 721 720) +4(720 721 573 577) +4(717 572 573 721) +4(717 700 701 721) +4(721 701 545 573) +4(700 544 545 701) +4(643 35 36 651) +4(694 718 585 546) +4(643 694 546 35) +4(643 651 718 694) +4(718 719 695 694) +4(694 695 547 546) +4(719 581 547 695) +4(719 720 696 695) +4(695 696 548 547) +4(720 577 548 696) +4(720 721 697 696) +4(696 697 549 548) +4(721 573 549 697) +4(721 701 693 697) +4(697 693 541 549) +4(701 545 541 693) +4(634 607 602 608) +4(754 664 638 689) +4(634 754 689 607) +4(608 602 638 664) +4(634 608 664 754) +4(607 689 638 602) +4(630 634 608 609) +4(755 665 664 754) +4(630 755 754 634) +4(609 608 664 665) +4(630 609 665 755) +4(626 630 609 610) +4(756 666 665 755) +4(626 756 755 630) +4(610 609 665 666) +4(626 610 666 756) +4(622 626 610 611) +4(757 667 666 756) +4(622 757 756 626) +4(611 610 666 667) +4(622 611 667 757) +4(614 622 611 612) +4(706 648 667 757) +4(614 706 757 622) +4(612 611 667 648) +4(660 664 638 639) +4(758 690 689 754) +4(660 758 754 664) +4(639 638 689 690) +4(660 639 690 758) +4(661 665 664 660) +4(759 758 754 755) +4(661 759 755 665) +4(661 660 758 759) +4(662 666 665 661) +4(760 759 755 756) +4(662 760 756 666) +4(662 661 759 760) +4(663 667 666 662) +4(761 760 756 757) +4(663 761 757 667) +4(663 662 760 761) +4(649 648 667 663) +4(710 761 757 706) +4(649 663 761 710) +4(656 660 639 640) +4(762 691 690 758) +4(656 762 758 660) +4(640 639 690 691) +4(656 640 691 762) +4(657 661 660 656) +4(763 762 758 759) +4(657 763 759 661) +4(657 656 762 763) +4(658 662 661 657) +4(764 763 759 760) +4(658 764 760 662) +4(658 657 763 764) +4(659 663 662 658) +4(765 764 760 761) +4(659 765 761 663) +4(659 658 764 765) +4(650 649 663 659) +4(714 765 761 710) +4(650 659 765 714) +4(652 656 640 641) +4(766 692 691 762) +4(652 766 762 656) +4(641 640 691 692) +4(652 641 692 766) +4(653 657 656 652) +4(767 766 762 763) +4(653 767 763 657) +4(653 652 766 767) +4(654 658 657 653) +4(768 767 763 764) +4(654 768 764 658) +4(654 653 767 768) +4(655 659 658 654) +4(769 768 764 765) +4(655 769 765 659) +4(655 654 768 769) +4(651 650 659 655) +4(718 769 765 714) +4(651 655 769 718) +4(644 652 641 642) +4(722 673 692 766) +4(644 722 766 652) +4(642 641 692 673) +4(644 642 673 722) +4(645 653 652 644) +4(726 722 766 767) +4(645 726 767 653) +4(645 644 722 726) +4(646 654 653 645) +4(730 726 767 768) +4(646 730 768 654) +4(646 645 726 730) +4(647 655 654 646) +4(734 730 768 769) +4(647 734 769 655) +4(647 646 730 734) +4(643 651 655 647) +4(694 734 769 718) +4(643 647 734 694) +4(635 606 607 634) +4(770 754 689 685) +4(635 770 685 606) +4(635 634 754 770) +4(606 685 689 607) +4(631 635 634 630) +4(771 755 754 770) +4(631 771 770 635) +4(631 630 755 771) +4(627 631 630 626) +4(772 756 755 771) +4(627 772 771 631) +4(627 626 756 772) +4(623 627 626 622) +4(773 757 756 772) +4(623 773 772 627) +4(623 622 757 773) +4(615 623 622 614) +4(707 706 757 773) +4(615 707 773 623) +4(686 690 689 685) +4(774 770 754 758) +4(686 774 758 690) +4(686 685 770 774) +4(755 759 775 771) +4(771 775 774 770) +4(759 758 774 775) +4(756 760 776 772) +4(772 776 775 771) +4(760 759 775 776) +4(757 761 777 773) +4(773 777 776 772) +4(761 760 776 777) +4(710 761 777 711) +4(711 777 773 707) +4(687 691 690 686) +4(778 774 758 762) +4(687 778 762 691) +4(687 686 774 778) +4(759 763 779 775) +4(775 779 778 774) +4(763 762 778 779) +4(760 764 780 776) +4(776 780 779 775) +4(764 763 779 780) +4(761 765 781 777) +4(777 781 780 776) +4(765 764 780 781) +4(714 765 781 715) +4(715 781 777 711) +4(688 692 691 687) +4(782 778 762 766) +4(688 782 766 692) +4(688 687 778 782) +4(763 767 783 779) +4(779 783 782 778) +4(767 766 782 783) +4(764 768 784 780) +4(780 784 783 779) +4(768 767 783 784) +4(765 769 785 781) +4(781 785 784 780) +4(769 768 784 785) +4(718 769 785 719) +4(719 785 781 715) +4(674 673 692 688) +4(723 782 766 722) +4(674 723 722 673) +4(674 688 782 723) +4(767 726 727 783) +4(783 727 723 782) +4(726 722 723 727) +4(768 730 731 784) +4(784 731 727 783) +4(730 726 727 731) +4(769 734 735 785) +4(785 735 731 784) +4(734 730 731 735) +4(694 734 735 695) +4(695 735 785 719) +4(636 605 606 635) +4(786 770 685 681) +4(636 786 681 605) +4(636 635 770 786) +4(605 681 685 606) +4(632 636 635 631) +4(787 771 770 786) +4(632 787 786 636) +4(632 631 771 787) +4(628 632 631 627) +4(788 772 771 787) +4(628 788 787 632) +4(628 627 772 788) +4(624 628 627 623) +4(789 773 772 788) +4(624 789 788 628) +4(624 623 773 789) +4(616 624 623 615) +4(708 707 773 789) +4(616 708 789 624) +4(682 686 685 681) +4(790 786 770 774) +4(682 790 774 686) +4(682 681 786 790) +4(771 775 791 787) +4(787 791 790 786) +4(775 774 790 791) +4(772 776 792 788) +4(788 792 791 787) +4(776 775 791 792) +4(773 777 793 789) +4(789 793 792 788) +4(777 776 792 793) +4(711 777 793 712) +4(712 793 789 708) +4(683 687 686 682) +4(794 790 774 778) +4(683 794 778 687) +4(683 682 790 794) +4(775 779 795 791) +4(791 795 794 790) +4(779 778 794 795) +4(776 780 796 792) +4(792 796 795 791) +4(780 779 795 796) +4(777 781 797 793) +4(793 797 796 792) +4(781 780 796 797) +4(715 781 797 716) +4(716 797 793 712) +4(684 688 687 683) +4(798 794 778 782) +4(684 798 782 688) +4(684 683 794 798) +4(779 783 799 795) +4(795 799 798 794) +4(783 782 798 799) +4(780 784 800 796) +4(796 800 799 795) +4(784 783 799 800) +4(781 785 801 797) +4(797 801 800 796) +4(785 784 800 801) +4(719 785 801 720) +4(720 801 797 716) +4(675 674 688 684) +4(724 798 782 723) +4(675 724 723 674) +4(675 684 798 724) +4(783 727 728 799) +4(799 728 724 798) +4(727 723 724 728) +4(784 731 732 800) +4(800 732 728 799) +4(731 727 728 732) +4(785 735 736 801) +4(801 736 732 800) +4(735 731 732 736) +4(695 735 736 696) +4(696 736 801 720) +4(637 604 605 636) +4(802 786 681 677) +4(637 802 677 604) +4(637 636 786 802) +4(604 677 681 605) +4(633 637 636 632) +4(803 787 786 802) +4(633 803 802 637) +4(633 632 787 803) +4(629 633 632 628) +4(804 788 787 803) +4(629 804 803 633) +4(629 628 788 804) +4(625 629 628 624) +4(805 789 788 804) +4(625 805 804 629) +4(625 624 789 805) +4(617 625 624 616) +4(709 708 789 805) +4(617 709 805 625) +4(678 682 681 677) +4(806 802 786 790) +4(678 806 790 682) +4(678 677 802 806) +4(787 791 807 803) +4(803 807 806 802) +4(791 790 806 807) +4(788 792 808 804) +4(804 808 807 803) +4(792 791 807 808) +4(789 793 809 805) +4(805 809 808 804) +4(793 792 808 809) +4(712 793 809 713) +4(713 809 805 709) +4(679 683 682 678) +4(810 806 790 794) +4(679 810 794 683) +4(679 678 806 810) +4(791 795 811 807) +4(807 811 810 806) +4(795 794 810 811) +4(792 796 812 808) +4(808 812 811 807) +4(796 795 811 812) +4(793 797 813 809) +4(809 813 812 808) +4(797 796 812 813) +4(716 797 813 717) +4(717 813 809 713) +4(680 684 683 679) +4(814 810 794 798) +4(680 814 798 684) +4(680 679 810 814) +4(795 799 815 811) +4(811 815 814 810) +4(799 798 814 815) +4(796 800 816 812) +4(812 816 815 811) +4(800 799 815 816) +4(797 801 817 813) +4(813 817 816 812) +4(801 800 816 817) +4(720 801 817 721) +4(721 817 813 717) +4(676 675 684 680) +4(725 814 798 724) +4(676 725 724 675) +4(676 680 814 725) +4(799 728 729 815) +4(815 729 725 814) +4(728 724 725 729) +4(800 732 733 816) +4(816 733 729 815) +4(732 728 729 733) +4(801 736 737 817) +4(817 737 733 816) +4(736 732 733 737) +4(696 736 737 697) +4(697 737 817 721) +4(618 603 604 637) +4(738 802 677 669) +4(618 738 669 603) +4(618 637 802 738) +4(603 669 677 604) +4(619 618 637 633) +4(742 803 802 738) +4(619 742 738 618) +4(619 633 803 742) +4(620 619 633 629) +4(746 804 803 742) +4(620 746 742 619) +4(620 629 804 746) +4(621 620 629 625) +4(750 805 804 746) +4(621 750 746 620) +4(621 625 805 750) +4(613 621 625 617) +4(698 709 805 750) +4(613 698 750 621) +4(670 678 677 669) +4(739 738 802 806) +4(670 739 806 678) +4(670 669 738 739) +4(803 807 743 742) +4(742 743 739 738) +4(807 806 739 743) +4(804 808 747 746) +4(746 747 743 742) +4(808 807 743 747) +4(805 809 751 750) +4(750 751 747 746) +4(809 808 747 751) +4(713 809 751 699) +4(699 751 750 698) +4(671 679 678 670) +4(740 739 806 810) +4(671 740 810 679) +4(671 670 739 740) +4(807 811 744 743) +4(743 744 740 739) +4(811 810 740 744) +4(808 812 748 747) +4(747 748 744 743) +4(812 811 744 748) +4(809 813 752 751) +4(751 752 748 747) +4(813 812 748 752) +4(717 813 752 700) +4(700 752 751 699) +4(672 680 679 671) +4(741 740 810 814) +4(672 741 814 680) +4(672 671 740 741) +4(811 815 745 744) +4(744 745 741 740) +4(815 814 741 745) +4(812 816 749 748) +4(748 749 745 744) +4(816 815 745 749) +4(813 817 753 752) +4(752 753 749 748) +4(817 816 749 753) +4(721 817 753 701) +4(701 753 752 700) +4(668 676 680 672) +4(702 741 814 725) +4(668 702 725 676) +4(668 672 741 702) +4(815 729 703 745) +4(745 703 702 741) +4(729 725 702 703) +4(816 733 704 749) +4(749 704 703 745) +4(733 729 703 704) +4(817 737 705 753) +4(753 705 704 749) +4(737 733 704 705) +4(697 737 705 693) +4(693 705 753 701) +4(644 642 30 31) +4(722 598 77 673) +4(644 31 598 722) +4(642 673 77 30) +4(645 644 31 32) +4(726 594 598 722) +4(645 32 594 726) +4(646 645 32 33) +4(730 590 594 726) +4(646 33 590 730) +4(647 646 33 34) +4(734 586 590 730) +4(647 34 586 734) +4(643 647 34 35) +4(694 546 586 734) +4(674 76 77 673) +4(723 722 598 599) +4(674 723 599 76) +4(594 595 727 726) +4(595 599 723 727) +4(590 591 731 730) +4(591 595 727 731) +4(586 587 735 734) +4(587 591 731 735) +4(547 587 735 695) +4(675 75 76 674) +4(724 723 599 600) +4(675 724 600 75) +4(595 596 728 727) +4(596 600 724 728) +4(591 592 732 731) +4(592 596 728 732) +4(587 588 736 735) +4(588 592 732 736) +4(548 588 736 696) +4(676 74 75 675) +4(725 724 600 601) +4(676 725 601 74) +4(596 597 729 728) +4(597 601 725 729) +4(592 593 733 732) +4(593 597 729 733) +4(588 589 737 736) +4(589 593 733 737) +4(549 589 737 697) +4(668 73 74 676) +4(702 725 601 550) +4(668 702 550 73) +4(597 551 703 729) +4(551 550 702 703) +4(593 552 704 733) +4(552 551 703 704) +4(589 553 705 737) +4(553 552 704 705) +4(541 553 705 693) +4(618 95 68 603) +4(738 669 69 566) +4(618 738 566 95) +4(603 68 69 669) +4(619 94 95 618) +4(742 738 566 567) +4(619 742 567 94) +4(620 93 94 619) +4(746 742 567 568) +4(620 746 568 93) +4(621 92 93 620) +4(750 746 568 569) +4(621 750 569 92) +4(613 91 92 621) +4(698 750 569 542) +4(670 669 69 70) +4(739 562 566 738) +4(670 70 562 739) +4(567 742 743 563) +4(563 743 739 562) +4(568 746 747 564) +4(564 747 743 563) +4(569 750 751 565) +4(565 751 747 564) +4(565 543 699 751) +4(671 670 70 71) +4(740 558 562 739) +4(671 71 558 740) +4(563 743 744 559) +4(559 744 740 558) +4(564 747 748 560) +4(560 748 744 559) +4(565 751 752 561) +4(561 752 748 560) +4(561 544 700 752) +4(672 671 71 72) +4(741 554 558 740) +4(672 72 554 741) +4(559 744 745 555) +4(555 745 741 554) +4(560 748 749 556) +4(556 749 745 555) +4(561 752 753 557) +4(557 753 749 556) +4(557 545 701 753) +4(668 672 72 73) +4(702 550 554 741) +4(555 745 703 551) +4(556 749 704 552) +4(557 753 705 553) +4(828 104 40 818) +4(886 849 41 505) +4(828 886 505 104) +4(818 40 41 849) +4(828 818 849 886) +4(850 849 41 42) +4(890 501 505 886) +4(850 890 886 849) +4(850 42 501 890) +4(851 850 42 43) +4(894 497 501 890) +4(851 894 890 850) +4(851 43 497 894) +4(852 851 43 44) +4(898 493 497 894) +4(852 898 894 851) +4(852 44 493 898) +4(848 852 44 45) +4(874 489 493 898) +4(848 874 898 852) +4(848 45 489 874) +4(829 103 104 828) +4(887 886 505 506) +4(829 887 506 103) +4(829 828 886 887) +4(501 502 891 890) +4(890 891 887 886) +4(502 506 887 891) +4(497 498 895 894) +4(894 895 891 890) +4(498 502 891 895) +4(493 494 899 898) +4(898 899 895 894) +4(494 498 895 899) +4(489 490 875 874) +4(874 875 899 898) +4(490 494 899 875) +4(830 102 103 829) +4(888 887 506 507) +4(830 888 507 102) +4(830 829 887 888) +4(502 503 892 891) +4(891 892 888 887) +4(503 507 888 892) +4(498 499 896 895) +4(895 896 892 891) +4(499 503 892 896) +4(494 495 900 899) +4(899 900 896 895) +4(495 499 896 900) +4(490 491 876 875) +4(875 876 900 899) +4(491 495 900 876) +4(831 101 102 830) +4(889 888 507 508) +4(831 889 508 101) +4(831 830 888 889) +4(503 504 893 892) +4(892 893 889 888) +4(504 508 889 893) +4(499 500 897 896) +4(896 897 893 892) +4(500 504 893 897) +4(495 496 901 900) +4(900 901 897 896) +4(496 500 897 901) +4(491 492 877 876) +4(876 877 901 900) +4(492 496 901 877) +4(823 100 101 831) +4(878 889 508 481) +4(823 878 481 100) +4(823 831 889 878) +4(504 482 879 893) +4(893 879 878 889) +4(482 481 878 879) +4(500 483 880 897) +4(897 880 879 893) +4(483 482 879 880) +4(496 484 881 901) +4(901 881 880 897) +4(484 483 880 881) +4(492 480 873 877) +4(877 873 881 901) +4(480 484 881 873) +4(853 49 30 642) +4(902 673 77 537) +4(853 902 537 49) +4(853 642 673 902) +4(854 48 49 853) +4(906 902 537 538) +4(854 906 538 48) +4(854 853 902 906) +4(855 47 48 854) +4(910 906 538 539) +4(855 910 539 47) +4(855 854 906 910) +4(856 46 47 855) +4(914 910 539 540) +4(856 914 540 46) +4(856 855 910 914) +4(848 45 46 856) +4(874 914 540 489) +4(848 856 914 874) +4(537 902 903 533) +4(533 903 674 76) +4(902 673 674 903) +4(538 906 907 534) +4(534 907 903 533) +4(906 902 903 907) +4(539 910 911 535) +4(535 911 907 534) +4(910 906 907 911) +4(540 914 915 536) +4(536 915 911 535) +4(914 910 911 915) +4(874 914 915 875) +4(875 915 536 490) +4(533 903 904 529) +4(529 904 675 75) +4(903 674 675 904) +4(534 907 908 530) +4(530 908 904 529) +4(907 903 904 908) +4(535 911 912 531) +4(531 912 908 530) +4(911 907 908 912) +4(536 915 916 532) +4(532 916 912 531) +4(915 911 912 916) +4(875 915 916 876) +4(876 916 532 491) +4(529 904 905 525) +4(525 905 676 74) +4(904 675 676 905) +4(530 908 909 526) +4(526 909 905 525) +4(908 904 905 909) +4(531 912 913 527) +4(527 913 909 526) +4(912 908 909 913) +4(532 916 917 528) +4(528 917 913 527) +4(916 912 913 917) +4(876 916 917 877) +4(877 917 528 492) +4(525 905 882 485) +4(485 882 668 73) +4(905 676 668 882) +4(526 909 883 486) +4(486 883 882 485) +4(909 905 882 883) +4(527 913 884 487) +4(487 884 883 486) +4(913 909 883 884) +4(528 917 885 488) +4(488 885 884 487) +4(917 913 884 885) +4(877 917 885 873) +4(873 885 488 480) +4(844 822 602 607) +4(934 689 638 869) +4(844 934 869 822) +4(844 607 689 934) +4(822 869 638 602) +4(845 821 822 844) +4(935 934 869 865) +4(845 935 865 821) +4(845 844 934 935) +4(821 865 869 822) +4(846 820 821 845) +4(936 935 865 861) +4(846 936 861 820) +4(846 845 935 936) +4(820 861 865 821) +4(847 819 820 846) +4(937 936 861 857) +4(847 937 857 819) +4(847 846 936 937) +4(819 857 861 820) +4(828 818 819 847) +4(886 937 857 849) +4(828 847 937 886) +4(818 849 857 819) +4(840 844 607 606) +4(938 685 689 934) +4(840 938 934 844) +4(840 606 685 938) +4(841 845 844 840) +4(939 938 934 935) +4(841 939 935 845) +4(841 840 938 939) +4(842 846 845 841) +4(940 939 935 936) +4(842 940 936 846) +4(842 841 939 940) +4(843 847 846 842) +4(941 940 936 937) +4(843 941 937 847) +4(843 842 940 941) +4(829 828 847 843) +4(887 941 937 886) +4(829 843 941 887) +4(836 840 606 605) +4(942 681 685 938) +4(836 942 938 840) +4(836 605 681 942) +4(837 841 840 836) +4(943 942 938 939) +4(837 943 939 841) +4(837 836 942 943) +4(838 842 841 837) +4(944 943 939 940) +4(838 944 940 842) +4(838 837 943 944) +4(839 843 842 838) +4(945 944 940 941) +4(839 945 941 843) +4(839 838 944 945) +4(830 829 843 839) +4(888 945 941 887) +4(830 839 945 888) +4(832 836 605 604) +4(946 677 681 942) +4(832 946 942 836) +4(832 604 677 946) +4(833 837 836 832) +4(947 946 942 943) +4(833 947 943 837) +4(833 832 946 947) +4(834 838 837 833) +4(948 947 943 944) +4(834 948 944 838) +4(834 833 947 948) +4(835 839 838 834) +4(949 948 944 945) +4(835 949 945 839) +4(835 834 948 949) +4(831 830 839 835) +4(889 949 945 888) +4(831 835 949 889) +4(824 832 604 603) +4(918 669 677 946) +4(824 918 946 832) +4(824 603 669 918) +4(825 833 832 824) +4(922 918 946 947) +4(825 922 947 833) +4(825 824 918 922) +4(826 834 833 825) +4(926 922 947 948) +4(826 926 948 834) +4(826 825 922 926) +4(827 835 834 826) +4(930 926 948 949) +4(827 930 949 835) +4(827 826 926 930) +4(823 831 835 827) +4(878 930 949 889) +4(823 827 930 878) +4(870 639 638 869) +4(950 934 689 690) +4(870 950 690 639) +4(870 869 934 950) +4(866 870 869 865) +4(951 935 934 950) +4(866 951 950 870) +4(866 865 935 951) +4(862 866 865 861) +4(952 936 935 951) +4(862 952 951 866) +4(862 861 936 952) +4(858 862 861 857) +4(953 937 936 952) +4(858 953 952 862) +4(858 857 937 953) +4(850 858 857 849) +4(890 886 937 953) +4(850 890 953 858) +4(934 938 954 950) +4(950 954 686 690) +4(938 685 686 954) +4(935 939 955 951) +4(951 955 954 950) +4(939 938 954 955) +4(936 940 956 952) +4(952 956 955 951) +4(940 939 955 956) +4(937 941 957 953) +4(953 957 956 952) +4(941 940 956 957) +4(887 941 957 891) +4(891 957 953 890) +4(938 942 958 954) +4(954 958 682 686) +4(942 681 682 958) +4(939 943 959 955) +4(955 959 958 954) +4(943 942 958 959) +4(940 944 960 956) +4(956 960 959 955) +4(944 943 959 960) +4(941 945 961 957) +4(957 961 960 956) +4(945 944 960 961) +4(888 945 961 892) +4(892 961 957 891) +4(942 946 962 958) +4(958 962 678 682) +4(946 677 678 962) +4(943 947 963 959) +4(959 963 962 958) +4(947 946 962 963) +4(944 948 964 960) +4(960 964 963 959) +4(948 947 963 964) +4(945 949 965 961) +4(961 965 964 960) +4(949 948 964 965) +4(889 949 965 893) +4(893 965 961 892) +4(946 918 919 962) +4(962 919 670 678) +4(918 669 670 919) +4(947 922 923 963) +4(963 923 919 962) +4(922 918 919 923) +4(948 926 927 964) +4(964 927 923 963) +4(926 922 923 927) +4(949 930 931 965) +4(965 931 927 964) +4(930 926 927 931) +4(878 930 931 879) +4(879 931 965 893) +4(871 640 639 870) +4(966 950 690 691) +4(871 966 691 640) +4(871 870 950 966) +4(867 871 870 866) +4(967 951 950 966) +4(867 967 966 871) +4(867 866 951 967) +4(863 867 866 862) +4(968 952 951 967) +4(863 968 967 867) +4(863 862 952 968) +4(859 863 862 858) +4(969 953 952 968) +4(859 969 968 863) +4(859 858 953 969) +4(851 859 858 850) +4(894 890 953 969) +4(851 894 969 859) +4(950 954 970 966) +4(966 970 687 691) +4(954 686 687 970) +4(951 955 971 967) +4(967 971 970 966) +4(955 954 970 971) +4(952 956 972 968) +4(968 972 971 967) +4(956 955 971 972) +4(953 957 973 969) +4(969 973 972 968) +4(957 956 972 973) +4(891 957 973 895) +4(895 973 969 894) +4(954 958 974 970) +4(970 974 683 687) +4(958 682 683 974) +4(955 959 975 971) +4(971 975 974 970) +4(959 958 974 975) +4(956 960 976 972) +4(972 976 975 971) +4(960 959 975 976) +4(957 961 977 973) +4(973 977 976 972) +4(961 960 976 977) +4(892 961 977 896) +4(896 977 973 895) +4(958 962 978 974) +4(974 978 679 683) +4(962 678 679 978) +4(959 963 979 975) +4(975 979 978 974) +4(963 962 978 979) +4(960 964 980 976) +4(976 980 979 975) +4(964 963 979 980) +4(961 965 981 977) +4(977 981 980 976) +4(965 964 980 981) +4(893 965 981 897) +4(897 981 977 896) +4(962 919 920 978) +4(978 920 671 679) +4(919 670 671 920) +4(963 923 924 979) +4(979 924 920 978) +4(923 919 920 924) +4(964 927 928 980) +4(980 928 924 979) +4(927 923 924 928) +4(965 931 932 981) +4(981 932 928 980) +4(931 927 928 932) +4(879 931 932 880) +4(880 932 981 897) +4(872 641 640 871) +4(982 966 691 692) +4(872 982 692 641) +4(872 871 966 982) +4(868 872 871 867) +4(983 967 966 982) +4(868 983 982 872) +4(868 867 967 983) +4(864 868 867 863) +4(984 968 967 983) +4(864 984 983 868) +4(864 863 968 984) +4(860 864 863 859) +4(985 969 968 984) +4(860 985 984 864) +4(860 859 969 985) +4(852 860 859 851) +4(898 894 969 985) +4(852 898 985 860) +4(966 970 986 982) +4(982 986 688 692) +4(970 687 688 986) +4(967 971 987 983) +4(983 987 986 982) +4(971 970 986 987) +4(968 972 988 984) +4(984 988 987 983) +4(972 971 987 988) +4(969 973 989 985) +4(985 989 988 984) +4(973 972 988 989) +4(895 973 989 899) +4(899 989 985 898) +4(970 974 990 986) +4(986 990 684 688) +4(974 683 684 990) +4(971 975 991 987) +4(987 991 990 986) +4(975 974 990 991) +4(972 976 992 988) +4(988 992 991 987) +4(976 975 991 992) +4(973 977 993 989) +4(989 993 992 988) +4(977 976 992 993) +4(896 977 993 900) +4(900 993 989 899) +4(974 978 994 990) +4(990 994 680 684) +4(978 679 680 994) +4(975 979 995 991) +4(991 995 994 990) +4(979 978 994 995) +4(976 980 996 992) +4(992 996 995 991) +4(980 979 995 996) +4(977 981 997 993) +4(993 997 996 992) +4(981 980 996 997) +4(897 981 997 901) +4(901 997 993 900) +4(978 920 921 994) +4(994 921 672 680) +4(920 671 672 921) +4(979 924 925 995) +4(995 925 921 994) +4(924 920 921 925) +4(980 928 929 996) +4(996 929 925 995) +4(928 924 925 929) +4(981 932 933 997) +4(997 933 929 996) +4(932 928 929 933) +4(880 932 933 881) +4(881 933 997 901) +4(853 642 641 872) +4(902 982 692 673) +4(853 872 982 902) +4(854 853 872 868) +4(906 983 982 902) +4(854 868 983 906) +4(855 854 868 864) +4(910 984 983 906) +4(855 864 984 910) +4(856 855 864 860) +4(914 985 984 910) +4(856 860 985 914) +4(848 856 860 852) +4(874 898 985 914) +4(982 986 903 902) +4(986 688 674 903) +4(983 987 907 906) +4(987 986 903 907) +4(984 988 911 910) +4(988 987 907 911) +4(985 989 915 914) +4(989 988 911 915) +4(899 989 915 875) +4(986 990 904 903) +4(990 684 675 904) +4(987 991 908 907) +4(991 990 904 908) +4(988 992 912 911) +4(992 991 908 912) +4(989 993 916 915) +4(993 992 912 916) +4(900 993 916 876) +4(990 994 905 904) +4(994 680 676 905) +4(991 995 909 908) +4(995 994 905 909) +4(992 996 913 912) +4(996 995 909 913) +4(993 997 917 916) +4(997 996 913 917) +4(901 997 917 877) +4(994 921 882 905) +4(921 672 668 882) +4(995 925 883 909) +4(925 921 882 883) +4(996 929 884 913) +4(929 925 883 884) +4(997 933 885 917) +4(933 929 884 885) +4(881 933 885 873) +4(824 603 68 96) +4(918 521 69 669) +4(824 96 521 918) +4(825 824 96 97) +4(922 517 521 918) +4(825 97 517 922) +4(826 825 97 98) +4(926 513 517 922) +4(826 98 513 926) +4(827 826 98 99) +4(930 509 513 926) +4(827 99 509 930) +4(823 827 99 100) +4(878 481 509 930) +4(521 522 919 918) +4(522 70 670 919) +4(517 518 923 922) +4(518 522 919 923) +4(513 514 927 926) +4(514 518 923 927) +4(509 510 931 930) +4(510 514 927 931) +4(482 510 931 879) +4(522 523 920 919) +4(523 71 671 920) +4(518 519 924 923) +4(519 523 920 924) +4(514 515 928 927) +4(515 519 924 928) +4(510 511 932 931) +4(511 515 928 932) +4(483 511 932 880) +4(523 524 921 920) +4(524 72 672 921) +4(519 520 925 924) +4(520 524 921 925) +4(515 516 929 928) +4(516 520 925 929) +4(511 512 933 932) +4(512 516 929 933) +4(484 512 933 881) +4(524 485 882 921) +4(520 486 883 925) +4(516 487 884 929) +4(512 488 885 933) +4(1008 11 2 612) +4(1066 648 39 200) +4(1008 1066 200 11) +4(1008 612 648 1066) +4(648 649 1067 1066) +4(1066 1067 196 200) +4(649 38 196 1067) +4(649 650 1068 1067) +4(1067 1068 192 196) +4(650 37 192 1068) +4(650 651 1069 1068) +4(1068 1069 188 192) +4(651 36 188 1069) +4(651 643 1058 1069) +4(1069 1058 184 188) +4(643 35 184 1058) +4(1009 10 11 1008) +4(1070 1066 200 201) +4(1009 1070 201 10) +4(1009 1008 1066 1070) +4(1066 1067 1071 1070) +4(1070 1071 197 201) +4(1067 196 197 1071) +4(1067 1068 1072 1071) +4(1071 1072 193 197) +4(1068 192 193 1072) +4(1068 1069 1073 1072) +4(1072 1073 189 193) +4(1069 188 189 1073) +4(1069 1058 1059 1073) +4(1073 1059 185 189) +4(1058 184 185 1059) +4(1010 9 10 1009) +4(1074 1070 201 202) +4(1010 1074 202 9) +4(1010 1009 1070 1074) +4(1070 1071 1075 1074) +4(1074 1075 198 202) +4(1071 197 198 1075) +4(1071 1072 1076 1075) +4(1075 1076 194 198) +4(1072 193 194 1076) +4(1072 1073 1077 1076) +4(1076 1077 190 194) +4(1073 189 190 1077) +4(1073 1059 1060 1077) +4(1077 1060 186 190) +4(1059 185 186 1060) +4(1011 8 9 1010) +4(1078 1074 202 203) +4(1011 1078 203 8) +4(1011 1010 1074 1078) +4(1074 1075 1079 1078) +4(1078 1079 199 203) +4(1075 198 199 1079) +4(1075 1076 1080 1079) +4(1079 1080 195 199) +4(1076 194 195 1080) +4(1076 1077 1081 1080) +4(1080 1081 191 195) +4(1077 190 191 1081) +4(1077 1060 1061 1081) +4(1081 1061 187 191) +4(1060 186 187 1061) +4(1003 7 8 1011) +4(1054 1078 203 176) +4(1003 1054 176 7) +4(1003 1011 1078 1054) +4(1078 1079 1055 1054) +4(1054 1055 177 176) +4(1079 199 177 1055) +4(1079 1080 1056 1055) +4(1055 1056 178 177) +4(1080 195 178 1056) +4(1080 1081 1057 1056) +4(1056 1057 179 178) +4(1081 191 179 1057) +4(1081 1061 1053 1057) +4(1057 1053 175 179) +4(1061 187 175 1053) +4(1024 608 602 1002) +4(1114 1049 638 664) +4(1024 1114 664 608) +4(1002 602 638 1049) +4(1024 1002 1049 1114) +4(1025 609 608 1024) +4(1115 1114 664 665) +4(1025 1115 665 609) +4(1025 1024 1114 1115) +4(1026 610 609 1025) +4(1116 1115 665 666) +4(1026 1116 666 610) +4(1026 1025 1115 1116) +4(1027 611 610 1026) +4(1117 1116 666 667) +4(1027 1117 667 611) +4(1027 1026 1116 1117) +4(1008 612 611 1027) +4(1066 1117 667 648) +4(1008 1027 1117 1066) +4(1020 1024 1002 1001) +4(1118 1050 1049 1114) +4(1020 1118 1114 1024) +4(1001 1002 1049 1050) +4(1020 1001 1050 1118) +4(1021 1025 1024 1020) +4(1119 1118 1114 1115) +4(1021 1119 1115 1025) +4(1021 1020 1118 1119) +4(1022 1026 1025 1021) +4(1120 1119 1115 1116) +4(1022 1120 1116 1026) +4(1022 1021 1119 1120) +4(1023 1027 1026 1022) +4(1121 1120 1116 1117) +4(1023 1121 1117 1027) +4(1023 1022 1120 1121) +4(1009 1008 1027 1023) +4(1070 1121 1117 1066) +4(1009 1023 1121 1070) +4(1016 1020 1001 1000) +4(1122 1051 1050 1118) +4(1016 1122 1118 1020) +4(1000 1001 1050 1051) +4(1016 1000 1051 1122) +4(1017 1021 1020 1016) +4(1123 1122 1118 1119) +4(1017 1123 1119 1021) +4(1017 1016 1122 1123) +4(1018 1022 1021 1017) +4(1124 1123 1119 1120) +4(1018 1124 1120 1022) +4(1018 1017 1123 1124) +4(1019 1023 1022 1018) +4(1125 1124 1120 1121) +4(1019 1125 1121 1023) +4(1019 1018 1124 1125) +4(1010 1009 1023 1019) +4(1074 1125 1121 1070) +4(1010 1019 1125 1074) +4(1012 1016 1000 999) +4(1126 1052 1051 1122) +4(1012 1126 1122 1016) +4(999 1000 1051 1052) +4(1012 999 1052 1126) +4(1013 1017 1016 1012) +4(1127 1126 1122 1123) +4(1013 1127 1123 1017) +4(1013 1012 1126 1127) +4(1014 1018 1017 1013) +4(1128 1127 1123 1124) +4(1014 1128 1124 1018) +4(1014 1013 1127 1128) +4(1015 1019 1018 1014) +4(1129 1128 1124 1125) +4(1015 1129 1125 1019) +4(1015 1014 1128 1129) +4(1011 1010 1019 1015) +4(1078 1129 1125 1074) +4(1011 1015 1129 1078) +4(1004 1012 999 998) +4(1082 1033 1052 1126) +4(1004 1082 1126 1012) +4(998 999 1052 1033) +4(1004 998 1033 1082) +4(1005 1013 1012 1004) +4(1086 1082 1126 1127) +4(1005 1086 1127 1013) +4(1005 1004 1082 1086) +4(1006 1014 1013 1005) +4(1090 1086 1127 1128) +4(1006 1090 1128 1014) +4(1006 1005 1086 1090) +4(1007 1015 1014 1006) +4(1094 1090 1128 1129) +4(1007 1094 1129 1015) +4(1007 1006 1090 1094) +4(1003 1011 1015 1007) +4(1054 1094 1129 1078) +4(1003 1007 1094 1054) +4(1045 1049 638 639) +4(1130 660 664 1114) +4(1045 1130 1114 1049) +4(1045 639 660 1130) +4(665 1115 1131 661) +4(661 1131 1130 660) +4(1115 1114 1130 1131) +4(666 1116 1132 662) +4(662 1132 1131 661) +4(1116 1115 1131 1132) +4(667 1117 1133 663) +4(663 1133 1132 662) +4(1117 1116 1132 1133) +4(1066 1117 1133 1067) +4(1067 1133 663 649) +4(1046 1050 1049 1045) +4(1134 1130 1114 1118) +4(1046 1134 1118 1050) +4(1046 1045 1130 1134) +4(1115 1119 1135 1131) +4(1131 1135 1134 1130) +4(1119 1118 1134 1135) +4(1116 1120 1136 1132) +4(1132 1136 1135 1131) +4(1120 1119 1135 1136) +4(1117 1121 1137 1133) +4(1133 1137 1136 1132) +4(1121 1120 1136 1137) +4(1070 1121 1137 1071) +4(1071 1137 1133 1067) +4(1047 1051 1050 1046) +4(1138 1134 1118 1122) +4(1047 1138 1122 1051) +4(1047 1046 1134 1138) +4(1119 1123 1139 1135) +4(1135 1139 1138 1134) +4(1123 1122 1138 1139) +4(1120 1124 1140 1136) +4(1136 1140 1139 1135) +4(1124 1123 1139 1140) +4(1121 1125 1141 1137) +4(1137 1141 1140 1136) +4(1125 1124 1140 1141) +4(1074 1125 1141 1075) +4(1075 1141 1137 1071) +4(1048 1052 1051 1047) +4(1142 1138 1122 1126) +4(1048 1142 1126 1052) +4(1048 1047 1138 1142) +4(1123 1127 1143 1139) +4(1139 1143 1142 1138) +4(1127 1126 1142 1143) +4(1124 1128 1144 1140) +4(1140 1144 1143 1139) +4(1128 1127 1143 1144) +4(1125 1129 1145 1141) +4(1141 1145 1144 1140) +4(1129 1128 1144 1145) +4(1078 1129 1145 1079) +4(1079 1145 1141 1075) +4(1034 1033 1052 1048) +4(1083 1142 1126 1082) +4(1034 1083 1082 1033) +4(1034 1048 1142 1083) +4(1127 1086 1087 1143) +4(1143 1087 1083 1142) +4(1086 1082 1083 1087) +4(1128 1090 1091 1144) +4(1144 1091 1087 1143) +4(1090 1086 1087 1091) +4(1129 1094 1095 1145) +4(1145 1095 1091 1144) +4(1094 1090 1091 1095) +4(1054 1094 1095 1055) +4(1055 1095 1145 1079) +4(1041 1045 639 640) +4(1146 656 660 1130) +4(1041 1146 1130 1045) +4(1041 640 656 1146) +4(661 1131 1147 657) +4(657 1147 1146 656) +4(1131 1130 1146 1147) +4(662 1132 1148 658) +4(658 1148 1147 657) +4(1132 1131 1147 1148) +4(663 1133 1149 659) +4(659 1149 1148 658) +4(1133 1132 1148 1149) +4(1067 1133 1149 1068) +4(1068 1149 659 650) +4(1042 1046 1045 1041) +4(1150 1146 1130 1134) +4(1042 1150 1134 1046) +4(1042 1041 1146 1150) +4(1131 1135 1151 1147) +4(1147 1151 1150 1146) +4(1135 1134 1150 1151) +4(1132 1136 1152 1148) +4(1148 1152 1151 1147) +4(1136 1135 1151 1152) +4(1133 1137 1153 1149) +4(1149 1153 1152 1148) +4(1137 1136 1152 1153) +4(1071 1137 1153 1072) +4(1072 1153 1149 1068) +4(1043 1047 1046 1042) +4(1154 1150 1134 1138) +4(1043 1154 1138 1047) +4(1043 1042 1150 1154) +4(1135 1139 1155 1151) +4(1151 1155 1154 1150) +4(1139 1138 1154 1155) +4(1136 1140 1156 1152) +4(1152 1156 1155 1151) +4(1140 1139 1155 1156) +4(1137 1141 1157 1153) +4(1153 1157 1156 1152) +4(1141 1140 1156 1157) +4(1075 1141 1157 1076) +4(1076 1157 1153 1072) +4(1044 1048 1047 1043) +4(1158 1154 1138 1142) +4(1044 1158 1142 1048) +4(1044 1043 1154 1158) +4(1139 1143 1159 1155) +4(1155 1159 1158 1154) +4(1143 1142 1158 1159) +4(1140 1144 1160 1156) +4(1156 1160 1159 1155) +4(1144 1143 1159 1160) +4(1141 1145 1161 1157) +4(1157 1161 1160 1156) +4(1145 1144 1160 1161) +4(1079 1145 1161 1080) +4(1080 1161 1157 1076) +4(1035 1034 1048 1044) +4(1084 1158 1142 1083) +4(1035 1084 1083 1034) +4(1035 1044 1158 1084) +4(1143 1087 1088 1159) +4(1159 1088 1084 1158) +4(1087 1083 1084 1088) +4(1144 1091 1092 1160) +4(1160 1092 1088 1159) +4(1091 1087 1088 1092) +4(1145 1095 1096 1161) +4(1161 1096 1092 1160) +4(1095 1091 1092 1096) +4(1055 1095 1096 1056) +4(1056 1096 1161 1080) +4(1037 1041 640 641) +4(1162 652 656 1146) +4(1037 1162 1146 1041) +4(1037 641 652 1162) +4(657 1147 1163 653) +4(653 1163 1162 652) +4(1147 1146 1162 1163) +4(658 1148 1164 654) +4(654 1164 1163 653) +4(1148 1147 1163 1164) +4(659 1149 1165 655) +4(655 1165 1164 654) +4(1149 1148 1164 1165) +4(1068 1149 1165 1069) +4(1069 1165 655 651) +4(1038 1042 1041 1037) +4(1166 1162 1146 1150) +4(1038 1166 1150 1042) +4(1038 1037 1162 1166) +4(1147 1151 1167 1163) +4(1163 1167 1166 1162) +4(1151 1150 1166 1167) +4(1148 1152 1168 1164) +4(1164 1168 1167 1163) +4(1152 1151 1167 1168) +4(1149 1153 1169 1165) +4(1165 1169 1168 1164) +4(1153 1152 1168 1169) +4(1072 1153 1169 1073) +4(1073 1169 1165 1069) +4(1039 1043 1042 1038) +4(1170 1166 1150 1154) +4(1039 1170 1154 1043) +4(1039 1038 1166 1170) +4(1151 1155 1171 1167) +4(1167 1171 1170 1166) +4(1155 1154 1170 1171) +4(1152 1156 1172 1168) +4(1168 1172 1171 1167) +4(1156 1155 1171 1172) +4(1153 1157 1173 1169) +4(1169 1173 1172 1168) +4(1157 1156 1172 1173) +4(1076 1157 1173 1077) +4(1077 1173 1169 1073) +4(1040 1044 1043 1039) +4(1174 1170 1154 1158) +4(1040 1174 1158 1044) +4(1040 1039 1170 1174) +4(1155 1159 1175 1171) +4(1171 1175 1174 1170) +4(1159 1158 1174 1175) +4(1156 1160 1176 1172) +4(1172 1176 1175 1171) +4(1160 1159 1175 1176) +4(1157 1161 1177 1173) +4(1173 1177 1176 1172) +4(1161 1160 1176 1177) +4(1080 1161 1177 1081) +4(1081 1177 1173 1077) +4(1036 1035 1044 1040) +4(1085 1174 1158 1084) +4(1036 1085 1084 1035) +4(1036 1040 1174 1085) +4(1159 1088 1089 1175) +4(1175 1089 1085 1174) +4(1088 1084 1085 1089) +4(1160 1092 1093 1176) +4(1176 1093 1089 1175) +4(1092 1088 1089 1093) +4(1161 1096 1097 1177) +4(1177 1097 1093 1176) +4(1096 1092 1093 1097) +4(1056 1096 1097 1057) +4(1057 1097 1177 1081) +4(1029 1037 641 642) +4(1098 644 652 1162) +4(1029 1098 1162 1037) +4(1029 642 644 1098) +4(653 1163 1102 645) +4(645 1102 1098 644) +4(1163 1162 1098 1102) +4(654 1164 1106 646) +4(646 1106 1102 645) +4(1164 1163 1102 1106) +4(655 1165 1110 647) +4(647 1110 1106 646) +4(1165 1164 1106 1110) +4(1069 1165 1110 1058) +4(1058 1110 647 643) +4(1030 1038 1037 1029) +4(1099 1098 1162 1166) +4(1030 1099 1166 1038) +4(1030 1029 1098 1099) +4(1163 1167 1103 1102) +4(1102 1103 1099 1098) +4(1167 1166 1099 1103) +4(1164 1168 1107 1106) +4(1106 1107 1103 1102) +4(1168 1167 1103 1107) +4(1165 1169 1111 1110) +4(1110 1111 1107 1106) +4(1169 1168 1107 1111) +4(1073 1169 1111 1059) +4(1059 1111 1110 1058) +4(1031 1039 1038 1030) +4(1100 1099 1166 1170) +4(1031 1100 1170 1039) +4(1031 1030 1099 1100) +4(1167 1171 1104 1103) +4(1103 1104 1100 1099) +4(1171 1170 1100 1104) +4(1168 1172 1108 1107) +4(1107 1108 1104 1103) +4(1172 1171 1104 1108) +4(1169 1173 1112 1111) +4(1111 1112 1108 1107) +4(1173 1172 1108 1112) +4(1077 1173 1112 1060) +4(1060 1112 1111 1059) +4(1032 1040 1039 1031) +4(1101 1100 1170 1174) +4(1032 1101 1174 1040) +4(1032 1031 1100 1101) +4(1171 1175 1105 1104) +4(1104 1105 1101 1100) +4(1175 1174 1101 1105) +4(1172 1176 1109 1108) +4(1108 1109 1105 1104) +4(1176 1175 1105 1109) +4(1173 1177 1113 1112) +4(1112 1113 1109 1108) +4(1177 1176 1109 1113) +4(1081 1177 1113 1061) +4(1061 1113 1112 1060) +4(1028 1036 1040 1032) +4(1062 1101 1174 1085) +4(1028 1062 1085 1036) +4(1028 1032 1101 1062) +4(1175 1089 1063 1105) +4(1105 1063 1062 1101) +4(1089 1085 1062 1063) +4(1176 1093 1064 1109) +4(1109 1064 1063 1105) +4(1093 1089 1063 1064) +4(1177 1097 1065 1113) +4(1113 1065 1064 1109) +4(1097 1093 1064 1065) +4(1057 1097 1065 1053) +4(1053 1065 1113 1061) +4(1004 998 0 3) +4(1082 216 67 1033) +4(1004 3 216 1082) +4(998 1033 67 0) +4(1005 1004 3 4) +4(1086 212 216 1082) +4(1005 4 212 1086) +4(1006 1005 4 5) +4(1090 208 212 1086) +4(1006 5 208 1090) +4(1007 1006 5 6) +4(1094 204 208 1090) +4(1007 6 204 1094) +4(1003 1007 6 7) +4(1054 176 204 1094) +4(1034 66 67 1033) +4(1083 1082 216 217) +4(1034 1083 217 66) +4(212 213 1087 1086) +4(213 217 1083 1087) +4(208 209 1091 1090) +4(209 213 1087 1091) +4(204 205 1095 1094) +4(205 209 1091 1095) +4(177 205 1095 1055) +4(1035 65 66 1034) +4(1084 1083 217 218) +4(1035 1084 218 65) +4(213 214 1088 1087) +4(214 218 1084 1088) +4(209 210 1092 1091) +4(210 214 1088 1092) +4(205 206 1096 1095) +4(206 210 1092 1096) +4(178 206 1096 1056) +4(1036 64 65 1035) +4(1085 1084 218 219) +4(1036 1085 219 64) +4(214 215 1089 1088) +4(215 219 1085 1089) +4(210 211 1093 1092) +4(211 215 1089 1093) +4(206 207 1097 1096) +4(207 211 1093 1097) +4(179 207 1097 1057) +4(1028 63 64 1036) +4(1062 1085 219 180) +4(1028 1062 180 63) +4(215 181 1063 1089) +4(181 180 1062 1063) +4(211 182 1064 1093) +4(182 181 1063 1064) +4(207 183 1065 1097) +4(183 182 1064 1065) +4(175 183 1065 1053) +4(1029 642 30 59) +4(1098 232 31 644) +4(1029 59 232 1098) +4(32 645 1102 233) +4(233 1102 1098 232) +4(33 646 1106 234) +4(234 1106 1102 233) +4(34 647 1110 235) +4(235 1110 1106 234) +4(235 184 1058 1110) +4(1030 1029 59 60) +4(1099 228 232 1098) +4(1030 60 228 1099) +4(233 1102 1103 229) +4(229 1103 1099 228) +4(234 1106 1107 230) +4(230 1107 1103 229) +4(235 1110 1111 231) +4(231 1111 1107 230) +4(231 185 1059 1111) +4(1031 1030 60 61) +4(1100 224 228 1099) +4(1031 61 224 1100) +4(229 1103 1104 225) +4(225 1104 1100 224) +4(230 1107 1108 226) +4(226 1108 1104 225) +4(231 1111 1112 227) +4(227 1112 1108 226) +4(227 186 1060 1112) +4(1032 1031 61 62) +4(1101 220 224 1100) +4(1032 62 220 1101) +4(225 1104 1105 221) +4(221 1105 1101 220) +4(226 1108 1109 222) +4(222 1109 1105 221) +4(227 1112 1113 223) +4(223 1113 1109 222) +4(223 187 1061 1113) +4(1028 1032 62 63) +4(1062 180 220 1101) +4(221 1105 1063 181) +4(222 1109 1064 182) +4(223 1113 1065 183) +4(1179 818 40 105) +4(1216 277 41 849) +4(1179 1216 849 818) +4(1179 105 277 1216) +4(1180 1179 105 106) +4(1220 273 277 1216) +4(1180 1220 1216 1179) +4(1180 106 273 1220) +4(1181 1180 106 107) +4(1224 269 273 1220) +4(1181 1224 1220 1180) +4(1181 107 269 1224) +4(1182 1181 107 108) +4(1228 265 269 1224) +4(1182 1228 1224 1181) +4(1182 108 265 1228) +4(1178 1182 108 109) +4(1204 237 265 1228) +4(1178 1204 1228 1182) +4(1178 109 237 1204) +4(277 278 1217 1216) +4(1216 1217 850 849) +4(278 42 850 1217) +4(273 274 1221 1220) +4(1220 1221 1217 1216) +4(274 278 1217 1221) +4(269 270 1225 1224) +4(1224 1225 1221 1220) +4(270 274 1221 1225) +4(265 266 1229 1228) +4(1228 1229 1225 1224) +4(266 270 1225 1229) +4(237 238 1205 1204) +4(1204 1205 1229 1228) +4(238 266 1229 1205) +4(278 279 1218 1217) +4(1217 1218 851 850) +4(279 43 851 1218) +4(274 275 1222 1221) +4(1221 1222 1218 1217) +4(275 279 1218 1222) +4(270 271 1226 1225) +4(1225 1226 1222 1221) +4(271 275 1222 1226) +4(266 267 1230 1229) +4(1229 1230 1226 1225) +4(267 271 1226 1230) +4(238 239 1206 1205) +4(1205 1206 1230 1229) +4(239 267 1230 1206) +4(279 280 1219 1218) +4(1218 1219 852 851) +4(280 44 852 1219) +4(275 276 1223 1222) +4(1222 1223 1219 1218) +4(276 280 1219 1223) +4(271 272 1227 1226) +4(1226 1227 1223 1222) +4(272 276 1223 1227) +4(267 268 1231 1230) +4(1230 1231 1227 1226) +4(268 272 1227 1231) +4(239 240 1207 1206) +4(1206 1207 1231 1230) +4(240 268 1231 1207) +4(280 241 1208 1219) +4(1219 1208 848 852) +4(241 45 848 1208) +4(276 242 1209 1223) +4(1223 1209 1208 1219) +4(242 241 1208 1209) +4(272 243 1210 1227) +4(1227 1210 1209 1223) +4(243 242 1209 1210) +4(268 244 1211 1231) +4(1231 1211 1210 1227) +4(244 243 1210 1211) +4(240 236 1203 1207) +4(1207 1203 1211 1231) +4(236 244 1211 1203) +4(1183 113 0 998) +4(1232 1033 67 261) +4(1183 1232 261 113) +4(1183 998 1033 1232) +4(1184 112 113 1183) +4(1236 1232 261 262) +4(1184 1236 262 112) +4(1184 1183 1232 1236) +4(1185 111 112 1184) +4(1240 1236 262 263) +4(1185 1240 263 111) +4(1185 1184 1236 1240) +4(1186 110 111 1185) +4(1244 1240 263 264) +4(1186 1244 264 110) +4(1186 1185 1240 1244) +4(1178 109 110 1186) +4(1204 1244 264 237) +4(1178 1186 1244 1204) +4(261 1232 1233 257) +4(257 1233 1034 66) +4(1232 1033 1034 1233) +4(262 1236 1237 258) +4(258 1237 1233 257) +4(1236 1232 1233 1237) +4(263 1240 1241 259) +4(259 1241 1237 258) +4(1240 1236 1237 1241) +4(264 1244 1245 260) +4(260 1245 1241 259) +4(1244 1240 1241 1245) +4(1204 1244 1245 1205) +4(1205 1245 260 238) +4(257 1233 1234 253) +4(253 1234 1035 65) +4(1233 1034 1035 1234) +4(258 1237 1238 254) +4(254 1238 1234 253) +4(1237 1233 1234 1238) +4(259 1241 1242 255) +4(255 1242 1238 254) +4(1241 1237 1238 1242) +4(260 1245 1246 256) +4(256 1246 1242 255) +4(1245 1241 1242 1246) +4(1205 1245 1246 1206) +4(1206 1246 256 239) +4(253 1234 1235 249) +4(249 1235 1036 64) +4(1234 1035 1036 1235) +4(254 1238 1239 250) +4(250 1239 1235 249) +4(1238 1234 1235 1239) +4(255 1242 1243 251) +4(251 1243 1239 250) +4(1242 1238 1239 1243) +4(256 1246 1247 252) +4(252 1247 1243 251) +4(1246 1242 1243 1247) +4(1206 1246 1247 1207) +4(1207 1247 252 240) +4(249 1235 1212 245) +4(245 1212 1028 63) +4(1235 1036 1028 1212) +4(250 1239 1213 246) +4(246 1213 1212 245) +4(1239 1235 1212 1213) +4(251 1243 1214 247) +4(247 1214 1213 246) +4(1243 1239 1213 1214) +4(252 1247 1215 248) +4(248 1215 1214 247) +4(1247 1243 1214 1215) +4(1207 1247 1215 1203) +4(1203 1215 248 236) +4(1199 1002 602 822) +4(1264 869 638 1049) +4(1199 1264 1049 1002) +4(1199 822 869 1264) +4(1195 1199 822 821) +4(1265 865 869 1264) +4(1195 1265 1264 1199) +4(1195 821 865 1265) +4(1191 1195 821 820) +4(1266 861 865 1265) +4(1191 1266 1265 1195) +4(1191 820 861 1266) +4(1187 1191 820 819) +4(1267 857 861 1266) +4(1187 1267 1266 1191) +4(1187 819 857 1267) +4(1179 1187 819 818) +4(1216 849 857 1267) +4(1179 1216 1267 1187) +4(869 870 1268 1264) +4(1264 1268 1045 1049) +4(870 639 1045 1268) +4(865 866 1269 1265) +4(1265 1269 1268 1264) +4(866 870 1268 1269) +4(861 862 1270 1266) +4(1266 1270 1269 1265) +4(862 866 1269 1270) +4(857 858 1271 1267) +4(1267 1271 1270 1266) +4(858 862 1270 1271) +4(850 858 1271 1217) +4(1217 1271 1267 1216) +4(870 871 1272 1268) +4(1268 1272 1041 1045) +4(871 640 1041 1272) +4(866 867 1273 1269) +4(1269 1273 1272 1268) +4(867 871 1272 1273) +4(862 863 1274 1270) +4(1270 1274 1273 1269) +4(863 867 1273 1274) +4(858 859 1275 1271) +4(1271 1275 1274 1270) +4(859 863 1274 1275) +4(851 859 1275 1218) +4(1218 1275 1271 1217) +4(871 872 1276 1272) +4(1272 1276 1037 1041) +4(872 641 1037 1276) +4(867 868 1277 1273) +4(1273 1277 1276 1272) +4(868 872 1276 1277) +4(863 864 1278 1274) +4(1274 1278 1277 1273) +4(864 868 1277 1278) +4(859 860 1279 1275) +4(1275 1279 1278 1274) +4(860 864 1278 1279) +4(852 860 1279 1219) +4(1219 1279 1275 1218) +4(872 853 1248 1276) +4(1276 1248 1029 1037) +4(853 642 1029 1248) +4(868 854 1252 1277) +4(1277 1252 1248 1276) +4(854 853 1248 1252) +4(864 855 1256 1278) +4(1278 1256 1252 1277) +4(855 854 1252 1256) +4(860 856 1260 1279) +4(1279 1260 1256 1278) +4(856 855 1256 1260) +4(848 856 1260 1208) +4(1208 1260 1279 1219) +4(1200 1001 1002 1199) +4(1280 1264 1049 1050) +4(1200 1280 1050 1001) +4(1200 1199 1264 1280) +4(1196 1200 1199 1195) +4(1281 1265 1264 1280) +4(1196 1281 1280 1200) +4(1196 1195 1265 1281) +4(1192 1196 1195 1191) +4(1282 1266 1265 1281) +4(1192 1282 1281 1196) +4(1192 1191 1266 1282) +4(1188 1192 1191 1187) +4(1283 1267 1266 1282) +4(1188 1283 1282 1192) +4(1188 1187 1267 1283) +4(1180 1188 1187 1179) +4(1220 1216 1267 1283) +4(1180 1220 1283 1188) +4(1264 1268 1284 1280) +4(1280 1284 1046 1050) +4(1268 1045 1046 1284) +4(1265 1269 1285 1281) +4(1281 1285 1284 1280) +4(1269 1268 1284 1285) +4(1266 1270 1286 1282) +4(1282 1286 1285 1281) +4(1270 1269 1285 1286) +4(1267 1271 1287 1283) +4(1283 1287 1286 1282) +4(1271 1270 1286 1287) +4(1217 1271 1287 1221) +4(1221 1287 1283 1220) +4(1268 1272 1288 1284) +4(1284 1288 1042 1046) +4(1272 1041 1042 1288) +4(1269 1273 1289 1285) +4(1285 1289 1288 1284) +4(1273 1272 1288 1289) +4(1270 1274 1290 1286) +4(1286 1290 1289 1285) +4(1274 1273 1289 1290) +4(1271 1275 1291 1287) +4(1287 1291 1290 1286) +4(1275 1274 1290 1291) +4(1218 1275 1291 1222) +4(1222 1291 1287 1221) +4(1272 1276 1292 1288) +4(1288 1292 1038 1042) +4(1276 1037 1038 1292) +4(1273 1277 1293 1289) +4(1289 1293 1292 1288) +4(1277 1276 1292 1293) +4(1274 1278 1294 1290) +4(1290 1294 1293 1289) +4(1278 1277 1293 1294) +4(1275 1279 1295 1291) +4(1291 1295 1294 1290) +4(1279 1278 1294 1295) +4(1219 1279 1295 1223) +4(1223 1295 1291 1222) +4(1276 1248 1249 1292) +4(1292 1249 1030 1038) +4(1248 1029 1030 1249) +4(1277 1252 1253 1293) +4(1293 1253 1249 1292) +4(1252 1248 1249 1253) +4(1278 1256 1257 1294) +4(1294 1257 1253 1293) +4(1256 1252 1253 1257) +4(1279 1260 1261 1295) +4(1295 1261 1257 1294) +4(1260 1256 1257 1261) +4(1208 1260 1261 1209) +4(1209 1261 1295 1223) +4(1201 1000 1001 1200) +4(1296 1280 1050 1051) +4(1201 1296 1051 1000) +4(1201 1200 1280 1296) +4(1197 1201 1200 1196) +4(1297 1281 1280 1296) +4(1197 1297 1296 1201) +4(1197 1196 1281 1297) +4(1193 1197 1196 1192) +4(1298 1282 1281 1297) +4(1193 1298 1297 1197) +4(1193 1192 1282 1298) +4(1189 1193 1192 1188) +4(1299 1283 1282 1298) +4(1189 1299 1298 1193) +4(1189 1188 1283 1299) +4(1181 1189 1188 1180) +4(1224 1220 1283 1299) +4(1181 1224 1299 1189) +4(1280 1284 1300 1296) +4(1296 1300 1047 1051) +4(1284 1046 1047 1300) +4(1281 1285 1301 1297) +4(1297 1301 1300 1296) +4(1285 1284 1300 1301) +4(1282 1286 1302 1298) +4(1298 1302 1301 1297) +4(1286 1285 1301 1302) +4(1283 1287 1303 1299) +4(1299 1303 1302 1298) +4(1287 1286 1302 1303) +4(1221 1287 1303 1225) +4(1225 1303 1299 1224) +4(1284 1288 1304 1300) +4(1300 1304 1043 1047) +4(1288 1042 1043 1304) +4(1285 1289 1305 1301) +4(1301 1305 1304 1300) +4(1289 1288 1304 1305) +4(1286 1290 1306 1302) +4(1302 1306 1305 1301) +4(1290 1289 1305 1306) +4(1287 1291 1307 1303) +4(1303 1307 1306 1302) +4(1291 1290 1306 1307) +4(1222 1291 1307 1226) +4(1226 1307 1303 1225) +4(1288 1292 1308 1304) +4(1304 1308 1039 1043) +4(1292 1038 1039 1308) +4(1289 1293 1309 1305) +4(1305 1309 1308 1304) +4(1293 1292 1308 1309) +4(1290 1294 1310 1306) +4(1306 1310 1309 1305) +4(1294 1293 1309 1310) +4(1291 1295 1311 1307) +4(1307 1311 1310 1306) +4(1295 1294 1310 1311) +4(1223 1295 1311 1227) +4(1227 1311 1307 1226) +4(1292 1249 1250 1308) +4(1308 1250 1031 1039) +4(1249 1030 1031 1250) +4(1293 1253 1254 1309) +4(1309 1254 1250 1308) +4(1253 1249 1250 1254) +4(1294 1257 1258 1310) +4(1310 1258 1254 1309) +4(1257 1253 1254 1258) +4(1295 1261 1262 1311) +4(1311 1262 1258 1310) +4(1261 1257 1258 1262) +4(1209 1261 1262 1210) +4(1210 1262 1311 1227) +4(1202 999 1000 1201) +4(1312 1296 1051 1052) +4(1202 1312 1052 999) +4(1202 1201 1296 1312) +4(1198 1202 1201 1197) +4(1313 1297 1296 1312) +4(1198 1313 1312 1202) +4(1198 1197 1297 1313) +4(1194 1198 1197 1193) +4(1314 1298 1297 1313) +4(1194 1314 1313 1198) +4(1194 1193 1298 1314) +4(1190 1194 1193 1189) +4(1315 1299 1298 1314) +4(1190 1315 1314 1194) +4(1190 1189 1299 1315) +4(1182 1190 1189 1181) +4(1228 1224 1299 1315) +4(1182 1228 1315 1190) +4(1296 1300 1316 1312) +4(1312 1316 1048 1052) +4(1300 1047 1048 1316) +4(1297 1301 1317 1313) +4(1313 1317 1316 1312) +4(1301 1300 1316 1317) +4(1298 1302 1318 1314) +4(1314 1318 1317 1313) +4(1302 1301 1317 1318) +4(1299 1303 1319 1315) +4(1315 1319 1318 1314) +4(1303 1302 1318 1319) +4(1225 1303 1319 1229) +4(1229 1319 1315 1228) +4(1300 1304 1320 1316) +4(1316 1320 1044 1048) +4(1304 1043 1044 1320) +4(1301 1305 1321 1317) +4(1317 1321 1320 1316) +4(1305 1304 1320 1321) +4(1302 1306 1322 1318) +4(1318 1322 1321 1317) +4(1306 1305 1321 1322) +4(1303 1307 1323 1319) +4(1319 1323 1322 1318) +4(1307 1306 1322 1323) +4(1226 1307 1323 1230) +4(1230 1323 1319 1229) +4(1304 1308 1324 1320) +4(1320 1324 1040 1044) +4(1308 1039 1040 1324) +4(1305 1309 1325 1321) +4(1321 1325 1324 1320) +4(1309 1308 1324 1325) +4(1306 1310 1326 1322) +4(1322 1326 1325 1321) +4(1310 1309 1325 1326) +4(1307 1311 1327 1323) +4(1323 1327 1326 1322) +4(1311 1310 1326 1327) +4(1227 1311 1327 1231) +4(1231 1327 1323 1230) +4(1308 1250 1251 1324) +4(1324 1251 1032 1040) +4(1250 1031 1032 1251) +4(1309 1254 1255 1325) +4(1325 1255 1251 1324) +4(1254 1250 1251 1255) +4(1310 1258 1259 1326) +4(1326 1259 1255 1325) +4(1258 1254 1255 1259) +4(1311 1262 1263 1327) +4(1327 1263 1259 1326) +4(1262 1258 1259 1263) +4(1210 1262 1263 1211) +4(1211 1263 1327 1231) +4(1183 998 999 1202) +4(1232 1312 1052 1033) +4(1183 1202 1312 1232) +4(1184 1183 1202 1198) +4(1236 1313 1312 1232) +4(1184 1198 1313 1236) +4(1185 1184 1198 1194) +4(1240 1314 1313 1236) +4(1185 1194 1314 1240) +4(1186 1185 1194 1190) +4(1244 1315 1314 1240) +4(1186 1190 1315 1244) +4(1178 1186 1190 1182) +4(1204 1228 1315 1244) +4(1312 1316 1233 1232) +4(1316 1048 1034 1233) +4(1313 1317 1237 1236) +4(1317 1316 1233 1237) +4(1314 1318 1241 1240) +4(1318 1317 1237 1241) +4(1315 1319 1245 1244) +4(1319 1318 1241 1245) +4(1229 1319 1245 1205) +4(1316 1320 1234 1233) +4(1320 1044 1035 1234) +4(1317 1321 1238 1237) +4(1321 1320 1234 1238) +4(1318 1322 1242 1241) +4(1322 1321 1238 1242) +4(1319 1323 1246 1245) +4(1323 1322 1242 1246) +4(1230 1323 1246 1206) +4(1320 1324 1235 1234) +4(1324 1040 1036 1235) +4(1321 1325 1239 1238) +4(1325 1324 1235 1239) +4(1322 1326 1243 1242) +4(1326 1325 1239 1243) +4(1323 1327 1247 1246) +4(1327 1326 1243 1247) +4(1231 1327 1247 1207) +4(1324 1251 1212 1235) +4(1251 1032 1028 1212) +4(1325 1255 1213 1239) +4(1255 1251 1212 1213) +4(1326 1259 1214 1243) +4(1259 1255 1213 1214) +4(1327 1263 1215 1247) +4(1263 1259 1214 1215) +4(1211 1263 1215 1203) +4(49 293 1248 853) +4(293 59 1029 1248) +4(48 289 1252 854) +4(289 293 1248 1252) +4(47 285 1256 855) +4(285 289 1252 1256) +4(46 281 1260 856) +4(281 285 1256 1260) +4(241 281 1260 1208) +4(293 294 1249 1248) +4(294 60 1030 1249) +4(289 290 1253 1252) +4(290 294 1249 1253) +4(285 286 1257 1256) +4(286 290 1253 1257) +4(281 282 1261 1260) +4(282 286 1257 1261) +4(242 282 1261 1209) +4(294 295 1250 1249) +4(295 61 1031 1250) +4(290 291 1254 1253) +4(291 295 1250 1254) +4(286 287 1258 1257) +4(287 291 1254 1258) +4(282 283 1262 1261) +4(283 287 1258 1262) +4(243 283 1262 1210) +4(295 296 1251 1250) +4(296 62 1032 1251) +4(291 292 1255 1254) +4(292 296 1251 1255) +4(287 288 1259 1258) +4(288 292 1255 1259) +4(283 284 1263 1262) +4(284 288 1259 1263) +4(244 284 1263 1211) +4(296 245 1212 1251) +4(292 246 1213 1255) +4(288 247 1214 1259) +4(284 248 1215 1263) +4(1334 612 2 12) +4(1396 399 87 614) +4(1334 1396 614 612) +4(1334 12 399 1396) +4(1335 1334 12 13) +4(1397 395 399 1396) +4(1335 1397 1396 1334) +4(1335 13 395 1397) +4(1336 1335 13 14) +4(1398 391 395 1397) +4(1336 1398 1397 1335) +4(1336 14 391 1398) +4(1337 1336 14 15) +4(1399 387 391 1398) +4(1337 1399 1398 1336) +4(1337 15 387 1399) +4(1333 1337 15 16) +4(1388 359 387 1399) +4(1333 1388 1399 1337) +4(1333 16 359 1388) +4(614 1396 1400 615) +4(615 1400 400 88) +4(1396 399 400 1400) +4(1396 1397 1401 1400) +4(1400 1401 396 400) +4(1397 395 396 1401) +4(1397 1398 1402 1401) +4(1401 1402 392 396) +4(1398 391 392 1402) +4(1398 1399 1403 1402) +4(1402 1403 388 392) +4(1399 387 388 1403) +4(1399 1388 1389 1403) +4(1403 1389 360 388) +4(1388 359 360 1389) +4(615 1400 1404 616) +4(616 1404 401 89) +4(1400 400 401 1404) +4(1400 1401 1405 1404) +4(1404 1405 397 401) +4(1401 396 397 1405) +4(1401 1402 1406 1405) +4(1405 1406 393 397) +4(1402 392 393 1406) +4(1402 1403 1407 1406) +4(1406 1407 389 393) +4(1403 388 389 1407) +4(1403 1389 1390 1407) +4(1407 1390 361 389) +4(1389 360 361 1390) +4(616 1404 1408 617) +4(617 1408 402 90) +4(1404 401 402 1408) +4(1404 1405 1409 1408) +4(1408 1409 398 402) +4(1405 397 398 1409) +4(1405 1406 1410 1409) +4(1409 1410 394 398) +4(1406 393 394 1410) +4(1406 1407 1411 1410) +4(1410 1411 390 394) +4(1407 389 390 1411) +4(1407 1390 1391 1411) +4(1411 1391 362 390) +4(1390 361 362 1391) +4(617 1408 1384 613) +4(613 1384 363 91) +4(1408 402 363 1384) +4(1408 1409 1385 1384) +4(1384 1385 364 363) +4(1409 398 364 1385) +4(1409 1410 1386 1385) +4(1385 1386 365 364) +4(1410 394 365 1386) +4(1410 1411 1387 1386) +4(1386 1387 366 365) +4(1411 390 366 1387) +4(1411 1391 1383 1387) +4(1387 1383 358 366) +4(1391 362 358 1383) +4(1354 1328 602 608) +4(1444 634 607 1379) +4(1354 1444 1379 1328) +4(1354 608 634 1444) +4(1328 1379 607 602) +4(1350 1354 608 609) +4(1445 630 634 1444) +4(1350 1445 1444 1354) +4(1350 609 630 1445) +4(1346 1350 609 610) +4(1446 626 630 1445) +4(1346 1446 1445 1350) +4(1346 610 626 1446) +4(1342 1346 610 611) +4(1447 622 626 1446) +4(1342 1447 1446 1346) +4(1342 611 622 1447) +4(1334 1342 611 612) +4(1396 614 622 1447) +4(1334 1396 1447 1342) +4(1380 606 607 1379) +4(1448 1444 634 635) +4(1380 1448 635 606) +4(1380 1379 1444 1448) +4(630 631 1449 1445) +4(1445 1449 1448 1444) +4(631 635 1448 1449) +4(626 627 1450 1446) +4(1446 1450 1449 1445) +4(627 631 1449 1450) +4(622 623 1451 1447) +4(1447 1451 1450 1446) +4(623 627 1450 1451) +4(615 623 1451 1400) +4(1400 1451 1447 1396) +4(1381 605 606 1380) +4(1452 1448 635 636) +4(1381 1452 636 605) +4(1381 1380 1448 1452) +4(631 632 1453 1449) +4(1449 1453 1452 1448) +4(632 636 1452 1453) +4(627 628 1454 1450) +4(1450 1454 1453 1449) +4(628 632 1453 1454) +4(623 624 1455 1451) +4(1451 1455 1454 1450) +4(624 628 1454 1455) +4(616 624 1455 1404) +4(1404 1455 1451 1400) +4(1382 604 605 1381) +4(1456 1452 636 637) +4(1382 1456 637 604) +4(1382 1381 1452 1456) +4(632 633 1457 1453) +4(1453 1457 1456 1452) +4(633 637 1456 1457) +4(628 629 1458 1454) +4(1454 1458 1457 1453) +4(629 633 1457 1458) +4(624 625 1459 1455) +4(1455 1459 1458 1454) +4(625 629 1458 1459) +4(617 625 1459 1408) +4(1408 1459 1455 1404) +4(1363 603 604 1382) +4(1412 1456 637 618) +4(1363 1412 618 603) +4(1363 1382 1456 1412) +4(633 619 1416 1457) +4(1457 1416 1412 1456) +4(619 618 1412 1416) +4(629 620 1420 1458) +4(1458 1420 1416 1457) +4(620 619 1416 1420) +4(625 621 1424 1459) +4(1459 1424 1420 1458) +4(621 620 1420 1424) +4(613 621 1424 1384) +4(1384 1424 1459 1408) +4(1355 1329 1328 1354) +4(1460 1444 1379 1375) +4(1355 1460 1375 1329) +4(1355 1354 1444 1460) +4(1329 1375 1379 1328) +4(1351 1355 1354 1350) +4(1461 1445 1444 1460) +4(1351 1461 1460 1355) +4(1351 1350 1445 1461) +4(1347 1351 1350 1346) +4(1462 1446 1445 1461) +4(1347 1462 1461 1351) +4(1347 1346 1446 1462) +4(1343 1347 1346 1342) +4(1463 1447 1446 1462) +4(1343 1463 1462 1347) +4(1343 1342 1447 1463) +4(1335 1343 1342 1334) +4(1397 1396 1447 1463) +4(1335 1397 1463 1343) +4(1376 1380 1379 1375) +4(1464 1460 1444 1448) +4(1376 1464 1448 1380) +4(1376 1375 1460 1464) +4(1445 1449 1465 1461) +4(1461 1465 1464 1460) +4(1449 1448 1464 1465) +4(1446 1450 1466 1462) +4(1462 1466 1465 1461) +4(1450 1449 1465 1466) +4(1447 1451 1467 1463) +4(1463 1467 1466 1462) +4(1451 1450 1466 1467) +4(1400 1451 1467 1401) +4(1401 1467 1463 1397) +4(1377 1381 1380 1376) +4(1468 1464 1448 1452) +4(1377 1468 1452 1381) +4(1377 1376 1464 1468) +4(1449 1453 1469 1465) +4(1465 1469 1468 1464) +4(1453 1452 1468 1469) +4(1450 1454 1470 1466) +4(1466 1470 1469 1465) +4(1454 1453 1469 1470) +4(1451 1455 1471 1467) +4(1467 1471 1470 1466) +4(1455 1454 1470 1471) +4(1404 1455 1471 1405) +4(1405 1471 1467 1401) +4(1378 1382 1381 1377) +4(1472 1468 1452 1456) +4(1378 1472 1456 1382) +4(1378 1377 1468 1472) +4(1453 1457 1473 1469) +4(1469 1473 1472 1468) +4(1457 1456 1472 1473) +4(1454 1458 1474 1470) +4(1470 1474 1473 1469) +4(1458 1457 1473 1474) +4(1455 1459 1475 1471) +4(1471 1475 1474 1470) +4(1459 1458 1474 1475) +4(1408 1459 1475 1409) +4(1409 1475 1471 1405) +4(1364 1363 1382 1378) +4(1413 1472 1456 1412) +4(1364 1413 1412 1363) +4(1364 1378 1472 1413) +4(1457 1416 1417 1473) +4(1473 1417 1413 1472) +4(1416 1412 1413 1417) +4(1458 1420 1421 1474) +4(1474 1421 1417 1473) +4(1420 1416 1417 1421) +4(1459 1424 1425 1475) +4(1475 1425 1421 1474) +4(1424 1420 1421 1425) +4(1384 1424 1425 1385) +4(1385 1425 1475 1409) +4(1356 1330 1329 1355) +4(1476 1460 1375 1371) +4(1356 1476 1371 1330) +4(1356 1355 1460 1476) +4(1330 1371 1375 1329) +4(1352 1356 1355 1351) +4(1477 1461 1460 1476) +4(1352 1477 1476 1356) +4(1352 1351 1461 1477) +4(1348 1352 1351 1347) +4(1478 1462 1461 1477) +4(1348 1478 1477 1352) +4(1348 1347 1462 1478) +4(1344 1348 1347 1343) +4(1479 1463 1462 1478) +4(1344 1479 1478 1348) +4(1344 1343 1463 1479) +4(1336 1344 1343 1335) +4(1398 1397 1463 1479) +4(1336 1398 1479 1344) +4(1372 1376 1375 1371) +4(1480 1476 1460 1464) +4(1372 1480 1464 1376) +4(1372 1371 1476 1480) +4(1461 1465 1481 1477) +4(1477 1481 1480 1476) +4(1465 1464 1480 1481) +4(1462 1466 1482 1478) +4(1478 1482 1481 1477) +4(1466 1465 1481 1482) +4(1463 1467 1483 1479) +4(1479 1483 1482 1478) +4(1467 1466 1482 1483) +4(1401 1467 1483 1402) +4(1402 1483 1479 1398) +4(1373 1377 1376 1372) +4(1484 1480 1464 1468) +4(1373 1484 1468 1377) +4(1373 1372 1480 1484) +4(1465 1469 1485 1481) +4(1481 1485 1484 1480) +4(1469 1468 1484 1485) +4(1466 1470 1486 1482) +4(1482 1486 1485 1481) +4(1470 1469 1485 1486) +4(1467 1471 1487 1483) +4(1483 1487 1486 1482) +4(1471 1470 1486 1487) +4(1405 1471 1487 1406) +4(1406 1487 1483 1402) +4(1374 1378 1377 1373) +4(1488 1484 1468 1472) +4(1374 1488 1472 1378) +4(1374 1373 1484 1488) +4(1469 1473 1489 1485) +4(1485 1489 1488 1484) +4(1473 1472 1488 1489) +4(1470 1474 1490 1486) +4(1486 1490 1489 1485) +4(1474 1473 1489 1490) +4(1471 1475 1491 1487) +4(1487 1491 1490 1486) +4(1475 1474 1490 1491) +4(1409 1475 1491 1410) +4(1410 1491 1487 1406) +4(1365 1364 1378 1374) +4(1414 1488 1472 1413) +4(1365 1414 1413 1364) +4(1365 1374 1488 1414) +4(1473 1417 1418 1489) +4(1489 1418 1414 1488) +4(1417 1413 1414 1418) +4(1474 1421 1422 1490) +4(1490 1422 1418 1489) +4(1421 1417 1418 1422) +4(1475 1425 1426 1491) +4(1491 1426 1422 1490) +4(1425 1421 1422 1426) +4(1385 1425 1426 1386) +4(1386 1426 1491 1410) +4(1357 1331 1330 1356) +4(1492 1476 1371 1367) +4(1357 1492 1367 1331) +4(1357 1356 1476 1492) +4(1331 1367 1371 1330) +4(1353 1357 1356 1352) +4(1493 1477 1476 1492) +4(1353 1493 1492 1357) +4(1353 1352 1477 1493) +4(1349 1353 1352 1348) +4(1494 1478 1477 1493) +4(1349 1494 1493 1353) +4(1349 1348 1478 1494) +4(1345 1349 1348 1344) +4(1495 1479 1478 1494) +4(1345 1495 1494 1349) +4(1345 1344 1479 1495) +4(1337 1345 1344 1336) +4(1399 1398 1479 1495) +4(1337 1399 1495 1345) +4(1368 1372 1371 1367) +4(1496 1492 1476 1480) +4(1368 1496 1480 1372) +4(1368 1367 1492 1496) +4(1477 1481 1497 1493) +4(1493 1497 1496 1492) +4(1481 1480 1496 1497) +4(1478 1482 1498 1494) +4(1494 1498 1497 1493) +4(1482 1481 1497 1498) +4(1479 1483 1499 1495) +4(1495 1499 1498 1494) +4(1483 1482 1498 1499) +4(1402 1483 1499 1403) +4(1403 1499 1495 1399) +4(1369 1373 1372 1368) +4(1500 1496 1480 1484) +4(1369 1500 1484 1373) +4(1369 1368 1496 1500) +4(1481 1485 1501 1497) +4(1497 1501 1500 1496) +4(1485 1484 1500 1501) +4(1482 1486 1502 1498) +4(1498 1502 1501 1497) +4(1486 1485 1501 1502) +4(1483 1487 1503 1499) +4(1499 1503 1502 1498) +4(1487 1486 1502 1503) +4(1406 1487 1503 1407) +4(1407 1503 1499 1403) +4(1370 1374 1373 1369) +4(1504 1500 1484 1488) +4(1370 1504 1488 1374) +4(1370 1369 1500 1504) +4(1485 1489 1505 1501) +4(1501 1505 1504 1500) +4(1489 1488 1504 1505) +4(1486 1490 1506 1502) +4(1502 1506 1505 1501) +4(1490 1489 1505 1506) +4(1487 1491 1507 1503) +4(1503 1507 1506 1502) +4(1491 1490 1506 1507) +4(1410 1491 1507 1411) +4(1411 1507 1503 1407) +4(1366 1365 1374 1370) +4(1415 1504 1488 1414) +4(1366 1415 1414 1365) +4(1366 1370 1504 1415) +4(1489 1418 1419 1505) +4(1505 1419 1415 1504) +4(1418 1414 1415 1419) +4(1490 1422 1423 1506) +4(1506 1423 1419 1505) +4(1422 1418 1419 1423) +4(1491 1426 1427 1507) +4(1507 1427 1423 1506) +4(1426 1422 1423 1427) +4(1386 1426 1427 1387) +4(1387 1427 1507 1411) +4(1338 1332 1331 1357) +4(1428 1492 1367 1359) +4(1338 1428 1359 1332) +4(1338 1357 1492 1428) +4(1332 1359 1367 1331) +4(1339 1338 1357 1353) +4(1432 1493 1492 1428) +4(1339 1432 1428 1338) +4(1339 1353 1493 1432) +4(1340 1339 1353 1349) +4(1436 1494 1493 1432) +4(1340 1436 1432 1339) +4(1340 1349 1494 1436) +4(1341 1340 1349 1345) +4(1440 1495 1494 1436) +4(1341 1440 1436 1340) +4(1341 1345 1495 1440) +4(1333 1341 1345 1337) +4(1388 1399 1495 1440) +4(1333 1388 1440 1341) +4(1360 1368 1367 1359) +4(1429 1428 1492 1496) +4(1360 1429 1496 1368) +4(1360 1359 1428 1429) +4(1493 1497 1433 1432) +4(1432 1433 1429 1428) +4(1497 1496 1429 1433) +4(1494 1498 1437 1436) +4(1436 1437 1433 1432) +4(1498 1497 1433 1437) +4(1495 1499 1441 1440) +4(1440 1441 1437 1436) +4(1499 1498 1437 1441) +4(1403 1499 1441 1389) +4(1389 1441 1440 1388) +4(1361 1369 1368 1360) +4(1430 1429 1496 1500) +4(1361 1430 1500 1369) +4(1361 1360 1429 1430) +4(1497 1501 1434 1433) +4(1433 1434 1430 1429) +4(1501 1500 1430 1434) +4(1498 1502 1438 1437) +4(1437 1438 1434 1433) +4(1502 1501 1434 1438) +4(1499 1503 1442 1441) +4(1441 1442 1438 1437) +4(1503 1502 1438 1442) +4(1407 1503 1442 1390) +4(1390 1442 1441 1389) +4(1362 1370 1369 1361) +4(1431 1430 1500 1504) +4(1362 1431 1504 1370) +4(1362 1361 1430 1431) +4(1501 1505 1435 1434) +4(1434 1435 1431 1430) +4(1505 1504 1431 1435) +4(1502 1506 1439 1438) +4(1438 1439 1435 1434) +4(1506 1505 1435 1439) +4(1503 1507 1443 1442) +4(1442 1443 1439 1438) +4(1507 1506 1439 1443) +4(1411 1507 1443 1391) +4(1391 1443 1442 1390) +4(1358 1366 1370 1362) +4(1392 1431 1504 1415) +4(1358 1392 1415 1366) +4(1358 1362 1431 1392) +4(1505 1419 1393 1435) +4(1435 1393 1392 1431) +4(1419 1415 1392 1393) +4(1506 1423 1394 1439) +4(1439 1394 1393 1435) +4(1423 1419 1393 1394) +4(1507 1427 1395 1443) +4(1443 1395 1394 1439) +4(1427 1423 1394 1395) +4(1387 1427 1395 1383) +4(1383 1395 1443 1391) +4(1363 86 68 603) +4(1412 618 95 415) +4(1363 1412 415 86) +4(94 411 1416 619) +4(411 415 1412 1416) +4(93 407 1420 620) +4(407 411 1416 1420) +4(92 403 1424 621) +4(403 407 1420 1424) +4(363 403 1424 1384) +4(1364 85 86 1363) +4(1413 1412 415 416) +4(1364 1413 416 85) +4(411 412 1417 1416) +4(412 416 1413 1417) +4(407 408 1421 1420) +4(408 412 1417 1421) +4(403 404 1425 1424) +4(404 408 1421 1425) +4(364 404 1425 1385) +4(1365 84 85 1364) +4(1414 1413 416 417) +4(1365 1414 417 84) +4(412 413 1418 1417) +4(413 417 1414 1418) +4(408 409 1422 1421) +4(409 413 1418 1422) +4(404 405 1426 1425) +4(405 409 1422 1426) +4(365 405 1426 1386) +4(1366 83 84 1365) +4(1415 1414 417 418) +4(1366 1415 418 83) +4(413 414 1419 1418) +4(414 418 1415 1419) +4(409 410 1423 1422) +4(410 414 1419 1423) +4(405 406 1427 1426) +4(406 410 1423 1427) +4(366 406 1427 1387) +4(1358 82 83 1366) +4(1392 1415 418 367) +4(1358 1392 367 82) +4(414 368 1393 1419) +4(368 367 1392 1393) +4(410 369 1394 1423) +4(369 368 1393 1394) +4(406 370 1395 1427) +4(370 369 1394 1395) +4(358 370 1395 1383) +4(1338 20 1 1332) +4(1428 1359 78 383) +4(1338 1428 383 20) +4(1332 1 78 1359) +4(1339 19 20 1338) +4(1432 1428 383 384) +4(1339 1432 384 19) +4(1340 18 19 1339) +4(1436 1432 384 385) +4(1340 1436 385 18) +4(1341 17 18 1340) +4(1440 1436 385 386) +4(1341 1440 386 17) +4(1333 16 17 1341) +4(1388 1440 386 359) +4(1360 1359 78 79) +4(1429 379 383 1428) +4(1360 79 379 1429) +4(384 1432 1433 380) +4(380 1433 1429 379) +4(385 1436 1437 381) +4(381 1437 1433 380) +4(386 1440 1441 382) +4(382 1441 1437 381) +4(382 360 1389 1441) +4(1361 1360 79 80) +4(1430 375 379 1429) +4(1361 80 375 1430) +4(380 1433 1434 376) +4(376 1434 1430 375) +4(381 1437 1438 377) +4(377 1438 1434 376) +4(382 1441 1442 378) +4(378 1442 1438 377) +4(378 361 1390 1442) +4(1362 1361 80 81) +4(1431 371 375 1430) +4(1362 81 371 1431) +4(376 1434 1435 372) +4(372 1435 1431 371) +4(377 1438 1439 373) +4(373 1439 1435 372) +4(378 1442 1443 374) +4(374 1443 1439 373) +4(374 362 1391 1443) +4(1358 1362 81 82) +4(1392 367 371 1431) +4(372 1435 1393 368) +4(373 1439 1394 369) +4(374 1443 1395 370) +4(1513 58 40 818) +4(1546 828 104 444) +4(1513 1546 444 58) +4(1513 818 828 1546) +4(103 440 1550 829) +4(829 1550 1546 828) +4(440 444 1546 1550) +4(102 436 1554 830) +4(830 1554 1550 829) +4(436 440 1550 1554) +4(101 432 1558 831) +4(831 1558 1554 830) +4(432 436 1554 1558) +4(100 428 1534 823) +4(823 1534 1558 831) +4(428 432 1558 1534) +4(1514 57 58 1513) +4(1547 1546 444 445) +4(1514 1547 445 57) +4(1514 1513 1546 1547) +4(440 441 1551 1550) +4(1550 1551 1547 1546) +4(441 445 1547 1551) +4(436 437 1555 1554) +4(1554 1555 1551 1550) +4(437 441 1551 1555) +4(432 433 1559 1558) +4(1558 1559 1555 1554) +4(433 437 1555 1559) +4(428 429 1535 1534) +4(1534 1535 1559 1558) +4(429 433 1559 1535) +4(1515 56 57 1514) +4(1548 1547 445 446) +4(1515 1548 446 56) +4(1515 1514 1547 1548) +4(441 442 1552 1551) +4(1551 1552 1548 1547) +4(442 446 1548 1552) +4(437 438 1556 1555) +4(1555 1556 1552 1551) +4(438 442 1552 1556) +4(433 434 1560 1559) +4(1559 1560 1556 1555) +4(434 438 1556 1560) +4(429 430 1536 1535) +4(1535 1536 1560 1559) +4(430 434 1560 1536) +4(1516 55 56 1515) +4(1549 1548 446 447) +4(1516 1549 447 55) +4(1516 1515 1548 1549) +4(442 443 1553 1552) +4(1552 1553 1549 1548) +4(443 447 1549 1553) +4(438 439 1557 1556) +4(1556 1557 1553 1552) +4(439 443 1553 1557) +4(434 435 1561 1560) +4(1560 1561 1557 1556) +4(435 439 1557 1561) +4(430 431 1537 1536) +4(1536 1537 1561 1560) +4(431 435 1561 1537) +4(1508 54 55 1516) +4(1538 1549 447 420) +4(1508 1538 420 54) +4(1508 1516 1549 1538) +4(443 421 1539 1553) +4(1553 1539 1538 1549) +4(421 420 1538 1539) +4(439 422 1540 1557) +4(1557 1540 1539 1553) +4(422 421 1539 1540) +4(435 423 1541 1561) +4(1561 1541 1540 1557) +4(423 422 1540 1541) +4(431 419 1533 1537) +4(1537 1533 1541 1561) +4(419 423 1541 1533) +4(96 824 1562 476) +4(476 1562 1363 86) +4(824 603 1363 1562) +4(97 825 1566 477) +4(477 1566 1562 476) +4(825 824 1562 1566) +4(98 826 1570 478) +4(478 1570 1566 477) +4(826 825 1566 1570) +4(99 827 1574 479) +4(479 1574 1570 478) +4(827 826 1570 1574) +4(823 827 1574 1534) +4(1534 1574 479 428) +4(476 1562 1563 472) +4(472 1563 1364 85) +4(1562 1363 1364 1563) +4(477 1566 1567 473) +4(473 1567 1563 472) +4(1566 1562 1563 1567) +4(478 1570 1571 474) +4(474 1571 1567 473) +4(1570 1566 1567 1571) +4(479 1574 1575 475) +4(475 1575 1571 474) +4(1574 1570 1571 1575) +4(1534 1574 1575 1535) +4(1535 1575 475 429) +4(472 1563 1564 468) +4(468 1564 1365 84) +4(1563 1364 1365 1564) +4(473 1567 1568 469) +4(469 1568 1564 468) +4(1567 1563 1564 1568) +4(474 1571 1572 470) +4(470 1572 1568 469) +4(1571 1567 1568 1572) +4(475 1575 1576 471) +4(471 1576 1572 470) +4(1575 1571 1572 1576) +4(1535 1575 1576 1536) +4(1536 1576 471 430) +4(468 1564 1565 464) +4(464 1565 1366 83) +4(1564 1365 1366 1565) +4(469 1568 1569 465) +4(465 1569 1565 464) +4(1568 1564 1565 1569) +4(470 1572 1573 466) +4(466 1573 1569 465) +4(1572 1568 1569 1573) +4(471 1576 1577 467) +4(467 1577 1573 466) +4(1576 1572 1573 1577) +4(1536 1576 1577 1537) +4(1537 1577 467 431) +4(464 1565 1542 424) +4(424 1542 1358 82) +4(1565 1366 1358 1542) +4(465 1569 1543 425) +4(425 1543 1542 424) +4(1569 1565 1542 1543) +4(466 1573 1544 426) +4(426 1544 1543 425) +4(1573 1569 1543 1544) +4(467 1577 1545 427) +4(427 1545 1544 426) +4(1577 1573 1544 1545) +4(1537 1577 1545 1533) +4(1533 1545 427 419) +4(1529 822 602 1328) +4(1594 1379 607 844) +4(1529 1594 844 822) +4(1529 1328 1379 1594) +4(1530 821 822 1529) +4(1595 1594 844 845) +4(1530 1595 845 821) +4(1530 1529 1594 1595) +4(1531 820 821 1530) +4(1596 1595 845 846) +4(1531 1596 846 820) +4(1531 1530 1595 1596) +4(1532 819 820 1531) +4(1597 1596 846 847) +4(1532 1597 847 819) +4(1532 1531 1596 1597) +4(1513 818 819 1532) +4(1546 1597 847 828) +4(1513 1532 1597 1546) +4(1525 1529 1328 1329) +4(1598 1375 1379 1594) +4(1525 1598 1594 1529) +4(1525 1329 1375 1598) +4(1526 1530 1529 1525) +4(1599 1598 1594 1595) +4(1526 1599 1595 1530) +4(1526 1525 1598 1599) +4(1527 1531 1530 1526) +4(1600 1599 1595 1596) +4(1527 1600 1596 1531) +4(1527 1526 1599 1600) +4(1528 1532 1531 1527) +4(1601 1600 1596 1597) +4(1528 1601 1597 1532) +4(1528 1527 1600 1601) +4(1514 1513 1532 1528) +4(1547 1601 1597 1546) +4(1514 1528 1601 1547) +4(1521 1525 1329 1330) +4(1602 1371 1375 1598) +4(1521 1602 1598 1525) +4(1521 1330 1371 1602) +4(1522 1526 1525 1521) +4(1603 1602 1598 1599) +4(1522 1603 1599 1526) +4(1522 1521 1602 1603) +4(1523 1527 1526 1522) +4(1604 1603 1599 1600) +4(1523 1604 1600 1527) +4(1523 1522 1603 1604) +4(1524 1528 1527 1523) +4(1605 1604 1600 1601) +4(1524 1605 1601 1528) +4(1524 1523 1604 1605) +4(1515 1514 1528 1524) +4(1548 1605 1601 1547) +4(1515 1524 1605 1548) +4(1517 1521 1330 1331) +4(1606 1367 1371 1602) +4(1517 1606 1602 1521) +4(1517 1331 1367 1606) +4(1518 1522 1521 1517) +4(1607 1606 1602 1603) +4(1518 1607 1603 1522) +4(1518 1517 1606 1607) +4(1519 1523 1522 1518) +4(1608 1607 1603 1604) +4(1519 1608 1604 1523) +4(1519 1518 1607 1608) +4(1520 1524 1523 1519) +4(1609 1608 1604 1605) +4(1520 1609 1605 1524) +4(1520 1519 1608 1609) +4(1516 1515 1524 1520) +4(1549 1609 1605 1548) +4(1516 1520 1609 1549) +4(1509 1517 1331 1332) +4(1578 1359 1367 1606) +4(1509 1578 1606 1517) +4(1509 1332 1359 1578) +4(1510 1518 1517 1509) +4(1582 1578 1606 1607) +4(1510 1582 1607 1518) +4(1510 1509 1578 1582) +4(1511 1519 1518 1510) +4(1586 1582 1607 1608) +4(1511 1586 1608 1519) +4(1511 1510 1582 1586) +4(1512 1520 1519 1511) +4(1590 1586 1608 1609) +4(1512 1590 1609 1520) +4(1512 1511 1586 1590) +4(1508 1516 1520 1512) +4(1538 1590 1609 1549) +4(1508 1512 1590 1538) +4(844 1594 1610 840) +4(840 1610 1380 606) +4(1594 1379 1380 1610) +4(845 1595 1611 841) +4(841 1611 1610 840) +4(1595 1594 1610 1611) +4(846 1596 1612 842) +4(842 1612 1611 841) +4(1596 1595 1611 1612) +4(847 1597 1613 843) +4(843 1613 1612 842) +4(1597 1596 1612 1613) +4(1546 1597 1613 1550) +4(1550 1613 843 829) +4(1594 1598 1614 1610) +4(1610 1614 1376 1380) +4(1598 1375 1376 1614) +4(1595 1599 1615 1611) +4(1611 1615 1614 1610) +4(1599 1598 1614 1615) +4(1596 1600 1616 1612) +4(1612 1616 1615 1611) +4(1600 1599 1615 1616) +4(1597 1601 1617 1613) +4(1613 1617 1616 1612) +4(1601 1600 1616 1617) +4(1547 1601 1617 1551) +4(1551 1617 1613 1550) +4(1598 1602 1618 1614) +4(1614 1618 1372 1376) +4(1602 1371 1372 1618) +4(1599 1603 1619 1615) +4(1615 1619 1618 1614) +4(1603 1602 1618 1619) +4(1600 1604 1620 1616) +4(1616 1620 1619 1615) +4(1604 1603 1619 1620) +4(1601 1605 1621 1617) +4(1617 1621 1620 1616) +4(1605 1604 1620 1621) +4(1548 1605 1621 1552) +4(1552 1621 1617 1551) +4(1602 1606 1622 1618) +4(1618 1622 1368 1372) +4(1606 1367 1368 1622) +4(1603 1607 1623 1619) +4(1619 1623 1622 1618) +4(1607 1606 1622 1623) +4(1604 1608 1624 1620) +4(1620 1624 1623 1619) +4(1608 1607 1623 1624) +4(1605 1609 1625 1621) +4(1621 1625 1624 1620) +4(1609 1608 1624 1625) +4(1549 1609 1625 1553) +4(1553 1625 1621 1552) +4(1606 1578 1579 1622) +4(1622 1579 1360 1368) +4(1578 1359 1360 1579) +4(1607 1582 1583 1623) +4(1623 1583 1579 1622) +4(1582 1578 1579 1583) +4(1608 1586 1587 1624) +4(1624 1587 1583 1623) +4(1586 1582 1583 1587) +4(1609 1590 1591 1625) +4(1625 1591 1587 1624) +4(1590 1586 1587 1591) +4(1538 1590 1591 1539) +4(1539 1591 1625 1553) +4(840 1610 1626 836) +4(836 1626 1381 605) +4(1610 1380 1381 1626) +4(841 1611 1627 837) +4(837 1627 1626 836) +4(1611 1610 1626 1627) +4(842 1612 1628 838) +4(838 1628 1627 837) +4(1612 1611 1627 1628) +4(843 1613 1629 839) +4(839 1629 1628 838) +4(1613 1612 1628 1629) +4(1550 1613 1629 1554) +4(1554 1629 839 830) +4(1610 1614 1630 1626) +4(1626 1630 1377 1381) +4(1614 1376 1377 1630) +4(1611 1615 1631 1627) +4(1627 1631 1630 1626) +4(1615 1614 1630 1631) +4(1612 1616 1632 1628) +4(1628 1632 1631 1627) +4(1616 1615 1631 1632) +4(1613 1617 1633 1629) +4(1629 1633 1632 1628) +4(1617 1616 1632 1633) +4(1551 1617 1633 1555) +4(1555 1633 1629 1554) +4(1614 1618 1634 1630) +4(1630 1634 1373 1377) +4(1618 1372 1373 1634) +4(1615 1619 1635 1631) +4(1631 1635 1634 1630) +4(1619 1618 1634 1635) +4(1616 1620 1636 1632) +4(1632 1636 1635 1631) +4(1620 1619 1635 1636) +4(1617 1621 1637 1633) +4(1633 1637 1636 1632) +4(1621 1620 1636 1637) +4(1552 1621 1637 1556) +4(1556 1637 1633 1555) +4(1618 1622 1638 1634) +4(1634 1638 1369 1373) +4(1622 1368 1369 1638) +4(1619 1623 1639 1635) +4(1635 1639 1638 1634) +4(1623 1622 1638 1639) +4(1620 1624 1640 1636) +4(1636 1640 1639 1635) +4(1624 1623 1639 1640) +4(1621 1625 1641 1637) +4(1637 1641 1640 1636) +4(1625 1624 1640 1641) +4(1553 1625 1641 1557) +4(1557 1641 1637 1556) +4(1622 1579 1580 1638) +4(1638 1580 1361 1369) +4(1579 1360 1361 1580) +4(1623 1583 1584 1639) +4(1639 1584 1580 1638) +4(1583 1579 1580 1584) +4(1624 1587 1588 1640) +4(1640 1588 1584 1639) +4(1587 1583 1584 1588) +4(1625 1591 1592 1641) +4(1641 1592 1588 1640) +4(1591 1587 1588 1592) +4(1539 1591 1592 1540) +4(1540 1592 1641 1557) +4(836 1626 1642 832) +4(832 1642 1382 604) +4(1626 1381 1382 1642) +4(837 1627 1643 833) +4(833 1643 1642 832) +4(1627 1626 1642 1643) +4(838 1628 1644 834) +4(834 1644 1643 833) +4(1628 1627 1643 1644) +4(839 1629 1645 835) +4(835 1645 1644 834) +4(1629 1628 1644 1645) +4(1554 1629 1645 1558) +4(1558 1645 835 831) +4(1626 1630 1646 1642) +4(1642 1646 1378 1382) +4(1630 1377 1378 1646) +4(1627 1631 1647 1643) +4(1643 1647 1646 1642) +4(1631 1630 1646 1647) +4(1628 1632 1648 1644) +4(1644 1648 1647 1643) +4(1632 1631 1647 1648) +4(1629 1633 1649 1645) +4(1645 1649 1648 1644) +4(1633 1632 1648 1649) +4(1555 1633 1649 1559) +4(1559 1649 1645 1558) +4(1630 1634 1650 1646) +4(1646 1650 1374 1378) +4(1634 1373 1374 1650) +4(1631 1635 1651 1647) +4(1647 1651 1650 1646) +4(1635 1634 1650 1651) +4(1632 1636 1652 1648) +4(1648 1652 1651 1647) +4(1636 1635 1651 1652) +4(1633 1637 1653 1649) +4(1649 1653 1652 1648) +4(1637 1636 1652 1653) +4(1556 1637 1653 1560) +4(1560 1653 1649 1559) +4(1634 1638 1654 1650) +4(1650 1654 1370 1374) +4(1638 1369 1370 1654) +4(1635 1639 1655 1651) +4(1651 1655 1654 1650) +4(1639 1638 1654 1655) +4(1636 1640 1656 1652) +4(1652 1656 1655 1651) +4(1640 1639 1655 1656) +4(1637 1641 1657 1653) +4(1653 1657 1656 1652) +4(1641 1640 1656 1657) +4(1557 1641 1657 1561) +4(1561 1657 1653 1560) +4(1638 1580 1581 1654) +4(1654 1581 1362 1370) +4(1580 1361 1362 1581) +4(1639 1584 1585 1655) +4(1655 1585 1581 1654) +4(1584 1580 1581 1585) +4(1640 1588 1589 1656) +4(1656 1589 1585 1655) +4(1588 1584 1585 1589) +4(1641 1592 1593 1657) +4(1657 1593 1589 1656) +4(1592 1588 1589 1593) +4(1540 1592 1593 1541) +4(1541 1593 1657 1561) +4(832 1642 1562 824) +4(1642 1382 1363 1562) +4(833 1643 1566 825) +4(1643 1642 1562 1566) +4(834 1644 1570 826) +4(1644 1643 1566 1570) +4(835 1645 1574 827) +4(1645 1644 1570 1574) +4(1558 1645 1574 1534) +4(1642 1646 1563 1562) +4(1646 1378 1364 1563) +4(1643 1647 1567 1566) +4(1647 1646 1563 1567) +4(1644 1648 1571 1570) +4(1648 1647 1567 1571) +4(1645 1649 1575 1574) +4(1649 1648 1571 1575) +4(1559 1649 1575 1535) +4(1646 1650 1564 1563) +4(1650 1374 1365 1564) +4(1647 1651 1568 1567) +4(1651 1650 1564 1568) +4(1648 1652 1572 1571) +4(1652 1651 1568 1572) +4(1649 1653 1576 1575) +4(1653 1652 1572 1576) +4(1560 1653 1576 1536) +4(1650 1654 1565 1564) +4(1654 1370 1366 1565) +4(1651 1655 1569 1568) +4(1655 1654 1565 1569) +4(1652 1656 1573 1572) +4(1656 1655 1569 1573) +4(1653 1657 1577 1576) +4(1657 1656 1573 1577) +4(1561 1657 1577 1537) +4(1654 1581 1542 1565) +4(1581 1362 1358 1542) +4(1655 1585 1543 1569) +4(1585 1581 1542 1543) +4(1656 1589 1544 1573) +4(1589 1585 1543 1544) +4(1657 1593 1545 1577) +4(1593 1589 1544 1545) +4(1541 1593 1545 1533) +4(1509 1332 1 50) +4(1578 460 78 1359) +4(1509 50 460 1578) +4(1510 1509 50 51) +4(1582 456 460 1578) +4(1510 51 456 1582) +4(1511 1510 51 52) +4(1586 452 456 1582) +4(1511 52 452 1586) +4(1512 1511 52 53) +4(1590 448 452 1586) +4(1512 53 448 1590) +4(1508 1512 53 54) +4(1538 420 448 1590) +4(460 461 1579 1578) +4(461 79 1360 1579) +4(456 457 1583 1582) +4(457 461 1579 1583) +4(452 453 1587 1586) +4(453 457 1583 1587) +4(448 449 1591 1590) +4(449 453 1587 1591) +4(421 449 1591 1539) +4(461 462 1580 1579) +4(462 80 1361 1580) +4(457 458 1584 1583) +4(458 462 1580 1584) +4(453 454 1588 1587) +4(454 458 1584 1588) +4(449 450 1592 1591) +4(450 454 1588 1592) +4(422 450 1592 1540) +4(462 463 1581 1580) +4(463 81 1362 1581) +4(458 459 1585 1584) +4(459 463 1581 1585) +4(454 455 1589 1588) +4(455 459 1585 1589) +4(450 451 1593 1592) +4(451 455 1589 1593) +4(423 451 1593 1541) +4(463 424 1542 1581) +4(459 425 1543 1585) +4(455 426 1544 1589) +4(451 427 1545 1593) +4(612 1008 1696 1334) +4(1334 1696 171 12) +4(1008 11 171 1696) +4(1008 1009 1697 1696) +4(1696 1697 167 171) +4(1009 10 167 1697) +4(1009 1010 1698 1697) +4(1697 1698 163 167) +4(1010 9 163 1698) +4(1010 1011 1699 1698) +4(1698 1699 159 163) +4(1011 8 159 1699) +4(1011 1003 1688 1699) +4(1699 1688 119 159) +4(1003 7 119 1688) +4(1334 1696 1700 1335) +4(1335 1700 172 13) +4(1696 171 172 1700) +4(1696 1697 1701 1700) +4(1700 1701 168 172) +4(1697 167 168 1701) +4(1697 1698 1702 1701) +4(1701 1702 164 168) +4(1698 163 164 1702) +4(1698 1699 1703 1702) +4(1702 1703 160 164) +4(1699 159 160 1703) +4(1699 1688 1689 1703) +4(1703 1689 120 160) +4(1688 119 120 1689) +4(1335 1700 1704 1336) +4(1336 1704 173 14) +4(1700 172 173 1704) +4(1700 1701 1705 1704) +4(1704 1705 169 173) +4(1701 168 169 1705) +4(1701 1702 1706 1705) +4(1705 1706 165 169) +4(1702 164 165 1706) +4(1702 1703 1707 1706) +4(1706 1707 161 165) +4(1703 160 161 1707) +4(1703 1689 1690 1707) +4(1707 1690 121 161) +4(1689 120 121 1690) +4(1336 1704 1708 1337) +4(1337 1708 174 15) +4(1704 173 174 1708) +4(1704 1705 1709 1708) +4(1708 1709 170 174) +4(1705 169 170 1709) +4(1705 1706 1710 1709) +4(1709 1710 166 170) +4(1706 165 166 1710) +4(1706 1707 1711 1710) +4(1710 1711 162 166) +4(1707 161 162 1711) +4(1707 1690 1691 1711) +4(1711 1691 122 162) +4(1690 121 122 1691) +4(1337 1708 1684 1333) +4(1333 1684 123 16) +4(1708 174 123 1684) +4(1708 1709 1685 1684) +4(1684 1685 124 123) +4(1709 170 124 1685) +4(1709 1710 1686 1685) +4(1685 1686 125 124) +4(1710 166 125 1686) +4(1710 1711 1687 1686) +4(1686 1687 126 125) +4(1711 162 126 1687) +4(1711 1691 1683 1687) +4(1687 1683 114 126) +4(1691 122 114 1683) +4(1679 1328 602 1002) +4(1744 1024 608 1354) +4(1679 1744 1354 1328) +4(1679 1002 1024 1744) +4(609 1350 1745 1025) +4(1025 1745 1744 1024) +4(1350 1354 1744 1745) +4(610 1346 1746 1026) +4(1026 1746 1745 1025) +4(1346 1350 1745 1746) +4(611 1342 1747 1027) +4(1027 1747 1746 1026) +4(1342 1346 1746 1747) +4(1334 1342 1747 1696) +4(1696 1747 1027 1008) +4(1680 1329 1328 1679) +4(1748 1744 1354 1355) +4(1680 1748 1355 1329) +4(1680 1679 1744 1748) +4(1350 1351 1749 1745) +4(1745 1749 1748 1744) +4(1351 1355 1748 1749) +4(1346 1347 1750 1746) +4(1746 1750 1749 1745) +4(1347 1351 1749 1750) +4(1342 1343 1751 1747) +4(1747 1751 1750 1746) +4(1343 1347 1750 1751) +4(1335 1343 1751 1700) +4(1700 1751 1747 1696) +4(1681 1330 1329 1680) +4(1752 1748 1355 1356) +4(1681 1752 1356 1330) +4(1681 1680 1748 1752) +4(1351 1352 1753 1749) +4(1749 1753 1752 1748) +4(1352 1356 1752 1753) +4(1347 1348 1754 1750) +4(1750 1754 1753 1749) +4(1348 1352 1753 1754) +4(1343 1344 1755 1751) +4(1751 1755 1754 1750) +4(1344 1348 1754 1755) +4(1336 1344 1755 1704) +4(1704 1755 1751 1700) +4(1682 1331 1330 1681) +4(1756 1752 1356 1357) +4(1682 1756 1357 1331) +4(1682 1681 1752 1756) +4(1352 1353 1757 1753) +4(1753 1757 1756 1752) +4(1353 1357 1756 1757) +4(1348 1349 1758 1754) +4(1754 1758 1757 1753) +4(1349 1353 1757 1758) +4(1344 1345 1759 1755) +4(1755 1759 1758 1754) +4(1345 1349 1758 1759) +4(1337 1345 1759 1708) +4(1708 1759 1755 1704) +4(1663 1332 1331 1682) +4(1712 1756 1357 1338) +4(1663 1712 1338 1332) +4(1663 1682 1756 1712) +4(1353 1339 1716 1757) +4(1757 1716 1712 1756) +4(1339 1338 1712 1716) +4(1349 1340 1720 1758) +4(1758 1720 1716 1757) +4(1340 1339 1716 1720) +4(1345 1341 1724 1759) +4(1759 1724 1720 1758) +4(1341 1340 1720 1724) +4(1333 1341 1724 1684) +4(1684 1724 1759 1708) +4(1675 1679 1002 1001) +4(1760 1020 1024 1744) +4(1675 1760 1744 1679) +4(1675 1001 1020 1760) +4(1025 1745 1761 1021) +4(1021 1761 1760 1020) +4(1745 1744 1760 1761) +4(1026 1746 1762 1022) +4(1022 1762 1761 1021) +4(1746 1745 1761 1762) +4(1027 1747 1763 1023) +4(1023 1763 1762 1022) +4(1747 1746 1762 1763) +4(1696 1747 1763 1697) +4(1697 1763 1023 1009) +4(1676 1680 1679 1675) +4(1764 1760 1744 1748) +4(1676 1764 1748 1680) +4(1676 1675 1760 1764) +4(1745 1749 1765 1761) +4(1761 1765 1764 1760) +4(1749 1748 1764 1765) +4(1746 1750 1766 1762) +4(1762 1766 1765 1761) +4(1750 1749 1765 1766) +4(1747 1751 1767 1763) +4(1763 1767 1766 1762) +4(1751 1750 1766 1767) +4(1700 1751 1767 1701) +4(1701 1767 1763 1697) +4(1677 1681 1680 1676) +4(1768 1764 1748 1752) +4(1677 1768 1752 1681) +4(1677 1676 1764 1768) +4(1749 1753 1769 1765) +4(1765 1769 1768 1764) +4(1753 1752 1768 1769) +4(1750 1754 1770 1766) +4(1766 1770 1769 1765) +4(1754 1753 1769 1770) +4(1751 1755 1771 1767) +4(1767 1771 1770 1766) +4(1755 1754 1770 1771) +4(1704 1755 1771 1705) +4(1705 1771 1767 1701) +4(1678 1682 1681 1677) +4(1772 1768 1752 1756) +4(1678 1772 1756 1682) +4(1678 1677 1768 1772) +4(1753 1757 1773 1769) +4(1769 1773 1772 1768) +4(1757 1756 1772 1773) +4(1754 1758 1774 1770) +4(1770 1774 1773 1769) +4(1758 1757 1773 1774) +4(1755 1759 1775 1771) +4(1771 1775 1774 1770) +4(1759 1758 1774 1775) +4(1708 1759 1775 1709) +4(1709 1775 1771 1705) +4(1664 1663 1682 1678) +4(1713 1772 1756 1712) +4(1664 1713 1712 1663) +4(1664 1678 1772 1713) +4(1757 1716 1717 1773) +4(1773 1717 1713 1772) +4(1716 1712 1713 1717) +4(1758 1720 1721 1774) +4(1774 1721 1717 1773) +4(1720 1716 1717 1721) +4(1759 1724 1725 1775) +4(1775 1725 1721 1774) +4(1724 1720 1721 1725) +4(1684 1724 1725 1685) +4(1685 1725 1775 1709) +4(1671 1675 1001 1000) +4(1776 1016 1020 1760) +4(1671 1776 1760 1675) +4(1671 1000 1016 1776) +4(1021 1761 1777 1017) +4(1017 1777 1776 1016) +4(1761 1760 1776 1777) +4(1022 1762 1778 1018) +4(1018 1778 1777 1017) +4(1762 1761 1777 1778) +4(1023 1763 1779 1019) +4(1019 1779 1778 1018) +4(1763 1762 1778 1779) +4(1697 1763 1779 1698) +4(1698 1779 1019 1010) +4(1672 1676 1675 1671) +4(1780 1776 1760 1764) +4(1672 1780 1764 1676) +4(1672 1671 1776 1780) +4(1761 1765 1781 1777) +4(1777 1781 1780 1776) +4(1765 1764 1780 1781) +4(1762 1766 1782 1778) +4(1778 1782 1781 1777) +4(1766 1765 1781 1782) +4(1763 1767 1783 1779) +4(1779 1783 1782 1778) +4(1767 1766 1782 1783) +4(1701 1767 1783 1702) +4(1702 1783 1779 1698) +4(1673 1677 1676 1672) +4(1784 1780 1764 1768) +4(1673 1784 1768 1677) +4(1673 1672 1780 1784) +4(1765 1769 1785 1781) +4(1781 1785 1784 1780) +4(1769 1768 1784 1785) +4(1766 1770 1786 1782) +4(1782 1786 1785 1781) +4(1770 1769 1785 1786) +4(1767 1771 1787 1783) +4(1783 1787 1786 1782) +4(1771 1770 1786 1787) +4(1705 1771 1787 1706) +4(1706 1787 1783 1702) +4(1674 1678 1677 1673) +4(1788 1784 1768 1772) +4(1674 1788 1772 1678) +4(1674 1673 1784 1788) +4(1769 1773 1789 1785) +4(1785 1789 1788 1784) +4(1773 1772 1788 1789) +4(1770 1774 1790 1786) +4(1786 1790 1789 1785) +4(1774 1773 1789 1790) +4(1771 1775 1791 1787) +4(1787 1791 1790 1786) +4(1775 1774 1790 1791) +4(1709 1775 1791 1710) +4(1710 1791 1787 1706) +4(1665 1664 1678 1674) +4(1714 1788 1772 1713) +4(1665 1714 1713 1664) +4(1665 1674 1788 1714) +4(1773 1717 1718 1789) +4(1789 1718 1714 1788) +4(1717 1713 1714 1718) +4(1774 1721 1722 1790) +4(1790 1722 1718 1789) +4(1721 1717 1718 1722) +4(1775 1725 1726 1791) +4(1791 1726 1722 1790) +4(1725 1721 1722 1726) +4(1685 1725 1726 1686) +4(1686 1726 1791 1710) +4(1667 1671 1000 999) +4(1792 1012 1016 1776) +4(1667 1792 1776 1671) +4(1667 999 1012 1792) +4(1017 1777 1793 1013) +4(1013 1793 1792 1012) +4(1777 1776 1792 1793) +4(1018 1778 1794 1014) +4(1014 1794 1793 1013) +4(1778 1777 1793 1794) +4(1019 1779 1795 1015) +4(1015 1795 1794 1014) +4(1779 1778 1794 1795) +4(1698 1779 1795 1699) +4(1699 1795 1015 1011) +4(1668 1672 1671 1667) +4(1796 1792 1776 1780) +4(1668 1796 1780 1672) +4(1668 1667 1792 1796) +4(1777 1781 1797 1793) +4(1793 1797 1796 1792) +4(1781 1780 1796 1797) +4(1778 1782 1798 1794) +4(1794 1798 1797 1793) +4(1782 1781 1797 1798) +4(1779 1783 1799 1795) +4(1795 1799 1798 1794) +4(1783 1782 1798 1799) +4(1702 1783 1799 1703) +4(1703 1799 1795 1699) +4(1669 1673 1672 1668) +4(1800 1796 1780 1784) +4(1669 1800 1784 1673) +4(1669 1668 1796 1800) +4(1781 1785 1801 1797) +4(1797 1801 1800 1796) +4(1785 1784 1800 1801) +4(1782 1786 1802 1798) +4(1798 1802 1801 1797) +4(1786 1785 1801 1802) +4(1783 1787 1803 1799) +4(1799 1803 1802 1798) +4(1787 1786 1802 1803) +4(1706 1787 1803 1707) +4(1707 1803 1799 1703) +4(1670 1674 1673 1669) +4(1804 1800 1784 1788) +4(1670 1804 1788 1674) +4(1670 1669 1800 1804) +4(1785 1789 1805 1801) +4(1801 1805 1804 1800) +4(1789 1788 1804 1805) +4(1786 1790 1806 1802) +4(1802 1806 1805 1801) +4(1790 1789 1805 1806) +4(1787 1791 1807 1803) +4(1803 1807 1806 1802) +4(1791 1790 1806 1807) +4(1710 1791 1807 1711) +4(1711 1807 1803 1707) +4(1666 1665 1674 1670) +4(1715 1804 1788 1714) +4(1666 1715 1714 1665) +4(1666 1670 1804 1715) +4(1789 1718 1719 1805) +4(1805 1719 1715 1804) +4(1718 1714 1715 1719) +4(1790 1722 1723 1806) +4(1806 1723 1719 1805) +4(1722 1718 1719 1723) +4(1791 1726 1727 1807) +4(1807 1727 1723 1806) +4(1726 1722 1723 1727) +4(1686 1726 1727 1687) +4(1687 1727 1807 1711) +4(1659 1667 999 998) +4(1728 1004 1012 1792) +4(1659 1728 1792 1667) +4(1659 998 1004 1728) +4(1013 1793 1732 1005) +4(1005 1732 1728 1004) +4(1793 1792 1728 1732) +4(1014 1794 1736 1006) +4(1006 1736 1732 1005) +4(1794 1793 1732 1736) +4(1015 1795 1740 1007) +4(1007 1740 1736 1006) +4(1795 1794 1736 1740) +4(1699 1795 1740 1688) +4(1688 1740 1007 1003) +4(1660 1668 1667 1659) +4(1729 1728 1792 1796) +4(1660 1729 1796 1668) +4(1660 1659 1728 1729) +4(1793 1797 1733 1732) +4(1732 1733 1729 1728) +4(1797 1796 1729 1733) +4(1794 1798 1737 1736) +4(1736 1737 1733 1732) +4(1798 1797 1733 1737) +4(1795 1799 1741 1740) +4(1740 1741 1737 1736) +4(1799 1798 1737 1741) +4(1703 1799 1741 1689) +4(1689 1741 1740 1688) +4(1661 1669 1668 1660) +4(1730 1729 1796 1800) +4(1661 1730 1800 1669) +4(1661 1660 1729 1730) +4(1797 1801 1734 1733) +4(1733 1734 1730 1729) +4(1801 1800 1730 1734) +4(1798 1802 1738 1737) +4(1737 1738 1734 1733) +4(1802 1801 1734 1738) +4(1799 1803 1742 1741) +4(1741 1742 1738 1737) +4(1803 1802 1738 1742) +4(1707 1803 1742 1690) +4(1690 1742 1741 1689) +4(1662 1670 1669 1661) +4(1731 1730 1800 1804) +4(1662 1731 1804 1670) +4(1662 1661 1730 1731) +4(1801 1805 1735 1734) +4(1734 1735 1731 1730) +4(1805 1804 1731 1735) +4(1802 1806 1739 1738) +4(1738 1739 1735 1734) +4(1806 1805 1735 1739) +4(1803 1807 1743 1742) +4(1742 1743 1739 1738) +4(1807 1806 1739 1743) +4(1711 1807 1743 1691) +4(1691 1743 1742 1690) +4(1658 1666 1670 1662) +4(1692 1731 1804 1715) +4(1658 1692 1715 1666) +4(1658 1662 1731 1692) +4(1805 1719 1693 1735) +4(1735 1693 1692 1731) +4(1719 1715 1692 1693) +4(1806 1723 1694 1739) +4(1739 1694 1693 1735) +4(1723 1719 1693 1694) +4(1807 1727 1695 1743) +4(1743 1695 1694 1739) +4(1727 1723 1694 1695) +4(1687 1727 1695 1683) +4(1683 1695 1743 1691) +4(1663 29 1 1332) +4(1712 1338 20 139) +4(1663 1712 139 29) +4(19 135 1716 1339) +4(135 139 1712 1716) +4(18 131 1720 1340) +4(131 135 1716 1720) +4(17 127 1724 1341) +4(127 131 1720 1724) +4(123 127 1724 1684) +4(1664 28 29 1663) +4(1713 1712 139 140) +4(1664 1713 140 28) +4(135 136 1717 1716) +4(136 140 1713 1717) +4(131 132 1721 1720) +4(132 136 1717 1721) +4(127 128 1725 1724) +4(128 132 1721 1725) +4(124 128 1725 1685) +4(1665 27 28 1664) +4(1714 1713 140 141) +4(1665 1714 141 27) +4(136 137 1718 1717) +4(137 141 1714 1718) +4(132 133 1722 1721) +4(133 137 1718 1722) +4(128 129 1726 1725) +4(129 133 1722 1726) +4(125 129 1726 1686) +4(1666 26 27 1665) +4(1715 1714 141 142) +4(1666 1715 142 26) +4(137 138 1719 1718) +4(138 142 1715 1719) +4(133 134 1723 1722) +4(134 138 1719 1723) +4(129 130 1727 1726) +4(130 134 1723 1727) +4(126 130 1727 1687) +4(1658 25 26 1666) +4(1692 1715 142 115) +4(1658 1692 115 25) +4(138 116 1693 1719) +4(116 115 1692 1693) +4(134 117 1694 1723) +4(117 116 1693 1694) +4(130 118 1695 1727) +4(118 117 1694 1695) +4(114 118 1695 1683) +4(1659 998 0 21) +4(1728 155 3 1004) +4(1659 21 155 1728) +4(4 1005 1732 156) +4(156 1732 1728 155) +4(5 1006 1736 157) +4(157 1736 1732 156) +4(6 1007 1740 158) +4(158 1740 1736 157) +4(158 119 1688 1740) +4(1660 1659 21 22) +4(1729 151 155 1728) +4(1660 22 151 1729) +4(156 1732 1733 152) +4(152 1733 1729 151) +4(157 1736 1737 153) +4(153 1737 1733 152) +4(158 1740 1741 154) +4(154 1741 1737 153) +4(154 120 1689 1741) +4(1661 1660 22 23) +4(1730 147 151 1729) +4(1661 23 147 1730) +4(152 1733 1734 148) +4(148 1734 1730 147) +4(153 1737 1738 149) +4(149 1738 1734 148) +4(154 1741 1742 150) +4(150 1742 1738 149) +4(150 121 1690 1742) +4(1662 1661 23 24) +4(1731 143 147 1730) +4(1662 24 143 1731) +4(148 1734 1735 144) +4(144 1735 1731 143) +4(149 1738 1739 145) +4(145 1739 1735 144) +4(150 1742 1743 146) +4(146 1743 1739 145) +4(146 122 1691 1743) +4(1658 1662 24 25) +4(1692 115 143 1731) +4(144 1735 1693 116) +4(145 1739 1694 117) +4(146 1743 1695 118) +4(58 354 1821 1513) +4(1513 1821 1179 818) +4(354 105 1179 1821) +4(57 350 1825 1514) +4(1514 1825 1821 1513) +4(350 354 1821 1825) +4(56 346 1829 1515) +4(1515 1829 1825 1514) +4(346 350 1825 1829) +4(55 342 1833 1516) +4(1516 1833 1829 1515) +4(342 346 1829 1833) +4(54 302 1809 1508) +4(1508 1809 1833 1516) +4(302 342 1833 1809) +4(354 355 1822 1821) +4(1821 1822 1180 1179) +4(355 106 1180 1822) +4(350 351 1826 1825) +4(1825 1826 1822 1821) +4(351 355 1822 1826) +4(346 347 1830 1829) +4(1829 1830 1826 1825) +4(347 351 1826 1830) +4(342 343 1834 1833) +4(1833 1834 1830 1829) +4(343 347 1830 1834) +4(302 303 1810 1809) +4(1809 1810 1834 1833) +4(303 343 1834 1810) +4(355 356 1823 1822) +4(1822 1823 1181 1180) +4(356 107 1181 1823) +4(351 352 1827 1826) +4(1826 1827 1823 1822) +4(352 356 1823 1827) +4(347 348 1831 1830) +4(1830 1831 1827 1826) +4(348 352 1827 1831) +4(343 344 1835 1834) +4(1834 1835 1831 1830) +4(344 348 1831 1835) +4(303 304 1811 1810) +4(1810 1811 1835 1834) +4(304 344 1835 1811) +4(356 357 1824 1823) +4(1823 1824 1182 1181) +4(357 108 1182 1824) +4(352 353 1828 1827) +4(1827 1828 1824 1823) +4(353 357 1824 1828) +4(348 349 1832 1831) +4(1831 1832 1828 1827) +4(349 353 1828 1832) +4(344 345 1836 1835) +4(1835 1836 1832 1831) +4(345 349 1832 1836) +4(304 305 1812 1811) +4(1811 1812 1836 1835) +4(305 345 1836 1812) +4(357 306 1813 1824) +4(1824 1813 1178 1182) +4(306 109 1178 1813) +4(353 307 1814 1828) +4(1828 1814 1813 1824) +4(307 306 1813 1814) +4(349 308 1815 1832) +4(1832 1815 1814 1828) +4(308 307 1814 1815) +4(345 309 1816 1836) +4(1836 1816 1815 1832) +4(309 308 1815 1816) +4(305 297 1808 1812) +4(1812 1808 1816 1836) +4(297 309 1816 1808) +4(50 1509 1837 338) +4(338 1837 1663 29) +4(1509 1332 1663 1837) +4(51 1510 1841 339) +4(339 1841 1837 338) +4(1510 1509 1837 1841) +4(52 1511 1845 340) +4(340 1845 1841 339) +4(1511 1510 1841 1845) +4(53 1512 1849 341) +4(341 1849 1845 340) +4(1512 1511 1845 1849) +4(1508 1512 1849 1809) +4(1809 1849 341 302) +4(338 1837 1838 334) +4(334 1838 1664 28) +4(1837 1663 1664 1838) +4(339 1841 1842 335) +4(335 1842 1838 334) +4(1841 1837 1838 1842) +4(340 1845 1846 336) +4(336 1846 1842 335) +4(1845 1841 1842 1846) +4(341 1849 1850 337) +4(337 1850 1846 336) +4(1849 1845 1846 1850) +4(1809 1849 1850 1810) +4(1810 1850 337 303) +4(334 1838 1839 330) +4(330 1839 1665 27) +4(1838 1664 1665 1839) +4(335 1842 1843 331) +4(331 1843 1839 330) +4(1842 1838 1839 1843) +4(336 1846 1847 332) +4(332 1847 1843 331) +4(1846 1842 1843 1847) +4(337 1850 1851 333) +4(333 1851 1847 332) +4(1850 1846 1847 1851) +4(1810 1850 1851 1811) +4(1811 1851 333 304) +4(330 1839 1840 326) +4(326 1840 1666 26) +4(1839 1665 1666 1840) +4(331 1843 1844 327) +4(327 1844 1840 326) +4(1843 1839 1840 1844) +4(332 1847 1848 328) +4(328 1848 1844 327) +4(1847 1843 1844 1848) +4(333 1851 1852 329) +4(329 1852 1848 328) +4(1851 1847 1848 1852) +4(1811 1851 1852 1812) +4(1812 1852 329 305) +4(326 1840 1817 298) +4(298 1817 1658 25) +4(1840 1666 1658 1817) +4(327 1844 1818 299) +4(299 1818 1817 298) +4(1844 1840 1817 1818) +4(328 1848 1819 300) +4(300 1819 1818 299) +4(1848 1844 1818 1819) +4(329 1852 1820 301) +4(301 1820 1819 300) +4(1852 1848 1819 1820) +4(1812 1852 1820 1808) +4(1808 1820 301 297) +4(822 1199 1869 1529) +4(1529 1869 1679 1328) +4(1199 1002 1679 1869) +4(821 1195 1870 1530) +4(1530 1870 1869 1529) +4(1195 1199 1869 1870) +4(820 1191 1871 1531) +4(1531 1871 1870 1530) +4(1191 1195 1870 1871) +4(819 1187 1872 1532) +4(1532 1872 1871 1531) +4(1187 1191 1871 1872) +4(1179 1187 1872 1821) +4(1821 1872 1532 1513) +4(1199 1200 1873 1869) +4(1869 1873 1675 1679) +4(1200 1001 1675 1873) +4(1195 1196 1874 1870) +4(1870 1874 1873 1869) +4(1196 1200 1873 1874) +4(1191 1192 1875 1871) +4(1871 1875 1874 1870) +4(1192 1196 1874 1875) +4(1187 1188 1876 1872) +4(1872 1876 1875 1871) +4(1188 1192 1875 1876) +4(1180 1188 1876 1822) +4(1822 1876 1872 1821) +4(1200 1201 1877 1873) +4(1873 1877 1671 1675) +4(1201 1000 1671 1877) +4(1196 1197 1878 1874) +4(1874 1878 1877 1873) +4(1197 1201 1877 1878) +4(1192 1193 1879 1875) +4(1875 1879 1878 1874) +4(1193 1197 1878 1879) +4(1188 1189 1880 1876) +4(1876 1880 1879 1875) +4(1189 1193 1879 1880) +4(1181 1189 1880 1823) +4(1823 1880 1876 1822) +4(1201 1202 1881 1877) +4(1877 1881 1667 1671) +4(1202 999 1667 1881) +4(1197 1198 1882 1878) +4(1878 1882 1881 1877) +4(1198 1202 1881 1882) +4(1193 1194 1883 1879) +4(1879 1883 1882 1878) +4(1194 1198 1882 1883) +4(1189 1190 1884 1880) +4(1880 1884 1883 1879) +4(1190 1194 1883 1884) +4(1182 1190 1884 1824) +4(1824 1884 1880 1823) +4(1202 1183 1853 1881) +4(1881 1853 1659 1667) +4(1183 998 1659 1853) +4(1198 1184 1857 1882) +4(1882 1857 1853 1881) +4(1184 1183 1853 1857) +4(1194 1185 1861 1883) +4(1883 1861 1857 1882) +4(1185 1184 1857 1861) +4(1190 1186 1865 1884) +4(1884 1865 1861 1883) +4(1186 1185 1861 1865) +4(1178 1186 1865 1813) +4(1813 1865 1884 1824) +4(1529 1869 1885 1525) +4(1525 1885 1680 1329) +4(1869 1679 1680 1885) +4(1530 1870 1886 1526) +4(1526 1886 1885 1525) +4(1870 1869 1885 1886) +4(1531 1871 1887 1527) +4(1527 1887 1886 1526) +4(1871 1870 1886 1887) +4(1532 1872 1888 1528) +4(1528 1888 1887 1527) +4(1872 1871 1887 1888) +4(1821 1872 1888 1825) +4(1825 1888 1528 1514) +4(1869 1873 1889 1885) +4(1885 1889 1676 1680) +4(1873 1675 1676 1889) +4(1870 1874 1890 1886) +4(1886 1890 1889 1885) +4(1874 1873 1889 1890) +4(1871 1875 1891 1887) +4(1887 1891 1890 1886) +4(1875 1874 1890 1891) +4(1872 1876 1892 1888) +4(1888 1892 1891 1887) +4(1876 1875 1891 1892) +4(1822 1876 1892 1826) +4(1826 1892 1888 1825) +4(1873 1877 1893 1889) +4(1889 1893 1672 1676) +4(1877 1671 1672 1893) +4(1874 1878 1894 1890) +4(1890 1894 1893 1889) +4(1878 1877 1893 1894) +4(1875 1879 1895 1891) +4(1891 1895 1894 1890) +4(1879 1878 1894 1895) +4(1876 1880 1896 1892) +4(1892 1896 1895 1891) +4(1880 1879 1895 1896) +4(1823 1880 1896 1827) +4(1827 1896 1892 1826) +4(1877 1881 1897 1893) +4(1893 1897 1668 1672) +4(1881 1667 1668 1897) +4(1878 1882 1898 1894) +4(1894 1898 1897 1893) +4(1882 1881 1897 1898) +4(1879 1883 1899 1895) +4(1895 1899 1898 1894) +4(1883 1882 1898 1899) +4(1880 1884 1900 1896) +4(1896 1900 1899 1895) +4(1884 1883 1899 1900) +4(1824 1884 1900 1828) +4(1828 1900 1896 1827) +4(1881 1853 1854 1897) +4(1897 1854 1660 1668) +4(1853 1659 1660 1854) +4(1882 1857 1858 1898) +4(1898 1858 1854 1897) +4(1857 1853 1854 1858) +4(1883 1861 1862 1899) +4(1899 1862 1858 1898) +4(1861 1857 1858 1862) +4(1884 1865 1866 1900) +4(1900 1866 1862 1899) +4(1865 1861 1862 1866) +4(1813 1865 1866 1814) +4(1814 1866 1900 1828) +4(1525 1885 1901 1521) +4(1521 1901 1681 1330) +4(1885 1680 1681 1901) +4(1526 1886 1902 1522) +4(1522 1902 1901 1521) +4(1886 1885 1901 1902) +4(1527 1887 1903 1523) +4(1523 1903 1902 1522) +4(1887 1886 1902 1903) +4(1528 1888 1904 1524) +4(1524 1904 1903 1523) +4(1888 1887 1903 1904) +4(1825 1888 1904 1829) +4(1829 1904 1524 1515) +4(1885 1889 1905 1901) +4(1901 1905 1677 1681) +4(1889 1676 1677 1905) +4(1886 1890 1906 1902) +4(1902 1906 1905 1901) +4(1890 1889 1905 1906) +4(1887 1891 1907 1903) +4(1903 1907 1906 1902) +4(1891 1890 1906 1907) +4(1888 1892 1908 1904) +4(1904 1908 1907 1903) +4(1892 1891 1907 1908) +4(1826 1892 1908 1830) +4(1830 1908 1904 1829) +4(1889 1893 1909 1905) +4(1905 1909 1673 1677) +4(1893 1672 1673 1909) +4(1890 1894 1910 1906) +4(1906 1910 1909 1905) +4(1894 1893 1909 1910) +4(1891 1895 1911 1907) +4(1907 1911 1910 1906) +4(1895 1894 1910 1911) +4(1892 1896 1912 1908) +4(1908 1912 1911 1907) +4(1896 1895 1911 1912) +4(1827 1896 1912 1831) +4(1831 1912 1908 1830) +4(1893 1897 1913 1909) +4(1909 1913 1669 1673) +4(1897 1668 1669 1913) +4(1894 1898 1914 1910) +4(1910 1914 1913 1909) +4(1898 1897 1913 1914) +4(1895 1899 1915 1911) +4(1911 1915 1914 1910) +4(1899 1898 1914 1915) +4(1896 1900 1916 1912) +4(1912 1916 1915 1911) +4(1900 1899 1915 1916) +4(1828 1900 1916 1832) +4(1832 1916 1912 1831) +4(1897 1854 1855 1913) +4(1913 1855 1661 1669) +4(1854 1660 1661 1855) +4(1898 1858 1859 1914) +4(1914 1859 1855 1913) +4(1858 1854 1855 1859) +4(1899 1862 1863 1915) +4(1915 1863 1859 1914) +4(1862 1858 1859 1863) +4(1900 1866 1867 1916) +4(1916 1867 1863 1915) +4(1866 1862 1863 1867) +4(1814 1866 1867 1815) +4(1815 1867 1916 1832) +4(1521 1901 1917 1517) +4(1517 1917 1682 1331) +4(1901 1681 1682 1917) +4(1522 1902 1918 1518) +4(1518 1918 1917 1517) +4(1902 1901 1917 1918) +4(1523 1903 1919 1519) +4(1519 1919 1918 1518) +4(1903 1902 1918 1919) +4(1524 1904 1920 1520) +4(1520 1920 1919 1519) +4(1904 1903 1919 1920) +4(1829 1904 1920 1833) +4(1833 1920 1520 1516) +4(1901 1905 1921 1917) +4(1917 1921 1678 1682) +4(1905 1677 1678 1921) +4(1902 1906 1922 1918) +4(1918 1922 1921 1917) +4(1906 1905 1921 1922) +4(1903 1907 1923 1919) +4(1919 1923 1922 1918) +4(1907 1906 1922 1923) +4(1904 1908 1924 1920) +4(1920 1924 1923 1919) +4(1908 1907 1923 1924) +4(1830 1908 1924 1834) +4(1834 1924 1920 1833) +4(1905 1909 1925 1921) +4(1921 1925 1674 1678) +4(1909 1673 1674 1925) +4(1906 1910 1926 1922) +4(1922 1926 1925 1921) +4(1910 1909 1925 1926) +4(1907 1911 1927 1923) +4(1923 1927 1926 1922) +4(1911 1910 1926 1927) +4(1908 1912 1928 1924) +4(1924 1928 1927 1923) +4(1912 1911 1927 1928) +4(1831 1912 1928 1835) +4(1835 1928 1924 1834) +4(1909 1913 1929 1925) +4(1925 1929 1670 1674) +4(1913 1669 1670 1929) +4(1910 1914 1930 1926) +4(1926 1930 1929 1925) +4(1914 1913 1929 1930) +4(1911 1915 1931 1927) +4(1927 1931 1930 1926) +4(1915 1914 1930 1931) +4(1912 1916 1932 1928) +4(1928 1932 1931 1927) +4(1916 1915 1931 1932) +4(1832 1916 1932 1836) +4(1836 1932 1928 1835) +4(1913 1855 1856 1929) +4(1929 1856 1662 1670) +4(1855 1661 1662 1856) +4(1914 1859 1860 1930) +4(1930 1860 1856 1929) +4(1859 1855 1856 1860) +4(1915 1863 1864 1931) +4(1931 1864 1860 1930) +4(1863 1859 1860 1864) +4(1916 1867 1868 1932) +4(1932 1868 1864 1931) +4(1867 1863 1864 1868) +4(1815 1867 1868 1816) +4(1816 1868 1932 1836) +4(1517 1917 1837 1509) +4(1917 1682 1663 1837) +4(1518 1918 1841 1510) +4(1918 1917 1837 1841) +4(1519 1919 1845 1511) +4(1919 1918 1841 1845) +4(1520 1920 1849 1512) +4(1920 1919 1845 1849) +4(1833 1920 1849 1809) +4(1917 1921 1838 1837) +4(1921 1678 1664 1838) +4(1918 1922 1842 1841) +4(1922 1921 1838 1842) +4(1919 1923 1846 1845) +4(1923 1922 1842 1846) +4(1920 1924 1850 1849) +4(1924 1923 1846 1850) +4(1834 1924 1850 1810) +4(1921 1925 1839 1838) +4(1925 1674 1665 1839) +4(1922 1926 1843 1842) +4(1926 1925 1839 1843) +4(1923 1927 1847 1846) +4(1927 1926 1843 1847) +4(1924 1928 1851 1850) +4(1928 1927 1847 1851) +4(1835 1928 1851 1811) +4(1925 1929 1840 1839) +4(1929 1670 1666 1840) +4(1926 1930 1844 1843) +4(1930 1929 1840 1844) +4(1927 1931 1848 1847) +4(1931 1930 1844 1848) +4(1928 1932 1852 1851) +4(1932 1931 1848 1852) +4(1836 1932 1852 1812) +4(1929 1856 1817 1840) +4(1856 1662 1658 1817) +4(1930 1860 1818 1844) +4(1860 1856 1817 1818) +4(1931 1864 1819 1848) +4(1864 1860 1818 1819) +4(1932 1868 1820 1852) +4(1868 1864 1819 1820) +4(1816 1868 1820 1808) +4(113 322 1853 1183) +4(322 21 1659 1853) +4(112 318 1857 1184) +4(318 322 1853 1857) +4(111 314 1861 1185) +4(314 318 1857 1861) +4(110 310 1865 1186) +4(310 314 1861 1865) +4(306 310 1865 1813) +4(322 323 1854 1853) +4(323 22 1660 1854) +4(318 319 1858 1857) +4(319 323 1854 1858) +4(314 315 1862 1861) +4(315 319 1858 1862) +4(310 311 1866 1865) +4(311 315 1862 1866) +4(307 311 1866 1814) +4(323 324 1855 1854) +4(324 23 1661 1855) +4(319 320 1859 1858) +4(320 324 1855 1859) +4(315 316 1863 1862) +4(316 320 1859 1863) +4(311 312 1867 1866) +4(312 316 1863 1867) +4(308 312 1867 1815) +4(324 325 1856 1855) +4(325 24 1662 1856) +4(320 321 1860 1859) +4(321 325 1856 1860) +4(316 317 1864 1863) +4(317 321 1860 1864) +4(312 313 1868 1867) +4(313 317 1864 1868) +4(309 313 1868 1816) +4(325 298 1817 1856) +4(321 299 1818 1860) +4(317 300 1819 1864) +4(313 301 1820 1868) +4(82 81 371 367) +4(81 80 375 371) +4(80 79 379 375) +4(79 78 383 379) +4(78 1 20 383) +4(367 371 372 368) +4(371 375 376 372) +4(375 379 380 376) +4(379 383 384 380) +4(383 20 19 384) +4(368 372 373 369) +4(372 376 377 373) +4(376 380 381 377) +4(380 384 385 381) +4(384 19 18 385) +4(369 373 374 370) +4(373 377 378 374) +4(377 381 382 378) +4(381 385 386 382) +4(385 18 17 386) +4(370 374 362 358) +4(374 378 361 362) +4(378 382 360 361) +4(382 386 359 360) +4(386 17 16 359) +4(16 15 387 359) +4(15 14 391 387) +4(14 13 395 391) +4(13 12 399 395) +4(12 2 87 399) +4(359 387 388 360) +4(387 391 392 388) +4(391 395 396 392) +4(395 399 400 396) +4(399 87 88 400) +4(360 388 389 361) +4(388 392 393 389) +4(392 396 397 393) +4(396 400 401 397) +4(400 88 89 401) +4(361 389 390 362) +4(389 393 394 390) +4(393 397 398 394) +4(397 401 402 398) +4(401 89 90 402) +4(362 390 366 358) +4(390 394 365 366) +4(394 398 364 365) +4(398 402 363 364) +4(402 90 91 363) +4(91 92 403 363) +4(92 93 407 403) +4(93 94 411 407) +4(94 95 415 411) +4(95 68 86 415) +4(363 403 404 364) +4(403 407 408 404) +4(407 411 412 408) +4(411 415 416 412) +4(415 86 85 416) +4(364 404 405 365) +4(404 408 409 405) +4(408 412 413 409) +4(412 416 417 413) +4(416 85 84 417) +4(365 405 406 366) +4(405 409 410 406) +4(409 413 414 410) +4(413 417 418 414) +4(417 84 83 418) +4(366 406 370 358) +4(406 410 369 370) +4(410 414 368 369) +4(414 418 367 368) +4(418 83 82 367) +4(16 17 127 123) +4(17 18 131 127) +4(18 19 135 131) +4(19 20 139 135) +4(20 1 29 139) +4(123 127 128 124) +4(127 131 132 128) +4(131 135 136 132) +4(135 139 140 136) +4(139 29 28 140) +4(124 128 129 125) +4(128 132 133 129) +4(132 136 137 133) +4(136 140 141 137) +4(140 28 27 141) +4(125 129 130 126) +4(129 133 134 130) +4(133 137 138 134) +4(137 141 142 138) +4(141 27 26 142) +4(126 130 118 114) +4(130 134 117 118) +4(134 138 116 117) +4(138 142 115 116) +4(142 26 25 115) +4(25 24 143 115) +4(24 23 147 143) +4(23 22 151 147) +4(22 21 155 151) +4(21 0 3 155) +4(115 143 144 116) +4(143 147 148 144) +4(147 151 152 148) +4(151 155 156 152) +4(155 3 4 156) +4(116 144 145 117) +4(144 148 149 145) +4(148 152 153 149) +4(152 156 157 153) +4(156 4 5 157) +4(117 145 146 118) +4(145 149 150 146) +4(149 153 154 150) +4(153 157 158 154) +4(157 5 6 158) +4(118 146 122 114) +4(146 150 121 122) +4(150 154 120 121) +4(154 158 119 120) +4(158 6 7 119) +4(7 8 159 119) +4(8 9 163 159) +4(9 10 167 163) +4(10 11 171 167) +4(11 2 12 171) +4(119 159 160 120) +4(159 163 164 160) +4(163 167 168 164) +4(167 171 172 168) +4(171 12 13 172) +4(120 160 161 121) +4(160 164 165 161) +4(164 168 169 165) +4(168 172 173 169) +4(172 13 14 173) +4(121 161 162 122) +4(161 165 166 162) +4(165 169 170 166) +4(169 173 174 170) +4(173 14 15 174) +4(122 162 126 114) +4(162 166 125 126) +4(166 170 124 125) +4(170 174 123 124) +4(174 15 16 123) +4(109 110 310 306) +4(110 111 314 310) +4(111 112 318 314) +4(112 113 322 318) +4(113 0 21 322) +4(306 310 311 307) +4(310 314 315 311) +4(314 318 319 315) +4(318 322 323 319) +4(322 21 22 323) +4(307 311 312 308) +4(311 315 316 312) +4(315 319 320 316) +4(319 323 324 320) +4(323 22 23 324) +4(308 312 313 309) +4(312 316 317 313) +4(316 320 321 317) +4(320 324 325 321) +4(324 23 24 325) +4(309 313 301 297) +4(313 317 300 301) +4(317 321 299 300) +4(321 325 298 299) +4(325 24 25 298) +4(25 26 326 298) +4(26 27 330 326) +4(27 28 334 330) +4(28 29 338 334) +4(29 1 50 338) +4(298 326 327 299) +4(326 330 331 327) +4(330 334 335 331) +4(334 338 339 335) +4(338 50 51 339) +4(299 327 328 300) +4(327 331 332 328) +4(331 335 336 332) +4(335 339 340 336) +4(339 51 52 340) +4(300 328 329 301) +4(328 332 333 329) +4(332 336 337 333) +4(336 340 341 337) +4(340 52 53 341) +4(301 329 305 297) +4(329 333 304 305) +4(333 337 303 304) +4(337 341 302 303) +4(341 53 54 302) +4(54 55 342 302) +4(55 56 346 342) +4(56 57 350 346) +4(57 58 354 350) +4(58 40 105 354) +4(302 342 343 303) +4(342 346 347 343) +4(346 350 351 347) +4(350 354 355 351) +4(354 105 106 355) +4(303 343 344 304) +4(343 347 348 344) +4(347 351 352 348) +4(351 355 356 352) +4(355 106 107 356) +4(304 344 345 305) +4(344 348 349 345) +4(348 352 353 349) +4(352 356 357 353) +4(356 107 108 357) +4(305 345 309 297) +4(345 349 308 309) +4(349 353 307 308) +4(353 357 306 307) +4(357 108 109 306) +4(100 101 432 428) +4(101 102 436 432) +4(102 103 440 436) +4(103 104 444 440) +4(104 40 58 444) +4(428 432 433 429) +4(432 436 437 433) +4(436 440 441 437) +4(440 444 445 441) +4(444 58 57 445) +4(429 433 434 430) +4(433 437 438 434) +4(437 441 442 438) +4(441 445 446 442) +4(445 57 56 446) +4(430 434 435 431) +4(434 438 439 435) +4(438 442 443 439) +4(442 446 447 443) +4(446 56 55 447) +4(431 435 423 419) +4(435 439 422 423) +4(439 443 421 422) +4(443 447 420 421) +4(447 55 54 420) +4(54 53 448 420) +4(53 52 452 448) +4(52 51 456 452) +4(51 50 460 456) +4(50 1 78 460) +4(420 448 449 421) +4(448 452 453 449) +4(452 456 457 453) +4(456 460 461 457) +4(460 78 79 461) +4(421 449 450 422) +4(449 453 454 450) +4(453 457 458 454) +4(457 461 462 458) +4(461 79 80 462) +4(422 450 451 423) +4(450 454 455 451) +4(454 458 459 455) +4(458 462 463 459) +4(462 80 81 463) +4(423 451 427 419) +4(451 455 426 427) +4(455 459 425 426) +4(459 463 424 425) +4(463 81 82 424) +4(82 83 464 424) +4(83 84 468 464) +4(84 85 472 468) +4(85 86 476 472) +4(86 68 96 476) +4(424 464 465 425) +4(464 468 469 465) +4(468 472 473 469) +4(472 476 477 473) +4(476 96 97 477) +4(425 465 466 426) +4(465 469 470 466) +4(469 473 474 470) +4(473 477 478 474) +4(477 97 98 478) +4(426 466 467 427) +4(466 470 471 467) +4(470 474 475 471) +4(474 478 479 475) +4(478 98 99 479) +4(427 467 431 419) +4(467 471 430 431) +4(471 475 429 430) +4(475 479 428 429) +4(479 99 100 428) +4(63 64 249 245) +4(64 65 253 249) +4(65 66 257 253) +4(66 67 261 257) +4(67 0 113 261) +4(245 249 250 246) +4(249 253 254 250) +4(253 257 258 254) +4(257 261 262 258) +4(261 113 112 262) +4(246 250 251 247) +4(250 254 255 251) +4(254 258 259 255) +4(258 262 263 259) +4(262 112 111 263) +4(247 251 252 248) +4(251 255 256 252) +4(255 259 260 256) +4(259 263 264 260) +4(263 111 110 264) +4(248 252 240 236) +4(252 256 239 240) +4(256 260 238 239) +4(260 264 237 238) +4(264 110 109 237) +4(109 108 265 237) +4(108 107 269 265) +4(107 106 273 269) +4(106 105 277 273) +4(105 40 41 277) +4(237 265 266 238) +4(265 269 270 266) +4(269 273 274 270) +4(273 277 278 274) +4(277 41 42 278) +4(238 266 267 239) +4(266 270 271 267) +4(270 274 275 271) +4(274 278 279 275) +4(278 42 43 279) +4(239 267 268 240) +4(267 271 272 268) +4(271 275 276 272) +4(275 279 280 276) +4(279 43 44 280) +4(240 268 244 236) +4(268 272 243 244) +4(272 276 242 243) +4(276 280 241 242) +4(280 44 45 241) +4(45 46 281 241) +4(46 47 285 281) +4(47 48 289 285) +4(48 49 293 289) +4(49 30 59 293) +4(241 281 282 242) +4(281 285 286 282) +4(285 289 290 286) +4(289 293 294 290) +4(293 59 60 294) +4(242 282 283 243) +4(282 286 287 283) +4(286 290 291 287) +4(290 294 295 291) +4(294 60 61 295) +4(243 283 284 244) +4(283 287 288 284) +4(287 291 292 288) +4(291 295 296 292) +4(295 61 62 296) +4(244 284 248 236) +4(284 288 247 248) +4(288 292 246 247) +4(292 296 245 246) +4(296 62 63 245) +4(45 44 493 489) +4(44 43 497 493) +4(43 42 501 497) +4(42 41 505 501) +4(41 40 104 505) +4(489 493 494 490) +4(493 497 498 494) +4(497 501 502 498) +4(501 505 506 502) +4(505 104 103 506) +4(490 494 495 491) +4(494 498 499 495) +4(498 502 503 499) +4(502 506 507 503) +4(506 103 102 507) +4(491 495 496 492) +4(495 499 500 496) +4(499 503 504 500) +4(503 507 508 504) +4(507 102 101 508) +4(492 496 484 480) +4(496 500 483 484) +4(500 504 482 483) +4(504 508 481 482) +4(508 101 100 481) +4(100 99 509 481) +4(99 98 513 509) +4(98 97 517 513) +4(97 96 521 517) +4(96 68 69 521) +4(481 509 510 482) +4(509 513 514 510) +4(513 517 518 514) +4(517 521 522 518) +4(521 69 70 522) +4(482 510 511 483) +4(510 514 515 511) +4(514 518 519 515) +4(518 522 523 519) +4(522 70 71 523) +4(483 511 512 484) +4(511 515 516 512) +4(515 519 520 516) +4(519 523 524 520) +4(523 71 72 524) +4(484 512 488 480) +4(512 516 487 488) +4(516 520 486 487) +4(520 524 485 486) +4(524 72 73 485) +4(73 74 525 485) +4(74 75 529 525) +4(75 76 533 529) +4(76 77 537 533) +4(77 30 49 537) +4(485 525 526 486) +4(525 529 530 526) +4(529 533 534 530) +4(533 537 538 534) +4(537 49 48 538) +4(486 526 527 487) +4(526 530 531 527) +4(530 534 535 531) +4(534 538 539 535) +4(538 48 47 539) +4(487 527 528 488) +4(527 531 532 528) +4(531 535 536 532) +4(535 539 540 536) +4(539 47 46 540) +4(488 528 492 480) +4(528 532 491 492) +4(532 536 490 491) +4(536 540 489 490) +4(540 46 45 489) +4(35 36 188 184) +4(36 37 192 188) +4(37 38 196 192) +4(38 39 200 196) +4(39 2 11 200) +4(184 188 189 185) +4(188 192 193 189) +4(192 196 197 193) +4(196 200 201 197) +4(200 11 10 201) +4(185 189 190 186) +4(189 193 194 190) +4(193 197 198 194) +4(197 201 202 198) +4(201 10 9 202) +4(186 190 191 187) +4(190 194 195 191) +4(194 198 199 195) +4(198 202 203 199) +4(202 9 8 203) +4(187 191 179 175) +4(191 195 178 179) +4(195 199 177 178) +4(199 203 176 177) +4(203 8 7 176) +4(7 6 204 176) +4(6 5 208 204) +4(5 4 212 208) +4(4 3 216 212) +4(3 0 67 216) +4(176 204 205 177) +4(204 208 209 205) +4(208 212 213 209) +4(212 216 217 213) +4(216 67 66 217) +4(177 205 206 178) +4(205 209 210 206) +4(209 213 214 210) +4(213 217 218 214) +4(217 66 65 218) +4(178 206 207 179) +4(206 210 211 207) +4(210 214 215 211) +4(214 218 219 215) +4(218 65 64 219) +4(179 207 183 175) +4(207 211 182 183) +4(211 215 181 182) +4(215 219 180 181) +4(219 64 63 180) +4(63 62 220 180) +4(62 61 224 220) +4(61 60 228 224) +4(60 59 232 228) +4(59 30 31 232) +4(180 220 221 181) +4(220 224 225 221) +4(224 228 229 225) +4(228 232 233 229) +4(232 31 32 233) +4(181 221 222 182) +4(221 225 226 222) +4(225 229 230 226) +4(229 233 234 230) +4(233 32 33 234) +4(182 222 223 183) +4(222 226 227 223) +4(226 230 231 227) +4(230 234 235 231) +4(234 33 34 235) +4(183 223 187 175) +4(223 227 186 187) +4(227 231 185 186) +4(231 235 184 185) +4(235 34 35 184) +4(73 72 554 550) +4(72 71 558 554) +4(71 70 562 558) +4(70 69 566 562) +4(69 68 95 566) +4(550 554 555 551) +4(554 558 559 555) +4(558 562 563 559) +4(562 566 567 563) +4(566 95 94 567) +4(551 555 556 552) +4(555 559 560 556) +4(559 563 564 560) +4(563 567 568 564) +4(567 94 93 568) +4(552 556 557 553) +4(556 560 561 557) +4(560 564 565 561) +4(564 568 569 565) +4(568 93 92 569) +4(553 557 545 541) +4(557 561 544 545) +4(561 565 543 544) +4(565 569 542 543) +4(569 92 91 542) +4(91 90 570 542) +4(90 89 574 570) +4(89 88 578 574) +4(88 87 582 578) +4(87 2 39 582) +4(542 570 571 543) +4(570 574 575 571) +4(574 578 579 575) +4(578 582 583 579) +4(582 39 38 583) +4(543 571 572 544) +4(571 575 576 572) +4(575 579 580 576) +4(579 583 584 580) +4(583 38 37 584) +4(544 572 573 545) +4(572 576 577 573) +4(576 580 581 577) +4(580 584 585 581) +4(584 37 36 585) +4(545 573 549 541) +4(573 577 548 549) +4(577 581 547 548) +4(581 585 546 547) +4(585 36 35 546) +4(35 34 586 546) +4(34 33 590 586) +4(33 32 594 590) +4(32 31 598 594) +4(31 30 77 598) +4(546 586 587 547) +4(586 590 591 587) +4(590 594 595 591) +4(594 598 599 595) +4(598 77 76 599) +4(547 587 588 548) +4(587 591 592 588) +4(591 595 596 592) +4(595 599 600 596) +4(599 76 75 600) +4(548 588 589 549) +4(588 592 593 589) +4(592 596 597 593) +4(596 600 601 597) +4(600 75 74 601) +4(549 589 553 541) +4(589 593 552 553) +4(593 597 551 552) +4(597 601 550 551) +4(601 74 73 550) +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/constant/polyMesh/neighbour b/tutorials/finiteArea/sphereTransport/constant/polyMesh/neighbour new file mode 100644 index 0000000000000000000000000000000000000000..a2ef5d5cd76509a145846ac5f5a3643691a7dc74 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/polyMesh/neighbour @@ -0,0 +1,5123 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class labelList; + location "constant/polyMesh"; + object neighbour; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5100 +( +800 +5 +29 +1 +400 +805 +6 +54 +2 +810 +7 +79 +3 +815 +8 +104 +4 +820 +9 +129 +179 +401 +6 +10 +34 +59 +11 +7 +84 +12 +8 +109 +13 +9 +134 +14 +184 +402 +11 +15 +39 +64 +16 +12 +89 +17 +13 +114 +18 +14 +139 +19 +189 +403 +16 +20 +44 +69 +21 +17 +94 +22 +18 +119 +23 +19 +144 +24 +194 +404 +21 +154 +49 +74 +159 +22 +99 +164 +23 +124 +169 +24 +149 +174 +199 +825 +30 +50 +425 +26 +250 +826 +31 +51 +426 +27 +827 +32 +52 +427 +28 +828 +33 +53 +428 +29 +829 +34 +54 +429 +450 +55 +31 +275 +35 +451 +56 +32 +36 +452 +57 +33 +37 +453 +58 +34 +38 +454 +59 +39 +475 +60 +36 +300 +40 +476 +61 +37 +41 +477 +62 +38 +42 +478 +63 +39 +43 +479 +64 +44 +500 +65 +41 +325 +45 +501 +66 +42 +46 +502 +67 +43 +47 +503 +68 +44 +48 +504 +69 +49 +525 +70 +46 +350 +150 +526 +71 +47 +151 +527 +72 +48 +152 +528 +73 +49 +153 +529 +74 +154 +830 +55 +75 +51 +255 +831 +56 +76 +52 +832 +57 +77 +53 +833 +58 +78 +54 +834 +59 +79 +280 +56 +60 +80 +57 +81 +61 +58 +82 +62 +59 +83 +63 +64 +84 +305 +61 +65 +85 +62 +86 +66 +63 +87 +67 +64 +88 +68 +69 +89 +330 +66 +70 +90 +67 +91 +71 +68 +92 +72 +69 +93 +73 +74 +94 +355 +71 +155 +95 +72 +96 +156 +73 +97 +157 +74 +98 +158 +159 +99 +835 +80 +100 +76 +260 +836 +81 +101 +77 +837 +82 +102 +78 +838 +83 +103 +79 +839 +84 +104 +285 +81 +85 +105 +82 +106 +86 +83 +107 +87 +84 +108 +88 +89 +109 +310 +86 +90 +110 +87 +111 +91 +88 +112 +92 +89 +113 +93 +94 +114 +335 +91 +95 +115 +92 +116 +96 +93 +117 +97 +94 +118 +98 +99 +119 +360 +96 +160 +120 +97 +121 +161 +98 +122 +162 +99 +123 +163 +164 +124 +840 +105 +125 +101 +265 +841 +106 +126 +102 +842 +107 +127 +103 +843 +108 +128 +104 +844 +109 +129 +290 +106 +110 +130 +107 +131 +111 +108 +132 +112 +109 +133 +113 +114 +134 +315 +111 +115 +135 +112 +136 +116 +113 +137 +117 +114 +138 +118 +119 +139 +340 +116 +120 +140 +117 +141 +121 +118 +142 +122 +119 +143 +123 +124 +144 +365 +121 +165 +145 +122 +146 +166 +123 +147 +167 +124 +148 +168 +169 +149 +845 +130 +175 +126 +270 +846 +131 +176 +127 +847 +132 +177 +128 +848 +133 +178 +129 +849 +134 +179 +295 +131 +135 +180 +132 +181 +136 +133 +182 +137 +134 +183 +138 +139 +184 +320 +136 +140 +185 +137 +186 +141 +138 +187 +142 +139 +188 +143 +144 +189 +345 +141 +145 +190 +142 +191 +146 +143 +192 +147 +144 +193 +148 +149 +194 +370 +146 +170 +195 +147 +196 +171 +148 +197 +172 +149 +198 +173 +174 +199 +575 +155 +151 +225 +576 +156 +152 +577 +157 +153 +578 +158 +154 +579 +159 +230 +156 +160 +157 +161 +158 +162 +159 +163 +164 +235 +161 +165 +162 +166 +163 +167 +164 +168 +169 +240 +166 +170 +167 +171 +168 +172 +169 +173 +174 +245 +171 +195 +172 +196 +173 +197 +174 +198 +199 +950 +180 +176 +375 +951 +181 +177 +952 +182 +178 +953 +183 +179 +954 +184 +380 +181 +185 +182 +186 +183 +187 +184 +188 +189 +385 +186 +190 +187 +191 +188 +192 +189 +193 +194 +390 +191 +195 +192 +196 +193 +197 +194 +198 +199 +395 +196 +197 +198 +199 +1000 +201 +205 +600 +254 +605 +206 +279 +202 +610 +207 +304 +203 +615 +208 +329 +204 +620 +209 +354 +229 +1001 +206 +210 +259 +207 +284 +211 +208 +309 +212 +209 +334 +213 +234 +359 +214 +1002 +211 +215 +264 +212 +289 +216 +213 +314 +217 +214 +339 +218 +239 +364 +219 +1003 +216 +220 +269 +217 +294 +221 +218 +319 +222 +219 +344 +223 +244 +369 +224 +1004 +221 +379 +274 +222 +299 +384 +223 +324 +389 +224 +349 +394 +249 +374 +399 +775 +230 +226 +350 +776 +231 +227 +351 +777 +232 +228 +352 +778 +233 +229 +353 +779 +234 +354 +231 +235 +355 +232 +236 +356 +233 +237 +357 +234 +238 +358 +359 +239 +236 +240 +360 +237 +241 +361 +238 +242 +362 +239 +243 +363 +364 +244 +241 +245 +365 +242 +246 +366 +243 +247 +367 +244 +248 +368 +369 +249 +246 +395 +370 +247 +396 +371 +248 +397 +372 +249 +398 +373 +374 +399 +1050 +275 +251 +255 +650 +1051 +276 +252 +256 +651 +1052 +277 +253 +257 +652 +1053 +278 +254 +258 +653 +1054 +279 +259 +654 +1075 +280 +256 +260 +1076 +281 +257 +261 +1077 +282 +258 +262 +1078 +283 +259 +263 +1079 +284 +264 +1100 +285 +261 +265 +1101 +286 +262 +266 +1102 +287 +263 +267 +1103 +288 +264 +268 +1104 +289 +269 +1125 +290 +266 +270 +1126 +291 +267 +271 +1127 +292 +268 +272 +1128 +293 +269 +273 +1129 +294 +274 +1150 +295 +271 +375 +1151 +296 +272 +376 +1152 +297 +273 +377 +1153 +298 +274 +378 +1154 +299 +379 +655 +280 +300 +276 +656 +281 +301 +277 +657 +282 +302 +278 +658 +283 +303 +279 +659 +284 +304 +281 +305 +285 +282 +306 +286 +283 +307 +287 +284 +308 +288 +289 +309 +286 +310 +290 +287 +311 +291 +288 +312 +292 +289 +313 +293 +294 +314 +291 +315 +295 +292 +316 +296 +293 +317 +297 +294 +318 +298 +299 +319 +296 +320 +380 +297 +321 +381 +298 +322 +382 +299 +323 +383 +384 +324 +660 +305 +325 +301 +661 +306 +326 +302 +662 +307 +327 +303 +663 +308 +328 +304 +664 +309 +329 +306 +330 +310 +307 +331 +311 +308 +332 +312 +309 +333 +313 +314 +334 +311 +335 +315 +312 +336 +316 +313 +337 +317 +314 +338 +318 +319 +339 +316 +340 +320 +317 +341 +321 +318 +342 +322 +319 +343 +323 +324 +344 +321 +345 +385 +322 +346 +386 +323 +347 +387 +324 +348 +388 +389 +349 +665 +330 +350 +326 +666 +331 +351 +327 +667 +332 +352 +328 +668 +333 +353 +329 +669 +334 +354 +331 +355 +335 +332 +356 +336 +333 +357 +337 +334 +358 +338 +339 +359 +336 +360 +340 +337 +361 +341 +338 +362 +342 +339 +363 +343 +344 +364 +341 +365 +345 +342 +366 +346 +343 +367 +347 +344 +368 +348 +349 +369 +346 +370 +390 +347 +371 +391 +348 +372 +392 +349 +373 +393 +394 +374 +670 +355 +351 +671 +356 +352 +672 +357 +353 +673 +358 +354 +674 +359 +356 +360 +357 +361 +358 +362 +359 +363 +364 +361 +365 +362 +366 +363 +367 +364 +368 +369 +366 +370 +367 +371 +368 +372 +369 +373 +374 +371 +395 +372 +396 +373 +397 +374 +398 +399 +1025 +380 +376 +1026 +381 +377 +1027 +382 +378 +1028 +383 +379 +1029 +384 +381 +385 +382 +386 +383 +387 +384 +388 +389 +386 +390 +387 +391 +388 +392 +389 +393 +394 +391 +395 +392 +396 +393 +397 +394 +398 +399 +396 +397 +398 +399 +1200 +401 +405 +429 +454 +406 +402 +479 +407 +403 +504 +408 +404 +529 +409 +579 +1201 +406 +410 +434 +459 +411 +407 +484 +412 +408 +509 +413 +409 +534 +414 +584 +1202 +411 +415 +439 +464 +416 +412 +489 +417 +413 +514 +418 +414 +539 +419 +589 +1203 +416 +420 +444 +469 +421 +417 +494 +422 +418 +519 +423 +419 +544 +424 +594 +1204 +421 +554 +449 +474 +559 +422 +499 +564 +423 +524 +569 +424 +549 +574 +599 +1225 +450 +426 +650 +430 +1226 +451 +427 +431 +1227 +452 +428 +432 +1228 +453 +429 +433 +1229 +454 +434 +1250 +455 +431 +675 +435 +1251 +456 +432 +436 +1252 +457 +433 +437 +1253 +458 +434 +438 +1254 +459 +439 +1275 +460 +436 +700 +440 +1276 +461 +437 +441 +1277 +462 +438 +442 +1278 +463 +439 +443 +1279 +464 +444 +1300 +465 +441 +725 +445 +1301 +466 +442 +446 +1302 +467 +443 +447 +1303 +468 +444 +448 +1304 +469 +449 +1325 +470 +446 +750 +550 +1326 +471 +447 +551 +1327 +472 +448 +552 +1328 +473 +449 +553 +1329 +474 +554 +655 +451 +455 +475 +452 +476 +456 +453 +477 +457 +454 +478 +458 +459 +479 +680 +456 +460 +480 +457 +481 +461 +458 +482 +462 +459 +483 +463 +464 +484 +705 +461 +465 +485 +462 +486 +466 +463 +487 +467 +464 +488 +468 +469 +489 +730 +466 +470 +490 +467 +491 +471 +468 +492 +472 +469 +493 +473 +474 +494 +755 +471 +555 +495 +472 +496 +556 +473 +497 +557 +474 +498 +558 +559 +499 +660 +476 +480 +500 +477 +501 +481 +478 +502 +482 +479 +503 +483 +484 +504 +685 +481 +485 +505 +482 +506 +486 +483 +507 +487 +484 +508 +488 +489 +509 +710 +486 +490 +510 +487 +511 +491 +488 +512 +492 +489 +513 +493 +494 +514 +735 +491 +495 +515 +492 +516 +496 +493 +517 +497 +494 +518 +498 +499 +519 +760 +496 +560 +520 +497 +521 +561 +498 +522 +562 +499 +523 +563 +564 +524 +665 +501 +505 +525 +502 +526 +506 +503 +527 +507 +504 +528 +508 +509 +529 +690 +506 +510 +530 +507 +531 +511 +508 +532 +512 +509 +533 +513 +514 +534 +715 +511 +515 +535 +512 +536 +516 +513 +537 +517 +514 +538 +518 +519 +539 +740 +516 +520 +540 +517 +541 +521 +518 +542 +522 +519 +543 +523 +524 +544 +765 +521 +565 +545 +522 +546 +566 +523 +547 +567 +524 +548 +568 +569 +549 +670 +526 +530 +575 +527 +576 +531 +528 +577 +532 +529 +578 +533 +534 +579 +695 +531 +535 +580 +532 +581 +536 +533 +582 +537 +534 +583 +538 +539 +584 +720 +536 +540 +585 +537 +586 +541 +538 +587 +542 +539 +588 +543 +544 +589 +745 +541 +545 +590 +542 +591 +546 +543 +592 +547 +544 +593 +548 +549 +594 +770 +546 +570 +595 +547 +596 +571 +548 +597 +572 +549 +598 +573 +574 +599 +1375 +555 +551 +625 +1376 +556 +552 +1377 +557 +553 +1378 +558 +554 +1379 +559 +630 +556 +560 +557 +561 +558 +562 +559 +563 +564 +635 +561 +565 +562 +566 +563 +567 +564 +568 +569 +640 +566 +570 +567 +571 +568 +572 +569 +573 +574 +645 +571 +595 +572 +596 +573 +597 +574 +598 +599 +775 +576 +580 +577 +581 +578 +582 +579 +583 +584 +780 +581 +585 +582 +586 +583 +587 +584 +588 +589 +785 +586 +590 +587 +591 +588 +592 +589 +593 +594 +790 +591 +595 +592 +596 +593 +597 +594 +598 +599 +795 +596 +597 +598 +599 +1400 +605 +654 +601 +1405 +606 +679 +602 +1410 +607 +704 +603 +1415 +608 +729 +604 +1420 +609 +754 +629 +606 +659 +610 +607 +684 +611 +608 +709 +612 +609 +734 +613 +634 +759 +614 +611 +664 +615 +612 +689 +616 +613 +714 +617 +614 +739 +618 +639 +764 +619 +616 +669 +620 +617 +694 +621 +618 +719 +622 +619 +744 +623 +644 +769 +624 +621 +674 +779 +622 +699 +784 +623 +724 +789 +624 +749 +794 +649 +774 +799 +1575 +630 +626 +750 +1576 +631 +627 +751 +1577 +632 +628 +752 +1578 +633 +629 +753 +1579 +634 +754 +631 +635 +755 +632 +636 +756 +633 +637 +757 +634 +638 +758 +759 +639 +636 +640 +760 +637 +641 +761 +638 +642 +762 +639 +643 +763 +764 +644 +641 +645 +765 +642 +646 +766 +643 +647 +767 +644 +648 +768 +769 +649 +646 +795 +770 +647 +796 +771 +648 +797 +772 +649 +798 +773 +774 +799 +1450 +655 +675 +651 +1451 +656 +676 +652 +1452 +657 +677 +653 +1453 +658 +678 +654 +1454 +659 +679 +656 +680 +660 +657 +681 +661 +658 +682 +662 +659 +683 +663 +664 +684 +661 +685 +665 +662 +686 +666 +663 +687 +667 +664 +688 +668 +669 +689 +666 +690 +670 +667 +691 +671 +668 +692 +672 +669 +693 +673 +674 +694 +671 +695 +775 +672 +696 +776 +673 +697 +777 +674 +698 +778 +779 +699 +1455 +680 +700 +676 +1456 +681 +701 +677 +1457 +682 +702 +678 +1458 +683 +703 +679 +1459 +684 +704 +681 +705 +685 +682 +706 +686 +683 +707 +687 +684 +708 +688 +689 +709 +686 +710 +690 +687 +711 +691 +688 +712 +692 +689 +713 +693 +694 +714 +691 +715 +695 +692 +716 +696 +693 +717 +697 +694 +718 +698 +699 +719 +696 +720 +780 +697 +721 +781 +698 +722 +782 +699 +723 +783 +784 +724 +1460 +705 +725 +701 +1461 +706 +726 +702 +1462 +707 +727 +703 +1463 +708 +728 +704 +1464 +709 +729 +706 +730 +710 +707 +731 +711 +708 +732 +712 +709 +733 +713 +714 +734 +711 +735 +715 +712 +736 +716 +713 +737 +717 +714 +738 +718 +719 +739 +716 +740 +720 +717 +741 +721 +718 +742 +722 +719 +743 +723 +724 +744 +721 +745 +785 +722 +746 +786 +723 +747 +787 +724 +748 +788 +789 +749 +1465 +730 +750 +726 +1466 +731 +751 +727 +1467 +732 +752 +728 +1468 +733 +753 +729 +1469 +734 +754 +731 +755 +735 +732 +756 +736 +733 +757 +737 +734 +758 +738 +739 +759 +736 +760 +740 +737 +761 +741 +738 +762 +742 +739 +763 +743 +744 +764 +741 +765 +745 +742 +766 +746 +743 +767 +747 +744 +768 +748 +749 +769 +746 +770 +790 +747 +771 +791 +748 +772 +792 +749 +773 +793 +794 +774 +1470 +755 +751 +1471 +756 +752 +1472 +757 +753 +1473 +758 +754 +1474 +759 +756 +760 +757 +761 +758 +762 +759 +763 +764 +761 +765 +762 +766 +763 +767 +764 +768 +769 +766 +770 +767 +771 +768 +772 +769 +773 +774 +771 +795 +772 +796 +773 +797 +774 +798 +799 +776 +780 +777 +781 +778 +782 +779 +783 +784 +781 +785 +782 +786 +783 +787 +784 +788 +789 +786 +790 +787 +791 +788 +792 +789 +793 +794 +791 +795 +792 +796 +793 +797 +794 +798 +799 +796 +797 +798 +799 +1200 +805 +829 +801 +1205 +806 +854 +802 +1210 +807 +879 +803 +1215 +808 +904 +804 +1220 +809 +929 +979 +834 +810 +806 +859 +811 +807 +884 +812 +808 +909 +813 +809 +934 +814 +984 +839 +815 +811 +864 +816 +812 +889 +817 +813 +914 +818 +814 +939 +819 +989 +844 +820 +816 +869 +821 +817 +894 +822 +818 +919 +823 +819 +944 +824 +994 +849 +954 +821 +874 +959 +822 +899 +964 +823 +924 +969 +824 +949 +974 +999 +1225 +830 +850 +826 +1050 +1226 +831 +851 +827 +1227 +832 +852 +828 +1228 +833 +853 +829 +1229 +834 +854 +1075 +831 +835 +855 +832 +856 +836 +833 +857 +837 +834 +858 +838 +839 +859 +1100 +836 +840 +860 +837 +861 +841 +838 +862 +842 +839 +863 +843 +844 +864 +1125 +841 +845 +865 +842 +866 +846 +843 +867 +847 +844 +868 +848 +849 +869 +1150 +846 +950 +870 +847 +871 +951 +848 +872 +952 +849 +873 +953 +954 +874 +1230 +855 +875 +851 +1055 +1231 +856 +876 +852 +1232 +857 +877 +853 +1233 +858 +878 +854 +1234 +859 +879 +1080 +856 +860 +880 +857 +881 +861 +858 +882 +862 +859 +883 +863 +864 +884 +1105 +861 +865 +885 +862 +886 +866 +863 +887 +867 +864 +888 +868 +869 +889 +1130 +866 +870 +890 +867 +891 +871 +868 +892 +872 +869 +893 +873 +874 +894 +1155 +871 +955 +895 +872 +896 +956 +873 +897 +957 +874 +898 +958 +959 +899 +1235 +880 +900 +876 +1060 +1236 +881 +901 +877 +1237 +882 +902 +878 +1238 +883 +903 +879 +1239 +884 +904 +1085 +881 +885 +905 +882 +906 +886 +883 +907 +887 +884 +908 +888 +889 +909 +1110 +886 +890 +910 +887 +911 +891 +888 +912 +892 +889 +913 +893 +894 +914 +1135 +891 +895 +915 +892 +916 +896 +893 +917 +897 +894 +918 +898 +899 +919 +1160 +896 +960 +920 +897 +921 +961 +898 +922 +962 +899 +923 +963 +964 +924 +1240 +905 +925 +901 +1065 +1241 +906 +926 +902 +1242 +907 +927 +903 +1243 +908 +928 +904 +1244 +909 +929 +1090 +906 +910 +930 +907 +931 +911 +908 +932 +912 +909 +933 +913 +914 +934 +1115 +911 +915 +935 +912 +936 +916 +913 +937 +917 +914 +938 +918 +919 +939 +1140 +916 +920 +940 +917 +941 +921 +918 +942 +922 +919 +943 +923 +924 +944 +1165 +921 +965 +945 +922 +946 +966 +923 +947 +967 +924 +948 +968 +969 +949 +1245 +930 +975 +926 +1070 +1246 +931 +976 +927 +1247 +932 +977 +928 +1248 +933 +978 +929 +1249 +934 +979 +1095 +931 +935 +980 +932 +981 +936 +933 +982 +937 +934 +983 +938 +939 +984 +1120 +936 +940 +985 +937 +986 +941 +938 +987 +942 +939 +988 +943 +944 +989 +1145 +941 +945 +990 +942 +991 +946 +943 +992 +947 +944 +993 +948 +949 +994 +1170 +946 +970 +995 +947 +996 +971 +948 +997 +972 +949 +998 +973 +974 +999 +1025 +951 +955 +952 +956 +953 +957 +954 +958 +959 +1030 +956 +960 +957 +961 +958 +962 +959 +963 +964 +1035 +961 +965 +962 +966 +963 +967 +964 +968 +969 +1040 +966 +970 +967 +971 +968 +972 +969 +973 +974 +1045 +971 +995 +972 +996 +973 +997 +974 +998 +999 +1350 +980 +976 +1175 +1351 +981 +977 +1352 +982 +978 +1353 +983 +979 +1354 +984 +1180 +981 +985 +982 +986 +983 +987 +984 +988 +989 +1185 +986 +990 +987 +991 +988 +992 +989 +993 +994 +1190 +991 +995 +992 +996 +993 +997 +994 +998 +999 +1195 +996 +997 +998 +999 +1400 +1001 +1005 +1054 +1002 +1079 +1006 +1003 +1104 +1007 +1004 +1129 +1008 +1029 +1154 +1009 +1401 +1006 +1010 +1059 +1007 +1084 +1011 +1008 +1109 +1012 +1009 +1134 +1013 +1034 +1159 +1014 +1402 +1011 +1015 +1064 +1012 +1089 +1016 +1013 +1114 +1017 +1014 +1139 +1018 +1039 +1164 +1019 +1403 +1016 +1020 +1069 +1017 +1094 +1021 +1018 +1119 +1022 +1019 +1144 +1023 +1044 +1169 +1024 +1404 +1021 +1179 +1074 +1022 +1099 +1184 +1023 +1124 +1189 +1024 +1149 +1194 +1049 +1174 +1199 +1026 +1030 +1150 +1027 +1031 +1151 +1028 +1032 +1152 +1029 +1033 +1153 +1154 +1034 +1031 +1035 +1155 +1032 +1036 +1156 +1033 +1037 +1157 +1034 +1038 +1158 +1159 +1039 +1036 +1040 +1160 +1037 +1041 +1161 +1038 +1042 +1162 +1039 +1043 +1163 +1164 +1044 +1041 +1045 +1165 +1042 +1046 +1166 +1043 +1047 +1167 +1044 +1048 +1168 +1169 +1049 +1046 +1195 +1170 +1047 +1196 +1171 +1048 +1197 +1172 +1049 +1198 +1173 +1174 +1199 +1450 +1075 +1051 +1055 +1451 +1076 +1052 +1056 +1452 +1077 +1053 +1057 +1453 +1078 +1054 +1058 +1454 +1079 +1059 +1475 +1080 +1056 +1060 +1476 +1081 +1057 +1061 +1477 +1082 +1058 +1062 +1478 +1083 +1059 +1063 +1479 +1084 +1064 +1500 +1085 +1061 +1065 +1501 +1086 +1062 +1066 +1502 +1087 +1063 +1067 +1503 +1088 +1064 +1068 +1504 +1089 +1069 +1525 +1090 +1066 +1070 +1526 +1091 +1067 +1071 +1527 +1092 +1068 +1072 +1528 +1093 +1069 +1073 +1529 +1094 +1074 +1550 +1095 +1071 +1175 +1551 +1096 +1072 +1176 +1552 +1097 +1073 +1177 +1553 +1098 +1074 +1178 +1554 +1099 +1179 +1076 +1100 +1080 +1077 +1101 +1081 +1078 +1102 +1082 +1079 +1103 +1083 +1084 +1104 +1081 +1105 +1085 +1082 +1106 +1086 +1083 +1107 +1087 +1084 +1108 +1088 +1089 +1109 +1086 +1110 +1090 +1087 +1111 +1091 +1088 +1112 +1092 +1089 +1113 +1093 +1094 +1114 +1091 +1115 +1095 +1092 +1116 +1096 +1093 +1117 +1097 +1094 +1118 +1098 +1099 +1119 +1096 +1120 +1180 +1097 +1121 +1181 +1098 +1122 +1182 +1099 +1123 +1183 +1184 +1124 +1101 +1125 +1105 +1102 +1126 +1106 +1103 +1127 +1107 +1104 +1128 +1108 +1109 +1129 +1106 +1130 +1110 +1107 +1131 +1111 +1108 +1132 +1112 +1109 +1133 +1113 +1114 +1134 +1111 +1135 +1115 +1112 +1136 +1116 +1113 +1137 +1117 +1114 +1138 +1118 +1119 +1139 +1116 +1140 +1120 +1117 +1141 +1121 +1118 +1142 +1122 +1119 +1143 +1123 +1124 +1144 +1121 +1145 +1185 +1122 +1146 +1186 +1123 +1147 +1187 +1124 +1148 +1188 +1189 +1149 +1126 +1150 +1130 +1127 +1151 +1131 +1128 +1152 +1132 +1129 +1153 +1133 +1134 +1154 +1131 +1155 +1135 +1132 +1156 +1136 +1133 +1157 +1137 +1134 +1158 +1138 +1139 +1159 +1136 +1160 +1140 +1137 +1161 +1141 +1138 +1162 +1142 +1139 +1163 +1143 +1144 +1164 +1141 +1165 +1145 +1142 +1166 +1146 +1143 +1167 +1147 +1144 +1168 +1148 +1149 +1169 +1146 +1170 +1190 +1147 +1171 +1191 +1148 +1172 +1192 +1149 +1173 +1193 +1194 +1174 +1151 +1155 +1152 +1156 +1153 +1157 +1154 +1158 +1159 +1156 +1160 +1157 +1161 +1158 +1162 +1159 +1163 +1164 +1161 +1165 +1162 +1166 +1163 +1167 +1164 +1168 +1169 +1166 +1170 +1167 +1171 +1168 +1172 +1169 +1173 +1174 +1171 +1195 +1172 +1196 +1173 +1197 +1174 +1198 +1199 +1425 +1180 +1176 +1426 +1181 +1177 +1427 +1182 +1178 +1428 +1183 +1179 +1429 +1184 +1181 +1185 +1182 +1186 +1183 +1187 +1184 +1188 +1189 +1186 +1190 +1187 +1191 +1188 +1192 +1189 +1193 +1194 +1191 +1195 +1192 +1196 +1193 +1197 +1194 +1198 +1199 +1196 +1197 +1198 +1199 +1229 +1205 +1201 +1254 +1206 +1202 +1279 +1207 +1203 +1304 +1208 +1204 +1329 +1209 +1379 +1234 +1210 +1206 +1259 +1211 +1207 +1284 +1212 +1208 +1309 +1213 +1209 +1334 +1214 +1384 +1239 +1215 +1211 +1264 +1216 +1212 +1289 +1217 +1213 +1314 +1218 +1214 +1339 +1219 +1389 +1244 +1220 +1216 +1269 +1221 +1217 +1294 +1222 +1218 +1319 +1223 +1219 +1344 +1224 +1394 +1249 +1354 +1221 +1274 +1359 +1222 +1299 +1364 +1223 +1324 +1369 +1224 +1349 +1374 +1399 +1450 +1226 +1230 +1250 +1227 +1251 +1231 +1228 +1252 +1232 +1229 +1253 +1233 +1234 +1254 +1475 +1231 +1235 +1255 +1232 +1256 +1236 +1233 +1257 +1237 +1234 +1258 +1238 +1239 +1259 +1500 +1236 +1240 +1260 +1237 +1261 +1241 +1238 +1262 +1242 +1239 +1263 +1243 +1244 +1264 +1525 +1241 +1245 +1265 +1242 +1266 +1246 +1243 +1267 +1247 +1244 +1268 +1248 +1249 +1269 +1550 +1246 +1350 +1270 +1247 +1271 +1351 +1248 +1272 +1352 +1249 +1273 +1353 +1354 +1274 +1455 +1251 +1255 +1275 +1252 +1276 +1256 +1253 +1277 +1257 +1254 +1278 +1258 +1259 +1279 +1480 +1256 +1260 +1280 +1257 +1281 +1261 +1258 +1282 +1262 +1259 +1283 +1263 +1264 +1284 +1505 +1261 +1265 +1285 +1262 +1286 +1266 +1263 +1287 +1267 +1264 +1288 +1268 +1269 +1289 +1530 +1266 +1270 +1290 +1267 +1291 +1271 +1268 +1292 +1272 +1269 +1293 +1273 +1274 +1294 +1555 +1271 +1355 +1295 +1272 +1296 +1356 +1273 +1297 +1357 +1274 +1298 +1358 +1359 +1299 +1460 +1276 +1280 +1300 +1277 +1301 +1281 +1278 +1302 +1282 +1279 +1303 +1283 +1284 +1304 +1485 +1281 +1285 +1305 +1282 +1306 +1286 +1283 +1307 +1287 +1284 +1308 +1288 +1289 +1309 +1510 +1286 +1290 +1310 +1287 +1311 +1291 +1288 +1312 +1292 +1289 +1313 +1293 +1294 +1314 +1535 +1291 +1295 +1315 +1292 +1316 +1296 +1293 +1317 +1297 +1294 +1318 +1298 +1299 +1319 +1560 +1296 +1360 +1320 +1297 +1321 +1361 +1298 +1322 +1362 +1299 +1323 +1363 +1364 +1324 +1465 +1301 +1305 +1325 +1302 +1326 +1306 +1303 +1327 +1307 +1304 +1328 +1308 +1309 +1329 +1490 +1306 +1310 +1330 +1307 +1331 +1311 +1308 +1332 +1312 +1309 +1333 +1313 +1314 +1334 +1515 +1311 +1315 +1335 +1312 +1336 +1316 +1313 +1337 +1317 +1314 +1338 +1318 +1319 +1339 +1540 +1316 +1320 +1340 +1317 +1341 +1321 +1318 +1342 +1322 +1319 +1343 +1323 +1324 +1344 +1565 +1321 +1365 +1345 +1322 +1346 +1366 +1323 +1347 +1367 +1324 +1348 +1368 +1369 +1349 +1470 +1326 +1330 +1375 +1327 +1376 +1331 +1328 +1377 +1332 +1329 +1378 +1333 +1334 +1379 +1495 +1331 +1335 +1380 +1332 +1381 +1336 +1333 +1382 +1337 +1334 +1383 +1338 +1339 +1384 +1520 +1336 +1340 +1385 +1337 +1386 +1341 +1338 +1387 +1342 +1339 +1388 +1343 +1344 +1389 +1545 +1341 +1345 +1390 +1342 +1391 +1346 +1343 +1392 +1347 +1344 +1393 +1348 +1349 +1394 +1570 +1346 +1370 +1395 +1347 +1396 +1371 +1348 +1397 +1372 +1349 +1398 +1373 +1374 +1399 +1425 +1351 +1355 +1352 +1356 +1353 +1357 +1354 +1358 +1359 +1430 +1356 +1360 +1357 +1361 +1358 +1362 +1359 +1363 +1364 +1435 +1361 +1365 +1362 +1366 +1363 +1367 +1364 +1368 +1369 +1440 +1366 +1370 +1367 +1371 +1368 +1372 +1369 +1373 +1374 +1445 +1371 +1395 +1372 +1396 +1373 +1397 +1374 +1398 +1399 +1575 +1376 +1380 +1377 +1381 +1378 +1382 +1379 +1383 +1384 +1580 +1381 +1385 +1382 +1386 +1383 +1387 +1384 +1388 +1389 +1585 +1386 +1390 +1387 +1391 +1388 +1392 +1389 +1393 +1394 +1590 +1391 +1395 +1392 +1396 +1393 +1397 +1394 +1398 +1399 +1595 +1396 +1397 +1398 +1399 +1401 +1454 +1405 +1402 +1479 +1406 +1403 +1504 +1407 +1404 +1529 +1408 +1429 +1554 +1409 +1406 +1459 +1410 +1407 +1484 +1411 +1408 +1509 +1412 +1409 +1534 +1413 +1434 +1559 +1414 +1411 +1464 +1415 +1412 +1489 +1416 +1413 +1514 +1417 +1414 +1539 +1418 +1439 +1564 +1419 +1416 +1469 +1420 +1417 +1494 +1421 +1418 +1519 +1422 +1419 +1544 +1423 +1444 +1569 +1424 +1421 +1474 +1579 +1422 +1499 +1584 +1423 +1524 +1589 +1424 +1549 +1594 +1449 +1574 +1599 +1426 +1430 +1550 +1427 +1431 +1551 +1428 +1432 +1552 +1429 +1433 +1553 +1554 +1434 +1431 +1435 +1555 +1432 +1436 +1556 +1433 +1437 +1557 +1434 +1438 +1558 +1559 +1439 +1436 +1440 +1560 +1437 +1441 +1561 +1438 +1442 +1562 +1439 +1443 +1563 +1564 +1444 +1441 +1445 +1565 +1442 +1446 +1566 +1443 +1447 +1567 +1444 +1448 +1568 +1569 +1449 +1446 +1595 +1570 +1447 +1596 +1571 +1448 +1597 +1572 +1449 +1598 +1573 +1574 +1599 +1451 +1475 +1455 +1452 +1476 +1456 +1453 +1477 +1457 +1454 +1478 +1458 +1459 +1479 +1456 +1480 +1460 +1457 +1481 +1461 +1458 +1482 +1462 +1459 +1483 +1463 +1464 +1484 +1461 +1485 +1465 +1462 +1486 +1466 +1463 +1487 +1467 +1464 +1488 +1468 +1469 +1489 +1466 +1490 +1470 +1467 +1491 +1471 +1468 +1492 +1472 +1469 +1493 +1473 +1474 +1494 +1471 +1495 +1575 +1472 +1496 +1576 +1473 +1497 +1577 +1474 +1498 +1578 +1579 +1499 +1476 +1500 +1480 +1477 +1501 +1481 +1478 +1502 +1482 +1479 +1503 +1483 +1484 +1504 +1481 +1505 +1485 +1482 +1506 +1486 +1483 +1507 +1487 +1484 +1508 +1488 +1489 +1509 +1486 +1510 +1490 +1487 +1511 +1491 +1488 +1512 +1492 +1489 +1513 +1493 +1494 +1514 +1491 +1515 +1495 +1492 +1516 +1496 +1493 +1517 +1497 +1494 +1518 +1498 +1499 +1519 +1496 +1520 +1580 +1497 +1521 +1581 +1498 +1522 +1582 +1499 +1523 +1583 +1584 +1524 +1501 +1525 +1505 +1502 +1526 +1506 +1503 +1527 +1507 +1504 +1528 +1508 +1509 +1529 +1506 +1530 +1510 +1507 +1531 +1511 +1508 +1532 +1512 +1509 +1533 +1513 +1514 +1534 +1511 +1535 +1515 +1512 +1536 +1516 +1513 +1537 +1517 +1514 +1538 +1518 +1519 +1539 +1516 +1540 +1520 +1517 +1541 +1521 +1518 +1542 +1522 +1519 +1543 +1523 +1524 +1544 +1521 +1545 +1585 +1522 +1546 +1586 +1523 +1547 +1587 +1524 +1548 +1588 +1589 +1549 +1526 +1550 +1530 +1527 +1551 +1531 +1528 +1552 +1532 +1529 +1553 +1533 +1534 +1554 +1531 +1555 +1535 +1532 +1556 +1536 +1533 +1557 +1537 +1534 +1558 +1538 +1539 +1559 +1536 +1560 +1540 +1537 +1561 +1541 +1538 +1562 +1542 +1539 +1563 +1543 +1544 +1564 +1541 +1565 +1545 +1542 +1566 +1546 +1543 +1567 +1547 +1544 +1568 +1548 +1549 +1569 +1546 +1570 +1590 +1547 +1571 +1591 +1548 +1572 +1592 +1549 +1573 +1593 +1594 +1574 +1551 +1555 +1552 +1556 +1553 +1557 +1554 +1558 +1559 +1556 +1560 +1557 +1561 +1558 +1562 +1559 +1563 +1564 +1561 +1565 +1562 +1566 +1563 +1567 +1564 +1568 +1569 +1566 +1570 +1567 +1571 +1568 +1572 +1569 +1573 +1574 +1571 +1595 +1572 +1596 +1573 +1597 +1574 +1598 +1599 +1576 +1580 +1577 +1581 +1578 +1582 +1579 +1583 +1584 +1581 +1585 +1582 +1586 +1583 +1587 +1584 +1588 +1589 +1586 +1590 +1587 +1591 +1588 +1592 +1589 +1593 +1594 +1591 +1595 +1592 +1596 +1593 +1597 +1594 +1598 +1599 +1596 +1597 +1598 +1599 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +-1 +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/constant/polyMesh/owner b/tutorials/finiteArea/sphereTransport/constant/polyMesh/owner new file mode 100644 index 0000000000000000000000000000000000000000..14e66456cf62aca4882292ec200001697326d1ae --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/polyMesh/owner @@ -0,0 +1,5123 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class labelList; + location "constant/polyMesh"; + object owner; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5100 +( +0 +0 +0 +0 +0 +1 +1 +1 +1 +2 +2 +2 +2 +3 +3 +3 +3 +4 +4 +4 +4 +5 +5 +5 +5 +6 +6 +6 +7 +7 +7 +8 +8 +8 +9 +9 +9 +10 +10 +10 +10 +11 +11 +11 +12 +12 +12 +13 +13 +13 +14 +14 +14 +15 +15 +15 +15 +16 +16 +16 +17 +17 +17 +18 +18 +18 +19 +19 +19 +20 +20 +20 +20 +21 +21 +21 +22 +22 +22 +23 +23 +23 +24 +24 +24 +25 +25 +25 +25 +25 +25 +26 +26 +26 +26 +26 +27 +27 +27 +27 +27 +28 +28 +28 +28 +28 +29 +29 +29 +29 +30 +30 +30 +30 +30 +31 +31 +31 +31 +32 +32 +32 +32 +33 +33 +33 +33 +34 +34 +34 +35 +35 +35 +35 +35 +36 +36 +36 +36 +37 +37 +37 +37 +38 +38 +38 +38 +39 +39 +39 +40 +40 +40 +40 +40 +41 +41 +41 +41 +42 +42 +42 +42 +43 +43 +43 +43 +44 +44 +44 +45 +45 +45 +45 +45 +46 +46 +46 +46 +47 +47 +47 +47 +48 +48 +48 +48 +49 +49 +49 +50 +50 +50 +50 +50 +51 +51 +51 +51 +52 +52 +52 +52 +53 +53 +53 +53 +54 +54 +54 +55 +55 +55 +55 +56 +56 +56 +57 +57 +57 +58 +58 +58 +59 +59 +60 +60 +60 +60 +61 +61 +61 +62 +62 +62 +63 +63 +63 +64 +64 +65 +65 +65 +65 +66 +66 +66 +67 +67 +67 +68 +68 +68 +69 +69 +70 +70 +70 +70 +71 +71 +71 +72 +72 +72 +73 +73 +73 +74 +74 +75 +75 +75 +75 +75 +76 +76 +76 +76 +77 +77 +77 +77 +78 +78 +78 +78 +79 +79 +79 +80 +80 +80 +80 +81 +81 +81 +82 +82 +82 +83 +83 +83 +84 +84 +85 +85 +85 +85 +86 +86 +86 +87 +87 +87 +88 +88 +88 +89 +89 +90 +90 +90 +90 +91 +91 +91 +92 +92 +92 +93 +93 +93 +94 +94 +95 +95 +95 +95 +96 +96 +96 +97 +97 +97 +98 +98 +98 +99 +99 +100 +100 +100 +100 +100 +101 +101 +101 +101 +102 +102 +102 +102 +103 +103 +103 +103 +104 +104 +104 +105 +105 +105 +105 +106 +106 +106 +107 +107 +107 +108 +108 +108 +109 +109 +110 +110 +110 +110 +111 +111 +111 +112 +112 +112 +113 +113 +113 +114 +114 +115 +115 +115 +115 +116 +116 +116 +117 +117 +117 +118 +118 +118 +119 +119 +120 +120 +120 +120 +121 +121 +121 +122 +122 +122 +123 +123 +123 +124 +124 +125 +125 +125 +125 +125 +126 +126 +126 +126 +127 +127 +127 +127 +128 +128 +128 +128 +129 +129 +129 +130 +130 +130 +130 +131 +131 +131 +132 +132 +132 +133 +133 +133 +134 +134 +135 +135 +135 +135 +136 +136 +136 +137 +137 +137 +138 +138 +138 +139 +139 +140 +140 +140 +140 +141 +141 +141 +142 +142 +142 +143 +143 +143 +144 +144 +145 +145 +145 +145 +146 +146 +146 +147 +147 +147 +148 +148 +148 +149 +149 +150 +150 +150 +150 +151 +151 +151 +152 +152 +152 +153 +153 +153 +154 +154 +155 +155 +155 +156 +156 +157 +157 +158 +158 +159 +160 +160 +160 +161 +161 +162 +162 +163 +163 +164 +165 +165 +165 +166 +166 +167 +167 +168 +168 +169 +170 +170 +170 +171 +171 +172 +172 +173 +173 +174 +175 +175 +175 +175 +176 +176 +176 +177 +177 +177 +178 +178 +178 +179 +179 +180 +180 +180 +181 +181 +182 +182 +183 +183 +184 +185 +185 +185 +186 +186 +187 +187 +188 +188 +189 +190 +190 +190 +191 +191 +192 +192 +193 +193 +194 +195 +195 +196 +197 +198 +200 +200 +200 +200 +200 +201 +201 +201 +201 +202 +202 +202 +202 +203 +203 +203 +203 +204 +204 +204 +204 +205 +205 +205 +205 +206 +206 +206 +207 +207 +207 +208 +208 +208 +209 +209 +209 +210 +210 +210 +210 +211 +211 +211 +212 +212 +212 +213 +213 +213 +214 +214 +214 +215 +215 +215 +215 +216 +216 +216 +217 +217 +217 +218 +218 +218 +219 +219 +219 +220 +220 +220 +220 +221 +221 +221 +222 +222 +222 +223 +223 +223 +224 +224 +224 +225 +225 +225 +225 +226 +226 +226 +226 +227 +227 +227 +227 +228 +228 +228 +228 +229 +229 +229 +230 +230 +230 +231 +231 +231 +232 +232 +232 +233 +233 +233 +234 +234 +235 +235 +235 +236 +236 +236 +237 +237 +237 +238 +238 +238 +239 +239 +240 +240 +240 +241 +241 +241 +242 +242 +242 +243 +243 +243 +244 +244 +245 +245 +245 +246 +246 +246 +247 +247 +247 +248 +248 +248 +249 +249 +250 +250 +250 +250 +250 +251 +251 +251 +251 +251 +252 +252 +252 +252 +252 +253 +253 +253 +253 +253 +254 +254 +254 +254 +255 +255 +255 +255 +256 +256 +256 +256 +257 +257 +257 +257 +258 +258 +258 +258 +259 +259 +259 +260 +260 +260 +260 +261 +261 +261 +261 +262 +262 +262 +262 +263 +263 +263 +263 +264 +264 +264 +265 +265 +265 +265 +266 +266 +266 +266 +267 +267 +267 +267 +268 +268 +268 +268 +269 +269 +269 +270 +270 +270 +270 +271 +271 +271 +271 +272 +272 +272 +272 +273 +273 +273 +273 +274 +274 +274 +275 +275 +275 +275 +276 +276 +276 +276 +277 +277 +277 +277 +278 +278 +278 +278 +279 +279 +279 +280 +280 +280 +281 +281 +281 +282 +282 +282 +283 +283 +283 +284 +284 +285 +285 +285 +286 +286 +286 +287 +287 +287 +288 +288 +288 +289 +289 +290 +290 +290 +291 +291 +291 +292 +292 +292 +293 +293 +293 +294 +294 +295 +295 +295 +296 +296 +296 +297 +297 +297 +298 +298 +298 +299 +299 +300 +300 +300 +300 +301 +301 +301 +301 +302 +302 +302 +302 +303 +303 +303 +303 +304 +304 +304 +305 +305 +305 +306 +306 +306 +307 +307 +307 +308 +308 +308 +309 +309 +310 +310 +310 +311 +311 +311 +312 +312 +312 +313 +313 +313 +314 +314 +315 +315 +315 +316 +316 +316 +317 +317 +317 +318 +318 +318 +319 +319 +320 +320 +320 +321 +321 +321 +322 +322 +322 +323 +323 +323 +324 +324 +325 +325 +325 +325 +326 +326 +326 +326 +327 +327 +327 +327 +328 +328 +328 +328 +329 +329 +329 +330 +330 +330 +331 +331 +331 +332 +332 +332 +333 +333 +333 +334 +334 +335 +335 +335 +336 +336 +336 +337 +337 +337 +338 +338 +338 +339 +339 +340 +340 +340 +341 +341 +341 +342 +342 +342 +343 +343 +343 +344 +344 +345 +345 +345 +346 +346 +346 +347 +347 +347 +348 +348 +348 +349 +349 +350 +350 +350 +351 +351 +351 +352 +352 +352 +353 +353 +353 +354 +354 +355 +355 +356 +356 +357 +357 +358 +358 +359 +360 +360 +361 +361 +362 +362 +363 +363 +364 +365 +365 +366 +366 +367 +367 +368 +368 +369 +370 +370 +371 +371 +372 +372 +373 +373 +374 +375 +375 +375 +376 +376 +376 +377 +377 +377 +378 +378 +378 +379 +379 +380 +380 +381 +381 +382 +382 +383 +383 +384 +385 +385 +386 +386 +387 +387 +388 +388 +389 +390 +390 +391 +391 +392 +392 +393 +393 +394 +395 +396 +397 +398 +400 +400 +400 +400 +401 +401 +401 +402 +402 +402 +403 +403 +403 +404 +404 +404 +405 +405 +405 +405 +406 +406 +406 +407 +407 +407 +408 +408 +408 +409 +409 +409 +410 +410 +410 +410 +411 +411 +411 +412 +412 +412 +413 +413 +413 +414 +414 +414 +415 +415 +415 +415 +416 +416 +416 +417 +417 +417 +418 +418 +418 +419 +419 +419 +420 +420 +420 +420 +421 +421 +421 +422 +422 +422 +423 +423 +423 +424 +424 +424 +425 +425 +425 +425 +425 +426 +426 +426 +426 +427 +427 +427 +427 +428 +428 +428 +428 +429 +429 +429 +430 +430 +430 +430 +430 +431 +431 +431 +431 +432 +432 +432 +432 +433 +433 +433 +433 +434 +434 +434 +435 +435 +435 +435 +435 +436 +436 +436 +436 +437 +437 +437 +437 +438 +438 +438 +438 +439 +439 +439 +440 +440 +440 +440 +440 +441 +441 +441 +441 +442 +442 +442 +442 +443 +443 +443 +443 +444 +444 +444 +445 +445 +445 +445 +445 +446 +446 +446 +446 +447 +447 +447 +447 +448 +448 +448 +448 +449 +449 +449 +450 +450 +450 +450 +451 +451 +451 +452 +452 +452 +453 +453 +453 +454 +454 +455 +455 +455 +455 +456 +456 +456 +457 +457 +457 +458 +458 +458 +459 +459 +460 +460 +460 +460 +461 +461 +461 +462 +462 +462 +463 +463 +463 +464 +464 +465 +465 +465 +465 +466 +466 +466 +467 +467 +467 +468 +468 +468 +469 +469 +470 +470 +470 +470 +471 +471 +471 +472 +472 +472 +473 +473 +473 +474 +474 +475 +475 +475 +475 +476 +476 +476 +477 +477 +477 +478 +478 +478 +479 +479 +480 +480 +480 +480 +481 +481 +481 +482 +482 +482 +483 +483 +483 +484 +484 +485 +485 +485 +485 +486 +486 +486 +487 +487 +487 +488 +488 +488 +489 +489 +490 +490 +490 +490 +491 +491 +491 +492 +492 +492 +493 +493 +493 +494 +494 +495 +495 +495 +495 +496 +496 +496 +497 +497 +497 +498 +498 +498 +499 +499 +500 +500 +500 +500 +501 +501 +501 +502 +502 +502 +503 +503 +503 +504 +504 +505 +505 +505 +505 +506 +506 +506 +507 +507 +507 +508 +508 +508 +509 +509 +510 +510 +510 +510 +511 +511 +511 +512 +512 +512 +513 +513 +513 +514 +514 +515 +515 +515 +515 +516 +516 +516 +517 +517 +517 +518 +518 +518 +519 +519 +520 +520 +520 +520 +521 +521 +521 +522 +522 +522 +523 +523 +523 +524 +524 +525 +525 +525 +525 +526 +526 +526 +527 +527 +527 +528 +528 +528 +529 +529 +530 +530 +530 +530 +531 +531 +531 +532 +532 +532 +533 +533 +533 +534 +534 +535 +535 +535 +535 +536 +536 +536 +537 +537 +537 +538 +538 +538 +539 +539 +540 +540 +540 +540 +541 +541 +541 +542 +542 +542 +543 +543 +543 +544 +544 +545 +545 +545 +545 +546 +546 +546 +547 +547 +547 +548 +548 +548 +549 +549 +550 +550 +550 +550 +551 +551 +551 +552 +552 +552 +553 +553 +553 +554 +554 +555 +555 +555 +556 +556 +557 +557 +558 +558 +559 +560 +560 +560 +561 +561 +562 +562 +563 +563 +564 +565 +565 +565 +566 +566 +567 +567 +568 +568 +569 +570 +570 +570 +571 +571 +572 +572 +573 +573 +574 +575 +575 +575 +576 +576 +577 +577 +578 +578 +579 +580 +580 +580 +581 +581 +582 +582 +583 +583 +584 +585 +585 +585 +586 +586 +587 +587 +588 +588 +589 +590 +590 +590 +591 +591 +592 +592 +593 +593 +594 +595 +595 +596 +597 +598 +600 +600 +600 +600 +601 +601 +601 +601 +602 +602 +602 +602 +603 +603 +603 +603 +604 +604 +604 +604 +605 +605 +605 +606 +606 +606 +607 +607 +607 +608 +608 +608 +609 +609 +609 +610 +610 +610 +611 +611 +611 +612 +612 +612 +613 +613 +613 +614 +614 +614 +615 +615 +615 +616 +616 +616 +617 +617 +617 +618 +618 +618 +619 +619 +619 +620 +620 +620 +621 +621 +621 +622 +622 +622 +623 +623 +623 +624 +624 +624 +625 +625 +625 +625 +626 +626 +626 +626 +627 +627 +627 +627 +628 +628 +628 +628 +629 +629 +629 +630 +630 +630 +631 +631 +631 +632 +632 +632 +633 +633 +633 +634 +634 +635 +635 +635 +636 +636 +636 +637 +637 +637 +638 +638 +638 +639 +639 +640 +640 +640 +641 +641 +641 +642 +642 +642 +643 +643 +643 +644 +644 +645 +645 +645 +646 +646 +646 +647 +647 +647 +648 +648 +648 +649 +649 +650 +650 +650 +650 +651 +651 +651 +651 +652 +652 +652 +652 +653 +653 +653 +653 +654 +654 +654 +655 +655 +655 +656 +656 +656 +657 +657 +657 +658 +658 +658 +659 +659 +660 +660 +660 +661 +661 +661 +662 +662 +662 +663 +663 +663 +664 +664 +665 +665 +665 +666 +666 +666 +667 +667 +667 +668 +668 +668 +669 +669 +670 +670 +670 +671 +671 +671 +672 +672 +672 +673 +673 +673 +674 +674 +675 +675 +675 +675 +676 +676 +676 +676 +677 +677 +677 +677 +678 +678 +678 +678 +679 +679 +679 +680 +680 +680 +681 +681 +681 +682 +682 +682 +683 +683 +683 +684 +684 +685 +685 +685 +686 +686 +686 +687 +687 +687 +688 +688 +688 +689 +689 +690 +690 +690 +691 +691 +691 +692 +692 +692 +693 +693 +693 +694 +694 +695 +695 +695 +696 +696 +696 +697 +697 +697 +698 +698 +698 +699 +699 +700 +700 +700 +700 +701 +701 +701 +701 +702 +702 +702 +702 +703 +703 +703 +703 +704 +704 +704 +705 +705 +705 +706 +706 +706 +707 +707 +707 +708 +708 +708 +709 +709 +710 +710 +710 +711 +711 +711 +712 +712 +712 +713 +713 +713 +714 +714 +715 +715 +715 +716 +716 +716 +717 +717 +717 +718 +718 +718 +719 +719 +720 +720 +720 +721 +721 +721 +722 +722 +722 +723 +723 +723 +724 +724 +725 +725 +725 +725 +726 +726 +726 +726 +727 +727 +727 +727 +728 +728 +728 +728 +729 +729 +729 +730 +730 +730 +731 +731 +731 +732 +732 +732 +733 +733 +733 +734 +734 +735 +735 +735 +736 +736 +736 +737 +737 +737 +738 +738 +738 +739 +739 +740 +740 +740 +741 +741 +741 +742 +742 +742 +743 +743 +743 +744 +744 +745 +745 +745 +746 +746 +746 +747 +747 +747 +748 +748 +748 +749 +749 +750 +750 +750 +751 +751 +751 +752 +752 +752 +753 +753 +753 +754 +754 +755 +755 +756 +756 +757 +757 +758 +758 +759 +760 +760 +761 +761 +762 +762 +763 +763 +764 +765 +765 +766 +766 +767 +767 +768 +768 +769 +770 +770 +771 +771 +772 +772 +773 +773 +774 +775 +775 +776 +776 +777 +777 +778 +778 +779 +780 +780 +781 +781 +782 +782 +783 +783 +784 +785 +785 +786 +786 +787 +787 +788 +788 +789 +790 +790 +791 +791 +792 +792 +793 +793 +794 +795 +796 +797 +798 +800 +800 +800 +800 +801 +801 +801 +801 +802 +802 +802 +802 +803 +803 +803 +803 +804 +804 +804 +804 +805 +805 +805 +806 +806 +806 +807 +807 +807 +808 +808 +808 +809 +809 +809 +810 +810 +810 +811 +811 +811 +812 +812 +812 +813 +813 +813 +814 +814 +814 +815 +815 +815 +816 +816 +816 +817 +817 +817 +818 +818 +818 +819 +819 +819 +820 +820 +820 +821 +821 +821 +822 +822 +822 +823 +823 +823 +824 +824 +824 +825 +825 +825 +825 +825 +826 +826 +826 +826 +827 +827 +827 +827 +828 +828 +828 +828 +829 +829 +829 +830 +830 +830 +830 +831 +831 +831 +832 +832 +832 +833 +833 +833 +834 +834 +835 +835 +835 +835 +836 +836 +836 +837 +837 +837 +838 +838 +838 +839 +839 +840 +840 +840 +840 +841 +841 +841 +842 +842 +842 +843 +843 +843 +844 +844 +845 +845 +845 +845 +846 +846 +846 +847 +847 +847 +848 +848 +848 +849 +849 +850 +850 +850 +850 +850 +851 +851 +851 +851 +852 +852 +852 +852 +853 +853 +853 +853 +854 +854 +854 +855 +855 +855 +855 +856 +856 +856 +857 +857 +857 +858 +858 +858 +859 +859 +860 +860 +860 +860 +861 +861 +861 +862 +862 +862 +863 +863 +863 +864 +864 +865 +865 +865 +865 +866 +866 +866 +867 +867 +867 +868 +868 +868 +869 +869 +870 +870 +870 +870 +871 +871 +871 +872 +872 +872 +873 +873 +873 +874 +874 +875 +875 +875 +875 +875 +876 +876 +876 +876 +877 +877 +877 +877 +878 +878 +878 +878 +879 +879 +879 +880 +880 +880 +880 +881 +881 +881 +882 +882 +882 +883 +883 +883 +884 +884 +885 +885 +885 +885 +886 +886 +886 +887 +887 +887 +888 +888 +888 +889 +889 +890 +890 +890 +890 +891 +891 +891 +892 +892 +892 +893 +893 +893 +894 +894 +895 +895 +895 +895 +896 +896 +896 +897 +897 +897 +898 +898 +898 +899 +899 +900 +900 +900 +900 +900 +901 +901 +901 +901 +902 +902 +902 +902 +903 +903 +903 +903 +904 +904 +904 +905 +905 +905 +905 +906 +906 +906 +907 +907 +907 +908 +908 +908 +909 +909 +910 +910 +910 +910 +911 +911 +911 +912 +912 +912 +913 +913 +913 +914 +914 +915 +915 +915 +915 +916 +916 +916 +917 +917 +917 +918 +918 +918 +919 +919 +920 +920 +920 +920 +921 +921 +921 +922 +922 +922 +923 +923 +923 +924 +924 +925 +925 +925 +925 +925 +926 +926 +926 +926 +927 +927 +927 +927 +928 +928 +928 +928 +929 +929 +929 +930 +930 +930 +930 +931 +931 +931 +932 +932 +932 +933 +933 +933 +934 +934 +935 +935 +935 +935 +936 +936 +936 +937 +937 +937 +938 +938 +938 +939 +939 +940 +940 +940 +940 +941 +941 +941 +942 +942 +942 +943 +943 +943 +944 +944 +945 +945 +945 +945 +946 +946 +946 +947 +947 +947 +948 +948 +948 +949 +949 +950 +950 +950 +951 +951 +952 +952 +953 +953 +954 +955 +955 +955 +956 +956 +957 +957 +958 +958 +959 +960 +960 +960 +961 +961 +962 +962 +963 +963 +964 +965 +965 +965 +966 +966 +967 +967 +968 +968 +969 +970 +970 +970 +971 +971 +972 +972 +973 +973 +974 +975 +975 +975 +975 +976 +976 +976 +977 +977 +977 +978 +978 +978 +979 +979 +980 +980 +980 +981 +981 +982 +982 +983 +983 +984 +985 +985 +985 +986 +986 +987 +987 +988 +988 +989 +990 +990 +990 +991 +991 +992 +992 +993 +993 +994 +995 +995 +996 +997 +998 +1000 +1000 +1000 +1000 +1001 +1001 +1001 +1002 +1002 +1002 +1003 +1003 +1003 +1004 +1004 +1004 +1005 +1005 +1005 +1005 +1006 +1006 +1006 +1007 +1007 +1007 +1008 +1008 +1008 +1009 +1009 +1009 +1010 +1010 +1010 +1010 +1011 +1011 +1011 +1012 +1012 +1012 +1013 +1013 +1013 +1014 +1014 +1014 +1015 +1015 +1015 +1015 +1016 +1016 +1016 +1017 +1017 +1017 +1018 +1018 +1018 +1019 +1019 +1019 +1020 +1020 +1020 +1020 +1021 +1021 +1021 +1022 +1022 +1022 +1023 +1023 +1023 +1024 +1024 +1024 +1025 +1025 +1025 +1026 +1026 +1026 +1027 +1027 +1027 +1028 +1028 +1028 +1029 +1029 +1030 +1030 +1030 +1031 +1031 +1031 +1032 +1032 +1032 +1033 +1033 +1033 +1034 +1034 +1035 +1035 +1035 +1036 +1036 +1036 +1037 +1037 +1037 +1038 +1038 +1038 +1039 +1039 +1040 +1040 +1040 +1041 +1041 +1041 +1042 +1042 +1042 +1043 +1043 +1043 +1044 +1044 +1045 +1045 +1045 +1046 +1046 +1046 +1047 +1047 +1047 +1048 +1048 +1048 +1049 +1049 +1050 +1050 +1050 +1050 +1051 +1051 +1051 +1051 +1052 +1052 +1052 +1052 +1053 +1053 +1053 +1053 +1054 +1054 +1054 +1055 +1055 +1055 +1055 +1056 +1056 +1056 +1056 +1057 +1057 +1057 +1057 +1058 +1058 +1058 +1058 +1059 +1059 +1059 +1060 +1060 +1060 +1060 +1061 +1061 +1061 +1061 +1062 +1062 +1062 +1062 +1063 +1063 +1063 +1063 +1064 +1064 +1064 +1065 +1065 +1065 +1065 +1066 +1066 +1066 +1066 +1067 +1067 +1067 +1067 +1068 +1068 +1068 +1068 +1069 +1069 +1069 +1070 +1070 +1070 +1070 +1071 +1071 +1071 +1071 +1072 +1072 +1072 +1072 +1073 +1073 +1073 +1073 +1074 +1074 +1074 +1075 +1075 +1075 +1076 +1076 +1076 +1077 +1077 +1077 +1078 +1078 +1078 +1079 +1079 +1080 +1080 +1080 +1081 +1081 +1081 +1082 +1082 +1082 +1083 +1083 +1083 +1084 +1084 +1085 +1085 +1085 +1086 +1086 +1086 +1087 +1087 +1087 +1088 +1088 +1088 +1089 +1089 +1090 +1090 +1090 +1091 +1091 +1091 +1092 +1092 +1092 +1093 +1093 +1093 +1094 +1094 +1095 +1095 +1095 +1096 +1096 +1096 +1097 +1097 +1097 +1098 +1098 +1098 +1099 +1099 +1100 +1100 +1100 +1101 +1101 +1101 +1102 +1102 +1102 +1103 +1103 +1103 +1104 +1104 +1105 +1105 +1105 +1106 +1106 +1106 +1107 +1107 +1107 +1108 +1108 +1108 +1109 +1109 +1110 +1110 +1110 +1111 +1111 +1111 +1112 +1112 +1112 +1113 +1113 +1113 +1114 +1114 +1115 +1115 +1115 +1116 +1116 +1116 +1117 +1117 +1117 +1118 +1118 +1118 +1119 +1119 +1120 +1120 +1120 +1121 +1121 +1121 +1122 +1122 +1122 +1123 +1123 +1123 +1124 +1124 +1125 +1125 +1125 +1126 +1126 +1126 +1127 +1127 +1127 +1128 +1128 +1128 +1129 +1129 +1130 +1130 +1130 +1131 +1131 +1131 +1132 +1132 +1132 +1133 +1133 +1133 +1134 +1134 +1135 +1135 +1135 +1136 +1136 +1136 +1137 +1137 +1137 +1138 +1138 +1138 +1139 +1139 +1140 +1140 +1140 +1141 +1141 +1141 +1142 +1142 +1142 +1143 +1143 +1143 +1144 +1144 +1145 +1145 +1145 +1146 +1146 +1146 +1147 +1147 +1147 +1148 +1148 +1148 +1149 +1149 +1150 +1150 +1151 +1151 +1152 +1152 +1153 +1153 +1154 +1155 +1155 +1156 +1156 +1157 +1157 +1158 +1158 +1159 +1160 +1160 +1161 +1161 +1162 +1162 +1163 +1163 +1164 +1165 +1165 +1166 +1166 +1167 +1167 +1168 +1168 +1169 +1170 +1170 +1171 +1171 +1172 +1172 +1173 +1173 +1174 +1175 +1175 +1175 +1176 +1176 +1176 +1177 +1177 +1177 +1178 +1178 +1178 +1179 +1179 +1180 +1180 +1181 +1181 +1182 +1182 +1183 +1183 +1184 +1185 +1185 +1186 +1186 +1187 +1187 +1188 +1188 +1189 +1190 +1190 +1191 +1191 +1192 +1192 +1193 +1193 +1194 +1195 +1196 +1197 +1198 +1200 +1200 +1200 +1201 +1201 +1201 +1202 +1202 +1202 +1203 +1203 +1203 +1204 +1204 +1204 +1205 +1205 +1205 +1206 +1206 +1206 +1207 +1207 +1207 +1208 +1208 +1208 +1209 +1209 +1209 +1210 +1210 +1210 +1211 +1211 +1211 +1212 +1212 +1212 +1213 +1213 +1213 +1214 +1214 +1214 +1215 +1215 +1215 +1216 +1216 +1216 +1217 +1217 +1217 +1218 +1218 +1218 +1219 +1219 +1219 +1220 +1220 +1220 +1221 +1221 +1221 +1222 +1222 +1222 +1223 +1223 +1223 +1224 +1224 +1224 +1225 +1225 +1225 +1225 +1226 +1226 +1226 +1227 +1227 +1227 +1228 +1228 +1228 +1229 +1229 +1230 +1230 +1230 +1230 +1231 +1231 +1231 +1232 +1232 +1232 +1233 +1233 +1233 +1234 +1234 +1235 +1235 +1235 +1235 +1236 +1236 +1236 +1237 +1237 +1237 +1238 +1238 +1238 +1239 +1239 +1240 +1240 +1240 +1240 +1241 +1241 +1241 +1242 +1242 +1242 +1243 +1243 +1243 +1244 +1244 +1245 +1245 +1245 +1245 +1246 +1246 +1246 +1247 +1247 +1247 +1248 +1248 +1248 +1249 +1249 +1250 +1250 +1250 +1250 +1251 +1251 +1251 +1252 +1252 +1252 +1253 +1253 +1253 +1254 +1254 +1255 +1255 +1255 +1255 +1256 +1256 +1256 +1257 +1257 +1257 +1258 +1258 +1258 +1259 +1259 +1260 +1260 +1260 +1260 +1261 +1261 +1261 +1262 +1262 +1262 +1263 +1263 +1263 +1264 +1264 +1265 +1265 +1265 +1265 +1266 +1266 +1266 +1267 +1267 +1267 +1268 +1268 +1268 +1269 +1269 +1270 +1270 +1270 +1270 +1271 +1271 +1271 +1272 +1272 +1272 +1273 +1273 +1273 +1274 +1274 +1275 +1275 +1275 +1275 +1276 +1276 +1276 +1277 +1277 +1277 +1278 +1278 +1278 +1279 +1279 +1280 +1280 +1280 +1280 +1281 +1281 +1281 +1282 +1282 +1282 +1283 +1283 +1283 +1284 +1284 +1285 +1285 +1285 +1285 +1286 +1286 +1286 +1287 +1287 +1287 +1288 +1288 +1288 +1289 +1289 +1290 +1290 +1290 +1290 +1291 +1291 +1291 +1292 +1292 +1292 +1293 +1293 +1293 +1294 +1294 +1295 +1295 +1295 +1295 +1296 +1296 +1296 +1297 +1297 +1297 +1298 +1298 +1298 +1299 +1299 +1300 +1300 +1300 +1300 +1301 +1301 +1301 +1302 +1302 +1302 +1303 +1303 +1303 +1304 +1304 +1305 +1305 +1305 +1305 +1306 +1306 +1306 +1307 +1307 +1307 +1308 +1308 +1308 +1309 +1309 +1310 +1310 +1310 +1310 +1311 +1311 +1311 +1312 +1312 +1312 +1313 +1313 +1313 +1314 +1314 +1315 +1315 +1315 +1315 +1316 +1316 +1316 +1317 +1317 +1317 +1318 +1318 +1318 +1319 +1319 +1320 +1320 +1320 +1320 +1321 +1321 +1321 +1322 +1322 +1322 +1323 +1323 +1323 +1324 +1324 +1325 +1325 +1325 +1325 +1326 +1326 +1326 +1327 +1327 +1327 +1328 +1328 +1328 +1329 +1329 +1330 +1330 +1330 +1330 +1331 +1331 +1331 +1332 +1332 +1332 +1333 +1333 +1333 +1334 +1334 +1335 +1335 +1335 +1335 +1336 +1336 +1336 +1337 +1337 +1337 +1338 +1338 +1338 +1339 +1339 +1340 +1340 +1340 +1340 +1341 +1341 +1341 +1342 +1342 +1342 +1343 +1343 +1343 +1344 +1344 +1345 +1345 +1345 +1345 +1346 +1346 +1346 +1347 +1347 +1347 +1348 +1348 +1348 +1349 +1349 +1350 +1350 +1350 +1351 +1351 +1352 +1352 +1353 +1353 +1354 +1355 +1355 +1355 +1356 +1356 +1357 +1357 +1358 +1358 +1359 +1360 +1360 +1360 +1361 +1361 +1362 +1362 +1363 +1363 +1364 +1365 +1365 +1365 +1366 +1366 +1367 +1367 +1368 +1368 +1369 +1370 +1370 +1370 +1371 +1371 +1372 +1372 +1373 +1373 +1374 +1375 +1375 +1375 +1376 +1376 +1377 +1377 +1378 +1378 +1379 +1380 +1380 +1380 +1381 +1381 +1382 +1382 +1383 +1383 +1384 +1385 +1385 +1385 +1386 +1386 +1387 +1387 +1388 +1388 +1389 +1390 +1390 +1390 +1391 +1391 +1392 +1392 +1393 +1393 +1394 +1395 +1395 +1396 +1397 +1398 +1400 +1400 +1400 +1401 +1401 +1401 +1402 +1402 +1402 +1403 +1403 +1403 +1404 +1404 +1404 +1405 +1405 +1405 +1406 +1406 +1406 +1407 +1407 +1407 +1408 +1408 +1408 +1409 +1409 +1409 +1410 +1410 +1410 +1411 +1411 +1411 +1412 +1412 +1412 +1413 +1413 +1413 +1414 +1414 +1414 +1415 +1415 +1415 +1416 +1416 +1416 +1417 +1417 +1417 +1418 +1418 +1418 +1419 +1419 +1419 +1420 +1420 +1420 +1421 +1421 +1421 +1422 +1422 +1422 +1423 +1423 +1423 +1424 +1424 +1424 +1425 +1425 +1425 +1426 +1426 +1426 +1427 +1427 +1427 +1428 +1428 +1428 +1429 +1429 +1430 +1430 +1430 +1431 +1431 +1431 +1432 +1432 +1432 +1433 +1433 +1433 +1434 +1434 +1435 +1435 +1435 +1436 +1436 +1436 +1437 +1437 +1437 +1438 +1438 +1438 +1439 +1439 +1440 +1440 +1440 +1441 +1441 +1441 +1442 +1442 +1442 +1443 +1443 +1443 +1444 +1444 +1445 +1445 +1445 +1446 +1446 +1446 +1447 +1447 +1447 +1448 +1448 +1448 +1449 +1449 +1450 +1450 +1450 +1451 +1451 +1451 +1452 +1452 +1452 +1453 +1453 +1453 +1454 +1454 +1455 +1455 +1455 +1456 +1456 +1456 +1457 +1457 +1457 +1458 +1458 +1458 +1459 +1459 +1460 +1460 +1460 +1461 +1461 +1461 +1462 +1462 +1462 +1463 +1463 +1463 +1464 +1464 +1465 +1465 +1465 +1466 +1466 +1466 +1467 +1467 +1467 +1468 +1468 +1468 +1469 +1469 +1470 +1470 +1470 +1471 +1471 +1471 +1472 +1472 +1472 +1473 +1473 +1473 +1474 +1474 +1475 +1475 +1475 +1476 +1476 +1476 +1477 +1477 +1477 +1478 +1478 +1478 +1479 +1479 +1480 +1480 +1480 +1481 +1481 +1481 +1482 +1482 +1482 +1483 +1483 +1483 +1484 +1484 +1485 +1485 +1485 +1486 +1486 +1486 +1487 +1487 +1487 +1488 +1488 +1488 +1489 +1489 +1490 +1490 +1490 +1491 +1491 +1491 +1492 +1492 +1492 +1493 +1493 +1493 +1494 +1494 +1495 +1495 +1495 +1496 +1496 +1496 +1497 +1497 +1497 +1498 +1498 +1498 +1499 +1499 +1500 +1500 +1500 +1501 +1501 +1501 +1502 +1502 +1502 +1503 +1503 +1503 +1504 +1504 +1505 +1505 +1505 +1506 +1506 +1506 +1507 +1507 +1507 +1508 +1508 +1508 +1509 +1509 +1510 +1510 +1510 +1511 +1511 +1511 +1512 +1512 +1512 +1513 +1513 +1513 +1514 +1514 +1515 +1515 +1515 +1516 +1516 +1516 +1517 +1517 +1517 +1518 +1518 +1518 +1519 +1519 +1520 +1520 +1520 +1521 +1521 +1521 +1522 +1522 +1522 +1523 +1523 +1523 +1524 +1524 +1525 +1525 +1525 +1526 +1526 +1526 +1527 +1527 +1527 +1528 +1528 +1528 +1529 +1529 +1530 +1530 +1530 +1531 +1531 +1531 +1532 +1532 +1532 +1533 +1533 +1533 +1534 +1534 +1535 +1535 +1535 +1536 +1536 +1536 +1537 +1537 +1537 +1538 +1538 +1538 +1539 +1539 +1540 +1540 +1540 +1541 +1541 +1541 +1542 +1542 +1542 +1543 +1543 +1543 +1544 +1544 +1545 +1545 +1545 +1546 +1546 +1546 +1547 +1547 +1547 +1548 +1548 +1548 +1549 +1549 +1550 +1550 +1551 +1551 +1552 +1552 +1553 +1553 +1554 +1555 +1555 +1556 +1556 +1557 +1557 +1558 +1558 +1559 +1560 +1560 +1561 +1561 +1562 +1562 +1563 +1563 +1564 +1565 +1565 +1566 +1566 +1567 +1567 +1568 +1568 +1569 +1570 +1570 +1571 +1571 +1572 +1572 +1573 +1573 +1574 +1575 +1575 +1576 +1576 +1577 +1577 +1578 +1578 +1579 +1580 +1580 +1581 +1581 +1582 +1582 +1583 +1583 +1584 +1585 +1585 +1586 +1586 +1587 +1587 +1588 +1588 +1589 +1590 +1590 +1591 +1591 +1592 +1592 +1593 +1593 +1594 +1595 +1596 +1597 +1598 +995 +990 +985 +980 +975 +996 +991 +986 +981 +976 +997 +992 +987 +982 +977 +998 +993 +988 +983 +978 +999 +994 +989 +984 +979 +804 +803 +802 +801 +800 +809 +808 +807 +806 +805 +814 +813 +812 +811 +810 +819 +818 +817 +816 +815 +824 +823 +822 +821 +820 +954 +953 +952 +951 +950 +959 +958 +957 +956 +955 +964 +963 +962 +961 +960 +969 +968 +967 +966 +965 +974 +973 +972 +971 +970 +1354 +1353 +1352 +1351 +1350 +1359 +1358 +1357 +1356 +1355 +1364 +1363 +1362 +1361 +1360 +1369 +1368 +1367 +1366 +1365 +1374 +1373 +1372 +1371 +1370 +1395 +1390 +1385 +1380 +1375 +1396 +1391 +1386 +1381 +1376 +1397 +1392 +1387 +1382 +1377 +1398 +1393 +1388 +1383 +1378 +1399 +1394 +1389 +1384 +1379 +1204 +1203 +1202 +1201 +1200 +1209 +1208 +1207 +1206 +1205 +1214 +1213 +1212 +1211 +1210 +1219 +1218 +1217 +1216 +1215 +1224 +1223 +1222 +1221 +1220 +1579 +1578 +1577 +1576 +1575 +1584 +1583 +1582 +1581 +1580 +1589 +1588 +1587 +1586 +1585 +1594 +1593 +1592 +1591 +1590 +1599 +1598 +1597 +1596 +1595 +1445 +1440 +1435 +1430 +1425 +1446 +1441 +1436 +1431 +1426 +1447 +1442 +1437 +1432 +1427 +1448 +1443 +1438 +1433 +1428 +1449 +1444 +1439 +1434 +1429 +1404 +1403 +1402 +1401 +1400 +1409 +1408 +1407 +1406 +1405 +1414 +1413 +1412 +1411 +1410 +1419 +1418 +1417 +1416 +1415 +1424 +1423 +1422 +1421 +1420 +1004 +1003 +1002 +1001 +1000 +1009 +1008 +1007 +1006 +1005 +1014 +1013 +1012 +1011 +1010 +1019 +1018 +1017 +1016 +1015 +1024 +1023 +1022 +1021 +1020 +1179 +1178 +1177 +1176 +1175 +1184 +1183 +1182 +1181 +1180 +1189 +1188 +1187 +1186 +1185 +1194 +1193 +1192 +1191 +1190 +1199 +1198 +1197 +1196 +1195 +1045 +1040 +1035 +1030 +1025 +1046 +1041 +1036 +1031 +1026 +1047 +1042 +1037 +1032 +1027 +1048 +1043 +1038 +1033 +1028 +1049 +1044 +1039 +1034 +1029 +645 +640 +635 +630 +625 +646 +641 +636 +631 +626 +647 +642 +637 +632 +627 +648 +643 +638 +633 +628 +649 +644 +639 +634 +629 +604 +603 +602 +601 +600 +609 +608 +607 +606 +605 +614 +613 +612 +611 +610 +619 +618 +617 +616 +615 +624 +623 +622 +621 +620 +779 +778 +777 +776 +775 +784 +783 +782 +781 +780 +789 +788 +787 +786 +785 +794 +793 +792 +791 +790 +799 +798 +797 +796 +795 +204 +203 +202 +201 +200 +209 +208 +207 +206 +205 +214 +213 +212 +211 +210 +219 +218 +217 +216 +215 +224 +223 +222 +221 +220 +379 +378 +377 +376 +375 +384 +383 +382 +381 +380 +389 +388 +387 +386 +385 +394 +393 +392 +391 +390 +399 +398 +397 +396 +395 +245 +240 +235 +230 +225 +246 +241 +236 +231 +226 +247 +242 +237 +232 +227 +248 +243 +238 +233 +228 +249 +244 +239 +234 +229 +404 +403 +402 +401 +400 +409 +408 +407 +406 +405 +414 +413 +412 +411 +410 +419 +418 +417 +416 +415 +424 +423 +422 +421 +420 +554 +553 +552 +551 +550 +559 +558 +557 +556 +555 +564 +563 +562 +561 +560 +569 +568 +567 +566 +565 +574 +573 +572 +571 +570 +595 +590 +585 +580 +575 +596 +591 +586 +581 +576 +597 +592 +587 +582 +577 +598 +593 +588 +583 +578 +599 +594 +589 +584 +579 +195 +190 +185 +180 +175 +196 +191 +186 +181 +176 +197 +192 +187 +182 +177 +198 +193 +188 +183 +178 +199 +194 +189 +184 +179 +4 +3 +2 +1 +0 +9 +8 +7 +6 +5 +14 +13 +12 +11 +10 +19 +18 +17 +16 +15 +24 +23 +22 +21 +20 +154 +153 +152 +151 +150 +159 +158 +157 +156 +155 +164 +163 +162 +161 +160 +169 +168 +167 +166 +165 +174 +173 +172 +171 +170 +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/constant/polyMesh/points b/tutorials/finiteArea/sphereTransport/constant/polyMesh/points new file mode 100644 index 0000000000000000000000000000000000000000..d2885cc31b3f21604fab67fdb962cf3fb412e6b9 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/constant/polyMesh/points @@ -0,0 +1,1956 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class vectorField; + location "constant/polyMesh"; + object points; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1933 +( +(1 -1.891997571e-50 0) +(-1.394849083e-50 1 0) +(6.123031769e-17 6.123031769e-17 -1) +(0.9876874568 9.57887364e-18 -0.1564400448) +(0.9510600093 1.892055048e-17 -0.3090062439) +(0.8910013924 2.779859921e-17 -0.4540005713) +(0.8090203149 3.598999789e-17 -0.5877806819) +(0.7071067812 4.329637285e-17 -0.7071067812) +(0.5877806819 4.95365709e-17 -0.8090203149) +(0.4540005713 5.455629832e-17 -0.8910013924) +(0.3090062439 5.823370651e-17 -0.9510600093) +(0.1564400448 6.047641676e-17 -0.9876874568) +(6.047641676e-17 0.1564400448 -0.9876874568) +(5.823370651e-17 0.3090062439 -0.9510600093) +(5.455629832e-17 0.4540005713 -0.8910013924) +(4.95365709e-17 0.5877806819 -0.8090203149) +(4.329637285e-17 0.7071067812 -0.7071067812) +(3.598999789e-17 0.8090203149 -0.5877806819) +(2.779859921e-17 0.8910013924 -0.4540005713) +(1.892055048e-17 0.9510600093 -0.3090062439) +(9.57887364e-18 0.9876874568 -0.1564400448) +(0.9876874568 0.1564400448 0) +(0.9510600093 0.3090062439 0) +(0.8910013924 0.4540005713 0) +(0.8090203149 0.5877806819 0) +(0.7071067812 0.7071067812 0) +(0.5877806819 0.8090203149 0) +(0.4540005713 0.8910013924 0) +(0.3090062439 0.9510600093 0) +(0.1564400448 0.9876874568 0) +(-1.394849083e-50 -1 0) +(9.57887364e-18 -0.9876874568 -0.1564400448) +(1.892055048e-17 -0.9510600093 -0.3090062439) +(2.779859921e-17 -0.8910013924 -0.4540005713) +(3.598999789e-17 -0.8090203149 -0.5877806819) +(4.329637285e-17 -0.7071067812 -0.7071067812) +(4.95365709e-17 -0.5877806819 -0.8090203149) +(5.455629832e-17 -0.4540005713 -0.8910013924) +(5.823370651e-17 -0.3090062439 -0.9510600093) +(6.047641676e-17 -0.1564400448 -0.9876874568) +(1.224606354e-16 -6.123031769e-17 1) +(-6.047641676e-17 -0.1564400448 0.9876874568) +(-5.823370651e-17 -0.3090062439 0.9510600093) +(-5.455629832e-17 -0.4540005713 0.8910013924) +(-4.95365709e-17 -0.5877806819 0.8090203149) +(-4.329637285e-17 -0.7071067812 0.7071067812) +(-3.598999789e-17 -0.8090203149 0.5877806819) +(-2.779859921e-17 -0.8910013924 0.4540005713) +(-1.892055048e-17 -0.9510600093 0.3090062439) +(-9.57887364e-18 -0.9876874568 0.1564400448) +(-9.57887364e-18 0.9876874568 0.1564400448) +(-1.892055048e-17 0.9510600093 0.3090062439) +(-2.779859921e-17 0.8910013924 0.4540005713) +(-3.598999789e-17 0.8090203149 0.5877806819) +(-4.329637285e-17 0.7071067812 0.7071067812) +(-4.95365709e-17 0.5877806819 0.8090203149) +(-5.455629832e-17 0.4540005713 0.8910013924) +(-5.823370651e-17 0.3090062439 0.9510600093) +(-6.047641676e-17 0.1564400448 0.9876874568) +(0.1564400448 -0.9876874568 0) +(0.3090062439 -0.9510600093 0) +(0.4540005713 -0.8910013924 0) +(0.5877806819 -0.8090203149 0) +(0.7071067812 -0.7071067812 0) +(0.8090203149 -0.5877806819 0) +(0.8910013924 -0.4540005713 0) +(0.9510600093 -0.3090062439 0) +(0.9876874568 -0.1564400448 0) +(-1 -1.891997571e-50 0) +(-0.9876874568 -0.1564400448 0) +(-0.9510600093 -0.3090062439 0) +(-0.8910013924 -0.4540005713 0) +(-0.8090203149 -0.5877806819 0) +(-0.7071067812 -0.7071067812 0) +(-0.5877806819 -0.8090203149 0) +(-0.4540005713 -0.8910013924 0) +(-0.3090062439 -0.9510600093 0) +(-0.1564400448 -0.9876874568 0) +(-0.1564400448 0.9876874568 0) +(-0.3090062439 0.9510600093 0) +(-0.4540005713 0.8910013924 0) +(-0.5877806819 0.8090203149 0) +(-0.7071067812 0.7071067812 0) +(-0.8090203149 0.5877806819 0) +(-0.8910013924 0.4540005713 0) +(-0.9510600093 0.3090062439 0) +(-0.9876874568 0.1564400448 0) +(-0.1564400448 6.047641676e-17 -0.9876874568) +(-0.3090062439 5.823370651e-17 -0.9510600093) +(-0.4540005713 5.455629832e-17 -0.8910013924) +(-0.5877806819 4.95365709e-17 -0.8090203149) +(-0.7071067812 4.329637285e-17 -0.7071067812) +(-0.8090203149 3.598999789e-17 -0.5877806819) +(-0.8910013924 2.779859921e-17 -0.4540005713) +(-0.9510600093 1.892055048e-17 -0.3090062439) +(-0.9876874568 9.57887364e-18 -0.1564400448) +(-0.9876874568 -9.57887364e-18 0.1564400448) +(-0.9510600093 -1.892055048e-17 0.3090062439) +(-0.8910013924 -2.779859921e-17 0.4540005713) +(-0.8090203149 -3.598999789e-17 0.5877806819) +(-0.7071067812 -4.329637285e-17 0.7071067812) +(-0.5877806819 -4.95365709e-17 0.8090203149) +(-0.4540005713 -5.455629832e-17 0.8910013924) +(-0.3090062439 -5.823370651e-17 0.9510600093) +(-0.1564400448 -6.047641676e-17 0.9876874568) +(0.1564400448 -6.047641676e-17 0.9876874568) +(0.3090062439 -5.823370651e-17 0.9510600093) +(0.4540005713 -5.455629832e-17 0.8910013924) +(0.5877806819 -4.95365709e-17 0.8090203149) +(0.7071067812 -4.329637285e-17 0.7071067812) +(0.8090203149 -3.598999789e-17 0.5877806819) +(0.8910013924 -2.779859921e-17 0.4540005713) +(0.9510600093 -1.892055048e-17 0.3090062439) +(0.9876874568 -9.57887364e-18 0.1564400448) +(0.590337782 0.5597868676 -0.5814980361) +(0.7067883419 0.6933877758 -0.1402270731) +(0.6902507767 0.6668289 -0.2808791259) +(0.6619588148 0.6323913243 -0.402357727) +(0.6237130324 0.5919728757 -0.5104411501) +(0.7037214004 0.1314225346 -0.6982150873) +(0.6850124368 0.2649268705 -0.6786543412) +(0.6564196782 0.3835782162 -0.6496006143) +(0.6209983337 0.4878814743 -0.6134596454) +(0.1387596705 0.6995623814 -0.7009694918) +(0.2803096612 0.6753217285 -0.6821781709) +(0.4060812342 0.6387992556 -0.6534780351) +(0.5167563208 0.5954712296 -0.6151234995) +(0.1411533779 0.7987462633 -0.584876167) +(0.2839090696 0.7702600031 -0.5710474305) +(0.41667967 0.725130576 -0.5482369017) +(0.5336054582 0.6644207025 -0.5232689032) +(0.1482741085 0.8801630283 -0.4509188756) +(0.2971360369 0.847544667 -0.4397478971) +(0.4343346307 0.7955379342 -0.4224604405) +(0.5577172169 0.7215198162 -0.4103177559) +(0.1537881283 0.9390110326 -0.3075833094) +(0.3073298166 0.9030668389 -0.3000311123) +(0.4476632609 0.8454887657 -0.2911122667) +(0.5778241524 0.7653582661 -0.283453653) +(0.1566973806 0.9754394281 -0.1548026263) +(0.3117828043 0.9381283351 -0.1506874572) +(0.455490871 0.8783360588 -0.145099394) +(0.5890776079 0.79566906 -0.1410614013) +(0.8047385954 0.5769568696 -0.1397016956) +(0.7822834525 0.5557238501 -0.2814313458) +(0.7429809628 0.5282777723 -0.4109767443) +(0.6898591398 0.5000646696 -0.5234784556) +(0.8841846308 0.4446403401 -0.1432218789) +(0.8568390843 0.4273146113 -0.2884943788) +(0.8099573266 0.4056757141 -0.4235520559) +(0.740519475 0.3903925021 -0.5470142608) +(0.9411089988 0.3031743806 -0.1496634469) +(0.9083054477 0.2913914725 -0.3001203481) +(0.8541724033 0.2781530711 -0.4393408409) +(0.7780916811 0.268020864 -0.5681004773) +(0.9761634296 0.1524707536 -0.1544591466) +(0.9402150796 0.1461740888 -0.3076178472) +(0.8821622085 0.1385834083 -0.4500938534) +(0.8018371757 0.133192981 -0.582509033) +(0.5861209335 0.1310152862 -0.7995606582) +(0.5727319008 0.2675847093 -0.774839721) +(0.5514735168 0.3951237901 -0.7346796246) +(0.5306619615 0.5040605769 -0.681410902) +(0.4517543871 0.1415777428 -0.8808369409) +(0.4437743652 0.2812348472 -0.8508650149) +(0.4279023505 0.4136325309 -0.8036216198) +(0.4138170652 0.53409441 -0.7372235738) +(0.3080081275 0.1489125877 -0.9396574028) +(0.3020054907 0.2955530276 -0.9063338742) +(0.2911428563 0.4354343035 -0.8518408329) +(0.2816368137 0.5624205381 -0.7774084149) +(0.154723424 0.1534090364 -0.9759745538) +(0.1506488085 0.3056596491 -0.9401473903) +(0.1462969358 0.4480468053 -0.8819587671) +(0.1378200343 0.5813944117 -0.8018641882) +(0.5904022839 -0.5595792099 -0.581632402) +(0.70432511 -0.130514224 -0.6977765952) +(0.6864437747 -0.2641299358 -0.6775177645) +(0.6579021216 -0.3835430311 -0.6481200056) +(0.6218480646 -0.48780343 -0.6126604265) +(0.7063073974 -0.6938496824 -0.1403655176) +(0.6890477181 -0.6679321351 -0.2812114951) +(0.6605614988 -0.6336616419 -0.4026554729) +(0.6225656428 -0.5927469122 -0.5109433613) +(0.1386280613 -0.6993253953 -0.7012319531) +(0.2798914756 -0.6744212849 -0.6832398497) +(0.4057539519 -0.637951758 -0.65450843) +(0.5168994992 -0.5944362458 -0.616003618) +(0.1398438087 -0.5808617167 -0.8018998536) +(0.2812655013 -0.5606785688 -0.7787998846) +(0.4155904446 -0.5305700544 -0.7387692466) +(0.5328486129 -0.5015400536 -0.681564326) +(0.1478079569 -0.4469885235 -0.8822437689) +(0.2941372889 -0.4326562308 -0.852227576) +(0.4322212825 -0.4091647218 -0.803597532) +(0.5538639302 -0.3930730603 -0.7339811415) +(0.1529657929 -0.3044109072 -0.9401784223) +(0.3042901926 -0.2933806395 -0.9062754984) +(0.4463321111 -0.2785724219 -0.8504028765) +(0.5744043906 -0.2662483056 -0.7740616486) +(0.155627522 -0.1526096374 -0.9759561327) +(0.309283038 -0.1469381845 -0.9395494518) +(0.4528561793 -0.1402069599 -0.8804903686) +(0.5864575181 -0.1295498252 -0.7995526388) +(0.8029297003 -0.130466441 -0.5816204984) +(0.7799524209 -0.2668840568 -0.5660804902) +(0.7405810538 -0.3928398464 -0.5451757129) +(0.689075303 -0.5023081387 -0.5223617144) +(0.883004066 -0.1390735929 -0.4482882502) +(0.855822145 -0.2788806961 -0.4356535474) +(0.8088316646 -0.4103224683 -0.4212206195) +(0.7420743175 -0.5308666997 -0.4092752795) +(0.9407516048 -0.1470231278 -0.3055660614) +(0.9085052374 -0.2939896292 -0.2969652025) +(0.8551331616 -0.4305229391 -0.2887858633) +(0.780553613 -0.5577112935 -0.2823015593) +(0.9761761175 -0.1530472625 -0.1538074219) +(0.9407010905 -0.3047391711 -0.1490486366) +(0.8834546311 -0.446098982 -0.1431908273) +(0.8040726633 -0.5778089127 -0.1400143299) +(0.5886733394 -0.7959887191 -0.1409455874) +(0.5766334225 -0.766258873 -0.2834452956) +(0.5550684531 -0.7217781532 -0.4134432366) +(0.5314765474 -0.664076349 -0.5258662208) +(0.4545404567 -0.8788021699 -0.1452574247) +(0.445308235 -0.8464185794 -0.2920208284) +(0.4293342547 -0.7954391962 -0.4277248916) +(0.4137921111 -0.7244445079 -0.5513222686) +(0.3099147976 -0.9386334541 -0.1513937154) +(0.3037435659 -0.9031957344 -0.3032776146) +(0.2928515149 -0.8472190413 -0.4432357006) +(0.283065464 -0.7693969759 -0.5726274851) +(0.1557556689 -0.9754810477 -0.1554892191) +(0.1522725738 -0.9385806011 -0.3096441805) +(0.1469905926 -0.8794574782 -0.452712171) +(0.1388246261 -0.7986750525 -0.5855304294) +(0.5903446624 -0.5597773494 0.5815002138) +(0.703721834 -0.1314222984 0.6982146947) +(0.6850147191 -0.2649256984 0.678652495) +(0.6564244712 -0.3835757378 0.6495972344) +(0.6210059653 -0.4878740367 0.613457835) +(0.1387596937 -0.6995623949 0.7009694737) +(0.2803102688 -0.6753218643 0.6821777868) +(0.4060824756 -0.6387999502 0.6534765847) +(0.5167710087 -0.5954485971 0.6151330691) +(0.7067894979 -0.6933865044 0.1402275338) +(0.6902553854 -0.6668285488 0.2808686336) +(0.6619557816 -0.632384828 0.4023729271) +(0.623717738 -0.5919654271 0.5104440385) +(0.8047387326 -0.576956682 0.13970168) +(0.7823038368 -0.55572934 0.2813638349) +(0.7429907793 -0.5282767758 0.4109602781) +(0.6898683507 -0.5000599985 0.5234707792) +(0.8841846364 -0.4446403294 0.1432218776) +(0.8568394087 -0.4273143773 0.2884937619) +(0.8099650733 -0.4056744165 0.4235384846) +(0.7405256388 -0.390389652 0.5470079505) +(0.9411090016 -0.3031743743 0.1496634421) +(0.9083055921 -0.2913913391 0.3001200408) +(0.8541751793 -0.278152047 0.4393360921) +(0.7780944708 -0.2680194999 0.5680972999) +(0.9761634305 -0.1524707507 0.1544591439) +(0.9402151239 -0.1461740315 0.307617739) +(0.8821628712 -0.1385829626 0.4500926916) +(0.8018379008 -0.1331925173 0.5825081409) +(0.5861209393 -0.1310152719 0.7995606562) +(0.5727324634 -0.2675846575 0.774839323) +(0.5514772672 -0.3951206013 0.7346785244) +(0.5306698447 -0.5040521646 0.6814109856) +(0.4517543987 -0.1415777395 0.8808369355) +(0.4437744023 -0.2812348462 0.8508649958) +(0.4279028236 -0.4136327252 0.8036212679) +(0.4138197562 -0.5340923855 0.73722353) +(0.3080081307 -0.148912587 0.9396574018) +(0.3020055529 -0.2955530552 0.9063338444) +(0.2911430379 -0.4354343993 0.8518407219) +(0.2816376271 -0.562420085 0.777408448) +(0.1547234249 -0.1534090363 0.9759745536) +(0.1506488087 -0.3056596493 0.9401473902) +(0.1462969983 -0.4480468426 0.8819587377) +(0.1378200861 -0.5813944479 0.8018641529) +(0.1411533806 -0.7987462643 0.584876165) +(0.2839090928 -0.7702600144 0.5710474037) +(0.4166952156 -0.7251288638 0.5482273508) +(0.5336129559 -0.664410229 0.523274556) +(0.1482741092 -0.8801630285 0.450918875) +(0.2971361432 -0.8475446547 0.4397478489) +(0.4343397633 -0.79553643 0.4224579961) +(0.5577207154 -0.7215141878 0.4103228979) +(0.1537881288 -0.9390110326 0.3075833091) +(0.3073298767 -0.9030668254 0.3000310914) +(0.4476653685 -0.8454878569 0.2911116655) +(0.577826863 -0.7653556972 0.2834550638) +(0.1566973808 -0.975439428 0.1548026262) +(0.3117828227 -0.9381283298 0.1506874524) +(0.4554913819 -0.8783358161 0.1450992598) +(0.5890784179 -0.7956684537 0.1410614379) +(0.5597868676 0.590337782 0.5814980361) +(0.6933877758 0.7067883419 0.1402270731) +(0.6668289 0.6902507767 0.2808791259) +(0.6323913243 0.6619588148 0.402357727) +(0.5919728757 0.6237130324 0.5104411501) +(0.1314225346 0.7037214004 0.6982150873) +(0.2649268705 0.6850124368 0.6786543412) +(0.3835782162 0.6564196782 0.6496006143) +(0.4878814743 0.6209983337 0.6134596454) +(0.6995623814 0.1387596705 0.7009694918) +(0.6753217285 0.2803096612 0.6821781709) +(0.6387992556 0.4060812342 0.6534780351) +(0.5954712296 0.5167563208 0.6151234995) +(0.7987462633 0.1411533779 0.584876167) +(0.7702600031 0.2839090696 0.5710474305) +(0.725130576 0.41667967 0.5482369017) +(0.6644207025 0.5336054582 0.5232689032) +(0.8801630283 0.1482741085 0.4509188756) +(0.847544667 0.2971360369 0.4397478971) +(0.7955379342 0.4343346307 0.4224604405) +(0.7215198162 0.5577172169 0.4103177559) +(0.9390110326 0.1537881283 0.3075833094) +(0.9030668389 0.3073298166 0.3000311123) +(0.8454887657 0.4476632609 0.2911122667) +(0.7653582661 0.5778241524 0.283453653) +(0.9754394281 0.1566973806 0.1548026263) +(0.9381283351 0.3117828043 0.1506874572) +(0.8783360588 0.455490871 0.145099394) +(0.79566906 0.5890776079 0.1410614013) +(0.5769568696 0.8047385954 0.1397016956) +(0.5557238501 0.7822834525 0.2814313458) +(0.5282777723 0.7429809628 0.4109767443) +(0.5000646696 0.6898591398 0.5234784556) +(0.4446403401 0.8841846308 0.1432218789) +(0.4273146113 0.8568390843 0.2884943788) +(0.4056757141 0.8099573266 0.4235520559) +(0.3903925021 0.740519475 0.5470142608) +(0.3031743806 0.9411089988 0.1496634469) +(0.2913914725 0.9083054477 0.3001203481) +(0.2781530711 0.8541724033 0.4393408409) +(0.268020864 0.7780916811 0.5681004773) +(0.1524707536 0.9761634296 0.1544591466) +(0.1461740888 0.9402150796 0.3076178472) +(0.1385834083 0.8821622085 0.4500938534) +(0.133192981 0.8018371757 0.582509033) +(0.1310152862 0.5861209335 0.7995606582) +(0.2675847093 0.5727319008 0.774839721) +(0.3951237901 0.5514735168 0.7346796246) +(0.5040605769 0.5306619615 0.681410902) +(0.1415777428 0.4517543871 0.8808369409) +(0.2812348472 0.4437743652 0.8508650149) +(0.4136325309 0.4279023505 0.8036216198) +(0.53409441 0.4138170652 0.7372235738) +(0.1489125877 0.3080081275 0.9396574028) +(0.2955530276 0.3020054907 0.9063338742) +(0.4354343035 0.2911428563 0.8518408329) +(0.5624205381 0.2816368137 0.7774084149) +(0.1534090364 0.154723424 0.9759745538) +(0.3056596491 0.1506488085 0.9401473903) +(0.4480468053 0.1462969358 0.8819587671) +(0.5813944117 0.1378200343 0.8018641882) +(-0.5903977857 0.5595825622 -0.5816337428) +(-0.1386281293 0.699325441 -0.7012318941) +(-0.279891579 0.6744221988 -0.6832389053) +(-0.4057546611 0.6379541664 -0.6545056429) +(-0.5168721107 0.5944376867 -0.6160252087) +(-0.7043250743 0.1305143115 -0.6977766148) +(-0.6864445681 0.2641298973 -0.6775169756) +(-0.6579039186 0.3835429895 -0.6481182061) +(-0.6218492248 0.4878041425 -0.6126586817) +(-0.7063079289 0.6938492718 -0.1403648728) +(-0.6890501668 0.6679313241 -0.2812074214) +(-0.6605664175 0.6336612364 -0.4026480418) +(-0.62256326 0.5927521018 -0.5109402441) +(-0.5886733674 0.7959887027 -0.1409455631) +(-0.5766368894 0.7662581626 -0.2834401632) +(-0.5550699893 0.7217794352 -0.413438936) +(-0.5314720011 0.6640801482 -0.5258660179) +(-0.4545404579 0.8788021695 -0.1452574236) +(-0.4453083095 0.8464185667 -0.2920207519) +(-0.4293376525 0.7954397856 -0.4277203849) +(-0.4137919017 0.7244462282 -0.5513201653) +(-0.309914798 0.938633454 -0.151393715) +(-0.3037436047 0.903195735 -0.3032775741) +(-0.2928525317 0.8472193563 -0.4432344266) +(-0.2830656935 0.7693975751 -0.5726265664) +(-0.1557556691 0.9754810477 -0.1554892189) +(-0.1522725868 0.9385806033 -0.3096441674) +(-0.1469908771 0.8794576161 -0.4527118106) +(-0.1388247622 0.7986751209 -0.5855303038) +(-0.1398438163 0.5808617223 -0.8018998483) +(-0.2812655511 0.5606786605 -0.7787998006) +(-0.4156297157 0.5305620021 -0.7387529366) +(-0.5328496933 0.501538472 -0.6815646451) +(-0.1478080689 0.44698853 -0.8822437468) +(-0.2941377106 0.4326562291 -0.8522274313) +(-0.4322318579 0.4091634931 -0.8035924695) +(-0.5538670395 0.393072382 -0.7339791584) +(-0.1529658232 0.3044109101 -0.9401784164) +(-0.3042911137 0.2933806315 -0.9062751918) +(-0.4463349992 0.2785723123 -0.8504013966) +(-0.5744054902 0.2662483087 -0.7740608316) +(-0.1556275298 0.1526096385 -0.9759561313) +(-0.3092830381 0.1469381849 -0.9395494517) +(-0.4528569665 0.1402069958 -0.880489958) +(-0.5864575044 0.1295499078 -0.7995526355) +(-0.8029296995 0.130466445 -0.5816204985) +(-0.7799527111 0.2668838206 -0.5660802017) +(-0.7405826938 0.3928396578 -0.5451736208) +(-0.6890784863 0.5023084286 -0.5223572363) +(-0.8830040655 0.1390735942 -0.4482882506) +(-0.8558221613 0.2788806778 -0.4356535272) +(-0.8088326552 0.4103217482 -0.4212194189) +(-0.7420768055 0.5308661478 -0.4092714843) +(-0.9407516049 0.1470231279 -0.3055660612) +(-0.9085052522 0.2939896076 -0.2969651788) +(-0.8551335911 0.4305225365 -0.2887851917) +(-0.7805547881 0.5577105923 -0.2822996955) +(-0.9761761176 0.1530472623 -0.1538074216) +(-0.9407010962 0.3047391592 -0.1490486242) +(-0.883454713 0.4460988626 -0.1431906941) +(-0.8040728791 0.5778086945 -0.1400139909) +(-0.5903484724 0.5597829838 0.5814909219) +(-0.1387596638 0.6995624098 0.7009694647) +(-0.2803100443 0.6753220702 0.6821776752) +(-0.4060814479 0.6388016264 0.6534755848) +(-0.5167737791 0.5954577806 0.615121852) +(-0.7067890146 0.6933872355 0.1402263545) +(-0.6902535071 0.6668267264 0.2808775763) +(-0.6619647654 0.6323865507 0.4023554396) +(-0.6237257055 0.5919617654 0.5104385492) +(-0.7037214795 0.1314222824 0.698215055) +(-0.6850194488 0.2649136451 0.678652426) +(-0.6564270433 0.3835765029 0.6495941835) +(-0.6210106057 0.487877364 0.6134504913) +(-0.5861209386 0.1310152813 0.7995606553) +(-0.5727504038 0.2675281358 0.7748455791) +(-0.5514846995 0.3951045178 0.7346815951) +(-0.5306740807 0.5040498479 0.6814094004) +(-0.4517544149 0.1415776385 0.8808369434) +(-0.443774475 0.2812344664 0.8508650835) +(-0.4279062567 0.413620817 0.803625569) +(-0.4138211916 0.5340899551 0.737224485) +(-0.3080081345 0.148912561 0.9396574047) +(-0.3020057481 0.2955520964 0.9063340921) +(-0.2911437666 0.4354314018 0.851842005) +(-0.2816381105 0.5624188906 0.7774091369) +(-0.1547234257 0.1534090298 0.9759745546) +(-0.1506488083 0.3056596494 0.9401473902) +(-0.1462971418 0.448046073 0.8819591049) +(-0.1378200228 0.5813944795 0.8018641409) +(-0.1411533775 0.7987462657 0.5848761638) +(-0.2839090675 0.7702600372 0.5710473855) +(-0.4166933158 0.7251313755 0.5482254726) +(-0.5336173032 0.6644136278 0.5232658072) +(-0.1482741083 0.8801630288 0.4509188746) +(-0.2971361093 0.8475446831 0.4397478172) +(-0.4343387135 0.7955375656 0.422456937) +(-0.5577235801 0.721516284 0.4103153179) +(-0.1537881284 0.9390110327 0.3075833089) +(-0.3073298553 0.9030668396 0.3000310704) +(-0.4476648973 0.8454883534 0.2911109479) +(-0.5778269456 0.7653567369 0.2834520882) +(-0.1566973806 0.9754394281 0.1548026261) +(-0.3117828147 0.9381283337 0.1506874448) +(-0.45549121 0.8783359346 0.145099082) +(-0.5890782088 0.7956686885 0.1410609874) +(-0.804738663 0.5769567996 0.1397015954) +(-0.782284759 0.5557227094 0.2814299666) +(-0.7429842837 0.5282755677 0.4109735744) +(-0.6898647134 0.5000642308 0.5234715295) +(-0.8841846336 0.4446403363 0.1432218732) +(-0.8568391817 0.4273145101 0.2884942392) +(-0.8099584283 0.4056747168 0.4235509044) +(-0.7405230901 0.390391701 0.5470099385) +(-0.9411090001 0.3031743782 0.1496634438) +(-0.9083054873 0.2913914185 0.3001202808) +(-0.854172853 0.2781526368 0.4393402417) +(-0.7780928946 0.2680204355 0.5680990173) +(-0.97616343 0.1524707525 0.1544591452) +(-0.9402150919 0.1461740669 0.3076178199) +(-0.8821623201 0.1385832503 0.4500936833) +(-0.8018373924 0.1331928543 0.5825087637) +(-0.5904022839 -0.5595792099 0.581632402) +(-0.70432511 -0.130514224 0.6977765952) +(-0.6864437747 -0.2641299358 0.6775177645) +(-0.6579021216 -0.3835430311 0.6481200056) +(-0.6218480646 -0.48780343 0.6126604265) +(-0.7063073974 -0.6938496824 0.1403655176) +(-0.6890477181 -0.6679321351 0.2812114951) +(-0.6605614988 -0.6336616419 0.4026554729) +(-0.6225656428 -0.5927469122 0.5109433613) +(-0.1386280613 -0.6993253953 0.7012319531) +(-0.2798914756 -0.6744212849 0.6832398497) +(-0.4057539519 -0.637951758 0.65450843) +(-0.5168994992 -0.5944362458 0.616003618) +(-0.1398438087 -0.5808617167 0.8018998536) +(-0.2812655013 -0.5606785688 0.7787998846) +(-0.4155904446 -0.5305700544 0.7387692466) +(-0.5328486129 -0.5015400536 0.681564326) +(-0.1478079569 -0.4469885235 0.8822437689) +(-0.2941372889 -0.4326562308 0.852227576) +(-0.4322212825 -0.4091647218 0.803597532) +(-0.5538639302 -0.3930730603 0.7339811415) +(-0.1529657929 -0.3044109072 0.9401784223) +(-0.3042901926 -0.2933806395 0.9062754984) +(-0.4463321111 -0.2785724219 0.8504028765) +(-0.5744043906 -0.2662483056 0.7740616486) +(-0.155627522 -0.1526096374 0.9759561327) +(-0.309283038 -0.1469381845 0.9395494518) +(-0.4528561793 -0.1402069599 0.8804903686) +(-0.5864575181 -0.1295498252 0.7995526388) +(-0.8029297003 -0.130466441 0.5816204984) +(-0.7799524209 -0.2668840568 0.5660804902) +(-0.7405810538 -0.3928398464 0.5451757129) +(-0.689075303 -0.5023081387 0.5223617144) +(-0.883004066 -0.1390735929 0.4482882502) +(-0.855822145 -0.2788806961 0.4356535474) +(-0.8088316646 -0.4103224683 0.4212206195) +(-0.7420743175 -0.5308666997 0.4092752795) +(-0.9407516048 -0.1470231278 0.3055660614) +(-0.9085052374 -0.2939896292 0.2969652025) +(-0.8551331616 -0.4305229391 0.2887858633) +(-0.780553613 -0.5577112935 0.2823015593) +(-0.9761761175 -0.1530472625 0.1538074219) +(-0.9407010905 -0.3047391711 0.1490486366) +(-0.8834546311 -0.446098982 0.1431908273) +(-0.8040726633 -0.5778089127 0.1400143299) +(-0.5886733394 -0.7959887191 0.1409455874) +(-0.5766334225 -0.766258873 0.2834452956) +(-0.5550684531 -0.7217781532 0.4134432366) +(-0.5314765474 -0.664076349 0.5258662208) +(-0.4545404567 -0.8788021699 0.1452574247) +(-0.445308235 -0.8464185794 0.2920208284) +(-0.4293342547 -0.7954391962 0.4277248916) +(-0.4137921111 -0.7244445079 0.5513222686) +(-0.3099147976 -0.9386334541 0.1513937154) +(-0.3037435659 -0.9031957344 0.3032776146) +(-0.2928515149 -0.8472190413 0.4432357006) +(-0.283065464 -0.7693969759 0.5726274851) +(-0.1557556689 -0.9754810477 0.1554892191) +(-0.1522725738 -0.9385806011 0.3096441805) +(-0.1469905926 -0.8794574782 0.452712171) +(-0.1388246261 -0.7986750525 0.5855304294) +(-0.5595825622 -0.5903977857 -0.5816337428) +(-0.699325441 -0.1386281293 -0.7012318941) +(-0.6744221988 -0.279891579 -0.6832389053) +(-0.6379541664 -0.4057546611 -0.6545056429) +(-0.5944376867 -0.5168721107 -0.6160252087) +(-0.1305143115 -0.7043250743 -0.6977766148) +(-0.2641298973 -0.6864445681 -0.6775169756) +(-0.3835429895 -0.6579039186 -0.6481182061) +(-0.4878041425 -0.6218492248 -0.6126586817) +(-0.6938492718 -0.7063079289 -0.1403648728) +(-0.6679313241 -0.6890501668 -0.2812074214) +(-0.6336612364 -0.6605664175 -0.4026480418) +(-0.5927521018 -0.62256326 -0.5109402441) +(-0.7959887027 -0.5886733674 -0.1409455631) +(-0.7662581626 -0.5766368894 -0.2834401632) +(-0.7217794352 -0.5550699893 -0.413438936) +(-0.6640801482 -0.5314720011 -0.5258660179) +(-0.8788021695 -0.4545404579 -0.1452574236) +(-0.8464185667 -0.4453083095 -0.2920207519) +(-0.7954397856 -0.4293376525 -0.4277203849) +(-0.7244462282 -0.4137919017 -0.5513201653) +(-0.938633454 -0.309914798 -0.151393715) +(-0.903195735 -0.3037436047 -0.3032775741) +(-0.8472193563 -0.2928525317 -0.4432344266) +(-0.7693975751 -0.2830656935 -0.5726265664) +(-0.9754810477 -0.1557556691 -0.1554892189) +(-0.9385806033 -0.1522725868 -0.3096441674) +(-0.8794576161 -0.1469908771 -0.4527118106) +(-0.7986751209 -0.1388247622 -0.5855303038) +(-0.5808617223 -0.1398438163 -0.8018998483) +(-0.5606786605 -0.2812655511 -0.7787998006) +(-0.5305620021 -0.4156297157 -0.7387529366) +(-0.501538472 -0.5328496933 -0.6815646451) +(-0.44698853 -0.1478080689 -0.8822437468) +(-0.4326562291 -0.2941377106 -0.8522274313) +(-0.4091634931 -0.4322318579 -0.8035924695) +(-0.393072382 -0.5538670395 -0.7339791584) +(-0.3044109101 -0.1529658232 -0.9401784164) +(-0.2933806315 -0.3042911137 -0.9062751918) +(-0.2785723123 -0.4463349992 -0.8504013966) +(-0.2662483087 -0.5744054902 -0.7740608316) +(-0.1526096385 -0.1556275298 -0.9759561313) +(-0.1469381849 -0.3092830381 -0.9395494517) +(-0.1402069958 -0.4528569665 -0.880489958) +(-0.1295499078 -0.5864575044 -0.7995526355) +(-0.130466445 -0.8029296995 -0.5816204985) +(-0.2668838206 -0.7799527111 -0.5660802017) +(-0.3928396578 -0.7405826938 -0.5451736208) +(-0.5023084286 -0.6890784863 -0.5223572363) +(-0.1390735942 -0.8830040655 -0.4482882506) +(-0.2788806778 -0.8558221613 -0.4356535272) +(-0.4103217482 -0.8088326552 -0.4212194189) +(-0.5308661478 -0.7420768055 -0.4092714843) +(-0.1470231279 -0.9407516049 -0.3055660612) +(-0.2939896076 -0.9085052522 -0.2969651788) +(-0.4305225365 -0.8551335911 -0.2887851917) +(-0.5577105923 -0.7805547881 -0.2822996955) +(-0.1530472623 -0.9761761176 -0.1538074216) +(-0.3047391592 -0.9407010962 -0.1490486242) +(-0.4460988626 -0.883454713 -0.1431906941) +(-0.5778086945 -0.8040728791 -0.1400139909) +(3.089968568e-34 0 0) +(-0.8333333333 0 0) +(-0.6666666667 0 0) +(-0.5 0 0) +(-0.3333333333 0 0) +(-0.1666666667 0 0) +(1.020505295e-17 1.020505295e-17 -0.1666666667) +(2.04101059e-17 2.04101059e-17 -0.3333333333) +(3.061515885e-17 3.061515885e-17 -0.5) +(4.082021179e-17 4.082021179e-17 -0.6666666667) +(5.102526474e-17 5.102526474e-17 -0.8333333333) +(-0.6387125923 3.943285737e-17 -0.6440087011) +(-0.1424581743 4.908797112e-17 -0.8016938826) +(-0.2859492865 4.694357728e-17 -0.7666721169) +(-0.4230880412 4.435512602e-17 -0.7243981037) +(-0.5449399243 4.153361874e-17 -0.6783178711) +(-0.785365958 1.288519626e-17 -0.2104381742) +(-0.754102498 1.941628558e-17 -0.3171024799) +(-0.714543823 2.668066011e-17 -0.4357426373) +(-0.6719789256 3.378357571e-17 -0.5517458832) +(-0.1384273861 3.884990674e-17 -0.6344880806) +(-0.2782104783 3.702990445e-17 -0.6047642058) +(-0.4162434844 3.537189313e-17 -0.5776859318) +(-0.5466761348 3.399797309e-17 -0.5552473737) +(-0.1366970532 2.883964204e-17 -0.4710026524) +(-0.2790140954 2.750749874e-17 -0.4492463827) +(-0.4208947444 2.644940881e-17 -0.4319658921) +(-0.5677698522 2.624730577e-17 -0.42866519) +(-0.1367147177 1.893414104e-17 -0.3092282018) +(-0.2870348053 1.817067206e-17 -0.2967593954) +(-0.4410035229 1.794172604e-17 -0.2930202997) +(-0.592810474 1.819517873e-17 -0.297159633) +(-0.1501292295 9.529893257e-18 -0.155640108) +(-0.3024838403 8.967179959e-18 -0.1464499989) +(-0.4653400223 9.196510199e-18 -0.1501953696) +(-0.6264098546 1.02772648e-17 -0.1678460147) +(0 -0.1666666667 0) +(0 -0.3333333333 0) +(0 -0.5 0) +(0 -0.6666666667 0) +(0 -0.8333333333 0) +(3.922708241e-17 -0.6406255867 -0.64064803) +(8.726945045e-18 -0.8014956866 -0.1425265354) +(1.752467843e-17 -0.7653654524 -0.2862091704) +(2.593285274e-17 -0.7218768727 -0.4235296127) +(3.341576648e-17 -0.6750631064 -0.5457389042) +(4.917211907e-17 -0.1441469587 -0.8030681683) +(4.687414762e-17 -0.2861330622 -0.7655382071) +(4.41533352e-17 -0.4221562745 -0.7211025006) +(4.13494817e-17 -0.5460334643 -0.6753105856) +(8.497590279e-18 -0.6331334636 -0.1387807642) +(1.708091594e-17 -0.6014382143 -0.2789617395) +(2.556216192e-17 -0.5723253381 -0.4174755724) +(3.359961503e-17 -0.5486095293 -0.548741478) +(8.419571993e-18 -0.4684145174 -0.1375065868) +(1.71764105e-17 -0.4437417017 -0.2805213356) +(2.591869491e-17 -0.4229490716 -0.4232983902) +(3.501304882e-17 -0.4164436796 -0.5718253659) +(8.497552739e-18 -0.3053622419 -0.1387801511) +(1.773763156e-17 -0.2895672396 -0.2896870738) +(2.72199385e-17 -0.2809255502 -0.4445500126) +(3.669683579e-17 -0.276063468 -0.5993246022) +(9.312474326e-18 -0.1520618701 -0.1520892701) +(1.877107082e-17 -0.140185983 -0.3065649752) +(2.871907576e-17 -0.1379271779 -0.4690335906) +(3.88166378e-17 -0.1394338613 -0.6339447395) +(-0.6406255867 -0.64064803 0) +(-0.8014956866 -0.1425265354 0) +(-0.7653654524 -0.2862091704 0) +(-0.7218768727 -0.4235296127 0) +(-0.6750631064 -0.5457389042 0) +(-0.1441469587 -0.8030681683 0) +(-0.2861330622 -0.7655382071 0) +(-0.4221562745 -0.7211025006 0) +(-0.5460334643 -0.6753105856 0) +(-0.6331334636 -0.1387807642 0) +(-0.6014382143 -0.2789617395 0) +(-0.5723253381 -0.4174755724 0) +(-0.5486095293 -0.548741478 0) +(-0.4684145174 -0.1375065868 0) +(-0.4437417017 -0.2805213356 0) +(-0.4229490716 -0.4232983902 0) +(-0.4164436796 -0.5718253659 0) +(-0.3053622419 -0.1387801511 0) +(-0.2895672396 -0.2896870738 0) +(-0.2809255502 -0.4445500126 0) +(-0.276063468 -0.5993246022 0) +(-0.1520618701 -0.1520892701 0) +(-0.140185983 -0.3065649752 0) +(-0.1379271779 -0.4690335906 0) +(-0.1394338613 -0.6339447395 0) +(-0.5298162586 -0.5507140063 -0.5457101377) +(-0.1245764996 -0.6331425345 -0.6297179478) +(-0.248484078 -0.6180547711 -0.6135747792) +(-0.3625214165 -0.597808156 -0.5918514795) +(-0.4597022901 -0.5723357044 -0.5665729161) +(-0.6283358404 -0.1319062465 -0.6349735699) +(-0.6101667431 -0.2610888171 -0.6191471238) +(-0.58307056 -0.377670929 -0.5947237912) +(-0.5543477976 -0.4783836209 -0.5679653222) +(-0.627738943 -0.6347463648 -0.1318057857) +(-0.6086414211 -0.620953599 -0.2600497566) +(-0.5817369811 -0.5976058222 -0.3745506221) +(-0.5538129223 -0.572655313 -0.4740290763) +(-0.1421653171 -0.1443315156 -0.7909915887) +(-0.2831516179 -0.1427137009 -0.7633184099) +(-0.4159539741 -0.1385511359 -0.7228417761) +(-0.535351545 -0.134061098 -0.6762312197) +(-0.1389055093 -0.2865252494 -0.7618822491) +(-0.2753839928 -0.2819514302 -0.7389306126) +(-0.4034694198 -0.2736502132 -0.702094395) +(-0.5184616814 -0.2642122849 -0.6577929725) +(-0.1332429791 -0.4195352939 -0.7199811522) +(-0.2622800457 -0.4104075419 -0.6983273677) +(-0.3868479923 -0.3995159853 -0.6683402112) +(-0.4974863121 -0.3870709606 -0.6306646143) +(-0.1277014083 -0.5398162508 -0.6721998984) +(-0.254223091 -0.5281647959 -0.6548756165) +(-0.3720300972 -0.5112970462 -0.6278253227) +(-0.4748364409 -0.4917310512 -0.5956228211) +(-0.1427639673 -0.7911066079 -0.1434102617) +(-0.2836866522 -0.7634086326 -0.1411949177) +(-0.4158708531 -0.7225402598 -0.1370415472) +(-0.5351113498 -0.6756849885 -0.1336914654) +(-0.1390413473 -0.7630446204 -0.2849561794) +(-0.2741921051 -0.7393033995 -0.2773807252) +(-0.4034612555 -0.7038784596 -0.270911398) +(-0.5184570616 -0.6596638276 -0.2633755288) +(-0.1332675444 -0.7223466333 -0.4175396644) +(-0.2646646894 -0.7035136966 -0.4081702179) +(-0.3868798633 -0.6712292552 -0.3946597514) +(-0.4972972508 -0.6333260082 -0.3836172401) +(-0.127827026 -0.6745905428 -0.5367865514) +(-0.2543308651 -0.658448958 -0.5236336044) +(-0.3720218834 -0.6323888669 -0.505992175) +(-0.4745436005 -0.6002950825 -0.4863089411) +(-0.787714825 -0.1438088313 -0.1567800865) +(-0.7605042226 -0.2870213942 -0.1447964191) +(-0.7190578539 -0.4214525097 -0.1388486607) +(-0.670076919 -0.5414302633 -0.1341974359) +(-0.7580959176 -0.1421834806 -0.2962313984) +(-0.7343516329 -0.280820758 -0.2830893083) +(-0.6968580205 -0.4128522609 -0.2737672868) +(-0.6492952071 -0.5291854584 -0.2638692771) +(-0.7173090783 -0.1380870083 -0.4255403885) +(-0.6966055732 -0.2736633907 -0.4138726049) +(-0.6612458987 -0.3989898837 -0.3982762813) +(-0.619813009 -0.5120289409 -0.3850722978) +(-0.6695619753 -0.1337357604 -0.5425760308) +(-0.6495447133 -0.2648604459 -0.5284616407) +(-0.6202077849 -0.3863140282 -0.5094618872) +(-0.5840639984 -0.492066026 -0.487632314) +(-0.1453709872 -0.1462312414 -0.1472818147) +(-0.1419360245 -0.1432211725 -0.3011112881) +(-0.1393513551 -0.1407603612 -0.4589787077) +(-0.1384987115 -0.1397372319 -0.620662989) +(-0.1426504953 -0.2996969137 -0.14319732) +(-0.1402588828 -0.2906611463 -0.291383301) +(-0.1365793028 -0.2814761708 -0.4411998802) +(-0.1359944644 -0.2788236671 -0.5975631162) +(-0.1395039974 -0.4576617736 -0.1403171942) +(-0.1376060851 -0.44247449 -0.2823128672) +(-0.1331550401 -0.4246392539 -0.4242437793) +(-0.1305504682 -0.4135331515 -0.569080355) +(-0.1391328644 -0.6205128572 -0.139990719) +(-0.1348389716 -0.5976232053 -0.2775633751) +(-0.1314789311 -0.5712167107 -0.4133777682) +(-0.1280886816 -0.5455373398 -0.5437948833) +(-0.2979815493 -0.1432688296 -0.1454693998) +(-0.288611488 -0.1419766314 -0.2940436195) +(-0.278717329 -0.13785529 -0.443000472) +(-0.2766145172 -0.1385245025 -0.5997337027) +(-0.2891822185 -0.2905676502 -0.1423911775) +(-0.2820345572 -0.2841900262 -0.28555084) +(-0.2741707235 -0.2773511066 -0.4310727616) +(-0.2690576092 -0.2736069408 -0.5803736421) +(-0.280873032 -0.4421277911 -0.139159563) +(-0.274167916 -0.43094608 -0.2773960901) +(-0.2651457746 -0.4154082763 -0.4146024277) +(-0.261142656 -0.4066879374 -0.5558870248) +(-0.2760345666 -0.5971202948 -0.1369592159) +(-0.2696784674 -0.5815251458 -0.2726494345) +(-0.2597402554 -0.5557483227 -0.4031369489) +(-0.2544793439 -0.5339408093 -0.5314714377) +(-0.4554063835 -0.1401393897 -0.1447712584) +(-0.4391480913 -0.1392203739 -0.2874564345) +(-0.4199938419 -0.1347027051 -0.4277819203) +(-0.4106311228 -0.1353189619 -0.5736706014) +(-0.4403599793 -0.2826528472 -0.1407872588) +(-0.4276122724 -0.2775773174 -0.2798139504) +(-0.4111108261 -0.2707502956 -0.4175411104) +(-0.400183166 -0.2670274118 -0.557402582) +(-0.4235192085 -0.4259672452 -0.1368484733) +(-0.4119828517 -0.4170666747 -0.2714680824) +(-0.3974986688 -0.4039667276 -0.4031205948) +(-0.3852105528 -0.3942449929 -0.5346116797) +(-0.4115403422 -0.5718652549 -0.1349533062) +(-0.4010765249 -0.5584027862 -0.2665557346) +(-0.3859239757 -0.5363781904 -0.3925462923) +(-0.3729507576 -0.5157049952 -0.512170193) +(-0.6174305125 -0.1395686845 -0.1480580707) +(-0.5930900695 -0.1369445798 -0.28611693) +(-0.5667976587 -0.1351163939 -0.4203497038) +(-0.5402045284 -0.1319654836 -0.5484142562) +(-0.5956216877 -0.2788316713 -0.1401992223) +(-0.5774007845 -0.2743100884 -0.2769931291) +(-0.5510057717 -0.2661211619 -0.4079425877) +(-0.5267892748 -0.2622781473 -0.5345411872) +(-0.5690319525 -0.415539203 -0.1361397981) +(-0.5527995859 -0.4076591584 -0.2683825678) +(-0.5294635918 -0.3952142655 -0.3948179695) +(-0.5051327225 -0.3836339042 -0.5136022067) +(-0.5407152398 -0.5453880933 -0.1318437194) +(-0.526496097 -0.534568656 -0.2613927057) +(-0.5052668232 -0.515619678 -0.3818784049) +(-0.4834813873 -0.4971706397 -0.4941651168) +(-5.102526474e-17 -5.102526474e-17 0.8333333333) +(-4.082021179e-17 -4.082021179e-17 0.6666666667) +(-3.061515885e-17 -3.061515885e-17 0.5) +(-2.04101059e-17 -2.04101059e-17 0.3333333333) +(-1.020505295e-17 -1.020505295e-17 0.1666666667) +(-0.6406255867 -3.922708241e-17 0.64064803) +(-0.8014956866 -8.726945045e-18 0.1425265354) +(-0.7653654524 -1.752467843e-17 0.2862091704) +(-0.7218768727 -2.593285274e-17 0.4235296127) +(-0.6750631064 -3.341576648e-17 0.5457389042) +(-0.1441469587 -4.917211907e-17 0.8030681683) +(-0.2861330622 -4.687414762e-17 0.7655382071) +(-0.4221562745 -4.41533352e-17 0.7211025006) +(-0.5460334643 -4.13494817e-17 0.6753105856) +(-0.6331334636 -8.497590279e-18 0.1387807642) +(-0.6014382143 -1.708091594e-17 0.2789617395) +(-0.5723253381 -2.556216192e-17 0.4174755724) +(-0.5486095293 -3.359961503e-17 0.548741478) +(-0.4684145174 -8.419571993e-18 0.1375065868) +(-0.4437417017 -1.71764105e-17 0.2805213356) +(-0.4229490716 -2.591869491e-17 0.4232983902) +(-0.4164436796 -3.501304882e-17 0.5718253659) +(-0.3053622419 -8.497552739e-18 0.1387801511) +(-0.2895672396 -1.773763156e-17 0.2896870738) +(-0.2809255502 -2.72199385e-17 0.4445500126) +(-0.276063468 -3.669683579e-17 0.5993246022) +(-0.1520618701 -9.312474326e-18 0.1520892701) +(-0.140185983 -1.877107082e-17 0.3065649752) +(-0.1379271779 -2.871907576e-17 0.4690335906) +(-0.1394338613 -3.88166378e-17 0.6339447395) +(-3.922570819e-17 -0.64064803 0.6406255867) +(-4.907583552e-17 -0.1425265354 0.8014956866) +(-4.68635698e-17 -0.2862091704 0.7653654524) +(-4.420075025e-17 -0.4235296127 0.7218768727) +(-4.133432847e-17 -0.5457389042 0.6750631064) +(-8.826164074e-18 -0.8030681683 0.1441469587) +(-1.75200183e-17 -0.7655382071 0.2861330622) +(-2.58487628e-17 -0.7211025006 0.4221562745) +(-3.343380249e-17 -0.6753105856 0.5460334643) +(-3.876696312e-17 -0.1387807642 0.6331334636) +(-3.682625293e-17 -0.2789617395 0.6014382143) +(-3.504366227e-17 -0.4174755724 0.5723253381) +(-3.359153577e-17 -0.548741478 0.5486095293) +(-2.868116971e-17 -0.1375065868 0.4684145174) +(-2.717044537e-17 -0.2805213356 0.4437417017) +(-2.589730602e-17 -0.4232983902 0.4229490716) +(-2.54989788e-17 -0.5718253659 0.4164436796) +(-1.869742708e-17 -0.1387801511 0.3053622419) +(-1.773029407e-17 -0.2896870738 0.2895672396) +(-1.720116069e-17 -0.4445500126 0.2809255502) +(-1.690345385e-17 -0.5993246022 0.276063468) +(-9.310796612e-18 -0.1520892701 0.1520618701) +(-8.583632273e-18 -0.3065649752 0.140185983) +(-8.445324923e-18 -0.4690335906 0.1379271779) +(-8.537579624e-18 -0.6339447395 0.1394338613) +(-0.5504344792 -0.5303248578 0.5453675748) +(-0.1318716942 -0.6294382976 0.6325322676) +(-0.2598164723 -0.6089842414 0.616373361) +(-0.3782382699 -0.5834323005 0.5945164422) +(-0.4788233251 -0.5542215908 0.5679386026) +(-0.633826454 -0.1260025936 0.6308909974) +(-0.6201237338 -0.2498345399 0.614906199) +(-0.5977091084 -0.3620211894 0.5910699938) +(-0.5724984711 -0.4595454728 0.5658958351) +(-0.6344275373 -0.6280725786 0.1316085176) +(-0.6209906634 -0.6088316538 0.2597804327) +(-0.598013355 -0.5816522215 0.3742079481) +(-0.5729825742 -0.5537182805 0.4737005444) +(-0.1443010652 -0.1423274968 0.7905056) +(-0.286615276 -0.1390559897 0.761753799) +(-0.4199176034 -0.1334880352 0.72048317) +(-0.5402903758 -0.1282220425 0.6728970411) +(-0.1426947688 -0.2834352382 0.76228415) +(-0.2820881399 -0.2754713155 0.738320941) +(-0.4122269371 -0.2642343387 0.7002930958) +(-0.5282489559 -0.2537395842 0.6543078308) +(-0.1382613344 -0.4162626131 0.7210116161) +(-0.2713520246 -0.4022679301 0.6987022286) +(-0.3997834491 -0.3868581694 0.6677125571) +(-0.5119099284 -0.3725190773 0.6282050157) +(-0.1336809925 -0.53541299 0.6734639065) +(-0.2647698909 -0.5189665395 0.6566366084) +(-0.3867837656 -0.497227336 0.6292623811) +(-0.4925778982 -0.4743206606 0.5950873151) +(-0.1445773011 -0.7904505937 0.1443899889) +(-0.2872956864 -0.7613496983 0.1424278495) +(-0.4210204753 -0.7189577889 0.1380010129) +(-0.5412564364 -0.6704777278 0.1340775961) +(-0.1425122611 -0.7609272027 0.2864707885) +(-0.2808598371 -0.7350679172 0.2797777724) +(-0.4128479449 -0.6970049454 0.27263679) +(-0.5296448905 -0.6500095216 0.2640217691) +(-0.1380813965 -0.7191598828 0.4193413103) +(-0.2736095034 -0.696835644 0.4110404956) +(-0.3993783343 -0.6614127789 0.3971672922) +(-0.512289212 -0.6198753854 0.3848205547) +(-0.133303885 -0.6704619217 0.538467059) +(-0.2646444556 -0.6500100362 0.5263462571) +(-0.3868075878 -0.6202786241 0.5087131923) +(-0.4922247731 -0.5839144916 0.4875789368) +(-0.7912752371 -0.1432407291 0.1440194453) +(-0.7631484444 -0.2839245734 0.1409926746) +(-0.7228304332 -0.4164766006 0.1370574354) +(-0.675370744 -0.535376632 0.1333473719) +(-0.7628440941 -0.1391799484 0.2852119712) +(-0.7393743332 -0.2744972989 0.2776614982) +(-0.703967288 -0.4036985833 0.2708294988) +(-0.6590582715 -0.5182155155 0.2623708908) +(-0.7225022715 -0.1334697915 0.4179527642) +(-0.7036523871 -0.2648330603 0.4083635404) +(-0.6712398108 -0.3867786101 0.3943976254) +(-0.6334824099 -0.497184797 0.3831444369) +(-0.6753773549 -0.12871963 0.5374686688) +(-0.6581004328 -0.2545538872 0.5235878532) +(-0.6317992777 -0.3717574767 0.5054468027) +(-0.6005671205 -0.4745350415 0.4854864004) +(-0.1461716362 -0.1462685792 0.1458039343) +(-0.1432533542 -0.1427111526 0.2993486149) +(-0.1406808921 -0.1396440314 0.457446312) +(-0.1397774218 -0.1387910745 0.6196881986) +(-0.299478867 -0.1428114708 0.1426290946) +(-0.2906641195 -0.1405069486 0.2906180162) +(-0.2813503801 -0.1367974869 0.4403280713) +(-0.2790360645 -0.1363702192 0.5971497415) +(-0.4575427205 -0.1394664228 0.1400224456) +(-0.4424567202 -0.1379119113 0.2821926496) +(-0.4251117894 -0.1339752872 0.4245065644) +(-0.4142484371 -0.1319743826 0.5697599268) +(-0.6204118394 -0.138834668 0.1397191101) +(-0.5974183696 -0.1349260415 0.2773594723) +(-0.5715203736 -0.1320272803 0.4133528854) +(-0.5447527678 -0.1275440073 0.543111094) +(-0.1434616557 -0.2995703912 0.1428907539) +(-0.1418929491 -0.2898325894 0.2904662334) +(-0.1374803308 -0.2789993067 0.4393796788) +(-0.1379555649 -0.276717843 0.5970659486) +(-0.2905483723 -0.2897619792 0.1413124974) +(-0.2841137423 -0.2827196301 0.2839170823) +(-0.2773990473 -0.2744484324 0.4294516943) +(-0.2736728548 -0.2693324157 0.5790841036) +(-0.4423395704 -0.2812210548 0.1389352263) +(-0.4311178184 -0.2748012054 0.2771605466) +(-0.4163574699 -0.2664251341 0.4150325304) +(-0.4063980342 -0.260693357 0.5551189904) +(-0.598094967 -0.2767721625 0.1372345187) +(-0.5819931586 -0.2704067679 0.2730064341) +(-0.5565641414 -0.2603939707 0.4037888086) +(-0.534311879 -0.2542429832 0.5308039375) +(-0.1404098629 -0.4571965655 0.1402703907) +(-0.1391362277 -0.4410149606 0.2817062438) +(-0.1346234842 -0.4216984569 0.4228751249) +(-0.1321573127 -0.4100622506 0.5679036902) +(-0.2825970999 -0.4408670083 0.1388350745) +(-0.2772833526 -0.4283075118 0.2768676631) +(-0.269543694 -0.4110115771 0.4140580364) +(-0.2669951755 -0.4006263516 0.5554863693) +(-0.4259547602 -0.4238200805 0.1361285772) +(-0.4166414455 -0.4127620521 0.2703706433) +(-0.4040321357 -0.3976866254 0.4019111836) +(-0.3939416585 -0.3857026562 0.5336110045) +(-0.5721523415 -0.4122076249 0.1348090173) +(-0.5582416747 -0.4008990964 0.2660060905) +(-0.5375744626 -0.3864361652 0.3921887279) +(-0.5158085152 -0.3724221889 0.5111264362) +(-0.1404096251 -0.6198083391 0.1402059006) +(-0.1368593452 -0.5955869654 0.2772707829) +(-0.1350139097 -0.5685495759 0.4137166209) +(-0.132299141 -0.5419856391 0.5444100466) +(-0.2784338411 -0.5954850359 0.1372476699) +(-0.2740772856 -0.5779440248 0.2730727732) +(-0.265512648 -0.5504548128 0.4036416938) +(-0.2624313263 -0.5270774987 0.5325192001) +(-0.4149390739 -0.5690240733 0.1350308639) +(-0.4074434385 -0.552906332 0.2667279108) +(-0.3946649507 -0.5285336419 0.3928701074) +(-0.3842644204 -0.505270481 0.5127645137) +(-0.5449066047 -0.541355157 0.1314380209) +(-0.5344721105 -0.5268339559 0.2607757702) +(-0.5163554718 -0.5049265307 0.3811265734) +(-0.4976580936 -0.4839300939 0.4936810473) +(0.8333333333 0 0) +(0.6666666667 0 0) +(0.5 0 0) +(0.3333333333 0 0) +(0.1666666667 0 0) +(0.6406255867 3.922708241e-17 -0.64064803) +(0.8014956866 8.726945045e-18 -0.1425265354) +(0.7653654524 1.752467843e-17 -0.2862091704) +(0.7218768727 2.593285274e-17 -0.4235296127) +(0.6750631064 3.341576648e-17 -0.5457389042) +(0.1441469587 4.917211907e-17 -0.8030681683) +(0.2861330622 4.687414762e-17 -0.7655382071) +(0.4221562745 4.41533352e-17 -0.7211025006) +(0.5460334643 4.13494817e-17 -0.6753105856) +(0.6331334636 8.497590279e-18 -0.1387807642) +(0.6014382143 1.708091594e-17 -0.2789617395) +(0.5723253381 2.556216192e-17 -0.4174755724) +(0.5486095293 3.359961503e-17 -0.548741478) +(0.4684145174 8.419571993e-18 -0.1375065868) +(0.4437417017 1.71764105e-17 -0.2805213356) +(0.4229490716 2.591869491e-17 -0.4232983902) +(0.4164436796 3.501304882e-17 -0.5718253659) +(0.3053622419 8.497552739e-18 -0.1387801511) +(0.2895672396 1.773763156e-17 -0.2896870738) +(0.2809255502 2.72199385e-17 -0.4445500126) +(0.276063468 3.669683579e-17 -0.5993246022) +(0.1520618701 9.312474326e-18 -0.1520892701) +(0.140185983 1.877107082e-17 -0.3065649752) +(0.1379271779 2.871907576e-17 -0.4690335906) +(0.1394338613 3.88166378e-17 -0.6339447395) +(0.64064803 -0.6406255867 0) +(0.1425265354 -0.8014956866 0) +(0.2862091704 -0.7653654524 0) +(0.4235296127 -0.7218768727 0) +(0.5457389042 -0.6750631064 0) +(0.8030681683 -0.1441469587 0) +(0.7655382071 -0.2861330622 0) +(0.7211025006 -0.4221562745 0) +(0.6753105856 -0.5460334643 0) +(0.1387807642 -0.6331334636 0) +(0.2789617395 -0.6014382143 0) +(0.4174755724 -0.5723253381 0) +(0.548741478 -0.5486095293 0) +(0.1375065868 -0.4684145174 0) +(0.2805213356 -0.4437417017 0) +(0.4232983902 -0.4229490716 0) +(0.5718253659 -0.4164436796 0) +(0.1387801511 -0.3053622419 0) +(0.2896870738 -0.2895672396 0) +(0.4445500126 -0.2809255502 0) +(0.5993246022 -0.276063468 0) +(0.1520892701 -0.1520618701 0) +(0.3065649752 -0.140185983 0) +(0.4690335906 -0.1379271779 0) +(0.6339447395 -0.1394338613 0) +(0.5507872007 -0.5299118635 -0.5454759217) +(0.6331765996 -0.1246093311 -0.629609723) +(0.6181278261 -0.2485190716 -0.6133779976) +(0.5978884637 -0.3625840463 -0.5916295951) +(0.5724037734 -0.4597794181 -0.5663524733) +(0.1319421204 -0.6294516089 -0.6327436672) +(0.2611584998 -0.6107743851 -0.617914613) +(0.3777529196 -0.5833849634 -0.5940445743) +(0.4784545474 -0.554505854 -0.5676095228) +(0.6347472377 -0.6278030131 -0.1316677513) +(0.620963369 -0.6087228115 -0.2598493096) +(0.5976045034 -0.5818238499 -0.3743121417) +(0.5726857436 -0.553897338 -0.4737984833) +(0.14495321 -0.1430535646 -0.7912247729) +(0.1428343685 -0.2835809143 -0.7623811109) +(0.1385800182 -0.4162177557 -0.7210687208) +(0.1340867674 -0.5361116248 -0.6741498128) +(0.2863878361 -0.1389724642 -0.7614301563) +(0.2820145845 -0.2756254135 -0.7382953077) +(0.2737119766 -0.4037603084 -0.701124414) +(0.2642779964 -0.5189469427 -0.6565652374) +(0.4195042301 -0.1332968101 -0.7197308509) +(0.4104482033 -0.2624143317 -0.6978662957) +(0.3995943861 -0.3870329014 -0.6677795074) +(0.3871487618 -0.4977542853 -0.6300275045) +(0.5398541435 -0.1277327305 -0.6720298958) +(0.5282299982 -0.2542993303 -0.6545992764) +(0.5113825816 -0.3721365588 -0.6274863763) +(0.4918021127 -0.4749788869 -0.5952538268) +(0.7910957055 -0.1427826368 -0.1433314847) +(0.7634300334 -0.2837241451 -0.1411014656) +(0.7225601094 -0.4159182651 -0.1369104862) +(0.6757100977 -0.5351626239 -0.1335533971) +(0.7630944053 -0.1390835734 -0.2848588781) +(0.7393133526 -0.2742568868 -0.2771674227) +(0.7039059458 -0.4035275215 -0.2706977709) +(0.6596902876 -0.5185361339 -0.2631430981) +(0.7223483903 -0.1332930363 -0.4174067471) +(0.7035304152 -0.264721028 -0.4079569912) +(0.6712531041 -0.3869639529 -0.3943737468) +(0.6333519369 -0.4973789433 -0.3833617328) +(0.6746122727 -0.1278517732 -0.5366508594) +(0.658490856 -0.2543855896 -0.5234134077) +(0.6324374385 -0.3720856174 -0.5057405916) +(0.6003243114 -0.4746180283 -0.4860478861) +(0.1450691512 -0.7903749683 -0.1448765903) +(0.2874877023 -0.7610903168 -0.1422932132) +(0.4216224705 -0.7192067014 -0.1381866709) +(0.5414791648 -0.6701606352 -0.133943735) +(0.1426547222 -0.7608605395 -0.2869102835) +(0.2810503574 -0.7351157061 -0.280272592) +(0.4129541523 -0.6970937253 -0.2728197748) +(0.5292079506 -0.6494446804 -0.263441205) +(0.1382064967 -0.7193785267 -0.4198961209) +(0.2737590403 -0.6973490934 -0.4115711036) +(0.3990481765 -0.6615578969 -0.3972773764) +(0.5120639551 -0.6199423388 -0.3846353178) +(0.1337971222 -0.6709618157 -0.5390587973) +(0.2649257094 -0.6502040888 -0.5267241192) +(0.3863674215 -0.6205215467 -0.5086158601) +(0.4921045697 -0.5842045049 -0.4872129105) +(0.1462346852 -0.1461484823 -0.1458640845) +(0.1425835952 -0.142327204 -0.2993234899) +(0.1404131082 -0.1396567365 -0.4570842896) +(0.1394992007 -0.1385415329 -0.6191382213) +(0.2998660496 -0.1430318953 -0.1426995388) +(0.2904035412 -0.1405021016 -0.290620984) +(0.2821204942 -0.137168413 -0.4405824093) +(0.2787511605 -0.1361377176 -0.5968777525) +(0.4577911451 -0.1396599138 -0.140089902) +(0.4424222004 -0.1377640815 -0.2819528351) +(0.4249520297 -0.1333920951 -0.4238097182) +(0.4137014364 -0.1307280668 -0.5686589916) +(0.6205518289 -0.1392007131 -0.1398750342) +(0.597759112 -0.1349580352 -0.2773354907) +(0.5712670366 -0.1315699533 -0.4131287381) +(0.545447639 -0.1281372414 -0.5435407833) +(0.1437457098 -0.2995076177 -0.1436648018) +(0.1415287839 -0.2892174799 -0.2902870988) +(0.1380936152 -0.2800136904 -0.4401593711) +(0.1385900306 -0.2767884239 -0.5973625307) +(0.2909037429 -0.2897899705 -0.1416087582) +(0.2850099673 -0.2830337026 -0.2844389006) +(0.2775521277 -0.2748277457 -0.429621532) +(0.2737668946 -0.2695424895 -0.5791138974) +(0.4423312438 -0.2811185003 -0.1387671129) +(0.4313071872 -0.2745603177 -0.2767122366) +(0.4154845143 -0.2654621499 -0.4137127142) +(0.4067199057 -0.2613441704 -0.5551845618) +(0.5971639315 -0.2761295653 -0.1367075765) +(0.5816314278 -0.2698174426 -0.2722416214) +(0.5557652329 -0.259889407 -0.4026177502) +(0.5339520192 -0.25458784 -0.5310600885) +(0.1403492418 -0.4570409842 -0.1403845086) +(0.1392746479 -0.4407364936 -0.2818457774) +(0.1347835162 -0.4216360386 -0.4230143783) +(0.1353600064 -0.4114018604 -0.5703385061) +(0.2828535194 -0.4410626587 -0.1391891195) +(0.2778295671 -0.428569704 -0.2774695968) +(0.2708521813 -0.4119205621 -0.4151712394) +(0.2670680448 -0.4006301615 -0.5555963035) +(0.4260991581 -0.4237931085 -0.1361926075) +(0.4171861555 -0.4123498334 -0.2704015172) +(0.4040382922 -0.3978677068 -0.4019328964) +(0.3943175645 -0.3855097706 -0.5336293761) +(0.5719297199 -0.411656403 -0.134654774) +(0.55847774 -0.4012434045 -0.2660481478) +(0.5364215122 -0.3861007276 -0.3919479331) +(0.5157761255 -0.3731020719 -0.5116215197) +(0.1400632417 -0.6195545069 -0.1401078176) +(0.1371566055 -0.5958307805 -0.2780723499) +(0.1352089368 -0.5688737364 -0.4143057632) +(0.1320142983 -0.5414288408 -0.544395454) +(0.279099259 -0.5963313409 -0.1378109783) +(0.2744828353 -0.5783791725 -0.2738885994) +(0.2662283337 -0.5519065465 -0.4051371838) +(0.2623674133 -0.5274151576 -0.5324429014) +(0.4156700238 -0.5692681256 -0.1353368605) +(0.4077631915 -0.5531808316 -0.2671457517) +(0.3953073159 -0.5298405108 -0.3935358366) +(0.3837183924 -0.5054684004 -0.5125069925) +(0.5454495234 -0.5408565651 -0.1314668639) +(0.5346179643 -0.5266804139 -0.2608315463) +(0.5156789221 -0.5054556552 -0.3812122529) +(0.4972388366 -0.4836492774 -0.4936033564) +(0.64064803 -3.922570819e-17 0.6406255867) +(0.1425265354 -4.907583552e-17 0.8014956866) +(0.2862091704 -4.68635698e-17 0.7653654524) +(0.4235296127 -4.420075025e-17 0.7218768727) +(0.5457389042 -4.133432847e-17 0.6750631064) +(0.8030681683 -8.826164074e-18 0.1441469587) +(0.7655382071 -1.75200183e-17 0.2861330622) +(0.7211025006 -2.58487628e-17 0.4221562745) +(0.6753105856 -3.343380249e-17 0.5460334643) +(0.1387807642 -3.876696312e-17 0.6331334636) +(0.2789617395 -3.682625293e-17 0.6014382143) +(0.4174755724 -3.504366227e-17 0.5723253381) +(0.548741478 -3.359153577e-17 0.5486095293) +(0.1375065868 -2.868116971e-17 0.4684145174) +(0.2805213356 -2.717044537e-17 0.4437417017) +(0.4232983902 -2.589730602e-17 0.4229490716) +(0.5718253659 -2.54989788e-17 0.4164436796) +(0.1387801511 -1.869742708e-17 0.3053622419) +(0.2896870738 -1.773029407e-17 0.2895672396) +(0.4445500126 -1.720116069e-17 0.2809255502) +(0.5993246022 -1.690345385e-17 0.276063468) +(0.1520892701 -9.310796612e-18 0.1520618701) +(0.3065649752 -8.583632273e-18 0.140185983) +(0.4690335906 -8.445324923e-18 0.1379271779) +(0.6339447395 -8.537579624e-18 0.1394338613) +(0.5509690756 -0.5301136657 0.5451518455) +(0.6326880075 -0.1249756442 0.6300349869) +(0.6172391131 -0.2489366576 0.614124191) +(0.5969990242 -0.3626742099 0.5922900741) +(0.5721742987 -0.4599823521 0.5665950054) +(0.1320853263 -0.6299054068 0.6322738504) +(0.2613826176 -0.6115704055 0.6169985975) +(0.3779893729 -0.5843318764 0.5929947776) +(0.4786361204 -0.554884512 0.5667583328) +(0.6351973233 -0.6273452081 0.1315049558) +(0.6219835695 -0.6079041649 0.2595297148) +(0.5989125573 -0.5809634677 0.3738984993) +(0.5735570181 -0.5534378249 0.4733558569) +(0.143695968 -0.142753041 0.7903007147) +(0.1419506262 -0.2841264331 0.7621897159) +(0.1376708773 -0.4167559933 0.7210978021) +(0.1335813268 -0.5365070001 0.6738191748) +(0.2859550384 -0.1397956667 0.7618979446) +(0.2810257337 -0.2766590742 0.7383870226) +(0.2724416345 -0.4050233595 0.7008685519) +(0.2639057551 -0.520129309 0.6557469391) +(0.4195185569 -0.1340606371 0.7198688362) +(0.4094753002 -0.2634018928 0.6980364448) +(0.3981854794 -0.3886053881 0.6675951106) +(0.3866820053 -0.4990725139 0.6292734939) +(0.539160209 -0.1282194904 0.6722637045) +(0.527137881 -0.2549623573 0.6549074442) +(0.5102984742 -0.3730113551 0.6277169977) +(0.4914885219 -0.4756820573 0.5948371614) +(0.7913166483 -0.142440935 0.1438560882) +(0.7636082839 -0.2830710848 0.141546119) +(0.7229464366 -0.4152109623 0.1370377108) +(0.6761779183 -0.5346001345 0.1334682378) +(0.762839964 -0.1386207586 0.2855083731) +(0.7393015999 -0.2732305561 0.2782227487) +(0.7045827219 -0.4022602571 0.2710289028) +(0.6605750726 -0.5174852942 0.2630497864) +(0.7218803802 -0.1330746288 0.4179657613) +(0.702879394 -0.2640718945 0.4091283083) +(0.6716366024 -0.3856251554 0.3952213789) +(0.6341497057 -0.496245665 0.3836593064) +(0.674189551 -0.1283574627 0.5372868515) +(0.6572384748 -0.2544354034 0.5242597772) +(0.6322992241 -0.3715571817 0.5066342718) +(0.6006484373 -0.4739493915 0.4863893482) +(0.1454959062 -0.7906091147 0.1446786302) +(0.2882359354 -0.7609739916 0.141775588) +(0.4222900029 -0.7189863587 0.137808288) +(0.5420001706 -0.6698573957 0.133718968) +(0.1434173707 -0.7609639308 0.2860328402) +(0.2824471648 -0.7350608463 0.2790091278) +(0.4142956311 -0.6967167003 0.2718579491) +(0.5303122679 -0.6488837479 0.2627938422) +(0.1390869681 -0.719627712 0.4188877671) +(0.2754018115 -0.6975477647 0.4100447558) +(0.4009371609 -0.6613979807 0.3954660631) +(0.5134431392 -0.6196058323 0.3835646366) +(0.1349920814 -0.6718475762 0.5388132959) +(0.2658803188 -0.6507022391 0.5255665218) +(0.3872736 -0.620111255 0.506885785) +(0.493145268 -0.5842445904 0.4859603073) +(0.14851633 -0.1483483163 0.1487232167) +(0.1419261383 -0.1415773432 0.2983360989) +(0.1400085096 -0.1394411725 0.4567639353) +(0.1399355938 -0.1391831566 0.6195116832) +(0.1441238219 -0.3004028907 0.1442268073) +(0.1416529639 -0.2893383141 0.2907643797) +(0.1389543416 -0.2810166614 0.44147091) +(0.1383531585 -0.277648825 0.5973715018) +(0.1404908812 -0.4574667901 0.1404536982) +(0.1394280915 -0.4409567849 0.2818204447) +(0.1350131069 -0.4220516725 0.4228839433) +(0.1351464041 -0.412005082 0.5702378464) +(0.1402418889 -0.6197658202 0.1399360334) +(0.1374820299 -0.5956873815 0.2772664289) +(0.1355146903 -0.5690499855 0.4135531428) +(0.1318240855 -0.5418506685 0.5436472938) +(0.3010880433 -0.1437099314 0.1441737537) +(0.290257991 -0.1406089758 0.2907278144) +(0.2823711609 -0.1376352478 0.4414500106) +(0.2790649951 -0.1364082279 0.5971110966) +(0.2912328915 -0.2900890416 0.1418275017) +(0.2848330127 -0.2828027168 0.2841606071) +(0.2771770469 -0.2746480861 0.4294538918) +(0.2734155126 -0.2701603272 0.5792791055) +(0.2830575717 -0.4411837029 0.139127938) +(0.2779972065 -0.4285501928 0.2772240067) +(0.2709704749 -0.4123858021 0.4149460172) +(0.2665267866 -0.401217882 0.5553074503) +(0.2794234925 -0.5963145668 0.1375258453) +(0.2750654518 -0.5783587787 0.273264422) +(0.2667705622 -0.552166506 0.4043769474) +(0.2623772535 -0.527957568 0.5316588071) +(0.4582858806 -0.1397110847 0.1404605147) +(0.4424167489 -0.1376812072 0.2818626841) +(0.4242452232 -0.1330485277 0.4231413113) +(0.4135710848 -0.130993458 0.5687046866) +(0.4425562912 -0.2810954441 0.1388769451) +(0.43122863 -0.2744137108 0.2767336311) +(0.4153121661 -0.2655960988 0.4138055846) +(0.4062013626 -0.2618107649 0.5552762251) +(0.4263376578 -0.4237098294 0.1361415856) +(0.4174530007 -0.4122045925 0.2702569842) +(0.404155201 -0.3979453281 0.4017460703) +(0.3938598269 -0.3860214144 0.5334173699) +(0.4160435555 -0.5691244336 0.1351033169) +(0.4084113502 -0.5529787237 0.2666526144) +(0.3959480496 -0.529840767 0.3928057319) +(0.3836530694 -0.5059752697 0.5116575292) +(0.6207020809 -0.1390442752 0.1400327823) +(0.5973647874 -0.1347549394 0.2771347828) +(0.5708489114 -0.1314704872 0.4131155652) +(0.5451341629 -0.1282955653 0.5436717975) +(0.5972777205 -0.2758577235 0.136854288) +(0.5815778548 -0.269431127 0.2724811247) +(0.5554363469 -0.2596353601 0.402901322) +(0.533474111 -0.254785822 0.5313684636) +(0.5721800903 -0.4113507258 0.1346807151) +(0.5588416719 -0.4007578382 0.2661101939) +(0.5366081407 -0.3857431069 0.392078664) +(0.5153778711 -0.373310057 0.5117640563) +(0.5458450751 -0.5405523001 0.131345719) +(0.5353352019 -0.5261659457 0.2605706275) +(0.5164292972 -0.5051015427 0.3808587011) +(0.4977710828 -0.4841252726 0.4934269188) +(0 0.1666666667 0) +(0 0.3333333333 0) +(0 0.5 0) +(0 0.6666666667 0) +(0 0.8333333333 0) +(3.922570819e-17 0.64064803 -0.6406255867) +(4.907583552e-17 0.1425265354 -0.8014956866) +(4.68635698e-17 0.2862091704 -0.7653654524) +(4.420075025e-17 0.4235296127 -0.7218768727) +(4.133432847e-17 0.5457389042 -0.6750631064) +(8.826164074e-18 0.8030681683 -0.1441469587) +(1.75200183e-17 0.7655382071 -0.2861330622) +(2.58487628e-17 0.7211025006 -0.4221562745) +(3.343380249e-17 0.6753105856 -0.5460334643) +(3.876696312e-17 0.1387807642 -0.6331334636) +(3.682625293e-17 0.2789617395 -0.6014382143) +(3.504366227e-17 0.4174755724 -0.5723253381) +(3.359153577e-17 0.548741478 -0.5486095293) +(2.868116971e-17 0.1375065868 -0.4684145174) +(2.717044537e-17 0.2805213356 -0.4437417017) +(2.589730602e-17 0.4232983902 -0.4229490716) +(2.54989788e-17 0.5718253659 -0.4164436796) +(1.869742708e-17 0.1387801511 -0.3053622419) +(1.773029407e-17 0.2896870738 -0.2895672396) +(1.720116069e-17 0.4445500126 -0.2809255502) +(1.690345385e-17 0.5993246022 -0.276063468) +(9.310796612e-18 0.1520892701 -0.1520618701) +(8.583632273e-18 0.3065649752 -0.140185983) +(8.445324923e-18 0.4690335906 -0.1379271779) +(8.537579624e-18 0.6339447395 -0.1394338613) +(-0.64064803 0.6406255867 0) +(-0.1425265354 0.8014956866 0) +(-0.2862091704 0.7653654524 0) +(-0.4235296127 0.7218768727 0) +(-0.5457389042 0.6750631064 0) +(-0.8030681683 0.1441469587 0) +(-0.7655382071 0.2861330622 0) +(-0.7211025006 0.4221562745 0) +(-0.6753105856 0.5460334643 0) +(-0.1387807642 0.6331334636 0) +(-0.2789617395 0.6014382143 0) +(-0.4174755724 0.5723253381 0) +(-0.548741478 0.5486095293 0) +(-0.1375065868 0.4684145174 0) +(-0.2805213356 0.4437417017 0) +(-0.4232983902 0.4229490716 0) +(-0.5718253659 0.4164436796 0) +(-0.1387801511 0.3053622419 0) +(-0.2896870738 0.2895672396 0) +(-0.4445500126 0.2809255502 0) +(-0.5993246022 0.276063468 0) +(-0.1520892701 0.1520618701 0) +(-0.3065649752 0.140185983 0) +(-0.4690335906 0.1379271779 0) +(-0.6339447395 0.1394338613 0) +(-0.5506868199 0.5298615037 -0.5456888199) +(-0.6321891865 0.1246090749 -0.6316966892) +(-0.6174943691 0.248460342 -0.6146839473) +(-0.597564905 0.3625096435 -0.5923090303) +(-0.5722380271 0.4597214019 -0.5667098789) +(-0.131918607 0.6294509578 -0.6328165981) +(-0.2611115626 0.6107410937 -0.6180472922) +(-0.3776792883 0.5833223984 -0.594251867) +(-0.4783699689 0.5544458684 -0.5678195076) +(-0.6346702083 0.6278255093 -0.1317991927) +(-0.6209095753 0.6086918076 -0.2600261122) +(-0.5975218918 0.5818278298 -0.3745280418) +(-0.5726008656 0.5538662907 -0.4740173023) +(-0.144005918 0.1423293736 -0.7907831515) +(-0.142565469 0.2834489699 -0.7625989088) +(-0.1384882004 0.4164437105 -0.7214067444) +(-0.1340417377 0.536120046 -0.6742349991) +(-0.2863434003 0.1391058146 -0.7628304136) +(-0.281771681 0.2756251592 -0.7389580051) +(-0.2735715825 0.4037711543 -0.7015279708) +(-0.2641963608 0.518917629 -0.6568231161) +(-0.4192984003 0.1333014289 -0.7215367636) +(-0.4101516779 0.2623818276 -0.6989505296) +(-0.3993917152 0.3869865621 -0.6683238753) +(-0.3870356109 0.4976857261 -0.6303145706) +(-0.5391400499 0.1277329824 -0.674063092) +(-0.5277474617 0.2542497659 -0.6558253772) +(-0.5111081804 0.3720680643 -0.6281426066) +(-0.491654816 0.4749110084 -0.5956186517) +(-0.788522371 0.1413345943 -0.1550974727) +(-0.7628623121 0.2831580103 -0.1435601988) +(-0.7223933252 0.4157599908 -0.137555965) +(-0.6756134633 0.5351270359 -0.1337886131) +(-0.7599774167 0.1373735672 -0.2922802166) +(-0.7385722852 0.2739873411 -0.2799786685) +(-0.7036494927 0.4033719748 -0.2715480524) +(-0.6595371363 0.5184879817 -0.2635308487) +(-0.7203544177 0.1331302797 -0.4229937947) +(-0.7032199161 0.2647034271 -0.4103381088) +(-0.6709564902 0.3868885221 -0.3953632422) +(-0.6332241219 0.4973277843 -0.3837780564) +(-0.6732680428 0.1277796453 -0.5401175687) +(-0.6578556333 0.2543126738 -0.5251392361) +(-0.6321452007 0.3720287308 -0.5065688397) +(-0.6001666661 0.4745769423 -0.4864790496) +(-0.1450363309 0.7906074031 -0.1451029662) +(-0.2874417269 0.7611139344 -0.1423938131) +(-0.4215693206 0.7192014278 -0.1382979615) +(-0.5414164288 0.6701567075 -0.134073597) +(-0.1426181555 0.7608124818 -0.2868955349) +(-0.2809832868 0.7351020517 -0.2804251116) +(-0.4128833902 0.6970241292 -0.2729917661) +(-0.5291199722 0.6494066204 -0.2636605402) +(-0.1381778081 0.7192810916 -0.4197625925) +(-0.2737021795 0.6972881235 -0.4116902762) +(-0.3989495323 0.6614221096 -0.3975112068) +(-0.5119852389 0.6198642593 -0.3848700905) +(-0.1337634738 0.670995682 -0.5391516303) +(-0.2648686271 0.6501856415 -0.5269007251) +(-0.3862925233 0.6204640343 -0.5088380521) +(-0.4920267321 0.5841661062 -0.4874659258) +(-0.1478357719 0.148313811 -0.1499814693) +(-0.1410407018 0.1415771782 -0.3001712879) +(-0.1395119157 0.139526555 -0.4583145402) +(-0.1398033855 0.1390250972 -0.6205128015) +(-0.299806483 0.1436635129 -0.1465685621) +(-0.2885617373 0.1403460767 -0.2933717828) +(-0.2794454306 0.1360292415 -0.4423151199) +(-0.2786922698 0.1360687684 -0.5991353749) +(-0.4567176599 0.1396796322 -0.144836522) +(-0.4406726253 0.1377067245 -0.2874634925) +(-0.4229250702 0.1330806138 -0.428324405) +(-0.4129483163 0.1307115395 -0.5719277573) +(-0.6186579136 0.1388931075 -0.1479038746) +(-0.5954858117 0.1353077499 -0.2856623852) +(-0.5689666443 0.1315641818 -0.4192250451) +(-0.5443622127 0.1280938914 -0.5474663406) +(-0.1438156729 0.3003766604 -0.1447745622) +(-0.1410627703 0.2891044948 -0.2910311527) +(-0.1375118604 0.2798797576 -0.4406763507) +(-0.1383952792 0.2773683614 -0.5981586706) +(-0.2906974996 0.2900533793 -0.1428708559) +(-0.2842223797 0.2827234487 -0.2857568538) +(-0.2767704964 0.2744770838 -0.4310746953) +(-0.2732416208 0.2695574115 -0.5803787728) +(-0.4417961206 0.2809835807 -0.1404985135) +(-0.4301259893 0.2742863293 -0.2790096742) +(-0.4144055005 0.2650044174 -0.4157954988) +(-0.4062464977 0.2612110096 -0.5568529788) +(-0.5964155675 0.2753851699 -0.1390874576) +(-0.5801427506 0.2693515285 -0.2751112734) +(-0.5559598782 0.2603462689 -0.4060107917) +(-0.5335296645 0.2546000671 -0.5332598334) +(-0.1402742923 0.4574402932 -0.1407709043) +(-0.1390804765 0.4407636218 -0.2822213535) +(-0.1345258122 0.4214375659 -0.4234191604) +(-0.1351913727 0.4115522737 -0.5707366055) +(-0.282694573 0.4411719728 -0.1396480234) +(-0.2774728617 0.4284498382 -0.278118305) +(-0.2704820859 0.4119256559 -0.4158946154) +(-0.2668306453 0.4006332678 -0.5562093673) +(-0.4258605324 0.4237182528 -0.1368828002) +(-0.4167816373 0.4122820851 -0.2713620487) +(-0.4036413621 0.3977644424 -0.4029477799) +(-0.3939597201 0.3852801023 -0.5343947906) +(-0.5716595397 0.4113793108 -0.1354555624) +(-0.5580043906 0.4010250072 -0.2671882585) +(-0.5360867769 0.3859405869 -0.3930630724) +(-0.5154470124 0.373022971 -0.5126893063) +(-0.1399907509 0.6197463249 -0.1402469079) +(-0.1370560084 0.5955941494 -0.2778492578) +(-0.135110687 0.5686798037 -0.4142198718) +(-0.1319409828 0.5415313257 -0.5445481838) +(-0.2789836165 0.5963488588 -0.1380226586) +(-0.2743492843 0.578289391 -0.274143616) +(-0.2660592413 0.5518478124 -0.4054802784) +(-0.2622466721 0.5274018259 -0.5327845087) +(-0.4155473404 0.5692237485 -0.1355662729) +(-0.4075881594 0.5531278061 -0.2675608597) +(-0.3951144276 0.5298157914 -0.3940224739) +(-0.3835532803 0.5053677865 -0.5129985603) +(-0.5452836152 0.5408369654 -0.1318220688) +(-0.5344525588 0.5265406864 -0.2612934986) +(-0.5154836735 0.5053223356 -0.3818206874) +(-0.497057223 0.4835812397 -0.4941519483) +(-3.922708241e-17 0.6406255867 0.64064803) +(-8.726945045e-18 0.8014956866 0.1425265354) +(-1.752467843e-17 0.7653654524 0.2862091704) +(-2.593285274e-17 0.7218768727 0.4235296127) +(-3.341576648e-17 0.6750631064 0.5457389042) +(-4.917211907e-17 0.1441469587 0.8030681683) +(-4.687414762e-17 0.2861330622 0.7655382071) +(-4.41533352e-17 0.4221562745 0.7211025006) +(-4.13494817e-17 0.5460334643 0.6753105856) +(-8.497590279e-18 0.6331334636 0.1387807642) +(-1.708091594e-17 0.6014382143 0.2789617395) +(-2.556216192e-17 0.5723253381 0.4174755724) +(-3.359961503e-17 0.5486095293 0.548741478) +(-8.419571993e-18 0.4684145174 0.1375065868) +(-1.71764105e-17 0.4437417017 0.2805213356) +(-2.591869491e-17 0.4229490716 0.4232983902) +(-3.501304882e-17 0.4164436796 0.5718253659) +(-8.497552739e-18 0.3053622419 0.1387801511) +(-1.773763156e-17 0.2895672396 0.2896870738) +(-2.72199385e-17 0.2809255502 0.4445500126) +(-3.669683579e-17 0.276063468 0.5993246022) +(-9.312474326e-18 0.1520618701 0.1520892701) +(-1.877107082e-17 0.140185983 0.3065649752) +(-2.871907576e-17 0.1379271779 0.4690335906) +(-3.88166378e-17 0.1394338613 0.6339447395) +(-0.5509647179 0.5301114997 0.5451596365) +(-0.6326441375 0.124975394 0.6300812) +(-0.6172124612 0.2489258249 0.6141580714) +(-0.5969851818 0.3626647093 0.5923127384) +(-0.5721661094 0.4599762367 0.566610907) +(-0.1320778134 0.6298658461 0.6323127752) +(-0.2613743307 0.6115460717 0.617024093) +(-0.3779790324 0.584321893 0.5930126329) +(-0.4786270025 0.5548798935 0.5667721091) +(-0.6352040812 0.6273414094 0.1315185108) +(-0.6219800382 0.6079061253 0.2595453324) +(-0.5989071318 0.5809625171 0.3739192082) +(-0.5735532223 0.5534334299 0.4733729895) +(-0.1444316106 0.1435301277 0.7912628367) +(-0.1417998439 0.2838609685 0.7618325729) +(-0.1376586054 0.4164481951 0.7210334162) +(-0.1335700016 0.5364318079 0.6738990015) +(-0.2860916978 0.1399371606 0.7620187714) +(-0.2809621035 0.2766267997 0.7382937127) +(-0.272423622 0.4049427045 0.70089479) +(-0.2638903901 0.5200985743 0.6557645517) +(-0.419284063 0.1340659877 0.7197767863) +(-0.4094089348 0.2633818228 0.6980319065) +(-0.3981664048 0.388581784 0.6676072765) +(-0.3866721176 0.4990545112 0.629293254) +(-0.5391090252 0.1282070196 0.6723278825) +(-0.527107798 0.254940264 0.6549331439) +(-0.5102794822 0.3729985975 0.6277405463) +(-0.4914754461 0.4756742727 0.5948542577) +(-0.7911058748 0.1424504222 0.1436902861) +(-0.7635645022 0.2830798228 0.1415389779) +(-0.7229403058 0.415214044 0.1370445976) +(-0.6761750795 0.5345997571 0.1334798242) +(-0.7628833881 0.1386176496 0.285614245) +(-0.7393135403 0.2732286509 0.2782681262) +(-0.7045793389 0.4022566078 0.2710532306) +(-0.6605743711 0.517478748 0.2630823859) +(-0.7219619592 0.1330684921 0.4182201055) +(-0.7028851778 0.2640634074 0.4092009557) +(-0.6716331545 0.3856185698 0.3952594937) +(-0.6341413108 0.496243294 0.3836842593) +(-0.6741293476 0.1283585224 0.5373373756) +(-0.6572085378 0.25443039 0.5243023783) +(-0.6322887538 0.3715514416 0.5066594607) +(-0.6006417831 0.4739450376 0.4864149522) +(-0.1455104023 0.7903856776 0.144501645) +(-0.2882454959 0.7609416239 0.1417714646) +(-0.4222973826 0.718972723 0.1378116834) +(-0.5420042995 0.669850822 0.1337268789) +(-0.1434204001 0.7610310617 0.2861458108) +(-0.2824458199 0.7350665349 0.2790521064) +(-0.4142902747 0.6967205801 0.2718794054) +(-0.530306851 0.6488866712 0.2628129279) +(-0.139079067 0.7197220696 0.4191645836) +(-0.2753893019 0.6975475378 0.4101200591) +(-0.4009293053 0.6613965948 0.3954950738) +(-0.5134410671 0.6196001174 0.3835805401) +(-0.1349909014 0.6717549912 0.5388621506) +(-0.2658751966 0.6506693082 0.5256065781) +(-0.3872659931 0.6201041607 0.5069066675) +(-0.4931381647 0.584241621 0.4859810029) +(-0.1462701572 0.1461095564 0.1458641581) +(-0.1426828421 0.1422650702 0.2993022675) +(-0.1400198332 0.1396506727 0.4569985628) +(-0.1394042644 0.1386164934 0.6191426993) +(-0.1433918733 0.2992165944 0.1427514743) +(-0.141411008 0.2894896313 0.2906707919) +(-0.1384977517 0.2806477396 0.4405963381) +(-0.1383399952 0.2770498524 0.5971522375) +(-0.1403730258 0.4569860756 0.1401285057) +(-0.1395906117 0.4410449538 0.2823135183) +(-0.1363795629 0.4234538714 0.4246873151) +(-0.1351220929 0.4118113946 0.5700779075) +(-0.1402609173 0.6195980896 0.1399331818) +(-0.1374862826 0.5959896862 0.2777443525) +(-0.1355122425 0.569177783 0.4138776777) +(-0.1318077763 0.5416385171 0.5437847416) +(-0.3001713718 0.1433563207 0.1435449055) +(-0.2900151785 0.1404504624 0.2900678996) +(-0.2803529198 0.136317544 0.4395499693) +(-0.2783717212 0.136302849 0.5968721523) +(-0.2908952143 0.2897988393 0.1415695319) +(-0.2850662555 0.2829322124 0.2843626762) +(-0.2773899189 0.2747709938 0.4295204687) +(-0.2731992286 0.270103126 0.5790819006) +(-0.2829722518 0.4410246859 0.1390501846) +(-0.2780248168 0.4286079483 0.2772720592) +(-0.270822109 0.4122910886 0.4149447876) +(-0.2664763426 0.401051089 0.5553809627) +(-0.2794328366 0.5962847699 0.1375577951) +(-0.2750461778 0.57842309 0.2733757304) +(-0.2667388696 0.5521441024 0.4044830337) +(-0.2623620458 0.5278664711 0.5317457501) +(-0.4578516299 0.1396567881 0.1403248128) +(-0.4422196357 0.137648659 0.2817703625) +(-0.4241658956 0.1330566487 0.423277757) +(-0.4133545578 0.131004029 0.5686326008) +(-0.4423823059 0.2810353105 0.138837834) +(-0.4312628134 0.2744307677 0.2767984215) +(-0.4150221562 0.2655486091 0.4138214646) +(-0.4060518743 0.2617682157 0.555284929) +(-0.4262769412 0.4236686111 0.1361366131) +(-0.4174304573 0.4122077113 0.2703016773) +(-0.4041043755 0.3979233673 0.4018000408) +(-0.393827322 0.3859879829 0.5334637005) +(-0.4160400203 0.5691193142 0.1351217491) +(-0.4083953836 0.5529877885 0.2666945337) +(-0.395925448 0.529829309 0.3928557664) +(-0.3836381306 0.5059571118 0.5116939436) +(-0.6205112993 0.1390581458 0.140019197) +(-0.5975896099 0.1347466054 0.2775967471) +(-0.5709372633 0.1314686155 0.4134512089) +(-0.5450485286 0.1282968103 0.5437729261) +(-0.5972406696 0.275868659 0.1368828803) +(-0.5815934136 0.2694231878 0.2725896327) +(-0.5554326009 0.2596231823 0.4030030709) +(-0.5334292374 0.2547777042 0.5314294969) +(-0.5721664265 0.4113524315 0.134698577) +(-0.5588351069 0.4007575956 0.2661526073) +(-0.5365985406 0.385736359 0.3921290126) +(-0.5153530862 0.3732972253 0.5118079903) +(-0.5458462916 0.5405485233 0.1313540053) +(-0.5353257295 0.5261712609 0.2605977198) +(-0.5164246352 0.5050950706 0.3808957104) +(-0.4977608815 0.4841183087 0.4934511471) +(0.6406255867 0.64064803 0) +(0.8014956866 0.1425265354 0) +(0.7653654524 0.2862091704 0) +(0.7218768727 0.4235296127 0) +(0.6750631064 0.5457389042 0) +(0.1441469587 0.8030681683 0) +(0.2861330622 0.7655382071 0) +(0.4221562745 0.7211025006 0) +(0.5460334643 0.6753105856 0) +(0.6331334636 0.1387807642 0) +(0.6014382143 0.2789617395 0) +(0.5723253381 0.4174755724 0) +(0.5486095293 0.548741478 0) +(0.4684145174 0.1375065868 0) +(0.4437417017 0.2805213356 0) +(0.4229490716 0.4232983902 0) +(0.4164436796 0.5718253659 0) +(0.3053622419 0.1387801511 0) +(0.2895672396 0.2896870738 0) +(0.2809255502 0.4445500126 0) +(0.276063468 0.5993246022 0) +(0.1520618701 0.1520892701 0) +(0.140185983 0.3065649752 0) +(0.1379271779 0.4690335906 0) +(0.1394338613 0.6339447395 0) +(0.5505033042 0.5304302074 -0.5451554368) +(0.1319683496 0.6298116122 -0.6321091107) +(0.260011126 0.6097686767 -0.6154902001) +(0.3786180613 0.5843892014 -0.5935299401) +(0.4789098786 0.5547585096 -0.5671925088) +(0.6332770879 0.1263289114 -0.6313214541) +(0.6192080083 0.2502392453 -0.6156815836) +(0.5968294091 0.3622682203 -0.5918023265) +(0.5724217593 0.4596798589 -0.5662711821) +(0.6349203025 0.6276526708 -0.1315107246) +(0.6219100799 0.6079472663 -0.2595955396) +(0.5990649009 0.5806152948 -0.3739719858) +(0.5737378115 0.5531708971 -0.4734628603) +(0.1438551303 0.1427577231 -0.7905223249) +(0.2859712872 0.1398317047 -0.7620502469) +(0.4196756556 0.1343811588 -0.7204815382) +(0.5399466779 0.1288642007 -0.673091378) +(0.1419449065 0.2841120678 -0.7622026968) +(0.281132072 0.2765538873 -0.7384260277) +(0.4110909752 0.2655716132 -0.7004415465) +(0.5270795271 0.254595225 -0.6548807892) +(0.1375153146 0.4165985751 -0.7209663164) +(0.2704622219 0.4033822699 -0.6984755091) +(0.3983946215 0.388464246 -0.6676873845) +(0.5108568025 0.3733602874 -0.6284947828) +(0.1333436841 0.5360894813 -0.6731378772) +(0.2646096127 0.5200943018 -0.6560778294) +(0.386264376 0.4985780362 -0.6285959546) +(0.4921778918 0.4749833676 -0.5950558291) +(0.1450312931 0.7904179204 -0.1440059183) +(0.2880541 0.7612069937 -0.1418974557) +(0.4216840611 0.7187169114 -0.1376542506) +(0.5417716799 0.6701685305 -0.1339097994) +(0.1432581632 0.7610439183 -0.2856778152) +(0.2822446876 0.7349952868 -0.278525343) +(0.4141586106 0.696654483 -0.2717362158) +(0.5306864317 0.6494640475 -0.2635585709) +(0.1388475083 0.7194014558 -0.41850738) +(0.2752069189 0.6971592088 -0.4096324754) +(0.4011780052 0.6614203763 -0.3954648164) +(0.5136675216 0.6194672729 -0.3837716869) +(0.1339290792 0.6707226885 -0.5378761934) +(0.2655475298 0.650991561 -0.5253654147) +(0.3878753975 0.6206682895 -0.5072097682) +(0.4932049605 0.584038387 -0.4865209888) +(0.791262523 0.1429234141 -0.144366066) +(0.7632979957 0.2832827318 -0.1414241386) +(0.7232022456 0.4157656188 -0.1372188695) +(0.6758302475 0.5348113742 -0.1333220215) +(0.7626437801 0.1386999955 -0.2859400797) +(0.7393520542 0.273464327 -0.2787290453) +(0.7046575432 0.4024151261 -0.2712242615) +(0.6599357242 0.5171224215 -0.2624714174) +(0.7220017729 0.1331319477 -0.4186543013) +(0.7031597822 0.2641363651 -0.4096416268) +(0.6717838449 0.3853780045 -0.395360059) +(0.6341849305 0.4960703963 -0.3834715532) +(0.6742004269 0.1285894822 -0.5376544038) +(0.6573381185 0.254500879 -0.5245902446) +(0.6325218569 0.371386148 -0.5065784874) +(0.6009577856 0.4738226276 -0.486026871) +(0.14846215 0.1483800782 -0.1487527268) +(0.1421205956 0.1415783784 -0.2985513414) +(0.1403585659 0.1394973405 -0.4570415066) +(0.1400324409 0.1391878888 -0.6197226793) +(0.1442607657 0.3006171349 -0.1441898361) +(0.1416229375 0.2893393145 -0.2907257692) +(0.1389431802 0.2809033732 -0.4413881406) +(0.1378685153 0.2771953156 -0.5970554566) +(0.1406314046 0.4575611044 -0.1404264155) +(0.1392651596 0.4409578838 -0.2817183232) +(0.1347265566 0.4219297217 -0.4227246515) +(0.1320317187 0.4104243358 -0.5677365646) +(0.14060484 0.6198132705 -0.1400214967) +(0.1371862389 0.5956427394 -0.2769508224) +(0.1353434533 0.5687675548 -0.4133584506) +(0.1324879857 0.5424281586 -0.5441212507) +(0.3006753455 0.1435624698 -0.1440941757) +(0.2901011635 0.1406095381 -0.2907728228) +(0.2819903175 0.1374975463 -0.441571395) +(0.2788620438 0.1366865109 -0.5972946964) +(0.2911238427 0.2901479451 -0.1418409391) +(0.2847564033 0.2829114496 -0.2842460383) +(0.2773913033 0.2746145038 -0.4296063842) +(0.2733418095 0.2700229213 -0.5792773175) +(0.2828893481 0.4410225663 -0.1388937023) +(0.2776080741 0.4284144078 -0.2767639826) +(0.2697337498 0.4115587757 -0.4138999481) +(0.2667497298 0.401324692 -0.5552555646) +(0.2787648589 0.5954148802 -0.1369929468) +(0.2746540383 0.5779657527 -0.2725859717) +(0.2661105075 0.5507194887 -0.4030679256) +(0.2626330599 0.5276088747 -0.5319482848) +(0.4579614422 0.1395469639 -0.1403667212) +(0.4420499214 0.1376749764 -0.2818242924) +(0.4231871521 0.1325480493 -0.4227882417) +(0.4137857264 0.1323166353 -0.5699933432) +(0.4426810199 0.2812306416 -0.1391466082) +(0.4313581463 0.2747634788 -0.2773340033) +(0.4162420607 0.2666470333 -0.4151847263) +(0.4059493144 0.2613804407 -0.5551655526) +(0.4262407555 0.4237532285 -0.1361396372) +(0.4169352454 0.412646546 -0.2702899342) +(0.4041867156 0.3977971587 -0.401814739) +(0.3936507265 0.3863633231 -0.5335240944) +(0.4153057151 0.5688732315 -0.1348390578) +(0.4080909612 0.552721015 -0.2663314413) +(0.3953226036 0.5285692548 -0.3922970666) +(0.3844476922 0.5058921394 -0.5121898235) +(0.6204020532 0.1386961208 -0.1398711542) +(0.5973399153 0.1347323801 -0.2776545672) +(0.5710597628 0.1319318233 -0.4137288204) +(0.5443592567 0.1280304579 -0.5436663599) +(0.59817684 0.2765111076 -0.1374143675) +(0.5820327738 0.2700391406 -0.2733779829) +(0.556341448 0.2601995664 -0.4042380506) +(0.5337818485 0.2546283136 -0.5313062669) +(0.5723994457 0.411897514 -0.1348749189) +(0.5586333162 0.4004115329 -0.2661614763) +(0.537829965 0.3860983048 -0.3924680498) +(0.5155417356 0.3728485389 -0.5115194955) +(0.5452901173 0.5410394157 -0.1313581945) +(0.5351595473 0.5263192132 -0.2606324989) +(0.5169842703 0.504477858 -0.3809529333) +(0.497495952 0.4837472586 -0.4933402088) +(0.5301195268 0.5509592293 0.5451568942) +(0.1249768548 0.6326487981 0.6300768216) +(0.2489381851 0.6172068604 0.6141565944) +(0.3626765666 0.5969800138 0.592309245) +(0.4599874342 0.5721591386 0.5666074226) +(0.6299049442 0.1320771978 0.6322746311) +(0.6115760557 0.2613725768 0.6169970912) +(0.5843395768 0.3779760835 0.5929969676) +(0.5548937624 0.4786212818 0.5667623884) +(0.6273471722 0.6351949487 0.131514388) +(0.6079097931 0.6219755652 0.2595400396) +(0.5809629189 0.5989091802 0.3739092058) +(0.5534400382 0.5735490484 0.4733659241) +(0.1427382501 0.1438727229 0.7905232322) +(0.284116629 0.1419618174 0.7622292602) +(0.4167587867 0.1376611976 0.721099631) +(0.5365092034 0.1335737499 0.67382085) +(0.1397964302 0.2858561057 0.7618619228) +(0.2766601253 0.2809879787 0.738383703) +(0.4050299857 0.2724211605 0.7008734892) +(0.5201402115 0.2638885166 0.6557374171) +(0.1340659979 0.4192701633 0.7197686877) +(0.263406286 0.4094110756 0.6980342205) +(0.388611369 0.3981593375 0.6675963496) +(0.4990770654 0.3866682901 0.6292769413) +(0.1282189244 0.5391071314 0.6723293984) +(0.2549640135 0.5270992002 0.6549355648) +(0.3730167902 0.5102736676 0.6277316208) +(0.4756902291 0.4914698489 0.5948451892) +(0.1424494969 0.79110732 0.1436885265) +(0.2830786678 0.7635667211 0.1415378157) +(0.415214485 0.7229428292 0.1370431657) +(0.534602074 0.6761730196 0.133477163) +(0.1386187154 0.7628786464 0.2856110062) +(0.273230056 0.7393097139 0.278267001) +(0.402260044 0.7045773794 0.2710485552) +(0.5174815361 0.6605734412 0.2630764348) +(0.1330698544 0.7219770051 0.4182202531) +(0.2640655479 0.7028907841 0.4091977116) +(0.3856219574 0.6716361775 0.3952517298) +(0.4962454964 0.6341425623 0.3836781659) +(0.1283607717 0.6741328465 0.5373324438) +(0.2544370794 0.6572055436 0.5243005884) +(0.3715590422 0.6322820004 0.5066579556) +(0.473952285 0.6006363698 0.4864089708) +(0.7906083665 0.1454966302 0.1446786415) +(0.7609751405 0.2882365524 0.1417756419) +(0.718985802 0.4222897962 0.1378093046) +(0.669858091 0.5419990085 0.1337225943) +(0.7609635175 0.1434171535 0.2860338916) +(0.7350634689 0.2824455728 0.2790087167) +(0.6967205098 0.4142921441 0.2718603835) +(0.6488860633 0.530309083 0.2627994082) +(0.7196304491 0.1390847428 0.4188881168) +(0.6975482532 0.2753988758 0.4100460592) +(0.6614003397 0.4009307646 0.3954702374) +(0.6196065292 0.513439192 0.3835695506) +(0.6718433183 0.1349905641 0.5388172038) +(0.6507052367 0.2658733887 0.5255676939) +(0.6201187557 0.3872621232 0.5068880348) +(0.584251134 0.493133038 0.4859677419) +(0.148351147 0.148490812 0.1487506229) +(0.1415815363 0.1421122917 0.2985485751) +(0.1394359834 0.140087832 0.4569621529) +(0.1391773159 0.1399486992 0.6196969607) +(0.3004045398 0.1441100966 0.1442380841) +(0.2893405129 0.1416737958 0.2908111752) +(0.2810127777 0.1389587252 0.441524672) +(0.2776407471 0.1383347786 0.5974259625) +(0.4574680983 0.1404859026 0.1404585615) +(0.4409554093 0.1394276462 0.2818347466) +(0.4220490438 0.1350116237 0.4228967393) +(0.4120033962 0.1351374217 0.5702494219) +(0.6197624941 0.1402468033 0.1399360064) +(0.5956856112 0.1374838284 0.2772712377) +(0.5690489532 0.1355134028 0.413559778) +(0.5418460801 0.1318199439 0.5436549435) +(0.1437117618 0.3008847355 0.1439968024) +(0.1406101297 0.290249834 0.2907482806) +(0.1376337962 0.2823478875 0.4415219843) +(0.1364149689 0.278611557 0.5968722688) +(0.290093148 0.2911883823 0.1418093377) +(0.2828058938 0.2848257639 0.2841724842) +(0.2746464378 0.2771499475 0.4294725097) +(0.2701675589 0.2733210517 0.5792519694) +(0.4411880674 0.2830448246 0.1391284859) +(0.4285530718 0.2779969763 0.2772301807) +(0.4123861 0.2709583559 0.4149557351) +(0.4012255775 0.266499977 0.5553084258) +(0.5963164518 0.2794250736 0.1375264664) +(0.5783647159 0.2750594591 0.2732671672) +(0.5521694043 0.2667659221 0.404380055) +(0.5279581559 0.2623651058 0.531663202) +(0.1397180656 0.4580916109 0.1403848629) +(0.1376841611 0.4423364616 0.2818849945) +(0.1330472656 0.4241705523 0.4232185767) +(0.1310001248 0.4132540727 0.5686275867) +(0.2811006044 0.4425097156 0.1388753132) +(0.2744177905 0.4312122738 0.2767597562) +(0.2655996219 0.4152848863 0.4138391749) +(0.2618190963 0.406113202 0.555279148) +(0.4237130497 0.4263220848 0.1361470058) +(0.4122067929 0.4174456398 0.2702717216) +(0.3979469364 0.4041441986 0.4017614324) +(0.3860288138 0.3938258937 0.5334271448) +(0.5691276282 0.4160391518 0.1351062383) +(0.5529819916 0.4084043172 0.2666602877) +(0.5298433041 0.3959405265 0.3928144327) +(0.5059817478 0.3836346923 0.5116639826) +(0.1390558224 0.6205102489 0.140018221) +(0.1347459664 0.5975763856 0.2775864272) +(0.1314669538 0.5709286288 0.413436804) +(0.1282971782 0.5450267983 0.5437769438) +(0.275864996 0.5972406333 0.1368768348) +(0.2694272789 0.5815948311 0.272580567) +(0.2596286672 0.5554374685 0.4029917226) +(0.2547876828 0.5334238061 0.5314186053) +(0.4113570387 0.5721644297 0.134693057) +(0.4007577795 0.5588387843 0.2661389677) +(0.3857443985 0.5365977567 0.3921104007) +(0.3733133182 0.5153527501 0.5117906247) +(0.5405595469 0.5458369346 0.1313505185) +(0.526171853 0.5353257147 0.2605821839) +(0.5051002271 0.5164252292 0.3808763052) +(0.4841315838 0.4977552872 0.4934387536) +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/system/controlDict b/tutorials/finiteArea/sphereTransport/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..88b6a08ea0e40cb2c0ff75c88b9c3b3fb8c17ecd --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/system/controlDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application surfactantFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.1; + +writeControl runTime; + +writeInterval 0.2; + +purgeWrite 0; + +writeFormat ascii; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/system/faSchemes b/tutorials/finiteArea/sphereTransport/system/faSchemes new file mode 100644 index 0000000000000000000000000000000000000000..7a870c3b65c7c8e210c4c396b4e742d7149917ed --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/system/faSchemes @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phis,Cs) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(Ds,Cs) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/system/faSolution b/tutorials/finiteArea/sphereTransport/system/faSolution new file mode 100644 index 0000000000000000000000000000000000000000..d31302173973e4b0d371911988f62b7c2e0d1dc0 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/system/faSolution @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + Cs + { + solver PBiCG; + preconditioner DILU; + minIter 0; + maxIter 2000; + tolerance 1e-06; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + +SIMPLE +{ + nTimeCorrectors 6; + nNonOrthogonalCorrectors 1; +} + +relaxationFactors +{ + p 0.7; + U 0.7; + k 0.7; + epsilon 0.7; + R 0.7; +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/system/fvSchemes b/tutorials/finiteArea/sphereTransport/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..af02474232a8b3bc96e93ee3133e353f98c2bdd7 --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/system/fvSchemes @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ +} + +gradSchemes +{ +} + +divSchemes +{ +} + +laplacianSchemes +{ +} + +interpolationSchemes +{ +} + +snGradSchemes +{ +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/sphereTransport/system/fvSolution b/tutorials/finiteArea/sphereTransport/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..c32c784017eb9c5042d4a51a091d306388dbfdeb --- /dev/null +++ b/tutorials/finiteArea/sphereTransport/system/fvSolution @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0/Cs b/tutorials/finiteArea/surfactantFoam/planeTransport/0/Cs new file mode 100644 index 0000000000000000000000000000000000000000..5e89e58a83f8b70c84b710693fd9aa7b745990a1 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/0/Cs @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaScalarField; + location "0"; + object Cs; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -2 0 0 0 0 0]; + +internalField uniform 0; + +referenceLevel 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 1; + } + outlet + { + type inletOutlet; + value uniform 1; + phi phis; + inletValue uniform 0; + } + bound + { + type symmetry; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0/Cvf b/tutorials/finiteArea/surfactantFoam/planeTransport/0/Cvf new file mode 100644 index 0000000000000000000000000000000000000000..8815effaa2c18f16b367b9aefdc3857663d6ec3a --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/0/Cvf @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object Cvf; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -1 0 0 0 0 0]; + + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + bound + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + bottom + { + type calculated; + value uniform 0; + } + top + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0/U b/tutorials/finiteArea/surfactantFoam/planeTransport/0/U new file mode 100644 index 0000000000000000000000000000000000000000..20a683af080732cf456de53c8a0e18f960655246 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/0/U @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type calculated; + value uniform (0 0 0); + } + bound + { + type calculated; + value uniform (0 0 0); + } + outlet + { + type calculated; + value uniform (0 0 0); + } + bottom + { + type calculated; + value uniform (0 0 0); + } + top + { + type calculated; + value uniform (0.05 0 0); + } +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/0/Us b/tutorials/finiteArea/surfactantFoam/planeTransport/0/Us new file mode 100644 index 0000000000000000000000000000000000000000..f811bd4abb51df72e2f5a41dc7c590c48a82ba20 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/0/Us @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class areaVectorField; + location "0"; + object Us; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.05 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type zeroGradient; + } + bound + { + type symmetry; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean b/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..f9c09b1ff70c3c0740ba7314a0b4b04e493bba52 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanTimeDirectories +cleanFaMesh \ No newline at end of file diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/Allrun b/tutorials/finiteArea/surfactantFoam/planeTransport/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..cf07ecbfd82e480031911af01f2de76585c66412 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/Allrun @@ -0,0 +1,9 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application="surfactantFoam" + +runApplication blockMesh +runApplication makeFaMesh +runApplication $application diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faBoundary b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faBoundary new file mode 100644 index 0000000000000000000000000000000000000000..94816a1be604d722452ce91c611bfe12d138b64b --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faBoundary @@ -0,0 +1,212 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class faBoundaryMesh; + location "constant/faMesh"; + object faBoundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + inlet + { + type patch; + edgeLabels List<label> +20 +( +2321 +2322 +2323 +2324 +2325 +2326 +2327 +2328 +2329 +2330 +2331 +2332 +2333 +2334 +2335 +2336 +2337 +2338 +2339 +2341 +) +; + ngbPolyPatchIndex 0; + } + outlet + { + type patch; + edgeLabels List<label> +20 +( +2459 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +2470 +2471 +2472 +2473 +2474 +2475 +2476 +2477 +2478 +) +; + ngbPolyPatchIndex 2; + } + bound + { + type symmetry; + edgeLabels List<label> +120 +( +2320 +2340 +2342 +2343 +2344 +2345 +2346 +2347 +2348 +2349 +2350 +2351 +2352 +2353 +2354 +2355 +2356 +2357 +2358 +2359 +2360 +2361 +2362 +2363 +2364 +2365 +2366 +2367 +2368 +2369 +2370 +2371 +2372 +2373 +2374 +2375 +2376 +2377 +2378 +2379 +2380 +2381 +2382 +2383 +2384 +2385 +2386 +2387 +2388 +2389 +2390 +2391 +2392 +2393 +2394 +2395 +2396 +2397 +2398 +2399 +2400 +2401 +2402 +2403 +2404 +2405 +2406 +2407 +2408 +2409 +2410 +2411 +2412 +2413 +2414 +2415 +2416 +2417 +2418 +2419 +2420 +2421 +2422 +2423 +2424 +2425 +2426 +2427 +2428 +2429 +2430 +2431 +2432 +2433 +2434 +2435 +2436 +2437 +2438 +2439 +2440 +2441 +2442 +2443 +2444 +2445 +2446 +2447 +2448 +2449 +2450 +2451 +2452 +2453 +2454 +2455 +2456 +2457 +2458 +2479 +) +; + ngbPolyPatchIndex 1; + } +) + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faMeshDefinition b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faMeshDefinition new file mode 100644 index 0000000000000000000000000000000000000000..946405c6ea120dbdcceb8ba5658315dc63f04cba --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faMeshDefinition @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object faMeshDefinition; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +polyMeshPatches 1( top ); + +boundary +{ + inlet + { + type patch; + ownerPolyPatch top; + neighbourPolyPatch inlet; + } + outlet + { + type patch; + ownerPolyPatch top; + neighbourPolyPatch outlet; + } + bound + { + type symmetry; + ownerPolyPatch top; + neighbourPolyPatch bound; + } +} + + +// ************************************************************************** // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faceLabels b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faceLabels new file mode 100644 index 0000000000000000000000000000000000000000..73fcf66a30b3f3ad5c1add13d135378eeed47ff1 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/faMesh/faceLabels @@ -0,0 +1,1224 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class labelList; + location "constant/faMesh"; + object faceLabels; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +1200 +( +3680 +3681 +3682 +3683 +3684 +3685 +3686 +3687 +3688 +3689 +3690 +3691 +3692 +3693 +3694 +3695 +3696 +3697 +3698 +3699 +3700 +3701 +3702 +3703 +3704 +3705 +3706 +3707 +3708 +3709 +3710 +3711 +3712 +3713 +3714 +3715 +3716 +3717 +3718 +3719 +3720 +3721 +3722 +3723 +3724 +3725 +3726 +3727 +3728 +3729 +3730 +3731 +3732 +3733 +3734 +3735 +3736 +3737 +3738 +3739 +3740 +3741 +3742 +3743 +3744 +3745 +3746 +3747 +3748 +3749 +3750 +3751 +3752 +3753 +3754 +3755 +3756 +3757 +3758 +3759 +3760 +3761 +3762 +3763 +3764 +3765 +3766 +3767 +3768 +3769 +3770 +3771 +3772 +3773 +3774 +3775 +3776 +3777 +3778 +3779 +3780 +3781 +3782 +3783 +3784 +3785 +3786 +3787 +3788 +3789 +3790 +3791 +3792 +3793 +3794 +3795 +3796 +3797 +3798 +3799 +3800 +3801 +3802 +3803 +3804 +3805 +3806 +3807 +3808 +3809 +3810 +3811 +3812 +3813 +3814 +3815 +3816 +3817 +3818 +3819 +3820 +3821 +3822 +3823 +3824 +3825 +3826 +3827 +3828 +3829 +3830 +3831 +3832 +3833 +3834 +3835 +3836 +3837 +3838 +3839 +3840 +3841 +3842 +3843 +3844 +3845 +3846 +3847 +3848 +3849 +3850 +3851 +3852 +3853 +3854 +3855 +3856 +3857 +3858 +3859 +3860 +3861 +3862 +3863 +3864 +3865 +3866 +3867 +3868 +3869 +3870 +3871 +3872 +3873 +3874 +3875 +3876 +3877 +3878 +3879 +3880 +3881 +3882 +3883 +3884 +3885 +3886 +3887 +3888 +3889 +3890 +3891 +3892 +3893 +3894 +3895 +3896 +3897 +3898 +3899 +3900 +3901 +3902 +3903 +3904 +3905 +3906 +3907 +3908 +3909 +3910 +3911 +3912 +3913 +3914 +3915 +3916 +3917 +3918 +3919 +3920 +3921 +3922 +3923 +3924 +3925 +3926 +3927 +3928 +3929 +3930 +3931 +3932 +3933 +3934 +3935 +3936 +3937 +3938 +3939 +3940 +3941 +3942 +3943 +3944 +3945 +3946 +3947 +3948 +3949 +3950 +3951 +3952 +3953 +3954 +3955 +3956 +3957 +3958 +3959 +3960 +3961 +3962 +3963 +3964 +3965 +3966 +3967 +3968 +3969 +3970 +3971 +3972 +3973 +3974 +3975 +3976 +3977 +3978 +3979 +3980 +3981 +3982 +3983 +3984 +3985 +3986 +3987 +3988 +3989 +3990 +3991 +3992 +3993 +3994 +3995 +3996 +3997 +3998 +3999 +4000 +4001 +4002 +4003 +4004 +4005 +4006 +4007 +4008 +4009 +4010 +4011 +4012 +4013 +4014 +4015 +4016 +4017 +4018 +4019 +4020 +4021 +4022 +4023 +4024 +4025 +4026 +4027 +4028 +4029 +4030 +4031 +4032 +4033 +4034 +4035 +4036 +4037 +4038 +4039 +4040 +4041 +4042 +4043 +4044 +4045 +4046 +4047 +4048 +4049 +4050 +4051 +4052 +4053 +4054 +4055 +4056 +4057 +4058 +4059 +4060 +4061 +4062 +4063 +4064 +4065 +4066 +4067 +4068 +4069 +4070 +4071 +4072 +4073 +4074 +4075 +4076 +4077 +4078 +4079 +4080 +4081 +4082 +4083 +4084 +4085 +4086 +4087 +4088 +4089 +4090 +4091 +4092 +4093 +4094 +4095 +4096 +4097 +4098 +4099 +4100 +4101 +4102 +4103 +4104 +4105 +4106 +4107 +4108 +4109 +4110 +4111 +4112 +4113 +4114 +4115 +4116 +4117 +4118 +4119 +4120 +4121 +4122 +4123 +4124 +4125 +4126 +4127 +4128 +4129 +4130 +4131 +4132 +4133 +4134 +4135 +4136 +4137 +4138 +4139 +4140 +4141 +4142 +4143 +4144 +4145 +4146 +4147 +4148 +4149 +4150 +4151 +4152 +4153 +4154 +4155 +4156 +4157 +4158 +4159 +4160 +4161 +4162 +4163 +4164 +4165 +4166 +4167 +4168 +4169 +4170 +4171 +4172 +4173 +4174 +4175 +4176 +4177 +4178 +4179 +4180 +4181 +4182 +4183 +4184 +4185 +4186 +4187 +4188 +4189 +4190 +4191 +4192 +4193 +4194 +4195 +4196 +4197 +4198 +4199 +4200 +4201 +4202 +4203 +4204 +4205 +4206 +4207 +4208 +4209 +4210 +4211 +4212 +4213 +4214 +4215 +4216 +4217 +4218 +4219 +4220 +4221 +4222 +4223 +4224 +4225 +4226 +4227 +4228 +4229 +4230 +4231 +4232 +4233 +4234 +4235 +4236 +4237 +4238 +4239 +4240 +4241 +4242 +4243 +4244 +4245 +4246 +4247 +4248 +4249 +4250 +4251 +4252 +4253 +4254 +4255 +4256 +4257 +4258 +4259 +4260 +4261 +4262 +4263 +4264 +4265 +4266 +4267 +4268 +4269 +4270 +4271 +4272 +4273 +4274 +4275 +4276 +4277 +4278 +4279 +4280 +4281 +4282 +4283 +4284 +4285 +4286 +4287 +4288 +4289 +4290 +4291 +4292 +4293 +4294 +4295 +4296 +4297 +4298 +4299 +4300 +4301 +4302 +4303 +4304 +4305 +4306 +4307 +4308 +4309 +4310 +4311 +4312 +4313 +4314 +4315 +4316 +4317 +4318 +4319 +4320 +4321 +4322 +4323 +4324 +4325 +4326 +4327 +4328 +4329 +4330 +4331 +4332 +4333 +4334 +4335 +4336 +4337 +4338 +4339 +4340 +4341 +4342 +4343 +4344 +4345 +4346 +4347 +4348 +4349 +4350 +4351 +4352 +4353 +4354 +4355 +4356 +4357 +4358 +4359 +4360 +4361 +4362 +4363 +4364 +4365 +4366 +4367 +4368 +4369 +4370 +4371 +4372 +4373 +4374 +4375 +4376 +4377 +4378 +4379 +4380 +4381 +4382 +4383 +4384 +4385 +4386 +4387 +4388 +4389 +4390 +4391 +4392 +4393 +4394 +4395 +4396 +4397 +4398 +4399 +4400 +4401 +4402 +4403 +4404 +4405 +4406 +4407 +4408 +4409 +4410 +4411 +4412 +4413 +4414 +4415 +4416 +4417 +4418 +4419 +4420 +4421 +4422 +4423 +4424 +4425 +4426 +4427 +4428 +4429 +4430 +4431 +4432 +4433 +4434 +4435 +4436 +4437 +4438 +4439 +4440 +4441 +4442 +4443 +4444 +4445 +4446 +4447 +4448 +4449 +4450 +4451 +4452 +4453 +4454 +4455 +4456 +4457 +4458 +4459 +4460 +4461 +4462 +4463 +4464 +4465 +4466 +4467 +4468 +4469 +4470 +4471 +4472 +4473 +4474 +4475 +4476 +4477 +4478 +4479 +4480 +4481 +4482 +4483 +4484 +4485 +4486 +4487 +4488 +4489 +4490 +4491 +4492 +4493 +4494 +4495 +4496 +4497 +4498 +4499 +4500 +4501 +4502 +4503 +4504 +4505 +4506 +4507 +4508 +4509 +4510 +4511 +4512 +4513 +4514 +4515 +4516 +4517 +4518 +4519 +4520 +4521 +4522 +4523 +4524 +4525 +4526 +4527 +4528 +4529 +4530 +4531 +4532 +4533 +4534 +4535 +4536 +4537 +4538 +4539 +4540 +4541 +4542 +4543 +4544 +4545 +4546 +4547 +4548 +4549 +4550 +4551 +4552 +4553 +4554 +4555 +4556 +4557 +4558 +4559 +4560 +4561 +4562 +4563 +4564 +4565 +4566 +4567 +4568 +4569 +4570 +4571 +4572 +4573 +4574 +4575 +4576 +4577 +4578 +4579 +4580 +4581 +4582 +4583 +4584 +4585 +4586 +4587 +4588 +4589 +4590 +4591 +4592 +4593 +4594 +4595 +4596 +4597 +4598 +4599 +4600 +4601 +4602 +4603 +4604 +4605 +4606 +4607 +4608 +4609 +4610 +4611 +4612 +4613 +4614 +4615 +4616 +4617 +4618 +4619 +4620 +4621 +4622 +4623 +4624 +4625 +4626 +4627 +4628 +4629 +4630 +4631 +4632 +4633 +4634 +4635 +4636 +4637 +4638 +4639 +4640 +4641 +4642 +4643 +4644 +4645 +4646 +4647 +4648 +4649 +4650 +4651 +4652 +4653 +4654 +4655 +4656 +4657 +4658 +4659 +4660 +4661 +4662 +4663 +4664 +4665 +4666 +4667 +4668 +4669 +4670 +4671 +4672 +4673 +4674 +4675 +4676 +4677 +4678 +4679 +4680 +4681 +4682 +4683 +4684 +4685 +4686 +4687 +4688 +4689 +4690 +4691 +4692 +4693 +4694 +4695 +4696 +4697 +4698 +4699 +4700 +4701 +4702 +4703 +4704 +4705 +4706 +4707 +4708 +4709 +4710 +4711 +4712 +4713 +4714 +4715 +4716 +4717 +4718 +4719 +4720 +4721 +4722 +4723 +4724 +4725 +4726 +4727 +4728 +4729 +4730 +4731 +4732 +4733 +4734 +4735 +4736 +4737 +4738 +4739 +4740 +4741 +4742 +4743 +4744 +4745 +4746 +4747 +4748 +4749 +4750 +4751 +4752 +4753 +4754 +4755 +4756 +4757 +4758 +4759 +4760 +4761 +4762 +4763 +4764 +4765 +4766 +4767 +4768 +4769 +4770 +4771 +4772 +4773 +4774 +4775 +4776 +4777 +4778 +4779 +4780 +4781 +4782 +4783 +4784 +4785 +4786 +4787 +4788 +4789 +4790 +4791 +4792 +4793 +4794 +4795 +4796 +4797 +4798 +4799 +4800 +4801 +4802 +4803 +4804 +4805 +4806 +4807 +4808 +4809 +4810 +4811 +4812 +4813 +4814 +4815 +4816 +4817 +4818 +4819 +4820 +4821 +4822 +4823 +4824 +4825 +4826 +4827 +4828 +4829 +4830 +4831 +4832 +4833 +4834 +4835 +4836 +4837 +4838 +4839 +4840 +4841 +4842 +4843 +4844 +4845 +4846 +4847 +4848 +4849 +4850 +4851 +4852 +4853 +4854 +4855 +4856 +4857 +4858 +4859 +4860 +4861 +4862 +4863 +4864 +4865 +4866 +4867 +4868 +4869 +4870 +4871 +4872 +4873 +4874 +4875 +4876 +4877 +4878 +4879 +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/blockMeshDict b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..af3432b0d7e0c908107373e875f14489f6d9744d --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/blockMeshDict @@ -0,0 +1,94 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +vertices +( + (0 0 0) + (3 0 0) + (3 1 0) + (0 1 0) + (0 0 0.1) + (3 0 0.1) + (3 1 0.1) + (0 1 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (60 20 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + + bound + { + type wall; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } + + outlet + { + type patch; + faces + ( + (2 6 5 1) + ); + } + + bottom + { + type patch; + faces + ( + (0 3 2 1) + ); + } + + top + { + type patch; + faces + ( + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/boundary b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..fc2e1afcf5e3e0a32f4da524bf159dc6e6a5bc41 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/boundary @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + inlet + { + type patch; + nFaces 20; + startFace 2320; + } + bound + { + type wall; + inGroups 1(wall); + nFaces 120; + startFace 2340; + } + outlet + { + type patch; + nFaces 20; + startFace 2460; + } + bottom + { + type patch; + nFaces 1200; + startFace 2480; + } + top + { + type patch; + nFaces 1200; + startFace 3680; + } +) + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/faces b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/faces new file mode 100644 index 0000000000000000000000000000000000000000..b73f65b5753dc9b04f6a1af5475f7107c0daea6f --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/faces @@ -0,0 +1,4904 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class faceList; + location "constant/polyMesh"; + object faces; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +4880 +( +4(1 62 1343 1282) +4(61 1342 1343 62) +4(2 63 1344 1283) +4(62 1343 1344 63) +4(3 64 1345 1284) +4(63 1344 1345 64) +4(4 65 1346 1285) +4(64 1345 1346 65) +4(5 66 1347 1286) +4(65 1346 1347 66) +4(6 67 1348 1287) +4(66 1347 1348 67) +4(7 68 1349 1288) +4(67 1348 1349 68) +4(8 69 1350 1289) +4(68 1349 1350 69) +4(9 70 1351 1290) +4(69 1350 1351 70) +4(10 71 1352 1291) +4(70 1351 1352 71) +4(11 72 1353 1292) +4(71 1352 1353 72) +4(12 73 1354 1293) +4(72 1353 1354 73) +4(13 74 1355 1294) +4(73 1354 1355 74) +4(14 75 1356 1295) +4(74 1355 1356 75) +4(15 76 1357 1296) +4(75 1356 1357 76) +4(16 77 1358 1297) +4(76 1357 1358 77) +4(17 78 1359 1298) +4(77 1358 1359 78) +4(18 79 1360 1299) +4(78 1359 1360 79) +4(19 80 1361 1300) +4(79 1360 1361 80) +4(20 81 1362 1301) +4(80 1361 1362 81) +4(21 82 1363 1302) +4(81 1362 1363 82) +4(22 83 1364 1303) +4(82 1363 1364 83) +4(23 84 1365 1304) +4(83 1364 1365 84) +4(24 85 1366 1305) +4(84 1365 1366 85) +4(25 86 1367 1306) +4(85 1366 1367 86) +4(26 87 1368 1307) +4(86 1367 1368 87) +4(27 88 1369 1308) +4(87 1368 1369 88) +4(28 89 1370 1309) +4(88 1369 1370 89) +4(29 90 1371 1310) +4(89 1370 1371 90) +4(30 91 1372 1311) +4(90 1371 1372 91) +4(31 92 1373 1312) +4(91 1372 1373 92) +4(32 93 1374 1313) +4(92 1373 1374 93) +4(33 94 1375 1314) +4(93 1374 1375 94) +4(34 95 1376 1315) +4(94 1375 1376 95) +4(35 96 1377 1316) +4(95 1376 1377 96) +4(36 97 1378 1317) +4(96 1377 1378 97) +4(37 98 1379 1318) +4(97 1378 1379 98) +4(38 99 1380 1319) +4(98 1379 1380 99) +4(39 100 1381 1320) +4(99 1380 1381 100) +4(40 101 1382 1321) +4(100 1381 1382 101) +4(41 102 1383 1322) +4(101 1382 1383 102) +4(42 103 1384 1323) +4(102 1383 1384 103) +4(43 104 1385 1324) +4(103 1384 1385 104) +4(44 105 1386 1325) +4(104 1385 1386 105) +4(45 106 1387 1326) +4(105 1386 1387 106) +4(46 107 1388 1327) +4(106 1387 1388 107) +4(47 108 1389 1328) +4(107 1388 1389 108) +4(48 109 1390 1329) +4(108 1389 1390 109) +4(49 110 1391 1330) +4(109 1390 1391 110) +4(50 111 1392 1331) +4(110 1391 1392 111) +4(51 112 1393 1332) +4(111 1392 1393 112) +4(52 113 1394 1333) +4(112 1393 1394 113) +4(53 114 1395 1334) +4(113 1394 1395 114) +4(54 115 1396 1335) +4(114 1395 1396 115) +4(55 116 1397 1336) +4(115 1396 1397 116) +4(56 117 1398 1337) +4(116 1397 1398 117) +4(57 118 1399 1338) +4(117 1398 1399 118) +4(58 119 1400 1339) +4(118 1399 1400 119) +4(59 120 1401 1340) +4(119 1400 1401 120) +4(120 1401 1402 121) +4(62 123 1404 1343) +4(122 1403 1404 123) +4(63 124 1405 1344) +4(123 1404 1405 124) +4(64 125 1406 1345) +4(124 1405 1406 125) +4(65 126 1407 1346) +4(125 1406 1407 126) +4(66 127 1408 1347) +4(126 1407 1408 127) +4(67 128 1409 1348) +4(127 1408 1409 128) +4(68 129 1410 1349) +4(128 1409 1410 129) +4(69 130 1411 1350) +4(129 1410 1411 130) +4(70 131 1412 1351) +4(130 1411 1412 131) +4(71 132 1413 1352) +4(131 1412 1413 132) +4(72 133 1414 1353) +4(132 1413 1414 133) +4(73 134 1415 1354) +4(133 1414 1415 134) +4(74 135 1416 1355) +4(134 1415 1416 135) +4(75 136 1417 1356) +4(135 1416 1417 136) +4(76 137 1418 1357) +4(136 1417 1418 137) +4(77 138 1419 1358) +4(137 1418 1419 138) +4(78 139 1420 1359) +4(138 1419 1420 139) +4(79 140 1421 1360) +4(139 1420 1421 140) +4(80 141 1422 1361) +4(140 1421 1422 141) +4(81 142 1423 1362) +4(141 1422 1423 142) +4(82 143 1424 1363) +4(142 1423 1424 143) +4(83 144 1425 1364) +4(143 1424 1425 144) +4(84 145 1426 1365) +4(144 1425 1426 145) +4(85 146 1427 1366) +4(145 1426 1427 146) +4(86 147 1428 1367) +4(146 1427 1428 147) +4(87 148 1429 1368) +4(147 1428 1429 148) +4(88 149 1430 1369) +4(148 1429 1430 149) +4(89 150 1431 1370) +4(149 1430 1431 150) +4(90 151 1432 1371) +4(150 1431 1432 151) +4(91 152 1433 1372) +4(151 1432 1433 152) +4(92 153 1434 1373) +4(152 1433 1434 153) +4(93 154 1435 1374) +4(153 1434 1435 154) +4(94 155 1436 1375) +4(154 1435 1436 155) +4(95 156 1437 1376) +4(155 1436 1437 156) +4(96 157 1438 1377) +4(156 1437 1438 157) +4(97 158 1439 1378) +4(157 1438 1439 158) +4(98 159 1440 1379) +4(158 1439 1440 159) +4(99 160 1441 1380) +4(159 1440 1441 160) +4(100 161 1442 1381) +4(160 1441 1442 161) +4(101 162 1443 1382) +4(161 1442 1443 162) +4(102 163 1444 1383) +4(162 1443 1444 163) +4(103 164 1445 1384) +4(163 1444 1445 164) +4(104 165 1446 1385) +4(164 1445 1446 165) +4(105 166 1447 1386) +4(165 1446 1447 166) +4(106 167 1448 1387) +4(166 1447 1448 167) +4(107 168 1449 1388) +4(167 1448 1449 168) +4(108 169 1450 1389) +4(168 1449 1450 169) +4(109 170 1451 1390) +4(169 1450 1451 170) +4(110 171 1452 1391) +4(170 1451 1452 171) +4(111 172 1453 1392) +4(171 1452 1453 172) +4(112 173 1454 1393) +4(172 1453 1454 173) +4(113 174 1455 1394) +4(173 1454 1455 174) +4(114 175 1456 1395) +4(174 1455 1456 175) +4(115 176 1457 1396) +4(175 1456 1457 176) +4(116 177 1458 1397) +4(176 1457 1458 177) +4(117 178 1459 1398) +4(177 1458 1459 178) +4(118 179 1460 1399) +4(178 1459 1460 179) +4(119 180 1461 1400) +4(179 1460 1461 180) +4(120 181 1462 1401) +4(180 1461 1462 181) +4(181 1462 1463 182) +4(123 184 1465 1404) +4(183 1464 1465 184) +4(124 185 1466 1405) +4(184 1465 1466 185) +4(125 186 1467 1406) +4(185 1466 1467 186) +4(126 187 1468 1407) +4(186 1467 1468 187) +4(127 188 1469 1408) +4(187 1468 1469 188) +4(128 189 1470 1409) +4(188 1469 1470 189) +4(129 190 1471 1410) +4(189 1470 1471 190) +4(130 191 1472 1411) +4(190 1471 1472 191) +4(131 192 1473 1412) +4(191 1472 1473 192) +4(132 193 1474 1413) +4(192 1473 1474 193) +4(133 194 1475 1414) +4(193 1474 1475 194) +4(134 195 1476 1415) +4(194 1475 1476 195) +4(135 196 1477 1416) +4(195 1476 1477 196) +4(136 197 1478 1417) +4(196 1477 1478 197) +4(137 198 1479 1418) +4(197 1478 1479 198) +4(138 199 1480 1419) +4(198 1479 1480 199) +4(139 200 1481 1420) +4(199 1480 1481 200) +4(140 201 1482 1421) +4(200 1481 1482 201) +4(141 202 1483 1422) +4(201 1482 1483 202) +4(142 203 1484 1423) +4(202 1483 1484 203) +4(143 204 1485 1424) +4(203 1484 1485 204) +4(144 205 1486 1425) +4(204 1485 1486 205) +4(145 206 1487 1426) +4(205 1486 1487 206) +4(146 207 1488 1427) +4(206 1487 1488 207) +4(147 208 1489 1428) +4(207 1488 1489 208) +4(148 209 1490 1429) +4(208 1489 1490 209) +4(149 210 1491 1430) +4(209 1490 1491 210) +4(150 211 1492 1431) +4(210 1491 1492 211) +4(151 212 1493 1432) +4(211 1492 1493 212) +4(152 213 1494 1433) +4(212 1493 1494 213) +4(153 214 1495 1434) +4(213 1494 1495 214) +4(154 215 1496 1435) +4(214 1495 1496 215) +4(155 216 1497 1436) +4(215 1496 1497 216) +4(156 217 1498 1437) +4(216 1497 1498 217) +4(157 218 1499 1438) +4(217 1498 1499 218) +4(158 219 1500 1439) +4(218 1499 1500 219) +4(159 220 1501 1440) +4(219 1500 1501 220) +4(160 221 1502 1441) +4(220 1501 1502 221) +4(161 222 1503 1442) +4(221 1502 1503 222) +4(162 223 1504 1443) +4(222 1503 1504 223) +4(163 224 1505 1444) +4(223 1504 1505 224) +4(164 225 1506 1445) +4(224 1505 1506 225) +4(165 226 1507 1446) +4(225 1506 1507 226) +4(166 227 1508 1447) +4(226 1507 1508 227) +4(167 228 1509 1448) +4(227 1508 1509 228) +4(168 229 1510 1449) +4(228 1509 1510 229) +4(169 230 1511 1450) +4(229 1510 1511 230) +4(170 231 1512 1451) +4(230 1511 1512 231) +4(171 232 1513 1452) +4(231 1512 1513 232) +4(172 233 1514 1453) +4(232 1513 1514 233) +4(173 234 1515 1454) +4(233 1514 1515 234) +4(174 235 1516 1455) +4(234 1515 1516 235) +4(175 236 1517 1456) +4(235 1516 1517 236) +4(176 237 1518 1457) +4(236 1517 1518 237) +4(177 238 1519 1458) +4(237 1518 1519 238) +4(178 239 1520 1459) +4(238 1519 1520 239) +4(179 240 1521 1460) +4(239 1520 1521 240) +4(180 241 1522 1461) +4(240 1521 1522 241) +4(181 242 1523 1462) +4(241 1522 1523 242) +4(242 1523 1524 243) +4(184 245 1526 1465) +4(244 1525 1526 245) +4(185 246 1527 1466) +4(245 1526 1527 246) +4(186 247 1528 1467) +4(246 1527 1528 247) +4(187 248 1529 1468) +4(247 1528 1529 248) +4(188 249 1530 1469) +4(248 1529 1530 249) +4(189 250 1531 1470) +4(249 1530 1531 250) +4(190 251 1532 1471) +4(250 1531 1532 251) +4(191 252 1533 1472) +4(251 1532 1533 252) +4(192 253 1534 1473) +4(252 1533 1534 253) +4(193 254 1535 1474) +4(253 1534 1535 254) +4(194 255 1536 1475) +4(254 1535 1536 255) +4(195 256 1537 1476) +4(255 1536 1537 256) +4(196 257 1538 1477) +4(256 1537 1538 257) +4(197 258 1539 1478) +4(257 1538 1539 258) +4(198 259 1540 1479) +4(258 1539 1540 259) +4(199 260 1541 1480) +4(259 1540 1541 260) +4(200 261 1542 1481) +4(260 1541 1542 261) +4(201 262 1543 1482) +4(261 1542 1543 262) +4(202 263 1544 1483) +4(262 1543 1544 263) +4(203 264 1545 1484) +4(263 1544 1545 264) +4(204 265 1546 1485) +4(264 1545 1546 265) +4(205 266 1547 1486) +4(265 1546 1547 266) +4(206 267 1548 1487) +4(266 1547 1548 267) +4(207 268 1549 1488) +4(267 1548 1549 268) +4(208 269 1550 1489) +4(268 1549 1550 269) +4(209 270 1551 1490) +4(269 1550 1551 270) +4(210 271 1552 1491) +4(270 1551 1552 271) +4(211 272 1553 1492) +4(271 1552 1553 272) +4(212 273 1554 1493) +4(272 1553 1554 273) +4(213 274 1555 1494) +4(273 1554 1555 274) +4(214 275 1556 1495) +4(274 1555 1556 275) +4(215 276 1557 1496) +4(275 1556 1557 276) +4(216 277 1558 1497) +4(276 1557 1558 277) +4(217 278 1559 1498) +4(277 1558 1559 278) +4(218 279 1560 1499) +4(278 1559 1560 279) +4(219 280 1561 1500) +4(279 1560 1561 280) +4(220 281 1562 1501) +4(280 1561 1562 281) +4(221 282 1563 1502) +4(281 1562 1563 282) +4(222 283 1564 1503) +4(282 1563 1564 283) +4(223 284 1565 1504) +4(283 1564 1565 284) +4(224 285 1566 1505) +4(284 1565 1566 285) +4(225 286 1567 1506) +4(285 1566 1567 286) +4(226 287 1568 1507) +4(286 1567 1568 287) +4(227 288 1569 1508) +4(287 1568 1569 288) +4(228 289 1570 1509) +4(288 1569 1570 289) +4(229 290 1571 1510) +4(289 1570 1571 290) +4(230 291 1572 1511) +4(290 1571 1572 291) +4(231 292 1573 1512) +4(291 1572 1573 292) +4(232 293 1574 1513) +4(292 1573 1574 293) +4(233 294 1575 1514) +4(293 1574 1575 294) +4(234 295 1576 1515) +4(294 1575 1576 295) +4(235 296 1577 1516) +4(295 1576 1577 296) +4(236 297 1578 1517) +4(296 1577 1578 297) +4(237 298 1579 1518) +4(297 1578 1579 298) +4(238 299 1580 1519) +4(298 1579 1580 299) +4(239 300 1581 1520) +4(299 1580 1581 300) +4(240 301 1582 1521) +4(300 1581 1582 301) +4(241 302 1583 1522) +4(301 1582 1583 302) +4(242 303 1584 1523) +4(302 1583 1584 303) +4(303 1584 1585 304) +4(245 306 1587 1526) +4(305 1586 1587 306) +4(246 307 1588 1527) +4(306 1587 1588 307) +4(247 308 1589 1528) +4(307 1588 1589 308) +4(248 309 1590 1529) +4(308 1589 1590 309) +4(249 310 1591 1530) +4(309 1590 1591 310) +4(250 311 1592 1531) +4(310 1591 1592 311) +4(251 312 1593 1532) +4(311 1592 1593 312) +4(252 313 1594 1533) +4(312 1593 1594 313) +4(253 314 1595 1534) +4(313 1594 1595 314) +4(254 315 1596 1535) +4(314 1595 1596 315) +4(255 316 1597 1536) +4(315 1596 1597 316) +4(256 317 1598 1537) +4(316 1597 1598 317) +4(257 318 1599 1538) +4(317 1598 1599 318) +4(258 319 1600 1539) +4(318 1599 1600 319) +4(259 320 1601 1540) +4(319 1600 1601 320) +4(260 321 1602 1541) +4(320 1601 1602 321) +4(261 322 1603 1542) +4(321 1602 1603 322) +4(262 323 1604 1543) +4(322 1603 1604 323) +4(263 324 1605 1544) +4(323 1604 1605 324) +4(264 325 1606 1545) +4(324 1605 1606 325) +4(265 326 1607 1546) +4(325 1606 1607 326) +4(266 327 1608 1547) +4(326 1607 1608 327) +4(267 328 1609 1548) +4(327 1608 1609 328) +4(268 329 1610 1549) +4(328 1609 1610 329) +4(269 330 1611 1550) +4(329 1610 1611 330) +4(270 331 1612 1551) +4(330 1611 1612 331) +4(271 332 1613 1552) +4(331 1612 1613 332) +4(272 333 1614 1553) +4(332 1613 1614 333) +4(273 334 1615 1554) +4(333 1614 1615 334) +4(274 335 1616 1555) +4(334 1615 1616 335) +4(275 336 1617 1556) +4(335 1616 1617 336) +4(276 337 1618 1557) +4(336 1617 1618 337) +4(277 338 1619 1558) +4(337 1618 1619 338) +4(278 339 1620 1559) +4(338 1619 1620 339) +4(279 340 1621 1560) +4(339 1620 1621 340) +4(280 341 1622 1561) +4(340 1621 1622 341) +4(281 342 1623 1562) +4(341 1622 1623 342) +4(282 343 1624 1563) +4(342 1623 1624 343) +4(283 344 1625 1564) +4(343 1624 1625 344) +4(284 345 1626 1565) +4(344 1625 1626 345) +4(285 346 1627 1566) +4(345 1626 1627 346) +4(286 347 1628 1567) +4(346 1627 1628 347) +4(287 348 1629 1568) +4(347 1628 1629 348) +4(288 349 1630 1569) +4(348 1629 1630 349) +4(289 350 1631 1570) +4(349 1630 1631 350) +4(290 351 1632 1571) +4(350 1631 1632 351) +4(291 352 1633 1572) +4(351 1632 1633 352) +4(292 353 1634 1573) +4(352 1633 1634 353) +4(293 354 1635 1574) +4(353 1634 1635 354) +4(294 355 1636 1575) +4(354 1635 1636 355) +4(295 356 1637 1576) +4(355 1636 1637 356) +4(296 357 1638 1577) +4(356 1637 1638 357) +4(297 358 1639 1578) +4(357 1638 1639 358) +4(298 359 1640 1579) +4(358 1639 1640 359) +4(299 360 1641 1580) +4(359 1640 1641 360) +4(300 361 1642 1581) +4(360 1641 1642 361) +4(301 362 1643 1582) +4(361 1642 1643 362) +4(302 363 1644 1583) +4(362 1643 1644 363) +4(303 364 1645 1584) +4(363 1644 1645 364) +4(364 1645 1646 365) +4(306 367 1648 1587) +4(366 1647 1648 367) +4(307 368 1649 1588) +4(367 1648 1649 368) +4(308 369 1650 1589) +4(368 1649 1650 369) +4(309 370 1651 1590) +4(369 1650 1651 370) +4(310 371 1652 1591) +4(370 1651 1652 371) +4(311 372 1653 1592) +4(371 1652 1653 372) +4(312 373 1654 1593) +4(372 1653 1654 373) +4(313 374 1655 1594) +4(373 1654 1655 374) +4(314 375 1656 1595) +4(374 1655 1656 375) +4(315 376 1657 1596) +4(375 1656 1657 376) +4(316 377 1658 1597) +4(376 1657 1658 377) +4(317 378 1659 1598) +4(377 1658 1659 378) +4(318 379 1660 1599) +4(378 1659 1660 379) +4(319 380 1661 1600) +4(379 1660 1661 380) +4(320 381 1662 1601) +4(380 1661 1662 381) +4(321 382 1663 1602) +4(381 1662 1663 382) +4(322 383 1664 1603) +4(382 1663 1664 383) +4(323 384 1665 1604) +4(383 1664 1665 384) +4(324 385 1666 1605) +4(384 1665 1666 385) +4(325 386 1667 1606) +4(385 1666 1667 386) +4(326 387 1668 1607) +4(386 1667 1668 387) +4(327 388 1669 1608) +4(387 1668 1669 388) +4(328 389 1670 1609) +4(388 1669 1670 389) +4(329 390 1671 1610) +4(389 1670 1671 390) +4(330 391 1672 1611) +4(390 1671 1672 391) +4(331 392 1673 1612) +4(391 1672 1673 392) +4(332 393 1674 1613) +4(392 1673 1674 393) +4(333 394 1675 1614) +4(393 1674 1675 394) +4(334 395 1676 1615) +4(394 1675 1676 395) +4(335 396 1677 1616) +4(395 1676 1677 396) +4(336 397 1678 1617) +4(396 1677 1678 397) +4(337 398 1679 1618) +4(397 1678 1679 398) +4(338 399 1680 1619) +4(398 1679 1680 399) +4(339 400 1681 1620) +4(399 1680 1681 400) +4(340 401 1682 1621) +4(400 1681 1682 401) +4(341 402 1683 1622) +4(401 1682 1683 402) +4(342 403 1684 1623) +4(402 1683 1684 403) +4(343 404 1685 1624) +4(403 1684 1685 404) +4(344 405 1686 1625) +4(404 1685 1686 405) +4(345 406 1687 1626) +4(405 1686 1687 406) +4(346 407 1688 1627) +4(406 1687 1688 407) +4(347 408 1689 1628) +4(407 1688 1689 408) +4(348 409 1690 1629) +4(408 1689 1690 409) +4(349 410 1691 1630) +4(409 1690 1691 410) +4(350 411 1692 1631) +4(410 1691 1692 411) +4(351 412 1693 1632) +4(411 1692 1693 412) +4(352 413 1694 1633) +4(412 1693 1694 413) +4(353 414 1695 1634) +4(413 1694 1695 414) +4(354 415 1696 1635) +4(414 1695 1696 415) +4(355 416 1697 1636) +4(415 1696 1697 416) +4(356 417 1698 1637) +4(416 1697 1698 417) +4(357 418 1699 1638) +4(417 1698 1699 418) +4(358 419 1700 1639) +4(418 1699 1700 419) +4(359 420 1701 1640) +4(419 1700 1701 420) +4(360 421 1702 1641) +4(420 1701 1702 421) +4(361 422 1703 1642) +4(421 1702 1703 422) +4(362 423 1704 1643) +4(422 1703 1704 423) +4(363 424 1705 1644) +4(423 1704 1705 424) +4(364 425 1706 1645) +4(424 1705 1706 425) +4(425 1706 1707 426) +4(367 428 1709 1648) +4(427 1708 1709 428) +4(368 429 1710 1649) +4(428 1709 1710 429) +4(369 430 1711 1650) +4(429 1710 1711 430) +4(370 431 1712 1651) +4(430 1711 1712 431) +4(371 432 1713 1652) +4(431 1712 1713 432) +4(372 433 1714 1653) +4(432 1713 1714 433) +4(373 434 1715 1654) +4(433 1714 1715 434) +4(374 435 1716 1655) +4(434 1715 1716 435) +4(375 436 1717 1656) +4(435 1716 1717 436) +4(376 437 1718 1657) +4(436 1717 1718 437) +4(377 438 1719 1658) +4(437 1718 1719 438) +4(378 439 1720 1659) +4(438 1719 1720 439) +4(379 440 1721 1660) +4(439 1720 1721 440) +4(380 441 1722 1661) +4(440 1721 1722 441) +4(381 442 1723 1662) +4(441 1722 1723 442) +4(382 443 1724 1663) +4(442 1723 1724 443) +4(383 444 1725 1664) +4(443 1724 1725 444) +4(384 445 1726 1665) +4(444 1725 1726 445) +4(385 446 1727 1666) +4(445 1726 1727 446) +4(386 447 1728 1667) +4(446 1727 1728 447) +4(387 448 1729 1668) +4(447 1728 1729 448) +4(388 449 1730 1669) +4(448 1729 1730 449) +4(389 450 1731 1670) +4(449 1730 1731 450) +4(390 451 1732 1671) +4(450 1731 1732 451) +4(391 452 1733 1672) +4(451 1732 1733 452) +4(392 453 1734 1673) +4(452 1733 1734 453) +4(393 454 1735 1674) +4(453 1734 1735 454) +4(394 455 1736 1675) +4(454 1735 1736 455) +4(395 456 1737 1676) +4(455 1736 1737 456) +4(396 457 1738 1677) +4(456 1737 1738 457) +4(397 458 1739 1678) +4(457 1738 1739 458) +4(398 459 1740 1679) +4(458 1739 1740 459) +4(399 460 1741 1680) +4(459 1740 1741 460) +4(400 461 1742 1681) +4(460 1741 1742 461) +4(401 462 1743 1682) +4(461 1742 1743 462) +4(402 463 1744 1683) +4(462 1743 1744 463) +4(403 464 1745 1684) +4(463 1744 1745 464) +4(404 465 1746 1685) +4(464 1745 1746 465) +4(405 466 1747 1686) +4(465 1746 1747 466) +4(406 467 1748 1687) +4(466 1747 1748 467) +4(407 468 1749 1688) +4(467 1748 1749 468) +4(408 469 1750 1689) +4(468 1749 1750 469) +4(409 470 1751 1690) +4(469 1750 1751 470) +4(410 471 1752 1691) +4(470 1751 1752 471) +4(411 472 1753 1692) +4(471 1752 1753 472) +4(412 473 1754 1693) +4(472 1753 1754 473) +4(413 474 1755 1694) +4(473 1754 1755 474) +4(414 475 1756 1695) +4(474 1755 1756 475) +4(415 476 1757 1696) +4(475 1756 1757 476) +4(416 477 1758 1697) +4(476 1757 1758 477) +4(417 478 1759 1698) +4(477 1758 1759 478) +4(418 479 1760 1699) +4(478 1759 1760 479) +4(419 480 1761 1700) +4(479 1760 1761 480) +4(420 481 1762 1701) +4(480 1761 1762 481) +4(421 482 1763 1702) +4(481 1762 1763 482) +4(422 483 1764 1703) +4(482 1763 1764 483) +4(423 484 1765 1704) +4(483 1764 1765 484) +4(424 485 1766 1705) +4(484 1765 1766 485) +4(425 486 1767 1706) +4(485 1766 1767 486) +4(486 1767 1768 487) +4(428 489 1770 1709) +4(488 1769 1770 489) +4(429 490 1771 1710) +4(489 1770 1771 490) +4(430 491 1772 1711) +4(490 1771 1772 491) +4(431 492 1773 1712) +4(491 1772 1773 492) +4(432 493 1774 1713) +4(492 1773 1774 493) +4(433 494 1775 1714) +4(493 1774 1775 494) +4(434 495 1776 1715) +4(494 1775 1776 495) +4(435 496 1777 1716) +4(495 1776 1777 496) +4(436 497 1778 1717) +4(496 1777 1778 497) +4(437 498 1779 1718) +4(497 1778 1779 498) +4(438 499 1780 1719) +4(498 1779 1780 499) +4(439 500 1781 1720) +4(499 1780 1781 500) +4(440 501 1782 1721) +4(500 1781 1782 501) +4(441 502 1783 1722) +4(501 1782 1783 502) +4(442 503 1784 1723) +4(502 1783 1784 503) +4(443 504 1785 1724) +4(503 1784 1785 504) +4(444 505 1786 1725) +4(504 1785 1786 505) +4(445 506 1787 1726) +4(505 1786 1787 506) +4(446 507 1788 1727) +4(506 1787 1788 507) +4(447 508 1789 1728) +4(507 1788 1789 508) +4(448 509 1790 1729) +4(508 1789 1790 509) +4(449 510 1791 1730) +4(509 1790 1791 510) +4(450 511 1792 1731) +4(510 1791 1792 511) +4(451 512 1793 1732) +4(511 1792 1793 512) +4(452 513 1794 1733) +4(512 1793 1794 513) +4(453 514 1795 1734) +4(513 1794 1795 514) +4(454 515 1796 1735) +4(514 1795 1796 515) +4(455 516 1797 1736) +4(515 1796 1797 516) +4(456 517 1798 1737) +4(516 1797 1798 517) +4(457 518 1799 1738) +4(517 1798 1799 518) +4(458 519 1800 1739) +4(518 1799 1800 519) +4(459 520 1801 1740) +4(519 1800 1801 520) +4(460 521 1802 1741) +4(520 1801 1802 521) +4(461 522 1803 1742) +4(521 1802 1803 522) +4(462 523 1804 1743) +4(522 1803 1804 523) +4(463 524 1805 1744) +4(523 1804 1805 524) +4(464 525 1806 1745) +4(524 1805 1806 525) +4(465 526 1807 1746) +4(525 1806 1807 526) +4(466 527 1808 1747) +4(526 1807 1808 527) +4(467 528 1809 1748) +4(527 1808 1809 528) +4(468 529 1810 1749) +4(528 1809 1810 529) +4(469 530 1811 1750) +4(529 1810 1811 530) +4(470 531 1812 1751) +4(530 1811 1812 531) +4(471 532 1813 1752) +4(531 1812 1813 532) +4(472 533 1814 1753) +4(532 1813 1814 533) +4(473 534 1815 1754) +4(533 1814 1815 534) +4(474 535 1816 1755) +4(534 1815 1816 535) +4(475 536 1817 1756) +4(535 1816 1817 536) +4(476 537 1818 1757) +4(536 1817 1818 537) +4(477 538 1819 1758) +4(537 1818 1819 538) +4(478 539 1820 1759) +4(538 1819 1820 539) +4(479 540 1821 1760) +4(539 1820 1821 540) +4(480 541 1822 1761) +4(540 1821 1822 541) +4(481 542 1823 1762) +4(541 1822 1823 542) +4(482 543 1824 1763) +4(542 1823 1824 543) +4(483 544 1825 1764) +4(543 1824 1825 544) +4(484 545 1826 1765) +4(544 1825 1826 545) +4(485 546 1827 1766) +4(545 1826 1827 546) +4(486 547 1828 1767) +4(546 1827 1828 547) +4(547 1828 1829 548) +4(489 550 1831 1770) +4(549 1830 1831 550) +4(490 551 1832 1771) +4(550 1831 1832 551) +4(491 552 1833 1772) +4(551 1832 1833 552) +4(492 553 1834 1773) +4(552 1833 1834 553) +4(493 554 1835 1774) +4(553 1834 1835 554) +4(494 555 1836 1775) +4(554 1835 1836 555) +4(495 556 1837 1776) +4(555 1836 1837 556) +4(496 557 1838 1777) +4(556 1837 1838 557) +4(497 558 1839 1778) +4(557 1838 1839 558) +4(498 559 1840 1779) +4(558 1839 1840 559) +4(499 560 1841 1780) +4(559 1840 1841 560) +4(500 561 1842 1781) +4(560 1841 1842 561) +4(501 562 1843 1782) +4(561 1842 1843 562) +4(502 563 1844 1783) +4(562 1843 1844 563) +4(503 564 1845 1784) +4(563 1844 1845 564) +4(504 565 1846 1785) +4(564 1845 1846 565) +4(505 566 1847 1786) +4(565 1846 1847 566) +4(506 567 1848 1787) +4(566 1847 1848 567) +4(507 568 1849 1788) +4(567 1848 1849 568) +4(508 569 1850 1789) +4(568 1849 1850 569) +4(509 570 1851 1790) +4(569 1850 1851 570) +4(510 571 1852 1791) +4(570 1851 1852 571) +4(511 572 1853 1792) +4(571 1852 1853 572) +4(512 573 1854 1793) +4(572 1853 1854 573) +4(513 574 1855 1794) +4(573 1854 1855 574) +4(514 575 1856 1795) +4(574 1855 1856 575) +4(515 576 1857 1796) +4(575 1856 1857 576) +4(516 577 1858 1797) +4(576 1857 1858 577) +4(517 578 1859 1798) +4(577 1858 1859 578) +4(518 579 1860 1799) +4(578 1859 1860 579) +4(519 580 1861 1800) +4(579 1860 1861 580) +4(520 581 1862 1801) +4(580 1861 1862 581) +4(521 582 1863 1802) +4(581 1862 1863 582) +4(522 583 1864 1803) +4(582 1863 1864 583) +4(523 584 1865 1804) +4(583 1864 1865 584) +4(524 585 1866 1805) +4(584 1865 1866 585) +4(525 586 1867 1806) +4(585 1866 1867 586) +4(526 587 1868 1807) +4(586 1867 1868 587) +4(527 588 1869 1808) +4(587 1868 1869 588) +4(528 589 1870 1809) +4(588 1869 1870 589) +4(529 590 1871 1810) +4(589 1870 1871 590) +4(530 591 1872 1811) +4(590 1871 1872 591) +4(531 592 1873 1812) +4(591 1872 1873 592) +4(532 593 1874 1813) +4(592 1873 1874 593) +4(533 594 1875 1814) +4(593 1874 1875 594) +4(534 595 1876 1815) +4(594 1875 1876 595) +4(535 596 1877 1816) +4(595 1876 1877 596) +4(536 597 1878 1817) +4(596 1877 1878 597) +4(537 598 1879 1818) +4(597 1878 1879 598) +4(538 599 1880 1819) +4(598 1879 1880 599) +4(539 600 1881 1820) +4(599 1880 1881 600) +4(540 601 1882 1821) +4(600 1881 1882 601) +4(541 602 1883 1822) +4(601 1882 1883 602) +4(542 603 1884 1823) +4(602 1883 1884 603) +4(543 604 1885 1824) +4(603 1884 1885 604) +4(544 605 1886 1825) +4(604 1885 1886 605) +4(545 606 1887 1826) +4(605 1886 1887 606) +4(546 607 1888 1827) +4(606 1887 1888 607) +4(547 608 1889 1828) +4(607 1888 1889 608) +4(608 1889 1890 609) +4(550 611 1892 1831) +4(610 1891 1892 611) +4(551 612 1893 1832) +4(611 1892 1893 612) +4(552 613 1894 1833) +4(612 1893 1894 613) +4(553 614 1895 1834) +4(613 1894 1895 614) +4(554 615 1896 1835) +4(614 1895 1896 615) +4(555 616 1897 1836) +4(615 1896 1897 616) +4(556 617 1898 1837) +4(616 1897 1898 617) +4(557 618 1899 1838) +4(617 1898 1899 618) +4(558 619 1900 1839) +4(618 1899 1900 619) +4(559 620 1901 1840) +4(619 1900 1901 620) +4(560 621 1902 1841) +4(620 1901 1902 621) +4(561 622 1903 1842) +4(621 1902 1903 622) +4(562 623 1904 1843) +4(622 1903 1904 623) +4(563 624 1905 1844) +4(623 1904 1905 624) +4(564 625 1906 1845) +4(624 1905 1906 625) +4(565 626 1907 1846) +4(625 1906 1907 626) +4(566 627 1908 1847) +4(626 1907 1908 627) +4(567 628 1909 1848) +4(627 1908 1909 628) +4(568 629 1910 1849) +4(628 1909 1910 629) +4(569 630 1911 1850) +4(629 1910 1911 630) +4(570 631 1912 1851) +4(630 1911 1912 631) +4(571 632 1913 1852) +4(631 1912 1913 632) +4(572 633 1914 1853) +4(632 1913 1914 633) +4(573 634 1915 1854) +4(633 1914 1915 634) +4(574 635 1916 1855) +4(634 1915 1916 635) +4(575 636 1917 1856) +4(635 1916 1917 636) +4(576 637 1918 1857) +4(636 1917 1918 637) +4(577 638 1919 1858) +4(637 1918 1919 638) +4(578 639 1920 1859) +4(638 1919 1920 639) +4(579 640 1921 1860) +4(639 1920 1921 640) +4(580 641 1922 1861) +4(640 1921 1922 641) +4(581 642 1923 1862) +4(641 1922 1923 642) +4(582 643 1924 1863) +4(642 1923 1924 643) +4(583 644 1925 1864) +4(643 1924 1925 644) +4(584 645 1926 1865) +4(644 1925 1926 645) +4(585 646 1927 1866) +4(645 1926 1927 646) +4(586 647 1928 1867) +4(646 1927 1928 647) +4(587 648 1929 1868) +4(647 1928 1929 648) +4(588 649 1930 1869) +4(648 1929 1930 649) +4(589 650 1931 1870) +4(649 1930 1931 650) +4(590 651 1932 1871) +4(650 1931 1932 651) +4(591 652 1933 1872) +4(651 1932 1933 652) +4(592 653 1934 1873) +4(652 1933 1934 653) +4(593 654 1935 1874) +4(653 1934 1935 654) +4(594 655 1936 1875) +4(654 1935 1936 655) +4(595 656 1937 1876) +4(655 1936 1937 656) +4(596 657 1938 1877) +4(656 1937 1938 657) +4(597 658 1939 1878) +4(657 1938 1939 658) +4(598 659 1940 1879) +4(658 1939 1940 659) +4(599 660 1941 1880) +4(659 1940 1941 660) +4(600 661 1942 1881) +4(660 1941 1942 661) +4(601 662 1943 1882) +4(661 1942 1943 662) +4(602 663 1944 1883) +4(662 1943 1944 663) +4(603 664 1945 1884) +4(663 1944 1945 664) +4(604 665 1946 1885) +4(664 1945 1946 665) +4(605 666 1947 1886) +4(665 1946 1947 666) +4(606 667 1948 1887) +4(666 1947 1948 667) +4(607 668 1949 1888) +4(667 1948 1949 668) +4(608 669 1950 1889) +4(668 1949 1950 669) +4(669 1950 1951 670) +4(611 672 1953 1892) +4(671 1952 1953 672) +4(612 673 1954 1893) +4(672 1953 1954 673) +4(613 674 1955 1894) +4(673 1954 1955 674) +4(614 675 1956 1895) +4(674 1955 1956 675) +4(615 676 1957 1896) +4(675 1956 1957 676) +4(616 677 1958 1897) +4(676 1957 1958 677) +4(617 678 1959 1898) +4(677 1958 1959 678) +4(618 679 1960 1899) +4(678 1959 1960 679) +4(619 680 1961 1900) +4(679 1960 1961 680) +4(620 681 1962 1901) +4(680 1961 1962 681) +4(621 682 1963 1902) +4(681 1962 1963 682) +4(622 683 1964 1903) +4(682 1963 1964 683) +4(623 684 1965 1904) +4(683 1964 1965 684) +4(624 685 1966 1905) +4(684 1965 1966 685) +4(625 686 1967 1906) +4(685 1966 1967 686) +4(626 687 1968 1907) +4(686 1967 1968 687) +4(627 688 1969 1908) +4(687 1968 1969 688) +4(628 689 1970 1909) +4(688 1969 1970 689) +4(629 690 1971 1910) +4(689 1970 1971 690) +4(630 691 1972 1911) +4(690 1971 1972 691) +4(631 692 1973 1912) +4(691 1972 1973 692) +4(632 693 1974 1913) +4(692 1973 1974 693) +4(633 694 1975 1914) +4(693 1974 1975 694) +4(634 695 1976 1915) +4(694 1975 1976 695) +4(635 696 1977 1916) +4(695 1976 1977 696) +4(636 697 1978 1917) +4(696 1977 1978 697) +4(637 698 1979 1918) +4(697 1978 1979 698) +4(638 699 1980 1919) +4(698 1979 1980 699) +4(639 700 1981 1920) +4(699 1980 1981 700) +4(640 701 1982 1921) +4(700 1981 1982 701) +4(641 702 1983 1922) +4(701 1982 1983 702) +4(642 703 1984 1923) +4(702 1983 1984 703) +4(643 704 1985 1924) +4(703 1984 1985 704) +4(644 705 1986 1925) +4(704 1985 1986 705) +4(645 706 1987 1926) +4(705 1986 1987 706) +4(646 707 1988 1927) +4(706 1987 1988 707) +4(647 708 1989 1928) +4(707 1988 1989 708) +4(648 709 1990 1929) +4(708 1989 1990 709) +4(649 710 1991 1930) +4(709 1990 1991 710) +4(650 711 1992 1931) +4(710 1991 1992 711) +4(651 712 1993 1932) +4(711 1992 1993 712) +4(652 713 1994 1933) +4(712 1993 1994 713) +4(653 714 1995 1934) +4(713 1994 1995 714) +4(654 715 1996 1935) +4(714 1995 1996 715) +4(655 716 1997 1936) +4(715 1996 1997 716) +4(656 717 1998 1937) +4(716 1997 1998 717) +4(657 718 1999 1938) +4(717 1998 1999 718) +4(658 719 2000 1939) +4(718 1999 2000 719) +4(659 720 2001 1940) +4(719 2000 2001 720) +4(660 721 2002 1941) +4(720 2001 2002 721) +4(661 722 2003 1942) +4(721 2002 2003 722) +4(662 723 2004 1943) +4(722 2003 2004 723) +4(663 724 2005 1944) +4(723 2004 2005 724) +4(664 725 2006 1945) +4(724 2005 2006 725) +4(665 726 2007 1946) +4(725 2006 2007 726) +4(666 727 2008 1947) +4(726 2007 2008 727) +4(667 728 2009 1948) +4(727 2008 2009 728) +4(668 729 2010 1949) +4(728 2009 2010 729) +4(669 730 2011 1950) +4(729 2010 2011 730) +4(730 2011 2012 731) +4(672 733 2014 1953) +4(732 2013 2014 733) +4(673 734 2015 1954) +4(733 2014 2015 734) +4(674 735 2016 1955) +4(734 2015 2016 735) +4(675 736 2017 1956) +4(735 2016 2017 736) +4(676 737 2018 1957) +4(736 2017 2018 737) +4(677 738 2019 1958) +4(737 2018 2019 738) +4(678 739 2020 1959) +4(738 2019 2020 739) +4(679 740 2021 1960) +4(739 2020 2021 740) +4(680 741 2022 1961) +4(740 2021 2022 741) +4(681 742 2023 1962) +4(741 2022 2023 742) +4(682 743 2024 1963) +4(742 2023 2024 743) +4(683 744 2025 1964) +4(743 2024 2025 744) +4(684 745 2026 1965) +4(744 2025 2026 745) +4(685 746 2027 1966) +4(745 2026 2027 746) +4(686 747 2028 1967) +4(746 2027 2028 747) +4(687 748 2029 1968) +4(747 2028 2029 748) +4(688 749 2030 1969) +4(748 2029 2030 749) +4(689 750 2031 1970) +4(749 2030 2031 750) +4(690 751 2032 1971) +4(750 2031 2032 751) +4(691 752 2033 1972) +4(751 2032 2033 752) +4(692 753 2034 1973) +4(752 2033 2034 753) +4(693 754 2035 1974) +4(753 2034 2035 754) +4(694 755 2036 1975) +4(754 2035 2036 755) +4(695 756 2037 1976) +4(755 2036 2037 756) +4(696 757 2038 1977) +4(756 2037 2038 757) +4(697 758 2039 1978) +4(757 2038 2039 758) +4(698 759 2040 1979) +4(758 2039 2040 759) +4(699 760 2041 1980) +4(759 2040 2041 760) +4(700 761 2042 1981) +4(760 2041 2042 761) +4(701 762 2043 1982) +4(761 2042 2043 762) +4(702 763 2044 1983) +4(762 2043 2044 763) +4(703 764 2045 1984) +4(763 2044 2045 764) +4(704 765 2046 1985) +4(764 2045 2046 765) +4(705 766 2047 1986) +4(765 2046 2047 766) +4(706 767 2048 1987) +4(766 2047 2048 767) +4(707 768 2049 1988) +4(767 2048 2049 768) +4(708 769 2050 1989) +4(768 2049 2050 769) +4(709 770 2051 1990) +4(769 2050 2051 770) +4(710 771 2052 1991) +4(770 2051 2052 771) +4(711 772 2053 1992) +4(771 2052 2053 772) +4(712 773 2054 1993) +4(772 2053 2054 773) +4(713 774 2055 1994) +4(773 2054 2055 774) +4(714 775 2056 1995) +4(774 2055 2056 775) +4(715 776 2057 1996) +4(775 2056 2057 776) +4(716 777 2058 1997) +4(776 2057 2058 777) +4(717 778 2059 1998) +4(777 2058 2059 778) +4(718 779 2060 1999) +4(778 2059 2060 779) +4(719 780 2061 2000) +4(779 2060 2061 780) +4(720 781 2062 2001) +4(780 2061 2062 781) +4(721 782 2063 2002) +4(781 2062 2063 782) +4(722 783 2064 2003) +4(782 2063 2064 783) +4(723 784 2065 2004) +4(783 2064 2065 784) +4(724 785 2066 2005) +4(784 2065 2066 785) +4(725 786 2067 2006) +4(785 2066 2067 786) +4(726 787 2068 2007) +4(786 2067 2068 787) +4(727 788 2069 2008) +4(787 2068 2069 788) +4(728 789 2070 2009) +4(788 2069 2070 789) +4(729 790 2071 2010) +4(789 2070 2071 790) +4(730 791 2072 2011) +4(790 2071 2072 791) +4(791 2072 2073 792) +4(733 794 2075 2014) +4(793 2074 2075 794) +4(734 795 2076 2015) +4(794 2075 2076 795) +4(735 796 2077 2016) +4(795 2076 2077 796) +4(736 797 2078 2017) +4(796 2077 2078 797) +4(737 798 2079 2018) +4(797 2078 2079 798) +4(738 799 2080 2019) +4(798 2079 2080 799) +4(739 800 2081 2020) +4(799 2080 2081 800) +4(740 801 2082 2021) +4(800 2081 2082 801) +4(741 802 2083 2022) +4(801 2082 2083 802) +4(742 803 2084 2023) +4(802 2083 2084 803) +4(743 804 2085 2024) +4(803 2084 2085 804) +4(744 805 2086 2025) +4(804 2085 2086 805) +4(745 806 2087 2026) +4(805 2086 2087 806) +4(746 807 2088 2027) +4(806 2087 2088 807) +4(747 808 2089 2028) +4(807 2088 2089 808) +4(748 809 2090 2029) +4(808 2089 2090 809) +4(749 810 2091 2030) +4(809 2090 2091 810) +4(750 811 2092 2031) +4(810 2091 2092 811) +4(751 812 2093 2032) +4(811 2092 2093 812) +4(752 813 2094 2033) +4(812 2093 2094 813) +4(753 814 2095 2034) +4(813 2094 2095 814) +4(754 815 2096 2035) +4(814 2095 2096 815) +4(755 816 2097 2036) +4(815 2096 2097 816) +4(756 817 2098 2037) +4(816 2097 2098 817) +4(757 818 2099 2038) +4(817 2098 2099 818) +4(758 819 2100 2039) +4(818 2099 2100 819) +4(759 820 2101 2040) +4(819 2100 2101 820) +4(760 821 2102 2041) +4(820 2101 2102 821) +4(761 822 2103 2042) +4(821 2102 2103 822) +4(762 823 2104 2043) +4(822 2103 2104 823) +4(763 824 2105 2044) +4(823 2104 2105 824) +4(764 825 2106 2045) +4(824 2105 2106 825) +4(765 826 2107 2046) +4(825 2106 2107 826) +4(766 827 2108 2047) +4(826 2107 2108 827) +4(767 828 2109 2048) +4(827 2108 2109 828) +4(768 829 2110 2049) +4(828 2109 2110 829) +4(769 830 2111 2050) +4(829 2110 2111 830) +4(770 831 2112 2051) +4(830 2111 2112 831) +4(771 832 2113 2052) +4(831 2112 2113 832) +4(772 833 2114 2053) +4(832 2113 2114 833) +4(773 834 2115 2054) +4(833 2114 2115 834) +4(774 835 2116 2055) +4(834 2115 2116 835) +4(775 836 2117 2056) +4(835 2116 2117 836) +4(776 837 2118 2057) +4(836 2117 2118 837) +4(777 838 2119 2058) +4(837 2118 2119 838) +4(778 839 2120 2059) +4(838 2119 2120 839) +4(779 840 2121 2060) +4(839 2120 2121 840) +4(780 841 2122 2061) +4(840 2121 2122 841) +4(781 842 2123 2062) +4(841 2122 2123 842) +4(782 843 2124 2063) +4(842 2123 2124 843) +4(783 844 2125 2064) +4(843 2124 2125 844) +4(784 845 2126 2065) +4(844 2125 2126 845) +4(785 846 2127 2066) +4(845 2126 2127 846) +4(786 847 2128 2067) +4(846 2127 2128 847) +4(787 848 2129 2068) +4(847 2128 2129 848) +4(788 849 2130 2069) +4(848 2129 2130 849) +4(789 850 2131 2070) +4(849 2130 2131 850) +4(790 851 2132 2071) +4(850 2131 2132 851) +4(791 852 2133 2072) +4(851 2132 2133 852) +4(852 2133 2134 853) +4(794 855 2136 2075) +4(854 2135 2136 855) +4(795 856 2137 2076) +4(855 2136 2137 856) +4(796 857 2138 2077) +4(856 2137 2138 857) +4(797 858 2139 2078) +4(857 2138 2139 858) +4(798 859 2140 2079) +4(858 2139 2140 859) +4(799 860 2141 2080) +4(859 2140 2141 860) +4(800 861 2142 2081) +4(860 2141 2142 861) +4(801 862 2143 2082) +4(861 2142 2143 862) +4(802 863 2144 2083) +4(862 2143 2144 863) +4(803 864 2145 2084) +4(863 2144 2145 864) +4(804 865 2146 2085) +4(864 2145 2146 865) +4(805 866 2147 2086) +4(865 2146 2147 866) +4(806 867 2148 2087) +4(866 2147 2148 867) +4(807 868 2149 2088) +4(867 2148 2149 868) +4(808 869 2150 2089) +4(868 2149 2150 869) +4(809 870 2151 2090) +4(869 2150 2151 870) +4(810 871 2152 2091) +4(870 2151 2152 871) +4(811 872 2153 2092) +4(871 2152 2153 872) +4(812 873 2154 2093) +4(872 2153 2154 873) +4(813 874 2155 2094) +4(873 2154 2155 874) +4(814 875 2156 2095) +4(874 2155 2156 875) +4(815 876 2157 2096) +4(875 2156 2157 876) +4(816 877 2158 2097) +4(876 2157 2158 877) +4(817 878 2159 2098) +4(877 2158 2159 878) +4(818 879 2160 2099) +4(878 2159 2160 879) +4(819 880 2161 2100) +4(879 2160 2161 880) +4(820 881 2162 2101) +4(880 2161 2162 881) +4(821 882 2163 2102) +4(881 2162 2163 882) +4(822 883 2164 2103) +4(882 2163 2164 883) +4(823 884 2165 2104) +4(883 2164 2165 884) +4(824 885 2166 2105) +4(884 2165 2166 885) +4(825 886 2167 2106) +4(885 2166 2167 886) +4(826 887 2168 2107) +4(886 2167 2168 887) +4(827 888 2169 2108) +4(887 2168 2169 888) +4(828 889 2170 2109) +4(888 2169 2170 889) +4(829 890 2171 2110) +4(889 2170 2171 890) +4(830 891 2172 2111) +4(890 2171 2172 891) +4(831 892 2173 2112) +4(891 2172 2173 892) +4(832 893 2174 2113) +4(892 2173 2174 893) +4(833 894 2175 2114) +4(893 2174 2175 894) +4(834 895 2176 2115) +4(894 2175 2176 895) +4(835 896 2177 2116) +4(895 2176 2177 896) +4(836 897 2178 2117) +4(896 2177 2178 897) +4(837 898 2179 2118) +4(897 2178 2179 898) +4(838 899 2180 2119) +4(898 2179 2180 899) +4(839 900 2181 2120) +4(899 2180 2181 900) +4(840 901 2182 2121) +4(900 2181 2182 901) +4(841 902 2183 2122) +4(901 2182 2183 902) +4(842 903 2184 2123) +4(902 2183 2184 903) +4(843 904 2185 2124) +4(903 2184 2185 904) +4(844 905 2186 2125) +4(904 2185 2186 905) +4(845 906 2187 2126) +4(905 2186 2187 906) +4(846 907 2188 2127) +4(906 2187 2188 907) +4(847 908 2189 2128) +4(907 2188 2189 908) +4(848 909 2190 2129) +4(908 2189 2190 909) +4(849 910 2191 2130) +4(909 2190 2191 910) +4(850 911 2192 2131) +4(910 2191 2192 911) +4(851 912 2193 2132) +4(911 2192 2193 912) +4(852 913 2194 2133) +4(912 2193 2194 913) +4(913 2194 2195 914) +4(855 916 2197 2136) +4(915 2196 2197 916) +4(856 917 2198 2137) +4(916 2197 2198 917) +4(857 918 2199 2138) +4(917 2198 2199 918) +4(858 919 2200 2139) +4(918 2199 2200 919) +4(859 920 2201 2140) +4(919 2200 2201 920) +4(860 921 2202 2141) +4(920 2201 2202 921) +4(861 922 2203 2142) +4(921 2202 2203 922) +4(862 923 2204 2143) +4(922 2203 2204 923) +4(863 924 2205 2144) +4(923 2204 2205 924) +4(864 925 2206 2145) +4(924 2205 2206 925) +4(865 926 2207 2146) +4(925 2206 2207 926) +4(866 927 2208 2147) +4(926 2207 2208 927) +4(867 928 2209 2148) +4(927 2208 2209 928) +4(868 929 2210 2149) +4(928 2209 2210 929) +4(869 930 2211 2150) +4(929 2210 2211 930) +4(870 931 2212 2151) +4(930 2211 2212 931) +4(871 932 2213 2152) +4(931 2212 2213 932) +4(872 933 2214 2153) +4(932 2213 2214 933) +4(873 934 2215 2154) +4(933 2214 2215 934) +4(874 935 2216 2155) +4(934 2215 2216 935) +4(875 936 2217 2156) +4(935 2216 2217 936) +4(876 937 2218 2157) +4(936 2217 2218 937) +4(877 938 2219 2158) +4(937 2218 2219 938) +4(878 939 2220 2159) +4(938 2219 2220 939) +4(879 940 2221 2160) +4(939 2220 2221 940) +4(880 941 2222 2161) +4(940 2221 2222 941) +4(881 942 2223 2162) +4(941 2222 2223 942) +4(882 943 2224 2163) +4(942 2223 2224 943) +4(883 944 2225 2164) +4(943 2224 2225 944) +4(884 945 2226 2165) +4(944 2225 2226 945) +4(885 946 2227 2166) +4(945 2226 2227 946) +4(886 947 2228 2167) +4(946 2227 2228 947) +4(887 948 2229 2168) +4(947 2228 2229 948) +4(888 949 2230 2169) +4(948 2229 2230 949) +4(889 950 2231 2170) +4(949 2230 2231 950) +4(890 951 2232 2171) +4(950 2231 2232 951) +4(891 952 2233 2172) +4(951 2232 2233 952) +4(892 953 2234 2173) +4(952 2233 2234 953) +4(893 954 2235 2174) +4(953 2234 2235 954) +4(894 955 2236 2175) +4(954 2235 2236 955) +4(895 956 2237 2176) +4(955 2236 2237 956) +4(896 957 2238 2177) +4(956 2237 2238 957) +4(897 958 2239 2178) +4(957 2238 2239 958) +4(898 959 2240 2179) +4(958 2239 2240 959) +4(899 960 2241 2180) +4(959 2240 2241 960) +4(900 961 2242 2181) +4(960 2241 2242 961) +4(901 962 2243 2182) +4(961 2242 2243 962) +4(902 963 2244 2183) +4(962 2243 2244 963) +4(903 964 2245 2184) +4(963 2244 2245 964) +4(904 965 2246 2185) +4(964 2245 2246 965) +4(905 966 2247 2186) +4(965 2246 2247 966) +4(906 967 2248 2187) +4(966 2247 2248 967) +4(907 968 2249 2188) +4(967 2248 2249 968) +4(908 969 2250 2189) +4(968 2249 2250 969) +4(909 970 2251 2190) +4(969 2250 2251 970) +4(910 971 2252 2191) +4(970 2251 2252 971) +4(911 972 2253 2192) +4(971 2252 2253 972) +4(912 973 2254 2193) +4(972 2253 2254 973) +4(913 974 2255 2194) +4(973 2254 2255 974) +4(974 2255 2256 975) +4(916 977 2258 2197) +4(976 2257 2258 977) +4(917 978 2259 2198) +4(977 2258 2259 978) +4(918 979 2260 2199) +4(978 2259 2260 979) +4(919 980 2261 2200) +4(979 2260 2261 980) +4(920 981 2262 2201) +4(980 2261 2262 981) +4(921 982 2263 2202) +4(981 2262 2263 982) +4(922 983 2264 2203) +4(982 2263 2264 983) +4(923 984 2265 2204) +4(983 2264 2265 984) +4(924 985 2266 2205) +4(984 2265 2266 985) +4(925 986 2267 2206) +4(985 2266 2267 986) +4(926 987 2268 2207) +4(986 2267 2268 987) +4(927 988 2269 2208) +4(987 2268 2269 988) +4(928 989 2270 2209) +4(988 2269 2270 989) +4(929 990 2271 2210) +4(989 2270 2271 990) +4(930 991 2272 2211) +4(990 2271 2272 991) +4(931 992 2273 2212) +4(991 2272 2273 992) +4(932 993 2274 2213) +4(992 2273 2274 993) +4(933 994 2275 2214) +4(993 2274 2275 994) +4(934 995 2276 2215) +4(994 2275 2276 995) +4(935 996 2277 2216) +4(995 2276 2277 996) +4(936 997 2278 2217) +4(996 2277 2278 997) +4(937 998 2279 2218) +4(997 2278 2279 998) +4(938 999 2280 2219) +4(998 2279 2280 999) +4(939 1000 2281 2220) +4(999 2280 2281 1000) +4(940 1001 2282 2221) +4(1000 2281 2282 1001) +4(941 1002 2283 2222) +4(1001 2282 2283 1002) +4(942 1003 2284 2223) +4(1002 2283 2284 1003) +4(943 1004 2285 2224) +4(1003 2284 2285 1004) +4(944 1005 2286 2225) +4(1004 2285 2286 1005) +4(945 1006 2287 2226) +4(1005 2286 2287 1006) +4(946 1007 2288 2227) +4(1006 2287 2288 1007) +4(947 1008 2289 2228) +4(1007 2288 2289 1008) +4(948 1009 2290 2229) +4(1008 2289 2290 1009) +4(949 1010 2291 2230) +4(1009 2290 2291 1010) +4(950 1011 2292 2231) +4(1010 2291 2292 1011) +4(951 1012 2293 2232) +4(1011 2292 2293 1012) +4(952 1013 2294 2233) +4(1012 2293 2294 1013) +4(953 1014 2295 2234) +4(1013 2294 2295 1014) +4(954 1015 2296 2235) +4(1014 2295 2296 1015) +4(955 1016 2297 2236) +4(1015 2296 2297 1016) +4(956 1017 2298 2237) +4(1016 2297 2298 1017) +4(957 1018 2299 2238) +4(1017 2298 2299 1018) +4(958 1019 2300 2239) +4(1018 2299 2300 1019) +4(959 1020 2301 2240) +4(1019 2300 2301 1020) +4(960 1021 2302 2241) +4(1020 2301 2302 1021) +4(961 1022 2303 2242) +4(1021 2302 2303 1022) +4(962 1023 2304 2243) +4(1022 2303 2304 1023) +4(963 1024 2305 2244) +4(1023 2304 2305 1024) +4(964 1025 2306 2245) +4(1024 2305 2306 1025) +4(965 1026 2307 2246) +4(1025 2306 2307 1026) +4(966 1027 2308 2247) +4(1026 2307 2308 1027) +4(967 1028 2309 2248) +4(1027 2308 2309 1028) +4(968 1029 2310 2249) +4(1028 2309 2310 1029) +4(969 1030 2311 2250) +4(1029 2310 2311 1030) +4(970 1031 2312 2251) +4(1030 2311 2312 1031) +4(971 1032 2313 2252) +4(1031 2312 2313 1032) +4(972 1033 2314 2253) +4(1032 2313 2314 1033) +4(973 1034 2315 2254) +4(1033 2314 2315 1034) +4(974 1035 2316 2255) +4(1034 2315 2316 1035) +4(1035 2316 2317 1036) +4(977 1038 2319 2258) +4(1037 2318 2319 1038) +4(978 1039 2320 2259) +4(1038 2319 2320 1039) +4(979 1040 2321 2260) +4(1039 2320 2321 1040) +4(980 1041 2322 2261) +4(1040 2321 2322 1041) +4(981 1042 2323 2262) +4(1041 2322 2323 1042) +4(982 1043 2324 2263) +4(1042 2323 2324 1043) +4(983 1044 2325 2264) +4(1043 2324 2325 1044) +4(984 1045 2326 2265) +4(1044 2325 2326 1045) +4(985 1046 2327 2266) +4(1045 2326 2327 1046) +4(986 1047 2328 2267) +4(1046 2327 2328 1047) +4(987 1048 2329 2268) +4(1047 2328 2329 1048) +4(988 1049 2330 2269) +4(1048 2329 2330 1049) +4(989 1050 2331 2270) +4(1049 2330 2331 1050) +4(990 1051 2332 2271) +4(1050 2331 2332 1051) +4(991 1052 2333 2272) +4(1051 2332 2333 1052) +4(992 1053 2334 2273) +4(1052 2333 2334 1053) +4(993 1054 2335 2274) +4(1053 2334 2335 1054) +4(994 1055 2336 2275) +4(1054 2335 2336 1055) +4(995 1056 2337 2276) +4(1055 2336 2337 1056) +4(996 1057 2338 2277) +4(1056 2337 2338 1057) +4(997 1058 2339 2278) +4(1057 2338 2339 1058) +4(998 1059 2340 2279) +4(1058 2339 2340 1059) +4(999 1060 2341 2280) +4(1059 2340 2341 1060) +4(1000 1061 2342 2281) +4(1060 2341 2342 1061) +4(1001 1062 2343 2282) +4(1061 2342 2343 1062) +4(1002 1063 2344 2283) +4(1062 2343 2344 1063) +4(1003 1064 2345 2284) +4(1063 2344 2345 1064) +4(1004 1065 2346 2285) +4(1064 2345 2346 1065) +4(1005 1066 2347 2286) +4(1065 2346 2347 1066) +4(1006 1067 2348 2287) +4(1066 2347 2348 1067) +4(1007 1068 2349 2288) +4(1067 2348 2349 1068) +4(1008 1069 2350 2289) +4(1068 2349 2350 1069) +4(1009 1070 2351 2290) +4(1069 2350 2351 1070) +4(1010 1071 2352 2291) +4(1070 2351 2352 1071) +4(1011 1072 2353 2292) +4(1071 2352 2353 1072) +4(1012 1073 2354 2293) +4(1072 2353 2354 1073) +4(1013 1074 2355 2294) +4(1073 2354 2355 1074) +4(1014 1075 2356 2295) +4(1074 2355 2356 1075) +4(1015 1076 2357 2296) +4(1075 2356 2357 1076) +4(1016 1077 2358 2297) +4(1076 2357 2358 1077) +4(1017 1078 2359 2298) +4(1077 2358 2359 1078) +4(1018 1079 2360 2299) +4(1078 2359 2360 1079) +4(1019 1080 2361 2300) +4(1079 2360 2361 1080) +4(1020 1081 2362 2301) +4(1080 2361 2362 1081) +4(1021 1082 2363 2302) +4(1081 2362 2363 1082) +4(1022 1083 2364 2303) +4(1082 2363 2364 1083) +4(1023 1084 2365 2304) +4(1083 2364 2365 1084) +4(1024 1085 2366 2305) +4(1084 2365 2366 1085) +4(1025 1086 2367 2306) +4(1085 2366 2367 1086) +4(1026 1087 2368 2307) +4(1086 2367 2368 1087) +4(1027 1088 2369 2308) +4(1087 2368 2369 1088) +4(1028 1089 2370 2309) +4(1088 2369 2370 1089) +4(1029 1090 2371 2310) +4(1089 2370 2371 1090) +4(1030 1091 2372 2311) +4(1090 2371 2372 1091) +4(1031 1092 2373 2312) +4(1091 2372 2373 1092) +4(1032 1093 2374 2313) +4(1092 2373 2374 1093) +4(1033 1094 2375 2314) +4(1093 2374 2375 1094) +4(1034 1095 2376 2315) +4(1094 2375 2376 1095) +4(1035 1096 2377 2316) +4(1095 2376 2377 1096) +4(1096 2377 2378 1097) +4(1038 1099 2380 2319) +4(1098 2379 2380 1099) +4(1039 1100 2381 2320) +4(1099 2380 2381 1100) +4(1040 1101 2382 2321) +4(1100 2381 2382 1101) +4(1041 1102 2383 2322) +4(1101 2382 2383 1102) +4(1042 1103 2384 2323) +4(1102 2383 2384 1103) +4(1043 1104 2385 2324) +4(1103 2384 2385 1104) +4(1044 1105 2386 2325) +4(1104 2385 2386 1105) +4(1045 1106 2387 2326) +4(1105 2386 2387 1106) +4(1046 1107 2388 2327) +4(1106 2387 2388 1107) +4(1047 1108 2389 2328) +4(1107 2388 2389 1108) +4(1048 1109 2390 2329) +4(1108 2389 2390 1109) +4(1049 1110 2391 2330) +4(1109 2390 2391 1110) +4(1050 1111 2392 2331) +4(1110 2391 2392 1111) +4(1051 1112 2393 2332) +4(1111 2392 2393 1112) +4(1052 1113 2394 2333) +4(1112 2393 2394 1113) +4(1053 1114 2395 2334) +4(1113 2394 2395 1114) +4(1054 1115 2396 2335) +4(1114 2395 2396 1115) +4(1055 1116 2397 2336) +4(1115 2396 2397 1116) +4(1056 1117 2398 2337) +4(1116 2397 2398 1117) +4(1057 1118 2399 2338) +4(1117 2398 2399 1118) +4(1058 1119 2400 2339) +4(1118 2399 2400 1119) +4(1059 1120 2401 2340) +4(1119 2400 2401 1120) +4(1060 1121 2402 2341) +4(1120 2401 2402 1121) +4(1061 1122 2403 2342) +4(1121 2402 2403 1122) +4(1062 1123 2404 2343) +4(1122 2403 2404 1123) +4(1063 1124 2405 2344) +4(1123 2404 2405 1124) +4(1064 1125 2406 2345) +4(1124 2405 2406 1125) +4(1065 1126 2407 2346) +4(1125 2406 2407 1126) +4(1066 1127 2408 2347) +4(1126 2407 2408 1127) +4(1067 1128 2409 2348) +4(1127 2408 2409 1128) +4(1068 1129 2410 2349) +4(1128 2409 2410 1129) +4(1069 1130 2411 2350) +4(1129 2410 2411 1130) +4(1070 1131 2412 2351) +4(1130 2411 2412 1131) +4(1071 1132 2413 2352) +4(1131 2412 2413 1132) +4(1072 1133 2414 2353) +4(1132 2413 2414 1133) +4(1073 1134 2415 2354) +4(1133 2414 2415 1134) +4(1074 1135 2416 2355) +4(1134 2415 2416 1135) +4(1075 1136 2417 2356) +4(1135 2416 2417 1136) +4(1076 1137 2418 2357) +4(1136 2417 2418 1137) +4(1077 1138 2419 2358) +4(1137 2418 2419 1138) +4(1078 1139 2420 2359) +4(1138 2419 2420 1139) +4(1079 1140 2421 2360) +4(1139 2420 2421 1140) +4(1080 1141 2422 2361) +4(1140 2421 2422 1141) +4(1081 1142 2423 2362) +4(1141 2422 2423 1142) +4(1082 1143 2424 2363) +4(1142 2423 2424 1143) +4(1083 1144 2425 2364) +4(1143 2424 2425 1144) +4(1084 1145 2426 2365) +4(1144 2425 2426 1145) +4(1085 1146 2427 2366) +4(1145 2426 2427 1146) +4(1086 1147 2428 2367) +4(1146 2427 2428 1147) +4(1087 1148 2429 2368) +4(1147 2428 2429 1148) +4(1088 1149 2430 2369) +4(1148 2429 2430 1149) +4(1089 1150 2431 2370) +4(1149 2430 2431 1150) +4(1090 1151 2432 2371) +4(1150 2431 2432 1151) +4(1091 1152 2433 2372) +4(1151 2432 2433 1152) +4(1092 1153 2434 2373) +4(1152 2433 2434 1153) +4(1093 1154 2435 2374) +4(1153 2434 2435 1154) +4(1094 1155 2436 2375) +4(1154 2435 2436 1155) +4(1095 1156 2437 2376) +4(1155 2436 2437 1156) +4(1096 1157 2438 2377) +4(1156 2437 2438 1157) +4(1157 2438 2439 1158) +4(1099 1160 2441 2380) +4(1159 2440 2441 1160) +4(1100 1161 2442 2381) +4(1160 2441 2442 1161) +4(1101 1162 2443 2382) +4(1161 2442 2443 1162) +4(1102 1163 2444 2383) +4(1162 2443 2444 1163) +4(1103 1164 2445 2384) +4(1163 2444 2445 1164) +4(1104 1165 2446 2385) +4(1164 2445 2446 1165) +4(1105 1166 2447 2386) +4(1165 2446 2447 1166) +4(1106 1167 2448 2387) +4(1166 2447 2448 1167) +4(1107 1168 2449 2388) +4(1167 2448 2449 1168) +4(1108 1169 2450 2389) +4(1168 2449 2450 1169) +4(1109 1170 2451 2390) +4(1169 2450 2451 1170) +4(1110 1171 2452 2391) +4(1170 2451 2452 1171) +4(1111 1172 2453 2392) +4(1171 2452 2453 1172) +4(1112 1173 2454 2393) +4(1172 2453 2454 1173) +4(1113 1174 2455 2394) +4(1173 2454 2455 1174) +4(1114 1175 2456 2395) +4(1174 2455 2456 1175) +4(1115 1176 2457 2396) +4(1175 2456 2457 1176) +4(1116 1177 2458 2397) +4(1176 2457 2458 1177) +4(1117 1178 2459 2398) +4(1177 2458 2459 1178) +4(1118 1179 2460 2399) +4(1178 2459 2460 1179) +4(1119 1180 2461 2400) +4(1179 2460 2461 1180) +4(1120 1181 2462 2401) +4(1180 2461 2462 1181) +4(1121 1182 2463 2402) +4(1181 2462 2463 1182) +4(1122 1183 2464 2403) +4(1182 2463 2464 1183) +4(1123 1184 2465 2404) +4(1183 2464 2465 1184) +4(1124 1185 2466 2405) +4(1184 2465 2466 1185) +4(1125 1186 2467 2406) +4(1185 2466 2467 1186) +4(1126 1187 2468 2407) +4(1186 2467 2468 1187) +4(1127 1188 2469 2408) +4(1187 2468 2469 1188) +4(1128 1189 2470 2409) +4(1188 2469 2470 1189) +4(1129 1190 2471 2410) +4(1189 2470 2471 1190) +4(1130 1191 2472 2411) +4(1190 2471 2472 1191) +4(1131 1192 2473 2412) +4(1191 2472 2473 1192) +4(1132 1193 2474 2413) +4(1192 2473 2474 1193) +4(1133 1194 2475 2414) +4(1193 2474 2475 1194) +4(1134 1195 2476 2415) +4(1194 2475 2476 1195) +4(1135 1196 2477 2416) +4(1195 2476 2477 1196) +4(1136 1197 2478 2417) +4(1196 2477 2478 1197) +4(1137 1198 2479 2418) +4(1197 2478 2479 1198) +4(1138 1199 2480 2419) +4(1198 2479 2480 1199) +4(1139 1200 2481 2420) +4(1199 2480 2481 1200) +4(1140 1201 2482 2421) +4(1200 2481 2482 1201) +4(1141 1202 2483 2422) +4(1201 2482 2483 1202) +4(1142 1203 2484 2423) +4(1202 2483 2484 1203) +4(1143 1204 2485 2424) +4(1203 2484 2485 1204) +4(1144 1205 2486 2425) +4(1204 2485 2486 1205) +4(1145 1206 2487 2426) +4(1205 2486 2487 1206) +4(1146 1207 2488 2427) +4(1206 2487 2488 1207) +4(1147 1208 2489 2428) +4(1207 2488 2489 1208) +4(1148 1209 2490 2429) +4(1208 2489 2490 1209) +4(1149 1210 2491 2430) +4(1209 2490 2491 1210) +4(1150 1211 2492 2431) +4(1210 2491 2492 1211) +4(1151 1212 2493 2432) +4(1211 2492 2493 1212) +4(1152 1213 2494 2433) +4(1212 2493 2494 1213) +4(1153 1214 2495 2434) +4(1213 2494 2495 1214) +4(1154 1215 2496 2435) +4(1214 2495 2496 1215) +4(1155 1216 2497 2436) +4(1215 2496 2497 1216) +4(1156 1217 2498 2437) +4(1216 2497 2498 1217) +4(1157 1218 2499 2438) +4(1217 2498 2499 1218) +4(1218 2499 2500 1219) +4(1160 1221 2502 2441) +4(1161 1222 2503 2442) +4(1162 1223 2504 2443) +4(1163 1224 2505 2444) +4(1164 1225 2506 2445) +4(1165 1226 2507 2446) +4(1166 1227 2508 2447) +4(1167 1228 2509 2448) +4(1168 1229 2510 2449) +4(1169 1230 2511 2450) +4(1170 1231 2512 2451) +4(1171 1232 2513 2452) +4(1172 1233 2514 2453) +4(1173 1234 2515 2454) +4(1174 1235 2516 2455) +4(1175 1236 2517 2456) +4(1176 1237 2518 2457) +4(1177 1238 2519 2458) +4(1178 1239 2520 2459) +4(1179 1240 2521 2460) +4(1180 1241 2522 2461) +4(1181 1242 2523 2462) +4(1182 1243 2524 2463) +4(1183 1244 2525 2464) +4(1184 1245 2526 2465) +4(1185 1246 2527 2466) +4(1186 1247 2528 2467) +4(1187 1248 2529 2468) +4(1188 1249 2530 2469) +4(1189 1250 2531 2470) +4(1190 1251 2532 2471) +4(1191 1252 2533 2472) +4(1192 1253 2534 2473) +4(1193 1254 2535 2474) +4(1194 1255 2536 2475) +4(1195 1256 2537 2476) +4(1196 1257 2538 2477) +4(1197 1258 2539 2478) +4(1198 1259 2540 2479) +4(1199 1260 2541 2480) +4(1200 1261 2542 2481) +4(1201 1262 2543 2482) +4(1202 1263 2544 2483) +4(1203 1264 2545 2484) +4(1204 1265 2546 2485) +4(1205 1266 2547 2486) +4(1206 1267 2548 2487) +4(1207 1268 2549 2488) +4(1208 1269 2550 2489) +4(1209 1270 2551 2490) +4(1210 1271 2552 2491) +4(1211 1272 2553 2492) +4(1212 1273 2554 2493) +4(1213 1274 2555 2494) +4(1214 1275 2556 2495) +4(1215 1276 2557 2496) +4(1216 1277 2558 2497) +4(1217 1278 2559 2498) +4(1218 1279 2560 2499) +4(0 1281 1342 61) +4(61 1342 1403 122) +4(122 1403 1464 183) +4(183 1464 1525 244) +4(244 1525 1586 305) +4(305 1586 1647 366) +4(366 1647 1708 427) +4(427 1708 1769 488) +4(488 1769 1830 549) +4(549 1830 1891 610) +4(610 1891 1952 671) +4(671 1952 2013 732) +4(732 2013 2074 793) +4(793 2074 2135 854) +4(854 2135 2196 915) +4(915 2196 2257 976) +4(976 2257 2318 1037) +4(1037 2318 2379 1098) +4(1098 2379 2440 1159) +4(1159 2440 2501 1220) +4(1220 2501 2502 1221) +4(1221 2502 2503 1222) +4(1222 2503 2504 1223) +4(1223 2504 2505 1224) +4(1224 2505 2506 1225) +4(1225 2506 2507 1226) +4(1226 2507 2508 1227) +4(1227 2508 2509 1228) +4(1228 2509 2510 1229) +4(1229 2510 2511 1230) +4(1230 2511 2512 1231) +4(1231 2512 2513 1232) +4(1232 2513 2514 1233) +4(1233 2514 2515 1234) +4(1234 2515 2516 1235) +4(1235 2516 2517 1236) +4(1236 2517 2518 1237) +4(1237 2518 2519 1238) +4(1238 2519 2520 1239) +4(1239 2520 2521 1240) +4(1240 2521 2522 1241) +4(1241 2522 2523 1242) +4(1242 2523 2524 1243) +4(1243 2524 2525 1244) +4(1244 2525 2526 1245) +4(1245 2526 2527 1246) +4(1246 2527 2528 1247) +4(1247 2528 2529 1248) +4(1248 2529 2530 1249) +4(1249 2530 2531 1250) +4(1250 2531 2532 1251) +4(1251 2532 2533 1252) +4(1252 2533 2534 1253) +4(1253 2534 2535 1254) +4(1254 2535 2536 1255) +4(1255 2536 2537 1256) +4(1256 2537 2538 1257) +4(1257 2538 2539 1258) +4(1258 2539 2540 1259) +4(1259 2540 2541 1260) +4(1260 2541 2542 1261) +4(1261 2542 2543 1262) +4(1262 2543 2544 1263) +4(1263 2544 2545 1264) +4(1264 2545 2546 1265) +4(1265 2546 2547 1266) +4(1266 2547 2548 1267) +4(1267 2548 2549 1268) +4(1268 2549 2550 1269) +4(1269 2550 2551 1270) +4(1270 2551 2552 1271) +4(1271 2552 2553 1272) +4(1272 2553 2554 1273) +4(1273 2554 2555 1274) +4(1274 2555 2556 1275) +4(1275 2556 2557 1276) +4(1276 2557 2558 1277) +4(1277 2558 2559 1278) +4(1278 2559 2560 1279) +4(1279 2560 2561 1280) +4(0 1 1282 1281) +4(1 2 1283 1282) +4(2 3 1284 1283) +4(3 4 1285 1284) +4(4 5 1286 1285) +4(5 6 1287 1286) +4(6 7 1288 1287) +4(7 8 1289 1288) +4(8 9 1290 1289) +4(9 10 1291 1290) +4(10 11 1292 1291) +4(11 12 1293 1292) +4(12 13 1294 1293) +4(13 14 1295 1294) +4(14 15 1296 1295) +4(15 16 1297 1296) +4(16 17 1298 1297) +4(17 18 1299 1298) +4(18 19 1300 1299) +4(19 20 1301 1300) +4(20 21 1302 1301) +4(21 22 1303 1302) +4(22 23 1304 1303) +4(23 24 1305 1304) +4(24 25 1306 1305) +4(25 26 1307 1306) +4(26 27 1308 1307) +4(27 28 1309 1308) +4(28 29 1310 1309) +4(29 30 1311 1310) +4(30 31 1312 1311) +4(31 32 1313 1312) +4(32 33 1314 1313) +4(33 34 1315 1314) +4(34 35 1316 1315) +4(35 36 1317 1316) +4(36 37 1318 1317) +4(37 38 1319 1318) +4(38 39 1320 1319) +4(39 40 1321 1320) +4(40 41 1322 1321) +4(41 42 1323 1322) +4(42 43 1324 1323) +4(43 44 1325 1324) +4(44 45 1326 1325) +4(45 46 1327 1326) +4(46 47 1328 1327) +4(47 48 1329 1328) +4(48 49 1330 1329) +4(49 50 1331 1330) +4(50 51 1332 1331) +4(51 52 1333 1332) +4(52 53 1334 1333) +4(53 54 1335 1334) +4(54 55 1336 1335) +4(55 56 1337 1336) +4(56 57 1338 1337) +4(57 58 1339 1338) +4(58 59 1340 1339) +4(59 60 1341 1340) +4(60 121 1402 1341) +4(121 182 1463 1402) +4(182 243 1524 1463) +4(243 304 1585 1524) +4(304 365 1646 1585) +4(365 426 1707 1646) +4(426 487 1768 1707) +4(487 548 1829 1768) +4(548 609 1890 1829) +4(609 670 1951 1890) +4(670 731 2012 1951) +4(731 792 2073 2012) +4(792 853 2134 2073) +4(853 914 2195 2134) +4(914 975 2256 2195) +4(975 1036 2317 2256) +4(1036 1097 2378 2317) +4(1097 1158 2439 2378) +4(1158 1219 2500 2439) +4(1219 1280 2561 2500) +4(0 61 62 1) +4(61 122 123 62) +4(122 183 184 123) +4(183 244 245 184) +4(244 305 306 245) +4(305 366 367 306) +4(366 427 428 367) +4(427 488 489 428) +4(488 549 550 489) +4(549 610 611 550) +4(610 671 672 611) +4(671 732 733 672) +4(732 793 794 733) +4(793 854 855 794) +4(854 915 916 855) +4(915 976 977 916) +4(976 1037 1038 977) +4(1037 1098 1099 1038) +4(1098 1159 1160 1099) +4(1159 1220 1221 1160) +4(1 62 63 2) +4(62 123 124 63) +4(123 184 185 124) +4(184 245 246 185) +4(245 306 307 246) +4(306 367 368 307) +4(367 428 429 368) +4(428 489 490 429) +4(489 550 551 490) +4(550 611 612 551) +4(611 672 673 612) +4(672 733 734 673) +4(733 794 795 734) +4(794 855 856 795) +4(855 916 917 856) +4(916 977 978 917) +4(977 1038 1039 978) +4(1038 1099 1100 1039) +4(1099 1160 1161 1100) +4(1160 1221 1222 1161) +4(2 63 64 3) +4(63 124 125 64) +4(124 185 186 125) +4(185 246 247 186) +4(246 307 308 247) +4(307 368 369 308) +4(368 429 430 369) +4(429 490 491 430) +4(490 551 552 491) +4(551 612 613 552) +4(612 673 674 613) +4(673 734 735 674) +4(734 795 796 735) +4(795 856 857 796) +4(856 917 918 857) +4(917 978 979 918) +4(978 1039 1040 979) +4(1039 1100 1101 1040) +4(1100 1161 1162 1101) +4(1161 1222 1223 1162) +4(3 64 65 4) +4(64 125 126 65) +4(125 186 187 126) +4(186 247 248 187) +4(247 308 309 248) +4(308 369 370 309) +4(369 430 431 370) +4(430 491 492 431) +4(491 552 553 492) +4(552 613 614 553) +4(613 674 675 614) +4(674 735 736 675) +4(735 796 797 736) +4(796 857 858 797) +4(857 918 919 858) +4(918 979 980 919) +4(979 1040 1041 980) +4(1040 1101 1102 1041) +4(1101 1162 1163 1102) +4(1162 1223 1224 1163) +4(4 65 66 5) +4(65 126 127 66) +4(126 187 188 127) +4(187 248 249 188) +4(248 309 310 249) +4(309 370 371 310) +4(370 431 432 371) +4(431 492 493 432) +4(492 553 554 493) +4(553 614 615 554) +4(614 675 676 615) +4(675 736 737 676) +4(736 797 798 737) +4(797 858 859 798) +4(858 919 920 859) +4(919 980 981 920) +4(980 1041 1042 981) +4(1041 1102 1103 1042) +4(1102 1163 1164 1103) +4(1163 1224 1225 1164) +4(5 66 67 6) +4(66 127 128 67) +4(127 188 189 128) +4(188 249 250 189) +4(249 310 311 250) +4(310 371 372 311) +4(371 432 433 372) +4(432 493 494 433) +4(493 554 555 494) +4(554 615 616 555) +4(615 676 677 616) +4(676 737 738 677) +4(737 798 799 738) +4(798 859 860 799) +4(859 920 921 860) +4(920 981 982 921) +4(981 1042 1043 982) +4(1042 1103 1104 1043) +4(1103 1164 1165 1104) +4(1164 1225 1226 1165) +4(6 67 68 7) +4(67 128 129 68) +4(128 189 190 129) +4(189 250 251 190) +4(250 311 312 251) +4(311 372 373 312) +4(372 433 434 373) +4(433 494 495 434) +4(494 555 556 495) +4(555 616 617 556) +4(616 677 678 617) +4(677 738 739 678) +4(738 799 800 739) +4(799 860 861 800) +4(860 921 922 861) +4(921 982 983 922) +4(982 1043 1044 983) +4(1043 1104 1105 1044) +4(1104 1165 1166 1105) +4(1165 1226 1227 1166) +4(7 68 69 8) +4(68 129 130 69) +4(129 190 191 130) +4(190 251 252 191) +4(251 312 313 252) +4(312 373 374 313) +4(373 434 435 374) +4(434 495 496 435) +4(495 556 557 496) +4(556 617 618 557) +4(617 678 679 618) +4(678 739 740 679) +4(739 800 801 740) +4(800 861 862 801) +4(861 922 923 862) +4(922 983 984 923) +4(983 1044 1045 984) +4(1044 1105 1106 1045) +4(1105 1166 1167 1106) +4(1166 1227 1228 1167) +4(8 69 70 9) +4(69 130 131 70) +4(130 191 192 131) +4(191 252 253 192) +4(252 313 314 253) +4(313 374 375 314) +4(374 435 436 375) +4(435 496 497 436) +4(496 557 558 497) +4(557 618 619 558) +4(618 679 680 619) +4(679 740 741 680) +4(740 801 802 741) +4(801 862 863 802) +4(862 923 924 863) +4(923 984 985 924) +4(984 1045 1046 985) +4(1045 1106 1107 1046) +4(1106 1167 1168 1107) +4(1167 1228 1229 1168) +4(9 70 71 10) +4(70 131 132 71) +4(131 192 193 132) +4(192 253 254 193) +4(253 314 315 254) +4(314 375 376 315) +4(375 436 437 376) +4(436 497 498 437) +4(497 558 559 498) +4(558 619 620 559) +4(619 680 681 620) +4(680 741 742 681) +4(741 802 803 742) +4(802 863 864 803) +4(863 924 925 864) +4(924 985 986 925) +4(985 1046 1047 986) +4(1046 1107 1108 1047) +4(1107 1168 1169 1108) +4(1168 1229 1230 1169) +4(10 71 72 11) +4(71 132 133 72) +4(132 193 194 133) +4(193 254 255 194) +4(254 315 316 255) +4(315 376 377 316) +4(376 437 438 377) +4(437 498 499 438) +4(498 559 560 499) +4(559 620 621 560) +4(620 681 682 621) +4(681 742 743 682) +4(742 803 804 743) +4(803 864 865 804) +4(864 925 926 865) +4(925 986 987 926) +4(986 1047 1048 987) +4(1047 1108 1109 1048) +4(1108 1169 1170 1109) +4(1169 1230 1231 1170) +4(11 72 73 12) +4(72 133 134 73) +4(133 194 195 134) +4(194 255 256 195) +4(255 316 317 256) +4(316 377 378 317) +4(377 438 439 378) +4(438 499 500 439) +4(499 560 561 500) +4(560 621 622 561) +4(621 682 683 622) +4(682 743 744 683) +4(743 804 805 744) +4(804 865 866 805) +4(865 926 927 866) +4(926 987 988 927) +4(987 1048 1049 988) +4(1048 1109 1110 1049) +4(1109 1170 1171 1110) +4(1170 1231 1232 1171) +4(12 73 74 13) +4(73 134 135 74) +4(134 195 196 135) +4(195 256 257 196) +4(256 317 318 257) +4(317 378 379 318) +4(378 439 440 379) +4(439 500 501 440) +4(500 561 562 501) +4(561 622 623 562) +4(622 683 684 623) +4(683 744 745 684) +4(744 805 806 745) +4(805 866 867 806) +4(866 927 928 867) +4(927 988 989 928) +4(988 1049 1050 989) +4(1049 1110 1111 1050) +4(1110 1171 1172 1111) +4(1171 1232 1233 1172) +4(13 74 75 14) +4(74 135 136 75) +4(135 196 197 136) +4(196 257 258 197) +4(257 318 319 258) +4(318 379 380 319) +4(379 440 441 380) +4(440 501 502 441) +4(501 562 563 502) +4(562 623 624 563) +4(623 684 685 624) +4(684 745 746 685) +4(745 806 807 746) +4(806 867 868 807) +4(867 928 929 868) +4(928 989 990 929) +4(989 1050 1051 990) +4(1050 1111 1112 1051) +4(1111 1172 1173 1112) +4(1172 1233 1234 1173) +4(14 75 76 15) +4(75 136 137 76) +4(136 197 198 137) +4(197 258 259 198) +4(258 319 320 259) +4(319 380 381 320) +4(380 441 442 381) +4(441 502 503 442) +4(502 563 564 503) +4(563 624 625 564) +4(624 685 686 625) +4(685 746 747 686) +4(746 807 808 747) +4(807 868 869 808) +4(868 929 930 869) +4(929 990 991 930) +4(990 1051 1052 991) +4(1051 1112 1113 1052) +4(1112 1173 1174 1113) +4(1173 1234 1235 1174) +4(15 76 77 16) +4(76 137 138 77) +4(137 198 199 138) +4(198 259 260 199) +4(259 320 321 260) +4(320 381 382 321) +4(381 442 443 382) +4(442 503 504 443) +4(503 564 565 504) +4(564 625 626 565) +4(625 686 687 626) +4(686 747 748 687) +4(747 808 809 748) +4(808 869 870 809) +4(869 930 931 870) +4(930 991 992 931) +4(991 1052 1053 992) +4(1052 1113 1114 1053) +4(1113 1174 1175 1114) +4(1174 1235 1236 1175) +4(16 77 78 17) +4(77 138 139 78) +4(138 199 200 139) +4(199 260 261 200) +4(260 321 322 261) +4(321 382 383 322) +4(382 443 444 383) +4(443 504 505 444) +4(504 565 566 505) +4(565 626 627 566) +4(626 687 688 627) +4(687 748 749 688) +4(748 809 810 749) +4(809 870 871 810) +4(870 931 932 871) +4(931 992 993 932) +4(992 1053 1054 993) +4(1053 1114 1115 1054) +4(1114 1175 1176 1115) +4(1175 1236 1237 1176) +4(17 78 79 18) +4(78 139 140 79) +4(139 200 201 140) +4(200 261 262 201) +4(261 322 323 262) +4(322 383 384 323) +4(383 444 445 384) +4(444 505 506 445) +4(505 566 567 506) +4(566 627 628 567) +4(627 688 689 628) +4(688 749 750 689) +4(749 810 811 750) +4(810 871 872 811) +4(871 932 933 872) +4(932 993 994 933) +4(993 1054 1055 994) +4(1054 1115 1116 1055) +4(1115 1176 1177 1116) +4(1176 1237 1238 1177) +4(18 79 80 19) +4(79 140 141 80) +4(140 201 202 141) +4(201 262 263 202) +4(262 323 324 263) +4(323 384 385 324) +4(384 445 446 385) +4(445 506 507 446) +4(506 567 568 507) +4(567 628 629 568) +4(628 689 690 629) +4(689 750 751 690) +4(750 811 812 751) +4(811 872 873 812) +4(872 933 934 873) +4(933 994 995 934) +4(994 1055 1056 995) +4(1055 1116 1117 1056) +4(1116 1177 1178 1117) +4(1177 1238 1239 1178) +4(19 80 81 20) +4(80 141 142 81) +4(141 202 203 142) +4(202 263 264 203) +4(263 324 325 264) +4(324 385 386 325) +4(385 446 447 386) +4(446 507 508 447) +4(507 568 569 508) +4(568 629 630 569) +4(629 690 691 630) +4(690 751 752 691) +4(751 812 813 752) +4(812 873 874 813) +4(873 934 935 874) +4(934 995 996 935) +4(995 1056 1057 996) +4(1056 1117 1118 1057) +4(1117 1178 1179 1118) +4(1178 1239 1240 1179) +4(20 81 82 21) +4(81 142 143 82) +4(142 203 204 143) +4(203 264 265 204) +4(264 325 326 265) +4(325 386 387 326) +4(386 447 448 387) +4(447 508 509 448) +4(508 569 570 509) +4(569 630 631 570) +4(630 691 692 631) +4(691 752 753 692) +4(752 813 814 753) +4(813 874 875 814) +4(874 935 936 875) +4(935 996 997 936) +4(996 1057 1058 997) +4(1057 1118 1119 1058) +4(1118 1179 1180 1119) +4(1179 1240 1241 1180) +4(21 82 83 22) +4(82 143 144 83) +4(143 204 205 144) +4(204 265 266 205) +4(265 326 327 266) +4(326 387 388 327) +4(387 448 449 388) +4(448 509 510 449) +4(509 570 571 510) +4(570 631 632 571) +4(631 692 693 632) +4(692 753 754 693) +4(753 814 815 754) +4(814 875 876 815) +4(875 936 937 876) +4(936 997 998 937) +4(997 1058 1059 998) +4(1058 1119 1120 1059) +4(1119 1180 1181 1120) +4(1180 1241 1242 1181) +4(22 83 84 23) +4(83 144 145 84) +4(144 205 206 145) +4(205 266 267 206) +4(266 327 328 267) +4(327 388 389 328) +4(388 449 450 389) +4(449 510 511 450) +4(510 571 572 511) +4(571 632 633 572) +4(632 693 694 633) +4(693 754 755 694) +4(754 815 816 755) +4(815 876 877 816) +4(876 937 938 877) +4(937 998 999 938) +4(998 1059 1060 999) +4(1059 1120 1121 1060) +4(1120 1181 1182 1121) +4(1181 1242 1243 1182) +4(23 84 85 24) +4(84 145 146 85) +4(145 206 207 146) +4(206 267 268 207) +4(267 328 329 268) +4(328 389 390 329) +4(389 450 451 390) +4(450 511 512 451) +4(511 572 573 512) +4(572 633 634 573) +4(633 694 695 634) +4(694 755 756 695) +4(755 816 817 756) +4(816 877 878 817) +4(877 938 939 878) +4(938 999 1000 939) +4(999 1060 1061 1000) +4(1060 1121 1122 1061) +4(1121 1182 1183 1122) +4(1182 1243 1244 1183) +4(24 85 86 25) +4(85 146 147 86) +4(146 207 208 147) +4(207 268 269 208) +4(268 329 330 269) +4(329 390 391 330) +4(390 451 452 391) +4(451 512 513 452) +4(512 573 574 513) +4(573 634 635 574) +4(634 695 696 635) +4(695 756 757 696) +4(756 817 818 757) +4(817 878 879 818) +4(878 939 940 879) +4(939 1000 1001 940) +4(1000 1061 1062 1001) +4(1061 1122 1123 1062) +4(1122 1183 1184 1123) +4(1183 1244 1245 1184) +4(25 86 87 26) +4(86 147 148 87) +4(147 208 209 148) +4(208 269 270 209) +4(269 330 331 270) +4(330 391 392 331) +4(391 452 453 392) +4(452 513 514 453) +4(513 574 575 514) +4(574 635 636 575) +4(635 696 697 636) +4(696 757 758 697) +4(757 818 819 758) +4(818 879 880 819) +4(879 940 941 880) +4(940 1001 1002 941) +4(1001 1062 1063 1002) +4(1062 1123 1124 1063) +4(1123 1184 1185 1124) +4(1184 1245 1246 1185) +4(26 87 88 27) +4(87 148 149 88) +4(148 209 210 149) +4(209 270 271 210) +4(270 331 332 271) +4(331 392 393 332) +4(392 453 454 393) +4(453 514 515 454) +4(514 575 576 515) +4(575 636 637 576) +4(636 697 698 637) +4(697 758 759 698) +4(758 819 820 759) +4(819 880 881 820) +4(880 941 942 881) +4(941 1002 1003 942) +4(1002 1063 1064 1003) +4(1063 1124 1125 1064) +4(1124 1185 1186 1125) +4(1185 1246 1247 1186) +4(27 88 89 28) +4(88 149 150 89) +4(149 210 211 150) +4(210 271 272 211) +4(271 332 333 272) +4(332 393 394 333) +4(393 454 455 394) +4(454 515 516 455) +4(515 576 577 516) +4(576 637 638 577) +4(637 698 699 638) +4(698 759 760 699) +4(759 820 821 760) +4(820 881 882 821) +4(881 942 943 882) +4(942 1003 1004 943) +4(1003 1064 1065 1004) +4(1064 1125 1126 1065) +4(1125 1186 1187 1126) +4(1186 1247 1248 1187) +4(28 89 90 29) +4(89 150 151 90) +4(150 211 212 151) +4(211 272 273 212) +4(272 333 334 273) +4(333 394 395 334) +4(394 455 456 395) +4(455 516 517 456) +4(516 577 578 517) +4(577 638 639 578) +4(638 699 700 639) +4(699 760 761 700) +4(760 821 822 761) +4(821 882 883 822) +4(882 943 944 883) +4(943 1004 1005 944) +4(1004 1065 1066 1005) +4(1065 1126 1127 1066) +4(1126 1187 1188 1127) +4(1187 1248 1249 1188) +4(29 90 91 30) +4(90 151 152 91) +4(151 212 213 152) +4(212 273 274 213) +4(273 334 335 274) +4(334 395 396 335) +4(395 456 457 396) +4(456 517 518 457) +4(517 578 579 518) +4(578 639 640 579) +4(639 700 701 640) +4(700 761 762 701) +4(761 822 823 762) +4(822 883 884 823) +4(883 944 945 884) +4(944 1005 1006 945) +4(1005 1066 1067 1006) +4(1066 1127 1128 1067) +4(1127 1188 1189 1128) +4(1188 1249 1250 1189) +4(30 91 92 31) +4(91 152 153 92) +4(152 213 214 153) +4(213 274 275 214) +4(274 335 336 275) +4(335 396 397 336) +4(396 457 458 397) +4(457 518 519 458) +4(518 579 580 519) +4(579 640 641 580) +4(640 701 702 641) +4(701 762 763 702) +4(762 823 824 763) +4(823 884 885 824) +4(884 945 946 885) +4(945 1006 1007 946) +4(1006 1067 1068 1007) +4(1067 1128 1129 1068) +4(1128 1189 1190 1129) +4(1189 1250 1251 1190) +4(31 92 93 32) +4(92 153 154 93) +4(153 214 215 154) +4(214 275 276 215) +4(275 336 337 276) +4(336 397 398 337) +4(397 458 459 398) +4(458 519 520 459) +4(519 580 581 520) +4(580 641 642 581) +4(641 702 703 642) +4(702 763 764 703) +4(763 824 825 764) +4(824 885 886 825) +4(885 946 947 886) +4(946 1007 1008 947) +4(1007 1068 1069 1008) +4(1068 1129 1130 1069) +4(1129 1190 1191 1130) +4(1190 1251 1252 1191) +4(32 93 94 33) +4(93 154 155 94) +4(154 215 216 155) +4(215 276 277 216) +4(276 337 338 277) +4(337 398 399 338) +4(398 459 460 399) +4(459 520 521 460) +4(520 581 582 521) +4(581 642 643 582) +4(642 703 704 643) +4(703 764 765 704) +4(764 825 826 765) +4(825 886 887 826) +4(886 947 948 887) +4(947 1008 1009 948) +4(1008 1069 1070 1009) +4(1069 1130 1131 1070) +4(1130 1191 1192 1131) +4(1191 1252 1253 1192) +4(33 94 95 34) +4(94 155 156 95) +4(155 216 217 156) +4(216 277 278 217) +4(277 338 339 278) +4(338 399 400 339) +4(399 460 461 400) +4(460 521 522 461) +4(521 582 583 522) +4(582 643 644 583) +4(643 704 705 644) +4(704 765 766 705) +4(765 826 827 766) +4(826 887 888 827) +4(887 948 949 888) +4(948 1009 1010 949) +4(1009 1070 1071 1010) +4(1070 1131 1132 1071) +4(1131 1192 1193 1132) +4(1192 1253 1254 1193) +4(34 95 96 35) +4(95 156 157 96) +4(156 217 218 157) +4(217 278 279 218) +4(278 339 340 279) +4(339 400 401 340) +4(400 461 462 401) +4(461 522 523 462) +4(522 583 584 523) +4(583 644 645 584) +4(644 705 706 645) +4(705 766 767 706) +4(766 827 828 767) +4(827 888 889 828) +4(888 949 950 889) +4(949 1010 1011 950) +4(1010 1071 1072 1011) +4(1071 1132 1133 1072) +4(1132 1193 1194 1133) +4(1193 1254 1255 1194) +4(35 96 97 36) +4(96 157 158 97) +4(157 218 219 158) +4(218 279 280 219) +4(279 340 341 280) +4(340 401 402 341) +4(401 462 463 402) +4(462 523 524 463) +4(523 584 585 524) +4(584 645 646 585) +4(645 706 707 646) +4(706 767 768 707) +4(767 828 829 768) +4(828 889 890 829) +4(889 950 951 890) +4(950 1011 1012 951) +4(1011 1072 1073 1012) +4(1072 1133 1134 1073) +4(1133 1194 1195 1134) +4(1194 1255 1256 1195) +4(36 97 98 37) +4(97 158 159 98) +4(158 219 220 159) +4(219 280 281 220) +4(280 341 342 281) +4(341 402 403 342) +4(402 463 464 403) +4(463 524 525 464) +4(524 585 586 525) +4(585 646 647 586) +4(646 707 708 647) +4(707 768 769 708) +4(768 829 830 769) +4(829 890 891 830) +4(890 951 952 891) +4(951 1012 1013 952) +4(1012 1073 1074 1013) +4(1073 1134 1135 1074) +4(1134 1195 1196 1135) +4(1195 1256 1257 1196) +4(37 98 99 38) +4(98 159 160 99) +4(159 220 221 160) +4(220 281 282 221) +4(281 342 343 282) +4(342 403 404 343) +4(403 464 465 404) +4(464 525 526 465) +4(525 586 587 526) +4(586 647 648 587) +4(647 708 709 648) +4(708 769 770 709) +4(769 830 831 770) +4(830 891 892 831) +4(891 952 953 892) +4(952 1013 1014 953) +4(1013 1074 1075 1014) +4(1074 1135 1136 1075) +4(1135 1196 1197 1136) +4(1196 1257 1258 1197) +4(38 99 100 39) +4(99 160 161 100) +4(160 221 222 161) +4(221 282 283 222) +4(282 343 344 283) +4(343 404 405 344) +4(404 465 466 405) +4(465 526 527 466) +4(526 587 588 527) +4(587 648 649 588) +4(648 709 710 649) +4(709 770 771 710) +4(770 831 832 771) +4(831 892 893 832) +4(892 953 954 893) +4(953 1014 1015 954) +4(1014 1075 1076 1015) +4(1075 1136 1137 1076) +4(1136 1197 1198 1137) +4(1197 1258 1259 1198) +4(39 100 101 40) +4(100 161 162 101) +4(161 222 223 162) +4(222 283 284 223) +4(283 344 345 284) +4(344 405 406 345) +4(405 466 467 406) +4(466 527 528 467) +4(527 588 589 528) +4(588 649 650 589) +4(649 710 711 650) +4(710 771 772 711) +4(771 832 833 772) +4(832 893 894 833) +4(893 954 955 894) +4(954 1015 1016 955) +4(1015 1076 1077 1016) +4(1076 1137 1138 1077) +4(1137 1198 1199 1138) +4(1198 1259 1260 1199) +4(40 101 102 41) +4(101 162 163 102) +4(162 223 224 163) +4(223 284 285 224) +4(284 345 346 285) +4(345 406 407 346) +4(406 467 468 407) +4(467 528 529 468) +4(528 589 590 529) +4(589 650 651 590) +4(650 711 712 651) +4(711 772 773 712) +4(772 833 834 773) +4(833 894 895 834) +4(894 955 956 895) +4(955 1016 1017 956) +4(1016 1077 1078 1017) +4(1077 1138 1139 1078) +4(1138 1199 1200 1139) +4(1199 1260 1261 1200) +4(41 102 103 42) +4(102 163 164 103) +4(163 224 225 164) +4(224 285 286 225) +4(285 346 347 286) +4(346 407 408 347) +4(407 468 469 408) +4(468 529 530 469) +4(529 590 591 530) +4(590 651 652 591) +4(651 712 713 652) +4(712 773 774 713) +4(773 834 835 774) +4(834 895 896 835) +4(895 956 957 896) +4(956 1017 1018 957) +4(1017 1078 1079 1018) +4(1078 1139 1140 1079) +4(1139 1200 1201 1140) +4(1200 1261 1262 1201) +4(42 103 104 43) +4(103 164 165 104) +4(164 225 226 165) +4(225 286 287 226) +4(286 347 348 287) +4(347 408 409 348) +4(408 469 470 409) +4(469 530 531 470) +4(530 591 592 531) +4(591 652 653 592) +4(652 713 714 653) +4(713 774 775 714) +4(774 835 836 775) +4(835 896 897 836) +4(896 957 958 897) +4(957 1018 1019 958) +4(1018 1079 1080 1019) +4(1079 1140 1141 1080) +4(1140 1201 1202 1141) +4(1201 1262 1263 1202) +4(43 104 105 44) +4(104 165 166 105) +4(165 226 227 166) +4(226 287 288 227) +4(287 348 349 288) +4(348 409 410 349) +4(409 470 471 410) +4(470 531 532 471) +4(531 592 593 532) +4(592 653 654 593) +4(653 714 715 654) +4(714 775 776 715) +4(775 836 837 776) +4(836 897 898 837) +4(897 958 959 898) +4(958 1019 1020 959) +4(1019 1080 1081 1020) +4(1080 1141 1142 1081) +4(1141 1202 1203 1142) +4(1202 1263 1264 1203) +4(44 105 106 45) +4(105 166 167 106) +4(166 227 228 167) +4(227 288 289 228) +4(288 349 350 289) +4(349 410 411 350) +4(410 471 472 411) +4(471 532 533 472) +4(532 593 594 533) +4(593 654 655 594) +4(654 715 716 655) +4(715 776 777 716) +4(776 837 838 777) +4(837 898 899 838) +4(898 959 960 899) +4(959 1020 1021 960) +4(1020 1081 1082 1021) +4(1081 1142 1143 1082) +4(1142 1203 1204 1143) +4(1203 1264 1265 1204) +4(45 106 107 46) +4(106 167 168 107) +4(167 228 229 168) +4(228 289 290 229) +4(289 350 351 290) +4(350 411 412 351) +4(411 472 473 412) +4(472 533 534 473) +4(533 594 595 534) +4(594 655 656 595) +4(655 716 717 656) +4(716 777 778 717) +4(777 838 839 778) +4(838 899 900 839) +4(899 960 961 900) +4(960 1021 1022 961) +4(1021 1082 1083 1022) +4(1082 1143 1144 1083) +4(1143 1204 1205 1144) +4(1204 1265 1266 1205) +4(46 107 108 47) +4(107 168 169 108) +4(168 229 230 169) +4(229 290 291 230) +4(290 351 352 291) +4(351 412 413 352) +4(412 473 474 413) +4(473 534 535 474) +4(534 595 596 535) +4(595 656 657 596) +4(656 717 718 657) +4(717 778 779 718) +4(778 839 840 779) +4(839 900 901 840) +4(900 961 962 901) +4(961 1022 1023 962) +4(1022 1083 1084 1023) +4(1083 1144 1145 1084) +4(1144 1205 1206 1145) +4(1205 1266 1267 1206) +4(47 108 109 48) +4(108 169 170 109) +4(169 230 231 170) +4(230 291 292 231) +4(291 352 353 292) +4(352 413 414 353) +4(413 474 475 414) +4(474 535 536 475) +4(535 596 597 536) +4(596 657 658 597) +4(657 718 719 658) +4(718 779 780 719) +4(779 840 841 780) +4(840 901 902 841) +4(901 962 963 902) +4(962 1023 1024 963) +4(1023 1084 1085 1024) +4(1084 1145 1146 1085) +4(1145 1206 1207 1146) +4(1206 1267 1268 1207) +4(48 109 110 49) +4(109 170 171 110) +4(170 231 232 171) +4(231 292 293 232) +4(292 353 354 293) +4(353 414 415 354) +4(414 475 476 415) +4(475 536 537 476) +4(536 597 598 537) +4(597 658 659 598) +4(658 719 720 659) +4(719 780 781 720) +4(780 841 842 781) +4(841 902 903 842) +4(902 963 964 903) +4(963 1024 1025 964) +4(1024 1085 1086 1025) +4(1085 1146 1147 1086) +4(1146 1207 1208 1147) +4(1207 1268 1269 1208) +4(49 110 111 50) +4(110 171 172 111) +4(171 232 233 172) +4(232 293 294 233) +4(293 354 355 294) +4(354 415 416 355) +4(415 476 477 416) +4(476 537 538 477) +4(537 598 599 538) +4(598 659 660 599) +4(659 720 721 660) +4(720 781 782 721) +4(781 842 843 782) +4(842 903 904 843) +4(903 964 965 904) +4(964 1025 1026 965) +4(1025 1086 1087 1026) +4(1086 1147 1148 1087) +4(1147 1208 1209 1148) +4(1208 1269 1270 1209) +4(50 111 112 51) +4(111 172 173 112) +4(172 233 234 173) +4(233 294 295 234) +4(294 355 356 295) +4(355 416 417 356) +4(416 477 478 417) +4(477 538 539 478) +4(538 599 600 539) +4(599 660 661 600) +4(660 721 722 661) +4(721 782 783 722) +4(782 843 844 783) +4(843 904 905 844) +4(904 965 966 905) +4(965 1026 1027 966) +4(1026 1087 1088 1027) +4(1087 1148 1149 1088) +4(1148 1209 1210 1149) +4(1209 1270 1271 1210) +4(51 112 113 52) +4(112 173 174 113) +4(173 234 235 174) +4(234 295 296 235) +4(295 356 357 296) +4(356 417 418 357) +4(417 478 479 418) +4(478 539 540 479) +4(539 600 601 540) +4(600 661 662 601) +4(661 722 723 662) +4(722 783 784 723) +4(783 844 845 784) +4(844 905 906 845) +4(905 966 967 906) +4(966 1027 1028 967) +4(1027 1088 1089 1028) +4(1088 1149 1150 1089) +4(1149 1210 1211 1150) +4(1210 1271 1272 1211) +4(52 113 114 53) +4(113 174 175 114) +4(174 235 236 175) +4(235 296 297 236) +4(296 357 358 297) +4(357 418 419 358) +4(418 479 480 419) +4(479 540 541 480) +4(540 601 602 541) +4(601 662 663 602) +4(662 723 724 663) +4(723 784 785 724) +4(784 845 846 785) +4(845 906 907 846) +4(906 967 968 907) +4(967 1028 1029 968) +4(1028 1089 1090 1029) +4(1089 1150 1151 1090) +4(1150 1211 1212 1151) +4(1211 1272 1273 1212) +4(53 114 115 54) +4(114 175 176 115) +4(175 236 237 176) +4(236 297 298 237) +4(297 358 359 298) +4(358 419 420 359) +4(419 480 481 420) +4(480 541 542 481) +4(541 602 603 542) +4(602 663 664 603) +4(663 724 725 664) +4(724 785 786 725) +4(785 846 847 786) +4(846 907 908 847) +4(907 968 969 908) +4(968 1029 1030 969) +4(1029 1090 1091 1030) +4(1090 1151 1152 1091) +4(1151 1212 1213 1152) +4(1212 1273 1274 1213) +4(54 115 116 55) +4(115 176 177 116) +4(176 237 238 177) +4(237 298 299 238) +4(298 359 360 299) +4(359 420 421 360) +4(420 481 482 421) +4(481 542 543 482) +4(542 603 604 543) +4(603 664 665 604) +4(664 725 726 665) +4(725 786 787 726) +4(786 847 848 787) +4(847 908 909 848) +4(908 969 970 909) +4(969 1030 1031 970) +4(1030 1091 1092 1031) +4(1091 1152 1153 1092) +4(1152 1213 1214 1153) +4(1213 1274 1275 1214) +4(55 116 117 56) +4(116 177 178 117) +4(177 238 239 178) +4(238 299 300 239) +4(299 360 361 300) +4(360 421 422 361) +4(421 482 483 422) +4(482 543 544 483) +4(543 604 605 544) +4(604 665 666 605) +4(665 726 727 666) +4(726 787 788 727) +4(787 848 849 788) +4(848 909 910 849) +4(909 970 971 910) +4(970 1031 1032 971) +4(1031 1092 1093 1032) +4(1092 1153 1154 1093) +4(1153 1214 1215 1154) +4(1214 1275 1276 1215) +4(56 117 118 57) +4(117 178 179 118) +4(178 239 240 179) +4(239 300 301 240) +4(300 361 362 301) +4(361 422 423 362) +4(422 483 484 423) +4(483 544 545 484) +4(544 605 606 545) +4(605 666 667 606) +4(666 727 728 667) +4(727 788 789 728) +4(788 849 850 789) +4(849 910 911 850) +4(910 971 972 911) +4(971 1032 1033 972) +4(1032 1093 1094 1033) +4(1093 1154 1155 1094) +4(1154 1215 1216 1155) +4(1215 1276 1277 1216) +4(57 118 119 58) +4(118 179 180 119) +4(179 240 241 180) +4(240 301 302 241) +4(301 362 363 302) +4(362 423 424 363) +4(423 484 485 424) +4(484 545 546 485) +4(545 606 607 546) +4(606 667 668 607) +4(667 728 729 668) +4(728 789 790 729) +4(789 850 851 790) +4(850 911 912 851) +4(911 972 973 912) +4(972 1033 1034 973) +4(1033 1094 1095 1034) +4(1094 1155 1156 1095) +4(1155 1216 1217 1156) +4(1216 1277 1278 1217) +4(58 119 120 59) +4(119 180 181 120) +4(180 241 242 181) +4(241 302 303 242) +4(302 363 364 303) +4(363 424 425 364) +4(424 485 486 425) +4(485 546 547 486) +4(546 607 608 547) +4(607 668 669 608) +4(668 729 730 669) +4(729 790 791 730) +4(790 851 852 791) +4(851 912 913 852) +4(912 973 974 913) +4(973 1034 1035 974) +4(1034 1095 1096 1035) +4(1095 1156 1157 1096) +4(1156 1217 1218 1157) +4(1217 1278 1279 1218) +4(59 120 121 60) +4(120 181 182 121) +4(181 242 243 182) +4(242 303 304 243) +4(303 364 365 304) +4(364 425 426 365) +4(425 486 487 426) +4(486 547 548 487) +4(547 608 609 548) +4(608 669 670 609) +4(669 730 731 670) +4(730 791 792 731) +4(791 852 853 792) +4(852 913 914 853) +4(913 974 975 914) +4(974 1035 1036 975) +4(1035 1096 1097 1036) +4(1096 1157 1158 1097) +4(1157 1218 1219 1158) +4(1218 1279 1280 1219) +4(1281 1282 1343 1342) +4(1342 1343 1404 1403) +4(1403 1404 1465 1464) +4(1464 1465 1526 1525) +4(1525 1526 1587 1586) +4(1586 1587 1648 1647) +4(1647 1648 1709 1708) +4(1708 1709 1770 1769) +4(1769 1770 1831 1830) +4(1830 1831 1892 1891) +4(1891 1892 1953 1952) +4(1952 1953 2014 2013) +4(2013 2014 2075 2074) +4(2074 2075 2136 2135) +4(2135 2136 2197 2196) +4(2196 2197 2258 2257) +4(2257 2258 2319 2318) +4(2318 2319 2380 2379) +4(2379 2380 2441 2440) +4(2440 2441 2502 2501) +4(1282 1283 1344 1343) +4(1343 1344 1405 1404) +4(1404 1405 1466 1465) +4(1465 1466 1527 1526) +4(1526 1527 1588 1587) +4(1587 1588 1649 1648) +4(1648 1649 1710 1709) +4(1709 1710 1771 1770) +4(1770 1771 1832 1831) +4(1831 1832 1893 1892) +4(1892 1893 1954 1953) +4(1953 1954 2015 2014) +4(2014 2015 2076 2075) +4(2075 2076 2137 2136) +4(2136 2137 2198 2197) +4(2197 2198 2259 2258) +4(2258 2259 2320 2319) +4(2319 2320 2381 2380) +4(2380 2381 2442 2441) +4(2441 2442 2503 2502) +4(1283 1284 1345 1344) +4(1344 1345 1406 1405) +4(1405 1406 1467 1466) +4(1466 1467 1528 1527) +4(1527 1528 1589 1588) +4(1588 1589 1650 1649) +4(1649 1650 1711 1710) +4(1710 1711 1772 1771) +4(1771 1772 1833 1832) +4(1832 1833 1894 1893) +4(1893 1894 1955 1954) +4(1954 1955 2016 2015) +4(2015 2016 2077 2076) +4(2076 2077 2138 2137) +4(2137 2138 2199 2198) +4(2198 2199 2260 2259) +4(2259 2260 2321 2320) +4(2320 2321 2382 2381) +4(2381 2382 2443 2442) +4(2442 2443 2504 2503) +4(1284 1285 1346 1345) +4(1345 1346 1407 1406) +4(1406 1407 1468 1467) +4(1467 1468 1529 1528) +4(1528 1529 1590 1589) +4(1589 1590 1651 1650) +4(1650 1651 1712 1711) +4(1711 1712 1773 1772) +4(1772 1773 1834 1833) +4(1833 1834 1895 1894) +4(1894 1895 1956 1955) +4(1955 1956 2017 2016) +4(2016 2017 2078 2077) +4(2077 2078 2139 2138) +4(2138 2139 2200 2199) +4(2199 2200 2261 2260) +4(2260 2261 2322 2321) +4(2321 2322 2383 2382) +4(2382 2383 2444 2443) +4(2443 2444 2505 2504) +4(1285 1286 1347 1346) +4(1346 1347 1408 1407) +4(1407 1408 1469 1468) +4(1468 1469 1530 1529) +4(1529 1530 1591 1590) +4(1590 1591 1652 1651) +4(1651 1652 1713 1712) +4(1712 1713 1774 1773) +4(1773 1774 1835 1834) +4(1834 1835 1896 1895) +4(1895 1896 1957 1956) +4(1956 1957 2018 2017) +4(2017 2018 2079 2078) +4(2078 2079 2140 2139) +4(2139 2140 2201 2200) +4(2200 2201 2262 2261) +4(2261 2262 2323 2322) +4(2322 2323 2384 2383) +4(2383 2384 2445 2444) +4(2444 2445 2506 2505) +4(1286 1287 1348 1347) +4(1347 1348 1409 1408) +4(1408 1409 1470 1469) +4(1469 1470 1531 1530) +4(1530 1531 1592 1591) +4(1591 1592 1653 1652) +4(1652 1653 1714 1713) +4(1713 1714 1775 1774) +4(1774 1775 1836 1835) +4(1835 1836 1897 1896) +4(1896 1897 1958 1957) +4(1957 1958 2019 2018) +4(2018 2019 2080 2079) +4(2079 2080 2141 2140) +4(2140 2141 2202 2201) +4(2201 2202 2263 2262) +4(2262 2263 2324 2323) +4(2323 2324 2385 2384) +4(2384 2385 2446 2445) +4(2445 2446 2507 2506) +4(1287 1288 1349 1348) +4(1348 1349 1410 1409) +4(1409 1410 1471 1470) +4(1470 1471 1532 1531) +4(1531 1532 1593 1592) +4(1592 1593 1654 1653) +4(1653 1654 1715 1714) +4(1714 1715 1776 1775) +4(1775 1776 1837 1836) +4(1836 1837 1898 1897) +4(1897 1898 1959 1958) +4(1958 1959 2020 2019) +4(2019 2020 2081 2080) +4(2080 2081 2142 2141) +4(2141 2142 2203 2202) +4(2202 2203 2264 2263) +4(2263 2264 2325 2324) +4(2324 2325 2386 2385) +4(2385 2386 2447 2446) +4(2446 2447 2508 2507) +4(1288 1289 1350 1349) +4(1349 1350 1411 1410) +4(1410 1411 1472 1471) +4(1471 1472 1533 1532) +4(1532 1533 1594 1593) +4(1593 1594 1655 1654) +4(1654 1655 1716 1715) +4(1715 1716 1777 1776) +4(1776 1777 1838 1837) +4(1837 1838 1899 1898) +4(1898 1899 1960 1959) +4(1959 1960 2021 2020) +4(2020 2021 2082 2081) +4(2081 2082 2143 2142) +4(2142 2143 2204 2203) +4(2203 2204 2265 2264) +4(2264 2265 2326 2325) +4(2325 2326 2387 2386) +4(2386 2387 2448 2447) +4(2447 2448 2509 2508) +4(1289 1290 1351 1350) +4(1350 1351 1412 1411) +4(1411 1412 1473 1472) +4(1472 1473 1534 1533) +4(1533 1534 1595 1594) +4(1594 1595 1656 1655) +4(1655 1656 1717 1716) +4(1716 1717 1778 1777) +4(1777 1778 1839 1838) +4(1838 1839 1900 1899) +4(1899 1900 1961 1960) +4(1960 1961 2022 2021) +4(2021 2022 2083 2082) +4(2082 2083 2144 2143) +4(2143 2144 2205 2204) +4(2204 2205 2266 2265) +4(2265 2266 2327 2326) +4(2326 2327 2388 2387) +4(2387 2388 2449 2448) +4(2448 2449 2510 2509) +4(1290 1291 1352 1351) +4(1351 1352 1413 1412) +4(1412 1413 1474 1473) +4(1473 1474 1535 1534) +4(1534 1535 1596 1595) +4(1595 1596 1657 1656) +4(1656 1657 1718 1717) +4(1717 1718 1779 1778) +4(1778 1779 1840 1839) +4(1839 1840 1901 1900) +4(1900 1901 1962 1961) +4(1961 1962 2023 2022) +4(2022 2023 2084 2083) +4(2083 2084 2145 2144) +4(2144 2145 2206 2205) +4(2205 2206 2267 2266) +4(2266 2267 2328 2327) +4(2327 2328 2389 2388) +4(2388 2389 2450 2449) +4(2449 2450 2511 2510) +4(1291 1292 1353 1352) +4(1352 1353 1414 1413) +4(1413 1414 1475 1474) +4(1474 1475 1536 1535) +4(1535 1536 1597 1596) +4(1596 1597 1658 1657) +4(1657 1658 1719 1718) +4(1718 1719 1780 1779) +4(1779 1780 1841 1840) +4(1840 1841 1902 1901) +4(1901 1902 1963 1962) +4(1962 1963 2024 2023) +4(2023 2024 2085 2084) +4(2084 2085 2146 2145) +4(2145 2146 2207 2206) +4(2206 2207 2268 2267) +4(2267 2268 2329 2328) +4(2328 2329 2390 2389) +4(2389 2390 2451 2450) +4(2450 2451 2512 2511) +4(1292 1293 1354 1353) +4(1353 1354 1415 1414) +4(1414 1415 1476 1475) +4(1475 1476 1537 1536) +4(1536 1537 1598 1597) +4(1597 1598 1659 1658) +4(1658 1659 1720 1719) +4(1719 1720 1781 1780) +4(1780 1781 1842 1841) +4(1841 1842 1903 1902) +4(1902 1903 1964 1963) +4(1963 1964 2025 2024) +4(2024 2025 2086 2085) +4(2085 2086 2147 2146) +4(2146 2147 2208 2207) +4(2207 2208 2269 2268) +4(2268 2269 2330 2329) +4(2329 2330 2391 2390) +4(2390 2391 2452 2451) +4(2451 2452 2513 2512) +4(1293 1294 1355 1354) +4(1354 1355 1416 1415) +4(1415 1416 1477 1476) +4(1476 1477 1538 1537) +4(1537 1538 1599 1598) +4(1598 1599 1660 1659) +4(1659 1660 1721 1720) +4(1720 1721 1782 1781) +4(1781 1782 1843 1842) +4(1842 1843 1904 1903) +4(1903 1904 1965 1964) +4(1964 1965 2026 2025) +4(2025 2026 2087 2086) +4(2086 2087 2148 2147) +4(2147 2148 2209 2208) +4(2208 2209 2270 2269) +4(2269 2270 2331 2330) +4(2330 2331 2392 2391) +4(2391 2392 2453 2452) +4(2452 2453 2514 2513) +4(1294 1295 1356 1355) +4(1355 1356 1417 1416) +4(1416 1417 1478 1477) +4(1477 1478 1539 1538) +4(1538 1539 1600 1599) +4(1599 1600 1661 1660) +4(1660 1661 1722 1721) +4(1721 1722 1783 1782) +4(1782 1783 1844 1843) +4(1843 1844 1905 1904) +4(1904 1905 1966 1965) +4(1965 1966 2027 2026) +4(2026 2027 2088 2087) +4(2087 2088 2149 2148) +4(2148 2149 2210 2209) +4(2209 2210 2271 2270) +4(2270 2271 2332 2331) +4(2331 2332 2393 2392) +4(2392 2393 2454 2453) +4(2453 2454 2515 2514) +4(1295 1296 1357 1356) +4(1356 1357 1418 1417) +4(1417 1418 1479 1478) +4(1478 1479 1540 1539) +4(1539 1540 1601 1600) +4(1600 1601 1662 1661) +4(1661 1662 1723 1722) +4(1722 1723 1784 1783) +4(1783 1784 1845 1844) +4(1844 1845 1906 1905) +4(1905 1906 1967 1966) +4(1966 1967 2028 2027) +4(2027 2028 2089 2088) +4(2088 2089 2150 2149) +4(2149 2150 2211 2210) +4(2210 2211 2272 2271) +4(2271 2272 2333 2332) +4(2332 2333 2394 2393) +4(2393 2394 2455 2454) +4(2454 2455 2516 2515) +4(1296 1297 1358 1357) +4(1357 1358 1419 1418) +4(1418 1419 1480 1479) +4(1479 1480 1541 1540) +4(1540 1541 1602 1601) +4(1601 1602 1663 1662) +4(1662 1663 1724 1723) +4(1723 1724 1785 1784) +4(1784 1785 1846 1845) +4(1845 1846 1907 1906) +4(1906 1907 1968 1967) +4(1967 1968 2029 2028) +4(2028 2029 2090 2089) +4(2089 2090 2151 2150) +4(2150 2151 2212 2211) +4(2211 2212 2273 2272) +4(2272 2273 2334 2333) +4(2333 2334 2395 2394) +4(2394 2395 2456 2455) +4(2455 2456 2517 2516) +4(1297 1298 1359 1358) +4(1358 1359 1420 1419) +4(1419 1420 1481 1480) +4(1480 1481 1542 1541) +4(1541 1542 1603 1602) +4(1602 1603 1664 1663) +4(1663 1664 1725 1724) +4(1724 1725 1786 1785) +4(1785 1786 1847 1846) +4(1846 1847 1908 1907) +4(1907 1908 1969 1968) +4(1968 1969 2030 2029) +4(2029 2030 2091 2090) +4(2090 2091 2152 2151) +4(2151 2152 2213 2212) +4(2212 2213 2274 2273) +4(2273 2274 2335 2334) +4(2334 2335 2396 2395) +4(2395 2396 2457 2456) +4(2456 2457 2518 2517) +4(1298 1299 1360 1359) +4(1359 1360 1421 1420) +4(1420 1421 1482 1481) +4(1481 1482 1543 1542) +4(1542 1543 1604 1603) +4(1603 1604 1665 1664) +4(1664 1665 1726 1725) +4(1725 1726 1787 1786) +4(1786 1787 1848 1847) +4(1847 1848 1909 1908) +4(1908 1909 1970 1969) +4(1969 1970 2031 2030) +4(2030 2031 2092 2091) +4(2091 2092 2153 2152) +4(2152 2153 2214 2213) +4(2213 2214 2275 2274) +4(2274 2275 2336 2335) +4(2335 2336 2397 2396) +4(2396 2397 2458 2457) +4(2457 2458 2519 2518) +4(1299 1300 1361 1360) +4(1360 1361 1422 1421) +4(1421 1422 1483 1482) +4(1482 1483 1544 1543) +4(1543 1544 1605 1604) +4(1604 1605 1666 1665) +4(1665 1666 1727 1726) +4(1726 1727 1788 1787) +4(1787 1788 1849 1848) +4(1848 1849 1910 1909) +4(1909 1910 1971 1970) +4(1970 1971 2032 2031) +4(2031 2032 2093 2092) +4(2092 2093 2154 2153) +4(2153 2154 2215 2214) +4(2214 2215 2276 2275) +4(2275 2276 2337 2336) +4(2336 2337 2398 2397) +4(2397 2398 2459 2458) +4(2458 2459 2520 2519) +4(1300 1301 1362 1361) +4(1361 1362 1423 1422) +4(1422 1423 1484 1483) +4(1483 1484 1545 1544) +4(1544 1545 1606 1605) +4(1605 1606 1667 1666) +4(1666 1667 1728 1727) +4(1727 1728 1789 1788) +4(1788 1789 1850 1849) +4(1849 1850 1911 1910) +4(1910 1911 1972 1971) +4(1971 1972 2033 2032) +4(2032 2033 2094 2093) +4(2093 2094 2155 2154) +4(2154 2155 2216 2215) +4(2215 2216 2277 2276) +4(2276 2277 2338 2337) +4(2337 2338 2399 2398) +4(2398 2399 2460 2459) +4(2459 2460 2521 2520) +4(1301 1302 1363 1362) +4(1362 1363 1424 1423) +4(1423 1424 1485 1484) +4(1484 1485 1546 1545) +4(1545 1546 1607 1606) +4(1606 1607 1668 1667) +4(1667 1668 1729 1728) +4(1728 1729 1790 1789) +4(1789 1790 1851 1850) +4(1850 1851 1912 1911) +4(1911 1912 1973 1972) +4(1972 1973 2034 2033) +4(2033 2034 2095 2094) +4(2094 2095 2156 2155) +4(2155 2156 2217 2216) +4(2216 2217 2278 2277) +4(2277 2278 2339 2338) +4(2338 2339 2400 2399) +4(2399 2400 2461 2460) +4(2460 2461 2522 2521) +4(1302 1303 1364 1363) +4(1363 1364 1425 1424) +4(1424 1425 1486 1485) +4(1485 1486 1547 1546) +4(1546 1547 1608 1607) +4(1607 1608 1669 1668) +4(1668 1669 1730 1729) +4(1729 1730 1791 1790) +4(1790 1791 1852 1851) +4(1851 1852 1913 1912) +4(1912 1913 1974 1973) +4(1973 1974 2035 2034) +4(2034 2035 2096 2095) +4(2095 2096 2157 2156) +4(2156 2157 2218 2217) +4(2217 2218 2279 2278) +4(2278 2279 2340 2339) +4(2339 2340 2401 2400) +4(2400 2401 2462 2461) +4(2461 2462 2523 2522) +4(1303 1304 1365 1364) +4(1364 1365 1426 1425) +4(1425 1426 1487 1486) +4(1486 1487 1548 1547) +4(1547 1548 1609 1608) +4(1608 1609 1670 1669) +4(1669 1670 1731 1730) +4(1730 1731 1792 1791) +4(1791 1792 1853 1852) +4(1852 1853 1914 1913) +4(1913 1914 1975 1974) +4(1974 1975 2036 2035) +4(2035 2036 2097 2096) +4(2096 2097 2158 2157) +4(2157 2158 2219 2218) +4(2218 2219 2280 2279) +4(2279 2280 2341 2340) +4(2340 2341 2402 2401) +4(2401 2402 2463 2462) +4(2462 2463 2524 2523) +4(1304 1305 1366 1365) +4(1365 1366 1427 1426) +4(1426 1427 1488 1487) +4(1487 1488 1549 1548) +4(1548 1549 1610 1609) +4(1609 1610 1671 1670) +4(1670 1671 1732 1731) +4(1731 1732 1793 1792) +4(1792 1793 1854 1853) +4(1853 1854 1915 1914) +4(1914 1915 1976 1975) +4(1975 1976 2037 2036) +4(2036 2037 2098 2097) +4(2097 2098 2159 2158) +4(2158 2159 2220 2219) +4(2219 2220 2281 2280) +4(2280 2281 2342 2341) +4(2341 2342 2403 2402) +4(2402 2403 2464 2463) +4(2463 2464 2525 2524) +4(1305 1306 1367 1366) +4(1366 1367 1428 1427) +4(1427 1428 1489 1488) +4(1488 1489 1550 1549) +4(1549 1550 1611 1610) +4(1610 1611 1672 1671) +4(1671 1672 1733 1732) +4(1732 1733 1794 1793) +4(1793 1794 1855 1854) +4(1854 1855 1916 1915) +4(1915 1916 1977 1976) +4(1976 1977 2038 2037) +4(2037 2038 2099 2098) +4(2098 2099 2160 2159) +4(2159 2160 2221 2220) +4(2220 2221 2282 2281) +4(2281 2282 2343 2342) +4(2342 2343 2404 2403) +4(2403 2404 2465 2464) +4(2464 2465 2526 2525) +4(1306 1307 1368 1367) +4(1367 1368 1429 1428) +4(1428 1429 1490 1489) +4(1489 1490 1551 1550) +4(1550 1551 1612 1611) +4(1611 1612 1673 1672) +4(1672 1673 1734 1733) +4(1733 1734 1795 1794) +4(1794 1795 1856 1855) +4(1855 1856 1917 1916) +4(1916 1917 1978 1977) +4(1977 1978 2039 2038) +4(2038 2039 2100 2099) +4(2099 2100 2161 2160) +4(2160 2161 2222 2221) +4(2221 2222 2283 2282) +4(2282 2283 2344 2343) +4(2343 2344 2405 2404) +4(2404 2405 2466 2465) +4(2465 2466 2527 2526) +4(1307 1308 1369 1368) +4(1368 1369 1430 1429) +4(1429 1430 1491 1490) +4(1490 1491 1552 1551) +4(1551 1552 1613 1612) +4(1612 1613 1674 1673) +4(1673 1674 1735 1734) +4(1734 1735 1796 1795) +4(1795 1796 1857 1856) +4(1856 1857 1918 1917) +4(1917 1918 1979 1978) +4(1978 1979 2040 2039) +4(2039 2040 2101 2100) +4(2100 2101 2162 2161) +4(2161 2162 2223 2222) +4(2222 2223 2284 2283) +4(2283 2284 2345 2344) +4(2344 2345 2406 2405) +4(2405 2406 2467 2466) +4(2466 2467 2528 2527) +4(1308 1309 1370 1369) +4(1369 1370 1431 1430) +4(1430 1431 1492 1491) +4(1491 1492 1553 1552) +4(1552 1553 1614 1613) +4(1613 1614 1675 1674) +4(1674 1675 1736 1735) +4(1735 1736 1797 1796) +4(1796 1797 1858 1857) +4(1857 1858 1919 1918) +4(1918 1919 1980 1979) +4(1979 1980 2041 2040) +4(2040 2041 2102 2101) +4(2101 2102 2163 2162) +4(2162 2163 2224 2223) +4(2223 2224 2285 2284) +4(2284 2285 2346 2345) +4(2345 2346 2407 2406) +4(2406 2407 2468 2467) +4(2467 2468 2529 2528) +4(1309 1310 1371 1370) +4(1370 1371 1432 1431) +4(1431 1432 1493 1492) +4(1492 1493 1554 1553) +4(1553 1554 1615 1614) +4(1614 1615 1676 1675) +4(1675 1676 1737 1736) +4(1736 1737 1798 1797) +4(1797 1798 1859 1858) +4(1858 1859 1920 1919) +4(1919 1920 1981 1980) +4(1980 1981 2042 2041) +4(2041 2042 2103 2102) +4(2102 2103 2164 2163) +4(2163 2164 2225 2224) +4(2224 2225 2286 2285) +4(2285 2286 2347 2346) +4(2346 2347 2408 2407) +4(2407 2408 2469 2468) +4(2468 2469 2530 2529) +4(1310 1311 1372 1371) +4(1371 1372 1433 1432) +4(1432 1433 1494 1493) +4(1493 1494 1555 1554) +4(1554 1555 1616 1615) +4(1615 1616 1677 1676) +4(1676 1677 1738 1737) +4(1737 1738 1799 1798) +4(1798 1799 1860 1859) +4(1859 1860 1921 1920) +4(1920 1921 1982 1981) +4(1981 1982 2043 2042) +4(2042 2043 2104 2103) +4(2103 2104 2165 2164) +4(2164 2165 2226 2225) +4(2225 2226 2287 2286) +4(2286 2287 2348 2347) +4(2347 2348 2409 2408) +4(2408 2409 2470 2469) +4(2469 2470 2531 2530) +4(1311 1312 1373 1372) +4(1372 1373 1434 1433) +4(1433 1434 1495 1494) +4(1494 1495 1556 1555) +4(1555 1556 1617 1616) +4(1616 1617 1678 1677) +4(1677 1678 1739 1738) +4(1738 1739 1800 1799) +4(1799 1800 1861 1860) +4(1860 1861 1922 1921) +4(1921 1922 1983 1982) +4(1982 1983 2044 2043) +4(2043 2044 2105 2104) +4(2104 2105 2166 2165) +4(2165 2166 2227 2226) +4(2226 2227 2288 2287) +4(2287 2288 2349 2348) +4(2348 2349 2410 2409) +4(2409 2410 2471 2470) +4(2470 2471 2532 2531) +4(1312 1313 1374 1373) +4(1373 1374 1435 1434) +4(1434 1435 1496 1495) +4(1495 1496 1557 1556) +4(1556 1557 1618 1617) +4(1617 1618 1679 1678) +4(1678 1679 1740 1739) +4(1739 1740 1801 1800) +4(1800 1801 1862 1861) +4(1861 1862 1923 1922) +4(1922 1923 1984 1983) +4(1983 1984 2045 2044) +4(2044 2045 2106 2105) +4(2105 2106 2167 2166) +4(2166 2167 2228 2227) +4(2227 2228 2289 2288) +4(2288 2289 2350 2349) +4(2349 2350 2411 2410) +4(2410 2411 2472 2471) +4(2471 2472 2533 2532) +4(1313 1314 1375 1374) +4(1374 1375 1436 1435) +4(1435 1436 1497 1496) +4(1496 1497 1558 1557) +4(1557 1558 1619 1618) +4(1618 1619 1680 1679) +4(1679 1680 1741 1740) +4(1740 1741 1802 1801) +4(1801 1802 1863 1862) +4(1862 1863 1924 1923) +4(1923 1924 1985 1984) +4(1984 1985 2046 2045) +4(2045 2046 2107 2106) +4(2106 2107 2168 2167) +4(2167 2168 2229 2228) +4(2228 2229 2290 2289) +4(2289 2290 2351 2350) +4(2350 2351 2412 2411) +4(2411 2412 2473 2472) +4(2472 2473 2534 2533) +4(1314 1315 1376 1375) +4(1375 1376 1437 1436) +4(1436 1437 1498 1497) +4(1497 1498 1559 1558) +4(1558 1559 1620 1619) +4(1619 1620 1681 1680) +4(1680 1681 1742 1741) +4(1741 1742 1803 1802) +4(1802 1803 1864 1863) +4(1863 1864 1925 1924) +4(1924 1925 1986 1985) +4(1985 1986 2047 2046) +4(2046 2047 2108 2107) +4(2107 2108 2169 2168) +4(2168 2169 2230 2229) +4(2229 2230 2291 2290) +4(2290 2291 2352 2351) +4(2351 2352 2413 2412) +4(2412 2413 2474 2473) +4(2473 2474 2535 2534) +4(1315 1316 1377 1376) +4(1376 1377 1438 1437) +4(1437 1438 1499 1498) +4(1498 1499 1560 1559) +4(1559 1560 1621 1620) +4(1620 1621 1682 1681) +4(1681 1682 1743 1742) +4(1742 1743 1804 1803) +4(1803 1804 1865 1864) +4(1864 1865 1926 1925) +4(1925 1926 1987 1986) +4(1986 1987 2048 2047) +4(2047 2048 2109 2108) +4(2108 2109 2170 2169) +4(2169 2170 2231 2230) +4(2230 2231 2292 2291) +4(2291 2292 2353 2352) +4(2352 2353 2414 2413) +4(2413 2414 2475 2474) +4(2474 2475 2536 2535) +4(1316 1317 1378 1377) +4(1377 1378 1439 1438) +4(1438 1439 1500 1499) +4(1499 1500 1561 1560) +4(1560 1561 1622 1621) +4(1621 1622 1683 1682) +4(1682 1683 1744 1743) +4(1743 1744 1805 1804) +4(1804 1805 1866 1865) +4(1865 1866 1927 1926) +4(1926 1927 1988 1987) +4(1987 1988 2049 2048) +4(2048 2049 2110 2109) +4(2109 2110 2171 2170) +4(2170 2171 2232 2231) +4(2231 2232 2293 2292) +4(2292 2293 2354 2353) +4(2353 2354 2415 2414) +4(2414 2415 2476 2475) +4(2475 2476 2537 2536) +4(1317 1318 1379 1378) +4(1378 1379 1440 1439) +4(1439 1440 1501 1500) +4(1500 1501 1562 1561) +4(1561 1562 1623 1622) +4(1622 1623 1684 1683) +4(1683 1684 1745 1744) +4(1744 1745 1806 1805) +4(1805 1806 1867 1866) +4(1866 1867 1928 1927) +4(1927 1928 1989 1988) +4(1988 1989 2050 2049) +4(2049 2050 2111 2110) +4(2110 2111 2172 2171) +4(2171 2172 2233 2232) +4(2232 2233 2294 2293) +4(2293 2294 2355 2354) +4(2354 2355 2416 2415) +4(2415 2416 2477 2476) +4(2476 2477 2538 2537) +4(1318 1319 1380 1379) +4(1379 1380 1441 1440) +4(1440 1441 1502 1501) +4(1501 1502 1563 1562) +4(1562 1563 1624 1623) +4(1623 1624 1685 1684) +4(1684 1685 1746 1745) +4(1745 1746 1807 1806) +4(1806 1807 1868 1867) +4(1867 1868 1929 1928) +4(1928 1929 1990 1989) +4(1989 1990 2051 2050) +4(2050 2051 2112 2111) +4(2111 2112 2173 2172) +4(2172 2173 2234 2233) +4(2233 2234 2295 2294) +4(2294 2295 2356 2355) +4(2355 2356 2417 2416) +4(2416 2417 2478 2477) +4(2477 2478 2539 2538) +4(1319 1320 1381 1380) +4(1380 1381 1442 1441) +4(1441 1442 1503 1502) +4(1502 1503 1564 1563) +4(1563 1564 1625 1624) +4(1624 1625 1686 1685) +4(1685 1686 1747 1746) +4(1746 1747 1808 1807) +4(1807 1808 1869 1868) +4(1868 1869 1930 1929) +4(1929 1930 1991 1990) +4(1990 1991 2052 2051) +4(2051 2052 2113 2112) +4(2112 2113 2174 2173) +4(2173 2174 2235 2234) +4(2234 2235 2296 2295) +4(2295 2296 2357 2356) +4(2356 2357 2418 2417) +4(2417 2418 2479 2478) +4(2478 2479 2540 2539) +4(1320 1321 1382 1381) +4(1381 1382 1443 1442) +4(1442 1443 1504 1503) +4(1503 1504 1565 1564) +4(1564 1565 1626 1625) +4(1625 1626 1687 1686) +4(1686 1687 1748 1747) +4(1747 1748 1809 1808) +4(1808 1809 1870 1869) +4(1869 1870 1931 1930) +4(1930 1931 1992 1991) +4(1991 1992 2053 2052) +4(2052 2053 2114 2113) +4(2113 2114 2175 2174) +4(2174 2175 2236 2235) +4(2235 2236 2297 2296) +4(2296 2297 2358 2357) +4(2357 2358 2419 2418) +4(2418 2419 2480 2479) +4(2479 2480 2541 2540) +4(1321 1322 1383 1382) +4(1382 1383 1444 1443) +4(1443 1444 1505 1504) +4(1504 1505 1566 1565) +4(1565 1566 1627 1626) +4(1626 1627 1688 1687) +4(1687 1688 1749 1748) +4(1748 1749 1810 1809) +4(1809 1810 1871 1870) +4(1870 1871 1932 1931) +4(1931 1932 1993 1992) +4(1992 1993 2054 2053) +4(2053 2054 2115 2114) +4(2114 2115 2176 2175) +4(2175 2176 2237 2236) +4(2236 2237 2298 2297) +4(2297 2298 2359 2358) +4(2358 2359 2420 2419) +4(2419 2420 2481 2480) +4(2480 2481 2542 2541) +4(1322 1323 1384 1383) +4(1383 1384 1445 1444) +4(1444 1445 1506 1505) +4(1505 1506 1567 1566) +4(1566 1567 1628 1627) +4(1627 1628 1689 1688) +4(1688 1689 1750 1749) +4(1749 1750 1811 1810) +4(1810 1811 1872 1871) +4(1871 1872 1933 1932) +4(1932 1933 1994 1993) +4(1993 1994 2055 2054) +4(2054 2055 2116 2115) +4(2115 2116 2177 2176) +4(2176 2177 2238 2237) +4(2237 2238 2299 2298) +4(2298 2299 2360 2359) +4(2359 2360 2421 2420) +4(2420 2421 2482 2481) +4(2481 2482 2543 2542) +4(1323 1324 1385 1384) +4(1384 1385 1446 1445) +4(1445 1446 1507 1506) +4(1506 1507 1568 1567) +4(1567 1568 1629 1628) +4(1628 1629 1690 1689) +4(1689 1690 1751 1750) +4(1750 1751 1812 1811) +4(1811 1812 1873 1872) +4(1872 1873 1934 1933) +4(1933 1934 1995 1994) +4(1994 1995 2056 2055) +4(2055 2056 2117 2116) +4(2116 2117 2178 2177) +4(2177 2178 2239 2238) +4(2238 2239 2300 2299) +4(2299 2300 2361 2360) +4(2360 2361 2422 2421) +4(2421 2422 2483 2482) +4(2482 2483 2544 2543) +4(1324 1325 1386 1385) +4(1385 1386 1447 1446) +4(1446 1447 1508 1507) +4(1507 1508 1569 1568) +4(1568 1569 1630 1629) +4(1629 1630 1691 1690) +4(1690 1691 1752 1751) +4(1751 1752 1813 1812) +4(1812 1813 1874 1873) +4(1873 1874 1935 1934) +4(1934 1935 1996 1995) +4(1995 1996 2057 2056) +4(2056 2057 2118 2117) +4(2117 2118 2179 2178) +4(2178 2179 2240 2239) +4(2239 2240 2301 2300) +4(2300 2301 2362 2361) +4(2361 2362 2423 2422) +4(2422 2423 2484 2483) +4(2483 2484 2545 2544) +4(1325 1326 1387 1386) +4(1386 1387 1448 1447) +4(1447 1448 1509 1508) +4(1508 1509 1570 1569) +4(1569 1570 1631 1630) +4(1630 1631 1692 1691) +4(1691 1692 1753 1752) +4(1752 1753 1814 1813) +4(1813 1814 1875 1874) +4(1874 1875 1936 1935) +4(1935 1936 1997 1996) +4(1996 1997 2058 2057) +4(2057 2058 2119 2118) +4(2118 2119 2180 2179) +4(2179 2180 2241 2240) +4(2240 2241 2302 2301) +4(2301 2302 2363 2362) +4(2362 2363 2424 2423) +4(2423 2424 2485 2484) +4(2484 2485 2546 2545) +4(1326 1327 1388 1387) +4(1387 1388 1449 1448) +4(1448 1449 1510 1509) +4(1509 1510 1571 1570) +4(1570 1571 1632 1631) +4(1631 1632 1693 1692) +4(1692 1693 1754 1753) +4(1753 1754 1815 1814) +4(1814 1815 1876 1875) +4(1875 1876 1937 1936) +4(1936 1937 1998 1997) +4(1997 1998 2059 2058) +4(2058 2059 2120 2119) +4(2119 2120 2181 2180) +4(2180 2181 2242 2241) +4(2241 2242 2303 2302) +4(2302 2303 2364 2363) +4(2363 2364 2425 2424) +4(2424 2425 2486 2485) +4(2485 2486 2547 2546) +4(1327 1328 1389 1388) +4(1388 1389 1450 1449) +4(1449 1450 1511 1510) +4(1510 1511 1572 1571) +4(1571 1572 1633 1632) +4(1632 1633 1694 1693) +4(1693 1694 1755 1754) +4(1754 1755 1816 1815) +4(1815 1816 1877 1876) +4(1876 1877 1938 1937) +4(1937 1938 1999 1998) +4(1998 1999 2060 2059) +4(2059 2060 2121 2120) +4(2120 2121 2182 2181) +4(2181 2182 2243 2242) +4(2242 2243 2304 2303) +4(2303 2304 2365 2364) +4(2364 2365 2426 2425) +4(2425 2426 2487 2486) +4(2486 2487 2548 2547) +4(1328 1329 1390 1389) +4(1389 1390 1451 1450) +4(1450 1451 1512 1511) +4(1511 1512 1573 1572) +4(1572 1573 1634 1633) +4(1633 1634 1695 1694) +4(1694 1695 1756 1755) +4(1755 1756 1817 1816) +4(1816 1817 1878 1877) +4(1877 1878 1939 1938) +4(1938 1939 2000 1999) +4(1999 2000 2061 2060) +4(2060 2061 2122 2121) +4(2121 2122 2183 2182) +4(2182 2183 2244 2243) +4(2243 2244 2305 2304) +4(2304 2305 2366 2365) +4(2365 2366 2427 2426) +4(2426 2427 2488 2487) +4(2487 2488 2549 2548) +4(1329 1330 1391 1390) +4(1390 1391 1452 1451) +4(1451 1452 1513 1512) +4(1512 1513 1574 1573) +4(1573 1574 1635 1634) +4(1634 1635 1696 1695) +4(1695 1696 1757 1756) +4(1756 1757 1818 1817) +4(1817 1818 1879 1878) +4(1878 1879 1940 1939) +4(1939 1940 2001 2000) +4(2000 2001 2062 2061) +4(2061 2062 2123 2122) +4(2122 2123 2184 2183) +4(2183 2184 2245 2244) +4(2244 2245 2306 2305) +4(2305 2306 2367 2366) +4(2366 2367 2428 2427) +4(2427 2428 2489 2488) +4(2488 2489 2550 2549) +4(1330 1331 1392 1391) +4(1391 1392 1453 1452) +4(1452 1453 1514 1513) +4(1513 1514 1575 1574) +4(1574 1575 1636 1635) +4(1635 1636 1697 1696) +4(1696 1697 1758 1757) +4(1757 1758 1819 1818) +4(1818 1819 1880 1879) +4(1879 1880 1941 1940) +4(1940 1941 2002 2001) +4(2001 2002 2063 2062) +4(2062 2063 2124 2123) +4(2123 2124 2185 2184) +4(2184 2185 2246 2245) +4(2245 2246 2307 2306) +4(2306 2307 2368 2367) +4(2367 2368 2429 2428) +4(2428 2429 2490 2489) +4(2489 2490 2551 2550) +4(1331 1332 1393 1392) +4(1392 1393 1454 1453) +4(1453 1454 1515 1514) +4(1514 1515 1576 1575) +4(1575 1576 1637 1636) +4(1636 1637 1698 1697) +4(1697 1698 1759 1758) +4(1758 1759 1820 1819) +4(1819 1820 1881 1880) +4(1880 1881 1942 1941) +4(1941 1942 2003 2002) +4(2002 2003 2064 2063) +4(2063 2064 2125 2124) +4(2124 2125 2186 2185) +4(2185 2186 2247 2246) +4(2246 2247 2308 2307) +4(2307 2308 2369 2368) +4(2368 2369 2430 2429) +4(2429 2430 2491 2490) +4(2490 2491 2552 2551) +4(1332 1333 1394 1393) +4(1393 1394 1455 1454) +4(1454 1455 1516 1515) +4(1515 1516 1577 1576) +4(1576 1577 1638 1637) +4(1637 1638 1699 1698) +4(1698 1699 1760 1759) +4(1759 1760 1821 1820) +4(1820 1821 1882 1881) +4(1881 1882 1943 1942) +4(1942 1943 2004 2003) +4(2003 2004 2065 2064) +4(2064 2065 2126 2125) +4(2125 2126 2187 2186) +4(2186 2187 2248 2247) +4(2247 2248 2309 2308) +4(2308 2309 2370 2369) +4(2369 2370 2431 2430) +4(2430 2431 2492 2491) +4(2491 2492 2553 2552) +4(1333 1334 1395 1394) +4(1394 1395 1456 1455) +4(1455 1456 1517 1516) +4(1516 1517 1578 1577) +4(1577 1578 1639 1638) +4(1638 1639 1700 1699) +4(1699 1700 1761 1760) +4(1760 1761 1822 1821) +4(1821 1822 1883 1882) +4(1882 1883 1944 1943) +4(1943 1944 2005 2004) +4(2004 2005 2066 2065) +4(2065 2066 2127 2126) +4(2126 2127 2188 2187) +4(2187 2188 2249 2248) +4(2248 2249 2310 2309) +4(2309 2310 2371 2370) +4(2370 2371 2432 2431) +4(2431 2432 2493 2492) +4(2492 2493 2554 2553) +4(1334 1335 1396 1395) +4(1395 1396 1457 1456) +4(1456 1457 1518 1517) +4(1517 1518 1579 1578) +4(1578 1579 1640 1639) +4(1639 1640 1701 1700) +4(1700 1701 1762 1761) +4(1761 1762 1823 1822) +4(1822 1823 1884 1883) +4(1883 1884 1945 1944) +4(1944 1945 2006 2005) +4(2005 2006 2067 2066) +4(2066 2067 2128 2127) +4(2127 2128 2189 2188) +4(2188 2189 2250 2249) +4(2249 2250 2311 2310) +4(2310 2311 2372 2371) +4(2371 2372 2433 2432) +4(2432 2433 2494 2493) +4(2493 2494 2555 2554) +4(1335 1336 1397 1396) +4(1396 1397 1458 1457) +4(1457 1458 1519 1518) +4(1518 1519 1580 1579) +4(1579 1580 1641 1640) +4(1640 1641 1702 1701) +4(1701 1702 1763 1762) +4(1762 1763 1824 1823) +4(1823 1824 1885 1884) +4(1884 1885 1946 1945) +4(1945 1946 2007 2006) +4(2006 2007 2068 2067) +4(2067 2068 2129 2128) +4(2128 2129 2190 2189) +4(2189 2190 2251 2250) +4(2250 2251 2312 2311) +4(2311 2312 2373 2372) +4(2372 2373 2434 2433) +4(2433 2434 2495 2494) +4(2494 2495 2556 2555) +4(1336 1337 1398 1397) +4(1397 1398 1459 1458) +4(1458 1459 1520 1519) +4(1519 1520 1581 1580) +4(1580 1581 1642 1641) +4(1641 1642 1703 1702) +4(1702 1703 1764 1763) +4(1763 1764 1825 1824) +4(1824 1825 1886 1885) +4(1885 1886 1947 1946) +4(1946 1947 2008 2007) +4(2007 2008 2069 2068) +4(2068 2069 2130 2129) +4(2129 2130 2191 2190) +4(2190 2191 2252 2251) +4(2251 2252 2313 2312) +4(2312 2313 2374 2373) +4(2373 2374 2435 2434) +4(2434 2435 2496 2495) +4(2495 2496 2557 2556) +4(1337 1338 1399 1398) +4(1398 1399 1460 1459) +4(1459 1460 1521 1520) +4(1520 1521 1582 1581) +4(1581 1582 1643 1642) +4(1642 1643 1704 1703) +4(1703 1704 1765 1764) +4(1764 1765 1826 1825) +4(1825 1826 1887 1886) +4(1886 1887 1948 1947) +4(1947 1948 2009 2008) +4(2008 2009 2070 2069) +4(2069 2070 2131 2130) +4(2130 2131 2192 2191) +4(2191 2192 2253 2252) +4(2252 2253 2314 2313) +4(2313 2314 2375 2374) +4(2374 2375 2436 2435) +4(2435 2436 2497 2496) +4(2496 2497 2558 2557) +4(1338 1339 1400 1399) +4(1399 1400 1461 1460) +4(1460 1461 1522 1521) +4(1521 1522 1583 1582) +4(1582 1583 1644 1643) +4(1643 1644 1705 1704) +4(1704 1705 1766 1765) +4(1765 1766 1827 1826) +4(1826 1827 1888 1887) +4(1887 1888 1949 1948) +4(1948 1949 2010 2009) +4(2009 2010 2071 2070) +4(2070 2071 2132 2131) +4(2131 2132 2193 2192) +4(2192 2193 2254 2253) +4(2253 2254 2315 2314) +4(2314 2315 2376 2375) +4(2375 2376 2437 2436) +4(2436 2437 2498 2497) +4(2497 2498 2559 2558) +4(1339 1340 1401 1400) +4(1400 1401 1462 1461) +4(1461 1462 1523 1522) +4(1522 1523 1584 1583) +4(1583 1584 1645 1644) +4(1644 1645 1706 1705) +4(1705 1706 1767 1766) +4(1766 1767 1828 1827) +4(1827 1828 1889 1888) +4(1888 1889 1950 1949) +4(1949 1950 2011 2010) +4(2010 2011 2072 2071) +4(2071 2072 2133 2132) +4(2132 2133 2194 2193) +4(2193 2194 2255 2254) +4(2254 2255 2316 2315) +4(2315 2316 2377 2376) +4(2376 2377 2438 2437) +4(2437 2438 2499 2498) +4(2498 2499 2560 2559) +4(1340 1341 1402 1401) +4(1401 1402 1463 1462) +4(1462 1463 1524 1523) +4(1523 1524 1585 1584) +4(1584 1585 1646 1645) +4(1645 1646 1707 1706) +4(1706 1707 1768 1767) +4(1767 1768 1829 1828) +4(1828 1829 1890 1889) +4(1889 1890 1951 1950) +4(1950 1951 2012 2011) +4(2011 2012 2073 2072) +4(2072 2073 2134 2133) +4(2133 2134 2195 2194) +4(2194 2195 2256 2255) +4(2255 2256 2317 2316) +4(2316 2317 2378 2377) +4(2377 2378 2439 2438) +4(2438 2439 2500 2499) +4(2499 2500 2561 2560) +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/neighbour b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/neighbour new file mode 100644 index 0000000000000000000000000000000000000000..0dcc5731829ae59b7714c0709f02a6d81bbff3ec --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/neighbour @@ -0,0 +1,2345 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class labelList; + note "nPoints: 2562 nCells: 1200 nFaces: 4880 nInternalFaces: 2320"; + location "constant/polyMesh"; + object neighbour; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +2320 +( +1 +60 +2 +61 +3 +62 +4 +63 +5 +64 +6 +65 +7 +66 +8 +67 +9 +68 +10 +69 +11 +70 +12 +71 +13 +72 +14 +73 +15 +74 +16 +75 +17 +76 +18 +77 +19 +78 +20 +79 +21 +80 +22 +81 +23 +82 +24 +83 +25 +84 +26 +85 +27 +86 +28 +87 +29 +88 +30 +89 +31 +90 +32 +91 +33 +92 +34 +93 +35 +94 +36 +95 +37 +96 +38 +97 +39 +98 +40 +99 +41 +100 +42 +101 +43 +102 +44 +103 +45 +104 +46 +105 +47 +106 +48 +107 +49 +108 +50 +109 +51 +110 +52 +111 +53 +112 +54 +113 +55 +114 +56 +115 +57 +116 +58 +117 +59 +118 +119 +61 +120 +62 +121 +63 +122 +64 +123 +65 +124 +66 +125 +67 +126 +68 +127 +69 +128 +70 +129 +71 +130 +72 +131 +73 +132 +74 +133 +75 +134 +76 +135 +77 +136 +78 +137 +79 +138 +80 +139 +81 +140 +82 +141 +83 +142 +84 +143 +85 +144 +86 +145 +87 +146 +88 +147 +89 +148 +90 +149 +91 +150 +92 +151 +93 +152 +94 +153 +95 +154 +96 +155 +97 +156 +98 +157 +99 +158 +100 +159 +101 +160 +102 +161 +103 +162 +104 +163 +105 +164 +106 +165 +107 +166 +108 +167 +109 +168 +110 +169 +111 +170 +112 +171 +113 +172 +114 +173 +115 +174 +116 +175 +117 +176 +118 +177 +119 +178 +179 +121 +180 +122 +181 +123 +182 +124 +183 +125 +184 +126 +185 +127 +186 +128 +187 +129 +188 +130 +189 +131 +190 +132 +191 +133 +192 +134 +193 +135 +194 +136 +195 +137 +196 +138 +197 +139 +198 +140 +199 +141 +200 +142 +201 +143 +202 +144 +203 +145 +204 +146 +205 +147 +206 +148 +207 +149 +208 +150 +209 +151 +210 +152 +211 +153 +212 +154 +213 +155 +214 +156 +215 +157 +216 +158 +217 +159 +218 +160 +219 +161 +220 +162 +221 +163 +222 +164 +223 +165 +224 +166 +225 +167 +226 +168 +227 +169 +228 +170 +229 +171 +230 +172 +231 +173 +232 +174 +233 +175 +234 +176 +235 +177 +236 +178 +237 +179 +238 +239 +181 +240 +182 +241 +183 +242 +184 +243 +185 +244 +186 +245 +187 +246 +188 +247 +189 +248 +190 +249 +191 +250 +192 +251 +193 +252 +194 +253 +195 +254 +196 +255 +197 +256 +198 +257 +199 +258 +200 +259 +201 +260 +202 +261 +203 +262 +204 +263 +205 +264 +206 +265 +207 +266 +208 +267 +209 +268 +210 +269 +211 +270 +212 +271 +213 +272 +214 +273 +215 +274 +216 +275 +217 +276 +218 +277 +219 +278 +220 +279 +221 +280 +222 +281 +223 +282 +224 +283 +225 +284 +226 +285 +227 +286 +228 +287 +229 +288 +230 +289 +231 +290 +232 +291 +233 +292 +234 +293 +235 +294 +236 +295 +237 +296 +238 +297 +239 +298 +299 +241 +300 +242 +301 +243 +302 +244 +303 +245 +304 +246 +305 +247 +306 +248 +307 +249 +308 +250 +309 +251 +310 +252 +311 +253 +312 +254 +313 +255 +314 +256 +315 +257 +316 +258 +317 +259 +318 +260 +319 +261 +320 +262 +321 +263 +322 +264 +323 +265 +324 +266 +325 +267 +326 +268 +327 +269 +328 +270 +329 +271 +330 +272 +331 +273 +332 +274 +333 +275 +334 +276 +335 +277 +336 +278 +337 +279 +338 +280 +339 +281 +340 +282 +341 +283 +342 +284 +343 +285 +344 +286 +345 +287 +346 +288 +347 +289 +348 +290 +349 +291 +350 +292 +351 +293 +352 +294 +353 +295 +354 +296 +355 +297 +356 +298 +357 +299 +358 +359 +301 +360 +302 +361 +303 +362 +304 +363 +305 +364 +306 +365 +307 +366 +308 +367 +309 +368 +310 +369 +311 +370 +312 +371 +313 +372 +314 +373 +315 +374 +316 +375 +317 +376 +318 +377 +319 +378 +320 +379 +321 +380 +322 +381 +323 +382 +324 +383 +325 +384 +326 +385 +327 +386 +328 +387 +329 +388 +330 +389 +331 +390 +332 +391 +333 +392 +334 +393 +335 +394 +336 +395 +337 +396 +338 +397 +339 +398 +340 +399 +341 +400 +342 +401 +343 +402 +344 +403 +345 +404 +346 +405 +347 +406 +348 +407 +349 +408 +350 +409 +351 +410 +352 +411 +353 +412 +354 +413 +355 +414 +356 +415 +357 +416 +358 +417 +359 +418 +419 +361 +420 +362 +421 +363 +422 +364 +423 +365 +424 +366 +425 +367 +426 +368 +427 +369 +428 +370 +429 +371 +430 +372 +431 +373 +432 +374 +433 +375 +434 +376 +435 +377 +436 +378 +437 +379 +438 +380 +439 +381 +440 +382 +441 +383 +442 +384 +443 +385 +444 +386 +445 +387 +446 +388 +447 +389 +448 +390 +449 +391 +450 +392 +451 +393 +452 +394 +453 +395 +454 +396 +455 +397 +456 +398 +457 +399 +458 +400 +459 +401 +460 +402 +461 +403 +462 +404 +463 +405 +464 +406 +465 +407 +466 +408 +467 +409 +468 +410 +469 +411 +470 +412 +471 +413 +472 +414 +473 +415 +474 +416 +475 +417 +476 +418 +477 +419 +478 +479 +421 +480 +422 +481 +423 +482 +424 +483 +425 +484 +426 +485 +427 +486 +428 +487 +429 +488 +430 +489 +431 +490 +432 +491 +433 +492 +434 +493 +435 +494 +436 +495 +437 +496 +438 +497 +439 +498 +440 +499 +441 +500 +442 +501 +443 +502 +444 +503 +445 +504 +446 +505 +447 +506 +448 +507 +449 +508 +450 +509 +451 +510 +452 +511 +453 +512 +454 +513 +455 +514 +456 +515 +457 +516 +458 +517 +459 +518 +460 +519 +461 +520 +462 +521 +463 +522 +464 +523 +465 +524 +466 +525 +467 +526 +468 +527 +469 +528 +470 +529 +471 +530 +472 +531 +473 +532 +474 +533 +475 +534 +476 +535 +477 +536 +478 +537 +479 +538 +539 +481 +540 +482 +541 +483 +542 +484 +543 +485 +544 +486 +545 +487 +546 +488 +547 +489 +548 +490 +549 +491 +550 +492 +551 +493 +552 +494 +553 +495 +554 +496 +555 +497 +556 +498 +557 +499 +558 +500 +559 +501 +560 +502 +561 +503 +562 +504 +563 +505 +564 +506 +565 +507 +566 +508 +567 +509 +568 +510 +569 +511 +570 +512 +571 +513 +572 +514 +573 +515 +574 +516 +575 +517 +576 +518 +577 +519 +578 +520 +579 +521 +580 +522 +581 +523 +582 +524 +583 +525 +584 +526 +585 +527 +586 +528 +587 +529 +588 +530 +589 +531 +590 +532 +591 +533 +592 +534 +593 +535 +594 +536 +595 +537 +596 +538 +597 +539 +598 +599 +541 +600 +542 +601 +543 +602 +544 +603 +545 +604 +546 +605 +547 +606 +548 +607 +549 +608 +550 +609 +551 +610 +552 +611 +553 +612 +554 +613 +555 +614 +556 +615 +557 +616 +558 +617 +559 +618 +560 +619 +561 +620 +562 +621 +563 +622 +564 +623 +565 +624 +566 +625 +567 +626 +568 +627 +569 +628 +570 +629 +571 +630 +572 +631 +573 +632 +574 +633 +575 +634 +576 +635 +577 +636 +578 +637 +579 +638 +580 +639 +581 +640 +582 +641 +583 +642 +584 +643 +585 +644 +586 +645 +587 +646 +588 +647 +589 +648 +590 +649 +591 +650 +592 +651 +593 +652 +594 +653 +595 +654 +596 +655 +597 +656 +598 +657 +599 +658 +659 +601 +660 +602 +661 +603 +662 +604 +663 +605 +664 +606 +665 +607 +666 +608 +667 +609 +668 +610 +669 +611 +670 +612 +671 +613 +672 +614 +673 +615 +674 +616 +675 +617 +676 +618 +677 +619 +678 +620 +679 +621 +680 +622 +681 +623 +682 +624 +683 +625 +684 +626 +685 +627 +686 +628 +687 +629 +688 +630 +689 +631 +690 +632 +691 +633 +692 +634 +693 +635 +694 +636 +695 +637 +696 +638 +697 +639 +698 +640 +699 +641 +700 +642 +701 +643 +702 +644 +703 +645 +704 +646 +705 +647 +706 +648 +707 +649 +708 +650 +709 +651 +710 +652 +711 +653 +712 +654 +713 +655 +714 +656 +715 +657 +716 +658 +717 +659 +718 +719 +661 +720 +662 +721 +663 +722 +664 +723 +665 +724 +666 +725 +667 +726 +668 +727 +669 +728 +670 +729 +671 +730 +672 +731 +673 +732 +674 +733 +675 +734 +676 +735 +677 +736 +678 +737 +679 +738 +680 +739 +681 +740 +682 +741 +683 +742 +684 +743 +685 +744 +686 +745 +687 +746 +688 +747 +689 +748 +690 +749 +691 +750 +692 +751 +693 +752 +694 +753 +695 +754 +696 +755 +697 +756 +698 +757 +699 +758 +700 +759 +701 +760 +702 +761 +703 +762 +704 +763 +705 +764 +706 +765 +707 +766 +708 +767 +709 +768 +710 +769 +711 +770 +712 +771 +713 +772 +714 +773 +715 +774 +716 +775 +717 +776 +718 +777 +719 +778 +779 +721 +780 +722 +781 +723 +782 +724 +783 +725 +784 +726 +785 +727 +786 +728 +787 +729 +788 +730 +789 +731 +790 +732 +791 +733 +792 +734 +793 +735 +794 +736 +795 +737 +796 +738 +797 +739 +798 +740 +799 +741 +800 +742 +801 +743 +802 +744 +803 +745 +804 +746 +805 +747 +806 +748 +807 +749 +808 +750 +809 +751 +810 +752 +811 +753 +812 +754 +813 +755 +814 +756 +815 +757 +816 +758 +817 +759 +818 +760 +819 +761 +820 +762 +821 +763 +822 +764 +823 +765 +824 +766 +825 +767 +826 +768 +827 +769 +828 +770 +829 +771 +830 +772 +831 +773 +832 +774 +833 +775 +834 +776 +835 +777 +836 +778 +837 +779 +838 +839 +781 +840 +782 +841 +783 +842 +784 +843 +785 +844 +786 +845 +787 +846 +788 +847 +789 +848 +790 +849 +791 +850 +792 +851 +793 +852 +794 +853 +795 +854 +796 +855 +797 +856 +798 +857 +799 +858 +800 +859 +801 +860 +802 +861 +803 +862 +804 +863 +805 +864 +806 +865 +807 +866 +808 +867 +809 +868 +810 +869 +811 +870 +812 +871 +813 +872 +814 +873 +815 +874 +816 +875 +817 +876 +818 +877 +819 +878 +820 +879 +821 +880 +822 +881 +823 +882 +824 +883 +825 +884 +826 +885 +827 +886 +828 +887 +829 +888 +830 +889 +831 +890 +832 +891 +833 +892 +834 +893 +835 +894 +836 +895 +837 +896 +838 +897 +839 +898 +899 +841 +900 +842 +901 +843 +902 +844 +903 +845 +904 +846 +905 +847 +906 +848 +907 +849 +908 +850 +909 +851 +910 +852 +911 +853 +912 +854 +913 +855 +914 +856 +915 +857 +916 +858 +917 +859 +918 +860 +919 +861 +920 +862 +921 +863 +922 +864 +923 +865 +924 +866 +925 +867 +926 +868 +927 +869 +928 +870 +929 +871 +930 +872 +931 +873 +932 +874 +933 +875 +934 +876 +935 +877 +936 +878 +937 +879 +938 +880 +939 +881 +940 +882 +941 +883 +942 +884 +943 +885 +944 +886 +945 +887 +946 +888 +947 +889 +948 +890 +949 +891 +950 +892 +951 +893 +952 +894 +953 +895 +954 +896 +955 +897 +956 +898 +957 +899 +958 +959 +901 +960 +902 +961 +903 +962 +904 +963 +905 +964 +906 +965 +907 +966 +908 +967 +909 +968 +910 +969 +911 +970 +912 +971 +913 +972 +914 +973 +915 +974 +916 +975 +917 +976 +918 +977 +919 +978 +920 +979 +921 +980 +922 +981 +923 +982 +924 +983 +925 +984 +926 +985 +927 +986 +928 +987 +929 +988 +930 +989 +931 +990 +932 +991 +933 +992 +934 +993 +935 +994 +936 +995 +937 +996 +938 +997 +939 +998 +940 +999 +941 +1000 +942 +1001 +943 +1002 +944 +1003 +945 +1004 +946 +1005 +947 +1006 +948 +1007 +949 +1008 +950 +1009 +951 +1010 +952 +1011 +953 +1012 +954 +1013 +955 +1014 +956 +1015 +957 +1016 +958 +1017 +959 +1018 +1019 +961 +1020 +962 +1021 +963 +1022 +964 +1023 +965 +1024 +966 +1025 +967 +1026 +968 +1027 +969 +1028 +970 +1029 +971 +1030 +972 +1031 +973 +1032 +974 +1033 +975 +1034 +976 +1035 +977 +1036 +978 +1037 +979 +1038 +980 +1039 +981 +1040 +982 +1041 +983 +1042 +984 +1043 +985 +1044 +986 +1045 +987 +1046 +988 +1047 +989 +1048 +990 +1049 +991 +1050 +992 +1051 +993 +1052 +994 +1053 +995 +1054 +996 +1055 +997 +1056 +998 +1057 +999 +1058 +1000 +1059 +1001 +1060 +1002 +1061 +1003 +1062 +1004 +1063 +1005 +1064 +1006 +1065 +1007 +1066 +1008 +1067 +1009 +1068 +1010 +1069 +1011 +1070 +1012 +1071 +1013 +1072 +1014 +1073 +1015 +1074 +1016 +1075 +1017 +1076 +1018 +1077 +1019 +1078 +1079 +1021 +1080 +1022 +1081 +1023 +1082 +1024 +1083 +1025 +1084 +1026 +1085 +1027 +1086 +1028 +1087 +1029 +1088 +1030 +1089 +1031 +1090 +1032 +1091 +1033 +1092 +1034 +1093 +1035 +1094 +1036 +1095 +1037 +1096 +1038 +1097 +1039 +1098 +1040 +1099 +1041 +1100 +1042 +1101 +1043 +1102 +1044 +1103 +1045 +1104 +1046 +1105 +1047 +1106 +1048 +1107 +1049 +1108 +1050 +1109 +1051 +1110 +1052 +1111 +1053 +1112 +1054 +1113 +1055 +1114 +1056 +1115 +1057 +1116 +1058 +1117 +1059 +1118 +1060 +1119 +1061 +1120 +1062 +1121 +1063 +1122 +1064 +1123 +1065 +1124 +1066 +1125 +1067 +1126 +1068 +1127 +1069 +1128 +1070 +1129 +1071 +1130 +1072 +1131 +1073 +1132 +1074 +1133 +1075 +1134 +1076 +1135 +1077 +1136 +1078 +1137 +1079 +1138 +1139 +1081 +1140 +1082 +1141 +1083 +1142 +1084 +1143 +1085 +1144 +1086 +1145 +1087 +1146 +1088 +1147 +1089 +1148 +1090 +1149 +1091 +1150 +1092 +1151 +1093 +1152 +1094 +1153 +1095 +1154 +1096 +1155 +1097 +1156 +1098 +1157 +1099 +1158 +1100 +1159 +1101 +1160 +1102 +1161 +1103 +1162 +1104 +1163 +1105 +1164 +1106 +1165 +1107 +1166 +1108 +1167 +1109 +1168 +1110 +1169 +1111 +1170 +1112 +1171 +1113 +1172 +1114 +1173 +1115 +1174 +1116 +1175 +1117 +1176 +1118 +1177 +1119 +1178 +1120 +1179 +1121 +1180 +1122 +1181 +1123 +1182 +1124 +1183 +1125 +1184 +1126 +1185 +1127 +1186 +1128 +1187 +1129 +1188 +1130 +1189 +1131 +1190 +1132 +1191 +1133 +1192 +1134 +1193 +1135 +1194 +1136 +1195 +1137 +1196 +1138 +1197 +1139 +1198 +1199 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/owner b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/owner new file mode 100644 index 0000000000000000000000000000000000000000..8f90ec8068b7a4a111c22b9b6eae8da9945689bd --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/owner @@ -0,0 +1,4905 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class labelList; + note "nPoints: 2562 nCells: 1200 nFaces: 4880 nInternalFaces: 2320"; + location "constant/polyMesh"; + object owner; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +4880 +( +0 +0 +1 +1 +2 +2 +3 +3 +4 +4 +5 +5 +6 +6 +7 +7 +8 +8 +9 +9 +10 +10 +11 +11 +12 +12 +13 +13 +14 +14 +15 +15 +16 +16 +17 +17 +18 +18 +19 +19 +20 +20 +21 +21 +22 +22 +23 +23 +24 +24 +25 +25 +26 +26 +27 +27 +28 +28 +29 +29 +30 +30 +31 +31 +32 +32 +33 +33 +34 +34 +35 +35 +36 +36 +37 +37 +38 +38 +39 +39 +40 +40 +41 +41 +42 +42 +43 +43 +44 +44 +45 +45 +46 +46 +47 +47 +48 +48 +49 +49 +50 +50 +51 +51 +52 +52 +53 +53 +54 +54 +55 +55 +56 +56 +57 +57 +58 +58 +59 +60 +60 +61 +61 +62 +62 +63 +63 +64 +64 +65 +65 +66 +66 +67 +67 +68 +68 +69 +69 +70 +70 +71 +71 +72 +72 +73 +73 +74 +74 +75 +75 +76 +76 +77 +77 +78 +78 +79 +79 +80 +80 +81 +81 +82 +82 +83 +83 +84 +84 +85 +85 +86 +86 +87 +87 +88 +88 +89 +89 +90 +90 +91 +91 +92 +92 +93 +93 +94 +94 +95 +95 +96 +96 +97 +97 +98 +98 +99 +99 +100 +100 +101 +101 +102 +102 +103 +103 +104 +104 +105 +105 +106 +106 +107 +107 +108 +108 +109 +109 +110 +110 +111 +111 +112 +112 +113 +113 +114 +114 +115 +115 +116 +116 +117 +117 +118 +118 +119 +120 +120 +121 +121 +122 +122 +123 +123 +124 +124 +125 +125 +126 +126 +127 +127 +128 +128 +129 +129 +130 +130 +131 +131 +132 +132 +133 +133 +134 +134 +135 +135 +136 +136 +137 +137 +138 +138 +139 +139 +140 +140 +141 +141 +142 +142 +143 +143 +144 +144 +145 +145 +146 +146 +147 +147 +148 +148 +149 +149 +150 +150 +151 +151 +152 +152 +153 +153 +154 +154 +155 +155 +156 +156 +157 +157 +158 +158 +159 +159 +160 +160 +161 +161 +162 +162 +163 +163 +164 +164 +165 +165 +166 +166 +167 +167 +168 +168 +169 +169 +170 +170 +171 +171 +172 +172 +173 +173 +174 +174 +175 +175 +176 +176 +177 +177 +178 +178 +179 +180 +180 +181 +181 +182 +182 +183 +183 +184 +184 +185 +185 +186 +186 +187 +187 +188 +188 +189 +189 +190 +190 +191 +191 +192 +192 +193 +193 +194 +194 +195 +195 +196 +196 +197 +197 +198 +198 +199 +199 +200 +200 +201 +201 +202 +202 +203 +203 +204 +204 +205 +205 +206 +206 +207 +207 +208 +208 +209 +209 +210 +210 +211 +211 +212 +212 +213 +213 +214 +214 +215 +215 +216 +216 +217 +217 +218 +218 +219 +219 +220 +220 +221 +221 +222 +222 +223 +223 +224 +224 +225 +225 +226 +226 +227 +227 +228 +228 +229 +229 +230 +230 +231 +231 +232 +232 +233 +233 +234 +234 +235 +235 +236 +236 +237 +237 +238 +238 +239 +240 +240 +241 +241 +242 +242 +243 +243 +244 +244 +245 +245 +246 +246 +247 +247 +248 +248 +249 +249 +250 +250 +251 +251 +252 +252 +253 +253 +254 +254 +255 +255 +256 +256 +257 +257 +258 +258 +259 +259 +260 +260 +261 +261 +262 +262 +263 +263 +264 +264 +265 +265 +266 +266 +267 +267 +268 +268 +269 +269 +270 +270 +271 +271 +272 +272 +273 +273 +274 +274 +275 +275 +276 +276 +277 +277 +278 +278 +279 +279 +280 +280 +281 +281 +282 +282 +283 +283 +284 +284 +285 +285 +286 +286 +287 +287 +288 +288 +289 +289 +290 +290 +291 +291 +292 +292 +293 +293 +294 +294 +295 +295 +296 +296 +297 +297 +298 +298 +299 +300 +300 +301 +301 +302 +302 +303 +303 +304 +304 +305 +305 +306 +306 +307 +307 +308 +308 +309 +309 +310 +310 +311 +311 +312 +312 +313 +313 +314 +314 +315 +315 +316 +316 +317 +317 +318 +318 +319 +319 +320 +320 +321 +321 +322 +322 +323 +323 +324 +324 +325 +325 +326 +326 +327 +327 +328 +328 +329 +329 +330 +330 +331 +331 +332 +332 +333 +333 +334 +334 +335 +335 +336 +336 +337 +337 +338 +338 +339 +339 +340 +340 +341 +341 +342 +342 +343 +343 +344 +344 +345 +345 +346 +346 +347 +347 +348 +348 +349 +349 +350 +350 +351 +351 +352 +352 +353 +353 +354 +354 +355 +355 +356 +356 +357 +357 +358 +358 +359 +360 +360 +361 +361 +362 +362 +363 +363 +364 +364 +365 +365 +366 +366 +367 +367 +368 +368 +369 +369 +370 +370 +371 +371 +372 +372 +373 +373 +374 +374 +375 +375 +376 +376 +377 +377 +378 +378 +379 +379 +380 +380 +381 +381 +382 +382 +383 +383 +384 +384 +385 +385 +386 +386 +387 +387 +388 +388 +389 +389 +390 +390 +391 +391 +392 +392 +393 +393 +394 +394 +395 +395 +396 +396 +397 +397 +398 +398 +399 +399 +400 +400 +401 +401 +402 +402 +403 +403 +404 +404 +405 +405 +406 +406 +407 +407 +408 +408 +409 +409 +410 +410 +411 +411 +412 +412 +413 +413 +414 +414 +415 +415 +416 +416 +417 +417 +418 +418 +419 +420 +420 +421 +421 +422 +422 +423 +423 +424 +424 +425 +425 +426 +426 +427 +427 +428 +428 +429 +429 +430 +430 +431 +431 +432 +432 +433 +433 +434 +434 +435 +435 +436 +436 +437 +437 +438 +438 +439 +439 +440 +440 +441 +441 +442 +442 +443 +443 +444 +444 +445 +445 +446 +446 +447 +447 +448 +448 +449 +449 +450 +450 +451 +451 +452 +452 +453 +453 +454 +454 +455 +455 +456 +456 +457 +457 +458 +458 +459 +459 +460 +460 +461 +461 +462 +462 +463 +463 +464 +464 +465 +465 +466 +466 +467 +467 +468 +468 +469 +469 +470 +470 +471 +471 +472 +472 +473 +473 +474 +474 +475 +475 +476 +476 +477 +477 +478 +478 +479 +480 +480 +481 +481 +482 +482 +483 +483 +484 +484 +485 +485 +486 +486 +487 +487 +488 +488 +489 +489 +490 +490 +491 +491 +492 +492 +493 +493 +494 +494 +495 +495 +496 +496 +497 +497 +498 +498 +499 +499 +500 +500 +501 +501 +502 +502 +503 +503 +504 +504 +505 +505 +506 +506 +507 +507 +508 +508 +509 +509 +510 +510 +511 +511 +512 +512 +513 +513 +514 +514 +515 +515 +516 +516 +517 +517 +518 +518 +519 +519 +520 +520 +521 +521 +522 +522 +523 +523 +524 +524 +525 +525 +526 +526 +527 +527 +528 +528 +529 +529 +530 +530 +531 +531 +532 +532 +533 +533 +534 +534 +535 +535 +536 +536 +537 +537 +538 +538 +539 +540 +540 +541 +541 +542 +542 +543 +543 +544 +544 +545 +545 +546 +546 +547 +547 +548 +548 +549 +549 +550 +550 +551 +551 +552 +552 +553 +553 +554 +554 +555 +555 +556 +556 +557 +557 +558 +558 +559 +559 +560 +560 +561 +561 +562 +562 +563 +563 +564 +564 +565 +565 +566 +566 +567 +567 +568 +568 +569 +569 +570 +570 +571 +571 +572 +572 +573 +573 +574 +574 +575 +575 +576 +576 +577 +577 +578 +578 +579 +579 +580 +580 +581 +581 +582 +582 +583 +583 +584 +584 +585 +585 +586 +586 +587 +587 +588 +588 +589 +589 +590 +590 +591 +591 +592 +592 +593 +593 +594 +594 +595 +595 +596 +596 +597 +597 +598 +598 +599 +600 +600 +601 +601 +602 +602 +603 +603 +604 +604 +605 +605 +606 +606 +607 +607 +608 +608 +609 +609 +610 +610 +611 +611 +612 +612 +613 +613 +614 +614 +615 +615 +616 +616 +617 +617 +618 +618 +619 +619 +620 +620 +621 +621 +622 +622 +623 +623 +624 +624 +625 +625 +626 +626 +627 +627 +628 +628 +629 +629 +630 +630 +631 +631 +632 +632 +633 +633 +634 +634 +635 +635 +636 +636 +637 +637 +638 +638 +639 +639 +640 +640 +641 +641 +642 +642 +643 +643 +644 +644 +645 +645 +646 +646 +647 +647 +648 +648 +649 +649 +650 +650 +651 +651 +652 +652 +653 +653 +654 +654 +655 +655 +656 +656 +657 +657 +658 +658 +659 +660 +660 +661 +661 +662 +662 +663 +663 +664 +664 +665 +665 +666 +666 +667 +667 +668 +668 +669 +669 +670 +670 +671 +671 +672 +672 +673 +673 +674 +674 +675 +675 +676 +676 +677 +677 +678 +678 +679 +679 +680 +680 +681 +681 +682 +682 +683 +683 +684 +684 +685 +685 +686 +686 +687 +687 +688 +688 +689 +689 +690 +690 +691 +691 +692 +692 +693 +693 +694 +694 +695 +695 +696 +696 +697 +697 +698 +698 +699 +699 +700 +700 +701 +701 +702 +702 +703 +703 +704 +704 +705 +705 +706 +706 +707 +707 +708 +708 +709 +709 +710 +710 +711 +711 +712 +712 +713 +713 +714 +714 +715 +715 +716 +716 +717 +717 +718 +718 +719 +720 +720 +721 +721 +722 +722 +723 +723 +724 +724 +725 +725 +726 +726 +727 +727 +728 +728 +729 +729 +730 +730 +731 +731 +732 +732 +733 +733 +734 +734 +735 +735 +736 +736 +737 +737 +738 +738 +739 +739 +740 +740 +741 +741 +742 +742 +743 +743 +744 +744 +745 +745 +746 +746 +747 +747 +748 +748 +749 +749 +750 +750 +751 +751 +752 +752 +753 +753 +754 +754 +755 +755 +756 +756 +757 +757 +758 +758 +759 +759 +760 +760 +761 +761 +762 +762 +763 +763 +764 +764 +765 +765 +766 +766 +767 +767 +768 +768 +769 +769 +770 +770 +771 +771 +772 +772 +773 +773 +774 +774 +775 +775 +776 +776 +777 +777 +778 +778 +779 +780 +780 +781 +781 +782 +782 +783 +783 +784 +784 +785 +785 +786 +786 +787 +787 +788 +788 +789 +789 +790 +790 +791 +791 +792 +792 +793 +793 +794 +794 +795 +795 +796 +796 +797 +797 +798 +798 +799 +799 +800 +800 +801 +801 +802 +802 +803 +803 +804 +804 +805 +805 +806 +806 +807 +807 +808 +808 +809 +809 +810 +810 +811 +811 +812 +812 +813 +813 +814 +814 +815 +815 +816 +816 +817 +817 +818 +818 +819 +819 +820 +820 +821 +821 +822 +822 +823 +823 +824 +824 +825 +825 +826 +826 +827 +827 +828 +828 +829 +829 +830 +830 +831 +831 +832 +832 +833 +833 +834 +834 +835 +835 +836 +836 +837 +837 +838 +838 +839 +840 +840 +841 +841 +842 +842 +843 +843 +844 +844 +845 +845 +846 +846 +847 +847 +848 +848 +849 +849 +850 +850 +851 +851 +852 +852 +853 +853 +854 +854 +855 +855 +856 +856 +857 +857 +858 +858 +859 +859 +860 +860 +861 +861 +862 +862 +863 +863 +864 +864 +865 +865 +866 +866 +867 +867 +868 +868 +869 +869 +870 +870 +871 +871 +872 +872 +873 +873 +874 +874 +875 +875 +876 +876 +877 +877 +878 +878 +879 +879 +880 +880 +881 +881 +882 +882 +883 +883 +884 +884 +885 +885 +886 +886 +887 +887 +888 +888 +889 +889 +890 +890 +891 +891 +892 +892 +893 +893 +894 +894 +895 +895 +896 +896 +897 +897 +898 +898 +899 +900 +900 +901 +901 +902 +902 +903 +903 +904 +904 +905 +905 +906 +906 +907 +907 +908 +908 +909 +909 +910 +910 +911 +911 +912 +912 +913 +913 +914 +914 +915 +915 +916 +916 +917 +917 +918 +918 +919 +919 +920 +920 +921 +921 +922 +922 +923 +923 +924 +924 +925 +925 +926 +926 +927 +927 +928 +928 +929 +929 +930 +930 +931 +931 +932 +932 +933 +933 +934 +934 +935 +935 +936 +936 +937 +937 +938 +938 +939 +939 +940 +940 +941 +941 +942 +942 +943 +943 +944 +944 +945 +945 +946 +946 +947 +947 +948 +948 +949 +949 +950 +950 +951 +951 +952 +952 +953 +953 +954 +954 +955 +955 +956 +956 +957 +957 +958 +958 +959 +960 +960 +961 +961 +962 +962 +963 +963 +964 +964 +965 +965 +966 +966 +967 +967 +968 +968 +969 +969 +970 +970 +971 +971 +972 +972 +973 +973 +974 +974 +975 +975 +976 +976 +977 +977 +978 +978 +979 +979 +980 +980 +981 +981 +982 +982 +983 +983 +984 +984 +985 +985 +986 +986 +987 +987 +988 +988 +989 +989 +990 +990 +991 +991 +992 +992 +993 +993 +994 +994 +995 +995 +996 +996 +997 +997 +998 +998 +999 +999 +1000 +1000 +1001 +1001 +1002 +1002 +1003 +1003 +1004 +1004 +1005 +1005 +1006 +1006 +1007 +1007 +1008 +1008 +1009 +1009 +1010 +1010 +1011 +1011 +1012 +1012 +1013 +1013 +1014 +1014 +1015 +1015 +1016 +1016 +1017 +1017 +1018 +1018 +1019 +1020 +1020 +1021 +1021 +1022 +1022 +1023 +1023 +1024 +1024 +1025 +1025 +1026 +1026 +1027 +1027 +1028 +1028 +1029 +1029 +1030 +1030 +1031 +1031 +1032 +1032 +1033 +1033 +1034 +1034 +1035 +1035 +1036 +1036 +1037 +1037 +1038 +1038 +1039 +1039 +1040 +1040 +1041 +1041 +1042 +1042 +1043 +1043 +1044 +1044 +1045 +1045 +1046 +1046 +1047 +1047 +1048 +1048 +1049 +1049 +1050 +1050 +1051 +1051 +1052 +1052 +1053 +1053 +1054 +1054 +1055 +1055 +1056 +1056 +1057 +1057 +1058 +1058 +1059 +1059 +1060 +1060 +1061 +1061 +1062 +1062 +1063 +1063 +1064 +1064 +1065 +1065 +1066 +1066 +1067 +1067 +1068 +1068 +1069 +1069 +1070 +1070 +1071 +1071 +1072 +1072 +1073 +1073 +1074 +1074 +1075 +1075 +1076 +1076 +1077 +1077 +1078 +1078 +1079 +1080 +1080 +1081 +1081 +1082 +1082 +1083 +1083 +1084 +1084 +1085 +1085 +1086 +1086 +1087 +1087 +1088 +1088 +1089 +1089 +1090 +1090 +1091 +1091 +1092 +1092 +1093 +1093 +1094 +1094 +1095 +1095 +1096 +1096 +1097 +1097 +1098 +1098 +1099 +1099 +1100 +1100 +1101 +1101 +1102 +1102 +1103 +1103 +1104 +1104 +1105 +1105 +1106 +1106 +1107 +1107 +1108 +1108 +1109 +1109 +1110 +1110 +1111 +1111 +1112 +1112 +1113 +1113 +1114 +1114 +1115 +1115 +1116 +1116 +1117 +1117 +1118 +1118 +1119 +1119 +1120 +1120 +1121 +1121 +1122 +1122 +1123 +1123 +1124 +1124 +1125 +1125 +1126 +1126 +1127 +1127 +1128 +1128 +1129 +1129 +1130 +1130 +1131 +1131 +1132 +1132 +1133 +1133 +1134 +1134 +1135 +1135 +1136 +1136 +1137 +1137 +1138 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +0 +60 +120 +180 +240 +300 +360 +420 +480 +540 +600 +660 +720 +780 +840 +900 +960 +1020 +1080 +1140 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +59 +119 +179 +239 +299 +359 +419 +479 +539 +599 +659 +719 +779 +839 +899 +959 +1019 +1079 +1139 +1199 +0 +60 +120 +180 +240 +300 +360 +420 +480 +540 +600 +660 +720 +780 +840 +900 +960 +1020 +1080 +1140 +1 +61 +121 +181 +241 +301 +361 +421 +481 +541 +601 +661 +721 +781 +841 +901 +961 +1021 +1081 +1141 +2 +62 +122 +182 +242 +302 +362 +422 +482 +542 +602 +662 +722 +782 +842 +902 +962 +1022 +1082 +1142 +3 +63 +123 +183 +243 +303 +363 +423 +483 +543 +603 +663 +723 +783 +843 +903 +963 +1023 +1083 +1143 +4 +64 +124 +184 +244 +304 +364 +424 +484 +544 +604 +664 +724 +784 +844 +904 +964 +1024 +1084 +1144 +5 +65 +125 +185 +245 +305 +365 +425 +485 +545 +605 +665 +725 +785 +845 +905 +965 +1025 +1085 +1145 +6 +66 +126 +186 +246 +306 +366 +426 +486 +546 +606 +666 +726 +786 +846 +906 +966 +1026 +1086 +1146 +7 +67 +127 +187 +247 +307 +367 +427 +487 +547 +607 +667 +727 +787 +847 +907 +967 +1027 +1087 +1147 +8 +68 +128 +188 +248 +308 +368 +428 +488 +548 +608 +668 +728 +788 +848 +908 +968 +1028 +1088 +1148 +9 +69 +129 +189 +249 +309 +369 +429 +489 +549 +609 +669 +729 +789 +849 +909 +969 +1029 +1089 +1149 +10 +70 +130 +190 +250 +310 +370 +430 +490 +550 +610 +670 +730 +790 +850 +910 +970 +1030 +1090 +1150 +11 +71 +131 +191 +251 +311 +371 +431 +491 +551 +611 +671 +731 +791 +851 +911 +971 +1031 +1091 +1151 +12 +72 +132 +192 +252 +312 +372 +432 +492 +552 +612 +672 +732 +792 +852 +912 +972 +1032 +1092 +1152 +13 +73 +133 +193 +253 +313 +373 +433 +493 +553 +613 +673 +733 +793 +853 +913 +973 +1033 +1093 +1153 +14 +74 +134 +194 +254 +314 +374 +434 +494 +554 +614 +674 +734 +794 +854 +914 +974 +1034 +1094 +1154 +15 +75 +135 +195 +255 +315 +375 +435 +495 +555 +615 +675 +735 +795 +855 +915 +975 +1035 +1095 +1155 +16 +76 +136 +196 +256 +316 +376 +436 +496 +556 +616 +676 +736 +796 +856 +916 +976 +1036 +1096 +1156 +17 +77 +137 +197 +257 +317 +377 +437 +497 +557 +617 +677 +737 +797 +857 +917 +977 +1037 +1097 +1157 +18 +78 +138 +198 +258 +318 +378 +438 +498 +558 +618 +678 +738 +798 +858 +918 +978 +1038 +1098 +1158 +19 +79 +139 +199 +259 +319 +379 +439 +499 +559 +619 +679 +739 +799 +859 +919 +979 +1039 +1099 +1159 +20 +80 +140 +200 +260 +320 +380 +440 +500 +560 +620 +680 +740 +800 +860 +920 +980 +1040 +1100 +1160 +21 +81 +141 +201 +261 +321 +381 +441 +501 +561 +621 +681 +741 +801 +861 +921 +981 +1041 +1101 +1161 +22 +82 +142 +202 +262 +322 +382 +442 +502 +562 +622 +682 +742 +802 +862 +922 +982 +1042 +1102 +1162 +23 +83 +143 +203 +263 +323 +383 +443 +503 +563 +623 +683 +743 +803 +863 +923 +983 +1043 +1103 +1163 +24 +84 +144 +204 +264 +324 +384 +444 +504 +564 +624 +684 +744 +804 +864 +924 +984 +1044 +1104 +1164 +25 +85 +145 +205 +265 +325 +385 +445 +505 +565 +625 +685 +745 +805 +865 +925 +985 +1045 +1105 +1165 +26 +86 +146 +206 +266 +326 +386 +446 +506 +566 +626 +686 +746 +806 +866 +926 +986 +1046 +1106 +1166 +27 +87 +147 +207 +267 +327 +387 +447 +507 +567 +627 +687 +747 +807 +867 +927 +987 +1047 +1107 +1167 +28 +88 +148 +208 +268 +328 +388 +448 +508 +568 +628 +688 +748 +808 +868 +928 +988 +1048 +1108 +1168 +29 +89 +149 +209 +269 +329 +389 +449 +509 +569 +629 +689 +749 +809 +869 +929 +989 +1049 +1109 +1169 +30 +90 +150 +210 +270 +330 +390 +450 +510 +570 +630 +690 +750 +810 +870 +930 +990 +1050 +1110 +1170 +31 +91 +151 +211 +271 +331 +391 +451 +511 +571 +631 +691 +751 +811 +871 +931 +991 +1051 +1111 +1171 +32 +92 +152 +212 +272 +332 +392 +452 +512 +572 +632 +692 +752 +812 +872 +932 +992 +1052 +1112 +1172 +33 +93 +153 +213 +273 +333 +393 +453 +513 +573 +633 +693 +753 +813 +873 +933 +993 +1053 +1113 +1173 +34 +94 +154 +214 +274 +334 +394 +454 +514 +574 +634 +694 +754 +814 +874 +934 +994 +1054 +1114 +1174 +35 +95 +155 +215 +275 +335 +395 +455 +515 +575 +635 +695 +755 +815 +875 +935 +995 +1055 +1115 +1175 +36 +96 +156 +216 +276 +336 +396 +456 +516 +576 +636 +696 +756 +816 +876 +936 +996 +1056 +1116 +1176 +37 +97 +157 +217 +277 +337 +397 +457 +517 +577 +637 +697 +757 +817 +877 +937 +997 +1057 +1117 +1177 +38 +98 +158 +218 +278 +338 +398 +458 +518 +578 +638 +698 +758 +818 +878 +938 +998 +1058 +1118 +1178 +39 +99 +159 +219 +279 +339 +399 +459 +519 +579 +639 +699 +759 +819 +879 +939 +999 +1059 +1119 +1179 +40 +100 +160 +220 +280 +340 +400 +460 +520 +580 +640 +700 +760 +820 +880 +940 +1000 +1060 +1120 +1180 +41 +101 +161 +221 +281 +341 +401 +461 +521 +581 +641 +701 +761 +821 +881 +941 +1001 +1061 +1121 +1181 +42 +102 +162 +222 +282 +342 +402 +462 +522 +582 +642 +702 +762 +822 +882 +942 +1002 +1062 +1122 +1182 +43 +103 +163 +223 +283 +343 +403 +463 +523 +583 +643 +703 +763 +823 +883 +943 +1003 +1063 +1123 +1183 +44 +104 +164 +224 +284 +344 +404 +464 +524 +584 +644 +704 +764 +824 +884 +944 +1004 +1064 +1124 +1184 +45 +105 +165 +225 +285 +345 +405 +465 +525 +585 +645 +705 +765 +825 +885 +945 +1005 +1065 +1125 +1185 +46 +106 +166 +226 +286 +346 +406 +466 +526 +586 +646 +706 +766 +826 +886 +946 +1006 +1066 +1126 +1186 +47 +107 +167 +227 +287 +347 +407 +467 +527 +587 +647 +707 +767 +827 +887 +947 +1007 +1067 +1127 +1187 +48 +108 +168 +228 +288 +348 +408 +468 +528 +588 +648 +708 +768 +828 +888 +948 +1008 +1068 +1128 +1188 +49 +109 +169 +229 +289 +349 +409 +469 +529 +589 +649 +709 +769 +829 +889 +949 +1009 +1069 +1129 +1189 +50 +110 +170 +230 +290 +350 +410 +470 +530 +590 +650 +710 +770 +830 +890 +950 +1010 +1070 +1130 +1190 +51 +111 +171 +231 +291 +351 +411 +471 +531 +591 +651 +711 +771 +831 +891 +951 +1011 +1071 +1131 +1191 +52 +112 +172 +232 +292 +352 +412 +472 +532 +592 +652 +712 +772 +832 +892 +952 +1012 +1072 +1132 +1192 +53 +113 +173 +233 +293 +353 +413 +473 +533 +593 +653 +713 +773 +833 +893 +953 +1013 +1073 +1133 +1193 +54 +114 +174 +234 +294 +354 +414 +474 +534 +594 +654 +714 +774 +834 +894 +954 +1014 +1074 +1134 +1194 +55 +115 +175 +235 +295 +355 +415 +475 +535 +595 +655 +715 +775 +835 +895 +955 +1015 +1075 +1135 +1195 +56 +116 +176 +236 +296 +356 +416 +476 +536 +596 +656 +716 +776 +836 +896 +956 +1016 +1076 +1136 +1196 +57 +117 +177 +237 +297 +357 +417 +477 +537 +597 +657 +717 +777 +837 +897 +957 +1017 +1077 +1137 +1197 +58 +118 +178 +238 +298 +358 +418 +478 +538 +598 +658 +718 +778 +838 +898 +958 +1018 +1078 +1138 +1198 +59 +119 +179 +239 +299 +359 +419 +479 +539 +599 +659 +719 +779 +839 +899 +959 +1019 +1079 +1139 +1199 +0 +60 +120 +180 +240 +300 +360 +420 +480 +540 +600 +660 +720 +780 +840 +900 +960 +1020 +1080 +1140 +1 +61 +121 +181 +241 +301 +361 +421 +481 +541 +601 +661 +721 +781 +841 +901 +961 +1021 +1081 +1141 +2 +62 +122 +182 +242 +302 +362 +422 +482 +542 +602 +662 +722 +782 +842 +902 +962 +1022 +1082 +1142 +3 +63 +123 +183 +243 +303 +363 +423 +483 +543 +603 +663 +723 +783 +843 +903 +963 +1023 +1083 +1143 +4 +64 +124 +184 +244 +304 +364 +424 +484 +544 +604 +664 +724 +784 +844 +904 +964 +1024 +1084 +1144 +5 +65 +125 +185 +245 +305 +365 +425 +485 +545 +605 +665 +725 +785 +845 +905 +965 +1025 +1085 +1145 +6 +66 +126 +186 +246 +306 +366 +426 +486 +546 +606 +666 +726 +786 +846 +906 +966 +1026 +1086 +1146 +7 +67 +127 +187 +247 +307 +367 +427 +487 +547 +607 +667 +727 +787 +847 +907 +967 +1027 +1087 +1147 +8 +68 +128 +188 +248 +308 +368 +428 +488 +548 +608 +668 +728 +788 +848 +908 +968 +1028 +1088 +1148 +9 +69 +129 +189 +249 +309 +369 +429 +489 +549 +609 +669 +729 +789 +849 +909 +969 +1029 +1089 +1149 +10 +70 +130 +190 +250 +310 +370 +430 +490 +550 +610 +670 +730 +790 +850 +910 +970 +1030 +1090 +1150 +11 +71 +131 +191 +251 +311 +371 +431 +491 +551 +611 +671 +731 +791 +851 +911 +971 +1031 +1091 +1151 +12 +72 +132 +192 +252 +312 +372 +432 +492 +552 +612 +672 +732 +792 +852 +912 +972 +1032 +1092 +1152 +13 +73 +133 +193 +253 +313 +373 +433 +493 +553 +613 +673 +733 +793 +853 +913 +973 +1033 +1093 +1153 +14 +74 +134 +194 +254 +314 +374 +434 +494 +554 +614 +674 +734 +794 +854 +914 +974 +1034 +1094 +1154 +15 +75 +135 +195 +255 +315 +375 +435 +495 +555 +615 +675 +735 +795 +855 +915 +975 +1035 +1095 +1155 +16 +76 +136 +196 +256 +316 +376 +436 +496 +556 +616 +676 +736 +796 +856 +916 +976 +1036 +1096 +1156 +17 +77 +137 +197 +257 +317 +377 +437 +497 +557 +617 +677 +737 +797 +857 +917 +977 +1037 +1097 +1157 +18 +78 +138 +198 +258 +318 +378 +438 +498 +558 +618 +678 +738 +798 +858 +918 +978 +1038 +1098 +1158 +19 +79 +139 +199 +259 +319 +379 +439 +499 +559 +619 +679 +739 +799 +859 +919 +979 +1039 +1099 +1159 +20 +80 +140 +200 +260 +320 +380 +440 +500 +560 +620 +680 +740 +800 +860 +920 +980 +1040 +1100 +1160 +21 +81 +141 +201 +261 +321 +381 +441 +501 +561 +621 +681 +741 +801 +861 +921 +981 +1041 +1101 +1161 +22 +82 +142 +202 +262 +322 +382 +442 +502 +562 +622 +682 +742 +802 +862 +922 +982 +1042 +1102 +1162 +23 +83 +143 +203 +263 +323 +383 +443 +503 +563 +623 +683 +743 +803 +863 +923 +983 +1043 +1103 +1163 +24 +84 +144 +204 +264 +324 +384 +444 +504 +564 +624 +684 +744 +804 +864 +924 +984 +1044 +1104 +1164 +25 +85 +145 +205 +265 +325 +385 +445 +505 +565 +625 +685 +745 +805 +865 +925 +985 +1045 +1105 +1165 +26 +86 +146 +206 +266 +326 +386 +446 +506 +566 +626 +686 +746 +806 +866 +926 +986 +1046 +1106 +1166 +27 +87 +147 +207 +267 +327 +387 +447 +507 +567 +627 +687 +747 +807 +867 +927 +987 +1047 +1107 +1167 +28 +88 +148 +208 +268 +328 +388 +448 +508 +568 +628 +688 +748 +808 +868 +928 +988 +1048 +1108 +1168 +29 +89 +149 +209 +269 +329 +389 +449 +509 +569 +629 +689 +749 +809 +869 +929 +989 +1049 +1109 +1169 +30 +90 +150 +210 +270 +330 +390 +450 +510 +570 +630 +690 +750 +810 +870 +930 +990 +1050 +1110 +1170 +31 +91 +151 +211 +271 +331 +391 +451 +511 +571 +631 +691 +751 +811 +871 +931 +991 +1051 +1111 +1171 +32 +92 +152 +212 +272 +332 +392 +452 +512 +572 +632 +692 +752 +812 +872 +932 +992 +1052 +1112 +1172 +33 +93 +153 +213 +273 +333 +393 +453 +513 +573 +633 +693 +753 +813 +873 +933 +993 +1053 +1113 +1173 +34 +94 +154 +214 +274 +334 +394 +454 +514 +574 +634 +694 +754 +814 +874 +934 +994 +1054 +1114 +1174 +35 +95 +155 +215 +275 +335 +395 +455 +515 +575 +635 +695 +755 +815 +875 +935 +995 +1055 +1115 +1175 +36 +96 +156 +216 +276 +336 +396 +456 +516 +576 +636 +696 +756 +816 +876 +936 +996 +1056 +1116 +1176 +37 +97 +157 +217 +277 +337 +397 +457 +517 +577 +637 +697 +757 +817 +877 +937 +997 +1057 +1117 +1177 +38 +98 +158 +218 +278 +338 +398 +458 +518 +578 +638 +698 +758 +818 +878 +938 +998 +1058 +1118 +1178 +39 +99 +159 +219 +279 +339 +399 +459 +519 +579 +639 +699 +759 +819 +879 +939 +999 +1059 +1119 +1179 +40 +100 +160 +220 +280 +340 +400 +460 +520 +580 +640 +700 +760 +820 +880 +940 +1000 +1060 +1120 +1180 +41 +101 +161 +221 +281 +341 +401 +461 +521 +581 +641 +701 +761 +821 +881 +941 +1001 +1061 +1121 +1181 +42 +102 +162 +222 +282 +342 +402 +462 +522 +582 +642 +702 +762 +822 +882 +942 +1002 +1062 +1122 +1182 +43 +103 +163 +223 +283 +343 +403 +463 +523 +583 +643 +703 +763 +823 +883 +943 +1003 +1063 +1123 +1183 +44 +104 +164 +224 +284 +344 +404 +464 +524 +584 +644 +704 +764 +824 +884 +944 +1004 +1064 +1124 +1184 +45 +105 +165 +225 +285 +345 +405 +465 +525 +585 +645 +705 +765 +825 +885 +945 +1005 +1065 +1125 +1185 +46 +106 +166 +226 +286 +346 +406 +466 +526 +586 +646 +706 +766 +826 +886 +946 +1006 +1066 +1126 +1186 +47 +107 +167 +227 +287 +347 +407 +467 +527 +587 +647 +707 +767 +827 +887 +947 +1007 +1067 +1127 +1187 +48 +108 +168 +228 +288 +348 +408 +468 +528 +588 +648 +708 +768 +828 +888 +948 +1008 +1068 +1128 +1188 +49 +109 +169 +229 +289 +349 +409 +469 +529 +589 +649 +709 +769 +829 +889 +949 +1009 +1069 +1129 +1189 +50 +110 +170 +230 +290 +350 +410 +470 +530 +590 +650 +710 +770 +830 +890 +950 +1010 +1070 +1130 +1190 +51 +111 +171 +231 +291 +351 +411 +471 +531 +591 +651 +711 +771 +831 +891 +951 +1011 +1071 +1131 +1191 +52 +112 +172 +232 +292 +352 +412 +472 +532 +592 +652 +712 +772 +832 +892 +952 +1012 +1072 +1132 +1192 +53 +113 +173 +233 +293 +353 +413 +473 +533 +593 +653 +713 +773 +833 +893 +953 +1013 +1073 +1133 +1193 +54 +114 +174 +234 +294 +354 +414 +474 +534 +594 +654 +714 +774 +834 +894 +954 +1014 +1074 +1134 +1194 +55 +115 +175 +235 +295 +355 +415 +475 +535 +595 +655 +715 +775 +835 +895 +955 +1015 +1075 +1135 +1195 +56 +116 +176 +236 +296 +356 +416 +476 +536 +596 +656 +716 +776 +836 +896 +956 +1016 +1076 +1136 +1196 +57 +117 +177 +237 +297 +357 +417 +477 +537 +597 +657 +717 +777 +837 +897 +957 +1017 +1077 +1137 +1197 +58 +118 +178 +238 +298 +358 +418 +478 +538 +598 +658 +718 +778 +838 +898 +958 +1018 +1078 +1138 +1198 +59 +119 +179 +239 +299 +359 +419 +479 +539 +599 +659 +719 +779 +839 +899 +959 +1019 +1079 +1139 +1199 +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/points b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/points new file mode 100644 index 0000000000000000000000000000000000000000..5b2dc730c36faa9f2da8cb4d7e56b6b4d2a11c70 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/polyMesh/points @@ -0,0 +1,2586 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class vectorField; + location "constant/polyMesh"; + object points; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +2562 +( +(0 0 0) +(0.005 0 0) +(0.01 0 0) +(0.015 0 0) +(0.02 0 0) +(0.025 0 0) +(0.03 0 0) +(0.035 0 0) +(0.04 0 0) +(0.045 0 0) +(0.05 0 0) +(0.055 0 0) +(0.06 0 0) +(0.065 0 0) +(0.07 0 0) +(0.075 0 0) +(0.08 0 0) +(0.085 0 0) +(0.09 0 0) +(0.095 0 0) +(0.1 0 0) +(0.105 0 0) +(0.11 0 0) +(0.115 0 0) +(0.12 0 0) +(0.125 0 0) +(0.13 0 0) +(0.135 0 0) +(0.14 0 0) +(0.145 0 0) +(0.15 0 0) +(0.155 0 0) +(0.16 0 0) +(0.165 0 0) +(0.17 0 0) +(0.175 0 0) +(0.18 0 0) +(0.185 0 0) +(0.19 0 0) +(0.195 0 0) +(0.2 0 0) +(0.205 0 0) +(0.21 0 0) +(0.215 0 0) +(0.22 0 0) +(0.225 0 0) +(0.23 0 0) +(0.235 0 0) +(0.24 0 0) +(0.245 0 0) +(0.25 0 0) +(0.255 0 0) +(0.26 0 0) +(0.265 0 0) +(0.27 0 0) +(0.275 0 0) +(0.28 0 0) +(0.285 0 0) +(0.29 0 0) +(0.295 0 0) +(0.3 0 0) +(0 0.005 0) +(0.005 0.005 0) +(0.01 0.005 0) +(0.015 0.005 0) +(0.02 0.005 0) +(0.025 0.005 0) +(0.03 0.005 0) +(0.035 0.005 0) +(0.04 0.005 0) +(0.045 0.005 0) +(0.05 0.005 0) +(0.055 0.005 0) +(0.06 0.005 0) +(0.065 0.005 0) +(0.07 0.005 0) +(0.075 0.005 0) +(0.08 0.005 0) +(0.085 0.005 0) +(0.09 0.005 0) +(0.095 0.005 0) +(0.1 0.005 0) +(0.105 0.005 0) +(0.11 0.005 0) +(0.115 0.005 0) +(0.12 0.005 0) +(0.125 0.005 0) +(0.13 0.005 0) +(0.135 0.005 0) +(0.14 0.005 0) +(0.145 0.005 0) +(0.15 0.005 0) +(0.155 0.005 0) +(0.16 0.005 0) +(0.165 0.005 0) +(0.17 0.005 0) +(0.175 0.005 0) +(0.18 0.005 0) +(0.185 0.005 0) +(0.19 0.005 0) +(0.195 0.005 0) +(0.2 0.005 0) +(0.205 0.005 0) +(0.21 0.005 0) +(0.215 0.005 0) +(0.22 0.005 0) +(0.225 0.005 0) +(0.23 0.005 0) +(0.235 0.005 0) +(0.24 0.005 0) +(0.245 0.005 0) +(0.25 0.005 0) +(0.255 0.005 0) +(0.26 0.005 0) +(0.265 0.005 0) +(0.27 0.005 0) +(0.275 0.005 0) +(0.28 0.005 0) +(0.285 0.005 0) +(0.29 0.005 0) +(0.295 0.005 0) +(0.3 0.005 0) +(0 0.01 0) +(0.005 0.01 0) +(0.01 0.01 0) +(0.015 0.01 0) +(0.02 0.01 0) +(0.025 0.01 0) +(0.03 0.01 0) +(0.035 0.01 0) +(0.04 0.01 0) +(0.045 0.01 0) +(0.05 0.01 0) +(0.055 0.01 0) +(0.06 0.01 0) +(0.065 0.01 0) +(0.07 0.01 0) +(0.075 0.01 0) +(0.08 0.01 0) +(0.085 0.01 0) +(0.09 0.01 0) +(0.095 0.01 0) +(0.1 0.01 0) +(0.105 0.01 0) +(0.11 0.01 0) +(0.115 0.01 0) +(0.12 0.01 0) +(0.125 0.01 0) +(0.13 0.01 0) +(0.135 0.01 0) +(0.14 0.01 0) +(0.145 0.01 0) +(0.15 0.01 0) +(0.155 0.01 0) +(0.16 0.01 0) +(0.165 0.01 0) +(0.17 0.01 0) +(0.175 0.01 0) +(0.18 0.01 0) +(0.185 0.01 0) +(0.19 0.01 0) +(0.195 0.01 0) +(0.2 0.01 0) +(0.205 0.01 0) +(0.21 0.01 0) +(0.215 0.01 0) +(0.22 0.01 0) +(0.225 0.01 0) +(0.23 0.01 0) +(0.235 0.01 0) +(0.24 0.01 0) +(0.245 0.01 0) +(0.25 0.01 0) +(0.255 0.01 0) +(0.26 0.01 0) +(0.265 0.01 0) +(0.27 0.01 0) +(0.275 0.01 0) +(0.28 0.01 0) +(0.285 0.01 0) +(0.29 0.01 0) +(0.295 0.01 0) +(0.3 0.01 0) +(0 0.015 0) +(0.005 0.015 0) +(0.01 0.015 0) +(0.015 0.015 0) +(0.02 0.015 0) +(0.025 0.015 0) +(0.03 0.015 0) +(0.035 0.015 0) +(0.04 0.015 0) +(0.045 0.015 0) +(0.05 0.015 0) +(0.055 0.015 0) +(0.06 0.015 0) +(0.065 0.015 0) +(0.07 0.015 0) +(0.075 0.015 0) +(0.08 0.015 0) +(0.085 0.015 0) +(0.09 0.015 0) +(0.095 0.015 0) +(0.1 0.015 0) +(0.105 0.015 0) +(0.11 0.015 0) +(0.115 0.015 0) +(0.12 0.015 0) +(0.125 0.015 0) +(0.13 0.015 0) +(0.135 0.015 0) +(0.14 0.015 0) +(0.145 0.015 0) +(0.15 0.015 0) +(0.155 0.015 0) +(0.16 0.015 0) +(0.165 0.015 0) +(0.17 0.015 0) +(0.175 0.015 0) +(0.18 0.015 0) +(0.185 0.015 0) +(0.19 0.015 0) +(0.195 0.015 0) +(0.2 0.015 0) +(0.205 0.015 0) +(0.21 0.015 0) +(0.215 0.015 0) +(0.22 0.015 0) +(0.225 0.015 0) +(0.23 0.015 0) +(0.235 0.015 0) +(0.24 0.015 0) +(0.245 0.015 0) +(0.25 0.015 0) +(0.255 0.015 0) +(0.26 0.015 0) +(0.265 0.015 0) +(0.27 0.015 0) +(0.275 0.015 0) +(0.28 0.015 0) +(0.285 0.015 0) +(0.29 0.015 0) +(0.295 0.015 0) +(0.3 0.015 0) +(0 0.02 0) +(0.005 0.02 0) +(0.01 0.02 0) +(0.015 0.02 0) +(0.02 0.02 0) +(0.025 0.02 0) +(0.03 0.02 0) +(0.035 0.02 0) +(0.04 0.02 0) +(0.045 0.02 0) +(0.05 0.02 0) +(0.055 0.02 0) +(0.06 0.02 0) +(0.065 0.02 0) +(0.07 0.02 0) +(0.075 0.02 0) +(0.08 0.02 0) +(0.085 0.02 0) +(0.09 0.02 0) +(0.095 0.02 0) +(0.1 0.02 0) +(0.105 0.02 0) +(0.11 0.02 0) +(0.115 0.02 0) +(0.12 0.02 0) +(0.125 0.02 0) +(0.13 0.02 0) +(0.135 0.02 0) +(0.14 0.02 0) +(0.145 0.02 0) +(0.15 0.02 0) +(0.155 0.02 0) +(0.16 0.02 0) +(0.165 0.02 0) +(0.17 0.02 0) +(0.175 0.02 0) +(0.18 0.02 0) +(0.185 0.02 0) +(0.19 0.02 0) +(0.195 0.02 0) +(0.2 0.02 0) +(0.205 0.02 0) +(0.21 0.02 0) +(0.215 0.02 0) +(0.22 0.02 0) +(0.225 0.02 0) +(0.23 0.02 0) +(0.235 0.02 0) +(0.24 0.02 0) +(0.245 0.02 0) +(0.25 0.02 0) +(0.255 0.02 0) +(0.26 0.02 0) +(0.265 0.02 0) +(0.27 0.02 0) +(0.275 0.02 0) +(0.28 0.02 0) +(0.285 0.02 0) +(0.29 0.02 0) +(0.295 0.02 0) +(0.3 0.02 0) +(0 0.025 0) +(0.005 0.025 0) +(0.01 0.025 0) +(0.015 0.025 0) +(0.02 0.025 0) +(0.025 0.025 0) +(0.03 0.025 0) +(0.035 0.025 0) +(0.04 0.025 0) +(0.045 0.025 0) +(0.05 0.025 0) +(0.055 0.025 0) +(0.06 0.025 0) +(0.065 0.025 0) +(0.07 0.025 0) +(0.075 0.025 0) +(0.08 0.025 0) +(0.085 0.025 0) +(0.09 0.025 0) +(0.095 0.025 0) +(0.1 0.025 0) +(0.105 0.025 0) +(0.11 0.025 0) +(0.115 0.025 0) +(0.12 0.025 0) +(0.125 0.025 0) +(0.13 0.025 0) +(0.135 0.025 0) +(0.14 0.025 0) +(0.145 0.025 0) +(0.15 0.025 0) +(0.155 0.025 0) +(0.16 0.025 0) +(0.165 0.025 0) +(0.17 0.025 0) +(0.175 0.025 0) +(0.18 0.025 0) +(0.185 0.025 0) +(0.19 0.025 0) +(0.195 0.025 0) +(0.2 0.025 0) +(0.205 0.025 0) +(0.21 0.025 0) +(0.215 0.025 0) +(0.22 0.025 0) +(0.225 0.025 0) +(0.23 0.025 0) +(0.235 0.025 0) +(0.24 0.025 0) +(0.245 0.025 0) +(0.25 0.025 0) +(0.255 0.025 0) +(0.26 0.025 0) +(0.265 0.025 0) +(0.27 0.025 0) +(0.275 0.025 0) +(0.28 0.025 0) +(0.285 0.025 0) +(0.29 0.025 0) +(0.295 0.025 0) +(0.3 0.025 0) +(0 0.03 0) +(0.005 0.03 0) +(0.01 0.03 0) +(0.015 0.03 0) +(0.02 0.03 0) +(0.025 0.03 0) +(0.03 0.03 0) +(0.035 0.03 0) +(0.04 0.03 0) +(0.045 0.03 0) +(0.05 0.03 0) +(0.055 0.03 0) +(0.06 0.03 0) +(0.065 0.03 0) +(0.07 0.03 0) +(0.075 0.03 0) +(0.08 0.03 0) +(0.085 0.03 0) +(0.09 0.03 0) +(0.095 0.03 0) +(0.1 0.03 0) +(0.105 0.03 0) +(0.11 0.03 0) +(0.115 0.03 0) +(0.12 0.03 0) +(0.125 0.03 0) +(0.13 0.03 0) +(0.135 0.03 0) +(0.14 0.03 0) +(0.145 0.03 0) +(0.15 0.03 0) +(0.155 0.03 0) +(0.16 0.03 0) +(0.165 0.03 0) +(0.17 0.03 0) +(0.175 0.03 0) +(0.18 0.03 0) +(0.185 0.03 0) +(0.19 0.03 0) +(0.195 0.03 0) +(0.2 0.03 0) +(0.205 0.03 0) +(0.21 0.03 0) +(0.215 0.03 0) +(0.22 0.03 0) +(0.225 0.03 0) +(0.23 0.03 0) +(0.235 0.03 0) +(0.24 0.03 0) +(0.245 0.03 0) +(0.25 0.03 0) +(0.255 0.03 0) +(0.26 0.03 0) +(0.265 0.03 0) +(0.27 0.03 0) +(0.275 0.03 0) +(0.28 0.03 0) +(0.285 0.03 0) +(0.29 0.03 0) +(0.295 0.03 0) +(0.3 0.03 0) +(0 0.035 0) +(0.005 0.035 0) +(0.01 0.035 0) +(0.015 0.035 0) +(0.02 0.035 0) +(0.025 0.035 0) +(0.03 0.035 0) +(0.035 0.035 0) +(0.04 0.035 0) +(0.045 0.035 0) +(0.05 0.035 0) +(0.055 0.035 0) +(0.06 0.035 0) +(0.065 0.035 0) +(0.07 0.035 0) +(0.075 0.035 0) +(0.08 0.035 0) +(0.085 0.035 0) +(0.09 0.035 0) +(0.095 0.035 0) +(0.1 0.035 0) +(0.105 0.035 0) +(0.11 0.035 0) +(0.115 0.035 0) +(0.12 0.035 0) +(0.125 0.035 0) +(0.13 0.035 0) +(0.135 0.035 0) +(0.14 0.035 0) +(0.145 0.035 0) +(0.15 0.035 0) +(0.155 0.035 0) +(0.16 0.035 0) +(0.165 0.035 0) +(0.17 0.035 0) +(0.175 0.035 0) +(0.18 0.035 0) +(0.185 0.035 0) +(0.19 0.035 0) +(0.195 0.035 0) +(0.2 0.035 0) +(0.205 0.035 0) +(0.21 0.035 0) +(0.215 0.035 0) +(0.22 0.035 0) +(0.225 0.035 0) +(0.23 0.035 0) +(0.235 0.035 0) +(0.24 0.035 0) +(0.245 0.035 0) +(0.25 0.035 0) +(0.255 0.035 0) +(0.26 0.035 0) +(0.265 0.035 0) +(0.27 0.035 0) +(0.275 0.035 0) +(0.28 0.035 0) +(0.285 0.035 0) +(0.29 0.035 0) +(0.295 0.035 0) +(0.3 0.035 0) +(0 0.04 0) +(0.005 0.04 0) +(0.01 0.04 0) +(0.015 0.04 0) +(0.02 0.04 0) +(0.025 0.04 0) +(0.03 0.04 0) +(0.035 0.04 0) +(0.04 0.04 0) +(0.045 0.04 0) +(0.05 0.04 0) +(0.055 0.04 0) +(0.06 0.04 0) +(0.065 0.04 0) +(0.07 0.04 0) +(0.075 0.04 0) +(0.08 0.04 0) +(0.085 0.04 0) +(0.09 0.04 0) +(0.095 0.04 0) +(0.1 0.04 0) +(0.105 0.04 0) +(0.11 0.04 0) +(0.115 0.04 0) +(0.12 0.04 0) +(0.125 0.04 0) +(0.13 0.04 0) +(0.135 0.04 0) +(0.14 0.04 0) +(0.145 0.04 0) +(0.15 0.04 0) +(0.155 0.04 0) +(0.16 0.04 0) +(0.165 0.04 0) +(0.17 0.04 0) +(0.175 0.04 0) +(0.18 0.04 0) +(0.185 0.04 0) +(0.19 0.04 0) +(0.195 0.04 0) +(0.2 0.04 0) +(0.205 0.04 0) +(0.21 0.04 0) +(0.215 0.04 0) +(0.22 0.04 0) +(0.225 0.04 0) +(0.23 0.04 0) +(0.235 0.04 0) +(0.24 0.04 0) +(0.245 0.04 0) +(0.25 0.04 0) +(0.255 0.04 0) +(0.26 0.04 0) +(0.265 0.04 0) +(0.27 0.04 0) +(0.275 0.04 0) +(0.28 0.04 0) +(0.285 0.04 0) +(0.29 0.04 0) +(0.295 0.04 0) +(0.3 0.04 0) +(0 0.045 0) +(0.005 0.045 0) +(0.01 0.045 0) +(0.015 0.045 0) +(0.02 0.045 0) +(0.025 0.045 0) +(0.03 0.045 0) +(0.035 0.045 0) +(0.04 0.045 0) +(0.045 0.045 0) +(0.05 0.045 0) +(0.055 0.045 0) +(0.06 0.045 0) +(0.065 0.045 0) +(0.07 0.045 0) +(0.075 0.045 0) +(0.08 0.045 0) +(0.085 0.045 0) +(0.09 0.045 0) +(0.095 0.045 0) +(0.1 0.045 0) +(0.105 0.045 0) +(0.11 0.045 0) +(0.115 0.045 0) +(0.12 0.045 0) +(0.125 0.045 0) +(0.13 0.045 0) +(0.135 0.045 0) +(0.14 0.045 0) +(0.145 0.045 0) +(0.15 0.045 0) +(0.155 0.045 0) +(0.16 0.045 0) +(0.165 0.045 0) +(0.17 0.045 0) +(0.175 0.045 0) +(0.18 0.045 0) +(0.185 0.045 0) +(0.19 0.045 0) +(0.195 0.045 0) +(0.2 0.045 0) +(0.205 0.045 0) +(0.21 0.045 0) +(0.215 0.045 0) +(0.22 0.045 0) +(0.225 0.045 0) +(0.23 0.045 0) +(0.235 0.045 0) +(0.24 0.045 0) +(0.245 0.045 0) +(0.25 0.045 0) +(0.255 0.045 0) +(0.26 0.045 0) +(0.265 0.045 0) +(0.27 0.045 0) +(0.275 0.045 0) +(0.28 0.045 0) +(0.285 0.045 0) +(0.29 0.045 0) +(0.295 0.045 0) +(0.3 0.045 0) +(0 0.05 0) +(0.005 0.05 0) +(0.01 0.05 0) +(0.015 0.05 0) +(0.02 0.05 0) +(0.025 0.05 0) +(0.03 0.05 0) +(0.035 0.05 0) +(0.04 0.05 0) +(0.045 0.05 0) +(0.05 0.05 0) +(0.055 0.05 0) +(0.06 0.05 0) +(0.065 0.05 0) +(0.07 0.05 0) +(0.075 0.05 0) +(0.08 0.05 0) +(0.085 0.05 0) +(0.09 0.05 0) +(0.095 0.05 0) +(0.1 0.05 0) +(0.105 0.05 0) +(0.11 0.05 0) +(0.115 0.05 0) +(0.12 0.05 0) +(0.125 0.05 0) +(0.13 0.05 0) +(0.135 0.05 0) +(0.14 0.05 0) +(0.145 0.05 0) +(0.15 0.05 0) +(0.155 0.05 0) +(0.16 0.05 0) +(0.165 0.05 0) +(0.17 0.05 0) +(0.175 0.05 0) +(0.18 0.05 0) +(0.185 0.05 0) +(0.19 0.05 0) +(0.195 0.05 0) +(0.2 0.05 0) +(0.205 0.05 0) +(0.21 0.05 0) +(0.215 0.05 0) +(0.22 0.05 0) +(0.225 0.05 0) +(0.23 0.05 0) +(0.235 0.05 0) +(0.24 0.05 0) +(0.245 0.05 0) +(0.25 0.05 0) +(0.255 0.05 0) +(0.26 0.05 0) +(0.265 0.05 0) +(0.27 0.05 0) +(0.275 0.05 0) +(0.28 0.05 0) +(0.285 0.05 0) +(0.29 0.05 0) +(0.295 0.05 0) +(0.3 0.05 0) +(0 0.055 0) +(0.005 0.055 0) +(0.01 0.055 0) +(0.015 0.055 0) +(0.02 0.055 0) +(0.025 0.055 0) +(0.03 0.055 0) +(0.035 0.055 0) +(0.04 0.055 0) +(0.045 0.055 0) +(0.05 0.055 0) +(0.055 0.055 0) +(0.06 0.055 0) +(0.065 0.055 0) +(0.07 0.055 0) +(0.075 0.055 0) +(0.08 0.055 0) +(0.085 0.055 0) +(0.09 0.055 0) +(0.095 0.055 0) +(0.1 0.055 0) +(0.105 0.055 0) +(0.11 0.055 0) +(0.115 0.055 0) +(0.12 0.055 0) +(0.125 0.055 0) +(0.13 0.055 0) +(0.135 0.055 0) +(0.14 0.055 0) +(0.145 0.055 0) +(0.15 0.055 0) +(0.155 0.055 0) +(0.16 0.055 0) +(0.165 0.055 0) +(0.17 0.055 0) +(0.175 0.055 0) +(0.18 0.055 0) +(0.185 0.055 0) +(0.19 0.055 0) +(0.195 0.055 0) +(0.2 0.055 0) +(0.205 0.055 0) +(0.21 0.055 0) +(0.215 0.055 0) +(0.22 0.055 0) +(0.225 0.055 0) +(0.23 0.055 0) +(0.235 0.055 0) +(0.24 0.055 0) +(0.245 0.055 0) +(0.25 0.055 0) +(0.255 0.055 0) +(0.26 0.055 0) +(0.265 0.055 0) +(0.27 0.055 0) +(0.275 0.055 0) +(0.28 0.055 0) +(0.285 0.055 0) +(0.29 0.055 0) +(0.295 0.055 0) +(0.3 0.055 0) +(0 0.06 0) +(0.005 0.06 0) +(0.01 0.06 0) +(0.015 0.06 0) +(0.02 0.06 0) +(0.025 0.06 0) +(0.03 0.06 0) +(0.035 0.06 0) +(0.04 0.06 0) +(0.045 0.06 0) +(0.05 0.06 0) +(0.055 0.06 0) +(0.06 0.06 0) +(0.065 0.06 0) +(0.07 0.06 0) +(0.075 0.06 0) +(0.08 0.06 0) +(0.085 0.06 0) +(0.09 0.06 0) +(0.095 0.06 0) +(0.1 0.06 0) +(0.105 0.06 0) +(0.11 0.06 0) +(0.115 0.06 0) +(0.12 0.06 0) +(0.125 0.06 0) +(0.13 0.06 0) +(0.135 0.06 0) +(0.14 0.06 0) +(0.145 0.06 0) +(0.15 0.06 0) +(0.155 0.06 0) +(0.16 0.06 0) +(0.165 0.06 0) +(0.17 0.06 0) +(0.175 0.06 0) +(0.18 0.06 0) +(0.185 0.06 0) +(0.19 0.06 0) +(0.195 0.06 0) +(0.2 0.06 0) +(0.205 0.06 0) +(0.21 0.06 0) +(0.215 0.06 0) +(0.22 0.06 0) +(0.225 0.06 0) +(0.23 0.06 0) +(0.235 0.06 0) +(0.24 0.06 0) +(0.245 0.06 0) +(0.25 0.06 0) +(0.255 0.06 0) +(0.26 0.06 0) +(0.265 0.06 0) +(0.27 0.06 0) +(0.275 0.06 0) +(0.28 0.06 0) +(0.285 0.06 0) +(0.29 0.06 0) +(0.295 0.06 0) +(0.3 0.06 0) +(0 0.065 0) +(0.005 0.065 0) +(0.01 0.065 0) +(0.015 0.065 0) +(0.02 0.065 0) +(0.025 0.065 0) +(0.03 0.065 0) +(0.035 0.065 0) +(0.04 0.065 0) +(0.045 0.065 0) +(0.05 0.065 0) +(0.055 0.065 0) +(0.06 0.065 0) +(0.065 0.065 0) +(0.07 0.065 0) +(0.075 0.065 0) +(0.08 0.065 0) +(0.085 0.065 0) +(0.09 0.065 0) +(0.095 0.065 0) +(0.1 0.065 0) +(0.105 0.065 0) +(0.11 0.065 0) +(0.115 0.065 0) +(0.12 0.065 0) +(0.125 0.065 0) +(0.13 0.065 0) +(0.135 0.065 0) +(0.14 0.065 0) +(0.145 0.065 0) +(0.15 0.065 0) +(0.155 0.065 0) +(0.16 0.065 0) +(0.165 0.065 0) +(0.17 0.065 0) +(0.175 0.065 0) +(0.18 0.065 0) +(0.185 0.065 0) +(0.19 0.065 0) +(0.195 0.065 0) +(0.2 0.065 0) +(0.205 0.065 0) +(0.21 0.065 0) +(0.215 0.065 0) +(0.22 0.065 0) +(0.225 0.065 0) +(0.23 0.065 0) +(0.235 0.065 0) +(0.24 0.065 0) +(0.245 0.065 0) +(0.25 0.065 0) +(0.255 0.065 0) +(0.26 0.065 0) +(0.265 0.065 0) +(0.27 0.065 0) +(0.275 0.065 0) +(0.28 0.065 0) +(0.285 0.065 0) +(0.29 0.065 0) +(0.295 0.065 0) +(0.3 0.065 0) +(0 0.07 0) +(0.005 0.07 0) +(0.01 0.07 0) +(0.015 0.07 0) +(0.02 0.07 0) +(0.025 0.07 0) +(0.03 0.07 0) +(0.035 0.07 0) +(0.04 0.07 0) +(0.045 0.07 0) +(0.05 0.07 0) +(0.055 0.07 0) +(0.06 0.07 0) +(0.065 0.07 0) +(0.07 0.07 0) +(0.075 0.07 0) +(0.08 0.07 0) +(0.085 0.07 0) +(0.09 0.07 0) +(0.095 0.07 0) +(0.1 0.07 0) +(0.105 0.07 0) +(0.11 0.07 0) +(0.115 0.07 0) +(0.12 0.07 0) +(0.125 0.07 0) +(0.13 0.07 0) +(0.135 0.07 0) +(0.14 0.07 0) +(0.145 0.07 0) +(0.15 0.07 0) +(0.155 0.07 0) +(0.16 0.07 0) +(0.165 0.07 0) +(0.17 0.07 0) +(0.175 0.07 0) +(0.18 0.07 0) +(0.185 0.07 0) +(0.19 0.07 0) +(0.195 0.07 0) +(0.2 0.07 0) +(0.205 0.07 0) +(0.21 0.07 0) +(0.215 0.07 0) +(0.22 0.07 0) +(0.225 0.07 0) +(0.23 0.07 0) +(0.235 0.07 0) +(0.24 0.07 0) +(0.245 0.07 0) +(0.25 0.07 0) +(0.255 0.07 0) +(0.26 0.07 0) +(0.265 0.07 0) +(0.27 0.07 0) +(0.275 0.07 0) +(0.28 0.07 0) +(0.285 0.07 0) +(0.29 0.07 0) +(0.295 0.07 0) +(0.3 0.07 0) +(0 0.075 0) +(0.005 0.075 0) +(0.01 0.075 0) +(0.015 0.075 0) +(0.02 0.075 0) +(0.025 0.075 0) +(0.03 0.075 0) +(0.035 0.075 0) +(0.04 0.075 0) +(0.045 0.075 0) +(0.05 0.075 0) +(0.055 0.075 0) +(0.06 0.075 0) +(0.065 0.075 0) +(0.07 0.075 0) +(0.075 0.075 0) +(0.08 0.075 0) +(0.085 0.075 0) +(0.09 0.075 0) +(0.095 0.075 0) +(0.1 0.075 0) +(0.105 0.075 0) +(0.11 0.075 0) +(0.115 0.075 0) +(0.12 0.075 0) +(0.125 0.075 0) +(0.13 0.075 0) +(0.135 0.075 0) +(0.14 0.075 0) +(0.145 0.075 0) +(0.15 0.075 0) +(0.155 0.075 0) +(0.16 0.075 0) +(0.165 0.075 0) +(0.17 0.075 0) +(0.175 0.075 0) +(0.18 0.075 0) +(0.185 0.075 0) +(0.19 0.075 0) +(0.195 0.075 0) +(0.2 0.075 0) +(0.205 0.075 0) +(0.21 0.075 0) +(0.215 0.075 0) +(0.22 0.075 0) +(0.225 0.075 0) +(0.23 0.075 0) +(0.235 0.075 0) +(0.24 0.075 0) +(0.245 0.075 0) +(0.25 0.075 0) +(0.255 0.075 0) +(0.26 0.075 0) +(0.265 0.075 0) +(0.27 0.075 0) +(0.275 0.075 0) +(0.28 0.075 0) +(0.285 0.075 0) +(0.29 0.075 0) +(0.295 0.075 0) +(0.3 0.075 0) +(0 0.08 0) +(0.005 0.08 0) +(0.01 0.08 0) +(0.015 0.08 0) +(0.02 0.08 0) +(0.025 0.08 0) +(0.03 0.08 0) +(0.035 0.08 0) +(0.04 0.08 0) +(0.045 0.08 0) +(0.05 0.08 0) +(0.055 0.08 0) +(0.06 0.08 0) +(0.065 0.08 0) +(0.07 0.08 0) +(0.075 0.08 0) +(0.08 0.08 0) +(0.085 0.08 0) +(0.09 0.08 0) +(0.095 0.08 0) +(0.1 0.08 0) +(0.105 0.08 0) +(0.11 0.08 0) +(0.115 0.08 0) +(0.12 0.08 0) +(0.125 0.08 0) +(0.13 0.08 0) +(0.135 0.08 0) +(0.14 0.08 0) +(0.145 0.08 0) +(0.15 0.08 0) +(0.155 0.08 0) +(0.16 0.08 0) +(0.165 0.08 0) +(0.17 0.08 0) +(0.175 0.08 0) +(0.18 0.08 0) +(0.185 0.08 0) +(0.19 0.08 0) +(0.195 0.08 0) +(0.2 0.08 0) +(0.205 0.08 0) +(0.21 0.08 0) +(0.215 0.08 0) +(0.22 0.08 0) +(0.225 0.08 0) +(0.23 0.08 0) +(0.235 0.08 0) +(0.24 0.08 0) +(0.245 0.08 0) +(0.25 0.08 0) +(0.255 0.08 0) +(0.26 0.08 0) +(0.265 0.08 0) +(0.27 0.08 0) +(0.275 0.08 0) +(0.28 0.08 0) +(0.285 0.08 0) +(0.29 0.08 0) +(0.295 0.08 0) +(0.3 0.08 0) +(0 0.085 0) +(0.005 0.085 0) +(0.01 0.085 0) +(0.015 0.085 0) +(0.02 0.085 0) +(0.025 0.085 0) +(0.03 0.085 0) +(0.035 0.085 0) +(0.04 0.085 0) +(0.045 0.085 0) +(0.05 0.085 0) +(0.055 0.085 0) +(0.06 0.085 0) +(0.065 0.085 0) +(0.07 0.085 0) +(0.075 0.085 0) +(0.08 0.085 0) +(0.085 0.085 0) +(0.09 0.085 0) +(0.095 0.085 0) +(0.1 0.085 0) +(0.105 0.085 0) +(0.11 0.085 0) +(0.115 0.085 0) +(0.12 0.085 0) +(0.125 0.085 0) +(0.13 0.085 0) +(0.135 0.085 0) +(0.14 0.085 0) +(0.145 0.085 0) +(0.15 0.085 0) +(0.155 0.085 0) +(0.16 0.085 0) +(0.165 0.085 0) +(0.17 0.085 0) +(0.175 0.085 0) +(0.18 0.085 0) +(0.185 0.085 0) +(0.19 0.085 0) +(0.195 0.085 0) +(0.2 0.085 0) +(0.205 0.085 0) +(0.21 0.085 0) +(0.215 0.085 0) +(0.22 0.085 0) +(0.225 0.085 0) +(0.23 0.085 0) +(0.235 0.085 0) +(0.24 0.085 0) +(0.245 0.085 0) +(0.25 0.085 0) +(0.255 0.085 0) +(0.26 0.085 0) +(0.265 0.085 0) +(0.27 0.085 0) +(0.275 0.085 0) +(0.28 0.085 0) +(0.285 0.085 0) +(0.29 0.085 0) +(0.295 0.085 0) +(0.3 0.085 0) +(0 0.09 0) +(0.005 0.09 0) +(0.01 0.09 0) +(0.015 0.09 0) +(0.02 0.09 0) +(0.025 0.09 0) +(0.03 0.09 0) +(0.035 0.09 0) +(0.04 0.09 0) +(0.045 0.09 0) +(0.05 0.09 0) +(0.055 0.09 0) +(0.06 0.09 0) +(0.065 0.09 0) +(0.07 0.09 0) +(0.075 0.09 0) +(0.08 0.09 0) +(0.085 0.09 0) +(0.09 0.09 0) +(0.095 0.09 0) +(0.1 0.09 0) +(0.105 0.09 0) +(0.11 0.09 0) +(0.115 0.09 0) +(0.12 0.09 0) +(0.125 0.09 0) +(0.13 0.09 0) +(0.135 0.09 0) +(0.14 0.09 0) +(0.145 0.09 0) +(0.15 0.09 0) +(0.155 0.09 0) +(0.16 0.09 0) +(0.165 0.09 0) +(0.17 0.09 0) +(0.175 0.09 0) +(0.18 0.09 0) +(0.185 0.09 0) +(0.19 0.09 0) +(0.195 0.09 0) +(0.2 0.09 0) +(0.205 0.09 0) +(0.21 0.09 0) +(0.215 0.09 0) +(0.22 0.09 0) +(0.225 0.09 0) +(0.23 0.09 0) +(0.235 0.09 0) +(0.24 0.09 0) +(0.245 0.09 0) +(0.25 0.09 0) +(0.255 0.09 0) +(0.26 0.09 0) +(0.265 0.09 0) +(0.27 0.09 0) +(0.275 0.09 0) +(0.28 0.09 0) +(0.285 0.09 0) +(0.29 0.09 0) +(0.295 0.09 0) +(0.3 0.09 0) +(0 0.095 0) +(0.005 0.095 0) +(0.01 0.095 0) +(0.015 0.095 0) +(0.02 0.095 0) +(0.025 0.095 0) +(0.03 0.095 0) +(0.035 0.095 0) +(0.04 0.095 0) +(0.045 0.095 0) +(0.05 0.095 0) +(0.055 0.095 0) +(0.06 0.095 0) +(0.065 0.095 0) +(0.07 0.095 0) +(0.075 0.095 0) +(0.08 0.095 0) +(0.085 0.095 0) +(0.09 0.095 0) +(0.095 0.095 0) +(0.1 0.095 0) +(0.105 0.095 0) +(0.11 0.095 0) +(0.115 0.095 0) +(0.12 0.095 0) +(0.125 0.095 0) +(0.13 0.095 0) +(0.135 0.095 0) +(0.14 0.095 0) +(0.145 0.095 0) +(0.15 0.095 0) +(0.155 0.095 0) +(0.16 0.095 0) +(0.165 0.095 0) +(0.17 0.095 0) +(0.175 0.095 0) +(0.18 0.095 0) +(0.185 0.095 0) +(0.19 0.095 0) +(0.195 0.095 0) +(0.2 0.095 0) +(0.205 0.095 0) +(0.21 0.095 0) +(0.215 0.095 0) +(0.22 0.095 0) +(0.225 0.095 0) +(0.23 0.095 0) +(0.235 0.095 0) +(0.24 0.095 0) +(0.245 0.095 0) +(0.25 0.095 0) +(0.255 0.095 0) +(0.26 0.095 0) +(0.265 0.095 0) +(0.27 0.095 0) +(0.275 0.095 0) +(0.28 0.095 0) +(0.285 0.095 0) +(0.29 0.095 0) +(0.295 0.095 0) +(0.3 0.095 0) +(0 0.1 0) +(0.005 0.1 0) +(0.01 0.1 0) +(0.015 0.1 0) +(0.02 0.1 0) +(0.025 0.1 0) +(0.03 0.1 0) +(0.035 0.1 0) +(0.04 0.1 0) +(0.045 0.1 0) +(0.05 0.1 0) +(0.055 0.1 0) +(0.06 0.1 0) +(0.065 0.1 0) +(0.07 0.1 0) +(0.075 0.1 0) +(0.08 0.1 0) +(0.085 0.1 0) +(0.09 0.1 0) +(0.095 0.1 0) +(0.1 0.1 0) +(0.105 0.1 0) +(0.11 0.1 0) +(0.115 0.1 0) +(0.12 0.1 0) +(0.125 0.1 0) +(0.13 0.1 0) +(0.135 0.1 0) +(0.14 0.1 0) +(0.145 0.1 0) +(0.15 0.1 0) +(0.155 0.1 0) +(0.16 0.1 0) +(0.165 0.1 0) +(0.17 0.1 0) +(0.175 0.1 0) +(0.18 0.1 0) +(0.185 0.1 0) +(0.19 0.1 0) +(0.195 0.1 0) +(0.2 0.1 0) +(0.205 0.1 0) +(0.21 0.1 0) +(0.215 0.1 0) +(0.22 0.1 0) +(0.225 0.1 0) +(0.23 0.1 0) +(0.235 0.1 0) +(0.24 0.1 0) +(0.245 0.1 0) +(0.25 0.1 0) +(0.255 0.1 0) +(0.26 0.1 0) +(0.265 0.1 0) +(0.27 0.1 0) +(0.275 0.1 0) +(0.28 0.1 0) +(0.285 0.1 0) +(0.29 0.1 0) +(0.295 0.1 0) +(0.3 0.1 0) +(0 0 0.01) +(0.005 0 0.01) +(0.01 0 0.01) +(0.015 0 0.01) +(0.02 0 0.01) +(0.025 0 0.01) +(0.03 0 0.01) +(0.035 0 0.01) +(0.04 0 0.01) +(0.045 0 0.01) +(0.05 0 0.01) +(0.055 0 0.01) +(0.06 0 0.01) +(0.065 0 0.01) +(0.07 0 0.01) +(0.075 0 0.01) +(0.08 0 0.01) +(0.085 0 0.01) +(0.09 0 0.01) +(0.095 0 0.01) +(0.1 0 0.01) +(0.105 0 0.01) +(0.11 0 0.01) +(0.115 0 0.01) +(0.12 0 0.01) +(0.125 0 0.01) +(0.13 0 0.01) +(0.135 0 0.01) +(0.14 0 0.01) +(0.145 0 0.01) +(0.15 0 0.01) +(0.155 0 0.01) +(0.16 0 0.01) +(0.165 0 0.01) +(0.17 0 0.01) +(0.175 0 0.01) +(0.18 0 0.01) +(0.185 0 0.01) +(0.19 0 0.01) +(0.195 0 0.01) +(0.2 0 0.01) +(0.205 0 0.01) +(0.21 0 0.01) +(0.215 0 0.01) +(0.22 0 0.01) +(0.225 0 0.01) +(0.23 0 0.01) +(0.235 0 0.01) +(0.24 0 0.01) +(0.245 0 0.01) +(0.25 0 0.01) +(0.255 0 0.01) +(0.26 0 0.01) +(0.265 0 0.01) +(0.27 0 0.01) +(0.275 0 0.01) +(0.28 0 0.01) +(0.285 0 0.01) +(0.29 0 0.01) +(0.295 0 0.01) +(0.3 0 0.01) +(0 0.005 0.01) +(0.005 0.005 0.01) +(0.01 0.005 0.01) +(0.015 0.005 0.01) +(0.02 0.005 0.01) +(0.025 0.005 0.01) +(0.03 0.005 0.01) +(0.035 0.005 0.01) +(0.04 0.005 0.01) +(0.045 0.005 0.01) +(0.05 0.005 0.01) +(0.055 0.005 0.01) +(0.06 0.005 0.01) +(0.065 0.005 0.01) +(0.07 0.005 0.01) +(0.075 0.005 0.01) +(0.08 0.005 0.01) +(0.085 0.005 0.01) +(0.09 0.005 0.01) +(0.095 0.005 0.01) +(0.1 0.005 0.01) +(0.105 0.005 0.01) +(0.11 0.005 0.01) +(0.115 0.005 0.01) +(0.12 0.005 0.01) +(0.125 0.005 0.01) +(0.13 0.005 0.01) +(0.135 0.005 0.01) +(0.14 0.005 0.01) +(0.145 0.005 0.01) +(0.15 0.005 0.01) +(0.155 0.005 0.01) +(0.16 0.005 0.01) +(0.165 0.005 0.01) +(0.17 0.005 0.01) +(0.175 0.005 0.01) +(0.18 0.005 0.01) +(0.185 0.005 0.01) +(0.19 0.005 0.01) +(0.195 0.005 0.01) +(0.2 0.005 0.01) +(0.205 0.005 0.01) +(0.21 0.005 0.01) +(0.215 0.005 0.01) +(0.22 0.005 0.01) +(0.225 0.005 0.01) +(0.23 0.005 0.01) +(0.235 0.005 0.01) +(0.24 0.005 0.01) +(0.245 0.005 0.01) +(0.25 0.005 0.01) +(0.255 0.005 0.01) +(0.26 0.005 0.01) +(0.265 0.005 0.01) +(0.27 0.005 0.01) +(0.275 0.005 0.01) +(0.28 0.005 0.01) +(0.285 0.005 0.01) +(0.29 0.005 0.01) +(0.295 0.005 0.01) +(0.3 0.005 0.01) +(0 0.01 0.01) +(0.005 0.01 0.01) +(0.01 0.01 0.01) +(0.015 0.01 0.01) +(0.02 0.01 0.01) +(0.025 0.01 0.01) +(0.03 0.01 0.01) +(0.035 0.01 0.01) +(0.04 0.01 0.01) +(0.045 0.01 0.01) +(0.05 0.01 0.01) +(0.055 0.01 0.01) +(0.06 0.01 0.01) +(0.065 0.01 0.01) +(0.07 0.01 0.01) +(0.075 0.01 0.01) +(0.08 0.01 0.01) +(0.085 0.01 0.01) +(0.09 0.01 0.01) +(0.095 0.01 0.01) +(0.1 0.01 0.01) +(0.105 0.01 0.01) +(0.11 0.01 0.01) +(0.115 0.01 0.01) +(0.12 0.01 0.01) +(0.125 0.01 0.01) +(0.13 0.01 0.01) +(0.135 0.01 0.01) +(0.14 0.01 0.01) +(0.145 0.01 0.01) +(0.15 0.01 0.01) +(0.155 0.01 0.01) +(0.16 0.01 0.01) +(0.165 0.01 0.01) +(0.17 0.01 0.01) +(0.175 0.01 0.01) +(0.18 0.01 0.01) +(0.185 0.01 0.01) +(0.19 0.01 0.01) +(0.195 0.01 0.01) +(0.2 0.01 0.01) +(0.205 0.01 0.01) +(0.21 0.01 0.01) +(0.215 0.01 0.01) +(0.22 0.01 0.01) +(0.225 0.01 0.01) +(0.23 0.01 0.01) +(0.235 0.01 0.01) +(0.24 0.01 0.01) +(0.245 0.01 0.01) +(0.25 0.01 0.01) +(0.255 0.01 0.01) +(0.26 0.01 0.01) +(0.265 0.01 0.01) +(0.27 0.01 0.01) +(0.275 0.01 0.01) +(0.28 0.01 0.01) +(0.285 0.01 0.01) +(0.29 0.01 0.01) +(0.295 0.01 0.01) +(0.3 0.01 0.01) +(0 0.015 0.01) +(0.005 0.015 0.01) +(0.01 0.015 0.01) +(0.015 0.015 0.01) +(0.02 0.015 0.01) +(0.025 0.015 0.01) +(0.03 0.015 0.01) +(0.035 0.015 0.01) +(0.04 0.015 0.01) +(0.045 0.015 0.01) +(0.05 0.015 0.01) +(0.055 0.015 0.01) +(0.06 0.015 0.01) +(0.065 0.015 0.01) +(0.07 0.015 0.01) +(0.075 0.015 0.01) +(0.08 0.015 0.01) +(0.085 0.015 0.01) +(0.09 0.015 0.01) +(0.095 0.015 0.01) +(0.1 0.015 0.01) +(0.105 0.015 0.01) +(0.11 0.015 0.01) +(0.115 0.015 0.01) +(0.12 0.015 0.01) +(0.125 0.015 0.01) +(0.13 0.015 0.01) +(0.135 0.015 0.01) +(0.14 0.015 0.01) +(0.145 0.015 0.01) +(0.15 0.015 0.01) +(0.155 0.015 0.01) +(0.16 0.015 0.01) +(0.165 0.015 0.01) +(0.17 0.015 0.01) +(0.175 0.015 0.01) +(0.18 0.015 0.01) +(0.185 0.015 0.01) +(0.19 0.015 0.01) +(0.195 0.015 0.01) +(0.2 0.015 0.01) +(0.205 0.015 0.01) +(0.21 0.015 0.01) +(0.215 0.015 0.01) +(0.22 0.015 0.01) +(0.225 0.015 0.01) +(0.23 0.015 0.01) +(0.235 0.015 0.01) +(0.24 0.015 0.01) +(0.245 0.015 0.01) +(0.25 0.015 0.01) +(0.255 0.015 0.01) +(0.26 0.015 0.01) +(0.265 0.015 0.01) +(0.27 0.015 0.01) +(0.275 0.015 0.01) +(0.28 0.015 0.01) +(0.285 0.015 0.01) +(0.29 0.015 0.01) +(0.295 0.015 0.01) +(0.3 0.015 0.01) +(0 0.02 0.01) +(0.005 0.02 0.01) +(0.01 0.02 0.01) +(0.015 0.02 0.01) +(0.02 0.02 0.01) +(0.025 0.02 0.01) +(0.03 0.02 0.01) +(0.035 0.02 0.01) +(0.04 0.02 0.01) +(0.045 0.02 0.01) +(0.05 0.02 0.01) +(0.055 0.02 0.01) +(0.06 0.02 0.01) +(0.065 0.02 0.01) +(0.07 0.02 0.01) +(0.075 0.02 0.01) +(0.08 0.02 0.01) +(0.085 0.02 0.01) +(0.09 0.02 0.01) +(0.095 0.02 0.01) +(0.1 0.02 0.01) +(0.105 0.02 0.01) +(0.11 0.02 0.01) +(0.115 0.02 0.01) +(0.12 0.02 0.01) +(0.125 0.02 0.01) +(0.13 0.02 0.01) +(0.135 0.02 0.01) +(0.14 0.02 0.01) +(0.145 0.02 0.01) +(0.15 0.02 0.01) +(0.155 0.02 0.01) +(0.16 0.02 0.01) +(0.165 0.02 0.01) +(0.17 0.02 0.01) +(0.175 0.02 0.01) +(0.18 0.02 0.01) +(0.185 0.02 0.01) +(0.19 0.02 0.01) +(0.195 0.02 0.01) +(0.2 0.02 0.01) +(0.205 0.02 0.01) +(0.21 0.02 0.01) +(0.215 0.02 0.01) +(0.22 0.02 0.01) +(0.225 0.02 0.01) +(0.23 0.02 0.01) +(0.235 0.02 0.01) +(0.24 0.02 0.01) +(0.245 0.02 0.01) +(0.25 0.02 0.01) +(0.255 0.02 0.01) +(0.26 0.02 0.01) +(0.265 0.02 0.01) +(0.27 0.02 0.01) +(0.275 0.02 0.01) +(0.28 0.02 0.01) +(0.285 0.02 0.01) +(0.29 0.02 0.01) +(0.295 0.02 0.01) +(0.3 0.02 0.01) +(0 0.025 0.01) +(0.005 0.025 0.01) +(0.01 0.025 0.01) +(0.015 0.025 0.01) +(0.02 0.025 0.01) +(0.025 0.025 0.01) +(0.03 0.025 0.01) +(0.035 0.025 0.01) +(0.04 0.025 0.01) +(0.045 0.025 0.01) +(0.05 0.025 0.01) +(0.055 0.025 0.01) +(0.06 0.025 0.01) +(0.065 0.025 0.01) +(0.07 0.025 0.01) +(0.075 0.025 0.01) +(0.08 0.025 0.01) +(0.085 0.025 0.01) +(0.09 0.025 0.01) +(0.095 0.025 0.01) +(0.1 0.025 0.01) +(0.105 0.025 0.01) +(0.11 0.025 0.01) +(0.115 0.025 0.01) +(0.12 0.025 0.01) +(0.125 0.025 0.01) +(0.13 0.025 0.01) +(0.135 0.025 0.01) +(0.14 0.025 0.01) +(0.145 0.025 0.01) +(0.15 0.025 0.01) +(0.155 0.025 0.01) +(0.16 0.025 0.01) +(0.165 0.025 0.01) +(0.17 0.025 0.01) +(0.175 0.025 0.01) +(0.18 0.025 0.01) +(0.185 0.025 0.01) +(0.19 0.025 0.01) +(0.195 0.025 0.01) +(0.2 0.025 0.01) +(0.205 0.025 0.01) +(0.21 0.025 0.01) +(0.215 0.025 0.01) +(0.22 0.025 0.01) +(0.225 0.025 0.01) +(0.23 0.025 0.01) +(0.235 0.025 0.01) +(0.24 0.025 0.01) +(0.245 0.025 0.01) +(0.25 0.025 0.01) +(0.255 0.025 0.01) +(0.26 0.025 0.01) +(0.265 0.025 0.01) +(0.27 0.025 0.01) +(0.275 0.025 0.01) +(0.28 0.025 0.01) +(0.285 0.025 0.01) +(0.29 0.025 0.01) +(0.295 0.025 0.01) +(0.3 0.025 0.01) +(0 0.03 0.01) +(0.005 0.03 0.01) +(0.01 0.03 0.01) +(0.015 0.03 0.01) +(0.02 0.03 0.01) +(0.025 0.03 0.01) +(0.03 0.03 0.01) +(0.035 0.03 0.01) +(0.04 0.03 0.01) +(0.045 0.03 0.01) +(0.05 0.03 0.01) +(0.055 0.03 0.01) +(0.06 0.03 0.01) +(0.065 0.03 0.01) +(0.07 0.03 0.01) +(0.075 0.03 0.01) +(0.08 0.03 0.01) +(0.085 0.03 0.01) +(0.09 0.03 0.01) +(0.095 0.03 0.01) +(0.1 0.03 0.01) +(0.105 0.03 0.01) +(0.11 0.03 0.01) +(0.115 0.03 0.01) +(0.12 0.03 0.01) +(0.125 0.03 0.01) +(0.13 0.03 0.01) +(0.135 0.03 0.01) +(0.14 0.03 0.01) +(0.145 0.03 0.01) +(0.15 0.03 0.01) +(0.155 0.03 0.01) +(0.16 0.03 0.01) +(0.165 0.03 0.01) +(0.17 0.03 0.01) +(0.175 0.03 0.01) +(0.18 0.03 0.01) +(0.185 0.03 0.01) +(0.19 0.03 0.01) +(0.195 0.03 0.01) +(0.2 0.03 0.01) +(0.205 0.03 0.01) +(0.21 0.03 0.01) +(0.215 0.03 0.01) +(0.22 0.03 0.01) +(0.225 0.03 0.01) +(0.23 0.03 0.01) +(0.235 0.03 0.01) +(0.24 0.03 0.01) +(0.245 0.03 0.01) +(0.25 0.03 0.01) +(0.255 0.03 0.01) +(0.26 0.03 0.01) +(0.265 0.03 0.01) +(0.27 0.03 0.01) +(0.275 0.03 0.01) +(0.28 0.03 0.01) +(0.285 0.03 0.01) +(0.29 0.03 0.01) +(0.295 0.03 0.01) +(0.3 0.03 0.01) +(0 0.035 0.01) +(0.005 0.035 0.01) +(0.01 0.035 0.01) +(0.015 0.035 0.01) +(0.02 0.035 0.01) +(0.025 0.035 0.01) +(0.03 0.035 0.01) +(0.035 0.035 0.01) +(0.04 0.035 0.01) +(0.045 0.035 0.01) +(0.05 0.035 0.01) +(0.055 0.035 0.01) +(0.06 0.035 0.01) +(0.065 0.035 0.01) +(0.07 0.035 0.01) +(0.075 0.035 0.01) +(0.08 0.035 0.01) +(0.085 0.035 0.01) +(0.09 0.035 0.01) +(0.095 0.035 0.01) +(0.1 0.035 0.01) +(0.105 0.035 0.01) +(0.11 0.035 0.01) +(0.115 0.035 0.01) +(0.12 0.035 0.01) +(0.125 0.035 0.01) +(0.13 0.035 0.01) +(0.135 0.035 0.01) +(0.14 0.035 0.01) +(0.145 0.035 0.01) +(0.15 0.035 0.01) +(0.155 0.035 0.01) +(0.16 0.035 0.01) +(0.165 0.035 0.01) +(0.17 0.035 0.01) +(0.175 0.035 0.01) +(0.18 0.035 0.01) +(0.185 0.035 0.01) +(0.19 0.035 0.01) +(0.195 0.035 0.01) +(0.2 0.035 0.01) +(0.205 0.035 0.01) +(0.21 0.035 0.01) +(0.215 0.035 0.01) +(0.22 0.035 0.01) +(0.225 0.035 0.01) +(0.23 0.035 0.01) +(0.235 0.035 0.01) +(0.24 0.035 0.01) +(0.245 0.035 0.01) +(0.25 0.035 0.01) +(0.255 0.035 0.01) +(0.26 0.035 0.01) +(0.265 0.035 0.01) +(0.27 0.035 0.01) +(0.275 0.035 0.01) +(0.28 0.035 0.01) +(0.285 0.035 0.01) +(0.29 0.035 0.01) +(0.295 0.035 0.01) +(0.3 0.035 0.01) +(0 0.04 0.01) +(0.005 0.04 0.01) +(0.01 0.04 0.01) +(0.015 0.04 0.01) +(0.02 0.04 0.01) +(0.025 0.04 0.01) +(0.03 0.04 0.01) +(0.035 0.04 0.01) +(0.04 0.04 0.01) +(0.045 0.04 0.01) +(0.05 0.04 0.01) +(0.055 0.04 0.01) +(0.06 0.04 0.01) +(0.065 0.04 0.01) +(0.07 0.04 0.01) +(0.075 0.04 0.01) +(0.08 0.04 0.01) +(0.085 0.04 0.01) +(0.09 0.04 0.01) +(0.095 0.04 0.01) +(0.1 0.04 0.01) +(0.105 0.04 0.01) +(0.11 0.04 0.01) +(0.115 0.04 0.01) +(0.12 0.04 0.01) +(0.125 0.04 0.01) +(0.13 0.04 0.01) +(0.135 0.04 0.01) +(0.14 0.04 0.01) +(0.145 0.04 0.01) +(0.15 0.04 0.01) +(0.155 0.04 0.01) +(0.16 0.04 0.01) +(0.165 0.04 0.01) +(0.17 0.04 0.01) +(0.175 0.04 0.01) +(0.18 0.04 0.01) +(0.185 0.04 0.01) +(0.19 0.04 0.01) +(0.195 0.04 0.01) +(0.2 0.04 0.01) +(0.205 0.04 0.01) +(0.21 0.04 0.01) +(0.215 0.04 0.01) +(0.22 0.04 0.01) +(0.225 0.04 0.01) +(0.23 0.04 0.01) +(0.235 0.04 0.01) +(0.24 0.04 0.01) +(0.245 0.04 0.01) +(0.25 0.04 0.01) +(0.255 0.04 0.01) +(0.26 0.04 0.01) +(0.265 0.04 0.01) +(0.27 0.04 0.01) +(0.275 0.04 0.01) +(0.28 0.04 0.01) +(0.285 0.04 0.01) +(0.29 0.04 0.01) +(0.295 0.04 0.01) +(0.3 0.04 0.01) +(0 0.045 0.01) +(0.005 0.045 0.01) +(0.01 0.045 0.01) +(0.015 0.045 0.01) +(0.02 0.045 0.01) +(0.025 0.045 0.01) +(0.03 0.045 0.01) +(0.035 0.045 0.01) +(0.04 0.045 0.01) +(0.045 0.045 0.01) +(0.05 0.045 0.01) +(0.055 0.045 0.01) +(0.06 0.045 0.01) +(0.065 0.045 0.01) +(0.07 0.045 0.01) +(0.075 0.045 0.01) +(0.08 0.045 0.01) +(0.085 0.045 0.01) +(0.09 0.045 0.01) +(0.095 0.045 0.01) +(0.1 0.045 0.01) +(0.105 0.045 0.01) +(0.11 0.045 0.01) +(0.115 0.045 0.01) +(0.12 0.045 0.01) +(0.125 0.045 0.01) +(0.13 0.045 0.01) +(0.135 0.045 0.01) +(0.14 0.045 0.01) +(0.145 0.045 0.01) +(0.15 0.045 0.01) +(0.155 0.045 0.01) +(0.16 0.045 0.01) +(0.165 0.045 0.01) +(0.17 0.045 0.01) +(0.175 0.045 0.01) +(0.18 0.045 0.01) +(0.185 0.045 0.01) +(0.19 0.045 0.01) +(0.195 0.045 0.01) +(0.2 0.045 0.01) +(0.205 0.045 0.01) +(0.21 0.045 0.01) +(0.215 0.045 0.01) +(0.22 0.045 0.01) +(0.225 0.045 0.01) +(0.23 0.045 0.01) +(0.235 0.045 0.01) +(0.24 0.045 0.01) +(0.245 0.045 0.01) +(0.25 0.045 0.01) +(0.255 0.045 0.01) +(0.26 0.045 0.01) +(0.265 0.045 0.01) +(0.27 0.045 0.01) +(0.275 0.045 0.01) +(0.28 0.045 0.01) +(0.285 0.045 0.01) +(0.29 0.045 0.01) +(0.295 0.045 0.01) +(0.3 0.045 0.01) +(0 0.05 0.01) +(0.005 0.05 0.01) +(0.01 0.05 0.01) +(0.015 0.05 0.01) +(0.02 0.05 0.01) +(0.025 0.05 0.01) +(0.03 0.05 0.01) +(0.035 0.05 0.01) +(0.04 0.05 0.01) +(0.045 0.05 0.01) +(0.05 0.05 0.01) +(0.055 0.05 0.01) +(0.06 0.05 0.01) +(0.065 0.05 0.01) +(0.07 0.05 0.01) +(0.075 0.05 0.01) +(0.08 0.05 0.01) +(0.085 0.05 0.01) +(0.09 0.05 0.01) +(0.095 0.05 0.01) +(0.1 0.05 0.01) +(0.105 0.05 0.01) +(0.11 0.05 0.01) +(0.115 0.05 0.01) +(0.12 0.05 0.01) +(0.125 0.05 0.01) +(0.13 0.05 0.01) +(0.135 0.05 0.01) +(0.14 0.05 0.01) +(0.145 0.05 0.01) +(0.15 0.05 0.01) +(0.155 0.05 0.01) +(0.16 0.05 0.01) +(0.165 0.05 0.01) +(0.17 0.05 0.01) +(0.175 0.05 0.01) +(0.18 0.05 0.01) +(0.185 0.05 0.01) +(0.19 0.05 0.01) +(0.195 0.05 0.01) +(0.2 0.05 0.01) +(0.205 0.05 0.01) +(0.21 0.05 0.01) +(0.215 0.05 0.01) +(0.22 0.05 0.01) +(0.225 0.05 0.01) +(0.23 0.05 0.01) +(0.235 0.05 0.01) +(0.24 0.05 0.01) +(0.245 0.05 0.01) +(0.25 0.05 0.01) +(0.255 0.05 0.01) +(0.26 0.05 0.01) +(0.265 0.05 0.01) +(0.27 0.05 0.01) +(0.275 0.05 0.01) +(0.28 0.05 0.01) +(0.285 0.05 0.01) +(0.29 0.05 0.01) +(0.295 0.05 0.01) +(0.3 0.05 0.01) +(0 0.055 0.01) +(0.005 0.055 0.01) +(0.01 0.055 0.01) +(0.015 0.055 0.01) +(0.02 0.055 0.01) +(0.025 0.055 0.01) +(0.03 0.055 0.01) +(0.035 0.055 0.01) +(0.04 0.055 0.01) +(0.045 0.055 0.01) +(0.05 0.055 0.01) +(0.055 0.055 0.01) +(0.06 0.055 0.01) +(0.065 0.055 0.01) +(0.07 0.055 0.01) +(0.075 0.055 0.01) +(0.08 0.055 0.01) +(0.085 0.055 0.01) +(0.09 0.055 0.01) +(0.095 0.055 0.01) +(0.1 0.055 0.01) +(0.105 0.055 0.01) +(0.11 0.055 0.01) +(0.115 0.055 0.01) +(0.12 0.055 0.01) +(0.125 0.055 0.01) +(0.13 0.055 0.01) +(0.135 0.055 0.01) +(0.14 0.055 0.01) +(0.145 0.055 0.01) +(0.15 0.055 0.01) +(0.155 0.055 0.01) +(0.16 0.055 0.01) +(0.165 0.055 0.01) +(0.17 0.055 0.01) +(0.175 0.055 0.01) +(0.18 0.055 0.01) +(0.185 0.055 0.01) +(0.19 0.055 0.01) +(0.195 0.055 0.01) +(0.2 0.055 0.01) +(0.205 0.055 0.01) +(0.21 0.055 0.01) +(0.215 0.055 0.01) +(0.22 0.055 0.01) +(0.225 0.055 0.01) +(0.23 0.055 0.01) +(0.235 0.055 0.01) +(0.24 0.055 0.01) +(0.245 0.055 0.01) +(0.25 0.055 0.01) +(0.255 0.055 0.01) +(0.26 0.055 0.01) +(0.265 0.055 0.01) +(0.27 0.055 0.01) +(0.275 0.055 0.01) +(0.28 0.055 0.01) +(0.285 0.055 0.01) +(0.29 0.055 0.01) +(0.295 0.055 0.01) +(0.3 0.055 0.01) +(0 0.06 0.01) +(0.005 0.06 0.01) +(0.01 0.06 0.01) +(0.015 0.06 0.01) +(0.02 0.06 0.01) +(0.025 0.06 0.01) +(0.03 0.06 0.01) +(0.035 0.06 0.01) +(0.04 0.06 0.01) +(0.045 0.06 0.01) +(0.05 0.06 0.01) +(0.055 0.06 0.01) +(0.06 0.06 0.01) +(0.065 0.06 0.01) +(0.07 0.06 0.01) +(0.075 0.06 0.01) +(0.08 0.06 0.01) +(0.085 0.06 0.01) +(0.09 0.06 0.01) +(0.095 0.06 0.01) +(0.1 0.06 0.01) +(0.105 0.06 0.01) +(0.11 0.06 0.01) +(0.115 0.06 0.01) +(0.12 0.06 0.01) +(0.125 0.06 0.01) +(0.13 0.06 0.01) +(0.135 0.06 0.01) +(0.14 0.06 0.01) +(0.145 0.06 0.01) +(0.15 0.06 0.01) +(0.155 0.06 0.01) +(0.16 0.06 0.01) +(0.165 0.06 0.01) +(0.17 0.06 0.01) +(0.175 0.06 0.01) +(0.18 0.06 0.01) +(0.185 0.06 0.01) +(0.19 0.06 0.01) +(0.195 0.06 0.01) +(0.2 0.06 0.01) +(0.205 0.06 0.01) +(0.21 0.06 0.01) +(0.215 0.06 0.01) +(0.22 0.06 0.01) +(0.225 0.06 0.01) +(0.23 0.06 0.01) +(0.235 0.06 0.01) +(0.24 0.06 0.01) +(0.245 0.06 0.01) +(0.25 0.06 0.01) +(0.255 0.06 0.01) +(0.26 0.06 0.01) +(0.265 0.06 0.01) +(0.27 0.06 0.01) +(0.275 0.06 0.01) +(0.28 0.06 0.01) +(0.285 0.06 0.01) +(0.29 0.06 0.01) +(0.295 0.06 0.01) +(0.3 0.06 0.01) +(0 0.065 0.01) +(0.005 0.065 0.01) +(0.01 0.065 0.01) +(0.015 0.065 0.01) +(0.02 0.065 0.01) +(0.025 0.065 0.01) +(0.03 0.065 0.01) +(0.035 0.065 0.01) +(0.04 0.065 0.01) +(0.045 0.065 0.01) +(0.05 0.065 0.01) +(0.055 0.065 0.01) +(0.06 0.065 0.01) +(0.065 0.065 0.01) +(0.07 0.065 0.01) +(0.075 0.065 0.01) +(0.08 0.065 0.01) +(0.085 0.065 0.01) +(0.09 0.065 0.01) +(0.095 0.065 0.01) +(0.1 0.065 0.01) +(0.105 0.065 0.01) +(0.11 0.065 0.01) +(0.115 0.065 0.01) +(0.12 0.065 0.01) +(0.125 0.065 0.01) +(0.13 0.065 0.01) +(0.135 0.065 0.01) +(0.14 0.065 0.01) +(0.145 0.065 0.01) +(0.15 0.065 0.01) +(0.155 0.065 0.01) +(0.16 0.065 0.01) +(0.165 0.065 0.01) +(0.17 0.065 0.01) +(0.175 0.065 0.01) +(0.18 0.065 0.01) +(0.185 0.065 0.01) +(0.19 0.065 0.01) +(0.195 0.065 0.01) +(0.2 0.065 0.01) +(0.205 0.065 0.01) +(0.21 0.065 0.01) +(0.215 0.065 0.01) +(0.22 0.065 0.01) +(0.225 0.065 0.01) +(0.23 0.065 0.01) +(0.235 0.065 0.01) +(0.24 0.065 0.01) +(0.245 0.065 0.01) +(0.25 0.065 0.01) +(0.255 0.065 0.01) +(0.26 0.065 0.01) +(0.265 0.065 0.01) +(0.27 0.065 0.01) +(0.275 0.065 0.01) +(0.28 0.065 0.01) +(0.285 0.065 0.01) +(0.29 0.065 0.01) +(0.295 0.065 0.01) +(0.3 0.065 0.01) +(0 0.07 0.01) +(0.005 0.07 0.01) +(0.01 0.07 0.01) +(0.015 0.07 0.01) +(0.02 0.07 0.01) +(0.025 0.07 0.01) +(0.03 0.07 0.01) +(0.035 0.07 0.01) +(0.04 0.07 0.01) +(0.045 0.07 0.01) +(0.05 0.07 0.01) +(0.055 0.07 0.01) +(0.06 0.07 0.01) +(0.065 0.07 0.01) +(0.07 0.07 0.01) +(0.075 0.07 0.01) +(0.08 0.07 0.01) +(0.085 0.07 0.01) +(0.09 0.07 0.01) +(0.095 0.07 0.01) +(0.1 0.07 0.01) +(0.105 0.07 0.01) +(0.11 0.07 0.01) +(0.115 0.07 0.01) +(0.12 0.07 0.01) +(0.125 0.07 0.01) +(0.13 0.07 0.01) +(0.135 0.07 0.01) +(0.14 0.07 0.01) +(0.145 0.07 0.01) +(0.15 0.07 0.01) +(0.155 0.07 0.01) +(0.16 0.07 0.01) +(0.165 0.07 0.01) +(0.17 0.07 0.01) +(0.175 0.07 0.01) +(0.18 0.07 0.01) +(0.185 0.07 0.01) +(0.19 0.07 0.01) +(0.195 0.07 0.01) +(0.2 0.07 0.01) +(0.205 0.07 0.01) +(0.21 0.07 0.01) +(0.215 0.07 0.01) +(0.22 0.07 0.01) +(0.225 0.07 0.01) +(0.23 0.07 0.01) +(0.235 0.07 0.01) +(0.24 0.07 0.01) +(0.245 0.07 0.01) +(0.25 0.07 0.01) +(0.255 0.07 0.01) +(0.26 0.07 0.01) +(0.265 0.07 0.01) +(0.27 0.07 0.01) +(0.275 0.07 0.01) +(0.28 0.07 0.01) +(0.285 0.07 0.01) +(0.29 0.07 0.01) +(0.295 0.07 0.01) +(0.3 0.07 0.01) +(0 0.075 0.01) +(0.005 0.075 0.01) +(0.01 0.075 0.01) +(0.015 0.075 0.01) +(0.02 0.075 0.01) +(0.025 0.075 0.01) +(0.03 0.075 0.01) +(0.035 0.075 0.01) +(0.04 0.075 0.01) +(0.045 0.075 0.01) +(0.05 0.075 0.01) +(0.055 0.075 0.01) +(0.06 0.075 0.01) +(0.065 0.075 0.01) +(0.07 0.075 0.01) +(0.075 0.075 0.01) +(0.08 0.075 0.01) +(0.085 0.075 0.01) +(0.09 0.075 0.01) +(0.095 0.075 0.01) +(0.1 0.075 0.01) +(0.105 0.075 0.01) +(0.11 0.075 0.01) +(0.115 0.075 0.01) +(0.12 0.075 0.01) +(0.125 0.075 0.01) +(0.13 0.075 0.01) +(0.135 0.075 0.01) +(0.14 0.075 0.01) +(0.145 0.075 0.01) +(0.15 0.075 0.01) +(0.155 0.075 0.01) +(0.16 0.075 0.01) +(0.165 0.075 0.01) +(0.17 0.075 0.01) +(0.175 0.075 0.01) +(0.18 0.075 0.01) +(0.185 0.075 0.01) +(0.19 0.075 0.01) +(0.195 0.075 0.01) +(0.2 0.075 0.01) +(0.205 0.075 0.01) +(0.21 0.075 0.01) +(0.215 0.075 0.01) +(0.22 0.075 0.01) +(0.225 0.075 0.01) +(0.23 0.075 0.01) +(0.235 0.075 0.01) +(0.24 0.075 0.01) +(0.245 0.075 0.01) +(0.25 0.075 0.01) +(0.255 0.075 0.01) +(0.26 0.075 0.01) +(0.265 0.075 0.01) +(0.27 0.075 0.01) +(0.275 0.075 0.01) +(0.28 0.075 0.01) +(0.285 0.075 0.01) +(0.29 0.075 0.01) +(0.295 0.075 0.01) +(0.3 0.075 0.01) +(0 0.08 0.01) +(0.005 0.08 0.01) +(0.01 0.08 0.01) +(0.015 0.08 0.01) +(0.02 0.08 0.01) +(0.025 0.08 0.01) +(0.03 0.08 0.01) +(0.035 0.08 0.01) +(0.04 0.08 0.01) +(0.045 0.08 0.01) +(0.05 0.08 0.01) +(0.055 0.08 0.01) +(0.06 0.08 0.01) +(0.065 0.08 0.01) +(0.07 0.08 0.01) +(0.075 0.08 0.01) +(0.08 0.08 0.01) +(0.085 0.08 0.01) +(0.09 0.08 0.01) +(0.095 0.08 0.01) +(0.1 0.08 0.01) +(0.105 0.08 0.01) +(0.11 0.08 0.01) +(0.115 0.08 0.01) +(0.12 0.08 0.01) +(0.125 0.08 0.01) +(0.13 0.08 0.01) +(0.135 0.08 0.01) +(0.14 0.08 0.01) +(0.145 0.08 0.01) +(0.15 0.08 0.01) +(0.155 0.08 0.01) +(0.16 0.08 0.01) +(0.165 0.08 0.01) +(0.17 0.08 0.01) +(0.175 0.08 0.01) +(0.18 0.08 0.01) +(0.185 0.08 0.01) +(0.19 0.08 0.01) +(0.195 0.08 0.01) +(0.2 0.08 0.01) +(0.205 0.08 0.01) +(0.21 0.08 0.01) +(0.215 0.08 0.01) +(0.22 0.08 0.01) +(0.225 0.08 0.01) +(0.23 0.08 0.01) +(0.235 0.08 0.01) +(0.24 0.08 0.01) +(0.245 0.08 0.01) +(0.25 0.08 0.01) +(0.255 0.08 0.01) +(0.26 0.08 0.01) +(0.265 0.08 0.01) +(0.27 0.08 0.01) +(0.275 0.08 0.01) +(0.28 0.08 0.01) +(0.285 0.08 0.01) +(0.29 0.08 0.01) +(0.295 0.08 0.01) +(0.3 0.08 0.01) +(0 0.085 0.01) +(0.005 0.085 0.01) +(0.01 0.085 0.01) +(0.015 0.085 0.01) +(0.02 0.085 0.01) +(0.025 0.085 0.01) +(0.03 0.085 0.01) +(0.035 0.085 0.01) +(0.04 0.085 0.01) +(0.045 0.085 0.01) +(0.05 0.085 0.01) +(0.055 0.085 0.01) +(0.06 0.085 0.01) +(0.065 0.085 0.01) +(0.07 0.085 0.01) +(0.075 0.085 0.01) +(0.08 0.085 0.01) +(0.085 0.085 0.01) +(0.09 0.085 0.01) +(0.095 0.085 0.01) +(0.1 0.085 0.01) +(0.105 0.085 0.01) +(0.11 0.085 0.01) +(0.115 0.085 0.01) +(0.12 0.085 0.01) +(0.125 0.085 0.01) +(0.13 0.085 0.01) +(0.135 0.085 0.01) +(0.14 0.085 0.01) +(0.145 0.085 0.01) +(0.15 0.085 0.01) +(0.155 0.085 0.01) +(0.16 0.085 0.01) +(0.165 0.085 0.01) +(0.17 0.085 0.01) +(0.175 0.085 0.01) +(0.18 0.085 0.01) +(0.185 0.085 0.01) +(0.19 0.085 0.01) +(0.195 0.085 0.01) +(0.2 0.085 0.01) +(0.205 0.085 0.01) +(0.21 0.085 0.01) +(0.215 0.085 0.01) +(0.22 0.085 0.01) +(0.225 0.085 0.01) +(0.23 0.085 0.01) +(0.235 0.085 0.01) +(0.24 0.085 0.01) +(0.245 0.085 0.01) +(0.25 0.085 0.01) +(0.255 0.085 0.01) +(0.26 0.085 0.01) +(0.265 0.085 0.01) +(0.27 0.085 0.01) +(0.275 0.085 0.01) +(0.28 0.085 0.01) +(0.285 0.085 0.01) +(0.29 0.085 0.01) +(0.295 0.085 0.01) +(0.3 0.085 0.01) +(0 0.09 0.01) +(0.005 0.09 0.01) +(0.01 0.09 0.01) +(0.015 0.09 0.01) +(0.02 0.09 0.01) +(0.025 0.09 0.01) +(0.03 0.09 0.01) +(0.035 0.09 0.01) +(0.04 0.09 0.01) +(0.045 0.09 0.01) +(0.05 0.09 0.01) +(0.055 0.09 0.01) +(0.06 0.09 0.01) +(0.065 0.09 0.01) +(0.07 0.09 0.01) +(0.075 0.09 0.01) +(0.08 0.09 0.01) +(0.085 0.09 0.01) +(0.09 0.09 0.01) +(0.095 0.09 0.01) +(0.1 0.09 0.01) +(0.105 0.09 0.01) +(0.11 0.09 0.01) +(0.115 0.09 0.01) +(0.12 0.09 0.01) +(0.125 0.09 0.01) +(0.13 0.09 0.01) +(0.135 0.09 0.01) +(0.14 0.09 0.01) +(0.145 0.09 0.01) +(0.15 0.09 0.01) +(0.155 0.09 0.01) +(0.16 0.09 0.01) +(0.165 0.09 0.01) +(0.17 0.09 0.01) +(0.175 0.09 0.01) +(0.18 0.09 0.01) +(0.185 0.09 0.01) +(0.19 0.09 0.01) +(0.195 0.09 0.01) +(0.2 0.09 0.01) +(0.205 0.09 0.01) +(0.21 0.09 0.01) +(0.215 0.09 0.01) +(0.22 0.09 0.01) +(0.225 0.09 0.01) +(0.23 0.09 0.01) +(0.235 0.09 0.01) +(0.24 0.09 0.01) +(0.245 0.09 0.01) +(0.25 0.09 0.01) +(0.255 0.09 0.01) +(0.26 0.09 0.01) +(0.265 0.09 0.01) +(0.27 0.09 0.01) +(0.275 0.09 0.01) +(0.28 0.09 0.01) +(0.285 0.09 0.01) +(0.29 0.09 0.01) +(0.295 0.09 0.01) +(0.3 0.09 0.01) +(0 0.095 0.01) +(0.005 0.095 0.01) +(0.01 0.095 0.01) +(0.015 0.095 0.01) +(0.02 0.095 0.01) +(0.025 0.095 0.01) +(0.03 0.095 0.01) +(0.035 0.095 0.01) +(0.04 0.095 0.01) +(0.045 0.095 0.01) +(0.05 0.095 0.01) +(0.055 0.095 0.01) +(0.06 0.095 0.01) +(0.065 0.095 0.01) +(0.07 0.095 0.01) +(0.075 0.095 0.01) +(0.08 0.095 0.01) +(0.085 0.095 0.01) +(0.09 0.095 0.01) +(0.095 0.095 0.01) +(0.1 0.095 0.01) +(0.105 0.095 0.01) +(0.11 0.095 0.01) +(0.115 0.095 0.01) +(0.12 0.095 0.01) +(0.125 0.095 0.01) +(0.13 0.095 0.01) +(0.135 0.095 0.01) +(0.14 0.095 0.01) +(0.145 0.095 0.01) +(0.15 0.095 0.01) +(0.155 0.095 0.01) +(0.16 0.095 0.01) +(0.165 0.095 0.01) +(0.17 0.095 0.01) +(0.175 0.095 0.01) +(0.18 0.095 0.01) +(0.185 0.095 0.01) +(0.19 0.095 0.01) +(0.195 0.095 0.01) +(0.2 0.095 0.01) +(0.205 0.095 0.01) +(0.21 0.095 0.01) +(0.215 0.095 0.01) +(0.22 0.095 0.01) +(0.225 0.095 0.01) +(0.23 0.095 0.01) +(0.235 0.095 0.01) +(0.24 0.095 0.01) +(0.245 0.095 0.01) +(0.25 0.095 0.01) +(0.255 0.095 0.01) +(0.26 0.095 0.01) +(0.265 0.095 0.01) +(0.27 0.095 0.01) +(0.275 0.095 0.01) +(0.28 0.095 0.01) +(0.285 0.095 0.01) +(0.29 0.095 0.01) +(0.295 0.095 0.01) +(0.3 0.095 0.01) +(0 0.1 0.01) +(0.005 0.1 0.01) +(0.01 0.1 0.01) +(0.015 0.1 0.01) +(0.02 0.1 0.01) +(0.025 0.1 0.01) +(0.03 0.1 0.01) +(0.035 0.1 0.01) +(0.04 0.1 0.01) +(0.045 0.1 0.01) +(0.05 0.1 0.01) +(0.055 0.1 0.01) +(0.06 0.1 0.01) +(0.065 0.1 0.01) +(0.07 0.1 0.01) +(0.075 0.1 0.01) +(0.08 0.1 0.01) +(0.085 0.1 0.01) +(0.09 0.1 0.01) +(0.095 0.1 0.01) +(0.1 0.1 0.01) +(0.105 0.1 0.01) +(0.11 0.1 0.01) +(0.115 0.1 0.01) +(0.12 0.1 0.01) +(0.125 0.1 0.01) +(0.13 0.1 0.01) +(0.135 0.1 0.01) +(0.14 0.1 0.01) +(0.145 0.1 0.01) +(0.15 0.1 0.01) +(0.155 0.1 0.01) +(0.16 0.1 0.01) +(0.165 0.1 0.01) +(0.17 0.1 0.01) +(0.175 0.1 0.01) +(0.18 0.1 0.01) +(0.185 0.1 0.01) +(0.19 0.1 0.01) +(0.195 0.1 0.01) +(0.2 0.1 0.01) +(0.205 0.1 0.01) +(0.21 0.1 0.01) +(0.215 0.1 0.01) +(0.22 0.1 0.01) +(0.225 0.1 0.01) +(0.23 0.1 0.01) +(0.235 0.1 0.01) +(0.24 0.1 0.01) +(0.245 0.1 0.01) +(0.25 0.1 0.01) +(0.255 0.1 0.01) +(0.26 0.1 0.01) +(0.265 0.1 0.01) +(0.27 0.1 0.01) +(0.275 0.1 0.01) +(0.28 0.1 0.01) +(0.285 0.1 0.01) +(0.29 0.1 0.01) +(0.295 0.1 0.01) +(0.3 0.1 0.01) +) + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/constant/transportProperties b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..c8a1bd9303ad225efd2f66a40b2e53f3337909ea --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/constant/transportProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Ds Ds [ 0 2 -1 0 0 0 0 ] 0.00001; + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/controlDict b/tutorials/finiteArea/surfactantFoam/planeTransport/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..5a5e865e6f82a7ba4da49313ee9107b00f53d437 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/controlDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application surfactantFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.1; + +writeControl runTime; + +writeInterval 0.2; + +purgeWrite 0; + +writeFormat ascii; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + + +// ************************************************************************* // + diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..4ac31a9d7e0b273b4c2edbafb0e46322b77f7dc1 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSchemes b/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSchemes new file mode 100644 index 0000000000000000000000000000000000000000..7a870c3b65c7c8e210c4c396b4e742d7149917ed --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSchemes @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phis,Cs) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(Ds,Cs) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSolution b/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSolution new file mode 100644 index 0000000000000000000000000000000000000000..d31302173973e4b0d371911988f62b7c2e0d1dc0 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/faSolution @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object faSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + Cs + { + solver PBiCG; + preconditioner DILU; + minIter 0; + maxIter 2000; + tolerance 1e-06; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + +SIMPLE +{ + nTimeCorrectors 6; + nNonOrthogonalCorrectors 1; +} + +relaxationFactors +{ + p 0.7; + U 0.7; + k 0.7; + epsilon 0.7; + R 0.7; +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/fvSchemes b/tutorials/finiteArea/surfactantFoam/planeTransport/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..af02474232a8b3bc96e93ee3133e353f98c2bdd7 --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/fvSchemes @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ +} + +gradSchemes +{ +} + +divSchemes +{ +} + +laplacianSchemes +{ +} + +interpolationSchemes +{ +} + +snGradSchemes +{ +} + + +// ************************************************************************* // diff --git a/tutorials/finiteArea/surfactantFoam/planeTransport/system/fvSolution b/tutorials/finiteArea/surfactantFoam/planeTransport/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..c32c784017eb9c5042d4a51a091d306388dbfdeb --- /dev/null +++ b/tutorials/finiteArea/surfactantFoam/planeTransport/system/fvSolution @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 4.0 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ +} + + +// ************************************************************************* //