mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
add option to enforce cartesian coordinates in lagrangian position output
add the option 'cartesianOutput' for the couplingProperties dict to output particle positions as cartesian coordinates + cell index instead of barycentric coordinates + cell index + tet face index + tet point index in OF > 4 this format does not require parafoam but works fine with paraview, plus it avoids the temporary creation of OF particles for writing the output
This commit is contained in:
@ -126,7 +126,7 @@ void IOModel::streamDataToPath(const fileName& path, const double* const* array,
|
||||
return;
|
||||
}
|
||||
#if OPENFOAM_VERSION_MAJOR > 4
|
||||
else if (type == "position")
|
||||
else if (barycentricOutput_ && type == "position")
|
||||
{
|
||||
// Force construction of face-diagonal decomposition before construction
|
||||
// of particle which uses parallel transfers.
|
||||
@ -148,7 +148,7 @@ void IOModel::streamDataToPath(const fileName& path, const double* const* array,
|
||||
else if (type == "position")
|
||||
{
|
||||
#if OPENFOAM_VERSION_MAJOR > 4
|
||||
if (true)
|
||||
if (barycentricOutput_)
|
||||
{
|
||||
particle part
|
||||
(
|
||||
@ -192,7 +192,8 @@ IOModel::IOModel
|
||||
dict_(dict),
|
||||
particleCloud_(sm),
|
||||
time_(sm.mesh().time()),
|
||||
parOutput_(true)
|
||||
parOutput_(true),
|
||||
barycentricOutput_(true)
|
||||
{
|
||||
if (
|
||||
particleCloud_.dataExchangeM().type()=="oneWayVTK" ||
|
||||
@ -202,6 +203,11 @@ IOModel::IOModel
|
||||
parOutput_ = false;
|
||||
Warning << "IO model is in serial write mode, only data on proc 0 is written" << endl;
|
||||
}
|
||||
|
||||
if (dict_.found("cartesianOutput"))
|
||||
{
|
||||
barycentricOutput_ = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -65,6 +65,8 @@ protected:
|
||||
|
||||
bool parOutput_;
|
||||
|
||||
bool barycentricOutput_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
Reference in New Issue
Block a user