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
Conflicts: applications/utilities/mesh/manipulation/transformPoints/transformPoints.C
This commit is contained in:
@ -38,11 +38,9 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
argList::validOptions.insert("writep", "");
|
||||
argList::addBoolOption("writep", "write the final pressure field");
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
volScalarField GEta = GEtaCoef/tauEta;
|
||||
volScalarField XiEqEta = 1.0 + XiCoef*sqrt(up/(Su + SuMin))*Reta;
|
||||
|
||||
volScalarField R =
|
||||
volScalarField R =
|
||||
GEta*XiEqEta/(XiEqEta - 0.999) + GIn*XiIn/(XiIn - 0.999);
|
||||
|
||||
volScalarField XiEqStar = R/(R - GEta - GIn);
|
||||
@ -42,7 +42,7 @@
|
||||
volScalarField GEta = GEtaCoef/tauEta;
|
||||
volScalarField XiEqEta = 1.0 + XiCoef*sqrt(up/(Su + SuMin))*Reta;
|
||||
|
||||
volScalarField R =
|
||||
volScalarField R =
|
||||
GEta*XiEqEta/(XiEqEta - 0.999) + GIn*XiIn/(XiIn - 0.999);
|
||||
|
||||
volScalarField XiEqStar = R/(R - GEta - GIn);
|
||||
|
||||
@ -91,7 +91,7 @@ bool Foam::XiModels::algebraic::read(const dictionary& XiProperties)
|
||||
XiModel::read(XiProperties);
|
||||
|
||||
XiModelCoeffs_.lookup("XiShapeCoef") >> XiShapeCoef;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::polyPhi
|
||||
{
|
||||
scalar x = phi - 1.0;
|
||||
|
||||
return
|
||||
return
|
||||
a[0]
|
||||
*(
|
||||
scalar(1)
|
||||
|
||||
@ -45,7 +45,7 @@ if (adjustTimeStep)
|
||||
maxDeltaT
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ volScalarField DpDt =
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ volScalarField DpDt =
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ volScalarField DpDt =
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake libso BCs
|
||||
wmake libso BCs
|
||||
wmake
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -6,5 +6,5 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lbasicThermophysicalModels \
|
||||
-lspecie
|
||||
-lspecie
|
||||
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "maxwellSlipUFvPatchVectorField.H"
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "mixedFixedValueSlipFvPatchFields.H"
|
||||
|
||||
@ -84,7 +84,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
fvm::ddt(rhoU)
|
||||
+ fvm::div(phiv, rhoU)
|
||||
==
|
||||
==
|
||||
- fvc::grad(p)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake libso BCs
|
||||
wmake libso BCs
|
||||
wmake
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -131,7 +131,7 @@ void inviscidWallPFvPatchScalarField::updateCoeffs()
|
||||
const fvPatchField<vector>& rhoUp =
|
||||
patch().lookupPatchField<volVectorField, vector>("rhoU");
|
||||
|
||||
const fvsPatchField<scalar>& phip =
|
||||
const fvsPatchField<scalar>& phip =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("phi");
|
||||
|
||||
const fvsPatchField<scalar>& rAp =
|
||||
@ -147,7 +147,7 @@ void inviscidWallPFvPatchScalarField::updateCoeffs()
|
||||
void inviscidWallPFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fixedGradientFvPatchScalarField::write(os);
|
||||
os.writeKeyword("fluxFraction")
|
||||
os.writeKeyword("fluxFraction")
|
||||
<< fluxFraction_ << token::END_STATEMENT << nl;
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ void mixedRhoEFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const volScalarField& T = db().lookupObject<volScalarField>("T");
|
||||
const label patchi = patch().index();
|
||||
fvPatchScalarField& Tp =
|
||||
fvPatchScalarField& Tp =
|
||||
const_cast<fvPatchScalarField&>(T.boundaryField()[patchi]);
|
||||
|
||||
Tp.evaluate();
|
||||
@ -164,7 +164,7 @@ void mixedRhoEFvPatchScalarField::updateCoeffs()
|
||||
refGrad() =
|
||||
rhop*Cv.value()*Tp.snGrad()
|
||||
+ (
|
||||
refValue()
|
||||
refValue()
|
||||
- (0.5*rhop.patchInternalField()*
|
||||
magSqr(rhoUp.patchInternalField()/rhop.patchInternalField()))
|
||||
)*patch().deltaCoeffs();
|
||||
|
||||
@ -66,7 +66,7 @@ public:
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given fixedRhoUFvPatchVectorField
|
||||
//- Construct by mapping given fixedRhoUFvPatchVectorField
|
||||
// onto a new patch
|
||||
fixedRhoUFvPatchVectorField
|
||||
(
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
electrostaticFoam.C
|
||||
electrostaticFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/electrostaticFoam
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
icoFoam.C
|
||||
icoFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/icoFoam
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
nonNewtonianIcoFoam.C
|
||||
nonNewtonianIcoFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/nonNewtonianIcoFoam
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
simpleFoam.C
|
||||
simpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/simpleFoam
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
||||
@ -47,8 +47,10 @@
|
||||
)
|
||||
);
|
||||
|
||||
word kinematicCloudName("kinematicCloud");
|
||||
args.optionReadIfPresent("cloudName", kinematicCloudName);
|
||||
const word kinematicCloudName
|
||||
(
|
||||
args.optionLookupOrDefault<word>("cloudName", "kinematicCloud")
|
||||
);
|
||||
|
||||
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
|
||||
basicKinematicCloud kinematicCloud
|
||||
|
||||
@ -42,7 +42,7 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("cloudName", "cloud name");
|
||||
argList::addOption("cloudName", "cloud name");
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
@ -41,7 +41,7 @@ fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);
|
||||
- fvc::interpolate(nuEffb)
|
||||
*mesh.magSf()*fvc::snGrad(beta)/fvc::interpolate(beta + scalar(0.001));
|
||||
|
||||
UbEqn =
|
||||
UbEqn =
|
||||
(
|
||||
(scalar(1) + Cvm*rhob*alpha/rhob)*
|
||||
(
|
||||
|
||||
@ -36,7 +36,7 @@ scalar acousticCoNum = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
surfaceScalarField SfUfbyDelta =
|
||||
mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv);
|
||||
|
||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
|
||||
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
|
||||
|
||||
scalar sumLocalContErr =
|
||||
scalar sumLocalContErr =
|
||||
(
|
||||
fvc::domainIntegrate(mag(rho - thermoRho))/totalMass
|
||||
).value();
|
||||
|
||||
scalar globalContErr =
|
||||
scalar globalContErr =
|
||||
(
|
||||
fvc::domainIntegrate(rho - thermoRho)/totalMass
|
||||
).value();
|
||||
|
||||
@ -47,7 +47,7 @@ if (adjustTimeStep)
|
||||
maxDeltaT
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Info<< "deltaT = " << runTime.deltaTValue() << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ Ostream& operator<<
|
||||
)
|
||||
{
|
||||
os << tp.theta0_ << token::SPACE
|
||||
<< tp.uTheta_ << token::SPACE
|
||||
<< tp.uTheta_ << token::SPACE
|
||||
<< tp.thetaA_ << token::SPACE
|
||||
<< tp.thetaR_;
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::phase::phase
|
||||
Foam::phase::phase
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& phaseDict,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
mul = muc +
|
||||
mul = muc +
|
||||
plasticViscosity
|
||||
(
|
||||
plasticViscosityCoeff,
|
||||
|
||||
@ -56,7 +56,7 @@ fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);
|
||||
-fvc::interpolate(nuEffb)*mesh.magSf()*fvc::snGrad(beta)
|
||||
/fvc::interpolate(beta + scalar(0.001));
|
||||
|
||||
UbEqn =
|
||||
UbEqn =
|
||||
(
|
||||
(scalar(1) + Cvm*rhob*alpha/rhob)*
|
||||
(
|
||||
|
||||
@ -89,7 +89,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
|
||||
volScalarField& KWenYu = tKWenYu();
|
||||
|
||||
// Ergun
|
||||
forAll (beta, cellj)
|
||||
forAll(beta, cellj)
|
||||
{
|
||||
if (beta[cellj] <= 0.8)
|
||||
{
|
||||
|
||||
@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::SyamlalOBrien::K
|
||||
volScalarField A = pow(beta, 4.14);
|
||||
volScalarField B = 0.8*pow(beta, 1.28);
|
||||
|
||||
forAll (beta, celli)
|
||||
forAll(beta, celli)
|
||||
{
|
||||
if (beta[celli] > 0.85)
|
||||
{
|
||||
|
||||
@ -35,9 +35,9 @@ Foam::autoPtr<Foam::conductivityModel> Foam::conductivityModel::New
|
||||
{
|
||||
word conductivityModelType(dict.lookup("conductivityModel"));
|
||||
|
||||
Info<< "Selecting conductivityModel "
|
||||
Info<< "Selecting conductivityModel "
|
||||
<< conductivityModelType << endl;
|
||||
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(conductivityModelType);
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ frictionalPressure
|
||||
) const
|
||||
{
|
||||
|
||||
return
|
||||
return
|
||||
Fr*pow(max(alpha - alphaMinFriction, scalar(0)), eta)
|
||||
/pow(max(alphaMax - alpha, scalar(5.0e-2)), p);
|
||||
}
|
||||
@ -104,9 +104,9 @@ Foam::tmp<Foam::volScalarField> Foam::JohnsonJacksonFrictionalStress::muf
|
||||
const dimensionedScalar& alphaMax,
|
||||
const volScalarField& pf,
|
||||
const volTensorField& D,
|
||||
const dimensionedScalar& phi
|
||||
const dimensionedScalar& phi
|
||||
) const
|
||||
{
|
||||
{
|
||||
return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi);
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
|
||||
|
||||
volScalarField& muff = tmuf();
|
||||
|
||||
forAll (D, celli)
|
||||
forAll(D, celli)
|
||||
{
|
||||
if (alpha[celli] > alphaMax.value()-5e-2)
|
||||
{
|
||||
|
||||
@ -35,9 +35,9 @@ Foam::autoPtr<Foam::frictionalStressModel> Foam::frictionalStressModel::New
|
||||
{
|
||||
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
|
||||
|
||||
Info<< "Selecting frictionalStressModel "
|
||||
Info<< "Selecting frictionalStressModel "
|
||||
<< frictionalStressModelType << endl;
|
||||
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
|
||||
|
||||
|
||||
@ -35,9 +35,9 @@ Foam::autoPtr<Foam::granularPressureModel> Foam::granularPressureModel::New
|
||||
{
|
||||
word granularPressureModelType(dict.lookup("granularPressureModel"));
|
||||
|
||||
Info<< "Selecting granularPressureModel "
|
||||
Info<< "Selecting granularPressureModel "
|
||||
<< granularPressureModelType << endl;
|
||||
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(granularPressureModelType);
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ Foam::tmp<Foam::volScalarField> Foam::CarnahanStarlingRadial::g0
|
||||
) const
|
||||
{
|
||||
|
||||
return
|
||||
return
|
||||
1.0/(1.0 - alpha)
|
||||
+ 3.0*alpha/(2.0*sqr(1.0 - alpha))
|
||||
+ sqr(alpha)/(2.0*pow(1.0 - alpha, 3));
|
||||
@ -78,8 +78,8 @@ Foam::tmp<Foam::volScalarField> Foam::CarnahanStarlingRadial::g0prime
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return
|
||||
- alpha/sqr(1.0 - alpha)
|
||||
return
|
||||
- alpha/sqr(1.0 - alpha)
|
||||
+ (3.0*(1.0 - alpha) + 6.0*sqr(alpha))/(2.0*(1.0 - alpha))
|
||||
+ (2.0*alpha*(1.0 - alpha) + 3.0*pow(alpha, 3))
|
||||
/(2.0*pow(1.0 - alpha, 4));
|
||||
|
||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowRadial::g0prime
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return
|
||||
return
|
||||
(-1.0/5.0)*pow(alpha/alphaMax, -2.0/3.0)
|
||||
/(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0)));
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::SinclairJacksonRadial::g0prime
|
||||
const dimensionedScalar& alphaMax
|
||||
) const
|
||||
{
|
||||
return
|
||||
return
|
||||
(-1.0/3.0)*pow(alpha/alphaMax, -2.0/3.0)
|
||||
/(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0)));
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@ Foam::autoPtr<Foam::radialModel> Foam::radialModel::New
|
||||
{
|
||||
word radialModelType(dict.lookup("radialModel"));
|
||||
|
||||
Info<< "Selecting radialModel "
|
||||
Info<< "Selecting radialModel "
|
||||
<< radialModelType << endl;
|
||||
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(radialModelType);
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
phib = (fvc::interpolate(Ub) & mesh.Sf()) + fvc::ddtPhiCorr(rUbA, Ub, phib)
|
||||
+ phiDragb;
|
||||
|
||||
|
||||
phi = alphaf*phia + betaf*phib;
|
||||
|
||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||
|
||||
@ -7,20 +7,20 @@
|
||||
labelListList neighbour = mesh.cellCells();
|
||||
scalarField cellVolumes = mesh.cellVolumes();
|
||||
|
||||
forAll (alphaEx, celli)
|
||||
forAll(alphaEx, celli)
|
||||
{
|
||||
// Finding the labels of the neighbouring cells
|
||||
labelList neighbourCell = neighbour[celli];
|
||||
|
||||
// Initializing neighbouring cells contribution
|
||||
scalar neighboursEx = 0.0;
|
||||
|
||||
forAll (neighbourCell, cellj)
|
||||
|
||||
forAll(neighbourCell, cellj)
|
||||
{
|
||||
labelList neighboursNeighbour = neighbour[neighbourCell[cellj]];
|
||||
scalar neighboursNeighbourCellVolumes = 0.0;
|
||||
|
||||
forAll (neighboursNeighbour, cellk)
|
||||
|
||||
forAll(neighboursNeighbour, cellk)
|
||||
{
|
||||
neighboursNeighbourCellVolumes +=
|
||||
cellVolumes[neighboursNeighbour[cellk]];
|
||||
|
||||
@ -177,7 +177,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
|
||||
gradient() =
|
||||
(
|
||||
(traction_ + pressure_*n)/rho.value()
|
||||
+ twoMuLambda*fvPatchField<vector>::snGrad() - (n & sigmaD)
|
||||
+ twoMuLambda*fvPatchField<vector>::snGrad() - (n & sigmaD)
|
||||
)/twoMuLambda;
|
||||
|
||||
Switch thermalStress(thermalProperties.lookup("thermalStress"));
|
||||
@ -187,7 +187,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
|
||||
dimensionedScalar alpha(thermalProperties.lookup("alpha"));
|
||||
dimensionedScalar threeKalpha = threeK*alpha;
|
||||
|
||||
const fvPatchField<scalar>& T =
|
||||
const fvPatchField<scalar>& T =
|
||||
patch().lookupPatchField<volScalarField, scalar>("T");
|
||||
|
||||
gradient() += n*threeKalpha.value()*T/twoMuLambda;
|
||||
|
||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
volTensorField gradDcorr = fvc::grad(Dcorr);
|
||||
|
||||
sigmaExp =
|
||||
sigmaExp =
|
||||
(lambda - mu)*gradDcorr + mu*gradDcorr.T()
|
||||
+ (lambda*I)*tr(gradDcorr);
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs()
|
||||
const fvPatchField<symmTensor>& sigmaD =
|
||||
patch().lookupPatchField<volSymmTensorField, symmTensor>("sigmaD");
|
||||
|
||||
const fvPatchField<tensor>& sigmaExp =
|
||||
const fvPatchField<tensor>& sigmaExp =
|
||||
patch().lookupPatchField<volTensorField, tensor>("sigmaExp");
|
||||
|
||||
gradient() =
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
BSplineTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/BSplineTest
|
||||
@ -1,69 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
(
|
||||
// Upper body longitudinal splines.
|
||||
(
|
||||
(-0.22685 -0.01125166 0) // 7
|
||||
(-0.21685 -0.01340204 0)
|
||||
(-0.20685 -0.01529684 0)
|
||||
(-0.19685 -0.01694748 0)
|
||||
(-0.18685 -0.01836538 0)
|
||||
(-0.17685 -0.01956197 0)
|
||||
(-0.16685 -0.02054868 0)
|
||||
(-0.15685 -0.02133693 0)
|
||||
(-0.14685 -0.02193816 0)
|
||||
(-0.13685 -0.02236377 0)
|
||||
(-0.12685 -0.02262521 0)
|
||||
(-0.11685 -0.02273389 0) // 2
|
||||
)
|
||||
|
||||
(
|
||||
(-0.22685 0 0.01125166) // 8
|
||||
(-0.21685 0 0.01340204)
|
||||
(-0.20685 0 0.01529684)
|
||||
(-0.19685 0 0.01694748)
|
||||
(-0.18685 0 0.01836538)
|
||||
(-0.17685 0 0.01956197)
|
||||
(-0.16685 0 0.02054868)
|
||||
(-0.15685 0 0.02133693)
|
||||
(-0.14685 0 0.02193816)
|
||||
(-0.13685 0 0.02236377)
|
||||
(-0.12685 0 0.02262521)
|
||||
(-0.11685 0 0.02273389) // 3
|
||||
)
|
||||
|
||||
(
|
||||
(-0.22685 0.01125166 0) // 9
|
||||
(-0.21685 0.01340204 0)
|
||||
(-0.20685 0.01529684 0)
|
||||
(-0.19685 0.01694748 0)
|
||||
(-0.18685 0.01836538 0)
|
||||
(-0.17685 0.01956197 0)
|
||||
(-0.16685 0.02054868 0)
|
||||
(-0.15685 0.02133693 0)
|
||||
(-0.14685 0.02193816 0)
|
||||
(-0.13685 0.02236377 0)
|
||||
(-0.12685 0.02262521 0)
|
||||
(-0.11685 0.02273389 0) // 4
|
||||
)
|
||||
|
||||
(
|
||||
(-0.22685 0 -0.01125166) // 6
|
||||
(-0.21685 0 -0.01340204)
|
||||
(-0.20685 0 -0.01529684)
|
||||
(-0.19685 0 -0.01694748)
|
||||
(-0.18685 0 -0.01836538)
|
||||
(-0.17685 0 -0.01956197)
|
||||
(-0.16685 0 -0.02054868)
|
||||
(-0.15685 0 -0.02133693)
|
||||
(-0.14685 0 -0.02193816)
|
||||
(-0.13685 0 -0.02236377)
|
||||
(-0.12685 0 -0.02262521)
|
||||
(-0.11685 0 -0.02273389) // 1
|
||||
)
|
||||
);
|
||||
@ -47,11 +47,11 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("reList", "reList");
|
||||
argList::validOptions.insert("wordList", "wordList");
|
||||
argList::validOptions.insert("stringList", "stringList");
|
||||
argList::validOptions.insert("float", "xx");
|
||||
argList::validOptions.insert("flag", "");
|
||||
argList::addOption("reList", "reList");
|
||||
argList::addOption("wordList", "wordList");
|
||||
argList::addOption("stringList", "stringList");
|
||||
argList::addOption("float", "xx");
|
||||
argList::addBoolOption("flag");
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
|
||||
@ -82,9 +82,13 @@ int main(int argc, char *argv[])
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("file .. fileN");
|
||||
|
||||
argList::validOptions.insert("mask", "");
|
||||
argList::validOptions.insert("count", "");
|
||||
argList::validOptions.insert("info", "");
|
||||
argList::addBoolOption("mask", "report information about the bit masks");
|
||||
argList::addBoolOption("count", "test the count() method");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"info",
|
||||
"print an ascii representation of the storage"
|
||||
);
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
|
||||
@ -58,9 +58,15 @@ int main(int argc, char *argv[])
|
||||
list1.print(Info);
|
||||
|
||||
Info<< "\ntest set() with default argument (max_value)\n";
|
||||
list1.set(1);
|
||||
list1.set(3);
|
||||
list1.print(Info);
|
||||
|
||||
Info<< "\ntest unset() with in-range and out-of-range\n";
|
||||
list1.unset(3);
|
||||
list1.unset(100000);
|
||||
list1.print(Info);
|
||||
|
||||
Info<< "\ntest assign between references\n";
|
||||
list1[2] = 3;
|
||||
list1[4] = list1[2];
|
||||
|
||||
3
applications/test/PackedList3/Make/files
Normal file
3
applications/test/PackedList3/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
PackedListTest3.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/PackedListTest3
|
||||
0
applications/test/PackedList3/Make/options
Normal file
0
applications/test/PackedList3/Make/options
Normal file
@ -22,43 +22,51 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#include "argList.H"
|
||||
Application
|
||||
|
||||
#include "vector.H"
|
||||
#include "IFstream.H"
|
||||
#include "BSpline.H"
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "boolList.H"
|
||||
#include "HashSet.H"
|
||||
#include "StaticHashTable.H"
|
||||
#include "cpuTime.H"
|
||||
#include <vector>
|
||||
#include "PackedList.H"
|
||||
#include "PackedBoolList.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("file .. fileN");
|
||||
const label n = 100000000;
|
||||
const label nReport = 1000000;
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
cpuTime timer;
|
||||
|
||||
forAll(args.additionalArgs(), argI)
|
||||
// test inserts
|
||||
// PackedBoolList
|
||||
PackedBoolList packed;
|
||||
for (label i = 0; i < n; i++)
|
||||
{
|
||||
const string& srcFile = args.additionalArgs()[argI];
|
||||
Info<< nl << "reading " << srcFile << nl;
|
||||
IFstream ifs(srcFile);
|
||||
|
||||
List<pointField> splinePointFields(ifs);
|
||||
|
||||
forAll(splinePointFields, splineI)
|
||||
if ((i % nReport) == 0 && i)
|
||||
{
|
||||
Info<<"convert " << splinePointFields[splineI] << " to bspline" << endl;
|
||||
|
||||
BSpline spl(splinePointFields[splineI], vector::zero, vector::zero);
|
||||
|
||||
Info<< "1/2 = " << spl.position(0.5) << endl;
|
||||
Info<< "i:" << i << " in " << timer.cpuTimeIncrement() << " s"
|
||||
<<endl;
|
||||
}
|
||||
packed[i] = 1;
|
||||
}
|
||||
Info<< "insert test: " << n << " elements in "
|
||||
<< timer.cpuTimeIncrement() << " s\n\n";
|
||||
|
||||
Info << "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -66,17 +66,18 @@ int main(int argc, char *argv[])
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("fileName .. fileNameN");
|
||||
argList::addOption("istream", "fileName", "test Istream values");
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
if (args.additionalArgs().empty())
|
||||
if (args.additionalArgs().empty() && args.options().empty())
|
||||
{
|
||||
args.printUsage();
|
||||
}
|
||||
|
||||
if (args.optionFound("case"))
|
||||
fileName pathName;
|
||||
if (args.optionReadIfPresent("case", pathName))
|
||||
{
|
||||
fileName pathName = args.option("case");
|
||||
Info<< nl
|
||||
<< "-case" << nl
|
||||
<< "path = " << args.path() << nl
|
||||
@ -91,7 +92,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(args.additionalArgs(), argI)
|
||||
{
|
||||
fileName pathName = args.additionalArgs()[argI];
|
||||
pathName = args.additionalArgs()[argI];
|
||||
printCleaning(pathName);
|
||||
}
|
||||
|
||||
if (args.optionFound("istream"))
|
||||
{
|
||||
args.optionLookup("istream")() >> pathName;
|
||||
|
||||
Info<< nl
|
||||
<< "-case" << nl
|
||||
<< "path = " << args.path() << nl
|
||||
<< "root = " << args.rootPath() << nl
|
||||
<< "case = " << args.caseName() << nl
|
||||
<< "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
|
||||
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
||||
<< endl;
|
||||
|
||||
printCleaning(pathName);
|
||||
}
|
||||
|
||||
|
||||
@ -98,8 +98,9 @@ bool checkDictionaryContent(const dictionary& dict1, const dictionary& dict2)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("rewrite", "");
|
||||
argList::validOptions.insert("show", "");
|
||||
argList::addBoolOption("rewrite");
|
||||
argList::addBoolOption("show");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
Time runTime(args.rootPath(), args.caseName());
|
||||
|
||||
@ -39,8 +39,9 @@ int main(int argc, char *argv[])
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("file .. fileN");
|
||||
argList::validOptions.erase("case");
|
||||
argList::validOptions.insert("ext", "bak");
|
||||
|
||||
argList::removeOption("case");
|
||||
argList::addOption("ext", "bak");
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Count walls
|
||||
label nWalls = 0;
|
||||
forAll (mesh.boundary(), patchI)
|
||||
forAll(mesh.boundary(), patchI)
|
||||
{
|
||||
const fvPatch& patch = mesh.boundary()[patchI];
|
||||
|
||||
@ -87,13 +87,13 @@ int main(int argc, char *argv[])
|
||||
labelList changedFaces(nWalls);
|
||||
|
||||
label nChangedFaces = 0;
|
||||
forAll (mesh.boundary(), patchI)
|
||||
forAll(mesh.boundary(), patchI)
|
||||
{
|
||||
const fvPatch& patch = mesh.boundary()[patchI];
|
||||
|
||||
if (isA<wallFvPatch>(patch))
|
||||
{
|
||||
forAll (patch.Cf(), patchFaceI)
|
||||
forAll(patch.Cf(), patchFaceI)
|
||||
{
|
||||
const polyPatch& polyPatch = mesh.boundaryMesh()[patchI];
|
||||
|
||||
@ -170,7 +170,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Copy boundary values
|
||||
forAll (wallDistUncorrected.boundaryField(), patchI)
|
||||
forAll(wallDistUncorrected.boundaryField(), patchI)
|
||||
{
|
||||
fvPatchScalarField& patchField =
|
||||
wallDistUncorrected.boundaryField()[patchI];
|
||||
|
||||
@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("CHEMKINIIIFile");
|
||||
argList::validOptions.insert("thermo", "fileName");
|
||||
argList::addOption("thermo", "fileName");
|
||||
argList args(argc, argv);
|
||||
|
||||
fileName thermoFileName = fileName::null;
|
||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
PtrList<gasReaction> testReactions(nReactions);
|
||||
|
||||
forAll (testReactions, i)
|
||||
forAll(testReactions, i)
|
||||
{
|
||||
testReactions.set
|
||||
(
|
||||
|
||||
@ -53,7 +53,7 @@ labelList procNeighbours(const polyMesh& mesh)
|
||||
|
||||
label nNeighbours = 0;
|
||||
|
||||
forAll (mesh.boundaryMesh(), patchI)
|
||||
forAll(mesh.boundaryMesh(), patchI)
|
||||
{
|
||||
if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
|
||||
{
|
||||
@ -65,7 +65,7 @@ labelList procNeighbours(const polyMesh& mesh)
|
||||
|
||||
nNeighbours = 0;
|
||||
|
||||
forAll (mesh.boundaryMesh(), patchI)
|
||||
forAll(mesh.boundaryMesh(), patchI)
|
||||
{
|
||||
if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
|
||||
{
|
||||
|
||||
3
applications/test/sizeof/Make/files
Normal file
3
applications/test/sizeof/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
sizeofTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/sizeofTest
|
||||
2
applications/test/sizeof/Make/options
Normal file
2
applications/test/sizeof/Make/options
Normal file
@ -0,0 +1,2 @@
|
||||
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
|
||||
/* EXE_LIBS = -lfiniteVolume */
|
||||
@ -22,41 +22,83 @@ 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 the sizeof various classes.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "bool.H"
|
||||
#include "Switch.H"
|
||||
#include "string.H"
|
||||
#include "dictionary.H"
|
||||
#include "nil.H"
|
||||
#include "IOstreams.H"
|
||||
#include "IStringStream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class T>
|
||||
T Foam::argList::optionRead(const word& opt) const
|
||||
namespace Foam
|
||||
{
|
||||
T val;
|
||||
class hasBoolClass
|
||||
{
|
||||
public:
|
||||
bool b_;
|
||||
|
||||
hasBoolClass(const bool val=false)
|
||||
:
|
||||
b_(false)
|
||||
{}
|
||||
};
|
||||
|
||||
optionLookup(opt)() >> val;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
bool Foam::argList::optionReadIfPresent(const word& opt, T& val) const
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (optionFound(opt))
|
||||
cout<<"sizeof\n------\n";
|
||||
{
|
||||
val = optionRead<T>(opt);
|
||||
return true;
|
||||
nil x;
|
||||
cout<<"nil:" << sizeof(x) << nl;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
bool x(0);
|
||||
cout<<"bool:" << sizeof(x) << nl;
|
||||
}
|
||||
{
|
||||
hasBoolClass x(true);
|
||||
cout<<"hasBoolClass:" << sizeof(x) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
Switch x("n");
|
||||
cout<<"Switch:" << sizeof(x) << nl;
|
||||
cout<<"Switch::switchType=" << sizeof(Switch::switchType) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
scalar x(0);
|
||||
cout<<"scalar:" << sizeof(x) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
label x(0);
|
||||
cout<<"label:" << sizeof(x) << nl;
|
||||
}
|
||||
|
||||
{
|
||||
cout<<"int:" << sizeof(int) << nl;
|
||||
cout<<"long:" << sizeof(long) << nl;
|
||||
cout<<"float:" << sizeof(float) << nl;
|
||||
cout<<"double:" << sizeof(double) << nl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
Foam::List<T> Foam::argList::optionReadList(const word& opt) const
|
||||
{
|
||||
return readList<T>(optionLookup(opt)());
|
||||
Info << "---\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
3
applications/test/spline/Make/files
Normal file
3
applications/test/spline/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
splineTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/splineTest
|
||||
137
applications/test/spline/splineTest.C
Normal file
137
applications/test/spline/splineTest.C
Normal file
@ -0,0 +1,137 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-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
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
#include "argList.H"
|
||||
|
||||
#include "vector.H"
|
||||
#include "IFstream.H"
|
||||
|
||||
#include "BSpline.H"
|
||||
#include "CatmullRomSpline.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
inline Ostream& printPoint(Ostream& os, const point& p)
|
||||
{
|
||||
os << p.x() << ' ' << p.y() << ' ' << p.z() << nl;
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("file .. fileN");
|
||||
argList::addBoolOption("B", "B-Spline implementation");
|
||||
argList::addBoolOption("CMR", "catmull-rom spline (default)");
|
||||
argList::addOption
|
||||
(
|
||||
"n",
|
||||
"INT",
|
||||
"number of segments for evaluation - default 20"
|
||||
);
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
if (args.additionalArgs().empty())
|
||||
{
|
||||
args.printUsage();
|
||||
}
|
||||
|
||||
bool useBSpline = args.optionFound("B");
|
||||
bool useCatmullRom = args.optionFound("CMR");
|
||||
label nSeg = args.optionLookupOrDefault<label>("n", 20);
|
||||
|
||||
if (!useCatmullRom && !useBSpline)
|
||||
{
|
||||
Info<<"defaulting to Catmull-Rom spline" << endl;
|
||||
useCatmullRom = true;
|
||||
}
|
||||
|
||||
forAll(args.additionalArgs(), argI)
|
||||
{
|
||||
const string& srcFile = args.additionalArgs()[argI];
|
||||
Info<< nl << "reading " << srcFile << nl;
|
||||
IFstream ifs(srcFile);
|
||||
|
||||
List<pointField> pointFields(ifs);
|
||||
|
||||
|
||||
forAll(pointFields, splineI)
|
||||
{
|
||||
Info<<"\n# points:" << endl;
|
||||
forAll(pointFields[splineI], ptI)
|
||||
{
|
||||
printPoint(Info, pointFields[splineI][ptI]);
|
||||
}
|
||||
|
||||
if (useBSpline)
|
||||
{
|
||||
BSpline spl(pointFields[splineI]);
|
||||
|
||||
Info<< nl << "# B-Spline" << endl;
|
||||
|
||||
for (label segI = 0; segI <= nSeg; ++segI)
|
||||
{
|
||||
scalar lambda = scalar(segI)/scalar(nSeg);
|
||||
printPoint(Info, spl.position(lambda));
|
||||
}
|
||||
}
|
||||
|
||||
if (useCatmullRom)
|
||||
{
|
||||
CatmullRomSpline spl(pointFields[splineI]);
|
||||
|
||||
Info<< nl <<"# Catmull-Rom" << endl;
|
||||
|
||||
for (label segI = 0; segI <= nSeg; ++segI)
|
||||
{
|
||||
scalar lambda = scalar(segI)/scalar(nSeg);
|
||||
printPoint(Info, spl.position(lambda));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
polyLine pl(pointFields[splineI]);
|
||||
|
||||
Info<< nl <<"# polyList" << endl;
|
||||
|
||||
for (label segI = 0; segI <= nSeg; ++segI)
|
||||
{
|
||||
scalar lambda = scalar(segI)/scalar(nSeg);
|
||||
printPoint(Info, pl.position(lambda));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
46
applications/test/spline/test-splines
Normal file
46
applications/test/spline/test-splines
Normal file
@ -0,0 +1,46 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
(
|
||||
// Upper body longitudinal splines
|
||||
(
|
||||
(0.22685 0.01125166 0) // 7
|
||||
(0.21685 0.01340204 0)
|
||||
(0.20685 0.01529684 0)
|
||||
(0.19685 0.01694748 0)
|
||||
(0.18685 0.01836538 0)
|
||||
(0.17685 0.01956197 0)
|
||||
(0.16685 0.02054868 0)
|
||||
(0.15685 0.02133693 0)
|
||||
(0.14685 0.02193816 0)
|
||||
(0.13685 0.02236377 0)
|
||||
(0.12685 0.02262521 0)
|
||||
(0.11685 0.02273389 0) // 2
|
||||
)
|
||||
|
||||
// sine function
|
||||
(
|
||||
(0 0 0)
|
||||
(45 0.70707 0)
|
||||
(90 1 0)
|
||||
(135 0.70707 0)
|
||||
(180 0 0)
|
||||
(225 -0.70707 0)
|
||||
(270 -1 0)
|
||||
(315 -0.70707 0)
|
||||
(360 0 0)
|
||||
)
|
||||
|
||||
// cosine function, but with extremely few points
|
||||
(
|
||||
(0 1 0)
|
||||
(180 -1 0)
|
||||
(360 1 0)
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
@ -44,16 +44,14 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.insert("string .. stringN");
|
||||
argList::validOptions.insert("file", "name");
|
||||
argList::validOptions.insert("repeat", "count");
|
||||
argList::addOption("file", "name");
|
||||
argList::addOption("repeat", "count");
|
||||
|
||||
argList args(argc, argv, false, true);
|
||||
|
||||
label repeat = 1;
|
||||
args.optionReadIfPresent<label>("repeat", repeat);
|
||||
const label repeat = args.optionLookupOrDefault<label>("repeat", 1);
|
||||
|
||||
cpuTime timer;
|
||||
|
||||
for (label count = 0; count < repeat; ++count)
|
||||
{
|
||||
forAll(args.additionalArgs(), argI)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/errorEstimation/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/errorEstimation/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/errorEstimation/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/errorEstimation/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
|
||||
@ -454,7 +454,7 @@ label simplifyFaces
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("edge length [m]");
|
||||
argList::validArgs.append("merge angle (degrees)");
|
||||
|
||||
|
||||
@ -59,10 +59,6 @@ using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Sin of angle between two consecutive edges on a face. If sin(angle) larger
|
||||
// than this the face will be considered concave.
|
||||
const scalar defaultConcaveAngle = 30;
|
||||
|
||||
|
||||
// Same check as snapMesh
|
||||
void checkSnapMesh
|
||||
@ -433,9 +429,9 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.append("feature angle [0..180]");
|
||||
argList::validOptions.insert("concaveAngle", "[0..180]");
|
||||
argList::validOptions.insert("snapMesh", "");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addOption("concaveAngle", "[0..180]");
|
||||
argList::addBoolOption("snapMesh");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -447,8 +443,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||
|
||||
scalar concaveAngle = defaultConcaveAngle;
|
||||
args.optionReadIfPresent("concaveAngle", concaveAngle);
|
||||
// Sin of angle between two consecutive edges on a face.
|
||||
// If sin(angle) larger than this the face will be considered concave.
|
||||
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
|
||||
|
||||
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
|
||||
|
||||
@ -483,8 +480,8 @@ int main(int argc, char *argv[])
|
||||
// Merge points on straight edges and remove unused points
|
||||
if (snapMeshDict)
|
||||
{
|
||||
Info<< "Merging all 'loose' points on surface edges"
|
||||
<< ", regardless of the angle they make." << endl;
|
||||
Info<< "Merging all 'loose' points on surface edges, "
|
||||
<< "regardless of the angle they make." << endl;
|
||||
|
||||
// Surface bnound to be used to extrude. Merge all loose points.
|
||||
nChanged += mergeEdges(-1, mesh);
|
||||
@ -510,7 +507,7 @@ int main(int argc, char *argv[])
|
||||
Info<< "Mesh unchanged." << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cellSplitter.H"
|
||||
@ -39,12 +37,8 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(Foam::cellSplitter, 0);
|
||||
|
||||
defineTypeNameAndDebug(cellSplitter, 0);
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -328,7 +328,7 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -52,7 +52,7 @@ using namespace Foam;
|
||||
// Main program:
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("cellSet");
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -47,11 +47,12 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::noParallel();
|
||||
Foam::argList::validArgs.append("patchName");
|
||||
Foam::argList::validArgs.append("edgeWeight");
|
||||
Foam::argList::validOptions.insert("useSet", "cellSet");
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("patchName");
|
||||
argList::validArgs.append("edgeWeight");
|
||||
|
||||
argList::addOption("useSet", "cellSet");
|
||||
argList::addBoolOption("overwrite");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -97,7 +97,7 @@ bool limitRefinementLevel
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validOptions.insert("readLevel", "");
|
||||
argList::addBoolOption("readLevel");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -216,7 +216,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
List<polyPatch*> p(patches.size());
|
||||
|
||||
forAll (p, patchI)
|
||||
forAll(p, patchI)
|
||||
{
|
||||
p[patchI] = patches[patchI].clone(fMesh.boundaryMesh()).ptr();
|
||||
}
|
||||
|
||||
@ -48,8 +48,8 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Foam::argList::validOptions.insert("overwrite", "");
|
||||
Foam::argList::validArgs.append("faceSet");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("faceSet");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -67,7 +67,7 @@ class edgeStats
|
||||
|
||||
//- If 2d get component of normal dir.
|
||||
direction getNormalDir(const twoDPointCorrector*) const;
|
||||
|
||||
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
edgeStats(const edgeStats&);
|
||||
|
||||
@ -525,10 +525,10 @@ void collectCuts
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validOptions.insert("set", "cellSet name");
|
||||
argList::validOptions.insert("geometry", "");
|
||||
argList::validOptions.insert("tol", "edge snap tolerance");
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
argList::addOption("set", "cellSet name");
|
||||
argList::addBoolOption("geometry");
|
||||
argList::addOption("tol", "edge snap tolerance");
|
||||
argList::addBoolOption("overwrite");
|
||||
argList::validArgs.append("edge angle [0..360]");
|
||||
|
||||
# include "setRootCase.H"
|
||||
@ -546,8 +546,7 @@ int main(int argc, char *argv[])
|
||||
bool geometry = args.optionFound("geometry");
|
||||
bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
scalar edgeTol = 0.2;
|
||||
args.optionReadIfPresent("tol", edgeTol);
|
||||
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||
|
||||
Info<< "Trying to split cells with internal angles > feature angle\n" << nl
|
||||
<< "featureAngle : " << featureAngle << nl
|
||||
|
||||
@ -198,8 +198,11 @@ void ReadVertices
|
||||
int dims = 1;
|
||||
float scale;
|
||||
CCMIOID mapID;
|
||||
CCMIOReadVerticesf(&err, vertices, &dims, &scale, &mapID, verts.begin(),
|
||||
offset, offsetPlusSize);
|
||||
CCMIOReadVerticesf
|
||||
(
|
||||
&err, vertices, &dims, &scale, &mapID, verts.begin(),
|
||||
offset, offsetPlusSize
|
||||
);
|
||||
CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize);
|
||||
|
||||
//CCMIOSize size;
|
||||
@ -245,35 +248,34 @@ void ReadProblem
|
||||
== kCCMIONoErr
|
||||
)
|
||||
{
|
||||
char *name;
|
||||
int size;
|
||||
char *name;
|
||||
int size;
|
||||
int cellType;
|
||||
|
||||
// ... if it has a material type. (Note that we do not pass in
|
||||
// an array to get the name because we do not know how long the
|
||||
// string is yet. Many parameters to CCMIO functions that
|
||||
// ... if it has a material type. (Note that we do not pass in
|
||||
// an array to get the name because we do not know how long the
|
||||
// string is yet. Many parameters to CCMIO functions that
|
||||
// return
|
||||
// data can be NULL if that data is not needed.)
|
||||
if
|
||||
// data can be NULL if that data is not needed.)
|
||||
if
|
||||
(
|
||||
CCMIOReadOptstr(NULL, next, "MaterialType", &size, NULL)
|
||||
== kCCMIONoErr
|
||||
)
|
||||
{
|
||||
name = new char[size + 1];
|
||||
CCMIOReadOptstr(&err, next, "MaterialType", &size, name);
|
||||
CCMIOGetEntityIndex(&err, next, &cellType);
|
||||
{
|
||||
name = new char[size + 1];
|
||||
CCMIOReadOptstr(&err, next, "MaterialType", &size, name);
|
||||
CCMIOGetEntityIndex(&err, next, &cellType);
|
||||
|
||||
foamCellTypeNames.insert(cellType, name);
|
||||
Pout<< "Celltype:" << cellType << " name:" << name << endl;
|
||||
|
||||
delete [] name;
|
||||
}
|
||||
delete [] name;
|
||||
}
|
||||
}
|
||||
|
||||
// ... walk through each region description and print it...
|
||||
|
||||
|
||||
CCMIOID boundary;
|
||||
label regionI = 0;
|
||||
int k = 0;
|
||||
@ -320,13 +322,13 @@ void ReadProblem
|
||||
CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, NULL)
|
||||
== kCCMIONoErr
|
||||
)
|
||||
{
|
||||
char* s = new char[size + 1];
|
||||
CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, s);
|
||||
{
|
||||
char* s = new char[size + 1];
|
||||
CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, s);
|
||||
s[size] = '\0';
|
||||
foamPatchTypes[foamPatchI] = string::validate<word>(string(s));
|
||||
delete [] s;
|
||||
}
|
||||
delete [] s;
|
||||
}
|
||||
|
||||
|
||||
//foamPatchMap.append(prostarI);
|
||||
@ -342,28 +344,28 @@ void ReadProblem
|
||||
CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, NULL)
|
||||
== kCCMIONoErr
|
||||
)
|
||||
{
|
||||
char* name = new char[size + 1];
|
||||
CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, name);
|
||||
{
|
||||
char* name = new char[size + 1];
|
||||
CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, name);
|
||||
name[size] = '\0';
|
||||
foamPatchNames[foamPatchI] = string::validate<word>(string(name));
|
||||
delete [] name;
|
||||
}
|
||||
delete [] name;
|
||||
}
|
||||
else if
|
||||
(
|
||||
CCMIOReadOptstr(NULL, boundary, "Label", &size, NULL)
|
||||
== kCCMIONoErr
|
||||
)
|
||||
{
|
||||
char* name = new char[size + 1];
|
||||
CCMIOReadOptstr(NULL, boundary, "Label", &size, name);
|
||||
{
|
||||
char* name = new char[size + 1];
|
||||
CCMIOReadOptstr(NULL, boundary, "Label", &size, name);
|
||||
name[size] = '\0';
|
||||
foamPatchNames[foamPatchI] = string::validate<word>(string(name));
|
||||
delete [] name;
|
||||
}
|
||||
delete [] name;
|
||||
}
|
||||
else
|
||||
{
|
||||
foamPatchNames[foamPatchI] =
|
||||
foamPatchNames[foamPatchI] =
|
||||
foamPatchTypes[foamPatchI]
|
||||
+ Foam::name(foamPatchI);
|
||||
Pout<< "Made up name:" << foamPatchNames[foamPatchI]
|
||||
@ -440,8 +442,8 @@ void ReadCells
|
||||
== kCCMIONoErr
|
||||
)
|
||||
{
|
||||
CCMIOSize size;
|
||||
CCMIOEntitySize(&err, id, &size, NULL);
|
||||
CCMIOSize size;
|
||||
CCMIOEntitySize(&err, id, &size, NULL);
|
||||
|
||||
Pout<< "Read kCCMIOBoundaryFaces entry with " << size
|
||||
<< " faces." << endl;
|
||||
@ -461,13 +463,13 @@ void ReadCells
|
||||
CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id);
|
||||
CCMIOSize size;
|
||||
CCMIOReadFaces(&err, id, kCCMIOInternalFaces, NULL, &size, NULL,
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
std::vector<int> faces(size);
|
||||
CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, NULL, &faces[0],
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
std::vector<int> faceCells(2*nInternalFaces);
|
||||
CCMIOReadFaceCells(&err, id, kCCMIOInternalFaces, &faceCells[0],
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd);
|
||||
CheckError(err, "Error reading internal faces");
|
||||
|
||||
@ -505,19 +507,19 @@ void ReadCells
|
||||
)
|
||||
{
|
||||
CCMIOSize nFaces;
|
||||
CCMIOEntitySize(&err, id, &nFaces, NULL);
|
||||
CCMIOEntitySize(&err, id, &nFaces, NULL);
|
||||
|
||||
mapData.resize(nFaces);
|
||||
faceCells.resize(nFaces);
|
||||
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, NULL, &size, NULL,
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
faces.resize(size);
|
||||
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, &mapID, NULL, &faces[0],
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0],
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd);
|
||||
CheckError(err, "Error reading boundary faces");
|
||||
mapData.resize(nFaces);
|
||||
faceCells.resize(nFaces);
|
||||
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, NULL, &size, NULL,
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
faces.resize(size);
|
||||
CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, &mapID, NULL, &faces[0],
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0],
|
||||
kCCMIOStart, kCCMIOEnd);
|
||||
CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd);
|
||||
CheckError(err, "Error reading boundary faces");
|
||||
|
||||
// Read prostar id
|
||||
int prostarI;
|
||||
@ -672,9 +674,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (err != kCCMIONoErr)
|
||||
{
|
||||
// Maybe no solution; try again
|
||||
err = kCCMIONoErr;
|
||||
CCMIOReadProcessor
|
||||
// Maybe no solution; try again
|
||||
err = kCCMIONoErr;
|
||||
CCMIOReadProcessor
|
||||
(
|
||||
&err,
|
||||
processor,
|
||||
@ -683,12 +685,12 @@ int main(int argc, char *argv[])
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
if (err != kCCMIONoErr)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
if (err != kCCMIONoErr)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "Could not read the file."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ReadVertices(err, vertices, foamPointMap, foamPoints);
|
||||
|
||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("ANSYS input file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -22,13 +22,9 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "error.H"
|
||||
|
||||
#include "block.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("CFX geom file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
||||
word blockName;
|
||||
label nx, ny, nz;
|
||||
|
||||
forAll (blocks, blockI)
|
||||
forAll(blocks, blockI)
|
||||
{
|
||||
cfxFile >> blockName;
|
||||
cfxFile >> nx >> ny >> nz;
|
||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
label no, blkNo, patchLabel;
|
||||
|
||||
forAll (cfxPatchTypes, patchI)
|
||||
forAll(cfxPatchTypes, patchI)
|
||||
{
|
||||
// Grab patch type and name
|
||||
cfxFile >> cfxPatchTypes[patchI] >> cfxPatchNames[patchI] >> no;
|
||||
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
|
||||
patchRanges[patchI].setSize(6);
|
||||
labelList& curRange = patchRanges[patchI];
|
||||
|
||||
forAll (curRange, rI)
|
||||
forAll(curRange, rI)
|
||||
{
|
||||
cfxFile >> curRange[rI];
|
||||
}
|
||||
@ -147,7 +147,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Reading block points" << endl;
|
||||
|
||||
forAll (blocks, blockI)
|
||||
forAll(blocks, blockI)
|
||||
{
|
||||
Info<< "block " << blockI << " is a ";
|
||||
blocks[blockI].readPoints(cfxFile);
|
||||
@ -176,7 +176,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
faceListList rawPatches(npatch);
|
||||
|
||||
forAll (rawPatches, patchI)
|
||||
forAll(rawPatches, patchI)
|
||||
{
|
||||
const word& patchType = cfxPatchTypes[patchI];
|
||||
|
||||
@ -214,7 +214,7 @@ int main(int argc, char *argv[])
|
||||
// For efficiency, create merge pairs in the first pass
|
||||
labelListListList glueMergePairs(glueMasterPatches.size());
|
||||
|
||||
forAll (glueMasterPatches, glueI)
|
||||
forAll(glueMasterPatches, glueI)
|
||||
{
|
||||
const label masterPatch = glueMasterPatches[glueI];
|
||||
const label slavePatch = glueSlavePatches[glueI];
|
||||
@ -247,14 +247,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
scalar sqrMergeTol = GREAT;
|
||||
|
||||
forAll (blockPFaces, blockPFaceLabel)
|
||||
forAll(blockPFaces, blockPFaceLabel)
|
||||
{
|
||||
const labelList& blockPFacePoints =
|
||||
blockPFaces[blockPFaceLabel];
|
||||
|
||||
forAll (blockPFacePoints, blockPFacePointI)
|
||||
forAll(blockPFacePoints, blockPFacePointI)
|
||||
{
|
||||
forAll (blockPFacePoints, blockPFacePointI2)
|
||||
forAll(blockPFacePoints, blockPFacePointI2)
|
||||
{
|
||||
if (blockPFacePointI != blockPFacePointI2)
|
||||
{
|
||||
@ -281,7 +281,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// N-squared point search over all points of all faces of
|
||||
// master block over all point of all faces of slave block
|
||||
forAll (blockPFaces, blockPFaceLabel)
|
||||
forAll(blockPFaces, blockPFaceLabel)
|
||||
{
|
||||
const labelList& blockPFacePoints =
|
||||
blockPFaces[blockPFaceLabel];
|
||||
@ -289,16 +289,16 @@ int main(int argc, char *argv[])
|
||||
labelList& cp = curPairs[blockPFaceLabel];
|
||||
cp.setSize(blockPFacePoints.size());
|
||||
|
||||
forAll (blockPFacePoints, blockPFacePointI)
|
||||
forAll(blockPFacePoints, blockPFacePointI)
|
||||
{
|
||||
found = false;
|
||||
|
||||
forAll (blockNFaces, blockNFaceLabel)
|
||||
forAll(blockNFaces, blockNFaceLabel)
|
||||
{
|
||||
const labelList& blockNFacePoints =
|
||||
blockNFaces[blockNFaceLabel];
|
||||
|
||||
forAll (blockNFacePoints, blockNFacePointI)
|
||||
forAll(blockNFacePoints, blockNFacePointI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -360,7 +360,7 @@ int main(int argc, char *argv[])
|
||||
changedPointMerge = false;
|
||||
nPasses++;
|
||||
|
||||
forAll (glueMasterPatches, glueI)
|
||||
forAll(glueMasterPatches, glueI)
|
||||
{
|
||||
const label masterPatch = glueMasterPatches[glueI];
|
||||
const label slavePatch = glueSlavePatches[glueI];
|
||||
@ -372,14 +372,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
const labelListList& curPairs = glueMergePairs[glueI];
|
||||
|
||||
forAll (blockPFaces, blockPFaceLabel)
|
||||
forAll(blockPFaces, blockPFaceLabel)
|
||||
{
|
||||
const labelList& blockPFacePoints =
|
||||
blockPFaces[blockPFaceLabel];
|
||||
|
||||
const labelList& cp = curPairs[blockPFaceLabel];
|
||||
|
||||
forAll (cp, blockPFacePointI)
|
||||
forAll(cp, blockPFacePointI)
|
||||
{
|
||||
label PpointLabel =
|
||||
blockPFacePoints[blockPFacePointI]
|
||||
@ -421,7 +421,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
forAll (glueMasterPatches, glueI)
|
||||
forAll(glueMasterPatches, glueI)
|
||||
{
|
||||
const label masterPatch = glueMasterPatches[glueI];
|
||||
const label slavePatch = glueSlavePatches[glueI];
|
||||
@ -433,12 +433,12 @@ int main(int argc, char *argv[])
|
||||
const faceList& blockNFaces = rawPatches[slavePatch];
|
||||
|
||||
|
||||
forAll (blockPFaces, blockPFaceLabel)
|
||||
forAll(blockPFaces, blockPFaceLabel)
|
||||
{
|
||||
const labelList& blockPFacePoints
|
||||
= blockPFaces[blockPFaceLabel];
|
||||
|
||||
forAll (blockPFacePoints, blockPFacePointI)
|
||||
forAll(blockPFacePoints, blockPFacePointI)
|
||||
{
|
||||
label PpointLabel =
|
||||
blockPFacePoints[blockPFacePointI]
|
||||
@ -455,12 +455,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
forAll (blockNFaces, blockNFaceLabel)
|
||||
forAll(blockNFaces, blockNFaceLabel)
|
||||
{
|
||||
const labelList& blockNFacePoints
|
||||
= blockNFaces[blockNFaceLabel];
|
||||
|
||||
forAll (blockNFacePoints, blockNFacePointI)
|
||||
forAll(blockNFacePoints, blockNFacePointI)
|
||||
{
|
||||
label NpointLabel =
|
||||
blockNFacePoints[blockNFacePointI]
|
||||
@ -483,7 +483,7 @@ int main(int argc, char *argv[])
|
||||
// given old point label
|
||||
label nNewPoints = 0;
|
||||
|
||||
forAll (pointMergeList, pointLabel)
|
||||
forAll(pointMergeList, pointLabel)
|
||||
{
|
||||
if (pointMergeList[pointLabel] > pointLabel)
|
||||
{
|
||||
@ -513,11 +513,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
pointField points(nMeshPoints);
|
||||
|
||||
forAll (blocks, blockI)
|
||||
forAll(blocks, blockI)
|
||||
{
|
||||
const pointField& blockPoints = blocks[blockI].points();
|
||||
|
||||
forAll (blockPoints, blockPointLabel)
|
||||
forAll(blockPoints, blockPointLabel)
|
||||
{
|
||||
points
|
||||
[
|
||||
@ -544,15 +544,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
label nCreatedCells = 0;
|
||||
|
||||
forAll (blocks, blockI)
|
||||
forAll(blocks, blockI)
|
||||
{
|
||||
labelListList curBlockCells = blocks[blockI].blockCells();
|
||||
|
||||
forAll (curBlockCells, blockCellI)
|
||||
forAll(curBlockCells, blockCellI)
|
||||
{
|
||||
labelList cellPoints(curBlockCells[blockCellI].size());
|
||||
|
||||
forAll (cellPoints, pointI)
|
||||
forAll(cellPoints, pointI)
|
||||
{
|
||||
cellPoints[pointI] =
|
||||
pointMergeList
|
||||
@ -579,7 +579,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
label nCreatedPatches = 0;
|
||||
|
||||
forAll (rawPatches, patchI)
|
||||
forAll(rawPatches, patchI)
|
||||
{
|
||||
if (rawPatches[patchI].size() && cfxPatchTypes[patchI] != "BLKBDY")
|
||||
{
|
||||
@ -610,14 +610,14 @@ int main(int argc, char *argv[])
|
||||
label oldSize = renumberedPatch.size();
|
||||
renumberedPatch.setSize(oldSize + curRawPatch.size());
|
||||
|
||||
forAll (curRawPatch, faceI)
|
||||
forAll(curRawPatch, faceI)
|
||||
{
|
||||
const face& oldFace = curRawPatch[faceI];
|
||||
|
||||
face& newFace = renumberedPatch[oldSize + faceI];
|
||||
newFace.setSize(oldFace.size());
|
||||
|
||||
forAll (oldFace, pointI)
|
||||
forAll(oldFace, pointI)
|
||||
{
|
||||
newFace[pointI] =
|
||||
pointMergeList
|
||||
@ -634,14 +634,14 @@ int main(int argc, char *argv[])
|
||||
faceList& renumberedPatch = boundary[nCreatedPatches];
|
||||
renumberedPatch.setSize(curRawPatch.size());
|
||||
|
||||
forAll (curRawPatch, faceI)
|
||||
forAll(curRawPatch, faceI)
|
||||
{
|
||||
const face& oldFace = curRawPatch[faceI];
|
||||
|
||||
face& newFace = renumberedPatch[faceI];
|
||||
newFace.setSize(oldFace.size());
|
||||
|
||||
forAll (oldFace, pointI)
|
||||
forAll(oldFace, pointI)
|
||||
{
|
||||
newFace[pointI] =
|
||||
pointMergeList
|
||||
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "hexBlock.H"
|
||||
@ -58,7 +56,7 @@ hexBlock::hexBlock(const label nx, const label ny, const label nz)
|
||||
|
||||
void hexBlock::readPoints(Istream& is)
|
||||
{
|
||||
forAll (points_, i)
|
||||
forAll(points_, i)
|
||||
{
|
||||
is >> points_[i].x() >> points_[i].y() >> points_[i].z();
|
||||
}
|
||||
@ -376,7 +374,7 @@ faceList hexBlock::patchFaces(const label direc, const labelList& range) const
|
||||
else if (blockHandedness_ == left)
|
||||
{
|
||||
// turn all faces inside out
|
||||
forAll (result, faceI)
|
||||
forAll(result, faceI)
|
||||
{
|
||||
result[faceI] = result[faceI].reverseFace();
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ endOfSection {space}")"{space}
|
||||
// set size of label list
|
||||
curFaceLabels.setSize(strtol(YYText(), &endPtr, 16));
|
||||
|
||||
forAll (curFaceLabels, i)
|
||||
forAll(curFaceLabels, i)
|
||||
{
|
||||
curFaceLabels[i] = strtol(endPtr, &endPtr, 16) - 1;
|
||||
}
|
||||
@ -762,10 +762,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("Fluent mesh file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::validOptions.insert("ignoreCellGroups", "cell group names");
|
||||
argList::validOptions.insert("ignoreFaceGroups", "face group names");
|
||||
argList::validOptions.insert("cubit", "");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption("ignoreCellGroups", "cell group names");
|
||||
argList::addOption("ignoreFaceGroups", "face group names");
|
||||
argList::addBoolOption("cubit");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -776,17 +776,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
|
||||
HashSet<word> ignoreCellGroups;
|
||||
if (args.optionFound("ignoreCellGroups"))
|
||||
{
|
||||
args.optionLookup("ignoreCellGroups")() >> ignoreCellGroups;
|
||||
}
|
||||
wordHashSet ignoreCellGroups;
|
||||
wordHashSet ignoreFaceGroups;
|
||||
|
||||
HashSet<word> ignoreFaceGroups;
|
||||
if (args.optionFound("ignoreFaceGroups"))
|
||||
{
|
||||
args.optionLookup("ignoreFaceGroups")() >> ignoreFaceGroups;
|
||||
}
|
||||
args.optionReadIfPresent("ignoreCellGroups", ignoreCellGroups);
|
||||
args.optionReadIfPresent("ignoreFaceGroups", ignoreFaceGroups);
|
||||
|
||||
cubitFile = args.options().found("cubit");
|
||||
|
||||
@ -843,7 +837,7 @@ int main(int argc, char *argv[])
|
||||
// faces and move to neighbour
|
||||
|
||||
boolList fm(faces.size(), false);
|
||||
forAll (faces, facei)
|
||||
forAll(faces, facei)
|
||||
{
|
||||
if
|
||||
(
|
||||
|
||||
@ -2,35 +2,35 @@ Notes for fluentMeshToFoam with zone preservation
|
||||
#################################################
|
||||
|
||||
1. New option added:
|
||||
- writeSets:
|
||||
- writeSets:
|
||||
Writes all Fluent boundaries faceSets preserving Fluent names
|
||||
Writes all Fluent regions to cellSets preserving Fluent names
|
||||
lines: 1375 - 1393 & 1673 - 1741
|
||||
sets are useful for post-processing using foamToVTK with the "-faceSet
|
||||
<name>" and "-cellSet <name>" options.
|
||||
|
||||
- writeZones:
|
||||
|
||||
- writeZones:
|
||||
Writes all regions to cellZones preserving Fluent names
|
||||
Writes all region internal face to faceZones preserving Fluent names
|
||||
Writes all region internal face to faceZones preserving Fluent names
|
||||
lines: 1545 - 1667
|
||||
Zones are usefull for porous media and MRF calculations
|
||||
|
||||
2. Zone Access
|
||||
- Zones are simple lists of label lists that can be accessed from polyMesh
|
||||
- Zones are simple lists of label lists that can be accessed from polyMesh
|
||||
with the cellZones(), faceZones() and pointZones() member functions
|
||||
|
||||
- Example (Members from polyMesh.H and ZoneMesh.H):
|
||||
label thisCellZoneID = mesh.cellZones().findZoneID("thisZoneName");
|
||||
const labelList& thisCellZone = mesh.cellZones()[thisCellZoneID];
|
||||
|
||||
|
||||
- Zone integrity is preserved during mesh modification and decompomposition.
|
||||
|
||||
- Once created via addZones, zones allow modification through non-const
|
||||
|
||||
- Once created via addZones, zones allow modification through non-const
|
||||
access
|
||||
|
||||
3. Fluent boundary types.
|
||||
- All internal and baffle elements are ignored during conversion
|
||||
|
||||
|
||||
- Boundary faces labelled as internal (i.e. interior, interface, internal,
|
||||
solid, fan, radiator, porous-jump) but that are in fact external boundaries
|
||||
will be added to a default wall boundary.
|
||||
|
||||
@ -155,7 +155,7 @@ cellShape create3DCellShape
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll (localFaces, meshFaceI)
|
||||
forAll(localFaces, meshFaceI)
|
||||
{
|
||||
if (localFaces[meshFaceI].size() == firstModelFace.size())
|
||||
{
|
||||
@ -166,7 +166,7 @@ cellShape create3DCellShape
|
||||
|
||||
meshFaceUsed[meshFaceI] = true;
|
||||
|
||||
forAll (curMeshFace, pointI)
|
||||
forAll(curMeshFace, pointI)
|
||||
{
|
||||
pointLabels[firstModelFace[pointI]] = curMeshFace[pointI];
|
||||
}
|
||||
@ -199,7 +199,7 @@ cellShape create3DCellShape
|
||||
found = false;
|
||||
|
||||
// Loop through mesh faces until a match is found
|
||||
forAll (localFaces, meshFaceI)
|
||||
forAll(localFaces, meshFaceI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -220,7 +220,7 @@ cellShape create3DCellShape
|
||||
// try matching the face
|
||||
label nMatchedLabels = 0;
|
||||
|
||||
forAll (meshFaceLabels, pointI)
|
||||
forAll(meshFaceLabels, pointI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -241,7 +241,7 @@ cellShape create3DCellShape
|
||||
if (found)
|
||||
{
|
||||
// match found. Insert mesh face
|
||||
forAll (meshFaceLabels, pointI)
|
||||
forAll(meshFaceLabels, pointI)
|
||||
{
|
||||
pointLabels[curModelFace[pointI]] =
|
||||
meshFaceLabels[pointI];
|
||||
|
||||
@ -73,7 +73,7 @@ cellShape extrudedQuadCellShape
|
||||
// make a list of outward-pointing faces
|
||||
labelListList localFaces(4);
|
||||
|
||||
forAll (faceLabels, faceI)
|
||||
forAll(faceLabels, faceI)
|
||||
{
|
||||
const label curFaceLabel = faceLabels[faceI];
|
||||
|
||||
@ -100,7 +100,7 @@ cellShape extrudedQuadCellShape
|
||||
{
|
||||
// Reverse the face. Note: it is necessary to reverse by
|
||||
// hand to preserve connectivity of a 2-D mesh.
|
||||
//
|
||||
//
|
||||
localFaces[faceI].setSize(curFace.size());
|
||||
|
||||
forAllReverse(curFace, i)
|
||||
|
||||
@ -75,7 +75,7 @@ cellShape extrudedTriangleCellShape
|
||||
// make a list of outward-pointing faces
|
||||
labelListList localFaces(3);
|
||||
|
||||
forAll (faceLabels, faceI)
|
||||
forAll(faceLabels, faceI)
|
||||
{
|
||||
const label curFaceLabel = faceLabels[faceI];
|
||||
|
||||
@ -102,7 +102,7 @@ cellShape extrudedTriangleCellShape
|
||||
{
|
||||
// Reverse the face. Note: it is necessary to reverse by
|
||||
// hand to preserve connectivity of a 2-D mesh.
|
||||
//
|
||||
//
|
||||
localFaces[faceI].setSize(curFace.size());
|
||||
|
||||
forAllReverse(curFace, i)
|
||||
|
||||
@ -490,7 +490,7 @@ endOfSection {space}")"{space}
|
||||
// set size of label list
|
||||
curFaceLabels.setSize(readLabel(mixedFaceStream));
|
||||
|
||||
forAll (curFaceLabels, i)
|
||||
forAll(curFaceLabels, i)
|
||||
{
|
||||
curFaceLabels[i] = readHexLabel(mixedFaceStream) - 1;
|
||||
}
|
||||
@ -511,7 +511,7 @@ endOfSection {space}")"{space}
|
||||
// for edge is 2, for triangle is 3 and for quad is 4
|
||||
curFaceLabels.setSize(faceGroupElementType);
|
||||
|
||||
forAll (curFaceLabels, i)
|
||||
forAll(curFaceLabels, i)
|
||||
{
|
||||
curFaceLabels[i] = readHexLabel(mixedFaceStream) - 1;
|
||||
}
|
||||
@ -867,9 +867,9 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("Fluent mesh file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::validOptions.insert("writeSets", "");
|
||||
argList::validOptions.insert("writeZones", "");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addBoolOption("writeSets");
|
||||
argList::addBoolOption("writeZones");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -915,14 +915,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
labelList nFacesInCell(nCells, 0);
|
||||
|
||||
forAll (cellFaces, celli)
|
||||
forAll(cellFaces, celli)
|
||||
{
|
||||
cellFaces[celli].setSize(fluentModelNFaces[fluentCellModelID[celli] ]);
|
||||
}
|
||||
|
||||
// fill in owner and neighbour
|
||||
|
||||
forAll (owner, faceI)
|
||||
forAll(owner, faceI)
|
||||
{
|
||||
if (owner[faceI] > -1)
|
||||
{
|
||||
@ -933,7 +933,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
forAll (neighbour, faceI)
|
||||
forAll(neighbour, faceI)
|
||||
{
|
||||
if (neighbour[faceI] > -1)
|
||||
{
|
||||
@ -976,7 +976,7 @@ int main(int argc, char *argv[])
|
||||
// points given by Fluent need to represent the FRONT plane of the
|
||||
// geometry. Therefore, the extrusion will be in -z direction
|
||||
//
|
||||
forAll (oldPoints, pointI)
|
||||
forAll(oldPoints, pointI)
|
||||
{
|
||||
points[nNewPoints] = oldPoints[pointI];
|
||||
|
||||
@ -985,7 +985,7 @@ int main(int argc, char *argv[])
|
||||
nNewPoints++;
|
||||
}
|
||||
|
||||
forAll (oldPoints, pointI)
|
||||
forAll(oldPoints, pointI)
|
||||
{
|
||||
points[nNewPoints] = oldPoints[pointI];
|
||||
|
||||
@ -1000,7 +1000,7 @@ int main(int argc, char *argv[])
|
||||
// Set the number of empty faces
|
||||
frontAndBackFaces.setSize(2*nCells);
|
||||
|
||||
forAll (fluentCellModelID, celli)
|
||||
forAll(fluentCellModelID, celli)
|
||||
{
|
||||
switch (fluentCellModelID[celli])
|
||||
{
|
||||
@ -1053,7 +1053,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Create new faces
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
|
||||
if (faces[faceI].size() != 2)
|
||||
@ -1078,7 +1078,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
// 3-D shape recognition
|
||||
Info<< "Creating shapes for 3-D cells"<< endl;
|
||||
forAll (fluentCellModelID, celli)
|
||||
forAll(fluentCellModelID, celli)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -1116,7 +1116,7 @@ int main(int argc, char *argv[])
|
||||
// area vector points into the domain. Turn them round before making patches
|
||||
// for Foam compatibility
|
||||
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
if (owner[faceI] == -1)
|
||||
{
|
||||
@ -1232,7 +1232,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
faceList patchFaces(faceGroupEndIndexIter() - faceLabel);
|
||||
|
||||
forAll (patchFaces, faceI)
|
||||
forAll(patchFaces, faceI)
|
||||
{
|
||||
if
|
||||
(
|
||||
|
||||
@ -113,7 +113,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
|
||||
const pointField& p = points();
|
||||
|
||||
forAll (p, pointI)
|
||||
forAll(p, pointI)
|
||||
{
|
||||
fluentMeshFile
|
||||
<< " "
|
||||
@ -135,7 +135,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
<< "(13 (2 1 "
|
||||
<< own.size() << " 2 0)" << std::endl << "(" << std::endl;
|
||||
|
||||
forAll (own, faceI)
|
||||
forAll(own, faceI)
|
||||
{
|
||||
const labelList& l = fcs[faceI];
|
||||
|
||||
@ -143,7 +143,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
|
||||
fluentMeshFile << l.size() << " ";
|
||||
|
||||
forAll (l, lI)
|
||||
forAll(l, lI)
|
||||
{
|
||||
fluentMeshFile << l[lI] + 1 << " ";
|
||||
}
|
||||
@ -157,7 +157,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
label nWrittenFaces = own.size();
|
||||
|
||||
// Writing boundary faces
|
||||
forAll (boundary(), patchI)
|
||||
forAll(boundary(), patchI)
|
||||
{
|
||||
const unallocFaceList& patchFaces = boundaryMesh()[patchI];
|
||||
|
||||
@ -190,7 +190,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
fluentMeshFile
|
||||
<<" 0)" << std::endl << "(" << std::endl;
|
||||
|
||||
forAll (patchFaces, faceI)
|
||||
forAll(patchFaces, faceI)
|
||||
{
|
||||
const labelList& l = patchFaces[faceI];
|
||||
|
||||
@ -225,7 +225,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
|
||||
bool hasWarned = false;
|
||||
|
||||
forAll (cells, cellI)
|
||||
forAll(cells, cellI)
|
||||
{
|
||||
if (cells[cellI].model() == tet)
|
||||
{
|
||||
@ -270,7 +270,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
fluentMeshFile << "(39 (2 interior interior-1)())" << std::endl;
|
||||
|
||||
// Writing boundary patch types
|
||||
forAll (boundary(), patchI)
|
||||
forAll(boundary(), patchI)
|
||||
{
|
||||
fluentMeshFile
|
||||
<< "(39 (" << patchI + 10 << " ";
|
||||
|
||||
@ -76,10 +76,27 @@ int main(int argc, char *argv[])
|
||||
argList::noParallel();
|
||||
timeSelector::addOptions();
|
||||
|
||||
argList::validOptions.insert("scale", "scale");
|
||||
argList::validOptions.insert("noBnd", "");
|
||||
argList::validOptions.insert("tri", "");
|
||||
argList::validOptions.insert("surface", "");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"specify geometry scaling factor - default is 1000 ([m] to [mm])"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noBnd",
|
||||
"suppress writing the .bnd file"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"tri",
|
||||
"Extract a triangulated surface. Implies -surface"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"surface",
|
||||
"extract the surface of the volume mesh only"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -583,7 +583,7 @@ mtype {space}"MTYPE:"{space}
|
||||
{
|
||||
scalarList patchFaceValues(nValuesForPatchFaces);
|
||||
|
||||
forAll (patchFaceValues, fI)
|
||||
forAll(patchFaceValues, fI)
|
||||
{
|
||||
patchFaceValues[fI] = readScalar(patchFacesStream);
|
||||
}
|
||||
@ -639,7 +639,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("GAMBIT file");
|
||||
argList::validOptions.insert("scale", "scale factor");
|
||||
argList::addOption("scale", "scale factor");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -673,7 +673,7 @@ int main(int argc, char *argv[])
|
||||
// make a point mapping array
|
||||
label maxPointIndex = 0;
|
||||
|
||||
forAll (pointMap, pointI)
|
||||
forAll(pointMap, pointI)
|
||||
{
|
||||
if (pointMap[pointI] > maxPointIndex)
|
||||
{
|
||||
@ -684,7 +684,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
labelList pointLookup(maxPointIndex + 1, -1);
|
||||
|
||||
forAll (pointMap, pointI)
|
||||
forAll(pointMap, pointI)
|
||||
{
|
||||
pointLookup[pointMap[pointI] ] = pointI;
|
||||
}
|
||||
@ -692,7 +692,7 @@ int main(int argc, char *argv[])
|
||||
// make a cell mapping array
|
||||
label maxCellIndex = 0;
|
||||
|
||||
forAll (cellMap, cellI)
|
||||
forAll(cellMap, cellI)
|
||||
{
|
||||
if (cellMap[cellI] > maxCellIndex)
|
||||
{
|
||||
@ -702,7 +702,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
labelList cellLookup(maxCellIndex + 1);
|
||||
|
||||
forAll (cellMap, cellI)
|
||||
forAll(cellMap, cellI)
|
||||
{
|
||||
cellLookup[cellMap[cellI] ] = cellI;
|
||||
}
|
||||
@ -719,7 +719,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
cellShapeList cells(cellLabels.size());
|
||||
|
||||
forAll (cellTypes, cellI)
|
||||
forAll(cellTypes, cellI)
|
||||
{
|
||||
const labelList& curCellLabels = cellLabels[cellI];
|
||||
|
||||
@ -798,7 +798,7 @@ int main(int argc, char *argv[])
|
||||
faceList& patchFaces = boundary[patchI];
|
||||
patchFaces.setSize(curCells.size());
|
||||
|
||||
forAll (curCells, faceI)
|
||||
forAll(curCells, faceI)
|
||||
{
|
||||
patchFaces[faceI] =
|
||||
cells[cellLookup[curCells[faceI] ] ].faces()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user