diff --git a/apps/cpu/ConvectionOfVortex/cov.cpp b/apps/cpu/ConvectionOfVortex/cov.cpp index 45b9489397df760be5d1247f1f2961393b2c22fe..a7affc55218f6aebac959eab1b606aa70cee6dc6 100644 --- a/apps/cpu/ConvectionOfVortex/cov.cpp +++ b/apps/cpu/ConvectionOfVortex/cov.cpp @@ -112,14 +112,14 @@ void run() GenBlocksGridVisitor genBlocks(gridCube); grid->accept(genBlocks); - SPtr<BCAdapter> outflowBCAdapter(new DensityBCAdapter(rhoLB)); - outflowBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonReflectingOutflowBCAlgorithm())); + SPtr<BC> outflowBC(new DensityBC(rhoLB)); + outflowBC->setBCStrategy(SPtr<BCStrategy>(new NonReflectingOutflowBCStrategy())); BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(outflowBCAdapter); + bcVisitor.addBC(outflowBC); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); SPtr<GbObject3D> refCube(new GbCuboid3D(g_minX1-blockLength,-0.02,-0.02,g_maxX1+blockLength,0.02,0.02)); if (myid==0) GbSystem3D::writeGeoObject(refCube.get(), pathname+"/geo/refCube", WbWriterVtkXmlBinary::getInstance()); @@ -138,19 +138,19 @@ void run() //outflow GbCuboid3DPtr geoOutflow1(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_minX1, g_maxX2+blockLength, g_maxX3+blockLength)); if (myid==0) GbSystem3D::writeGeoObject(geoOutflow1.get(), pathname+"/geo/geoOutflow1", WbWriterVtkXmlASCII::getInstance()); - SPtr<D3Q27Interactor> outflowIntr1 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow1, grid, outflowBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowIntr1 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow1, grid, outflowBC, Interactor3D::SOLID)); GbCuboid3DPtr geoOutflow2(new GbCuboid3D(g_maxX1, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength)); if (myid==0) GbSystem3D::writeGeoObject(geoOutflow2.get(), pathname+"/geo/geoOutflow2", WbWriterVtkXmlASCII::getInstance()); - SPtr<D3Q27Interactor> outflowIntr2 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow2, grid, outflowBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowIntr2 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow2, grid, outflowBC, Interactor3D::SOLID)); GbCuboid3DPtr geoOutflow3(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_minX3)); if (myid==0) GbSystem3D::writeGeoObject(geoOutflow3.get(), pathname+"/geo/geoOutflow3", WbWriterVtkXmlASCII::getInstance()); - SPtr<D3Q27Interactor> outflowIntr3 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow3, grid, outflowBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowIntr3 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow3, grid, outflowBC, Interactor3D::SOLID)); GbCuboid3DPtr geoOutflow4(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_maxX3, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength)); if (myid==0) GbSystem3D::writeGeoObject(geoOutflow4.get(), pathname+"/geo/geoOutflow4", WbWriterVtkXmlASCII::getInstance()); - SPtr<D3Q27Interactor> outflowIntr4 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow4, grid, outflowBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowIntr4 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow4, grid, outflowBC, Interactor3D::SOLID)); SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M)); InteractorsHelper intHelper(grid, metisVisitor); @@ -211,9 +211,9 @@ void run() //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulantLBMKernel()); //dynamicPointerCast<CompressibleCumulantLBMKernel>(kernel)->setBulkOmegaToOmega(true); // - SPtr<BCProcessor> bcProcessor(new BCProcessor()); + SPtr<BCSet> BCSet(new BCSet()); - kernel->setBCProcessor(bcProcessor); + kernel->setBCSet(BCSet); SetKernelBlockVisitor kernelVisitor(kernel, nuLB, availMem, needMem); grid->accept(kernelVisitor); diff --git a/apps/cpu/CouetteFlow/cflow.cpp b/apps/cpu/CouetteFlow/cflow.cpp index a60031096a0197e129a6c01c1dd9d5881dc2699f..184571e09b507966e96485abb6ccbe83a1771f48 100644 --- a/apps/cpu/CouetteFlow/cflow.cpp +++ b/apps/cpu/CouetteFlow/cflow.cpp @@ -112,24 +112,24 @@ void bflow(string configname) thix->setC(c); thix->setMu0(mu0); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyHerschelBulkleyModelNoSlipBCAlgorithm())); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyPowellEyringModelNoSlipBCAlgorithm())); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyHerschelBulkleyModelNoSlipBCStrategy())); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyPowellEyringModelNoSlipBCStrategy())); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelNoSlipBCStrategy())); //BS visitor BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); + bcVisitor.addBC(noSlipBC); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new PowellEyringModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new HerschelBulkleyModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new RheologyK17LBMKernel()); SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new RheologyBinghamModelLBMKernel()); kernel->setForcingX1(forcing); kernel->setWithForcing(true); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); SPtr<Grid3D> grid(new Grid3D(comm)); @@ -178,11 +178,11 @@ void bflow(string configname) if (myid == 0) GbSystem3D::writeGeoObject(addWallYmax.get(), pathname + "/geo/addWallYmax", WbWriterVtkXmlASCII::getInstance()); //wall interactors - //SPtr<D3Q27Interactor> addWallZminInt(new D3Q27Interactor(addWallZmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - //SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + //SPtr<D3Q27Interactor> addWallZminInt(new D3Q27Interactor(addWallZmin, grid, noSlipBC, Interactor3D::SOLID)); + //SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, noSlipBC, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallYminInt(new D3Q27Interactor(addWallYmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallYmaxInt(new D3Q27Interactor(addWallYmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallYminInt(new D3Q27Interactor(addWallYmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallYmaxInt(new D3Q27Interactor(addWallYmax, grid, noSlipBC, Interactor3D::SOLID)); //////////////////////////////////////////// //METIS diff --git a/apps/cpu/FlowAroundCylinder/cylinder.cpp b/apps/cpu/FlowAroundCylinder/cylinder.cpp index d66222495986cc6eaa26c078d7eaf225834ffaab..73929a3eeb7bea5b5337481fafb111860dbb2875 100644 --- a/apps/cpu/FlowAroundCylinder/cylinder.cpp +++ b/apps/cpu/FlowAroundCylinder/cylinder.cpp @@ -80,23 +80,23 @@ void run(string configname) SPtr<Grid3D> grid(new Grid3D(comm)); //BC - SPtr<BCAdapter> noSlipAdapter(new NoSlipBCAdapter()); - noSlipAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); + SPtr<BC> noSlipAdapter(new NoSlipBC()); + noSlipAdapter->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); mu::Parser fct; fct.SetExpr("16*U*x2*x3*(H-x2)*(H-x3)/H^4"); fct.DefineConst("U", uLB); fct.DefineConst("H", H); - SPtr<BCAdapter> velBCAdapter(new VelocityBCAdapter(true, false, false, fct, 0, BCFunction::INFCONST)); - velBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityWithDensityBCAlgorithm())); + SPtr<BC> velBC(new VelocityBC(true, false, false, fct, 0, BCFunction::INFCONST)); + velBC->setBCStrategy(SPtr<BCStrategy>(new VelocityWithDensityBCStrategy())); - SPtr<BCAdapter> denBCAdapter(new DensityBCAdapter(rhoLB)); - denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonReflectingOutflowBCAlgorithm())); + SPtr<BC> denBC(new DensityBC(rhoLB)); + denBC->setBCStrategy(SPtr<BCStrategy>(new NonReflectingOutflowBCStrategy())); BoundaryConditionsBlockVisitor bcVisitor; bcVisitor.addBC(noSlipAdapter); - bcVisitor.addBC(velBCAdapter); - bcVisitor.addBC(denBCAdapter); + bcVisitor.addBC(velBC); + bcVisitor.addBC(denBC); ////////////////////////////////////////////////////////////////////////// //restart @@ -199,10 +199,10 @@ void run(string configname) SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, noSlipAdapter, Interactor3D::SOLID)); //inflow - SPtr<D3Q27Interactor> inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBC, Interactor3D::SOLID)); //outflow - SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBC, Interactor3D::SOLID)); SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M)); @@ -247,8 +247,8 @@ void run(string configname) SPtr<LBMKernel> kernel(new CompressibleCumulantLBMKernel()); - SPtr<BCProcessor> bcProc(new BCProcessor()); - kernel->setBCProcessor(bcProc); + SPtr<BCSet> bcProc(new BCSet()); + kernel->setBCSet(bcProc); SetKernelBlockVisitor kernelVisitor(kernel, nueLB, availMem, needMem); grid->accept(kernelVisitor); diff --git a/apps/cpu/HerschelBulkleyModel/hbflow.cpp b/apps/cpu/HerschelBulkleyModel/hbflow.cpp index dcb82533ec1da20664babe4ee1f16df0bc10cbc0..985ad8fce6a8fe898881b49d9e780e4928b29cd0 100644 --- a/apps/cpu/HerschelBulkleyModel/hbflow.cpp +++ b/apps/cpu/HerschelBulkleyModel/hbflow.cpp @@ -132,27 +132,27 @@ void bflow(string configname) thix->setC(c); thix->setMu0(mu0); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyHerschelBulkleyModelNoSlipBCAlgorithm())); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyPowellEyringModelNoSlipBCAlgorithm())); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyHerschelBulkleyModelNoSlipBCStrategy())); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyPowellEyringModelNoSlipBCStrategy())); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelNoSlipBCStrategy())); mu::Parser fctVx; fctVx.SetExpr("u"); fctVx.DefineConst("u", 0.001); - SPtr<BCAdapter> velocityBCAdapter(new VelocityBCAdapter(true, false, false, fctVx, 0, BCFunction::INFCONST)); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityBCAlgorithm())); - velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelVelocityBCAlgorithm())); + SPtr<BC> velocityBC(new VelocityBC(true, false, false, fctVx, 0, BCFunction::INFCONST)); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new VelocityBCStrategy())); + velocityBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelVelocityBCStrategy())); //BS visitor BoundaryConditionsBlockVisitor bcVisitor; - //bcVisitor.addBC(noSlipBCAdapter); - //bcVisitor.addBC(velocityBCAdapter); + //bcVisitor.addBC(noSlipBC); + //bcVisitor.addBC(velocityBC); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new PowellEyringModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new HerschelBulkleyModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new RheologyK17LBMKernel()); @@ -166,7 +166,7 @@ void bflow(string configname) kernel->setForcingX1(forcing); kernel->setWithForcing(true); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); SPtr<Grid3D> grid(new Grid3D(comm)); @@ -222,13 +222,13 @@ void bflow(string configname) //wall interactors - //SPtr<D3Q27Interactor> addWallZminInt(new D3Q27Interactor(addWallZmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - //SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + //SPtr<D3Q27Interactor> addWallZminInt(new D3Q27Interactor(addWallZmin, grid, noSlipBC, Interactor3D::SOLID)); + //SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, noSlipBC, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallYminInt(new D3Q27Interactor(addWallYmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallYmaxInt(new D3Q27Interactor(addWallYmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallYminInt(new D3Q27Interactor(addWallYmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallYmaxInt(new D3Q27Interactor(addWallYmax, grid, noSlipBC, Interactor3D::SOLID)); - //SPtr<D3Q27TriFaceMeshInteractor> wall45Int(new D3Q27TriFaceMeshInteractor(wall45, grid, noSlipBCAdapter, Interactor3D::SOLID)); + //SPtr<D3Q27TriFaceMeshInteractor> wall45Int(new D3Q27TriFaceMeshInteractor(wall45, grid, noSlipBC, Interactor3D::SOLID)); //////////////////////////////////////////// //METIS diff --git a/apps/cpu/HerschelBulkleySphere/hbsphere.cpp b/apps/cpu/HerschelBulkleySphere/hbsphere.cpp index ae71a3a44926c52e04eb0df682b0495ce37c173d..7af2587b894e8ad44ffde82cf2e06369a0fd22c7 100644 --- a/apps/cpu/HerschelBulkleySphere/hbsphere.cpp +++ b/apps/cpu/HerschelBulkleySphere/hbsphere.cpp @@ -102,13 +102,13 @@ void bflow(string configname) thix->setYieldStress(tau0); thix->setOmegaMin(omegaMin); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyHerschelBulkleyModelNoSlipBCAlgorithm())); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyHerschelBulkleyModelNoSlipBCStrategy())); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelNoSlipBCStrategy())); - SPtr<BCAdapter> slipBCAdapter(new SlipBCAdapter()); - slipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleSlipBCAlgorithm())); + SPtr<BC> slipBC(new SlipBC()); + slipBC->setBCStrategy(SPtr<BCStrategy>(new SimpleSlipBCStrategy())); mu::Parser fct; fct.SetExpr("U"); @@ -118,31 +118,31 @@ void bflow(string configname) //fct.SetExpr("16*U*x2*x3*(H-x2)*(H-x3)/H^4"); //fct.DefineConst("U", U); //fct.DefineConst("H", H); - SPtr<BCAdapter> velocityBCAdapter(new VelocityBCAdapter(true, false, false, fct, 0, BCFunction::INFCONST)); - velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleVelocityBCAlgorithm())); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityWithDensityBCAlgorithm())); + SPtr<BC> velocityBC(new VelocityBC(true, false, false, fct, 0, BCFunction::INFCONST)); + velocityBC->setBCStrategy(SPtr<BCStrategy>(new SimpleVelocityBCStrategy())); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new VelocityWithDensityBCStrategy())); - SPtr<BCAdapter> densityBCAdapter(new DensityBCAdapter()); - densityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonEqDensityBCAlgorithm())); - //densityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonReflectingOutflowBCAlgorithm())); + SPtr<BC> densityBC(new DensityBC()); + densityBC->setBCStrategy(SPtr<BCStrategy>(new NonEqDensityBCStrategy())); + //densityBC->setBCStrategy(SPtr<BCStrategy>(new NonReflectingOutflowBCStrategy())); //BS visitor BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(slipBCAdapter); - bcVisitor.addBC(velocityBCAdapter); - bcVisitor.addBC(densityBCAdapter); + bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(slipBC); + bcVisitor.addBC(velocityBC); + bcVisitor.addBC(densityBC); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CumulantLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulant4thOrderViscosityLBMKernel()); SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new RheologyK17LBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new HerschelBulkleyModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new BinghamModelLBMKernel()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); //kernel->setForcingX1(forcing); //kernel->setWithForcing(true); @@ -159,7 +159,7 @@ void bflow(string configname) //sphere SPtr<GbObject3D> sphere(new GbSphere3D(sphereCenter[0], sphereCenter[1], sphereCenter[2], radius)); GbSystem3D::writeGeoObject(sphere.get(), outputPath + "/geo/sphere", WbWriterVtkXmlBinary::getInstance()); - SPtr<D3Q27Interactor> sphereInt(new D3Q27Interactor(sphere, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> sphereInt(new D3Q27Interactor(sphere, grid, noSlipBC, Interactor3D::SOLID)); //////////////////////////////////////////// //METIS @@ -170,7 +170,7 @@ void bflow(string configname) SPtr<UbScheduler> mSch(new UbScheduler(cpStep, cpStart)); SPtr<MPIIOMigrationCoProcessor> restartCoProcessor(new MPIIOMigrationCoProcessor(grid, mSch, metisVisitor, outputPath, comm)); restartCoProcessor->setLBMKernel(kernel); - restartCoProcessor->setBCProcessor(bcProc); + restartCoProcessor->setBCSet(bcProc); //restartCoProcessor->setNu(k); ////////////////////////////////////////////////////////////////////////// @@ -234,14 +234,14 @@ void bflow(string configname) if (myid == 0) GbSystem3D::writeGeoObject(wallXmax.get(), outputPath + "/geo/wallXmax", WbWriterVtkXmlASCII::getInstance()); //wall interactors - SPtr<D3Q27Interactor> wallZminInt(new D3Q27Interactor(wallZmin, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallZmaxInt(new D3Q27Interactor(wallZmax, grid, slipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallZminInt(new D3Q27Interactor(wallZmin, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallZmaxInt(new D3Q27Interactor(wallZmax, grid, slipBC, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, slipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, slipBC, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, velocityBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, densityBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, velocityBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, densityBC, Interactor3D::SOLID)); //////////////////////////////////////////// //METIS diff --git a/apps/cpu/JetBreakup/JetBreakup.cpp b/apps/cpu/JetBreakup/JetBreakup.cpp index 2115b515f1c77cd97b587449ab9881642aa6e1be..4a046bc39505ad1405163de8327240685fa0caba 100644 --- a/apps/cpu/JetBreakup/JetBreakup.cpp +++ b/apps/cpu/JetBreakup/JetBreakup.cpp @@ -209,10 +209,10 @@ void run(string configname) kernel->setInterfaceWidth(interfaceWidth); //dynamicPointerCast<MultiphasePressureFilterLBMKernel>(kernel)->setPhaseFieldBC(0.0); - SPtr<BCProcessor> bcProc(new BCProcessor()); - // BCProcessorPtr bcProc(new ThinWallBCProcessor()); + SPtr<BCSet> bcProc(new BCSet()); + // BCSetPtr bcProc(new ThinWallBCSet()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); SPtr<Grid3D> grid(new Grid3D(comm)); // grid->setPeriodicX1(true); @@ -234,7 +234,7 @@ void run(string configname) // rcp->setDensityRatio(densityRatio); rcp->setLBMKernel(kernel); - rcp->setBCProcessor(bcProc); + rcp->setBCSet(bcProc); ////////////////////////////////////////////////////////////////////////// // BC Adapter ////////////////////////////////////////////////////////////////////////////// @@ -246,24 +246,24 @@ void run(string configname) fctF1.DefineConst("R", 8.0); fctF1.DefineConst("x0", 0.0); fctF1.DefineConst("z0", 0.0); - // SPtr<BCAdapter> velBCAdapterF1( - // new MultiphaseVelocityBCAdapter(false, true, false, fctF1, phiH, 0.0, BCFunction::INFCONST)); + // SPtr<BC> velBCF1( + // new MultiphaseVelocityBC(false, true, false, fctF1, phiH, 0.0, BCFunction::INFCONST)); mu::Parser fctF2; fctF2.SetExpr("vy1"); fctF2.DefineConst("vy1", U_LB); real startTime = 1; - SPtr<BCAdapter> velBCAdapterF1( - new MultiphaseVelocityBCAdapter(true, false, false, fctF1, phiH, 0.0, startTime)); - SPtr<BCAdapter> velBCAdapterF2( - new MultiphaseVelocityBCAdapter(true, false, false, fctF2, phiH, startTime, endTime)); + SPtr<BC> velBCF1( + new MultiphaseVelocityBC(true, false, false, fctF1, phiH, 0.0, startTime)); + SPtr<BC> velBCF2( + new MultiphaseVelocityBC(true, false, false, fctF2, phiH, startTime, endTime)); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseNoSlipBCStrategy())); - SPtr<BCAdapter> denBCAdapter(new DensityBCAdapter(rhoLB)); - denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseNonReflectingOutflowBCAlgorithm())); + SPtr<BC> denBC(new DensityBC(rhoLB)); + denBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseNonReflectingOutflowBCStrategy())); mu::Parser fctPhi_F1; fctPhi_F1.SetExpr("phiH"); @@ -277,13 +277,13 @@ void run(string configname) fctvel_F2_init.SetExpr("U"); fctvel_F2_init.DefineConst("U", 0); - velBCAdapterF1->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseVelocityBCAlgorithm())); + velBCF1->setBCStrategy(SPtr<BCStrategy>(new MultiphaseVelocityBCStrategy())); ////////////////////////////////////////////////////////////////////////////////// // BC visitor MultiphaseBoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(denBCAdapter); // Ohne das BB? - bcVisitor.addBC(velBCAdapterF1); + bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(denBC); // Ohne das BB? + bcVisitor.addBC(velBCF1); //SPtr<D3Q27Interactor> inflowF1Int; //SPtr<D3Q27Interactor> cylInt; @@ -373,14 +373,14 @@ void run(string configname) SPtr<WriteBlocksCoProcessor> ppblocks(new WriteBlocksCoProcessor( grid, SPtr<UbScheduler>(new UbScheduler(1)), pathname, WbWriterVtkXmlBinary::getInstance(), comm)); - //SPtr<Interactor3D> tubes(new D3Q27TriFaceMeshInteractor(cylinder, grid, noSlipBCAdapter, + //SPtr<Interactor3D> tubes(new D3Q27TriFaceMeshInteractor(cylinder, grid, noSlipBC, // Interactor3D::SOLID, Interactor3D::POINTS)); // inflowF1Int = - // SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, noSlipBCAdapter, Interactor3D::SOLID)); - // inflowF1Int->addBCAdapter(velBCAdapterF2); + // SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, noSlipBC, Interactor3D::SOLID)); + // inflowF1Int->addBC(velBCF2); - SPtr<D3Q27Interactor> outflowInt(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowInt(new D3Q27Interactor(geoOutflow, grid, denBC, Interactor3D::SOLID)); // Create boundary conditions geometry GbCuboid3DPtr wallXmin( @@ -404,28 +404,28 @@ void run(string configname) // Add boundary conditions to grid generator SPtr<D3Q27Interactor> wallXminInt( - new D3Q27Interactor(wallXmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); + new D3Q27Interactor(wallXmin, grid, noSlipBC, Interactor3D::SOLID)); SPtr<D3Q27Interactor> wallXmaxInt( - new D3Q27Interactor(wallXmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + new D3Q27Interactor(wallXmax, grid, noSlipBC, Interactor3D::SOLID)); SPtr<D3Q27Interactor> wallZminInt( - new D3Q27Interactor(wallZmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); + new D3Q27Interactor(wallZmin, grid, noSlipBC, Interactor3D::SOLID)); SPtr<D3Q27Interactor> wallZmaxInt( - new D3Q27Interactor(wallZmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + new D3Q27Interactor(wallZmax, grid, noSlipBC, Interactor3D::SOLID)); SPtr<D3Q27Interactor> wallYminInt( - new D3Q27Interactor(wallYmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); + new D3Q27Interactor(wallYmin, grid, noSlipBC, Interactor3D::SOLID)); SPtr<D3Q27Interactor> wallYmaxInt( - new D3Q27Interactor(wallYmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + new D3Q27Interactor(wallYmax, grid, noSlipBC, Interactor3D::SOLID)); - //cylInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, velBCAdapterF1, Interactor3D::SOLID)); - //cylInt->addBCAdapter(velBCAdapterF2); - // SPtr<D3Q27Interactor> cyl2Int(new D3Q27Interactor(cylinder2, grid, noSlipBCAdapter, + //cylInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, velBCF1, Interactor3D::SOLID)); + //cylInt->addBC(velBCF2); + // SPtr<D3Q27Interactor> cyl2Int(new D3Q27Interactor(cylinder2, grid, noSlipBC, // Interactor3D::SOLID)); - inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBCAdapterF1, Interactor3D::SOLID)); - inflowInt->addBCAdapter(velBCAdapterF2); + inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBCF1, Interactor3D::SOLID)); + inflowInt->addBC(velBCF2); SPtr<D3Q27Interactor> solidInt = - SPtr<D3Q27Interactor>(new D3Q27Interactor(geoSolid, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor>(new D3Q27Interactor(geoSolid, grid, noSlipBC, Interactor3D::SOLID)); InteractorsHelper intHelper(grid, metisVisitor, true); //intHelper.addInteractor(cylInt); @@ -533,7 +533,7 @@ void run(string configname) //} // SPtr<Block3D> block = grid->getBlock(0, 0, 0, 0); // SPtr<LBMKernel> kernel = dynamicPointerCast<LBMKernel>(block->getKernel()); - // SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + // SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); // for (int ix3 = 0; ix3 <= 13; ix3++) { // for (int ix2 = 0; ix2 <= 13; ix2++) { diff --git a/apps/cpu/LaminarTubeFlow/ltf.cpp b/apps/cpu/LaminarTubeFlow/ltf.cpp index cbafef30c489a26b5f8df9610ec3e6ad7aa1da79..14af41b7c468988c4069aed77affc55f114690e5 100644 --- a/apps/cpu/LaminarTubeFlow/ltf.cpp +++ b/apps/cpu/LaminarTubeFlow/ltf.cpp @@ -66,48 +66,48 @@ void run(string configname) //BC Adapter ////////////////////////////////////////////////////////////////////////////// - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new ThinWallNoSlipBCAlgorithm())); - //SPtr<BCAdapter> denBCAdapter(new DensityBCAdapter(rhoLB)); - //denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new EqDensityBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new ThinWallNoSlipBCStrategy())); + //SPtr<BC> denBC(new DensityBC(rhoLB)); + //denBC->setBCStrategy(SPtr<BCStrategy>(new EqDensityBCStrategy())); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); - SPtr<BCAdapter> denBCAdapter(new DensityBCAdapter(rhoLB)); - denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonReflectingOutflowBCAlgorithm())); - //denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonEqDensityBCAlgorithm())); + SPtr<BC> denBC(new DensityBC(rhoLB)); + denBC->setBCStrategy(SPtr<BCStrategy>(new NonReflectingOutflowBCStrategy())); + //denBC->setBCStrategy(SPtr<BCStrategy>(new NonEqDensityBCStrategy())); //double startTime = 5; mu::Parser fct1; fct1.SetExpr("U"); fct1.DefineConst("U", uLB); - SPtr<BCAdapter> velBCAdapter1(new VelocityBCAdapter(true, false, false, fct1, 0, BCFunction::INFCONST)); - //velBCAdapter1->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityBCAlgorithm())); - velBCAdapter1->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityWithDensityBCAlgorithm())); + SPtr<BC> velBC1(new VelocityBC(true, false, false, fct1, 0, BCFunction::INFCONST)); + //velBC1->setBCStrategy(SPtr<BCStrategy>(new VelocityBCStrategy())); + velBC1->setBCStrategy(SPtr<BCStrategy>(new VelocityWithDensityBCStrategy())); //mu::Parser fct2; //fct2.SetExpr("U"); //fct2.DefineConst("U", uLB); - //SPtr<BCAdapter> velBCAdapter2(new VelocityBCAdapter(true, false, false, fct2, startTime, BCFunction::INFCONST)); + //SPtr<BC> velBC2(new VelocityBC(true, false, false, fct2, startTime, BCFunction::INFCONST)); ////////////////////////////////////////////////////////////////////////////////// //BS visitor BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(denBCAdapter); - //bcVisitor.addBC(velBCAdapter1); + bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(denBC); + //bcVisitor.addBC(velBC1); SPtr<Grid3D> grid(new Grid3D(comm)); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CompressibleCumulant4thOrderViscosityLBMKernel()); //double bulckViscosity = 3700*nuLB; //dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->setBulkViscosity(bulckViscosity); SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CumulantK17LBMKernel()); - kernel->setBCProcessor(bcProc); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); + kernel->setBCSet(bcProc); ////////////////////////////////////////////////////////////////////////// SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M)); @@ -116,7 +116,7 @@ void run(string configname) //SPtr<MPIIOMigrationCoProcessor> migCoProcessor(new MPIIOMigrationCoProcessor(grid, mSch, metisVisitor, pathname + "/mig", comm)); SPtr<MPIIOMigrationBECoProcessor> migCoProcessor(new MPIIOMigrationBECoProcessor(grid, mSch, metisVisitor, pathname + "/mig", comm)); migCoProcessor->setLBMKernel(kernel); - migCoProcessor->setBCProcessor(bcProc); + migCoProcessor->setBCSet(bcProc); migCoProcessor->setNu(nuLB); migCoProcessor->setNuLG(0.01, 0.01); migCoProcessor->setDensityRatio(1); @@ -193,7 +193,7 @@ void run(string configname) ppblocks->process(0); - SPtr<D3Q27Interactor> cylinderInt(new D3Q27Interactor(cylinder, grid, noSlipBCAdapter, Interactor3D::INVERSESOLID)); + SPtr<D3Q27Interactor> cylinderInt(new D3Q27Interactor(cylinder, grid, noSlipBC, Interactor3D::INVERSESOLID)); //double r = dynamicPointerCast<GbCylinder3D>(cylinder)->getRadius(); //double cx1 = g_minX1; @@ -211,16 +211,16 @@ void run(string configname) ////fct.DefineConst("y0", cx2); ////fct.DefineConst("z0", cx3); ////fct.DefineConst("nue", nuLB); - //SPtr<BCAdapter> velBCAdapter(new VelocityBCAdapter(true, false, false, fct, 0, BCFunction::INFCONST)); - //velBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityBCAlgorithm())); - //velBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityWithDensityBCAlgorithm())); + //SPtr<BC> velBC(new VelocityBC(true, false, false, fct, 0, BCFunction::INFCONST)); + //velBC->setBCStrategy(SPtr<BCStrategy>(new VelocityBCStrategy())); + //velBC->setBCStrategy(SPtr<BCStrategy>(new VelocityWithDensityBCStrategy())); - inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBCAdapter1, Interactor3D::SOLID)); - //inflowInt->addBCAdapter(velBCAdapter2); + inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBC1, Interactor3D::SOLID)); + //inflowInt->addBC(velBC2); //outflow - SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBC, Interactor3D::SOLID)); //SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_00M)); InteractorsHelper intHelper(grid, metisVisitor); @@ -268,7 +268,7 @@ void run(string configname) intHelper.setBC(); - bcVisitor.addBC(velBCAdapter1); + bcVisitor.addBC(velBC1); grid->accept(bcVisitor); //initialization of distributions diff --git a/apps/cpu/Multiphase/Multiphase.cpp b/apps/cpu/Multiphase/Multiphase.cpp index 4d4bc9cf82afe16309f22b69c0973acb3f96324c..e1ee8d15f24a11a2944c0d371844b0f736a98714 100644 --- a/apps/cpu/Multiphase/Multiphase.cpp +++ b/apps/cpu/Multiphase/Multiphase.cpp @@ -112,10 +112,10 @@ void run(string configname) kernel->setContactAngle(theta); kernel->setInterfaceWidth(interfaceWidth); - SPtr<BCProcessor> bcProc(new BCProcessor()); - // BCProcessorPtr bcProc(new ThinWallBCProcessor()); + SPtr<BCSet> bcProc(new BCSet()); + // BCSetPtr bcProc(new ThinWallBCSet()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); SPtr<Grid3D> grid(new Grid3D(comm)); //grid->setPeriodicX1(true); @@ -137,7 +137,7 @@ void run(string configname) //rcp->setDensityRatio(densityRatio); rcp->setLBMKernel(kernel); - rcp->setBCProcessor(bcProc); + rcp->setBCSet(bcProc); ////////////////////////////////////////////////////////////////////////// // BC Adapter ////////////////////////////////////////////////////////////////////////////// @@ -149,22 +149,22 @@ void run(string configname) fctF1.DefineConst("R", 8.0); fctF1.DefineConst("x0", 0.0); fctF1.DefineConst("z0", 0.0); - //SPtr<BCAdapter> velBCAdapterF1( - // new MultiphaseVelocityBCAdapter(false, true, false, fctF1, phiH, 0.0, BCFunction::INFCONST)); + //SPtr<BC> velBCF1( + // new MultiphaseVelocityBC(false, true, false, fctF1, phiH, 0.0, BCFunction::INFCONST)); mu::Parser fctF2; fctF2.SetExpr("vy1"); fctF2.DefineConst("vy1", uLB); real startTime = 30; - SPtr<BCAdapter> velBCAdapterF1(new MultiphaseVelocityBCAdapter(true, false, false, fctF1, phiH, 0.0, startTime)); - SPtr<BCAdapter> velBCAdapterF2(new MultiphaseVelocityBCAdapter(true, false, false, fctF2, phiH, startTime, endTime)); + SPtr<BC> velBCF1(new MultiphaseVelocityBC(true, false, false, fctF1, phiH, 0.0, startTime)); + SPtr<BC> velBCF2(new MultiphaseVelocityBC(true, false, false, fctF2, phiH, startTime, endTime)); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseNoSlipBCStrategy())); - SPtr<BCAdapter> denBCAdapter(new DensityBCAdapter(rhoLB)); - denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseNonReflectingOutflowBCAlgorithm())); + SPtr<BC> denBC(new DensityBC(rhoLB)); + denBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseNonReflectingOutflowBCStrategy())); mu::Parser fctPhi_F1; fctPhi_F1.SetExpr("phiH"); @@ -178,13 +178,13 @@ void run(string configname) fctvel_F2_init.SetExpr("U"); fctvel_F2_init.DefineConst("U", 0); - velBCAdapterF1->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseVelocityBCAlgorithm())); + velBCF1->setBCStrategy(SPtr<BCStrategy>(new MultiphaseVelocityBCStrategy())); ////////////////////////////////////////////////////////////////////////////////// // BC visitor MultiphaseBoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(denBCAdapter); //Ohne das BB? - bcVisitor.addBC(velBCAdapterF1); + bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(denBC); //Ohne das BB? + bcVisitor.addBC(velBCF1); SPtr<D3Q27Interactor> inflowF1Int; SPtr<D3Q27Interactor> cylInt; @@ -268,13 +268,13 @@ void run(string configname) SPtr<WriteBlocksCoProcessor> ppblocks(new WriteBlocksCoProcessor( grid, SPtr<UbScheduler>(new UbScheduler(1)), pathname, WbWriterVtkXmlBinary::getInstance(), comm)); - SPtr<Interactor3D> tubes(new D3Q27TriFaceMeshInteractor(cylinder, grid, noSlipBCAdapter, Interactor3D::SOLID, Interactor3D::POINTS)); + SPtr<Interactor3D> tubes(new D3Q27TriFaceMeshInteractor(cylinder, grid, noSlipBC, Interactor3D::SOLID, Interactor3D::POINTS)); //inflowF1Int = - // SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, noSlipBCAdapter, Interactor3D::SOLID)); - //inflowF1Int->addBCAdapter(velBCAdapterF2); + // SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, noSlipBC, Interactor3D::SOLID)); + //inflowF1Int->addBC(velBCF2); - SPtr<D3Q27Interactor> outflowInt(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowInt(new D3Q27Interactor(geoOutflow, grid, denBC, Interactor3D::SOLID)); // Create boundary conditions geometry GbCuboid3DPtr wallXmin(new GbCuboid3D(g_minX1 - dx, g_minX2 - dx, g_minX3 - dx, g_minX1, g_maxX2 + dx, g_maxX3)); @@ -291,17 +291,17 @@ void run(string configname) GbSystem3D::writeGeoObject(wallYmax.get(), pathname + "/geo/wallYmax", WbWriterVtkXmlASCII::getInstance()); // Add boundary conditions to grid generator - SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallZminInt(new D3Q27Interactor(wallZmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallZmaxInt(new D3Q27Interactor(wallZmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallZminInt(new D3Q27Interactor(wallZmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallZmaxInt(new D3Q27Interactor(wallZmax, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, noSlipBC, Interactor3D::SOLID)); - cylInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, velBCAdapterF1, Interactor3D::SOLID)); - cylInt->addBCAdapter(velBCAdapterF2); - //SPtr<D3Q27Interactor> cyl2Int(new D3Q27Interactor(cylinder2, grid, noSlipBCAdapter, Interactor3D::SOLID)); + cylInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(cylinder1, grid, velBCF1, Interactor3D::SOLID)); + cylInt->addBC(velBCF2); + //SPtr<D3Q27Interactor> cyl2Int(new D3Q27Interactor(cylinder2, grid, noSlipBC, Interactor3D::SOLID)); InteractorsHelper intHelper(grid, metisVisitor, true); @@ -400,7 +400,7 @@ void run(string configname) //} // SPtr<Block3D> block = grid->getBlock(0, 0, 0, 0); // SPtr<LBMKernel> kernel = dynamicPointerCast<LBMKernel>(block->getKernel()); - // SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + // SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); // for (int ix3 = 0; ix3 <= 13; ix3++) { // for (int ix2 = 0; ix2 <= 13; ix2++) { diff --git a/apps/cpu/MultiphaseDropletTest/droplet.cpp b/apps/cpu/MultiphaseDropletTest/droplet.cpp index a9d561930a77cc447bbe6c959bd7e8464f314d69..7d7423ccb99b0c2be871e272677892b2e7504e9c 100644 --- a/apps/cpu/MultiphaseDropletTest/droplet.cpp +++ b/apps/cpu/MultiphaseDropletTest/droplet.cpp @@ -169,17 +169,17 @@ void run(string configname) kernel->setMultiphaseModelParameters(beta, kappa); kernel->setContactAngle(theta); - SPtr<BCProcessor> bcProc(new BCProcessor()); - // BCProcessorPtr bcProc(new ThinWallBCProcessor()); + SPtr<BCSet> bcProc(new BCSet()); + // BCSetPtr bcProc(new ThinWallBCSet()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseNoSlipBCStrategy())); ////////////////////////////////////////////////////////////////////////////////// // BC visitor MultiphaseBoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); + bcVisitor.addBC(noSlipBC); SPtr<Grid3D> grid(new Grid3D(comm)); grid->setDeltaX(dx); @@ -202,7 +202,7 @@ void run(string configname) // rcp->setDensityRatio(densityRatio); rcp->setLBMKernel(kernel); - rcp->setBCProcessor(bcProc); + rcp->setBCSet(bcProc); ////////////////////////////////////////////////////////////////////////// if (newStart) { @@ -233,8 +233,8 @@ void run(string configname) GbCuboid3DPtr wallYmax(new GbCuboid3D(g_minX1 - dx2, g_maxX2, g_minX3 - dx2, g_maxX1 + dx2, g_maxX2 + dx2, g_maxX3 + dx2)); GbSystem3D::writeGeoObject(wallYmax.get(), pathname + "/geo/wallYmax", WbWriterVtkXmlASCII::getInstance()); - SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, noSlipBC, Interactor3D::SOLID)); SPtr<WriteBlocksCoProcessor> ppblocks(new WriteBlocksCoProcessor( grid, SPtr<UbScheduler>(new UbScheduler(1)), pathname, WbWriterVtkXmlBinary::getInstance(), comm)); diff --git a/apps/cpu/PoiseuilleFlow/pf1.cpp b/apps/cpu/PoiseuilleFlow/pf1.cpp index 93680117551c13a23ecc08c5dc4731d92ec78b77..987978a5bd75547aa814169834eff0353d614ae8 100644 --- a/apps/cpu/PoiseuilleFlow/pf1.cpp +++ b/apps/cpu/PoiseuilleFlow/pf1.cpp @@ -68,16 +68,16 @@ void pf1() //boundary conditions definition //boundary conditions adapters ////////////////////////////////////////////////////////////////////////////// - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); //boundary conditions visitor BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); + bcVisitor.addBC(noSlipBC); ////////////////////////////////////////////////////////////////////////////////// //set boundary conditions for blocks and create process decomposition for MPI - SPtr<D3Q27Interactor> cylinderInt(new D3Q27Interactor(cylinder, grid, noSlipBCAdapter, Interactor3D::INVERSESOLID)); + SPtr<D3Q27Interactor> cylinderInt(new D3Q27Interactor(cylinder, grid, noSlipBC, Interactor3D::INVERSESOLID)); SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M)); InteractorsHelper intHelper(grid, metisVisitor); intHelper.addInteractor(cylinderInt); @@ -116,8 +116,8 @@ void pf1() //LBM kernel definition SPtr<LBMKernel> kernel; kernel = SPtr<LBMKernel>(new IncompressibleCumulantLBMKernel()); - SPtr<BCProcessor> bcProc(new BCProcessor()); - kernel->setBCProcessor(bcProc); + SPtr<BCSet> bcProc(new BCSet()); + kernel->setBCSet(bcProc); //set forcing mu::Parser fctForcingX1; @@ -145,15 +145,15 @@ void pf1() SPtr<UbScheduler> mSch(new UbScheduler(cpStep, cpStart)); //SPtr<MPIIORestartCoProcessor> restartCoProcessor(new MPIIORestartCoProcessor(grid, mSch, pathOut, comm)); //restartCoProcessor->setLBMKernel(kernel); - //restartCoProcessor->setBCProcessor(bcProc); + //restartCoProcessor->setBCSet(bcProc); /*SPtr<MPIIOMigrationCoProcessor> migCoProcessor(new MPIIOMigrationCoProcessor(grid, mSch, pathOut + "/mig", comm)); migCoProcessor->setLBMKernel(kernel); - migCoProcessor->setBCProcessor(bcProc);*/ + migCoProcessor->setBCSet(bcProc);*/ //SPtr<MPIIOMigrationBECoProcessor> migCoProcessor(new MPIIOMigrationBECoProcessor(grid, mSch, pathOut + "/mig", comm)); //migCoProcessor->setLBMKernel(kernel); - //migCoProcessor->setBCProcessor(bcProc); + //migCoProcessor->setBCSet(bcProc); //migCoProcessor->setNu(nuLB); //SPtr<UtilConvertor> convertProcessor(new UtilConvertor(grid, pathOut, comm)); @@ -173,7 +173,7 @@ void pf1() //restartCoProcessor->restart(200); //SPtr<MPIIOMigrationBECoProcessor> migCoProcessor(new MPIIOMigrationBECoProcessor(grid, mSch, metisVisitor, pathOut + "/mig", comm)); //migCoProcessor->setLBMKernel(kernel); - //migCoProcessor->setBCProcessor(bcProc); + //migCoProcessor->setBCSet(bcProc); //migCoProcessor->setNu(nuLB); //migCoProcessor->restart(10); diff --git a/apps/cpu/RisingBubble2D/RisingBubble2D.cpp b/apps/cpu/RisingBubble2D/RisingBubble2D.cpp index 92495242f11659b3a90b30f4df836642dee5aea8..629aaeca23fee637ecfedfbb63207ab0c86e210f 100644 --- a/apps/cpu/RisingBubble2D/RisingBubble2D.cpp +++ b/apps/cpu/RisingBubble2D/RisingBubble2D.cpp @@ -169,19 +169,19 @@ void run(string configname) kernel->setContactAngle(theta); dynamicPointerCast<MultiphasePressureFilterLBMKernel>(kernel)->setPhaseFieldBC(1.0); - SPtr<BCProcessor> bcProc(new BCProcessor()); + SPtr<BCSet> bcProc(new BCSet()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseNoSlipBCAlgorithm())); - SPtr<BCAdapter> slipBCAdapter(new SlipBCAdapter()); - slipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new MultiphaseSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseNoSlipBCStrategy())); + SPtr<BC> slipBC(new SlipBC()); + slipBC->setBCStrategy(SPtr<BCStrategy>(new MultiphaseSlipBCStrategy())); ////////////////////////////////////////////////////////////////////////////////// // BC visitor MultiphaseBoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(slipBCAdapter); + bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(slipBC); SPtr<Grid3D> grid(new Grid3D(comm)); grid->setDeltaX(dx); @@ -204,7 +204,7 @@ void run(string configname) //rcp->setDensityRatio(densityRatio); rcp->setLBMKernel(kernel); - rcp->setBCProcessor(bcProc); + rcp->setBCSet(bcProc); ////////////////////////////////////////////////////////////////////////// if (newStart) { @@ -240,11 +240,11 @@ void run(string configname) GbCuboid3DPtr wallYmax(new GbCuboid3D(g_minX1 - dx2, g_maxX2, g_minX3 - dx2, g_maxX1 + dx2, g_maxX2 + dx2, g_maxX3 + dx2)); GbSystem3D::writeGeoObject(wallYmax.get(), pathname + "/geo/wallYmax", WbWriterVtkXmlASCII::getInstance()); - SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, slipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, slipBC, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYminInt(new D3Q27Interactor(wallYmin, grid, noSlipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallYmaxInt(new D3Q27Interactor(wallYmax, grid, noSlipBC, Interactor3D::SOLID)); SPtr<WriteBlocksCoProcessor> ppblocks(new WriteBlocksCoProcessor( grid, SPtr<UbScheduler>(new UbScheduler(1)), pathname, WbWriterVtkXmlBinary::getInstance(), comm)); diff --git a/apps/cpu/ViskomatXL/viskomat.cpp b/apps/cpu/ViskomatXL/viskomat.cpp index be1f8bab3f99f5577e5a9ca0b426572a87c5a6af..1f4686e94871c0e865d2137ead573fe15d4b16bf 100644 --- a/apps/cpu/ViskomatXL/viskomat.cpp +++ b/apps/cpu/ViskomatXL/viskomat.cpp @@ -106,14 +106,14 @@ void bflow(string configname) thix->setYieldStress(tau0LB); //thix->setOmegaMin(omegaMin); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyHerschelBulkleyModelNoSlipBCAlgorithm())); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyHerschelBulkleyModelNoSlipBCStrategy())); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelNoSlipBCStrategy())); - SPtr<BCAdapter> slipBCAdapter(new SlipBCAdapter()); - slipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleSlipBCAlgorithm())); - //slipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SlipBCAlgorithm())); + SPtr<BC> slipBC(new SlipBC()); + slipBC->setBCStrategy(SPtr<BCStrategy>(new SimpleSlipBCStrategy())); + //slipBC->setBCStrategy(SPtr<BCStrategy>(new SlipBCStrategy())); //// rotation around X-axis mu::Parser fctVy; @@ -148,26 +148,26 @@ void bflow(string configname) //mu::Parser fctVy; //fctVy.SetExpr("0.0"); - SPtr<BCAdapter> velocityBCAdapter(new VelocityBCAdapter(true, true, true, fctVx, fctVy, fctVz, 0, BCFunction::INFCONST)); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityBCAlgorithm())); - velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleVelocityBCAlgorithm())); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityWithDensityBCAlgorithm())); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelVelocityBCAlgorithm())); + SPtr<BC> velocityBC(new VelocityBC(true, true, true, fctVx, fctVy, fctVz, 0, BCFunction::INFCONST)); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new VelocityBCStrategy())); + velocityBC->setBCStrategy(SPtr<BCStrategy>(new SimpleVelocityBCStrategy())); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new VelocityWithDensityBCStrategy())); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelVelocityBCStrategy())); - //SPtr<BCAdapter> densityBCAdapter(new DensityBCAdapter()); - //densityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonEqDensityBCAlgorithm())); - ////densityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonReflectingOutflowBCAlgorithm())); + //SPtr<BC> densityBC(new DensityBC()); + //densityBC->setBCStrategy(SPtr<BCStrategy>(new NonEqDensityBCStrategy())); + ////densityBC->setBCStrategy(SPtr<BCStrategy>(new NonReflectingOutflowBCStrategy())); //BS visitor BoundaryConditionsBlockVisitor bcVisitor; - //bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(slipBCAdapter); - bcVisitor.addBC(velocityBCAdapter); - //bcVisitor.addBC(densityBCAdapter); + //bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(slipBC); + bcVisitor.addBC(velocityBC); + //bcVisitor.addBC(densityBC); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new BGKLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new CumulantLBMKernel()); @@ -177,7 +177,7 @@ void bflow(string configname) SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new RheologyBinghamModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new HerschelBulkleyModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new BinghamModelLBMKernel()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); //kernel->setForcingX1(forcing); //kernel->setWithForcing(true); @@ -201,7 +201,7 @@ void bflow(string configname) SPtr<MPIIOMigrationCoProcessor> restartCoProcessor(new MPIIOMigrationCoProcessor(grid, mSch, metisVisitor, outputPath, comm)); //SPtr<MPIIORestartCoProcessor> restartCoProcessor(new MPIIORestartCoProcessor(grid, mSch, outputPath, comm)); restartCoProcessor->setLBMKernel(kernel); - restartCoProcessor->setBCProcessor(bcProc); + restartCoProcessor->setBCSet(bcProc); //restartCoProcessor->setNu(k); ////////////////////////////////////////////////////////////////////////// @@ -222,7 +222,7 @@ void bflow(string configname) //// // 0.5 * (g_maxX3 - g_minX3) * 0.5)); // SPtr<D3Q27Interactor> statorInt = - // SPtr<D3Q27Interactor>(new D3Q27Interactor(stator, grid, noSlipBCAdapter, Interactor3D::SOLID)); + // SPtr<D3Q27Interactor>(new D3Q27Interactor(stator, grid, noSlipBC, Interactor3D::SOLID)); SPtr<GbTriFaceMesh3D> stator = make_shared<GbTriFaceMesh3D>(); stator->readMeshFromSTLFileBinary(geoPath + "/" + geoFile, false); @@ -231,7 +231,7 @@ void bflow(string configname) //stator->translate(4.0, -73.0, -6.0); SPtr<D3Q27Interactor> statorInt = SPtr<D3Q27TriFaceMeshInteractor>( - new D3Q27TriFaceMeshInteractor(stator, grid, noSlipBCAdapter, Interactor3D::SOLID, Interactor3D::EDGES)); + new D3Q27TriFaceMeshInteractor(stator, grid, noSlipBC, Interactor3D::SOLID, Interactor3D::EDGES)); GbSystem3D::writeGeoObject(stator.get(), outputPath + "/geo/stator", WbWriterVtkXmlBinary::getInstance()); @@ -250,7 +250,7 @@ void bflow(string configname) GbSystem3D::writeGeoObject(rotor.get(), outputPath + "/geo/rotor", WbWriterVtkXmlBinary::getInstance()); SPtr<D3Q27Interactor> rotorInt = - SPtr<D3Q27Interactor>(new D3Q27Interactor(rotor, grid, velocityBCAdapter, Interactor3D::INVERSESOLID)); + SPtr<D3Q27Interactor>(new D3Q27Interactor(rotor, grid, velocityBC, Interactor3D::INVERSESOLID)); //walls GbCuboid3DPtr wallXmin(new GbCuboid3D(g_minX1 - deltax, g_minX2 - deltax, g_minX3 - deltax, g_minX1, @@ -262,8 +262,8 @@ void bflow(string configname) if (myid == 0) GbSystem3D::writeGeoObject(wallXmax.get(), outputPath + "/geo/wallXmax", WbWriterVtkXmlASCII::getInstance()); //wall interactors - SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, slipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXminInt(new D3Q27Interactor(wallXmin, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> wallXmaxInt(new D3Q27Interactor(wallXmax, grid, slipBC, Interactor3D::SOLID)); if (myid == 0) { diff --git a/apps/cpu/rheometer/rheometer.cpp b/apps/cpu/rheometer/rheometer.cpp index 224d170696b90eeea573969b0d17d34021944eac..19ca56314508c697aaebf23926b86ce42c556b3f 100644 --- a/apps/cpu/rheometer/rheometer.cpp +++ b/apps/cpu/rheometer/rheometer.cpp @@ -141,13 +141,13 @@ void bflow(string configname) thix->setYieldStress(tau0); //thix->setOmegaMin(omegaMin); - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); - //noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyHerschelBulkleyModelNoSlipBCAlgorithm())); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelNoSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); + //noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyHerschelBulkleyModelNoSlipBCStrategy())); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelNoSlipBCStrategy())); - //SPtr<BCAdapter> slipBCAdapter(new SlipBCAdapter()); - //slipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleSlipBCAlgorithm())); + //SPtr<BC> slipBC(new SlipBC()); + //slipBC->setBCStrategy(SPtr<BCStrategy>(new SimpleSlipBCStrategy())); mu::Parser fctVx; //fctVx.SetExpr("omega*(r-x2)"); @@ -180,26 +180,26 @@ void bflow(string configname) //mu::Parser fctVx; //fctVx.SetExpr("0.0"); - SPtr<BCAdapter> velocityBCAdapter(new VelocityBCAdapter(true, true, true, fctVx, fctVy, fctVz, 0, BCFunction::INFCONST)); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityBCAlgorithm())); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleVelocityBCAlgorithm())); - //velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityWithDensityBCAlgorithm())); - velocityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new RheologyBinghamModelVelocityBCAlgorithm())); + SPtr<BC> velocityBC(new VelocityBC(true, true, true, fctVx, fctVy, fctVz, 0, BCFunction::INFCONST)); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new VelocityBCStrategy())); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new SimpleVelocityBCStrategy())); + //velocityBC->setBCStrategy(SPtr<BCStrategy>(new VelocityWithDensityBCStrategy())); + velocityBC->setBCStrategy(SPtr<BCStrategy>(new RheologyBinghamModelVelocityBCStrategy())); - //SPtr<BCAdapter> densityBCAdapter(new DensityBCAdapter()); - //densityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonEqDensityBCAlgorithm())); - ////densityBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonReflectingOutflowBCAlgorithm())); + //SPtr<BC> densityBC(new DensityBC()); + //densityBC->setBCStrategy(SPtr<BCStrategy>(new NonEqDensityBCStrategy())); + ////densityBC->setBCStrategy(SPtr<BCStrategy>(new NonReflectingOutflowBCStrategy())); //BS visitor BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - //bcVisitor.addBC(slipBCAdapter); - bcVisitor.addBC(velocityBCAdapter); - //bcVisitor.addBC(densityBCAdapter); + bcVisitor.addBC(noSlipBC); + //bcVisitor.addBC(slipBC); + bcVisitor.addBC(velocityBC); + //bcVisitor.addBC(densityBC); - SPtr<BCProcessor> bcProc; - bcProc = SPtr<BCProcessor>(new BCProcessor()); + SPtr<BCSet> bcProc; + bcProc = SPtr<BCSet>(new BCSet()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new BGKLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new IncompressibleCumulantLBMKernel()); @@ -209,7 +209,7 @@ void bflow(string configname) SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new RheologyBinghamModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new HerschelBulkleyModelLBMKernel()); //SPtr<LBMKernel> kernel = SPtr<LBMKernel>(new BinghamModelLBMKernel()); - kernel->setBCProcessor(bcProc); + kernel->setBCSet(bcProc); //kernel->setForcingX1(forcing); //kernel->setWithForcing(true); @@ -232,7 +232,7 @@ void bflow(string configname) SPtr<UbScheduler> mSch(new UbScheduler(cpStep, cpStart)); SPtr<MPIIOMigrationCoProcessor> restartCoProcessor(new MPIIOMigrationCoProcessor(grid, mSch, metisVisitor, outputPath, comm)); restartCoProcessor->setLBMKernel(kernel); - restartCoProcessor->setBCProcessor(bcProc); + restartCoProcessor->setBCSet(bcProc); //restartCoProcessor->setNu(k); ////////////////////////////////////////////////////////////////////////// @@ -246,7 +246,7 @@ void bflow(string configname) GbSystem3D::writeGeoObject(rotor.get(), outputPath + "/geo/rotor", WbWriterVtkXmlBinary::getInstance()); SPtr<D3Q27Interactor> rotorInt = - SPtr<D3Q27Interactor>(new D3Q27Interactor(rotor, grid, velocityBCAdapter, Interactor3D::INVERSESOLID)); + SPtr<D3Q27Interactor>(new D3Q27Interactor(rotor, grid, velocityBC, Interactor3D::INVERSESOLID)); ////rotor (cylinder) SPtr<GbObject3D> stator(new GbCylinder3D(0.5 * g_maxX1, 0.5 * g_maxX2, g_minX3- 2.0 * deltax, 0.5 * g_maxX1, 0.5 * g_maxX2, g_maxX3+ 2.0 * deltax, 0.25 * g_maxX1)); @@ -256,7 +256,7 @@ void bflow(string configname) GbSystem3D::writeGeoObject(stator.get(), outputPath + "/geo/stator", WbWriterVtkXmlBinary::getInstance()); - SPtr<D3Q27Interactor> statorInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(stator, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> statorInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(stator, grid, noSlipBC, Interactor3D::SOLID)); if (myid == 0) { @@ -310,8 +310,8 @@ void bflow(string configname) //if (myid == 0) GbSystem3D::writeGeoObject(wallZmax.get(), outputPath + "/geo/wallZmax", WbWriterVtkXmlASCII::getInstance()); ////wall interactors - //SPtr<D3Q27Interactor> wallZminInt(new D3Q27Interactor(wallZmin, grid, noSlipBCAdapter, Interactor3D::SOLID)); - //SPtr<D3Q27Interactor> wallZmaxInt(new D3Q27Interactor(wallZmax, grid, noSlipBCAdapter, Interactor3D::SOLID)); + //SPtr<D3Q27Interactor> wallZminInt(new D3Q27Interactor(wallZmin, grid, noSlipBC, Interactor3D::SOLID)); + //SPtr<D3Q27Interactor> wallZmaxInt(new D3Q27Interactor(wallZmax, grid, noSlipBC, Interactor3D::SOLID)); //////////////////////////////////////////// //METIS diff --git a/apps/cpu/sphere/sphere.cpp b/apps/cpu/sphere/sphere.cpp index 70dcc0ddd189f3906575e92877800ec709199a78..c01388374137210eb7dd5d2c020d54fd892f6f60 100644 --- a/apps/cpu/sphere/sphere.cpp +++ b/apps/cpu/sphere/sphere.cpp @@ -43,10 +43,10 @@ void run(string configname) real dp_LB = 1e-6; // double rhoLBinflow = dp_LB*3.0; - SPtr<BCAdapter> noSlipBCAdapter(new NoSlipBCAdapter()); - noSlipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NoSlipBCAlgorithm())); - SPtr<BCAdapter> slipBCAdapter(new SlipBCAdapter()); - slipBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleSlipBCAlgorithm())); + SPtr<BC> noSlipBC(new NoSlipBC()); + noSlipBC->setBCStrategy(SPtr<BCStrategy>(new NoSlipBCStrategy())); + SPtr<BC> slipBC(new SlipBC()); + slipBC->setBCStrategy(SPtr<BCStrategy>(new SimpleSlipBCStrategy())); real H = 50; mu::Parser fct; @@ -56,18 +56,18 @@ void run(string configname) //fct.SetExpr("16*U*x2*x3*(H-x2)*(H-x3)/H^4"); //fct.DefineConst("U", uLB); //fct.DefineConst("H", H); - SPtr<BCAdapter> velBCAdapter(new VelocityBCAdapter(true, false, false, fct, 0, BCFunction::INFCONST)); - //velBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new VelocityBCAlgorithm())); - velBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new SimpleVelocityBCAlgorithm())); + SPtr<BC> velBC(new VelocityBC(true, false, false, fct, 0, BCFunction::INFCONST)); + //velBC->setBCStrategy(SPtr<BCStrategy>(new VelocityBCStrategy())); + velBC->setBCStrategy(SPtr<BCStrategy>(new SimpleVelocityBCStrategy())); - SPtr<BCAdapter> denBCAdapter(new DensityBCAdapter(rhoLB)); - denBCAdapter->setBcAlgorithm(SPtr<BCAlgorithm>(new NonEqDensityBCAlgorithm())); + SPtr<BC> denBC(new DensityBC(rhoLB)); + denBC->setBCStrategy(SPtr<BCStrategy>(new NonEqDensityBCStrategy())); BoundaryConditionsBlockVisitor bcVisitor; - bcVisitor.addBC(noSlipBCAdapter); - bcVisitor.addBC(slipBCAdapter); - bcVisitor.addBC(velBCAdapter); - bcVisitor.addBC(denBCAdapter); + bcVisitor.addBC(noSlipBC); + bcVisitor.addBC(slipBC); + bcVisitor.addBC(velBC); + bcVisitor.addBC(denBC); real dx = 1; @@ -94,7 +94,7 @@ void run(string configname) //SPtr<GbObject3D> sphere(new GbSphere3D(L1 * 0.5, L2 * 0.5, L3 * 0.5, radius)); SPtr<GbObject3D> sphere(new GbSphere3D(75, 25, 25, radius)); GbSystem3D::writeGeoObject(sphere.get(), outputPath + "/geo/sphere", WbWriterVtkXmlBinary::getInstance()); - SPtr<D3Q27Interactor> sphereInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(sphere, grid, noSlipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> sphereInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(sphere, grid, noSlipBC, Interactor3D::SOLID)); if (true) { @@ -167,20 +167,20 @@ void run(string configname) SPtr<CoProcessor> ppblocks(new WriteBlocksCoProcessor(grid, SPtr<UbScheduler>(new UbScheduler(1)), outputPath, WbWriterVtkXmlBinary::getInstance(), comm)); //walls - SPtr<D3Q27Interactor> addWallYminInt(new D3Q27Interactor(addWallYmin, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallZminInt(new D3Q27Interactor(addWallZmin, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallYmaxInt(new D3Q27Interactor(addWallYmax, grid, slipBCAdapter, Interactor3D::SOLID)); - SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, slipBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallYminInt(new D3Q27Interactor(addWallYmin, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallZminInt(new D3Q27Interactor(addWallZmin, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallYmaxInt(new D3Q27Interactor(addWallYmax, grid, slipBC, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, slipBC, Interactor3D::SOLID)); //inflow - SPtr<D3Q27Interactor> inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, velBC, Interactor3D::SOLID)); - //D3Q27BoundaryConditionAdapterPtr denBCAdapterInflow(new D3Q27DensityBCAdapter(rhoLBinflow)); - //denBCAdapterInflow->setSecondaryBcOption(0); - //SPtr<D3Q27Interactor> inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, denBCAdapterInflow, Interactor3D::SOLID)); + //D3Q27BoundaryConditionAdapterPtr denBCInflow(new D3Q27DensityBC(rhoLBinflow)); + //denBCInflow->setSecondaryBcOption(0); + //SPtr<D3Q27Interactor> inflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoInflow, grid, denBCInflow, Interactor3D::SOLID)); //outflow - SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID)); + SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBC, Interactor3D::SOLID)); SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M)); InteractorsHelper intHelper(grid, metisVisitor); @@ -219,10 +219,10 @@ void run(string configname) SPtr<LBMKernel> kernel(new IncompressibleCumulantLBMKernel()); //SPtr<LBMKernel> kernel(new CompressibleCumulantLBMKernel()); - SPtr<BCProcessor> bcProcessor(new BCProcessor()); + SPtr<BCSet> BCSet(new BCSet()); - kernel->setBCProcessor(bcProcessor); + kernel->setBCSet(BCSet); SetKernelBlockVisitor kernelVisitor(kernel, nuLB, availMem, needMem); grid->accept(kernelVisitor); diff --git a/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.cpp b/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.cpp index 2dc4ab61c602e37ff8edd6397306dad036655e8c..838cd086adf298f53776ae5dc50e3e0e8279a7c7 100644 --- a/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.cpp +++ b/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.cpp @@ -84,7 +84,7 @@ SPtr<LBMKernel> IBcumulantK17LBMKernel::clone() kernel->setNX(nx); std::dynamic_pointer_cast<IBcumulantK17LBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -138,7 +138,7 @@ void IBcumulantK17LBMKernel::calculate(int step) nonLocalDistributions = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); restDistributions = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.h b/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.h index 6b19ada8dbc7bd07239c4086f4ab666f1031f28d..c13233ba733762fce9122f24b354cf10feef1c9a 100644 --- a/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.h +++ b/src/cpu/LiggghtsCoupling/IBcumulantK17LBMKernel.h @@ -35,7 +35,7 @@ #define IBcumulantK17LBMKernel_h__ #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "UbTiming.h" #include "CbArray4D.h" diff --git a/src/cpu/VirtualFluids.h b/src/cpu/VirtualFluids.h index 1ee4c7e78aded0e11ea723769d4515f0f1ec846d..458cd4733d9740f04b2ca67f9cbe976f5de16b4d 100644 --- a/src/cpu/VirtualFluids.h +++ b/src/cpu/VirtualFluids.h @@ -108,45 +108,45 @@ #include <muParserToken.h> #include <muParserTokenReader.h> -#include <BoundaryConditions/BCAdapter.h> -#include <BoundaryConditions/BCAlgorithm.h> +#include <BoundaryConditions/BC.h> +#include <BoundaryConditions/BCStrategy.h> #include <BoundaryConditions/BCArray3D.h> #include <BoundaryConditions/BCFunction.h> -#include <BoundaryConditions/BCProcessor.h> +#include <BoundaryConditions/BCSet.h> #include <BoundaryConditions/BoundaryConditions.h> -#include <BoundaryConditions/DensityBCAdapter.h> -#include <BoundaryConditions/EqDensityBCAlgorithm.h> -#include <BoundaryConditions/HighViscosityNoSlipBCAlgorithm.h> -#include <BoundaryConditions/NoSlipBCAdapter.h> -#include <BoundaryConditions/NoSlipBCAlgorithm.h> -#include <BoundaryConditions/NonEqDensityBCAlgorithm.h> -#include <BoundaryConditions/NonReflectingOutflowBCAlgorithm.h> -#include <BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.h> -#include <BoundaryConditions/NonReflectingInflowBCAlgorithm.h> -#include <BoundaryConditions/SlipBCAdapter.h> -#include <BoundaryConditions/SlipBCAlgorithm.h> -#include <BoundaryConditions/ThinWallBCProcessor.h> -#include <BoundaryConditions/ThinWallNoSlipBCAlgorithm.h> -#include <BoundaryConditions/VelocityBCAdapter.h> -#include <BoundaryConditions/VelocityBCAlgorithm.h> -#include <BoundaryConditions/VelocityWithDensityBCAlgorithm.h> -#include <BoundaryConditions/ThixotropyDensityBCAlgorithm.h> -#include <BoundaryConditions/ThixotropyNoSlipBCAlgorithm.h> -#include <BoundaryConditions/ThixotropyVelocityBCAlgorithm.h> -#include <BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.h> -#include <BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.h> -#include <BoundaryConditions/SimpleVelocityBCAlgorithm.h> -#include <BoundaryConditions/RheologyNoSlipBCAlgorithm.h> -#include <BoundaryConditions/RheologyBinghamModelNoSlipBCAlgorithm.h> -#include <BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCAlgorithm.h> -#include <BoundaryConditions/SimpleSlipBCAlgorithm.h> -#include <BoundaryConditions/RheologyPowellEyringModelNoSlipBCAlgorithm.h> -#include <BoundaryConditions/RheologyBinghamModelVelocityBCAlgorithm.h> -#include <BoundaryConditions/MultiphaseNoSlipBCAlgorithm.h> -#include <BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.h> -#include <BoundaryConditions/MultiphaseVelocityBCAdapter.h> -#include <BoundaryConditions/MultiphaseVelocityBCAlgorithm.h> -#include <BoundaryConditions/MultiphaseSlipBCAlgorithm.h> +#include <BoundaryConditions/DensityBC.h> +#include <BoundaryConditions/EqDensityBCStrategy.h> +#include <BoundaryConditions/HighViscosityNoSlipBCStrategy.h> +#include <BoundaryConditions/NoSlipBC.h> +#include <BoundaryConditions/NoSlipBCStrategy.h> +#include <BoundaryConditions/NonEqDensityBCStrategy.h> +#include <BoundaryConditions/NonReflectingOutflowBCStrategy.h> +#include <BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.h> +#include <BoundaryConditions/NonReflectingInflowBCStrategy.h> +#include <BoundaryConditions/SlipBC.h> +#include <BoundaryConditions/SlipBCStrategy.h> +#include <BoundaryConditions/ThinWallBCSet.h> +#include <BoundaryConditions/ThinWallNoSlipBCStrategy.h> +#include <BoundaryConditions/VelocityBC.h> +#include <BoundaryConditions/VelocityBCStrategy.h> +#include <BoundaryConditions/VelocityWithDensityBCStrategy.h> +#include <BoundaryConditions/ThixotropyDensityBCStrategy.h> +#include <BoundaryConditions/ThixotropyNoSlipBCStrategy.h> +#include <BoundaryConditions/ThixotropyVelocityBCStrategy.h> +#include <BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.h> +#include <BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.h> +#include <BoundaryConditions/SimpleVelocityBCStrategy.h> +#include <BoundaryConditions/RheologyNoSlipBCStrategy.h> +#include <BoundaryConditions/RheologyBinghamModelNoSlipBCStrategy.h> +#include <BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCStrategy.h> +#include <BoundaryConditions/SimpleSlipBCStrategy.h> +#include <BoundaryConditions/RheologyPowellEyringModelNoSlipBCStrategy.h> +#include <BoundaryConditions/RheologyBinghamModelVelocityBCStrategy.h> +#include <BoundaryConditions/MultiphaseNoSlipBCStrategy.h> +#include <BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.h> +#include <BoundaryConditions/MultiphaseVelocityBC.h> +#include <BoundaryConditions/MultiphaseVelocityBCStrategy.h> +#include <BoundaryConditions/MultiphaseSlipBCStrategy.h> #include <Connectors/Block3DConnector.h> //#include <Connectors/Block3DConnectorFactory.h> diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCAdapter.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/BC.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/BCAdapter.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/BC.h index 625fb92149df067639b05435d9b8597b6f96e775..7dc4e4d4146231db144717bdc16b70b01bf59a8b 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCAdapter.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BC.h @@ -26,30 +26,30 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file BCAdapter.h +//! \file BC.h //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#ifndef BCAdapter_H -#define BCAdapter_H +#ifndef BC_H +#define BC_H #include <PointerDefinitions.h> -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include "BoundaryConditions.h" class D3Q27Interactor; //! \brief Abstract class of baundary conditions adapter -//! \details BCAdapter supports the definition of boundary conditions in grid generation -class BCAdapter +//! \details BC supports the definition of boundary conditions in grid generation +class BC { public: - BCAdapter() = default; + BC() = default; //! \param secondaryBcOption additional option of boundary conditions - BCAdapter(const short &secondaryBcOption) : secondaryBcOption(secondaryBcOption) {} - virtual ~BCAdapter() = default; + BC(const short &secondaryBcOption) : secondaryBcOption(secondaryBcOption) {} + virtual ~BC() = default; // methods bool isTimeDependent() { return ((this->type & TIMEDEPENDENT) == TIMEDEPENDENT); } @@ -66,20 +66,20 @@ public: const real &worldX1, const real &worldX2, const real &worldX3, const real &q, const int &fdirection, const real &time = 0) = 0; - void setBcAlgorithm(SPtr<BCAlgorithm> alg) + void setBCStrategy(SPtr<BCStrategy> alg) { algorithmType = alg->getType(); algorithm = alg; } - SPtr<BCAlgorithm> getAlgorithm() { return algorithm; } - char getBcAlgorithmType() { return algorithmType; } + SPtr<BCStrategy> getAlgorithm() { return algorithm; } + char getBCStrategyType() { return algorithmType; } protected: short secondaryBcOption{ 0 }; char type{ 0 }; - SPtr<BCAlgorithm> algorithm; + SPtr<BCStrategy> algorithm; char algorithmType{ -1 }; static const char TIMEDEPENDENT = 1 << 0; //'1'; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCProcessor.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCSet.cpp similarity index 82% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/BCProcessor.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/BCSet.cpp index de647a842d1ffcdb08d39988befe1ed19ebc5842..55444b0d699c7194ad0631d19cad1409200ba963 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCSet.cpp @@ -26,21 +26,21 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file BCProcessor.h +//! \file BCSet.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "BCProcessor.h" -#include "BCAlgorithm.h" +#include "BCSet.h" +#include "BCStrategy.h" #include "BCArray3D.h" #include "D3Q27EsoTwist3DSplittedVector.h" #include "DataSet3D.h" #include "ILBMKernel.h" -BCProcessor::BCProcessor() = default; +BCSet::BCSet() = default; ////////////////////////////////////////////////////////////////////////// -BCProcessor::BCProcessor(SPtr<ILBMKernel> kernel) +BCSet::BCSet(SPtr<ILBMKernel> kernel) { SPtr<DistributionArray3D> distributions = std::dynamic_pointer_cast<EsoTwist3D>(kernel->getDataSet()->getFdistributions()); @@ -48,19 +48,19 @@ BCProcessor::BCProcessor(SPtr<ILBMKernel> kernel) BCArray3D::FLUID); } ////////////////////////////////////////////////////////////////////////// -BCProcessor::~BCProcessor() = default; +BCSet::~BCSet() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCProcessor> BCProcessor::clone(SPtr<ILBMKernel> kernel) +SPtr<BCSet> BCSet::clone(SPtr<ILBMKernel> kernel) { - SPtr<BCProcessor> bcProcessor(new BCProcessor(kernel)); - return bcProcessor; + SPtr<BCSet> BCSet(new BCSet(kernel)); + return BCSet; } ////////////////////////////////////////////////////////////////////////// -SPtr<BCArray3D> BCProcessor::getBCArray() { return bcArray; } +SPtr<BCArray3D> BCSet::getBCArray() { return bcArray; } ////////////////////////////////////////////////////////////////////////// -void BCProcessor::setBCArray(SPtr<BCArray3D> bcarray) { bcArray = bcarray; } +void BCSet::setBCArray(SPtr<BCArray3D> bcarray) { bcArray = bcarray; } ////////////////////////////////////////////////////////////////////////// -void BCProcessor::addBC(SPtr<BCAlgorithm> bc) +void BCSet::addBC(SPtr<BCStrategy> bc) { if (bc->isPreCollision()) { preBC.push_back(bc); @@ -69,19 +69,19 @@ void BCProcessor::addBC(SPtr<BCAlgorithm> bc) } } ////////////////////////////////////////////////////////////////////////// -void BCProcessor::applyPreCollisionBC() +void BCSet::applyPreCollisionBC() { - for (SPtr<BCAlgorithm> bc : preBC) + for (SPtr<BCStrategy> bc : preBC) bc->applyBC(); } ////////////////////////////////////////////////////////////////////////// -void BCProcessor::applyPostCollisionBC() +void BCSet::applyPostCollisionBC() { - for (SPtr<BCAlgorithm> bc : postBC) + for (SPtr<BCStrategy> bc : postBC) bc->applyBC(); } ////////////////////////////////////////////////////////////////////////// -void BCProcessor::clearBC() +void BCSet::clearBC() { preBC.clear(); postBC.clear(); diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCProcessor.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCSet.h similarity index 86% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/BCProcessor.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/BCSet.h index 266307305db6febd885d6e90a8385714947221ff..f3f464093eab5e6ba7945e07dc4f7c929fb1bb34 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCProcessor.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCSet.h @@ -26,40 +26,40 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file BCProcessor.h +//! \file BCSet.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef BC_PROCESSSOR_H -#define BC_PROCESSSOR_H +#ifndef BCSet_H +#define BCSet_H #include <PointerDefinitions.h> #include <vector> class BCArray3D; -class BCAlgorithm; +class BCStrategy; class ILBMKernel; //! A class provides an interface for boundary conditions in the calculation loop. -class BCProcessor +class BCSet { public: - BCProcessor(); - BCProcessor(SPtr<ILBMKernel> kernel); - virtual ~BCProcessor(); + BCSet(); + BCSet(SPtr<ILBMKernel> kernel); + virtual ~BCSet(); virtual SPtr<BCArray3D> getBCArray(); virtual void setBCArray(SPtr<BCArray3D> bcarray); - virtual SPtr<BCProcessor> clone(SPtr<ILBMKernel> kernel); + virtual SPtr<BCSet> clone(SPtr<ILBMKernel> kernel); - void addBC(SPtr<BCAlgorithm> bc); + void addBC(SPtr<BCStrategy> bc); void applyPreCollisionBC(); void applyPostCollisionBC(); void clearBC(); protected: - std::vector<SPtr<BCAlgorithm>> preBC; - std::vector<SPtr<BCAlgorithm>> postBC; + std::vector<SPtr<BCStrategy>> preBC; + std::vector<SPtr<BCStrategy>> postBC; SPtr<BCArray3D> bcArray; private: diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCStrategy.cpp similarity index 81% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/BCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/BCStrategy.cpp index 179007cb6f3f881517c55196420c2cf7135a62f1..3331f24538f421db95d12da0eb6f287ba858765a 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCStrategy.cpp @@ -26,33 +26,33 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file BCAlgorithm.cpp +//! \file BCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include "BCArray3D.h" #include "BoundaryConditions.h" #include "EsoTwist3D.h" #include "Block3D.h" -void BCAlgorithm::setBlock(SPtr<Block3D> block) +void BCStrategy::setBlock(SPtr<Block3D> block) { this->block = block; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setNodeIndex(int x1, int x2, int x3) +void BCStrategy::setNodeIndex(int x1, int x2, int x3) { this->x1 = x1; this->x2 = x2; this->x3 = x3; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setBcPointer(SPtr<BoundaryConditions> bcPtr) { this->bcPtr = bcPtr; } +void BCStrategy::setBcPointer(SPtr<BoundaryConditions> bcPtr) { this->bcPtr = bcPtr; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setCompressible(bool c) +void BCStrategy::setCompressible(bool c) { compressible = c; @@ -69,26 +69,26 @@ void BCAlgorithm::setCompressible(bool c) } } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setCollFactor(real cf) { collFactor = cf; } +void BCStrategy::setCollFactor(real cf) { collFactor = cf; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setCollFactorL(real cf) { collFactorL = cf; } +void BCStrategy::setCollFactorL(real cf) { collFactorL = cf; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setCollFactorG(real cf) { collFactorG = cf; } +void BCStrategy::setCollFactorG(real cf) { collFactorG = cf; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setCollFactorPh(real cf) { collFactorPh = cf; } +void BCStrategy::setCollFactorPh(real cf) { collFactorPh = cf; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setDensityRatio(real dr) { densityRatio = dr; } +void BCStrategy::setDensityRatio(real dr) { densityRatio = dr; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setPhiBound(real phiL, real phiH) +void BCStrategy::setPhiBound(real phiL, real phiH) { this->phiL = phiL; this->phiH = phiH; } ////////////////////////////////////////////////////////////////////////// -char BCAlgorithm::getType() { return type; } +char BCStrategy::getType() { return type; } ////////////////////////////////////////////////////////////////////////// -bool BCAlgorithm::isPreCollision() { return preCollision; } +bool BCStrategy::isPreCollision() { return preCollision; } ////////////////////////////////////////////////////////////////////////// -SPtr<BCArray3D> BCAlgorithm::getBcArray() { return bcArray; } +SPtr<BCArray3D> BCStrategy::getBcArray() { return bcArray; } ////////////////////////////////////////////////////////////////////////// -void BCAlgorithm::setBcArray(SPtr<BCArray3D> bcarray) { bcArray = bcarray; } +void BCStrategy::setBcArray(SPtr<BCArray3D> bcarray) { bcArray = bcarray; } diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCStrategy.h similarity index 69% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/BCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/BCStrategy.h index f182546b0740cbff6b66b3849e2c67e42de1a98d..9b2b7cb803948cb0dbd4ebac103c4c935de38f06 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BCStrategy.h @@ -26,7 +26,7 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file BCAlgorithm.h +//! \file BCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= @@ -44,38 +44,38 @@ class BoundaryConditions; class Block3D; //! \brief Abstract class of baundary conditions algorithm -//! \details BCAlgorithm provides interface for implementation of diferent boundary conditions -class BCAlgorithm +//! \details BCStrategy provides interface for implementation of diferent boundary conditions +class BCStrategy { public: - static const char VelocityBCAlgorithm = 0; - static const char EqDensityBCAlgorithm = 1; - static const char NonEqDensityBCAlgorithm = 2; - static const char NoSlipBCAlgorithm = 3; - static const char SlipBCAlgorithm = 4; - static const char HighViscosityNoSlipBCAlgorithm = 5; - static const char ThinWallNoSlipBCAlgorithm = 6; - static const char VelocityWithDensityBCAlgorithm = 7; - static const char NonReflectingOutflowBCAlgorithm = 8; - static const char ThixotropyVelocityBCAlgorithm = 9; - static const char ThixotropyDensityBCAlgorithm = 10; - static const char ThixotropyNoSlipBCAlgorithm = 11; - static const char ThixotropyNonReflectingOutflowBCAlgorithm = 12; - static const char ThixotropyVelocityWithDensityBCAlgorithm = 13; - static const char RheologyBinghamModelNoSlipBCAlgorithm = 14; - static const char RheologyHerschelBulkleyModelNoSlipBCAlgorithm = 15; - static const char SimpleVelocityBCAlgorithm = 16; - static const char SimpleSlipBCAlgorithm = 17; - static const char RheologyPowellEyringModelNoSlipBCAlgorithm = 18; - static const char RheologyBinghamModelVelocityBCAlgorithm = 19; - static const char MultiphaseNoSlipBCAlgorithm = 20; - static const char MultiphaseVelocityBCAlgorithm = 21; - static const char NonReflectingInflowBCAlgorithm = 22; - static const char NonReflectingOutflowBCAlgorithmWithRelaxation = 23; + static const char VelocityBCStrategy = 0; + static const char EqDensityBCStrategy = 1; + static const char NonEqDensityBCStrategy = 2; + static const char NoSlipBCStrategy = 3; + static const char SlipBCStrategy = 4; + static const char HighViscosityNoSlipBCStrategy = 5; + static const char ThinWallNoSlipBCStrategy = 6; + static const char VelocityWithDensityBCStrategy = 7; + static const char NonReflectingOutflowBCStrategy = 8; + static const char ThixotropyVelocityBCStrategy = 9; + static const char ThixotropyDensityBCStrategy = 10; + static const char ThixotropyNoSlipBCStrategy = 11; + static const char ThixotropyNonReflectingOutflowBCStrategy = 12; + static const char ThixotropyVelocityWithDensityBCStrategy = 13; + static const char RheologyBinghamModelNoSlipBCStrategy = 14; + static const char RheologyHerschelBulkleyModelNoSlipBCStrategy = 15; + static const char SimpleVelocityBCStrategy = 16; + static const char SimpleSlipBCStrategy = 17; + static const char RheologyPowellEyringModelNoSlipBCStrategy = 18; + static const char RheologyBinghamModelVelocityBCStrategy = 19; + static const char MultiphaseNoSlipBCStrategy = 20; + static const char MultiphaseVelocityBCStrategy = 21; + static const char NonReflectingInflowBCStrategy = 22; + static const char NonReflectingOutflowWithRelaxationBCStrategy = 23; public: - BCAlgorithm() = default; - virtual ~BCAlgorithm() = default; + BCStrategy() = default; + virtual ~BCStrategy() = default; virtual void addDistributions(SPtr<DistributionArray3D> distributions) = 0; virtual void addDistributionsH(SPtr<DistributionArray3D> distributionsH) {} @@ -94,7 +94,7 @@ public: char getType(); bool isPreCollision(); - virtual SPtr<BCAlgorithm> clone() = 0; + virtual SPtr<BCStrategy> clone() = 0; SPtr<BCArray3D> getBcArray(); void setBcArray(SPtr<BCArray3D> bcarray); virtual void applyBC() = 0; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h index 54775dad704b9b401f1c28b9ff5b8015098ca522..e3f42c29b9c19467e4e32eabc93f1b93401f25eb 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h @@ -311,8 +311,8 @@ public: return (((flag >> (optionDigits * direction)) & maxOptionVal) != 0); } - void setBcAlgorithmType(char alg) { algorithmType = alg; } - char getBcAlgorithmType() { return algorithmType; } + void setBCStrategyType(char alg) { algorithmType = alg; } + char getBCStrategyType() { return algorithmType; } public: static const int optionDigits = 2; //--> 2 bits for secondary Option --> maxOptionVal = 7 diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBCAdapter.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBC.cpp similarity index 86% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBCAdapter.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBC.cpp index d8bc5f5f729e28bc409d2e3bcb45c879d2b47ad0..8d4fabcbb6792f329ec980362dde8a5ec17f58cf 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBCAdapter.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBC.cpp @@ -26,42 +26,42 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file DensityBCAdapter.cpp +//! \file DensityBC.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "DensityBCAdapter.h" +#include "DensityBC.h" #include "basics/utilities/UbInfinity.h" #include "basics/utilities/UbLogger.h" #include "lbm/constants/NumericConstants.h" using namespace std; /*==========================================================*/ -DensityBCAdapter::DensityBCAdapter(const real &dens, const real &startTime, const real &endTime) +DensityBC::DensityBC(const real &dens, const real &startTime, const real &endTime) { this->densBCs.emplace_back(dens, startTime, endTime); this->init(); } /*==========================================================*/ -DensityBCAdapter::DensityBCAdapter(const BCFunction &densBC) +DensityBC::DensityBC(const BCFunction &densBC) { this->densBCs.push_back(densBC); this->init(); } /*==========================================================*/ -DensityBCAdapter::DensityBCAdapter(const std::vector<BCFunction> &densBCs) +DensityBC::DensityBC(const std::vector<BCFunction> &densBCs) { this->densBCs = densBCs; this->init(); } /*==========================================================*/ -DensityBCAdapter::DensityBCAdapter(const mu::Parser &function, const real &startTime, const real &endTime) +DensityBC::DensityBC(const mu::Parser &function, const real &startTime, const real &endTime) { this->densBCs.emplace_back(function, startTime, endTime); this->init(); } /*==========================================================*/ -void DensityBCAdapter::init() +void DensityBC::init() { this->timeStep = vf::lbm::constant::c0o1; @@ -97,7 +97,7 @@ void DensityBCAdapter::init() } } /*==========================================================*/ -void DensityBCAdapter::init(const D3Q27Interactor *const & /*interactor*/, const real &time) +void DensityBC::init(const D3Q27Interactor *const & /*interactor*/, const real &time) { this->timeStep = time; this->tmpDensityFunction = NULL; @@ -125,18 +125,18 @@ void DensityBCAdapter::init(const D3Q27Interactor *const & /*interactor*/, const if (UbMath::greaterEqual(time, maxEndtime)) this->unsetTimeDependent(); - UBLOG(logDEBUG4, "D3Q27DensityBCAdapter::init(time=" + UBLOG(logDEBUG4, "D3Q27DensityBC::init(time=" << time << ") " << ", rho= \"" << (tmpDensityFunction ? tmpDensityFunction->GetExpr() : "-") << "\", timedependant=" << (this->isTimeDependent() ? "true" : "false")); } /*==========================================================*/ -void DensityBCAdapter::update(const D3Q27Interactor *const &interactor, const real &time) +void DensityBC::update(const D3Q27Interactor *const &interactor, const real &time) { this->init(interactor, time); } /*==========================================================*/ -void DensityBCAdapter::adaptBCForDirection(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, +void DensityBC::adaptBCForDirection(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, const real & /*worldX1*/, const real & /*worldX2*/, const real & /*worldX3*/, const real &q, const int &fdirection, const real & /*time*/) @@ -145,14 +145,14 @@ void DensityBCAdapter::adaptBCForDirection(const D3Q27Interactor & /*interactor* bc->setQ((real)q, fdirection); } /*==========================================================*/ -void DensityBCAdapter::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real &worldX1, +void DensityBC::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real &worldX1, const real &worldX2, const real &worldX3, const real &time) { this->setNodeDensity(interactor, bc, worldX1, worldX2, worldX3, time); - bc->setBcAlgorithmType(algorithmType); + bc->setBCStrategyType(algorithmType); } /*==========================================================*/ -void DensityBCAdapter::setNodeDensity(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, +void DensityBC::setNodeDensity(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, const real &worldX1, const real &worldX2, const real &worldX3, const real ×tep) { @@ -177,7 +177,7 @@ void DensityBCAdapter::setNodeDensity(const D3Q27Interactor & /*interactor*/, SP } } /*==========================================================*/ -real DensityBCAdapter::getDensity(const real &x1, const real &x2, const real &x3, const real &timeStep) +real DensityBC::getDensity(const real &x1, const real &x2, const real &x3, const real &timeStep) { this->x1 = x1; this->x2 = x2; @@ -190,10 +190,10 @@ real DensityBCAdapter::getDensity(const real &x1, const real &x2, const real &x3 return tmpDensityFunction->Eval(); } /*==========================================================*/ -string DensityBCAdapter::toString() +string DensityBC::toString() { stringstream info; - info << "D3Q27DensityBCAdapter:\n"; + info << "D3Q27DensityBC:\n"; info << " #dens-functions = " << (int)densBCs.size() << endl; info << " protected variables: x1, x2, x3, t" << endl; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBCAdapter.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBC.h similarity index 88% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBCAdapter.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBC.h index 74bfea4dd533ca8bbe81a5941ab302e3ffb06a95..b51fb984a7b5ea1e463e06a43ff4d2691d444341 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBCAdapter.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/DensityBC.h @@ -26,13 +26,13 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file DensityBCAdapter.h +//! \file DensityBC.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef DensityBCAdapter_H -#define DensityBCAdapter_H +#ifndef DensityBC_H +#define DensityBC_H #include <iostream> #include <sstream> @@ -42,10 +42,10 @@ //#include "basics/utilities/UbMath.h" #include "basics/utilities/UbTuple.h" -#include "BCAdapter.h" +#include "BC.h" #include "BCFunction.h" -//* DensityBCAdapter */ +//* DensityBC */ //* */ //** //<BR><BR> @@ -57,15 +57,15 @@ // usage: ... //*/ -class DensityBCAdapter : public BCAdapter +class DensityBC : public BC { public: // constructors - DensityBCAdapter() { this->init(); } - DensityBCAdapter(const real &dens, const real &startTime = 0.0, const real &endTime = BCFunction::INFCONST); - DensityBCAdapter(const BCFunction &densBC); - DensityBCAdapter(const std::vector<BCFunction> &densBCs); - DensityBCAdapter(const mu::Parser &function, const real &startTime = 0.0, + DensityBC() { this->init(); } + DensityBC(const real &dens, const real &startTime = 0.0, const real &endTime = BCFunction::INFCONST); + DensityBC(const BCFunction &densBC); + DensityBC(const std::vector<BCFunction> &densBCs); + DensityBC(const mu::Parser &function, const real &startTime = 0.0, const real &endTime = BCFunction::INFCONST); //------------- implements D3Q27BoundaryConditionAdapter ----- start diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCStrategy.cpp similarity index 88% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCStrategy.cpp index fa5dc1bdeff9112a7a0c1a26b9c52ee5f27012a5..77a4601ea352efe1b25c9c509077f533e44f63dd 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCStrategy.cpp @@ -26,34 +26,34 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file EqDensityBCAlgorithm.cpp +//! \file EqDensityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "EqDensityBCAlgorithm.h" +#include "EqDensityBCStrategy.h" #include "BoundaryConditions.h" #include "DistributionArray3D.h" -EqDensityBCAlgorithm::EqDensityBCAlgorithm() +EqDensityBCStrategy::EqDensityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::EqDensityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::EqDensityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -EqDensityBCAlgorithm::~EqDensityBCAlgorithm() = default; +EqDensityBCStrategy::~EqDensityBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> EqDensityBCAlgorithm::clone() +SPtr<BCStrategy> EqDensityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new EqDensityBCAlgorithm()); + SPtr<BCStrategy> bc(new EqDensityBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void EqDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void EqDensityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void EqDensityBCAlgorithm::applyBC() +void EqDensityBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCStrategy.h similarity index 88% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCStrategy.h index 173b6b12f46fa46d021c17345b203a97862c7949..2de16acdd11665f1535611d3820f8f4909f5fc97 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file EqDensityBCAlgorithm.h +//! \file EqDensityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef EqDensityBCAlgorithm_h__ -#define EqDensityBCAlgorithm_h__ +#ifndef EqDensityBCStrategy_h__ +#define EqDensityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class EqDensityBCAlgorithm : public BCAlgorithm +class EqDensityBCStrategy : public BCStrategy { public: - EqDensityBCAlgorithm(); - ~EqDensityBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; + EqDensityBCStrategy(); + ~EqDensityBCStrategy() override; + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; -#endif // EqDensityBCAlgorithm_h__ +#endif // EqDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.h deleted file mode 100644 index bb033d409cd84a2b419aa46599a61ca1e8d29aad..0000000000000000000000000000000000000000 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.h +++ /dev/null @@ -1,50 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file HighViscosityNoSlipBCAlgorithm.h -//! \ingroup BoundarConditions -//! \author Konstantin Kutscher -//======================================================================================= -#ifndef HighViscosityNoSlipBCAlgorithm_h__ -#define HighViscosityNoSlipBCAlgorithm_h__ - -#include "BCAlgorithm.h" -#include <PointerDefinitions.h> - -class DistributionArray3D; - -class HighViscosityNoSlipBCAlgorithm : public BCAlgorithm -{ -public: - HighViscosityNoSlipBCAlgorithm(); - ~HighViscosityNoSlipBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; - void addDistributions(SPtr<DistributionArray3D> distributions) override; - void applyBC() override; -}; -#endif // HighViscosityNoSlipBCAlgorithm_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.cpp similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.cpp index 2e15d13651145d80ff062f3a9734457eff57bd4b..227b5ca3513d96c79db46cf0e1653d9ea8c47ee1 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.cpp @@ -26,34 +26,34 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file HighViscosityNoSlipBCAlgorithm.cpp +//! \file HighViscosityNoSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "HighViscosityNoSlipBCAlgorithm.h" +#include "HighViscosityNoSlipBCStrategy.h" #include "BoundaryConditions.h" #include "DistributionArray3D.h" -HighViscosityNoSlipBCAlgorithm::HighViscosityNoSlipBCAlgorithm() +HighViscosityNoSlipBCStrategy::HighViscosityNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::HighViscosityNoSlipBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::HighViscosityNoSlipBCStrategy; + BCStrategy::preCollision = true; } ////////////////////////////////////////////////////////////////////////// -HighViscosityNoSlipBCAlgorithm::~HighViscosityNoSlipBCAlgorithm() = default; +HighViscosityNoSlipBCStrategy::~HighViscosityNoSlipBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> HighViscosityNoSlipBCAlgorithm::clone() +SPtr<BCStrategy> HighViscosityNoSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new HighViscosityNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new HighViscosityNoSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void HighViscosityNoSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void HighViscosityNoSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void HighViscosityNoSlipBCAlgorithm::applyBC() +void HighViscosityNoSlipBCStrategy::applyBC() { real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.h new file mode 100644 index 0000000000000000000000000000000000000000..e153a67e644530f52977f1644c30426acce44843 --- /dev/null +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.h @@ -0,0 +1,50 @@ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// This file is part of VirtualFluids. VirtualFluids is free software: you can +// redistribute it and/or modify it under the terms of the GNU General Public +// License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. +// +//! \file HighViscosityNoSlipBCStrategy.h +//! \ingroup BoundarConditions +//! \author Konstantin Kutscher +//======================================================================================= +#ifndef HighViscosityNoSlipBCStrategy_h__ +#define HighViscosityNoSlipBCStrategy_h__ + +#include "BCStrategy.h" +#include <PointerDefinitions.h> + +class DistributionArray3D; + +class HighViscosityNoSlipBCStrategy : public BCStrategy +{ +public: + HighViscosityNoSlipBCStrategy(); + ~HighViscosityNoSlipBCStrategy() override; + SPtr<BCStrategy> clone() override; + void addDistributions(SPtr<DistributionArray3D> distributions) override; + void applyBC() override; +}; +#endif // HighViscosityNoSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCStrategy.cpp similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCStrategy.cpp index 73e399fb6ab3df0ea06620da4b5c0f6fedc8428e..d438f80f53fcefd553813b0c9517e0fe545af96f 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCStrategy.cpp @@ -26,43 +26,43 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseNoSlipBCAlgorithm.cpp +//! \file MultiphaseNoSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#include "MultiphaseNoSlipBCAlgorithm.h" +#include "MultiphaseNoSlipBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -MultiphaseNoSlipBCAlgorithm::MultiphaseNoSlipBCAlgorithm() +MultiphaseNoSlipBCStrategy::MultiphaseNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::MultiphaseNoSlipBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::MultiphaseNoSlipBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -MultiphaseNoSlipBCAlgorithm::~MultiphaseNoSlipBCAlgorithm() +MultiphaseNoSlipBCStrategy::~MultiphaseNoSlipBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> MultiphaseNoSlipBCAlgorithm::clone() +SPtr<BCStrategy> MultiphaseNoSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new MultiphaseNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new MultiphaseNoSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNoSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void MultiphaseNoSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNoSlipBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributionsH) +void MultiphaseNoSlipBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributionsH) { this->distributionsH = distributionsH; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNoSlipBCAlgorithm::applyBC() +void MultiphaseNoSlipBCStrategy::applyBC() { real f[D3Q27System::ENDF+1]; real h[D3Q27System::ENDF+1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCStrategy.h similarity index 86% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCStrategy.h index dc6e5bc6a558b18e2b70bfea8ab1ed4bf1853a82..390c2952e43398e7437ea61d1bc11890d454b9bc 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNoSlipBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseNoSlipBCAlgorithm.h +//! \file MultiphaseNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#ifndef MultiphaseNoSlipBCAlgorithm_h__ -#define MultiphaseNoSlipBCAlgorithm_h__ +#ifndef MultiphaseNoSlipBCStrategy_h__ +#define MultiphaseNoSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" //! A class implements no-slip boundary condition for multiphase simulations -class MultiphaseNoSlipBCAlgorithm : public BCAlgorithm +class MultiphaseNoSlipBCStrategy : public BCStrategy { public: - MultiphaseNoSlipBCAlgorithm(); - virtual ~MultiphaseNoSlipBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + MultiphaseNoSlipBCStrategy(); + virtual ~MultiphaseNoSlipBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void addDistributionsH(SPtr<DistributionArray3D> distributionsH) override; void applyBC() override; }; -#endif // MultiphaseNoSlipBCAlgorithm_h__ +#endif // MultiphaseNoSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.cpp similarity index 98% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.cpp index df6aeb5d58d2bb8ebad8d7942aaf95943c68509a..58faec07f46d9b6d708ce83dfc823838bcfcc4df 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.cpp @@ -26,48 +26,48 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseNonReflectingOutflowBCAlgorithm.cpp +//! \file MultiphaseNonReflectingOutflowBCStrategy.cpp //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#include "MultiphaseNonReflectingOutflowBCAlgorithm.h" +#include "MultiphaseNonReflectingOutflowBCStrategy.h" #include "BoundaryConditions.h" #include "D3Q27System.h" #include "DistributionArray3D.h" -MultiphaseNonReflectingOutflowBCAlgorithm::MultiphaseNonReflectingOutflowBCAlgorithm() +MultiphaseNonReflectingOutflowBCStrategy::MultiphaseNonReflectingOutflowBCStrategy() { - BCAlgorithm::type = BCAlgorithm::NonReflectingOutflowBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::NonReflectingOutflowBCStrategy; + BCStrategy::preCollision = true; } ////////////////////////////////////////////////////////////////////////// -MultiphaseNonReflectingOutflowBCAlgorithm::~MultiphaseNonReflectingOutflowBCAlgorithm() +MultiphaseNonReflectingOutflowBCStrategy::~MultiphaseNonReflectingOutflowBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> MultiphaseNonReflectingOutflowBCAlgorithm::clone() +SPtr<BCStrategy> MultiphaseNonReflectingOutflowBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new MultiphaseNonReflectingOutflowBCAlgorithm()); + SPtr<BCStrategy> bc(new MultiphaseNonReflectingOutflowBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNonReflectingOutflowBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void MultiphaseNonReflectingOutflowBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNonReflectingOutflowBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributionsH) +void MultiphaseNonReflectingOutflowBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributionsH) { this->distributionsH = distributionsH; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNonReflectingOutflowBCAlgorithm::addDistributionsH2(SPtr<DistributionArray3D> distributionsH2) +void MultiphaseNonReflectingOutflowBCStrategy::addDistributionsH2(SPtr<DistributionArray3D> distributionsH2) { this->distributionsH2 = distributionsH2; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseNonReflectingOutflowBCAlgorithm::applyBC() +void MultiphaseNonReflectingOutflowBCStrategy::applyBC() { using namespace D3Q27System; // using namespace UbMath; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.h similarity index 84% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.h index 3fa67b2763eb5a3d6d456f72b2fdada5a6040782..3aae2ce0384e67cd0024106fb7de3d9b1b1dd7a8 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseNonReflectingOutflowBCAlgorithm.h +//! \file MultiphaseNonReflectingOutflowBCStrategy.h //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#ifndef MultiphaseNonReflectingOutflowBCAlgorithm_h__ -#define MultiphaseNonReflectingOutflowBCAlgorithm_h__ +#ifndef MultiphaseNonReflectingOutflowBCStrategy_h__ +#define MultiphaseNonReflectingOutflowBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" //! A class implements non reflecting outflow boundary condition for multiphase simulations -class MultiphaseNonReflectingOutflowBCAlgorithm : public BCAlgorithm +class MultiphaseNonReflectingOutflowBCStrategy : public BCStrategy { public: - MultiphaseNonReflectingOutflowBCAlgorithm(); - ~MultiphaseNonReflectingOutflowBCAlgorithm(); - SPtr<BCAlgorithm> clone(); + MultiphaseNonReflectingOutflowBCStrategy(); + ~MultiphaseNonReflectingOutflowBCStrategy(); + SPtr<BCStrategy> clone(); void addDistributions(SPtr<DistributionArray3D> distributions); void addDistributionsH(SPtr<DistributionArray3D> distributionsH); void addDistributionsH2(SPtr<DistributionArray3D> distributionsH2); void applyBC(); }; -#endif // MultiphaseNonReflectingOutflowBCAlgorithm_h__ +#endif // MultiphaseNonReflectingOutflowBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCStrategy.cpp similarity index 92% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCStrategy.cpp index cfae7dc6a99d75da63c26af9d5afb1b6cebd2a07..904a0ff19ff5b54c6aa083bbce3ba24d9766e720 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCStrategy.cpp @@ -26,43 +26,43 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseSlipBCAlgorithm.cpp +//! \file MultiphaseSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#include "MultiphaseSlipBCAlgorithm.h" +#include "MultiphaseSlipBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -MultiphaseSlipBCAlgorithm::MultiphaseSlipBCAlgorithm() +MultiphaseSlipBCStrategy::MultiphaseSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::SlipBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::SlipBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -MultiphaseSlipBCAlgorithm::~MultiphaseSlipBCAlgorithm() +MultiphaseSlipBCStrategy::~MultiphaseSlipBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> MultiphaseSlipBCAlgorithm::clone() +SPtr<BCStrategy> MultiphaseSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new MultiphaseSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new MultiphaseSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void MultiphaseSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseSlipBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributionsH) +void MultiphaseSlipBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributionsH) { this->distributionsH = distributionsH; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseSlipBCAlgorithm::applyBC() +void MultiphaseSlipBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCStrategy.h index 53d41d33ca333b7a7bf5515883eef697a20fb04a..1eb25a958505eb2fca2509763acf2f14bdf93414 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCStrategy.h @@ -26,26 +26,26 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseSlipBCAlgorithm.h +//! \file MultiphaseSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#ifndef MultiphaseSlipBCAlgorithm_h__ -#define MultiphaseSlipBCAlgorithm_h__ +#ifndef MultiphaseSlipBCStrategy_h__ +#define MultiphaseSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" //! A class implements slip boundary condition for multiphase simulation -class MultiphaseSlipBCAlgorithm : public BCAlgorithm +class MultiphaseSlipBCStrategy : public BCStrategy { public: - MultiphaseSlipBCAlgorithm(); - virtual ~MultiphaseSlipBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + MultiphaseSlipBCStrategy(); + virtual ~MultiphaseSlipBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void addDistributionsH(SPtr<DistributionArray3D> distributionsH) override; void applyBC() override; }; -#endif // SlipBCAlgorithm_h__ +#endif // SlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAdapter.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBC.cpp similarity index 82% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAdapter.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBC.cpp index fe716b52bcf934b33e04a865cf960072c0b3194d..1adf45607c2015f287b0ec310b77c7af7bc9848f 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAdapter.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBC.cpp @@ -26,12 +26,12 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseVelocityBCAdapter.cpp +//! \file MultiphaseVelocityBC.cpp //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#include "MultiphaseVelocityBCAdapter.h" +#include "MultiphaseVelocityBC.h" #include "basics/utilities/UbLogger.h" #include "basics/utilities/UbMath.h" #include "basics/utilities/UbTuple.h" @@ -39,7 +39,7 @@ using namespace std; -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const BCFunction& velVxBC) +MultiphaseVelocityBC::MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const BCFunction& velVxBC) { if(vx1) this->vx1BCs.push_back(velVxBC); if(vx2) this->vx2BCs.push_back(velVxBC); @@ -47,7 +47,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function, const real& phiBC, const real& startTime, const real& endTime ) +MultiphaseVelocityBC::MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function, const real& phiBC, const real& startTime, const real& endTime ) { if(vx1) this->vx1BCs.push_back(BCFunction(function,startTime,endTime)); if(vx2) this->vx2BCs.push_back(BCFunction(function,startTime,endTime)); @@ -58,7 +58,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function1, const mu::Parser& function2, const mu::Parser& function3, const real& phiBC, const real& startTime, const real& endTime ) +MultiphaseVelocityBC::MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function1, const mu::Parser& function2, const mu::Parser& function3, const real& phiBC, const real& startTime, const real& endTime ) { if(vx1) this->vx1BCs.push_back(BCFunction(function1,startTime,endTime)); if(vx2) this->vx2BCs.push_back(BCFunction(function2,startTime,endTime)); @@ -67,7 +67,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const string& functionstring, const real& startTime, const real& endTime ) +MultiphaseVelocityBC::MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const string& functionstring, const real& startTime, const real& endTime ) { if(vx1) this->vx1BCs.push_back(BCFunction(functionstring,startTime,endTime)); if(vx2) this->vx2BCs.push_back(BCFunction(functionstring,startTime,endTime)); @@ -75,7 +75,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const bool& vx1, const this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const BCFunction& velBC, bool x1Dir, bool x2Dir, bool x3Dir) +MultiphaseVelocityBC::MultiphaseVelocityBC(const BCFunction& velBC, bool x1Dir, bool x2Dir, bool x3Dir) { if(x1Dir) this->vx1BCs.push_back(velBC); if(x2Dir) this->vx2BCs.push_back(velBC); @@ -83,7 +83,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const BCFunction& velBC this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const BCFunction& velVx1BC, const BCFunction& velVx2BC, const BCFunction& velVx3BC) +MultiphaseVelocityBC::MultiphaseVelocityBC(const BCFunction& velVx1BC, const BCFunction& velVx2BC, const BCFunction& velVx3BC) { if( velVx1BC.getEndTime()!=-Ub::inf ) this->vx1BCs.push_back(velVx1BC); if( velVx2BC.getEndTime()!=-Ub::inf ) this->vx2BCs.push_back(velVx2BC); @@ -91,7 +91,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const BCFunction& velVx this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const vector< BCFunction >& velVx1BCs, const vector< BCFunction >& velVx2BCs, const vector< BCFunction >& velVx3BCs) +MultiphaseVelocityBC::MultiphaseVelocityBC(const vector< BCFunction >& velVx1BCs, const vector< BCFunction >& velVx2BCs, const vector< BCFunction >& velVx3BCs) { this->vx1BCs = velVx1BCs; this->vx2BCs = velVx2BCs; @@ -99,7 +99,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const vector< BCFunctio this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const real& vx1, const real& vx1StartTime, const real& vx1EndTime, +MultiphaseVelocityBC::MultiphaseVelocityBC(const real& vx1, const real& vx1StartTime, const real& vx1EndTime, const real& vx2, const real& vx2StartTime, const real& vx2EndTime, const real& vx3, const real& vx3StartTime, const real& vx3EndTime ) { @@ -109,7 +109,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const real& vx1, const this->init(); } /*==========================================================*/ -MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const string& vx1Function, const real& vx1StartTime, const real& vx1EndTime, +MultiphaseVelocityBC::MultiphaseVelocityBC(const string& vx1Function, const real& vx1StartTime, const real& vx1EndTime, const string& vx2Function, const real& vx2StartTime, const real& vx2EndTime, const string& vx3Function, const real& vx3StartTime, const real& vx3EndTime ) { @@ -119,7 +119,7 @@ MultiphaseVelocityBCAdapter::MultiphaseVelocityBCAdapter(const string& vx1Functi this->init(); } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::setNewVelocities(const real& vx1, const real& vx1StartTime, const real& vx1EndTime, +void MultiphaseVelocityBC::setNewVelocities(const real& vx1, const real& vx1StartTime, const real& vx1EndTime, const real& vx2, const real& vx2StartTime, const real& vx2EndTime, const real& vx3, const real& vx3StartTime, const real& vx3EndTime ) { @@ -130,7 +130,7 @@ void MultiphaseVelocityBCAdapter::setNewVelocities(const real& vx1, const real& this->init(); } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::init() +void MultiphaseVelocityBC::init() { this->unsetTimeDependent(); @@ -155,7 +155,7 @@ void MultiphaseVelocityBCAdapter::init() catch(...) { throw UbException(UB_EXARGS,"unknown exception" ); } } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::init(std::vector<BCFunction>& vxBCs) +void MultiphaseVelocityBC::init(std::vector<BCFunction>& vxBCs) { for(size_t pos=0; pos<vxBCs.size(); ++pos) { @@ -174,7 +174,7 @@ void MultiphaseVelocityBCAdapter::init(std::vector<BCFunction>& vxBCs) } } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::init(const D3Q27Interactor* const& interactor, const real& time) +void MultiphaseVelocityBC::init(const D3Q27Interactor* const& interactor, const real& time) { this->timeStep = time; this->tmpVx1Function = this->tmpVx2Function = this->tmpVx3Function = NULL; @@ -259,31 +259,31 @@ void MultiphaseVelocityBCAdapter::init(const D3Q27Interactor* const& interactor, } } - UBLOG(logDEBUG4,"D3Q27VelocityBCAdapter::init(time="<<time<<") " + UBLOG(logDEBUG4,"D3Q27VelocityBC::init(time="<<time<<") " <<", vx1= \""<<(tmpVx1Function ? tmpVx1Function->GetExpr() : "-")<<"\"" <<", vx2= \""<<(tmpVx2Function ? tmpVx2Function->GetExpr() : "-")<<"\"" <<", vx3= \""<<(tmpVx3Function ? tmpVx3Function->GetExpr() : "-")<<"\"" <<", timedependent="<<boolalpha<<this->isTimeDependent() ); } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::update( const D3Q27Interactor* const& interactor, const real& time ) +void MultiphaseVelocityBC::update( const D3Q27Interactor* const& interactor, const real& time ) { this->init(interactor,time); } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::adaptBCForDirection( const D3Q27Interactor& interactor, SPtr<BoundaryConditions> bc, const real& worldX1, const real& worldX2, const real& worldX3, const real& q, const int& fdirection, const real& time ) +void MultiphaseVelocityBC::adaptBCForDirection( const D3Q27Interactor& interactor, SPtr<BoundaryConditions> bc, const real& worldX1, const real& worldX2, const real& worldX3, const real& q, const int& fdirection, const real& time ) { bc->setVelocityBoundaryFlag(D3Q27System::INVDIR[fdirection],secondaryBcOption); bc->setQ((real)q,fdirection); } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::adaptBC( const D3Q27Interactor& interactor, SPtr<BoundaryConditions> bc, const real& worldX1, const real& worldX2, const real& worldX3, const real& time ) +void MultiphaseVelocityBC::adaptBC( const D3Q27Interactor& interactor, SPtr<BoundaryConditions> bc, const real& worldX1, const real& worldX2, const real& worldX3, const real& time ) { this->setNodeVelocity(interactor,bc,worldX1,worldX2,worldX3,time); - bc->setBcAlgorithmType(algorithmType); + bc->setBCStrategyType(algorithmType); } /*==========================================================*/ -void MultiphaseVelocityBCAdapter::setNodeVelocity( const D3Q27Interactor& interactor, SPtr<BoundaryConditions> bc, const real& worldX1, const real& worldX2, const real& worldX3, const real& timestep) +void MultiphaseVelocityBC::setNodeVelocity( const D3Q27Interactor& interactor, SPtr<BoundaryConditions> bc, const real& worldX1, const real& worldX2, const real& worldX3, const real& timestep) { //Geschwindigkeiten setzen try @@ -304,7 +304,7 @@ void MultiphaseVelocityBCAdapter::setNodeVelocity( const D3Q27Interactor& intera catch(...) { throw UbException(UB_EXARGS,"unknown exception" ); } } /*==========================================================*/ -UbTupleDouble3 MultiphaseVelocityBCAdapter::getVelocity(const real& x1, const real& x2, const real& x3, const real& timeStep) const +UbTupleDouble3 MultiphaseVelocityBC::getVelocity(const real& x1, const real& x2, const real& x3, const real& timeStep) const { real vx1 = vf::lbm::constant::c0o1; real vx2 = vf::lbm::constant::c0o1; @@ -321,10 +321,10 @@ UbTupleDouble3 MultiphaseVelocityBCAdapter::getVelocity(const real& x1, const re return UbTupleDouble3(vx1,vx2,vx3); } /*==========================================================*/ -string MultiphaseVelocityBCAdapter::toString() +string MultiphaseVelocityBC::toString() { stringstream info; - info<<"D3Q27VelocityBCAdapter:\n"; + info<<"D3Q27VelocityBC:\n"; info<<" #vx1-functions = "<<(int)vx1BCs.size()<<endl; info<<" #vx2-functions = "<<(int)vx2BCs.size()<<endl; info<<" #vx3-functions = "<<(int)vx3BCs.size()<<endl; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAdapter.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBC.h similarity index 80% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAdapter.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBC.h index 60d93cdecd141834b9800c08fc9b6d1e4fab3c92..e01237cf96e14bffbbfeac43469d32c907d56dd7 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAdapter.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBC.h @@ -26,12 +26,12 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseVelocityBCAdapter.h +//! \file MultiphaseVelocityBC.h //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#ifndef MultiphaseVelocityBCAdapter_H -#define MultiphaseVelocityBCAdapter_H +#ifndef MultiphaseVelocityBC_H +#define MultiphaseVelocityBC_H #include <iostream> #include <string> @@ -45,7 +45,7 @@ class UbFileOutput; class UbFileInput; -#include <BCAdapter.h> +#include <BC.h> #include <BCFunction.h> //! \brief A class provides an interface for velocity boundary condition for multiphase simulation in grid generator. @@ -61,8 +61,8 @@ class UbFileInput; //! vx2BCs.push_back(BCFunction(0.002, 200, 300) ); //t=[200..300[ -> vx2 = 0.002 //! vx2BCs.push_back(BCFunction(0.043, 300, 600) ); //t=[300..600] -> vx2 = 0.043 //! -//! VelocityBCAdapter bcAdapter(vx1BCs,vx2BCs,vx3BCs); -//! bcAdapter.setTimePeriodic(); //-> t=[0 ..100[ -> vx1 = 0.01 +//! VelocityBC BC(vx1BCs,vx2BCs,vx3BCs); +//! BC.setTimePeriodic(); //-> t=[0 ..100[ -> vx1 = 0.01 //! // t=[100..200[ -> vx1 = 0.004 //! // t=[200..400[ -> vx1 = 0.03 //! // t=[400..500[ -> vx1 = 0.01 @@ -81,34 +81,34 @@ class UbFileInput; //! fct.SetExpr("max(vmax*(1.0-4.0*((x2-x2_vmax)^2+(x3-x3_vmax)^2)/H^2),0.0)"); //paraboloid (with vmax for //! (0/x2_vmax/x3_vmax) fct.DefineConst("x2Vmax", 0.0 ); //x2-Pos für vmax fct.DefineConst("x3Vmax", 0.0 //! ); //x3-Pos für vmax fct.DefineConst("H" , diameterOfPipe); fct.DefineConst("vmax" , vmax ); -//! VelocityBCAdapter velBC(true, false ,false ,fct, 0, BCFunction::INFCONST); +//! VelocityBC velBC(true, false ,false ,fct, 0, BCFunction::INFCONST); //! \endcode -class MultiphaseVelocityBCAdapter : public BCAdapter +class MultiphaseVelocityBC : public BC { public: //constructors - MultiphaseVelocityBCAdapter() { this->init(); } + MultiphaseVelocityBC() { this->init(); } - MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const BCFunction& velVxBC ); + MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const BCFunction& velVxBC ); - MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function, const real& phiBC, const real& startTime, const real& endTime ); + MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function, const real& phiBC, const real& startTime, const real& endTime ); - MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function1, const mu::Parser& function2, const mu::Parser& function3, const real& phiBC, const real& startTime, const real& endTime ); + MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const mu::Parser& function1, const mu::Parser& function2, const mu::Parser& function3, const real& phiBC, const real& startTime, const real& endTime ); - MultiphaseVelocityBCAdapter(const bool& vx1, const bool& vx2, const bool& vx3, const std::string& functionstring, const real& startTime, const real& endTime ); + MultiphaseVelocityBC(const bool& vx1, const bool& vx2, const bool& vx3, const std::string& functionstring, const real& startTime, const real& endTime ); - MultiphaseVelocityBCAdapter(const BCFunction& velBC, bool x1Dir, bool x2Dir, bool x3Dir); + MultiphaseVelocityBC(const BCFunction& velBC, bool x1Dir, bool x2Dir, bool x3Dir); - MultiphaseVelocityBCAdapter(const BCFunction& velVx1BC, const BCFunction& velVx2BC, const BCFunction& velVx3BC); + MultiphaseVelocityBC(const BCFunction& velVx1BC, const BCFunction& velVx2BC, const BCFunction& velVx3BC); - MultiphaseVelocityBCAdapter(const std::vector< BCFunction >& velVx1BCs, const std::vector< BCFunction >& velVx2BCs, const std::vector< BCFunction >& velVx3BCs); + MultiphaseVelocityBC(const std::vector< BCFunction >& velVx1BCs, const std::vector< BCFunction >& velVx2BCs, const std::vector< BCFunction >& velVx3BCs); - MultiphaseVelocityBCAdapter(const real& vx1, const real& vx1StartTime, const real& vx1EndTime, + MultiphaseVelocityBC(const real& vx1, const real& vx1StartTime, const real& vx1EndTime, const real& vx2, const real& vx2StartTime, const real& vx2EndTime, const real& vx3, const real& vx3StartTime, const real& vx3EndTime); - MultiphaseVelocityBCAdapter(const std::string& vx1Function, const real& vx1StartTime, const real& vx1EndTime, + MultiphaseVelocityBC(const std::string& vx1Function, const real& vx1StartTime, const real& vx1EndTime, const std::string& vx2Function, const real& vx2StartTime, const real& vx2EndTime, const std::string& vx3Function, const real& vx3StartTime, const real& vx3EndTime ); diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCStrategy.cpp similarity index 89% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCStrategy.cpp index 5d1553e452d19ac3a95a5fb2def2fd351ca3f875..a34fe21384e818e8069d21194abcc8b3f7718531 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCStrategy.cpp @@ -26,47 +26,47 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseVelocityBCAlgorithm.cpp +//! \file MultiphaseVelocityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#include "MultiphaseVelocityBCAlgorithm.h" +#include "MultiphaseVelocityBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -MultiphaseVelocityBCAlgorithm::MultiphaseVelocityBCAlgorithm() +MultiphaseVelocityBCStrategy::MultiphaseVelocityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::MultiphaseVelocityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::MultiphaseVelocityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -MultiphaseVelocityBCAlgorithm::~MultiphaseVelocityBCAlgorithm() +MultiphaseVelocityBCStrategy::~MultiphaseVelocityBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> MultiphaseVelocityBCAlgorithm::clone() +SPtr<BCStrategy> MultiphaseVelocityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new MultiphaseVelocityBCAlgorithm()); + SPtr<BCStrategy> bc(new MultiphaseVelocityBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseVelocityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void MultiphaseVelocityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseVelocityBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributionsH) +void MultiphaseVelocityBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributionsH) { this->distributionsH = distributionsH; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseVelocityBCAlgorithm::addDistributionsH2(SPtr<DistributionArray3D> distributionsH) +void MultiphaseVelocityBCStrategy::addDistributionsH2(SPtr<DistributionArray3D> distributionsH) { this->distributionsH2 = distributionsH; } ////////////////////////////////////////////////////////////////////////// -void MultiphaseVelocityBCAlgorithm::applyBC() +void MultiphaseVelocityBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCStrategy.h index 0cfd9a3baa2a13780f39f3dbce024f982907f916..4e99c876aca206eae0cae3bcf8c643d9ce930b87 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCStrategy.h @@ -26,27 +26,27 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file MultiphaseVelocityBCAlgorithm.h +//! \file MultiphaseVelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Hesameddin Safari //======================================================================================= -#ifndef MultiphaseVelocityBCAlgorithm_h__ -#define MultiphaseVelocityBCAlgorithm_h__ +#ifndef MultiphaseVelocityBCStrategy_h__ +#define MultiphaseVelocityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" //! A class implements velocity boundary condition for multiphase simulations -class MultiphaseVelocityBCAlgorithm : public BCAlgorithm +class MultiphaseVelocityBCStrategy : public BCStrategy { public: - MultiphaseVelocityBCAlgorithm(); - ~MultiphaseVelocityBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + MultiphaseVelocityBCStrategy(); + ~MultiphaseVelocityBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void addDistributionsH(SPtr<DistributionArray3D> distributionsH) override; void addDistributionsH2(SPtr<DistributionArray3D> distributionsH2) override; void applyBC() override; }; -#endif // MultiphaseVelocityBCAlgorithm_h__ +#endif // MultiphaseVelocityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAdapter.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBC.cpp similarity index 97% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAdapter.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBC.cpp index 4b272878a4bd30d1031c2894ac9994db6a966a6f..d49cffe64085e9a5d5e865cde0c899bdab543791 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAdapter.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBC.cpp @@ -26,8 +26,8 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NoSlipBCAdapter.cpp +//! \file NoSlipBC.cpp //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#include "NoSlipBCAdapter.h" +#include "NoSlipBC.h" diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAdapter.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBC.h similarity index 89% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAdapter.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBC.h index 52eda33082e8031454b00f578a6f520b738c0d42..fe7eecebb9960107793f7bf034de5dd436d58613 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAdapter.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBC.h @@ -26,22 +26,22 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NoSlipBCAdapter.cpp +//! \file NoSlipBC.cpp //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#ifndef NoSlipBCAdapter_H -#define NoSlipBCAdapter_H +#ifndef NoSlipBC_H +#define NoSlipBC_H -#include "BCAdapter.h" +#include "BC.h" //! A class provides an interface for no-slip boundary condition in grid generator -class NoSlipBCAdapter : public BCAdapter +class NoSlipBC : public BC { public: - NoSlipBCAdapter() : BCAdapter() {} - NoSlipBCAdapter(const short &secondaryBcOption) : BCAdapter(secondaryBcOption) {} + NoSlipBC() : BC() {} + NoSlipBC(const short &secondaryBcOption) : BC(secondaryBcOption) {} void init(const D3Q27Interactor *const &interactor, const real &time = 0) override {} void update(const D3Q27Interactor *const &interactor, const real &time = 0) override {} @@ -56,9 +56,9 @@ public: void adaptBC(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, const real & /*worldX1*/, const real & /*worldX2*/, const real & /*worldX3*/, const real & /*time*/ = 0) override { - bc->setBcAlgorithmType(algorithmType); + bc->setBCStrategyType(algorithmType); } private: }; -#endif // NoSlipBCAdapter_H +#endif // NoSlipBC_H diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCStrategy.cpp similarity index 89% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCStrategy.cpp index cb659eff1e8923cd935e71c4fc027bf1f838dd17..ea1fd5f38d0a0492c4756e7ad7fb9438868c41a0 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCStrategy.cpp @@ -26,33 +26,33 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NoSlipBCAlgorithm.cpp +//! \file NoSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "NoSlipBCAlgorithm.h" +#include "NoSlipBCStrategy.h" #include "BoundaryConditions.h" #include "DistributionArray3D.h" -NoSlipBCAlgorithm::NoSlipBCAlgorithm() +NoSlipBCStrategy::NoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::NoSlipBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::NoSlipBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> NoSlipBCAlgorithm::clone() +SPtr<BCStrategy> NoSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new NoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new NoSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void NoSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void NoSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void NoSlipBCAlgorithm::applyBC() +void NoSlipBCStrategy::applyBC() { real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCStrategy.h similarity index 91% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCStrategy.h index dcf678b4f05bd2c50403bfd758cd27767f45d33a..d45526f373816f38a85ede287ffe975150bd96af 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NoSlipBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NoSlipBCAlgorithm.h +//! \file NoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef NoSlipBCAlgorithm_h__ -#define NoSlipBCAlgorithm_h__ +#ifndef NoSlipBCStrategy_h__ +#define NoSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; //! A class implements no-slip boundary condition -class NoSlipBCAlgorithm : public BCAlgorithm +class NoSlipBCStrategy : public BCStrategy { public: - NoSlipBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + NoSlipBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCStrategy.cpp similarity index 88% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCStrategy.cpp index 2787d685cbd3b71b879c3fabc1c114e0e61eef8d..d3f44c6ff7ce9d8acf913a8cebd3e42800b7a571 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCStrategy.cpp @@ -26,35 +26,35 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonEqDensityBCAlgorithm.cpp +//! \file NonEqDensityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "NonEqDensityBCAlgorithm.h" +#include "NonEqDensityBCStrategy.h" #include "BoundaryConditions.h" #include "DistributionArray3D.h" -NonEqDensityBCAlgorithm::NonEqDensityBCAlgorithm() +NonEqDensityBCStrategy::NonEqDensityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::NonEqDensityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::NonEqDensityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -NonEqDensityBCAlgorithm::~NonEqDensityBCAlgorithm() = default; +NonEqDensityBCStrategy::~NonEqDensityBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> NonEqDensityBCAlgorithm::clone() +SPtr<BCStrategy> NonEqDensityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new NonEqDensityBCAlgorithm()); + SPtr<BCStrategy> bc(new NonEqDensityBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void NonEqDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void NonEqDensityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void NonEqDensityBCAlgorithm::applyBC() +void NonEqDensityBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCStrategy.h index ca7d5b0432b74cf371659fee2c6da49f1ee8a9eb..d919a673e9cb344b51e826addf9b1fafe56b41f4 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonEqDensityBCAlgorithm.h +//! \file NonEqDensityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef NonEqDensityBCAlgorithm_h__ -#define NonEqDensityBCAlgorithm_h__ +#ifndef NonEqDensityBCStrategy_h__ +#define NonEqDensityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class NonEqDensityBCAlgorithm : public BCAlgorithm +class NonEqDensityBCStrategy : public BCStrategy { public: - NonEqDensityBCAlgorithm(); - ~NonEqDensityBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; + NonEqDensityBCStrategy(); + ~NonEqDensityBCStrategy() override; + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; -#endif // NonEqDensityBCAlgorithm_h__ +#endif // NonEqDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCStrategy.cpp similarity index 97% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCStrategy.cpp index 078e8bfb4c574b9a6fe90a5bd569d2969237eb66..d67de5342a716dc0da076518109908540945aa78 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCStrategy.cpp @@ -26,36 +26,36 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonReflectingInflowBCAlgorithm.cpp +//! \file NonReflectingInflowBCStrategy.cpp //! \ingroup BoundarConditions //! \author Hussein Alihussein //======================================================================================= -#include "NonReflectingInflowBCAlgorithm.h" +#include "NonReflectingInflowBCStrategy.h" #include "BoundaryConditions.h" #include "D3Q27System.h" #include "DistributionArray3D.h" -NonReflectingInflowBCAlgorithm::NonReflectingInflowBCAlgorithm() +NonReflectingInflowBCStrategy::NonReflectingInflowBCStrategy() { - BCAlgorithm::type = BCAlgorithm::NonReflectingInflowBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::NonReflectingInflowBCStrategy; + BCStrategy::preCollision = true; } ////////////////////////////////////////////////////////////////////////// -NonReflectingInflowBCAlgorithm::~NonReflectingInflowBCAlgorithm() = default; +NonReflectingInflowBCStrategy::~NonReflectingInflowBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> NonReflectingInflowBCAlgorithm::clone() +SPtr<BCStrategy> NonReflectingInflowBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new NonReflectingInflowBCAlgorithm()); + SPtr<BCStrategy> bc(new NonReflectingInflowBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void NonReflectingInflowBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void NonReflectingInflowBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void NonReflectingInflowBCAlgorithm::applyBC() +void NonReflectingInflowBCStrategy::applyBC() { using namespace vf::lbm::dir; using namespace D3Q27System; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCStrategy.h similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCStrategy.h index 1f3e87ce3fff371fbec30dbbe90721bd5ff975cc..b3c9b6ba833d32d7fe551f561e366f581f518eee 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingInflowBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonReflectingInflowBCAlgorithm.h +//! \file NonReflectingInflowBCStrategy.h //! \ingroup BoundarConditions //! \author Hussein Alihussein //======================================================================================= -#ifndef NonReflectingInflowBCAlgorithm_h__ -#define NonReflectingInflowBCAlgorithm_h__ +#ifndef NonReflectingInflowBCStrategy_h__ +#define NonReflectingInflowBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class NonReflectingInflowBCAlgorithm : public BCAlgorithm +class NonReflectingInflowBCStrategy : public BCStrategy { public: - NonReflectingInflowBCAlgorithm(); - ~NonReflectingInflowBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; + NonReflectingInflowBCStrategy(); + ~NonReflectingInflowBCStrategy() override; + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; -#endif // NonReflectingDensityBCAlgorithm_h__ +#endif // NonReflectingDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.h deleted file mode 100644 index d664b67fbf5f2d99258f0567f90b0dbd1e728fb5..0000000000000000000000000000000000000000 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.h +++ /dev/null @@ -1,50 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// This file is part of VirtualFluids. VirtualFluids is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file NonReflectingOutflowBCAlgorithm.h -//! \ingroup BoundarConditions -//! \author Konstantin Kutscher -//======================================================================================= -#ifndef NonReflectingOutflowBCAlgorithm_h__ -#define NonReflectingOutflowBCAlgorithm_h__ - -#include "BCAlgorithm.h" -#include <PointerDefinitions.h> - -class DistributionArray3D; - -class NonReflectingOutflowBCAlgorithm : public BCAlgorithm -{ -public: - NonReflectingOutflowBCAlgorithm(); - ~NonReflectingOutflowBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; - void addDistributions(SPtr<DistributionArray3D> distributions) override; - void applyBC() override; -}; -#endif // NonReflectingDensityBCAlgorithm_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.cpp similarity index 96% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.cpp index ac24c49c924efa83fcb4e2b976503347eea2adf7..1a74c103328fd411402c34c57ca9749c16ebb3d9 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.cpp @@ -26,36 +26,36 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonReflectingOutflowBCAlgorithm.cpp +//! \file NonReflectingOutflowBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "NonReflectingOutflowBCAlgorithm.h" +#include "NonReflectingOutflowBCStrategy.h" #include "BoundaryConditions.h" #include "D3Q27System.h" #include "DistributionArray3D.h" -NonReflectingOutflowBCAlgorithm::NonReflectingOutflowBCAlgorithm() +NonReflectingOutflowBCStrategy::NonReflectingOutflowBCStrategy() { - BCAlgorithm::type = BCAlgorithm::NonReflectingOutflowBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::NonReflectingOutflowBCStrategy; + BCStrategy::preCollision = true; } ////////////////////////////////////////////////////////////////////////// -NonReflectingOutflowBCAlgorithm::~NonReflectingOutflowBCAlgorithm() = default; +NonReflectingOutflowBCStrategy::~NonReflectingOutflowBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> NonReflectingOutflowBCAlgorithm::clone() +SPtr<BCStrategy> NonReflectingOutflowBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new NonReflectingOutflowBCAlgorithm()); + SPtr<BCStrategy> bc(new NonReflectingOutflowBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void NonReflectingOutflowBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void NonReflectingOutflowBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void NonReflectingOutflowBCAlgorithm::applyBC() +void NonReflectingOutflowBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.h new file mode 100644 index 0000000000000000000000000000000000000000..7fca99885755f78ca4088dd031511d774bfc4115 --- /dev/null +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.h @@ -0,0 +1,50 @@ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// This file is part of VirtualFluids. VirtualFluids is free software: you can +// redistribute it and/or modify it under the terms of the GNU General Public +// License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. +// +//! \file NonReflectingOutflowBCStrategy.h +//! \ingroup BoundarConditions +//! \author Konstantin Kutscher +//======================================================================================= +#ifndef NonReflectingOutflowBCStrategy_h__ +#define NonReflectingOutflowBCStrategy_h__ + +#include "BCStrategy.h" +#include <PointerDefinitions.h> + +class DistributionArray3D; + +class NonReflectingOutflowBCStrategy : public BCStrategy +{ +public: + NonReflectingOutflowBCStrategy(); + ~NonReflectingOutflowBCStrategy() override; + SPtr<BCStrategy> clone() override; + void addDistributions(SPtr<DistributionArray3D> distributions) override; + void applyBC() override; +}; +#endif // NonReflectingDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.cpp similarity index 96% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.cpp index ce2c5a6268fd8d1a69d4c56a6ddbebe2df587b6c..3c52e1a4b0eac33d7eaf2ece785f6f917993d633 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.cpp @@ -26,36 +26,36 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonReflectingOutflowBCAlgorithmWithRelaxation.cpp +//! \file NonReflectingOutflowWithRelaxationBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher, Hussein Alihussein //======================================================================================= -#include "NonReflectingOutflowBCAlgorithmWithRelaxation.h" +#include "NonReflectingOutflowWithRelaxationBCStrategy.h" #include "BoundaryConditions.h" #include "D3Q27System.h" #include "DistributionArray3D.h" -NonReflectingOutflowBCAlgorithmWithRelaxation::NonReflectingOutflowBCAlgorithmWithRelaxation() +NonReflectingOutflowWithRelaxationBCStrategy::NonReflectingOutflowWithRelaxationBCStrategy() { - BCAlgorithm::type = BCAlgorithm::NonReflectingOutflowBCAlgorithmWithRelaxation; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::NonReflectingOutflowWithRelaxationBCStrategy; + BCStrategy::preCollision = true; } ////////////////////////////////////////////////////////////////////////// -NonReflectingOutflowBCAlgorithmWithRelaxation::~NonReflectingOutflowBCAlgorithmWithRelaxation() = default; +NonReflectingOutflowWithRelaxationBCStrategy::~NonReflectingOutflowWithRelaxationBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> NonReflectingOutflowBCAlgorithmWithRelaxation::clone() +SPtr<BCStrategy> NonReflectingOutflowWithRelaxationBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new NonReflectingOutflowBCAlgorithmWithRelaxation()); + SPtr<BCStrategy> bc(new NonReflectingOutflowWithRelaxationBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void NonReflectingOutflowBCAlgorithmWithRelaxation::addDistributions(SPtr<DistributionArray3D> distributions) +void NonReflectingOutflowWithRelaxationBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void NonReflectingOutflowBCAlgorithmWithRelaxation::applyBC() +void NonReflectingOutflowWithRelaxationBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.h similarity index 83% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.h index 97badb60dbe84e0b7a4a3fa82b950649e0a12d93..e8179c706f204494ac383b519fa22ef78de5d5ac 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithmWithRelaxation.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowWithRelaxationBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file NonReflectingOutflowBCAlgorithmWithRelaxation.h +//! \file NonReflectingOutflowWithRelaxationBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher, Hussein Alihussein //======================================================================================= -#ifndef NonReflectingOutflowBCAlgorithmWithRelaxation_h__ -#define NonReflectingOutflowBCAlgorithmWithRelaxation_h__ +#ifndef NonReflectingOutflowWithRelaxationBCStrategy_h__ +#define NonReflectingOutflowWithRelaxationBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class NonReflectingOutflowBCAlgorithmWithRelaxation : public BCAlgorithm +class NonReflectingOutflowWithRelaxationBCStrategy : public BCStrategy { public: - NonReflectingOutflowBCAlgorithmWithRelaxation(); - ~NonReflectingOutflowBCAlgorithmWithRelaxation() override; - SPtr<BCAlgorithm> clone() override; + NonReflectingOutflowWithRelaxationBCStrategy(); + ~NonReflectingOutflowWithRelaxationBCStrategy() override; + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; -#endif // NonReflectingDensityBCAlgorithm_h__ +#endif // NonReflectingDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelNoSlipBCStrategy.h similarity index 79% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelNoSlipBCStrategy.h index 45c9c0c21dba308862c8d4a8c1c1827a4a07e7c7..96efa52c65309758f7ec3302f377d861e72ec738 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelNoSlipBCStrategy.h @@ -26,29 +26,29 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyBinghamModelNoSlipBCAlgorithm.h +//! \file RheologyBinghamModelNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef RheologyBinghamModelNoSlipBCAlgorithm_h__ -#define RheologyBinghamModelNoSlipBCAlgorithm_h__ +#ifndef RheologyBinghamModelNoSlipBCStrategy_h__ +#define RheologyBinghamModelNoSlipBCStrategy_h__ -#include "RheologyNoSlipBCAlgorithm.h" +#include "RheologyNoSlipBCStrategy.h" #include "Rheology.h" -class RheologyBinghamModelNoSlipBCAlgorithm : public RheologyNoSlipBCAlgorithm +class RheologyBinghamModelNoSlipBCStrategy : public RheologyNoSlipBCStrategy { public: - RheologyBinghamModelNoSlipBCAlgorithm() + RheologyBinghamModelNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::RheologyBinghamModelNoSlipBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::RheologyBinghamModelNoSlipBCStrategy; + BCStrategy::preCollision = true; } - ~RheologyBinghamModelNoSlipBCAlgorithm() {} - SPtr<BCAlgorithm> clone() override + ~RheologyBinghamModelNoSlipBCStrategy() {} + SPtr<BCStrategy> clone() override { - SPtr<BCAlgorithm> bc(new RheologyBinghamModelNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new RheologyBinghamModelNoSlipBCStrategy()); return bc; } protected: @@ -57,4 +57,4 @@ protected: return Rheology::getBinghamCollFactor(omegaInf, shearRate, drho); } }; -#endif // BinghamModelNoSlipBCAlgorithm_h__ +#endif // BinghamModelNoSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelVelocityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelVelocityBCStrategy.h similarity index 78% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelVelocityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelVelocityBCStrategy.h index 2837238c40ec02bffe7a8eccb4fedb5100846d55..1f4c078c31c7fd6a814c0768983dc9e02acf46d5 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelVelocityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyBinghamModelVelocityBCStrategy.h @@ -26,29 +26,29 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyBinghamModelVelocityBCAlgorithm.h +//! \file RheologyBinghamModelVelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef BinghamModelVelocityBCAlgorithm_h__ -#define BinghamModelVelocityBCAlgorithm_h__ +#ifndef BinghamModelVelocityBCStrategy_h__ +#define BinghamModelVelocityBCStrategy_h__ -#include "RheologyVelocityBCAlgorithm.h" +#include "RheologyVelocityBCStrategy.h" #include "Rheology.h" -class RheologyBinghamModelVelocityBCAlgorithm : public RheologyVelocityBCAlgorithm +class RheologyBinghamModelVelocityBCStrategy : public RheologyVelocityBCStrategy { public: - RheologyBinghamModelVelocityBCAlgorithm() + RheologyBinghamModelVelocityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::RheologyBinghamModelVelocityBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::RheologyBinghamModelVelocityBCStrategy; + BCStrategy::preCollision = true; } - ~RheologyBinghamModelVelocityBCAlgorithm() {} - SPtr<BCAlgorithm> clone() override + ~RheologyBinghamModelVelocityBCStrategy() {} + SPtr<BCStrategy> clone() override { - SPtr<BCAlgorithm> bc(new RheologyBinghamModelVelocityBCAlgorithm()); + SPtr<BCStrategy> bc(new RheologyBinghamModelVelocityBCStrategy()); return bc; } protected: @@ -57,4 +57,4 @@ protected: return Rheology::getBinghamCollFactor(omegaInf, shearRate, drho); } }; -#endif // BinghamModelVelocityBCAlgorithm_h__ +#endif // BinghamModelVelocityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCStrategy.h similarity index 77% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCStrategy.h index c9b76b563dd16044ee109acbdc8eff73cde95959..8480e09c98b37b0cd4dc813877c72d5935ac6fc8 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyHerschelBulkleyModelNoSlipBCStrategy.h @@ -26,28 +26,28 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyHerschelBulkleyModelNoSlipBCAlgorithm.h +//! \file RheologyHerschelBulkleyModelNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef RheologyHerschelBulkleyModelNoSlipBCAlgorithm_h__ -#define RheologyHerschelBulkleyModelNoSlipBCAlgorithm_h__ +#ifndef RheologyHerschelBulkleyModelNoSlipBCStrategy_h__ +#define RheologyHerschelBulkleyModelNoSlipBCStrategy_h__ -#include "RheologyNoSlipBCAlgorithm.h" +#include "RheologyNoSlipBCStrategy.h" #include "Rheology.h" -class RheologyHerschelBulkleyModelNoSlipBCAlgorithm : public RheologyNoSlipBCAlgorithm +class RheologyHerschelBulkleyModelNoSlipBCStrategy : public RheologyNoSlipBCStrategy { public: - RheologyHerschelBulkleyModelNoSlipBCAlgorithm() + RheologyHerschelBulkleyModelNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::RheologyHerschelBulkleyModelNoSlipBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::RheologyHerschelBulkleyModelNoSlipBCStrategy; + BCStrategy::preCollision = true; } - ~RheologyHerschelBulkleyModelNoSlipBCAlgorithm() {} - SPtr<BCAlgorithm> clone() override + ~RheologyHerschelBulkleyModelNoSlipBCStrategy() {} + SPtr<BCStrategy> clone() override { - SPtr<BCAlgorithm> bc(new RheologyHerschelBulkleyModelNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new RheologyHerschelBulkleyModelNoSlipBCStrategy()); return bc; } protected: @@ -56,4 +56,4 @@ protected: return Rheology::getHerschelBulkleyCollFactor(omegaInf, shearRate, drho); } }; -#endif // RheologyHerschelBulkleyModelNoSlipBCAlgorithm_h__ \ No newline at end of file +#endif // RheologyHerschelBulkleyModelNoSlipBCStrategy_h__ \ No newline at end of file diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCStrategy.cpp similarity index 94% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCStrategy.cpp index fccc111b5f34bb8170799465d3ed12f5c20312f4..3765a58743c4702741e815e28aade64007e13494 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCStrategy.cpp @@ -26,21 +26,21 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyNoSlipBCAlgorithm.cpp +//! \file RheologyNoSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "RheologyNoSlipBCAlgorithm.h" +#include "RheologyNoSlipBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" ////////////////////////////////////////////////////////////////////////// -void RheologyNoSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void RheologyNoSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void RheologyNoSlipBCAlgorithm::applyBC() +void RheologyNoSlipBCStrategy::applyBC() { real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCStrategy.h similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCStrategy.h index c8c38ad7fcf3e35378b1e5dd14938cdad230f185..611d87bcd3b6e275869b6ec430b7a1f349c0aa3e 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyNoSlipBCStrategy.h @@ -26,27 +26,27 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyNoSlipBCAlgorithm.h +//! \file RheologyNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef RheologyNoSlipBCAlgorithm_h__ -#define RheologyNoSlipBCAlgorithm_h__ +#ifndef RheologyNoSlipBCStrategy_h__ +#define RheologyNoSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class RheologyNoSlipBCAlgorithm : public BCAlgorithm +class RheologyNoSlipBCStrategy : public BCStrategy { public: - RheologyNoSlipBCAlgorithm() = default; - ~RheologyNoSlipBCAlgorithm() = default; - virtual SPtr<BCAlgorithm> clone() override { UB_THROW(UbException("real clone() - belongs in the derived class")); } + RheologyNoSlipBCStrategy() = default; + ~RheologyNoSlipBCStrategy() = default; + virtual SPtr<BCStrategy> clone() override { UB_THROW(UbException("real clone() - belongs in the derived class")); } void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; protected: virtual real getRheologyCollFactor(real omegaInf, real shearRate, real drho) const = 0; // { UB_THROW(UbException("real getRheologyCollFactor() - belongs in the derived class")); } }; -#endif // RheologyNoSlipBCAlgorithm_h__ +#endif // RheologyNoSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyPowellEyringModelNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyPowellEyringModelNoSlipBCStrategy.h similarity index 77% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyPowellEyringModelNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyPowellEyringModelNoSlipBCStrategy.h index a6a3a5a745f193d66f2d87303ab5df1fd62826eb..29d7b750636609006408eae29b74224391b204a4 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyPowellEyringModelNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyPowellEyringModelNoSlipBCStrategy.h @@ -26,28 +26,28 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyPowellEyringModelNoSlipBCAlgorithm.h +//! \file RheologyPowellEyringModelNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef RheologyPowellEyringModelNoSlipBCAlgorithm_h__ -#define RheologyPowellEyringModelNoSlipBCAlgorithm_h__ +#ifndef RheologyPowellEyringModelNoSlipBCStrategy_h__ +#define RheologyPowellEyringModelNoSlipBCStrategy_h__ -#include "RheologyNoSlipBCAlgorithm.h" +#include "RheologyNoSlipBCStrategy.h" #include "Rheology.h" -class RheologyPowellEyringModelNoSlipBCAlgorithm : public RheologyNoSlipBCAlgorithm +class RheologyPowellEyringModelNoSlipBCStrategy : public RheologyNoSlipBCStrategy { public: - RheologyPowellEyringModelNoSlipBCAlgorithm() + RheologyPowellEyringModelNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::RheologyPowellEyringModelNoSlipBCAlgorithm; - BCAlgorithm::preCollision = true; + BCStrategy::type = BCStrategy::RheologyPowellEyringModelNoSlipBCStrategy; + BCStrategy::preCollision = true; } - ~RheologyPowellEyringModelNoSlipBCAlgorithm() {} - SPtr<BCAlgorithm> clone() override + ~RheologyPowellEyringModelNoSlipBCStrategy() {} + SPtr<BCStrategy> clone() override { - SPtr<BCAlgorithm> bc(new RheologyPowellEyringModelNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new RheologyPowellEyringModelNoSlipBCStrategy()); return bc; } protected: @@ -56,4 +56,4 @@ protected: return Rheology::getHerschelBulkleyCollFactor(omegaInf, shearRate, drho); } }; -#endif // RheologyPowellEyringModelNoSlipBCAlgorithm_h__ \ No newline at end of file +#endif // RheologyPowellEyringModelNoSlipBCStrategy_h__ \ No newline at end of file diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCStrategy.cpp similarity index 89% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCStrategy.cpp index 5bc11cbb4cadc7b6e28fd163b8479413673c3b1c..817c86eed4b3a180b14464ec65975f1362265b20 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCStrategy.cpp @@ -26,30 +26,30 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyVelocityBCAlgorithm.cpp +//! \file RheologyVelocityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "RheologyVelocityBCAlgorithm.h" +#include "RheologyVelocityBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -RheologyVelocityBCAlgorithm::RheologyVelocityBCAlgorithm() +RheologyVelocityBCStrategy::RheologyVelocityBCStrategy() { - //BCAlgorithm::type = BCAlgorithm::RheologyVelocityBCAlgorithm; - //BCAlgorithm::preCollision = false; + //BCStrategy::type = BCStrategy::RheologyVelocityBCStrategy; + //BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -RheologyVelocityBCAlgorithm::~RheologyVelocityBCAlgorithm() +RheologyVelocityBCStrategy::~RheologyVelocityBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -void RheologyVelocityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void RheologyVelocityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void RheologyVelocityBCAlgorithm::applyBC() +void RheologyVelocityBCStrategy::applyBC() { using namespace vf::lbm::constant; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCStrategy.h similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCStrategy.h index 91ac9ec574b9252c4d2842b9134d4190878d9daf..00c08230cf19fd73bfa56b7949239e62be72fbd4 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/RheologyVelocityBCStrategy.h @@ -26,29 +26,29 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file RheologyVelocityBCAlgorithm.h +//! \file RheologyVelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef RheologyVelocityBCAlgorithm_h__ -#define RheologyVelocityBCAlgorithm_h__ +#ifndef RheologyVelocityBCStrategy_h__ +#define RheologyVelocityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class RheologyVelocityBCAlgorithm : public BCAlgorithm +class RheologyVelocityBCStrategy : public BCStrategy { public: - RheologyVelocityBCAlgorithm(); - ~RheologyVelocityBCAlgorithm(); - virtual SPtr<BCAlgorithm> clone() override { UB_THROW(UbException("real clone() - belongs in the derived class")); } + RheologyVelocityBCStrategy(); + ~RheologyVelocityBCStrategy(); + virtual SPtr<BCStrategy> clone() override { UB_THROW(UbException("real clone() - belongs in the derived class")); } void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; protected: virtual real getRheologyCollFactor(real omegaInf, real shearRate, real drho) const = 0; // { UB_THROW(UbException("real getRheologyCollFactor() - belongs in the derived class")); } }; -#endif // RheologyVelocityBCAlgorithm_h__ +#endif // RheologyVelocityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCStrategy.cpp similarity index 92% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCStrategy.cpp index de9c555f8cdb0ad8d44d79d55e6510ee7a625b05..fee0f71a25ad90b44a61f946925a842bb10531f3 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCStrategy.cpp @@ -26,37 +26,37 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file SimpleSlipBCAlgorithm.cpp +//! \file SimpleSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "SimpleSlipBCAlgorithm.h" +#include "SimpleSlipBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -SimpleSlipBCAlgorithm::SimpleSlipBCAlgorithm() +SimpleSlipBCStrategy::SimpleSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::SimpleSlipBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::SimpleSlipBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -SimpleSlipBCAlgorithm::~SimpleSlipBCAlgorithm() +SimpleSlipBCStrategy::~SimpleSlipBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> SimpleSlipBCAlgorithm::clone() +SPtr<BCStrategy> SimpleSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new SimpleSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new SimpleSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void SimpleSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void SimpleSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void SimpleSlipBCAlgorithm::applyBC() +void SimpleSlipBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCStrategy.h similarity index 88% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCStrategy.h index bfe4a766bc4fe1f05cf55cb679cfb3900f574c39..294c7fdf648603359f14aa1a0bf4f769d6672f05 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCStrategy.h @@ -26,26 +26,26 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file SimpleVelocityBCAlgorithm.h +//! \file SimpleVelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef SimpleSlipBCAlgorithm_h__ -#define SimpleSlipBCAlgorithm_h__ +#ifndef SimpleSlipBCStrategy_h__ +#define SimpleSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; //! \brief A class implements slip boundary condition by using simple bounce back -class SimpleSlipBCAlgorithm : public BCAlgorithm +class SimpleSlipBCStrategy : public BCStrategy { public: - SimpleSlipBCAlgorithm(); - virtual ~SimpleSlipBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + SimpleSlipBCStrategy(); + virtual ~SimpleSlipBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; -#endif // SimpleSlipBCAlgorithm_h__ +#endif // SimpleSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCStrategy.cpp similarity index 86% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCStrategy.cpp index 83badd723e2c9bda222abaccdb09fbc352bc46af..2206e71541d6d264fd91146be5641ba75ed5b4d3 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCStrategy.cpp @@ -26,37 +26,37 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file SimpleVelocityBCAlgorithm.cpp +//! \file SimpleVelocityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "SimpleVelocityBCAlgorithm.h" +#include "SimpleVelocityBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -SimpleVelocityBCAlgorithm::SimpleVelocityBCAlgorithm() +SimpleVelocityBCStrategy::SimpleVelocityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::SimpleVelocityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::SimpleVelocityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -SimpleVelocityBCAlgorithm::~SimpleVelocityBCAlgorithm() +SimpleVelocityBCStrategy::~SimpleVelocityBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> SimpleVelocityBCAlgorithm::clone() +SPtr<BCStrategy> SimpleVelocityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new SimpleVelocityBCAlgorithm()); + SPtr<BCStrategy> bc(new SimpleVelocityBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void SimpleVelocityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void SimpleVelocityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void SimpleVelocityBCAlgorithm::applyBC() +void SimpleVelocityBCStrategy::applyBC() { real f[D3Q27System::ENDF+1]; real feq[D3Q27System::ENDF+1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCStrategy.h similarity index 89% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCStrategy.h index b751d220c0cd15b597969fd9980184c16c5de36c..597e69a386ad03c0eb29ea62a77563b84c72435c 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleVelocityBCStrategy.h @@ -26,26 +26,26 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file SimpleVelocityBCAlgorithm.h +//! \file SimpleVelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef SimpleVelocityBCAlgorithm_H -#define SimpleVelocityBCAlgorithm_H +#ifndef SimpleVelocityBCStrategy_H +#define SimpleVelocityBCStrategy_H -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; //! \brief A class implements velocyty boundary condition -class SimpleVelocityBCAlgorithm : public BCAlgorithm +class SimpleVelocityBCStrategy : public BCStrategy { public: - SimpleVelocityBCAlgorithm(); - ~SimpleVelocityBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + SimpleVelocityBCStrategy(); + ~SimpleVelocityBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBC.cpp similarity index 90% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBC.cpp index bc0921a337699c9cdeaf6167a7cd1863579d7057..d47bff6d22f8c44db69597c7b546e18a03c6518d 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBC.cpp @@ -26,27 +26,27 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file SlipBCAdapter.cpp +//! \file SlipBC.cpp //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#include "SlipBCAdapter.h" +#include "SlipBC.h" #include "D3Q27Interactor.h" #include "D3Q27System.h" #include "geometry3d/GbCuboid3D.h" //*==========================================================*/ -// ObObject* D3Q27SlipBCAdapterCreator::createObObject() +// ObObject* D3Q27SlipBCCreator::createObObject() //{ -// return new D3Q27SlipBCAdapter; +// return new D3Q27SlipBC; //} //*==========================================================*/ -// ObObjectCreator* D3Q27SlipBCAdapter::getCreator() +// ObObjectCreator* D3Q27SlipBC::getCreator() //{ -// return D3Q27SlipBCAdapterCreator::getInstance(); +// return D3Q27SlipBCCreator::getInstance(); //} //*==========================================================*/ -void SlipBCAdapter::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real & /*worldX1*/, +void SlipBC::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real & /*worldX1*/, const real & /*worldX2*/, const real & /*worldX3*/, const real & /*time*/) { using namespace vf::lbm::dir; @@ -71,5 +71,5 @@ void SlipBCAdapter::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryCond else if (bc->hasSlipBoundaryFlag(DIR_00M)) bc->setNormalVector(vf::lbm::constant::c0o1, vf::lbm::constant::c0o1, -vf::lbm::constant::c1o1); - bc->setBcAlgorithmType(algorithmType); + bc->setBCStrategyType(algorithmType); } diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBC.h similarity index 79% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBC.h index 5c2225e0a1212931805207da7bacf1a1a797e290..98205ba32b2d3ccec85346bd89a199e8e9a9049c 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBC.h @@ -26,43 +26,43 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file SlipBCAdapter.h +//! \file SlipBC.h //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#ifndef SlipBCAdapter_H -#define SlipBCAdapter_H +#ifndef SlipBC_H +#define SlipBC_H -#include "BCAdapter.h" +#include "BC.h" /*=======================================================*/ -// D3Q27SlipBCAdapterCreator -// class D3Q27SlipBCAdapterCreator : public ObObjectCreator +// D3Q27SlipBCCreator +// class D3Q27SlipBCCreator : public ObObjectCreator //{ // public: -// static D3Q27SlipBCAdapterCreator* getInstance() +// static D3Q27SlipBCCreator* getInstance() // { -// static D3Q27SlipBCAdapterCreator instance; +// static D3Q27SlipBCCreator instance; // return &instance; // } // // ObObject* createObObject(); // -// std::string getTypeID() { return "D3Q27SlipBCAdapter";} -// std::string toString() { return "D3Q27SlipBCAdapterCreator"; } +// std::string getTypeID() { return "D3Q27SlipBC";} +// std::string toString() { return "D3Q27SlipBCCreator"; } // // private: -// D3Q27SlipBCAdapterCreator( const D3Q27SlipBCAdapterCreator& ); //no copy allowed -// const D3Q27SlipBCAdapterCreator& operator=( const D3Q27SlipBCAdapterCreator& ); //no copy allowed -// D3Q27SlipBCAdapterCreator() : ObObjectCreator() {} +// D3Q27SlipBCCreator( const D3Q27SlipBCCreator& ); //no copy allowed +// const D3Q27SlipBCCreator& operator=( const D3Q27SlipBCCreator& ); //no copy allowed +// D3Q27SlipBCCreator() : ObObjectCreator() {} //}; // -class SlipBCAdapter : public BCAdapter +class SlipBC : public BC { public: - SlipBCAdapter() : BCAdapter() {} - SlipBCAdapter(const short &secondaryBcOption) : BCAdapter(secondaryBcOption) {} + SlipBC() : BC() {} + SlipBC(const short &secondaryBcOption) : BC(secondaryBcOption) {} //------------- implements D3Q27BoundaryConditionAdapter ----- start diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.h deleted file mode 100644 index b7a75969f6895f680bf17c08462f4b788fc31c65..0000000000000000000000000000000000000000 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SlipBCAlgorithm_h__ -#define SlipBCAlgorithm_h__ - -#include "BCAlgorithm.h" -#include <PointerDefinitions.h> - -class DistributionArray3D; - -class SlipBCAlgorithm : public BCAlgorithm -{ -public: - SlipBCAlgorithm(); - ~SlipBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; - void addDistributions(SPtr<DistributionArray3D> distributions) override; - void applyBC() override; -}; -#endif // SlipBCAlgorithm_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.cpp similarity index 90% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.cpp index ea08f49bd18878943df4ce7584dd06a01b5f949a..cac20a5e73bdf52cecd2b612a5330006fc62f775 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.cpp @@ -1,24 +1,24 @@ -#include "SlipBCAlgorithm.h" +#include "SlipBCStrategy.h" #include "BoundaryConditions.h" #include "DistributionArray3D.h" -SlipBCAlgorithm::SlipBCAlgorithm() +SlipBCStrategy::SlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::SlipBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::SlipBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -SlipBCAlgorithm::~SlipBCAlgorithm() = default; +SlipBCStrategy::~SlipBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> SlipBCAlgorithm::clone() +SPtr<BCStrategy> SlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new SlipBCAlgorithm()); + SPtr<BCStrategy> bc(new SlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void SlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } +void SlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void SlipBCAlgorithm::applyBC() +void SlipBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.h new file mode 100644 index 0000000000000000000000000000000000000000..6eeb43a9022737637c1fa8dd7b7a557af067eda8 --- /dev/null +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.h @@ -0,0 +1,18 @@ +#ifndef SlipBCStrategy_h__ +#define SlipBCStrategy_h__ + +#include "BCStrategy.h" +#include <PointerDefinitions.h> + +class DistributionArray3D; + +class SlipBCStrategy : public BCStrategy +{ +public: + SlipBCStrategy(); + ~SlipBCStrategy() override; + SPtr<BCStrategy> clone() override; + void addDistributions(SPtr<DistributionArray3D> distributions) override; + void applyBC() override; +}; +#endif // SlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCProcessor.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCSet.cpp similarity index 77% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCProcessor.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCSet.cpp index 7d4aa93295aabe45f4dea9d13a9c5b22dfac3b2a..aefbd97f1fc7cae230af6632432b1efce41829cd 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCSet.cpp @@ -26,34 +26,34 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThinWallBCProcessor.cpp +//! \file ThinWallBCSet.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThinWallBCProcessor.h" +#include "ThinWallBCSet.h" -#include "ThinWallNoSlipBCAlgorithm.h" +#include "ThinWallNoSlipBCStrategy.h" #include "LBMKernel.h" ////////////////////////////////////////////////////////////////////////// -ThinWallBCProcessor::ThinWallBCProcessor(SPtr<ILBMKernel> kernel) : BCProcessor(kernel) {} +ThinWallBCSet::ThinWallBCSet(SPtr<ILBMKernel> kernel) : BCSet(kernel) {} ////////////////////////////////////////////////////////////////////////// -SPtr<BCProcessor> ThinWallBCProcessor::clone(SPtr<ILBMKernel> kernel) +SPtr<BCSet> ThinWallBCSet::clone(SPtr<ILBMKernel> kernel) { - SPtr<BCProcessor> bcProcessor(new ThinWallBCProcessor(kernel)); - return bcProcessor; + SPtr<BCSet> BCSet(new ThinWallBCSet(kernel)); + return BCSet; } ////////////////////////////////////////////////////////////////////////// -void ThinWallBCProcessor::applyPostCollisionBC() +void ThinWallBCSet::applyPostCollisionBC() { - BCProcessor::applyPostCollisionBC(); + BCSet::applyPostCollisionBC(); - for (SPtr<BCAlgorithm> bc : postBC) { - if (bc->getType() == BCAlgorithm::ThinWallNoSlipBCAlgorithm) { - dynamicPointerCast<ThinWallNoSlipBCAlgorithm>(bc)->setPass(2); + for (SPtr<BCStrategy> bc : postBC) { + if (bc->getType() == BCStrategy::ThinWallNoSlipBCStrategy) { + dynamicPointerCast<ThinWallNoSlipBCStrategy>(bc)->setPass(2); bc->applyBC(); - dynamicPointerCast<ThinWallNoSlipBCAlgorithm>(bc)->setPass(1); + dynamicPointerCast<ThinWallNoSlipBCStrategy>(bc)->setPass(1); } } } diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCProcessor.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCSet.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCProcessor.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCSet.h index cb81e6c168748d9d4baf3cce1688f114e7d5faf8..45c76a23f3d1260f8231bce581ec72ba4587794a 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCProcessor.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallBCSet.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThinWallBCProcessor.h +//! \file ThinWallBCSet.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThinWallBCProcessor_H -#define ThinWallBCProcessor_H +#ifndef ThinWallBCSet_H +#define ThinWallBCSet_H #include <PointerDefinitions.h> -#include "BCProcessor.h" +#include "BCSet.h" class ILBMKernel; -class ThinWallBCProcessor : public BCProcessor +class ThinWallBCSet : public BCSet { public: - ThinWallBCProcessor() = default; - explicit ThinWallBCProcessor(SPtr<ILBMKernel> kernel); - SPtr<BCProcessor> clone(SPtr<ILBMKernel> kernel) override; + ThinWallBCSet() = default; + explicit ThinWallBCSet(SPtr<ILBMKernel> kernel); + SPtr<BCSet> clone(SPtr<ILBMKernel> kernel) override; void applyPostCollisionBC(); // FIXME: should the base method virtual?? protected: private: diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCStrategy.cpp similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCStrategy.cpp index 3921004ec8e55d5468d7ea469b8e44e0757bcc39..18385cd20e76af04a624903390723c373d3129e3 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCStrategy.cpp @@ -26,31 +26,31 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThinWallNoSlipBCAlgorithm.cpp +//! \file ThinWallNoSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThinWallNoSlipBCAlgorithm.h" +#include "ThinWallNoSlipBCStrategy.h" #include "BoundaryConditions.h" #include "D3Q27EsoTwist3DSplittedVector.h" -ThinWallNoSlipBCAlgorithm::ThinWallNoSlipBCAlgorithm() +ThinWallNoSlipBCStrategy::ThinWallNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::ThinWallNoSlipBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::ThinWallNoSlipBCStrategy; + BCStrategy::preCollision = false; pass = 1; } ////////////////////////////////////////////////////////////////////////// -ThinWallNoSlipBCAlgorithm::~ThinWallNoSlipBCAlgorithm() = default; +ThinWallNoSlipBCStrategy::~ThinWallNoSlipBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> ThinWallNoSlipBCAlgorithm::clone() +SPtr<BCStrategy> ThinWallNoSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new ThinWallNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new ThinWallNoSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void ThinWallNoSlipBCAlgorithm::applyBC() +void ThinWallNoSlipBCStrategy::applyBC() { real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; @@ -85,9 +85,9 @@ void ThinWallNoSlipBCAlgorithm::applyBC() } } ////////////////////////////////////////////////////////////////////////// -void ThinWallNoSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void ThinWallNoSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThinWallNoSlipBCAlgorithm::setPass(int pass) { this->pass = pass; } +void ThinWallNoSlipBCStrategy::setPass(int pass) { this->pass = pass; } diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCStrategy.h index f9995d49fae300b44e30df4b8e3f47cd7ac95929..deba685a3b2a4d28f32406c4f5048520a2c46959 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThinWallNoSlipBCStrategy.h @@ -26,24 +26,24 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThinWallNoSlipBCAlgorithm.h +//! \file ThinWallNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThinWallNoSlipBCAlgorithm_h__ -#define ThinWallNoSlipBCAlgorithm_h__ +#ifndef ThinWallNoSlipBCStrategy_h__ +#define ThinWallNoSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; -class ThinWallNoSlipBCAlgorithm : public BCAlgorithm +class ThinWallNoSlipBCStrategy : public BCStrategy { public: - ThinWallNoSlipBCAlgorithm(); - ~ThinWallNoSlipBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; + ThinWallNoSlipBCStrategy(); + ~ThinWallNoSlipBCStrategy() override; + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void setPass(int pass); void applyBC() override; @@ -55,4 +55,4 @@ private: int pass; real fTemp[D3Q27System::ENDF + 1]; }; -#endif // ThinWallNoSlipBCAlgorithm_h__ +#endif // ThinWallNoSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCStrategy.cpp similarity index 84% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCStrategy.cpp index ebdf07f25ba489a87b637646271171bdc6de6d58..70981c5d0e4178eb0b58ac807305635be5a7fdfd 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCStrategy.cpp @@ -26,51 +26,51 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyDensityBCAlgorithm.cpp +//! \file ThixotropyDensityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThixotropyDensityBCAlgorithm.h" +#include "ThixotropyDensityBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -ThixotropyDensityBCAlgorithm::ThixotropyDensityBCAlgorithm() +ThixotropyDensityBCStrategy::ThixotropyDensityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::ThixotropyDensityBCAlgorithm; - BCAlgorithm::preCollision = false; - BCAlgorithm::thixotropy = true; + BCStrategy::type = BCStrategy::ThixotropyDensityBCStrategy; + BCStrategy::preCollision = false; + BCStrategy::thixotropy = true; lambdaBC = 0.0; } ////////////////////////////////////////////////////////////////////////// -ThixotropyDensityBCAlgorithm::~ThixotropyDensityBCAlgorithm() +ThixotropyDensityBCStrategy::~ThixotropyDensityBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> ThixotropyDensityBCAlgorithm::clone() +SPtr<BCStrategy> ThixotropyDensityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new ThixotropyDensityBCAlgorithm()); - dynamicPointerCast<ThixotropyDensityBCAlgorithm>(bc)->setLambdaBC(lambdaBC); + SPtr<BCStrategy> bc(new ThixotropyDensityBCStrategy()); + dynamicPointerCast<ThixotropyDensityBCStrategy>(bc)->setLambdaBC(lambdaBC); return bc; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void ThixotropyDensityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -//void ThixotropyDensityBCAlgorithm::addDistributionsF(DistributionArray3DPtr distributions) +//void ThixotropyDensityBCStrategy::addDistributionsF(DistributionArray3DPtr distributions) //{ // this->distributionsf = distributions; //} ////////////////////////////////////////////////////////////////////////// -void ThixotropyDensityBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributions) +void ThixotropyDensityBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributions) { this->distributionsH = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyDensityBCAlgorithm::applyBC() +void ThixotropyDensityBCStrategy::applyBC() { using namespace vf::lbm::dir; using namespace D3Q27System; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCStrategy.h index 2b83eed0ef9720b247751011e4d49d70df4b5e71..a40500fe5b9e5ca2136bba71e3723e75db33bd50 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCStrategy.h @@ -26,23 +26,23 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyDensityBCAlgorithm.h +//! \file ThixotropyDensityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThixotropyDensityBCAlgorithm_h__ -#define ThixotropyDensityBCAlgorithm_h__ +#ifndef ThixotropyDensityBCStrategy_h__ +#define ThixotropyDensityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" -class ThixotropyDensityBCAlgorithm : public BCAlgorithm +class ThixotropyDensityBCStrategy : public BCStrategy { public: - ThixotropyDensityBCAlgorithm(); - virtual ~ThixotropyDensityBCAlgorithm(); - SPtr<BCAlgorithm> clone(); + ThixotropyDensityBCStrategy(); + virtual ~ThixotropyDensityBCStrategy(); + SPtr<BCStrategy> clone(); void addDistributions(SPtr<DistributionArray3D> distributions); //void addDistributionsF(SPtr<DistributionArray3D> distributions); void addDistributionsH(SPtr<DistributionArray3D> distributions); @@ -54,5 +54,5 @@ protected: private: real lambdaBC; }; -#endif // ThixotropyDensityBCAlgorithm_h__ +#endif // ThixotropyDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCStrategy.cpp similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCStrategy.cpp index c34d4ec3568697f35bdf6d2bfdca93e36891823c..4a1b4016763d222138f38916f62fe6c257b4c537 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCStrategy.cpp @@ -26,49 +26,49 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyNoSlipBCAlgorithm.cpp +//! \file ThixotropyNoSlipBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThixotropyNoSlipBCAlgorithm.h" +#include "ThixotropyNoSlipBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -ThixotropyNoSlipBCAlgorithm::ThixotropyNoSlipBCAlgorithm() +ThixotropyNoSlipBCStrategy::ThixotropyNoSlipBCStrategy() { - BCAlgorithm::type = BCAlgorithm::ThixotropyNoSlipBCAlgorithm; - BCAlgorithm::preCollision = false; - BCAlgorithm::thixotropy = true; + BCStrategy::type = BCStrategy::ThixotropyNoSlipBCStrategy; + BCStrategy::preCollision = false; + BCStrategy::thixotropy = true; } ////////////////////////////////////////////////////////////////////////// -ThixotropyNoSlipBCAlgorithm::~ThixotropyNoSlipBCAlgorithm() +ThixotropyNoSlipBCStrategy::~ThixotropyNoSlipBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> ThixotropyNoSlipBCAlgorithm::clone() +SPtr<BCStrategy> ThixotropyNoSlipBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new ThixotropyNoSlipBCAlgorithm()); + SPtr<BCStrategy> bc(new ThixotropyNoSlipBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyNoSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void ThixotropyNoSlipBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -//void ThixotropyNoSlipBCAlgorithm::addDistributionsF(SPtr<DistributionArray3D> distributions) +//void ThixotropyNoSlipBCStrategy::addDistributionsF(SPtr<DistributionArray3D> distributions) //{ // this->distributionsf = distributions; //} ////////////////////////////////////////////////////////////////////////// -void ThixotropyNoSlipBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributions) +void ThixotropyNoSlipBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributions) { this->distributionsH = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyNoSlipBCAlgorithm::applyBC() +void ThixotropyNoSlipBCStrategy::applyBC() { real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCStrategy.h index e3e0ebc348909bd7152cdcbb9d1ede2253c80497..edd8952333f9607429e78ea917edf360768743c7 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNoSlipBCStrategy.h @@ -26,21 +26,21 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyNoSlipBCAlgorithm.h +//! \file ThixotropyNoSlipBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThixotropyNoSlipBCAlgorithm_h__ -#define ThixotropyNoSlipBCAlgorithm_h__ +#ifndef ThixotropyNoSlipBCStrategy_h__ +#define ThixotropyNoSlipBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" -class ThixotropyNoSlipBCAlgorithm : public BCAlgorithm +class ThixotropyNoSlipBCStrategy : public BCStrategy { public: - ThixotropyNoSlipBCAlgorithm(); - virtual ~ThixotropyNoSlipBCAlgorithm(); - SPtr<BCAlgorithm> clone(); + ThixotropyNoSlipBCStrategy(); + virtual ~ThixotropyNoSlipBCStrategy(); + SPtr<BCStrategy> clone(); void addDistributions(SPtr<DistributionArray3D> distributions); //void addDistributionsF(DistributionArray3DPtr distributions); void addDistributionsH(SPtr<DistributionArray3D> distributions); @@ -50,5 +50,5 @@ protected: private: }; -#endif // ThixotropyNoSlipBCAlgorithm_h__ +#endif // ThixotropyNoSlipBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.cpp similarity index 97% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.cpp index a7238e47ad2ff2df54a588b615a3f015ffe08204..f93e315c3be4e10daf1684b648bfe8ce9d06b3be 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.cpp @@ -26,48 +26,48 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyNonReflectingOutflowBCAlgorithm.cpp +//! \file ThixotropyNonReflectingOutflowBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThixotropyNonReflectingOutflowBCAlgorithm.h" +#include "ThixotropyNonReflectingOutflowBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -ThixotropyNonReflectingOutflowBCAlgorithm::ThixotropyNonReflectingOutflowBCAlgorithm() +ThixotropyNonReflectingOutflowBCStrategy::ThixotropyNonReflectingOutflowBCStrategy() { - BCAlgorithm::type = BCAlgorithm::ThixotropyNonReflectingOutflowBCAlgorithm; - BCAlgorithm::preCollision = true; - BCAlgorithm::thixotropy = true; + BCStrategy::type = BCStrategy::ThixotropyNonReflectingOutflowBCStrategy; + BCStrategy::preCollision = true; + BCStrategy::thixotropy = true; } ////////////////////////////////////////////////////////////////////////// -ThixotropyNonReflectingOutflowBCAlgorithm::~ThixotropyNonReflectingOutflowBCAlgorithm() +ThixotropyNonReflectingOutflowBCStrategy::~ThixotropyNonReflectingOutflowBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> ThixotropyNonReflectingOutflowBCAlgorithm::clone() +SPtr<BCStrategy> ThixotropyNonReflectingOutflowBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new ThixotropyNonReflectingOutflowBCAlgorithm()); + SPtr<BCStrategy> bc(new ThixotropyNonReflectingOutflowBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyNonReflectingOutflowBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void ThixotropyNonReflectingOutflowBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -//void ThixotropyNonReflectingOutflowBCAlgorithm::addDistributionsF(DistributionArray3DPtr distributions) +//void ThixotropyNonReflectingOutflowBCStrategy::addDistributionsF(DistributionArray3DPtr distributions) //{ // this->distributionsf = distributions; //} ////////////////////////////////////////////////////////////////////////// -void ThixotropyNonReflectingOutflowBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributions) +void ThixotropyNonReflectingOutflowBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributions) { this->distributionsH = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyNonReflectingOutflowBCAlgorithm::applyBC() +void ThixotropyNonReflectingOutflowBCStrategy::applyBC() { using namespace vf::lbm::dir; using namespace D3Q27System; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.h similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.h index cabc67bd67111b873c9c62db748d1f04eb006c56..7ae90994a13ab1a0842a0abbad596d1762bd4927 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCStrategy.h @@ -26,22 +26,22 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyNonReflectingOutflowBCAlgorithm.h +//! \file ThixotropyNonReflectingOutflowBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThixotropyNonReflectingOutflowBCAlgorithm_h__ -#define ThixotropyNonReflectingOutflowBCAlgorithm_h__ +#ifndef ThixotropyNonReflectingOutflowBCStrategy_h__ +#define ThixotropyNonReflectingOutflowBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" -class ThixotropyNonReflectingOutflowBCAlgorithm : public BCAlgorithm +class ThixotropyNonReflectingOutflowBCStrategy : public BCStrategy { public: - ThixotropyNonReflectingOutflowBCAlgorithm(); - virtual ~ThixotropyNonReflectingOutflowBCAlgorithm(); - SPtr<BCAlgorithm> clone(); + ThixotropyNonReflectingOutflowBCStrategy(); + virtual ~ThixotropyNonReflectingOutflowBCStrategy(); + SPtr<BCStrategy> clone(); void addDistributions(SPtr<DistributionArray3D> distributions); //void addDistributionsF(SPtr<DistributionArray3D> distributions); void addDistributionsH(SPtr<DistributionArray3D> distributions); @@ -53,5 +53,5 @@ protected: private: //LBMReal lambdaBC; }; -#endif // ThixotropyNonReflectingOutflowBCAlgorithm_h__ +#endif // ThixotropyNonReflectingOutflowBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCStrategy.cpp similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCStrategy.cpp index a17d56d480fbcd59ea1e5220fdd8805941ee9635..08c23b723c2ce7dc16774365dfaf9b4b65f4aaff 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCStrategy.cpp @@ -26,50 +26,50 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyVelocityBCAlgorithm.cpp +//! \file ThixotropyVelocityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThixotropyVelocityBCAlgorithm.h" +#include "ThixotropyVelocityBCStrategy.h" #include "DistributionArray3D.h" #include "BoundaryConditions.h" -ThixotropyVelocityBCAlgorithm::ThixotropyVelocityBCAlgorithm() +ThixotropyVelocityBCStrategy::ThixotropyVelocityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::ThixotropyVelocityBCAlgorithm; - BCAlgorithm::preCollision = false; - BCAlgorithm::thixotropy = true; + BCStrategy::type = BCStrategy::ThixotropyVelocityBCStrategy; + BCStrategy::preCollision = false; + BCStrategy::thixotropy = true; lambdaBC = vf::lbm::constant::c0o1; } ////////////////////////////////////////////////////////////////////////// -ThixotropyVelocityBCAlgorithm::~ThixotropyVelocityBCAlgorithm() +ThixotropyVelocityBCStrategy::~ThixotropyVelocityBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> ThixotropyVelocityBCAlgorithm::clone() +SPtr<BCStrategy> ThixotropyVelocityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new ThixotropyVelocityBCAlgorithm()); - dynamicPointerCast<ThixotropyVelocityBCAlgorithm>(bc)->setLambdaBC(lambdaBC); + SPtr<BCStrategy> bc(new ThixotropyVelocityBCStrategy()); + dynamicPointerCast<ThixotropyVelocityBCStrategy>(bc)->setLambdaBC(lambdaBC); return bc; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyVelocityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void ThixotropyVelocityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -//void ThixotropyVelocityBCAlgorithm::addDistributionsF(DistributionArray3DPtr distributions) +//void ThixotropyVelocityBCStrategy::addDistributionsF(DistributionArray3DPtr distributions) //{ // this->distributionsf = distributions; //} ////////////////////////////////////////////////////////////////////////// -void ThixotropyVelocityBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributions) +void ThixotropyVelocityBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributions) { this->distributionsH = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyVelocityBCAlgorithm::applyBC() +void ThixotropyVelocityBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCStrategy.h similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCStrategy.h index bea3b0a374a128f1de88b1ef3d6e75c0ad34190a..93cf6d2206efe942c57024e979ef9a4f970c2807 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCStrategy.h @@ -26,22 +26,22 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyVelocityBCAlgorithm.h +//! \file ThixotropyVelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThixotropyVelocityBCAlgorithm_h__ -#define ThixotropyVelocityBCAlgorithm_h__ +#ifndef ThixotropyVelocityBCStrategy_h__ +#define ThixotropyVelocityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" -class ThixotropyVelocityBCAlgorithm : public BCAlgorithm +class ThixotropyVelocityBCStrategy : public BCStrategy { public: - ThixotropyVelocityBCAlgorithm(); - virtual ~ThixotropyVelocityBCAlgorithm(); - SPtr<BCAlgorithm> clone(); + ThixotropyVelocityBCStrategy(); + virtual ~ThixotropyVelocityBCStrategy(); + SPtr<BCStrategy> clone(); void addDistributions(SPtr<DistributionArray3D> distributions); void addDistributionsH(SPtr<DistributionArray3D> distributions); void applyBC(); @@ -52,5 +52,5 @@ protected: private: real lambdaBC; }; -#endif // ThixotropyVelocityBCAlgorithm_h__ +#endif // ThixotropyVelocityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.cpp similarity index 85% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.cpp index a1e3e143b44f96a95e2c08f071917e7c53221f32..ea4fc700d0da6e465422a9ee9e319774e2bb66b7 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.cpp @@ -26,43 +26,43 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyVelocityWithDensityBCAlgorithm.cpp +//! \file ThixotropyVelocityWithDensityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "ThixotropyVelocityWithDensityBCAlgorithm.h" +#include "ThixotropyVelocityWithDensityBCStrategy.h" #include "DistributionArray3D.h" #include "BCArray3D.h" -ThixotropyVelocityWithDensityBCAlgorithm::ThixotropyVelocityWithDensityBCAlgorithm() +ThixotropyVelocityWithDensityBCStrategy::ThixotropyVelocityWithDensityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::ThixotropyVelocityWithDensityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::ThixotropyVelocityWithDensityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -ThixotropyVelocityWithDensityBCAlgorithm::~ThixotropyVelocityWithDensityBCAlgorithm() +ThixotropyVelocityWithDensityBCStrategy::~ThixotropyVelocityWithDensityBCStrategy() { } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> ThixotropyVelocityWithDensityBCAlgorithm::clone() +SPtr<BCStrategy> ThixotropyVelocityWithDensityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new ThixotropyVelocityWithDensityBCAlgorithm()); - dynamicPointerCast<ThixotropyVelocityWithDensityBCAlgorithm>(bc)->setLambdaBC(lambdaBC); + SPtr<BCStrategy> bc(new ThixotropyVelocityWithDensityBCStrategy()); + dynamicPointerCast<ThixotropyVelocityWithDensityBCStrategy>(bc)->setLambdaBC(lambdaBC); return bc; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyVelocityWithDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void ThixotropyVelocityWithDensityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyVelocityWithDensityBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> distributions) +void ThixotropyVelocityWithDensityBCStrategy::addDistributionsH(SPtr<DistributionArray3D> distributions) { this->distributionsH = distributions; } ////////////////////////////////////////////////////////////////////////// -void ThixotropyVelocityWithDensityBCAlgorithm::applyBC() +void ThixotropyVelocityWithDensityBCStrategy::applyBC() { using namespace vf::lbm::dir; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.h similarity index 86% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.h index d69e79a223e3db56cb6a37014bbf030183adf606..74d33efc0a1dbb693280665d0d27e541081b2fd3 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCStrategy.h @@ -26,27 +26,27 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file ThixotropyVelocityWithDensityBCAlgorithm.h +//! \file ThixotropyVelocityWithDensityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef ThixotropyVelocityWithDensityBCAlgorithm_h__ -#define ThixotropyVelocityWithDensityBCAlgorithm_h__ +#ifndef ThixotropyVelocityWithDensityBCStrategy_h__ +#define ThixotropyVelocityWithDensityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; //! \brief Class implements Dirichlet boundary condition for velocity. Set density in system. It is used together with non reflecting outflow. -class ThixotropyVelocityWithDensityBCAlgorithm : public BCAlgorithm +class ThixotropyVelocityWithDensityBCStrategy : public BCStrategy { public: - ThixotropyVelocityWithDensityBCAlgorithm(); - ~ThixotropyVelocityWithDensityBCAlgorithm(); - SPtr<BCAlgorithm> clone(); + ThixotropyVelocityWithDensityBCStrategy(); + ~ThixotropyVelocityWithDensityBCStrategy(); + SPtr<BCStrategy> clone(); void addDistributions(SPtr<DistributionArray3D> distributions); void addDistributionsH(SPtr<DistributionArray3D> distributions); void applyBC(); @@ -57,4 +57,4 @@ protected: private: real lambdaBC; }; -#endif // ThixotropyVelocityWithDensityBCAlgorithm_h__ +#endif // ThixotropyVelocityWithDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAdapter.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBC.cpp similarity index 88% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAdapter.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBC.cpp index 1e156476bfe2474e28fa107d014674ff3b0f120a..5833038504e4b3f17cbaab7f763cb8519eff56a5 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAdapter.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBC.cpp @@ -26,19 +26,19 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file VelocityBCAdapter.cpp +//! \file VelocityBC.cpp //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#include "VelocityBCAdapter.h" +#include "VelocityBC.h" #include "basics/utilities/UbLogger.h" #include "basics/utilities/UbMath.h" #include "basics/utilities/UbTuple.h" using namespace std; -VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const BCFunction &velVxBC) +VelocityBC::VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const BCFunction &velVxBC) { if (vx1) this->vx1BCs.push_back(velVxBC); @@ -49,7 +49,7 @@ VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const boo this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function, +VelocityBC::VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function, const real &startTime, const real &endTime) { if (vx1) @@ -61,7 +61,7 @@ VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const boo this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function1, +VelocityBC::VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function1, const mu::Parser &function2, const mu::Parser &function3, const real &startTime, const real &endTime) { @@ -74,7 +74,7 @@ VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const boo this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const string &functionstring, +VelocityBC::VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const string &functionstring, const real &startTime, const real &endTime) { if (vx1) @@ -86,7 +86,7 @@ VelocityBCAdapter::VelocityBCAdapter(const bool &vx1, const bool &vx2, const boo this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const BCFunction &velBC, bool x1Dir, bool x2Dir, bool x3Dir) +VelocityBC::VelocityBC(const BCFunction &velBC, bool x1Dir, bool x2Dir, bool x3Dir) { if (x1Dir) this->vx1BCs.push_back(velBC); @@ -97,7 +97,7 @@ VelocityBCAdapter::VelocityBCAdapter(const BCFunction &velBC, bool x1Dir, bool x this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const BCFunction &velVx1BC, const BCFunction &velVx2BC, const BCFunction &velVx3BC) +VelocityBC::VelocityBC(const BCFunction &velVx1BC, const BCFunction &velVx2BC, const BCFunction &velVx3BC) { if (velVx1BC.getEndTime() != -Ub::inf) this->vx1BCs.push_back(velVx1BC); @@ -108,7 +108,7 @@ VelocityBCAdapter::VelocityBCAdapter(const BCFunction &velVx1BC, const BCFunctio this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const vector<BCFunction> &velVx1BCs, const vector<BCFunction> &velVx2BCs, +VelocityBC::VelocityBC(const vector<BCFunction> &velVx1BCs, const vector<BCFunction> &velVx2BCs, const vector<BCFunction> &velVx3BCs) { this->vx1BCs = velVx1BCs; @@ -117,7 +117,7 @@ VelocityBCAdapter::VelocityBCAdapter(const vector<BCFunction> &velVx1BCs, const this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const real &vx1, const real &vx1StartTime, const real &vx1EndTime, +VelocityBC::VelocityBC(const real &vx1, const real &vx1StartTime, const real &vx1EndTime, const real &vx2, const real &vx2StartTime, const real &vx2EndTime, const real &vx3, const real &vx3StartTime, const real &vx3EndTime) { @@ -127,7 +127,7 @@ VelocityBCAdapter::VelocityBCAdapter(const real &vx1, const real &vx1StartTime, this->init(); } /*==========================================================*/ -VelocityBCAdapter::VelocityBCAdapter(const string &vx1Function, const real &vx1StartTime, const real &vx1EndTime, +VelocityBC::VelocityBC(const string &vx1Function, const real &vx1StartTime, const real &vx1EndTime, const string &vx2Function, const real &vx2StartTime, const real &vx2EndTime, const string &vx3Function, const real &vx3StartTime, const real &vx3EndTime) { @@ -140,7 +140,7 @@ VelocityBCAdapter::VelocityBCAdapter(const string &vx1Function, const real &vx1S this->init(); } /*==========================================================*/ -void VelocityBCAdapter::setNewVelocities(const real &vx1, const real &vx1StartTime, const real &vx1EndTime, +void VelocityBC::setNewVelocities(const real &vx1, const real &vx1StartTime, const real &vx1EndTime, const real &vx2, const real &vx2StartTime, const real &vx2EndTime, const real &vx3, const real &vx3StartTime, const real &vx3EndTime) { @@ -151,7 +151,7 @@ void VelocityBCAdapter::setNewVelocities(const real &vx1, const real &vx1StartTi this->init(); } /*==========================================================*/ -void VelocityBCAdapter::init() +void VelocityBC::init() { this->unsetTimeDependent(); @@ -181,7 +181,7 @@ void VelocityBCAdapter::init() } } /*==========================================================*/ -void VelocityBCAdapter::init(std::vector<BCFunction> &vxBCs) +void VelocityBC::init(std::vector<BCFunction> &vxBCs) { for (size_t pos = 0; pos < vxBCs.size(); ++pos) { if (!(UbMath::equal(BCFunction::INFCONST, vxBCs[pos].getEndTime()) && @@ -198,7 +198,7 @@ void VelocityBCAdapter::init(std::vector<BCFunction> &vxBCs) } } /*==========================================================*/ -void VelocityBCAdapter::init(const D3Q27Interactor *const &interactor, const real &time) +void VelocityBC::init(const D3Q27Interactor *const &interactor, const real &time) { this->timeStep = time; this->tmpVx1Function = this->tmpVx2Function = this->tmpVx3Function = NULL; @@ -276,7 +276,7 @@ void VelocityBCAdapter::init(const D3Q27Interactor *const &interactor, const rea } } - UBLOG(logDEBUG4, "D3Q27VelocityBCAdapter::init(time=" + UBLOG(logDEBUG4, "D3Q27VelocityBC::init(time=" << time << ") " << ", vx1= \"" << (tmpVx1Function ? tmpVx1Function->GetExpr() : "-") << "\"" << ", vx2= \"" << (tmpVx2Function ? tmpVx2Function->GetExpr() : "-") << "\"" @@ -284,12 +284,12 @@ void VelocityBCAdapter::init(const D3Q27Interactor *const &interactor, const rea << ", timedependent=" << boolalpha << this->isTimeDependent()); } /*==========================================================*/ -void VelocityBCAdapter::update(const D3Q27Interactor *const &interactor, const real &time) +void VelocityBC::update(const D3Q27Interactor *const &interactor, const real &time) { this->init(interactor, time); } /*==========================================================*/ -void VelocityBCAdapter::adaptBCForDirection(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, +void VelocityBC::adaptBCForDirection(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, const real & /*worldX1*/, const real & /*worldX2*/, const real & /*worldX3*/, const real &q, const int &fdirection, const real & /*time*/) @@ -298,14 +298,14 @@ void VelocityBCAdapter::adaptBCForDirection(const D3Q27Interactor & /*interactor bc->setQ((real)q, fdirection); } /*==========================================================*/ -void VelocityBCAdapter::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real &worldX1, +void VelocityBC::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real &worldX1, const real &worldX2, const real &worldX3, const real &time) { this->setNodeVelocity(interactor, bc, worldX1, worldX2, worldX3, time); - bc->setBcAlgorithmType(algorithmType); + bc->setBCStrategyType(algorithmType); } /*==========================================================*/ -void VelocityBCAdapter::setNodeVelocity(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, +void VelocityBC::setNodeVelocity(const D3Q27Interactor & /*interactor*/, SPtr<BoundaryConditions> bc, const real &worldX1, const real &worldX2, const real &worldX3, const real ×tep) { @@ -334,7 +334,7 @@ void VelocityBCAdapter::setNodeVelocity(const D3Q27Interactor & /*interactor*/, } } /*==========================================================*/ -UbTupleDouble3 VelocityBCAdapter::getVelocity(const real &x1, const real &x2, const real &x3, +UbTupleDouble3 VelocityBC::getVelocity(const real &x1, const real &x2, const real &x3, const real &timeStep) const { real vx1 = vf::lbm::constant::c0o1; @@ -355,10 +355,10 @@ UbTupleDouble3 VelocityBCAdapter::getVelocity(const real &x1, const real &x2, co return { vx1, vx2, vx3 }; } /*==========================================================*/ -string VelocityBCAdapter::toString() +string VelocityBC::toString() { stringstream info; - info << "D3Q27VelocityBCAdapter:\n"; + info << "D3Q27VelocityBC:\n"; info << " #vx1-functions = " << (int)vx1BCs.size() << endl; info << " #vx2-functions = " << (int)vx2BCs.size() << endl; info << " #vx3-functions = " << (int)vx3BCs.size() << endl; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAdapter.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBC.h similarity index 83% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAdapter.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBC.h index c0596b8e234f581726243a8a95beb6eb71121be4..64e333ad86e1cc03c9295274c107387bf6583562 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAdapter.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBC.h @@ -26,12 +26,12 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file VelocityBCAdapter.h +//! \file VelocityBC.h //! \ingroup BoundarConditions //! \author Sören Freudiger //======================================================================================= -#ifndef VelocityBCAdapter_H -#define VelocityBCAdapter_H +#ifndef VelocityBC_H +#define VelocityBC_H #include <iostream> #include <sstream> @@ -40,7 +40,7 @@ #include <basics/utilities/UbInfinity.h> -#include <BCAdapter.h> +#include <BC.h> #include <BCFunction.h> //! \brief A class provides an interface for velocity boundary condition in grid generator. @@ -56,8 +56,8 @@ //! vx2BCs.push_back(BCFunction(0.002, 200, 300) ); //t=[200..300[ -> vx2 = 0.002 //! vx2BCs.push_back(BCFunction(0.043, 300, 600) ); //t=[300..600] -> vx2 = 0.043 //! -//! VelocityBCAdapter bcAdapter(vx1BCs,vx2BCs,vx3BCs); -//! bcAdapter.setTimePeriodic(); //-> t=[0 ..100[ -> vx1 = 0.01 +//! VelocityBC BC(vx1BCs,vx2BCs,vx3BCs); +//! BC.setTimePeriodic(); //-> t=[0 ..100[ -> vx1 = 0.01 //! // t=[100..200[ -> vx1 = 0.004 //! // t=[200..400[ -> vx1 = 0.03 //! // t=[400..500[ -> vx1 = 0.01 @@ -76,39 +76,39 @@ //! fct.SetExpr("max(vmax*(1.0-4.0*((x2-x2_vmax)^2+(x3-x3_vmax)^2)/H^2),0.0)"); //paraboloid (with vmax for //! (0/x2_vmax/x3_vmax) fct.DefineConst("x2Vmax", 0.0 ); //x2-Pos für vmax fct.DefineConst("x3Vmax", 0.0 //! ); //x3-Pos für vmax fct.DefineConst("H" , diameterOfPipe); fct.DefineConst("vmax" , vmax ); -//! VelocityBCAdapter velBC(true, false ,false ,fct, 0, BCFunction::INFCONST); +//! VelocityBC velBC(true, false ,false ,fct, 0, BCFunction::INFCONST); //! \endcode -class VelocityBCAdapter : public BCAdapter +class VelocityBC : public BC { public: // constructors - VelocityBCAdapter() { this->init(); } + VelocityBC() { this->init(); } - VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const BCFunction &velVxBC); + VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const BCFunction &velVxBC); - VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function, + VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function, const real &startTime, const real &endTime); - VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function1, + VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const mu::Parser &function1, const mu::Parser &function2, const mu::Parser &function3, const real &startTime, const real &endTime); - VelocityBCAdapter(const bool &vx1, const bool &vx2, const bool &vx3, const std::string &functionstring, + VelocityBC(const bool &vx1, const bool &vx2, const bool &vx3, const std::string &functionstring, const real &startTime, const real &endTime); - VelocityBCAdapter(const BCFunction &velBC, bool x1Dir, bool x2Dir, bool x3Dir); + VelocityBC(const BCFunction &velBC, bool x1Dir, bool x2Dir, bool x3Dir); - VelocityBCAdapter(const BCFunction &velVx1BC, const BCFunction &velVx2BC, const BCFunction &velVx3BC); + VelocityBC(const BCFunction &velVx1BC, const BCFunction &velVx2BC, const BCFunction &velVx3BC); - VelocityBCAdapter(const std::vector<BCFunction> &velVx1BCs, const std::vector<BCFunction> &velVx2BCs, + VelocityBC(const std::vector<BCFunction> &velVx1BCs, const std::vector<BCFunction> &velVx2BCs, const std::vector<BCFunction> &velVx3BCs); - VelocityBCAdapter(const real &vx1, const real &vx1StartTime, const real &vx1EndTime, const real &vx2, + VelocityBC(const real &vx1, const real &vx1StartTime, const real &vx1EndTime, const real &vx2, const real &vx2StartTime, const real &vx2EndTime, const real &vx3, const real &vx3StartTime, const real &vx3EndTime); - VelocityBCAdapter(const std::string &vx1Function, const real &vx1StartTime, const real &vx1EndTime, + VelocityBC(const std::string &vx1Function, const real &vx1StartTime, const real &vx1EndTime, const std::string &vx2Function, const real &vx2StartTime, const real &vx2EndTime, const std::string &vx3Function, const real &vx3StartTime, const real &vx3EndTime); @@ -122,7 +122,7 @@ public: const real &vx2StartTime, const real &vx2EndTime, const real &vx3, const real &vx3StartTime, const real &vx3EndTime); - //------------- implements BCAdapter ----- start + //------------- implements BC ----- start std::string toString(); void init(const D3Q27Interactor *const &interactor, const real &time = 0) override; @@ -134,7 +134,7 @@ public: void adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const real &worldX1, const real &worldX2, const real &worldX3, const real &time = 0) override; - //------------- implements BCAdapter ----- end + //------------- implements BC ----- end UbTupleDouble3 getVelocity(const real &x1, const real &x2, const real &x3, const real &timeStep) const; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCStrategy.cpp similarity index 89% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCStrategy.cpp index b1f16ece307b88f2efe6b0673f34930f8989ef15..44f7180b654ae57eb3d5bd14fa22c88785ded9b8 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCStrategy.cpp @@ -26,34 +26,34 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file VelocityBCAlgorithm.cpp +//! \file VelocityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "VelocityBCAlgorithm.h" +#include "VelocityBCStrategy.h" #include "BoundaryConditions.h" #include "DistributionArray3D.h" #include "Block3D.h" -VelocityBCAlgorithm::VelocityBCAlgorithm() +VelocityBCStrategy::VelocityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::VelocityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::VelocityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> VelocityBCAlgorithm::clone() +SPtr<BCStrategy> VelocityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new VelocityBCAlgorithm()); + SPtr<BCStrategy> bc(new VelocityBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void VelocityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void VelocityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void VelocityBCAlgorithm::applyBC() +void VelocityBCStrategy::applyBC() { real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCStrategy.h similarity index 91% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCStrategy.h index 44bbd2cee69c12a613e638f4173b371d1260964f..bc12cf937471726454c0de7b22d531a227d75696 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityBCStrategy.h @@ -26,25 +26,25 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file VelocityBCAlgorithm.h +//! \file VelocityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef VelocityBCAlgorithm_H -#define VelocityBCAlgorithm_H +#ifndef VelocityBCStrategy_H +#define VelocityBCStrategy_H -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; //! \brief A class implements velocyty boundary condition -class VelocityBCAlgorithm : public BCAlgorithm +class VelocityBCStrategy : public BCStrategy { public: - VelocityBCAlgorithm(); - SPtr<BCAlgorithm> clone() override; + VelocityBCStrategy(); + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCStrategy.cpp similarity index 87% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCAlgorithm.cpp rename to src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCStrategy.cpp index 840d8f2c423928c2bb377ba2b1f3fd8151ec0dca..a7cf16a9f6f63166465bcd7fcdab94358b906c09 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCStrategy.cpp @@ -26,34 +26,34 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file VelocityWithDensityBCAlgorithm.cpp +//! \file VelocityWithDensityBCStrategy.cpp //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#include "VelocityWithDensityBCAlgorithm.h" +#include "VelocityWithDensityBCStrategy.h" #include "BCArray3D.h" #include "DistributionArray3D.h" -VelocityWithDensityBCAlgorithm::VelocityWithDensityBCAlgorithm() +VelocityWithDensityBCStrategy::VelocityWithDensityBCStrategy() { - BCAlgorithm::type = BCAlgorithm::VelocityWithDensityBCAlgorithm; - BCAlgorithm::preCollision = false; + BCStrategy::type = BCStrategy::VelocityWithDensityBCStrategy; + BCStrategy::preCollision = false; } ////////////////////////////////////////////////////////////////////////// -VelocityWithDensityBCAlgorithm::~VelocityWithDensityBCAlgorithm() = default; +VelocityWithDensityBCStrategy::~VelocityWithDensityBCStrategy() = default; ////////////////////////////////////////////////////////////////////////// -SPtr<BCAlgorithm> VelocityWithDensityBCAlgorithm::clone() +SPtr<BCStrategy> VelocityWithDensityBCStrategy::clone() { - SPtr<BCAlgorithm> bc(new VelocityWithDensityBCAlgorithm()); + SPtr<BCStrategy> bc(new VelocityWithDensityBCStrategy()); return bc; } ////////////////////////////////////////////////////////////////////////// -void VelocityWithDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions) +void VelocityWithDensityBCStrategy::addDistributions(SPtr<DistributionArray3D> distributions) { this->distributions = distributions; } ////////////////////////////////////////////////////////////////////////// -void VelocityWithDensityBCAlgorithm::applyBC() +void VelocityWithDensityBCStrategy::applyBC() { //velocity bc for non reflecting pressure bc real f[D3Q27System::ENDF+1]; diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCAlgorithm.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCStrategy.h similarity index 86% rename from src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCAlgorithm.h rename to src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCStrategy.h index 7ab57d2b892af9db0e0e42327b970b381710edf3..6d91f2ced18e647449c7ba732aa09c4f5fe25f8d 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCAlgorithm.h +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/VelocityWithDensityBCStrategy.h @@ -26,15 +26,15 @@ // You should have received a copy of the GNU General Public License along // with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. // -//! \file VelocityWithDensityBCAlgorithm.h +//! \file VelocityWithDensityBCStrategy.h //! \ingroup BoundarConditions //! \author Konstantin Kutscher //======================================================================================= -#ifndef VelocityWithDensityBCAlgorithm_h__ -#define VelocityWithDensityBCAlgorithm_h__ +#ifndef VelocityWithDensityBCStrategy_h__ +#define VelocityWithDensityBCStrategy_h__ -#include "BCAlgorithm.h" +#include "BCStrategy.h" #include <PointerDefinitions.h> class DistributionArray3D; @@ -42,13 +42,13 @@ class DistributionArray3D; //! \brief Class implements Dirichlet boundary condition for velocity. Set density in system. It is used together with //! non reflecting outflow. -class VelocityWithDensityBCAlgorithm : public BCAlgorithm +class VelocityWithDensityBCStrategy : public BCStrategy { public: - VelocityWithDensityBCAlgorithm(); - ~VelocityWithDensityBCAlgorithm() override; - SPtr<BCAlgorithm> clone() override; + VelocityWithDensityBCStrategy(); + ~VelocityWithDensityBCStrategy() override; + SPtr<BCStrategy> clone() override; void addDistributions(SPtr<DistributionArray3D> distributions) override; void applyBC() override; }; -#endif // VelocityWithDensityBCAlgorithm_h__ +#endif // VelocityWithDensityBCStrategy_h__ diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/AverageValuesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/AverageValuesCoProcessor.cpp index 1a5276fcf44098254cee825af503a4752df60cd5..b34f6129961562817323c3f9a87d857d7fca07e0 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/AverageValuesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/AverageValuesCoProcessor.cpp @@ -1,6 +1,6 @@ #include "AverageValuesCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include "basics/writer/WbWriterVtkXmlASCII.h" @@ -84,7 +84,7 @@ void AverageValuesCoProcessor::resetDataRMS(real step) for (SPtr<Block3D> block : blockVector[level]) { if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageValues(); @@ -128,7 +128,7 @@ void AverageValuesCoProcessor::resetDataMeans(real step) for (SPtr<Block3D> block : blockVector[level]) { if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageValues(); @@ -238,7 +238,7 @@ void AverageValuesCoProcessor::addData(const SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageValues(); // int ghostLayerWidth = kernel->getGhostLayerWidth(); @@ -348,7 +348,7 @@ void AverageValuesCoProcessor::calculateAverageValues(real timeStep) for (SPtr<Block3D> block : blockVector[level]) { if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageValues(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/CalculateForcesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/CalculateForcesCoProcessor.cpp index d50c58d5698a7faa0939fedd613075873d9e5363..2a7635d2a211f199f15ef46955a85f48d14c1b0d 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/CalculateForcesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/CalculateForcesCoProcessor.cpp @@ -1,5 +1,5 @@ #include "CalculateForcesCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "BCArray3D.h" #include "Block3D.h" @@ -117,7 +117,7 @@ void CalculateForcesCoProcessor::calculateForces() std::set<std::vector<int>> &transNodeIndicesSet = t.second; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); distributions->swap(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/CalculateTorqueCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/CalculateTorqueCoProcessor.cpp index 57048674137ccbf1445d548f332b2f5403d9ca4c..b4b8b1b581373b27fe5c977e3637067df1727900 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/CalculateTorqueCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/CalculateTorqueCoProcessor.cpp @@ -1,5 +1,5 @@ #include "CalculateTorqueCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include <mpi/Communicator.h> #include "D3Q27Interactor.h" @@ -105,7 +105,7 @@ void CalculateTorqueCoProcessor::calculateForces() SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); int ghostLayerWidth = kernel->getGhostLayerWidth(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/ForceCalculator.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/ForceCalculator.cpp index 918e3afbe8d454ac97707b8c79f927bca324cb52..9a39ce11ed15e939e9fc32eaeb15d541675387aa 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/ForceCalculator.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/ForceCalculator.cpp @@ -1,5 +1,5 @@ #include "ForceCalculator.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "BCArray3D.h" #include "Block3D.h" @@ -66,7 +66,7 @@ void ForceCalculator::calculateForces(std::vector<SPtr<D3Q27Interactor>> interac SPtr<Block3D> block = t.first; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); distributions->swap(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/InSituCatalystCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/InSituCatalystCoProcessor.cpp index 741f1f340c4c02e9f5b08854e7205ab2aa5e507b..64b9f353bc18dd4597dd4800881e2054e94035df 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/InSituCatalystCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/InSituCatalystCoProcessor.cpp @@ -1,7 +1,7 @@ #ifdef VF_CATALYST #include "InSituCatalystCoProcessor.h" -#include <D3Q27ETBCProcessor.h> +#include <D3Q27ETBCSet.h> #include <LBMKernel.h> #include <string> #include <vector> @@ -97,7 +97,7 @@ void InSituCatalystCoProcessor::addData(SPtr<Block3D> block) real dx = grid->getDeltaX(block); SPtr<LBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real f[D3Q27System::ENDF + 1]; real vx1, vx2, vx3, rho; @@ -214,7 +214,7 @@ void InSituCatalystCoProcessor::addVTKGridData(SPtr<Block3D> block) real dx = grid->getDeltaX(block); SPtr<LBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real f[D3Q27System::ENDF + 1]; real vx1, vx2, vx3, rho; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/InSituVTKCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/InSituVTKCoProcessor.cpp index 6b8026cedd8331c02b52a06c86c0e5d7821d0aa2..bf68f9d85132ba8e841717a98add597ee8fd489d 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/InSituVTKCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/InSituVTKCoProcessor.cpp @@ -2,7 +2,7 @@ #include "InSituVTKCoProcessor.h" #include <BCArray3D.h> -#include <BCProcessor.h> +#include <BCSet.h> #include <Block3D.h> #include <BoundaryConditions.h> #include <Communicator.h> @@ -130,7 +130,7 @@ void InSituVTKCoProcessor::addData(SPtr<Block3D> block) real dx = grid->getDeltaX(block); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real f[D3Q27System::ENDF + 1]; real vx1, vx2, vx3, rho; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/IntegrateValuesHelper.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/IntegrateValuesHelper.cpp index 0d8b7827b48fb2a5e6e16d13538f63209e03e244..7eabcd2849f2fca11cb057357492fa1062c46dce 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/IntegrateValuesHelper.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/IntegrateValuesHelper.cpp @@ -5,7 +5,7 @@ #include <vector> #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "DataSet3D.h" #include "LBMKernel.h" @@ -65,7 +65,7 @@ void IntegrateValuesHelper::init(int level) orgX3 = val<3>(org); SPtr<LBMKernel> kernel = dynamicPointerCast<LBMKernel>(block->getKernel()); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); int ghostLayerWitdh = kernel->getGhostLayerWidth(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real internX1, internX2, internX3; @@ -193,7 +193,7 @@ void IntegrateValuesHelper::calculateMQ() calcMacros = &D3Q27System::calcIncompMacroscopicValues; } - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); for (UbTupleInt3 node : cn.nodes) { distributions->getDistribution(f, val<1>(node), val<2>(node), val<3>(node)); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/LineTimeSeriesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/LineTimeSeriesCoProcessor.cpp index 98d0188fc25def9ee613e85f98d9623b0dfdf702..4d7b5e837723c10d7bcd89462cc2407ffae19920 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/LineTimeSeriesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/LineTimeSeriesCoProcessor.cpp @@ -1,5 +1,5 @@ #include "LineTimeSeriesCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "WbWriterVtkXmlASCII.h" #include "Block3D.h" diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp index fd08df50a3f0cb9b85fd3255465170a4ef1681a9..8213edcf34bfa4016e1bfe89b327cc6a83993a16 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp @@ -1,6 +1,6 @@ #include "MPIIOMigrationBECoProcessor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include <mpi/Communicator.h> @@ -685,7 +685,7 @@ void MPIIOMigrationBECoProcessor::writeBoundaryConds(int step) { for (SPtr<Block3D> block : blocksVector[level]) // all the blocks of the current level { - bcArr = block->getKernel()->getBCProcessor()->getBCArray(); + bcArr = block->getKernel()->getBCSet()->getBCArray(); bcAddArray[ic].globalID = block->getGlobalID(); // id of the block needed to find it while regenerating the grid bcAddArray[ic].boundCond_count = 0; // how many BoundaryConditions in this block @@ -716,7 +716,7 @@ void MPIIOMigrationBECoProcessor::writeBoundaryConds(int step) bouCond->nx3 = (real)bcArr->bcvector[bc]->nx3; for (int iq = 0; iq < 26; iq++) bouCond->q[iq] = (real)bcArr->bcvector[bc]->getQ(iq); - bouCond->algorithmType = bcArr->bcvector[bc]->getBcAlgorithmType(); + bouCond->algorithmType = bcArr->bcvector[bc]->getBCStrategyType(); } bcVector[ic].push_back(*bouCond); @@ -1006,8 +1006,8 @@ void MPIIOMigrationBECoProcessor::readDataSet(int step) if (!lbmKernel) UB_THROW(UbException(UB_EXARGS, "lbmKernel does not exist!")); - if (!bcProcessor) - UB_THROW(UbException(UB_EXARGS, "bcProcessor does not exist!")); + if (!bcSet) + UB_THROW(UbException(UB_EXARGS, "BCSet does not exist!")); if (nue == -999.999) UB_THROW(UbException(UB_EXARGS, "nue is not initialised!")); if (nuL == -999.999 ) @@ -1681,7 +1681,7 @@ void MPIIOMigrationBECoProcessor::readBoundaryConds(int step) bc->nx3 = bcArray[ibc].nx3; for (int iq = 0; iq < 26; iq++) bc->setQ(bcArray[ibc].q[iq], iq); - bc->setBcAlgorithmType(bcArray[ibc].algorithmType); + bc->setBCStrategyType(bcArray[ibc].algorithmType); } bcVector.push_back(bc); @@ -1690,14 +1690,14 @@ void MPIIOMigrationBECoProcessor::readBoundaryConds(int step) CbArray3D<int, IndexerX3X2X1> bcim(bcindexmatrixV, boundCondParamStr.nx1, boundCondParamStr.nx2, boundCondParamStr.nx3); SPtr<Block3D> block1 = grid->getBlock(blockID); - SPtr<BCProcessor> bcProc = bcProcessor->clone(block1->getKernel()); + SPtr<BCSet> bcProc = bcSet->clone(block1->getKernel()); SPtr<BCArray3D> bcArr(new BCArray3D()); bcArr->bcindexmatrix = bcim; bcArr->bcvector = bcVector; bcArr->indexContainer = indexContainerV; bcProc->setBCArray(bcArr); - block1->getKernel()->setBCProcessor(bcProc); + block1->getKernel()->setBCSet(bcProc); } } @@ -1723,7 +1723,7 @@ void MPIIOMigrationBECoProcessor::readBoundaryConds(int step) ////////////////////////////////////////////////////////////////////////// void MPIIOMigrationBECoProcessor::setLBMKernel(SPtr<LBMKernel> kernel) { this->lbmKernel = kernel; } ////////////////////////////////////////////////////////////////////////// -void MPIIOMigrationBECoProcessor::setBCProcessor(SPtr<BCProcessor> bcProcessor) { this->bcProcessor = bcProcessor; } +void MPIIOMigrationBECoProcessor::setBCSet(SPtr<BCSet> bcSet) { this->bcSet = bcSet; } ////////////////////////////////////////////////////////////////////////// void MPIIOMigrationBECoProcessor::setNu(real nu) { this->nue = nu; } diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.h b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.h index d29ecca36d194cd0498b3347b9e59eefced8a475..016c328457b7e4e201ff472386185b332a4e3cdd 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.h +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.h @@ -11,7 +11,7 @@ class Grid3D; class UbScheduler; namespace vf::mpi {class Communicator;} -class BCProcessor; +class BCSet; class LBMKernel; class Grid3DVisitor; @@ -69,8 +69,8 @@ public: void readBoundaryConds(int step); //! The function sets LBMKernel void setLBMKernel(SPtr<LBMKernel> kernel); - //! The function sets BCProcessor - void setBCProcessor(SPtr<BCProcessor> bcProcessor); + //! The function sets BCSet + void setBCSet(SPtr<BCSet> BCSet); //! The function truncates the data files void clearAllFiles(int step); void setNu(real nu); @@ -90,7 +90,7 @@ private: MPIIODataStructures::boundCondParam boundCondParamStr; SPtr<LBMKernel> lbmKernel; - SPtr<BCProcessor> bcProcessor; + SPtr<BCSet> bcSet; SPtr<Grid3DVisitor> metisVisitor; real nue; real nuL; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp index 4e3a84aa8a47051aee123181fc63741266dbacc0..bf1d89a78c7f347e7b9ecee7295d9d62d98a442e 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp @@ -1,6 +1,6 @@ #include "MPIIOMigrationCoProcessor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include <mpi/Communicator.h> @@ -756,7 +756,7 @@ void MPIIOMigrationCoProcessor::writeBoundaryConds(int step) { for (SPtr<Block3D> block : blocksVector[level]) // all the blocks of the current level { - bcArr = block->getKernel()->getBCProcessor()->getBCArray(); + bcArr = block->getKernel()->getBCSet()->getBCArray(); bcAddArray[ic].globalID = block->getGlobalID(); // id of the block needed to find it while regenerating the grid bcAddArray[ic].boundCond_count = 0; // how many BoundaryConditions in this block @@ -788,7 +788,7 @@ void MPIIOMigrationCoProcessor::writeBoundaryConds(int step) bouCond->nx3 = (real)bcArr->bcvector[bc]->nx3; for (int iq = 0; iq < 26; iq++) bouCond->q[iq] = (real)bcArr->bcvector[bc]->getQ(iq); - bouCond->algorithmType = bcArr->bcvector[bc]->getBcAlgorithmType(); + bouCond->algorithmType = bcArr->bcvector[bc]->getBCStrategyType(); } bcVector[ic].push_back(*bouCond); @@ -1481,7 +1481,7 @@ void MPIIOMigrationCoProcessor::readBoundaryConds(int step) bc->nx3 = bcArray[ibc].nx3; for (int iq = 0; iq < 26; iq++) bc->setQ(bcArray[ibc].q[iq], iq); - bc->setBcAlgorithmType(bcArray[ibc].algorithmType); + bc->setBCStrategyType(bcArray[ibc].algorithmType); } bcVector.push_back(bc); @@ -1496,14 +1496,14 @@ void MPIIOMigrationCoProcessor::readBoundaryConds(int step) CbArray3D<int, IndexerX3X2X1> bcim(bcindexmatrixV, boundCondParamStr.nx1, boundCondParamStr.nx2, boundCondParamStr.nx3); SPtr<Block3D> block1 = grid->getBlock(bcAddArray[ic].globalID); - SPtr<BCProcessor> bcProc = bcProcessor->clone(block1->getKernel()); + SPtr<BCSet> bcProc = bcSet->clone(block1->getKernel()); SPtr<BCArray3D> bcArr(new BCArray3D()); bcArr->bcindexmatrix = bcim; bcArr->bcvector = bcVector; bcArr->indexContainer = indexContainerV; bcProc->setBCArray(bcArr); - block1->getKernel()->setBCProcessor(bcProc); + block1->getKernel()->setBCSet(bcProc); delete bcArray; delete intArray1; @@ -1527,4 +1527,4 @@ void MPIIOMigrationCoProcessor::readBoundaryConds(int step) ////////////////////////////////////////////////////////////////////////// void MPIIOMigrationCoProcessor::setLBMKernel(SPtr<LBMKernel> kernel) { this->lbmKernel = kernel; } ////////////////////////////////////////////////////////////////////////// -void MPIIOMigrationCoProcessor::setBCProcessor(SPtr<BCProcessor> bcProcessor) { this->bcProcessor = bcProcessor; } +void MPIIOMigrationCoProcessor::setBCSet(SPtr<BCSet> bcSet) { this->bcSet = bcSet; } diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.h b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.h index 4b8c6231176923618b1a394f125ff32b0e450d54..cfb5a204c647ad01ce76634f5ee593d65008074b 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.h +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.h @@ -10,7 +10,7 @@ class Grid3D; class UbScheduler; namespace vf::mpi {class Communicator;} -class BCProcessor; +class BCSet; class LBMKernel; class Grid3DVisitor; @@ -67,8 +67,8 @@ public: void readBoundaryConds(int step); //! The function sets LBMKernel void setLBMKernel(SPtr<LBMKernel> kernel); - //! The function sets BCProcessor - void setBCProcessor(SPtr<BCProcessor> bcProcessor); + //! The function sets BCSet + void setBCSet(SPtr<BCSet> BCSet); //! The function truncates the data files void clearAllFiles(int step); // void setNu(real nu); @@ -80,7 +80,7 @@ private: MPIIODataStructures::boundCondParam boundCondParamStr; SPtr<LBMKernel> lbmKernel; - SPtr<BCProcessor> bcProcessor; + SPtr<BCSet> bcSet; SPtr<Grid3DVisitor> metisVisitor; }; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.cpp index f55d2e08a847e0892810ea12da8d97454c1416f7..296e2c60137831fd73082f086692315c8363466e 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.cpp @@ -1,6 +1,6 @@ #include "MPIIORestartCoProcessor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include <mpi/Communicator.h> @@ -826,7 +826,7 @@ void MPIIORestartCoProcessor::writeBoundaryConds(int step) { for (SPtr<Block3D> block : blocksVector[level]) // all the blocks of the current level { - bcArr = block->getKernel()->getBCProcessor()->getBCArray(); + bcArr = block->getKernel()->getBCSet()->getBCArray(); bcAddArray[ic].x1 = block->getX1(); // coordinates of the block needed to find it while regenerating the grid bcAddArray[ic].x2 = block->getX2(); @@ -859,7 +859,7 @@ void MPIIORestartCoProcessor::writeBoundaryConds(int step) bouCond->nx3 = (real)bcArr->bcvector[bc]->nx3; for (int iq = 0; iq < 26; iq++) bouCond->q[iq] = (real)bcArr->bcvector[bc]->getQ(iq); - bouCond->algorithmType = bcArr->bcvector[bc]->getBcAlgorithmType(); + bouCond->algorithmType = bcArr->bcvector[bc]->getBCStrategyType(); } bcVector.push_back(*bouCond); @@ -1546,7 +1546,7 @@ void MPIIORestartCoProcessor::readBoundaryConds(int step) bc->nx3 = bcArray[index].nx3; for (int iq = 0; iq < 26; iq++) bc->setQ(bcArray[index].q[iq], iq); - bc->setBcAlgorithmType(bcArray[index].algorithmType); + bc->setBCStrategyType(bcArray[index].algorithmType); } bcVector.push_back(bc); @@ -1562,14 +1562,14 @@ void MPIIORestartCoProcessor::readBoundaryConds(int step) CbArray3D<int, IndexerX3X2X1> bcim(bcindexmatrixV, boundCondParamStr.nx1, boundCondParamStr.nx2, boundCondParamStr.nx3); SPtr<Block3D> block = grid->getBlock(bcAddArray[n].x1, bcAddArray[n].x2, bcAddArray[n].x3, bcAddArray[n].level); - SPtr<BCProcessor> bcProc = bcProcessor->clone(block->getKernel()); + SPtr<BCSet> bcSet = bcSet->clone(block->getKernel()); SPtr<BCArray3D> bcArr(new BCArray3D()); bcArr->bcindexmatrix = bcim; bcArr->bcvector = bcVector; bcArr->indexContainer = indexContainerV; - bcProc->setBCArray(bcArr); + bcSet->setBCArray(bcArr); - block->getKernel()->setBCProcessor(bcProc); + block->getKernel()->setBCSet(bcSet); } delete nullBouCond; @@ -1586,4 +1586,4 @@ void MPIIORestartCoProcessor::readBoundaryConds(int step) ////////////////////////////////////////////////////////////////////////// void MPIIORestartCoProcessor::setLBMKernel(SPtr<LBMKernel> kernel) { this->lbmKernel = kernel; } ////////////////////////////////////////////////////////////////////////// -void MPIIORestartCoProcessor::setBCProcessor(SPtr<BCProcessor> bcProcessor) { this->bcProcessor = bcProcessor; } +void MPIIORestartCoProcessor::setBCSet(SPtr<BCSet> BCSet) { this->bcSet = BCSet; } diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.h b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.h index a4c1b32efbafbdb467eee7facede5f8d834e1a93..db98bca4fa0a65cc11b848d03da5c57ffcc9eb3a 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.h +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIORestartCoProcessor.h @@ -12,7 +12,7 @@ class Grid3D; class UbScheduler; namespace vf::mpi {class Communicator;} -class BCProcessor; +class BCSet; class LBMKernel; //! \class MPIIORestartCoProcessor @@ -74,8 +74,8 @@ public: void readBoundaryConds(int step); //! The function sets LBMKernel void setLBMKernel(SPtr<LBMKernel> kernel); - //! The function sets BCProcessor - void setBCProcessor(SPtr<BCProcessor> bcProcessor); + //! The function sets BCSet + void setBCSet(SPtr<BCSet> BCSet); //! The function truncates the data files void clearAllFiles(int step); @@ -86,7 +86,7 @@ private: MPIIODataStructures::boundCondParam boundCondParamStr; SPtr<LBMKernel> lbmKernel; - SPtr<BCProcessor> bcProcessor; + SPtr<BCSet> bcSet; //std::vector<double> doubleValuesArrayRW; }; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MicrophoneArrayCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/MicrophoneArrayCoProcessor.cpp index f1762b5fdcfa8a2d4b20ee95665a2a3329e85196..45e9643fc1ac34ebcda666e0776bed6f2060f92a 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MicrophoneArrayCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MicrophoneArrayCoProcessor.cpp @@ -1,6 +1,6 @@ #include "MicrophoneArrayCoProcessor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include <mpi/Communicator.h> #include "D3Q27System.h" @@ -48,7 +48,7 @@ bool MicrophoneArrayCoProcessor::addMicrophone(Vector3D coords) if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); if (kernel) { - SPtr<BCArray3D> bcarray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcarray = kernel->getBCSet()->getBCArray(); UbTupleInt3 nodes = grid->getNodeIndexes(block, coords[0], coords[1], coords[2]); if (!bcarray->isUndefined(val<1>(nodes), val<2>(nodes), val<3>(nodes))) { diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/PressureCoefficientCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/PressureCoefficientCoProcessor.cpp index 4197c5cfe7e9d8f0f9da618ff58f4b421ae3d4fa..2e295e09625e066a76968abb01507fc1996b35f2 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/PressureCoefficientCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/PressureCoefficientCoProcessor.cpp @@ -2,7 +2,7 @@ #include <WbWriterVtkXmlASCII.h> #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include <mpi/Communicator.h> #include "D3Q27Interactor.h" @@ -54,7 +54,7 @@ void PressureCoefficientCoProcessor::calculateRho() std::set<std::vector<int>> &bcNodeIndicesSet = t.second; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); UbTupleDouble3 org = grid->getBlockWorldCoordinates(block); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp index 4e62a1c6bbb4c9f9a74968170c5821cc0f46fd23..d500f1dc6c8fdfe92f601420139b9577bb3b3192 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/QCriterionCoProcessor.cpp @@ -1,5 +1,5 @@ #include "QCriterionCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" #include "Grid3D.h" @@ -101,7 +101,7 @@ void QCriterionCoProcessor::addData(const SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); int minX1 = 0; @@ -204,7 +204,7 @@ void QCriterionCoProcessor::getNeighborVelocities(int offx, int offy, int offz, const SPtr<Block3D> block, real *vE, real *vW) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); bool compressible = block->getKernel()->getCompressible(); @@ -280,7 +280,7 @@ void QCriterionCoProcessor::getNeighborVelocities(int offx, int offy, int offz, if (!checkInterpolation || neighNodeIsBC) { SPtr<ILBMKernel> kernelW = blockNeighW->getKernel(); - SPtr<BCArray3D> bcArrayW = kernelW->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArrayW = kernelW->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributionsW = kernelW->getDataSet()->getFdistributions(); real fW2[27]; real fW[27]; @@ -312,7 +312,7 @@ void QCriterionCoProcessor::getNeighborVelocities(int offx, int offy, int offz, // throw UbException(UB_EXARGS,"Parallel or Non-Uniform Simulation -- not yet implemented"); } else { SPtr<ILBMKernel> kernelW = blockNeighW->getKernel(); - SPtr<BCArray3D> bcArrayW = kernelW->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArrayW = kernelW->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributionsW = kernelW->getDataSet()->getFdistributions(); real fW[27]; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp index cd1f9c54cb50585b572a61cdc7d8c884386b864c..2d886649460a0ede2382f0bc29ce11f812bbe817 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp @@ -1,5 +1,5 @@ #include "ShearStressCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "WbWriterVtkXmlASCII.h" #include "BCArray3D.h" @@ -137,7 +137,7 @@ void ShearStressCoProcessor::calculateShearStress(real timeStep) std::set<std::vector<int>> &transNodeIndicesSet = t.second; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<ShearStressValuesArray3D> ssv = kernel->getDataSet()->getShearStressValues(); @@ -253,7 +253,7 @@ void ShearStressCoProcessor::addData() real dx = grid->getDeltaX(block); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<ShearStressValuesArray3D> ssv = kernel->getDataSet()->getShearStressValues(); @@ -364,7 +364,7 @@ void ShearStressCoProcessor::resetData(real /*step*/) // double dx = grid->getDeltaX(block); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<ShearStressValuesArray3D> ssv = kernel->getDataSet()->getShearStressValues(); @@ -417,7 +417,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g real dx = grid->getDeltaX(block); SPtr<ILBMKernel> kernel = block->getKernel(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); bcPtr = bcArray->getBC(ix1, ix2, ix3); int x, y, z; @@ -852,7 +852,7 @@ void ShearStressCoProcessor::initDistance() // double dx = grid->getDeltaX(block); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<ShearStressValuesArray3D> ssv = kernel->getDataSet()->getShearStressValues(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp index 8fa95c121ee61f419d778a636cacbb129ecdfe9e..b3e021284e2fe3d363d7886c06e5cd7dd21774d3 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp @@ -1,6 +1,6 @@ #include "TimeAveragedValuesCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include "Block3D.h" @@ -244,7 +244,7 @@ void TimeAveragedValuesCoProcessor::addData(const SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> ar = kernel->getDataSet()->getAverageDensity(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageVelocity(); @@ -365,7 +365,7 @@ void TimeAveragedValuesCoProcessor::calculateAverageValues(real timeSteps) SPtr<Block3D> block = blockVector[level][i]; if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> ar = kernel->getDataSet()->getAverageDensity(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageVelocity(); @@ -487,7 +487,7 @@ void TimeAveragedValuesCoProcessor::calculateSubtotal(real step) SPtr<Block3D> block = blockVector[level][i]; if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> ar = kernel->getDataSet()->getAverageDensity(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageVelocity(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/TimeDependentBCCoProcessor.h b/src/cpu/VirtualFluidsCore/CoProcessors/TimeDependentBCCoProcessor.h index cb41ca9622759f99d701d1d97865d9754d9bf5e6..e8f7d3e0fa8c39d049365ea888bb0b6a290cfcac 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/TimeDependentBCCoProcessor.h +++ b/src/cpu/VirtualFluidsCore/CoProcessors/TimeDependentBCCoProcessor.h @@ -10,7 +10,7 @@ class Interactor3D; class Grid3D; //! \brief The class update interactors depend of time step. -//! \details TimeDependentBCCoProcessor update every time step information in BCAdapters throw Interactors +//! \details TimeDependentBCCoProcessor update every time step information in BCs throw Interactors //! \author Sonja Uphoff, Kostyantyn Kucher class TimeDependentBCCoProcessor : public CoProcessor { diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp index 4714349a9c25ec2b5d427e3b64ad00be738915f6..7293ded40ebd9a6653efc00fa0d926bc250a5c8a 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp @@ -1,7 +1,7 @@ #include "TurbulenceIntensityCoProcessor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include <mpi/Communicator.h> #include "DataSet3D.h" @@ -109,7 +109,7 @@ void TurbulenceIntensityCoProcessor::addData(const SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageValues(); // int ghostLayerWidth = kernel->getGhostLayerWidth(); @@ -193,7 +193,7 @@ void TurbulenceIntensityCoProcessor::calculateAverageValues(real timeStep) for (SPtr<Block3D> block : blockVector[level]) { if (block) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<AverageValuesArray3D> av = kernel->getDataSet()->getAverageValues(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteBoundaryConditionsCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteBoundaryConditionsCoProcessor.cpp index 4ed68397a7813314450ddd7dea33ca1824f54ac9..365b819aa7d870d172bede2b393372c210fffe30 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteBoundaryConditionsCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteBoundaryConditionsCoProcessor.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "WriteBoundaryConditionsCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include <string> #include <vector> @@ -147,7 +147,7 @@ void WriteBoundaryConditionsCoProcessor::addDataGeo(SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); int minX1 = 0; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMQFromSelectionCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMQFromSelectionCoProcessor.cpp index 2b49861af9fd53cdec491527f40f96b4f8bc0484..2952328f6f1318a84525add255680e303dcf4c4e 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMQFromSelectionCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMQFromSelectionCoProcessor.cpp @@ -1,5 +1,5 @@ #include "WriteMQFromSelectionCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include <string> #include <vector> @@ -126,7 +126,7 @@ void WriteMQFromSelectionCoProcessor::addDataMQ(SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real f[D3Q27System::ENDF + 1]; real vx1, vx2, vx3, rho; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesCoProcessor.cpp index 58ed15604f8937b0b33fca96dab69250a404242c..838c1f143c19e77f3aea71967dd6899ca3d64b62 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesCoProcessor.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "WriteMacroscopicQuantitiesCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include <string> #include <vector> @@ -160,7 +160,7 @@ void WriteMacroscopicQuantitiesCoProcessor::addDataMQ(SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real f[D3Q27System::ENDF + 1]; real vx1, vx2, vx3, rho; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesPlusMassCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesPlusMassCoProcessor.cpp index 5c4f80887349280856a2de3791d9d0fb9012f53b..35421654ff460dd2f911683f47db1511f97317f8 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesPlusMassCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMacroscopicQuantitiesPlusMassCoProcessor.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "WriteMacroscopicQuantitiesPlusMassCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include <string> #include <vector> @@ -160,7 +160,7 @@ void WriteMacroscopicQuantitiesPlusMassCoProcessor::addDataMQ(SPtr<Block3D> bloc data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real f[D3Q27System::ENDF + 1]; real vx1, vx2, vx3, rho; diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp index ffc32b9535e477bf2f8de080f8bf45545cb336dd..e092f4cfd4d059831dc5768b0fe5bf6a8c69de9f 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "WriteMultiphaseQuantitiesCoProcessor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "LBMKernel.h" #include <string> #include <vector> @@ -167,7 +167,7 @@ void WriteMultiphaseQuantitiesCoProcessor::addDataMQ(SPtr<Block3D> block) data.resize(datanames.size()); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributionsF = kernel->getDataSet()->getFdistributions(); SPtr<DistributionArray3D> distributionsH = kernel->getDataSet()->getHdistributions(); SPtr<DistributionArray3D> distributionsH2 = kernel->getDataSet()->getH2distributions(); diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteThixotropyQuantitiesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteThixotropyQuantitiesCoProcessor.cpp index 9a4af594717da6739af8b8c16abccd6cf63c3b76..ac17a4ef790987bae846f1940766ef8bffc7a739 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteThixotropyQuantitiesCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteThixotropyQuantitiesCoProcessor.cpp @@ -32,7 +32,7 @@ //======================================================================================= #include "WriteThixotropyQuantitiesCoProcessor.h" #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "UbScheduler.h" #include "DataSet3D.h" #include "D3Q27System.h" @@ -178,7 +178,7 @@ void WriteThixotropyQuantitiesCoProcessor::addDataMQ(SPtr<Block3D> block) data.resize(datanames.size()); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributionsF = kernel->getDataSet()->getFdistributions(); //SPtr<DistributionArray3D> distributionsH = kernel->getDataSet()->getHdistributions(); //LBMReal collFactorF = staticPointerCast<ThixotropyExpLBMKernel>(kernel)->getCollisionFactorF(); diff --git a/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h b/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h index c2ba596a7bdb20c24fa373064e09854c4f6d95eb..d7f9f72c4f86f5d849fa4f2c0cd703333007091a 100644 --- a/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h +++ b/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h @@ -48,7 +48,7 @@ #include "basics/transmitter/TbTransmitterLocal.h" #include <PointerDefinitions.h> -#include "BCProcessor.h" +#include "BCSet.h" #include "FineToCoarseVectorConnector.h" class Block3D; @@ -833,7 +833,7 @@ void CoarseToFineVectorConnector<VectorTransmitter>::fillSendVectorExt(SPtr<Dist return; int ix1, ix2, ix3; real xoff, yoff, zoff; - SPtr<BCArray3D> bcArray = block.lock()->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = block.lock()->getKernel()->getBCSet()->getBCArray(); for (ix3 = lMinX3; ix3 < lMaxX3; ix3++) { for (ix2 = lMinX2; ix2 < lMaxX2; ix2++) { @@ -1979,7 +1979,7 @@ void CoarseToFineVectorConnector<VectorTransmitter>::findCFnodes(SPtr<Distributi return; int ix1, ix2, ix3; real xoff, yoff, zoff; - SPtr<BCArray3D> bcArray = block.lock()->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = block.lock()->getKernel()->getBCSet()->getBCArray(); for (ix3 = lMinX3; ix3 < lMaxX3; ix3++) { for (ix2 = lMinX2; ix2 < lMaxX2; ix2++) { diff --git a/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h b/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h index f4f4080215869cdd4ae1c75e750daa2419af9240..ffab5008241e7f8f4457c7385c83872a296ee748 100644 --- a/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h +++ b/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h @@ -46,7 +46,7 @@ #include "basics/transmitter/TbTransmitter.h" #include <PointerDefinitions.h> -#include "BCProcessor.h" +#include "BCSet.h" #include "DataSet3D.h" class Block3D; @@ -795,7 +795,7 @@ void FineToCoarseVectorConnector<VectorTransmitter>::fillSendVector(SPtr<Distrib { int ix1, ix2, ix3; real xoff, yoff, zoff; - SPtr<BCArray3D> bcArray = block.lock()->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = block.lock()->getKernel()->getBCSet()->getBCArray(); for (ix3 = lMinX3; ix3 < lMaxX3; ix3 += 2) { for (ix2 = lMinX2; ix2 < lMaxX2; ix2 += 2) { diff --git a/src/cpu/VirtualFluidsCore/Grid/BasicCalculator.cpp b/src/cpu/VirtualFluidsCore/Grid/BasicCalculator.cpp index 92559f5f37d0b39a086b6bab0e63157b79c9f718..b4874366c947938423d5683f72dff19b0e1cc182 100644 --- a/src/cpu/VirtualFluidsCore/Grid/BasicCalculator.cpp +++ b/src/cpu/VirtualFluidsCore/Grid/BasicCalculator.cpp @@ -33,7 +33,7 @@ #include "BasicCalculator.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "Block3DConnector.h" #include "LBMKernel.h" @@ -332,7 +332,7 @@ void BasicCalculator::applyPreCollisionBC(int startLevel, int maxInitLevel) #endif for (int i = 0; i < size; i++) { try { - blocks[level][i]->getKernel()->getBCProcessor()->applyPreCollisionBC(); + blocks[level][i]->getKernel()->getBCSet()->applyPreCollisionBC(); } catch (std::exception &e) { UBLOG(logERROR, e.what()); exit(EXIT_FAILURE); @@ -357,7 +357,7 @@ void BasicCalculator::applyPostCollisionBC(int startLevel, int maxInitLevel) #endif for (int i = 0; i < size; i++) { try { - blocks[level][i]->getKernel()->getBCProcessor()->applyPostCollisionBC(); + blocks[level][i]->getKernel()->getBCSet()->applyPostCollisionBC(); } catch (std::exception &e) { UBLOG(logERROR, e.what()); exit(EXIT_FAILURE); diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp b/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp index 06d0daffd5814f7956125c58c40e7122bf4878f0..d90d8ec696140a9325be1c2662f03e604a420fa2 100644 --- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp +++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp @@ -39,9 +39,9 @@ #include <basics/writer/WbWriterVtkXmlBinary.h> -#include "BCAdapter.h" +#include "BC.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include "Grid3D.h" @@ -66,20 +66,20 @@ D3Q27Interactor::D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid this->initRayVectors(); } ////////////////////////////////////////////////////////////////////////// -D3Q27Interactor::D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, int type) +D3Q27Interactor::D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BC> BC, int type) : Interactor3D(geoObject3D, grid, type), relevantForForces(false) { this->reinitWithStoredQsFlag = false; - this->addBCAdapter(bcAdapter); + this->addBC(BC); this->initRayVectors(); } ////////////////////////////////////////////////////////////////////////// -D3Q27Interactor::D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, int type, +D3Q27Interactor::D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BC> BC, int type, Interactor3D::Accuracy a) : Interactor3D(geoObject3D, grid, type, a), relevantForForces(false) { this->reinitWithStoredQsFlag = false; - this->addBCAdapter(bcAdapter); + this->addBC(BC); this->initRayVectors(); } ////////////////////////////////////////////////////////////////////////// @@ -206,14 +206,14 @@ void D3Q27Interactor::initInteractor(const real &timeStep) ////////////////////////////////////////////////////////////////////////// // init bcs - int nofAdapter = (int)bcAdapters.size(); + int nofAdapter = (int)BCs.size(); if (nofAdapter == 0) { UBLOG(logWARNING, "WARNING - D3Q27Interactor::initInteractor Warning - no nodeAdapter available"); } bool needTimeDependence = false; for (int pos = 0; pos < nofAdapter; ++pos) { - bcAdapters[pos]->init(this, timeStep); - if (bcAdapters[pos]->isTimeDependent()) + BCs[pos]->init(this, timeStep); + if (BCs[pos]->isTimeDependent()) needTimeDependence = true; } if (needTimeDependence) @@ -230,7 +230,7 @@ void D3Q27Interactor::updateInteractor(const real ×tep) ////////////////////////////////////////////////////////////////////////// // update bcs - int nofAdapter = (int)bcAdapters.size(); + int nofAdapter = (int)BCs.size(); if (nofAdapter == 0) { UBLOG(logERROR, "WARNING - D3Q27Interactor::updateInteractor Warning - no nodeAdapter available for "); } @@ -238,8 +238,8 @@ void D3Q27Interactor::updateInteractor(const real ×tep) bool needTimeDependence = false; for (int pos = 0; pos < nofAdapter; ++pos) { - bcAdapters[pos]->update(this, timestep); - if (bcAdapters[pos]->isTimeDependent()) + BCs[pos]->update(this, timestep); + if (BCs[pos]->isTimeDependent()) needTimeDependence = true; } if (needTimeDependence) @@ -255,7 +255,7 @@ void D3Q27Interactor::updateInteractor(const real ×tep) continue; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); set<std::vector<int>>::iterator setPos; @@ -271,8 +271,8 @@ void D3Q27Interactor::updateInteractor(const real ×tep) SPtr<BoundaryConditions> bc = bcArray->getBC(x1, x2, x3); if (bc) // may be that the BC has been deleted by the solid setting of another interactor { - for (size_t i = 0; i < bcAdapters.size(); i++) - bcAdapters[i]->adaptBC(*this, bc, worldX1, worldX2, worldX3, timestep); + for (size_t i = 0; i < BCs.size(); i++) + BCs[i]->adaptBC(*this, bc, worldX1, worldX2, worldX3, timestep); } } } @@ -303,7 +303,7 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block) SPtr<BoundaryConditions> bc; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); real internX1, internX2, internX3; @@ -415,8 +415,8 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block) bc->setBoundaryVelocityX3(0.0); } - for (int index = (int)bcAdapters.size() - 1; index >= 0; --index) - bcAdapters[index]->adaptBCForDirection(*this, bc, internX1, internX2, internX3, + for (int index = (int)BCs.size() - 1; index >= 0; --index) + BCs[index]->adaptBCForDirection(*this, bc, internX1, internX2, internX3, q, fdir, timestep); } @@ -434,8 +434,8 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block) p[2] = ix3; transNodeIndices.insert(p); - for (int index = (int)bcAdapters.size() - 1; index >= 0; --index) - bcAdapters[index]->adaptBC(*this, bc, internX1, internX2, internX3, timestep); + for (int index = (int)BCs.size() - 1; index >= 0; --index) + BCs[index]->adaptBC(*this, bc, internX1, internX2, internX3, timestep); } } } else if (this->isInverseSolid()) { @@ -534,8 +534,8 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block) bc = std::make_shared<BoundaryConditions>(); bcArray->setBC(ix1, ix2, ix3, bc); } - for (int index = (int)bcAdapters.size() - 1; index >= 0; --index) - bcAdapters[index]->adaptBCForDirection(*this, bc, internX1, internX2, + for (int index = (int)BCs.size() - 1; index >= 0; --index) + BCs[index]->adaptBCForDirection(*this, bc, internX1, internX2, internX3, q, fdir, timestep); } @@ -558,8 +558,8 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block) p[2] = ix3; transNodeIndices.insert(p); - for (int index = (int)bcAdapters.size() - 1; index >= 0; --index) - bcAdapters[index]->adaptBC(*this, bc, internX1, internX2, internX3, timestep); + for (int index = (int)BCs.size() - 1; index >= 0; --index) + BCs[index]->adaptBC(*this, bc, internX1, internX2, internX3, timestep); } } } @@ -583,7 +583,7 @@ void D3Q27Interactor::addQsLineSet(std::vector<UbTupleFloat3> &nodes, std::vecto UbTupleDouble3 orgDelta = grid.lock()->getNodeOffset(block); SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); map<SPtr<Block3D>, set<std::vector<int>>>::iterator pos = bcNodeIndicesMap.find(block); if (pos == bcNodeIndicesMap.end()) { @@ -779,7 +779,7 @@ vector<pair<GbPoint3D, GbPoint3D>> D3Q27Interactor::getQsLineSet() for (SPtr<Block3D> block : bcBlocks) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); UbTupleDouble3 nodeOffset = grid.lock()->getNodeOffset(block); // Check whether top row is real in the system or not diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.h b/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.h index 80a58efccb36588111ddf5301f3fb68068e20958..e0094d646a4dd621e7d5815fc7fc6ce6e4450dbe 100644 --- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.h +++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.h @@ -48,7 +48,7 @@ #include "UbException.h" #include "UbTuple.h" -class BCAdapter; +class BC; class Block3D; class Grid3D; class GbObject3D; @@ -63,8 +63,8 @@ class D3Q27Interactor : public Interactor3D public: D3Q27Interactor(); D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, int type); - D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, int type); - D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, int type, + D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BC> BC, int type); + D3Q27Interactor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, SPtr<BC> BC, int type, Interactor3D::Accuracy a); ~D3Q27Interactor() override; @@ -72,8 +72,8 @@ public: void setRelevantForForces(const bool &value) { this->relevantForForces = value; } bool isRelevantForForces() { return this->relevantForForces; } - virtual void addBCAdapter(const SPtr<BCAdapter> bcAdapter) { bcAdapters.push_back(bcAdapter); } - void deleteBCAdapter() { bcAdapters.clear(); } + virtual void addBC(const SPtr<BC> BC) { BCs.push_back(BC); } + void deleteBC() { BCs.clear(); } void initInteractor(const real &timeStep = 0) override; void updateInteractor(const real ×tep = 0) override; @@ -106,7 +106,7 @@ protected: bool relevantForForces; bool reinitWithStoredQsFlag; - std::vector<SPtr<BCAdapter>> bcAdapters; + std::vector<SPtr<BC>> BCs; SolidNodeIndicesMap solidNodeIndicesMap; BcNodeIndicesMap bcNodeIndicesMap; diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp index d569d3c0f16b24ea7592c09b26a06b8be69e126c..237097ed5fd48f29b0b2e236cc497bd42110e681 100644 --- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp +++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp @@ -8,12 +8,12 @@ #include <basics/writer/WbWriterVtkXmlBinary.h> #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include "Grid3D.h" #include "LBMKernel.h" -#include "VelocityBCAdapter.h" +#include "VelocityBC.h" #include "basics/utilities/UbTiming.h" #include <geometry3d/GbCuboid3D.h> #include <geometry3d/GbHalfSpace3D.h> @@ -37,15 +37,15 @@ D3Q27TriFaceMeshInteractor::D3Q27TriFaceMeshInteractor(SPtr<Grid3D> /*grid*/, st } ////////////////////////////////////////////////////////////////////////// D3Q27TriFaceMeshInteractor::D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, - SPtr<BCAdapter> bcAdapter, int type) - : D3Q27Interactor(triFaceMesh, grid, bcAdapter, type) + SPtr<BC> BC, int type) + : D3Q27Interactor(triFaceMesh, grid, BC, type) { this->stressMode = STRESSNORMAL; } ////////////////////////////////////////////////////////////////////////// D3Q27TriFaceMeshInteractor::D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, - SPtr<BCAdapter> bcAdapter, int type, Interactor3D::Accuracy a) - : D3Q27Interactor(triFaceMesh, grid, bcAdapter, type, a) + SPtr<BC> BC, int type, Interactor3D::Accuracy a) + : D3Q27Interactor(triFaceMesh, grid, BC, type, a) { this->stressMode = STRESSNORMAL; } @@ -75,7 +75,7 @@ bool D3Q27TriFaceMeshInteractor::setDifferencesToGbObject3D(const SPtr<Block3D> SPtr<BoundaryConditions> bc; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); real internX1, internX2, internX3; @@ -138,15 +138,15 @@ void D3Q27TriFaceMeshInteractor::setQs(const real &timeStep) ////////////////////////////////////////////////////////////////////////// // init bcs ////////////////////////////////////////////////////////////////////////// - int nofAdapter = (int)this->bcAdapters.size(); + int nofAdapter = (int)this->BCs.size(); if (nofAdapter == 0) std::cout << "WARNING - D3Q27TriFaceMeshInteractor::initInteractor Warning - no nodeAdapter available for " /*<<this->getName()*/ << std::endl; bool needTimeDependence = false; for (int pos = 0; pos < nofAdapter; ++pos) { - this->bcAdapters[pos]->init(this, timeStep); - if (this->bcAdapters[pos]->isTimeDependent()) + this->BCs[pos]->init(this, timeStep); + if (this->BCs[pos]->isTimeDependent()) needTimeDependence = true; } if (needTimeDependence) @@ -351,7 +351,7 @@ void D3Q27TriFaceMeshInteractor::setQs(const real &timeStep) bool blockGotBCs = false; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); int indexMinX1 = 0; int indexMinX2 = 0; @@ -539,8 +539,8 @@ void D3Q27TriFaceMeshInteractor::setQs(const real &timeStep) bc->setBoundaryVelocityX2(vx2); bc->setBoundaryVelocityX3(vx3); - for (int index = (int)this->bcAdapters.size() - 1; index >= 0; --index) - this->bcAdapters[index]->adaptBCForDirection(*this, bc, internX1, internX2, + for (int index = (int)this->BCs.size() - 1; index >= 0; --index) + this->BCs[index]->adaptBCForDirection(*this, bc, internX1, internX2, internX3, q, fdir); // fuer beschleunigtes wiedereinlesen @@ -565,8 +565,8 @@ void D3Q27TriFaceMeshInteractor::setQs(const real &timeStep) p[2] = ix3; bcNodeIndices.insert(p); - for (int index = (int)this->bcAdapters.size() - 1; index >= 0; --index) - this->bcAdapters[index]->adaptBC(*this, bc, internX1, internX2, internX3); + for (int index = (int)this->BCs.size() - 1; index >= 0; --index) + this->BCs[index]->adaptBC(*this, bc, internX1, internX2, internX3); } } } @@ -617,15 +617,15 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const real &timeStep) ////////////////////////////////////////////////////////////////////////// // init bcs ////////////////////////////////////////////////////////////////////////// - int nofAdapter = (int)this->bcAdapters.size(); + int nofAdapter = (int)this->BCs.size(); if (nofAdapter == 0) std::cout << "WARNING - D3Q27TriFaceMeshInteractor::initInteractor Warning - no nodeAdapter available for " /*<<this->getName()*/ << std::endl; bool needTimeDependence = false; for (int pos = 0; pos < nofAdapter; ++pos) { - this->bcAdapters[pos]->init(this, timeStep); - if (this->bcAdapters[pos]->isTimeDependent()) + this->BCs[pos]->init(this, timeStep); + if (this->BCs[pos]->isTimeDependent()) needTimeDependence = true; } if (needTimeDependence) @@ -870,7 +870,7 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const real &timeStep) bool blockGotBCs = false; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); int indexMinX1 = 0; int indexMinX2 = 0; @@ -1066,8 +1066,8 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const real &timeStep) bc->setBoundaryVelocityX2(vx2); bc->setBoundaryVelocityX3(vx3); - for (int index = (int)this->bcAdapters.size() - 1; index >= 0; --index) - this->bcAdapters[index]->adaptBCForDirection(*this, bc, internX1, internX2, + for (int index = (int)this->BCs.size() - 1; index >= 0; --index) + this->BCs[index]->adaptBCForDirection(*this, bc, internX1, internX2, internX3, q, fdir); // SG 26.08.2010 gotQs=blockGotBCs=true; @@ -1094,8 +1094,8 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const real &timeStep) p[2] = ix3; bcNodeIndices.insert(p); - for (int index = (int)this->bcAdapters.size() - 1; index >= 0; --index) - this->bcAdapters[index]->adaptBC(*this, bc, internX1, internX2, internX3); + for (int index = (int)this->BCs.size() - 1; index >= 0; --index) + this->BCs[index]->adaptBC(*this, bc, internX1, internX2, internX3); } } } @@ -1168,7 +1168,7 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const real &timeStep) SPtr<ILBMKernel> kernel = block->getKernel(); if (!kernel) throw UbException(UB_EXARGS, "na sowas kein kernel bzw. kernel=NULL (2)"); - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); // bvd->getTimer().start(); // int indexMinX1 = 0; @@ -1847,7 +1847,7 @@ void D3Q27TriFaceMeshInteractor::reinitWithStoredQs(const real & /*timeStep*/) SPtr<Block3D> block = it1->first; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); std::set<UbTupleInt3> &indicesSet = it1->second; for (std::set<UbTupleInt3>::iterator setIt = indicesSet.begin(); setIt != indicesSet.end(); ++setIt) { @@ -1860,7 +1860,7 @@ void D3Q27TriFaceMeshInteractor::reinitWithStoredQs(const real & /*timeStep*/) for (it = bcNodeIndicesAndQsMap.begin(); it != bcNodeIndicesAndQsMap.end(); ++it) { SPtr<Block3D> block = it->first; SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); std::map<UbTupleInt3, std::vector<float>>::iterator it2; for (it2 = it->second.begin(); it2 != it->second.end(); ++it2) { @@ -1894,14 +1894,14 @@ void D3Q27TriFaceMeshInteractor::reinitWithStoredQs(const real & /*timeStep*/) for (int fdir = D3Q27System::FSTARTDIR; fdir <= D3Q27System::FENDDIR; fdir++) { if (UbMath::greater(qs[fdir], -1.0) && UbMath::less(qs[fdir], bc->getQ(fdir))) { gotQs = true; - for (size_t index = 0; index < this->bcAdapters.size(); index++) - this->bcAdapters[index]->adaptBCForDirection(*this, bc, x1w, x2w, x3w, qs[fdir], fdir); + for (size_t index = 0; index < this->BCs.size(); index++) + this->BCs[index]->adaptBCForDirection(*this, bc, x1w, x2w, x3w, qs[fdir], fdir); } } if (gotQs) - for (size_t index = 0; index < this->bcAdapters.size(); index++) - this->bcAdapters[index]->adaptBC(*this, bc, x1w, x2w, x3w); + for (size_t index = 0; index < this->BCs.size(); index++) + this->BCs[index]->adaptBC(*this, bc, x1w, x2w, x3w); } } } diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.h b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.h index 9e42de660502b33048abf31f5e831902134d3826..ddcac4ad22a50f31f1c1f884bc234b9bd49c6080 100644 --- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.h +++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.h @@ -11,7 +11,7 @@ class GbObject3D; class Grid3D; -class BCAdapter; +class BC; class GbTriFaceMesh3D; class Block3D; @@ -24,11 +24,11 @@ public: D3Q27TriFaceMeshInteractor(); D3Q27TriFaceMeshInteractor(SPtr<Grid3D> grid, std::string name = "D3Q27TriFaceMeshInteractor"); D3Q27TriFaceMeshInteractor(SPtr<GbObject3D> geoObject3D, SPtr<Grid3D> grid, int type); - D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, + D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, SPtr<BC> BC, int type); - D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, SPtr<BCAdapter> bcAdapter, + D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, SPtr<Grid3D> grid, SPtr<BC> BC, int type, Interactor3D::Accuracy a); - // D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, D3Q27BoundaryConditionAdapterPtr bcAdapter, int + // D3Q27TriFaceMeshInteractor(SPtr<GbTriFaceMesh3D> triFaceMesh, D3Q27BoundaryConditionAdapterPtr BC, int // type, std::string name="D3Q27TriFaceMeshInteractor"); ~D3Q27TriFaceMeshInteractor() override; diff --git a/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp index d1fc28f0bd5cf86b6e1fb6c96e43b1972ce3de48..8b1b78b73f8ad2ec43bd63dedcde6dbfb6c1c107 100644 --- a/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp @@ -1,6 +1,6 @@ #include "BGKLBMKernel.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27EsoTwist3DSoA.h" #include "D3Q27EsoTwist3DSplittedVector.h" #include "D3Q27System.h" @@ -27,7 +27,7 @@ SPtr<LBMKernel> BGKLBMKernel::clone() kernel->setNX(nx); std::dynamic_pointer_cast<BGKLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -69,7 +69,7 @@ void BGKLBMKernel::calculate(int step) zeroDistributions = std::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); real f[D3Q27System::ENDF + 1]; real feq[D3Q27System::ENDF + 1]; real drho, vx1, vx2, vx3; diff --git a/src/cpu/VirtualFluidsCore/LBM/BasicLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/BasicLBMKernel.cpp index 12c4b6e891214a683e3e4ac23b52e14e72e093a2..97659e93ebe0970a7ffb0a01dd8c9d1b0d45721e 100644 --- a/src/cpu/VirtualFluidsCore/LBM/BasicLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/BasicLBMKernel.cpp @@ -1,7 +1,7 @@ #include "BasicLBMKernel.h" #include "D3Q27System.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" BasicLBMKernel::BasicLBMKernel() { @@ -28,7 +28,7 @@ void BasicLBMKernel::calculate(int step) initData(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp index a981dc5ce43ead2242e8c649f00cd216a33fb8cb..6ff48d9d1e3f2bc36c0709a8051e8ad5905faccf 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.cpp @@ -35,7 +35,7 @@ SPtr<LBMKernel> CompressibleCumulant4thOrderViscosityLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<CompressibleCumulant4thOrderViscosityLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -93,7 +93,7 @@ void CompressibleCumulant4thOrderViscosityLBMKernel::calculate(int step) nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.h index fc3e0dffb6abf836995aaecc95f07fc4fcaf1d64..3b7ee8f849187b2c40fc8f5803bdd04ad4982344 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulant4thOrderViscosityLBMKernel.h @@ -2,7 +2,7 @@ #define CompressibleCumulant4thOrderViscosityLBMKernel_h__ #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp index 4c914a70e78426972a81c40f07a9b6e04d426aae..a68c625380e75af1d0f927cccad2bdf9b9f72f57 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp @@ -35,7 +35,7 @@ SPtr<LBMKernel> CompressibleCumulantLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<CompressibleCumulantLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -101,7 +101,7 @@ void CompressibleCumulantLBMKernel::calculate(int step) nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h index 7af69201cde7bd8812173f1b6bd9d397e731686b..84910ef267efcba7f4cb90cba8a7514642461420 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h @@ -2,7 +2,7 @@ #define CompressibleCumulantLBMKernel_h__ #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.cpp index 65dd9e5251ffc2e97e8d4745690cca4e0d5ddf66..5ffc4ca1397100854e7c0c4b6902f87be3765618 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.cpp @@ -63,7 +63,7 @@ SPtr<LBMKernel> CumulantK17LBMKernel::clone() kernel->setNX(nx); std::dynamic_pointer_cast<CumulantK17LBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -116,7 +116,7 @@ void CumulantK17LBMKernel::calculate(int step) nonLocalDistributions = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); restDistributions = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.h index 345f12fd81f708f13371bffc77a4690dae37d085..39dd0a2c75d39d27bda587f8810cb76691fea99d 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernel.h @@ -35,7 +35,7 @@ #define CumulantK17LBMKernel_h__ #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp index db6a718e92a41a06631a85e426fd841b05bbc3be..1b8bdd340ff20facf0d91cbb3ff424357508446f 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.cpp @@ -67,7 +67,7 @@ SPtr<LBMKernel> CumulantK17LBMKernelUnified::clone() kernel->setNX(nx); std::dynamic_pointer_cast<CumulantK17LBMKernelUnified>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -120,7 +120,7 @@ void CumulantK17LBMKernelUnified::calculate(int step) nonLocalDistributions = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); restDistributions = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.h b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.h index d13e82efce5f5bc9211476ea86d989fe8663ab8c..9c6876f4d4de855f931ea90e8764cb1e9a39202a 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.h +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantK17LBMKernelUnified.h @@ -35,7 +35,7 @@ #define CumulantK17LBMKernelUnified_h__ #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.cpp index 7c80c3dea8c992a190ff9f03cacda89640d1bb7f..b30884d386279bf2d8243fe68338c7a45cac8073 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.cpp @@ -33,7 +33,7 @@ SPtr<LBMKernel> CumulantLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<CumulantLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -99,7 +99,7 @@ SPtr<LBMKernel> CumulantLBMKernel::clone() // nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); // zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); // -// SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); +// SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); // // const int bcArrayMaxX1 = (int)bcArray->getNX1(); // const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.h index 9fb6d834fc8904af84e20798b03ea23b68ad63a4..3ba644ccccd6d2fef780f8175b8140e9053d77e6 100644 --- a/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/CumulantLBMKernel.h @@ -2,7 +2,7 @@ #define CumulantLBMKernel_h__ #include "BasicLBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/ILBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/ILBMKernel.h index ab047a86081f9afc1a099eea0087f2728bfa519d..490aafc1c54d806a997021415004eec9c4579168 100644 --- a/src/cpu/VirtualFluidsCore/LBM/ILBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/ILBMKernel.h @@ -38,7 +38,7 @@ #include "LBMSystem.h" -class BCProcessor; +class BCSet; class DataSet3D; //! Abstract class provides interface for LBM kernel @@ -52,8 +52,8 @@ public: virtual void swapDistributions() = 0; virtual bool getCompressible() const = 0; - virtual SPtr<BCProcessor> getBCProcessor() const = 0; - virtual void setBCProcessor(SPtr<BCProcessor> bcProcessor) = 0; + virtual SPtr<BCSet> getBCSet() const = 0; + virtual void setBCSet(SPtr<BCSet> BCSet) = 0; virtual SPtr<DataSet3D> getDataSet() const = 0; virtual real getCollisionFactor() const = 0; virtual void setCollisionFactor(real collFactor) = 0; diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp index 2669ebbf25b4ddbe047bc2e79e7af223c4024334..23ea001f3d754f274d103b8c4f13458506705654 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.cpp @@ -34,7 +34,7 @@ SPtr<LBMKernel> IncompressibleCumulantLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<IncompressibleCumulantLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -91,7 +91,7 @@ void IncompressibleCumulantLBMKernel::calculate(int step) nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.h index 5abe9afc29caf6fe178d6b0e7c3b44e373c6defb..99e64ce0cac5a0a1e53a40f1eb4a4ab36cfa2f81 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantLBMKernel.h @@ -4,7 +4,7 @@ #define IncompressibleCumulantLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp index 90d6b0caed9e659924420ffa0332470108621d2d..ec4d2a5a89ea066c7aa89d8632fb305f7dcdc10e 100644 --- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp @@ -47,7 +47,7 @@ void IncompressibleCumulantWithSpongeLayerLBMKernel::initRelaxFactor(int vdir, r real spongeFactor; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -122,7 +122,7 @@ SPtr<LBMKernel> IncompressibleCumulantWithSpongeLayerLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<IncompressibleCumulantWithSpongeLayerLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -193,7 +193,7 @@ void IncompressibleCumulantWithSpongeLayerLBMKernel::calculate(int step) nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); SPtr<RelaxationFactorArray3D> relaxationFactorPtr = dataSet->getRelaxationFactor(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); diff --git a/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp index 47c9a43d0cfff0e24ca0d45fa9a4ad0e23a4b7af..49d66b39ccd887516f2be1caa78df0349b01b883 100644 --- a/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp @@ -1,6 +1,6 @@ #include "InitDensityLBMKernel.h" #include "D3Q27EsoTwist3DSplittedVector.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "DataSet3D.h" #include "BCArray3D.h" #include "lbm/constants/NumericConstants.h" @@ -30,7 +30,7 @@ SPtr<LBMKernel> InitDensityLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<InitDensityLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -61,7 +61,7 @@ real InitDensityLBMKernel::getCalculationTime() // nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); // zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); // -// BCArray3D<D3Q27BoundaryCondition>& bcArray = dynamicPointerCast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray(); +// BCArray3D<D3Q27BoundaryCondition>& bcArray = dynamicPointerCast<D3Q27ETBCSet>(this->getBCSet())->getBCArray(); // // const int bcArrayMaxX1 = (int)bcArray->getNX1(); // const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -864,7 +864,7 @@ void InitDensityLBMKernel::calculate(int /*step*/) nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); SPtr<BoundaryConditions> bcPtr; real f[D3Q27System::ENDF+1]; real feq[D3Q27System::ENDF+1]; diff --git a/src/cpu/VirtualFluidsCore/LBM/LBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/LBMKernel.cpp index e6208c00fc39092fe8e0373a6a8ba47e6452af27..d78bfc9c150ce8e4c97e5a9f20ae7c16edcf991d 100644 --- a/src/cpu/VirtualFluidsCore/LBM/LBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/LBMKernel.cpp @@ -33,7 +33,7 @@ #include "LBMKernel.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" @@ -49,9 +49,9 @@ LBMKernel::LBMKernel() this->nx[2] = 0; } ////////////////////////////////////////////////////////////////////////// -void LBMKernel::setBCProcessor(SPtr<BCProcessor> bcp) { bcProcessor = bcp; } +void LBMKernel::setBCSet(SPtr<BCSet> bcp) { bcSet = bcp; } ////////////////////////////////////////////////////////////////////////// -SPtr<BCProcessor> LBMKernel::getBCProcessor() const { return bcProcessor; } +SPtr<BCSet> LBMKernel::getBCSet() const { return bcSet; } ////////////////////////////////////////////////////////////////////////// void LBMKernel::setCollisionFactor(real collFactor) { this->collFactor = collFactor; } ////////////////////////////////////////////////////////////////////////// @@ -185,7 +185,7 @@ std::array<int, 3> LBMKernel::getNX() { return nx; } ////////////////////////////////////////////////////////////////////////// bool LBMKernel::isInsideOfDomain(const int &x1, const int &x2, const int &x3) const { - const SPtr<BCArray3D> bcArray = this->bcProcessor->getBCArray(); + const SPtr<BCArray3D> bcArray = this->bcSet->getBCArray(); return bcArray->isInsideOfDomain(x1, x2, x3, ghostLayerWidth); } ////////////////////////////////////////////////////////////////////////// diff --git a/src/cpu/VirtualFluidsCore/LBM/LBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/LBMKernel.h index bc12a1ed93ffc241f4e121207376e44533908259..94de596c262acd7a18ebbbc6b1128fb304469973 100644 --- a/src/cpu/VirtualFluidsCore/LBM/LBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/LBMKernel.h @@ -41,7 +41,7 @@ #include <limits> #include <muParser.h> -class BCProcessor; +class BCSet; class DataSet3D; class Block3D; @@ -59,8 +59,8 @@ public: void calculate(int step) override = 0; real getCalculationTime() override = 0; - void setBCProcessor(SPtr<BCProcessor> bcp) override; - SPtr<BCProcessor> getBCProcessor() const override; + void setBCSet(SPtr<BCSet> bcp) override; + SPtr<BCSet> getBCSet() const override; void setCollisionFactor(real collFactor) override; real getCollisionFactor() const override; @@ -132,7 +132,7 @@ public: protected: SPtr<DataSet3D> dataSet; - SPtr<BCProcessor> bcProcessor; + SPtr<BCSet> bcSet; real collFactor; int ghostLayerWidth{ 1 }; bool compressible{ false }; diff --git a/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp b/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp index dbfd47b72b9e64186fc36b329d24ebdbe954c9d0..d0c914707688ebf7c2abd839f8e1c698d33d947c 100644 --- a/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp @@ -3,7 +3,7 @@ #include "D3Q27EsoTwist3DSplittedVector.h" #include "D3Q27EsoTwist3DSoA.h" #include "DataSet3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "BCArray3D.h" #include "lbm/constants/NumericConstants.h" @@ -33,7 +33,7 @@ SPtr<LBMKernel> LBMKernelETD3Q27BGK::clone() SPtr<LBMKernel> kernel(new LBMKernelETD3Q27BGK()); std::dynamic_pointer_cast<LBMKernelETD3Q27BGK>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -63,7 +63,7 @@ void LBMKernelETD3Q27BGK::calculate(int /*step*/) nonLocalDistributions = std::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = std::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); real f[D3Q27System::ENDF+1]; real feq[D3Q27System::ENDF+1]; real drho,vx1,vx2,vx3; diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp index 3b660f6dcb985be987d0c0d46f2b29bc15fab468..834d37944bc0b47ac5d3fc5dd10194bdf63184d9 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp @@ -69,7 +69,7 @@ SPtr<LBMKernel> MultiphaseCumulantLBMKernel::clone() kernel->setPhaseFieldRelaxation(this->tauH); kernel->setMobility(this->mob); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -100,7 +100,7 @@ void MultiphaseCumulantLBMKernel::calculate(int step) nonLocalDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getNonLocalDistributions(); zeroDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -1290,7 +1290,7 @@ void MultiphaseCumulantLBMKernel::findNeighbors(CbArray3D<real, IndexerX3X2X1>:: using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.h index 1402e35f0626399c30875d3f58bbcd256367d965..a42f6d5eaf907cd3706546c7afcd67d93e9985f2 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphaseCumulantLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp index c294a381f6c4309577022ca16ee781775f22a31f..92302b342927ccaf4e6d49e3a073fec732fac6ba 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp @@ -79,7 +79,7 @@ SPtr<LBMKernel> MultiphasePressureFilterCompressibleAirLBMKernel::clone() kernel->setMobility(this->mob); kernel->setInterfaceWidth(this->interfaceWidth); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -168,7 +168,7 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::calculate(int step) CbArray3D<real, IndexerX3X2X1>::CbArray3DPtr pressure = dataSet->getPressureField(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -1630,7 +1630,7 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::findNeighbors(CbArray3D<r using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); @@ -1651,7 +1651,7 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::findNeighbors2(CbArray3D< using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi2[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.h index 65be707f90d1327cad559cc7f9361e74508bcd30..56d31b53c8ed42358e898869e8193bcf7779743a 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphasePressureFilterCompressibleAirLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp index 0aafeb0b03afcfb0fe10196bc8c149a0979bdfc2..7e167838ad9ce09f2fd16769c1217602e700e607 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp @@ -79,7 +79,7 @@ SPtr<LBMKernel> MultiphasePressureFilterLBMKernel::clone() kernel->setMobility(this->mob); kernel->setInterfaceWidth(this->interfaceWidth); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -168,7 +168,7 @@ void MultiphasePressureFilterLBMKernel::calculate(int step) CbArray3D<real, IndexerX3X2X1>::CbArray3DPtr pressure = dataSet->getPressureField(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -1748,7 +1748,7 @@ void MultiphasePressureFilterLBMKernel::findNeighbors(CbArray3D<real, IndexerX3X using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.h index d13a5aeffa95cc3ee4980edf5cc93650ecc617a3..fc2783b4f844a0acb00386c64ff034bfa900928b 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphasePressureFilterLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp index f6cb731fb4eec7e49d7b946ada6fb1cf30456f2e..45e3131c29cd6dfa3364c72ab4642cc7fc4acc62 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp @@ -70,7 +70,7 @@ SPtr<LBMKernel> MultiphaseScratchCumulantLBMKernel::clone() kernel->setPhaseFieldRelaxation(this->tauH); kernel->setMobility(this->mob); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -155,7 +155,7 @@ void MultiphaseScratchCumulantLBMKernel::calculate(int step) nonLocalDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getNonLocalDistributions(); zeroDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -3062,7 +3062,7 @@ void MultiphaseScratchCumulantLBMKernel::findNeighbors(CbArray3D<real, IndexerX3 using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.h index 6f10c9b5db0e2272d734de02a55dab1452f79d1a..db4e547a2054f1a37468bb726f4f3fc20c33bd53 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphaseScratchCumulantLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp index 8ea6c1f786e700fafaa8cb8d4fe900618852a192..c1cbdd6256f86f5307f2df2ebc36549126020c66 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp @@ -85,7 +85,7 @@ SPtr<LBMKernel> MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::clone() kernel->setMobility(this->mob); kernel->setInterfaceWidth(this->interfaceWidth); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -170,7 +170,7 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::calculate(int step) CbArray3D<real, IndexerX3X2X1>::CbArray3DPtr pressure = dataSet->getPressureField(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -2982,7 +2982,7 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::findNeighbors(CbArra using namespace vf::lbm::dir; using namespace vf::lbm::constant; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); if (phi[DIR_000] < 0) { @@ -3007,7 +3007,7 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::findNeighbors2(CbArr using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi2[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.h index e2dc6d86abf7525231510df4f052cfc0768df457..98ca6108dca8f0835bc5e4e9479f696791cc354c 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphaseSimpleVelocityBaseExternalPressureLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp index 2ece81e93758e0e4923d44c2f3498ea1bdbdd67b..c5bb37f3c04ae2b8bb1164bc34e69a55b38298e0 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp @@ -71,7 +71,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsCumulantLBMKernel::clone() kernel->setPhaseFieldRelaxation(this->tauH); kernel->setMobility(this->mob); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -160,7 +160,7 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::calculate(int step) nonLocalDistributionsH2 = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getH2distributions())->getNonLocalDistributions(); zeroDistributionsH2 = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getH2distributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -3174,7 +3174,7 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::findNeighbors(CbArray3D<real, In using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); @@ -3195,7 +3195,7 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::findNeighbors2(CbArray3D<real, I using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi2[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.h index dbc94d613c4683fb19cb92a7ab7d075da41ab231..34730f454faf81a126eb1431fb623f0447f52fa1 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphaseTwoPhaseFieldsCumulantLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp index 0d49dc68a5e331da2b30a906b2adebb3e1eadb7b..1b0e6c85a4ffe371611423a7f9200065a7ef31a3 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp @@ -83,7 +83,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::clone() kernel->setMobility(this->mob); kernel->setInterfaceWidth(this->interfaceWidth); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -176,7 +176,7 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::calculate(int step) CbArray3D<real, IndexerX3X2X1>::CbArray3DPtr pressure = dataSet->getPressureField(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -3540,7 +3540,7 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::findNeighbors(CbArray3D<re using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); @@ -3561,7 +3561,7 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::findNeighbors2(CbArray3D<r using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi2[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h index 138b24410b10b4631b1411fba3e803bde504531a..c486caf0c0fb64c3a9a7366b55bb3150c139468a 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphaseTwoPhaseFieldsPressureFilterLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp index afde9ef8bca08b862210ea7dea90db349d219dca..020549cf976714bcde5b5bb01fd9cc0d6dfec16d 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp @@ -73,7 +73,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::clone() kernel->setPhaseFieldRelaxation(this->tauH); kernel->setMobility(this->mob); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -162,7 +162,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::calculate(int step) nonLocalDistributionsH2 = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getH2distributions())->getNonLocalDistributions(); zeroDistributionsH2 = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getH2distributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -3471,7 +3471,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::findNeighbors(CbArray3D< using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi[DIR_000] = (*ph)(x1, x2, x3); @@ -3492,7 +3492,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::findNeighbors2(CbArray3D using namespace D3Q27System; using namespace vf::lbm::dir; - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); phi2[DIR_000] = (*ph)(x1, x2, x3); diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.h index a34858ae47c0cb5b10755b21df14290fa242115a..34c0f5b8db234c27a2f55f7c8dee4a7c33bdc949 100644 --- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.h @@ -35,7 +35,7 @@ #define MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyBinghamModelLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/RheologyBinghamModelLBMKernel.h index da51e6c4e11f67ff48efe7a34c7eeaf900e9e730..61ff8c86d65db9d36b0a6919927704ffc2618716 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyBinghamModelLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyBinghamModelLBMKernel.h @@ -50,7 +50,7 @@ public: kernel->setNX(nx); kernel->setCollisionFactor(collFactor); dynamicPointerCast<RheologyBinghamModelLBMKernel>(kernel)->initDataSet(); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyHerschelBulkleyModelLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/RheologyHerschelBulkleyModelLBMKernel.h index 2422efefd52cdbfac183a9fdd19b9b2f5a5fee70..55435e1b4c1243aaefd5f7f141ec2da84c594116 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyHerschelBulkleyModelLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyHerschelBulkleyModelLBMKernel.h @@ -49,7 +49,7 @@ public: kernel->setNX(nx); kernel->setCollisionFactor(collFactor); dynamicPointerCast<RheologyHerschelBulkleyModelLBMKernel>(kernel)->initDataSet(); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.cpp index 81dfc86d12daa48d9b238097e4e82f907b64abfb..a85b63c9391b83f6b329dd56abc035c3f74d54a5 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.cpp @@ -71,7 +71,7 @@ SPtr<LBMKernel> RheologyK17LBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<RheologyK17LBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -126,7 +126,7 @@ void RheologyK17LBMKernel::calculate(int step) nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.h index 80bf7dcb346f500d75a31eca68fefdd092f2e9e8..1244bb031c1dffda3ea369739a5e9436238e1e0a 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyK17LBMKernel.h @@ -35,7 +35,7 @@ #define RheologyK17LBMKernel_h__ #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.cpp index 2b65887c1b0461a836f29a2aff7dc809dbb733e8..4906cb2a6e34cc14df2d9acaca52736c23da4816 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.cpp @@ -83,7 +83,7 @@ void RheologyModelLBMKernel::calculate(int step) nonLocalDistributionsF = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributionsF = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -903,7 +903,7 @@ void RheologyModelLBMKernel::calculate(int step) // kernel->setCollisionFactor(collFactor); // collFactorF = collFactor; // dynamicPointerCast<RheologyModelLBMKernel>(kernel)->initDataSet(); -// kernel->setBCProcessor(bcProcessor->clone(kernel)); +// kernel->setBCSet(bcSet->clone(kernel)); // kernel->setWithForcing(withForcing); // kernel->setForcingX1(muForcingX1); // kernel->setForcingX2(muForcingX2); diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.h index 8b4ce82984d12ef33b1011fe020fe7d3f0c638e4..4ff3bb9f7b679c4f97b2a685b2d1bbe64912d892 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel.h @@ -34,7 +34,7 @@ #define RheologyModelLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.cpp b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.cpp index 308add14b3710983ea9139b405c3074891b1b7c9..9306686160f642d0f67cb40be2c78cce45fa0484 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.cpp @@ -53,7 +53,7 @@ void RheologyModelLBMKernel2::calculate(int step) nonLocalDistributionsF = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions(); zeroDistributionsF = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); @@ -902,7 +902,7 @@ void RheologyModelLBMKernel2::calculate(int step) // kernel->setCollisionFactor(collFactor); // collFactorF = collFactor; // dynamicPointerCast<RheologyModelLBMKernel2>(kernel)->initDataSet(); -// kernel->setBCProcessor(bcProcessor->clone(kernel)); +// kernel->setBCSet(bcSet->clone(kernel)); // kernel->setWithForcing(withForcing); // kernel->setForcingX1(muForcingX1); // kernel->setForcingX2(muForcingX2); diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.h b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.h index ca058f1e4e67cd8cf51e971999f9a2a359aa197d..ca97551c849d2b3315ff1813ecb0b3936a451a5b 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.h +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyModelLBMKernel2.h @@ -2,7 +2,7 @@ #define RheologyModelLBMKernel2_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyPowellEyringModelLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/RheologyPowellEyringModelLBMKernel.h index acd02101fed8793175a6aae62394ce14e2847832..5cf0533f96b1c1df10ea8843196e15064044cbb9 100644 --- a/src/cpu/VirtualFluidsCore/LBM/RheologyPowellEyringModelLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/RheologyPowellEyringModelLBMKernel.h @@ -49,7 +49,7 @@ public: kernel->setNX(nx); kernel->setCollisionFactor(collFactor); dynamicPointerCast<RheologyPowellEyringModelLBMKernel>(kernel)->initDataSet(); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); diff --git a/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.cpp index 6d11842f6f2d92b4daff1f7c1bb348af0c8021ca..00f5e89b3b1e8fc8a05facaa165655f81d0a8532 100644 --- a/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.cpp @@ -45,7 +45,7 @@ SPtr<LBMKernel> ThixotropyExpLBMKernel::clone() dynamicPointerCast<ThixotropyExpLBMKernel>(kernel)->setCollisionFactorH(this->collFactorH); dynamicPointerCast<ThixotropyExpLBMKernel>(kernel)->setAlpha(this->alpha); dynamicPointerCast<ThixotropyExpLBMKernel>(kernel)->setTheta(this->theta); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -98,7 +98,7 @@ void ThixotropyExpLBMKernel::calculate(int step) nonLocalDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getNonLocalDistributions(); zeroDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.h index 1316493c81c56a849cdcc39a9adfb064aa684205..754dd0ae09129455331c5a55b3b4d640350f33db 100644 --- a/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/ThixotropyExpLBMKernel.h @@ -2,7 +2,7 @@ #define ThixotropyExpLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.cpp index 6fb32f31a3d40e369fb36b48e8d4f63c7a17322d..1524104ce69a9bceec685f6912a76b12e5480c76 100644 --- a/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.cpp @@ -45,7 +45,7 @@ SPtr<LBMKernel> ThixotropyLBMKernel::clone() dynamicPointerCast<ThixotropyLBMKernel>(kernel)->setCollisionFactorH(this->collFactorH); dynamicPointerCast<ThixotropyLBMKernel>(kernel)->setAlpha(this->alpha); dynamicPointerCast<ThixotropyLBMKernel>(kernel)->setTheta(this->theta); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); @@ -98,7 +98,7 @@ void ThixotropyLBMKernel::calculate(int step) nonLocalDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getNonLocalDistributions(); zeroDistributionsH = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getHdistributions())->getZeroDistributions(); - SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = this->getBCSet()->getBCArray(); const int bcArrayMaxX1 = (int)bcArray->getNX1(); const int bcArrayMaxX2 = (int)bcArray->getNX2(); diff --git a/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.h b/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.h index c638105425c20dfa64a221a02004ee1ece8879fd..00b374ed133f58878ed8e1cf541c3fad79ea7c5e 100644 --- a/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.h +++ b/src/cpu/VirtualFluidsCore/LBM/ThixotropyLBMKernel.h @@ -2,7 +2,7 @@ #define ThixotropyLBMKernel_H #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "basics/utilities/UbTiming.h" #include "basics/container/CbArray4D.h" diff --git a/src/cpu/VirtualFluidsCore/LBM/VoidLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/VoidLBMKernel.cpp index 2ca07d25f1f52bdcbad5d8e7149b7f4e33e9dc84..4e56f9fbd48ac43a7361bcd91a2e0f18a9ed2ebf 100644 --- a/src/cpu/VirtualFluidsCore/LBM/VoidLBMKernel.cpp +++ b/src/cpu/VirtualFluidsCore/LBM/VoidLBMKernel.cpp @@ -1,5 +1,5 @@ #include "VoidLBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "DataSet3D.h" #include "VoidData3D.h" #include "D3Q27System.h" @@ -20,7 +20,7 @@ SPtr<LBMKernel> VoidLBMKernel::clone() kernel->setNX(nx); dynamicPointerCast<VoidLBMKernel>(kernel)->initDataSet(); kernel->setCollisionFactor(this->collFactor); - kernel->setBCProcessor(bcProcessor->clone(kernel)); + kernel->setBCSet(bcSet->clone(kernel)); kernel->setWithForcing(withForcing); kernel->setForcingX1(muForcingX1); kernel->setForcingX2(muForcingX2); diff --git a/src/cpu/VirtualFluidsCore/Utilities/ChangeRandomQs.hpp b/src/cpu/VirtualFluidsCore/Utilities/ChangeRandomQs.hpp index 3fbd3643d71409fe21aa800473310399757f3a44..dbfb8907dacdad96849812a1cf5b01ccb52e1483 100644 --- a/src/cpu/VirtualFluidsCore/Utilities/ChangeRandomQs.hpp +++ b/src/cpu/VirtualFluidsCore/Utilities/ChangeRandomQs.hpp @@ -5,7 +5,7 @@ #include "IntegrateValuesHelper.h" #include "BoundaryConditions.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" namespace Utilities { @@ -16,7 +16,7 @@ namespace Utilities for(IntegrateValuesHelper::CalcNodes cn : cnodes) { SPtr<ILBMKernel> kernel = cn.block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); for(UbTupleInt3 node : cn.nodes) { SPtr<BoundaryConditions> bc = bcArray->getBC(val<1>(node), val<2>(node), val<3>(node)); diff --git a/src/cpu/VirtualFluidsCore/Utilities/VoxelMatrixUtil.hpp b/src/cpu/VirtualFluidsCore/Utilities/VoxelMatrixUtil.hpp index 7ac3aa19578b0735ffab354a8f45ec714bacd314..1903cba9b2318f094142bdd1f2562a845d05f069 100644 --- a/src/cpu/VirtualFluidsCore/Utilities/VoxelMatrixUtil.hpp +++ b/src/cpu/VirtualFluidsCore/Utilities/VoxelMatrixUtil.hpp @@ -2,7 +2,7 @@ #define VoxelMatrixUtil_h__ #include "GbCuboid3D.h" -#include "NoSlipBCAdapter.h" +#include "NoSlipBC.h" #include "D3Q27Interactor.h" #include "SetBcBlocksBlockVisitor.h" #include "Block3D.h" @@ -13,7 +13,7 @@ namespace Utilities { void voxelMatrixDiscretisation(SPtr<GbVoxelMatrix3D> matrix, std::string& pathname, int myid, int fileCounter, SPtr<Grid3D> grid, int bounceBackOption, bool vmFile) { - SPtr<BCAdapter> noSlipPM(new NoSlipBCAdapter(bounceBackOption)); + SPtr<BC> noSlipPM(new NoSlipBC(bounceBackOption)); SPtr<D3Q27Interactor> vmInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(matrix, grid, noSlipPM, Interactor3D::SOLID)); if (vmFile) diff --git a/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.cpp index fbfbd1bcab135056fa6b62e31d50b63c898bb83a..4ea4b39e03417b983328931651c6fe7b8c09f3a8 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.cpp @@ -32,24 +32,24 @@ //======================================================================================= #include "BoundaryConditionsBlockVisitor.h" -#include "BCAdapter.h" +#include "BC.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "D3Q27EsoTwist3DSplittedVector.h" #include "DataSet3D.h" #include "Grid3D.h" #include "D3Q27System.h" -#include "BCAdapter.h" +#include "BC.h" #include "Block3D.h" #include "BCArray3D.h" #include "ILBMKernel.h" -#include "ThixotropyDensityBCAlgorithm.h" -#include "ThixotropyVelocityBCAlgorithm.h" -#include "ThixotropyNoSlipBCAlgorithm.h" -#include "ThixotropyNonReflectingOutflowBCAlgorithm.h" -#include "ThixotropyVelocityWithDensityBCAlgorithm.h" +#include "ThixotropyDensityBCStrategy.h" +#include "ThixotropyVelocityBCStrategy.h" +#include "ThixotropyNoSlipBCStrategy.h" +#include "ThixotropyNonReflectingOutflowBCStrategy.h" +#include "ThixotropyVelocityWithDensityBCStrategy.h" BoundaryConditionsBlockVisitor::BoundaryConditionsBlockVisitor() : Block3DVisitor(0, D3Q27System::MAXLEVEL) @@ -67,13 +67,13 @@ void BoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> bloc throw UbException(UB_EXARGS, "LBMKernel in " + block->toString() + "is not exist!"); } - SPtr<BCProcessor> bcProcessor = kernel->getBCProcessor(); + SPtr<BCSet> bcSet = kernel->getBCSet(); - if (!bcProcessor) { + if (!bcSet) { throw UbException(UB_EXARGS, "Boundary Conditions Processor is not exist!"); } - SPtr<BCArray3D> bcArray = bcProcessor->getBCArray(); + SPtr<BCArray3D> bcArray = bcSet->getBCArray(); bool compressible = kernel->getCompressible(); real collFactor = kernel->getCollisionFactor(); @@ -86,7 +86,7 @@ void BoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> bloc int maxX3 = (int)bcArray->getNX3(); SPtr<BoundaryConditions> bcPtr; - bcProcessor->clearBC(); + bcSet->clearBC(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); @@ -95,8 +95,8 @@ void BoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> bloc for (int x1 = minX1; x1 < maxX1; x1++) { if (!bcArray->isSolid(x1, x2, x3) && !bcArray->isUndefined(x1, x2, x3)) { if ((bcPtr = bcArray->getBC(x1, x2, x3)) != NULL) { - char alg = bcPtr->getBcAlgorithmType(); - SPtr<BCAlgorithm> bca = bcMap[alg]; + char alg = bcPtr->getBCStrategyType(); + SPtr<BCStrategy> bca = bcMap[alg]; if (bca) { bca = bca->clone(); @@ -105,26 +105,26 @@ void BoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> bloc bca->setBcPointer(bcPtr); bca->addDistributions(distributions); - if (alg == BCAlgorithm::ThixotropyVelocityBCAlgorithm) - std::static_pointer_cast<ThixotropyVelocityBCAlgorithm>(bca)->addDistributionsH( + if (alg == BCStrategy::ThixotropyVelocityBCStrategy) + std::static_pointer_cast<ThixotropyVelocityBCStrategy>(bca)->addDistributionsH( kernel->getDataSet()->getHdistributions()); - if (alg == BCAlgorithm::ThixotropyDensityBCAlgorithm) - std::static_pointer_cast<ThixotropyDensityBCAlgorithm>(bca)->addDistributionsH( + if (alg == BCStrategy::ThixotropyDensityBCStrategy) + std::static_pointer_cast<ThixotropyDensityBCStrategy>(bca)->addDistributionsH( kernel->getDataSet()->getHdistributions()); - if (alg == BCAlgorithm::ThixotropyNoSlipBCAlgorithm) - std::static_pointer_cast<ThixotropyNoSlipBCAlgorithm>(bca)->addDistributionsH( + if (alg == BCStrategy::ThixotropyNoSlipBCStrategy) + std::static_pointer_cast<ThixotropyNoSlipBCStrategy>(bca)->addDistributionsH( kernel->getDataSet()->getHdistributions()); - if (alg == BCAlgorithm::ThixotropyNonReflectingOutflowBCAlgorithm) - std::static_pointer_cast<ThixotropyNonReflectingOutflowBCAlgorithm>(bca) + if (alg == BCStrategy::ThixotropyNonReflectingOutflowBCStrategy) + std::static_pointer_cast<ThixotropyNonReflectingOutflowBCStrategy>(bca) ->addDistributionsH(kernel->getDataSet()->getHdistributions()); - if (alg == BCAlgorithm::ThixotropyVelocityWithDensityBCAlgorithm) - std::static_pointer_cast<ThixotropyVelocityWithDensityBCAlgorithm>(bca) + if (alg == BCStrategy::ThixotropyVelocityWithDensityBCStrategy) + std::static_pointer_cast<ThixotropyVelocityWithDensityBCStrategy>(bca) ->addDistributionsH(kernel->getDataSet()->getHdistributions()); bca->setCollFactor(collFactor); bca->setCompressible(compressible); bca->setBcArray(bcArray); - bcProcessor->addBC(bca); + bcSet->addBC(bca); } } } @@ -134,7 +134,7 @@ void BoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> bloc } } ////////////////////////////////////////////////////////////////////////// -void BoundaryConditionsBlockVisitor::addBC(SPtr<BCAdapter> bc) +void BoundaryConditionsBlockVisitor::addBC(SPtr<BC> bc) { - bcMap.insert(std::make_pair(bc->getBcAlgorithmType(), bc->getAlgorithm())); + bcMap.insert(std::make_pair(bc->getBCStrategyType(), bc->getAlgorithm())); } diff --git a/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.h b/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.h index 42eefd93077c56f12c2eec3282cb3f7a1e67c208..8954bf73a6a459a795e916f24192f5db698b1426 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.h +++ b/src/cpu/VirtualFluidsCore/Visitors/BoundaryConditionsBlockVisitor.h @@ -41,8 +41,8 @@ class Grid3D; class Block3D; -class BCAlgorithm; -class BCAdapter; +class BCStrategy; +class BC; //! \brief set boundary conditions class BoundaryConditionsBlockVisitor : public Block3DVisitor @@ -52,10 +52,10 @@ public: ~BoundaryConditionsBlockVisitor() override; void visit(SPtr<Grid3D> grid, SPtr<Block3D> block) override; - void addBC(SPtr<BCAdapter> bc); + void addBC(SPtr<BC> bc); protected: private: - std::map<char, SPtr<BCAlgorithm>> bcMap; + std::map<char, SPtr<BCStrategy>> bcMap; }; #endif // BoundaryConditionBlockVisitor_h__ diff --git a/src/cpu/VirtualFluidsCore/Visitors/ChangeBoundaryDensityBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/ChangeBoundaryDensityBlockVisitor.cpp index c541465183dd084135d60b7112182daae33e22ab..682f1d65b2475001d59d4fad57fb3b4f39eaa918 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/ChangeBoundaryDensityBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/ChangeBoundaryDensityBlockVisitor.cpp @@ -1,6 +1,6 @@ #include "ChangeBoundaryDensityBlockVisitor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include "Grid3D.h" @@ -19,7 +19,7 @@ void ChangeBoundaryDensityBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> b { if (block->getRank() == grid->getRank()) { SPtr<ILBMKernel> kernel = block->getKernel(); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); int minX1 = 0; int minX2 = 0; diff --git a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp index 1c4860070a5ca8aefc4850a9b16dd7273c65f231..2e24a2e26d1709b5c1af33d2210f269ca59f2e40 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp @@ -33,7 +33,7 @@ #include "InitDistributionsBlockVisitor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" #include "EsoTwist3D.h" @@ -157,7 +157,7 @@ void InitDistributionsBlockVisitor::visit(const SPtr<Grid3D> grid, SPtr<Block3D> else calcFeqsFct = &D3Q27System::calcIncompFeq; - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); real o = kernel->getCollisionFactor(); diff --git a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsFromFileBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsFromFileBlockVisitor.cpp index 2632f2c59db6d4982806c50dcc50f743cc5c2ad3..3a51f5532532e4ac116221a551a1d4ad9bb5e66c 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsFromFileBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsFromFileBlockVisitor.cpp @@ -1,6 +1,6 @@ #include "InitDistributionsFromFileBlockVisitor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" #include "EsoTwist3D.h" @@ -73,7 +73,7 @@ void InitDistributionsFromFileBlockVisitor::visit(const SPtr<Grid3D> grid, SPtr< // UbTupleDouble3 org = grid->getBlockWorldCoordinates(block); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<EsoTwist3D> distributions = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getFdistributions()); real f[D3Q27System::ENDF + 1]; diff --git a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsWithInterpolationGridVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsWithInterpolationGridVisitor.cpp index 6dd6976ca3cb250e720079031632b9b5e3902696..660363e22e7c315a40df596aa95137f5589fff72 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsWithInterpolationGridVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsWithInterpolationGridVisitor.cpp @@ -2,7 +2,7 @@ #include "mpi.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "D3Q27EsoTwist3DSplittedVector.h" #include "DataSet3D.h" @@ -178,7 +178,7 @@ void InitDistributionsWithInterpolationGridVisitor::interpolateLocalBlockCoarseT SPtr<EsoTwist3D> oldDistributions = dynamicPointerCast<EsoTwist3D>(oldKernel->getDataSet()->getFdistributions()); - SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCSet()->getBCArray(); SPtr<ILBMKernel> newKernel = newBlock->getKernel(); if (!newKernel) @@ -279,7 +279,7 @@ void InitDistributionsWithInterpolationGridVisitor::interpolateRemoteBlockCoarse MPI_Send(zeroDistributions->getStartAdressOfSortedArray(0, 0, 0), (int)zeroDistributions->getDataVector().size(), MPI_DOUBLE, newBlockRank, 0, MPI_COMM_WORLD); - SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCSet()->getBCArray(); std::vector<int> &bcDataVector = bcArrayOldBlock->getBcindexmatrixDataVector(); MPI_Send(&bcDataVector[0], (int)bcDataVector.size(), MPI_INT, newBlockRank, 0, MPI_COMM_WORLD); } else if (newBlockRank == newGridRank && newBlock->isActive()) { @@ -408,7 +408,7 @@ void InitDistributionsWithInterpolationGridVisitor::interpolateLocalBlockFineToC SPtr<EsoTwist3D> oldDistributions = dynamicPointerCast<EsoTwist3D>(oldKernel->getDataSet()->getFdistributions()); - SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCSet()->getBCArray(); SPtr<ILBMKernel> newKernel = newBlock->getKernel(); if (!newKernel) @@ -510,7 +510,7 @@ void InitDistributionsWithInterpolationGridVisitor::interpolateRemoteBlockFineTo MPI_Send(zeroDistributions->getStartAdressOfSortedArray(0, 0, 0), (int)zeroDistributions->getDataVector().size(), MPI_DOUBLE, newBlockRank, 0, MPI_COMM_WORLD); - SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArrayOldBlock = oldBlock->getKernel()->getBCSet()->getBCArray(); std::vector<int> &bcDataVector = bcArrayOldBlock->getBcindexmatrixDataVector(); MPI_Send(&bcDataVector[0], (int)bcDataVector.size(), MPI_INT, newBlockRank, 0, MPI_COMM_WORLD); } else if (newBlockRank == newGridRank && newBlock->isActive()) { diff --git a/src/cpu/VirtualFluidsCore/Visitors/InitThixotropyBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/InitThixotropyBlockVisitor.cpp index 0c666958912c7f73f74d91b179e19cf6d3b06dd1..be0c694bc733ff3b9ebd808d533757f98eefe73c 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/InitThixotropyBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/InitThixotropyBlockVisitor.cpp @@ -33,7 +33,7 @@ #include "InitThixotropyBlockVisitor.h" #include "LBMKernel.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "D3Q27System.h" #include "DataSet3D.h" #include "EsoTwist3D.h" @@ -250,7 +250,7 @@ void InitThixotropyBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block) else calcFeqsFct = &D3Q27System::calcIncompFeq; - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getHdistributions(); real h[D3Q27System::ENDF+1]; diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.cpp index b4eee2dfbd952d27835dbaab24da84c041999a21..1b8dc581c37fea66b6f5725330d5d693917adf7d 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.cpp @@ -32,15 +32,15 @@ //======================================================================================= #include "MultiphaseBoundaryConditionsBlockVisitor.h" -#include "BCAdapter.h" +#include "BC.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "D3Q27EsoTwist3DSplittedVector.h" #include "DataSet3D.h" #include "Grid3D.h" #include "D3Q27System.h" -#include "BCAdapter.h" +#include "BC.h" #include "Block3D.h" #include "BCArray3D.h" #include "LBMKernel.h" @@ -67,14 +67,14 @@ void MultiphaseBoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Blo throw UbException(UB_EXARGS, "LBMKernel in " + block->toString() + "is not exist!"); } - SPtr<BCProcessor> bcProcessor = kernel->getBCProcessor(); + SPtr<BCSet> bcSet = kernel->getBCSet(); - if (!bcProcessor) + if (!bcSet) { throw UbException(UB_EXARGS,"Boundary Conditions Processor is not exist!" ); } - SPtr<BCArray3D> bcArray = bcProcessor->getBCArray(); + SPtr<BCArray3D> bcArray = bcSet->getBCArray(); bool compressible = kernel->getCompressible(); real collFactorL = kernel->getCollisionFactorL(); @@ -93,7 +93,7 @@ void MultiphaseBoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Blo int maxX3 = (int)bcArray->getNX3(); SPtr<BoundaryConditions> bcPtr; - bcProcessor->clearBC(); + bcSet->clearBC(); SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions(); SPtr<DistributionArray3D> distributionsH = kernel->getDataSet()->getHdistributions(); @@ -109,8 +109,8 @@ void MultiphaseBoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Blo { if ((bcPtr = bcArray->getBC(x1, x2, x3)) != NULL) { - char alg = bcPtr->getBcAlgorithmType(); - SPtr<BCAlgorithm> bca = bcMap[alg]; + char alg = bcPtr->getBCStrategyType(); + SPtr<BCStrategy> bca = bcMap[alg]; if (bca) { @@ -129,7 +129,7 @@ void MultiphaseBoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Blo bca->setPhiBound(phiL, phiH); bca->setCompressible(compressible); bca->setBcArray(bcArray); - bcProcessor->addBC(bca); + bcSet->addBC(bca); } } } @@ -139,9 +139,9 @@ void MultiphaseBoundaryConditionsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Blo } } ////////////////////////////////////////////////////////////////////////// -void MultiphaseBoundaryConditionsBlockVisitor::addBC(SPtr<BCAdapter> bc) +void MultiphaseBoundaryConditionsBlockVisitor::addBC(SPtr<BC> bc) { - bcMap.insert(std::make_pair(bc->getBcAlgorithmType(), bc->getAlgorithm())); + bcMap.insert(std::make_pair(bc->getBCStrategyType(), bc->getAlgorithm())); } diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.h b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.h index e6cbc69c8bb2431e552d01210c73e450661961c3..cc04246d411dfc91f225598c269c1a10893817f5 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.h +++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseBoundaryConditionsBlockVisitor.h @@ -37,8 +37,8 @@ #include "Block3DVisitor.h" #include <map> -class BCAdapter; -class BCAlgorithm; +class BC; +class BCStrategy; class MultiphaseBoundaryConditionsBlockVisitor : public Block3DVisitor { @@ -47,9 +47,9 @@ public: virtual ~MultiphaseBoundaryConditionsBlockVisitor(); void visit(SPtr<Grid3D> grid, SPtr<Block3D> block); - void addBC(SPtr<BCAdapter> bc); + void addBC(SPtr<BC> bc); protected: private: - std::map<char, SPtr<BCAlgorithm>> bcMap; + std::map<char, SPtr<BCStrategy>> bcMap; }; #endif // MultiphaseBoundaryConditionsBlockVisitor_h__ diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp index fc57572c9183f7ba23701d37703fa0c900e1ccc4..3588e502583fd1a60ffa7a8113bc8c6eeb2fac69 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp @@ -33,7 +33,7 @@ #include "MultiphaseInitDistributionsBlockVisitor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" #include "EsoTwist3D.h" @@ -174,7 +174,7 @@ void MultiphaseInitDistributionsBlockVisitor::visit(const SPtr<Grid3D> grid, SPt if (!kernel) throw UbException(UB_EXARGS, "The LBM kernel isn't exist in block: "+block->toString()); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<EsoTwist3D> distributionsF = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getFdistributions()); SPtr<EsoTwist3D> distributionsH = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getHdistributions()); SPtr<EsoTwist3D> distributionsH2 = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getH2distributions()); diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseSetKernelBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseSetKernelBlockVisitor.cpp index 8885b09ea0e19d56bce205334263a7b5c1f16313..04590a0d9e6700720bd3addc824ec4eb04fd94a3 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseSetKernelBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseSetKernelBlockVisitor.cpp @@ -58,24 +58,24 @@ void MultiphaseSetKernelBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> blo newKernel->setDataSet(dataSet); - SPtr<BCProcessor> bcProc = block->getKernel()->getBCProcessor(); + SPtr<BCSet> bcProc = block->getKernel()->getBCSet(); if (!bcProc) { - UB_THROW(UbException(UB_EXARGS, "It is not possible to change a BCProcessor in kernel! Old BCProcessor is not exist!")); + UB_THROW(UbException(UB_EXARGS, "It is not possible to change a BCSet in kernel! Old BCSet is not exist!")); } - newKernel->setBCProcessor(bcProc); + newKernel->setBCSet(bcProc); block->setKernel(newKernel); } break; case MultiphaseSetKernelBlockVisitor::ChangeKernelWithData: { - SPtr<BCProcessor> bcProc = block->getKernel()->getBCProcessor(); + SPtr<BCSet> bcProc = block->getKernel()->getBCSet(); if (!bcProc) { - UB_THROW(UbException(UB_EXARGS, "It is not possible to change a BCProcessor in kernel! Old BCProcessor is not exist!")); + UB_THROW(UbException(UB_EXARGS, "It is not possible to change a BCSet in kernel! Old BCSet is not exist!")); } - newKernel->setBCProcessor(bcProc); + newKernel->setBCSet(bcProc); block->setKernel(newKernel); } break; diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp index 0c3fd6de0de70a3506cc2a9a00be80c267ad538a..1ba1863af98cdff2967a43985d0314b8d827e0cc 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp @@ -33,7 +33,7 @@ #include "MultiphaseVelocityFormInitDistributionsBlockVisitor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" #include "EsoTwist3D.h" @@ -178,7 +178,7 @@ void MultiphaseVelocityFormInitDistributionsBlockVisitor::visit(const SPtr<Grid3 if (!kernel) throw UbException(UB_EXARGS, "The LBM kernel isn't exist in block: "+block->toString()); - SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcArray = kernel->getBCSet()->getBCArray(); SPtr<EsoTwist3D> distributionsF = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getFdistributions()); SPtr<EsoTwist3D> distributionsH = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getHdistributions()); SPtr<EsoTwist3D> distributionsH2 = dynamicPointerCast<EsoTwist3D>(kernel->getDataSet()->getH2distributions()); diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetKernelBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SetKernelBlockVisitor.cpp index 54271370c11700886f969eeef75a2389ef062828..fed80000c562b8aafdefd83ff2791781a8907f7a 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/SetKernelBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/SetKernelBlockVisitor.cpp @@ -34,7 +34,7 @@ #include "SetKernelBlockVisitor.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "DataSet3D.h" #include "Grid3D.h" @@ -88,24 +88,24 @@ void SetKernelBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block) newKernel->setDataSet(dataSet); - SPtr<BCProcessor> bcProc = block->getKernel()->getBCProcessor(); + SPtr<BCSet> bcProc = block->getKernel()->getBCSet(); if (!bcProc) { UB_THROW(UbException( UB_EXARGS, - "It is not possible to change a BCProcessor in kernel! Old BCProcessor is not exist!")); + "It is not possible to change a BCSet in kernel! Old BCSet is not exist!")); } - newKernel->setBCProcessor(bcProc); + newKernel->setBCSet(bcProc); block->setKernel(newKernel); } break; case SetKernelBlockVisitor::ChangeKernelWithData: { - SPtr<BCProcessor> bcProc = block->getKernel()->getBCProcessor(); + SPtr<BCSet> bcProc = block->getKernel()->getBCSet(); if (!bcProc) { UB_THROW(UbException( UB_EXARGS, - "It is not possible to change a BCProcessor in kernel! Old BCProcessor is not exist!")); + "It is not possible to change a BCSet in kernel! Old BCSet is not exist!")); } - newKernel->setBCProcessor(bcProc); + newKernel->setBCSet(bcProc); block->setKernel(newKernel); } break; } diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp index bb6cc5dc6fe06b1a63647d83897bc1fe83066a1a..04f758d396b726c67a5e9a5797a3d65d3d26a36b 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp @@ -1,6 +1,6 @@ #include "SetUndefinedNodesBlockVisitor.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "BoundaryConditions.h" #include "D3Q27System.h" @@ -29,7 +29,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block // int gl = kernel->getGhostLayerWidth(); int gl = 0; - SPtr<BCArray3D> bcMatrix = kernel->getBCProcessor()->getBCArray(); + SPtr<BCArray3D> bcMatrix = kernel->getBCSet()->getBCArray(); int minX1 = gl; int minX2 = gl; diff --git a/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp index 6183024279ce1753f2fd78bf20b72313b84662f1..4cdcfb80bb4aa3119f1e2ca4dfcd19c2abf381dd 100644 --- a/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp +++ b/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp @@ -3,7 +3,7 @@ #include "LBMSystem.h" #include "BCArray3D.h" -#include "BCProcessor.h" +#include "BCSet.h" #include "Block3D.h" #include "D3Q27System.h" #include "Grid3D.h" @@ -58,12 +58,12 @@ void SpongeLayerBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block) newKernel->setDataSet(dataSet); - SPtr<BCProcessor> bcProc = block->getKernel()->getBCProcessor(); + SPtr<BCSet> bcProc = block->getKernel()->getBCSet(); if (!bcProc) { UB_THROW(UbException( - UB_EXARGS, "It is not possible to change a BCProcessor in kernel! Old BCProcessor is not exist!")); + UB_EXARGS, "It is not possible to change a BCSet in kernel! Old BCSet is not exist!")); } - newKernel->setBCProcessor(bcProc); + newKernel->setBCSet(bcProc); real oldCollFactor = newKernel->getCollisionFactor();