From 536e4ddf2aee2ca55e02b54beb35a5a67b0f41c6 Mon Sep 17 00:00:00 2001 From: Kutscher <kutscher@irmb.tu-bs.de> Date: Wed, 15 Mar 2023 14:55:15 +0100 Subject: [PATCH] rename BCAlgorithm to BCStrategy / BCAdapter to BC / BCProcessor to BCSet --- apps/cpu/ConvectionOfVortex/cov.cpp | 22 +++--- apps/cpu/CouetteFlow/cflow.cpp | 24 +++---- apps/cpu/FlowAroundCylinder/cylinder.cpp | 24 +++---- apps/cpu/HerschelBulkleyModel/hbflow.cpp | 34 ++++----- apps/cpu/HerschelBulkleySphere/hbsphere.cpp | 54 +++++++------- apps/cpu/JetBreakup/JetBreakup.cpp | 70 +++++++++--------- apps/cpu/LaminarTubeFlow/ltf.cpp | 56 +++++++-------- apps/cpu/Multiphase/Multiphase.cpp | 60 ++++++++-------- apps/cpu/MultiphaseDropletTest/droplet.cpp | 18 ++--- apps/cpu/PoiseuilleFlow/pf1.cpp | 20 +++--- apps/cpu/RisingBubble2D/RisingBubble2D.cpp | 26 +++---- apps/cpu/ViskomatXL/viskomat.cpp | 56 +++++++-------- apps/cpu/rheometer/rheometer.cpp | 52 +++++++------- apps/cpu/sphere/sphere.cpp | 50 ++++++------- .../IBcumulantK17LBMKernel.cpp | 4 +- .../LiggghtsCoupling/IBcumulantK17LBMKernel.h | 2 +- src/cpu/VirtualFluids.h | 72 +++++++++---------- .../BoundaryConditions/{BCAdapter.h => BC.h} | 26 +++---- .../{BCProcessor.cpp => BCSet.cpp} | 34 ++++----- .../{BCProcessor.h => BCSet.h} | 24 +++---- .../{BCAlgorithm.cpp => BCStrategy.cpp} | 32 ++++----- .../{BCAlgorithm.h => BCStrategy.h} | 60 ++++++++-------- .../BoundaryConditions/BoundaryConditions.h | 4 +- .../{DensityBCAdapter.cpp => DensityBC.cpp} | 34 ++++----- .../{DensityBCAdapter.h => DensityBC.h} | 22 +++--- ...CAlgorithm.cpp => EqDensityBCStrategy.cpp} | 20 +++--- ...ityBCAlgorithm.h => EqDensityBCStrategy.h} | 18 ++--- .../HighViscosityNoSlipBCAlgorithm.h | 50 ------------- ....cpp => HighViscosityNoSlipBCStrategy.cpp} | 20 +++--- .../HighViscosityNoSlipBCStrategy.h | 50 +++++++++++++ ...thm.cpp => MultiphaseNoSlipBCStrategy.cpp} | 22 +++--- ...gorithm.h => MultiphaseNoSlipBCStrategy.h} | 18 ++--- ...tiphaseNonReflectingOutflowBCStrategy.cpp} | 24 +++---- ...ultiphaseNonReflectingOutflowBCStrategy.h} | 18 ++--- ...rithm.cpp => MultiphaseSlipBCStrategy.cpp} | 22 +++--- ...Algorithm.h => MultiphaseSlipBCStrategy.h} | 18 ++--- ...BCAdapter.cpp => MultiphaseVelocityBC.cpp} | 48 ++++++------- ...cityBCAdapter.h => MultiphaseVelocityBC.h} | 36 +++++----- ...m.cpp => MultiphaseVelocityBCStrategy.cpp} | 24 +++---- ...rithm.h => MultiphaseVelocityBCStrategy.h} | 18 ++--- .../{NoSlipBCAdapter.cpp => NoSlipBC.cpp} | 4 +- .../{NoSlipBCAdapter.h => NoSlipBC.h} | 18 ++--- ...ipBCAlgorithm.cpp => NoSlipBCStrategy.cpp} | 18 ++--- ...NoSlipBCAlgorithm.h => NoSlipBCStrategy.h} | 14 ++-- ...gorithm.cpp => NonEqDensityBCStrategy.cpp} | 20 +++--- ...BCAlgorithm.h => NonEqDensityBCStrategy.h} | 18 ++--- ....cpp => NonReflectingInflowBCStrategy.cpp} | 20 +++--- ...ithm.h => NonReflectingInflowBCStrategy.h} | 18 ++--- .../NonReflectingOutflowBCAlgorithm.h | 50 ------------- ...cpp => NonReflectingOutflowBCStrategy.cpp} | 20 +++--- .../NonReflectingOutflowBCStrategy.h | 50 +++++++++++++ ...ectingOutflowWithRelaxationBCStrategy.cpp} | 20 +++--- ...flectingOutflowWithRelaxationBCStrategy.h} | 18 ++--- ...=> RheologyBinghamModelNoSlipBCStrategy.h} | 24 +++---- ... RheologyBinghamModelVelocityBCStrategy.h} | 24 +++---- ...ogyHerschelBulkleyModelNoSlipBCStrategy.h} | 24 +++---- ...rithm.cpp => RheologyNoSlipBCStrategy.cpp} | 8 +-- ...Algorithm.h => RheologyNoSlipBCStrategy.h} | 18 ++--- ...eologyPowellEyringModelNoSlipBCStrategy.h} | 24 +++---- ...thm.cpp => RheologyVelocityBCStrategy.cpp} | 16 ++--- ...gorithm.h => RheologyVelocityBCStrategy.h} | 18 ++--- ...Algorithm.cpp => SimpleSlipBCStrategy.cpp} | 20 +++--- ...ipBCAlgorithm.h => SimpleSlipBCStrategy.h} | 18 ++--- ...rithm.cpp => SimpleVelocityBCStrategy.cpp} | 20 +++--- ...Algorithm.h => SimpleVelocityBCStrategy.h} | 16 ++--- .../{SlipBCAdapter.cpp => SlipBC.cpp} | 16 ++--- .../{SlipBCAdapter.h => SlipBC.h} | 32 ++++----- .../BoundaryConditions/SlipBCAlgorithm.h | 18 ----- ...SlipBCAlgorithm.cpp => SlipBCStrategy.cpp} | 18 ++--- .../BoundaryConditions/SlipBCStrategy.h | 18 +++++ ...nWallBCProcessor.cpp => ThinWallBCSet.cpp} | 26 +++---- ...{ThinWallBCProcessor.h => ThinWallBCSet.h} | 16 ++--- ...rithm.cpp => ThinWallNoSlipBCStrategy.cpp} | 22 +++--- ...Algorithm.h => ThinWallNoSlipBCStrategy.h} | 18 ++--- ...hm.cpp => ThixotropyDensityBCStrategy.cpp} | 28 ++++---- ...orithm.h => ThixotropyDensityBCStrategy.h} | 18 ++--- ...thm.cpp => ThixotropyNoSlipBCStrategy.cpp} | 26 +++---- ...gorithm.h => ThixotropyNoSlipBCStrategy.h} | 18 ++--- ...xotropyNonReflectingOutflowBCStrategy.cpp} | 26 +++---- ...hixotropyNonReflectingOutflowBCStrategy.h} | 18 ++--- ...m.cpp => ThixotropyVelocityBCStrategy.cpp} | 28 ++++---- ...rithm.h => ThixotropyVelocityBCStrategy.h} | 18 ++--- ...ixotropyVelocityWithDensityBCStrategy.cpp} | 24 +++---- ...ThixotropyVelocityWithDensityBCStrategy.h} | 18 ++--- .../{VelocityBCAdapter.cpp => VelocityBC.cpp} | 48 ++++++------- .../{VelocityBCAdapter.h => VelocityBC.h} | 40 +++++------ ...BCAlgorithm.cpp => VelocityBCStrategy.cpp} | 18 ++--- ...cityBCAlgorithm.h => VelocityBCStrategy.h} | 14 ++-- ....cpp => VelocityWithDensityBCStrategy.cpp} | 20 +++--- ...ithm.h => VelocityWithDensityBCStrategy.h} | 18 ++--- .../CoProcessors/AverageValuesCoProcessor.cpp | 10 +-- .../CalculateForcesCoProcessor.cpp | 4 +- .../CalculateTorqueCoProcessor.cpp | 4 +- .../CoProcessors/ForceCalculator.cpp | 4 +- .../InSituCatalystCoProcessor.cpp | 6 +- .../CoProcessors/InSituVTKCoProcessor.cpp | 4 +- .../CoProcessors/IntegrateValuesHelper.cpp | 6 +- .../LineTimeSeriesCoProcessor.cpp | 2 +- .../MPIIOMigrationBECoProcessor.cpp | 18 ++--- .../MPIIOMigrationBECoProcessor.h | 8 +-- .../MPIIOMigrationCoProcessor.cpp | 14 ++-- .../CoProcessors/MPIIOMigrationCoProcessor.h | 8 +-- .../CoProcessors/MPIIORestartCoProcessor.cpp | 16 ++--- .../CoProcessors/MPIIORestartCoProcessor.h | 8 +-- .../MicrophoneArrayCoProcessor.cpp | 4 +- .../PressureCoefficientCoProcessor.cpp | 4 +- .../CoProcessors/QCriterionCoProcessor.cpp | 10 +-- .../CoProcessors/ShearStressCoProcessor.cpp | 12 ++-- .../TimeAveragedValuesCoProcessor.cpp | 8 +-- .../CoProcessors/TimeDependentBCCoProcessor.h | 2 +- .../TurbulenceIntensityCoProcessor.cpp | 6 +- .../WriteBoundaryConditionsCoProcessor.cpp | 4 +- .../WriteMQFromSelectionCoProcessor.cpp | 4 +- .../WriteMacroscopicQuantitiesCoProcessor.cpp | 4 +- ...croscopicQuantitiesPlusMassCoProcessor.cpp | 4 +- .../WriteMultiphaseQuantitiesCoProcessor.cpp | 4 +- .../WriteThixotropyQuantitiesCoProcessor.cpp | 4 +- .../Connectors/CoarseToFineVectorConnector.h | 6 +- .../Connectors/FineToCoarseVectorConnector.h | 4 +- .../Grid/BasicCalculator.cpp | 6 +- .../Interactors/D3Q27Interactor.cpp | 52 +++++++------- .../Interactors/D3Q27Interactor.h | 12 ++-- .../D3Q27TriFaceMeshInteractor.cpp | 60 ++++++++-------- .../Interactors/D3Q27TriFaceMeshInteractor.h | 8 +-- .../VirtualFluidsCore/LBM/BGKLBMKernel.cpp | 6 +- .../VirtualFluidsCore/LBM/BasicLBMKernel.cpp | 4 +- ...ibleCumulant4thOrderViscosityLBMKernel.cpp | 4 +- ...ssibleCumulant4thOrderViscosityLBMKernel.h | 2 +- .../LBM/CompressibleCumulantLBMKernel.cpp | 4 +- .../LBM/CompressibleCumulantLBMKernel.h | 2 +- .../LBM/CumulantK17LBMKernel.cpp | 4 +- .../LBM/CumulantK17LBMKernel.h | 2 +- .../LBM/CumulantK17LBMKernelUnified.cpp | 4 +- .../LBM/CumulantK17LBMKernelUnified.h | 2 +- .../LBM/CumulantLBMKernel.cpp | 4 +- .../VirtualFluidsCore/LBM/CumulantLBMKernel.h | 2 +- src/cpu/VirtualFluidsCore/LBM/ILBMKernel.h | 6 +- .../LBM/IncompressibleCumulantLBMKernel.cpp | 4 +- .../LBM/IncompressibleCumulantLBMKernel.h | 2 +- ...ssibleCumulantWithSpongeLayerLBMKernel.cpp | 6 +- .../LBM/InitDensityLBMKernel.cpp | 8 +-- src/cpu/VirtualFluidsCore/LBM/LBMKernel.cpp | 8 +-- src/cpu/VirtualFluidsCore/LBM/LBMKernel.h | 8 +-- .../LBM/LBMKernelETD3Q27BGK.cpp | 6 +- .../LBM/MultiphaseCumulantLBMKernel.cpp | 6 +- .../LBM/MultiphaseCumulantLBMKernel.h | 2 +- ...PressureFilterCompressibleAirLBMKernel.cpp | 8 +-- ...sePressureFilterCompressibleAirLBMKernel.h | 2 +- .../LBM/MultiphasePressureFilterLBMKernel.cpp | 6 +- .../LBM/MultiphasePressureFilterLBMKernel.h | 2 +- .../MultiphaseScratchCumulantLBMKernel.cpp | 6 +- .../LBM/MultiphaseScratchCumulantLBMKernel.h | 2 +- ...eVelocityBaseExternalPressureLBMKernel.cpp | 8 +-- ...pleVelocityBaseExternalPressureLBMKernel.h | 2 +- ...tiphaseTwoPhaseFieldsCumulantLBMKernel.cpp | 8 +-- ...ultiphaseTwoPhaseFieldsCumulantLBMKernel.h | 2 +- ...eTwoPhaseFieldsPressureFilterLBMKernel.cpp | 8 +-- ...aseTwoPhaseFieldsPressureFilterLBMKernel.h | 2 +- ...woPhaseFieldsVelocityCumulantLBMKernel.cpp | 8 +-- ...eTwoPhaseFieldsVelocityCumulantLBMKernel.h | 2 +- .../LBM/RheologyBinghamModelLBMKernel.h | 2 +- .../RheologyHerschelBulkleyModelLBMKernel.h | 2 +- .../LBM/RheologyK17LBMKernel.cpp | 4 +- .../LBM/RheologyK17LBMKernel.h | 2 +- .../LBM/RheologyModelLBMKernel.cpp | 4 +- .../LBM/RheologyModelLBMKernel.h | 2 +- .../LBM/RheologyModelLBMKernel2.cpp | 4 +- .../LBM/RheologyModelLBMKernel2.h | 2 +- .../LBM/RheologyPowellEyringModelLBMKernel.h | 2 +- .../LBM/ThixotropyExpLBMKernel.cpp | 4 +- .../LBM/ThixotropyExpLBMKernel.h | 2 +- .../LBM/ThixotropyLBMKernel.cpp | 4 +- .../LBM/ThixotropyLBMKernel.h | 2 +- .../VirtualFluidsCore/LBM/VoidLBMKernel.cpp | 4 +- .../Utilities/ChangeRandomQs.hpp | 4 +- .../Utilities/VoxelMatrixUtil.hpp | 4 +- .../BoundaryConditionsBlockVisitor.cpp | 54 +++++++------- .../Visitors/BoundaryConditionsBlockVisitor.h | 8 +-- .../ChangeBoundaryDensityBlockVisitor.cpp | 4 +- .../InitDistributionsBlockVisitor.cpp | 4 +- .../InitDistributionsFromFileBlockVisitor.cpp | 4 +- ...tributionsWithInterpolationGridVisitor.cpp | 10 +-- .../Visitors/InitThixotropyBlockVisitor.cpp | 4 +- ...ltiphaseBoundaryConditionsBlockVisitor.cpp | 24 +++---- ...MultiphaseBoundaryConditionsBlockVisitor.h | 8 +-- ...ultiphaseInitDistributionsBlockVisitor.cpp | 4 +- .../MultiphaseSetKernelBlockVisitor.cpp | 12 ++-- ...ocityFormInitDistributionsBlockVisitor.cpp | 4 +- .../Visitors/SetKernelBlockVisitor.cpp | 14 ++-- .../SetUndefinedNodesBlockVisitor.cpp | 4 +- .../Visitors/SpongeLayerBlockVisitor.cpp | 8 +-- 191 files changed, 1537 insertions(+), 1537 deletions(-) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{BCAdapter.h => BC.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{BCProcessor.cpp => BCSet.cpp} (82%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{BCProcessor.h => BCSet.h} (86%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{BCAlgorithm.cpp => BCStrategy.cpp} (81%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{BCAlgorithm.h => BCStrategy.h} (69%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{DensityBCAdapter.cpp => DensityBC.cpp} (86%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{DensityBCAdapter.h => DensityBC.h} (88%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{EqDensityBCAlgorithm.cpp => EqDensityBCStrategy.cpp} (88%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{EqDensityBCAlgorithm.h => EqDensityBCStrategy.h} (88%) delete mode 100644 src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCAlgorithm.h rename src/cpu/VirtualFluidsCore/BoundaryConditions/{HighViscosityNoSlipBCAlgorithm.cpp => HighViscosityNoSlipBCStrategy.cpp} (85%) create mode 100644 src/cpu/VirtualFluidsCore/BoundaryConditions/HighViscosityNoSlipBCStrategy.h rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseNoSlipBCAlgorithm.cpp => MultiphaseNoSlipBCStrategy.cpp} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseNoSlipBCAlgorithm.h => MultiphaseNoSlipBCStrategy.h} (86%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseNonReflectingOutflowBCAlgorithm.cpp => MultiphaseNonReflectingOutflowBCStrategy.cpp} (98%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseNonReflectingOutflowBCAlgorithm.h => MultiphaseNonReflectingOutflowBCStrategy.h} (84%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseSlipBCAlgorithm.cpp => MultiphaseSlipBCStrategy.cpp} (92%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseSlipBCAlgorithm.h => MultiphaseSlipBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseVelocityBCAdapter.cpp => MultiphaseVelocityBC.cpp} (82%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseVelocityBCAdapter.h => MultiphaseVelocityBC.h} (80%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseVelocityBCAlgorithm.cpp => MultiphaseVelocityBCStrategy.cpp} (89%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{MultiphaseVelocityBCAlgorithm.h => MultiphaseVelocityBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NoSlipBCAdapter.cpp => NoSlipBC.cpp} (97%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NoSlipBCAdapter.h => NoSlipBC.h} (89%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NoSlipBCAlgorithm.cpp => NoSlipBCStrategy.cpp} (89%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NoSlipBCAlgorithm.h => NoSlipBCStrategy.h} (91%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonEqDensityBCAlgorithm.cpp => NonEqDensityBCStrategy.cpp} (88%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonEqDensityBCAlgorithm.h => NonEqDensityBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonReflectingInflowBCAlgorithm.cpp => NonReflectingInflowBCStrategy.cpp} (97%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonReflectingInflowBCAlgorithm.h => NonReflectingInflowBCStrategy.h} (85%) delete mode 100644 src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.h rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonReflectingOutflowBCAlgorithm.cpp => NonReflectingOutflowBCStrategy.cpp} (96%) create mode 100644 src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCStrategy.h rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonReflectingOutflowBCAlgorithmWithRelaxation.cpp => NonReflectingOutflowWithRelaxationBCStrategy.cpp} (96%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{NonReflectingOutflowBCAlgorithmWithRelaxation.h => NonReflectingOutflowWithRelaxationBCStrategy.h} (83%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyBinghamModelNoSlipBCAlgorithm.h => RheologyBinghamModelNoSlipBCStrategy.h} (79%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyBinghamModelVelocityBCAlgorithm.h => RheologyBinghamModelVelocityBCStrategy.h} (78%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyHerschelBulkleyModelNoSlipBCAlgorithm.h => RheologyHerschelBulkleyModelNoSlipBCStrategy.h} (77%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyNoSlipBCAlgorithm.cpp => RheologyNoSlipBCStrategy.cpp} (94%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyNoSlipBCAlgorithm.h => RheologyNoSlipBCStrategy.h} (85%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyPowellEyringModelNoSlipBCAlgorithm.h => RheologyPowellEyringModelNoSlipBCStrategy.h} (77%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyVelocityBCAlgorithm.cpp => RheologyVelocityBCStrategy.cpp} (89%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{RheologyVelocityBCAlgorithm.h => RheologyVelocityBCStrategy.h} (85%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SimpleSlipBCAlgorithm.cpp => SimpleSlipBCStrategy.cpp} (92%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SimpleSlipBCAlgorithm.h => SimpleSlipBCStrategy.h} (88%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SimpleVelocityBCAlgorithm.cpp => SimpleVelocityBCStrategy.cpp} (86%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SimpleVelocityBCAlgorithm.h => SimpleVelocityBCStrategy.h} (89%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SlipBCAdapter.cpp => SlipBC.cpp} (90%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SlipBCAdapter.h => SlipBC.h} (79%) delete mode 100644 src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.h rename src/cpu/VirtualFluidsCore/BoundaryConditions/{SlipBCAlgorithm.cpp => SlipBCStrategy.cpp} (90%) create mode 100644 src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCStrategy.h rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThinWallBCProcessor.cpp => ThinWallBCSet.cpp} (77%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThinWallBCProcessor.h => ThinWallBCSet.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThinWallNoSlipBCAlgorithm.cpp => ThinWallNoSlipBCStrategy.cpp} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThinWallNoSlipBCAlgorithm.h => ThinWallNoSlipBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyDensityBCAlgorithm.cpp => ThixotropyDensityBCStrategy.cpp} (84%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyDensityBCAlgorithm.h => ThixotropyDensityBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyNoSlipBCAlgorithm.cpp => ThixotropyNoSlipBCStrategy.cpp} (85%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyNoSlipBCAlgorithm.h => ThixotropyNoSlipBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyNonReflectingOutflowBCAlgorithm.cpp => ThixotropyNonReflectingOutflowBCStrategy.cpp} (97%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyNonReflectingOutflowBCAlgorithm.h => ThixotropyNonReflectingOutflowBCStrategy.h} (85%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyVelocityBCAlgorithm.cpp => ThixotropyVelocityBCStrategy.cpp} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyVelocityBCAlgorithm.h => ThixotropyVelocityBCStrategy.h} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyVelocityWithDensityBCAlgorithm.cpp => ThixotropyVelocityWithDensityBCStrategy.cpp} (85%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{ThixotropyVelocityWithDensityBCAlgorithm.h => ThixotropyVelocityWithDensityBCStrategy.h} (86%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{VelocityBCAdapter.cpp => VelocityBC.cpp} (88%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{VelocityBCAdapter.h => VelocityBC.h} (83%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{VelocityBCAlgorithm.cpp => VelocityBCStrategy.cpp} (89%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{VelocityBCAlgorithm.h => VelocityBCStrategy.h} (91%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{VelocityWithDensityBCAlgorithm.cpp => VelocityWithDensityBCStrategy.cpp} (87%) rename src/cpu/VirtualFluidsCore/BoundaryConditions/{VelocityWithDensityBCAlgorithm.h => VelocityWithDensityBCStrategy.h} (86%) diff --git a/apps/cpu/ConvectionOfVortex/cov.cpp b/apps/cpu/ConvectionOfVortex/cov.cpp index 45b948939..a7affc552 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 a60031096..184571e09 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 d66222495..73929a3ee 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 dcb82533e..985ad8fce 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 ae71a3a44..7af2587b8 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 2115b515f..4a046bc39 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 cbafef30c..14af41b7c 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 4d4bc9cf8..e1ee8d15f 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 a9d561930..7d7423ccb 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 936801175..987978a5b 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 92495242f..629aaeca2 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 be1f8bab3..1f4686e94 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 224d17069..19ca56314 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 70dcc0ddd..c01388374 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 2dc4ab61c..838cd086a 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 6b19ada8d..c13233ba7 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 1ee4c7e78..458cd4733 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 625fb9214..7dc4e4d41 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 de647a842..55444b0d6 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 266307305..f3f464093 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 179007cb6..3331f2453 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 f182546b0..9b2b7cb80 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 54775dad7..e3f42c29b 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 d8bc5f5f7..8d4fabcbb 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 74bfea4dd..b51fb984a 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 fa5dc1bde..77a4601ea 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 173b6b12f..2de16acdd 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 bb033d409..000000000 --- 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 2e15d1365..227b5ca35 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 000000000..e153a67e6 --- /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 73e399fb6..d438f80f5 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 dc6e5bc6a..390c2952e 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 df6aeb5d5..58faec07f 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 3fa67b276..3aae2ce03 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 cfae7dc6a..904a0ff19 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 53d41d33c..1eb25a958 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 fe716b52b..1adf45607 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 60d93cdec..e01237cf9 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 5d1553e45..a34fe2138 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 0cfd9a3ba..4e99c876a 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 4b272878a..d49cffe64 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 52eda3308..fe7eecebb 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 cb659eff1..ea1fd5f38 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 dcf678b4f..d45526f37 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 2787d685c..d3f44c6ff 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 ca7d5b043..d919a673e 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 078e8bfb4..d67de5342 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 1f3e87ce3..b3c9b6ba8 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 d664b67fb..000000000 --- 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 ac24c49c9..1a74c1033 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 000000000..7fca99885 --- /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 ce2c5a626..3c52e1a4b 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 97badb60d..e8179c706 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 45c9c0c21..96efa52c6 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 2837238c4..1f4c078c3 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 c9b76b563..8480e09c9 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 fccc111b5..3765a5874 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 c8c38ad7f..611d87bcd 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 a6a3a5a74..29d7b7506 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 5bc11cbb4..817c86eed 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 91ac9ec57..00c08230c 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 de9c555f8..fee0f71a2 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 bfe4a766b..294c7fdf6 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 83badd723..2206e7154 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 b751d220c..597e69a38 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 bc0921a33..d47bff6d2 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 5c2225e0a..98205ba32 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 b7a75969f..000000000 --- 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 ea08f49bd..cac20a5e7 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 000000000..6eeb43a90 --- /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 7d4aa9329..aefbd97f1 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 cb81e6c16..45c76a23f 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 3921004ec..18385cd20 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 f9995d49f..deba685a3 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 ebdf07f25..70981c5d0 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 2b83eed0e..a40500fe5 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 c34d4ec35..4a1b40167 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 e3e0ebc34..edd895233 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 a7238e47a..f93e315c3 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 cabc67bd6..7ae90994a 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 a17d56d48..08c23b723 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 bea3b0a37..93cf6d220 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 a1e3e143b..ea4fc700d 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 d69e79a22..74d33efc0 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 1e156476b..583303850 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 c0596b8e2..64e333ad8 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 b1f16ece3..44f7180b6 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 44bbd2cee..bc12cf937 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 840d8f2c4..a7cf16a9f 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 7ab57d2b8..6d91f2ced 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 1a5276fcf..b34f61299 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 d50c58d56..2a7635d2a 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 570486741..b4b8b1b58 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 918e3afbe..9a39ce11e 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 741f1f340..64b9f353b 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 6b8026ced..bf68f9d85 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 0d8b7827b..7eabcd284 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 98d0188fc..4d7b5e837 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 fd08df50a..8213edcf3 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 d29ecca36..016c32845 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 4e3a84aa8..bf1d89a78 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 4b8c62311..cfb5a204c 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 f55d2e08a..296e2c601 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 a4c1b32ef..db98bca4f 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 f1762b5fd..45e9643fc 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 4197c5cfe..2e295e096 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 4e62a1c6b..d500f1dc6 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 cd1f9c54c..2d8866494 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 8fa95c121..b3e021284 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 cb41ca962..e8f7d3e0f 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 4714349a9..7293ded40 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 4ed68397a..365b819aa 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 2b49861af..2952328f6 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 58ed15604..838c1f143 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 5c4f80887..35421654f 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 ffc32b953..e092f4cfd 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 9a4af5947..ac17a4ef7 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 c2ba596a7..d7f9f72c4 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 f4f408021..ffab50082 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 92559f5f3..b4874366c 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 06d0daffd..d90d8ec69 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 80a58efcc..e0094d646 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 d569d3c0f..237097ed5 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 9e42de660..ddcac4ad2 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 d1fc28f0b..8b1b78b73 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 12c4b6e89..97659e93e 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 a981dc5ce..6ff48d9d1 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 fc3e0dffb..3b7ee8f84 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 4c914a70e..a68c62538 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 7af69201c..84910ef26 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 65dd9e525..5ffc4ca13 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 345f12fd8..39dd0a2c7 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 db6a718e9..1b8bdd340 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 d13e82efc..9c6876f4d 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 7c80c3dea..b30884d38 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 9fb6d834f..3ba644ccc 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 ab047a860..490aafc1c 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 2669ebbf2..23ea001f3 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 5abe9afc2..99e64ce0c 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 90d6b0cae..ec4d2a5a8 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 47c9a43d0..49d66b39c 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 e6208c00f..d78bfc9c1 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 bc12a1ed9..94de596c2 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 dbfd47b72..d0c914707 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 3b660f6dc..834d37944 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 1402e35f0..a42f6d5ea 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 c294a381f..92302b342 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 65be707f9..56d31b53c 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 0aafeb0b0..7e167838a 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 d13a5aeff..fc2783b4f 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 f6cb731fb..45e3131c2 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 6f10c9b5d..db4e547a2 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 8ea6c1f78..c1cbdd625 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 e2dc6d86a..98ca6108d 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 2ece81e93..c5bb37f3c 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 dbc94d613..34730f454 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 0d49dc68a..1b0e6c85a 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 138b24410..c486caf0c 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 afde9ef8b..020549cf9 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 a34858ae4..34c0f5b8d 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 da51e6c4e..61ff8c86d 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 2422efefd..55435e1b4 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 81dfc86d1..a85b63c93 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 80bf7dcb3..1244bb031 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 2b65887c1..4906cb2a6 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 8b4ce8298..4ff3bb9f7 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 308add14b..930668616 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 ca058f1e4..ca97551c8 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 acd02101f..5cf0533f9 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 6d11842f6..00f5e89b3 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 1316493c8..754dd0ae0 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 6fb32f31a..1524104ce 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 c63810542..00b374ed1 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 2ca07d25f..4e56f9fbd 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 3fbd3643d..dbfb8907d 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 7ac3aa195..1903cba9b 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 fbfbd1bca..4ea4b39e0 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 42eefd930..8954bf73a 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 c54146518..682f1d65b 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 1c4860070..2e24a2e26 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 2632f2c59..3a51f5532 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 6dd6976ca..660363e22 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 0c6669589..be0c694bc 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 b4eee2dfb..1b8dc581c 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 e6cbc69c8..cc04246d4 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 fc57572c9..3588e5025 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 8885b09ea..04590a0d9 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 0c3fd6de0..1ba1863af 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 54271370c..fed80000c 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 bb6cc5dc6..04f758d39 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 618302427..4cdcfb80b 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(); -- GitLab