45 bool includeOuterCells =
false;
47 if (indicator->getSuperGeometry().getOverlap() == 1) {
48 includeOuterCells =
true;
49 clout <<
"WARNING: overlap == 1, boundary conditions set on overlap despite unknown neighbor materials" << std::endl;
51 for (
int iCloc = 0; iCloc < sLattice.
getLoadBalancer().size(); ++iCloc) {
52 setFreeEnergyInletBoundary<T,DESCRIPTOR, MixinDynamics>(sLattice.
getBlock(iCloc), omega,
53 indicator->getBlockIndicatorF(iCloc), type, latticeNumber, includeOuterCells);
56 addPoints2CommBC<T,DESCRIPTOR>(sLattice, std::forward<
decltype(indicator)>(indicator), _overlap);
62 int latticeNumber,
bool includeOuterCells)
67 const int margin = includeOuterCells ? 0 : 1;
68 std::vector<int> discreteNormal(3, 0);
69 blockGeometryStructure.forSpatialLocations([&](
auto iX,
auto iY) {
70 if (blockGeometryStructure.getNeighborhoodRadius({iX, iY}) >= margin
71 && indicator(iX, iY)) {
72 discreteNormal = blockGeometryStructure.getStatistics().getType(iX,iY);
73 if (discreteNormal[0] == 0) {
75 if (discreteNormal[1] == -1) {
77 if (latticeNumber == 1) {
79 if (type ==
"density") {
96 else if (discreteNormal[1] == 1) {
97 if (latticeNumber == 1) {
98 if (type ==
"density") {
111 dynamics = block.template getDynamics<FreeEnergyInletOutletDynamics<T,DESCRIPTOR,0,1>>();
116 else if (discreteNormal[2] == -1) {
117 if (latticeNumber == 1) {
118 if (type ==
"density") {
136 else if (discreteNormal[2] == 1) {
137 if (latticeNumber == 1) {
138 if (type ==
"density") {
151 dynamics = block.template getDynamics<FreeEnergyInletOutletDynamics<T,DESCRIPTOR,1,1>>();
156 if (latticeNumber != 1) {
160 if ( latticeNumber == 1){
163 olb::boundaryhelper::promisePostProcessorForNormal<T,DESCRIPTOR, FreeEnergyChemPotBoundaryProcessor2DA>(
168 olb::boundaryhelper::promisePostProcessorForNormal<T,DESCRIPTOR, FreeEnergyChemPotBoundaryProcessor2DB>(
172 dynamics->
getParameters(block).template set<descriptors::OMEGA>(omega);
178 clout <<
"setFreeEnergyInletBoundary<" <<
"," <<
">(" << iX <<
", "<< iY <<
")" << std::endl;
virtual void addPostProcessor(std::type_index stage, LatticeR< DESCRIPTOR::d > latticeR, PostProcessorPromise< T, DESCRIPTOR > &&promise)=0
Schedule post processor for application to latticeR in stage.
void setFreeEnergyInletBoundary(SuperLattice< T, DESCRIPTOR > &sLattice, T omega, SuperGeometry< T, 2 > &superGeometry, int material, std::string type, int latticeNumber)
Implementation of a inlet boundary condition for the partner lattices of the binary or ternary free e...
void setBoundary(BlockLattice< T, DESCRIPTOR > &block, int iX, int iY, Dynamics< T, DESCRIPTOR > *dynamics, PostProcessorGenerator2D< T, DESCRIPTOR > *postProcessor)
virtual AbstractParameters< T, DESCRIPTOR > & getParameters(BlockLattice< T, DESCRIPTOR > &block)=0
Parameters access for legacy post processors.
Communication after propagation.