diff --git a/utilities/geometryPhasicFlow/cuboidWall/cuboidWall.C b/utilities/geometryPhasicFlow/cuboidWall/cuboidWall.C index 8183e5a8..c1a90172 100755 --- a/utilities/geometryPhasicFlow/cuboidWall/cuboidWall.C +++ b/utilities/geometryPhasicFlow/cuboidWall/cuboidWall.C @@ -32,6 +32,9 @@ bool pFlow::cuboidWall::readcuboidWall auto center = dict.getVal("center"); auto edgeLength= dict.getVal("edgeLength"); + auto numDivs = dict.getValOrSet("numDivs", int32x3(1,1,1)); + + numDivs = max(numDivs, int32x3(1,1,1)); realx3 p1,p2,p3,p4; @@ -41,7 +44,7 @@ bool pFlow::cuboidWall::readcuboidWall p3 = center + edgeLength*realx3(-0.5, 0.5, 0.5); p4 = center + edgeLength*realx3(-0.5,-0.5, 0.5); - planeWall left(p1,p2,p3,p4); + planeWall left(p1,p2,p3,p4, numDivs.y(), numDivs.z()); for(const auto& t:left.triangles()) { @@ -54,7 +57,7 @@ bool pFlow::cuboidWall::readcuboidWall p3 = center + edgeLength*realx3( 0.5, 0.5, 0.5); p4 = center + edgeLength*realx3( 0.5, 0.5,-0.5); - planeWall right(p1,p2,p3,p4); + planeWall right(p1,p2,p3,p4, numDivs.z(), numDivs.y()); for(const auto& t:right.triangles()) { @@ -67,7 +70,7 @@ bool pFlow::cuboidWall::readcuboidWall p3 = center + edgeLength*realx3( 0.5,-0.5, 0.5); p4 = center + edgeLength*realx3( 0.5,-0.5,-0.5); - planeWall bottom(p1,p2,p3,p4); + planeWall bottom(p1,p2,p3,p4, numDivs.z(), numDivs.x()); for(const auto& t:bottom.triangles()) { @@ -80,7 +83,7 @@ bool pFlow::cuboidWall::readcuboidWall p3 = center + edgeLength*realx3( 0.5, 0.5, 0.5); p4 = center + edgeLength*realx3(-0.5, 0.5, 0.5); - planeWall top(p1,p2,p3,p4); + planeWall top(p1,p2,p3,p4, numDivs.x(), numDivs.z()); for(const auto& t:top.triangles()) { @@ -93,7 +96,8 @@ bool pFlow::cuboidWall::readcuboidWall p3 = center + edgeLength*realx3( 0.5, 0.5,-0.5); p4 = center + edgeLength*realx3(-0.5, 0.5,-0.5); - planeWall back(p1,p2,p3,p4); + + planeWall back(p1,p2,p3,p4, numDivs.x(), numDivs.y()); for(const auto& t:back.triangles()) { @@ -107,7 +111,7 @@ bool pFlow::cuboidWall::readcuboidWall p3 = center + edgeLength*realx3( 0.5, 0.5, 0.5); p4 = center + edgeLength*realx3( 0.5,-0.5, 0.5); - planeWall front(p1,p2,p3,p4); + planeWall front(p1,p2,p3,p4, numDivs.y(), numDivs.x()); for(const auto& t:front.triangles()) { diff --git a/utilities/geometryPhasicFlow/planeWall/planeWall.C b/utilities/geometryPhasicFlow/planeWall/planeWall.C index 97988793..7570d4fc 100755 --- a/utilities/geometryPhasicFlow/planeWall/planeWall.C +++ b/utilities/geometryPhasicFlow/planeWall/planeWall.C @@ -20,8 +20,7 @@ Licence: #include "planeWall.H" - - +#include "line.H" bool pFlow::planeWall::readPlaneWall ( @@ -33,24 +32,21 @@ bool pFlow::planeWall::readPlaneWall auto p3 = dict.getVal("p3"); auto p4 = dict.getVal("p4"); - - if( Wall::checkTrianlge(p1,p2,p3) ) - { - triangles_.push_back(realx3x3(p1,p2,p3)); - }else + auto numDiv12 = max(dict.getValOrSet("numDiv12",1),1); + auto numDiv23 = max(dict.getValOrSet("numDiv23",1),1); + + + if(!checkFlatness(p1,p2,p3,p4)) { fatalErrorInFunction << - "points p1, p2 and p3 do not form a plane wall in dictionary " << dict.globalName()<