expanding dox for ScaLBL
This commit is contained in:
parent
75f31678a0
commit
a3a2bf24dd
222
common/ScaLBL.h
222
common/ScaLBL.h
@ -174,8 +174,31 @@ extern "C" void ScaLBL_D3Q19_Momentum(double *dist, double *vel, int Np);
|
||||
extern "C" void ScaLBL_D3Q19_Pressure(double *dist, double *press, int Np);
|
||||
|
||||
// BGK MODEL
|
||||
/**
|
||||
* \brief BGK collision based on AA even access pattern for D3Q19
|
||||
* @param dist - D3Q19 distributions
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
* @param rlx - relaxation parameter
|
||||
* @param Fx - force in x direction
|
||||
* @param Fy - force in y direction
|
||||
* @param Fz - force in z direction
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q19_AAeven_BGK(double *dist, int start, int finish, int Np, double rlx, double Fx, double Fy, double Fz);
|
||||
|
||||
/**
|
||||
* \brief BGK collision based on AA odd access pattern for D3Q19
|
||||
* @param neighborList - neighbors based on D3Q19 lattice structure
|
||||
* @param dist - D3Q19 distributions
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
* @param rlx - relaxation parameter
|
||||
* @param Fx - force in x direction
|
||||
* @param Fy - force in y direction
|
||||
* @param Fz - force in z direction
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q19_AAodd_BGK(int *neighborList, double *dist, int start, int finish, int Np, double rlx, double Fx, double Fy, double Fz);
|
||||
|
||||
// GREYSCALE MODEL (Single-component)
|
||||
@ -243,26 +266,73 @@ extern "C" void ScaLBL_D3Q7_Ion_ChargeDensity(double *Den, double *ChargeDensity
|
||||
|
||||
// LBM Poisson solver
|
||||
|
||||
/**
|
||||
* \brief Poisson-Boltzmann collision based on AA odd access pattern for D3Q19
|
||||
* @param neighborList - neighbors based on D3Q19 lattice structure
|
||||
* @param Map - mapping between sparse and dense representations
|
||||
* @param dist - D3Q7 distributions
|
||||
* @param Den_charge - charge density
|
||||
* @param Psi -
|
||||
* @param ElectricField - electric field
|
||||
* @param tau - relaxation time
|
||||
* @param epsilon_LB -
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_AAodd_Poisson(int *neighborList,int *Map, double *dist, double *Den_charge, double *Psi, double *ElectricField, double tau, double epsilon_LB,
|
||||
int start, int finish, int Np);
|
||||
|
||||
extern "C" void ScaLBL_D3Q7_AAeven_Poisson(int *Map, double *dist, double *Den_charge, double *Psi, double *ElectricField, double tau, double epsilon_LB,
|
||||
int start, int finish, int Np);
|
||||
|
||||
/**
|
||||
* \brief Poisson-Boltzmann collision based on AA even access pattern for D3Q7
|
||||
* @param Map - mapping between sparse and dense representations
|
||||
* @param dist - D3Q7 distributions
|
||||
* @param Den_charge - charge density
|
||||
* @param Psi -
|
||||
* @param ElectricField - electric field
|
||||
* @param tau - relaxation time
|
||||
* @param epsilon_LB -
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_AAeven_Poisson(int *Map, double *dist, double *Den_charge, double *Psi, double *ElectricField, double tau,
|
||||
double epsilon_LB, int start, int finish, int Np);
|
||||
/**
|
||||
* \brief Poisson-Boltzmann solver / solve electric potential based on AA odd access pattern for D3Q7
|
||||
* @param neighborList - neighbors based on D3Q19 lattice structure
|
||||
* @param Map - mapping between sparse and dense representations
|
||||
* @param dist - D3Q7 distributions
|
||||
* @param Psi -
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_AAodd_Poisson_ElectricPotential(int *neighborList,int *Map, double *dist, double *Psi, int start, int finish, int Np);
|
||||
|
||||
/**
|
||||
* \brief Poisson-Boltzmann solver / solve electric potential based on AA odd access pattern for D3Q7
|
||||
* @param Map - mapping between sparse and dense representations
|
||||
* @param dist - D3Q7 distributions
|
||||
* @param Psi -
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_AAeven_Poisson_ElectricPotential(int *Map, double *dist, double *Psi, int start, int finish, int Np);
|
||||
|
||||
/**
|
||||
* \brief Initialize Poisson-Boltzmann solver
|
||||
* @param Map - mapping between sparse and dense representations
|
||||
* @param dist - D3Q7 distributions
|
||||
* @param Psi -
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_Poisson_Init(int *Map, double *dist, double *Psi, int start, int finish, int Np);
|
||||
|
||||
//extern "C" void ScaLBL_D3Q7_PoissonResidualError(int *neighborList, int *Map, double *ResidualError, double *Psi, double *Den_charge, double epsilon_LB,int strideY, int strideZ,int start, int finish);
|
||||
|
||||
//maybe deprecated
|
||||
//extern "C" void ScaLBL_D3Q7_Poisson_ElectricField(int *neighborList, int *Map, signed char *ID, double *Psi, double *ElectricField, int SolidBC,
|
||||
// int strideY, int strideZ,int start, int finish, int Np);
|
||||
|
||||
// LBM Stokes Model (adapted from MRT model)
|
||||
|
||||
extern "C" void ScaLBL_D3Q19_AAeven_StokesMRT(double *dist, double *Velocity, double *ChargeDensity, double *ElectricField, double rlx_setA, double rlx_setB,
|
||||
double Gx, double Gy, double Gz,double rho0, double den_scale, double h, double time_conv, int start, int finish, int Np);
|
||||
|
||||
@ -272,27 +342,138 @@ extern "C" void ScaLBL_D3Q19_AAodd_StokesMRT(int *neighborList, double *dist, do
|
||||
extern "C" void ScaLBL_PhaseField_InitFromRestart(double *Den, double *Aq, double *Bq, int start, int finish, int Np);
|
||||
|
||||
// MRT MODEL
|
||||
/**
|
||||
* \brief MRT collision based on AA even access pattern for D3Q19
|
||||
* @param dist - D3Q19 distributions
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
* @param rlx_setA - relaxation parameter for viscous modes
|
||||
* @param rlx_setB - relaxation parameter for non-viscous modes
|
||||
* @param Fx - force in x direction
|
||||
* @param Fy - force in y direction
|
||||
* @param Fz - force in z direction
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q19_AAeven_MRT(double *dist, int start, int finish, int Np, double rlx_setA, double rlx_setB, double Fx,
|
||||
double Fy, double Fz);
|
||||
|
||||
extern "C" void ScaLBL_D3Q19_AAodd_MRT(int *d_neighborList, double *dist, int start, int finish, int Np,
|
||||
/**
|
||||
* \brief MRT collision based on AA even access pattern for D3Q19
|
||||
* @param neighborList - index of neighbors based on D3Q19 lattice structure
|
||||
* @param dist - D3Q19 distributions
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
* @param rlx_setA - relaxation parameter for viscous modes
|
||||
* @param rlx_setB - relaxation parameter for non-viscous modes
|
||||
* @param Fx - force in x direction
|
||||
* @param Fy - force in y direction
|
||||
* @param Fz - force in z direction
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q19_AAodd_MRT(int *neighborList, double *dist, int start, int finish, int Np,
|
||||
double rlx_setA, double rlx_setB, double Fx, double Fy, double Fz);
|
||||
|
||||
// COLOR MODEL
|
||||
/**
|
||||
* \brief Color model collision based on AA even access pattern for D3Q19
|
||||
* @param Map - mapping between sparse and dense data structures
|
||||
* @param dist - D3Q19 distributions
|
||||
* @param Aq - D3Q7 distribution for component A
|
||||
* @param Bq - D3Q7 distribution for component B
|
||||
* @param Den - density field
|
||||
* @param Phi - phase indicator field
|
||||
* @param Vel - velocity field
|
||||
* @param rhoA - density of component A
|
||||
* @param rhoB - density of component B
|
||||
* @param tauA - relaxation time for component A
|
||||
* @param tauB - relaxation time for component B
|
||||
* @param alpha - parameter to control interfacial tension
|
||||
* @param beta - parameter to control interface width
|
||||
* @param Fx - force in x direction
|
||||
* @param Fy - force in y direction
|
||||
* @param Fz - force in z direction
|
||||
* @param strideY - stride in y-direction for gradient computation
|
||||
* @param strideZ - stride in z-direction for gradient computation
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q19_AAeven_Color(int *Map, double *dist, double *Aq, double *Bq, double *Den, double *Phi,
|
||||
double *Vel, double rhoA, double rhoB, double tauA, double tauB, double alpha, double beta,
|
||||
double Fx, double Fy, double Fz, int strideY, int strideZ, int start, int finish, int Np);
|
||||
|
||||
extern "C" void ScaLBL_D3Q19_AAodd_Color(int *d_neighborList, int *Map, double *dist, double *Aq, double *Bq, double *Den,
|
||||
/**
|
||||
* \brief Color model collision based on AA even access pattern for D3Q19
|
||||
* @param NeighborList - neighbors based on D3Q19 lattice structure
|
||||
* @param Map - mapping between sparse and dense data structures
|
||||
* @param dist - D3Q19 distributions
|
||||
* @param Aq - D3Q7 distribution for component A
|
||||
* @param Bq - D3Q7 distribution for component B
|
||||
* @param Den - density field
|
||||
* @param Phi - phase indicator field
|
||||
* @param Vel - velocity field
|
||||
* @param rhoA - density of component A
|
||||
* @param rhoB - density of component B
|
||||
* @param tauA - relaxation time for component A
|
||||
* @param tauB - relaxation time for component B
|
||||
* @param alpha - parameter to control interfacial tension
|
||||
* @param beta - parameter to control interface width
|
||||
* @param Fx - force in x direction
|
||||
* @param Fy - force in y direction
|
||||
* @param Fz - force in z direction
|
||||
* @param strideY - stride in y-direction for gradient computation
|
||||
* @param strideZ - stride in z-direction for gradient computation
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q19_AAodd_Color(int *NeighborList, int *Map, double *dist, double *Aq, double *Bq, double *Den,
|
||||
double *Phi, double *Vel, double rhoA, double rhoB, double tauA, double tauB, double alpha, double beta,
|
||||
double Fx, double Fy, double Fz, int strideY, int strideZ, int start, int finish, int Np);
|
||||
|
||||
/**
|
||||
* \brief Compute phase field based on AA odd access pattern for D3Q19
|
||||
* @param NeighborList - neighbors based on D3Q19 lattice structure
|
||||
* @param Map - mapping between sparse and dense data structures
|
||||
* @param Aq - D3Q7 distribution for component A
|
||||
* @param Bq - D3Q7 distribution for component B
|
||||
* @param Den - density field
|
||||
* @param Phi - phase indicator field
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_AAodd_PhaseField(int *NeighborList, int *Map, double *Aq, double *Bq,
|
||||
double *Den, double *Phi, int start, int finish, int Np);
|
||||
|
||||
/**
|
||||
* \brief Compute phase field based on AA even access pattern for D3Q19
|
||||
* @param Map - mapping between sparse and dense data structures
|
||||
* @param Aq - D3Q7 distribution for component A
|
||||
* @param Bq - D3Q7 distribution for component B
|
||||
* @param Den - density field
|
||||
* @param Phi - phase indicator field
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_D3Q7_AAeven_PhaseField(int *Map, double *Aq, double *Bq, double *Den, double *Phi,
|
||||
int start, int finish, int Np);
|
||||
|
||||
/**
|
||||
* \brief Initialize phase field for color model
|
||||
* @param Map - mapping between sparse and dense data structures
|
||||
* @param Phi - phase indicator field
|
||||
* @param Den - density field
|
||||
* @param Aq - D3Q7 distribution for component A
|
||||
* @param Bq - D3Q7 distribution for component B
|
||||
* @param start - lattice node to start loop
|
||||
* @param finish - lattice node to finish loop
|
||||
* @param Np - size of local sub-domain (derived from Domain structure)
|
||||
*/
|
||||
extern "C" void ScaLBL_PhaseField_Init(int *Map, double *Phi, double *Den, double *Aq, double *Bq, int start, int finish, int Np);
|
||||
|
||||
|
||||
extern "C" void ScaLBL_D3Q7_AAodd_Color(int *neighborList, int *Map, double *Aq, double *Bq, double *Den,
|
||||
double *Phi, double *ColorGrad, double *Vel, double rhoA, double rhoB, double beta, int start, int finish, int Np);
|
||||
|
||||
@ -303,7 +484,6 @@ extern "C" void ScaLBL_D3Q19_Gradient(int *Map, double *Phi, double *ColorGrad,
|
||||
|
||||
extern "C" void ScaLBL_D3Q19_MixedGradient(int *Map, double *Phi, double *Gradient, int start, int finish, int Np, int Nx, int Ny, int Nz);
|
||||
|
||||
extern "C" void ScaLBL_PhaseField_Init(int *Map, double *Phi, double *Den, double *Aq, double *Bq, int start, int finish, int Np);
|
||||
|
||||
// Density functional hydrodynamics LBM
|
||||
extern "C" void ScaLBL_DFH_Init(double *Phi, double *Den, double *Aq, double *Bq, int start, int finish, int Np);
|
||||
@ -454,12 +634,24 @@ extern "C" void ScaLBL_D3Q7_AAeven_Ion_Flux_DiffAdvcElec_BC_Z(int *list, double
|
||||
extern "C" void ScaLBL_D3Q7_AAodd_Ion_Flux_DiffAdvcElec_BC_z(int *d_neighborList, int *list, double *dist, double Cin, double tau, double *VelocityZ,double *ElectricField,double Di,double zi,double Vt, int count, int Np);
|
||||
extern "C" void ScaLBL_D3Q7_AAodd_Ion_Flux_DiffAdvcElec_BC_Z(int *d_neighborList, int *list, double *dist, double Cout, double tau, double *VelocityZ,double *ElectricField,double Di,double zi,double Vt, int count, int Np);
|
||||
|
||||
/**
|
||||
* \class ScaLBL_Communicator
|
||||
*
|
||||
* @brief Generalized communication routines for lattice Boltzmann methods.
|
||||
*
|
||||
*/
|
||||
class ScaLBL_Communicator{
|
||||
public:
|
||||
//......................................................................................
|
||||
ScaLBL_Communicator(std::shared_ptr <Domain> Dm);
|
||||
/**
|
||||
*\brief Constructor
|
||||
* @param Dm - Domain information
|
||||
*/
|
||||
ScaLBL_Communicator(std::shared_ptr <Domain> Dm);
|
||||
|
||||
//ScaLBL_Communicator(Domain &Dm, IntArray &Map);
|
||||
/**
|
||||
*\brief Destructor
|
||||
*/
|
||||
~ScaLBL_Communicator();
|
||||
//......................................................................................
|
||||
unsigned long int CommunicationCount,SendCount,RecvCount;
|
||||
|
Loading…
Reference in New Issue
Block a user