24#ifndef SUPER_PLANE_INTEGRAL_FLUX_F_3D_HH
25#define SUPER_PLANE_INTEGRAL_FLUX_F_3D_HH
37template<
typename T,
template<
typename,
typename>
class F>
38template<
typename DESCRIPTOR>
48 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
51 std::forward<decltype(integrationIndicator)>(integrationIndicator),
52 std::forward<decltype(subplaneIndicator)>(subplaneIndicator),
55 this->getName() =
"SuperPlaneIntegralFluxF3D";
58template<
typename T,
template<
typename,
typename>
class F>
59template<
typename DESCRIPTOR>
69 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
72 std::forward<decltype(integrationIndicator)>(integrationIndicator),
73 std::forward<decltype(subplaneIndicator)>(subplaneIndicator),
76 this->getName() =
"SuperPlaneIntegralFluxF3D";
79template<
typename T,
template<
typename,
typename>
class F>
80template<
typename DESCRIPTOR>
89 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
92 std::forward<decltype(integrationIndicator)>(integrationIndicator),
95 this->getName() =
"SuperPlaneIntegralFluxF3D";
98template<
typename T,
template<
typename,
typename>
class F>
99template<
typename DESCRIPTOR>
105 std::vector<int> materials,
108 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
111 std::move(materials),
114 this->getName() =
"SuperPlaneIntegralFluxF3D";
117template<
typename T,
template<
typename,
typename>
class F>
118template<
typename DESCRIPTOR>
126 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
131 this->getName() =
"SuperPlaneIntegralFluxF3D";
134template<
typename T,
template<
typename,
typename>
class F>
135template<
typename DESCRIPTOR>
141 std::vector<int> materials,
144 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
147 std::move(materials),
150 this->
getName() =
"SuperPlaneIntegralFluxF3D";
153template<
typename T,
template<
typename,
typename>
class F>
154template<
typename DESCRIPTOR>
162 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
167 this->
getName() =
"SuperPlaneIntegralFluxF3D";
170template<
typename T,
template<
typename,
typename>
class F>
171template<
typename DESCRIPTOR>
177 std::vector<int> materials,
180 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
183 std::move(materials),
186 this->
getName() =
"SuperPlaneIntegralFluxF3D";
189template<
typename T,
template<
typename,
typename>
class F>
190template<
typename DESCRIPTOR>
198 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
203 this->
getName() =
"SuperPlaneIntegralFluxF3D";
206template<
typename T,
template<
typename,
typename>
class F>
207template<
typename DESCRIPTOR>
213 std::vector<int> materials,
216 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
219 std::move(materials),
222 this->
getName() =
"SuperPlaneIntegralFluxF3D";
225template<
typename T,
template<
typename,
typename>
class F>
226template<
typename DESCRIPTOR>
234 std::unique_ptr<
SuperF3D<T>>(new F<T, DESCRIPTOR>(sLattice, converter)),
239 this->
getName() =
"SuperPlaneIntegralFluxF3D";
244 std::string regionName, std::string fluxSiScaleName, std::string meanSiScaleName)
248 T output[this->getTargetDim()];
249 this->operator()(output, input);
250 if ( regionName !=
"" ) {
251 clout <<
"regionName=" << regionName <<
"; regionSize[m^2]=" << output[1]
255 clout <<
"regionSize[m^2]=" << output[1] << std::flush;
258 if ( fluxSiScaleName ==
"MN" ) {
259 std::cout <<
"; force[MN]=" << output[0] / T(1.e6) << std::flush;
261 else if ( fluxSiScaleName ==
"kN" ) {
262 std::cout <<
"; force[kN]=" << output[0] / T(1.e3) << std::flush;
265 std::cout <<
"; force[N]=" << output[0] << std::flush;
267 if ( meanSiScaleName ==
"mmHg" ) {
268 std::cout <<
"; meanPressure[mmHg]=" <<
util::abs(output[0])/output[1]/T(133.322) << std::endl;
271 std::cout <<
"; meanPressure[Pa]=" <<
util::abs(output[0])/output[1] << std::endl;
279 std::string regionName, std::string fluxSiScaleName, std::string meanSiScaleName)
283 T output[this->getTargetDim()];
284 this->operator()(output, input);
285 if ( regionName !=
"" ) {
286 clout <<
"regionName=" << regionName <<
"; regionSize[m^2]=" << output[1]
290 clout <<
"regionSize[m^2]=" << output[1] << std::flush;
293 if ( fluxSiScaleName ==
"ml/s" ) {
294 std::cout <<
"; volumetricFlowRate[ml/s]=" << output[0] * T(1.e6)
297 else if ( fluxSiScaleName ==
"l/s" ) {
298 std::cout <<
"; volumetricFlowRate[l/s]=" << output[0] * T(1.e3)
302 std::cout <<
"; volumetricFlowRate[m^3/s]=" << output[0] << std::flush;
304 if ( meanSiScaleName ==
"mm/s" ) {
305 std::cout <<
"; meanVelocity[mm/s]=" << output[0] / output[1] * T(1.e3)
309 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.
indicator function for a 3D circle
IndicatorF2D is an application from .
class for marking output with some text
represents all functors that operate on a SuperStructure<T,3> in general
Representation of a statistic for a parallel 2D geometry.
Base indicator functor (discrete)
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 SuperLatticePhysF3D functors.
SuperPlaneIntegralFluxF3D(SuperLattice< T, DESCRIPTOR > &sLattice, const UnitConverter< T, DESCRIPTOR > &converter, SuperGeometry< T, 3 > &geometry, const HyperplaneLattice3D< T > &hyperplaneLattice, FunctorPtr< SuperIndicatorF3D< 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^3/s", std::string meanSiScaleName="m/s")
Conversion between physical and lattice units, as well as discretization.
Groups all include files for the directory genericFunctions.
ADf< T, DIM > abs(const ADf< T, DIM > &a)
Top level namespace for all of OpenLB.
BlockDataReductionMode
Mode of reducing block data from given, possibly higher dimensional data.
Definition of a analytical 2D plane embedded in 3D space.