From 02f7f9af200ee6002d7c3e1b332d42e4581b5e82 Mon Sep 17 00:00:00 2001 From: hamidrezanorouzi Date: Thu, 24 Nov 2022 23:13:15 +0330 Subject: [PATCH] zResolution is added to cylinder --- .../cylinderWall/cylinderWall.C | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/utilities/geometryPhasicFlow/cylinderWall/cylinderWall.C b/utilities/geometryPhasicFlow/cylinderWall/cylinderWall.C index bf10a5d8..c2573ee5 100644 --- a/utilities/geometryPhasicFlow/cylinderWall/cylinderWall.C +++ b/utilities/geometryPhasicFlow/cylinderWall/cylinderWall.C @@ -1,4 +1,5 @@ #include "cylinderWall.H" +#include "line.H" bool pFlow::cylinderWall::readCylinderWall(const dictionary& dict) @@ -9,9 +10,29 @@ bool pFlow::cylinderWall::readCylinderWall(const dictionary& dict) auto radius2 = dict.getVal("radius2") ; int32 resolution = dict.getValOrSet("resolution", 24 ); + int32 zResolution = dict.getValOrSet("zResolution", 1); + + + triangles_.clear(); + triangles_.reserve(2*resolution*zResolution); - return createCylinder(p1, p2, radius1, radius2, resolution); + line cylAxis(p1, p2); + auto lp1 = p1; + + auto dt = static_cast(1.0/zResolution); + real t = 0; + for(int32 i=0; i