mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
merge Mark's branch
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
#
|
||||
#+TITLE: *OpenFOAM release notes for version 1.5*
|
||||
#+AUTHOR: OpenCFD Ltd.
|
||||
#+DATE: 26 August 2008
|
||||
#+DATE: 07 October 2008
|
||||
#+LINK: http://www.opencfd.co.uk
|
||||
#+OPTIONS: author:nil ^:{}
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
and $WM_COMPILER_ARCH environment variables in the OpenFOAM-1.5/etc/bashrc
|
||||
(or cshrc) file.
|
||||
+ The location of the installation of the compiler is controlled by the
|
||||
$WM_COMPILER_INST environment variable in the OpenFOAM-1.5/etc/settings.sh
|
||||
$compilerInstall environment variable in the OpenFOAM-1.5/etc/settings.sh
|
||||
(or settings.csh) file.
|
||||
|
||||
* Developments to solvers (applications)
|
||||
|
||||
@ -49,7 +49,7 @@ quires the installation of Qt 4.3.? for ParaView-3 to run.
|
||||
$WM_COMPILER and $WM_COMPILER_ARCH environment variables in the
|
||||
OpenFOAM-1.5/etc/bashrc (or cshrc) file.
|
||||
* The location of the installation of the compiler is controlled by the
|
||||
$WM_COMPILER_INST environment variable in the OpenFOAM-1.5/etc/settings.sh
|
||||
$compilerInstall environment variable in the OpenFOAM-1.5/etc/settings.sh
|
||||
(or settings.csh) file.
|
||||
|
||||
4 Developments to solvers (applications)
|
||||
@ -202,7 +202,7 @@ To aid common monitoring and post-processing activities.
|
||||
* Non-blocking, non-buffered, parallel transfers with potential scaling
|
||||
benefits for larger number of processors.
|
||||
|
||||
Date: 26 August 2008
|
||||
Date: 07 October 2008
|
||||
|
||||
HTML generated by org-mode 6.06b in emacs 23
|
||||
|
||||
|
||||
@ -1,224 +0,0 @@
|
||||
.file "ListLoop.C"
|
||||
.section .ctors,"aw",@progbits
|
||||
.align 4
|
||||
.long _GLOBAL__I__Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_
|
||||
.text
|
||||
.align 2
|
||||
.p2align 4,,15
|
||||
.type _Z41__static_initialization_and_destruction_0ii, @function
|
||||
_Z41__static_initialization_and_destruction_0ii:
|
||||
.LFB2550:
|
||||
pushl %ebp
|
||||
.LCFI0:
|
||||
movl %esp, %ebp
|
||||
.LCFI1:
|
||||
pushl %ebx
|
||||
.LCFI2:
|
||||
call __i686.get_pc_thunk.bx
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
subl $20, %esp
|
||||
.LCFI3:
|
||||
decl %eax
|
||||
je .L7
|
||||
.L5:
|
||||
addl $20, %esp
|
||||
popl %ebx
|
||||
leave
|
||||
ret
|
||||
.p2align 4,,7
|
||||
.L7:
|
||||
cmpl $65535, %edx
|
||||
jne .L5
|
||||
leal _ZSt8__ioinit@GOTOFF(%ebx), %eax
|
||||
movl %eax, (%esp)
|
||||
call _ZNSt8ios_base4InitC1Ev@PLT
|
||||
movl __dso_handle@GOT(%ebx), %eax
|
||||
movl $0, 4(%esp)
|
||||
movl %eax, 8(%esp)
|
||||
leal __tcf_0@GOTOFF(%ebx), %eax
|
||||
movl %eax, (%esp)
|
||||
call __cxa_atexit@PLT
|
||||
addl $20, %esp
|
||||
popl %ebx
|
||||
leave
|
||||
ret
|
||||
.LFE2550:
|
||||
.size _Z41__static_initialization_and_destruction_0ii, .-_Z41__static_initialization_and_destruction_0ii
|
||||
.globl __gxx_personality_v0
|
||||
.align 2
|
||||
.p2align 4,,15
|
||||
.type _GLOBAL__I__Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_, @function
|
||||
_GLOBAL__I__Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_:
|
||||
.LFB2552:
|
||||
pushl %ebp
|
||||
.LCFI4:
|
||||
movl $65535, %edx
|
||||
movl $1, %eax
|
||||
movl %esp, %ebp
|
||||
.LCFI5:
|
||||
leave
|
||||
jmp _Z41__static_initialization_and_destruction_0ii
|
||||
.LFE2552:
|
||||
.size _GLOBAL__I__Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_, .-_GLOBAL__I__Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_
|
||||
.align 2
|
||||
.p2align 4,,15
|
||||
.type __tcf_0, @function
|
||||
__tcf_0:
|
||||
.LFB2551:
|
||||
pushl %ebp
|
||||
.LCFI6:
|
||||
movl %esp, %ebp
|
||||
.LCFI7:
|
||||
pushl %ebx
|
||||
.LCFI8:
|
||||
call __i686.get_pc_thunk.bx
|
||||
addl $_GLOBAL_OFFSET_TABLE_, %ebx
|
||||
subl $4, %esp
|
||||
.LCFI9:
|
||||
leal _ZSt8__ioinit@GOTOFF(%ebx), %eax
|
||||
movl %eax, (%esp)
|
||||
call _ZNSt8ios_base4InitD1Ev@PLT
|
||||
addl $4, %esp
|
||||
popl %ebx
|
||||
leave
|
||||
ret
|
||||
.LFE2551:
|
||||
.size __tcf_0, .-__tcf_0
|
||||
.align 2
|
||||
.p2align 4,,15
|
||||
.globl _Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_
|
||||
.type _Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_, @function
|
||||
_Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_:
|
||||
.LFB2352:
|
||||
pushl %ebp
|
||||
.LCFI10:
|
||||
movl %esp, %ebp
|
||||
.LCFI11:
|
||||
pushl %edi
|
||||
.LCFI12:
|
||||
pushl %esi
|
||||
.LCFI13:
|
||||
subl $12, %esp
|
||||
.LCFI14:
|
||||
movl 8(%ebp), %edx
|
||||
movl (%edx), %eax
|
||||
testl %eax, %eax
|
||||
movl %eax, -20(%ebp)
|
||||
jle .L16
|
||||
movl 16(%ebp), %eax
|
||||
movl 4(%edx), %edx
|
||||
xorl %ecx, %ecx
|
||||
movl 4(%eax), %eax
|
||||
movl %edx, -12(%ebp)
|
||||
movl %eax, -16(%ebp)
|
||||
movl 20(%ebp), %eax
|
||||
movl 4(%eax), %edi
|
||||
movl 12(%ebp), %eax
|
||||
movl 4(%eax), %esi
|
||||
.p2align 4,,7
|
||||
.L15:
|
||||
movl -16(%ebp), %edx
|
||||
movl (%edx,%ecx,4), %eax
|
||||
movl -12(%ebp), %edx
|
||||
leal (%edx,%eax,8), %eax
|
||||
movl (%edi,%ecx,4), %edx
|
||||
incl %ecx
|
||||
cmpl %ecx, -20(%ebp)
|
||||
fldl (%eax)
|
||||
fsubl (%esi,%edx,8)
|
||||
fstpl (%eax)
|
||||
jne .L15
|
||||
.L16:
|
||||
addl $12, %esp
|
||||
popl %esi
|
||||
popl %edi
|
||||
leave
|
||||
ret
|
||||
.LFE2352:
|
||||
.size _Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_, .-_Z4funcRN4Foam4ListIdEERKS1_RKNS0_IiEES7_
|
||||
.local _ZSt8__ioinit
|
||||
.comm _ZSt8__ioinit,1,1
|
||||
.section .eh_frame,"a",@progbits
|
||||
.Lframe1:
|
||||
.long .LECIE1-.LSCIE1
|
||||
.LSCIE1:
|
||||
.long 0x0
|
||||
.byte 0x1
|
||||
.string "zPR"
|
||||
.uleb128 0x1
|
||||
.sleb128 -4
|
||||
.byte 0x8
|
||||
.uleb128 0x6
|
||||
.byte 0x9b
|
||||
.long DW.ref.__gxx_personality_v0-.
|
||||
.byte 0x1b
|
||||
.byte 0xc
|
||||
.uleb128 0x4
|
||||
.uleb128 0x4
|
||||
.byte 0x88
|
||||
.uleb128 0x1
|
||||
.align 4
|
||||
.LECIE1:
|
||||
.LSFDE1:
|
||||
.long .LEFDE1-.LASFDE1
|
||||
.LASFDE1:
|
||||
.long .LASFDE1-.Lframe1
|
||||
.long .LFB2550-.
|
||||
.long .LFE2550-.LFB2550
|
||||
.uleb128 0x0
|
||||
.byte 0x4
|
||||
.long .LCFI0-.LFB2550
|
||||
.byte 0xe
|
||||
.uleb128 0x8
|
||||
.byte 0x85
|
||||
.uleb128 0x2
|
||||
.byte 0x4
|
||||
.long .LCFI1-.LCFI0
|
||||
.byte 0xd
|
||||
.uleb128 0x5
|
||||
.byte 0x4
|
||||
.long .LCFI2-.LCFI1
|
||||
.byte 0x83
|
||||
.uleb128 0x3
|
||||
.align 4
|
||||
.LEFDE1:
|
||||
.LSFDE5:
|
||||
.long .LEFDE5-.LASFDE5
|
||||
.LASFDE5:
|
||||
.long .LASFDE5-.Lframe1
|
||||
.long .LFB2551-.
|
||||
.long .LFE2551-.LFB2551
|
||||
.uleb128 0x0
|
||||
.byte 0x4
|
||||
.long .LCFI6-.LFB2551
|
||||
.byte 0xe
|
||||
.uleb128 0x8
|
||||
.byte 0x85
|
||||
.uleb128 0x2
|
||||
.byte 0x4
|
||||
.long .LCFI7-.LCFI6
|
||||
.byte 0xd
|
||||
.uleb128 0x5
|
||||
.byte 0x4
|
||||
.long .LCFI8-.LCFI7
|
||||
.byte 0x83
|
||||
.uleb128 0x3
|
||||
.align 4
|
||||
.LEFDE5:
|
||||
.hidden DW.ref.__gxx_personality_v0
|
||||
.weak DW.ref.__gxx_personality_v0
|
||||
.section .data.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
|
||||
.align 4
|
||||
.type DW.ref.__gxx_personality_v0, @object
|
||||
.size DW.ref.__gxx_personality_v0, 4
|
||||
DW.ref.__gxx_personality_v0:
|
||||
.long __gxx_personality_v0
|
||||
.ident "GCC: (GNU) 4.1.1"
|
||||
.section .text.__i686.get_pc_thunk.bx,"axG",@progbits,__i686.get_pc_thunk.bx,comdat
|
||||
.globl __i686.get_pc_thunk.bx
|
||||
.hidden __i686.get_pc_thunk.bx
|
||||
.type __i686.get_pc_thunk.bx, @function
|
||||
__i686.get_pc_thunk.bx:
|
||||
movl (%esp), %ebx
|
||||
ret
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
4
applications/test/xfer/Make/files
Normal file
4
applications/test/xfer/Make/files
Normal file
@ -0,0 +1,4 @@
|
||||
xferListTest.C
|
||||
|
||||
/* EXE = $(FOAM_USER_APPBIN)/xferListTest */
|
||||
EXE = ./xferListTest
|
||||
0
applications/test/xfer/Make/options
Normal file
0
applications/test/xfer/Make/options
Normal file
88
applications/test/xfer/xferListTest.C
Normal file
88
applications/test/xfer/xferListTest.C
Normal file
@ -0,0 +1,88 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 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 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "OSspecific.H"
|
||||
|
||||
#include "IOstreams.H"
|
||||
#include "IStringStream.H"
|
||||
#include "labelList.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
List<label> lstA(10);
|
||||
List<label> lstC(IStringStream("(1 2 3 4)")());
|
||||
|
||||
forAll(lstA, i)
|
||||
{
|
||||
lstA[i] = i;
|
||||
}
|
||||
|
||||
Info<< "lstA: " << lstA << endl;
|
||||
Info<< "lstC: " << lstC << endl;
|
||||
|
||||
xfer<List<label> > xA(lstA, true);
|
||||
xfer<List<label> > xB;
|
||||
|
||||
// List<label> lstB( xferTmp(List<label>, lstC) );
|
||||
// List<label> lstB( xfer<List<label> >(lstC) );
|
||||
List<label> lstB( xA );
|
||||
|
||||
Info<< "xA: " << *xA << endl;
|
||||
Info<< "xB: " << *xB << endl;
|
||||
Info<< "lstA: " << lstA << endl;
|
||||
Info<< "lstB: " << lstB << endl;
|
||||
Info<< "lstC: " << lstC << endl;
|
||||
|
||||
xA = lstB;
|
||||
|
||||
Info<< "xA: " << *xA << endl;
|
||||
Info<< "xB: " << *xB << endl;
|
||||
Info<< "lstA: " << lstA << endl;
|
||||
Info<< "lstB: " << lstB << endl;
|
||||
Info<< "lstC: " << lstC << endl;
|
||||
|
||||
xB = xA;
|
||||
|
||||
Info<< "xA: " << *xA << endl;
|
||||
Info<< "xB: " << *xB << endl;
|
||||
Info<< "lstA: " << lstA << endl;
|
||||
Info<< "lstB: " << lstB << endl;
|
||||
Info<< "lstC: " << lstC << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,8 +1,8 @@
|
||||
EXE_INC = \
|
||||
-IextrudedMesh \
|
||||
-IextrudeModel/lnInclude \
|
||||
-I$(FOAM_SRC)/meshTools/lnInclude \
|
||||
-I$(FOAM_SRC)/dynamicMesh/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/meshTools/lnInclude \
|
||||
-I$(FOAM_SRC)/dynamicMesh/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/finiteVolume/lnInclude \
|
||||
-I$(FOAM_SRC)/meshTools/lnInclude \
|
||||
-I$(FOAM_SRC)/lagrangian/basic/lnInclude \
|
||||
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
|
||||
@ -39,6 +39,14 @@ Usage
|
||||
@param -zeroTime \n
|
||||
Include the often incomplete initial conditions.
|
||||
|
||||
@param -index \<start\>\n
|
||||
Ignore the time index contained in the time file and use a
|
||||
simple indexing when creating the @c Ensight/data/######## files.
|
||||
|
||||
@param -noMesh \n
|
||||
Suppress writing the geometry. Can be useful for converting partial
|
||||
results for a static geometry.
|
||||
|
||||
Note
|
||||
- no parallel data.
|
||||
- writes to @a Ensight directory to avoid collisions with foamToEnsight.
|
||||
@ -70,6 +78,8 @@ int main(int argc, char *argv[])
|
||||
timeSelector::addOptions(true, false);
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("ascii", "");
|
||||
argList::validOptions.insert("index", "start");
|
||||
argList::validOptions.insert("noMesh", "");
|
||||
|
||||
const word volFieldTypes[] =
|
||||
{
|
||||
@ -104,6 +114,18 @@ int main(int argc, char *argv[])
|
||||
format = IOstream::ASCII;
|
||||
}
|
||||
|
||||
// control for renumbering iterations
|
||||
bool optIndex = false;
|
||||
label indexingNumber = 0;
|
||||
if (args.options().found("index"))
|
||||
{
|
||||
optIndex = true;
|
||||
indexingNumber = readLabel(IStringStream(args.options()["index"])());
|
||||
}
|
||||
|
||||
// always write the geometry, unless the -noMesh option is specified
|
||||
bool optNoMesh = args.options().found("noMesh");
|
||||
|
||||
fileName ensightDir = args.rootPath()/args.globalCaseName()/"Ensight";
|
||||
fileName dataDir = ensightDir/"data";
|
||||
fileName caseFileName = "Ensight.case";
|
||||
@ -146,6 +168,13 @@ int main(int argc, char *argv[])
|
||||
# include "findFields.H"
|
||||
# include "validateFields.H"
|
||||
|
||||
if (hasMovingMesh && optNoMesh)
|
||||
{
|
||||
Info<< "mesh is moving: ignoring '-noMesh' option" << endl;
|
||||
optNoMesh = false;
|
||||
}
|
||||
|
||||
|
||||
// map times used
|
||||
Map<scalar> timeIndices;
|
||||
|
||||
@ -192,15 +221,18 @@ int main(int argc, char *argv[])
|
||||
partsList.recalculate(mesh);
|
||||
}
|
||||
|
||||
fileName geomDir;
|
||||
if (hasMovingMesh)
|
||||
if (!optNoMesh)
|
||||
{
|
||||
geomDir = dataDir/subDir;
|
||||
}
|
||||
fileName geomDir;
|
||||
if (hasMovingMesh)
|
||||
{
|
||||
geomDir = dataDir/subDir;
|
||||
}
|
||||
|
||||
ensightGeoFile geoFile(ensightDir/geomDir/geometryName, format);
|
||||
partsList.writeGeometry(geoFile);
|
||||
Info << nl;
|
||||
ensightGeoFile geoFile(ensightDir/geomDir/geometryName, format);
|
||||
partsList.writeGeometry(geoFile);
|
||||
Info<< nl;
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "write volume field (" << flush;
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
// Read time index from */uniform/time,
|
||||
// but treat 0 and constant specially
|
||||
// Read time index from */uniform/time, but treat 0 and constant specially
|
||||
// or simply increment from the '-index' option if it was supplied
|
||||
|
||||
label timeIndex = 0;
|
||||
|
||||
if
|
||||
if (optIndex)
|
||||
{
|
||||
timeIndex = indexingNumber++;
|
||||
}
|
||||
else if
|
||||
(
|
||||
runTime.timeName() != "constant"
|
||||
&& runTime.timeName() != "0"
|
||||
@ -22,19 +26,8 @@
|
||||
|
||||
if (io.headerOk())
|
||||
{
|
||||
IOdictionary timeObject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"time",
|
||||
runTime.timeName(),
|
||||
"uniform",
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
);
|
||||
io.readOpt() = IOobject::MUST_READ;
|
||||
IOdictionary timeObject(io);
|
||||
|
||||
timeObject.lookup("index") >> timeIndex;
|
||||
}
|
||||
|
||||
@ -1,28 +1,18 @@
|
||||
{
|
||||
IOobject ioPoints
|
||||
IOobject io
|
||||
(
|
||||
"points",
|
||||
"points",
|
||||
runTime.timeName(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh
|
||||
);
|
||||
|
||||
if (ioPoints.headerOk())
|
||||
|
||||
if (io.headerOk())
|
||||
{
|
||||
// Reading new points
|
||||
pointIOField newPoints
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"points",
|
||||
mesh.time().timeName(),
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
// Read new points
|
||||
io.readOpt() = IOobject::MUST_READ;
|
||||
pointIOField newPoints(io);
|
||||
|
||||
mesh.movePoints(newPoints);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,8 @@ forAllIter(HashTable<word>, volumeFields, fieldIter)
|
||||
const word& fieldName = fieldIter.key();
|
||||
const word& fieldType = fieldIter();
|
||||
|
||||
if (fieldName.size() > 2 && fieldName(fieldName.size() - 2, 2) != "_0")
|
||||
// ignore _0 fields
|
||||
if (fieldName.size() > 2 && fieldName(fieldName.size() - 2, 2) == "_0")
|
||||
{
|
||||
volumeFields.erase(fieldIter);
|
||||
}
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
# create a plugin that adds a reader to the ParaView GUI
|
||||
# it is added in the file dialog when doing opens/saves.
|
||||
|
||||
@ -16,8 +15,8 @@ LINK_DIRECTORIES(
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
$ENV{FOAM_SRC}/OpenFOAM/lnInclude
|
||||
$ENV{FOAM_SRC}/finiteVolume/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
||||
${PROJECT_SOURCE_DIR}/../vtkPV3Foam
|
||||
)
|
||||
|
||||
@ -52,3 +51,4 @@ TARGET_LINK_LIBRARIES(
|
||||
finiteVolume
|
||||
vtkPV3Foam
|
||||
)
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@ -16,8 +16,12 @@ SET(PVFoamReader_LIBS
|
||||
vtkGraphics
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES($ENV{FOAM_SRC}/OpenFOAM/lnInclude $ENV{FOAM_SRC}/finiteVolume/lnInclude)
|
||||
INCLUDE_DIRECTORIES($ENV{ParaView_INST_DIR}/include ../vtkFoam/lnInclude)
|
||||
INCLUDE_DIRECTORIES(
|
||||
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
||||
$ENV{ParaView_INST_DIR}/include
|
||||
../vtkFoam/lnInclude
|
||||
)
|
||||
ADD_DEFINITIONS(-D$ENV{WM_PRECISION_OPTION})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -72,3 +76,4 @@ CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReader.pvsm.in
|
||||
${PROJECT_BINARY_DIR}/../${PROJECT_NAME}.pvsm @ONLY IMMEDIATE)
|
||||
|
||||
TARGET_LINK_LIBRARIES(${PROJECT_NAME} OpenFOAM finiteVolume vtkFoam)
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@ -94,7 +94,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/browser/lnInclude \
|
||||
-I$(FOAM_SRC)/lagrangian/basic/lnInclude
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
$(FV_LIBS) \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
13
etc/bashrc
13
etc/bashrc
@ -23,16 +23,17 @@
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# Script
|
||||
# bashrc
|
||||
# etc/bashrc
|
||||
#
|
||||
# Description
|
||||
# Startup file for OpenFOAM
|
||||
# Sourced from ~/.profile or ~/.bashrc
|
||||
# Should be usable by any POSIX-compliant shell (eg, ksh)
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
export WM_PROJECT=OpenFOAM
|
||||
#export WM_PROJECT_VERSION=1.5
|
||||
#export WM_PROJECT_VERSION=1.5.x
|
||||
: ${WM_PROJECT_VERSION:=dev}; export WM_PROJECT_VERSION
|
||||
|
||||
|
||||
@ -53,7 +54,7 @@ foamInstall=$HOME/$WM_PROJECT
|
||||
# Location of site/user files
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
|
||||
export WM_PROJECT_DIR=$FOAM_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
|
||||
|
||||
|
||||
@ -163,7 +164,7 @@ esac
|
||||
cleanProg=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||
|
||||
# Remove anything under top-level foam directory
|
||||
wildCards="$FOAM_INST_DIR $HOME/$WM_PROJECT/$USER"
|
||||
wildCards="$WM_PROJECT_INST_DIR $HOME/$WM_PROJECT/$USER"
|
||||
|
||||
#- Clean path/PATH
|
||||
cleanPath=`$cleanProg "$PATH" "$wildCards"` && PATH="$cleanPath"
|
||||
@ -182,9 +183,7 @@ _foamSource()
|
||||
{
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]; then
|
||||
echo "Sourcing: $1"
|
||||
fi
|
||||
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
|
||||
. $1
|
||||
shift
|
||||
done
|
||||
|
||||
11
etc/cshrc
11
etc/cshrc
@ -23,7 +23,7 @@
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# Script
|
||||
# cshrc
|
||||
# etc/cshrc
|
||||
#
|
||||
# Description
|
||||
# Startup file for OpenFOAM
|
||||
@ -32,7 +32,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
setenv WM_PROJECT OpenFOAM
|
||||
#setenv WM_PROJECT_VERSION 1.5
|
||||
#setenv WM_PROJECT_VERSION 1.5.x
|
||||
if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
|
||||
|
||||
#!!User:
|
||||
@ -52,7 +52,7 @@ if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
|
||||
# Location of site/user files
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR
|
||||
setenv WM_PROJECT_DIR $FOAM_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
setenv WM_PROJECT_DIR $WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
|
||||
|
||||
|
||||
@ -167,7 +167,7 @@ if (! $?MANPATH) then
|
||||
endif
|
||||
|
||||
# Remove anything under top-level foam directory
|
||||
set wildCards="$FOAM_INST_DIR $HOME/$WM_PROJECT/$LOGNAME"
|
||||
set wildCards="$WM_PROJECT_INST_DIR $HOME/$WM_PROJECT/$LOGNAME"
|
||||
|
||||
#- Clean path/PATH
|
||||
set colonPath=`echo "$path" | sed -e 's/ /:/g'`
|
||||
@ -219,5 +219,8 @@ endif
|
||||
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset cleanProg
|
||||
unset wildCards
|
||||
unset colonPath
|
||||
unalias _foamSource
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# Script
|
||||
# settings.csh
|
||||
# etc/settings.csh
|
||||
#
|
||||
# Description
|
||||
# Startup file for OpenFOAM
|
||||
@ -31,60 +31,70 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
alias _foamAddPath 'set path=(\!* $path) ; if ( ! -d \!* ) mkdir -p \!*'
|
||||
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH} ; set xx=`echo $LD_LIBRARY_PATH | sed -e "s/:.*//"`; if ( ! -d $xx ) mkdir -p $xx'
|
||||
# prefix to PATH
|
||||
alias _foamAddPath 'set path=(\!* $path)'
|
||||
# prefix to LD_LIBRARY_PATH
|
||||
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
|
||||
# make directory if it doesn't already exist
|
||||
alias _foamMkDir 'if ( ! -d \!* ) mkdir -p \!*'
|
||||
|
||||
# location of the jobControl directory
|
||||
setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl
|
||||
|
||||
#- Add the system-specific executables path to the path
|
||||
set path=($WM_PROJECT_DIR/bin $FOAM_INST_DIR/$WM_ARCH/bin $path)
|
||||
|
||||
#- Location of the jobControl directory
|
||||
setenv FOAM_JOB_DIR $FOAM_INST_DIR/jobControl
|
||||
|
||||
# wmake configuration
|
||||
setenv WM_DIR $WM_PROJECT_DIR/wmake
|
||||
setenv WM_LINK_LANGUAGE c++
|
||||
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
set path=($WM_DIR $path)
|
||||
|
||||
# base configuration
|
||||
setenv FOAM_SRC $WM_PROJECT_DIR/src
|
||||
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
||||
setenv FOAM_LIBBIN $FOAM_LIB/$WM_OPTIONS
|
||||
_foamAddLib $FOAM_LIBBIN
|
||||
|
||||
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
||||
setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
||||
_foamAddPath $FOAM_APPBIN
|
||||
|
||||
# user configuration
|
||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
||||
|
||||
# convenience
|
||||
setenv FOAM_TUTORIALS $WM_PROJECT_DIR/tutorials
|
||||
setenv FOAM_UTILITIES $FOAM_APP/utilities
|
||||
setenv FOAM_SOLVERS $FOAM_APP/solvers
|
||||
|
||||
setenv FOAM_USER_LIBBIN $WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
_foamAddLib $FOAM_USER_LIBBIN
|
||||
|
||||
setenv FOAM_USER_APPBIN $WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
||||
_foamAddPath $FOAM_USER_APPBIN
|
||||
|
||||
setenv FOAM_RUN $WM_PROJECT_USER_DIR/run
|
||||
|
||||
# add OpenFOAM scripts and wmake to the path
|
||||
set path=($WM_DIR $WM_PROJECT_DIR/bin $path)
|
||||
|
||||
_foamAddPath $FOAM_APPBIN
|
||||
_foamAddPath $FOAM_USER_APPBIN
|
||||
_foamAddLib $FOAM_LIBBIN
|
||||
_foamAddLib $FOAM_USER_LIBBIN
|
||||
|
||||
# create these directories if necessary:
|
||||
_foamMkDir $FOAM_LIBBIN
|
||||
_foamMkDir $FOAM_APPBIN
|
||||
_foamMkDir $FOAM_USER_LIBBIN
|
||||
_foamMkDir $FOAM_USER_APPBIN
|
||||
|
||||
|
||||
# Compiler settings
|
||||
# ~~~~~~~~~~~~~~~~~
|
||||
set WM_COMPILER_BIN=
|
||||
set WM_COMPILER_LIB=
|
||||
set compilerBin=
|
||||
set compilerLib=
|
||||
|
||||
# Select compiler installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# WM_COMPILER_INST = OpenFOAM | System
|
||||
set WM_COMPILER_INST=OpenFOAM
|
||||
# compilerInstall = OpenFOAM | System
|
||||
set compilerInstall=OpenFOAM
|
||||
|
||||
switch ("$WM_COMPILER_INST")
|
||||
switch ("$compilerInstall")
|
||||
case OpenFOAM:
|
||||
switch ("$WM_COMPILER")
|
||||
case Gcc:
|
||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.3/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||
breaksw
|
||||
case Gcc42:
|
||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
@ -97,22 +107,22 @@ case OpenFOAM:
|
||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
||||
echo " Cannot find $WM_COMPILER_DIR installation."
|
||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||
echo " change the WM_COMPILER_INST setting to 'System' in this file"
|
||||
echo " change the 'compilerInstall' setting to 'System' in this file"
|
||||
echo
|
||||
endif
|
||||
|
||||
set WM_COMPILER_BIN="$WM_COMPILER_DIR/bin"
|
||||
set WM_COMPILER_LIB=$WM_COMPILER_DIR/lib${WM_COMPILER_LIB_ARCH}:$WM_COMPILER_DIR/lib
|
||||
set compilerBin=$WM_COMPILER_DIR/bin
|
||||
set compilerLib=$WM_COMPILER_DIR/lib$WM_COMPILER_LIB_ARCH:$WM_COMPILER_DIR/lib
|
||||
breaksw
|
||||
endsw
|
||||
|
||||
if ($?WM_COMPILER_BIN) then
|
||||
_foamAddPath $WM_COMPILER_BIN
|
||||
_foamAddLib $WM_COMPILER_LIB
|
||||
if ($?compilerBin) then
|
||||
_foamAddPath $compilerBin
|
||||
_foamAddLib $compilerLib
|
||||
endif
|
||||
|
||||
unset WM_COMPILER_BIN
|
||||
unset WM_COMPILER_LIB
|
||||
unset compilerBin
|
||||
unset compilerLib
|
||||
|
||||
|
||||
# Communications library
|
||||
@ -129,8 +139,8 @@ case OPENMPI:
|
||||
# Tell OpenMPI where to find its install directory
|
||||
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
||||
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
@ -143,8 +153,8 @@ case LAM:
|
||||
setenv LAMHOME $WM_THIRD_PARTY_DIR/$mpi_version
|
||||
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
||||
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
@ -156,8 +166,8 @@ case MPICH:
|
||||
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
|
||||
setenv MPICH_ROOT $MPI_ARCH_PATH
|
||||
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
@ -169,9 +179,9 @@ case MPICH-GM:
|
||||
setenv MPICH_ROOT $MPI_ARCH_PATH
|
||||
setenv GM_LIB_PATH /opt/gm/lib64
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddLib $GM_LIB_PATH
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
|
||||
breaksw
|
||||
@ -215,8 +225,8 @@ endif
|
||||
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unalias _foamAddLib
|
||||
unalias _foamAddPath
|
||||
|
||||
unalias _foamAddLib
|
||||
unalias _foamMkDir
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
107
etc/settings.sh
107
etc/settings.sh
@ -23,7 +23,7 @@
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
# Script
|
||||
# settings.sh
|
||||
# etc/settings.sh
|
||||
#
|
||||
# Description
|
||||
# Startup file for OpenFOAM
|
||||
@ -31,95 +31,89 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# prefix to PATH
|
||||
_foamAddPath()
|
||||
{
|
||||
if [ $# -eq 1 ]
|
||||
then
|
||||
oldIFS="$IFS"
|
||||
IFS=':' # split on ':'
|
||||
set -- $1
|
||||
IFS="$oldIFS"
|
||||
unset oldIFS
|
||||
fi
|
||||
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
[ -d $1 ] || mkdir -p $1
|
||||
export PATH=$1:$PATH
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
# prefix to LD_LIBRARY_PATH
|
||||
_foamAddLib()
|
||||
{
|
||||
if [ $# -eq 1 ]
|
||||
then
|
||||
oldIFS="$IFS"
|
||||
IFS=':' # split on ':'
|
||||
set -- $1
|
||||
IFS="$oldIFS"
|
||||
unset oldIFS
|
||||
fi
|
||||
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
[ -d $1 ] || mkdir -p $1
|
||||
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#- Add the system-specific executables path to the path
|
||||
export PATH=$WM_PROJECT_DIR/bin:$FOAM_INST_DIR/$WM_ARCH/bin:$PATH
|
||||
# make directories if they don't already exist
|
||||
_foamMkDir()
|
||||
{
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
[ -d $1 ] || mkdir -p $1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
#- Location of the jobControl directory
|
||||
export FOAM_JOB_DIR=$FOAM_INST_DIR/jobControl
|
||||
|
||||
# location of the jobControl directory
|
||||
export FOAM_JOB_DIR=$WM_PROJECT_INST_DIR/jobControl
|
||||
|
||||
# wmake configuration
|
||||
export WM_DIR=$WM_PROJECT_DIR/wmake
|
||||
export WM_LINK_LANGUAGE=c++
|
||||
export WM_OPTIONS=$WM_ARCH${WM_COMPILER}$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
export PATH=$WM_DIR:$PATH
|
||||
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
|
||||
# base configuration
|
||||
export FOAM_SRC=$WM_PROJECT_DIR/src
|
||||
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
||||
export FOAM_LIBBIN=$FOAM_LIB/$WM_OPTIONS
|
||||
_foamAddLib $FOAM_LIBBIN
|
||||
|
||||
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_APP=$WM_PROJECT_DIR/applications
|
||||
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
||||
_foamAddPath $FOAM_APPBIN
|
||||
|
||||
# user configuration
|
||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
||||
|
||||
# convenience
|
||||
export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
|
||||
export FOAM_UTILITIES=$FOAM_APP/utilities
|
||||
export FOAM_SOLVERS=$FOAM_APP/solvers
|
||||
|
||||
export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/lib/$WM_OPTIONS
|
||||
_foamAddLib $FOAM_USER_LIBBIN
|
||||
|
||||
export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/applications/bin/$WM_OPTIONS
|
||||
_foamAddPath $FOAM_USER_APPBIN
|
||||
|
||||
export FOAM_RUN=$WM_PROJECT_USER_DIR/run
|
||||
|
||||
# add OpenFOAM scripts and wmake to the path
|
||||
export PATH=$WM_DIR:$WM_PROJECT_DIR/bin:$PATH
|
||||
|
||||
_foamAddPath $FOAM_APPBIN $FOAM_USER_APPBIN
|
||||
_foamAddLib $FOAM_LIBBIN $FOAM_USER_LIBBIN
|
||||
|
||||
# create these directories if necessary:
|
||||
_foamMkDir $FOAM_LIBBIN $FOAM_USER_LIBBIN $FOAM_APPBIN $FOAM_USER_APPBIN
|
||||
|
||||
|
||||
# Compiler settings
|
||||
# ~~~~~~~~~~~~~~~~~
|
||||
WM_COMPILER_BIN=
|
||||
WM_COMPILER_LIB=
|
||||
unset compilerBin compilerLib
|
||||
|
||||
# Select compiler installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# WM_COMPILER_INST = OpenFOAM | System
|
||||
WM_COMPILER_INST=OpenFOAM
|
||||
# compilerInstall = OpenFOAM | System
|
||||
compilerInstall=OpenFOAM
|
||||
|
||||
case "$WM_COMPILER_INST" in
|
||||
case "$compilerInstall" in
|
||||
OpenFOAM)
|
||||
case "$WM_COMPILER" in
|
||||
Gcc)
|
||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
_foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.3/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||
_foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib
|
||||
;;
|
||||
Gcc42)
|
||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||
@ -133,21 +127,22 @@ OpenFOAM)
|
||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
||||
echo " Cannot find $WM_COMPILER_DIR installation."
|
||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
||||
echo " change the WM_COMPILER_INST setting to 'System' in this file"
|
||||
echo " change the 'compilerInstall' setting to 'System' in this file"
|
||||
echo
|
||||
fi
|
||||
|
||||
WM_COMPILER_BIN=$WM_COMPILER_DIR/bin
|
||||
WM_COMPILER_LIB=$WM_COMPILER_DIR/lib$WM_COMPILER_LIB_ARCH:$WM_COMPILER_DIR/lib
|
||||
compilerBin=$WM_COMPILER_DIR/bin
|
||||
compilerLib=$WM_COMPILER_DIR/lib$WM_COMPILER_LIB_ARCH:$WM_COMPILER_DIR/lib
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -d "$WM_COMPILER_BIN" ]; then
|
||||
_foamAddPath $WM_COMPILER_BIN
|
||||
_foamAddLib $WM_COMPILER_LIB
|
||||
if [ -d "$compilerBin" ]
|
||||
then
|
||||
_foamAddPath $compilerBin
|
||||
_foamAddLib $compilerLib
|
||||
fi
|
||||
|
||||
unset WM_COMPILER_BIN WM_COMPILER_LIB
|
||||
unset compilerBin compilerLib compilerInstall
|
||||
|
||||
# Communications library
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -163,8 +158,8 @@ OPENMPI)
|
||||
# Tell OpenMPI where to find its install directory
|
||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
@ -177,8 +172,8 @@ LAM)
|
||||
export LAMHOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
||||
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
@ -190,8 +185,8 @@ MPICH)
|
||||
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
||||
export MPICH_ROOT=$MPI_ARCH_PATH
|
||||
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||
unset mpi_version
|
||||
@ -203,9 +198,9 @@ MPICH-GM)
|
||||
export MPICH_ROOT=$MPI_ARCH_PATH
|
||||
export GM_LIB_PATH=/opt/gm/lib64
|
||||
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
_foamAddLib $MPI_ARCH_PATH/lib
|
||||
_foamAddLib $GM_LIB_PATH
|
||||
_foamAddPath $MPI_ARCH_PATH/bin
|
||||
|
||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
|
||||
;;
|
||||
@ -247,6 +242,6 @@ export MPI_BUFFER_SIZE=20000000
|
||||
|
||||
# cleanup environment:
|
||||
# ~~~~~~~~~~~~~~~~~~~~
|
||||
unset _foamAddLib _foamAddPath
|
||||
unset _foamAddPath _foamAddLib _foamMkDir
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@ -83,6 +83,19 @@ HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht)
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
HashTable<T, Key, Hash>::HashTable(const xfer<HashTable<T, Key, Hash> >& ht)
|
||||
:
|
||||
HashTableName(),
|
||||
tableSize_(0),
|
||||
table_(NULL),
|
||||
nElmts_(0),
|
||||
endIter_(*this, NULL, 0),
|
||||
endConstIter_(*this, NULL, 0)
|
||||
{
|
||||
transfer(*ht);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -41,6 +41,7 @@ SourceFiles
|
||||
#include "label.H"
|
||||
#include "word.H"
|
||||
#include "className.H"
|
||||
#include "xfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -155,6 +156,9 @@ public:
|
||||
//- Construct as copy
|
||||
HashTable(const HashTable<T, Key, Hash>&);
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
HashTable(const xfer<HashTable<T, Key, Hash> >&);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
|
||||
@ -76,6 +76,24 @@ StaticHashTable<T, Key, Hash>::StaticHashTable
|
||||
{}
|
||||
|
||||
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
StaticHashTable<T, Key, Hash>::StaticHashTable
|
||||
(
|
||||
const xfer<StaticHashTable<T, Key, Hash> >& ht
|
||||
)
|
||||
:
|
||||
StaticHashTableName(),
|
||||
keys_(0),
|
||||
objects_(0),
|
||||
nElmts_(0),
|
||||
endIter_(*this, 0, 0),
|
||||
endConstIter_(*this, 0, 0)
|
||||
{
|
||||
transfer(*ht);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class T, class Key, class Hash>
|
||||
|
||||
@ -46,6 +46,7 @@ SourceFiles
|
||||
#include "label.H"
|
||||
#include "word.H"
|
||||
#include "className.H"
|
||||
#include "xfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -146,6 +147,8 @@ public:
|
||||
//- Construct as copy
|
||||
StaticHashTable(const StaticHashTable<T, Key, Hash>&);
|
||||
|
||||
//- Construct as copy
|
||||
StaticHashTable(const xfer<StaticHashTable<T, Key, Hash> >&);
|
||||
|
||||
// Destructor
|
||||
|
||||
|
||||
@ -92,6 +92,12 @@ CompactListList<T>::CompactListList(const UList<label>& rowSizes, const T& t)
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
CompactListList<T>::CompactListList(const xfer<CompactListList<T> >& lst)
|
||||
{
|
||||
transfer(*lst);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
CompactListList<T>::CompactListList(CompactListList<T>& cll, bool reUse)
|
||||
:
|
||||
|
||||
@ -103,6 +103,9 @@ public:
|
||||
//- Construct given list of row-sizes
|
||||
CompactListList(const UList<label>& rowSizes, const T&);
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
CompactListList(const xfer<CompactListList<T> >&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
CompactListList(CompactListList<T>&, bool reUse);
|
||||
|
||||
|
||||
@ -84,6 +84,10 @@ class DynamicList
|
||||
//- Allocated size for underlying List.
|
||||
label allocSize_;
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
// Disabled, since the usefulness and semantics are not quite clear
|
||||
void setSize(const label, const T&);
|
||||
|
||||
public:
|
||||
|
||||
@ -117,12 +121,14 @@ public:
|
||||
|
||||
// Edit
|
||||
|
||||
//- Reset size of List.
|
||||
//- Alter the list size.
|
||||
// When the new size is greater than the addressed list size, the
|
||||
// allocated list sizes is adjusted and the
|
||||
// addressed size does not change.
|
||||
// Otherwise the addressed list size is just reduced and the
|
||||
// allocated size does not change.
|
||||
inline void setSize(const label);
|
||||
|
||||
//- Reset size of List and value for new elements.
|
||||
inline void setSize(const label, const T&);
|
||||
|
||||
//- Clear the list, i.e. set the size to zero.
|
||||
// Allocated size does not change
|
||||
inline void clear();
|
||||
@ -156,7 +162,7 @@ public:
|
||||
// resizing the list if necessary
|
||||
inline T& operator()(const label);
|
||||
|
||||
//- Assignment of all entries to the given value
|
||||
//- Assignment of all addressed entries to the given value
|
||||
inline void operator=(const T&);
|
||||
|
||||
//- Assignment from List<T>. Also handles assignment from DynamicList.
|
||||
|
||||
@ -33,7 +33,7 @@ inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList()
|
||||
List<T>(SizeInc),
|
||||
allocSize_(SizeInc)
|
||||
{
|
||||
List<T>::size() = 0;
|
||||
List<T>::size(0);
|
||||
}
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
|
||||
List<T>(s),
|
||||
allocSize_(s)
|
||||
{
|
||||
List<T>::size() = 0;
|
||||
List<T>::size(0);
|
||||
}
|
||||
|
||||
|
||||
@ -79,18 +79,19 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
|
||||
const label s
|
||||
)
|
||||
{
|
||||
if (s <= List<T>::size())
|
||||
label nextFree = List<T>::size();
|
||||
if (s <= nextFree)
|
||||
{
|
||||
// shrink addressable size, leave allocated size untouched
|
||||
List<T>::size() = s;
|
||||
// adjust addressed size, leave allocated size untouched
|
||||
nextFree = s;
|
||||
}
|
||||
else
|
||||
{
|
||||
label nextFree = List<T>::size();
|
||||
// adjust allocated size, leave addressed size untouched
|
||||
allocSize_ = s;
|
||||
List<T>::setSize(allocSize_);
|
||||
List<T>::size() = nextFree;
|
||||
}
|
||||
List<T>::size(nextFree);
|
||||
}
|
||||
|
||||
|
||||
@ -112,14 +113,17 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
|
||||
allocSize_ = s;
|
||||
List<T>::setSize(allocSize_, t);
|
||||
List<T>::size() = nextFree;
|
||||
=======
|
||||
>>>>>>> olesenm:src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H
|
||||
}
|
||||
List<T>::size(nextFree);
|
||||
}
|
||||
|
||||
|
||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||
inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::clear()
|
||||
{
|
||||
List<T>::size() = 0;
|
||||
List<T>::size(0);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +197,7 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::append(const T& e)
|
||||
List<T>::setSize(allocSize_);
|
||||
}
|
||||
|
||||
List<T>::size() = nextFree;
|
||||
List<T>::size(nextFree);
|
||||
|
||||
this->operator[](nextFree - 1) = e;
|
||||
}
|
||||
@ -214,7 +218,7 @@ inline T Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::remove()
|
||||
|
||||
const T& val = List<T>::operator[](nextFree);
|
||||
|
||||
List<T>::size() = nextFree;
|
||||
List<T>::size(nextFree);
|
||||
|
||||
return val;
|
||||
}
|
||||
@ -242,7 +246,7 @@ inline T& Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator()
|
||||
List<T>::setSize(allocSize_);
|
||||
}
|
||||
|
||||
List<T>::size() = nextFree;
|
||||
List<T>::size(nextFree);
|
||||
|
||||
return this->operator[](i);
|
||||
}
|
||||
@ -255,7 +259,6 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
|
||||
)
|
||||
{
|
||||
List<T>::operator=(t);
|
||||
allocSize_ = List<T>::size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -125,6 +125,14 @@ Foam::List<T>::List(const List<T>& a)
|
||||
}
|
||||
|
||||
|
||||
// Construct by transferring the parameter contents
|
||||
template<class T>
|
||||
Foam::List<T>::List(const xfer<List<T> >& lst)
|
||||
{
|
||||
transfer(*lst);
|
||||
}
|
||||
|
||||
|
||||
// Construct as copy or re-use as specified.
|
||||
template<class T>
|
||||
Foam::List<T>::List(List<T>& a, bool reUse)
|
||||
|
||||
@ -43,6 +43,7 @@ SourceFiles
|
||||
|
||||
#include "UList.H"
|
||||
#include "autoPtr.H"
|
||||
#include "xfer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -77,6 +78,12 @@ class List
|
||||
public UList<T>
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
//- Override size to be inconsistent with allocated storage.
|
||||
// Use with care.
|
||||
inline void size(const label);
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
@ -93,6 +100,9 @@ public:
|
||||
//- Copy constructor.
|
||||
List(const List<T>&);
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
List(const xfer<List<T> >&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
List(List<T>&, bool reUse);
|
||||
|
||||
@ -142,9 +152,6 @@ public:
|
||||
//- Return the number of elements in the UList.
|
||||
inline label size() const;
|
||||
|
||||
//- Override size to be inconsistent with allocated storage.
|
||||
// Use with care.
|
||||
inline label& size();
|
||||
|
||||
// Edit
|
||||
|
||||
|
||||
@ -53,19 +53,18 @@ inline T& Foam::List<T>::newElmt(const label i)
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::label Foam::List<T>::size() const
|
||||
inline void Foam::List<T>::size(const label n)
|
||||
{
|
||||
return UList<T>::size_;
|
||||
UList<T>::size_ = n;
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::label& Foam::List<T>::size()
|
||||
inline Foam::label Foam::List<T>::size() const
|
||||
{
|
||||
return UList<T>::size_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
|
||||
@ -44,6 +44,7 @@ PackedList<nBits>::PackedList(const label size, const unsigned int val)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//- Copy constructor.
|
||||
template<int nBits>
|
||||
PackedList<nBits>::PackedList(const PackedList<nBits>& PList)
|
||||
@ -53,6 +54,13 @@ PackedList<nBits>::PackedList(const PackedList<nBits>& PList)
|
||||
{}
|
||||
|
||||
|
||||
template<int nBits>
|
||||
PackedList<nBits>::PackedList(const xfer<PackedList<nBits> >& lst)
|
||||
{
|
||||
transfer(*lst);
|
||||
}
|
||||
|
||||
|
||||
//- Construct from labelList
|
||||
template<int nBits>
|
||||
PackedList<nBits>::PackedList(const labelList& lst)
|
||||
|
||||
@ -134,6 +134,9 @@ public:
|
||||
//- Copy constructor.
|
||||
PackedList(const PackedList<nBits>& PList);
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
PackedList(const xfer<PackedList<nBits> >&);
|
||||
|
||||
//- Construct from labelList.
|
||||
PackedList(const labelList&);
|
||||
|
||||
|
||||
@ -71,6 +71,13 @@ Foam::PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
Foam::PtrList<T>::PtrList(const xfer<PtrList<T> >& lst)
|
||||
{
|
||||
transfer(*lst);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
|
||||
:
|
||||
|
||||
@ -129,6 +129,9 @@ public:
|
||||
template<class CloneArg>
|
||||
PtrList(const PtrList<T>&, const CloneArg&);
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
PtrList(const xfer<PtrList<T> >&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
PtrList(PtrList<T>&, bool reUse);
|
||||
|
||||
|
||||
@ -40,6 +40,17 @@ Foam::SortableList<Type>::SortableList(const List<Type>& values)
|
||||
sort();
|
||||
}
|
||||
|
||||
// Construct from List by transferring
|
||||
template <class Type>
|
||||
Foam::SortableList<Type>::SortableList(const xfer<List<Type> >& values)
|
||||
:
|
||||
List<Type>(),
|
||||
indices_((*values).size())
|
||||
{
|
||||
List<Type>::transfer(*values);
|
||||
sort();
|
||||
}
|
||||
|
||||
|
||||
// Construct given size. Sort later on.
|
||||
template <class Type>
|
||||
@ -86,7 +97,7 @@ void Foam::SortableList<Type>::sort()
|
||||
indices_[i] = i;
|
||||
}
|
||||
|
||||
//Foam::sort(indices_, less(*this));
|
||||
// Foam::sort(indices_, less(*this));
|
||||
Foam::stableSort(indices_, less(*this));
|
||||
|
||||
List<Type> tmpValues(this->size());
|
||||
|
||||
@ -29,6 +29,8 @@ Description
|
||||
A list that is sorted upon construction or when explicitly requested
|
||||
with the sort() method.
|
||||
|
||||
Uses the Foam::stableSort() algorithm.
|
||||
|
||||
SourceFiles
|
||||
SortableList.C
|
||||
|
||||
@ -84,10 +86,14 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from List, sorting the elements. Starts with indices set
|
||||
// to index in argument
|
||||
//- Construct from List, sorting the elements.
|
||||
// Starts with indices set to index in argument
|
||||
explicit SortableList(const List<Type>&);
|
||||
|
||||
//- Construct from tranferred List, sorting the elements.
|
||||
// Starts with indices set to index in argument
|
||||
explicit SortableList(const xfer<List<Type> >&);
|
||||
|
||||
//- Construct given size. Sort later on.
|
||||
explicit SortableList(const label size);
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ void Foam::UList<T>::writeEntry(const word& keyword, Ostream& os) const
|
||||
|
||||
|
||||
template<class T>
|
||||
Foam::Ostream& Foam:: operator<<(Foam::Ostream& os, const Foam::UList<T>& L)
|
||||
Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::UList<T>& L)
|
||||
{
|
||||
// Write list contents depending on data format
|
||||
if (os.format() == IOstream::ASCII || !contiguous<T>())
|
||||
|
||||
@ -50,6 +50,13 @@ UPtrList<T>::UPtrList(const label s)
|
||||
{}
|
||||
|
||||
|
||||
template<class T>
|
||||
UPtrList<T>::UPtrList(const xfer<UPtrList<T> >& lst)
|
||||
{
|
||||
transfer(*lst);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
|
||||
:
|
||||
|
||||
@ -110,6 +110,9 @@ public:
|
||||
//- Construct with length specified.
|
||||
explicit UPtrList(const label);
|
||||
|
||||
//- Construct by transferring the parameter contents
|
||||
UPtrList(const xfer<UPtrList<T> >&);
|
||||
|
||||
//- Construct as copy or re-use as specified.
|
||||
UPtrList(UPtrList<T>&, bool reUse);
|
||||
|
||||
|
||||
155
src/OpenFOAM/containers/misc/xfer.H
Normal file
155
src/OpenFOAM/containers/misc/xfer.H
Normal file
@ -0,0 +1,155 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 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 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::xfer
|
||||
|
||||
Description
|
||||
A simple container that can be used to copy or transfer the contents
|
||||
of objects of type \<T\>.
|
||||
|
||||
Since it is decided upon construction of the xfer object whether the
|
||||
parameter is to be copied or transferred, the contents of resulting
|
||||
object can be transferred unconditionally.
|
||||
|
||||
This greatly simplifies defining the constructors for other classes
|
||||
with mixed transfer/copy semantics.
|
||||
|
||||
The wrapped object of type \<T\> must implement a transfer() method and
|
||||
an operator=() copy method.
|
||||
|
||||
Note
|
||||
The macros xferCopy(T,arg) and xferMove(T,arg) can be used as
|
||||
workarounds for passing temporaries to copy-constructors.
|
||||
|
||||
SourceFiles
|
||||
xferI.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef xfer_H
|
||||
#define xfer_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class xfer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class T>
|
||||
class xfer
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Pointer to temporary object
|
||||
mutable T* ptr_;
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Store object pointer and manage its deletion
|
||||
// Can also be used later to transfer by assignment
|
||||
inline explicit xfer(T* = 0);
|
||||
|
||||
//- Construct by copying or by transferring the parameter contents
|
||||
inline xfer(T&, bool allowTransfer=false);
|
||||
|
||||
//- Construct by copying the parameter contents
|
||||
inline xfer(const T&);
|
||||
|
||||
//- Construct by transferring the contents
|
||||
inline xfer(const xfer<T>&);
|
||||
|
||||
// Destructor
|
||||
|
||||
inline ~xfer();
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Transfer the contents into the object
|
||||
inline void operator=(T&);
|
||||
|
||||
//- Transfer the contents into the object
|
||||
inline void operator=(const xfer<T>&);
|
||||
|
||||
//- Return a non-const reference to const object
|
||||
// @sa xferCopy, xferMove macros alternatives for copy-constructors
|
||||
inline const xfer<T>& operator()() const;
|
||||
|
||||
//- Reference to the underlying datatype
|
||||
inline T& operator*() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
/**
|
||||
* @def xferCopy(T,arg)
|
||||
* Construct by copying the contents of the @a arg
|
||||
* and return a const reference to an xfer of type \<T\>
|
||||
*
|
||||
* Useful for constructors where the argument is temporary.
|
||||
* This is a workaround for a template resolution issue.
|
||||
*
|
||||
* @sa xferMove and Foam::xfer
|
||||
*/
|
||||
#define xferCopy(T,arg) \
|
||||
(static_cast<const Foam::xfer< T >&>(Foam::xfer< T >(arg)()))
|
||||
|
||||
/**
|
||||
* @def xferMove(T,arg)
|
||||
* Construct by transferring the contents of the @a arg
|
||||
* and return a const reference to an xfer of type \<T\>
|
||||
*
|
||||
* Useful for constructors where the argument is temporary.
|
||||
* This is a workaround for a template resolution issue.
|
||||
*
|
||||
* @par Example Use
|
||||
* @code
|
||||
* List<label> a;
|
||||
* ...
|
||||
* List<label> b(xferMove(List<label>, a));
|
||||
* @endcode
|
||||
*
|
||||
* @sa xferCopy and Foam::xfer
|
||||
*/
|
||||
#define xferMove(T,arg) \
|
||||
(static_cast<const Foam::xfer< T >&>(Foam::xfer< T >(arg, true)()))
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "xferI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
113
src/OpenFOAM/containers/misc/xferI.H
Normal file
113
src/OpenFOAM/containers/misc/xferI.H
Normal file
@ -0,0 +1,113 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2008 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 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
inline Foam::xfer<T>::xfer(T* p)
|
||||
:
|
||||
ptr_(p ? p : new T)
|
||||
{}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::xfer<T>::xfer(T& t, bool allowTransfer)
|
||||
:
|
||||
ptr_(new T)
|
||||
{
|
||||
if (allowTransfer)
|
||||
{
|
||||
ptr_->transfer(t);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_->operator=(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::xfer<T>::xfer(const T& t)
|
||||
:
|
||||
ptr_(new T)
|
||||
{
|
||||
ptr_->operator=(t);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline Foam::xfer<T>::xfer(const xfer<T>& t)
|
||||
:
|
||||
ptr_(new T)
|
||||
{
|
||||
ptr_->transfer(*(t.ptr_));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
inline Foam::xfer<T>::~xfer()
|
||||
{
|
||||
delete ptr_;
|
||||
ptr_ = 0;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
inline void Foam::xfer<T>::operator=(T& t)
|
||||
{
|
||||
ptr_->transfer(t);
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline void Foam::xfer<T>::operator=(const xfer<T>& t)
|
||||
{
|
||||
// silently ignore copy to self
|
||||
if (this != &t)
|
||||
{
|
||||
ptr_->transfer(*(t.ptr_));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline const Foam::xfer<T>& Foam::xfer<T>::operator()() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
inline T& Foam::xfer<T>::operator*() const
|
||||
{
|
||||
return *ptr_;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -155,7 +155,7 @@ protected:
|
||||
// Protected member functions
|
||||
|
||||
//- Construct and return an IFstream for the object.
|
||||
// The results is NULL if the stream constuction failed
|
||||
// The results is NULL if the stream construction failed
|
||||
Istream* objectStream();
|
||||
|
||||
//- Set the object state to bad
|
||||
|
||||
@ -29,41 +29,15 @@ License
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::IOField<Type>::IOField
|
||||
(
|
||||
const IOobject& io
|
||||
)
|
||||
Foam::IOField<Type>::IOField(const IOobject& io)
|
||||
:
|
||||
regIOobject(io),
|
||||
Field<Type>(readStream(typeName))
|
||||
regIOobject(io)
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::IOField<Type>::IOField
|
||||
(
|
||||
const IOobject& io,
|
||||
const label size
|
||||
)
|
||||
:
|
||||
regIOobject(io),
|
||||
Field<Type>(size)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::IOField<Type>::IOField
|
||||
(
|
||||
const IOobject& io,
|
||||
const Field<Type>& f
|
||||
)
|
||||
:
|
||||
regIOobject(io),
|
||||
Field<Type>(f)
|
||||
{
|
||||
if (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
if
|
||||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
)
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
@ -71,11 +45,77 @@ Foam::IOField<Type>::IOField
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::IOField<Type>::IOField(const IOobject& io, const label size)
|
||||
:
|
||||
regIOobject(io)
|
||||
{
|
||||
if
|
||||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
)
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
}
|
||||
else
|
||||
{
|
||||
Field<Type>::setSize(size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f)
|
||||
:
|
||||
regIOobject(io)
|
||||
{
|
||||
if
|
||||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
)
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
}
|
||||
else
|
||||
{
|
||||
Field<Type>::operator=(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
Foam::IOField<T>::~IOField()
|
||||
template<class Type>
|
||||
Foam::IOField<Type>::~IOField()
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
bool Foam::IOField<Type>::writeData(Ostream& os) const
|
||||
{
|
||||
return (os << static_cast<const Field<Type>&>(*this)).good();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void Foam::IOField<Type>::operator=(const IOField<Type>& rhs)
|
||||
{
|
||||
Field<Type>::operator=(rhs);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::IOField<Type>::operator=(const Field<Type>& rhs)
|
||||
{
|
||||
Field<Type>::operator=(rhs);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -63,24 +63,13 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from IOobject
|
||||
IOField
|
||||
(
|
||||
const IOobject&
|
||||
);
|
||||
IOField(const IOobject&);
|
||||
|
||||
//- Construct from components
|
||||
IOField
|
||||
(
|
||||
const IOobject&,
|
||||
const Field<Type>&
|
||||
);
|
||||
IOField(const IOobject&, const Field<Type>&);
|
||||
|
||||
//- Construct from IOobject and size (does not set values)
|
||||
IOField
|
||||
(
|
||||
const IOobject&,
|
||||
const label size
|
||||
);
|
||||
IOField(const IOobject&, const label size);
|
||||
|
||||
|
||||
// Destructor
|
||||
@ -90,23 +79,14 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
bool writeData(Ostream& os) const
|
||||
{
|
||||
return (os << static_cast<const Field<Type>&>(*this)).good();
|
||||
}
|
||||
bool writeData(Ostream&) const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
void operator=(const IOField<Type>& iof)
|
||||
{
|
||||
Field<Type>::operator=(iof);
|
||||
}
|
||||
void operator=(const IOField<Type>&);
|
||||
|
||||
void operator=(const Field<Type>& f)
|
||||
{
|
||||
Field<Type>::operator=(f);
|
||||
}
|
||||
void operator=(const Field<Type>&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -84,7 +84,6 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list)
|
||||
{
|
||||
List<T>::operator=(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -95,6 +94,16 @@ Foam::IOList<T>::~IOList()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
bool Foam::IOList<T>::writeData(Ostream& os) const
|
||||
{
|
||||
return (os << *this).good();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
@ -111,11 +120,4 @@ void Foam::IOList<T>::operator=(const List<T>& rhs)
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
bool Foam::IOList<T>::writeData(Ostream& os) const
|
||||
{
|
||||
return (os << *this).good();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -31,8 +31,7 @@ License
|
||||
template<class T>
|
||||
Foam::IOMap<T>::IOMap(const IOobject& io)
|
||||
:
|
||||
regIOobject(io),
|
||||
Map<T>()
|
||||
regIOobject(io)
|
||||
{
|
||||
if
|
||||
(
|
||||
|
||||
@ -91,14 +91,7 @@ Foam::IOPtrList<T>::~IOPtrList()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
void Foam::IOPtrList<T>::operator=(const IOPtrList<T>& rhs)
|
||||
{
|
||||
PtrList<T>::operator=(rhs);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
bool Foam::IOPtrList<T>::writeData(Ostream& os) const
|
||||
@ -107,4 +100,12 @@ bool Foam::IOPtrList<T>::writeData(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
void Foam::IOPtrList<T>::operator=(const IOPtrList<T>& rhs)
|
||||
{
|
||||
PtrList<T>::operator=(rhs);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -42,15 +42,10 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::IOdictionary::IOdictionary
|
||||
(
|
||||
const IOobject& io
|
||||
)
|
||||
Foam::IOdictionary::IOdictionary(const IOobject& io)
|
||||
:
|
||||
regIOobject(io)
|
||||
{
|
||||
dictionary::name() = IOobject::objectPath();
|
||||
|
||||
if
|
||||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
@ -60,18 +55,29 @@ Foam::IOdictionary::IOdictionary
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
}
|
||||
|
||||
dictionary::name() = IOobject::objectPath();
|
||||
}
|
||||
|
||||
|
||||
Foam::IOdictionary::IOdictionary
|
||||
(
|
||||
const IOobject& io,
|
||||
const dictionary& dict
|
||||
)
|
||||
Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
|
||||
:
|
||||
regIOobject(io),
|
||||
dictionary(dict)
|
||||
regIOobject(io)
|
||||
{
|
||||
if
|
||||
(
|
||||
io.readOpt() == IOobject::MUST_READ
|
||||
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
)
|
||||
{
|
||||
readStream(typeName) >> *this;
|
||||
close();
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionary::operator=(dict);
|
||||
}
|
||||
|
||||
dictionary::name() = IOobject::objectPath();
|
||||
}
|
||||
|
||||
@ -92,9 +98,9 @@ const Foam::word& Foam::IOdictionary::name() const
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::IOdictionary::operator=(const IOdictionary& d)
|
||||
void Foam::IOdictionary::operator=(const IOdictionary& rhs)
|
||||
{
|
||||
dictionary::operator=(d);
|
||||
dictionary::operator=(rhs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,27 +34,17 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
bool IOdictionary::readData(Istream& is)
|
||||
bool Foam::IOdictionary::readData(Istream& is)
|
||||
{
|
||||
is >> *this;
|
||||
return !is.bad();
|
||||
}
|
||||
|
||||
|
||||
bool IOdictionary::writeData(Ostream& os) const
|
||||
bool Foam::IOdictionary::writeData(Ostream& os) const
|
||||
{
|
||||
dictionary::write(os, false);
|
||||
return os.good();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -63,7 +63,7 @@ class functionObjectList
|
||||
//- Dictionary containing the list of function object specifications
|
||||
const dictionary& foDict_;
|
||||
|
||||
//- Switch for the execultion of the functionObjects
|
||||
//- Switch for the execution of the functionObjects
|
||||
bool execution_;
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ public:
|
||||
// The functionObject specifications are read from the controlDict
|
||||
functionObjectList
|
||||
(
|
||||
const Time& t,
|
||||
const Time&,
|
||||
const bool execution = true
|
||||
);
|
||||
|
||||
@ -93,7 +93,7 @@ public:
|
||||
// setting
|
||||
functionObjectList
|
||||
(
|
||||
const Time& t,
|
||||
const Time&,
|
||||
const dictionary& foDict,
|
||||
const bool execution = true
|
||||
);
|
||||
|
||||
@ -101,7 +101,7 @@ public:
|
||||
//- Construct as copy
|
||||
regIOobject(const regIOobject&);
|
||||
|
||||
//- Construct as copy, and transfering registry registration to copy
|
||||
//- Construct as copy, and transferring registry registration to copy
|
||||
// if registerCopy is true
|
||||
regIOobject(const regIOobject&, bool registerCopy);
|
||||
|
||||
|
||||
@ -105,35 +105,31 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::readIfPresent()"
|
||||
) << "read option IOobject::MUST_READ "
|
||||
<< "suggests that a read constuctor for field " << this->name()
|
||||
<< "suggests that a read constructor for field " << this->name()
|
||||
<< " would be more appropriate." << endl;
|
||||
}
|
||||
else if (this->readOpt() == IOobject::READ_IF_PRESENT)
|
||||
else if (this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
|
||||
{
|
||||
if (this->headerOk())
|
||||
boundaryField_.transfer(readField(this->readStream(typeName))());
|
||||
this->close();
|
||||
|
||||
// Check compatibility between field and mesh
|
||||
if (this->size() != GeoMesh::size(this->mesh()))
|
||||
{
|
||||
boundaryField_.transfer(readField(this->readStream(typeName))());
|
||||
this->close();
|
||||
|
||||
// Check compatibility between field and mesh
|
||||
|
||||
if (this->size() != GeoMesh::size(this->mesh()))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"readIfPresent()",
|
||||
this->readStream(typeName)
|
||||
) << " number of field elements = " << this->size()
|
||||
<< " number of mesh elements = "
|
||||
<< GeoMesh::size(this->mesh())
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
readOldTimeIfPresent();
|
||||
|
||||
return true;
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"GeometricField<Type, PatchField, GeoMesh>::"
|
||||
"readIfPresent()",
|
||||
this->readStream(typeName)
|
||||
) << " number of field elements = " << this->size()
|
||||
<< " number of mesh elements = "
|
||||
<< GeoMesh::size(this->mesh())
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
readOldTimeIfPresent();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -149,7 +145,7 @@ bool Foam::GeometricField<Type, PatchField, GeoMesh>::readOldTimeIfPresent()
|
||||
this->name() + "_0",
|
||||
this->time().timeName(),
|
||||
this->db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
);
|
||||
|
||||
|
||||
@ -214,7 +214,7 @@ public:
|
||||
//- Construct from IOobject
|
||||
explicit polyMesh(const IOobject& io);
|
||||
|
||||
//- Construct from components without boundary.
|
||||
//- Construct without boundary from components.
|
||||
// Boundary is added using addPatches() member function
|
||||
polyMesh
|
||||
(
|
||||
@ -226,8 +226,7 @@ public:
|
||||
const bool syncPar = true
|
||||
);
|
||||
|
||||
//- Construct from components with cells rather than owner
|
||||
// and neighbourwithout boundary.
|
||||
//- Construct without boundary with cells rather than owner/neighbour.
|
||||
// Boundary is added using addPatches() member function
|
||||
polyMesh
|
||||
(
|
||||
@ -263,8 +262,7 @@ public:
|
||||
|
||||
// Database
|
||||
|
||||
//- Over-ride the objectRegistry dbDir
|
||||
// if this is single-region case
|
||||
//- Override the objectRegistry dbDir for a single-region case
|
||||
virtual const fileName& dbDir() const;
|
||||
|
||||
//- Return the local mesh directory (dbDir()/meshSubDir)
|
||||
@ -311,17 +309,17 @@ public:
|
||||
return bounds_;
|
||||
}
|
||||
|
||||
//- Return the vector of valid directions in mesh
|
||||
// defined according to the presence of empty patches.
|
||||
//- Return the vector of valid directions in mesh.
|
||||
// Defined according to the presence of empty patches.
|
||||
// 1 indicates valid direction and -1 an invalid direction.
|
||||
const Vector<label>& directions() const;
|
||||
|
||||
//- Return the number of valid geoemtric dimensions in the mesh
|
||||
//- Return the number of valid geometric dimensions in the mesh
|
||||
label nGeometricD() const;
|
||||
|
||||
//- Return the number of valid solution dimensions in the mesh
|
||||
//- Return the number of valid solution dimensions in the mesh.
|
||||
// For wedge cases this includes the circumferential direction
|
||||
// in case of swirl
|
||||
// in case of swirl.
|
||||
label nSolutionD() const;
|
||||
|
||||
//- Return point zone mesh
|
||||
|
||||
@ -114,6 +114,22 @@ Foam::cellZone::cellZone
|
||||
{}
|
||||
|
||||
|
||||
Foam::cellZone::cellZone
|
||||
(
|
||||
const word& name,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const cellZoneMesh& zm
|
||||
)
|
||||
:
|
||||
labelList(addr),
|
||||
name_(name),
|
||||
index_(index),
|
||||
zoneMesh_(zm),
|
||||
cellLookupMapPtr_(NULL)
|
||||
{}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::cellZone::cellZone
|
||||
(
|
||||
@ -148,6 +164,21 @@ Foam::cellZone::cellZone
|
||||
cellLookupMapPtr_(NULL)
|
||||
{}
|
||||
|
||||
Foam::cellZone::cellZone
|
||||
(
|
||||
const cellZone& cz,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const cellZoneMesh& zm
|
||||
)
|
||||
:
|
||||
labelList(addr),
|
||||
name_(cz.name()),
|
||||
index_(index),
|
||||
zoneMesh_(zm),
|
||||
cellLookupMapPtr_(NULL)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -128,26 +128,45 @@ public:
|
||||
const word& name,
|
||||
const labelList& addr,
|
||||
const label index,
|
||||
const cellZoneMesh& zm
|
||||
const cellZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct from components, transferring contents
|
||||
cellZone
|
||||
(
|
||||
const word& name,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const cellZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
cellZone
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const dictionary&,
|
||||
const label index,
|
||||
const cellZoneMesh& zm
|
||||
const cellZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original zone and resetting the
|
||||
// cell list and zone mesh information
|
||||
cellZone
|
||||
(
|
||||
const cellZone& cz,
|
||||
const cellZone&,
|
||||
const labelList& addr,
|
||||
const label index,
|
||||
const cellZoneMesh& zm
|
||||
const cellZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original zone, resetting the
|
||||
// cell list and zone mesh information
|
||||
cellZone
|
||||
(
|
||||
const cellZone&,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const cellZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the zone mesh
|
||||
@ -182,7 +201,7 @@ public:
|
||||
static autoPtr<cellZone> New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const dictionary&,
|
||||
const label index,
|
||||
const cellZoneMesh&
|
||||
);
|
||||
|
||||
@ -242,6 +242,30 @@ Foam::faceZone::faceZone
|
||||
}
|
||||
|
||||
|
||||
Foam::faceZone::faceZone
|
||||
(
|
||||
const word& name,
|
||||
const xfer<labelList>& addr,
|
||||
const xfer<boolList>& fm,
|
||||
const label index,
|
||||
const faceZoneMesh& zm
|
||||
)
|
||||
:
|
||||
labelList(addr),
|
||||
name_(name),
|
||||
flipMap_(fm),
|
||||
index_(index),
|
||||
zoneMesh_(zm),
|
||||
patchPtr_(NULL),
|
||||
masterCellsPtr_(NULL),
|
||||
slaveCellsPtr_(NULL),
|
||||
mePtr_(NULL),
|
||||
faceLookupMapPtr_(NULL)
|
||||
{
|
||||
checkAddressing();
|
||||
}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::faceZone::faceZone
|
||||
(
|
||||
@ -292,6 +316,30 @@ Foam::faceZone::faceZone
|
||||
}
|
||||
|
||||
|
||||
Foam::faceZone::faceZone
|
||||
(
|
||||
const faceZone& fz,
|
||||
const xfer<labelList>& addr,
|
||||
const xfer<boolList>& fm,
|
||||
const label index,
|
||||
const faceZoneMesh& zm
|
||||
)
|
||||
:
|
||||
labelList(addr),
|
||||
name_(fz.name()),
|
||||
flipMap_(fm),
|
||||
index_(index),
|
||||
zoneMesh_(zm),
|
||||
patchPtr_(NULL),
|
||||
masterCellsPtr_(NULL),
|
||||
slaveCellsPtr_(NULL),
|
||||
mePtr_(NULL),
|
||||
faceLookupMapPtr_(NULL)
|
||||
{
|
||||
checkAddressing();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::faceZone::~faceZone()
|
||||
|
||||
@ -163,24 +163,45 @@ public:
|
||||
const faceZoneMesh& zm
|
||||
);
|
||||
|
||||
//- Construct from components, transferring contents
|
||||
faceZone
|
||||
(
|
||||
const word& name,
|
||||
const xfer<labelList>& addr,
|
||||
const xfer<boolList>& fm,
|
||||
const label index,
|
||||
const faceZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
faceZone
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const dictionary&,
|
||||
const label index,
|
||||
const faceZoneMesh& zm
|
||||
const faceZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original zone and resetting the
|
||||
// face list and zone mesh information
|
||||
faceZone
|
||||
(
|
||||
const faceZone& fz,
|
||||
const faceZone&,
|
||||
const labelList& addr,
|
||||
const boolList& fm,
|
||||
const label index,
|
||||
const faceZoneMesh& zm
|
||||
const faceZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original zone, resetting the
|
||||
// face list and zone mesh information
|
||||
faceZone
|
||||
(
|
||||
const faceZone&,
|
||||
const xfer<labelList>& addr,
|
||||
const xfer<boolList>& fm,
|
||||
const label index,
|
||||
const faceZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the zone mesh
|
||||
@ -216,9 +237,9 @@ public:
|
||||
static autoPtr<faceZone> New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const dictionary&,
|
||||
const label index,
|
||||
const faceZoneMesh& zm
|
||||
const faceZoneMesh&
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -112,6 +112,22 @@ Foam::pointZone::pointZone
|
||||
{}
|
||||
|
||||
|
||||
Foam::pointZone::pointZone
|
||||
(
|
||||
const word& name,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const pointZoneMesh& zm
|
||||
)
|
||||
:
|
||||
labelList(addr),
|
||||
name_(name),
|
||||
index_(index),
|
||||
zoneMesh_(zm),
|
||||
pointLookupMapPtr_(NULL)
|
||||
{}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::pointZone::pointZone
|
||||
(
|
||||
@ -147,6 +163,22 @@ Foam::pointZone::pointZone
|
||||
{}
|
||||
|
||||
|
||||
Foam::pointZone::pointZone
|
||||
(
|
||||
const pointZone& pz,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const pointZoneMesh& zm
|
||||
)
|
||||
:
|
||||
labelList(addr),
|
||||
name_(pz.name()),
|
||||
index_(index),
|
||||
zoneMesh_(zm),
|
||||
pointLookupMapPtr_(NULL)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::pointZone::~pointZone()
|
||||
|
||||
@ -130,26 +130,45 @@ public:
|
||||
const word& name,
|
||||
const labelList& addr,
|
||||
const label index,
|
||||
const pointZoneMesh& zm
|
||||
const pointZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct from components, transferring contents
|
||||
pointZone
|
||||
(
|
||||
const word& name,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const pointZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
pointZone
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const dictionary&,
|
||||
const label index,
|
||||
const pointZoneMesh& zm
|
||||
const pointZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original zone and resetting the
|
||||
// point list and zone mesh information
|
||||
pointZone
|
||||
(
|
||||
const pointZone& pz,
|
||||
const pointZone&,
|
||||
const labelList& addr,
|
||||
const label index,
|
||||
const pointZoneMesh& zm
|
||||
const pointZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct given the original zone, resetting the
|
||||
// face list and zone mesh information
|
||||
pointZone
|
||||
(
|
||||
const pointZone&,
|
||||
const xfer<labelList>& addr,
|
||||
const label index,
|
||||
const pointZoneMesh&
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the zone mesh
|
||||
@ -184,7 +203,7 @@ public:
|
||||
static autoPtr<pointZone> New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
const dictionary&,
|
||||
const label index,
|
||||
const pointZoneMesh&
|
||||
);
|
||||
|
||||
@ -167,7 +167,7 @@ const labelList& primitiveMesh::pointCells
|
||||
}
|
||||
}
|
||||
|
||||
storage.size() = n;
|
||||
storage.setSize(n);
|
||||
|
||||
return storage;
|
||||
}
|
||||
|
||||
@ -60,8 +60,7 @@ protected:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Name of this set of forces,
|
||||
// Also used as the name of the probes directory.
|
||||
//- Name of this set of system calls
|
||||
word name_;
|
||||
|
||||
const objectRegistry& obr_;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=`basename $PWD`
|
||||
application=${PWD##*/}
|
||||
|
||||
setControlDict () {
|
||||
controlDict="system/controlDict"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=`basename $PWD`
|
||||
application=${PWD##*/}
|
||||
|
||||
cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped"
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=`basename $PWD`
|
||||
application=${PWD##*/}
|
||||
|
||||
setDamBreakFine ()
|
||||
{
|
||||
|
||||
@ -5,9 +5,10 @@
|
||||
# Get application directory
|
||||
application="laplacianFoam"
|
||||
|
||||
runIdeasToFoam ()
|
||||
runAnsysToFoam()
|
||||
{
|
||||
if [ -f log.ideasToFoam ] ; then
|
||||
if [ -f log.ansysToFoam ]
|
||||
then
|
||||
echo "ansysToFoam already run on $PWD: remove log file to run"
|
||||
else
|
||||
echo "ansysToFoam: converting mesh $1"
|
||||
@ -15,7 +16,7 @@ runIdeasToFoam ()
|
||||
fi
|
||||
}
|
||||
|
||||
runIdeasToFoam flange.ans 0.001
|
||||
runAnsysToFoam flange.ans 0.001
|
||||
runApplication $application
|
||||
runApplication foamToFieldview9
|
||||
runApplication foamToEnsight
|
||||
|
||||
@ -7,21 +7,21 @@ application="lesCavitatingFoam"
|
||||
|
||||
refineMeshByCellSet()
|
||||
{
|
||||
echo "creating cell set for primary zone - $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet >& log.cellSet.$1
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
echo "creating cell set for primary zone - $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet > log.cellSet.$1 2>&1
|
||||
|
||||
echo "refining primary zone - $1"
|
||||
refineMesh -dict -overwrite >& log.refineMesh.$1
|
||||
echo "refining primary zone - $1"
|
||||
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
cd throttle
|
||||
runApplication blockMesh
|
||||
|
||||
refineMeshByCellSet 1
|
||||
refineMeshByCellSet 2
|
||||
refineMeshByCellSet 3
|
||||
|
||||
refineMeshByCellSet 1 2 3
|
||||
runApplication $application
|
||||
cd ..
|
||||
|
||||
@ -29,10 +29,7 @@ cd throttle3D
|
||||
cp -r 0.org 0
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
refineMeshByCellSet 1
|
||||
refineMeshByCellSet 2
|
||||
refineMeshByCellSet 3
|
||||
refineMeshByCellSet 1 2 3
|
||||
|
||||
echo "mapping fields from 2D throttle case"
|
||||
mapFields ../throttle -sourceTime latestTime >& log.mapFields
|
||||
|
||||
@ -7,20 +7,19 @@ application="rasCavitatingFoam"
|
||||
|
||||
refineMeshByCellSet()
|
||||
{
|
||||
echo "creating cell set for primary zone - $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet >& log.cellSet.$1
|
||||
while [ $# -ge 1 ]
|
||||
do
|
||||
echo "creating cell set for primary zone - $1"
|
||||
cp system/cellSetDict.$1 system/cellSetDict
|
||||
cellSet > log.cellSet.$1 2>&1
|
||||
|
||||
echo "refining primary zone - $1"
|
||||
refineMesh -dict -overwrite >& log.refineMesh.$1
|
||||
echo "refining primary zone - $1"
|
||||
refineMesh -dict -overwrite > log.refineMesh.$1 2>&1
|
||||
shift
|
||||
done
|
||||
}
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
refineMeshByCellSet 1
|
||||
|
||||
refineMeshByCellSet 2
|
||||
|
||||
refineMeshByCellSet 3
|
||||
|
||||
refineMeshByCellSet 1 2 3
|
||||
runApplication $application
|
||||
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=`basename $PWD`
|
||||
application=${PWD##*/}
|
||||
|
||||
cases=" \
|
||||
shockTube \
|
||||
@ -15,12 +14,13 @@ LadenburgJet60psi \
|
||||
biconic25-55Run35 \
|
||||
"
|
||||
|
||||
moveTimeMeshToConstant () {
|
||||
DT=`foamInfoExec -times | tail -1`
|
||||
if [ $DT != 0 ] ; then
|
||||
mv ${DT}/polyMesh/* constant/polyMesh
|
||||
rm -rf ${DT}
|
||||
fi
|
||||
moveTimeMeshToConstant ()
|
||||
{
|
||||
DT=`foamInfoExec -times | tail -1`
|
||||
if [ "$DT" != 0 ] ; then
|
||||
mv ${DT}/polyMesh/* constant/polyMesh
|
||||
rm -rf ${DT}
|
||||
fi
|
||||
}
|
||||
|
||||
for case in $cases
|
||||
@ -51,4 +51,4 @@ do
|
||||
fi
|
||||
#
|
||||
(cd $case && runApplication $application)
|
||||
done
|
||||
done
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=`basename $PWD`
|
||||
application=${PWD##*/}
|
||||
|
||||
setDecompressionTankFine ()
|
||||
{
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application=`basename $PWD`
|
||||
application=${PWD##*/}
|
||||
|
||||
runStarToFoam ()
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application sonicTurbFoam;
|
||||
application sonicTurbFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
@ -52,16 +52,16 @@ functions
|
||||
// functionObjectLibs ("libforces.so");
|
||||
//
|
||||
// // Patches to sample
|
||||
// patches (WALL10);
|
||||
// patches (WALL10);
|
||||
// // Name of fields
|
||||
// pName p;
|
||||
// Uname U;
|
||||
// pName p;
|
||||
// UName U;
|
||||
// // Dump to file
|
||||
// log true;
|
||||
// log true;
|
||||
// // Density
|
||||
// rhoInf 1;
|
||||
// rhoInf 1;
|
||||
// // Centre of rotation
|
||||
// CofR (0 0 0);
|
||||
// CofR (0 0 0);
|
||||
//}
|
||||
|
||||
forces
|
||||
@ -70,16 +70,16 @@ functions
|
||||
functionObjectLibs ("libforces.so");
|
||||
|
||||
// Patches to sample
|
||||
patches (WALL10);
|
||||
patches (WALL10);
|
||||
// Name of fields
|
||||
pName p;
|
||||
Uname U;
|
||||
pName p;
|
||||
UName U;
|
||||
// Dump to file
|
||||
log true;
|
||||
log true;
|
||||
// Density
|
||||
rhoInf 1;
|
||||
rhoInf 1;
|
||||
// Centre of rotation
|
||||
CofR (0 0 0);
|
||||
CofR (0 0 0);
|
||||
|
||||
// Direction for lift
|
||||
liftDir (-0.239733 0.970839 0);
|
||||
@ -91,13 +91,10 @@ functions
|
||||
|
||||
magUInf 618.022;
|
||||
|
||||
lRef 1.0;
|
||||
lRef 1.0;
|
||||
Aref 1.0;
|
||||
}
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user