mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
3
applications/test/fieldDependency/Make/files
Normal file
3
applications/test/fieldDependency/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
fieldDependency.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/fieldDependency
|
||||
5
applications/test/fieldDependency/Make/options
Normal file
5
applications/test/fieldDependency/Make/options
Normal file
@ -0,0 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume
|
||||
102
applications/test/fieldDependency/fieldDependency.C
Normal file
102
applications/test/fieldDependency/fieldDependency.C
Normal file
@ -0,0 +1,102 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 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
|
||||
|
||||
Description
|
||||
Test field dependencies.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "Time.H"
|
||||
#include "volFields.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
Info<< "Creating field T\n" << endl;
|
||||
volScalarField T
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"T",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimless, 0)
|
||||
);
|
||||
|
||||
|
||||
Info<< "p.eventNo:" << p.eventNo() << endl;
|
||||
Info<< "p.uptodate:" << p.upToDate("T")<< endl;
|
||||
|
||||
// Change T and mark as uptodate.
|
||||
Info<< "Changing T" << endl;
|
||||
T = 0.0;
|
||||
T.setUpToDate();
|
||||
Info<< "T.eventNo:" << T.eventNo() << endl;
|
||||
|
||||
// Check p dependency:
|
||||
Info<< "p.uptodate:" << p.upToDate("T")<< endl;
|
||||
|
||||
// Change p and mark as uptodate.
|
||||
Info<< "Changing p." << endl;
|
||||
p.setUpToDate();
|
||||
Info<< "p.uptodate:" << p.upToDate("T")<< endl;
|
||||
Info<< "p.eventNo:" << p.eventNo() << endl;
|
||||
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -445,12 +445,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||
|
||||
scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
|
||||
scalar concaveAngle = defaultConcaveAngle;
|
||||
args.optionReadIfPresent("concaveAngle", concaveAngle);
|
||||
|
||||
scalar concaveSin = Foam::sin(concaveAngle*constant::mathematical::pi/180.0);
|
||||
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
|
||||
|
||||
bool snapMeshDict = args.optionFound("snapMesh");
|
||||
bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
@ -539,9 +539,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||
|
||||
scalar radAngle = featureAngle*constant::mathematical::pi/180.0;
|
||||
scalar minCos = Foam::cos(radAngle);
|
||||
scalar minSin = Foam::sin(radAngle);
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
scalar minSin = Foam::sin(degToRad(featureAngle));
|
||||
|
||||
bool readSet = args.optionFound("set");
|
||||
bool geometry = args.optionFound("geometry");
|
||||
|
||||
@ -434,7 +434,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
|
||||
{
|
||||
// Distribute the points to be +/- 2.5deg from the x-z plane
|
||||
|
||||
scalar tanTheta = Foam::tan(2.5*constant::mathematical::pi/180.0);
|
||||
scalar tanTheta = Foam::tan(degToRad(2.5));
|
||||
|
||||
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
|
||||
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
|
||||
|
||||
@ -91,7 +91,7 @@ void simpleMarkFeatures
|
||||
labelList& multiCellFeaturePoints
|
||||
)
|
||||
{
|
||||
scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
@ -387,7 +387,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||
|
||||
scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
|
||||
Info<< "Feature:" << featureAngle << endl
|
||||
<< "minCos :" << minCos << endl
|
||||
|
||||
@ -99,7 +99,7 @@ void starMesh::createCoupleMatches()
|
||||
<< coupleI << ". STAR couple ID: "
|
||||
<< couples_[coupleI].coupleID() << endl
|
||||
<< "The angle between face normals is "
|
||||
<< Foam::acos(faceAreaAngle)/constant::mathematical::pi*180
|
||||
<< radToDeg(Foam::acos(faceAreaAngle))
|
||||
<< " deg." << endl
|
||||
<< "master cell: " << fp.masterCell()
|
||||
<< " STAR number: " << starCellID_[fp.masterCell()]
|
||||
|
||||
@ -51,8 +51,7 @@ wedge::wedge(const dictionary& dict)
|
||||
axis_(coeffDict_.lookup("axis")),
|
||||
angle_
|
||||
(
|
||||
readScalar(coeffDict_.lookup("angle"))
|
||||
*constant::mathematical::pi/180.0
|
||||
degToRad(readScalar(coeffDict_.lookup("angle")))
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
||||
bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
scalar minCos = Foam::cos(featureAngle*constant::mathematical::pi/180.0);
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
|
||||
Info<< "Feature:" << featureAngle << endl
|
||||
<< "minCos :" << minCos << endl
|
||||
|
||||
Reference in New Issue
Block a user