change of namespace from pFlow to pFlow::postprocessData
This commit is contained in:
parent
d5ea338ab3
commit
be807e4a71
|
@ -24,7 +24,7 @@ Licence:
|
|||
#include "types.hpp"
|
||||
#include "span.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -26,20 +26,24 @@ Licence:
|
|||
#include "fieldFunctions.hpp"
|
||||
#include "dictionary.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
bool pointFieldGetType(const word& TYPENAME, word& fieldType, word& fieldSpace);
|
||||
|
||||
}
|
||||
|
||||
bool pFlow::fieldsDataBase::loadPointStructureToTime()
|
||||
bool pFlow::postprocessData::fieldsDataBase::loadPointStructureToTime()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool pFlow::fieldsDataBase::checkForUpdate(const word &compoundName, bool forceUpdate)
|
||||
bool pFlow::postprocessData::fieldsDataBase::checkForUpdate
|
||||
(
|
||||
const word &compoundName,
|
||||
bool forceUpdate
|
||||
)
|
||||
{
|
||||
auto t = currentTime();
|
||||
bool shouldUpdate = false;
|
||||
|
@ -58,7 +62,10 @@ bool pFlow::fieldsDataBase::checkForUpdate(const word &compoundName, bool forceU
|
|||
return shouldUpdate;
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetRealField(const word &name)
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetRealField
|
||||
(
|
||||
const word &name
|
||||
)
|
||||
{
|
||||
|
||||
bool shouldUpdate = checkForUpdate(name);
|
||||
|
@ -83,7 +90,10 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetRealField(const word
|
|||
field.size());
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetVolume(bool forceUpdate)
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetVolume
|
||||
(
|
||||
bool forceUpdate
|
||||
)
|
||||
{
|
||||
const word fName = "volume";
|
||||
bool shouldUpdate = checkForUpdate(fName, forceUpdate);
|
||||
|
@ -119,7 +129,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetVolume(bool forceUpda
|
|||
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetDensity(bool forceUpdate)
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetDensity(bool forceUpdate)
|
||||
{
|
||||
const word fName = "density";
|
||||
|
||||
|
@ -155,7 +165,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetDensity(bool forceUpd
|
|||
field.size());
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetOne(bool forceUpdate)
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetOne(bool forceUpdate)
|
||||
{
|
||||
const word fName = "one";
|
||||
|
||||
|
@ -182,7 +192,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetOne(bool forceUpdate)
|
|||
field.size());
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetMass(bool forceUpdate)
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetMass(bool forceUpdate)
|
||||
{
|
||||
const word fName = "mass";
|
||||
|
||||
|
@ -218,7 +228,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetMass(bool forceUpdate
|
|||
field.size());
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetI(bool forceUpdate)
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::createOrGetI(bool forceUpdate)
|
||||
{
|
||||
const word fName = "I";
|
||||
|
||||
|
@ -254,7 +264,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::createOrGetI(bool forceUpdate)
|
|||
field.size());
|
||||
}
|
||||
|
||||
bool pFlow::fieldsDataBase::findFunction(
|
||||
bool pFlow::postprocessData::fieldsDataBase::findFunction(
|
||||
const word &compoundFieldName,
|
||||
word &fieldName,
|
||||
fieldsDataBase::Functions &func)
|
||||
|
@ -360,7 +370,7 @@ bool pFlow::fieldsDataBase::findFunction(
|
|||
return false; // No match
|
||||
}
|
||||
|
||||
bool pFlow::fieldsDataBase::inputOutputType
|
||||
bool pFlow::postprocessData::fieldsDataBase::inputOutputType
|
||||
(
|
||||
fieldsDataBase::Functions func,
|
||||
const word &inputType,
|
||||
|
@ -458,7 +468,7 @@ bool pFlow::fieldsDataBase::inputOutputType
|
|||
return false;
|
||||
}
|
||||
|
||||
pFlow::fieldsDataBase::fieldsDataBase
|
||||
pFlow::postprocessData::fieldsDataBase::fieldsDataBase
|
||||
(
|
||||
systemControl& control,
|
||||
const dictionary& postDict,
|
||||
|
@ -488,12 +498,12 @@ pFlow::fieldsDataBase::fieldsDataBase
|
|||
}
|
||||
}
|
||||
|
||||
pFlow::timeValue pFlow::fieldsDataBase::currentTime() const
|
||||
pFlow::timeValue pFlow::postprocessData::fieldsDataBase::currentTime() const
|
||||
{
|
||||
return time_.currentTime();
|
||||
}
|
||||
|
||||
bool pFlow::fieldsDataBase::getFieldTypeNameFunction
|
||||
bool pFlow::postprocessData::fieldsDataBase::getFieldTypeNameFunction
|
||||
(
|
||||
const word& compoundName,
|
||||
word& pointFieldName,
|
||||
|
@ -543,7 +553,7 @@ bool pFlow::fieldsDataBase::getFieldTypeNameFunction
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::fieldsDataBase::getFieldType
|
||||
bool pFlow::postprocessData::fieldsDataBase::getFieldType
|
||||
(
|
||||
const word& compoundName,
|
||||
word& originalType,
|
||||
|
@ -559,7 +569,7 @@ bool pFlow::fieldsDataBase::getFieldType
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::fieldsDataBase::getFieldType
|
||||
bool pFlow::postprocessData::fieldsDataBase::getFieldType
|
||||
(
|
||||
const word &compoundName,
|
||||
word &typeAfterFunction
|
||||
|
@ -575,7 +585,7 @@ bool pFlow::fieldsDataBase::getFieldType
|
|||
return true;
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updatePoints(bool forceUpdate)
|
||||
pFlow::span<pFlow::realx3> pFlow::postprocessData::fieldsDataBase::updatePoints(bool forceUpdate)
|
||||
{
|
||||
const word fName = "position";
|
||||
bool shouldUpdate = checkForUpdate(fName, forceUpdate);
|
||||
|
@ -604,7 +614,7 @@ pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updatePoints(bool forceUpdate)
|
|||
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updateFieldRealx3
|
||||
pFlow::span<pFlow::realx3> pFlow::postprocessData::fieldsDataBase::updateFieldRealx3
|
||||
(
|
||||
const word &compoundName,
|
||||
bool forceUpdate
|
||||
|
@ -640,7 +650,7 @@ pFlow::span<pFlow::realx3> pFlow::fieldsDataBase::updateFieldRealx3
|
|||
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::realx4> pFlow::fieldsDataBase::updateFieldRealx4
|
||||
pFlow::span<pFlow::realx4> pFlow::postprocessData::fieldsDataBase::updateFieldRealx4
|
||||
(
|
||||
const word &compoundName,
|
||||
bool forceUpdate
|
||||
|
@ -676,7 +686,7 @@ pFlow::span<pFlow::realx4> pFlow::fieldsDataBase::updateFieldRealx4
|
|||
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::real> pFlow::fieldsDataBase::updateFieldReal
|
||||
pFlow::span<pFlow::real> pFlow::postprocessData::fieldsDataBase::updateFieldReal
|
||||
(
|
||||
const word &compoundName,
|
||||
bool forceUpdate
|
||||
|
@ -843,7 +853,7 @@ pFlow::span<pFlow::real> pFlow::fieldsDataBase::updateFieldReal
|
|||
return span<real>(nullptr, 0);
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::fieldsDataBase::updateFieldUint32
|
||||
pFlow::span<pFlow::uint32> pFlow::postprocessData::fieldsDataBase::updateFieldUint32
|
||||
(
|
||||
const word& name,
|
||||
bool forceUpdate
|
||||
|
@ -852,7 +862,7 @@ pFlow::span<pFlow::uint32> pFlow::fieldsDataBase::updateFieldUint32
|
|||
return updateField<uint32>(name, forceUpdate);
|
||||
}
|
||||
|
||||
pFlow::allPointFieldTypes pFlow::fieldsDataBase::updateFieldAll
|
||||
pFlow::postprocessData::allPointFieldTypes pFlow::postprocessData::fieldsDataBase::updateFieldAll
|
||||
(
|
||||
const word &compoundName,
|
||||
bool forceUpdate
|
||||
|
@ -890,8 +900,8 @@ pFlow::allPointFieldTypes pFlow::fieldsDataBase::updateFieldAll
|
|||
|
||||
|
||||
|
||||
pFlow::uniquePtr<pFlow::fieldsDataBase>
|
||||
pFlow::fieldsDataBase::create
|
||||
pFlow::uniquePtr<pFlow::postprocessData::fieldsDataBase>
|
||||
pFlow::postprocessData::fieldsDataBase::create
|
||||
(
|
||||
systemControl& control,
|
||||
const dictionary& postDict,
|
||||
|
@ -931,7 +941,12 @@ pFlow::uniquePtr<pFlow::fieldsDataBase>
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool pFlow::pointFieldGetType(const word& TYPENAME, word& fieldType, word& fieldSpace)
|
||||
bool pFlow::postprocessData::pointFieldGetType
|
||||
(
|
||||
const word& TYPENAME,
|
||||
word& fieldType,
|
||||
word& fieldSpace
|
||||
)
|
||||
{
|
||||
std::regex match("pointField\\<([A-Za-z1-9_]*)\\,([A-Za-z1-9_]*)\\>");
|
||||
std::smatch search;
|
||||
|
|
|
@ -29,13 +29,15 @@ Licence:
|
|||
#include "Map.hpp"
|
||||
#include "shape.hpp"
|
||||
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
class dictionary;
|
||||
class systemControl;
|
||||
class Time;
|
||||
}
|
||||
|
||||
class dictionary;
|
||||
class systemControl;
|
||||
class Time;
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
class fieldsDataBase
|
||||
|
@ -311,7 +313,7 @@ public:
|
|||
timeValue startTime);
|
||||
};
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#include "fieldsDataBaseTemplates.cpp"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "types.hpp"
|
||||
#include "span.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ Licence:
|
|||
|
||||
#include "fieldsDataBase.hpp"
|
||||
|
||||
template<pFlow::ValidFieldType T>
|
||||
template<pFlow::postprocessData::ValidFieldType T>
|
||||
inline
|
||||
pFlow::span<T> pFlow::fieldsDataBase::updateField(const word& name, bool forceUpdate)
|
||||
pFlow::span<T> pFlow::postprocessData::fieldsDataBase::updateField(const word& name, bool forceUpdate)
|
||||
{
|
||||
|
||||
bool shouldUpdate = checkForUpdate(name, forceUpdate);
|
||||
|
@ -40,8 +40,8 @@ pFlow::span<T> pFlow::fieldsDataBase::updateField(const word& name, bool forceUp
|
|||
{
|
||||
if( loadPointFieldToTime(name) )
|
||||
{
|
||||
const auto& pField = time_.lookupObject<pointField_D<T>>(name);
|
||||
allFields_.emplaceBackOrReplace<FieldTypeHost<T>>(
|
||||
const auto& pField = time_.template lookupObject<pointField_D<T>>(name);
|
||||
allFields_.template emplaceBackOrReplace<FieldTypeHost<T>>(
|
||||
name,
|
||||
pField.activeValuesHost());
|
||||
}
|
||||
|
@ -63,9 +63,9 @@ pFlow::span<T> pFlow::fieldsDataBase::updateField(const word& name, bool forceUp
|
|||
}
|
||||
|
||||
|
||||
template<pFlow::ValidFieldType T>
|
||||
template<pFlow::postprocessData::ValidFieldType T>
|
||||
inline
|
||||
pFlow::span<T> pFlow::fieldsDataBase::updateReservedField
|
||||
pFlow::span<T> pFlow::postprocessData::fieldsDataBase::updateReservedField
|
||||
(
|
||||
const word& name,
|
||||
bool forceUpdate
|
||||
|
|
|
@ -8,29 +8,32 @@ namespace pFlow
|
|||
bool pointFieldGetType(const word& TYPENAME, word& fieldType, word& fieldSpace);
|
||||
}
|
||||
|
||||
bool pFlow::simulationFieldsDataBase::pointFieldNameExists(const word &name) const
|
||||
bool pFlow::postprocessData::simulationFieldsDataBase::pointFieldNameExists(const word &name) const
|
||||
{
|
||||
return time().lookupObjectName(name);
|
||||
}
|
||||
|
||||
bool pFlow::simulationFieldsDataBase::loadPointFieldToTime(const word &name)
|
||||
bool pFlow::postprocessData::simulationFieldsDataBase::loadPointFieldToTime(const word &name)
|
||||
{
|
||||
return time().lookupObjectName(name);
|
||||
}
|
||||
|
||||
bool pFlow::simulationFieldsDataBase::loadPointStructureToTime()
|
||||
bool pFlow::postprocessData::simulationFieldsDataBase::loadPointStructureToTime()
|
||||
{
|
||||
// it is already in the Time object
|
||||
return time().lookupObjectName(pointStructureFile__);
|
||||
}
|
||||
|
||||
|
||||
const pFlow::shape& pFlow::simulationFieldsDataBase::getShape() const
|
||||
const pFlow::shape& pFlow::postprocessData::simulationFieldsDataBase::getShape() const
|
||||
{
|
||||
return shape_;
|
||||
}
|
||||
|
||||
pFlow::word pFlow::simulationFieldsDataBase::getPointFieldType(const word &name) const
|
||||
pFlow::word pFlow::postprocessData::simulationFieldsDataBase::getPointFieldType
|
||||
(
|
||||
const word &name
|
||||
) const
|
||||
{
|
||||
word pfType = time().lookupObjectTypeName(name);
|
||||
word type, space;
|
||||
|
@ -44,7 +47,7 @@ pFlow::word pFlow::simulationFieldsDataBase::getPointFieldType(const word &name)
|
|||
return type;
|
||||
}
|
||||
|
||||
pFlow::simulationFieldsDataBase::simulationFieldsDataBase
|
||||
pFlow::postprocessData::simulationFieldsDataBase::simulationFieldsDataBase
|
||||
(
|
||||
systemControl &control,
|
||||
const dictionary& postDict,
|
||||
|
@ -60,7 +63,7 @@ pFlow::simulationFieldsDataBase::simulationFieldsDataBase
|
|||
{
|
||||
}
|
||||
|
||||
const pFlow::pointStructure &pFlow::simulationFieldsDataBase::pStruct() const
|
||||
const pFlow::pointStructure &pFlow::postprocessData::simulationFieldsDataBase::pStruct() const
|
||||
{
|
||||
return
|
||||
static_cast<const pointStructure&>
|
||||
|
|
|
@ -23,7 +23,7 @@ Licence:
|
|||
|
||||
#include "fieldsDataBase.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class simulationFieldsDataBase
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#include "PostprocessOperationAvMassVelocity.hpp"
|
||||
|
||||
pFlow::PostprocessOperationAvMassVelocity::PostprocessOperationAvMassVelocity
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
PostprocessOperationAvMassVelocity::PostprocessOperationAvMassVelocity
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const regionPoints ®Points,
|
||||
|
@ -17,4 +20,6 @@ pFlow::PostprocessOperationAvMassVelocity::PostprocessOperationAvMassVelocity
|
|||
fieldsDB
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -132,7 +132,7 @@ Licence:
|
|||
#include "regionField.hpp"
|
||||
#include "includeMask.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
#include "fieldsDataBase.hpp"
|
||||
#include "operationFunctions.hpp"
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
/// Constructs average processor and initializes result field based on input field type
|
||||
pFlow::PostprocessOperationAverage::PostprocessOperationAverage
|
||||
PostprocessOperationAverage::PostprocessOperationAverage
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const regionPoints ®Points,
|
||||
|
@ -39,7 +42,7 @@ pFlow::PostprocessOperationAverage::PostprocessOperationAverage
|
|||
}
|
||||
}
|
||||
|
||||
pFlow::PostprocessOperationAverage::PostprocessOperationAverage
|
||||
PostprocessOperationAverage::PostprocessOperationAverage
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const word &fieldName,
|
||||
|
@ -79,7 +82,7 @@ pFlow::PostprocessOperationAverage::PostprocessOperationAverage
|
|||
|
||||
|
||||
/// Performs weighted average of field values within each region
|
||||
bool pFlow::PostprocessOperationAverage::execute
|
||||
bool PostprocessOperationAverage::execute
|
||||
(
|
||||
const std::vector<span<real>>& weights,
|
||||
const regionField<real>& volFactor
|
||||
|
@ -140,7 +143,7 @@ bool pFlow::PostprocessOperationAverage::execute
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::PostprocessOperationAverage::write(const fileSystem &parDir) const
|
||||
bool PostprocessOperationAverage::write(const fileSystem &parDir) const
|
||||
{
|
||||
if(! postprocessOperation::write(parDir))
|
||||
{
|
||||
|
@ -173,4 +176,6 @@ bool pFlow::PostprocessOperationAverage::write(const fileSystem &parDir) const
|
|||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace pFlow::postprocessData
|
|
@ -132,10 +132,9 @@ Licence:
|
|||
#include "regionField.hpp"
|
||||
#include "includeMask.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
class PostprocessOperationAverage
|
||||
:
|
||||
public postprocessOperation
|
||||
|
@ -207,6 +206,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
}
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif //__PostprocessOperationAverage_hpp__
|
|
@ -3,8 +3,11 @@
|
|||
#include "fieldsDataBase.hpp"
|
||||
#include "operationFunctions.hpp"
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
/// Constructs sum processor and initializes result field based on input field type
|
||||
pFlow::PostprocessOperationSum::PostprocessOperationSum
|
||||
PostprocessOperationSum::PostprocessOperationSum
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const regionPoints ®Points,
|
||||
|
@ -39,7 +42,7 @@ pFlow::PostprocessOperationSum::PostprocessOperationSum
|
|||
}
|
||||
|
||||
/// Performs weighted sum of field values within each region
|
||||
bool pFlow::PostprocessOperationSum::execute
|
||||
bool PostprocessOperationSum::execute
|
||||
(
|
||||
const std::vector<span<real>>& weights,
|
||||
const regionField<real>& volFactor
|
||||
|
@ -72,3 +75,6 @@ bool pFlow::PostprocessOperationSum::execute
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -129,7 +129,7 @@ Licence:
|
|||
#include "regionField.hpp"
|
||||
#include "includeMask.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
|
@ -182,6 +182,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
}
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif //__PostprocessOperationSum_hpp__
|
|
@ -28,7 +28,7 @@ Licence:
|
|||
#include "regionField.hpp"
|
||||
#include "includeMask.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
|
@ -190,6 +190,6 @@ regionField<T> executeFluctuation2Operation
|
|||
return processedField;
|
||||
}
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif //__operationFunctions_hpp__
|
||||
|
|
|
@ -61,7 +61,7 @@ Licence:
|
|||
#include "Time.hpp"
|
||||
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T, typename Operator>
|
||||
|
@ -270,7 +270,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
} // pFlow
|
||||
} // pFlow::postprocessData
|
||||
|
||||
#endif //__IncludeMask_hpp__
|
||||
|
||||
|
|
|
@ -20,31 +20,34 @@ Licence:
|
|||
|
||||
#include "IncludeMask.hpp"
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
// real
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::lessThanOp> >;
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::lessThanEqOp> >;
|
||||
template class IncludeMask<real, compareOne<real, lessThanOp> >;
|
||||
template class IncludeMask<real, compareOne<real, lessThanEqOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::greaterThanOp> >;
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::greaterThanEqOp> >;
|
||||
template class IncludeMask<real, compareOne<real, greaterThanOp> >;
|
||||
template class IncludeMask<real, compareOne<real, greaterThanEqOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareOne<pFlow::real, pFlow::equalOp> >;
|
||||
template class IncludeMask<real, compareOne<real, equalOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareTwo<pFlow::real, pFlow::betweenOp> >;
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::compareTwo<pFlow::real, pFlow::betweenEqOp> >;
|
||||
template class IncludeMask<real, compareTwo<real, betweenOp> >;
|
||||
template class IncludeMask<real, compareTwo<real, betweenEqOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::real, pFlow::allOp<pFlow::real>>;
|
||||
template class IncludeMask<real, allOp<real>>;
|
||||
|
||||
// realx3
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::lessThanOp> >;
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::lessThanEqOp> >;
|
||||
template class IncludeMask<realx3, compareOne<realx3, lessThanOp> >;
|
||||
template class IncludeMask<realx3, compareOne<realx3, lessThanEqOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::greaterThanOp> >;
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::greaterThanEqOp> >;
|
||||
template class IncludeMask<realx3, compareOne<realx3, greaterThanOp> >;
|
||||
template class IncludeMask<realx3, compareOne<realx3, greaterThanEqOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareOne<pFlow::realx3, pFlow::equalOp> >;
|
||||
template class IncludeMask<realx3, compareOne<realx3, equalOp> >;
|
||||
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareTwo<pFlow::realx3, pFlow::betweenOp> >;
|
||||
template class pFlow::IncludeMask<pFlow::realx3, pFlow::compareTwo<pFlow::realx3, pFlow::betweenEqOp> >;
|
||||
template class IncludeMask<realx3, compareTwo<realx3, betweenOp> >;
|
||||
template class IncludeMask<realx3, compareTwo<realx3, betweenEqOp> >;
|
||||
|
||||
|
||||
// realx4
|
||||
} // postprocessData
|
||||
|
|
|
@ -24,7 +24,10 @@ Licence:
|
|||
#include "fieldsDataBase.hpp"
|
||||
|
||||
|
||||
pFlow::includeMask::includeMask
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
includeMask::includeMask
|
||||
(
|
||||
const dictionary& dict,
|
||||
fieldsDataBase& fieldDB
|
||||
|
@ -33,7 +36,7 @@ pFlow::includeMask::includeMask
|
|||
database_(fieldDB)
|
||||
{}
|
||||
|
||||
pFlow::includeMask::includeMask
|
||||
includeMask::includeMask
|
||||
(
|
||||
const word &type,
|
||||
const dictionary &opDict,
|
||||
|
@ -44,7 +47,7 @@ pFlow::includeMask::includeMask
|
|||
{
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
|
||||
uniquePtr<includeMask> includeMask::create
|
||||
(
|
||||
const dictionary& opDict,
|
||||
fieldsDataBase& fieldsDB
|
||||
|
@ -97,8 +100,7 @@ pFlow::uniquePtr<pFlow::includeMask> pFlow::includeMask::create
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::includeMask>
|
||||
pFlow::includeMask::create
|
||||
uniquePtr<includeMask> includeMask::create
|
||||
(
|
||||
const word &type,
|
||||
const dictionary &opDict,
|
||||
|
@ -150,3 +152,5 @@ pFlow::uniquePtr<pFlow::includeMask>
|
|||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
|
@ -47,11 +47,15 @@ Licence:
|
|||
#include "virtualConstructor.hpp"
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
class dictionary;
|
||||
}
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
// forward declaration
|
||||
class fieldsDataBase;
|
||||
class dictionary;
|
||||
|
||||
|
||||
class includeMask
|
||||
|
@ -188,7 +192,7 @@ public:
|
|||
|
||||
|
||||
|
||||
} // pFlow
|
||||
} // pFlow::postprocessData
|
||||
|
||||
#endif //__IncludeMask_hpp__
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ Licence:
|
|||
#include "types.hpp"
|
||||
#include "dictionary.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
|
@ -176,6 +176,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif //__maskOperation_hpp__
|
|
@ -24,7 +24,10 @@ Licence:
|
|||
#include "fieldsDataBase.hpp"
|
||||
|
||||
|
||||
pFlow::postprocessOperation::postprocessOperation
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
postprocessOperation::postprocessOperation
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const regionPoints& regPoints,
|
||||
|
@ -42,7 +45,7 @@ pFlow::postprocessOperation::postprocessOperation
|
|||
)
|
||||
{}
|
||||
|
||||
pFlow::postprocessOperation::postprocessOperation
|
||||
postprocessOperation::postprocessOperation
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const word &fieldName,
|
||||
|
@ -89,12 +92,12 @@ pFlow::postprocessOperation::postprocessOperation
|
|||
fatalExit;
|
||||
}
|
||||
}
|
||||
const pFlow::Time& pFlow::postprocessOperation::time() const
|
||||
const Time& postprocessOperation::time() const
|
||||
{
|
||||
return database_.time();
|
||||
}
|
||||
|
||||
bool pFlow::postprocessOperation::write(const fileSystem &parDir) const
|
||||
bool postprocessOperation::write(const fileSystem &parDir) const
|
||||
{
|
||||
auto ti = time().TimeInfo();
|
||||
|
||||
|
@ -121,11 +124,12 @@ bool pFlow::postprocessOperation::write(const fileSystem &parDir) const
|
|||
return true;
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::postprocessOperation>
|
||||
pFlow::postprocessOperation::create(
|
||||
uniquePtr<postprocessOperation> postprocessOperation::create
|
||||
(
|
||||
const dictionary &opDict,
|
||||
const regionPoints ®Points,
|
||||
fieldsDataBase &fieldsDB)
|
||||
fieldsDataBase &fieldsDB
|
||||
)
|
||||
{
|
||||
word func = opDict.getVal<word>("function");
|
||||
word method = angleBracketsNames("PostprocessOperation", func);
|
||||
|
@ -151,3 +155,5 @@ pFlow::postprocessOperation::create(
|
|||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -80,12 +80,15 @@ Licence:
|
|||
|
||||
namespace pFlow
|
||||
{
|
||||
class Time;
|
||||
}
|
||||
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
/// - forward declaration
|
||||
class fieldsDataBase;
|
||||
class Time;
|
||||
|
||||
|
||||
class postprocessOperation
|
||||
{
|
||||
|
@ -96,7 +99,7 @@ public:
|
|||
private:
|
||||
|
||||
/// Dictionary containing operation-specific parameters.
|
||||
dictionary operationDict_;
|
||||
pFlow::dictionary operationDict_;
|
||||
|
||||
/// This Threshold is used to exclude the regions which contain
|
||||
/// fewer than this value.
|
||||
|
@ -266,6 +269,6 @@ public:
|
|||
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif //__postprocessOperation_hpp__
|
|
@ -27,7 +27,7 @@ Licence:
|
|||
#include "iOstream.hpp"
|
||||
#include "regionField.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
/// Type alias for processed region field types.
|
||||
|
@ -95,6 +95,6 @@ bool writeField
|
|||
return true;
|
||||
}
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif //__postprocessOperationFunctions_hpp__
|
|
@ -20,7 +20,7 @@ Licence:
|
|||
-----------------------------------------------------------------------------*/
|
||||
|
||||
template<typename RegionType, typename ProcessMethodType>
|
||||
pFlow::PostprocessComponent<RegionType,ProcessMethodType>::PostprocessComponent
|
||||
pFlow::postprocessData::PostprocessComponent<RegionType,ProcessMethodType>::PostprocessComponent
|
||||
(
|
||||
const dictionary& dict,
|
||||
fieldsDataBase& fieldsDB,
|
||||
|
@ -61,7 +61,7 @@ pFlow::PostprocessComponent<RegionType,ProcessMethodType>::PostprocessComponent
|
|||
|
||||
|
||||
template <typename RegionType, typename ProcessMethodType>
|
||||
bool pFlow::PostprocessComponent<RegionType, ProcessMethodType>::execute
|
||||
bool pFlow::postprocessData::PostprocessComponent<RegionType, ProcessMethodType>::execute
|
||||
(
|
||||
const timeInfo &ti,
|
||||
bool forceUpdate
|
||||
|
@ -129,7 +129,7 @@ bool pFlow::PostprocessComponent<RegionType, ProcessMethodType>::execute
|
|||
|
||||
template <typename RegionType, typename ProcessMethodType>
|
||||
inline
|
||||
bool pFlow::PostprocessComponent<RegionType, ProcessMethodType>::write
|
||||
bool pFlow::postprocessData::PostprocessComponent<RegionType, ProcessMethodType>::write
|
||||
(
|
||||
const fileSystem &parDir
|
||||
) const
|
||||
|
|
|
@ -32,7 +32,7 @@ Licence:
|
|||
#include "regionPoints.hpp"
|
||||
#include "regionField.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename RegionType, typename ProcessMethodType>
|
||||
|
|
|
@ -24,7 +24,7 @@ Licence:
|
|||
#include "PostprocessComponent.hpp"
|
||||
#include "arithmetic.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename RegionType>
|
||||
|
|
|
@ -25,7 +25,7 @@ Licence:
|
|||
#include "GaussianDistribution.hpp"
|
||||
#include "numericConstants.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename RegionType>
|
||||
|
|
|
@ -24,7 +24,7 @@ Licence:
|
|||
#include "PostprocessComponent.hpp"
|
||||
#include "uniformDistribution.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename RegionType>
|
||||
|
|
|
@ -27,16 +27,18 @@ Licence:
|
|||
#include "lineRegionPoints.hpp"
|
||||
#include "multipleSpheresRegionPoints.hpp"
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
template class PostprocessComponentGaussian<sphereRegionPoints>;
|
||||
template class PostprocessComponentUniform<sphereRegionPoints>;
|
||||
template class PostprocessComponentArithmetic<sphereRegionPoints>;
|
||||
|
||||
template class pFlow::PostprocessComponentGaussian<pFlow::sphereRegionPoints>;
|
||||
template class pFlow::PostprocessComponentUniform<pFlow::sphereRegionPoints>;
|
||||
template class pFlow::PostprocessComponentArithmetic<pFlow::sphereRegionPoints>;
|
||||
template class PostprocessComponentGaussian<multipleSpheresRegionPoints>;
|
||||
template class PostprocessComponentUniform<multipleSpheresRegionPoints>;
|
||||
template class PostprocessComponentArithmetic<multipleSpheresRegionPoints>;
|
||||
|
||||
template class pFlow::PostprocessComponentGaussian<pFlow::multipleSpheresRegionPoints>;
|
||||
template class pFlow::PostprocessComponentUniform<pFlow::multipleSpheresRegionPoints>;
|
||||
template class pFlow::PostprocessComponentArithmetic<pFlow::multipleSpheresRegionPoints>;
|
||||
|
||||
template class pFlow::PostprocessComponentGaussian<pFlow::lineRegionPoints>;
|
||||
template class pFlow::PostprocessComponentUniform<pFlow::lineRegionPoints>;
|
||||
template class pFlow::PostprocessComponentArithmetic<pFlow::lineRegionPoints>;
|
||||
template class PostprocessComponentGaussian<lineRegionPoints>;
|
||||
template class PostprocessComponentUniform<lineRegionPoints>;
|
||||
template class PostprocessComponentArithmetic<lineRegionPoints>;
|
||||
|
||||
}
|
|
@ -1,7 +1,27 @@
|
|||
/*------------------------------- phasicFlow ---------------------------------
|
||||
O C enter of
|
||||
O O E ngineering and
|
||||
O O M ultiscale modeling of
|
||||
OOOOOOO F luid flow
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C): www.cemf.ir
|
||||
email: hamid.r.norouzi AT gmail.com
|
||||
------------------------------------------------------------------------------
|
||||
Licence:
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
granular and multiphase flows. You can redistribute it and/or modify it under
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
#include "particleProbePostprocessComponent.hpp"
|
||||
#include "Time.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
|
@ -62,7 +82,7 @@ inline bool writeField
|
|||
|
||||
}
|
||||
|
||||
pFlow::particleProbePostprocessComponent::particleProbePostprocessComponent
|
||||
pFlow::postprocessData::particleProbePostprocessComponent::particleProbePostprocessComponent
|
||||
(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDB,
|
||||
|
@ -81,7 +101,7 @@ pFlow::particleProbePostprocessComponent::particleProbePostprocessComponent
|
|||
name_(dict.name())
|
||||
{}
|
||||
|
||||
bool pFlow::particleProbePostprocessComponent::execute
|
||||
bool pFlow::postprocessData::particleProbePostprocessComponent::execute
|
||||
(
|
||||
const timeInfo &ti,
|
||||
bool forceExecute
|
||||
|
@ -126,7 +146,7 @@ bool pFlow::particleProbePostprocessComponent::execute
|
|||
}
|
||||
|
||||
|
||||
bool pFlow::particleProbePostprocessComponent::write(const fileSystem& parDir)const
|
||||
bool pFlow::postprocessData::particleProbePostprocessComponent::write(const fileSystem& parDir)const
|
||||
{
|
||||
if(! executed_ ) return true;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Licence:
|
|||
#include "regionField.hpp"
|
||||
#include "oFstream.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,29 @@
|
|||
/*------------------------------- phasicFlow ---------------------------------
|
||||
O C enter of
|
||||
O O E ngineering and
|
||||
O O M ultiscale modeling of
|
||||
OOOOOOO F luid flow
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C): www.cemf.ir
|
||||
email: hamid.r.norouzi AT gmail.com
|
||||
------------------------------------------------------------------------------
|
||||
Licence:
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
granular and multiphase flows. You can redistribute it and/or modify it under
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
#include "postprocessComponent.hpp"
|
||||
#include "fieldsDataBase.hpp"
|
||||
#include "Time.hpp"
|
||||
|
||||
|
||||
pFlow::postprocessComponent::postprocessComponent
|
||||
pFlow::postprocessData::postprocessComponent::postprocessComponent
|
||||
(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDB,
|
||||
|
@ -23,7 +43,7 @@ pFlow::postprocessComponent::postprocessComponent
|
|||
}
|
||||
|
||||
|
||||
pFlow::uniquePtr<pFlow::postprocessComponent> pFlow::postprocessComponent::create
|
||||
pFlow::uniquePtr<pFlow::postprocessData::postprocessComponent> pFlow::postprocessData::postprocessComponent::create
|
||||
(
|
||||
const dictionary& dict,
|
||||
fieldsDataBase& fieldsDB,
|
||||
|
|
|
@ -25,12 +25,17 @@ Licence:
|
|||
#include "dictionary.hpp"
|
||||
#include "virtualConstructor.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace
|
||||
{
|
||||
class dictionary;
|
||||
}
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class fieldsDataBase;
|
||||
|
||||
class regionPoints;
|
||||
class dictionary;
|
||||
class fieldsDataBase;
|
||||
|
||||
class postprocessComponent
|
||||
{
|
||||
|
@ -112,6 +117,6 @@ public:
|
|||
|
||||
};
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif // __postprocessComponent_hpp__
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*------------------------------- phasicFlow ---------------------------------
|
||||
O C enter of
|
||||
O O E ngineering and
|
||||
|
@ -25,7 +24,7 @@ Licence:
|
|||
#include "postprocessGlobals.hpp"
|
||||
#include "postprocessComponent.hpp"
|
||||
|
||||
pFlow::postprocessData::postprocessData
|
||||
pFlow::postprocessData::postprocessData::postprocessData
|
||||
(
|
||||
const systemControl &control,
|
||||
timeValue startTime
|
||||
|
@ -45,7 +44,7 @@ pFlow::postprocessData::postprocessData
|
|||
)
|
||||
)
|
||||
{
|
||||
postProcessGlobals::defaultDir__ = CWD()/pFlow::postProcessGlobals::defaultRelDir__;
|
||||
defaultDir__ = CWD()/defaultRelDir__;
|
||||
|
||||
// if dictionary is not provided, no extra action is required.
|
||||
if( !dict_.fileExist() || !dict_.headerOk() )
|
||||
|
@ -98,7 +97,7 @@ pFlow::postprocessData::postprocessData
|
|||
|
||||
}
|
||||
|
||||
bool pFlow::postprocessData::execute()
|
||||
bool pFlow::postprocessData::postprocessData::execute()
|
||||
{
|
||||
if( inSimulation_ && !activeInSimulation_() ) return true;
|
||||
|
||||
|
@ -118,7 +117,7 @@ bool pFlow::postprocessData::execute()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::postprocessData::write() const
|
||||
bool pFlow::postprocessData::postprocessData::write() const
|
||||
{
|
||||
if( inSimulation_ && !activeInSimulation_() ) return true;
|
||||
|
||||
|
@ -129,7 +128,7 @@ bool pFlow::postprocessData::write() const
|
|||
continue;
|
||||
}
|
||||
|
||||
if(!component->write(postProcessGlobals::defaultDir__/component->name()))
|
||||
if(!component->write(defaultDir__/component->name()))
|
||||
{
|
||||
fatalErrorInFunction
|
||||
<<"Error occured in writing postprocess component: "
|
||||
|
@ -140,7 +139,7 @@ bool pFlow::postprocessData::write() const
|
|||
return true;
|
||||
}
|
||||
|
||||
void pFlow::postprocessData::setOutputDirectory(const fileSystem &path) const
|
||||
void pFlow::postprocessData::postprocessData::setOutputDirectory(const fileSystem &path) const
|
||||
{
|
||||
postProcessGlobals::defaultDir__ = path;
|
||||
defaultDir__ = path;
|
||||
}
|
||||
|
|
|
@ -28,14 +28,18 @@ Licence:
|
|||
#include "fieldsDataBase.hpp"
|
||||
#include "postprocessComponent.hpp"
|
||||
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
class systemControl;
|
||||
class Time;
|
||||
class timeInfo;
|
||||
|
||||
}
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @class postprocessData
|
||||
|
@ -109,6 +113,6 @@ public:
|
|||
void setOutputDirectory(const fileSystem& path)const;
|
||||
};
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif // __postprocessData_hpp__
|
|
@ -23,7 +23,7 @@ Licence:
|
|||
|
||||
#include "fileSystem.hpp"
|
||||
|
||||
namespace pFlow::postProcessGlobals
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
static fileSystem defaultDir__;
|
||||
|
|
|
@ -22,9 +22,11 @@ Licence:
|
|||
#define __postprocessTimeControl_hpp__
|
||||
|
||||
#include "baseTimeControl.hpp"
|
||||
#include "dictionary.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class postprocessTimeControl
|
||||
:
|
||||
public baseTimeControl
|
||||
|
@ -60,6 +62,6 @@ postprocessTimeControl(
|
|||
// Additional methods and members can be added here
|
||||
};
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#endif // __postprocessTimeControl_hpp__
|
|
@ -169,7 +169,7 @@ In addition to the above basic functions, some derived functions are available f
|
|||
|
||||
| Function | Property type | Description | Formula | Required Parameters |
|
||||
|----------|---------------|-------------|---------|---------------------|
|
||||
|`avMassVelocity` | bulk | Average velocity weighted by mass | $\frac{\sum_{i \in \text{region}} m_i \cdot v_i}{\sum_{i \in \text{region}} m_i}$ | - |
|
||||
|`avMassVelocity` | bulk | Average velocity weighted by mass | $\frac{\sum_{i \in \text{region}} w_i \cdot m_i \cdot v_i}{\sum_{i \in \text{region}} w_i \cdot m_i}$ | - |
|
||||
|
||||
### 6.4. Available Fields
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Licence:
|
|||
#include "regionPoints.hpp"
|
||||
#include "Field.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
#include "regionFieldTemplate.cpp"
|
||||
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
pFlow::regionField<T>::regionField(
|
||||
regionField<T>::regionField(
|
||||
const word& name,
|
||||
const regionPoints& rPoints,
|
||||
const T defaultVal)
|
||||
:
|
||||
field_(name, "regionFieldValue", rPoints.size(), rPoints.size(), defaultVal),
|
||||
regionPoints_(rPoints)
|
||||
{}
|
||||
{}
|
||||
|
||||
} // End namespace pFlow::postprocessData
|
|
@ -3,7 +3,10 @@
|
|||
#include "Set.hpp"
|
||||
#include "pStructSelector.hpp"
|
||||
|
||||
bool pFlow::centerPointsRegionPoints::selectIds()
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
bool centerPointsRegionPoints::selectIds()
|
||||
{
|
||||
if(!firstTimeUpdate_) return true;
|
||||
firstTimeUpdate_ = false;
|
||||
|
@ -42,7 +45,7 @@ bool pFlow::centerPointsRegionPoints::selectIds()
|
|||
return true;
|
||||
}
|
||||
|
||||
pFlow::centerPointsRegionPoints::centerPointsRegionPoints(
|
||||
centerPointsRegionPoints::centerPointsRegionPoints(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDataBase)
|
||||
: regionPoints(dict, fieldsDataBase),
|
||||
|
@ -50,7 +53,7 @@ pFlow::centerPointsRegionPoints::centerPointsRegionPoints(
|
|||
probDict_(dict)
|
||||
{}
|
||||
|
||||
bool pFlow::centerPointsRegionPoints::update()
|
||||
bool centerPointsRegionPoints::update()
|
||||
{
|
||||
if(!selectIds()) return false;
|
||||
|
||||
|
@ -74,7 +77,7 @@ bool pFlow::centerPointsRegionPoints::update()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::centerPointsRegionPoints::write(iOstream &os) const
|
||||
bool centerPointsRegionPoints::write(iOstream &os) const
|
||||
{
|
||||
if(firstTimeUpdate_)
|
||||
{
|
||||
|
@ -95,3 +98,5 @@ bool pFlow::centerPointsRegionPoints::write(iOstream &os) const
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End namespace pFlow::postprocessData
|
||||
|
|
|
@ -23,7 +23,7 @@ Licence:
|
|||
|
||||
#include "regionPoints.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -163,7 +163,7 @@ public:
|
|||
|
||||
}; // class centerPointsRegionPoints
|
||||
|
||||
} // namespace pFlow
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#include "lineRegionPoints.hpp"
|
||||
#include "fieldsDataBase.hpp"
|
||||
|
||||
pFlow::lineRegionPoints::lineRegionPoints
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
lineRegionPoints::lineRegionPoints
|
||||
(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDataBase
|
||||
|
@ -50,7 +53,7 @@ pFlow::lineRegionPoints::lineRegionPoints
|
|||
}
|
||||
}
|
||||
|
||||
pFlow::span<const pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem) const
|
||||
pFlow::span<const pFlow::uint32> lineRegionPoints::indices(uint32 elem) const
|
||||
{
|
||||
if(elem >= size())
|
||||
{
|
||||
|
@ -65,7 +68,7 @@ pFlow::span<const pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem) c
|
|||
selectedPoints_[elem].size());
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem)
|
||||
pFlow::span<pFlow::uint32> lineRegionPoints::indices(uint32 elem)
|
||||
{
|
||||
if(elem >= size())
|
||||
{
|
||||
|
@ -80,7 +83,7 @@ pFlow::span<pFlow::uint32> pFlow::lineRegionPoints::indices(uint32 elem)
|
|||
selectedPoints_[elem].size());
|
||||
}
|
||||
|
||||
bool pFlow::lineRegionPoints::update()
|
||||
bool lineRegionPoints::update()
|
||||
{
|
||||
const auto points = database().updatePoints();
|
||||
for(auto& elem : selectedPoints_)
|
||||
|
@ -101,7 +104,7 @@ bool pFlow::lineRegionPoints::update()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::lineRegionPoints::write(iOstream &os) const
|
||||
bool lineRegionPoints::write(iOstream &os) const
|
||||
{
|
||||
os << "# Spheres along a straight line \n";
|
||||
os << "# No." << tab << "centerPoint" << tab << "diameter" << endl;
|
||||
|
@ -118,3 +121,5 @@ bool pFlow::lineRegionPoints::write(iOstream &os) const
|
|||
os << endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End namespace pFlow::postprocessData
|
||||
|
|
|
@ -54,7 +54,7 @@ Licence:
|
|||
#include "Vectors.hpp"
|
||||
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class lineRegionPoints
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#include "multipleSpheresRegionPoints.hpp"
|
||||
#include "fieldsDataBase.hpp"
|
||||
|
||||
pFlow::multipleSpheresRegionPoints::multipleSpheresRegionPoints
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
multipleSpheresRegionPoints::multipleSpheresRegionPoints
|
||||
(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDataBase
|
||||
|
@ -46,7 +49,7 @@ pFlow::multipleSpheresRegionPoints::multipleSpheresRegionPoints
|
|||
}
|
||||
}
|
||||
|
||||
pFlow::span<const pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uint32 elem) const
|
||||
pFlow::span<const pFlow::uint32> multipleSpheresRegionPoints::indices(uint32 elem) const
|
||||
{
|
||||
if (elem >= size())
|
||||
{
|
||||
|
@ -59,7 +62,7 @@ pFlow::span<const pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uin
|
|||
return span<const uint32>(selectedPoints_[elem].data(), selectedPoints_[elem].size());
|
||||
}
|
||||
|
||||
pFlow::span<pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uint32 elem)
|
||||
pFlow::span<pFlow::uint32> multipleSpheresRegionPoints::indices(uint32 elem)
|
||||
{
|
||||
if (elem >= size())
|
||||
{
|
||||
|
@ -73,7 +76,7 @@ pFlow::span<pFlow::uint32> pFlow::multipleSpheresRegionPoints::indices(uint32 el
|
|||
}
|
||||
|
||||
|
||||
bool pFlow::multipleSpheresRegionPoints::update()
|
||||
bool multipleSpheresRegionPoints::update()
|
||||
{
|
||||
const auto points = database().updatePoints();
|
||||
for (auto& elem : selectedPoints_)
|
||||
|
@ -94,7 +97,7 @@ bool pFlow::multipleSpheresRegionPoints::update()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::multipleSpheresRegionPoints::write(iOstream &os) const
|
||||
bool multipleSpheresRegionPoints::write(iOstream &os) const
|
||||
{
|
||||
os << "# Multiple spheres region points\n";
|
||||
os << "# No." << tab << "centerPoint" << tab << "diameter" << endl;
|
||||
|
@ -110,3 +113,5 @@ bool pFlow::multipleSpheresRegionPoints::write(iOstream &os) const
|
|||
os << endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End namespace pFlow::postprocessData
|
||||
|
|
|
@ -51,7 +51,7 @@ Licence:
|
|||
#include "sphere.hpp"
|
||||
#include "Vectors.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class multipleSpheresRegionPoints
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
#include "fieldsDataBase.hpp"
|
||||
#include "Time.hpp"
|
||||
|
||||
pFlow::regionPoints::regionPoints
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
regionPoints::regionPoints
|
||||
(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDataBase
|
||||
|
@ -11,18 +14,20 @@ pFlow::regionPoints::regionPoints
|
|||
fieldsDataBase_(fieldsDataBase)
|
||||
{}
|
||||
|
||||
const pFlow::Time& pFlow::regionPoints::time() const
|
||||
const Time& regionPoints::time() const
|
||||
{
|
||||
return fieldsDataBase_.time();
|
||||
}
|
||||
|
||||
const pFlow::fieldsDataBase & pFlow::regionPoints::database() const
|
||||
const fieldsDataBase & regionPoints::database() const
|
||||
{
|
||||
return fieldsDataBase_;
|
||||
}
|
||||
|
||||
pFlow::fieldsDataBase& pFlow::regionPoints::database()
|
||||
fieldsDataBase& regionPoints::database()
|
||||
{
|
||||
return fieldsDataBase_;
|
||||
}
|
||||
|
||||
} // namespace pFlow::postprocessData
|
||||
|
||||
|
|
|
@ -25,12 +25,16 @@ Licence:
|
|||
#include "dictionary.hpp"
|
||||
#include "pointStructure.hpp"
|
||||
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
class Time;
|
||||
}
|
||||
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class fieldsDataBase;
|
||||
class Time;
|
||||
|
||||
|
||||
/**
|
||||
* @class regionPoints
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#include "sphereRegionPoints.hpp"
|
||||
#include "fieldsDataBase.hpp"
|
||||
|
||||
pFlow::sphereRegionPoints::sphereRegionPoints
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
sphereRegionPoints::sphereRegionPoints
|
||||
(
|
||||
const dictionary &dict,
|
||||
fieldsDataBase &fieldsDataBase
|
||||
|
@ -15,7 +18,7 @@ pFlow::sphereRegionPoints::sphereRegionPoints
|
|||
{
|
||||
}
|
||||
|
||||
bool pFlow::sphereRegionPoints::update()
|
||||
bool sphereRegionPoints::update()
|
||||
{
|
||||
const auto points = database().updatePoints();
|
||||
selectedPoints_.clear();
|
||||
|
@ -30,7 +33,7 @@ bool pFlow::sphereRegionPoints::update()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::sphereRegionPoints::write(iOstream &os) const
|
||||
bool sphereRegionPoints::write(iOstream &os) const
|
||||
{
|
||||
os <<"# Single sphere\n";
|
||||
os <<"# center point: "<<sphereRegion_.center()<<endl;
|
||||
|
@ -39,3 +42,5 @@ bool pFlow::sphereRegionPoints::write(iOstream &os) const
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End namespace pFlow::postprocessData
|
||||
|
|
|
@ -38,7 +38,7 @@ Licence:
|
|||
#include "sphere.hpp"
|
||||
#include "Vectors.hpp"
|
||||
|
||||
namespace pFlow
|
||||
namespace pFlow::postprocessData
|
||||
{
|
||||
|
||||
class sphereRegionPoints
|
||||
|
|
Loading…
Reference in New Issue