diff --git a/applications/test/IjkField/Make/files b/applications/test/IjkField/Make/files new file mode 100644 index 0000000000..8e1017d41d --- /dev/null +++ b/applications/test/IjkField/Make/files @@ -0,0 +1,3 @@ +Test-IjkField.C + +EXE = $(FOAM_USER_APPBIN)/Test-IjkField diff --git a/applications/test/IjkField/Make/options b/applications/test/IjkField/Make/options new file mode 100644 index 0000000000..2c375bcb61 --- /dev/null +++ b/applications/test/IjkField/Make/options @@ -0,0 +1,4 @@ +EXE_INC = -DFULLDEBUG + +/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */ +/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/IjkField/Test-IjkField.C b/applications/test/IjkField/Test-IjkField.C new file mode 100644 index 0000000000..8f093218f0 --- /dev/null +++ b/applications/test/IjkField/Test-IjkField.C @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Description + Functionality of IjkField + +\*---------------------------------------------------------------------------*/ + +#include "point.H" +#include "IjkField.H" +#include "IOstreams.H" + +using namespace Foam; + +template +Ostream& print(const IjkField& fld) +{ + Info<< static_cast&>(fld).size() + << " " << fld.sizes() << ' ' << flatOutput(fld); + + return Info; +} + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + // Create with inconsistent sizes + IjkField