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:
@ -62,7 +62,7 @@ Foam::tmp<Foam::Field<Type>> filterFarPoints
|
||||
)
|
||||
{
|
||||
tmp<Field<Type>> tNewField(new Field<Type>(field.size()));
|
||||
Field<Type>& newField = tNewField();
|
||||
Field<Type>& newField = tNewField.ref();
|
||||
|
||||
label added = 0;
|
||||
label count = 0;
|
||||
@ -160,7 +160,7 @@ Foam::tmp<Foam::triadField> buildAlignmentField(const T& mesh)
|
||||
(
|
||||
new triadField(mesh.vertexCount(), triad::unset)
|
||||
);
|
||||
triadField& alignments = tAlignments();
|
||||
triadField& alignments = tAlignments.ref();
|
||||
|
||||
for
|
||||
(
|
||||
@ -188,7 +188,7 @@ Foam::tmp<Foam::pointField> buildPointField(const T& mesh)
|
||||
(
|
||||
new pointField(mesh.vertexCount(), point(GREAT, GREAT, GREAT))
|
||||
);
|
||||
pointField& points = tPoints();
|
||||
pointField& points = tPoints.ref();
|
||||
|
||||
for
|
||||
(
|
||||
|
||||
@ -24,6 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "DelaunayMesh.H"
|
||||
#include "polyMesh.H"
|
||||
#include "labelPair.H"
|
||||
#include "PrintTable.H"
|
||||
#include "pointIOField.H"
|
||||
|
||||
@ -35,7 +35,7 @@ Foam::tmp<Foam::Field<Type>> Foam::smoothAlignmentSolver::filterFarPoints
|
||||
)
|
||||
{
|
||||
tmp<Field<Type>> tNewField(new Field<Type>(field.size()));
|
||||
Field<Type>& newField = tNewField();
|
||||
Field<Type>& newField = tNewField.ref();
|
||||
|
||||
label added = 0;
|
||||
label count = 0;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -92,8 +92,9 @@ Foam::autoPtr<Foam::OFstream> Foam::functionObjects::writeFile::createFile
|
||||
|
||||
if (Pstream::master() && writeToFile_)
|
||||
{
|
||||
const scalar timeNow = fileObr_.time().timeOutputValue();
|
||||
const word startTimeName = Time::timeName(timeNow);
|
||||
const scalar startTime = fileObr_.time().startTime().value();
|
||||
const scalar userStartTime = fileObr_.time().timeToUserTime(startTime);
|
||||
const word startTimeName = Time::timeName(userStartTime);
|
||||
|
||||
fileName outputDir(baseFileDir()/prefix_/startTimeName);
|
||||
|
||||
|
||||
@ -416,7 +416,8 @@ void Foam::timeVaryingMappedFixedValueFvPatchField<Type>::checkTable()
|
||||
// Reread values and interpolate
|
||||
fileName valsFile
|
||||
(
|
||||
this->db().time().caseConstant()
|
||||
this->db().time().path()
|
||||
/this->db().time().caseConstant()
|
||||
/"boundaryData"
|
||||
/this->patch().name()
|
||||
/sampleTimes_[endSampleTime_].name()
|
||||
|
||||
@ -131,6 +131,21 @@ void Foam::functionObjects::runTimePostPro::scene::readColours
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::runTimePostPro::scene::setActorVisibility
|
||||
(
|
||||
vtkRenderer* renderer,
|
||||
const bool visible
|
||||
) const
|
||||
{
|
||||
vtkActorCollection *actors = renderer->GetActors();
|
||||
for (int i = 0; i < actors->GetNumberOfItems(); ++i)
|
||||
{
|
||||
vtkActor *actor = vtkActor::SafeDownCast(actors->GetItemAsObject(i));
|
||||
actor->SetVisibility(visible);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::functionObjects::runTimePostPro::scene::initialise
|
||||
(
|
||||
vtkRenderer* renderer,
|
||||
@ -239,9 +254,13 @@ void Foam::functionObjects::runTimePostPro::scene::setCamera
|
||||
// to be done once on initialisation
|
||||
if (!clipBox_.empty())
|
||||
{
|
||||
// Call ResetCamera() to fit clip box in view
|
||||
setActorVisibility(renderer, false);
|
||||
clipBoxActor_->VisibilityOn();
|
||||
|
||||
// Call ResetCamera() to fit clip box in view
|
||||
renderer->ResetCamera();
|
||||
|
||||
setActorVisibility(renderer, true);
|
||||
clipBoxActor_->VisibilityOff();
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -105,6 +105,13 @@ class scene
|
||||
//- Read colour properties
|
||||
void readColours(const dictionary& dict);
|
||||
|
||||
//- Set visibility of all actors on/off
|
||||
void setActorVisibility
|
||||
(
|
||||
vtkRenderer* renderer,
|
||||
const bool visible
|
||||
) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
scene(const scene&);
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ boundaryField
|
||||
type waveTransmissive;
|
||||
field p;
|
||||
psi thermo:psi;
|
||||
gamma 1.3;
|
||||
gamma 1.4;
|
||||
fieldInf $pressure;
|
||||
lInf 1;
|
||||
value $internalField;
|
||||
|
||||
Reference in New Issue
Block a user