24#ifndef SUPER_LATTICE_REFINEMENT_METRIC_F_3D_HH
25#define SUPER_LATTICE_REFINEMENT_METRIC_F_3D_HH
34template<
typename T,
typename DESCRIPTOR>
49template<
typename T,
typename DESCRIPTOR>
55 this->
getName() =
"refinementMetricKnudsen";
65template<
typename T,
typename DESCRIPTOR>
68 auto& load = this->_sLattice.getLoadBalancer();
70 if (load.isLocal(glob)) {
71 const int loc = load.loc(glob);
80template<
typename T,
typename DESCRIPTOR>
83 const int nC = this->_sLattice.getCuboidGeometry().getNc();
85 std::vector<T> factors(nC, T{});
88 auto& load = this->_sLattice.getLoadBalancer();
90 for (
int iC = 0; iC < load.size(); ++iC) {
91 this->getBlockF(iC)(output, iC);
93 factors[load.glob(iC)] = output[0];
98 for (
int i = 0; i < nC; ++i) {
99#ifdef PARALLEL_MODE_MPI
103 clout <<
"factors[" << i <<
"]: " << factors[i] << std::endl;
108template<
typename T,
typename DESCRIPTOR>
113 this->
getName() =
"high_order_knudsen";
std::string & getName()
read and write access to name
class for marking output with some text
std::vector< std::unique_ptr< BlockF3D< T > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
represents all functors that operate on a SuperLattice in general, e.g. getVelocity(),...
SuperLatticeHighOrderKnudsen3D(SuperLattice< T, DESCRIPTOR > &lattice)
SuperLatticeKnudsen3D(SuperLattice< T, DESCRIPTOR > &lattice)
void print()
Convenience method for printing per-block refinement factors.
bool operator()(T output[], int glob)
SuperLatticeRefinementMetricKnudsen3D(SuperLattice< T, DESCRIPTOR > &lattice, const UnitConverter< T, DESCRIPTOR > &converter)
Constructor.
Super class maintaining block lattices for a cuboid decomposition.
BlockLattice< T, DESCRIPTOR > & getBlock(int locC)
Return BlockLattice with local index locC.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
Conversion between physical and lattice units, as well as discretization.
void sendToMaster(T *sendBuf, int sendCount, bool iAmRoot, MPI_Comm comm=MPI_COMM_WORLD)
Sends data to master processor.
Top level namespace for all of OpenLB.