Skip to content
Snippets Groups Projects
Commit 9c9088f1 authored by Andrew Heather's avatar Andrew Heather Committed by Mark OLESEN
Browse files

ENH: CloudSubModelBase - added info() function to set log flag

parent 1f393aef
No related branches found
No related tags found
1 merge request!583ENH: added option to control log frequency of lagrangian calculations
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -35,7 +36,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase(CloudType& owner) ...@@ -35,7 +36,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase(CloudType& owner)
: :
subModelBase(owner.outputProperties()), subModelBase(owner.outputProperties()),
owner_(owner) owner_(owner)
{} {
this->log = owner_.solution().log();
}
template<class CloudType> template<class CloudType>
...@@ -57,7 +60,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase ...@@ -57,7 +60,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase
dictExt dictExt
), ),
owner_(owner) owner_(owner)
{} {
this->log = owner_.solution().log();
}
template<class CloudType> template<class CloudType>
...@@ -79,7 +84,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase ...@@ -79,7 +84,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase
modelType modelType
), ),
owner_(owner) owner_(owner)
{} {
this->log = owner_.solution().log();
}
template<class CloudType> template<class CloudType>
...@@ -90,14 +97,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase ...@@ -90,14 +97,9 @@ Foam::CloudSubModelBase<CloudType>::CloudSubModelBase
: :
subModelBase(smb), subModelBase(smb),
owner_(smb.owner_) owner_(smb.owner_)
{} {
this->log = owner_.solution().log();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType>
Foam::CloudSubModelBase<CloudType>::~CloudSubModelBase()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
...@@ -138,6 +140,13 @@ Foam::fileName Foam::CloudSubModelBase<CloudType>::localPath() const ...@@ -138,6 +140,13 @@ Foam::fileName Foam::CloudSubModelBase<CloudType>::localPath() const
} }
template<class CloudType>
void Foam::CloudSubModelBase<CloudType>::info()
{
this->log = owner_.solution().log();
}
template<class CloudType> template<class CloudType>
void Foam::CloudSubModelBase<CloudType>::write(Ostream& os) const void Foam::CloudSubModelBase<CloudType>::write(Ostream& os) const
{ {
......
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
//- Destructor //- Destructor
virtual ~CloudSubModelBase(); virtual ~CloudSubModelBase() = default;
//- Type of cloud this model was instantiated for //- Type of cloud this model was instantiated for
typedef CloudType cloudType; typedef CloudType cloudType;
...@@ -121,7 +121,10 @@ public: ...@@ -121,7 +121,10 @@ public:
// I-O // I-O
//- Write //- Write to info
virtual void info();
//- Write to os
virtual void write(Ostream& os) const; virtual void write(Ostream& os) const;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment