mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into develop
This commit is contained in:
@ -3,6 +3,9 @@
|
||||
|
||||
Before opening a new issue, make sure to search for keywords in the issues
|
||||
filtered by the "bug" label and check to see if it has already been reported
|
||||
|
||||
You can see how your report will be rendered on the platform by using the
|
||||
"preview" tab above
|
||||
-->
|
||||
|
||||
<!--
|
||||
@ -14,12 +17,10 @@
|
||||
|
||||
<!-- Summarize the bug encountered concisely -->
|
||||
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!-- How one can reproduce the issue - this is very important -->
|
||||
|
||||
|
||||
### Example case
|
||||
|
||||
<!--
|
||||
@ -29,17 +30,14 @@
|
||||
whether the bug has been fixed in a more recent version
|
||||
-->
|
||||
|
||||
|
||||
### What is the current *bug* behaviour?
|
||||
|
||||
<!-- What actually happens -->
|
||||
|
||||
|
||||
### What is the expected *correct* behavior?
|
||||
|
||||
<!-- What you should see instead -->
|
||||
|
||||
|
||||
### Relevant logs and/or images
|
||||
|
||||
<!--
|
||||
@ -47,7 +45,6 @@
|
||||
output, logs, and code as it's very hard to read otherwise.
|
||||
-->
|
||||
|
||||
|
||||
### Environment information
|
||||
|
||||
<!--
|
||||
@ -57,15 +54,20 @@
|
||||
Hardware info : any info that may help?
|
||||
Compiler : gcc|intel|clang etc
|
||||
-->
|
||||
OpenFOAM version :
|
||||
Operating system :
|
||||
Compiler :
|
||||
|
||||
- OpenFOAM version :
|
||||
- Operating system :
|
||||
- Hardware info :
|
||||
- Compiler :
|
||||
|
||||
### Possible fixes
|
||||
|
||||
<!--
|
||||
If you can, link to the line of code that might be responsible for the
|
||||
problem
|
||||
|
||||
The "/label ~bug" text is a gitlab flag that will add the "bug" label to this
|
||||
issue
|
||||
-->
|
||||
|
||||
/label ~bug
|
||||
|
||||
@ -622,11 +622,16 @@ Foam::label Foam::IOobjectList::filterClasses
|
||||
const bool pruning
|
||||
)
|
||||
{
|
||||
// return HashPtrTable<IOobject>::filterValues
|
||||
// (
|
||||
// [&](const IOobject* io){ return pred(io->headerClassName()); },
|
||||
// pruning
|
||||
// );
|
||||
// This is like
|
||||
// return HashPtrTable<IOobject>::filterValues
|
||||
// (
|
||||
// [&](const IOobject* io){ return pred(io->headerClassName()); },
|
||||
// pruning
|
||||
// );
|
||||
// which is really
|
||||
// return HashTable<IOobject*>::filterValues
|
||||
//
|
||||
// except that it does not leak
|
||||
|
||||
label changed = 0;
|
||||
|
||||
@ -654,7 +659,29 @@ Foam::label Foam::IOobjectList::filterObjects
|
||||
const bool pruning
|
||||
)
|
||||
{
|
||||
return HashPtrTable<IOobject>::filterKeys(pred, pruning);
|
||||
// This is like
|
||||
// return HashPtrTable<IOobject>::filterKeys(pred, pruning);
|
||||
// which is really
|
||||
// return HashTable<IOobject*>::filterKeys(pred, pruning);
|
||||
//
|
||||
// except that it does not leak
|
||||
|
||||
label changed = 0;
|
||||
|
||||
for (iterator iter = begin(); iter != end(); ++iter)
|
||||
{
|
||||
// Matches? either prune (pruning) or keep (!pruning)
|
||||
if
|
||||
(
|
||||
(pred(iter.key()) ? pruning : !pruning)
|
||||
&& erase(iter)
|
||||
)
|
||||
{
|
||||
++changed;
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -299,7 +299,7 @@ Foam::DimensionedField<Type, GeoMesh>::DimensionedField
|
||||
const DimensionedField<Type, GeoMesh>& df
|
||||
)
|
||||
:
|
||||
regIOobject(newName, df, newName == df.name()),
|
||||
regIOobject(newName, df, newName != df.name()),
|
||||
Field<Type>(df),
|
||||
mesh_(df.mesh_),
|
||||
dimensions_(df.dimensions_),
|
||||
|
||||
@ -413,14 +413,14 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
scalarField lambdaTa4(pow4((1 - TpLambda)*Ta));
|
||||
|
||||
hp += emissivity_*sigma.value()*(pow4(Ts) - lambdaTa4)/Tp;
|
||||
hpTa += sigma.value()*(emissivity_*lambdaTa4 + pow4(Ta));
|
||||
hpTa += emissivity_*sigma.value()*(lambdaTa4 + pow4(Ta));
|
||||
}
|
||||
else
|
||||
{
|
||||
// ... if there is no solid wall thermal resistance use
|
||||
// the current wall temperature
|
||||
hp += emissivity_*sigma.value()*pow3(Tp);
|
||||
hpTa += sigma.value()*pow4(Ta);
|
||||
hpTa += emissivity_*sigma.value()*pow4(Ta);
|
||||
}
|
||||
}
|
||||
|
||||
@ -456,20 +456,14 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
|
||||
if (debug)
|
||||
{
|
||||
const scalar Q = gSum(kappa(Tp)*patch().magSf()*snGrad());
|
||||
|
||||
Info<< patch().boundaryMesh().mesh().name() << ':'
|
||||
<< patch().name() << ':'
|
||||
<< internalField().name() << " :"
|
||||
<< " heat transfer rate:" << Q
|
||||
<< " wall temperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this)
|
||||
<< endl;
|
||||
}
|
||||
DebugInfo
|
||||
<< patch().boundaryMesh().mesh().name() << ':' << patch().name() << ':'
|
||||
<< internalField().name() << " :"
|
||||
<< " heat transfer rate:" << gSum(kappa(Tp)*patch().magSf()*snGrad())
|
||||
<< " wall temperature "
|
||||
<< " min:" << gMin(*this)
|
||||
<< " max:" << gMax(*this)
|
||||
<< " avg:" << gAverage(*this) << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -42,15 +42,14 @@ License
|
||||
#include "vtkSmartPointer.h"
|
||||
#include "vtkLight.h"
|
||||
|
||||
#include "vtkDummyController.h"
|
||||
|
||||
#ifdef FOAM_USING_VTK_MPI
|
||||
# include "vtkMPICommunicator.h"
|
||||
# include "vtkMPIController.h"
|
||||
# include "vtkCompositedSynchronizedRenderers.h"
|
||||
# include "vtkSynchronizedRenderWindows.h"
|
||||
#endif
|
||||
#include "vtkDummyController.h"
|
||||
|
||||
#include "vtkSynchronizedRenderWindows.h"
|
||||
#include "vtkCompositedSynchronizedRenderers.h"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -137,27 +136,21 @@ void Foam::functionObjects::runTimePostProcessing::render
|
||||
Log << name() << " render" << endl;
|
||||
}
|
||||
|
||||
|
||||
// Normal rendering elements
|
||||
vtkSmartPointer<vtkRenderer> renderer;
|
||||
vtkSmartPointer<vtkRenderWindow> renderWindow;
|
||||
|
||||
// Multi-process synchronization
|
||||
vtkSmartPointer<vtkSynchronizedRenderWindows> syncWindows;
|
||||
vtkSmartPointer<vtkCompositedSynchronizedRenderers> syncRenderers;
|
||||
|
||||
|
||||
// Disable any floating point trapping
|
||||
// (some low-level rendering functionality does not like it)
|
||||
|
||||
sigFpe::ignore sigFpeHandling; //<- disable in local scope
|
||||
|
||||
|
||||
// Normal rendering elements
|
||||
vtkSmartPointer<vtkRenderer> renderer;
|
||||
vtkSmartPointer<vtkRenderWindow> renderWindow;
|
||||
|
||||
// Initialise render window
|
||||
if (controller || Pstream::master())
|
||||
{
|
||||
renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
|
||||
renderer = vtkSmartPointer<vtkRenderer>::New();
|
||||
renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
|
||||
|
||||
renderWindow->OffScreenRenderingOn();
|
||||
renderWindow->SetSize(output_.width_, output_.height_);
|
||||
@ -174,15 +167,22 @@ void Foam::functionObjects::runTimePostProcessing::render
|
||||
renderWindow->AddRenderer(renderer);
|
||||
}
|
||||
|
||||
// Synchronization
|
||||
|
||||
// ---------------------
|
||||
#ifdef FOAM_USING_VTK_MPI
|
||||
|
||||
// Multi-process synchronization
|
||||
vtkSmartPointer<vtkCompositedSynchronizedRenderers> syncRenderers;
|
||||
vtkSmartPointer<vtkSynchronizedRenderWindows> syncWindows;
|
||||
|
||||
if (controller)
|
||||
{
|
||||
syncWindows =
|
||||
vtkSmartPointer<vtkSynchronizedRenderWindows>::New();
|
||||
|
||||
syncRenderers =
|
||||
vtkSmartPointer<vtkCompositedSynchronizedRenderers>::New();
|
||||
|
||||
syncWindows =
|
||||
vtkSmartPointer<vtkSynchronizedRenderWindows>::New();
|
||||
|
||||
syncWindows->SetRenderWindow(renderWindow);
|
||||
syncWindows->SetParallelController(controller);
|
||||
syncWindows->SetIdentifier(1);
|
||||
@ -193,7 +193,7 @@ void Foam::functionObjects::runTimePostProcessing::render
|
||||
syncRenderers->SetRenderer(renderer);
|
||||
syncRenderers->SetParallelController(controller);
|
||||
}
|
||||
|
||||
#endif
|
||||
// ---------------------
|
||||
|
||||
scene_.initialise(renderer, output_.name_);
|
||||
|
||||
Reference in New Issue
Block a user