Merge with master. Only conflicts in etc/bashrc. Resolved I hope
--HG-- branch : macMerge
This commit is contained in:
commit
051cb20e5b
971 changed files with 59765 additions and 279971 deletions
210
CMakeLists.txt
Normal file
210
CMakeLists.txt
Normal file
|
@ -0,0 +1,210 @@
|
|||
# /*-------------------------------------------------------------------------*\
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright held by original author
|
||||
# \\/ 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
|
||||
#
|
||||
# Description
|
||||
# CMakeLists.txt file for implementing a test harness for the compilation
|
||||
# and test of OpenFOAM-1.5-dev using Kitware CTest./CMake/CDash
|
||||
#
|
||||
# The results will be submitted to the CDash server identified by the file
|
||||
# CTestConfig.cmake
|
||||
#
|
||||
# Author
|
||||
# Martin Beaudoin, Hydro-Quebec, 2010. All rights reserved
|
||||
#
|
||||
#
|
||||
# \*-------------------------------------------------------------------------*/
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
PROJECT(OpenFOAM_1.5-dev)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Initialization of CTest specific variables
|
||||
|
||||
# Initialize the site name
|
||||
|
||||
IF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
|
||||
# We can override the site name with the environment variable
|
||||
# $CDASH_SUBMIT_LOCAL_HOST_ID
|
||||
SET(
|
||||
SITENAME $ENV{CDASH_SUBMIT_LOCAL_HOST_ID}
|
||||
CACHE STRING "Name of the local site"
|
||||
)
|
||||
ELSE (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
|
||||
# Grab the hostname FQN; will be used for the sitename
|
||||
execute_process(
|
||||
COMMAND hostname -f
|
||||
OUTPUT_VARIABLE SITENAME
|
||||
)
|
||||
ENDIF (NOT $ENV{CDASH_SUBMIT_LOCAL_HOST_ID} STREQUAL "")
|
||||
|
||||
MESSAGE("Initializing the name of this local site to: ${SITENAME}")
|
||||
|
||||
SET(
|
||||
SITE ${SITENAME}
|
||||
CACHE STRING "Name of the local site"
|
||||
)
|
||||
|
||||
#Grab the OpenFOAM installation directory.
|
||||
SET(
|
||||
OF_ROOT $ENV{WM_PROJECT_DIR}
|
||||
CACHE INTERNAL "OpenFOAM root directory."
|
||||
)
|
||||
|
||||
# Construct the build name.
|
||||
# No need to add $WM_PROJECT_VERSION to the name of the build,
|
||||
# the test harness name should have taken care of that.
|
||||
SET(
|
||||
BUILDNAME $ENV{WM_OPTIONS}
|
||||
CACHE STRING "Build ID"
|
||||
)
|
||||
|
||||
# Find out the version of the compiler being used.
|
||||
# Add this information to the buildname
|
||||
# This is for gcc or icc because they both support the -dumpversion option
|
||||
EXEC_PROGRAM($ENV{WM_CC}
|
||||
ARGS -dumpversion
|
||||
OUTPUT_VARIABLE COMPILER_VERSION
|
||||
)
|
||||
SET(BUILDNAME "${BUILDNAME}-$ENV{WM_CC}${COMPILER_VERSION}")
|
||||
#
|
||||
# We will support more compilers eventually.
|
||||
#
|
||||
|
||||
# Timeout for running all this: 4 hours: 4 x 3600 seconds
|
||||
#SET(
|
||||
# DART_TESTING_TIMEOUT 14400
|
||||
# CACHE STRING "Maximum time allowed (4 hours) before CTest will kill the test."
|
||||
#)
|
||||
# Timeout for running all this: 10 minutes : 600 seconds
|
||||
SET(
|
||||
DART_TESTING_TIMEOUT 600
|
||||
CACHE STRING "Maximum time allowed (10 minutes) before CTest will kill the test."
|
||||
)
|
||||
|
||||
SET(
|
||||
CMAKE_VERBOSE_MAKEFILE TRUE
|
||||
)
|
||||
|
||||
|
||||
# Update section
|
||||
#-----------------------------------------------------------------------------
|
||||
set (UPDATE_TYPE git)
|
||||
|
||||
#
|
||||
# Using GIT as SCM
|
||||
#
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
message("Git was found: ${GIT_EXECUTABLE}")
|
||||
|
||||
# Adding the name of the git branch to the build name
|
||||
EXEC_PROGRAM(git
|
||||
ARGS branch --no-color 2> /dev/null | grep '*'| awk '{print $2}'
|
||||
OUTPUT_VARIABLE GIT_BRANCH_NAME
|
||||
)
|
||||
message("Git branch: ${GIT_BRANCH_NAME}")
|
||||
SET(BUILDNAME "${BUILDNAME}-git-branch:${GIT_BRANCH_NAME}")
|
||||
endif()
|
||||
|
||||
# Some last minute cleanup
|
||||
# Seems like no '/' are allowed in the BUILDNAME or in the SITE name
|
||||
string(REPLACE "/" "_" BUILDNAME ${BUILDNAME})
|
||||
string(REPLACE "/" "_" SITE ${SITE})
|
||||
|
||||
|
||||
# Build section
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Compile OpenFOAM, libs and apps
|
||||
add_custom_target (OpenFOAM-$ENV{WM_PROJECT_VERSION} ALL
|
||||
${OF_ROOT}/Allwmake
|
||||
)
|
||||
|
||||
set_property(
|
||||
TARGET OpenFOAM-$ENV{WM_PROJECT_VERSION}
|
||||
PROPERTY LABELS OpenFOAM-$ENV{WM_PROJECT_VERSION}
|
||||
)
|
||||
|
||||
# Compile the OpenFOAM unit tests located under applications/test
|
||||
# This part will not be compiled and run by default.
|
||||
# This would be a good candidate for a sub-project
|
||||
add_custom_target (OpenFOAM-$ENV{WM_PROJECT_VERSION}_unitTests
|
||||
wmake all ${OF_ROOT}/applications/test
|
||||
)
|
||||
|
||||
# Test section
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
#Enable testing and dashboard
|
||||
ENABLE_TESTING()
|
||||
INCLUDE(CTest)
|
||||
|
||||
SET (CTEST_UPDATE_COMMAND ${GIT_EXECUTABLE})
|
||||
|
||||
SET(
|
||||
CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000
|
||||
CACHE INTERNAL "Max number of errors"
|
||||
)
|
||||
SET(
|
||||
CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000
|
||||
CACHE INTERNAL "Max number of warnings"
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
|
||||
# Modify this variable if you want the full length test case simulations
|
||||
# Beware, this might take a long time to execute.
|
||||
# Otherwise, the default behaviour is to run each tutorial for 1 "timestep"
|
||||
#SET(RUN_FROM_ONE_TIMESTEP 0)
|
||||
SET(RUN_FROM_ONE_TIMESTEP 1)
|
||||
|
||||
IF(RUN_FROM_ONE_TIMESTEP)
|
||||
SET(testIdSuffix "_oneTimeStep")
|
||||
ENDIF(RUN_FROM_ONE_TIMESTEP)
|
||||
|
||||
# OpenFOAM will run against this test suite:
|
||||
|
||||
# Add the suite of OpenFOAM tutorials
|
||||
#
|
||||
INCLUDE($ENV{FOAM_TEST_HARNESS_DIR}/CMakeFiles/OpenFOAM_Tutorials.cmake)
|
||||
|
||||
# Add a dummy test (/bin/true, just for debugging)
|
||||
ADD_TEST(
|
||||
OpenFOAM-$ENV{WM_PROJECT_VERSION}_Dummy_Test true
|
||||
)
|
||||
|
||||
IF(RUN_FROM_ONE_TIMESTEP)
|
||||
# Modify the cases controlDict file in order to run for only one time step
|
||||
MESSAGE("${testRunTimeDirectory}: Modifying the controlDict files for running only one time step in directory: ${TEST_CASE_DIR}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND $ENV{FOAM_TEST_HARNESS_DIR}/scripts/prepareCasesForOneTimeStep.sh ${TEST_CASE_DIR}
|
||||
WORKING_DIRECTORY .
|
||||
)
|
||||
ENDIF(RUN_FROM_ONE_TIMESTEP)
|
||||
|
||||
ENDIF(BUILD_TESTING)
|
||||
|
||||
# That's it.
|
||||
#
|
13
CTestConfig.cmake
Normal file
13
CTestConfig.cmake
Normal file
|
@ -0,0 +1,13 @@
|
|||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
## # The following are required to uses Dart and the Cdash dashboard
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(CTest)
|
||||
set(CTEST_PROJECT_NAME "OpenFOAM-1.6-ext_testing")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "openfoam-extend.sourceforge.net")
|
||||
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenFOAM-1.6-ext_testing")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
|
@ -1,24 +1,37 @@
|
|||
// The FOAM Project // File: testCoeffField.C
|
||||
/*
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
========= | Application
|
||||
\\ / |
|
||||
\\ / | Name: testCoeffField
|
||||
\\ / | Family: Utility
|
||||
\\/ |
|
||||
F ield | FOAM version: 2.2
|
||||
O peration |
|
||||
A and | Copyright (C) 1991-2003 Nabla Ltd.
|
||||
M anipulation | All Rights Reserved.
|
||||
-------------------------------------------------------------------------------
|
||||
DESCRIPTION
|
||||
Test coeff field and block matrix
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
AUTHOR
|
||||
Hrvoje Jasak
|
||||
OpenFOAM is free software; you can 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
|
||||
testBlockMatrix
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
|
||||
Description
|
||||
Test block matrix coefficient assembly
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "fieldTypes.H"
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2006-7 H. Jasak All rights reserved
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
@ -25,6 +25,9 @@ License
|
|||
Application
|
||||
conjugateHeatFoam
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
|
||||
Description
|
||||
Transient solver for incompressible, laminar flow of Newtonian fluids
|
||||
with conjugate heat transfer
|
|
@ -0,0 +1,3 @@
|
|||
icoDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/icoDyMFoam
|
13
applications/solvers/incompressible/icoDyMFoam/Make/options
Normal file
13
applications/solvers/incompressible/icoDyMFoam/Make/options
Normal file
|
@ -0,0 +1,13 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ldynamicFvMesh \
|
||||
-ldynamicMesh \
|
||||
-lengine \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume \
|
||||
-llduSolvers
|
11
applications/solvers/incompressible/icoDyMFoam/UEqn.H
Normal file
11
applications/solvers/incompressible/icoDyMFoam/UEqn.H
Normal file
|
@ -0,0 +1,11 @@
|
|||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(U)
|
||||
+ fvm::div(phi, U)
|
||||
- fvm::laplacian(nu, U)
|
||||
);
|
||||
|
||||
if (momentumPredictor)
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
47
applications/solvers/incompressible/icoDyMFoam/correctPhi.H
Normal file
47
applications/solvers/incompressible/icoDyMFoam/correctPhi.H
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
wordList pcorrTypes(p.boundaryField().types());
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField pcorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pcorr",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("pcorr", p.dimensions(), 0.0),
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
fvm::laplacian(rAU, pcorr) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pcorrEqn.setReference(pRefCell, pRefValue);
|
||||
pcorrEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= pcorrEqn.flux();
|
||||
}
|
||||
|
||||
// Fluxes are corrected to absolute velocity and further corrected
|
||||
// later. HJ, 6/Feb/2009
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
|
@ -0,0 +1,90 @@
|
|||
Info<< "Reading transportProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar nu
|
||||
(
|
||||
transportProperties.lookup("nu")
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
Info<< "Reading field rAU if present\n" << endl;
|
||||
volScalarField rAU
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rAU",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
runTime.deltaT(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
|
||||
{
|
||||
const dictionary& piso = mesh.solutionDict().subDict("PISO");
|
||||
|
||||
bool momentumPredictor = true;
|
||||
if (piso.found("momentumPredictor"))
|
||||
{
|
||||
momentumPredictor = Switch(piso.lookup("momentumPredictor"));
|
||||
}
|
||||
|
||||
bool momentumPredictorSave = momentumPredictor;
|
||||
momentumPredictor = false;
|
||||
# include "UEqn.H"
|
||||
momentumPredictor = momentumPredictorSave;
|
||||
|
||||
rAU = 1.0/UEqn.A();
|
||||
}
|
149
applications/solvers/incompressible/icoDyMFoam/icoDyMFoam.C
Normal file
149
applications/solvers/incompressible/icoDyMFoam/icoDyMFoam.C
Normal file
|
@ -0,0 +1,149 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ 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
|
||||
icoDyMFoam
|
||||
|
||||
Description
|
||||
Transient solver for incompressible, laminar flow of Newtonian fluids
|
||||
with dynamic mesh.
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "initTotalVolume.H"
|
||||
# include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readControls.H"
|
||||
# include "checkTotalVolume.H"
|
||||
# include "CourantNo.H"
|
||||
|
||||
# include "setDeltaT.H"
|
||||
|
||||
// Make the fluxes absolute
|
||||
fvc::makeAbsolute(phi, U);
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
bool meshChanged = mesh.update();
|
||||
|
||||
# include "volContinuity.H"
|
||||
|
||||
if (correctPhi && meshChanged)
|
||||
{
|
||||
// Fluxes will be corrected to absolute velocity
|
||||
// HJ, 6/Feb/2009
|
||||
# include "correctPhi.H"
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
if (meshChanged)
|
||||
{
|
||||
# include "CourantNo.H"
|
||||
}
|
||||
|
||||
# include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
{
|
||||
rAU = 1.0/UEqn.A();
|
||||
|
||||
U = rAU*UEqn.H();
|
||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||
//+ fvc::ddtPhiCorr(rAU, U, phi);
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
if (corr == nCorr - 1 && nonOrth == nNonOrthCorr)
|
||||
{
|
||||
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve(mesh.solver(p.name()));
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,14 @@
|
|||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
|
||||
bool correctPhi = false;
|
||||
if (piso.found("correctPhi"))
|
||||
{
|
||||
correctPhi = Switch(piso.lookup("correctPhi"));
|
||||
}
|
||||
|
||||
bool checkMeshCourantNo = false;
|
||||
if (piso.found("checkMeshCourantNo"))
|
||||
{
|
||||
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
||||
}
|
|
@ -24,12 +24,6 @@
|
|||
pcorrTypes
|
||||
);
|
||||
|
||||
# include "continuityErrs.H"
|
||||
|
||||
// Flux predictor
|
||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||
rAU == runTime.deltaT();
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
|
@ -50,4 +44,4 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
|
|
@ -54,17 +54,37 @@
|
|||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
|
||||
scalar totalVolume = sum(mesh.V()).value();
|
||||
|
||||
Info<< "Reading field rAU if present\n" << endl;
|
||||
volScalarField rAU
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rAU",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
runTime.deltaT(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
|
||||
{
|
||||
const dictionary& piso = mesh.solutionDict().subDict("PISO");
|
||||
|
||||
bool momentumPredictor = true;
|
||||
if (piso.found("momentumPredictor"))
|
||||
{
|
||||
momentumPredictor = Switch(piso.lookup("momentumPredictor"));
|
||||
}
|
||||
|
||||
bool momentumPredictorSave = momentumPredictor;
|
||||
momentumPredictor = false;
|
||||
# include "UEqn.H"
|
||||
momentumPredictor = momentumPredictorSave;
|
||||
|
||||
rAU = 1.0/UEqn.A();
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ int main(int argc, char *argv[])
|
|||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "initTotalVolume.H"
|
||||
# include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2005 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2005 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2005 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright held by original author
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
@ -12,11 +12,17 @@
|
|||
|
||||
#elif defined(linux)
|
||||
|
||||
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DUSEENUM -DTHREED -U_WIN32
|
||||
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32
|
||||
|
||||
#elif defined(darwinIntel)
|
||||
|
||||
# warning "DarwinIntel architecture detected"
|
||||
|
||||
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32
|
||||
|
||||
#else
|
||||
|
||||
# error architecture not supported for compiling tecio.
|
||||
#error "architecture not supported for compiling tecio."
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ cleanTimeDirectories ()
|
|||
zeros=`printf %0${nZeros}d 0`
|
||||
nZeros=$(($nZeros + 1))
|
||||
done
|
||||
rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
|
||||
rm -rf ./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* ./.fxLock ./*.xml ./ParaView* ./paraFoam* ./*.OpenFOAM > /dev/null 2>&1
|
||||
}
|
||||
|
||||
cleanCase ()
|
||||
|
@ -66,10 +66,20 @@ cleanCase ()
|
|||
rm -rf forces* > /dev/null 2>&1
|
||||
|
||||
rm -rf system/machines \
|
||||
constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
|
||||
constant/polyMesh/{owner*,neighbour*,point*,edge*} \
|
||||
constant/polyMesh/{cellLevel*,pointLevel*,refinementHistory*,surfaceIndex*} \
|
||||
constant/{cellToRegion,cellLevel*,pointLevel*} \
|
||||
constant/polyMesh/allOwner* \
|
||||
constant/polyMesh/cell* \
|
||||
constant/polyMesh/face* \
|
||||
constant/polyMesh/meshModifiers* \
|
||||
constant/polyMesh/owner* \
|
||||
constant/polyMesh/neighbour* \
|
||||
constant/polyMesh/point* \
|
||||
constant/polyMesh/edge* \
|
||||
constant/polyMesh/zoneToPatchName \
|
||||
constant/polyMesh/cellLevel* \
|
||||
constant/polyMesh/pointLevel* \
|
||||
constant/polyMesh/refinementHistory*, \
|
||||
constant/polyMesh/surfaceIndex* \
|
||||
constant/cellToRegion \
|
||||
constant/polyMesh/sets/ \
|
||||
VTK \
|
||||
> /dev/null 2>&1
|
||||
|
|
|
@ -65,6 +65,12 @@ compileApplication ()
|
|||
wmake $1
|
||||
}
|
||||
|
||||
compileLibrary ()
|
||||
{
|
||||
echo "Compiling $1 application"
|
||||
wmake libso $1
|
||||
}
|
||||
|
||||
cloneCase ()
|
||||
{
|
||||
if [ -d $2 ] ; then
|
||||
|
|
|
@ -71,12 +71,12 @@ fi
|
|||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
|
||||
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
|
||||
: ${WM_PROJECT_USER_DIR:=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION}; export WM_PROJECT_USER_DIR
|
||||
|
||||
|
||||
# Location of third-party software
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
|
||||
: ${WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION}; export WM_THIRD_PARTY_DIR
|
||||
|
||||
# Source files, possibly with some verbosity
|
||||
_foamSource()
|
||||
|
@ -126,7 +126,7 @@ export WM_COMPILER_LIB_ARCH=
|
|||
|
||||
# Compilation options (architecture, precision, optimised, debug or profiling)
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export WM_NCOMPPROCS=2
|
||||
: ${WM_NCOMPPROCS:=2}; export WM_NCOMPPROCS
|
||||
|
||||
# WM_ARCH_OPTION = 32 | 64
|
||||
: ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION
|
||||
|
|
|
@ -35,7 +35,7 @@ Documentation
|
|||
|
||||
DebugSwitches
|
||||
{
|
||||
BlockLduMatrix 2;
|
||||
BlockLduMatrix 1;
|
||||
|
||||
CircumferentialAveragingInterpolation 0;
|
||||
mixingPlanePolyPatch 1;
|
||||
|
@ -913,6 +913,8 @@ Tolerances
|
|||
|
||||
// Thermophysical models
|
||||
specieThermoTol 1e-4;
|
||||
speciesThermoTJump 20;
|
||||
speciesThermoMaxIter 100;
|
||||
|
||||
// Intersection tolerance
|
||||
intersectionPlanarTol 0.2;
|
||||
|
|
|
@ -107,8 +107,8 @@ if ( ! $?WM_OSTYPE ) setenv WM_OSTYPE POSIX
|
|||
# Compiler: set to Gcc, Gcc43 or Icc (for Intel's icc)
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#if ( ! $?WM_COMPILER ) setenv WM_COMPILER Gcc
|
||||
#setenv WM_COMPILER Gcc
|
||||
setenv WM_COMPILER Icc
|
||||
setenv WM_COMPILER Gcc
|
||||
#setenv WM_COMPILER Icc
|
||||
|
||||
setenv WM_COMPILER_ARCH
|
||||
setenv WM_COMPILER_LIB_ARCH
|
||||
|
@ -116,7 +116,7 @@ setenv WM_COMPILER_LIB_ARCH
|
|||
|
||||
# Compilation options (architecture, precision, optimised, debug or profiling)
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
setenv WM_NCOMPPROCS 2
|
||||
setenv WM_NCOMPPROCS 8
|
||||
|
||||
# WM_ARCH_OPTION = 32 | 64
|
||||
if ( ! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64
|
||||
|
|
|
@ -144,7 +144,7 @@ unset MPI_ARCH_PATH
|
|||
|
||||
switch ("$WM_MPLIB")
|
||||
case OPENMPI:
|
||||
set mpi_version=openmpi-1.4.1
|
||||
set mpi_version=openmpi-1.5
|
||||
setenv MPI_HOME $WM_THIRD_PARTY_DIR/$mpi_version
|
||||
setenv MPI_ARCH_PATH $MPI_HOME/platforms/$WM_OPTIONS
|
||||
|
||||
|
|
|
@ -32,11 +32,18 @@ License
|
|||
Foam::tensor Foam::RodriguesRotation
|
||||
(
|
||||
const vector& rotationAxis,
|
||||
const scalar& rotationAngle
|
||||
const scalar& rotationAngle,
|
||||
const bool inDegrees
|
||||
)
|
||||
{
|
||||
tensor rotTensor;
|
||||
scalar theta = rotationAngle*mathematicalConstant::pi/180.0;
|
||||
scalar theta = rotationAngle;
|
||||
|
||||
if (inDegrees)
|
||||
{
|
||||
theta *= mathematicalConstant::pi/180.0;
|
||||
}
|
||||
|
||||
scalar sinTheta = sin(theta);
|
||||
scalar cosTheta = cos(theta);
|
||||
scalar oneMinusCosTheta = 1.0 - cosTheta;
|
||||
|
|
|
@ -53,7 +53,8 @@ namespace Foam
|
|||
tensor RodriguesRotation
|
||||
(
|
||||
const vector& rotationAxis,
|
||||
const scalar& rotationAngle
|
||||
const scalar& rotationAngle,
|
||||
const bool inDegrees = true
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
// Constructors
|
||||
|
||||
//- Construct given initial table size
|
||||
HashPtrTable(label size = 100);
|
||||
HashPtrTable(const label size = 128);
|
||||
|
||||
//- Construct from Istream using given Istream constructor class
|
||||
template<class INew>
|
||||
|
@ -128,23 +128,19 @@ public:
|
|||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>
|
||||
#ifndef __CINT__
|
||||
<T, Key, Hash>
|
||||
#endif
|
||||
#ifndef SWIG
|
||||
friend Istream& operator>> <T, Key, Hash>
|
||||
(
|
||||
Istream&,
|
||||
HashPtrTable<T, Key, Hash>&
|
||||
);
|
||||
|
||||
friend Ostream& operator<<
|
||||
#ifndef __CINT__
|
||||
<T, Key, Hash>
|
||||
#endif
|
||||
friend Ostream& operator<< <T, Key, Hash>
|
||||
(
|
||||
Ostream&,
|
||||
const HashPtrTable<T, Key, Hash>&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -417,6 +417,7 @@ public:
|
|||
|
||||
// IOstream Operator
|
||||
|
||||
#ifndef SWIG
|
||||
friend Istream& operator>> <T, Key, Hash>
|
||||
(
|
||||
Istream&,
|
||||
|
@ -428,6 +429,7 @@ public:
|
|||
Ostream&,
|
||||
const HashTable<T, Key, Hash>&
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
@ -208,6 +208,7 @@ public:
|
|||
|
||||
// IOstream operators
|
||||
|
||||
#ifndef SWIG
|
||||
// Write DynamicList to Ostream.
|
||||
friend Ostream& operator<< <T, SizeInc, SizeMult, SizeDiv>
|
||||
(
|
||||
|
@ -221,6 +222,7 @@ public:
|
|||
Istream&,
|
||||
DynamicList<T, SizeInc, SizeMult, SizeDiv>&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -71,8 +71,11 @@ template<class T> class SLList;
|
|||
template<class T, unsigned Size>
|
||||
class FixedList
|
||||
{
|
||||
#ifndef SWIG
|
||||
//- Size must be positive (non-zero) and also fit as a signed value
|
||||
StaticAssert(Size && Size <= INT_MAX);
|
||||
#endif
|
||||
|
||||
|
||||
// Private data
|
||||
|
||||
|
@ -331,6 +334,8 @@ public:
|
|||
// IOstream operators
|
||||
|
||||
//- Read List from Istream, discarding contents of existing List.
|
||||
|
||||
#ifndef SWIG
|
||||
friend Istream& operator>> <T, Size>
|
||||
(Istream&, FixedList<T, Size>&);
|
||||
|
||||
|
@ -340,6 +345,7 @@ public:
|
|||
Ostream&,
|
||||
const FixedList<T, Size>&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -232,9 +232,10 @@ public:
|
|||
|
||||
// Istream operator
|
||||
|
||||
#ifndef SWIG
|
||||
//- Read List from Istream, discarding contents of existing List.
|
||||
friend Istream& operator>> <T>
|
||||
(Istream&, List<T>&);
|
||||
friend Istream& operator>> <T>(Istream&, List<T>&);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -295,11 +295,13 @@ public:
|
|||
|
||||
// IOstream operator
|
||||
|
||||
#ifndef SWIG
|
||||
//- Read List from Istream, discarding contents of existing List.
|
||||
friend Istream& operator>> <T>(Istream&, PtrList<T>&);
|
||||
|
||||
// Write List to Ostream.
|
||||
friend Ostream& operator<< <T>(Ostream&, const PtrList<T>&);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -321,13 +321,16 @@ public:
|
|||
// Ostream operator
|
||||
|
||||
// Write UList to Ostream.
|
||||
#ifndef SWIG
|
||||
friend Ostream& operator<< <T>
|
||||
(
|
||||
Ostream&,
|
||||
const UList<T>&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
template<class T>
|
||||
void sort(UList<T>&);
|
||||
|
||||
|
|
|
@ -53,8 +53,11 @@ class NamedEnum
|
|||
:
|
||||
public HashTable<int>
|
||||
{
|
||||
#ifndef SWIG
|
||||
//- nEnum must be positive (non-zero)
|
||||
StaticAssert(nEnum > 0);
|
||||
#endif
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
|
|
|
@ -139,9 +139,15 @@ public:
|
|||
//- Construct from dictionary
|
||||
coordinateRotation(const dictionary&);
|
||||
|
||||
//- Return clone
|
||||
autoPtr<coordinateRotation> clone() const
|
||||
{
|
||||
return autoPtr<coordinateRotation>(new coordinateRotation(*this));
|
||||
}
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
#ifndef SWIG
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
|
@ -152,6 +158,7 @@ public:
|
|||
),
|
||||
(dict)
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
// Selectors
|
||||
|
|
|
@ -166,6 +166,7 @@ class coordinateSystem
|
|||
//- Global-to-Local transformation tensor
|
||||
tensor Rtr_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
@ -249,8 +250,10 @@ public:
|
|||
return autoPtr<coordinateSystem>(new coordinateSystem(*this));
|
||||
}
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
#ifndef SWIG
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
|
@ -275,6 +278,8 @@ public:
|
|||
),
|
||||
(name, origin, cr)
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
|
|
|
@ -50,7 +50,11 @@ namespace Foam
|
|||
|
||||
class IOobjectList
|
||||
:
|
||||
#ifndef SWIG
|
||||
public HashPtrTable<IOobject>
|
||||
#else
|
||||
public HashPtrTable<IOobject, word, string_hash>
|
||||
#endif
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
|
|
|
@ -209,6 +209,8 @@ public:
|
|||
|
||||
|
||||
//- A templated class for holding compound tokens
|
||||
|
||||
#ifndef SWIG
|
||||
template<class T>
|
||||
class Compound
|
||||
:
|
||||
|
@ -235,7 +237,7 @@ public:
|
|||
operator<<(os, static_cast<const T&>(*this));
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//- Static undefined token
|
||||
static token undefinedToken;
|
||||
|
|
|
@ -51,7 +51,11 @@ namespace Foam
|
|||
class objectRegistry
|
||||
:
|
||||
public regIOobject,
|
||||
#ifndef SWIG
|
||||
public HashTable<regIOobject*>
|
||||
#else
|
||||
public HashTable<regIOobject*, word, string_hash>
|
||||
#endif
|
||||
{
|
||||
// Private Data
|
||||
|
||||
|
|
|
@ -174,11 +174,13 @@ public:
|
|||
|
||||
// IOstream operators
|
||||
|
||||
#ifndef SWIG
|
||||
friend Istream& operator>> <Type>
|
||||
(Istream&, dimensioned<Type>&);
|
||||
|
||||
friend Ostream& operator<< <Type>
|
||||
(Ostream&, const dimensioned<Type>&);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -162,10 +162,13 @@ public:
|
|||
);
|
||||
|
||||
//- Construct by transferring the DimensionedField
|
||||
|
||||
#ifndef SWIG
|
||||
DimensionedField
|
||||
(
|
||||
const Xfer<DimensionedField<Type, GeoMesh> >&
|
||||
);
|
||||
#endif
|
||||
|
||||
//- Construct as copy of tmp<DimensionedField> deleting argument
|
||||
# ifdef ConstructFromTmp
|
||||
|
@ -198,11 +201,13 @@ public:
|
|||
);
|
||||
|
||||
//- Construct by transferring the DimensionedField with a new name
|
||||
#ifndef SWIG
|
||||
DimensionedField
|
||||
(
|
||||
const word& newName,
|
||||
const Xfer<DimensionedField<Type, GeoMesh> >&
|
||||
);
|
||||
#endif
|
||||
|
||||
//- Construct as copy resetting name
|
||||
# ifdef ConstructFromTmp
|
||||
|
@ -309,6 +314,7 @@ public:
|
|||
|
||||
// Ostream Operators
|
||||
|
||||
#ifndef SWIG
|
||||
friend Ostream& operator<< <Type, GeoMesh>
|
||||
(
|
||||
Ostream&,
|
||||
|
@ -320,6 +326,7 @@ public:
|
|||
Ostream&,
|
||||
const tmp<DimensionedField<Type, GeoMesh> >&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -189,6 +189,7 @@ public:
|
|||
|
||||
// IOstream operators
|
||||
|
||||
#ifndef SWIG
|
||||
friend Ostream& operator<< <Field, Type>
|
||||
(
|
||||
Ostream&,
|
||||
|
@ -200,6 +201,7 @@ public:
|
|||
Ostream&,
|
||||
const tmp<FieldField<Field, Type> >&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -339,11 +339,13 @@ public:
|
|||
|
||||
// IOstream operators
|
||||
|
||||
#ifndef SWIG
|
||||
friend Ostream& operator<< <Type>
|
||||
(Ostream&, const Field<Type>&);
|
||||
|
||||
friend Ostream& operator<< <Type>
|
||||
(Ostream&, const tmp<Field<Type> >&);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -296,7 +296,8 @@ public:
|
|||
const word& patchFieldType=PatchField<Type>::calculatedType()
|
||||
);
|
||||
|
||||
//- Constructor given IOobject, mesh, dimensioned<Type> and patch types.
|
||||
//- Constructor given IOobject, mesh, dimensioned<Type>
|
||||
// and patch types.
|
||||
GeometricField
|
||||
(
|
||||
const IOobject&,
|
||||
|
@ -306,6 +307,8 @@ public:
|
|||
);
|
||||
|
||||
//- Constructor from components
|
||||
|
||||
#if ( !defined(SWIG) || (SWIG_VERSION > 0x010340) )
|
||||
GeometricField
|
||||
(
|
||||
const IOobject&,
|
||||
|
@ -314,6 +317,7 @@ public:
|
|||
const Field<Type>&,
|
||||
const PtrList<PatchField<Type> >&
|
||||
);
|
||||
#endif
|
||||
|
||||
//- Construct and read given IOobject
|
||||
GeometricField
|
||||
|
@ -547,6 +551,7 @@ public:
|
|||
|
||||
// Ostream operators
|
||||
|
||||
#ifndef SWIG
|
||||
friend Ostream& operator<< <Type, PatchField, GeoMesh>
|
||||
(
|
||||
Ostream&,
|
||||
|
@ -558,6 +563,7 @@ public:
|
|||
Ostream&,
|
||||
const tmp<GeometricField<Type, PatchField, GeoMesh> >&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -85,7 +85,10 @@ void GGIInterpolation<MasterPatch, SlavePatch>::calcAddressing() const
|
|||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info << "Evaluation of GGI weighting factors:" << endl;
|
||||
}
|
||||
|
||||
// Create the dynamic lists to hold the addressing
|
||||
|
||||
|
@ -475,8 +478,6 @@ void GGIInterpolation<MasterPatch, SlavePatch>::calcAddressing() const
|
|||
{
|
||||
rescaleWeightingFactors();
|
||||
}
|
||||
|
||||
Info << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -569,14 +570,19 @@ void GGIInterpolation<MasterPatch, SlavePatch>::rescaleWeightingFactors() const
|
|||
}
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
if (saW.size() > 0 && maW.size() > 0)
|
||||
{
|
||||
Info<< " Largest slave weighting factor correction : " << largestSWC
|
||||
Info<< " Largest slave weighting factor correction : "
|
||||
<< largestSWC
|
||||
<< " average: " << sumSWC/saW.size() << nl
|
||||
<< " Largest master weighting factor correction: " << largestMWC
|
||||
<< " Largest master weighting factor correction: "
|
||||
<< largestMWC
|
||||
<< " average: " << sumMWC/maW.size() << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find non-overlapping faces from both master and slave patches
|
||||
// The default non-overlapping criteria is total absence of neighbours.
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Interpolate field to cell center.
|
||||
// Interpolate field to cell center
|
||||
template<class Type>
|
||||
Type interpolatePointToCell
|
||||
(
|
||||
|
|
|
@ -81,10 +81,11 @@ protected:
|
|||
|
||||
//- Face restriction addressing array.
|
||||
// Maps from the finer to the coarser level.
|
||||
// Positive indices map the finer faces which form part of the boundary
|
||||
// of the coarser cells to the corresponding coarser cell face.
|
||||
// Positive indices map the finer faces which form part of the
|
||||
// boundary of the coarser cells to the corresponding coarser
|
||||
// cell face.
|
||||
// Negative indices map the finer faces which are internal to the
|
||||
// coarser cells to minus the corresponding coarser cell index minus 1.
|
||||
// coarser cells to minus the corresponding coarser cell index minus 1
|
||||
PtrList<labelList> faceRestrictAddressing_;
|
||||
|
||||
//- Hierarchy of mesh addressing
|
||||
|
|
|
@ -73,7 +73,7 @@ class pointMesh
|
|||
public:
|
||||
|
||||
// Declare name of the class and its debug switch
|
||||
ClassName("pointMesh");
|
||||
TypeName("pointMesh");
|
||||
|
||||
typedef pointMesh Mesh;
|
||||
typedef pointBoundaryMesh BoundaryMesh;
|
||||
|
|
|
@ -1226,7 +1226,6 @@ void Foam::polyMesh::setOldPoints
|
|||
oldPointsPtr_ = new pointField::subField(oldAllPoints(), nPoints());
|
||||
curMotionTimeIndex_ = 0;
|
||||
primitiveMesh::clearGeom();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ License
|
|||
#include "primitiveMesh.H"
|
||||
#include "globalMeshData.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "meshObjectBase.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -90,6 +91,9 @@ void Foam::polyMesh::clearGeom()
|
|||
// Reset valid directions (could change with rotation)
|
||||
geometricD_ = Vector<label>::zero;
|
||||
solutionD_ = Vector<label>::zero;
|
||||
|
||||
// Move points all mesh objects. HJ, 13/Oct/2010
|
||||
meshObjectBase::allMovePoints(*this);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ License
|
|||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
#include "cellIOList.H"
|
||||
#include "meshObjectBase.H"
|
||||
#include "mapPolyMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -394,6 +396,11 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
|||
cellZones_.set(czI, newCellZones[czI].clone(cellZones_));
|
||||
}
|
||||
|
||||
// Instantiate a dummy mapPolyMesh
|
||||
autoPtr<mapPolyMesh> mapPtr(new mapPolyMesh(*this));
|
||||
|
||||
// Execute dummy topo change on all mesh objects
|
||||
meshObjectBase::allUpdateTopology(*this, mapPtr());
|
||||
|
||||
if (boundaryChanged)
|
||||
{
|
||||
|
@ -440,6 +447,9 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
|||
geometricD_ = Vector<label>::zero;
|
||||
solutionD_ = Vector<label>::zero;
|
||||
|
||||
// Move points in all mesh objects
|
||||
meshObjectBase::allMovePoints<polyMesh>(*this);
|
||||
|
||||
return polyMesh::POINTS_MOVED;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -27,9 +27,10 @@ Class
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved
|
||||
Fethi Tekin, All rights reserved
|
||||
|
||||
Description
|
||||
Mass-conservative face interpolation: typedef for polyPatch to
|
||||
Mass-conservative face interpolation: typedef for stand-alone patch to
|
||||
stand-alone patch
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -49,7 +50,7 @@ namespace Foam
|
|||
{
|
||||
typedef GGIInterpolation
|
||||
<
|
||||
PrimitivePatch<face, SubList, const pointField&>,
|
||||
PrimitivePatch<face, List, pointField>,
|
||||
PrimitivePatch<face, List, pointField>
|
||||
> overlapGgiInterpolation;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ License
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -60,7 +61,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(word::null),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(vector(0.0, 0.0, 1.0)),
|
||||
angle_(0),
|
||||
nCopies_(0),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -77,14 +79,15 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
const polyBoundaryMesh& bm,
|
||||
const word& shadowName,
|
||||
const vector& axis,
|
||||
const scalar angle
|
||||
const scalar nCopies
|
||||
)
|
||||
:
|
||||
coupledPolyPatch(name, size, start, index, bm),
|
||||
shadowName_(shadowName),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(axis),
|
||||
angle_(angle),
|
||||
nCopies_(nCopies),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -104,7 +107,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(dict.lookup("shadowPatch")),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(dict.lookup("rotationAxis")),
|
||||
angle_(readScalar(dict.lookup("angle"))),
|
||||
nCopies_(readScalar(dict.lookup("nCopies"))),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -122,7 +126,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(pp.shadowName_),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(pp.rotationAxis_),
|
||||
angle_(pp.angle_),
|
||||
nCopies_(pp.nCopies_),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -143,7 +148,8 @@ Foam::overlapGgiPolyPatch::overlapGgiPolyPatch
|
|||
shadowName_(pp.shadowName_),
|
||||
shadowIndex_(-1),
|
||||
rotationAxis_(pp.rotationAxis_),
|
||||
angle_(pp.angle_),
|
||||
nCopies_(pp.nCopies_),
|
||||
expandedMasterPtr_(NULL),
|
||||
expandedSlavePtr_(NULL),
|
||||
patchToPatchPtr_(NULL),
|
||||
reconFaceCellCentresPtr_(NULL)
|
||||
|
@ -199,7 +205,6 @@ Foam::label Foam::overlapGgiPolyPatch::shadowIndex() const
|
|||
return shadowIndex_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::overlapGgiPolyPatch&
|
||||
Foam::overlapGgiPolyPatch::shadow() const
|
||||
{
|
||||
|
@ -209,34 +214,21 @@ Foam::overlapGgiPolyPatch::shadow() const
|
|||
|
||||
Foam::label Foam::overlapGgiPolyPatch::nCopies() const
|
||||
{
|
||||
// Calculate number of copies to be made for the expanded slave
|
||||
// to completely cover the master
|
||||
if (!master())
|
||||
{
|
||||
FatalErrorIn("label overlapGgiPolyPatch::nCopies() const")
|
||||
<< "nCopies requested for a slave. Error in master-slave logic"
|
||||
<< abort(FatalError);
|
||||
// Read the number of copies to be made from the dictionary for the
|
||||
// expanded slave and expanded master to cover 360 degrees
|
||||
return nCopies_;
|
||||
}
|
||||
|
||||
label ncp = 0;
|
||||
scalar remainder = angle_;
|
||||
|
||||
const scalar slaveAngle = shadow().angle();
|
||||
|
||||
while (remainder > SMALL)
|
||||
{
|
||||
remainder -= slaveAngle;
|
||||
ncp++;
|
||||
}
|
||||
|
||||
return ncp;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::overlapGgiPolyPatch::master() const
|
||||
{
|
||||
// The first overlapggi interface is master,second one is slave
|
||||
if (angle() == shadow().angle())
|
||||
{
|
||||
return start() < shadow().start() ;
|
||||
}
|
||||
|
||||
// Master is the one with the larger angle
|
||||
return angle() >= shadow().angle();
|
||||
return angle() > shadow().angle();
|
||||
}
|
||||
|
||||
|
||||
|
@ -246,7 +238,9 @@ void Foam::overlapGgiPolyPatch::write(Ostream& os) const
|
|||
polyPatch::write(os);
|
||||
os.writeKeyword("rotationAxis") << rotationAxis_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("angle") << angle_
|
||||
os.writeKeyword("nCopies") << nCopies_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeKeyword("shadowPatch") << shadowName_
|
||||
<< token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,17 +26,17 @@ Class
|
|||
overlapGgiPolyPatch
|
||||
|
||||
Description
|
||||
Partial overlap generalised grid interface (GGI) patch. Master side
|
||||
remains unchanged and the slave side will be copied as needed
|
||||
to pave the master patch surface.
|
||||
Partial overlap generalised grid interface (GGI) patch. Master and slave
|
||||
sides are copied as much as the given number to complete the 360 degree
|
||||
cicumferential surface.
|
||||
|
||||
This implies that the master patch has got a larger angular pitch than
|
||||
the slave and that master and slave are aligned at one edge.
|
||||
Master and slave will specify the pitch, based on which the expansion
|
||||
of the master side will be performed and used in interpolation.
|
||||
The data interpolation between master and slave patches do not depend on
|
||||
relative position of them, because of the full circumferential expansion
|
||||
for both sides.
|
||||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
SourceFiles
|
||||
overlapGgiPolyPatch.C
|
||||
|
@ -78,12 +78,20 @@ class overlapGgiPolyPatch
|
|||
//- Rotation axis
|
||||
const vector rotationAxis_;
|
||||
|
||||
//- Wedge angle
|
||||
const scalar angle_;
|
||||
|
||||
// Number of copies in order to complete 360 degrees
|
||||
const scalar nCopies_;
|
||||
|
||||
// Interpolation
|
||||
|
||||
//- Pointer to expanded master patch
|
||||
mutable standAlonePatch* expandedMasterPtr_;
|
||||
|
||||
//- Pointer to expanded faceCentres of Master
|
||||
mutable vectorField* faceCentresPtr_;
|
||||
|
||||
//- Pointer to expanded faceareas of Master
|
||||
mutable vectorField* faceAreasPtr_;
|
||||
|
||||
//- Pointer to expanded slave patch
|
||||
mutable standAlonePatch* expandedSlavePtr_;
|
||||
|
||||
|
@ -97,18 +105,24 @@ class overlapGgiPolyPatch
|
|||
|
||||
// Private member functions
|
||||
|
||||
//- Return reference to patch-to-patch interpolation
|
||||
const overlapGgiInterpolation& patchToPatch() const;
|
||||
|
||||
//- Calculate expanded master patch
|
||||
void calcExpandedMaster() const;
|
||||
|
||||
//- Calculate expanded slave patch
|
||||
void calcExpandedSlave() const;
|
||||
|
||||
//- Return reference to expanded master patch
|
||||
const standAlonePatch& expandedMaster() const;
|
||||
|
||||
//- Return reference to expanded slave patch
|
||||
const standAlonePatch& expandedSlave() const;
|
||||
|
||||
//- Calculate interpolation
|
||||
void calcPatchToPatch() const;
|
||||
|
||||
//- Return reference to patch-to-patch interpolation
|
||||
const overlapGgiInterpolation& patchToPatch() const;
|
||||
|
||||
//- Calculate reconstructed cell centres
|
||||
void calcReconFaceCellCentres() const;
|
||||
|
||||
|
@ -118,10 +132,6 @@ class overlapGgiPolyPatch
|
|||
//- Check definition: angles and offsets
|
||||
void checkDefinition() const;
|
||||
|
||||
//- Expand slave face field to full coverage
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expandSlaveData(const Field<Type>& spf) const;
|
||||
|
||||
//- Clear out
|
||||
void clearOut();
|
||||
|
||||
|
@ -177,7 +187,7 @@ public:
|
|||
const polyBoundaryMesh& bm,
|
||||
const word& shadowName,
|
||||
const vector& axis,
|
||||
const scalar angle
|
||||
const scalar n
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
|
@ -263,9 +273,9 @@ public:
|
|||
}
|
||||
|
||||
//- Return wedge angle
|
||||
const scalar& angle() const
|
||||
scalar angle() const
|
||||
{
|
||||
return angle_;
|
||||
return 360.0/nCopies();
|
||||
}
|
||||
|
||||
//- Return number of slave copies
|
||||
|
@ -280,6 +290,14 @@ public:
|
|||
return !master();
|
||||
}
|
||||
|
||||
//- Expand master face field to full for 360 degrees coverage
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expandMasterData(const Field<Type>& spf) const;
|
||||
|
||||
//- Expand slave face field to full for 360 degrees coverage
|
||||
template<class Type>
|
||||
tmp<Field<Type> > expandSlaveData(const Field<Type>& spf) const;
|
||||
|
||||
//- Interpolate face field: given field on a the shadow side,
|
||||
// create an interpolated field on this side
|
||||
template<class Type>
|
||||
|
|
|
@ -24,11 +24,14 @@ License
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "overlapGgiPolyPatch.H"
|
||||
#include "polyMesh.H"
|
||||
#include "polyPatch.H"
|
||||
#include "primitiveMesh.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "polyPatchID.H"
|
||||
#include "OFstream.H"
|
||||
|
@ -36,6 +39,104 @@ Author
|
|||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::overlapGgiPolyPatch::calcExpandedMaster() const
|
||||
{
|
||||
// Create expanded master patch interpolation
|
||||
if (expandedMasterPtr_)
|
||||
{
|
||||
FatalErrorIn("void overlapGgiPolyPatch::calcExpandedMaster() const")
|
||||
<< "Expanded master already calculated"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
if (master())
|
||||
{
|
||||
// Create expanded master patch
|
||||
const label ncpm = nCopies();
|
||||
|
||||
// Create expanded master points and faces
|
||||
const polyPatch& master = boundaryMesh()[index()];
|
||||
const pointField& masterLocalPoints = master.localPoints();
|
||||
|
||||
pointField MasterExpandedPoints(ncpm*masterLocalPoints.size());
|
||||
|
||||
const scalar masterAngle = angle();
|
||||
|
||||
// Transform points
|
||||
label nPoints_master = 0;
|
||||
|
||||
for (label copyI = 0; copyI < ncpm; copyI++)
|
||||
{
|
||||
// Calculate transform
|
||||
const tensor curRotation =
|
||||
RodriguesRotation(rotationAxis_, copyI*(masterAngle));
|
||||
|
||||
forAll (masterLocalPoints, pointI)
|
||||
{
|
||||
MasterExpandedPoints[nPoints_master] =
|
||||
transform(curRotation, masterLocalPoints[pointI]);
|
||||
nPoints_master++;
|
||||
}
|
||||
}
|
||||
|
||||
// Transform faces
|
||||
const faceList& masterLocalFaces = master.localFaces();
|
||||
faceList MasterExpandedFaces(ncpm*masterLocalFaces.size());
|
||||
|
||||
label nFacesMaster = 0;
|
||||
|
||||
for (label copyI = 0; copyI < ncpm; copyI++)
|
||||
{
|
||||
const label copyOffsetMaster = copyI*masterLocalPoints.size();
|
||||
|
||||
forAll (masterLocalFaces, faceI)
|
||||
{
|
||||
const face& curMasterFace = masterLocalFaces[faceI];
|
||||
|
||||
face& MastercurExpandedFace =
|
||||
MasterExpandedFaces[nFacesMaster];
|
||||
|
||||
// Copy face with offsets
|
||||
MastercurExpandedFace.setSize(curMasterFace.size());
|
||||
|
||||
forAll (curMasterFace, fpI)
|
||||
{
|
||||
MastercurExpandedFace[fpI] =
|
||||
curMasterFace[fpI] + copyOffsetMaster;
|
||||
}
|
||||
|
||||
nFacesMaster++;
|
||||
}
|
||||
}
|
||||
|
||||
expandedMasterPtr_ =
|
||||
new standAlonePatch(MasterExpandedFaces, MasterExpandedPoints);
|
||||
|
||||
if (debug > 1)
|
||||
{
|
||||
Info << "Writing expanded master patch as VTK" << endl;
|
||||
|
||||
const polyMesh& mesh = boundaryMesh().mesh();
|
||||
|
||||
fileName fvPath(mesh.time().path()/"VTK");
|
||||
mkDir(fvPath);
|
||||
|
||||
standAlonePatch::writeVTK
|
||||
(
|
||||
fvPath/fileName("expandedMaster" + name() + shadow().name()),
|
||||
MasterExpandedFaces,
|
||||
MasterExpandedPoints
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("void overlapGgiPolyPatch::calcExpandedMaster() const")
|
||||
<< "Attempting to create expanded master on a shadow"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
void Foam::overlapGgiPolyPatch::calcExpandedSlave() const
|
||||
{
|
||||
// Create expanded slave patch interpolation
|
||||
|
@ -49,9 +150,7 @@ void Foam::overlapGgiPolyPatch::calcExpandedSlave() const
|
|||
if (master())
|
||||
{
|
||||
// Create expanded patch
|
||||
const label ncp = nCopies();
|
||||
|
||||
Info << "Number of slave copies: " << ncp << endl;
|
||||
const label ncp = shadow().nCopies();
|
||||
|
||||
// Create expanded points and faces
|
||||
const polyPatch& slave = boundaryMesh()[shadowIndex()];
|
||||
|
@ -135,11 +234,18 @@ void Foam::overlapGgiPolyPatch::calcExpandedSlave() const
|
|||
}
|
||||
|
||||
|
||||
const Foam::standAlonePatch& Foam::overlapGgiPolyPatch::expandedMaster() const
|
||||
{
|
||||
if (!expandedMasterPtr_)
|
||||
{
|
||||
calcExpandedMaster();
|
||||
}
|
||||
|
||||
return *expandedMasterPtr_;
|
||||
}
|
||||
|
||||
const Foam::standAlonePatch& Foam::overlapGgiPolyPatch::expandedSlave() const
|
||||
{
|
||||
// Note: expanded slave only exists for the master side.
|
||||
// Slave patch will use master for interpolation.
|
||||
// HJ, 14/Jan/2009
|
||||
if (!expandedSlavePtr_)
|
||||
{
|
||||
calcExpandedSlave();
|
||||
|
@ -151,7 +257,8 @@ const Foam::standAlonePatch& Foam::overlapGgiPolyPatch::expandedSlave() const
|
|||
|
||||
void Foam::overlapGgiPolyPatch::calcPatchToPatch() const
|
||||
{
|
||||
// Create patch-to-patch interpolation
|
||||
// Create patch-to-patch interpolation between the expanded master
|
||||
// and slave patches
|
||||
if (patchToPatchPtr_)
|
||||
{
|
||||
FatalErrorIn("void overlapGgiPolyPatch::calcPatchToPatch() const")
|
||||
|
@ -164,7 +271,7 @@ void Foam::overlapGgiPolyPatch::calcPatchToPatch() const
|
|||
patchToPatchPtr_ =
|
||||
new overlapGgiInterpolation
|
||||
(
|
||||
*this,
|
||||
expandedMaster(),
|
||||
expandedSlave(),
|
||||
forwardT(),
|
||||
reverseT(),
|
||||
|
@ -214,8 +321,6 @@ void Foam::overlapGgiPolyPatch::calcReconFaceCellCentres() const
|
|||
// Create neighbouring face centres using interpolation
|
||||
if (master())
|
||||
{
|
||||
vectorField alpha(shadow().size(), vector(0, 0, 1));
|
||||
|
||||
const label shadowID = shadowIndex();
|
||||
|
||||
// Get the transformed and interpolated shadow face cell centers
|
||||
|
@ -265,6 +370,7 @@ void Foam::overlapGgiPolyPatch::checkDefinition() const
|
|||
|
||||
void Foam::overlapGgiPolyPatch::clearOut()
|
||||
{
|
||||
deleteDemandDrivenData(expandedMasterPtr_);
|
||||
deleteDemandDrivenData(expandedSlavePtr_);
|
||||
deleteDemandDrivenData(patchToPatchPtr_);
|
||||
deleteDemandDrivenData(reconFaceCellCentresPtr_);
|
||||
|
|
|
@ -24,6 +24,7 @@ License
|
|||
|
||||
Author
|
||||
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||
Fethi Tekin, All rights reserved. fethitekin@gmail.com
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -36,22 +37,12 @@ template<class Type>
|
|||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::overlapGgiPolyPatch::expandSlaveData(const Field<Type>& spf) const
|
||||
{
|
||||
if (spf.size() != shadow().size())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"tmp<Field<Type> > overlapGgiPolyPatch::interpolate"
|
||||
"(const Field<Type>& spf) const"
|
||||
) << " Incorrect field size for expansion. Field size: "
|
||||
<< spf.size() << " patch size: " << shadow().size()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
const scalar slaveAngle = shadow().angle();
|
||||
|
||||
const label ncp = nCopies();
|
||||
const label ncp = shadow().nCopies();
|
||||
|
||||
tmp<Field<Type> > tef(new Field<Type>(ncp*spf.size()));
|
||||
|
||||
Field<Type>& ef = tef();
|
||||
|
||||
label nFaces = 0;
|
||||
|
@ -73,6 +64,35 @@ Foam::overlapGgiPolyPatch::expandSlaveData(const Field<Type>& spf) const
|
|||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::Field<Type> >
|
||||
Foam::overlapGgiPolyPatch::expandMasterData(const Field<Type>& spf) const
|
||||
{
|
||||
const scalar masterAngle = shadow().angle();
|
||||
|
||||
const label ncpm = shadow().nCopies();
|
||||
|
||||
tmp<Field<Type> > tef(new Field<Type>(ncpm*spf.size()));
|
||||
|
||||
Field<Type>& ef = tef();
|
||||
|
||||
label nFaces = 0;
|
||||
|
||||
for (label copyI = 0; copyI < ncpm; copyI++)
|
||||
{
|
||||
// Calculate transform
|
||||
const tensor curRotation =
|
||||
RodriguesRotation(rotationAxis_, copyI*(masterAngle));
|
||||
|
||||
forAll (spf, faceI)
|
||||
{
|
||||
ef[nFaces] = transform(curRotation, spf[faceI]);
|
||||
nFaces++;
|
||||
}
|
||||
}
|
||||
|
||||
return tef;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
|
@ -82,13 +102,20 @@ Foam::overlapGgiPolyPatch::interpolate(const Field<Type>& pf) const
|
|||
if (master())
|
||||
{
|
||||
// Expand slave data
|
||||
tmp<Field<Type> > expand = expandSlaveData(pf);
|
||||
tmp<Field<Type> > expandslave = expandSlaveData(pf);
|
||||
|
||||
return patchToPatch().slaveToMaster(expand);
|
||||
tmp<Field<Type> > tresult= patchToPatch().slaveToMaster(expandslave);
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(pf);
|
||||
// Expand master data
|
||||
tmp<Field<Type> > expandmaster = expandMasterData(pf);
|
||||
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(expandmaster);
|
||||
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
@ -107,11 +134,19 @@ Foam::overlapGgiPolyPatch::interpolate(const tmp<Field<Type> >& tpf) const
|
|||
// Expand slave data
|
||||
tmp<Field<Type> > expand = expandSlaveData(tpf());
|
||||
|
||||
return patchToPatch().slaveToMaster(expand);
|
||||
tmp<Field<Type> > tresult = patchToPatch().slaveToMaster(expand);
|
||||
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
||||
return tresult;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(tpf);
|
||||
// Expand master data
|
||||
tmp<Field<Type> > expandmaster = expandMasterData(tpf());
|
||||
|
||||
tmp<Field<Type> > tresult = patchToPatch().masterToSlave(expandmaster);
|
||||
|
||||
// Truncate to size
|
||||
tresult().setSize(size());
|
||||
|
@ -120,5 +155,4 @@ Foam::overlapGgiPolyPatch::interpolate(const tmp<Field<Type> >& tpf) const
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -228,6 +228,7 @@ public:
|
|||
|
||||
// Declare run-time constructor selection tables
|
||||
|
||||
#ifndef SWIG
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
|
@ -256,6 +257,7 @@ public:
|
|||
),
|
||||
(name, dict, index, bm)
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
// Constructors
|
||||
|
|
|
@ -48,11 +48,12 @@ namespace Foam
|
|||
|
||||
typedef SphericalTensor<scalar> sphericalTensor;
|
||||
|
||||
// Identity tensor
|
||||
static const sphericalTensor I(1);
|
||||
|
||||
static const sphericalTensor oneThirdI(1.0/3.0);
|
||||
static const sphericalTensor twoThirdsI(2.0/3.0);
|
||||
// Identity tensor
|
||||
static const sphericalTensor I;
|
||||
|
||||
static const sphericalTensor oneThirdI;
|
||||
static const sphericalTensor twoThirdsI;
|
||||
|
||||
|
||||
//- Specify data associated with sphericalTensor type are contiguous
|
||||
|
|
|
@ -136,6 +136,7 @@ public:
|
|||
|
||||
// IOstream Operators
|
||||
|
||||
#ifndef SWIG
|
||||
friend Istream& operator>> <Form, Cmpt, nCmpt>
|
||||
(
|
||||
Istream&,
|
||||
|
@ -147,6 +148,7 @@ public:
|
|||
Ostream&,
|
||||
const VectorSpace<Form, Cmpt, nCmpt>&
|
||||
);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -48,6 +48,20 @@ public:
|
|||
vs.v_[I] = o(vs1.v_[I], vs2.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::op(vs, vs1, vs2, o);
|
||||
}
|
||||
|
||||
template<class V, class V1, class V2, class Op>
|
||||
static inline void opVV(V& vs, const V1& vs1, const V2& vs2, Op o)
|
||||
{
|
||||
vs.v_[I] = o(vs1.v_[I], vs2.v_[I]);
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::opVV(vs, vs1, vs2, o);
|
||||
}
|
||||
|
||||
template<class S, class V1, class V2, class EqOp, class Op>
|
||||
static inline void SopEqOpVV(S& s, const V1& vs1, const V2& vs2, EqOp eo, Op o)
|
||||
{
|
||||
eo(s, o(vs1.v_[I], vs2.v_[I]));
|
||||
VectorSpaceOps<endLoop*N, endLoop*(I+1)>::SopEqOpVV(s, vs1, vs2, eo, o);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -80,4 +94,13 @@ public:
|
|||
template<class V, class V1, class Op>
|
||||
static inline void op(V& vs, const V1&, const V1&, Op)
|
||||
{}
|
||||
|
||||
template<class V, class V1, class V2, class Op>
|
||||
static inline void opVV(V& vs, const V1& vs1, const V2& vs2, Op o)
|
||||
{}
|
||||
|
||||
template<class S, class V1, class V2, class EqOp, class Op>
|
||||
static inline void SopEqOpVV(S& s, const V1& vs1, const V2& vs2, EqOp eo, Op o)
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,11 @@ Description
|
|||
combined using the given combination function and the result is
|
||||
broadcast to all nodes
|
||||
|
||||
Note:
|
||||
Format of this file has considerably changed to remove cpp pre-processor
|
||||
definition in order to help Swig with parsing in. Implemented by
|
||||
Alexey Petrov; merged by HJ, 14/Oct/2010
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ops_H
|
||||
|
@ -42,103 +47,272 @@ Description
|
|||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
template<class T1, class T2>
|
||||
class eqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = y; } };
|
||||
|
||||
#define EqOp(opName, op) \
|
||||
\
|
||||
template<class T1, class T2> \
|
||||
class opName##Op2 \
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
void operator()(T1& x, const T2& y) const \
|
||||
{ \
|
||||
op; \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
template<class T> \
|
||||
class opName##Op \
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
void operator()(T& x, const T& y) const \
|
||||
{ \
|
||||
op; \
|
||||
} \
|
||||
};
|
||||
template<class T>
|
||||
class eqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = y; } };
|
||||
|
||||
EqOp(eq, x = y)
|
||||
EqOp(plusEq, x += y)
|
||||
EqOp(minusEq, x -= y)
|
||||
EqOp(multiplyEq, x *= y)
|
||||
EqOp(divideEq, x /= y)
|
||||
EqOp(eqMag, x = mag(y))
|
||||
EqOp(plusEqMagSqr, x += magSqr(y))
|
||||
EqOp(maxEq, x = max(x, y))
|
||||
EqOp(minEq, x = min(x, y))
|
||||
EqOp(andEq, x = (x && y))
|
||||
EqOp(orEq, x = (x || y))
|
||||
template<class T1, class T2>
|
||||
class plusEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x += y; } };
|
||||
|
||||
EqOp(eqMinus, x = -y)
|
||||
template<class T>
|
||||
class plusEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x += y; } };
|
||||
|
||||
#undef EqOp
|
||||
template<class T1, class T2>
|
||||
class minusEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x -= y; } };
|
||||
|
||||
template<class T>
|
||||
class minusEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x -= y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class multiplyEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x *= y; } };
|
||||
|
||||
template<class T>
|
||||
class multiplyEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x *= y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class divideEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x /= y; } };
|
||||
|
||||
template<class T>
|
||||
class divideEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x /= y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class eqMagOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = mag(y); } };
|
||||
|
||||
template<class T>
|
||||
class eqMagOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = mag(y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class plusEqMagSqrOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x += magSqr(y); } };
|
||||
|
||||
template<class T>
|
||||
class plusEqMagSqrOp
|
||||
{ public: void operator()(T& x, const T& y) const { x += magSqr(y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class maxEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = max(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class maxEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = max(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class minEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = min(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class minEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = min(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class andEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = (x && y); } };
|
||||
|
||||
template<class T>
|
||||
class andEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = (x && y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class orEqOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = (x || y); } };
|
||||
|
||||
template<class T>
|
||||
class orEqOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = (x || y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class eqMinusOp2
|
||||
{ public: void operator()(T1& x, const T2& y) const { x = -y; } };
|
||||
|
||||
template<class T>
|
||||
class eqMinusOp
|
||||
{ public: void operator()(T& x, const T& y) const { x = -y; } };
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define Op(opName, op) \
|
||||
\
|
||||
template<class T, class T1, class T2> \
|
||||
class opName##Op3 \
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
T operator()(const T1& x, const T2& y) const \
|
||||
{ \
|
||||
return op; \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
template<class T1, class T2> \
|
||||
class opName##Op2 \
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
T1 operator()(const T1& x, const T2& y) const \
|
||||
{ \
|
||||
return op; \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
template<class T> \
|
||||
class opName##Op \
|
||||
{ \
|
||||
public: \
|
||||
\
|
||||
T operator()(const T& x, const T& y) const \
|
||||
{ \
|
||||
return op; \
|
||||
} \
|
||||
};
|
||||
template<class T, class T1, class T2>
|
||||
class sumOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x + y; } };
|
||||
|
||||
Op(sum, x + y)
|
||||
template<class T1, class T2>
|
||||
class sumOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x + y; } };
|
||||
|
||||
Op(plus, x + y)
|
||||
Op(minus, x - y)
|
||||
Op(multiply, x * y)
|
||||
Op(divide, x / y)
|
||||
Op(cmptMultiply, cmptMultiply(x, y))
|
||||
Op(cmptDivide, cmptDivide(x, y))
|
||||
Op(stabilise, stabilise(x, y))
|
||||
Op(max, max(x, y))
|
||||
Op(min, min(x, y))
|
||||
Op(minMod, minMod(x, y))
|
||||
Op(and, x && y)
|
||||
Op(or, x || y)
|
||||
Op(eqEq, x == y)
|
||||
template<class T>
|
||||
class sumOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x + y; } };
|
||||
|
||||
#undef Op
|
||||
template<class T, class T1, class T2>
|
||||
class plusOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x + y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class plusOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x + y; } };
|
||||
|
||||
template<class T>
|
||||
class plusOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x + y; } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class minusOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x - y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class minusOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x - y; } };
|
||||
|
||||
template<class T>
|
||||
class minusOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x - y; } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class multiplyOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x * y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class multiplyOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x * y; } };
|
||||
|
||||
template<class T>
|
||||
class multiplyOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x * y; } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class divideOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x / y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class divideOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x / y; } };
|
||||
|
||||
template<class T>
|
||||
class divideOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x / y; } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class cmptMultiplyOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return cmptMultiply(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class cmptMultiplyOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return cmptMultiply(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class cmptMultiplyOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return cmptMultiply(x, y); } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class cmptDivideOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return cmptDivide(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class cmptDivideOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return cmptDivide(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class cmptDivideOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return cmptDivide(x, y); } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class stabiliseOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return stabilise(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class stabiliseOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return stabilise(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class stabiliseOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return stabilise(x, y); } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class maxOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return max(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class maxOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return max(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class maxOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return max(x, y); } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class minOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return min(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class minOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return min(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class minOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return min(x, y); } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class minModOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return minMod(x, y); } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class minModOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return minMod(x, y); } };
|
||||
|
||||
template<class T>
|
||||
class minModOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return minMod(x, y); } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class andOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x && y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class andOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x && y; } };
|
||||
|
||||
template<class T>
|
||||
class andOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x && y; } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class orOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x || y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class orOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x || y; } };
|
||||
|
||||
template<class T>
|
||||
class orOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x || y; } };
|
||||
|
||||
template<class T, class T1, class T2>
|
||||
class eqEqOp3
|
||||
{ public: T operator()(const T1& x, const T2& y) const { return x == y; } };
|
||||
|
||||
template<class T1, class T2>
|
||||
class eqEqOp2
|
||||
{ public: T1 operator()(const T1& x, const T2& y) const { return x == y; } };
|
||||
|
||||
template<class T>
|
||||
class eqEqOp
|
||||
{ public: T operator()(const T& x, const T& y) const { return x == y; } };
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
|
@ -74,7 +74,7 @@ Foam::coupledBicgSolver::coupledBicgSolver
|
|||
bouCoeffs,
|
||||
intCoeffs,
|
||||
interfaces,
|
||||
dict().subDict("preconditioner")
|
||||
dict()
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
|
|
@ -76,7 +76,7 @@ Foam::coupledBicgStabSolver::coupledBicgStabSolver
|
|||
bouCoeffs,
|
||||
intCoeffs,
|
||||
interfaces,
|
||||
dict().subDict("preconditioner")
|
||||
dict()
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
|
|
@ -74,7 +74,7 @@ Foam::coupledCgSolver::coupledCgSolver
|
|||
bouCoeffs,
|
||||
intCoeffs,
|
||||
interfaces,
|
||||
dict().subDict("preconditioner")
|
||||
dict()
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
EXE_INC = \
|
||||
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
|
||||
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/src/libscotch/lnInclude \
|
||||
-I$(WM_THIRD_PARTY_DIR)/scotch_5.1/include \
|
||||
-I/usr/include/scotch \
|
||||
|
|
|
@ -18,6 +18,7 @@ $(solidBodyMotionFunctions)/SKA/SKA.C
|
|||
$(solidBodyMotionFunctions)/translation/translation.C
|
||||
|
||||
mixerGgiFvMesh/mixerGgiFvMesh.C
|
||||
turboFvMesh/turboFvMesh.C
|
||||
|
||||
tetMetrics/tetMetric.C
|
||||
tetMetrics/tetMetrics.C
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~dynamicBodyFvMesh();
|
||||
virtual ~dynamicBodyFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~dynamicBoxFvMesh();
|
||||
virtual ~dynamicBoxFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -71,6 +71,7 @@ public:
|
|||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
#ifndef SWIG
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
|
@ -79,6 +80,7 @@ public:
|
|||
(const IOobject& io),
|
||||
(io)
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
// Constructors
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~dynamicInkJetFvMesh();
|
||||
virtual ~dynamicInkJetFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~dynamicMotionSolverFvMesh();
|
||||
virtual ~dynamicMotionSolverFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -107,7 +107,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~movingBoxFvMesh();
|
||||
virtual ~movingBoxFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~solidBodyMotionFvMesh();
|
||||
virtual ~solidBodyMotionFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
|
||||
// Destructor
|
||||
|
||||
~subsetMotionSolverFvMesh();
|
||||
virtual ~subsetMotionSolverFvMesh();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.4 |
|
||||
| \\ / O peration | Version: 1.5.dev |
|
||||
| \\ / A nd | Web: http://www.openfoam.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
@ -10,55 +10,34 @@ FoamFile
|
|||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
|
||||
root "";
|
||||
case "";
|
||||
instance "";
|
||||
local "";
|
||||
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMeshLib "libtopoChangerFvMesh.so";
|
||||
dynamicFvMesh turboFvMesh;
|
||||
|
||||
numberOfSubdomains 2;
|
||||
|
||||
method metis;
|
||||
|
||||
simpleCoeffs
|
||||
turboFvMeshCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
coordinateSystem
|
||||
{
|
||||
type cylindrical;
|
||||
origin (0 0 0);
|
||||
axis (0 0 1);
|
||||
direction (1 0 0);
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
rpm
|
||||
{
|
||||
n (1 1 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
Rotor1 60;
|
||||
Rotor2 -30;
|
||||
Stator 0;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
processorWeights
|
||||
(
|
||||
2
|
||||
2
|
||||
);
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue