Namespaces | Classes | Typedefs | Functions | Variables

olb Namespace Reference

All OpenLB code is contained in this namespace. More...

Namespaces

namespace  algorithm
namespace  descriptors
 

Descriptors for the 2D and 3D lattices.


namespace  dynamicParams
namespace  fd
namespace  graphics
namespace  IndexOrdering
namespace  instances
namespace  multiPhysics
namespace  neqPiD2Q9
 

Compute Pi tensor efficiently on D2Q9 lattice.


namespace  singleton
namespace  util
namespace  utilAdvDiff

Classes

class  ExtendedStraightFdBoundaryPostProcessor2D
class  ExtendedStraightFdBoundaryProcessorGenerator2D
class  ExtendedFdBoundaryManager2D
class  ExtendedFdPlaneBoundaryPostProcessor3D
class  ExtendedFdPlaneBoundaryProcessorGenerator3D
class  ExtendedFdBoundaryManager3D
class  InamuroAnalyticalDynamics
class  InamuroBoundaryManager2D
class  InamuroBoundaryManager3D
class  InamuroNewtonRaphsonDynamics
class  ZouHeBoundaryManager2D
class  ZouHeBoundaryManager3D
class  ZouHeDynamics
class  AdvectionDiffusionBoundariesDynamics
class  AdvectionDiffusionEdgesDynamics
class  AdvectionDiffusionCornerDynamics2D
class  AdvectionDiffusionCornerDynamics3D
class  OnLatticeAdvectionDiffusionBoundaryCondition2D
class  AdvectionDiffusionBoundaryManager2D
class  OnLatticeAdvectionDiffusionBoundaryCondition3D
class  AdvectionDiffusionBoundaryManager3D
class  AdvectionDiffusionBoundaryConditionInstantiator2D
class  AdvectionDiffusionBoundaryConditionInstantiator3D
class  AdvectionDiffusionRLBdynamics
class  AdvectionDiffusionBGKdynamics
struct  advectionDiffusionLbHelpers
 All helper functions are inside this structure. More...
struct  adLbDynamicsHelpers
 All helper functions are inside this structure. More...
struct  adLbDynamicsHelpers< T, descriptors::D2Q5DescriptorBase< T > >
struct  adLbDynamicsHelpers< T, descriptors::D3Q7DescriptorBase< T > >
struct  AdvectionDiffusionBulkMomenta
 Standard computation of velocity momenta in the bulk. More...
class  AdvectionDiffusionUnitLB
 A useful class for the conversion between dimensionless and lattice units. More...
class  ChopardDynamics
 Implementation of the BGK collision step. More...
class  EntropicDynamics
 Implementation of the entropic collision step. More...
class  ForcedEntropicDynamics
 Implementation of the forced entropic collision step. More...
struct  entropicLbHelpers
struct  entropicLbHelpers< T, descriptors::D2Q9Descriptor >
struct  entropicLbHelpers< T, descriptors::D3Q19Descriptor >
class  ForcedShanChenCouplingPostProcessor2D
class  ForcedShanChenCouplingGenerator2D
class  ForcedShanChenCouplingPostProcessor3D
class  ForcedShanChenCouplingGenerator3D
class  MRTdynamics
 Implementation of the entropic collision step. More...
struct  mrtHelpers
 All helper functions are inside this structure. More...
struct  mrtHelpers< T, descriptors::MRTD2Q9Descriptor >
struct  mrtHelpers< T, descriptors::MRTD3Q19Descriptor >
class  NavierStokesAdvectionDiffusionCouplingPostProcessor2D
class  NavierStokesAdvectionDiffusionCouplingGenerator2D
class  NavierStokesAdvectionDiffusionCouplingPostProcessor3D
class  NavierStokesAdvectionDiffusionCouplingGenerator3D
class  Communicator2D
class  Communicator3D
class  Cuboid2D
class  Cuboid3D
class  CuboidGeometry2D
 A cuboid structure represents the grid of a considered domain. More...
class  CuboidGeometry3D
 A cuboid structure represents the grid of a considered domain. More...
struct  Cell2D
class  CuboidNeighbourhood2D
struct  Cell3D
class  CuboidNeighbourhood3D
class  CuboidVTKout2D
class  CuboidVTKout3D
class  sOnLatticeBoundaryCondition2D
 A helper for initialising 2D boundaries for super lattices. More...
class  sOnLatticeBoundaryCondition3D
 A helper for initialising 3D boundaries for super lattices. More...
class  SuperLattice2D
class  SuperLattice3D
struct  MultiBlockHandler2D
class  SerialMultiBlockHandler2D
struct  MultiBlockHandler3D
class  SerialMultiBlockHandler3D
class  MultiBlockLattice2D
 A complex BlockStructure, itself decomposed into smaller components. More...
class  MultiBlockSerializerPolicy2D
class  MultiBlockUnSerializerPolicy2D
class  MultiBlockLattice3D
 A complex BlockStructure, itself decomposed into smaller components. More...
class  MultiBlockSerializerPolicy3D
class  MultiBlockUnSerializerPolicy3D
class  MultiBlockReductor
struct  MultiAnalysisFieldsImpl2D
class  MultiDataAnalysis2D
 Data analysis on serial block lattices, using serial data fields. More...
struct  MultiAnalysisFieldsImpl3D
class  MultiDataAnalysis3D
 Data analysis on serial block lattices, using serial data fields. More...
struct  MultiDataFieldHandler2D
class  SerialMultiDataFieldHandler2D
struct  MultiDataFieldHandler3D
class  SerialMultiDataFieldHandler3D
class  MultiScalarField2D
 Multi-block parallel implementation of scalar, vector and tensor fields for 2D data analysis. More...
class  MultiTensorField2D
class  ParallelScalarFieldSerializerPolicy2D
class  ParallelScalarFieldUnSerializerPolicy2D
class  ParallelTensorFieldSerializerPolicy2D
class  ParallelTensorFieldUnSerializerPolicy2D
class  MultiScalarField3D
 Multi-block parallel implementation of scalar, vector and tensor fields for 3D data analysis. More...
class  MultiTensorField3D
class  ParallelScalarFieldSerializerPolicy3D
class  ParallelScalarFieldUnSerializerPolicy3D
class  ParallelTensorFieldSerializerPolicy3D
class  ParallelTensorFieldUnSerializerPolicy3D
struct  BlockCoordinates2D
 Coordinates of a single BlockStructure within a MultiBlock. More...
class  BlockParameters2D
class  Overlap2D
class  MultiDataDistribution2D
class  RelevantIndexes2D
 Indexes of Blocks and Overlaps which are relevant in the parallel case. More...
struct  BlockCoordinates3D
 Coordinates of a single BlockStructure within a MultiBlock. More...
class  BlockParameters3D
class  Overlap3D
class  MultiDataDistribution3D
class  RelevantIndexes3D
 Indexes of Blocks and Overlaps which are relevant in the parallel case. More...
struct  MultiSerializerPolicy2D
struct  MultiUnSerializerPolicy2D
class  MultiSerializer2D
class  MultiUnSerializer2D
struct  MultiSerializerPolicy3D
struct  MultiUnSerializerPolicy3D
class  MultiSerializer3D
class  MultiUnSerializer3D
struct  AnalysisFlags3D
struct  AnalysisFlags2D
class  BlockGeometry2D
class  BlockGeometry3D
class  BlockGeometryStatistics2D
class  BlockGeometryStatistics3D
 Reader for Nastran 3D voxel mesh files generated by HyperMesh. More...
class  BlockLattice2D
 A regular lattice for highly efficient 2D LB dynamics. More...
class  BlockLatticeSerializer2D
class  BlockLatticeUnSerializer2D
class  BlockLattice3D
 A regular lattice for highly efficient 3D LB dynamics. More...
class  BlockLatticeSerializer3D
class  BlockLatticeUnSerializer3D
class  BlockLatticeView2D
 A rectangular extract from a given BlockStructure. More...
class  BlockLatticeView3D
class  BlockStructure2D
 An interface to all the variants of (more or less) regular lattices. More...
class  BlockStructure3D
class  OnLatticeBoundaryCondition2D
class  RegularizedBoundaryManager2D
class  InterpolationBoundaryManager2D
class  OnLatticeBoundaryCondition3D
class  RegularizedBoundaryManager3D
class  InterpolationBoundaryManager3D
class  BoundaryConditionInstantiator2D
class  BoundaryConditionInstantiator3D
class  StraightFdBoundaryProcessor2D
class  StraightFdBoundaryProcessorGenerator2D
class  OuterVelocityCornerProcessor2D
class  OuterVelocityCornerProcessorGenerator2D
class  PlaneFdBoundaryProcessor3D
class  PlaneFdBoundaryProcessorGenerator3D
class  OuterVelocityEdgeProcessor3D
class  OuterVelocityEdgeProcessorGenerator3D
class  OuterVelocityCornerProcessor3D
class  OuterVelocityCornerProcessorGenerator3D
class  Cell
 A LB lattice cell. More...
struct  WriteCellFunctional
struct  d3q13Helpers
 Helper functions for the (somewhat special) D3Q13 lattice. More...
struct  AnalysisFieldsImpl2D
struct  AnalysisFields2D
class  DataAnalysis2D
 Data analysis on serial block lattices, using serial data fields. More...
struct  AnalysisFieldsImpl3D
struct  AnalysisFields3D
class  DataAnalysis3D
 Data analysis on serial block lattices, using serial data fields. More...
class  DataAnalysisBase2D
 Interface for the variants of 2D data analysis classes. More...
class  DataAnalysisBase3D
 Interface for the variants of 3D data analysis classes. More...
class  ScalarFieldBase2D
 Interface for the variants of 2D scalar, vector and tensor fields. More...
class  TensorFieldBase2D
class  ScalarFieldBase3D
 Interface for the variants of 3D scalar, vector and tensor fields. More...
class  TensorFieldBase3D
class  ScalarField2D
class  TensorField2D
class  SequentialScalarFieldSerializer2D
class  SequentialScalarFieldUnSerializer2D
class  SequentialTensorFieldSerializer2D
class  SequentialTensorFieldUnSerializer2D
class  ScalarField3D
class  TensorField3D
class  SequentialScalarFieldSerializer3D
class  SequentialScalarFieldUnSerializer3D
class  SequentialTensorFieldSerializer3D
class  SequentialTensorFieldUnSerializer3D
class  DataReduction
class  MinReduction
class  MaxReduction
class  AverageReduction
class  NormSqrReduction
struct  Dynamics
 Interface for the dynamics classes. More...
struct  Momenta
 Interface for classes that compute velocity momenta. More...
class  BasicDynamics
 Abstract base for dynamics classes. More...
class  BGKdynamics
 Implementation of the BGK collision step. More...
class  ConstRhoBGKdynamics
 Implementation of the pressure-corrected BGK collision step. More...
class  IncBGKdynamics
 Implementation of the so-called incompressible collision step. More...
class  RLBdynamics
 Implementation of the Regularized BGK collision step. More...
class  CombinedRLBdynamics
 Implementation of Regularized BGK collision, followed by any Dynamics. More...
class  ForcedBGKdynamics
 Implementation of the BGK collision step with external force. More...
class  D3Q13dynamics
 Implementation of the 3D D3Q13 dynamics. More...
struct  BulkMomenta
 Standard computation of velocity momenta in the bulk. More...
struct  ExternalVelocityMomenta
 Velocity is stored in external scalar (and computed e.g. in a PostProcessor) More...
class  BounceBack
 Implementation of "bounce-back" dynamics. More...
class  NoDynamics
 Implementation of a "dead cell" that does nothing. More...
struct  firstOrderLbHelpers
 General first-order functions. More...
struct  rlbHelpers
 Specific helper functions for RLB dynamics. More...
struct  rlbHelpers< T, descriptors::D2Q9Descriptor >
class  heuristicLoadBalancer
struct  lbHelpers
 This structure forwards the calls to the appropriate helper class. More...
struct  lbDynamicsHelpers
 All helper functions are inside this structure. More...
struct  lbExternalHelpers
 Helper functions for dynamics that access external field. More...
struct  lbLatticeHelpers
 Helper functions with full-lattice access. More...
struct  BoundaryHelpers
 All boundary helper functions are inside this structure. More...
struct  lbDynamicsHelpers< T, descriptors::D2Q9DescriptorBase< T > >
struct  lbExternalHelpers< T, descriptors::ForcedD2Q9Descriptor >
struct  lbLatticeHelpers< T, descriptors::D2Q9Descriptor >
struct  lbLatticeHelpers< T, descriptors::ForcedD2Q9Descriptor >
struct  lbDynamicsHelpers< T, descriptors::D3Q19DescriptorBase< T > >
struct  lbLatticeHelpers< T, descriptors::D3Q19Descriptor >
struct  lbLatticeHelpers< T, descriptors::ForcedD3Q19Descriptor >
struct  lbDynamicsHelpers< T, descriptors::D3Q15DescriptorBase< T > >
struct  lbLatticeHelpers< T, descriptors::D3Q15Descriptor >
struct  lbLatticeHelpers< T, descriptors::ForcedD3Q15Descriptor >
class  loadBalancer
class  DirichletBoundaryMomenta
 Dirichlet condition on velocity and/or pressure. More...
class  EquilibriumBM
class  VelocityBM
 Computation of velocity momenta on a velocity boundary. More...
class  PressureBM
 Computation of velocity momenta on a velocity boundary. More...
class  FreeStressBM
 Here, the stress is computed from the particle distribution functions. More...
class  BasicDirichletBM
 Use special trick to compute u resp. rho, but compute pi from part. distr. functions. More...
class  RegularizedBM
 Computation of the stress tensor for regularized boundary. More...
class  RegularizedVelocityBM
 Regularized velocity boundary node. More...
class  RegularizedPressureBM
 Regularized pressure boundary node. More...
class  FixedVelocityBM
 In this class, the velocity is fixed. More...
class  InnerCornerVelBM2D
class  InnerEdgeVelBM3D
class  InnerCornerVelBM3D
struct  Reductor
struct  PostProcessor2D
 Interface of 2D post-processing steps. More...
class  PostProcessorGenerator2D
class  LatticeCouplingGenerator2D
struct  LocalPostProcessor2D
struct  GlobalPostProcessor2D
struct  PostProcessor3D
class  PostProcessorGenerator3D
class  LatticeCouplingGenerator3D
struct  LocalPostProcessor3D
struct  GlobalPostProcessor3D
class  LatticeStatistics
struct  StatisticsPostProcessor2D
class  StatPPGenerator2D
struct  StatisticsPostProcessor3D
class  StatPPGenerator3D
struct  DataSerializer
struct  DataUnSerializer
class  ScalingSerializer
class  TypeConversionSerializer
struct  Serializable
class  TypeConversionSerializer< T, T >
 Specialization of TypeConversionSerializer in case T==TConv, for efficiency reasons. More...
struct  SpatiallyExtendedObject2D
struct  SpatiallyExtendedObject3D
class  LBunits
 Conversion between dimensionless and lattice units with on-lattice boundaries. More...
class  LBconverter
struct  DistinctUint< true >
struct  DistinctUint< false >
class  Base64Encoder
class  Base64Decoder
class  NastranVoxelMeshReader3D
 Reader for Nastran 3D voxel mesh files generated by HyperMesh. More...
class  OMBuf
 userdefined stream buffer for OstreamManager More...
class  OstreamManager
 class for marking output with some text More...
class  ParBuf
class  olb_ofstream
class  olb_ifstream
class  olb_fstream
class  STLreader
class  VtkDataWriter3D
class  VtkImageOutput2D
class  VtkImageOutput3D
class  VtkTypeNames
class  XMLreader

Typedefs

typedef ScalarField2D
< unsigned char > 
CellTypeField2D
typedef ScalarField3D
< unsigned char > 
CellTypeField3D
typedef DistinctUint< sizeof(unsigned
int)==sizeof(size_t)>::T1 
T1
typedef DistinctUint< sizeof(unsigned
int)==sizeof(size_t)>::T2 
T2
typedef cvmlcpp::DTreeProxy
< int, 3 > 
DNode3D

Functions

template
OnLatticeBoundaryCondition2D
< double,
descriptors::D2Q9Descriptor > * 
createExtendedFdBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > (BlockStructure2D< double, descriptors::D2Q9Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createExtendedFdBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createExtendedFdBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template
OnLatticeBoundaryCondition3D
< double,
descriptors::D3Q19Descriptor > * 
createExtendedFdBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > (BlockStructure3D< double, descriptors::D3Q19Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createExtendedFdBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createExtendedFdBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template
OnLatticeBoundaryCondition2D
< double,
descriptors::D2Q9Descriptor > * 
createInamuroBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > (BlockStructure2D< double, descriptors::D2Q9Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createInamuroBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createInamuroBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template
OnLatticeBoundaryCondition3D
< double,
descriptors::D3Q19Descriptor > * 
createInamuroBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > (BlockStructure3D< double, descriptors::D3Q19Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createInamuroBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createInamuroBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template
OnLatticeBoundaryCondition2D
< double,
descriptors::D2Q9Descriptor > * 
createZouHeBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > (BlockStructure2D< double, descriptors::D2Q9Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createZouHeBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createZouHeBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template
OnLatticeBoundaryCondition3D
< double,
descriptors::D3Q19Descriptor > * 
createZouHeBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > (BlockStructure3D< double, descriptors::D3Q19Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createZouHeBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createZouHeBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeAdvectionDiffusionBoundaryCondition2D
< T, Lattice > * 
createAdvectionDiffusionBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeAdvectionDiffusionBoundaryCondition2D
< T, Lattice > * 
createAdvectionDiffusionBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeAdvectionDiffusionBoundaryCondition3D
< T, Lattice > * 
createAdvectionDiffusionBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeAdvectionDiffusionBoundaryCondition3D
< T, Lattice > * 
createAdvectionDiffusionBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename NSU > class NSLattice, template< typename ADU > class ADLattice>
void writeLogFile (AdvectionDiffusionUnitLB< T, NSLattice, ADLattice > const &converter, std::string const &title)
template void createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > (sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &sBC)
template void createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor > (sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &sBC)
template void createInterpBoundaryCondition2D< double, descriptors::D2Q9Descriptor, RLBdynamics< double, descriptors::D2Q9Descriptor > > (sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &sBC)
template void createInterpBoundaryCondition2D< double, descriptors::D2Q9Descriptor > (sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &sBC)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void createLocalBoundaryCondition2D (sOnLatticeBoundaryCondition2D< T, Lattice > &sBC)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void createInterpBoundaryCondition2D (sOnLatticeBoundaryCondition2D< T, Lattice > &sBC)
template<typename T , template< typename U > class Lattice>
void createLocalBoundaryCondition2D (sOnLatticeBoundaryCondition2D< T, Lattice > &sBC)
template<typename T , template< typename U > class Lattice>
void createInterpBoundaryCondition2D (sOnLatticeBoundaryCondition2D< T, Lattice > &sBC)
template void createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > (sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &sBC)
template void createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor > (sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &sBC)
template void createInterpBoundaryCondition3D< double, descriptors::D3Q19Descriptor, RLBdynamics< double, descriptors::D3Q19Descriptor > > (sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &sBC)
template void createInterpBoundaryCondition3D< double, descriptors::D3Q19Descriptor > (sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &sBC)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void createLocalBoundaryCondition3D (sOnLatticeBoundaryCondition3D< T, Lattice > &sBC)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void createInterpBoundaryCondition3D (sOnLatticeBoundaryCondition3D< T, Lattice > &sBC)
template<typename T , template< typename U > class Lattice>
void createLocalBoundaryCondition3D (sOnLatticeBoundaryCondition3D< T, Lattice > &sBC)
template<typename T , template< typename U > class Lattice>
void createInterpBoundaryCondition3D (sOnLatticeBoundaryCondition3D< T, Lattice > &sBC)
MultiDataDistribution2D createRegularDataDistribution (int nx, int ny, int numBlocksX, int numBlocksY, int envelopeWidth)
 Create a nx-by-ny data distribution.
MultiDataDistribution2D createRegularDataDistribution (int nx, int ny, int envelopeWidth=1)
 Create a data distribution with regular blocks, as evenly distributed as possible.
MultiDataDistribution2D createXSlicedDataDistribution2D (CellTypeField2D const &cellTypeField, int numBlocks, int envelopeWidth)
MultiDataDistribution2D createYSlicedDataDistribution2D (CellTypeField2D const &cellTypeField, int numBlocks, int envelopeWidth)
 cf above.
MultiDataDistribution2D createXSlicedDataDistribution2D (CellTypeField2D const &cellTypeField, int envelopeWidth)
MultiDataDistribution2D createYSlicedDataDistribution2D (CellTypeField2D const &cellTypeField, int envelopeWidth=1)
 cf above
MultiDataDistribution3D createRegularDataDistribution (int nx, int ny, int nz, int numBlocksX, int numBlocksY, int numBlocksZ, int envelopeWidth)
 Create a nx-by-ny-by-nz data distribution.
MultiDataDistribution3D createRegularDataDistribution (int nx, int ny, int nz, int envelopeWidth=1)
 Create a data distribution with regular blocks, as evenly distributed as possible.
MultiDataDistribution3D createXSlicedDataDistribution3D (CellTypeField3D const &cellTypeField, int numBlocks, int envelopeWidth)
MultiDataDistribution3D createYSlicedDataDistribution3D (CellTypeField3D const &cellTypeField, int numBlocks, int envelopeWidth)
 cf above.
MultiDataDistribution3D createZSlicedDataDistribution3D (CellTypeField3D const &cellTypeField, int numBlocks, int envelopeWidth)
 cf above.
MultiDataDistribution3D createXSlicedDataDistribution3D (CellTypeField3D const &cellTypeField, int envelopeWidth)
MultiDataDistribution3D createYSlicedDataDistribution3D (CellTypeField3D const &cellTypeField, int envelopeWidth=1)
 cf above
MultiDataDistribution3D createZSlicedDataDistribution3D (CellTypeField3D const &cellTypeField, int envelopeWidth=1)
 cf above
template
OnLatticeBoundaryCondition2D
< double,
descriptors::D2Q9Descriptor > * 
createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor, RLBdynamics< double, descriptors::D2Q9Descriptor > > (BlockStructure2D< double, descriptors::D2Q9Descriptor > &block)
template
OnLatticeBoundaryCondition2D
< double,
descriptors::D2Q9Descriptor > * 
createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > (BlockStructure2D< double, descriptors::D2Q9Descriptor > &block)
template
OnLatticeBoundaryCondition2D
< double,
descriptors::D2Q9Descriptor > * 
createInterpBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > (BlockStructure2D< double, descriptors::D2Q9Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createLocalBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createInterpBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createInterpBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D
< T, Lattice > * 
createLocalBoundaryCondition2D (BlockStructure2D< T, Lattice > &block)
template
OnLatticeBoundaryCondition3D
< double,
descriptors::D3Q19Descriptor > * 
createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor, RLBdynamics< double, descriptors::D3Q19Descriptor > > (BlockStructure3D< double, descriptors::D3Q19Descriptor > &block)
template
OnLatticeBoundaryCondition3D
< double,
descriptors::D3Q19Descriptor > * 
createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > (BlockStructure3D< double, descriptors::D3Q19Descriptor > &block)
template
OnLatticeBoundaryCondition3D
< double,
descriptors::D3Q19Descriptor > * 
createInterpBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > (BlockStructure3D< double, descriptors::D3Q19Descriptor > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createLocalBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createInterpBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createInterpBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D
< T, Lattice > * 
createLocalBoundaryCondition3D (BlockStructure3D< T, Lattice > &block)
template double computeMin< double, ScalarField2D > (ScalarField2D< double > const &field)
template double computeMax< double, ScalarField2D > (ScalarField2D< double > const &field)
template double computeAverage< double, ScalarField2D > (ScalarField2D< double > const &field)
template double computeNormSqr< double, ScalarField2D > (ScalarField2D< double > const &field)
template double computeRMS< double, ScalarField2D > (ScalarField2D< double > const &field)
template double computeMin< double, ScalarField3D > (ScalarField3D< double > const &field)
template double computeMax< double, ScalarField3D > (ScalarField3D< double > const &field)
template double computeAverage< double, ScalarField3D > (ScalarField3D< double > const &field)
template double computeNormSqr< double, ScalarField3D > (ScalarField3D< double > const &field)
template double computeRMS< double, ScalarField3D > (ScalarField3D< double > const &field)
template double computeMin< double, MultiScalarField2D > (MultiScalarField2D< double > const &field)
template double computeMax< double, MultiScalarField2D > (MultiScalarField2D< double > const &field)
template double computeAverage< double, MultiScalarField2D > (MultiScalarField2D< double > const &field)
template double computeNormSqr< double, MultiScalarField2D > (MultiScalarField2D< double > const &field)
template double computeRMS< double, MultiScalarField2D > (MultiScalarField2D< double > const &field)
template double computeMin< double, MultiScalarField3D > (MultiScalarField3D< double > const &field)
template double computeMax< double, MultiScalarField3D > (MultiScalarField3D< double > const &field)
template double computeAverage< double, MultiScalarField3D > (MultiScalarField3D< double > const &field)
template double computeNormSqr< double, MultiScalarField3D > (MultiScalarField3D< double > const &field)
template double computeRMS< double, MultiScalarField3D > (MultiScalarField3D< double > const &field)
template<typename T , template< typename U > class ScalarField>
computeMin (ScalarField< T > const &field)
template<typename T , template< typename U > class ScalarField>
computeMax (ScalarField< T > const &field)
template<typename T , template< typename U > class ScalarField>
computeAverage (ScalarField< T > const &field)
template<typename T , template< typename U > class ScalarField>
computeNormSqr (ScalarField< T > const &field)
template<typename T , template< typename U > class ScalarField>
computeRMS (ScalarField< T > const &field)
void olbInit (int *argc, char ***argv, bool verbose=false)
template void copySerializedData< double > (DataSerializer< double > const &serializer, DataUnSerializer< double > &unSerializer)
template void copyDataBlock< double > (Serializable< double > const &from, Serializable< double > &to, IndexOrdering::OrderingT ordering)
template<typename T >
void copySerializedData (DataSerializer< T > const &serializer, DataUnSerializer< T > &unSerializer)
template<typename T >
void copyDataBlock (Serializable< T > const &from, Serializable< T > &to, IndexOrdering::OrderingT ordering=IndexOrdering::forward)
template void iniFirstOrder2D< double, descriptors::D2Q9Descriptor > (BlockLatticeView2D< double, descriptors::D2Q9Descriptor > lattice)
template void convergeFixedVelocity< double, descriptors::D2Q9Descriptor > (BlockLattice2D< double, descriptors::D2Q9Descriptor > &lattice, double epsilon, int step)
template void computePressure2D< double, descriptors::D2Q9Descriptor > (ScalarFieldBase2D< double > const &poissonTerm, ScalarFieldBase2D< double > &pressure, double epsilon, double lambda)
template void iniPressure2D (BlockLatticeView2D< double, descriptors::D2Q9Descriptor > lattice, double epsilon, double lambda)
template<typename T , template< typename U > class Lattice>
void iniFirstOrder2D (BlockLatticeView2D< T, Lattice > lattice)
template<typename T , template< typename U > class Lattice>
void convergeFixedVelocity (BlockLattice2D< T, Lattice > &lattice, T epsilon, int step=10)
template<typename T , template< typename U > class Lattice>
void iniPressure2D (BlockLatticeView2D< T, Lattice > lattice, T epsilon, T lambda=1.8)
template<typename T , template< typename U > class Lattice>
void computePressure2D (ScalarField2D< T > const &poissonTerm, ScalarField2D< T > &pressure, T epsilon, T lambda)
template<typename T , template< typename U > class Lattice>
void testLaplace (BlockLatticeView2D< T, Lattice > lattice, T epsilon, T lambda=1.8)
template<typename T , template< typename U > class Lattice>
void testLiShi (BlockLattice2D< T, Lattice > &lattice, T epsilon, T lambda=1.8)
template<typename T , template< typename U > class Lattice>
void computePressure2D (ScalarFieldBase2D< T > const &poissonTerm, ScalarFieldBase2D< T > &pressure, T epsilon, T lambda)
template void iniFirstOrder3D< double, descriptors::D3Q19Descriptor > (BlockLatticeView3D< double, descriptors::D3Q19Descriptor > lattice)
template void convergeFixedVelocity< double, descriptors::D3Q19Descriptor > (BlockLattice3D< double, descriptors::D3Q19Descriptor > &lattice, double epsilon, int step)
template void iniPressure3D< double, descriptors::D3Q19Descriptor > (BlockLatticeView3D< double, descriptors::D3Q19Descriptor > lattice, double epsilon, double lambda)
template<typename T , template< typename U > class Lattice>
void iniFirstOrder3D (BlockLatticeView3D< T, Lattice > lattice)
template<typename T , template< typename U > class Lattice>
void convergeFixedVelocity (BlockLattice3D< T, Lattice > &lattice, T epsilon, int step=10)
template<typename T , template< typename U > class Lattice>
void iniPressure3D (BlockLatticeView3D< T, Lattice > lattice, T epsilon, T lambda=1.8)
template void writeLogFile (LBunits< double > const &converter, std::string const &title)
template void writeLogFile (LBconverter< double > const &converter, std::string const &title)
template LBconverter< double > * createLBconverter (XMLreader const &params)
template<typename T >
void writeLogFile (LBunits< T > const &converter, std::string const &title)
template<typename T >
void writeLogFile (LBconverter< T > const &converter, std::string const &title)
template<typename T >
void write (LBconverter< T > const &converter)
template void serializer2ostr< double > (DataSerializer< double > const &serializer, std::ostream *ostr, bool enforceUint)
template void istr2unSerializer< double > (DataUnSerializer< double > &unSerializer, std::istream *istr, bool enforceUint)
template void saveData< double > (Serializable< double > const &object, std::string fName, bool enforceUint)
template void loadData< double > (Serializable< double > &object, std::string fName, bool enforceUint)
template void saveAsciiData< double > (Serializable< double > const &object, std::string fName)
template<typename T >
void serializer2ostr (DataSerializer< T > const &serializer, std::ostream *ostr, bool enforceUint=false)
template<typename T >
void istr2unSerializer (DataUnSerializer< T > &unSerializer, std::istream *istr, bool enforceUint=false)
template<typename T >
void saveData (Serializable< T > const &object, std::string fName, bool enforceUint=false)
template<typename T , typename SizeType >
void loadData (Serializable< T > &object, std::string fName, bool enforceUint=false)
template<typename T >
void saveAsciiData (Serializable< T > const &object, std::string fName)
template<typename T >
void loadData (Serializable< T > &object, std::string fName, bool enforceUint)
template<typename T , std::size_t D>
int treeDepth (cvmlcpp::DTree< T, D > tree)
 Use BFS to find the height of a DTree.
template<typename T , std::size_t D>
void findPath (cvmlcpp::DTree< T, D > tree, cvmlcpp::DTreeProxy< T, D > &wantedNode, std::vector< int > &indexes)
 using DFS to find a given node and getting the index collection that created it
template<typename T >
void writeVTKData3D (std::string const &fName, std::string const &scalarFieldName, ScalarFieldBase3D< T > const &scalarField, std::string const &vectorFieldName, TensorFieldBase3D< T, 3 > const &vectorField, T deltaX, T deltaT)
template void writeVTKData3D< double > (std::string const &fName, std::string const &scalarFieldName, ScalarFieldBase3D< double > const &scalarField, std::string const &vectorFieldName, TensorFieldBase3D< double, 3 > const &vectorField, double deltaX, double deltaT)

Variables

home baron Hiwi codesion git
sources openlb release src
complexGrids cuboidStructure
cuboid2D cpp template class 
Cuboid2D< double >
home baron Hiwi codesion git
sources openlb release src
complexGrids cuboidStructure
cuboid3D cpp template class 
Cuboid3D< double >
home baron Hiwi codesion git
sources openlb release src
complexGrids cuboidStructure
cuboidGeometry2D cpp template
class 
CuboidGeometry2D< double >
home baron Hiwi codesion git
sources openlb release src
complexGrids cuboidStructure
cuboidGeometry3D cpp template
class 
CuboidGeometry3D< double >
home baron Hiwi codesion git
sources openlb release src
complexGrids cuboidStructure
cuboidNeighbourhood2D cpp
template struct 
Cell2D< double >
home baron Hiwi codesion git
sources openlb release src
complexGrids cuboidStructure
cuboidNeighbourhood3D cpp
template struct 
Cell3D< double >
home baron Hiwi codesion git
sources openlb release src
complexGrids
multiBlockStructure
multiBlockStatistics cpp
template class 
MultiBlockReductor< double >

Detailed Description

All OpenLB code is contained in this namespace.


Typedef Documentation

typedef ScalarField2D<unsigned char> olb::CellTypeField2D

A 2D field of scalar values used to indicate the type of the cells. Any positive value indicates an active (bulk, boundary) cell, while zero indicates a non-active (no-dynamics) cell

Definition at line 38 of file multiDataUtilities2D.h.

typedef ScalarField3D<unsigned char> olb::CellTypeField3D

A 3D field of scalar values used to indicate the type of the cells. Any positive value indicates an active (bulk, boundary) cell, while zero indicates a non-active (no-dynamics) cell

Definition at line 38 of file multiDataUtilities3D.h.

typedef cvmlcpp::DTreeProxy<int,3> olb::DNode3D

Definition at line 48 of file stlReader.h.

typedef DistinctUint<sizeof(unsigned int)==sizeof(size_t)>::T1 olb::T1

Definition at line 56 of file base64.cpp.

typedef DistinctUint<sizeof(unsigned int)==sizeof(size_t)>::T2 olb::T2

Definition at line 57 of file base64.cpp.


Function Documentation

template<typename T , template< typename U > class ScalarField>
T olb::computeAverage ( ScalarField< T > const &  field)

Definition at line 140 of file dataReductions.hh.

                                              {
  AverageReduction<T> averageReduction;
  return field.computeReduction(averageReduction);
}

Here is the caller graph for this function:

template double olb::computeAverage< double, MultiScalarField2D > ( MultiScalarField2D< double > const &  field)
template double olb::computeAverage< double, MultiScalarField3D > ( MultiScalarField3D< double > const &  field)
template double olb::computeAverage< double, ScalarField2D > ( ScalarField2D< double > const &  field)
template double olb::computeAverage< double, ScalarField3D > ( ScalarField3D< double > const &  field)
template<typename T , template< typename U > class ScalarField>
T olb::computeMax ( ScalarField< T > const &  field)

Definition at line 134 of file dataReductions.hh.

                                          {
  MaxReduction<T> maxReduction;
  return field.computeReduction(maxReduction);
}

Here is the caller graph for this function:

template double olb::computeMax< double, MultiScalarField2D > ( MultiScalarField2D< double > const &  field)
template double olb::computeMax< double, MultiScalarField3D > ( MultiScalarField3D< double > const &  field)
template double olb::computeMax< double, ScalarField2D > ( ScalarField2D< double > const &  field)
template double olb::computeMax< double, ScalarField3D > ( ScalarField3D< double > const &  field)
template<typename T , template< typename U > class ScalarField>
T olb::computeMin ( ScalarField< T > const &  field)

Definition at line 128 of file dataReductions.hh.

                                          {
  MinReduction<T> minReduction;
  return field.computeReduction(minReduction);
}

Here is the caller graph for this function:

template double olb::computeMin< double, MultiScalarField2D > ( MultiScalarField2D< double > const &  field)
template double olb::computeMin< double, MultiScalarField3D > ( MultiScalarField3D< double > const &  field)
template double olb::computeMin< double, ScalarField2D > ( ScalarField2D< double > const &  field)
template double olb::computeMin< double, ScalarField3D > ( ScalarField3D< double > const &  field)
template<typename T , template< typename U > class ScalarField>
T olb::computeNormSqr ( ScalarField< T > const &  field)

Definition at line 146 of file dataReductions.hh.

                                              {
  NormSqrReduction<T> normSqrReduction;
  return field.computeReduction(normSqrReduction);
}

Here is the caller graph for this function:

template double olb::computeNormSqr< double, MultiScalarField2D > ( MultiScalarField2D< double > const &  field)
template double olb::computeNormSqr< double, MultiScalarField3D > ( MultiScalarField3D< double > const &  field)
template double olb::computeNormSqr< double, ScalarField2D > ( ScalarField2D< double > const &  field)
template double olb::computeNormSqr< double, ScalarField3D > ( ScalarField3D< double > const &  field)
template<typename T , template< typename U > class Lattice>
void olb::computePressure2D ( ScalarField2D< T > const &  poissonTerm,
ScalarField2D< T > &  pressure,
epsilon,
lambda 
)
template<typename T , template< typename U > class Lattice>
void olb::computePressure2D ( ScalarFieldBase2D< T > const &  poissonTerm,
ScalarFieldBase2D< T > &  pressure,
epsilon,
lambda 
)

Definition at line 64 of file simulationSetup2D.hh.

References olb::ScalarField2D< T >::construct(), olb::ScalarField2D< T >::get(), olb::ScalarFieldBase2D< T >::get(), olb::ScalarFieldBase2D< T >::getNx(), olb::ScalarFieldBase2D< T >::getNy(), OLB_PRECONDITION, olb::ScalarField2D< T >::reset(), and olb::util::sqr().

{
  OstreamManager clout(std::cout,"computePressure2D");
  int lx = pressure.getNx();
  int ly = pressure.getNy();

  OLB_PRECONDITION(poissonTerm.getNx() == lx);
  OLB_PRECONDITION(poissonTerm.getNy() == ly);

  T averagePoisson = T();
  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      averagePoisson += util::sqr(poissonTerm.get(iX,iY));
    }
  }
  averagePoisson /= (lx*ly);
  averagePoisson = sqrt(averagePoisson);

  int iter=0;
  T maxResidue = (T)1;
  do {
    for (int iX=1; iX<lx-1; ++iX) {
      pressure.get(iX,0) = pressure.get(iX,1);
      pressure.get(iX,ly-1) = pressure.get(iX,ly-2);

//             pressure.get(iX,0) = (-pressure.get(iX,2)+(T)4*pressure.get(iX,1))/(T)3;
//             pressure.get(iX,ly-1) = (-pressure.get(iX,ly-3)+(T)4*pressure.get(iX,ly-2))/(T)3;
    }
    for (int iY=1; iY<ly-1; ++iY) {
      pressure.get(0,iY) = pressure.get(1,iY);
      pressure.get(lx-1,iY) = pressure.get(lx-2,iY);

//             pressure.get(0,iY) = (-pressure.get(2,iY)+(T)4*pressure.get(1,iY))/(T)3;
//             pressure.get(lx-1,iY) = (-pressure.get(lx-3,iY)+(T)4*pressure.get(lx-2,iY))/(T)3;
    }
    pressure.get(0,0)       = pressure.get(1,1);
    pressure.get(lx-1,0   ) = pressure.get(lx-2,1);
    pressure.get(0,ly-1)    = pressure.get(1,ly-2);
    pressure.get(lx-1,ly-1) = pressure.get(lx-2,ly-2);

    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {

        T sumPressure =
          pressure.get(iX+1,iY) +
          pressure.get(iX,iY+1) +
          pressure.get(iX-1,iY) +
          pressure.get(iX,iY-1);

        pressure.get(iX,iY) =
          ((T)1-lambda) * pressure.get(iX,iY) +
          (lambda/(T)4) * (sumPressure + poissonTerm.get(iX,iY) );
      }
    }

    maxResidue = std::numeric_limits<T>::min();
    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {
        T sumPressure =
          pressure.get(iX+1,iY) +
          pressure.get(iX,iY+1) +
          pressure.get(iX-1,iY) +
          pressure.get(iX,iY-1);
        T residue = fabs(sumPressure -(T)4*pressure.get(iX,iY)
                         + poissonTerm.get(iX,iY));
        if (residue > maxResidue) maxResidue = residue;
      }
    }

    if (iter%400==0) {
      clout << "SOR iteration " << iter
            << ": max residue= "
            << maxResidue/averagePoisson << std::endl;
    }

    ++iter;
  }
  while (maxResidue/averagePoisson>epsilon);

  clout << "1: p=" << pressure.get(lx/2,0) << std::endl;


  T  sumPressure = T();
  for (int iX=1; iX<lx-1; ++iX) {
    for (int iY=1; iY<ly-1; ++iY) {
      sumPressure += pressure.get(iX,iY);
    }
  }
  T averagePressure = sumPressure / ( (T)((lx-2)*(ly-2)) );
  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      pressure.get(iX,iY) -= averagePressure;
    }
  }
  clout << "2: p=" << pressure.get(lx/2,0) << std::endl;
  clout << "Number of SOR iterations: " << iter << std::endl;
  ScalarField2D<T> residueMatrix(lx,ly);
  residueMatrix.construct();
  residueMatrix.reset();
  for (int iX=1; iX<lx-1; ++iX) {
    for (int iY=1; iY<ly-1; ++iY) {
      T sumPressure =
        pressure.get(iX+1,iY) +
        pressure.get(iX,iY+1) +
        pressure.get(iX-1,iY) +
        pressure.get(iX,iY-1);
      T residue = fabs(sumPressure -(T)4*pressure.get(iX,iY)
                       + poissonTerm.get(iX,iY));
      residueMatrix.get(iX,iY) = residue;
    }
  }
}

Here is the call graph for this function:

template void olb::computePressure2D< double, descriptors::D2Q9Descriptor > ( ScalarFieldBase2D< double > const &  poissonTerm,
ScalarFieldBase2D< double > &  pressure,
double  epsilon,
double  lambda 
)
template<typename T , template< typename U > class ScalarField>
T olb::computeRMS ( ScalarField< T > const &  field)

Definition at line 152 of file dataReductions.hh.

References computeNormSqr().

                                          {
  return sqrt(computeNormSqr(field));
}

Here is the call graph for this function:

template double olb::computeRMS< double, MultiScalarField2D > ( MultiScalarField2D< double > const &  field)
template double olb::computeRMS< double, MultiScalarField3D > ( MultiScalarField3D< double > const &  field)
template double olb::computeRMS< double, ScalarField2D > ( ScalarField2D< double > const &  field)
template double olb::computeRMS< double, ScalarField3D > ( ScalarField3D< double > const &  field)
template<typename T , template< typename U > class Lattice>
void olb::convergeFixedVelocity ( BlockLattice2D< T, Lattice > &  lattice,
epsilon,
int  step = 10 
)

Definition at line 336 of file simulationSetup2D.hh.

References olb::BlockLatticeView2D< T, Lattice >::get(), olb::BlockLatticeView2D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView2D< T, Lattice >::getNx(), olb::BlockLatticeView2D< T, Lattice >::getNy(), olb::BlockLattice2D< T, Lattice >::staticCollide(), and olb::BlockLattice2D< T, Lattice >::stream().

{
  BlockLatticeView2D<T,Lattice> latticeView(lattice);
  TensorFieldBase2D<T,2> const& velocity = latticeView.getDataAnalysis().getVelocity();

  T maxF = T();
  for (int iX=0; iX<latticeView.getNx(); iX+=step) {
    for (int iY=0; iY<latticeView.getNy(); iY+=step) {
      for (int iF=0; iF<Lattice<T>::q; ++iF) {
        T f = latticeView.get(iX,iY)[iF];
        if (f>maxF) {
          maxF = f;
        }
      }
    }
  }

  std::vector<T> oldValues, currentValues;
  T diff=(T)1;
  do {
    lattice.staticCollide(velocity);
    lattice.stream(true);

    for (int iX=0; iX<latticeView.getNx(); iX+=step) {
      for (int iY=0; iY<latticeView.getNy(); iY+=step) {
        currentValues.push_back (
          latticeView.get(iX,iY)[(iX+iY) % (Lattice<T>::q)] );
      }
    }

    if (oldValues.size() == currentValues.size()) {
      diff = T();
      for (unsigned iVal=0; iVal<oldValues.size(); ++iVal) {
        T candidate = std::abs(currentValues[iVal]-oldValues[iVal])
                      / maxF;
        if (candidate>diff) {
          diff=candidate;
        }
      }
    }
    oldValues.swap(currentValues);
    currentValues.clear();
  }
  while (diff > epsilon);
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice>
void olb::convergeFixedVelocity ( BlockLattice3D< T, Lattice > &  lattice,
epsilon,
int  step = 10 
)

Definition at line 167 of file simulationSetup3D.hh.

References olb::BlockLatticeView3D< T, Lattice >::get(), olb::BlockLatticeView3D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView3D< T, Lattice >::getNx(), olb::BlockLatticeView3D< T, Lattice >::getNy(), olb::BlockLatticeView3D< T, Lattice >::getNz(), olb::BlockLattice3D< T, Lattice >::staticCollide(), and olb::BlockLattice3D< T, Lattice >::stream().

{
  OstreamManager clout(std::cout,"convergeFixedVelocity");
  BlockLatticeView3D<T,Lattice> latticeView(lattice);
  TensorFieldBase3D<T,3> const& velocity = latticeView.getDataAnalysis().getVelocity();

  T maxF = T();
  for (int iX=0; iX<latticeView.getNx(); iX+=step) {
    for (int iY=0; iY<latticeView.getNy(); iY+=step) {
      for (int iZ=0; iZ<latticeView.getNz(); iZ+=step) {
        for (int iF=0; iF<Lattice<T>::q; ++iF) {
          T f = latticeView.get(iX,iY,iZ)[iF];
          if (f>maxF) {
            maxF = f;
          }
        }
      }
    }
  }

  std::vector<T> oldValues, currentValues;
  T diff=(T)1;
  do {
    lattice.staticCollide(velocity);
    lattice.stream();

    for (int iX=0; iX<latticeView.getNx(); iX+=step) {
      for (int iY=0; iY<latticeView.getNy(); iY+=step) {
        for (int iZ=0; iZ<latticeView.getNz(); iZ+=step) {
          currentValues.push_back (
            latticeView.get(iX,iY,iZ)[(iX+iY+iZ) % (Lattice<T>::q)] );
        }
      }
    }

    if (oldValues.size() == currentValues.size()) {
      diff = T();
      for (unsigned iVal=0; iVal<oldValues.size(); ++iVal) {
        T candidate = std::abs(currentValues[iVal]-oldValues[iVal])
                      / maxF;
        if (candidate>diff) {
          diff=candidate;
        }
      }
    }
    oldValues.swap(currentValues);
    currentValues.clear();
    clout << "diff=" << diff << std::endl;
  }
  while (diff > epsilon);
}

Here is the call graph for this function:

template void olb::convergeFixedVelocity< double, descriptors::D2Q9Descriptor > ( BlockLattice2D< double, descriptors::D2Q9Descriptor > &  lattice,
double  epsilon,
int  step 
)
template void olb::convergeFixedVelocity< double, descriptors::D3Q19Descriptor > ( BlockLattice3D< double, descriptors::D3Q19Descriptor > &  lattice,
double  epsilon,
int  step 
)
template<typename T >
void olb::copyDataBlock ( Serializable< T > const &  from,
Serializable< T > &  to,
IndexOrdering::OrderingT  ordering = IndexOrdering::forward 
)

Definition at line 159 of file serializer.hh.

References copySerializedData(), olb::Serializable< T >::getSerializer(), and olb::Serializable< T >::getUnSerializer().

                                                                                                      {
  copySerializedData(from.getSerializer(ordering), to.getUnSerializer(ordering));
}

Here is the call graph for this function:

Here is the caller graph for this function:

template void olb::copyDataBlock< double > ( Serializable< double > const &  from,
Serializable< double > &  to,
IndexOrdering::OrderingT  ordering 
)
template<typename T >
void olb::copySerializedData ( DataSerializer< T > const &  serializer,
DataUnSerializer< T > &  unSerializer 
)

Definition at line 128 of file serializer.hh.

References olb::DataUnSerializer< T >::commitData(), olb::DataUnSerializer< T >::getNextDataBuffer(), olb::DataSerializer< T >::getNextDataBuffer(), olb::DataUnSerializer< T >::getSize(), olb::DataSerializer< T >::getSize(), olb::DataUnSerializer< T >::isFull(), olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                                                {
  OLB_PRECONDITION( serializer.getSize() == unSerializer.getSize() );
  size_t writePos = 0, readPos = 0;
  size_t serializerBufferSize =0, unSerializerBufferSize =0;
  const T* serializerBuffer =0;
  T* unSerializerBuffer =0;
  while (!unSerializer.isFull()) {
    if (readPos==serializerBufferSize) {
      serializerBuffer = serializer.getNextDataBuffer(serializerBufferSize);
      readPos = 0;
    }
    if (writePos==unSerializerBufferSize) {
      unSerializerBuffer = unSerializer.getNextDataBuffer(unSerializerBufferSize);
      writePos = 0;
    }

    size_t remainToRead = (std::ptrdiff_t)serializerBufferSize - (std::ptrdiff_t)readPos;
    size_t remainToWrite = (std::ptrdiff_t)unSerializerBufferSize - (std::ptrdiff_t)writePos;
    size_t nextChunk = std::min(remainToRead, remainToWrite);
    for (size_t iChunk=0; iChunk<nextChunk; ++iChunk, ++readPos, ++writePos) {
      if (singleton::mpi().isMainProcessor()) {
        unSerializerBuffer[writePos] = serializerBuffer[readPos];
      }
    }
    if (writePos==unSerializerBufferSize) {
      unSerializer.commitData();
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template void olb::copySerializedData< double > ( DataSerializer< double > const &  serializer,
DataUnSerializer< double > &  unSerializer 
)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeAdvectionDiffusionBoundaryCondition2D< T, Lattice > * olb::createAdvectionDiffusionBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 119 of file advectionDiffusionBoundaryCondition2D.hh.

Here is the caller graph for this function:

template<typename T , template< typename U > class Lattice>
OnLatticeAdvectionDiffusionBoundaryCondition2D<T,Lattice>* olb::createAdvectionDiffusionBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 63 of file advectionDiffusionBoundaryCondition2D.h.

References createAdvectionDiffusionBoundaryCondition2D().

{
  return createAdvectionDiffusionBoundaryCondition2D<T,Lattice,
         AdvectionDiffusionRLBdynamics<T,Lattice> >(block);
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeAdvectionDiffusionBoundaryCondition3D< T, Lattice > * olb::createAdvectionDiffusionBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 163 of file advectionDiffusionBoundaryCondition3D.hh.

Here is the caller graph for this function:

template<typename T , template< typename U > class Lattice>
OnLatticeAdvectionDiffusionBoundaryCondition3D<T,Lattice>* olb::createAdvectionDiffusionBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 84 of file advectionDiffusionBoundaryCondition3D.h.

References createAdvectionDiffusionBoundaryCondition3D().

{
  return createAdvectionDiffusionBoundaryCondition3D<T,Lattice,
         AdvectionDiffusionRLBdynamics<T,Lattice> >(block);
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D< T, Lattice > * olb::createExtendedFdBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 345 of file extendedFiniteDifferenceBoundary2D.hh.

{
  return new BoundaryConditionInstantiator2D <
         T, Lattice,
         ExtendedFdBoundaryManager2D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D<T,Lattice>* olb::createExtendedFdBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 83 of file extendedFiniteDifferenceBoundary2D.h.

{
  return createExtendedFdBoundaryCondition2D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template OnLatticeBoundaryCondition2D<double,descriptors::D2Q9Descriptor>* olb::createExtendedFdBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > ( BlockStructure2D< double, descriptors::D2Q9Descriptor > &  block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D< T, Lattice > * olb::createExtendedFdBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 441 of file extendedFiniteDifferenceBoundary3D.hh.

{
  return new BoundaryConditionInstantiator3D <
         T, Lattice,
         ExtendedFdBoundaryManager3D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D<T,Lattice>* olb::createExtendedFdBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 81 of file extendedFiniteDifferenceBoundary3D.h.

{
  return createExtendedFdBoundaryCondition3D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template OnLatticeBoundaryCondition3D<double,descriptors::D3Q19Descriptor>* olb::createExtendedFdBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > ( BlockStructure3D< double, descriptors::D3Q19Descriptor > &  block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D< T, Lattice > * olb::createInamuroBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 173 of file inamuroBoundary2D.hh.

                                                                                                              {
  return new BoundaryConditionInstantiator2D <
         T, Lattice,
         InamuroBoundaryManager2D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D<T,Lattice>* olb::createInamuroBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 39 of file inamuroBoundary2D.h.

{
  return createInamuroBoundaryCondition2D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template OnLatticeBoundaryCondition2D<double,descriptors::D2Q9Descriptor>* olb::createInamuroBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > ( BlockStructure2D< double, descriptors::D2Q9Descriptor > &  block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D< T, Lattice > * olb::createInamuroBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 240 of file inamuroBoundary3D.hh.

                                                                                                              {
  return new BoundaryConditionInstantiator3D <
         T, Lattice,
         InamuroBoundaryManager3D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D<T,Lattice>* olb::createInamuroBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 39 of file inamuroBoundary3D.h.

{
  return createInamuroBoundaryCondition3D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template OnLatticeBoundaryCondition3D<double,descriptors::D3Q19Descriptor>* olb::createInamuroBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > ( BlockStructure3D< double, descriptors::D3Q19Descriptor > &  block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void olb::createInterpBoundaryCondition2D ( sOnLatticeBoundaryCondition2D< T, Lattice > &  sBC)

Definition at line 622 of file superBoundaryCondition2D.hh.

References olb::sOnLatticeBoundaryCondition2D< T, Lattice >::get_blockBCs(), olb::sOnLatticeBoundaryCondition2D< T, Lattice >::get_sLattice(), and olb::sOnLatticeBoundaryCondition2D< T, Lattice >::set_overlap().

                                                                                    {

  int nC = sBC.get_sLattice().get_load().size();
  sBC.set_overlap(1);
  for (int iC=0; iC<nC; iC++) {
    OnLatticeBoundaryCondition2D<T,Lattice>* blockBC
    = createInterpBoundaryCondition2D(sBC.get_sLattice().get_blockLattice(iC));
    sBC.get_blockBCs().push_back(blockBC);
  }
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D< T, Lattice > * olb::createInterpBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 317 of file boundaryCondition2D.hh.

                                                                                                             {
  return new BoundaryConditionInstantiator2D <
         T, Lattice,
         InterpolationBoundaryManager2D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D<T,Lattice>* olb::createInterpBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 86 of file boundaryCondition2D.h.

                                                                    {
  return createInterpBoundaryCondition2D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template<typename T , template< typename U > class Lattice>
void olb::createInterpBoundaryCondition2D ( sOnLatticeBoundaryCondition2D< T, Lattice > &  sBC)

Definition at line 125 of file superBoundaryCondition2D.h.

                                                                                    {
  createInterpBoundaryCondition2D<T,Lattice,RLBdynamics<T,Lattice> > (sBC);
}
template void olb::createInterpBoundaryCondition2D< double, descriptors::D2Q9Descriptor > ( sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &  sBC)
template OnLatticeBoundaryCondition2D<double,descriptors::D2Q9Descriptor>* olb::createInterpBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > ( BlockStructure2D< double, descriptors::D2Q9Descriptor > &  block)
template void olb::createInterpBoundaryCondition2D< double, descriptors::D2Q9Descriptor, RLBdynamics< double, descriptors::D2Q9Descriptor > > ( sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &  sBC)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D< T, Lattice > * olb::createInterpBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 454 of file boundaryCondition3D.hh.

                                                                                                             {
  return new BoundaryConditionInstantiator3D <
         T, Lattice,
         InterpolationBoundaryManager3D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D<T,Lattice>* olb::createInterpBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 127 of file boundaryCondition3D.h.

                                                                    {
  return createInterpBoundaryCondition3D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void olb::createInterpBoundaryCondition3D ( sOnLatticeBoundaryCondition3D< T, Lattice > &  sBC)

Definition at line 1876 of file superBoundaryCondition3D.hh.

References olb::sOnLatticeBoundaryCondition3D< T, Lattice >::get_blockBCs(), olb::sOnLatticeBoundaryCondition3D< T, Lattice >::get_sLattice(), and olb::sOnLatticeBoundaryCondition3D< T, Lattice >::set_overlap().

                                                  {

  int nC = sBC.get_sLattice().get_load().size();
  sBC.set_overlap(1);
  for (int iC = 0; iC < nC; iC++) {
    OnLatticeBoundaryCondition3D<T, Lattice>* blockBC =
      createInterpBoundaryCondition3D(
        sBC.get_sLattice().get_blockLattice(iC));
    sBC.get_blockBCs().push_back(blockBC);
  }
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice>
void olb::createInterpBoundaryCondition3D ( sOnLatticeBoundaryCondition3D< T, Lattice > &  sBC)

Definition at line 175 of file superBoundaryCondition3D.h.

                                                  {
  createInterpBoundaryCondition3D<T, Lattice, RLBdynamics<T, Lattice> > (sBC);
}
template void olb::createInterpBoundaryCondition3D< double, descriptors::D3Q19Descriptor > ( sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &  sBC)
template OnLatticeBoundaryCondition3D<double,descriptors::D3Q19Descriptor>* olb::createInterpBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > ( BlockStructure3D< double, descriptors::D3Q19Descriptor > &  block)
template void olb::createInterpBoundaryCondition3D< double, descriptors::D3Q19Descriptor, RLBdynamics< double, descriptors::D3Q19Descriptor > > ( sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &  sBC)
LBconverter< T > * olb::createLBconverter ( XMLreader const &  params)

Definition at line 140 of file units.hh.

{
  OstreamManager clout(std::cout,"createLBconverter");

  int dim;
  T latticeL;
  T deltaX;
  int N;
  T latticeU;
  T charNu;
  T Re;
  T charL = T(1);
  T charU = T(1);
  T charRho = T(1);
  T pressureLevel = T(0);

  // params[parameter].read(value) sets the value or returns false if the parameter can not be found

  if (!params["dim"].read<int>(dim)) {
    clout << "Error: Cannot read parameter: dim" << std::endl;
    exit (1);
  }
  if (!params["DiscParam"]["latticeU"].read(latticeU)) {
    clout << "Error: Cannot read parameter: latticeU"
          << std::endl;
    exit (1);
  }
  if (!params["PhysParam"]["charL"].read(charL)) {
    clout << "Parameter charL not found. Set default: charL = 1."
          << std::endl;
  }
  if (!params["DiscParam"]["latticeL"].read(latticeL)) {
    clout << "Parameter latticeL not found. Use deltaX instead."
          << std::endl;
    if (!params["DiscParam"]["deltaX"].read(deltaX)) {
      clout << "Parameter deltaX not found. Use resolution instead."
            << std::endl;
      if (!params["DiscParam"]["resolution"].read(N)) {
        clout << "Error: Cannot read any of the parameters: "
              << "latticeL, deltaX, resolution"
              << std::endl;
        exit (1);
      }
      deltaX = (T) 1 / (T) N;
    }
    latticeL = deltaX * charL;
  }
  if (!params["PhysParam"]["charU"].read(charU)) {
    clout << "Parameter charU not found. Set default: charU = 1."
          << std::endl;
  }
  if (!params["PhysParam"]["charRho"].read(charRho)) {
    clout << "Parameter charRho not found. Set default: charRho = 1."
          << std::endl;
  }
  if (!params["PhysParam"]["charPressure"].read(pressureLevel)) {
    clout << "Parameter charPressure not found. Set default: charPressure = 0."
          << std::endl;
  }
  if (!params["PhysParam"]["charNu"].read(charNu)) {
    if (!params["PhysParam"]["Re"].read(Re)) {
      clout << "Error: Cannot read neither charNu nor Re"
            << std::endl;
      exit (1);
    }
    clout << "Parameter charNu not found. Use Re instead."
          << std::endl;
    charNu = charL*charU / Re;
  }

  return new LBconverter<T>(dim, latticeL, latticeU, charNu, charL, charU,
                            charRho, pressureLevel);
}
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void olb::createLocalBoundaryCondition2D ( sOnLatticeBoundaryCondition2D< T, Lattice > &  sBC)

Definition at line 610 of file superBoundaryCondition2D.hh.

References olb::sOnLatticeBoundaryCondition2D< T, Lattice >::get_blockBCs(), olb::sOnLatticeBoundaryCondition2D< T, Lattice >::get_sLattice(), and olb::sOnLatticeBoundaryCondition2D< T, Lattice >::set_overlap().

                                                                                   {

  int nC = sBC.get_sLattice().get_load().size();
  sBC.set_overlap(0);
  for (int iC=0; iC<nC; iC++) {
    OnLatticeBoundaryCondition2D<T,Lattice>* blockBC
    = createLocalBoundaryCondition2D(sBC.get_sLattice().get_blockLattice(iC));
    sBC.get_blockBCs().push_back(blockBC);
  }
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D< T, Lattice > * olb::createLocalBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 310 of file boundaryCondition2D.hh.

                                                                                                            {
  return new BoundaryConditionInstantiator2D <
         T, Lattice,
         RegularizedBoundaryManager2D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D<T,Lattice>* olb::createLocalBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 92 of file boundaryCondition2D.h.

                                                                   {
  return createLocalBoundaryCondition2D<T,Lattice,RLBdynamics<T,Lattice> >(block);
}
template<typename T , template< typename U > class Lattice>
void olb::createLocalBoundaryCondition2D ( sOnLatticeBoundaryCondition2D< T, Lattice > &  sBC)

Definition at line 121 of file superBoundaryCondition2D.h.

                                                                                   {
  createLocalBoundaryCondition2D<T,Lattice,BGKdynamics<T,Lattice> > (sBC);
}
template void olb::createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor > ( sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &  sBC)
template void olb::createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > ( sOnLatticeBoundaryCondition2D< double, descriptors::D2Q9Descriptor > &  sBC)
template OnLatticeBoundaryCondition2D<double,descriptors::D2Q9Descriptor>* olb::createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > ( BlockStructure2D< double, descriptors::D2Q9Descriptor > &  block)
template OnLatticeBoundaryCondition2D<double,descriptors::D2Q9Descriptor>* olb::createLocalBoundaryCondition2D< double, descriptors::D2Q9Descriptor, RLBdynamics< double, descriptors::D2Q9Descriptor > > ( BlockStructure2D< double, descriptors::D2Q9Descriptor > &  block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D< T, Lattice > * olb::createLocalBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 447 of file boundaryCondition3D.hh.

                                                                                                            {
  return new BoundaryConditionInstantiator3D <
         T, Lattice,
         RegularizedBoundaryManager3D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D<T,Lattice>* olb::createLocalBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 133 of file boundaryCondition3D.h.

                                                                   {
  return createLocalBoundaryCondition3D<T,Lattice,RLBdynamics<T,Lattice> >(block);
}
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
void olb::createLocalBoundaryCondition3D ( sOnLatticeBoundaryCondition3D< T, Lattice > &  sBC)

Definition at line 1862 of file superBoundaryCondition3D.hh.

References olb::sOnLatticeBoundaryCondition3D< T, Lattice >::get_blockBCs(), olb::sOnLatticeBoundaryCondition3D< T, Lattice >::get_sLattice(), and olb::sOnLatticeBoundaryCondition3D< T, Lattice >::set_overlap().

                                                  {

  int nC = sBC.get_sLattice().get_load().size();
  sBC.set_overlap(0);
  for (int iC = 0; iC < nC; iC++) {
    OnLatticeBoundaryCondition3D<T, Lattice>* blockBC =
      createLocalBoundaryCondition3D(
        sBC.get_sLattice().get_blockLattice(iC));
    sBC.get_blockBCs().push_back(blockBC);
  }
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice>
void olb::createLocalBoundaryCondition3D ( sOnLatticeBoundaryCondition3D< T, Lattice > &  sBC)

Definition at line 170 of file superBoundaryCondition3D.h.

                                                  {
  createLocalBoundaryCondition3D<T, Lattice, BGKdynamics<T, Lattice> > (sBC);
}
template void olb::createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor > ( sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &  sBC)
template void olb::createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > ( sOnLatticeBoundaryCondition3D< double, descriptors::D3Q19Descriptor > &  sBC)
template OnLatticeBoundaryCondition3D<double,descriptors::D3Q19Descriptor>* olb::createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > ( BlockStructure3D< double, descriptors::D3Q19Descriptor > &  block)
template OnLatticeBoundaryCondition3D<double,descriptors::D3Q19Descriptor>* olb::createLocalBoundaryCondition3D< double, descriptors::D3Q19Descriptor, RLBdynamics< double, descriptors::D3Q19Descriptor > > ( BlockStructure3D< double, descriptors::D3Q19Descriptor > &  block)
MultiDataDistribution2D olb::createRegularDataDistribution ( int  nx,
int  ny,
int  numBlocksX,
int  numBlocksY,
int  envelopeWidth 
)

Create a nx-by-ny data distribution.

Definition at line 36 of file multiDataUtilities2D.cpp.

References olb::MultiDataDistribution2D::addBlock().

{
  MultiDataDistribution2D dataDistribution(nx, ny);
  int posX = 0;
  int iBlock = 0;
  for (int iBlockX=0; iBlockX<numBlocksX; ++iBlockX) {
    int lx = nx / numBlocksX;
    if (iBlockX < nx%numBlocksX) ++lx;
    int posY = 0;
    for (int iBlockY=0; iBlockY<numBlocksY; ++iBlockY) {
      int ly = ny / numBlocksY;
      if (iBlockY < ny%numBlocksY) ++ly;
      dataDistribution.addBlock(posX, posX+lx-1, posY, posY+ly-1, envelopeWidth, iBlock);
      iBlock++;
      posY += ly;
    }
    posX += lx;
  }
  return dataDistribution;
}

Here is the call graph for this function:

Here is the caller graph for this function:

MultiDataDistribution2D olb::createRegularDataDistribution ( int  nx,
int  ny,
int  envelopeWidth 
)

Create a data distribution with regular blocks, as evenly distributed as possible.

Definition at line 59 of file multiDataUtilities2D.cpp.

References createRegularDataDistribution(), olb::algorithm::evenRepartition(), and olb::singleton::mpi().

                                                                                         {
  std::vector<int> repartition = algorithm::evenRepartition(singleton::mpi().getSize(), 2);
  return createRegularDataDistribution(nx, ny, repartition[0], repartition[1], envelopeWidth);
}

Here is the call graph for this function:

MultiDataDistribution3D olb::createRegularDataDistribution ( int  nx,
int  ny,
int  nz,
int  numBlocksX,
int  numBlocksY,
int  numBlocksZ,
int  envelopeWidth 
)

Create a nx-by-ny-by-nz data distribution.

Definition at line 36 of file multiDataUtilities3D.cpp.

References olb::MultiDataDistribution3D::addBlock().

{
  MultiDataDistribution3D dataDistribution(nx, ny, nz);
  int posX = 0;
  int iBlock = 0;
  for (int iBlockX=0; iBlockX<numBlocksX; ++iBlockX) {
    int lx = nx / numBlocksX;
    if (iBlockX < nx%numBlocksX) ++lx;
    int posY = 0;
    for (int iBlockY=0; iBlockY<numBlocksY; ++iBlockY) {
      int ly = ny / numBlocksY;
      if (iBlockY < ny%numBlocksY) ++ly;
      int posZ = 0;
      for (int iBlockZ=0; iBlockZ<numBlocksZ; ++iBlockZ) {
        int lz = nz / numBlocksZ;
        if (iBlockZ < nz%numBlocksZ) ++lz;
        dataDistribution.addBlock(posX, posX+lx-1, posY, posY+ly-1, posZ, posZ+lz-1,
                                  envelopeWidth, iBlock++);
        posZ += lz;
      }
      posY += ly;
    }
    posX += lx;
  }
  return dataDistribution;
}

Here is the call graph for this function:

MultiDataDistribution3D olb::createRegularDataDistribution ( int  nx,
int  ny,
int  nz,
int  envelopeWidth 
)

Create a data distribution with regular blocks, as evenly distributed as possible.

Definition at line 65 of file multiDataUtilities3D.cpp.

References createRegularDataDistribution(), olb::algorithm::evenRepartition(), and olb::singleton::mpi().

                                                                                                 {
  std::vector<int> repartition = algorithm::evenRepartition(singleton::mpi().getSize(), 3);
  return createRegularDataDistribution ( nx, ny, nz,
                                         repartition[0], repartition[1], repartition[2],
                                         envelopeWidth );
}

Here is the call graph for this function:

MultiDataDistribution2D olb::createXSlicedDataDistribution2D ( CellTypeField2D const &  cellTypeField,
int  numBlocks,
int  envelopeWidth 
)

Create a data distribution by slicing the domain (a block of nX*nY cells as defined by cellTypeField) into numBlocks blocks along the x-direction. The x-extent of the blocks is chosen such as to obtain an approximately equal number of active cells in each block.

Definition at line 67 of file multiDataUtilities2D.cpp.

References olb::MultiDataDistribution2D::addBlock(), olb::ScalarField2D< T >::get(), olb::ScalarField2D< T >::getNx(), and olb::ScalarField2D< T >::getNy().

{
  int nX = cellTypeField.getNx();
  int nY = cellTypeField.getNy();

  std::vector<int> numActivePerSlice;
  int numActiveTotal = 0;
  for(int iX=0; iX<nX; iX++) {
    int numActiveCurrentSlice = 0;
    for (int iY=0; iY<nY; iY++) {
      if (cellTypeField.get(iX,iY) > 0) numActiveCurrentSlice++;
    }
    numActivePerSlice.push_back(numActiveCurrentSlice);
    numActiveTotal += numActiveCurrentSlice;
  }
  int numActivePerBlock = numActiveTotal / numBlocks;

  MultiDataDistribution2D dataDistribution(nX, nY);

  int iX=0;
  for (int iBlock=0; iBlock<numBlocks; ++iBlock) {
    int posX = iX;
    int numActiveCurrentBlock = 0;
    while (numActiveCurrentBlock<numActivePerBlock && iX<nX) {
      numActiveCurrentBlock += numActivePerSlice[iX];
      iX++;
    }
    dataDistribution.addBlock(posX, iX-1, 0, nY-1, envelopeWidth, iBlock);
  }
  return dataDistribution;
}

Here is the call graph for this function:

Here is the caller graph for this function:

MultiDataDistribution2D olb::createXSlicedDataDistribution2D ( CellTypeField2D const &  cellTypeField,
int  envelopeWidth = 1 
)

Create x-sliced data distribution, balancing the number of active cells between blocks, implicitly setting numBlocks = #processors

Definition at line 137 of file multiDataUtilities2D.cpp.

References createXSlicedDataDistribution2D(), and olb::singleton::mpi().

{
  return createXSlicedDataDistribution2D(cellTypeField, singleton::mpi().getSize(), envelopeWidth);
}

Here is the call graph for this function:

MultiDataDistribution3D olb::createXSlicedDataDistribution3D ( CellTypeField3D const &  cellTypeField,
int  numBlocks,
int  envelopeWidth 
)

Create a data distribution by slicing the domain (a block of nX*nY*nZ cells as defined by cellTypeField) into numBlocks blocks along the x-direction. The x-extent of the blocks is chosen such as to obtain an approximately equal number of active cells in each block.

Definition at line 76 of file multiDataUtilities3D.cpp.

References olb::MultiDataDistribution3D::addBlock(), olb::ScalarField3D< T >::get(), olb::ScalarField3D< T >::getNx(), olb::ScalarField3D< T >::getNy(), and olb::ScalarField3D< T >::getNz().

{
  int nX = cellTypeField.getNx();
  int nY = cellTypeField.getNy();
  int nZ = cellTypeField.getNz();

  std::vector<int> numActivePerSlice;
  int numActiveTotal = 0;
  for(int iX=0; iX<nX; iX++) {
    int numActiveCurrentSlice = 0;
    for (int iY=0; iY<nY; iY++) {
      for (int iZ=0; iZ<nZ; iZ++) {
        if (cellTypeField.get(iX,iY,iZ) > 0) numActiveCurrentSlice++;
      }
    }
    numActivePerSlice.push_back(numActiveCurrentSlice);
    numActiveTotal += numActiveCurrentSlice;
  }
  int numActivePerBlock = numActiveTotal / numBlocks;

  MultiDataDistribution3D dataDistribution(nX, nY, nZ);

  int iX=0;
  for (int iBlock=0; iBlock<numBlocks; ++iBlock) {
    int posX = iX;
    int numActiveCurrentBlock = 0;
    while (numActiveCurrentBlock<numActivePerBlock && iX<nX) {
      numActiveCurrentBlock += numActivePerSlice[iX];
      iX++;
    }
    dataDistribution.addBlock(posX, iX-1, 0, nY-1, 0, nZ-1, envelopeWidth, iBlock);
  }
  return dataDistribution;
}

Here is the call graph for this function:

Here is the caller graph for this function:

MultiDataDistribution3D olb::createXSlicedDataDistribution3D ( CellTypeField3D const &  cellTypeField,
int  envelopeWidth = 1 
)

Create x-sliced data distribution, balancing the number of active cells between blocks, implicitly setting numBlocks = #processors

Definition at line 190 of file multiDataUtilities3D.cpp.

References createXSlicedDataDistribution3D(), and olb::singleton::mpi().

{
  return createXSlicedDataDistribution3D(cellTypeField, singleton::mpi().getSize(), envelopeWidth);
}

Here is the call graph for this function:

MultiDataDistribution2D olb::createYSlicedDataDistribution2D ( CellTypeField2D const &  cellTypeField,
int  numBlocks,
int  envelopeWidth 
)

cf above.

Definition at line 102 of file multiDataUtilities2D.cpp.

References olb::MultiDataDistribution2D::addBlock(), olb::ScalarField2D< T >::get(), olb::ScalarField2D< T >::getNx(), and olb::ScalarField2D< T >::getNy().

{
  int nX = cellTypeField.getNx();
  int nY = cellTypeField.getNy();

  std::vector<int> numActivePerSlice;
  int numActiveTotal = 0;
  for (int iY=0; iY<nY; iY++) {
    int numActiveCurrentSlice = 0;
    for(int iX=0; iX<nX; iX++) {
      if (cellTypeField.get(iX,iY) > 0) numActiveCurrentSlice++;
    }
    numActivePerSlice.push_back(numActiveCurrentSlice);
    numActiveTotal += numActiveCurrentSlice;
  }
  int numActivePerBlock = numActiveTotal / numBlocks;

  MultiDataDistribution2D dataDistribution(nX, nY);

  int iY=0;
  for (int iBlock=0; iBlock<numBlocks; ++iBlock) {
    int posY = iY;
    int numActiveCurrentBlock = 0;
    while (numActiveCurrentBlock<numActivePerBlock && iY<nY) {
      numActiveCurrentBlock += numActivePerSlice[iY];
      iY++;
    }
    dataDistribution.addBlock( 0, nX-1, posY, iY-1, envelopeWidth, iBlock);
  }
  return dataDistribution;
}

Here is the call graph for this function:

Here is the caller graph for this function:

MultiDataDistribution2D olb::createYSlicedDataDistribution2D ( CellTypeField2D const &  cellTypeField,
int  envelopeWidth 
)

cf above

Definition at line 143 of file multiDataUtilities2D.cpp.

References createYSlicedDataDistribution2D(), and olb::singleton::mpi().

{
  return createYSlicedDataDistribution2D(cellTypeField, singleton::mpi().getSize(), envelopeWidth);
}

Here is the call graph for this function:

MultiDataDistribution3D olb::createYSlicedDataDistribution3D ( CellTypeField3D const &  cellTypeField,
int  numBlocks,
int  envelopeWidth 
)

cf above.

Definition at line 114 of file multiDataUtilities3D.cpp.

References olb::MultiDataDistribution3D::addBlock(), olb::ScalarField3D< T >::get(), olb::ScalarField3D< T >::getNx(), olb::ScalarField3D< T >::getNy(), and olb::ScalarField3D< T >::getNz().

{
  int nX = cellTypeField.getNx();
  int nY = cellTypeField.getNy();
  int nZ = cellTypeField.getNz();

  std::vector<int> numActivePerSlice;
  int numActiveTotal = 0;
  for (int iY=0; iY<nY; iY++) {
    int numActiveCurrentSlice = 0;
    for(int iX=0; iX<nX; iX++) {
      for(int iZ=0; iZ<nZ; iZ++) {
        if (cellTypeField.get(iX,iY,iZ) > 0) numActiveCurrentSlice++;
      }
    }
    numActivePerSlice.push_back(numActiveCurrentSlice);
    numActiveTotal += numActiveCurrentSlice;
  }
  int numActivePerBlock = numActiveTotal / numBlocks;

  MultiDataDistribution3D dataDistribution(nX, nY, nZ);

  int iY=0;
  for (int iBlock=0; iBlock<numBlocks; ++iBlock) {
    int posY = iY;
    int numActiveCurrentBlock = 0;
    while (numActiveCurrentBlock<numActivePerBlock && iY<nY) {
      numActiveCurrentBlock += numActivePerSlice[iY];
      iY++;
    }
    dataDistribution.addBlock( 0, nX-1, posY, iY-1, 0, nZ-1, envelopeWidth, iBlock);
  }
  return dataDistribution;
}

Here is the call graph for this function:

Here is the caller graph for this function:

MultiDataDistribution3D olb::createYSlicedDataDistribution3D ( CellTypeField3D const &  cellTypeField,
int  envelopeWidth 
)

cf above

Definition at line 196 of file multiDataUtilities3D.cpp.

References createYSlicedDataDistribution3D(), and olb::singleton::mpi().

{
  return createYSlicedDataDistribution3D(cellTypeField, singleton::mpi().getSize(), envelopeWidth);
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition2D< T, Lattice > * olb::createZouHeBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 174 of file zouHeBoundary2D.hh.

                                                                                                            {
  return new BoundaryConditionInstantiator2D <
         T, Lattice,
         ZouHeBoundaryManager2D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition2D<T,Lattice>* olb::createZouHeBoundaryCondition2D ( BlockStructure2D< T, Lattice > &  block)

Definition at line 39 of file zouHeBoundary2D.h.

                                                                   {
  return createZouHeBoundaryCondition2D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template OnLatticeBoundaryCondition2D<double,descriptors::D2Q9Descriptor>* olb::createZouHeBoundaryCondition2D< double, descriptors::D2Q9Descriptor, BGKdynamics< double, descriptors::D2Q9Descriptor > > ( BlockStructure2D< double, descriptors::D2Q9Descriptor > &  block)
template<typename T , template< typename U > class Lattice, typename MixinDynamics >
OnLatticeBoundaryCondition3D< T, Lattice > * olb::createZouHeBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 240 of file zouHeBoundary3D.hh.

                                                                                                            {
  return new BoundaryConditionInstantiator3D <
         T, Lattice,
         ZouHeBoundaryManager3D<T,Lattice, MixinDynamics> > (block);
}
template<typename T , template< typename U > class Lattice>
OnLatticeBoundaryCondition3D<T,Lattice>* olb::createZouHeBoundaryCondition3D ( BlockStructure3D< T, Lattice > &  block)

Definition at line 39 of file zouHeBoundary3D.h.

                                                                   {
  return createZouHeBoundaryCondition3D<T,Lattice,BGKdynamics<T,Lattice> >(block);
}
template OnLatticeBoundaryCondition3D<double,descriptors::D3Q19Descriptor>* olb::createZouHeBoundaryCondition3D< double, descriptors::D3Q19Descriptor, BGKdynamics< double, descriptors::D3Q19Descriptor > > ( BlockStructure3D< double, descriptors::D3Q19Descriptor > &  block)
MultiDataDistribution3D olb::createZSlicedDataDistribution3D ( CellTypeField3D const &  cellTypeField,
int  envelopeWidth 
)

cf above

Definition at line 202 of file multiDataUtilities3D.cpp.

References createZSlicedDataDistribution3D(), and olb::singleton::mpi().

{
  return createZSlicedDataDistribution3D(cellTypeField, singleton::mpi().getSize(), envelopeWidth);
}

Here is the call graph for this function:

MultiDataDistribution3D olb::createZSlicedDataDistribution3D ( CellTypeField3D const &  cellTypeField,
int  numBlocks,
int  envelopeWidth 
)

cf above.

Definition at line 152 of file multiDataUtilities3D.cpp.

References olb::MultiDataDistribution3D::addBlock(), olb::ScalarField3D< T >::get(), olb::ScalarField3D< T >::getNx(), olb::ScalarField3D< T >::getNy(), and olb::ScalarField3D< T >::getNz().

{
  int nX = cellTypeField.getNx();
  int nY = cellTypeField.getNy();
  int nZ = cellTypeField.getNz();

  std::vector<int> numActivePerSlice;
  int numActiveTotal = 0;
  for(int iZ=0; iZ<nZ; iZ++) {
    int numActiveCurrentSlice = 0;
    for(int iX=0; iX<nX; iX++) {
      for (int iY=0; iY<nY; iY++) {
        if (cellTypeField.get(iX,iY,iZ) > 0) numActiveCurrentSlice++;
      }
    }
    numActivePerSlice.push_back(numActiveCurrentSlice);
    numActiveTotal += numActiveCurrentSlice;
  }
  int numActivePerBlock = numActiveTotal / numBlocks;

  MultiDataDistribution3D dataDistribution(nX, nY, nZ);

  int iZ=0;
  for (int iBlock=0; iBlock<numBlocks; ++iBlock) {
    int posZ = iZ;
    int numActiveCurrentBlock = 0;
    while (numActiveCurrentBlock<numActivePerBlock && iZ<nZ) {
      numActiveCurrentBlock += numActivePerSlice[iZ];
      iZ++;
    }
    dataDistribution.addBlock( 0, nX-1, 0, nY-1, posZ, iZ-1, envelopeWidth, iBlock);
  }
  return dataDistribution;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T , std::size_t D>
void olb::findPath ( cvmlcpp::DTree< T, D >  tree,
cvmlcpp::DTreeProxy< T, D > &  wantedNode,
std::vector< int > &  indexes 
)

using DFS to find a given node and getting the index collection that created it

Definition at line 65 of file stlReader.hh.

                                                                                         {
  typedef cvmlcpp::DTreeProxy<T, D> DNode;
  DNode node = wantedNode;

  while (node.depth() > 0) {
    assert( node.depth() < indexes.size() );
    indexes[node.depth()] = node.index();
    node = node.parent();
  }
}

Here is the caller graph for this function:

template<typename T , template< typename U > class Lattice>
void olb::iniFirstOrder2D ( BlockLatticeView2D< T, Lattice >  lattice)

Definition at line 44 of file simulationSetup2D.hh.

References olb::lbHelpers< T, Lattice >::equilibrium(), olb::firstOrderLbHelpers< T, Lattice >::fromStrainToFneq(), olb::TensorFieldBase2D< T, nDim >::get(), olb::BlockLatticeView2D< T, Lattice >::get(), olb::BlockLatticeView2D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView2D< T, Lattice >::getNx(), and olb::BlockLatticeView2D< T, Lattice >::getNy().

                                                            {
  TensorFieldBase2D<T,3> const& strainRate = lattice.getDataAnalysis().getStrainRate();

  for (int iX=0; iX<lattice.getNx(); ++iX) {
    for (int iY=0; iY<lattice.getNy(); ++iY) {
      T rho, u[2];
      lattice.get(iX,iY).computeRhoU(rho, u);
      T omega = lattice.get(iX,iY).getDynamics()->getOmega();
      const T uSqr = util::normSqr<T,Lattice<T>::d>(u);
      for (int iPop=0; iPop<Lattice<T>::q; ++iPop) {
        lattice.get(iX,iY)[iPop] =
          lbHelpers<T,Lattice>::equilibrium(iPop, rho, u, uSqr) +
          firstOrderLbHelpers<T,Lattice>::fromStrainToFneq (
            iPop, strainRate.get(iX,iY), omega);
      }
    }
  }
}

Here is the call graph for this function:

template void olb::iniFirstOrder2D< double, descriptors::D2Q9Descriptor > ( BlockLatticeView2D< double, descriptors::D2Q9Descriptor >  lattice)
template<typename T , template< typename U > class Lattice>
void olb::iniFirstOrder3D ( BlockLatticeView3D< T, Lattice >  lattice)

Definition at line 41 of file simulationSetup3D.hh.

References olb::lbHelpers< T, Lattice >::equilibrium(), olb::firstOrderLbHelpers< T, Lattice >::fromStrainToFneq(), olb::TensorFieldBase3D< T, nDim >::get(), olb::BlockLatticeView3D< T, Lattice >::get(), olb::BlockLatticeView3D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView3D< T, Lattice >::getNx(), olb::BlockLatticeView3D< T, Lattice >::getNy(), and olb::BlockLatticeView3D< T, Lattice >::getNz().

                                                            {
  TensorFieldBase3D<T,6> const& strainRate = lattice.getDataAnalysis().getStrainRate();

  for (int iX=0; iX<lattice.getNx(); ++iX) {
    for (int iY=0; iY<lattice.getNy(); ++iY) {
      for (int iZ=0; iZ<lattice.getNz(); ++iZ) {
        T rho, u[3];
        lattice.get(iX,iY,iZ).computeRhoU(rho, u);
        T omega = lattice.get(iX,iY,iZ).getDynamics()->getOmega();
        const T uSqr = util::normSqr<T,Lattice<T>::d>(u);
        for (int iPop=0; iPop<Lattice<T>::q; ++iPop) {
          lattice.get(iX,iY,iZ)[iPop] =
            lbHelpers<T,Lattice>::equilibrium(iPop, rho, u, uSqr) +
            firstOrderLbHelpers<T,Lattice>::fromStrainToFneq (
              iPop, strainRate.get(iX,iY,iZ), omega);
        }
      }
    }
  }
}

Here is the call graph for this function:

template void olb::iniFirstOrder3D< double, descriptors::D3Q19Descriptor > ( BlockLatticeView3D< double, descriptors::D3Q19Descriptor >  lattice)
template void olb::iniPressure2D ( BlockLatticeView2D< double, descriptors::D2Q9Descriptor >  lattice,
double  epsilon,
double  lambda 
)
template<typename T , template< typename U > class Lattice>
void olb::iniPressure2D ( BlockLatticeView2D< T, Lattice >  lattice,
epsilon,
lambda = 1.8 
)

Definition at line 180 of file simulationSetup2D.hh.

References olb::ScalarField2D< T >::construct(), olb::ScalarField2D< T >::get(), olb::BlockLatticeView2D< T, Lattice >::get(), olb::BlockLatticeView2D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView2D< T, Lattice >::getNx(), olb::BlockLatticeView2D< T, Lattice >::getNy(), and olb::ScalarField2D< T >::reset().

{
  int lx = lattice.getNx();
  int ly = lattice.getNy();

  ScalarField2D<T> pressure(lx, ly);
  pressure.construct(); // Allocate memory
  pressure.reset();     // Reset to zero

  computePressure2D<T,Lattice>(lattice.getDataAnalysis().getPoissonTerm(),
                               pressure,
                               epsilon, lambda );

  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      lattice.get(iX,iY).defineRho (
        pressure.get(iX,iY)*Lattice<T>::invCs2 + (T)1 );
    }
  }
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice>
void olb::iniPressure3D ( BlockLatticeView3D< T, Lattice >  lattice,
epsilon,
lambda = 1.8 
)

Definition at line 63 of file simulationSetup3D.hh.

References olb::ScalarField3D< T >::construct(), olb::BlockLatticeView3D< T, Lattice >::get(), olb::ScalarFieldBase3D< T >::get(), olb::ScalarField3D< T >::get(), olb::BlockLatticeView3D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView3D< T, Lattice >::getNx(), olb::BlockLatticeView3D< T, Lattice >::getNy(), olb::BlockLatticeView3D< T, Lattice >::getNz(), and olb::util::sqr().

                                                                               {
  OstreamManager clout(std::cout,"iniPressure3D");
  int lx = lattice.getNx();
  int ly = lattice.getNy();
  int lz = lattice.getNz();

  ScalarFieldBase3D<T> const& poissonTerm = lattice.getDataAnalysis().getPoissonTerm();

  ScalarField3D<T> pressure(lx, ly, lz);
  pressure.construct();

  T averagePoisson = T();
  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      for (int iZ=0; iZ<lz; ++iZ) {
        pressure.get(iX,iY,iZ) = T();
        averagePoisson += util::sqr(poissonTerm.get(iX,iY,iZ));
      }
    }
  }
  averagePoisson /= (lx*ly*lz);
  averagePoisson = sqrt(averagePoisson);

  int iter=0;
  T maxResidue = (T)1;
  do {
    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {
        pressure.get(iX,iY,0)    = pressure.get(iX,iY,1);
        pressure.get(iX,iY,lz-1) = pressure.get(iX,iY,lz-2);
      }
    }

    for (int iX=1; iX<lx-1; ++iX) {
      for (int iZ=0; iZ<lz; ++iZ) {
        pressure.get(iX,0,iZ)    = pressure.get(iX,1,iZ);
        pressure.get(iX,ly-1,iZ) = pressure.get(iX,ly-2,iZ);
      }
    }

    for (int iY=0; iY<ly; ++iY) {
      for (int iZ=0; iZ<lz; ++iZ) {
        pressure.get(0,iY,iZ)    = pressure.get(1,iY,iZ);
        pressure.get(lx-1,iY,iZ) = pressure.get(lx-2,iY,iZ);
      }
    }

    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {
        for (int iZ=1; iZ<lz-1; ++iZ) {
          T sumPressure =
            pressure.get(iX+1,iY  ,iZ  ) +
            pressure.get(iX-1,iY  ,iZ  ) +
            pressure.get(iX  ,iY+1,iZ  ) +
            pressure.get(iX  ,iY-1,iZ  ) +
            pressure.get(iX  ,iY  ,iZ+1) +
            pressure.get(iX  ,iY  ,iZ-1);

          pressure.get(iX,iY,iZ) =
            ((T)1-lambda) * pressure.get(iX,iY,iZ) +
            (lambda/(T)6) * (sumPressure + poissonTerm.get(iX,iY,iZ) );
        }
      }
    }

    maxResidue = std::numeric_limits<T>::min();
    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {
        for (int iZ=1; iZ<lz-1; ++iZ) {
          T sumPressure =
            pressure.get(iX+1,iY  ,iZ  ) +
            pressure.get(iX-1,iY  ,iZ  ) +
            pressure.get(iX  ,iY+1,iZ  ) +
            pressure.get(iX  ,iY-1,iZ  ) +
            pressure.get(iX  ,iY  ,iZ+1) +
            pressure.get(iX  ,iY  ,iZ-1);
          T residue = std::abs(sumPressure -(T)6*pressure.get(iX,iY,iZ)
                               + poissonTerm.get(iX,iY,iZ));
          if (residue > maxResidue) maxResidue = residue;
        }
      }
    }

    if (iter%20==0) {
      clout << "SOR iteration " << iter
            << ": max residue= "
            << maxResidue/averagePoisson << std::endl;
    }
    ++iter;
  }
  while (maxResidue/averagePoisson>epsilon);

  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      for (int iZ=0; iZ<lz; ++iZ) {
        lattice.get(iX,iY,iZ).defineRho (
          pressure.get(iX,iY,iZ)*Lattice<T>::invCs2 + (T)1 );
      }
    }
  }
}

Here is the call graph for this function:

template void olb::iniPressure3D< double, descriptors::D3Q19Descriptor > ( BlockLatticeView3D< double, descriptors::D3Q19Descriptor >  lattice,
double  epsilon,
double  lambda 
)
template<typename T >
void olb::istr2unSerializer ( DataUnSerializer< T > &  unSerializer,
std::istream *  istr,
bool  enforceUint = false 
)

Definition at line 81 of file serializerIO.hh.

References olb::DataUnSerializer< T >::commitData(), olb::Base64Decoder< T >::decode(), olb::DataUnSerializer< T >::getNextDataBuffer(), olb::DataUnSerializer< T >::getSize(), olb::DataUnSerializer< T >::isFull(), olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                                              {
  size_t fullSize = 0;
  if (singleton::mpi().isMainProcessor()) {
    size_t binarySize;
    if (enforceUint) {
      unsigned int uintBinarySize;
      Base64Decoder<unsigned int> sizeDecoder(*istr, 1);
      sizeDecoder.decode(&uintBinarySize, 1);
      binarySize = uintBinarySize;
    }
    else {
      Base64Decoder<size_t> sizeDecoder(*istr, 1);
      sizeDecoder.decode(&binarySize, 1);
    }
    fullSize = binarySize / sizeof(T);
    OLB_PRECONDITION(fullSize == unSerializer.getSize());
  }
  Base64Decoder<T>* dataDecoder = 0;
  if (singleton::mpi().isMainProcessor()) {
    dataDecoder = new Base64Decoder<T>(*istr, unSerializer.getSize());
  }
  while (!unSerializer.isFull()) {
    size_t bufferSize = 0;
    T* dataBuffer = unSerializer.getNextDataBuffer(bufferSize);
    if (singleton::mpi().isMainProcessor()) {
      dataDecoder->decode(dataBuffer, bufferSize);
    }
    unSerializer.commitData();
  }
  delete dataDecoder;
}

Here is the call graph for this function:

template void olb::istr2unSerializer< double > ( DataUnSerializer< double > &  unSerializer,
std::istream *  istr,
bool  enforceUint 
)
template<typename T , typename SizeType >
void olb::loadData ( Serializable< T > &  object,
std::string  fName,
bool  enforceUint = false 
)

Definition at line 114 of file serializerIO.hh.

References olb::IndexOrdering::memorySaving, olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                          {
  std::ifstream* istr = 0;
  if (singleton::mpi().isMainProcessor()) {
    istr = new std::ifstream(fName.c_str());
    OLB_PRECONDITION( *istr );
  }
  istr2unSerializer<T>(object.getUnSerializer(IndexOrdering::memorySaving), istr, enforceUint);
  delete istr;
}

Here is the call graph for this function:

template<typename T >
void olb::loadData ( Serializable< T > &  object,
std::string  fName,
bool  enforceUint 
)

Definition at line 114 of file serializerIO.hh.

References olb::IndexOrdering::memorySaving, olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                          {
  std::ifstream* istr = 0;
  if (singleton::mpi().isMainProcessor()) {
    istr = new std::ifstream(fName.c_str());
    OLB_PRECONDITION( *istr );
  }
  istr2unSerializer<T>(object.getUnSerializer(IndexOrdering::memorySaving), istr, enforceUint);
  delete istr;
}

Here is the call graph for this function:

template void olb::loadData< double > ( Serializable< double > &  object,
std::string  fName,
bool  enforceUint 
)
void olb::olbInit ( int *  argc,
char ***  argv,
bool  verbose = false 
) [inline]

Definition at line 37 of file olbInit.h.

References olb::singleton::mpi(), and olb::OstreamManager::setMultiOutput().

                                                                 {

// create an OstreamManager object in order to enable multi output
  olb::OstreamManager clout(std::cout,"olbInit");
  clout.setMultiOutput(verbose);
  singleton::mpi().init(argc, argv);

#ifdef PARALLEL_MODE_MPI
  /*ParBuf *newCoutBuf = new ParBuf(std::cout.rdbuf());
  ParBuf *newClogBuf = new ParBuf(std::clog.rdbuf());
  ParBuf *newCinBuf  = new ParBuf(std::cin.rdbuf());

  std::cout.rdbuf(newCoutBuf);
  std::clog.rdbuf(newClogBuf);
  std::cin. rdbuf(newCinBuf);*/
#endif

#ifdef PARALLEL_MODE_OMP
  #pragma omp parallel
  omp.init();
#endif

}

Here is the call graph for this function:

template<typename T >
void olb::saveAsciiData ( Serializable< T > const &  object,
std::string  fName 
)

Definition at line 125 of file serializerIO.hh.

References olb::DataSerializer< T >::getNextDataBuffer(), olb::DataSerializer< T >::isEmpty(), olb::IndexOrdering::memorySaving, olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                   {
  std::ofstream* ostr = 0;
  if (singleton::mpi().isMainProcessor()) {
    ostr = new std::ofstream(fName.c_str());
    OLB_PRECONDITION( *ostr );
  }
  DataSerializer<T> const& serializer = object.getSerializer(IndexOrdering::memorySaving);
  while (!serializer.isEmpty()) {
    size_t bufferSize;
    const T* dataBuffer = serializer.getNextDataBuffer(bufferSize);
    if (singleton::mpi().isMainProcessor()) {
      for (size_t iData=0; iData<bufferSize; ++iData) {
        *ostr << dataBuffer[iData] << " ";
      }
    }
  }
  delete ostr;
}

Here is the call graph for this function:

template void olb::saveAsciiData< double > ( Serializable< double > const &  object,
std::string  fName 
)
template<typename T >
void olb::saveData ( Serializable< T > const &  object,
std::string  fName,
bool  enforceUint = false 
)

Definition at line 70 of file serializerIO.hh.

References olb::IndexOrdering::memorySaving, olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                                {
  std::ofstream* ostr = 0;
  if (singleton::mpi().isMainProcessor()) {
    ostr = new std::ofstream(fName.c_str());
    OLB_PRECONDITION( *ostr );
  }
  serializer2ostr<T>(object.getSerializer(IndexOrdering::memorySaving), ostr, enforceUint);
  delete ostr;
}

Here is the call graph for this function:

template void olb::saveData< double > ( Serializable< double > const &  object,
std::string  fName,
bool  enforceUint 
)
template<typename T >
void olb::serializer2ostr ( DataSerializer< T > const &  serializer,
std::ostream *  ostr,
bool  enforceUint = false 
)

Definition at line 39 of file serializerIO.hh.

References olb::Base64Encoder< T >::encode(), olb::DataSerializer< T >::getNextDataBuffer(), olb::DataSerializer< T >::getSize(), olb::DataSerializer< T >::isEmpty(), olb::singleton::mpi(), and OLB_PRECONDITION.

                                                                                              {
  size_t fullSize = 0;
  if (singleton::mpi().isMainProcessor()) {
    fullSize = serializer.getSize();
    size_t binarySize = (size_t) (fullSize * sizeof(T));
    if (enforceUint) {
      Base64Encoder<unsigned int> sizeEncoder(*ostr, 1);
      OLB_PRECONDITION(binarySize <= std::numeric_limits<unsigned int>::max());
      unsigned int uintBinarySize = (unsigned int)binarySize;
      sizeEncoder.encode(&uintBinarySize, 1);
    }
    else {
      Base64Encoder<size_t> sizeEncoder(*ostr, 1);
      sizeEncoder.encode(&binarySize, 1);
    }
  }
  Base64Encoder<T>* dataEncoder = 0;
  if (singleton::mpi().isMainProcessor()) {
    dataEncoder = new Base64Encoder<T>(*ostr, fullSize);
  }
  while (!serializer.isEmpty()) {
    size_t bufferSize;
    const T* dataBuffer = serializer.getNextDataBuffer(bufferSize);
    if (singleton::mpi().isMainProcessor()) {
      dataEncoder->encode(dataBuffer, bufferSize);
    }
  }
  delete dataEncoder;
}

Here is the call graph for this function:

template void olb::serializer2ostr< double > ( DataSerializer< double > const &  serializer,
std::ostream *  ostr,
bool  enforceUint 
)
template<typename T , template< typename U > class Lattice>
void olb::testLaplace ( BlockLatticeView2D< T, Lattice >  lattice,
epsilon,
lambda = 1.8 
)

Definition at line 203 of file simulationSetup2D.hh.

References olb::ScalarField2D< T >::construct(), olb::BlockLatticeView2D< T, Lattice >::get(), olb::ScalarFieldBase2D< T >::get(), olb::ScalarField2D< T >::get(), olb::BlockLatticeView2D< T, Lattice >::getDataAnalysis(), olb::BlockLatticeView2D< T, Lattice >::getNx(), olb::BlockLatticeView2D< T, Lattice >::getNy(), and olb::util::sqr().

                                                                             {
  OstreamManager clout(std::cout,"testLaplace");
  int lx = lattice.getNx();
  int ly = lattice.getNy();

  ScalarFieldBase2D<T> const& poissonTerm = lattice.getDataAnalysis().getPoissonTerm();

  ScalarField2D<T> pressure(lx, ly);
  pressure.construct();
  ScalarField2D<T> pressure2(lx, ly);
  pressure2.construct();

  T averagePoisson = T();
  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      pressure.get(iX,iY) = T();
      averagePoisson += util::sqr(poissonTerm.get(iX,iY));
    }
  }
  averagePoisson /= (lx*ly);
  averagePoisson = sqrt(averagePoisson);

  int iter=0;
  T maxResidue = (T)1;
  do {
    for (int iX=1; iX<lx-1; ++iX) {
      pressure.get(iX,0) = pressure.get(iX,1);
      pressure.get(iX,ly-1) = pressure.get(iX,ly-2);
    }
    for (int iY=1; iY<ly-1; ++iY) {
      pressure.get(0,iY) = pressure.get(1,iY);
      pressure.get(lx-1,iY) = pressure.get(lx-2,iY);
    }
    pressure.get(0,0)       = pressure.get(1,1);
    pressure.get(lx-1,0   ) = pressure.get(lx-2,2);
    pressure.get(0,ly-1)    = pressure.get(1,ly-2);
    pressure.get(lx-1,ly-1) = pressure.get(lx-2,ly-2);

    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {

        T sumPressure =
          pressure.get(iX+1,iY) +
          pressure.get(iX,iY+1) +
          pressure.get(iX-1,iY) +
          pressure.get(iX,iY-1);

        pressure.get(iX,iY) =
          ((T)1-lambda) * pressure.get(iX,iY) +
          (lambda/(T)4) * (sumPressure + poissonTerm.get(iX,iY) );
      }
    }

    maxResidue = std::numeric_limits<T>::min();
    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {
        T sumPressure =
          pressure.get(iX+1,iY) +
          pressure.get(iX,iY+1) +
          pressure.get(iX-1,iY) +
          pressure.get(iX,iY-1);
        T residue = fabs(sumPressure -(T)4*pressure.get(iX,iY)
                         + poissonTerm.get(iX,iY));
        if (residue > maxResidue) maxResidue = residue;
      }
    }

    if (iter%20==0) {
      clout << "SOR iteration " << iter
            << ": max residue= "
            << maxResidue/averagePoisson << std::endl;
    }
    ++iter;
  }
  while (maxResidue/averagePoisson>epsilon);

  iter = 0;
  T difference = (T)1;
  do {
    for (int iX=1; iX<lx-1; ++iX) {
      pressure2.get(iX,0) = pressure2.get(iX,1);
      pressure2.get(iX,ly-1) = pressure2.get(iX,ly-2);
    }
    for (int iY=1; iY<ly-1; ++iY) {
      pressure2.get(0,iY) = pressure2.get(1,iY);
      pressure2.get(lx-1,iY) = pressure2.get(lx-2,iY);
    }
    pressure2.get(0,0)       = pressure2.get(1,1);
    pressure2.get(lx-1,0   ) = pressure2.get(lx-2,2);
    pressure2.get(0,ly-1)    = pressure2.get(1,ly-2);
    pressure2.get(lx-1,ly-1) = pressure2.get(lx-2,ly-2);

    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {

        T sumPressure =
          pressure2.get(iX+1,iY) +
          pressure2.get(iX,iY+1) +
          pressure2.get(iX-1,iY) +
          pressure2.get(iX,iY-1);

        pressure2.get(iX,iY) =
          ((T)1-lambda) * pressure2.get(iX,iY) +
          (lambda/(T)4) * (sumPressure + poissonTerm.get(iX,iY) );
      }
    }

    difference = T();
    for (int iX=0; iX<lx; ++iX) {
      for (int iY=0; iY<ly; ++iY) {
        difference
        += util::sqr(pressure.get(iX,iY)-pressure2.get(iX,iY));
      }
    }
    difference = sqrt(difference/(T)(lx*ly))/4e-4;

    if (iter%20==0) {
      clout << difference << std::endl;
    }
    ++iter;
  }
  while (difference>epsilon);

  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      lattice.get(iX,iY).defineRho (
        pressure.get(iX,iY)*Lattice<T>::invCs2 + (T)1 );
    }
  }
}

Here is the call graph for this function:

template<typename T , template< typename U > class Lattice>
void olb::testLiShi ( BlockLattice2D< T, Lattice > &  lattice,
epsilon,
lambda = 1.8 
)

Definition at line 384 of file simulationSetup2D.hh.

References olb::ScalarField2D< T >::construct(), olb::BlockLattice2D< T, Lattice >::get(), olb::ScalarField2D< T >::get(), olb::BlockLatticeView2D< T, Lattice >::getDataAnalysis(), olb::BlockLattice2D< T, Lattice >::getNx(), olb::BlockLattice2D< T, Lattice >::getNy(), olb::DataAnalysisBase2D< T, Lattice >::getPoissonTerm(), olb::DataAnalysisBase2D< T, Lattice >::getVelocity(), olb::util::sqr(), olb::BlockLattice2D< T, Lattice >::staticCollide(), and olb::BlockLattice2D< T, Lattice >::stream().

{
  OstreamManager clout(std::cout,"testLiShi");
  BlockLatticeView2D<T,Lattice> latticeView(lattice);
  DataAnalysisBase2D<T,Lattice> const& analysis = latticeView.getDataAnalysis();
  TensorFieldBase2D<T,2> const& velocity = analysis.getVelocity();

  int lx = lattice.getNx();
  int ly = lattice.getNy();

  ScalarField2D<T> const& poissonTerm = analysis.getPoissonTerm();

  ScalarField2D<T> pressure(lx, ly);
  pressure.construct();

  T averagePoisson = T();
  for (int iX=0; iX<lx; ++iX) {
    for (int iY=0; iY<ly; ++iY) {
      pressure.get(iX,iY) = T();
      averagePoisson += util::sqr(poissonTerm.get(iX,iY));
    }
  }
  averagePoisson /= (lx*ly);
  averagePoisson = sqrt(averagePoisson);

  int iter=0;
  T maxResidue = (T)1;
  do {
    for (int iX=1; iX<lx-1; ++iX) {
      pressure.get(iX,0) = pressure.get(iX,1);
      pressure.get(iX,ly-1) = pressure.get(iX,ly-2);
    }
    for (int iY=1; iY<ly-1; ++iY) {
      pressure.get(0,iY) = pressure.get(1,iY);
      pressure.get(lx-1,iY) = pressure.get(lx-2,iY);
    }
    pressure.get(0,0)       = pressure.get(1,1);
    pressure.get(lx-1,0   ) = pressure.get(lx-2,2);
    pressure.get(0,ly-1)    = pressure.get(1,ly-2);
    pressure.get(lx-1,ly-1) = pressure.get(lx-2,ly-2);

    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {

        T sumPressure =
          pressure.get(iX+1,iY) +
          pressure.get(iX,iY+1) +
          pressure.get(iX-1,iY) +
          pressure.get(iX,iY-1);

        pressure.get(iX,iY) =
          ((T)1-lambda) * pressure.get(iX,iY) +
          (lambda/(T)4) * (sumPressure + poissonTerm.get(iX,iY) );
      }
    }

    maxResidue = std::numeric_limits<T>::min();
    for (int iX=1; iX<lx-1; ++iX) {
      for (int iY=1; iY<ly-1; ++iY) {
        T sumPressure =
          pressure.get(iX+1,iY) +
          pressure.get(iX,iY+1) +
          pressure.get(iX-1,iY) +
          pressure.get(iX,iY-1);
        T residue = fabs(sumPressure -(T)4*pressure.get(iX,iY)
                         + poissonTerm.get(iX,iY));
        if (residue > maxResidue) maxResidue = residue;
      }
    }

    if (iter%20==0) {
      clout << "SOR iteration " << iter
            << ": max residue= "
            << maxResidue/averagePoisson << std::endl;
    }
    ++iter;
  }
  while (maxResidue/averagePoisson>epsilon);

  T diff=(T)1;
  for(int i=0; i<50000; ++i) {
    lattice.staticCollide(velocity);
    lattice.stream();

    T averageRho = T();
    for (int iX=0; iX<lx; ++iX) {
      for (int iY=0; iY<ly; ++iY) {
        averageRho += lattice.get(iX,iY).computeRho();
      }
    }

    averageRho /= (T)(lx*ly);

    T difference = T();
    for (int iX=0; iX<lx; ++iX) {
      for (int iY=0; iY<ly; ++iY) {
        difference += util::sqr(
                        pressure.get(iX,iY)-
                        (lattice.get(iX,iY).computeRho()-averageRho)/3.);
      }
    }
    difference = sqrt(difference/(T)(lx*ly))/4e-4;

    if (i%20==0) {
      clout << difference << std::endl;
    }
  }
  while (diff > epsilon);
}

Here is the call graph for this function:

template<typename T , std::size_t D>
int olb::treeDepth ( cvmlcpp::DTree< T, D >  tree)

Use BFS to find the height of a DTree.

Definition at line 42 of file stlReader.hh.

                                      {
  typedef cvmlcpp::DTreeProxy<T, D> DNode;
  unsigned currentDepth = 0;
  std::queue< DNode > q;
  q.push(tree.root());

  while (!q.empty()) {
    DNode node = q.front();
    q.pop();
    if (node.depth() > currentDepth) currentDepth = node.depth();
    // if the node is a branch
    if (!node.isLeaf()) {
      // we examine all of its children
      for (int i = 0; i < (1 << D); ++i) {
        q.push(node[i]);
      }
    }
  }
  return currentDepth;
}
template<typename T >
void olb::write ( LBconverter< T > const &  converter)

Definition at line 98 of file units.hh.

References olb::LBconverter< T >::getCharForce(), olb::LBconverter< T >::getCharL(), olb::LBconverter< T >::getCharMass(), olb::LBconverter< T >::getCharNu(), olb::LBconverter< T >::getCharPressure(), olb::LBconverter< T >::getCharRho(), olb::LBconverter< T >::getCharTime(), olb::LBconverter< T >::getCharU(), olb::LBconverter< T >::getDeltaT(), olb::LBconverter< T >::getDeltaX(), olb::LBconverter< T >::getDim(), olb::LBconverter< T >::getDimlessNu(), olb::LBconverter< T >::getLatticeL(), olb::LBconverter< T >::getLatticeNu(), olb::LBconverter< T >::getLatticeU(), olb::LBconverter< T >::getOmega(), olb::LBconverter< T >::getPressureLevel(), olb::LBconverter< T >::getRe(), olb::LBconverter< T >::getTau(), olb::LBconverter< T >::latticePressure(), olb::LBconverter< T >::physFlowRate(), olb::LBconverter< T >::physForce(), olb::LBconverter< T >::physMass(), olb::LBconverter< T >::physMasslessForce(), olb::LBconverter< T >::physPressure(), olb::LBconverter< T >::physTime(), and olb::LBconverter< T >::physVelocity().

{
  OstreamManager clout(std::cout,"ConvLog");

  clout << "LBconverter information" << std::endl;
  clout << "characteristical values" << std::endl;
  clout << "Dimension(d):                     dim="              << converter.getDim()              << std::endl;
  clout << "Characteristical length(m):       charL="            << converter.getCharL()            << std::endl;
  clout << "Characteristical speed(m/s):      charU="            << converter.getCharU()            << std::endl;
  clout << "Characteristical time(s):         charT="            << converter.getCharTime()         << std::endl;
  clout << "Density factor(kg/m^d):           charRho="          << converter.getCharRho()          << std::endl;
  clout << "Characterestical mass(kg):        charMass="         << converter.getCharMass()         << std::endl;
  clout << "Characterestical force(N):        charForce="        << converter.getCharForce()        << std::endl;
  clout << "Characterestical pressure(Pa):    charPressure="     << converter.getCharPressure()     << std::endl;
  clout << "Pressure level(Pa):               pressureLevel="    << converter.getPressureLevel()    << std::endl;
  clout << "Phys. kinematic viscosity(m^2/s): charNu="           << converter.getCharNu()           << std::endl;

  clout << "lattice values" << std::endl;
  clout << "DeltaX:                           deltaX="           << converter.getDeltaX()           << std::endl;
  clout << "Lattice velocity:                 latticeU="         << converter.getLatticeU()         << std::endl;
  clout << "DeltaT:                           deltaT="           << converter.getDeltaT()           << std::endl;
  clout << "Reynolds number:                  Re="               << converter.getRe()               << std::endl;
  clout << "DimlessNu:                        dNu="              << converter.getDimlessNu()        << std::endl;
  clout << "Viscosity for computation:        latticeNu="        << converter.getLatticeNu()        << std::endl;
  clout << "Relaxation time:                  tau="              << converter.getTau()              << std::endl;
  clout << "Relaxation frequency:             omega="            << converter.getOmega()            << std::endl;


  clout << "conversion factors" << std::endl;
  clout << "latticeL(m):                      latticeL="         << converter.getLatticeL()         << std::endl;
  clout << "Time step (s):                    physTime="         << converter.physTime()            << std::endl;
  clout << "Velocity factor(m/s):             physVelocity="     << converter.physVelocity()        << std::endl;
  clout << "FlowRate factor(m^d/s):           physFlowRate="     << converter.physFlowRate()        << std::endl;
  clout << "Mass factor(kg):                  physMass="         << converter.physMass()            << std::endl;
  clout << "Force factor(N):                  physForce="        << converter.physForce()           << std::endl;
  clout << "Force factor massless(N/kg):      physMasslessForce="<< converter.physMasslessForce()   << std::endl;
  clout << "Pressure factor(Pa):              physPressure="     << converter.physPressure(4)       << std::endl;
  clout << "latticePressure:                  latticeP="         << converter.latticePressure()     << std::endl;

}

Here is the call graph for this function:

template void olb::writeLogFile ( LBconverter< double > const &  converter,
std::string const &  title 
)
template void olb::writeLogFile ( LBunits< double > const &  converter,
std::string const &  title 
)
template<typename T , template< typename NSU > class NSLattice, template< typename ADU > class ADLattice>
void olb::writeLogFile ( AdvectionDiffusionUnitLB< T, NSLattice, ADLattice > const &  converter,
std::string const &  title 
)

Definition at line 108 of file advectionDiffusionUnits.h.

References olb::singleton::directories(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getDeltaT(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getDeltaX(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getKappa(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getLx(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getLy(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getLz(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getN(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getNu(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getPr(), olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getRa(), and olb::AdvectionDiffusionUnitLB< T, NSLattice, ADLattice >::getU().

{
  std::string fullName = singleton::directories().getLogOutDir() +
                         "olbLog.dat";
  std::ofstream ofile(fullName.c_str());
  ofile << title << "\n\n";
  ofile << "Velocity in lattice units: u=" << converter.getU() << "\n";
  ofile << "Raynleigh number:          Ra=" << converter.getRa() << "\n";
  ofile << "Prandlt number:            Pr=" << converter.getPr() << "\n";
  ofile << "Kinematic viscosity:       Nu=" << converter.getNu() << "\n";
  ofile << "AdvectionDiffusion conductivity:      Kappa=" << converter.getKappa() << "\n";
  ofile << "Lattice resolution:        N=" << converter.getN() << "\n";
  ofile << "Extent of the system:      lx=" << converter.getLx() << "\n";
  ofile << "Extent of the system:      ly=" << converter.getLy() << "\n";
  ofile << "Extent of the system:      lz=" << converter.getLz() << "\n";
  ofile << "Grid spacing deltaX:       dx=" << converter.getDeltaX() << "\n";
  ofile << "Time step deltaT:          dt=" << converter.getDeltaT() << "\n";
}

Here is the call graph for this function:

template<typename T >
void olb::writeLogFile ( LBconverter< T > const &  converter,
std::string const &  title 
)

Definition at line 53 of file units.hh.

References olb::singleton::directories(), olb::LBconverter< T >::getCharForce(), olb::LBconverter< T >::getCharL(), olb::LBconverter< T >::getCharMass(), olb::LBconverter< T >::getCharNu(), olb::LBconverter< T >::getCharPressure(), olb::LBconverter< T >::getCharRho(), olb::LBconverter< T >::getCharTime(), olb::LBconverter< T >::getCharU(), olb::LBconverter< T >::getDeltaT(), olb::LBconverter< T >::getDeltaX(), olb::LBconverter< T >::getDim(), olb::LBconverter< T >::getDimlessNu(), olb::LBconverter< T >::getLatticeL(), olb::LBconverter< T >::getLatticeNu(), olb::LBconverter< T >::getLatticeU(), olb::LBconverter< T >::getOmega(), olb::LBconverter< T >::getPressureLevel(), olb::LBconverter< T >::getRe(), olb::LBconverter< T >::getTau(), olb::LBconverter< T >::latticePressure(), olb::LBconverter< T >::physFlowRate(), olb::LBconverter< T >::physForce(), olb::LBconverter< T >::physMass(), olb::LBconverter< T >::physMasslessForce(), olb::LBconverter< T >::physPressure(), olb::LBconverter< T >::physTime(), and olb::LBconverter< T >::physVelocity().

{
  std::string fullName = singleton::directories().getLogOutDir() + title + ".dat";
  olb_ofstream ofile(fullName.c_str());
  ofile << "LBconverter information\n\n";
  ofile << "characteristical values\n";
  ofile << "----------------------------------------------------------------------\n";
  ofile << "Dimension(d):                     dim="              << converter.getDim()              << "\n";
  ofile << "Characteristical length(m):       charL="            << converter.getCharL()            << "\n";
  ofile << "Characteristical speed(m/s):      charU="            << converter.getCharU()            << "\n";
  ofile << "Characteristical time(s):         charT="            << converter.getCharTime()         << "\n";
  ofile << "Density factor(kg/m^d):           charRho="          << converter.getCharRho()          << "\n";
  ofile << "Characterestical mass(kg):        charMass="         << converter.getCharMass()         << "\n";
  ofile << "Characterestical force(N):        charForce="        << converter.getCharForce()        << "\n";
  ofile << "Characterestical pressure(Pa):    charPressure="     << converter.getCharPressure()     << "\n";
  ofile << "Pressure level(Pa):               pressureLevel="    << converter.getPressureLevel()    << "\n";
  ofile << "Phys. kinematic viscosity(m^2/s): charNu="           << converter.getCharNu()           << "\n";
  ofile << "======================================================================\n\n";
  ofile << "lattice values\n";
  ofile << "----------------------------------------------------------------------\n";
  ofile << "DeltaX:                           deltaX="           << converter.getDeltaX()           << "\n";
  ofile << "Lattice velocity:                 latticeU="         << converter.getLatticeU()         << "\n";
  ofile << "DeltaT:                           deltaT="           << converter.getDeltaT()           << "\n";
  ofile << "Reynolds number:                  Re="               << converter.getRe()               << "\n";
  ofile << "DimlessNu:                        dNu="              << converter.getDimlessNu()        << "\n";
  ofile << "Viscosity for computation:        latticeNu="        << converter.getLatticeNu()        << "\n";
  ofile << "Relaxation time:                  tau="              << converter.getTau()              << "\n";
  ofile << "Relaxation frequency:             omega="            << converter.getOmega()            << "\n";
  ofile << "======================================================================\n\n";
  ofile << "conversion factors\n";
  ofile << "----------------------------------------------------------------------\n";
  ofile << "latticeL(m):                      latticeL="         << converter.getLatticeL()         << "\n";
  ofile << "Time step (s):                    physTime="         << converter.physTime()            << "\n";
  ofile << "Velocity factor(m/s):             physVelocity="     << converter.physVelocity()        << "\n";
  ofile << "FlowRate factor(m^d/s):           physFlowRate="     << converter.physFlowRate()        << "\n";
  ofile << "Mass factor(kg):                  physMass="         << converter.physMass()            << "\n";
  ofile << "Force factor(N):                  physForce="        << converter.physForce()           << "\n";
  ofile << "Force factor massless(N/kg):      physMasslessForce="<< converter.physMasslessForce()   << "\n";
  ofile << "Pressure factor(Pa):              physPressure="     << converter.physPressure(4)       << "\n";
  ofile << "latticePressure:                  latticeP="         << converter.latticePressure()     << "\n";

}

Here is the call graph for this function:

template<typename T >
void olb::writeLogFile ( LBunits< T > const &  converter,
std::string const &  title 
)

Definition at line 33 of file units.hh.

References olb::singleton::directories(), olb::LBunits< T >::getDeltaT(), olb::LBunits< T >::getDeltaX(), olb::LBunits< T >::getLatticeNu(), olb::LBunits< T >::getLatticeU(), olb::LBunits< T >::getLx(), olb::LBunits< T >::getLy(), olb::LBunits< T >::getLz(), olb::LBunits< T >::getOmega(), olb::LBunits< T >::getRe(), olb::LBunits< T >::getResolution(), and olb::LBunits< T >::getTau().

{
  std::string fullName = singleton::directories().getLogOutDir() + "olbLog.dat";
  olb_ofstream ofile(fullName.c_str());
  ofile << title << "\n\n";
  ofile << "Velocity in lattice units: u="         << converter.getLatticeU()   << "\n";
  ofile << "Reynolds number:           Re="        << converter.getRe()         << "\n";
  ofile << "Lattice viscosity:         latticeNu=" << converter.getLatticeNu()  << "\n";
  ofile << "Lattice resolution:        N="         << converter.getResolution() << "\n";
  ofile << "Extent of the system:      lx="        << converter.getLx()         << "\n";
  ofile << "Extent of the system:      ly="        << converter.getLy()         << "\n";
  ofile << "Extent of the system:      lz="        << converter.getLz()         << "\n";
  ofile << "Grid spacing deltaX:       dx="        << converter.getDeltaX()     << "\n";
  ofile << "Time step deltaT:          dt="        << converter.getDeltaT()     << "\n";
  ofile << "Relaxation time:           tau="       << converter.getTau()        << "\n";
  ofile << "Relaxation frequency:      omega="     << converter.getOmega()      << "\n";
}

Here is the call graph for this function:

template<typename T >
void olb::writeVTKData3D ( std::string const &  fName,
std::string const &  scalarFieldName,
ScalarFieldBase3D< T > const &  scalarField,
std::string const &  vectorFieldName,
TensorFieldBase3D< T, 3 > const &  vectorField,
deltaX,
deltaT 
)

Definition at line 224 of file vtkDataOutput.hh.

References olb::IndexOrdering::backward, olb::singleton::directories(), olb::VtkDataWriter3D::endPiece(), olb::ScalarFieldBase3D< T >::getNx(), olb::ScalarFieldBase3D< T >::getNy(), olb::ScalarFieldBase3D< T >::getNz(), olb::Serializable< T >::getSerializer(), olb::VtkDataWriter3D::startPiece(), olb::VtkDataWriter3D::writeDataField(), olb::VtkDataWriter3D::writeFooter(), and olb::VtkDataWriter3D::writeHeader().

{
  std::string fullName = singleton::directories().getVtkOutDir() + fName+".vti";
  VtkDataWriter3D vtiOut(fullName);
  int nx = scalarField.getNx();
  int ny = scalarField.getNy();
  int nz = scalarField.getNz();
  vtiOut.writeHeader(0,nx-1,0,ny-1,0,nz-1,0,0,0,deltaX);

  vtiOut.startPiece(0,nx-1,0,ny-1,0,nz-1);
  vtiOut.writeDataField(scalarField.getSerializer(IndexOrdering::backward), scalarFieldName, 1./deltaT, 1);

  vtiOut.writeDataField(vectorField.getSerializer(IndexOrdering::backward), vectorFieldName, deltaX/deltaT, 3);
  vtiOut.endPiece();

  vtiOut.writeFooter();
}

Here is the call graph for this function:

template void olb::writeVTKData3D< double > ( std::string const &  fName,
std::string const &  scalarFieldName,
ScalarFieldBase3D< double > const &  scalarField,
std::string const &  vectorFieldName,
TensorFieldBase3D< double, 3 > const &  vectorField,
double  deltaX,
double  deltaT 
)

Variable Documentation

home baron Hiwi codesion git sources openlb release src complexGrids cuboidStructure cuboidNeighbourhood2D cpp template struct olb::Cell2D< double >

Definition at line 38 of file cuboidNeighbourhood2D.cpp.

home baron Hiwi codesion git sources openlb release src complexGrids cuboidStructure cuboidNeighbourhood3D cpp template struct olb::Cell3D< double >

Definition at line 38 of file cuboidNeighbourhood3D.cpp.

home baron Hiwi codesion git sources openlb release src complexGrids cuboidStructure cuboid2D cpp template class olb::Cuboid2D< double >

Definition at line 35 of file cuboid2D.cpp.

home baron Hiwi codesion git sources openlb release src complexGrids cuboidStructure cuboid3D cpp template class olb::Cuboid3D< double >

Definition at line 35 of file cuboid3D.cpp.

home baron Hiwi codesion git sources openlb release src complexGrids cuboidStructure cuboidGeometry2D cpp template class olb::CuboidGeometry2D< double >

Definition at line 34 of file cuboidGeometry2D.cpp.

home baron Hiwi codesion git sources openlb release src complexGrids cuboidStructure cuboidGeometry3D cpp template class olb::CuboidGeometry3D< double >

Definition at line 34 of file cuboidGeometry3D.cpp.

home baron Hiwi codesion git sources openlb release src complexGrids multiBlockStructure multiBlockStatistics cpp template class olb::MultiBlockReductor< double >

Definition at line 33 of file multiBlockStatistics.cpp.