OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION > Struct Template Reference

#include <forcing.h>

+ Collaboration diagram for olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >:

Public Types

using MomentaF = typename Forced<MOMENTA>::template type<DESCRIPTOR>
 
using CollisionO = typename COLLISION::template type<DESCRIPTOR,Forced<MOMENTA>,EQUILIBRIUM>
 

Public Member Functions

template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Static Public Attributes

static constexpr bool is_vectorizable
 

Detailed Description

template<template< typename > typename Forced = momenta::Forced>
template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM, typename COLLISION>
struct olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >

Definition at line 163 of file forcing.h.

Member Typedef Documentation

◆ CollisionO

template<template< typename > typename Forced = momenta::Forced>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::CollisionO = typename COLLISION::template type<DESCRIPTOR,Forced<MOMENTA>,EQUILIBRIUM>

Definition at line 165 of file forcing.h.

◆ MomentaF

template<template< typename > typename Forced = momenta::Forced>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::MomentaF = typename Forced<MOMENTA>::template type<DESCRIPTOR>

Definition at line 164 of file forcing.h.

Member Function Documentation

◆ apply()

template<template< typename > typename Forced = momenta::Forced>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 175 of file forcing.h.

175 {
176 V u[DESCRIPTOR::d];
177 MomentaF().computeU(cell, u);
178 CollisionO().apply(cell, parameters);
179 const V omega = parameters.template get<descriptors::OMEGA>();
180 const auto force = cell.template getField<descriptors::FORCE>();
181 const auto rho = cell.template getField<descriptors::RHO>();
182 const auto gradRho = cell.template getField<descriptors::NABLARHO>();
183 lbm<DESCRIPTOR>::addLiangForce(cell, rho, gradRho, u, omega, force);
184 return {rho, util::normSqr<V,DESCRIPTOR::d>(u)};
185 };
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
Definition util.h:145
typename Forced< MOMENTA >::template type< DESCRIPTOR > MomentaF
Definition forcing.h:164
typename COLLISION::template type< DESCRIPTOR, Forced< MOMENTA >, EQUILIBRIUM > CollisionO
Definition forcing.h:165
static void addLiangForce(CELL &cell, const RHO &rho, const NABLARHO &nablarho, const U &u, const OMEGA &omega, const FORCE &force) any_platform
Add a force term after BGK collision for incompressible binary fluid model (Allen-Cahn phase-field) f...
Definition lbm.h:570

References olb::lbm< DESCRIPTOR >::addLiangForce(), and olb::util::normSqr().

+ Here is the call graph for this function:

Member Data Documentation

◆ is_vectorizable

template<template< typename > typename Forced = momenta::Forced>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
bool olb::forcing::Liang< Forced >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::is_vectorizable
staticconstexpr
Initial value:
= dynamics::is_vectorizable_v<CollisionO>
&& !std::is_same_v<MOMENTA, momenta::IncBulkTuple<momenta::ForcedMomentum<momenta::IncompressibleBulkMomentum>>>

Definition at line 167 of file forcing.h.


The documentation for this struct was generated from the following file: