24#ifndef AVAILABLE_DYNAMICS_H
25#define AVAILABLE_DYNAMICS_H
33 template <
typename T,
typename DESCRIPTOR>
38 template<
typename T,
typename DESCRIPTOR>
75 template<
typename T,
typename DESCRIPTOR>
163 template <
typename T,
typename DESCRIPTOR>
166 bool dynamicFound =
false;
172 clout << DynamicsPromise<T, DESCRIPTOR>(dynamic).realize()->getName() << std::endl;
178 clout <<
"Returned dynamic" << std::endl;
181 throw std::invalid_argument(
"Model " + name +
" not available");
185 template <
typename T,
typename DESCRIPTOR>
191 template <
typename T,
typename DESCRIPTOR>
196 clout <<
"size " << indicators.size() << std::endl;
199 for (
int i = 0; i < dynamicsStrings.size(); i++) {
200 clout << indicators[i] << std::endl;
206 template <
typename T,
typename DESCRIPTOR>
215 template<
typename T,
typename DESCRIPTOR>
223 auto it = parameters.find(
fields::name<
decltype(field.get())>());
224 if (it != parameters.end()) {
225 clout <<
"Name: " <<
fields::name<
decltype(field.get())>() <<
", Value: " << it->second << std::endl;
226 sLattice.template setParameter<
decltype(field.get())>( it->second );
Factory for instances of a specific Dynamics type.
std::vector< int > readIndicatorFromXML()
std::vector< std::string > readTupleFromXML()
std::map< std::string, float > readParameterFromXML()
class for marking output with some text
Representation of a statistic for a parallel 2D geometry.
std::unique_ptr< SuperIndicatorF< T, D > > getMaterialIndicator(std::vector< int > &&materials)
Returns a material indicator using the given vector of materials.
Super class maintaining block lattices for a cuboid decomposition.
void defineDynamics()
Set dynamics of all cells to DYNAMICS.
std::string name()
Returns name of FIELD for human consumption.
Top level namespace for all of OpenLB.
void defineDynamicsFromString(SuperLattice< T, DESCRIPTOR > &sLattice, std::unique_ptr< olb::SuperIndicatorF< T, 3U > > indicatorF, std::string modelName)
DynamicsPromise< T, DESCRIPTOR > mapStringToDynamics(std::string name)
void setParameterFromXml(SuperLattice< T, DESCRIPTOR > &sLattice, std::string xmlFileName)
std::string getName(OperatorScope scope)
Returns human-readable name of scope.
DynamicsPromise(meta::id< DYNAMICS >) -> DynamicsPromise< typename DYNAMICS::value_t, typename DYNAMICS::descriptor_t >
std::conditional_t< D==2, SuperIndicatorF2D< T >, SuperIndicatorF3D< T > > SuperIndicatorF
void defineDynamicsFromXml(std::string xmlFileName, SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &sGeometry)
void defineDynamicsAndSetParameterFromXml(std::string xmlFileName, SuperGeometry< T, 3 > &sGeometry, SuperLattice< T, DESCRIPTOR > &sLattice)
Compute dynamics parameter OMEGA locally using Smagorinsky LES model.
Dynamics constructed as a tuple of momenta, equilibrium and collision.
Objective functional derivative regarding optimization controls.
Derivative of Objective functional regarding populations.
Stores populations of the primal problems for adjoint simulations.