Skip to content
Snippets Groups Projects
Commit ac099d82 authored by Andrew Heather's avatar Andrew Heather
Browse files

Merge remote-tracking branch 'origin/master' into develop

parents fb969272 530a5192
Branches
Tags
1 merge request!695OpenFOAM v2406
...@@ -43,7 +43,7 @@ Type Foam::functionObjects::extractEulerianParticles::faceValue ...@@ -43,7 +43,7 @@ Type Foam::functionObjects::extractEulerianParticles::faceValue
{ {
label patchi = patchIDs_[localFacei]; label patchi = patchIDs_[localFacei];
label pFacei = patchFaceIDs_[localFacei]; label pFacei = patchFaceIDs_[localFacei];
if (patchi != 0) if (patchi != -1)
{ {
return field.boundaryField()[patchi][pFacei]; return field.boundaryField()[patchi][pFacei];
} }
......
...@@ -302,7 +302,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields ...@@ -302,7 +302,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields
TFilmPatch_ = film.Tf().primitiveField(); TFilmPatch_ = film.Tf().primitiveField();
// Direct copy (one-to-one mapping) // Direct copy (one-to-one mapping)
TFilmPatch_ = film.Cp().primitiveField(); CpFilmPatch_ = film.Cp().primitiveField();
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd. Copyright (C) 2021-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -70,7 +70,7 @@ static tmp<vectorField> getBoundedColours ...@@ -70,7 +70,7 @@ static tmp<vectorField> getBoundedColours
const scalar boundMax const scalar boundMax
) )
{ {
const label boundDelta = (boundMax - boundMin + ROOTVSMALL); const scalar boundDelta = (boundMax - boundMin + ROOTVSMALL);
auto tresult = tmp<vectorField>::New(field.size()); auto tresult = tmp<vectorField>::New(field.size());
auto& result = tresult.ref(); auto& result = tresult.ref();
...@@ -167,7 +167,7 @@ Foam::scalarMinMax Foam::coordSetWriters::gltfWriter::getFieldLimits ...@@ -167,7 +167,7 @@ Foam::scalarMinMax Foam::coordSetWriters::gltfWriter::getFieldLimits
{ {
const dictionary fieldDict = fieldInfoDict_.subOrEmptyDict(fieldName); const dictionary fieldDict = fieldInfoDict_.subOrEmptyDict(fieldName);
scalarMinMax limits; scalarMinMax limits(-GREAT, GREAT);
fieldDict.readIfPresent("min", limits.min()); fieldDict.readIfPresent("min", limits.min());
fieldDict.readIfPresent("max", limits.max()); fieldDict.readIfPresent("max", limits.max());
...@@ -191,7 +191,7 @@ Foam::coordSetWriters::gltfWriter::getAlphaField ...@@ -191,7 +191,7 @@ Foam::coordSetWriters::gltfWriter::getAlphaField
{ {
// Not specified // Not specified
} }
else if (!eptr->stream().peek().isString()) else if (!eptr->stream().peek().isWord())
{ {
// Value specified // Value specified
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd. Copyright (C) 2021-2024 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -45,24 +45,27 @@ Description ...@@ -45,24 +45,27 @@ Description
\verbatim \verbatim
formatOptions formatOptions
{ {
// Apply colours flag (yes | no ) [optional] gltf
colours yes;
// List of options per field
fieldInfo
{ {
p // Apply colours flag (yes | no ) [optional]
{ colour yes;
// Colour map [optional]
colourMap <colourMap>;
// Colour map minimum and maximum limits [optional]
// Uses field min and max if not specified
min 0;
max 1;
// Alpha channel [optional] (<scalar>) // List of options per field
alpha 0.5; fieldInfo
{
p
{
// Colour map [optional]
colourMap <colourMap>;
// Colour map minimum and maximum limits [optional]
// Uses field min and max if not specified
min 0;
max 1;
// Alpha channel [optional] (<scalar>)
alpha 0.5;
}
} }
} }
} }
...@@ -73,35 +76,38 @@ Description ...@@ -73,35 +76,38 @@ Description
\verbatim \verbatim
formatOptions formatOptions
{ {
// Apply colours flag (yes | no) [optional] gltf
colours yes; {
// Apply colours flag (yes | no) [optional]
colour yes;
// Animate tracks (yes | no) [optional] // Animate tracks (yes | no) [optional]
animate yes; animate yes;
// Animation properties [optional] // Animation properties [optional]
animationInfo animationInfo
{ {
// Colour map [optional] // Colour map [optional]
colourMap <colourMap>; colourMap <colourMap>;
// Colour [optional] (<vector> | uniform | field) // Colour [optional] (<vector> | uniform | field)
colour (1 0 0); // RGB in range [0-1] colour (1 0 0); // RGB in range [0-1]
//colour uniform; //colour uniform;
//colourValue (1 0 0); // RGB in range [0-1] //colourValue (1 0 0); // RGB in range [0-1]
//colour field; //colour field;
//colourField d; //colourField d;
// Colour map minimum and maximum limits [optional] // Colour map minimum and maximum limits [optional]
// Note: for colour = field option // Note: for colour = field option
// Uses field min and max if not specified // Uses field min and max if not specified
min 0; min 0;
max 1; max 1;
// Alpha channel [optional] (<scalar>) // Alpha channel [optional] (<scalar>)
alpha 0.5; alpha 0.5;
}
} }
} }
\endverbatim \endverbatim
......
...@@ -420,19 +420,21 @@ void Foam::incompressibleAdjointSolver::accumulateBCSensitivityIntegrand ...@@ -420,19 +420,21 @@ void Foam::incompressibleAdjointSolver::accumulateBCSensitivityIntegrand
fvPatchVectorField& Uab = UaBoundary[patchI]; fvPatchVectorField& Uab = UaBoundary[patchI];
if (isA<adjointVectorBoundaryCondition>(Uab)) if (isA<adjointVectorBoundaryCondition>(Uab))
{ {
const fvPatch& patch = mesh_.boundary()[patchI]; tmp<tensorField> dxdbMult =
tmp<vectorField> tnf = patch.nf(); refCast<adjointVectorBoundaryCondition>(Uab).dxdbMult();
const scalarField& magSf = patch.magSf(); if (dxdbMult)
{
tmp<vectorField> DvDbMult = const fvPatch& patch = mesh_.boundary()[patchI];
nuEffBoundary[patchI]*(Uab.snGrad() + (gradUabf[patchI] & tnf)) tmp<vectorField> tnf = patch.nf();
// - (nf*pa.boundaryField()[patchI]) const scalarField& magSf = patch.magSf();
+ adjointTurbulence().adjointMomentumBCSource()[patchI];
bcDxDbMult()[patchI] += tmp<vectorField> DvDbMult =
( nuEffBoundary[patchI]
DvDbMult *(Uab.snGrad() + (gradUabf[patchI] & tnf))
& refCast<adjointVectorBoundaryCondition>(Uab).dxdbMult() // - (nf*pa.boundaryField()[patchI])
)*magSf*dt; + adjointTurbulence().adjointMomentumBCSource()[patchI];
bcDxDbMult()[patchI] += (DvDbMult & dxdbMult())*magSf*dt;
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment