Microflow 3D  v1.0
FluidFunctions.h
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 26.05.19.
4 // Modified by Roman Szafran, last on 07.09.19.
5 // Copyright (c) 2019 Wroclaw University of Science and Technology.
6 // Distributed under the Apache License, Version 2.0. You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0 or see accompanying file license.txt.
8 // Redistributions of source code must retain the above copyright and license notice.
9 // ==============================================================================================
10 
11 # pragma once
12 
13 #include <cstdint>
14 #include <memory>
15 
18 #include "MFDatabase/Node.h"
19 #include "MFDatabase/Vec4.h"
20 #include "MFDatabase/ThreadArray.h"
21 
22 namespace MF {
23  namespace Solver_CPU {
24 
27  public:
28  FluidFunctions()= default;
29  ~FluidFunctions() = default;
30 
31  inline static std::shared_ptr<MF::Solver_CPU::CaseParameters> its_CaseParameters_Ptr = nullptr;
32  inline static std::shared_ptr<MF::GU::LatticeParametersD3Q19> its_LatticeParameters_Ptr = nullptr;
33 
34  static void Initialize (const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr, const std::shared_ptr<MF::GU::LatticeParametersD3Q19>& LatticeParameters_Ptr) {
35  its_CaseParameters_Ptr = CaseParameters_Ptr;
36  its_LatticeParameters_Ptr = LatticeParameters_Ptr;
37  };
38 
39  static void SetFluidSolidNodePointerToFunc(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr);
40 
41  private:
42 
43  static MF::Database::Vec4<double> VRFluidLB_QuasiCompr(const MF::Database::Node *pNode);
44  static MF::Database::Vec4<double> VRFluidLB_Incompr(const MF::Database::Node *pNode);
45  static MF::Database::Vec4<double> VRFluidLB_FBGKQuasiCompr(const MF::Database::Node *pNode);
46  static MF::Database::Vec4<double> VRFluidLB_FBGKIncompr(const MF::Database::Node *pNode);
47 
48  static MF::Database::Vec4<double> DoNothing(const MF::Database::Node *pNode);
49  };
50 
51  } /* namespace Solver_CPU */
52 } /* namespace MF */
static std::shared_ptr< MF::Solver_CPU::CaseParameters > its_CaseParameters_Ptr
The FluidFunctions class collects calculation algorithms of rho and velocity LB for fluid nodes...
Basic data structure for storing f(i) data for each computational grid node.
Definition: Node.h:26
static std::shared_ptr< MF::GU::LatticeParametersD3Q19 > its_LatticeParameters_Ptr
static void SetFluidSolidNodePointerToFunc(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Sets pointers to fluid functions of MFThread.
static void Initialize(const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr, const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr)