25#ifndef OPTI_SOLVER_PARAMETERS_H
26#define OPTI_SOLVER_PARAMETERS_H
53template <
typename T, opti::SolverMode MODE=opti::SolverMode::Reference>
59 std::size_t counterOptiStep {0};
64 std::size_t counterOptiStep {0};
67template<
typename T, opti::SolverMode MODE,
typename TAG>
98template<
typename T,
typename LATTICES>
101 using descriptor =
typename LATTICES::values_t::template get<0>;
109template<
typename T,
typename LATTICES, opti::SolverMode MODE=opti::SolverMode::Reference>
113template<
typename T,
typename LATTICES>
123template<
typename T,
typename LATTICES>
127 using descriptor =
typename LATTICES::values_t::template get<0>;
128 static constexpr unsigned dim = descriptor::d;
130 std::shared_ptr<SuperLatticeF<T,descriptor>>
fpop;
137template<
typename T,
typename LATTICES, opti::SolverMode MODE,
typename TAG>
139 :
public ReaderBase<DistributedOptiSimulation<T,LATTICES,MODE>> {
144 xml.
readOrWarn<
int>(
"Optimization",
"ControlMaterial",
"",
145 this->
params->controlMaterial,
true,
true,
true);
146 xml.
readOrWarn<
int>(
"Optimization",
"FieldDimension",
"",
147 this->
params->fieldDim,
true,
false,
true);
154template<
typename T,
typename LATTICES, opti::SolverMode MODE>
157template<
typename T,
typename LATTICES>
161 using descriptor =
typename LATTICES::values_t::template get<0>;
162 std::shared_ptr<SuperGeometry<T,descriptor::d>>
geometry;
163 std::shared_ptr<SuperLattice<T,descriptor>>
lattice;
168template<
typename T,
typename LATTICES>
172 using descriptor =
typename LATTICES::values_t::template get<0>;
173 std::shared_ptr<SuperGeometry<T,descriptor::d>>
geometry;
174 std::shared_ptr<SuperLattice<T,descriptor>>
lattice;
176 std::shared_ptr<SuperLatticeF<T,descriptor>>
fpop;
177 std::shared_ptr<SuperF3D<T,T>>
djdf;
178 std::shared_ptr<SuperLatticeF<T,descriptor>>
djdalpha;
181 T objective {std::numeric_limits<BT>::infinity()};
182 bool objectiveComputed {
false};
185template<
typename T,
typename LATTICES>
189 using descriptor =
typename LATTICES::values_t::template get<0>;
190 std::shared_ptr<SuperLattice<T,descriptor>>
lattice;
bool readOrWarn(std::string name_parameter_1, std::string name_parameter_2, std::string name_parameter_3, ParameterType &var, bool defaultAvailable=true, bool exitIfMissing=false, bool showWarning=true) const
This wrapper function reads the given parameter from the "type_parameter" and "name_parameter_1" or "...
SolverMode
Tags different simulation modes: compute either reference simulation or perform primal or dual (adjoi...
Top level namespace for all of OpenLB.
typename util::BaseTypeHelper< T >::type BaseType
virtual void applyControl(const std::vector< T > &control)=0
typename LATTICES::values_t::template get< 0 > descriptor
std::shared_ptr< SuperLatticeF< T, descriptor > > controlledField
typename LATTICES::values_t::template get< 0 > descriptor
std::shared_ptr< SuperLattice< T, descriptor > > lattice
std::shared_ptr< SuperLatticeF< T, descriptor > > fpop
typename LATTICES::values_t::template get< 0 > descriptor
std::shared_ptr< SuperLattice< T, descriptor > > lattice
std::shared_ptr< SuperGeometry< T, descriptor::d > > geometry
std::shared_ptr< SuperLatticeF< T, descriptor > > djdalpha
std::shared_ptr< SuperF3D< T, T > > djdf
std::shared_ptr< SuperLattice< T, descriptor > > lattice
std::shared_ptr< SuperGeometry< T, descriptor::d > > geometry
std::shared_ptr< SuperLatticeF< T, descriptor > > referenceSolution
typename LATTICES::values_t::template get< 0 > descriptor
std::shared_ptr< SuperF3D< T, T > > dObjectiveDf
typename LATTICES::values_t::template get< 0 > descriptor
std::shared_ptr< SuperLatticeF< T, descriptor > > fpop
std::shared_ptr< SuperF3D< T, T > > dObjectiveDcontrol
std::shared_ptr< SuperF3D< T, T > > referencePorosity
std::shared_ptr< SuperF3D< T, T > > referenceSolution
ReaderBase(std::shared_ptr< PARAMETERS > params_)
std::shared_ptr< PARAMETERS > params
void read(XMLreader const &xml)
void read(XMLreader const &xml)
Base struct for reading parameters from files.