mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Commit after fixing moleculeIO.C conflict
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
#+TITLE: *OpenFOAM release notes for version 1.5*
|
#+TITLE: *OpenFOAM release notes for version 1.5*
|
||||||
#+AUTHOR: OpenCFD Ltd.
|
#+AUTHOR: OpenCFD Ltd.
|
||||||
#+DATE: 26 August 2008
|
#+DATE: 07 October 2008
|
||||||
#+LINK: http://www.opencfd.co.uk
|
#+LINK: http://www.opencfd.co.uk
|
||||||
#+OPTIONS: author:nil ^:{}
|
#+OPTIONS: author:nil ^:{}
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
and $WM_COMPILER_ARCH environment variables in the OpenFOAM-1.5/etc/bashrc
|
and $WM_COMPILER_ARCH environment variables in the OpenFOAM-1.5/etc/bashrc
|
||||||
(or cshrc) file.
|
(or cshrc) file.
|
||||||
+ The location of the installation of the compiler is controlled by the
|
+ 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.
|
(or settings.csh) file.
|
||||||
|
|
||||||
* Developments to solvers (applications)
|
* 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
|
$WM_COMPILER and $WM_COMPILER_ARCH environment variables in the
|
||||||
OpenFOAM-1.5/etc/bashrc (or cshrc) file.
|
OpenFOAM-1.5/etc/bashrc (or cshrc) file.
|
||||||
* The location of the installation of the compiler is controlled by the
|
* 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.
|
(or settings.csh) file.
|
||||||
|
|
||||||
4 Developments to solvers (applications)
|
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
|
* Non-blocking, non-buffered, parallel transfers with potential scaling
|
||||||
benefits for larger number of processors.
|
benefits for larger number of processors.
|
||||||
|
|
||||||
Date: 26 August 2008
|
Date: 07 October 2008
|
||||||
|
|
||||||
HTML generated by org-mode 6.06b in emacs 23
|
HTML generated by org-mode 6.06b in emacs 23
|
||||||
|
|
||||||
|
|||||||
@ -46,9 +46,6 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
|
||||||
volPointInterpolation vpi(mesh, pMesh);
|
|
||||||
|
|
||||||
word kinematicCloudName("kinematicCloud");
|
word kinematicCloudName("kinematicCloud");
|
||||||
|
|
||||||
if (args.options().found("cloudName"))
|
if (args.options().found("cloudName"))
|
||||||
@ -60,7 +57,6 @@
|
|||||||
basicKinematicCloud kinematicCloud
|
basicKinematicCloud kinematicCloud
|
||||||
(
|
(
|
||||||
kinematicCloudName,
|
kinematicCloudName,
|
||||||
vpi,
|
|
||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
thermo().mu(),
|
thermo().mu(),
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
Info << "Constructing Spray" << endl;
|
Info << "Constructing Spray" << endl;
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
|
||||||
volPointInterpolation vpi(mesh, pMesh);
|
|
||||||
|
|
||||||
PtrList<specieProperties> gasProperties(Y.size());
|
PtrList<specieProperties> gasProperties(Y.size());
|
||||||
forAll(gasProperties, i)
|
forAll(gasProperties, i)
|
||||||
{
|
{
|
||||||
@ -18,7 +15,6 @@ forAll(gasProperties, i)
|
|||||||
|
|
||||||
spray dieselSpray
|
spray dieselSpray
|
||||||
(
|
(
|
||||||
vpi,
|
|
||||||
U,
|
U,
|
||||||
rho,
|
rho,
|
||||||
p,
|
p,
|
||||||
|
|||||||
@ -41,6 +41,7 @@ Description
|
|||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
#include "volPointInterpolation.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -75,7 +76,10 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
|
||||||
|
|
||||||
mesh.move();
|
mesh.move();
|
||||||
vpi.updateMesh();
|
const_cast<volPointInterpolation&>
|
||||||
|
(
|
||||||
|
volPointInterpolation::New(mesh)
|
||||||
|
).updateMesh();
|
||||||
|
|
||||||
dieselSpray.evolve();
|
dieselSpray.evolve();
|
||||||
|
|
||||||
|
|||||||
@ -43,20 +43,58 @@ int main(int argc, char *argv[])
|
|||||||
ldl[0](3) = 3;
|
ldl[0](3) = 3;
|
||||||
ldl[0](1) = 1;
|
ldl[0](1) = 1;
|
||||||
|
|
||||||
ldl[1](0) = 1;
|
ldl[0].setSize(5); // increase allocated size
|
||||||
ldl[1](1) = 2;
|
ldl[1].setSize(10); // increase allocated size
|
||||||
|
ldl[1](2) = 2;
|
||||||
|
|
||||||
ldl[1] = 3;
|
ldl[1] = 3;
|
||||||
|
|
||||||
Info<< ldl[1];
|
Info<< "<ldl>" << ldl << "</ldl>" << nl << "sizes: ";
|
||||||
|
forAll(ldl, i)
|
||||||
|
{
|
||||||
|
Info<< " " << ldl[i].size() << "/" << ldl[i].allocSize();
|
||||||
|
}
|
||||||
|
Info<< endl;
|
||||||
|
|
||||||
List<List<label> > ll(2);
|
List<List<label> > ll(2);
|
||||||
ll[0].transfer(ldl[0].shrink());
|
ll[0].transfer(ldl[0]);
|
||||||
ll[1].transfer(ldl[1].shrink());
|
ll[1].transfer(ldl[1].shrink());
|
||||||
|
|
||||||
Info<< ll << endl;
|
Info<< "<ldl>" << ldl << "</ldl>" << nl << "sizes: ";
|
||||||
|
forAll(ldl, i)
|
||||||
|
{
|
||||||
|
Info<< " " << ldl[i].size() << "/" << ldl[i].allocSize();
|
||||||
|
}
|
||||||
|
Info<< endl;
|
||||||
|
|
||||||
|
Info<< "<ll>" << ll << "</ll>" << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
|
// test the transfer between DynamicLists
|
||||||
|
DynamicList<label, 1, 0> dlA;
|
||||||
|
DynamicList<label, 1, 0> dlB;
|
||||||
|
|
||||||
|
for (label i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
dlA.append(i);
|
||||||
|
}
|
||||||
|
dlA.setSize(10);
|
||||||
|
|
||||||
|
Info<< "<dlA>" << dlA << "</dlA>" << nl << "sizes: "
|
||||||
|
<< " " << dlA.size() << "/" << dlA.allocSize() << endl;
|
||||||
|
|
||||||
|
dlB.transfer(dlA);
|
||||||
|
|
||||||
|
// provokes memory error if previous transfer did not maintain
|
||||||
|
// the correct allocated space
|
||||||
|
dlB[6] = 6;
|
||||||
|
|
||||||
|
Info<< "Transferred to dlB" << endl;
|
||||||
|
Info<< "<dlA>" << dlA << "</dlA>" << nl << "sizes: "
|
||||||
|
<< " " << dlA.size() << "/" << dlA.allocSize() << endl;
|
||||||
|
Info<< "<dlB>" << dlB << "</dlB>" << nl << "sizes: "
|
||||||
|
<< " " << dlB.size() << "/" << dlB.allocSize() << endl;
|
||||||
|
|
||||||
Info << "\nEnd\n" << endl;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
124
applications/test/xfer/xferListTest.C
Normal file
124
applications/test/xfer/xferListTest.C
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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"
|
||||||
|
#include "DynamicList.H"
|
||||||
|
#include "face.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 = xferMove(lstA);
|
||||||
|
xfer<List<label> > xB;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
List<label> lstD(xferCopy(lstC));
|
||||||
|
List<label> lstE(xferMove(lstC));
|
||||||
|
|
||||||
|
// this must be empty
|
||||||
|
List<label> lstF = xferCopy(lstC);
|
||||||
|
|
||||||
|
Info<< "xA: " << xA() << endl;
|
||||||
|
Info<< "xB: " << xB() << endl;
|
||||||
|
Info<< "lstA: " << lstA << endl;
|
||||||
|
Info<< "lstB: " << lstB << endl;
|
||||||
|
Info<< "lstC: " << lstC << endl;
|
||||||
|
Info<< "lstD: " << lstD << endl;
|
||||||
|
Info<< "lstE: " << lstE << endl;
|
||||||
|
Info<< "lstF: " << lstF << endl;
|
||||||
|
|
||||||
|
Info<< "xB[" << xB->size() << "]\n";
|
||||||
|
|
||||||
|
// clear the underlying List
|
||||||
|
xB->clear();
|
||||||
|
|
||||||
|
Info<< "xB[" << xB->size() << "]\n";
|
||||||
|
|
||||||
|
DynamicList<label> dl(10);
|
||||||
|
for (label i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
dl.append(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
face f1(dl);
|
||||||
|
face f2(xferCopy<labelList>(dl));
|
||||||
|
|
||||||
|
Info<< "dl[" << dl.size() << "/" << dl.allocSize() << "] " << dl << endl;
|
||||||
|
Info<< "f1: " << f1 << endl;
|
||||||
|
Info<< "f2: " << f2 << endl;
|
||||||
|
|
||||||
|
// note: using xferMoveTo to ensure the correct transfer() method is called
|
||||||
|
face f3( xferMoveTo<labelList>(dl) );
|
||||||
|
Info<< "dl[" << dl.size() << "/" << dl.allocSize() << "] " << dl << endl;
|
||||||
|
Info<< "f3: " << f3 << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
726
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.ele
Normal file
726
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.ele
Normal file
@ -0,0 +1,726 @@
|
|||||||
|
724 4 0
|
||||||
|
1 48 170 84 171
|
||||||
|
2 78 202 171 213
|
||||||
|
3 16 48 45 171
|
||||||
|
4 128 159 108 191
|
||||||
|
5 167 168 77 200
|
||||||
|
6 72 166 25 199
|
||||||
|
7 8 197 44 198
|
||||||
|
8 162 166 72 199
|
||||||
|
9 50 84 83 196
|
||||||
|
10 67 126 17 172
|
||||||
|
11 48 125 45 171
|
||||||
|
12 103 150 63 210
|
||||||
|
13 102 177 59 194
|
||||||
|
14 119 172 75 213
|
||||||
|
15 10 157 69 208
|
||||||
|
16 126 167 119 172
|
||||||
|
17 30 157 107 190
|
||||||
|
18 52 182 180 209
|
||||||
|
19 88 192 105 205
|
||||||
|
20 152 194 104 203
|
||||||
|
21 107 187 150 190
|
||||||
|
22 23 141 86 192
|
||||||
|
23 97 99 140 184
|
||||||
|
24 55 189 133 207
|
||||||
|
25 97 138 31 151
|
||||||
|
26 35 142 60 194
|
||||||
|
27 27 118 74 164
|
||||||
|
28 101 127 21 152
|
||||||
|
29 126 171 167 200
|
||||||
|
30 90 109 55 133
|
||||||
|
31 21 178 152 203
|
||||||
|
32 134 173 93 174
|
||||||
|
33 27 83 50 84
|
||||||
|
34 85 127 29 211
|
||||||
|
35 164 176 111 202
|
||||||
|
36 65 153 105 156
|
||||||
|
37 149 186 59 203
|
||||||
|
38 88 87 129 130
|
||||||
|
39 23 141 97 151
|
||||||
|
40 177 178 136 203
|
||||||
|
41 76 164 43 198
|
||||||
|
42 84 176 126 202
|
||||||
|
43 89 116 90 133
|
||||||
|
44 40 112 71 113
|
||||||
|
45 40 70 71 112
|
||||||
|
46 125 126 45 171
|
||||||
|
47 133 161 66 176
|
||||||
|
48 65 105 14 156
|
||||||
|
49 66 189 187 207
|
||||||
|
50 67 68 38 110
|
||||||
|
51 60 144 62 61
|
||||||
|
52 124 165 33 204
|
||||||
|
53 52 128 108 191
|
||||||
|
54 26 90 89 116
|
||||||
|
55 114 164 76 198
|
||||||
|
56 150 190 104 192
|
||||||
|
57 59 186 102 194
|
||||||
|
58 69 157 103 190
|
||||||
|
59 120 170 196 122
|
||||||
|
60 116 164 117 197
|
||||||
|
61 5 112 41 113
|
||||||
|
62 37 110 107 157
|
||||||
|
63 132 181 32 189
|
||||||
|
64 121 122 18 196
|
||||||
|
65 84 123 27 202
|
||||||
|
66 73 195 163 199
|
||||||
|
67 182 204 137 209
|
||||||
|
68 140 97 23 99
|
||||||
|
69 96 136 135 178
|
||||||
|
70 28 80 57 81
|
||||||
|
71 23 99 97 141
|
||||||
|
72 153 156 63 193
|
||||||
|
73 100 152 21 178
|
||||||
|
74 148 151 146 190
|
||||||
|
75 115 43 15 213
|
||||||
|
76 138 186 139 188
|
||||||
|
77 48 125 84 170
|
||||||
|
78 105 153 65 155
|
||||||
|
79 108 204 182 209
|
||||||
|
80 104 193 192 205
|
||||||
|
81 18 83 40 121
|
||||||
|
82 32 111 89 133
|
||||||
|
83 59 95 94 149
|
||||||
|
84 135 136 34 178
|
||||||
|
85 95 137 132 189
|
||||||
|
86 57 80 52 108
|
||||||
|
87 104 151 149 186
|
||||||
|
88 186 194 59 203
|
||||||
|
89 152 191 150 193
|
||||||
|
90 115 197 8 198
|
||||||
|
91 170 125 201 48
|
||||||
|
92 140 183 7 184
|
||||||
|
93 9 108 52 128
|
||||||
|
94 70 5 71 112
|
||||||
|
95 44 116 26 117
|
||||||
|
96 84 126 125 171
|
||||||
|
97 66 159 126 161
|
||||||
|
98 52 191 108 209
|
||||||
|
99 41 112 72 113
|
||||||
|
100 108 191 159 209
|
||||||
|
101 125 170 201 160
|
||||||
|
102 77 168 167 169
|
||||||
|
103 103 157 30 190
|
||||||
|
104 52 9 57 108
|
||||||
|
105 127 152 101 193
|
||||||
|
106 38 68 37 110
|
||||||
|
107 133 189 66 207
|
||||||
|
108 8 76 115 198
|
||||||
|
109 65 153 143 154
|
||||||
|
110 31 151 138 206
|
||||||
|
111 62 144 6 61
|
||||||
|
112 192 193 105 205
|
||||||
|
113 153 154 101 211
|
||||||
|
114 72 163 111 199
|
||||||
|
115 13 101 100 212
|
||||||
|
116 104 187 150 191
|
||||||
|
117 13 154 101 212
|
||||||
|
118 23 97 86 151
|
||||||
|
119 102 61 144 194
|
||||||
|
120 153 193 63 211
|
||||||
|
121 20 159 126 160
|
||||||
|
122 14 88 130 156
|
||||||
|
123 30 107 37 159
|
||||||
|
124 65 154 2 155
|
||||||
|
125 42 111 89 162
|
||||||
|
126 85 150 30 191
|
||||||
|
127 194 205 142 212
|
||||||
|
128 97 141 99 151
|
||||||
|
129 120 82 50 170
|
||||||
|
130 22 60 61 102
|
||||||
|
131 66 161 126 176
|
||||||
|
132 30 128 85 191
|
||||||
|
133 59 139 102 186
|
||||||
|
134 54 89 26 90
|
||||||
|
135 70 112 40 114
|
||||||
|
136 66 159 107 187
|
||||||
|
137 32 132 91 181
|
||||||
|
138 49 124 80 160
|
||||||
|
139 56 91 12 92
|
||||||
|
140 126 159 37 161
|
||||||
|
141 78 168 46 169
|
||||||
|
142 144 177 102 194
|
||||||
|
143 113 121 40 196
|
||||||
|
144 86 148 129 192
|
||||||
|
145 7 184 183 185
|
||||||
|
146 17 109 90 133
|
||||||
|
147 141 192 88 205
|
||||||
|
148 167 168 45 169
|
||||||
|
149 97 184 139 185
|
||||||
|
150 2 154 64 155
|
||||||
|
151 111 195 181 199
|
||||||
|
152 78 123 47 171
|
||||||
|
153 84 176 111 195
|
||||||
|
154 49 160 80 201
|
||||||
|
155 43 197 115 198
|
||||||
|
156 38 67 24 68
|
||||||
|
157 93 174 173 189
|
||||||
|
158 150 152 104 191
|
||||||
|
159 24 167 77 200
|
||||||
|
160 122 170 49 201
|
||||||
|
161 71 112 5 113
|
||||||
|
162 163 195 111 199
|
||||||
|
163 17 172 126 176
|
||||||
|
164 124 160 49 195
|
||||||
|
165 37 106 30 159
|
||||||
|
166 40 113 71 121
|
||||||
|
167 136 178 96 203
|
||||||
|
168 127 191 152 193
|
||||||
|
169 67 167 126 172
|
||||||
|
170 139 185 102 186
|
||||||
|
171 66 187 107 207
|
||||||
|
172 104 187 149 206
|
||||||
|
173 40 74 19 114
|
||||||
|
174 84 170 123 171
|
||||||
|
175 107 110 37 161
|
||||||
|
176 42 164 114 198
|
||||||
|
177 63 193 150 211
|
||||||
|
178 39 161 107 207
|
||||||
|
179 50 123 84 170
|
||||||
|
180 49 170 160 201
|
||||||
|
181 46 168 4 169
|
||||||
|
182 84 170 49 196
|
||||||
|
183 49 195 84 196
|
||||||
|
184 183 184 99 185
|
||||||
|
185 111 114 42 164
|
||||||
|
186 31 158 146 190
|
||||||
|
187 109 161 39 207
|
||||||
|
188 54 90 55 175
|
||||||
|
189 44 197 117 198
|
||||||
|
190 111 163 84 195
|
||||||
|
191 117 164 42 198
|
||||||
|
192 73 121 113 163
|
||||||
|
193 86 97 31 151
|
||||||
|
194 90 133 55 175
|
||||||
|
195 125 160 84 170
|
||||||
|
196 80 160 81 201
|
||||||
|
197 160 176 126 195
|
||||||
|
198 144 100 34 177
|
||||||
|
199 139 149 59 188
|
||||||
|
200 103 146 69 190
|
||||||
|
201 74 114 40 163
|
||||||
|
202 107 150 30 190
|
||||||
|
203 74 118 43 164
|
||||||
|
204 4 168 77 169
|
||||||
|
205 27 84 50 123
|
||||||
|
206 189 206 187 207
|
||||||
|
207 151 192 141 205
|
||||||
|
208 163 195 73 196
|
||||||
|
209 71 18 40 121
|
||||||
|
210 149 151 138 186
|
||||||
|
211 43 118 15 213
|
||||||
|
212 35 145 141 205
|
||||||
|
213 146 148 86 151
|
||||||
|
214 100 194 152 203
|
||||||
|
215 36 138 97 139
|
||||||
|
216 147 192 190 210
|
||||||
|
217 107 158 39 207
|
||||||
|
218 95 132 94 149
|
||||||
|
219 60 102 22 145
|
||||||
|
220 183 140 99 184
|
||||||
|
221 89 111 32 162
|
||||||
|
222 28 81 48 201
|
||||||
|
223 34 177 100 178
|
||||||
|
224 146 147 53 148
|
||||||
|
225 111 162 72 199
|
||||||
|
226 60 142 13 194
|
||||||
|
227 181 195 66 204
|
||||||
|
228 108 160 33 204
|
||||||
|
229 31 138 93 206
|
||||||
|
230 119 167 126 171
|
||||||
|
231 107 161 66 207
|
||||||
|
232 180 191 52 209
|
||||||
|
233 126 202 176 213
|
||||||
|
234 45 126 68 200
|
||||||
|
235 53 146 103 147
|
||||||
|
236 38 37 10 110
|
||||||
|
237 15 118 78 213
|
||||||
|
238 101 152 100 212
|
||||||
|
239 138 151 149 206
|
||||||
|
240 26 116 89 117
|
||||||
|
241 10 110 37 157
|
||||||
|
242 171 202 126 213
|
||||||
|
243 129 147 87 148
|
||||||
|
244 100 101 21 152
|
||||||
|
245 97 98 36 139
|
||||||
|
246 52 80 33 108
|
||||||
|
247 48 170 79 201
|
||||||
|
248 98 184 7 185
|
||||||
|
249 153 154 65 155
|
||||||
|
250 55 173 133 189
|
||||||
|
251 149 151 104 206
|
||||||
|
252 143 2 65 154
|
||||||
|
253 78 171 119 213
|
||||||
|
254 58 108 9 128
|
||||||
|
255 9 52 51 128
|
||||||
|
256 60 62 144 194
|
||||||
|
257 94 138 93 188
|
||||||
|
258 132 149 95 189
|
||||||
|
259 9 58 57 108
|
||||||
|
260 104 190 151 192
|
||||||
|
261 105 192 156 193
|
||||||
|
262 69 103 53 146
|
||||||
|
263 70 40 19 114
|
||||||
|
264 95 149 137 189
|
||||||
|
265 192 193 150 210
|
||||||
|
266 58 81 57 108
|
||||||
|
267 102 145 60 194
|
||||||
|
268 57 81 80 108
|
||||||
|
269 52 127 51 191
|
||||||
|
270 12 92 91 179
|
||||||
|
271 60 61 102 194
|
||||||
|
272 150 192 104 193
|
||||||
|
273 30 150 103 190
|
||||||
|
274 130 88 87 156
|
||||||
|
275 13 142 100 194
|
||||||
|
276 53 147 129 148
|
||||||
|
277 125 126 84 160
|
||||||
|
278 55 109 39 207
|
||||||
|
279 129 131 88 130
|
||||||
|
280 30 159 128 191
|
||||||
|
281 86 141 23 151
|
||||||
|
282 153 155 105 193
|
||||||
|
283 40 114 112 163
|
||||||
|
284 27 196 84 202
|
||||||
|
285 85 128 51 191
|
||||||
|
286 160 195 33 204
|
||||||
|
287 94 134 93 174
|
||||||
|
288 109 133 17 161
|
||||||
|
289 109 110 39 161
|
||||||
|
290 84 160 49 170
|
||||||
|
291 89 90 54 175
|
||||||
|
292 96 137 92 179
|
||||||
|
293 31 146 86 151
|
||||||
|
294 117 197 164 198
|
||||||
|
295 15 78 46 119
|
||||||
|
296 91 92 56 166
|
||||||
|
297 112 113 40 163
|
||||||
|
298 45 168 167 200
|
||||||
|
299 68 126 67 200
|
||||||
|
300 136 177 34 178
|
||||||
|
301 49 122 121 196
|
||||||
|
302 92 137 91 179
|
||||||
|
303 63 103 85 150
|
||||||
|
304 92 165 56 166
|
||||||
|
305 167 171 45 200
|
||||||
|
306 81 160 125 201
|
||||||
|
307 29 85 51 127
|
||||||
|
308 46 119 78 169
|
||||||
|
309 172 176 75 213
|
||||||
|
310 131 130 129 3
|
||||||
|
311 88 129 87 192
|
||||||
|
312 119 171 126 213
|
||||||
|
313 39 158 55 207
|
||||||
|
314 105 193 155 212
|
||||||
|
315 15 119 75 213
|
||||||
|
316 33 182 108 204
|
||||||
|
317 104 187 152 203
|
||||||
|
318 16 123 48 171
|
||||||
|
319 107 159 66 161
|
||||||
|
320 123 170 48 171
|
||||||
|
321 84 125 48 171
|
||||||
|
322 124 195 165 204
|
||||||
|
323 146 151 31 190
|
||||||
|
324 74 83 27 163
|
||||||
|
325 37 159 107 161
|
||||||
|
326 47 4 46 168
|
||||||
|
327 136 149 59 203
|
||||||
|
328 20 68 45 126
|
||||||
|
329 82 123 50 170
|
||||||
|
330 20 106 68 126
|
||||||
|
331 37 110 68 161
|
||||||
|
332 80 81 28 201
|
||||||
|
333 24 68 67 200
|
||||||
|
334 46 78 47 168
|
||||||
|
335 67 126 68 161
|
||||||
|
336 93 138 134 188
|
||||||
|
337 68 106 37 126
|
||||||
|
338 20 126 125 160
|
||||||
|
339 163 196 27 202
|
||||||
|
340 72 114 111 163
|
||||||
|
341 33 108 80 160
|
||||||
|
342 55 173 54 175
|
||||||
|
343 45 125 20 126
|
||||||
|
344 50 170 84 196
|
||||||
|
345 133 173 55 175
|
||||||
|
346 80 124 33 160
|
||||||
|
347 63 193 156 210
|
||||||
|
348 68 126 37 161
|
||||||
|
349 104 152 150 193
|
||||||
|
350 133 164 116 176
|
||||||
|
351 145 194 186 205
|
||||||
|
352 126 160 66 176
|
||||||
|
353 107 206 158 207
|
||||||
|
354 12 96 92 179
|
||||||
|
355 118 164 27 202
|
||||||
|
356 164 197 43 198
|
||||||
|
357 89 133 90 175
|
||||||
|
358 67 109 17 161
|
||||||
|
359 105 193 35 205
|
||||||
|
360 55 133 109 207
|
||||||
|
361 33 160 124 195
|
||||||
|
362 173 174 11 175
|
||||||
|
363 137 187 149 203
|
||||||
|
364 79 170 122 201
|
||||||
|
365 39 158 107 190
|
||||||
|
366 150 191 85 211
|
||||||
|
367 40 121 83 196
|
||||||
|
368 32 133 132 189
|
||||||
|
369 56 165 25 166
|
||||||
|
370 42 114 111 162
|
||||||
|
371 141 145 99 205
|
||||||
|
372 27 163 83 196
|
||||||
|
373 92 137 96 182
|
||||||
|
374 149 187 104 203
|
||||||
|
375 126 167 67 200
|
||||||
|
376 137 180 96 182
|
||||||
|
377 102 186 145 194
|
||||||
|
378 62 60 13 194
|
||||||
|
379 15 75 115 213
|
||||||
|
380 85 103 30 150
|
||||||
|
381 49 160 84 195
|
||||||
|
382 137 181 66 204
|
||||||
|
383 59 149 139 186
|
||||||
|
384 98 139 97 184
|
||||||
|
385 51 127 85 191
|
||||||
|
386 149 187 137 189
|
||||||
|
387 91 166 32 181
|
||||||
|
388 139 184 98 185
|
||||||
|
389 31 190 151 206
|
||||||
|
390 100 178 177 194
|
||||||
|
391 150 187 107 191
|
||||||
|
392 149 186 138 188
|
||||||
|
393 51 128 52 191
|
||||||
|
394 108 182 52 209
|
||||||
|
395 59 136 95 149
|
||||||
|
396 93 138 94 149
|
||||||
|
397 94 149 132 189
|
||||||
|
398 132 133 32 175
|
||||||
|
399 135 136 96 179
|
||||||
|
400 92 182 33 204
|
||||||
|
401 137 187 66 189
|
||||||
|
402 137 181 132 189
|
||||||
|
403 88 141 23 192
|
||||||
|
404 187 206 107 207
|
||||||
|
405 107 110 39 208
|
||||||
|
406 37 126 106 159
|
||||||
|
407 94 149 138 188
|
||||||
|
408 11 173 134 174
|
||||||
|
409 159 191 187 209
|
||||||
|
410 13 100 62 194
|
||||||
|
411 105 155 142 212
|
||||||
|
412 35 205 193 212
|
||||||
|
413 152 187 104 191
|
||||||
|
414 60 145 35 194
|
||||||
|
415 14 105 88 156
|
||||||
|
416 33 165 92 204
|
||||||
|
417 133 181 66 189
|
||||||
|
418 107 190 157 208
|
||||||
|
419 39 190 107 208
|
||||||
|
420 20 125 81 160
|
||||||
|
421 80 108 81 160
|
||||||
|
422 100 177 144 194
|
||||||
|
423 138 139 36 188
|
||||||
|
424 49 170 122 196
|
||||||
|
425 132 174 94 189
|
||||||
|
426 139 186 149 188
|
||||||
|
427 134 138 36 188
|
||||||
|
428 144 62 100 194
|
||||||
|
429 91 137 92 181
|
||||||
|
430 92 166 91 181
|
||||||
|
431 107 187 159 191
|
||||||
|
432 141 151 86 192
|
||||||
|
433 165 199 181 204
|
||||||
|
434 150 159 30 191
|
||||||
|
435 129 148 87 192
|
||||||
|
436 100 142 13 212
|
||||||
|
437 52 180 21 191
|
||||||
|
438 107 159 150 191
|
||||||
|
439 142 205 35 212
|
||||||
|
440 37 107 30 157
|
||||||
|
441 21 127 52 191
|
||||||
|
442 92 181 137 204
|
||||||
|
443 129 88 131 192
|
||||||
|
444 103 147 146 190
|
||||||
|
445 137 182 92 204
|
||||||
|
446 87 156 88 192
|
||||||
|
447 91 137 95 179
|
||||||
|
448 135 96 12 179
|
||||||
|
449 164 202 118 213
|
||||||
|
450 110 157 10 208
|
||||||
|
451 101 193 152 212
|
||||||
|
452 152 205 194 212
|
||||||
|
453 21 152 127 191
|
||||||
|
454 193 205 152 212
|
||||||
|
455 59 149 94 188
|
||||||
|
456 30 106 58 159
|
||||||
|
457 67 110 109 161
|
||||||
|
458 68 110 67 161
|
||||||
|
459 66 204 108 209
|
||||||
|
460 32 181 133 189
|
||||||
|
461 17 126 67 161
|
||||||
|
462 106 126 20 159
|
||||||
|
463 111 114 72 162
|
||||||
|
464 40 83 74 163
|
||||||
|
465 48 79 28 201
|
||||||
|
466 30 150 107 159
|
||||||
|
467 108 128 58 159
|
||||||
|
468 58 128 30 159
|
||||||
|
469 39 110 107 161
|
||||||
|
470 83 121 18 196
|
||||||
|
471 134 94 93 188
|
||||||
|
472 86 129 131 192
|
||||||
|
473 126 159 66 160
|
||||||
|
474 66 159 108 160
|
||||||
|
475 166 181 165 199
|
||||||
|
476 186 194 104 205
|
||||||
|
477 81 108 58 160
|
||||||
|
478 108 159 58 160
|
||||||
|
479 81 106 20 160
|
||||||
|
480 106 159 20 160
|
||||||
|
481 99 186 151 205
|
||||||
|
482 52 108 33 182
|
||||||
|
483 178 194 100 203
|
||||||
|
484 78 169 119 171
|
||||||
|
485 58 106 81 160
|
||||||
|
486 58 159 106 160
|
||||||
|
487 112 114 72 163
|
||||||
|
488 111 164 133 176
|
||||||
|
489 54 173 11 175
|
||||||
|
490 177 194 178 203
|
||||||
|
491 25 166 165 199
|
||||||
|
492 19 74 43 164
|
||||||
|
493 19 114 74 164
|
||||||
|
494 111 163 114 164
|
||||||
|
495 114 163 74 164
|
||||||
|
496 152 178 100 203
|
||||||
|
497 111 181 162 199
|
||||||
|
498 76 19 43 164
|
||||||
|
499 76 114 19 164
|
||||||
|
500 89 117 116 164
|
||||||
|
501 116 133 89 164
|
||||||
|
502 42 117 89 164
|
||||||
|
503 89 111 42 164
|
||||||
|
504 89 133 111 164
|
||||||
|
505 48 82 79 170
|
||||||
|
506 82 48 16 170
|
||||||
|
507 48 123 16 170
|
||||||
|
508 16 123 82 170
|
||||||
|
509 43 115 76 198
|
||||||
|
510 75 164 116 197
|
||||||
|
511 126 171 84 202
|
||||||
|
512 84 196 163 202
|
||||||
|
513 84 171 123 202
|
||||||
|
514 78 118 27 202
|
||||||
|
515 120 1 82 170
|
||||||
|
516 120 122 1 170
|
||||||
|
517 82 1 79 170
|
||||||
|
518 1 122 79 170
|
||||||
|
519 47 168 78 171
|
||||||
|
520 45 168 47 171
|
||||||
|
521 16 45 47 171
|
||||||
|
522 47 123 16 171
|
||||||
|
523 59 194 177 203
|
||||||
|
524 152 191 21 203
|
||||||
|
525 32 133 89 175
|
||||||
|
526 104 186 149 203
|
||||||
|
527 119 169 167 171
|
||||||
|
528 167 169 45 171
|
||||||
|
529 45 169 168 171
|
||||||
|
530 168 169 78 171
|
||||||
|
531 104 194 186 203
|
||||||
|
532 59 177 136 203
|
||||||
|
533 137 149 95 203
|
||||||
|
534 95 149 136 203
|
||||||
|
535 17 161 133 176
|
||||||
|
536 126 161 17 176
|
||||||
|
537 116 164 75 176
|
||||||
|
538 75 172 116 176
|
||||||
|
539 90 133 116 176
|
||||||
|
540 116 172 90 176
|
||||||
|
541 17 133 90 176
|
||||||
|
542 90 172 17 176
|
||||||
|
543 150 193 63 210
|
||||||
|
544 195 199 165 204
|
||||||
|
545 66 181 137 189
|
||||||
|
546 81 125 48 201
|
||||||
|
547 165 166 92 181
|
||||||
|
548 32 162 111 181
|
||||||
|
549 32 166 162 181
|
||||||
|
550 45 171 126 200
|
||||||
|
551 111 133 32 181
|
||||||
|
552 147 148 146 190
|
||||||
|
553 105 156 153 193
|
||||||
|
554 66 161 133 207
|
||||||
|
555 91 132 95 181
|
||||||
|
556 132 137 95 181
|
||||||
|
557 95 137 91 181
|
||||||
|
558 99 151 141 205
|
||||||
|
559 111 176 133 181
|
||||||
|
560 133 176 66 181
|
||||||
|
561 66 176 111 181
|
||||||
|
562 40 163 113 196
|
||||||
|
563 145 186 99 205
|
||||||
|
564 88 105 35 205
|
||||||
|
565 113 163 121 196
|
||||||
|
566 84 195 163 196
|
||||||
|
567 121 163 73 196
|
||||||
|
568 187 191 152 203
|
||||||
|
569 83 163 40 196
|
||||||
|
570 83 84 27 196
|
||||||
|
571 138 149 93 206
|
||||||
|
572 107 190 158 206
|
||||||
|
573 97 151 99 186
|
||||||
|
574 144 61 60 194
|
||||||
|
575 187 190 107 206
|
||||||
|
576 157 190 69 208
|
||||||
|
577 22 145 102 186
|
||||||
|
578 102 185 22 186
|
||||||
|
579 104 192 151 205
|
||||||
|
580 126 176 84 195
|
||||||
|
581 67 167 24 200
|
||||||
|
582 116 117 44 197
|
||||||
|
583 97 139 138 186
|
||||||
|
584 138 151 97 186
|
||||||
|
585 162 181 166 199
|
||||||
|
586 66 181 111 195
|
||||||
|
587 99 145 22 186
|
||||||
|
588 97 185 139 186
|
||||||
|
589 66 176 160 195
|
||||||
|
590 183 99 22 186
|
||||||
|
591 183 185 99 186
|
||||||
|
592 22 185 183 186
|
||||||
|
593 99 184 97 186
|
||||||
|
594 99 185 184 186
|
||||||
|
595 184 185 97 186
|
||||||
|
596 111 176 66 195
|
||||||
|
597 84 160 126 195
|
||||||
|
598 35 141 88 205
|
||||||
|
599 87 148 147 192
|
||||||
|
600 137 204 66 209
|
||||||
|
601 86 151 148 192
|
||||||
|
602 181 199 195 204
|
||||||
|
603 174 175 173 189
|
||||||
|
604 173 175 133 189
|
||||||
|
605 132 175 174 189
|
||||||
|
606 133 175 132 189
|
||||||
|
607 133 161 109 207
|
||||||
|
608 159 187 66 209
|
||||||
|
609 93 149 94 189
|
||||||
|
610 94 174 93 189
|
||||||
|
611 146 190 158 208
|
||||||
|
612 158 190 39 208
|
||||||
|
613 66 187 137 209
|
||||||
|
614 180 182 137 209
|
||||||
|
615 108 159 66 209
|
||||||
|
616 190 192 150 210
|
||||||
|
617 85 191 127 211
|
||||||
|
618 127 193 101 211
|
||||||
|
619 101 193 153 211
|
||||||
|
620 103 190 150 210
|
||||||
|
621 69 190 146 208
|
||||||
|
622 88 156 105 192
|
||||||
|
623 63 150 85 211
|
||||||
|
624 23 131 88 192
|
||||||
|
625 86 131 23 192
|
||||||
|
626 151 190 148 192
|
||||||
|
627 148 190 147 192
|
||||||
|
628 101 154 143 211
|
||||||
|
629 29 127 101 211
|
||||||
|
630 29 101 143 211
|
||||||
|
631 143 154 153 211
|
||||||
|
632 78 119 15 213
|
||||||
|
633 118 202 78 213
|
||||||
|
634 33 195 124 204
|
||||||
|
635 93 158 31 206
|
||||||
|
636 158 190 31 206
|
||||||
|
637 107 157 110 208
|
||||||
|
638 66 160 108 204
|
||||||
|
639 165 181 92 204
|
||||||
|
640 66 195 160 204
|
||||||
|
641 156 193 192 210
|
||||||
|
642 149 189 93 206
|
||||||
|
643 187 189 149 206
|
||||||
|
644 170 120 196 50
|
||||||
|
645 73 124 121 196
|
||||||
|
646 73 195 124 196
|
||||||
|
647 121 124 49 196
|
||||||
|
648 124 195 49 196
|
||||||
|
649 50 83 18 196
|
||||||
|
650 50 18 120 196
|
||||||
|
651 18 122 120 196
|
||||||
|
652 151 186 104 205
|
||||||
|
653 73 165 124 199
|
||||||
|
654 165 195 124 199
|
||||||
|
655 124 195 73 199
|
||||||
|
656 73 163 113 199
|
||||||
|
657 25 165 73 199
|
||||||
|
658 73 113 41 199
|
||||||
|
659 41 113 72 199
|
||||||
|
660 113 72 163 112
|
||||||
|
661 72 113 163 199
|
||||||
|
662 41 72 25 199
|
||||||
|
663 25 73 41 199
|
||||||
|
664 111 176 84 202
|
||||||
|
665 27 123 78 202
|
||||||
|
666 123 171 78 202
|
||||||
|
667 84 163 111 202
|
||||||
|
668 163 164 111 202
|
||||||
|
669 74 163 27 202
|
||||||
|
670 74 164 163 202
|
||||||
|
671 27 164 74 202
|
||||||
|
672 95 179 137 203
|
||||||
|
673 136 179 95 203
|
||||||
|
674 137 179 96 203
|
||||||
|
675 96 179 136 203
|
||||||
|
676 96 178 21 203
|
||||||
|
677 147 190 103 210
|
||||||
|
678 156 192 87 210
|
||||||
|
679 87 192 147 210
|
||||||
|
680 96 180 137 203
|
||||||
|
681 21 180 96 203
|
||||||
|
682 35 194 145 205
|
||||||
|
683 43 164 118 213
|
||||||
|
684 142 194 35 205
|
||||||
|
685 152 193 104 205
|
||||||
|
686 104 194 152 205
|
||||||
|
687 126 176 172 213
|
||||||
|
688 126 172 119 213
|
||||||
|
689 151 190 104 206
|
||||||
|
690 150 187 104 206
|
||||||
|
691 150 190 187 206
|
||||||
|
692 104 190 150 206
|
||||||
|
693 93 206 189 207
|
||||||
|
694 158 206 93 207
|
||||||
|
695 158 173 55 207
|
||||||
|
696 173 189 55 207
|
||||||
|
697 93 173 158 207
|
||||||
|
698 93 189 173 207
|
||||||
|
699 187 203 137 209
|
||||||
|
700 137 203 180 209
|
||||||
|
701 191 203 187 209
|
||||||
|
702 21 191 180 209
|
||||||
|
703 21 203 191 209
|
||||||
|
704 180 203 21 209
|
||||||
|
705 150 193 191 211
|
||||||
|
706 191 193 127 211
|
||||||
|
707 13 142 64 212
|
||||||
|
708 64 154 13 212
|
||||||
|
709 152 194 100 212
|
||||||
|
710 100 194 142 212
|
||||||
|
711 105 142 35 212
|
||||||
|
712 35 193 105 212
|
||||||
|
713 64 155 154 212
|
||||||
|
714 142 155 64 212
|
||||||
|
715 154 155 153 212
|
||||||
|
716 155 193 153 212
|
||||||
|
717 101 154 153 212
|
||||||
|
718 153 193 101 212
|
||||||
|
719 75 176 164 213
|
||||||
|
720 176 202 164 213
|
||||||
|
721 43 197 164 213
|
||||||
|
722 164 197 75 213
|
||||||
|
723 75 197 115 213
|
||||||
|
724 115 197 43 213
|
||||||
|
# Generated by tetgen -qfa0.005 beam.poly
|
||||||
1619
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.face
Normal file
1619
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.face
Normal file
File diff suppressed because it is too large
Load Diff
215
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.node
Normal file
215
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.node
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
213 3 0 0
|
||||||
|
1 0 0 0
|
||||||
|
2 2 0 0
|
||||||
|
3 2 1 0
|
||||||
|
4 0 1 0
|
||||||
|
5 0 0 1
|
||||||
|
6 2 0 1
|
||||||
|
7 2 1 1
|
||||||
|
8 0 1 1
|
||||||
|
9 1.0000469999999999 0 0
|
||||||
|
10 0.999668 1 0
|
||||||
|
11 0.99944500000000003 1 1
|
||||||
|
12 1.000594 0 1
|
||||||
|
13 2 0 0.50021530000000003
|
||||||
|
14 2 0.50012599999999996 0
|
||||||
|
15 0 1 0.50045629999999997
|
||||||
|
16 0 0.49964989999999998 0
|
||||||
|
17 0.62483357601847556 1 0.49991643678795222
|
||||||
|
18 0 0 0.5
|
||||||
|
19 0 0.5 1
|
||||||
|
20 0.62494657145582122 0.49985790875808178 0
|
||||||
|
21 1.375120204581187 0 0.4997949845615941
|
||||||
|
22 2 0.5 1
|
||||||
|
23 2 1 0.5
|
||||||
|
24 0.499834 1 0
|
||||||
|
25 0.50029699999999999 0 1
|
||||||
|
26 0.49972250000000001 1 1
|
||||||
|
27 0 0.50000006130646835 0.49999993869353165
|
||||||
|
28 0.50002349999999995 0 0
|
||||||
|
29 1.5000235 0 0
|
||||||
|
30 1.1458145624989733 0.5000553177266871 0
|
||||||
|
31 1.3748336567109987 1 0.5000836868059465
|
||||||
|
32 0.75044549999999999 0.49971323947400004 1
|
||||||
|
33 0.75044549999999999 0 0.50013668162500002
|
||||||
|
34 1.500297 0 1
|
||||||
|
35 2 0.49999999206099965 0.49999999206099965
|
||||||
|
36 1.4997225000000001 1 1
|
||||||
|
37 0.88530655619767451 0.69523571541331353 0
|
||||||
|
38 0.74975100000000006 1 0
|
||||||
|
39 0.99985800700011418 1 0.39062501526316751
|
||||||
|
40 0 0.2500000613064608 0.7499999386935392
|
||||||
|
41 0.2501485 0 1
|
||||||
|
42 0.37527044007359472 0.62466041202689604 1
|
||||||
|
43 0 0.7497720581817594 0.74999999997204392
|
||||||
|
44 0.24986125000000001 1 1
|
||||||
|
45 0.31241083060970776 0.68739558038665782 0
|
||||||
|
46 0 1 0.25022814999999998
|
||||||
|
47 0 0.74982495000000005 0
|
||||||
|
48 0.3125356465289606 0.31239559711921033 0
|
||||||
|
49 0.37524548555134551 0 0.37523962153691648
|
||||||
|
50 0 0.25000000002145584 0.25017492745143088
|
||||||
|
51 1.2500352499999998 0 0
|
||||||
|
52 1.0626973305232652 0 0.34361890927552119
|
||||||
|
53 1.4998339999999999 1 0
|
||||||
|
54 0.74958374999999999 1 1
|
||||||
|
55 0.88519156134454835 1 0.69523493182271912
|
||||||
|
56 0.75044549999999999 0 1
|
||||||
|
57 0.75003524999999993 0 0
|
||||||
|
58 0.88545457775712011 0.3046775110714553 0
|
||||||
|
59 1.4999999173907641 0.49999999435116604 1
|
||||||
|
60 2 0.25010760364761792 0.74999999999829137
|
||||||
|
61 2 0.25 1
|
||||||
|
62 2 0 0.75010765000000001
|
||||||
|
63 1.5729133203896351 0.4271084905205621 0
|
||||||
|
64 2 0 0.25010765000000001
|
||||||
|
65 2 0.25006299999999998 0
|
||||||
|
66 0.81619988117037301 0.51616065956439328 0.48387527405505287
|
||||||
|
67 0.62479250000000008 1 0.23434098330631092
|
||||||
|
68 0.62479250000000008 0.7655391212272894 0
|
||||||
|
69 1.2497509999999998 1 0
|
||||||
|
70 0 0.25 1
|
||||||
|
71 0 0 0.75
|
||||||
|
72 0.37522274999999999 0.29980854989635936 1
|
||||||
|
73 0.37522274999999999 0 0.70013946473134281
|
||||||
|
74 0 0.49988605975809192 0.74988593714516283
|
||||||
|
75 0.31255174452459605 1 0.65638401293888804
|
||||||
|
76 0 0.75 1
|
||||||
|
77 0.249917 1 0
|
||||||
|
78 0 0.70831779089254521 0.29167340665919461
|
||||||
|
79 0.25001174999999998 0 0
|
||||||
|
80 0.62526649037406934 0 0.25017085386153537
|
||||||
|
81 0.625029375 0.23429805042184107 0
|
||||||
|
82 0 0.24982494999999999 0
|
||||||
|
83 0 0.25008755567468249 0.50008743306175329
|
||||||
|
84 0.33552291795286748 0.37713361953826796 0.37295234921245662
|
||||||
|
85 1.3275022682494733 0.27703395451399626 0
|
||||||
|
86 1.6873917295541676 1 0.31254602883562033
|
||||||
|
87 1.7393002110516891 0.73944000928409781 0
|
||||||
|
88 2 0.7499999999989998 0.25006298412499983
|
||||||
|
89 0.62528740222670842 0.74964177558619371 1
|
||||||
|
90 0.62465312500000003 1 0.76556323888302447
|
||||||
|
91 0.87551975000000004 0.24985661973700002 1
|
||||||
|
92 0.87551975000000004 0 0.75006834081249996
|
||||||
|
93 1.1922864636768418 1 0.75390684273024755
|
||||||
|
94 1.24958375 0.74986113453803516 1
|
||||||
|
95 1.1698804466514103 0.41956399899988917 1
|
||||||
|
96 1.187959730551635 0 0.74997433471920583
|
||||||
|
97 1.6874419282782818 1 0.68754603555472626
|
||||||
|
98 1.7498612499999999 1 1
|
||||||
|
99 2 0.74999999206099988 0.74999999206099988
|
||||||
|
100 1.6597700161872737 0 0.69432640578660343
|
||||||
|
101 1.6597808229817657 0 0.30542952755181008
|
||||||
|
102 1.7499999601075902 0.375 1
|
||||||
|
103 1.3990667318832528 0.69603906683685635 0
|
||||||
|
104 1.4950021306707608 0.49065317884606224 0.49500212996719484
|
||||||
|
105 2 0.37509449999999989 0.24996850198475024
|
||||||
|
106 0.82837583873678577 0.49993500845038119 0
|
||||||
|
107 1.0695558475797649 0.66971322958604163 0.29687786818700823
|
||||||
|
108 0.85307867962811157 0.24362257622712302 0.31516017245746403
|
||||||
|
109 0.82827226523186892 1 0.49992109713449329
|
||||||
|
110 0.85617934854666022 1 0.20723770847200895
|
||||||
|
111 0.52956259724790877 0.46221182650782827 0.70815142735106607
|
||||||
|
112 0.197844687328108 0.19781366296788089 1
|
||||||
|
113 0.19785716305721113 0 0.8021738538924329
|
||||||
|
114 0.2208783106844166 0.46225714309073845 1
|
||||||
|
115 0 1 0.75022814999999998
|
||||||
|
116 0.43264896150206789 1 0.81375076634557386
|
||||||
|
117 0.374791875 0.83312128766119486 1
|
||||||
|
118 0 0.72915434172921567 0.52082680685839422
|
||||||
|
119 0.25758862433333551 1 0.37534222499999997
|
||||||
|
120 0 0 0.25
|
||||||
|
121 0.22089000562634489 0 0.53767874257955828
|
||||||
|
122 0.21890193241166289 0 0.21890047052636122
|
||||||
|
123 0 0.48262354769989868 0.23265983080935737
|
||||||
|
124 0.52955330709238257 0 0.53770034194467331
|
||||||
|
125 0.49219718763882514 0.367036574432759 0
|
||||||
|
126 0.5505556528350013 0.63265541955504201 0.30493806376468496
|
||||||
|
127 1.4081582558189005 0 0.24254676799800692
|
||||||
|
128 1.1015512434437607 0.21206527974784434 0
|
||||||
|
129 1.7499169999999999 1 0
|
||||||
|
130 2 0.75006299999999992 0
|
||||||
|
131 2 1 0.25
|
||||||
|
132 0.99401036538229792 0.63676792199224752 1
|
||||||
|
133 0.75067050430146165 0.71769786903092825 0.71464771158468776
|
||||||
|
134 1.24958375 1 1
|
||||||
|
135 1.2504455000000001 0 1
|
||||||
|
136 1.3860715978416591 0.24993221667186555 1
|
||||||
|
137 1.0317202752404047 0.31469238410894046 0.6853270709080328
|
||||||
|
138 1.4426349216014702 1 0.74140038799848562
|
||||||
|
139 1.6247918750000001 0.75006931305374525 1
|
||||||
|
140 2 1 0.75
|
||||||
|
141 2 0.74996849602949978 0.50003148809249964
|
||||||
|
142 2 0.24999994966813449 0.49999998078418173
|
||||||
|
143 1.7500117500000001 0 0
|
||||||
|
144 1.7501484999999999 0 1
|
||||||
|
145 2 0.5000537978534545 0.74994618626854503
|
||||||
|
146 1.3747924999999996 1 0.23440908488585499
|
||||||
|
147 1.5571177737167572 0.81232629338982021 0
|
||||||
|
148 1.5545253193695066 1 0.17972930755262501
|
||||||
|
149 1.3104200347998118 0.56041577372755713 0.74814782862252316
|
||||||
|
150 1.3685266838244452 0.48564116582667954 0.21802764397288932
|
||||||
|
151 1.5873602781685263 0.78126669962189421 0.50005942609143139
|
||||||
|
152 1.5838618227448735 0.20899413185535243 0.49987585715718413
|
||||||
|
153 1.7498120256325995 0.25018792583716926 0
|
||||||
|
154 1.8148371462917434 0 0.18519382949207305
|
||||||
|
155 2 0.18752406345187056 0.18753523208397008
|
||||||
|
156 1.7770110643184227 0.51886547556217666 0
|
||||||
|
157 1.1389013076817112 0.76226887437066193 0
|
||||||
|
158 1.1602175406966813 1 0.53828850106094039
|
||||||
|
159 0.90095306490776128 0.48470516503498373 0.2446998657917499
|
||||||
|
160 0.57742475390278236 0.27551969863450299 0.27345305390889807
|
||||||
|
161 0.81036655925196366 0.7630643710333207 0.35054165377955776
|
||||||
|
162 0.52956259724790877 0.46221182650782827 1
|
||||||
|
163 0.29250079461431827 0.2842960350422109 0.71570127112180726
|
||||||
|
164 0.27385619515889037 0.6248453002643185 0.71436194557321087
|
||||||
|
165 0.62168045737651678 0 0.77560610491729931
|
||||||
|
166 0.62537124999999993 0.2188435803315899 1
|
||||||
|
167 0.40196038774740384 1 0.20267603513549107
|
||||||
|
168 0.17704223351222992 0.82288246470050785 0
|
||||||
|
169 0.18892018646284411 1 0.18899622733072144
|
||||||
|
170 0.23373058746113159 0.23679172957531613 0.21078402860060638
|
||||||
|
171 0.24428427259573549 0.59937304517793366 0.24724219230200442
|
||||||
|
172 0.42388190576270124 1 0.4887158204143946
|
||||||
|
173 1.0208555875954755 1 0.81817459887813815
|
||||||
|
174 1.0669175695053206 0.81733378836053194 1
|
||||||
|
175 0.8464712840664248 0.80134170756139955 1
|
||||||
|
176 0.60552202714220704 0.62419153018194229 0.54239960836207701
|
||||||
|
177 1.606777848712118 0.19973253606683206 1
|
||||||
|
178 1.4250560553222698 0 0.732249791887851
|
||||||
|
179 1.12551975 0.19352873225326209 1
|
||||||
|
180 1.1620342234529084 0 0.53548179044497457
|
||||||
|
181 0.77419059143108437 0.35536625456813642 0.76865650139332142
|
||||||
|
182 0.95600842566592681 0 0.52050427577014857
|
||||||
|
183 2 0.75 1
|
||||||
|
184 1.8229055680968635 1 0.82294606919028224
|
||||||
|
185 1.8124074661770861 0.8124421408239394 1
|
||||||
|
186 1.6847465495324894 0.55699324455967203 0.74450659675858755
|
||||||
|
187 1.1945125727535346 0.47020737648361044 0.48501348343009743
|
||||||
|
188 1.4371531545555845 0.81243056656291324 1
|
||||||
|
189 1.0230031981183827 0.60745624022002409 0.70905352953001077
|
||||||
|
190 1.3178218537541635 0.74283221838842173 0.24644567916733129
|
||||||
|
191 1.2298563370114035 0.23209604059822986 0.27403980288191482
|
||||||
|
192 1.7289412043422971 0.73378563235104455 0.27218740896208421
|
||||||
|
193 1.6944192651948711 0.39497422853539144 0.28096087015676863
|
||||||
|
194 1.719021973042385 0.27206088666699435 0.73925099693622187
|
||||||
|
195 0.51628118103442489 0.26487001488387318 0.53136856951372224
|
||||||
|
196 0.22693818747394334 0.22584860839480125 0.50499300132112901
|
||||||
|
197 0.18870598201308805 1 0.81131589108741564
|
||||||
|
198 0.18140974929389231 0.81855222162009078 1
|
||||||
|
199 0.52377345173705003 0.22575111801259504 0.77599180569982884
|
||||||
|
200 0.44512574719134834 0.82031319413422632 0
|
||||||
|
201 0.43769402753141229 0 0.18763960779463965
|
||||||
|
202 0.23194582827732274 0.56348972010969589 0.48517047319960538
|
||||||
|
203 1.404605953982319 0.2885118284317002 0.71332319773860509
|
||||||
|
204 0.83285106746651061 0.22679389369216291 0.56316489552371896
|
||||||
|
205 1.746191712341544 0.57096666984982924 0.48834249131610469
|
||||||
|
206 1.2698479063322867 0.73902081556323673 0.53223169180184582
|
||||||
|
207 1.0027339377070847 0.7783240018776667 0.51915438810718473
|
||||||
|
208 1.1247094999999998 1 0.19525173141898322
|
||||||
|
209 1.0585177272595161 0.22306568484158776 0.45497453797743681
|
||||||
|
210 1.5766743500280587 0.62019545180903912 0
|
||||||
|
211 1.5362846212581589 0.2135856104587727 0
|
||||||
|
212 1.7956396187713533 0.19223457391785517 0.37621602432494938
|
||||||
|
213 0.2338562054207384 0.80644498148268706 0.52587899633894741
|
||||||
|
# Generated by tetgen -qfa0.005 beam.poly
|
||||||
@ -1,8 +1,8 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-IextrudedMesh \
|
-IextrudedMesh \
|
||||||
-IextrudeModel/lnInclude \
|
-IextrudeModel/lnInclude \
|
||||||
-I$(FOAM_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(FOAM_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(FOAM_SRC)/dynamicMesh/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
|||||||
@ -225,6 +225,8 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
|
|||||||
// Dump halves
|
// Dump halves
|
||||||
{
|
{
|
||||||
OFstream str(prefix+cycPatch.name()+"_half0.obj");
|
OFstream str(prefix+cycPatch.name()+"_half0.obj");
|
||||||
|
Pout<< "Dumping cycPatch.name() half0 faces to " << str.name()
|
||||||
|
<< endl;
|
||||||
meshTools::writeOBJ
|
meshTools::writeOBJ
|
||||||
(
|
(
|
||||||
str,
|
str,
|
||||||
@ -241,6 +243,8 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
OFstream str(prefix+cycPatch.name()+"_half1.obj");
|
OFstream str(prefix+cycPatch.name()+"_half1.obj");
|
||||||
|
Pout<< "Dumping cycPatch.name() half1 faces to " << str.name()
|
||||||
|
<< endl;
|
||||||
meshTools::writeOBJ
|
meshTools::writeOBJ
|
||||||
(
|
(
|
||||||
str,
|
str,
|
||||||
@ -262,6 +266,9 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
|
|||||||
OFstream str(prefix+cycPatch.name()+"_match.obj");
|
OFstream str(prefix+cycPatch.name()+"_match.obj");
|
||||||
label vertI = 0;
|
label vertI = 0;
|
||||||
|
|
||||||
|
Pout<< "Dumping cyclic match as lines between face centres to "
|
||||||
|
<< str.name() << endl;
|
||||||
|
|
||||||
for (label faceI = 0; faceI < halfSize; faceI++)
|
for (label faceI = 0; faceI < halfSize; faceI++)
|
||||||
{
|
{
|
||||||
const point& fc0 = mesh.faceCentres()[cycPatch.start()+faceI];
|
const point& fc0 = mesh.faceCentres()[cycPatch.start()+faceI];
|
||||||
@ -773,6 +780,8 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true);
|
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true);
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.movePoints(map().preMotionPoints());
|
||||||
|
|
||||||
|
dumpCyclicMatch("coupled_", mesh);
|
||||||
|
|
||||||
// Synchronise points.
|
// Synchronise points.
|
||||||
if (!pointSync)
|
if (!pointSync)
|
||||||
{
|
{
|
||||||
@ -890,6 +899,8 @@ int main(int argc, char *argv[])
|
|||||||
filterPatches(mesh);
|
filterPatches(mesh);
|
||||||
|
|
||||||
|
|
||||||
|
dumpCyclicMatch("final_", mesh);
|
||||||
|
|
||||||
|
|
||||||
// Set the precision of the points data to 10
|
// Set the precision of the points data to 10
|
||||||
IOstream::defaultPrecision(10);
|
IOstream::defaultPrecision(10);
|
||||||
|
|||||||
@ -1,77 +1,96 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.0 |
|
| \\ / O peration | Version: 1.5 |
|
||||||
| \\ / A nd | Web: http://www.openfoam.org |
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
FoamFile
|
FoamFile
|
||||||
{
|
{
|
||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
root "";
|
object createPatchDict;
|
||||||
case "";
|
|
||||||
instance "system";
|
|
||||||
local "";
|
|
||||||
|
|
||||||
class dictionary;
|
|
||||||
object createPatcheDict;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Tolerance used in matching faces. Absolute tolerance is span of
|
// This application/dictionary controls:
|
||||||
// face times this factor.
|
// - optional: create new patches from boundary faces (either given as
|
||||||
matchTolerance 1E-6;
|
// a set of patches or as a faceSet)
|
||||||
|
// - always: order faces on coupled patches such that they are opposite. This
|
||||||
|
// is done for all coupled faces, not just for any patches created.
|
||||||
|
// - optional: synchronise points on coupled patches.
|
||||||
|
|
||||||
// Do a synchronisation of coupled points.
|
// 1. Create cyclic:
|
||||||
|
// - specify where the faces should come from
|
||||||
|
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||||
|
// and centre to make matching easier
|
||||||
|
// - pointSync true to guarantee points to line up.
|
||||||
|
|
||||||
|
// 2. Correct incorrect cyclic:
|
||||||
|
// This will usually fail upon loading:
|
||||||
|
// "face 0 area does not match neighbour 2 by 0.0100005%"
|
||||||
|
// " -- possible face ordering problem."
|
||||||
|
// - change patch type from 'cyclic' to 'patch' in the polyMesh/boundary file.
|
||||||
|
// - loosen match tolerance to get case to load
|
||||||
|
// - regenerate cyclic as above
|
||||||
|
|
||||||
|
|
||||||
|
// Tolerance used in matching faces. Absolute tolerance is span of
|
||||||
|
// face times this factor. To load incorrectly matches meshes set this
|
||||||
|
// to a higher value.
|
||||||
|
matchTolerance 1E-3;
|
||||||
|
|
||||||
|
// Do a synchronisation of coupled points after creation of any patches.
|
||||||
pointSync true;
|
pointSync true;
|
||||||
|
|
||||||
|
|
||||||
// Patches to create.
|
// Patches to create.
|
||||||
// If no patches does a coupled point and face synchronisation anyway.
|
|
||||||
patches
|
patches
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
// Name of new patch
|
// Name of new patch
|
||||||
name sidePatches;
|
name sidePatches;
|
||||||
|
|
||||||
// Dictionary for new patch
|
// Type of new patch
|
||||||
dictionary
|
dictionary
|
||||||
{
|
{
|
||||||
type cyclic;
|
type cyclic;
|
||||||
// Optional: used when matching and synchronising points.
|
|
||||||
|
// Optional: explicitly set transformation tensor.
|
||||||
|
// Used when matching and synchronising points.
|
||||||
//transform translational;
|
//transform translational;
|
||||||
//separationVector (-2289 0 0);
|
//separationVector (-2289 0 0);
|
||||||
}
|
transform rotational;
|
||||||
|
rotationAxis (1 0 0);
|
||||||
|
rotationCentre (0 0 0);
|
||||||
|
}
|
||||||
|
|
||||||
// How to construct: either 'patches' or 'set'
|
// How to construct: either from 'patches' or 'set'
|
||||||
constructFrom patches;
|
constructFrom patches;
|
||||||
|
|
||||||
// If constructFrom = patches : names of patches
|
// If constructFrom = patches : names of patches
|
||||||
//patches (periodic-1 periodic-2);
|
patches (periodic-1 periodic-2);
|
||||||
patches (outlet-side1 outlet-side2);
|
|
||||||
|
|
||||||
// If constructFrom = set : name of faceSet
|
// If constructFrom = set : name of faceSet
|
||||||
set f0;
|
set f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//{
|
{
|
||||||
// name bottom;
|
name bottom;
|
||||||
// // Dictionary for new patch
|
|
||||||
// dictionary
|
// Type of new patch
|
||||||
// {
|
dictionary
|
||||||
// type patch;
|
{
|
||||||
// }
|
type wall;
|
||||||
//
|
}
|
||||||
// constructFrom set;
|
|
||||||
//
|
constructFrom set;
|
||||||
// patches (half0 half1);
|
|
||||||
//
|
patches ();
|
||||||
// set bottomFaces;
|
|
||||||
//}
|
set bottomFaces;
|
||||||
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
volPointInterpolation pInterp(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
// Get times list
|
// Get times list
|
||||||
instantList Times = runTime.times();
|
instantList Times = runTime.times();
|
||||||
|
|||||||
@ -154,10 +154,77 @@ void insertDuplicateMerge
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
||||||
|
{
|
||||||
|
// Get all duplicate face labels (in boundaryFaces indices!).
|
||||||
|
labelList duplicates = localPointRegion::findDuplicateFaces
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
boundaryFaces
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Check that none are on processor patches
|
||||||
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
|
forAll(duplicates, bFaceI)
|
||||||
|
{
|
||||||
|
if (duplicates[bFaceI] != -1)
|
||||||
|
{
|
||||||
|
label faceI = mesh.nInternalFaces() + bFaceI;
|
||||||
|
label patchI = patches.whichPatch(faceI);
|
||||||
|
|
||||||
|
if (isA<processorPolyPatch>(patches[patchI]))
|
||||||
|
{
|
||||||
|
FatalErrorIn("findBaffles(const polyMesh&, const labelList&)")
|
||||||
|
<< "Duplicate face " << faceI
|
||||||
|
<< " is on a processorPolyPatch."
|
||||||
|
<< "This is not allowed." << nl
|
||||||
|
<< "Face:" << faceI
|
||||||
|
<< " is on patch:" << patches[patchI].name()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Write to faceSet for ease of postprocessing.
|
||||||
|
{
|
||||||
|
faceSet duplicateSet
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
"duplicateFaces",
|
||||||
|
(mesh.nFaces() - mesh.nInternalFaces())/256
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(duplicates, bFaceI)
|
||||||
|
{
|
||||||
|
label otherFaceI = duplicates[bFaceI];
|
||||||
|
|
||||||
|
if (otherFaceI != -1 && otherFaceI > bFaceI)
|
||||||
|
{
|
||||||
|
duplicateSet.insert(mesh.nInternalFaces() + bFaceI);
|
||||||
|
duplicateSet.insert(mesh.nInternalFaces() + otherFaceI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pout<< "Writing " << duplicateSet.size()
|
||||||
|
<< " duplicate faces to faceSet " << duplicateSet.objectPath()
|
||||||
|
<< nl << endl;
|
||||||
|
duplicateSet.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
return duplicates;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("split", "");
|
argList::validOptions.insert("split", "");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::validOptions.insert("overwrite", "");
|
||||||
|
argList::validOptions.insert("detectOnly", "");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
@ -165,6 +232,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bool split = args.options().found("split");
|
bool split = args.options().found("split");
|
||||||
bool overwrite = args.options().found("overwrite");
|
bool overwrite = args.options().found("overwrite");
|
||||||
|
bool detectOnly = args.options().found("detectOnly");
|
||||||
|
|
||||||
// Collect all boundary faces
|
// Collect all boundary faces
|
||||||
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());
|
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());
|
||||||
@ -175,6 +243,15 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (detectOnly)
|
||||||
|
{
|
||||||
|
findBaffles(mesh, boundaryFaces);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Read objects in time directory
|
// Read objects in time directory
|
||||||
IOobjectList objects(mesh, runTime.timeName());
|
IOobjectList objects(mesh, runTime.timeName());
|
||||||
|
|
||||||
@ -238,62 +315,7 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
// Get all duplicate face labels (in boundaryFaces indices!).
|
// Get all duplicate face labels (in boundaryFaces indices!).
|
||||||
labelList duplicates = localPointRegion::findDuplicateFaces
|
labelList duplicates(findBaffles(mesh, boundaryFaces));
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
boundaryFaces
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Check that none are on processor patches
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
|
||||||
|
|
||||||
forAll(duplicates, bFaceI)
|
|
||||||
{
|
|
||||||
if (duplicates[bFaceI] != -1)
|
|
||||||
{
|
|
||||||
label faceI = mesh.nInternalFaces() + bFaceI;
|
|
||||||
label patchI = patches.whichPatch(faceI);
|
|
||||||
|
|
||||||
if (isA<processorPolyPatch>(patches[patchI]))
|
|
||||||
{
|
|
||||||
FatalErrorIn(args.executable())
|
|
||||||
<< "Duplicate face " << faceI
|
|
||||||
<< " is on a processorPolyPatch."
|
|
||||||
<< "This is not allowed." << nl
|
|
||||||
<< "Face:" << faceI
|
|
||||||
<< " is on patch:" << patches[patchI].name()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Write to faceSet for ease of postprocessing.
|
|
||||||
{
|
|
||||||
faceSet duplicateSet
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
"duplicateFaces",
|
|
||||||
(mesh.nFaces() - mesh.nInternalFaces())/256
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(duplicates, bFaceI)
|
|
||||||
{
|
|
||||||
label otherFaceI = duplicates[bFaceI];
|
|
||||||
|
|
||||||
if (otherFaceI != -1 && otherFaceI > bFaceI)
|
|
||||||
{
|
|
||||||
duplicateSet.insert(mesh.nInternalFaces() + bFaceI);
|
|
||||||
duplicateSet.insert(mesh.nInternalFaces() + otherFaceI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Pout<< "Writing " << duplicateSet.size()
|
|
||||||
<< " duplicate faces to faceSet " << duplicateSet.objectPath()
|
|
||||||
<< nl << endl;
|
|
||||||
duplicateSet.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Merge into internal faces.
|
// Merge into internal faces.
|
||||||
insertDuplicateMerge(mesh, duplicates, meshMod);
|
insertDuplicateMerge(mesh, duplicates, meshMod);
|
||||||
|
|||||||
@ -316,11 +316,10 @@ autoPtr<mapPolyMesh> reorderMesh
|
|||||||
|
|
||||||
mesh.resetPrimitives
|
mesh.resetPrimitives
|
||||||
(
|
(
|
||||||
mesh.nFaces(),
|
xfer<pointField>::null(),
|
||||||
mesh.points(),
|
xferMove(newFaces),
|
||||||
newFaces,
|
xferMove(newOwner),
|
||||||
newOwner,
|
xferMove(newNeighbour),
|
||||||
newNeighbour,
|
|
||||||
patchSizes,
|
patchSizes,
|
||||||
patchStarts
|
patchStarts
|
||||||
);
|
);
|
||||||
|
|||||||
@ -714,9 +714,11 @@ commandStatus parseAction(const word& actionName)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
|
# include "addTimeOptions.H"
|
||||||
|
|
||||||
argList::validOptions.insert("noVTK", "");
|
argList::validOptions.insert("noVTK", "");
|
||||||
argList::validOptions.insert("batch", "file");
|
argList::validOptions.insert("batch", "file");
|
||||||
# include "addTimeOptions.H"
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -730,7 +732,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
runTime.setTime(Times[startTime], startTime);
|
||||||
|
|
||||||
# include "createPolyMesh.H"
|
# include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
// Print some mesh info
|
// Print some mesh info
|
||||||
printMesh(runTime, mesh);
|
printMesh(runTime, mesh);
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(FOAM_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(FOAM_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
|||||||
@ -39,6 +39,14 @@ Usage
|
|||||||
@param -zeroTime \n
|
@param -zeroTime \n
|
||||||
Include the often incomplete initial conditions.
|
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
|
Note
|
||||||
- no parallel data.
|
- no parallel data.
|
||||||
- writes to @a Ensight directory to avoid collisions with foamToEnsight.
|
- writes to @a Ensight directory to avoid collisions with foamToEnsight.
|
||||||
@ -70,6 +78,8 @@ int main(int argc, char *argv[])
|
|||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validOptions.insert("ascii", "");
|
argList::validOptions.insert("ascii", "");
|
||||||
|
argList::validOptions.insert("index", "start");
|
||||||
|
argList::validOptions.insert("noMesh", "");
|
||||||
|
|
||||||
const word volFieldTypes[] =
|
const word volFieldTypes[] =
|
||||||
{
|
{
|
||||||
@ -104,6 +114,18 @@ int main(int argc, char *argv[])
|
|||||||
format = IOstream::ASCII;
|
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 ensightDir = args.rootPath()/args.globalCaseName()/"Ensight";
|
||||||
fileName dataDir = ensightDir/"data";
|
fileName dataDir = ensightDir/"data";
|
||||||
fileName caseFileName = "Ensight.case";
|
fileName caseFileName = "Ensight.case";
|
||||||
@ -146,6 +168,13 @@ int main(int argc, char *argv[])
|
|||||||
# include "findFields.H"
|
# include "findFields.H"
|
||||||
# include "validateFields.H"
|
# include "validateFields.H"
|
||||||
|
|
||||||
|
if (hasMovingMesh && optNoMesh)
|
||||||
|
{
|
||||||
|
Info<< "mesh is moving: ignoring '-noMesh' option" << endl;
|
||||||
|
optNoMesh = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// map times used
|
// map times used
|
||||||
Map<scalar> timeIndices;
|
Map<scalar> timeIndices;
|
||||||
|
|
||||||
@ -192,15 +221,18 @@ int main(int argc, char *argv[])
|
|||||||
partsList.recalculate(mesh);
|
partsList.recalculate(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileName geomDir;
|
if (!optNoMesh)
|
||||||
if (hasMovingMesh)
|
|
||||||
{
|
{
|
||||||
geomDir = dataDir/subDir;
|
fileName geomDir;
|
||||||
}
|
if (hasMovingMesh)
|
||||||
|
{
|
||||||
|
geomDir = dataDir/subDir;
|
||||||
|
}
|
||||||
|
|
||||||
ensightGeoFile geoFile(ensightDir/geomDir/geometryName, format);
|
ensightGeoFile geoFile(ensightDir/geomDir/geometryName, format);
|
||||||
partsList.writeGeometry(geoFile);
|
partsList.writeGeometry(geoFile);
|
||||||
Info << nl;
|
Info<< nl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "write volume field (" << flush;
|
Info<< "write volume field (" << flush;
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
// Read time index from */uniform/time,
|
// Read time index from */uniform/time, but treat 0 and constant specially
|
||||||
// but treat 0 and constant specially
|
// or simply increment from the '-index' option if it was supplied
|
||||||
|
|
||||||
label timeIndex = 0;
|
label timeIndex = 0;
|
||||||
|
|
||||||
if
|
if (optIndex)
|
||||||
|
{
|
||||||
|
timeIndex = indexingNumber++;
|
||||||
|
}
|
||||||
|
else if
|
||||||
(
|
(
|
||||||
runTime.timeName() != "constant"
|
runTime.timeName() != "constant"
|
||||||
&& runTime.timeName() != "0"
|
&& runTime.timeName() != "0"
|
||||||
@ -22,19 +26,8 @@
|
|||||||
|
|
||||||
if (io.headerOk())
|
if (io.headerOk())
|
||||||
{
|
{
|
||||||
IOdictionary timeObject
|
io.readOpt() = IOobject::MUST_READ;
|
||||||
(
|
IOdictionary timeObject(io);
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"time",
|
|
||||||
runTime.timeName(),
|
|
||||||
"uniform",
|
|
||||||
runTime,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
timeObject.lookup("index") >> timeIndex;
|
timeObject.lookup("index") >> timeIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,18 @@
|
|||||||
{
|
{
|
||||||
IOobject ioPoints
|
IOobject io
|
||||||
(
|
(
|
||||||
"points",
|
"points",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
polyMesh::meshSubDir,
|
polyMesh::meshSubDir,
|
||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ioPoints.headerOk())
|
if (io.headerOk())
|
||||||
{
|
{
|
||||||
// Reading new points
|
// Read new points
|
||||||
pointIOField newPoints
|
io.readOpt() = IOobject::MUST_READ;
|
||||||
(
|
pointIOField newPoints(io);
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"points",
|
|
||||||
mesh.time().timeName(),
|
|
||||||
polyMesh::meshSubDir,
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
mesh.movePoints(newPoints);
|
mesh.movePoints(newPoints);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,8 @@ forAllIter(HashTable<word>, volumeFields, fieldIter)
|
|||||||
const word& fieldName = fieldIter.key();
|
const word& fieldName = fieldIter.key();
|
||||||
const word& fieldType = fieldIter();
|
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);
|
volumeFields.erase(fieldIter);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -642,8 +642,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//Info<< "Writing variables data ..." << endl;
|
//Info<< "Writing variables data ..." << endl;
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
volPointInterpolation pInterp(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
writeInt(fvFile, FV_VARIABLES);
|
writeInt(fvFile, FV_VARIABLES);
|
||||||
|
|
||||||
|
|||||||
@ -489,7 +489,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
psf
|
psf
|
||||||
@ -499,7 +499,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
pvf
|
pvf
|
||||||
@ -509,7 +509,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
pSpheretf
|
pSpheretf
|
||||||
@ -519,7 +519,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
pSymmtf
|
pSymmtf
|
||||||
@ -529,7 +529,7 @@ int main(int argc, char *argv[])
|
|||||||
readFields
|
readFields
|
||||||
(
|
(
|
||||||
vMesh,
|
vMesh,
|
||||||
vMesh.basePointMesh(),
|
pointMesh::New(vMesh.baseMesh()),
|
||||||
objects,
|
objects,
|
||||||
selectedFields,
|
selectedFields,
|
||||||
ptf
|
ptf
|
||||||
@ -598,7 +598,7 @@ int main(int argc, char *argv[])
|
|||||||
writer.write(ptf);
|
writer.write(ptf);
|
||||||
|
|
||||||
// Interpolated volFields
|
// Interpolated volFields
|
||||||
volPointInterpolation pInterp(mesh, vMesh.pMesh());
|
volPointInterpolation pInterp(mesh);
|
||||||
writer.write(pInterp, vsf);
|
writer.write(pInterp, vsf);
|
||||||
writer.write(pInterp, vvf);
|
writer.write(pInterp, vvf);
|
||||||
writer.write(pInterp, vSpheretf);
|
writer.write(pInterp, vSpheretf);
|
||||||
|
|||||||
@ -70,7 +70,6 @@ Foam::polyMesh::readUpdateState Foam::vtkMesh::readUpdate()
|
|||||||
// the subset even if only movement.
|
// the subset even if only movement.
|
||||||
|
|
||||||
topoPtr_.clear();
|
topoPtr_.clear();
|
||||||
pointMeshPtr_.clear();
|
|
||||||
|
|
||||||
if (setName_.size() > 0)
|
if (setName_.size() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,6 @@ SourceFiles
|
|||||||
|
|
||||||
#include "vtkTopo.H"
|
#include "vtkTopo.H"
|
||||||
#include "fvMeshSubset.H"
|
#include "fvMeshSubset.H"
|
||||||
#include "pointMesh.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -60,9 +59,6 @@ class vtkMesh
|
|||||||
//- Reference to mesh
|
//- Reference to mesh
|
||||||
fvMesh& baseMesh_;
|
fvMesh& baseMesh_;
|
||||||
|
|
||||||
//- Demand driven pointMesh
|
|
||||||
mutable autoPtr<pointMesh> pointMeshPtr_;
|
|
||||||
|
|
||||||
//- Subsetting engine + sub-fvMesh
|
//- Subsetting engine + sub-fvMesh
|
||||||
fvMeshSubset subsetter_;
|
fvMeshSubset subsetter_;
|
||||||
|
|
||||||
@ -101,15 +97,6 @@ public:
|
|||||||
return baseMesh_;
|
return baseMesh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pointMesh& basePointMesh() const
|
|
||||||
{
|
|
||||||
if (!pointMeshPtr_.valid())
|
|
||||||
{
|
|
||||||
pointMeshPtr_.reset(new pointMesh(baseMesh_));
|
|
||||||
}
|
|
||||||
return pointMeshPtr_();
|
|
||||||
}
|
|
||||||
|
|
||||||
const fvMeshSubset& subsetter() const
|
const fvMeshSubset& subsetter() const
|
||||||
{
|
{
|
||||||
return subsetter_;
|
return subsetter_;
|
||||||
@ -144,19 +131,6 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Access either pointMesh of base or pointMesh of subset
|
|
||||||
const pointMesh& pMesh() const
|
|
||||||
{
|
|
||||||
if (useSubMesh())
|
|
||||||
{
|
|
||||||
return subsetter_.subPointMesh();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return basePointMesh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Number of field cells
|
//- Number of field cells
|
||||||
label nFieldCells() const
|
label nFieldCells() const
|
||||||
{
|
{
|
||||||
@ -166,7 +140,7 @@ public:
|
|||||||
//- Number of field points
|
//- Number of field points
|
||||||
label nFieldPoints() const
|
label nFieldPoints() const
|
||||||
{
|
{
|
||||||
return pMesh().size() + topo().addPointCellLabels().size();
|
return mesh().nPoints() + topo().addPointCellLabels().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# create a plugin that adds a reader to the ParaView GUI
|
# create a plugin that adds a reader to the ParaView GUI
|
||||||
# it is added in the file dialog when doing opens/saves.
|
# it is added in the file dialog when doing opens/saves.
|
||||||
|
|
||||||
@ -16,8 +15,8 @@ LINK_DIRECTORIES(
|
|||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
$ENV{FOAM_SRC}/OpenFOAM/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
||||||
$ENV{FOAM_SRC}/finiteVolume/lnInclude
|
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
||||||
${PROJECT_SOURCE_DIR}/../vtkPV3Foam
|
${PROJECT_SOURCE_DIR}/../vtkPV3Foam
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -52,3 +51,4 @@ TARGET_LINK_LIBRARIES(
|
|||||||
finiteVolume
|
finiteVolume
|
||||||
vtkPV3Foam
|
vtkPV3Foam
|
||||||
)
|
)
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -107,8 +107,7 @@ void Foam::vtkPV3Foam::convertVolFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Construct interpolation on the raw mesh
|
// Construct interpolation on the raw mesh
|
||||||
pointMesh pMesh(mesh);
|
volPointInterpolation pInterp(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
PtrList<PrimitivePatchInterpolation<primitivePatch> >
|
PtrList<PrimitivePatchInterpolation<primitivePatch> >
|
||||||
ppInterpList(mesh.boundaryMesh().size());
|
ppInterpList(mesh.boundaryMesh().size());
|
||||||
|
|||||||
@ -16,8 +16,12 @@ SET(PVFoamReader_LIBS
|
|||||||
vtkGraphics
|
vtkGraphics
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES($ENV{FOAM_SRC}/OpenFOAM/lnInclude $ENV{FOAM_SRC}/finiteVolume/lnInclude)
|
INCLUDE_DIRECTORIES(
|
||||||
INCLUDE_DIRECTORIES($ENV{ParaView_INST_DIR}/include ../vtkFoam/lnInclude)
|
$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})
|
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)
|
${PROJECT_BINARY_DIR}/../${PROJECT_NAME}.pvsm @ONLY IMMEDIATE)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(${PROJECT_NAME} OpenFOAM finiteVolume vtkFoam)
|
TARGET_LINK_LIBRARIES(${PROJECT_NAME} OpenFOAM finiteVolume vtkFoam)
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -94,7 +94,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/browser/lnInclude \
|
-I$(LIB_SRC)/browser/lnInclude \
|
||||||
-I$(FOAM_SRC)/lagrangian/basic/lnInclude
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
$(FV_LIBS) \
|
$(FV_LIBS) \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||||
|
|||||||
@ -79,12 +79,12 @@ int main(int argc, char *argv[])
|
|||||||
Info<< " Reading volScalarField " << fieldName << endl;
|
Info<< " Reading volScalarField " << fieldName << endl;
|
||||||
volScalarField field(fieldHeader, mesh);
|
volScalarField field(fieldHeader, mesh);
|
||||||
|
|
||||||
scalar area = sum(mesh.magSf().boundaryField()[patchi]);
|
scalar area = gSum(mesh.magSf().boundaryField()[patchi]);
|
||||||
scalar sumField = 0;
|
scalar sumField = 0;
|
||||||
|
|
||||||
if (area > 0)
|
if (area > 0)
|
||||||
{
|
{
|
||||||
sumField = sum
|
sumField = gSum
|
||||||
(
|
(
|
||||||
mesh.magSf().boundaryField()[patchi]
|
mesh.magSf().boundaryField()[patchi]
|
||||||
* field.boundaryField()[patchi]
|
* field.boundaryField()[patchi]
|
||||||
|
|||||||
@ -75,14 +75,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Give patch area
|
// Give patch area
|
||||||
Info<< " Patch area = " << sum(mesh.Sf().boundaryField()[patchi]) << endl;
|
Info<< " Patch area = " << gSum(mesh.Sf().boundaryField()[patchi]) << endl;
|
||||||
|
|
||||||
if (fieldHeader.headerClassName() == "volScalarField")
|
if (fieldHeader.headerClassName() == "volScalarField")
|
||||||
{
|
{
|
||||||
Info<< " Reading volScalarField " << fieldName << endl;
|
Info<< " Reading volScalarField " << fieldName << endl;
|
||||||
volScalarField field(fieldHeader, mesh);
|
volScalarField field(fieldHeader, mesh);
|
||||||
|
|
||||||
vector sumField = sum
|
vector sumField = gSum
|
||||||
(
|
(
|
||||||
mesh.Sf().boundaryField()[patchi]
|
mesh.Sf().boundaryField()[patchi]
|
||||||
* field.boundaryField()[patchi]
|
* field.boundaryField()[patchi]
|
||||||
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< " Reading surfaceScalarField " << fieldName << endl;
|
Info<< " Reading surfaceScalarField " << fieldName << endl;
|
||||||
|
|
||||||
surfaceScalarField field(fieldHeader, mesh);
|
surfaceScalarField field(fieldHeader, mesh);
|
||||||
scalar sumField = sum(field.boundaryField()[patchi]);
|
scalar sumField = gSum(field.boundaryField()[patchi]);
|
||||||
|
|
||||||
Info<< " Integral of " << fieldName << " over patch "
|
Info<< " Integral of " << fieldName << " over patch "
|
||||||
<< patchName << '[' << patchi << ']' << " = "
|
<< patchName << '[' << patchi << ']' << " = "
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(FOAM_SRC)/postProcessing/postCalc \
|
-I$(LIB_SRC)/postProcessing/postCalc \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
|
|||||||
@ -1,40 +1,46 @@
|
|||||||
09/01/04
|
2008-10-23
|
||||||
|
|
||||||
Contents:
|
Contents:
|
||||||
|
|
||||||
surfaceAdd
|
surfaceAdd
|
||||||
adds to surface files. (but does not intersect or anything)
|
- adds to surface files. (but does not intersect or anything)
|
||||||
|
|
||||||
surfaceBooleanOp
|
surfaceBooleanOp
|
||||||
Boolean operations (add, or, xor) on closed surfaces. Probably not working.
|
- Boolean operations (add, or, xor) on closed surfaces. Probably not working.
|
||||||
|
|
||||||
surfaceCheck
|
surfaceCheck
|
||||||
checks surface for incorrect topology. Checks normals of neighbouring faces.
|
- checks surface for incorrect topology. Checks normals of neighbouring faces.
|
||||||
|
|
||||||
surfaceCoarsen
|
surfaceCoarsen
|
||||||
Stan Melax coarsening algorithm
|
- Stan Melax coarsening algorithm
|
||||||
|
|
||||||
surfaceConvert
|
surfaceConvert
|
||||||
Converts surfaces to/from various formats
|
- Converts surfaces to/from various formats
|
||||||
|
|
||||||
surfaceFind
|
surfaceFind
|
||||||
Finds nearest vertex and face to given point.
|
- Finds nearest vertex and face to given point.
|
||||||
|
|
||||||
surfaceMeshTriangulate
|
surfaceMeshTriangulate
|
||||||
Triangulate external facses of mesh and write as surface.
|
- Triangulate external facses of mesh and write as surface.
|
||||||
|
|
||||||
surfacePointMerge
|
surfacePointMerge
|
||||||
Explicit point merge of surface.
|
- Explicit point merge of surface.
|
||||||
|
|
||||||
surfaceSetOutside
|
surfaceSetOutside
|
||||||
Orient normals on (closed) surface.
|
- Orient normals on (closed) surface.
|
||||||
|
|
||||||
surfaceSmooth
|
surfaceSmooth
|
||||||
Laplacian smoothing on surface vertices
|
- Laplacian smoothing on surface vertices
|
||||||
|
|
||||||
surfaceSubset
|
surfaceSubset
|
||||||
Subsets surface
|
- Subsets surface
|
||||||
|
|
||||||
surfaceToPatch
|
surfaceToPatch
|
||||||
Applies region information of surfaces to mesh. Each external face of mesh
|
- Applies region information of surfaces to mesh.
|
||||||
gets region number of nearest surface triangle.
|
Each external face of mesh gets region number of nearest surface triangle.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
surfaceMeshConvert
|
||||||
|
- Similar to surfaceConvert, but uses surfMesh library
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
surfaceMeshConvert.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/surfaceMeshConvert
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||||
|
-I$(LIB_SRC)/surfMesh/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = -lsurfMesh
|
||||||
@ -0,0 +1,145 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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
|
||||||
|
surfaceMeshConvert
|
||||||
|
|
||||||
|
Description
|
||||||
|
Converts from one surface mesh format to another
|
||||||
|
|
||||||
|
Usage
|
||||||
|
- surfaceMeshConvert inputFile outputFile [OPTION]
|
||||||
|
|
||||||
|
@param -clean \n
|
||||||
|
Perform some surface checking/cleanup on the input surface
|
||||||
|
|
||||||
|
@param -scale \<scale\> \n
|
||||||
|
Specify a scaling factor for writing the files
|
||||||
|
|
||||||
|
@param -triSurface \n
|
||||||
|
Use triSurface library for input/output
|
||||||
|
|
||||||
|
Note
|
||||||
|
The filename extensions are used to determine the file format type.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "argList.H"
|
||||||
|
#include "timeSelector.H"
|
||||||
|
#include "Time.H"
|
||||||
|
#include "polyMesh.H"
|
||||||
|
#include "meshedSurface.H"
|
||||||
|
#include "triSurface.H"
|
||||||
|
|
||||||
|
using namespace Foam;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Main program:
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
argList::noParallel();
|
||||||
|
argList::validArgs.append("inputFile");
|
||||||
|
argList::validArgs.append("outputFile");
|
||||||
|
argList::validOptions.insert("scale", "scale");
|
||||||
|
argList::validOptions.insert("clean", "");
|
||||||
|
argList::validOptions.insert("triSurface", "");
|
||||||
|
# include "setRootCase.H"
|
||||||
|
const stringList& params = args.additionalArgs();
|
||||||
|
|
||||||
|
scalar scaleFactor = 0;
|
||||||
|
if (args.options().found("scale"))
|
||||||
|
{
|
||||||
|
IStringStream(args.options()["scale"])() >> scaleFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
fileName importName(params[0]);
|
||||||
|
fileName exportName(params[1]);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
!meshedSurface::canRead(importName.ext(), true)
|
||||||
|
|| !meshedSurface::canWrite(exportName.ext(), true)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.options().found("triSurface"))
|
||||||
|
{
|
||||||
|
// # include "createTime.H"
|
||||||
|
// instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
// # include "createPolyMesh.H"
|
||||||
|
|
||||||
|
triSurface surf(importName);
|
||||||
|
|
||||||
|
if (args.options().found("clean"))
|
||||||
|
{
|
||||||
|
surf.cleanup(true);
|
||||||
|
surf.checkOrientation(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info << "writing " << exportName;
|
||||||
|
if (scaleFactor <= 0)
|
||||||
|
{
|
||||||
|
Info<< " without scaling" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " triSurface does not yet support scaling "
|
||||||
|
<< scaleFactor << endl;
|
||||||
|
// surf.scalePoints(scaleFactor);
|
||||||
|
}
|
||||||
|
surf.write(exportName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
meshedSurface surf(importName);
|
||||||
|
|
||||||
|
if (args.options().found("clean"))
|
||||||
|
{
|
||||||
|
surf.cleanup(true);
|
||||||
|
surf.checkOrientation(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
surf.scalePoints(scaleFactor);
|
||||||
|
|
||||||
|
Info<< "writing " << exportName;
|
||||||
|
if (scaleFactor <= 0)
|
||||||
|
{
|
||||||
|
Info<< " without scaling" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< " with scaling " << scaleFactor << endl;
|
||||||
|
}
|
||||||
|
surf.write(exportName);
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
25
bin/foamNew
25
bin/foamNew
@ -36,7 +36,7 @@ usage() {
|
|||||||
|
|
||||||
usage: ${0##*/} <type> {args}
|
usage: ${0##*/} <type> {args}
|
||||||
|
|
||||||
* create a new standard OpenFOAM source file
|
* create a new standard OpenFOAM source or template file
|
||||||
|
|
||||||
type: (source|template)
|
type: (source|template)
|
||||||
|
|
||||||
@ -46,25 +46,24 @@ USAGE
|
|||||||
|
|
||||||
if [ "$#" -lt 2 ]
|
if [ "$#" -lt 2 ]
|
||||||
then
|
then
|
||||||
usage "wrong number of arguments, expected 2 (or more)"
|
usage "wrong number of arguments, expected 2 (or more)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h | -help)
|
-h | -help)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
source)
|
source)
|
||||||
shift
|
shift
|
||||||
$WM_PROJECT_DIR/bin/foamTemplates/source/newSource $*
|
$WM_PROJECT_DIR/bin/foamTemplates/source/newSource $*
|
||||||
;;
|
;;
|
||||||
template)
|
template)
|
||||||
shift
|
shift
|
||||||
$WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/newSourceTemplate $*
|
$WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/newSourceTemplate $*
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unknown type"
|
usage "unknown type"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
16
bin/foamPack
16
bin/foamPack
@ -38,20 +38,20 @@ packFile=${packDir}_${timeStamp}.gtgz
|
|||||||
|
|
||||||
if [ ! -d $packDir ]
|
if [ ! -d $packDir ]
|
||||||
then
|
then
|
||||||
echo "Error: directory $packDir does not exist"
|
echo "Error: directory $packDir does not exist" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add optional output directory
|
# add optional output directory
|
||||||
if [ -d "$1" ]
|
if [ -d "$1" ]
|
||||||
then
|
then
|
||||||
packFile="$1/$packFile"
|
packFile="$1/$packFile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $packFile ]
|
if [ -f $packFile ]
|
||||||
then
|
then
|
||||||
echo "Error: $packFile already exists"
|
echo "Error: $packFile already exists" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create time stamp file
|
# Create time stamp file
|
||||||
@ -102,10 +102,10 @@ tar czpf $packFile --files-from $tmpFile
|
|||||||
|
|
||||||
if [ $? = 0 ]
|
if [ $? = 0 ]
|
||||||
then
|
then
|
||||||
echo "Finished packing and compressing $packDir into file $packFile"
|
echo "Finished packing and compressing $packDir into file $packFile"
|
||||||
else
|
else
|
||||||
echo "Error: failure packing $packDir into file $packFile"
|
echo "Error: failure packing $packDir into file $packFile" 1>&2
|
||||||
rm -f $packFile 2>/dev/null
|
rm -f $packFile 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -34,6 +34,7 @@ packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
|||||||
packTag=_Doxygen.gtgz
|
packTag=_Doxygen.gtgz
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||||
cat <<USAGE 1>&2
|
cat <<USAGE 1>&2
|
||||||
Usage: ${0##*/} [-prefix DIR] [-o outputDir]
|
Usage: ${0##*/} [-prefix DIR] [-o outputDir]
|
||||||
|
|
||||||
@ -47,38 +48,38 @@ unset prefix outputDir
|
|||||||
|
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
-prefix | --prefix )
|
-prefix | --prefix )
|
||||||
prefix=${2%%/}
|
prefix=${2%%/}
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-o | -output )
|
-o | -output )
|
||||||
outputDir=${2%%/}
|
outputDir=${2%%/}
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-h | -help )
|
-h | -help )
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
usage "unknown option: '$*'"
|
usage "unknown option: '$*'"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# if packing from within the directory, use -prefix form
|
# if packing from within the directory, use -prefix form
|
||||||
if [ "${PWD##*/}" = "$packDir" ]
|
if [ "${PWD##*/}" = "$packDir" ]
|
||||||
then
|
then
|
||||||
: ${prefix:=$packDir}
|
: ${prefix:=$packDir}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pack the directories directly and add prefix afterwards
|
# pack the directories directly and add prefix afterwards
|
||||||
if [ -n "$prefix" ]
|
if [ -n "$prefix" ]
|
||||||
then
|
then
|
||||||
packDir="$prefix"
|
packDir="$prefix"
|
||||||
elif [ ! -d $packDir ]
|
elif [ ! -d $packDir ]
|
||||||
then
|
then
|
||||||
echo "Error: directory $packDir does not exist"
|
echo "Error: directory $packDir does not exist" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@ -36,26 +36,25 @@
|
|||||||
foamVersion=$WM_PROJECT_VERSION
|
foamVersion=$WM_PROJECT_VERSION
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} [OPTION] <file1> ... <fileN>
|
usage: ${0##*/} [OPTION] <file1> ... <fileN>
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-v "<version>" specifies the version to be written in the header
|
-v VER specifies the version to be written in the header
|
||||||
-h help
|
-h help
|
||||||
|
|
||||||
Updates the header of application files.
|
Updates the header of application files and removes consecutive blank lines.
|
||||||
By default, writes current version in the header.
|
By default, writes current version in the header.
|
||||||
Alternatively version can be specified with -v option.
|
An alternative version can be specified with -v option.
|
||||||
Also removes consecutive blank lines from file.
|
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
printHeader() {
|
printHeader() {
|
||||||
cat<<HEADER
|
cat<<HEADER
|
||||||
/*--------------------------------*- C++ -*----------------------------------*\\
|
/*--------------------------------*- C++ -*----------------------------------*\\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
@ -78,7 +77,7 @@ HEADER
|
|||||||
# extract attribute '$1' from file '$2'
|
# extract attribute '$1' from file '$2'
|
||||||
#
|
#
|
||||||
FoamFileAttribute() {
|
FoamFileAttribute() {
|
||||||
sed -n -e 's/[ ;]*$//' -e "s/^ *$1 *//p" $2
|
sed -n -e 's/[ ;]*$//' -e "s/^ *$1 *//p" $2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -88,22 +87,22 @@ FoamFileAttribute() {
|
|||||||
OPTS=`getopt hv: $*`
|
OPTS=`getopt hv: $*`
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "Aborting due to invalid option"
|
echo "Aborting due to invalid option"
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
eval set -- '$OPTS'
|
eval set -- '$OPTS'
|
||||||
while [ "$1" != "--" ]
|
while [ "$1" != "--" ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
-v)
|
-v)
|
||||||
foamVersion=$2
|
foamVersion=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-h)
|
-h)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
shift
|
shift
|
||||||
|
|
||||||
@ -118,24 +117,24 @@ foamVersion=`printf %-36s $foamVersion`
|
|||||||
#
|
#
|
||||||
for caseFile
|
for caseFile
|
||||||
do
|
do
|
||||||
if grep FoamFile $caseFile >/dev/null 2>&1
|
if grep FoamFile $caseFile >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "Updating case file: $caseFile"
|
echo "Updating case file: $caseFile"
|
||||||
sed -n '/FoamFile/,/}/p' $caseFile > FoamFile.tmp
|
sed -n '/FoamFile/,/}/p' $caseFile > FoamFile.tmp
|
||||||
|
|
||||||
CLASS=`FoamFileAttribute class FoamFile.tmp`
|
CLASS=`FoamFileAttribute class FoamFile.tmp`
|
||||||
OBJECT=`FoamFileAttribute object FoamFile.tmp`
|
OBJECT=`FoamFileAttribute object FoamFile.tmp`
|
||||||
FORMAT=`FoamFileAttribute format FoamFile.tmp`
|
FORMAT=`FoamFileAttribute format FoamFile.tmp`
|
||||||
|
|
||||||
printHeader $FORMAT $CLASS $OBJECT $NOTE > FoamFile.tmp
|
printHeader $FORMAT $CLASS $OBJECT $NOTE > FoamFile.tmp
|
||||||
sed '1,/}/d' $caseFile | sed '/./,/^$/!d' >> FoamFile.tmp
|
sed '1,/}/d' $caseFile | sed '/./,/^$/!d' >> FoamFile.tmp
|
||||||
|
|
||||||
# use cat to avoid removing/replace soft-links
|
# use cat to avoid removing/replace soft-links
|
||||||
[ -s FoamFile.tmp ] && cat FoamFile.tmp >| $caseFile
|
[ -s FoamFile.tmp ] && cat FoamFile.tmp >| $caseFile
|
||||||
rm FoamFile.tmp
|
rm FoamFile.tmp
|
||||||
else
|
else
|
||||||
echo " Invalid case file: $caseFile"
|
echo " Invalid case file: $caseFile" 1>&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat<<USAGE
|
cat<<USAGE
|
||||||
|
|
||||||
usage: ${0##*/} <turbulenceProperties>
|
usage: ${0##*/} <turbulenceProperties>
|
||||||
|
|
||||||
@ -57,42 +57,42 @@ USAGE
|
|||||||
#
|
#
|
||||||
convertDict()
|
convertDict()
|
||||||
{
|
{
|
||||||
echo "Identified $1 turbulence model in '$3'"
|
echo "Identified $1 turbulence model in '$3'"
|
||||||
outputPath=`dirname $3`
|
outputPath=`dirname $3`
|
||||||
|
|
||||||
if [ -e "$outputPath/$1Properties" ]
|
if [ -e "$outputPath/$1Properties" ]
|
||||||
then
|
then
|
||||||
echo "Error: file already exists $outputPath/$1Properties'"
|
echo "Error: file already exists $outputPath/$1Properties'" 1>&2
|
||||||
else
|
else
|
||||||
sed -e "s/turbulenceProperties/$1Properties/" \
|
sed -e "s/turbulenceProperties/$1Properties/" \
|
||||||
-e "s/$2/$1Model/" \
|
-e "s/$2/$1Model/" \
|
||||||
-e "s/[a-zA-Z0-9]* [ ]*\[[0-9 ]*\]//" \
|
-e "s/[a-zA-Z0-9]* [ ]*\[[0-9 ]*\]//" \
|
||||||
$3 > "$outputPath/$1Properties"
|
$3 > "$outputPath/$1Properties"
|
||||||
|
|
||||||
echo " wrote $outputPath/$1Properties"
|
echo " wrote $outputPath/$1Properties"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
[ $# -ge 1 ] || usage
|
[ $# -ge 1 ] || usage
|
||||||
|
|
||||||
for turbDict
|
for turbDict
|
||||||
do
|
do
|
||||||
# Identify type of turbulence model and convert
|
# Identify type of turbulence model and convert
|
||||||
if [ -f $turbDict ]
|
if [ -f $turbDict ]
|
||||||
then
|
then
|
||||||
if grep turbulenceModel $turbDict >/dev/null 2>&1
|
if grep turbulenceModel $turbDict >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
convertDict RAS turbulenceModel $turbDict
|
convertDict RAS turbulenceModel $turbDict
|
||||||
elif grep LESmodel $turbDict >/dev/null 2>&1
|
elif grep LESmodel $turbDict >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
convertDict LES LESmodel $turbDict
|
convertDict LES LESmodel $turbDict
|
||||||
else
|
else
|
||||||
echo "Unable to determine turbulence model type in '$turbDict'"
|
echo "Unable to determine turbulence model type in '$turbDict'" 1>&2
|
||||||
echo " - nothing changed"
|
echo " - nothing changed" 1>&2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Error: file '$turbDict' does not exist"
|
echo "Error: file '$turbDict' does not exist" 1>&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -3,22 +3,23 @@
|
|||||||
# default is pwd
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
set -- .
|
set -- .
|
||||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||||
echo " remove all .class files"
|
echo " remove all .class files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
then
|
then
|
||||||
echo "removing all .class files"
|
echo "removing all .class files: $i"
|
||||||
find $i -name '*.class' -print | xargs -t rm
|
find $i -name '*.class' -print | xargs -t rm 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "no directory: $i"
|
echo "no directory: $i" 1>&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
24
bin/rmcore
24
bin/rmcore
@ -3,23 +3,23 @@
|
|||||||
# default is pwd
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
set -- .
|
set -- .
|
||||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||||
echo " remove all core files"
|
echo " remove all core files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
then
|
then
|
||||||
echo "removing all core files"
|
echo "removing all core files: $i"
|
||||||
find $i \( -type f -name 'core' -o -name 'core.[1-9]*' -o -name 'vgcore.*' \) -print | xargs -t rm
|
find $i \( -type f -name 'core' -o -name 'core.[1-9]*' -o -name 'vgcore.*' \) -print | xargs -t rm 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "no directory: $i"
|
echo "no directory: $i" 1>&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
14
bin/rmdepall
14
bin/rmdepall
@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -gt 1 ]
|
if [ "$1" = "-h" -o "$1" = "-help" -o "$#" -gt 1 ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} : remove all .dep files"
|
echo "Usage: ${0##*/} : remove all .dep files"
|
||||||
echo " ${0##*/} <file> : remove all .dep files referring to <file>"
|
echo " ${0##*/} <file> : remove all .dep files referring to <file>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "removing all .dep files"
|
echo "removing all .dep files"
|
||||||
find . -name '*.dep' -print | xargs -t rm
|
find . -name '*.dep' -print | xargs -t rm 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "removing all .dep files containing $1..."
|
echo "removing all .dep files containing $1..."
|
||||||
find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
|
find . -name '*.dep' -exec grep "$1" '{}' \; -exec rm '{}' \;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
23
bin/rmoall
23
bin/rmoall
@ -3,22 +3,23 @@
|
|||||||
# default is pwd
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
set -- .
|
set -- .
|
||||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||||
echo " remove all .o files"
|
echo " remove all .o files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
then
|
then
|
||||||
echo "removing all .o files: $i"
|
echo "removing all .o files: $i"
|
||||||
find $i -name '*.o' -print | xargs -t rm
|
find $i -name '*.o' -print | xargs -t rm 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "no directory: $i"
|
echo "no directory: $i" 1>&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
23
bin/rm~all
23
bin/rm~all
@ -3,22 +3,23 @@
|
|||||||
# default is pwd
|
# default is pwd
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
set -- .
|
set -- .
|
||||||
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
elif [ "$1" = "-h" -o "$1" = "-help" ]
|
||||||
then
|
then
|
||||||
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
echo "Usage: ${0##*/} [dir1] .. [dirN]"
|
||||||
echo " remove all *~ files"
|
echo " remove all *~ files"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i
|
for i
|
||||||
do
|
do
|
||||||
if [ -d "$i" ]
|
if [ -d "$i" ]
|
||||||
then
|
then
|
||||||
echo "removing all *~ files"
|
echo "removing all *~ files: $i"
|
||||||
find $i \( -name '*~' -o -name '.*~' \) -print | xargs -t rm
|
find $i \( -name '*~' -o -name '.*~' \) -print | xargs -t rm 2>/dev/null
|
||||||
else
|
else
|
||||||
echo "no directory: $i"
|
echo "no directory: $i" 1>&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
export CINTSYSDIR=~/pub/CINT/cint
|
export CINTSYSDIR=~/pub/CINT/cint7
|
||||||
export PATH=$PATH:$CINTSYSDIR
|
export PATH=$PATH:$CINTSYSDIR
|
||||||
export MANPATH=$MANPATH:$CINTSYSDIR/doc
|
export MANPATH=$MANPATH:$CINTSYSDIR/doc
|
||||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$CINTSYSDIR
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$CINTSYSDIR
|
||||||
|
|||||||
13
etc/bashrc
13
etc/bashrc
@ -23,16 +23,17 @@
|
|||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# bashrc
|
# etc/bashrc
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
# Sourced from ~/.profile or ~/.bashrc
|
# Sourced from ~/.profile or ~/.bashrc
|
||||||
|
# Should be usable by any POSIX-compliant shell (eg, ksh)
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
export WM_PROJECT=OpenFOAM
|
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
|
: ${WM_PROJECT_VERSION:=dev}; export WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
|
||||||
@ -53,7 +54,7 @@ foamInstall=$HOME/$WM_PROJECT
|
|||||||
# Location of site/user files
|
# Location of site/user files
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
|
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
|
export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
|
||||||
@ -163,7 +164,7 @@ esac
|
|||||||
cleanProg=$WM_PROJECT_DIR/bin/foamCleanPath
|
cleanProg=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||||
|
|
||||||
# Remove anything under top-level foam directory
|
# 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
|
#- Clean path/PATH
|
||||||
cleanPath=`$cleanProg "$PATH" "$wildCards"` && PATH="$cleanPath"
|
cleanPath=`$cleanProg "$PATH" "$wildCards"` && PATH="$cleanPath"
|
||||||
@ -182,9 +183,7 @@ _foamSource()
|
|||||||
{
|
{
|
||||||
while [ $# -ge 1 ]
|
while [ $# -ge 1 ]
|
||||||
do
|
do
|
||||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]; then
|
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "Sourcing: $1"
|
||||||
echo "Sourcing: $1"
|
|
||||||
fi
|
|
||||||
. $1
|
. $1
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|||||||
11
etc/cshrc
11
etc/cshrc
@ -23,7 +23,7 @@
|
|||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# cshrc
|
# etc/cshrc
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
@ -32,7 +32,7 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
setenv WM_PROJECT OpenFOAM
|
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
|
if ( ! $?WM_PROJECT_VERSION ) setenv WM_PROJECT_VERSION dev
|
||||||
|
|
||||||
#!!User:
|
#!!User:
|
||||||
@ -52,7 +52,7 @@ if ( ! $?FOAM_INST_DIR ) setenv FOAM_INST_DIR $foamInstall
|
|||||||
# Location of site/user files
|
# Location of site/user files
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv WM_PROJECT_INST_DIR $FOAM_INST_DIR
|
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
|
setenv WM_PROJECT_USER_DIR $HOME/$WM_PROJECT/$LOGNAME-$WM_PROJECT_VERSION
|
||||||
|
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ if (! $?MANPATH) then
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Remove anything under top-level foam directory
|
# 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
|
#- Clean path/PATH
|
||||||
set colonPath=`echo "$path" | sed -e 's/ /:/g'`
|
set colonPath=`echo "$path" | sed -e 's/ /:/g'`
|
||||||
@ -219,5 +219,8 @@ endif
|
|||||||
|
|
||||||
# cleanup environment:
|
# cleanup environment:
|
||||||
# ~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~
|
||||||
|
unset cleanProg
|
||||||
|
unset wildCards
|
||||||
|
unset colonPath
|
||||||
unalias _foamSource
|
unalias _foamSource
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
108
etc/settings.csh
108
etc/settings.csh
@ -23,7 +23,7 @@
|
|||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# settings.csh
|
# etc/settings.csh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
@ -31,60 +31,65 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
alias _foamAddPath 'set path=(\!* $path) ; if ( ! -d \!* ) mkdir -p \!*'
|
# prefix to PATH
|
||||||
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH} ; set xx=`echo $LD_LIBRARY_PATH | sed -e "s/:.*//"`; if ( ! -d $xx ) mkdir -p $xx'
|
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
|
# wmake configuration
|
||||||
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
|
|
||||||
|
|
||||||
setenv WM_DIR $WM_PROJECT_DIR/wmake
|
setenv WM_DIR $WM_PROJECT_DIR/wmake
|
||||||
setenv WM_LINK_LANGUAGE c++
|
setenv WM_LINK_LANGUAGE c++
|
||||||
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
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_SRC $WM_PROJECT_DIR/src
|
||||||
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
setenv FOAM_LIB $WM_PROJECT_DIR/lib
|
||||||
setenv FOAM_LIBBIN $FOAM_LIB/$WM_OPTIONS
|
setenv FOAM_LIBBIN $WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||||
_foamAddLib $FOAM_LIBBIN
|
|
||||||
|
|
||||||
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
setenv FOAM_APP $WM_PROJECT_DIR/applications
|
||||||
setenv FOAM_APPBIN $WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
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_TUTORIALS $WM_PROJECT_DIR/tutorials
|
||||||
setenv FOAM_UTILITIES $FOAM_APP/utilities
|
setenv FOAM_UTILITIES $FOAM_APP/utilities
|
||||||
setenv FOAM_SOLVERS $FOAM_APP/solvers
|
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
|
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=
|
|
||||||
|
|
||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# WM_COMPILER_INST = OpenFOAM | System
|
# compilerInstall = OpenFOAM | System
|
||||||
set WM_COMPILER_INST=OpenFOAM
|
set compilerInstall=OpenFOAM
|
||||||
|
|
||||||
switch ("$WM_COMPILER_INST")
|
switch ("$compilerInstall")
|
||||||
case OpenFOAM:
|
case OpenFOAM:
|
||||||
switch ("$WM_COMPILER")
|
switch ("$WM_COMPILER")
|
||||||
case Gcc:
|
case Gcc:
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
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/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
|
breaksw
|
||||||
case Gcc42:
|
case Gcc42:
|
||||||
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
@ -97,23 +102,17 @@ case OpenFOAM:
|
|||||||
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
|
||||||
echo " Cannot find $WM_COMPILER_DIR installation."
|
echo " Cannot find $WM_COMPILER_DIR installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
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
|
echo
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set WM_COMPILER_BIN="$WM_COMPILER_DIR/bin"
|
_foamAddPath ${WM_COMPILER_DIR}/bin
|
||||||
set WM_COMPILER_LIB=$WM_COMPILER_DIR/lib${WM_COMPILER_LIB_ARCH}:$WM_COMPILER_DIR/lib
|
_foamAddLib ${WM_COMPILER_DIR}/lib${WM_COMPILER_LIB_ARCH}
|
||||||
|
_foamAddLib ${WM_COMPILER_DIR}/lib
|
||||||
|
|
||||||
breaksw
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
if ($?WM_COMPILER_BIN) then
|
|
||||||
_foamAddPath $WM_COMPILER_BIN
|
|
||||||
_foamAddLib $WM_COMPILER_LIB
|
|
||||||
endif
|
|
||||||
|
|
||||||
unset WM_COMPILER_BIN
|
|
||||||
unset WM_COMPILER_LIB
|
|
||||||
|
|
||||||
|
|
||||||
# Communications library
|
# Communications library
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -122,15 +121,15 @@ unset MPI_ARCH_PATH
|
|||||||
|
|
||||||
switch ("$WM_MPLIB")
|
switch ("$WM_MPLIB")
|
||||||
case OPENMPI:
|
case OPENMPI:
|
||||||
set mpi_version=openmpi-1.2.6
|
set mpi_version=openmpi-1.2.8
|
||||||
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
|
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
|
||||||
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
|
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
|
||||||
|
|
||||||
# Tell OpenMPI where to find its install directory
|
# Tell OpenMPI where to find its install directory
|
||||||
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
setenv OPAL_PREFIX $MPI_ARCH_PATH
|
||||||
|
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
@ -143,8 +142,8 @@ case LAM:
|
|||||||
setenv LAMHOME $WM_THIRD_PARTY_DIR/$mpi_version
|
setenv LAMHOME $WM_THIRD_PARTY_DIR/$mpi_version
|
||||||
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
||||||
|
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
@ -156,8 +155,8 @@ case MPICH:
|
|||||||
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
|
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
|
||||||
setenv MPICH_ROOT $MPI_ARCH_PATH
|
setenv MPICH_ROOT $MPI_ARCH_PATH
|
||||||
|
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
@ -169,9 +168,9 @@ case MPICH-GM:
|
|||||||
setenv MPICH_ROOT $MPI_ARCH_PATH
|
setenv MPICH_ROOT $MPI_ARCH_PATH
|
||||||
setenv GM_LIB_PATH /opt/gm/lib64
|
setenv GM_LIB_PATH /opt/gm/lib64
|
||||||
|
|
||||||
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddLib $GM_LIB_PATH
|
_foamAddLib $GM_LIB_PATH
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
|
||||||
|
|
||||||
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
|
setenv FOAM_MPI_LIBBIN $FOAM_LIBBIN/mpich-gm
|
||||||
breaksw
|
breaksw
|
||||||
@ -194,9 +193,17 @@ endsw
|
|||||||
_foamAddLib $FOAM_MPI_LIBBIN
|
_foamAddLib $FOAM_MPI_LIBBIN
|
||||||
|
|
||||||
|
|
||||||
# Set the MPI buffer size (used by all platforms except SGI MPI)
|
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv MPI_BUFFER_SIZE 20000000
|
set minBufferSize=20000000
|
||||||
|
|
||||||
|
if ( $?MPI_BUFFER_SIZE ) then
|
||||||
|
if ( $MPI_BUFFER_SIZE < $minBufferSize ) then
|
||||||
|
setenv MPI_BUFFER_SIZE $minBufferSize
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
setenv MPI_BUFFER_SIZE $minBufferSize
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# CGAL library if available
|
# CGAL library if available
|
||||||
@ -215,8 +222,9 @@ endif
|
|||||||
|
|
||||||
# cleanup environment:
|
# cleanup environment:
|
||||||
# ~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~
|
||||||
unalias _foamAddLib
|
|
||||||
unalias _foamAddPath
|
unalias _foamAddPath
|
||||||
|
unalias _foamAddLib
|
||||||
|
unalias _foamMkDir
|
||||||
|
unset minBufferSize
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
121
etc/settings.sh
121
etc/settings.sh
@ -23,7 +23,7 @@
|
|||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
# Script
|
# Script
|
||||||
# settings.sh
|
# etc/settings.sh
|
||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# Startup file for OpenFOAM
|
# Startup file for OpenFOAM
|
||||||
@ -31,95 +31,89 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# prefix to PATH
|
||||||
_foamAddPath()
|
_foamAddPath()
|
||||||
{
|
{
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
oldIFS="$IFS"
|
|
||||||
IFS=':' # split on ':'
|
|
||||||
set -- $1
|
|
||||||
IFS="$oldIFS"
|
|
||||||
unset oldIFS
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ $# -ge 1 ]
|
while [ $# -ge 1 ]
|
||||||
do
|
do
|
||||||
[ -d $1 ] || mkdir -p $1
|
|
||||||
export PATH=$1:$PATH
|
export PATH=$1:$PATH
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# prefix to LD_LIBRARY_PATH
|
||||||
_foamAddLib()
|
_foamAddLib()
|
||||||
{
|
{
|
||||||
if [ $# -eq 1 ]
|
|
||||||
then
|
|
||||||
oldIFS="$IFS"
|
|
||||||
IFS=':' # split on ':'
|
|
||||||
set -- $1
|
|
||||||
IFS="$oldIFS"
|
|
||||||
unset oldIFS
|
|
||||||
fi
|
|
||||||
|
|
||||||
while [ $# -ge 1 ]
|
while [ $# -ge 1 ]
|
||||||
do
|
do
|
||||||
[ -d $1 ] || mkdir -p $1
|
|
||||||
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#- Add the system-specific executables path to the path
|
# make directories if they don't already exist
|
||||||
export PATH=$WM_PROJECT_DIR/bin:$FOAM_INST_DIR/$WM_ARCH/bin:$PATH
|
_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_DIR=$WM_PROJECT_DIR/wmake
|
||||||
export WM_LINK_LANGUAGE=c++
|
export WM_LINK_LANGUAGE=c++
|
||||||
export WM_OPTIONS=$WM_ARCH${WM_COMPILER}$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||||
export PATH=$WM_DIR:$PATH
|
|
||||||
|
|
||||||
|
# base configuration
|
||||||
export FOAM_SRC=$WM_PROJECT_DIR/src
|
export FOAM_SRC=$WM_PROJECT_DIR/src
|
||||||
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
export FOAM_LIB=$WM_PROJECT_DIR/lib
|
||||||
export FOAM_LIBBIN=$FOAM_LIB/$WM_OPTIONS
|
export FOAM_LIBBIN=$WM_PROJECT_DIR/lib/$WM_OPTIONS
|
||||||
_foamAddLib $FOAM_LIBBIN
|
|
||||||
|
|
||||||
export FOAM_APP=$WM_PROJECT_DIR/applications
|
export FOAM_APP=$WM_PROJECT_DIR/applications
|
||||||
export FOAM_APPBIN=$WM_PROJECT_DIR/applications/bin/$WM_OPTIONS
|
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_TUTORIALS=$WM_PROJECT_DIR/tutorials
|
||||||
export FOAM_UTILITIES=$FOAM_APP/utilities
|
export FOAM_UTILITIES=$FOAM_APP/utilities
|
||||||
export FOAM_SOLVERS=$FOAM_APP/solvers
|
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
|
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
|
# Compiler settings
|
||||||
# ~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~
|
||||||
WM_COMPILER_BIN=
|
unset compilerBin compilerLib
|
||||||
WM_COMPILER_LIB=
|
|
||||||
|
|
||||||
# Select compiler installation
|
# Select compiler installation
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# WM_COMPILER_INST = OpenFOAM | System
|
# compilerInstall = OpenFOAM | System
|
||||||
WM_COMPILER_INST=OpenFOAM
|
compilerInstall=OpenFOAM
|
||||||
|
|
||||||
case "$WM_COMPILER_INST" in
|
case "$compilerInstall" in
|
||||||
OpenFOAM)
|
OpenFOAM)
|
||||||
case "$WM_COMPILER" in
|
case "$WM_COMPILER" in
|
||||||
Gcc)
|
Gcc)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.2/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
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/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)
|
Gcc42)
|
||||||
export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
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 "Warning in $WM_PROJECT_DIR/etc/settings.sh:"
|
||||||
echo " Cannot find $WM_COMPILER_DIR installation."
|
echo " Cannot find $WM_COMPILER_DIR installation."
|
||||||
echo " Please install this compiler version or if you wish to use the system compiler,"
|
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
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WM_COMPILER_BIN=$WM_COMPILER_DIR/bin
|
compilerBin=$WM_COMPILER_DIR/bin
|
||||||
WM_COMPILER_LIB=$WM_COMPILER_DIR/lib$WM_COMPILER_LIB_ARCH:$WM_COMPILER_DIR/lib
|
compilerLib=$WM_COMPILER_DIR/lib$WM_COMPILER_LIB_ARCH:$WM_COMPILER_DIR/lib
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -d "$WM_COMPILER_BIN" ]; then
|
if [ -d "$compilerBin" ]
|
||||||
_foamAddPath $WM_COMPILER_BIN
|
then
|
||||||
_foamAddLib $WM_COMPILER_LIB
|
_foamAddPath $compilerBin
|
||||||
|
_foamAddLib $compilerLib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset WM_COMPILER_BIN WM_COMPILER_LIB
|
unset compilerBin compilerLib compilerInstall
|
||||||
|
|
||||||
# Communications library
|
# Communications library
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -156,15 +151,15 @@ unset MPI_ARCH_PATH
|
|||||||
|
|
||||||
case "$WM_MPLIB" in
|
case "$WM_MPLIB" in
|
||||||
OPENMPI)
|
OPENMPI)
|
||||||
mpi_version=openmpi-1.2.6
|
mpi_version=openmpi-1.2.8
|
||||||
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
export MPI_HOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||||
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
||||||
|
|
||||||
# Tell OpenMPI where to find its install directory
|
# Tell OpenMPI where to find its install directory
|
||||||
export OPAL_PREFIX=$MPI_ARCH_PATH
|
export OPAL_PREFIX=$MPI_ARCH_PATH
|
||||||
|
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
@ -177,8 +172,8 @@ LAM)
|
|||||||
export LAMHOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
export LAMHOME=$WM_THIRD_PARTY_DIR/$mpi_version
|
||||||
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
# note: LAMHOME is deprecated, should probably point to MPI_ARCH_PATH too
|
||||||
|
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
@ -190,8 +185,8 @@ MPICH)
|
|||||||
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
export MPI_ARCH_PATH=$MPI_HOME/platforms/$WM_OPTIONS
|
||||||
export MPICH_ROOT=$MPI_ARCH_PATH
|
export MPICH_ROOT=$MPI_ARCH_PATH
|
||||||
|
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/$mpi_version
|
||||||
unset mpi_version
|
unset mpi_version
|
||||||
@ -203,9 +198,9 @@ MPICH-GM)
|
|||||||
export MPICH_ROOT=$MPI_ARCH_PATH
|
export MPICH_ROOT=$MPI_ARCH_PATH
|
||||||
export GM_LIB_PATH=/opt/gm/lib64
|
export GM_LIB_PATH=/opt/gm/lib64
|
||||||
|
|
||||||
|
_foamAddPath $MPI_ARCH_PATH/bin
|
||||||
_foamAddLib $MPI_ARCH_PATH/lib
|
_foamAddLib $MPI_ARCH_PATH/lib
|
||||||
_foamAddLib $GM_LIB_PATH
|
_foamAddLib $GM_LIB_PATH
|
||||||
_foamAddPath $MPI_ARCH_PATH/bin
|
|
||||||
|
|
||||||
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
|
export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpich-gm
|
||||||
;;
|
;;
|
||||||
@ -228,9 +223,15 @@ esac
|
|||||||
_foamAddLib $FOAM_MPI_LIBBIN
|
_foamAddLib $FOAM_MPI_LIBBIN
|
||||||
|
|
||||||
|
|
||||||
# Set the MPI buffer size (used by all platforms except SGI MPI)
|
# Set the minimum MPI buffer size (used by all platforms except SGI MPI)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
export MPI_BUFFER_SIZE=20000000
|
minBufferSize=20000000
|
||||||
|
|
||||||
|
if [ "${MPI_BUFFER_SIZE:=$minBufferSize}" -lt $minBufferSize ]
|
||||||
|
then
|
||||||
|
MPI_BUFFER_SIZE=$minBufferSize
|
||||||
|
fi
|
||||||
|
export MPI_BUFFER_SIZE
|
||||||
|
|
||||||
|
|
||||||
# CGAL library if available
|
# CGAL library if available
|
||||||
@ -247,6 +248,6 @@ export MPI_BUFFER_SIZE=20000000
|
|||||||
|
|
||||||
# cleanup environment:
|
# cleanup environment:
|
||||||
# ~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~
|
||||||
unset _foamAddLib _foamAddPath
|
unset _foamAddPath _foamAddLib _foamMkDir minBufferSize
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -13,6 +13,7 @@ wmake libso lagrangian/basic
|
|||||||
|
|
||||||
wmake libso triSurface
|
wmake libso triSurface
|
||||||
wmake libso edgeMesh
|
wmake libso edgeMesh
|
||||||
|
wmake libso surfMesh
|
||||||
wmake libso meshTools
|
wmake libso meshTools
|
||||||
wmake libso finiteVolume
|
wmake libso finiteVolume
|
||||||
|
|
||||||
|
|||||||
@ -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 * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,7 @@ SourceFiles
|
|||||||
#include "label.H"
|
#include "label.H"
|
||||||
#include "word.H"
|
#include "word.H"
|
||||||
#include "className.H"
|
#include "className.H"
|
||||||
|
#include "xfer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -155,6 +156,9 @@ public:
|
|||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
HashTable(const HashTable<T, Key, Hash>&);
|
HashTable(const HashTable<T, Key, Hash>&);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
HashTable(const xfer<HashTable<T, Key, Hash> >&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,6 @@ class Map
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given initial map size
|
//- Construct given initial map size
|
||||||
@ -74,6 +73,15 @@ public:
|
|||||||
:
|
:
|
||||||
HashTable<T, label, Hash<label> >(map)
|
HashTable<T, label, Hash<label> >(map)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
//- Return a null Map
|
||||||
|
static const Map<T>& null()
|
||||||
|
{
|
||||||
|
Map<T>* nullPtr = reinterpret_cast<Map<T>*>(0);
|
||||||
|
return *nullPtr;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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 * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
|
|||||||
@ -46,6 +46,7 @@ SourceFiles
|
|||||||
#include "label.H"
|
#include "label.H"
|
||||||
#include "word.H"
|
#include "word.H"
|
||||||
#include "className.H"
|
#include "className.H"
|
||||||
|
#include "xfer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -146,6 +147,8 @@ public:
|
|||||||
//- Construct as copy
|
//- Construct as copy
|
||||||
StaticHashTable(const StaticHashTable<T, Key, Hash>&);
|
StaticHashTable(const StaticHashTable<T, Key, Hash>&);
|
||||||
|
|
||||||
|
//- Construct as copy
|
||||||
|
StaticHashTable(const xfer<StaticHashTable<T, Key, Hash> >&);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ SourceFiles
|
|||||||
#define Keyed_H
|
#define Keyed_H
|
||||||
|
|
||||||
#include "List.H"
|
#include "List.H"
|
||||||
|
#include "xfer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ namespace Foam
|
|||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class T> class Keyed;
|
template<class T> class Keyed;
|
||||||
|
template<class T> class xfer;
|
||||||
|
|
||||||
template<class T> Istream& operator>>(Istream&, Keyed<T>&);
|
template<class T> Istream& operator>>(Istream&, Keyed<T>&);
|
||||||
template<class T> Ostream& operator<<(Ostream&, const Keyed<T>&);
|
template<class T> Ostream& operator<<(Ostream&, const Keyed<T>&);
|
||||||
@ -92,6 +94,9 @@ public:
|
|||||||
//- Construct as a copy of item, with a key
|
//- Construct as a copy of item, with a key
|
||||||
inline Keyed(const T& item, const label key=0);
|
inline Keyed(const T& item, const label key=0);
|
||||||
|
|
||||||
|
//- Construct by transferring the item, with a key
|
||||||
|
inline Keyed(const xfer<T>& item, const label key=0);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
inline Keyed(Istream&);
|
inline Keyed(Istream&);
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,6 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Construct null
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline Foam::Keyed<T>::Keyed()
|
inline Foam::Keyed<T>::Keyed()
|
||||||
:
|
:
|
||||||
@ -38,7 +37,6 @@ inline Foam::Keyed<T>::Keyed()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline Foam::Keyed<T>::Keyed(const T& item, const label key)
|
inline Foam::Keyed<T>::Keyed(const T& item, const label key)
|
||||||
:
|
:
|
||||||
@ -47,6 +45,14 @@ inline Foam::Keyed<T>::Keyed(const T& item, const label key)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline Foam::Keyed<T>::Keyed(const xfer<T>& item, const label key)
|
||||||
|
:
|
||||||
|
T(item),
|
||||||
|
key_(key)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline Foam::Keyed<T>::Keyed(Istream& is)
|
inline Foam::Keyed<T>::Keyed(Istream& is)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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>
|
template<class T>
|
||||||
CompactListList<T>::CompactListList(CompactListList<T>& cll, bool reUse)
|
CompactListList<T>::CompactListList(CompactListList<T>& cll, bool reUse)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -103,6 +103,9 @@ public:
|
|||||||
//- Construct given list of row-sizes
|
//- Construct given list of row-sizes
|
||||||
CompactListList(const UList<label>& rowSizes, const T&);
|
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.
|
//- Construct as copy or re-use as specified.
|
||||||
CompactListList(CompactListList<T>&, bool reUse);
|
CompactListList(CompactListList<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
@ -84,6 +84,10 @@ class DynamicList
|
|||||||
//- Allocated size for underlying List.
|
//- Allocated size for underlying List.
|
||||||
label allocSize_;
|
label allocSize_;
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
// Disabled, since the usefulness and semantics are not quite clear
|
||||||
|
void setSize(const label, const T&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -111,37 +115,36 @@ public:
|
|||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Size of the underlying storage.
|
//- Size of the underlying storage.
|
||||||
inline label allocSize() const;
|
inline label allocSize() const;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
//- Reset size of List.
|
//- Alter the list size.
|
||||||
inline void setSize(const label);
|
// 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.
|
//- Clear the list, i.e. set the size to zero.
|
||||||
inline void setSize(const label, const T&);
|
// Allocated size does not change
|
||||||
|
inline void clear();
|
||||||
|
|
||||||
//- Clear the list, i.e. set the size to zero.
|
//- Clear the list and delete storage.
|
||||||
// Allocated size does not change
|
inline void clearStorage();
|
||||||
inline void clear();
|
|
||||||
|
|
||||||
//- Clear the list and delete storage.
|
//- Shrink the allocated space to the number of elements used.
|
||||||
inline void clearStorage();
|
// Returns a reference to the DynamicList.
|
||||||
|
inline DynamicList<T, SizeInc, SizeMult, SizeDiv>& shrink();
|
||||||
|
|
||||||
//- Shrink the List<T> to the number of elements used
|
//- Transfer contents of the argument List into this DynamicList
|
||||||
inline DynamicList<T, SizeInc, SizeMult, SizeDiv>& shrink();
|
inline void transfer(List<T>&);
|
||||||
|
|
||||||
//- Transfer the contents of the argument List into this List
|
//- Transfer contents of the argument DynamicList into this DynamicList
|
||||||
// and annull the argument list. Is same as List::transfer except
|
inline void transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>&);
|
||||||
// checks that you're not changing the underlying list to something
|
|
||||||
// smaller than allocSize_.
|
|
||||||
inline void transfer(List<T>&);
|
|
||||||
|
|
||||||
//- Transfer the contents of the argument DynamicList into this
|
|
||||||
// DynamicList and annull the argument list.
|
|
||||||
inline void transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>&);
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
@ -152,11 +155,10 @@ public:
|
|||||||
//- Remove and return the top element
|
//- Remove and return the top element
|
||||||
inline T remove();
|
inline T remove();
|
||||||
|
|
||||||
//- Return non-const access to an element,
|
//- Return non-const access to an element, resizing list if necessary
|
||||||
// resizing the list if necessary
|
|
||||||
inline T& operator()(const label);
|
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&);
|
inline void operator=(const T&);
|
||||||
|
|
||||||
//- Assignment from List<T>. Also handles assignment from DynamicList.
|
//- Assignment from List<T>. Also handles assignment from DynamicList.
|
||||||
|
|||||||
@ -26,18 +26,16 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Construct null
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList()
|
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList()
|
||||||
:
|
:
|
||||||
List<T>(SizeInc),
|
List<T>(SizeInc),
|
||||||
allocSize_(SizeInc)
|
allocSize_(SizeInc)
|
||||||
{
|
{
|
||||||
List<T>::size() = 0;
|
List<T>::size(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Construct given size
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
|
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
|
||||||
(
|
(
|
||||||
@ -47,19 +45,18 @@ inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
|
|||||||
List<T>(s),
|
List<T>(s),
|
||||||
allocSize_(s)
|
allocSize_(s)
|
||||||
{
|
{
|
||||||
List<T>::size() = 0;
|
List<T>::size(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Construct given size
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
|
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList
|
||||||
(
|
(
|
||||||
const UList<T>& s
|
const UList<T>& lst
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
List<T>(s),
|
List<T>(lst),
|
||||||
allocSize_(s.size())
|
allocSize_(lst.size())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -79,47 +76,26 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
|
|||||||
const label s
|
const label s
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (s <= List<T>::size())
|
label nextFree = List<T>::size();
|
||||||
|
if (s <= nextFree)
|
||||||
{
|
{
|
||||||
// shrink addressable size, leave allocated size untouched
|
// adjust addressed size, leave allocated size untouched
|
||||||
List<T>::size() = s;
|
nextFree = s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
label nextFree = List<T>::size();
|
// adjust allocated size, leave addressed size untouched
|
||||||
allocSize_ = s;
|
allocSize_ = s;
|
||||||
List<T>::setSize(allocSize_);
|
List<T>::setSize(allocSize_);
|
||||||
List<T>::size() = nextFree;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
|
||||||
inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::setSize
|
|
||||||
(
|
|
||||||
const label s,
|
|
||||||
const T& t
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (s <= List<T>::size())
|
|
||||||
{
|
|
||||||
// shrink addressable size, leave allocated size untouched
|
|
||||||
List<T>::size() = s;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
label nextFree = List<T>::size();
|
|
||||||
allocSize_ = s;
|
|
||||||
List<T>::setSize(allocSize_, t);
|
|
||||||
List<T>::size() = nextFree;
|
|
||||||
}
|
}
|
||||||
|
List<T>::size(nextFree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::clear()
|
inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::clear()
|
||||||
{
|
{
|
||||||
List<T>::size() = 0;
|
List<T>::size(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -135,31 +111,24 @@ template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
|||||||
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
||||||
Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::shrink()
|
Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::shrink()
|
||||||
{
|
{
|
||||||
allocSize_ = List<T>::size();
|
if (allocSize_ > List<T>::size())
|
||||||
List<T>::setSize(allocSize_);
|
{
|
||||||
|
allocSize_ = List<T>::size();
|
||||||
|
// force re-allocation/copying in List<T>::setSize() by temporarily
|
||||||
|
// faking a larger list size that will be truncated
|
||||||
|
List<T>::size(allocSize_+1);
|
||||||
|
List<T>::setSize(allocSize_);
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline void
|
inline void
|
||||||
Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer(List<T>& l)
|
Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer(List<T>& lst)
|
||||||
{
|
{
|
||||||
if (l.size() < List<T>::size())
|
allocSize_ = lst.size();
|
||||||
{
|
List<T>::transfer(lst); // take over storage, clear addressing for lst.
|
||||||
FatalErrorIn
|
|
||||||
(
|
|
||||||
"void DynamicList<T, SizeInc, SizeMult"
|
|
||||||
", SizeDiv>::transfer(List<T>&)"
|
|
||||||
) << "Cannot replace the underlying storage of this DynamicList"
|
|
||||||
<< " of which " << List<T>::size() << " elements are used" << nl
|
|
||||||
<< "with a List of size " << l.size() << abort(FatalError);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
allocSize_ = l.size();
|
|
||||||
List<T>::transfer(l); // take over storage
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -167,11 +136,14 @@ template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
|||||||
inline void
|
inline void
|
||||||
Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer
|
Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer
|
||||||
(
|
(
|
||||||
DynamicList<T, SizeInc, SizeMult, SizeDiv>& l
|
DynamicList<T, SizeInc, SizeMult, SizeDiv>& lst
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
allocSize_ = l.allocSize();
|
// take over storage as-is (without shrink), clear addressing for lst.
|
||||||
List<T>::transfer(l); // take over storage. Null l.
|
allocSize_ = lst.allocSize_;
|
||||||
|
lst.allocSize_ = 0;
|
||||||
|
|
||||||
|
List<T>::transfer(static_cast<List<T>&>(lst));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -193,7 +165,7 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::append(const T& e)
|
|||||||
List<T>::setSize(allocSize_);
|
List<T>::setSize(allocSize_);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<T>::size() = nextFree;
|
List<T>::size(nextFree);
|
||||||
|
|
||||||
this->operator[](nextFree - 1) = e;
|
this->operator[](nextFree - 1) = e;
|
||||||
}
|
}
|
||||||
@ -214,7 +186,7 @@ inline T Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::remove()
|
|||||||
|
|
||||||
const T& val = List<T>::operator[](nextFree);
|
const T& val = List<T>::operator[](nextFree);
|
||||||
|
|
||||||
List<T>::size() = nextFree;
|
List<T>::size(nextFree);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
@ -242,7 +214,7 @@ inline T& Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator()
|
|||||||
List<T>::setSize(allocSize_);
|
List<T>::setSize(allocSize_);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<T>::size() = nextFree;
|
List<T>::size(nextFree);
|
||||||
|
|
||||||
return this->operator[](i);
|
return this->operator[](i);
|
||||||
}
|
}
|
||||||
@ -255,17 +227,19 @@ inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
List<T>::operator=(t);
|
List<T>::operator=(t);
|
||||||
allocSize_ = List<T>::size();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
|
inline void Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::operator=
|
||||||
(
|
(
|
||||||
const List<T>& l
|
const List<T>& lst
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
List<T>::operator=(l);
|
// make the entire storage available for the copy operation:
|
||||||
|
List<T>::size(allocSize_);
|
||||||
|
|
||||||
|
List<T>::operator=(lst);
|
||||||
allocSize_ = List<T>::size();
|
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.
|
// Construct as copy or re-use as specified.
|
||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(List<T>& a, bool reUse)
|
Foam::List<T>::List(List<T>& a, bool reUse)
|
||||||
@ -422,6 +430,9 @@ template<class T>
|
|||||||
template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
void Foam::List<T>::transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>& a)
|
void Foam::List<T>::transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>& a)
|
||||||
{
|
{
|
||||||
|
// shrink the allocated space to the number of elements used
|
||||||
|
a.shrink();
|
||||||
|
|
||||||
if (this->v_) delete[] this->v_;
|
if (this->v_) delete[] this->v_;
|
||||||
this->size_ = a.size_;
|
this->size_ = a.size_;
|
||||||
this->v_ = a.v_;
|
this->v_ = a.v_;
|
||||||
|
|||||||
@ -43,6 +43,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "UList.H"
|
#include "UList.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
|
#include "xfer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -77,6 +78,12 @@ class List
|
|||||||
public UList<T>
|
public UList<T>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//- Override size to be inconsistent with allocated storage.
|
||||||
|
// Use with care.
|
||||||
|
inline void size(const label);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -93,6 +100,9 @@ public:
|
|||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
List(const List<T>&);
|
List(const List<T>&);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
List(const xfer<List<T> >&);
|
||||||
|
|
||||||
//- Construct as copy or re-use as specified.
|
//- Construct as copy or re-use as specified.
|
||||||
List(List<T>&, bool reUse);
|
List(List<T>&, bool reUse);
|
||||||
|
|
||||||
@ -142,9 +152,6 @@ public:
|
|||||||
//- Return the number of elements in the UList.
|
//- Return the number of elements in the UList.
|
||||||
inline label size() const;
|
inline label size() const;
|
||||||
|
|
||||||
//- Override size to be inconsistent with allocated storage.
|
|
||||||
// Use with care.
|
|
||||||
inline label& size();
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
|
|
||||||
|
|||||||
@ -53,19 +53,18 @@ inline T& Foam::List<T>::newElmt(const label i)
|
|||||||
|
|
||||||
|
|
||||||
template<class T>
|
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>
|
template<class T>
|
||||||
inline Foam::label& Foam::List<T>::size()
|
inline Foam::label Foam::List<T>::size() const
|
||||||
{
|
{
|
||||||
return UList<T>::size_;
|
return UList<T>::size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|||||||
@ -44,6 +44,7 @@ PackedList<nBits>::PackedList(const label size, const unsigned int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
template<int nBits>
|
template<int nBits>
|
||||||
PackedList<nBits>::PackedList(const PackedList<nBits>& PList)
|
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
|
//- Construct from labelList
|
||||||
template<int nBits>
|
template<int nBits>
|
||||||
PackedList<nBits>::PackedList(const labelList& lst)
|
PackedList<nBits>::PackedList(const labelList& lst)
|
||||||
|
|||||||
@ -134,6 +134,9 @@ public:
|
|||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
PackedList(const PackedList<nBits>& PList);
|
PackedList(const PackedList<nBits>& PList);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
PackedList(const xfer<PackedList<nBits> >&);
|
||||||
|
|
||||||
//- Construct from labelList.
|
//- Construct from labelList.
|
||||||
PackedList(const 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>
|
template<class T>
|
||||||
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
|
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -129,6 +129,9 @@ public:
|
|||||||
template<class CloneArg>
|
template<class CloneArg>
|
||||||
PtrList(const PtrList<T>&, const 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.
|
//- Construct as copy or re-use as specified.
|
||||||
PtrList(PtrList<T>&, bool reUse);
|
PtrList(PtrList<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
@ -40,6 +40,17 @@ Foam::SortableList<Type>::SortableList(const List<Type>& values)
|
|||||||
sort();
|
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.
|
// Construct given size. Sort later on.
|
||||||
template <class Type>
|
template <class Type>
|
||||||
@ -86,7 +97,7 @@ void Foam::SortableList<Type>::sort()
|
|||||||
indices_[i] = i;
|
indices_[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Foam::sort(indices_, less(*this));
|
// Foam::sort(indices_, less(*this));
|
||||||
Foam::stableSort(indices_, less(*this));
|
Foam::stableSort(indices_, less(*this));
|
||||||
|
|
||||||
List<Type> tmpValues(this->size());
|
List<Type> tmpValues(this->size());
|
||||||
|
|||||||
@ -29,6 +29,8 @@ Description
|
|||||||
A list that is sorted upon construction or when explicitly requested
|
A list that is sorted upon construction or when explicitly requested
|
||||||
with the sort() method.
|
with the sort() method.
|
||||||
|
|
||||||
|
Uses the Foam::stableSort() algorithm.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
SortableList.C
|
SortableList.C
|
||||||
|
|
||||||
@ -84,10 +86,14 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from List, sorting the elements. Starts with indices set
|
//- Construct from List, sorting the elements.
|
||||||
// to index in argument
|
// Starts with indices set to index in argument
|
||||||
explicit SortableList(const List<Type>&);
|
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.
|
//- Construct given size. Sort later on.
|
||||||
explicit SortableList(const label size);
|
explicit SortableList(const label size);
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ void Foam::UList<T>::assign(const UList<T>& a)
|
|||||||
{
|
{
|
||||||
if (a.size_ != this->size_)
|
if (a.size_ != this->size_)
|
||||||
{
|
{
|
||||||
FatalErrorIn("UList<T>::operator=(const UList<T>&)")
|
FatalErrorIn("UList<T>::assign(const UList<T>&)")
|
||||||
<< "ULists have different sizes: "
|
<< "ULists have different sizes: "
|
||||||
<< this->size_ << " " << a.size_
|
<< this->size_ << " " << a.size_
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ void Foam::UList<T>::writeEntry(const word& keyword, Ostream& os) const
|
|||||||
|
|
||||||
|
|
||||||
template<class T>
|
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
|
// Write list contents depending on data format
|
||||||
if (os.format() == IOstream::ASCII || !contiguous<T>())
|
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>
|
template<class T>
|
||||||
UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
|
UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -110,6 +110,9 @@ public:
|
|||||||
//- Construct with length specified.
|
//- Construct with length specified.
|
||||||
explicit UPtrList(const label);
|
explicit UPtrList(const label);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
UPtrList(const xfer<UPtrList<T> >&);
|
||||||
|
|
||||||
//- Construct as copy or re-use as specified.
|
//- Construct as copy or re-use as specified.
|
||||||
UPtrList(UPtrList<T>&, bool reUse);
|
UPtrList(UPtrList<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
@ -155,7 +155,7 @@ protected:
|
|||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
//- Construct and return an IFstream for the object.
|
//- 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();
|
Istream* objectStream();
|
||||||
|
|
||||||
//- Set the object state to bad
|
//- Set the object state to bad
|
||||||
|
|||||||
@ -29,41 +29,76 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::IOField<Type>::IOField
|
Foam::IOField<Type>::IOField(const IOobject& io)
|
||||||
(
|
|
||||||
const IOobject& io
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
regIOobject(io),
|
regIOobject(io)
|
||||||
Field<Type>(readStream(typeName))
|
|
||||||
{
|
{
|
||||||
close();
|
if
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readStream(typeName) >> *this;
|
||||||
|
close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::IOField<Type>::IOField
|
Foam::IOField<Type>::IOField(const IOobject& io, const label size)
|
||||||
(
|
|
||||||
const IOobject& io,
|
|
||||||
const label size
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
regIOobject(io),
|
regIOobject(io)
|
||||||
Field<Type>(size)
|
{
|
||||||
{}
|
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>
|
template<class Type>
|
||||||
Foam::IOField<Type>::IOField
|
Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f)
|
||||||
(
|
|
||||||
const IOobject& io,
|
|
||||||
const Field<Type>& f
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
regIOobject(io),
|
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();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Field<Type>::operator=(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::IOField<Type>::IOField(const IOobject& io, const xfer<Field<Type> >& f)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
Field<Type>::transfer(f());
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
{
|
{
|
||||||
readStream(typeName) >> *this;
|
readStream(typeName) >> *this;
|
||||||
close();
|
close();
|
||||||
@ -73,9 +108,33 @@ Foam::IOField<Type>::IOField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class Type>
|
||||||
Foam::IOField<T>::~IOField()
|
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,16 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from IOobject
|
//- Construct from IOobject
|
||||||
IOField
|
IOField(const IOobject&);
|
||||||
(
|
|
||||||
const IOobject&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
IOField
|
|
||||||
(
|
|
||||||
const IOobject&,
|
|
||||||
const Field<Type>&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from IOobject and size (does not set values)
|
//- Construct from IOobject and size (does not set values)
|
||||||
IOField
|
IOField(const IOobject&, const label size);
|
||||||
(
|
|
||||||
const IOobject&,
|
//- Construct from components
|
||||||
const label size
|
IOField(const IOobject&, const Field<Type>&);
|
||||||
);
|
|
||||||
|
//- Construct by transferring the Field contents
|
||||||
|
IOField(const IOobject&, const xfer<Field<Type> >&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
@ -90,23 +82,14 @@ public:
|
|||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|
||||||
bool writeData(Ostream& os) const
|
bool writeData(Ostream&) const;
|
||||||
{
|
|
||||||
return (os << static_cast<const Field<Type>&>(*this)).good();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
void operator=(const IOField<Type>& iof)
|
void operator=(const IOField<Type>&);
|
||||||
{
|
|
||||||
Field<Type>::operator=(iof);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator=(const Field<Type>& f)
|
void operator=(const Field<Type>&);
|
||||||
{
|
|
||||||
Field<Type>::operator=(f);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -84,7 +84,25 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list)
|
|||||||
{
|
{
|
||||||
List<T>::operator=(list);
|
List<T>::operator=(list);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
Foam::IOList<T>::IOList(const IOobject& io, const xfer<List<T> >& list)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
List<T>::transfer(list());
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readStream(typeName) >> *this;
|
||||||
|
close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +113,16 @@ Foam::IOList<T>::~IOList()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
bool Foam::IOList<T>::writeData(Ostream& os) const
|
||||||
|
{
|
||||||
|
return (os << *this).good();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -111,11 +139,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();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -72,6 +72,9 @@ public:
|
|||||||
//- Construct from IOobject and a List
|
//- Construct from IOobject and a List
|
||||||
IOList(const IOobject&, const List<T>&);
|
IOList(const IOobject&, const List<T>&);
|
||||||
|
|
||||||
|
//- Construct by transferring the List contents
|
||||||
|
IOList(const IOobject&, const xfer<List<T> >&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
|
|||||||
@ -31,8 +31,7 @@ License
|
|||||||
template<class T>
|
template<class T>
|
||||||
Foam::IOMap<T>::IOMap(const IOobject& io)
|
Foam::IOMap<T>::IOMap(const IOobject& io)
|
||||||
:
|
:
|
||||||
regIOobject(io),
|
regIOobject(io)
|
||||||
Map<T>()
|
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -87,6 +86,25 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Map<T>& map)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
Foam::IOMap<T>::IOMap(const IOobject& io, const xfer<Map<T> >& map)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
Map<T>::transfer(map());
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
readStream(typeName) >> *this;
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|||||||
@ -66,11 +66,14 @@ public:
|
|||||||
//- Construct from IOobject
|
//- Construct from IOobject
|
||||||
IOMap(const IOobject&);
|
IOMap(const IOobject&);
|
||||||
|
|
||||||
|
//- Construct from IOobject and size of Map
|
||||||
|
IOMap(const IOobject&, const label);
|
||||||
|
|
||||||
//- Construct from IOobject and a Map
|
//- Construct from IOobject and a Map
|
||||||
IOMap(const IOobject&, const Map<T>&);
|
IOMap(const IOobject&, const Map<T>&);
|
||||||
|
|
||||||
//- Construct from IOobject and size of Map
|
//- Construct by transferring the Map contents
|
||||||
IOMap(const IOobject&, const label);
|
IOMap(const IOobject&, const xfer<Map<T> >&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|||||||
@ -84,6 +84,25 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const xfer<PtrList<T> >& list)
|
||||||
|
:
|
||||||
|
regIOobject(io)
|
||||||
|
{
|
||||||
|
PtrList<T>::transfer(list());
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
io.readOpt() == IOobject::MUST_READ
|
||||||
|
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
|
)
|
||||||
|
{
|
||||||
|
PtrList<T>::read(readStream(typeName), INew<T>());
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -91,6 +110,15 @@ Foam::IOPtrList<T>::~IOPtrList()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
bool Foam::IOPtrList<T>::writeData(Ostream& os) const
|
||||||
|
{
|
||||||
|
return (os << *this).good();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -99,12 +127,4 @@ void Foam::IOPtrList<T>::operator=(const IOPtrList<T>& rhs)
|
|||||||
PtrList<T>::operator=(rhs);
|
PtrList<T>::operator=(rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
bool Foam::IOPtrList<T>::writeData(Ostream& os) const
|
|
||||||
{
|
|
||||||
return (os << *this).good();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -73,6 +73,9 @@ public:
|
|||||||
//- Construct from IOobject and a PtrList
|
//- Construct from IOobject and a PtrList
|
||||||
IOPtrList(const IOobject&, const PtrList<T>&);
|
IOPtrList(const IOobject&, const PtrList<T>&);
|
||||||
|
|
||||||
|
//- Construct by transferring the PtrList contents
|
||||||
|
IOPtrList(const IOobject&, const xfer<PtrList<T> >&);
|
||||||
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
||||||
|
|||||||
@ -42,15 +42,10 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::IOdictionary::IOdictionary
|
Foam::IOdictionary::IOdictionary(const IOobject& io)
|
||||||
(
|
|
||||||
const IOobject& io
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
regIOobject(io)
|
regIOobject(io)
|
||||||
{
|
{
|
||||||
dictionary::name() = IOobject::objectPath();
|
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
io.readOpt() == IOobject::MUST_READ
|
io.readOpt() == IOobject::MUST_READ
|
||||||
@ -60,18 +55,29 @@ Foam::IOdictionary::IOdictionary
|
|||||||
readStream(typeName) >> *this;
|
readStream(typeName) >> *this;
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dictionary::name() = IOobject::objectPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::IOdictionary::IOdictionary
|
Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
|
||||||
(
|
|
||||||
const IOobject& io,
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
regIOobject(io),
|
regIOobject(io)
|
||||||
dictionary(dict)
|
|
||||||
{
|
{
|
||||||
|
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();
|
dictionary::name() = IOobject::objectPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,9 +98,9 @@ const Foam::word& Foam::IOdictionary::name() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::IOdictionary::operator=(const IOdictionary& d)
|
void Foam::IOdictionary::operator=(const IOdictionary& rhs)
|
||||||
{
|
{
|
||||||
dictionary::operator=(d);
|
dictionary::operator=(rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user