24#ifndef SUPER_PLANE_INTEGRAL_FLUX_F_2D_HH
25#define SUPER_PLANE_INTEGRAL_FLUX_F_2D_HH
37template<
typename T,
template<
typename,
typename>
class F>
38template<
typename DESCRIPTOR>
48 std::unique_ptr<
SuperF2D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
51 std::forward<decltype(integrationIndicator)>(integrationIndicator),
52 std::forward<decltype(subplaneIndicator)>(subplaneIndicator),
55 this->getName() =
"SuperPlaneIntegralFluxF2D";
58template<
typename T,
template<
typename,
typename>
class F>
59template<
typename DESCRIPTOR>
69 std::unique_ptr<
SuperF2D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
72 std::forward<decltype(integrationIndicator)>(integrationIndicator),
73 std::forward<decltype(subplaneIndicator)>(subplaneIndicator),
76 this->getName() =
"SuperPlaneIntegralFluxF2D";
79template<
typename T,
template<
typename,
typename>
class F>
80template<
typename DESCRIPTOR>
89 std::unique_ptr<
SuperF2D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
92 std::forward<decltype(integrationIndicator)>(integrationIndicator),
95 this->getName() =
"SuperPlaneIntegralFluxF2D";
98template<
typename T,
template<
typename,
typename>
class F>
99template<
typename DESCRIPTOR>
105 std::vector<int> materials,
108 std::unique_ptr<
SuperF2D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
111 std::move(materials),
114 this->
getName() =
"SuperPlaneIntegralFluxF2D";
117template<
typename T,
template<
typename,
typename>
class F>
118template<
typename DESCRIPTOR>
126 std::unique_ptr<
SuperF2D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
131 this->
getName() =
"SuperPlaneIntegralFluxF2D";
137 std::string regionName, std::string fluxSiScaleName, std::string meanSiScaleName)
141 T output[this->getTargetDim()];
142 this->operator()(output, input);
143 if ( regionName !=
"" ) {
144 clout <<
"regionName=" << regionName <<
"; regionSize[m]=" << output[1] << std::flush;
147 clout <<
"regionSize[m]=" << output[1] << std::flush;
150 if ( fluxSiScaleName ==
"MN" ) {
151 std::cout <<
"; force[MN]=" << output[0]/T(1.e6) << std::flush;
153 else if ( fluxSiScaleName ==
"kN") {
154 std::cout <<
"; force[kN]=" << output[0]/T(1.e3) << std::flush;
157 std::cout <<
"; force[N]=" << output[0] << std::flush;
159 if ( meanSiScaleName ==
"mmHg" ) {
160 std::cout <<
"; meanPressure[mmHg]=" <<
util::fabs(output[0])/output[1]/T(133.322) << std::endl;
163 std::cout <<
"; meanPressure[Pa]=" <<
util::fabs(output[0])/output[1] << std::endl;
171 std::string regionName, std::string fluxSiScaleName, std::string meanSiScaleName)
175 T output[this->getTargetDim()];
176 this->operator()(output, input);
177 if ( regionName !=
"" ) {
178 clout <<
"regionName=" << regionName <<
"; regionSize[m]=" << output[1] << std::flush;
181 clout <<
"regionSize[m]=" << output[1] << std::flush;
184 std::cout <<
"; flowRate[m^2/s]=" << output[0] << std::flush;
185 if ( meanSiScaleName ==
"mm/s" ) {
186 std::cout <<
"; meanVelocity[mm/s]=" << output[0]/output[1]*T(1.e3) << std::endl;
189 std::cout <<
"; meanVelocity[m/s]=" << output[0]/output[1] << std::endl;
Smart pointer for managing the various ways of passing functors around.
std::string & getName()
read and write access to name
Parametrization of a hyperplane lattice (i.e. a line lattice).
IndicatorF2D is an application from .
class for marking output with some text
represents all functors that operate on a SuperStructure<T,2> in general
Representation of a statistic for a parallel 2D geometry.
Super class maintaining block lattices for a cuboid decomposition.
Surface integral of a subset of a interpolated hyperplane.
Template class for building flux integrals based on SuperLatticePhysF2D functors.
SuperPlaneIntegralFluxF2D(SuperLattice< T, DESCRIPTOR > &sLattice, const UnitConverter< T, DESCRIPTOR > &converter, SuperGeometry< T, 2 > &geometry, const HyperplaneLattice2D< T > &hyperplaneLattice, FunctorPtr< SuperIndicatorF2D< T > > &&integrationIndicator, FunctorPtr< IndicatorF2D< T > > &&subplaneIndicator, BlockDataReductionMode mode=BlockDataReductionMode::Analytical)
void print(std::string regionName="", std::string fluxSiScaleName="N", std::string meanSiScaleName="Pa")
void print(std::string regionName="", std::string fluxSiScaleName="m^2/s", std::string meanSiScaleName="m/s")
Conversion between physical and lattice units, as well as discretization.
Groups all include files for the directory genericFunctions.
cpu::simd::Pack< T > fabs(cpu::simd::Pack< T > value)
Top level namespace for all of OpenLB.
BlockDataReductionMode
Mode of reducing block data from given, possibly higher dimensional data.
Definition of a analytical line embedded in 2D space.