25 #ifndef SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_GRID_H_ 26 #define SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_GRID_H_ 37 using Ptr = std::shared_ptr<FiniteDifferencesGrid>;
38 using UPtr = std::unique_ptr<FiniteDifferencesGrid>;
49 #ifdef MESSAGE_SUPPORT 50 void fromMessage(
const messages::FiniteDifferencesGrid& message, std::stringstream* issues);
51 void toMessage(messages::FiniteDifferencesGrid& message)
const;
53 void fromMessage(
const messages::DiscretizationGrid& message, std::stringstream* issues)
override 55 fromMessage(message.finite_differences_grid(), issues);
57 void toMessage(messages::DiscretizationGrid& message)
const override { toMessage(*message.mutable_finite_differences_grid()); }
70 #endif // SRC_OPTIMAL_CONTROL_INCLUDE_CORBO_OPTIMAL_CONTROL_STRUCTURED_OCP_DISCRETIZATION_GRIDS_FINITE_DIFFERENCES_GRID_H_
std::unique_ptr< DiscretizationGridInterface > UPtr
bool isDtFixedIntended() const override
#define FACTORY_REGISTER_DISCRETIZATION_GRID(type)
FiniteDifferencesGrid()=default
static Factory< DiscretizationGridInterface > & getFactory()
Get access to the associated factory.
void createEdges(NlpFunctions &nlp_fun, OptimizationEdgeSet &edges, SystemDynamicsInterface::Ptr dynamics) override
DiscretizationGridInterface::Ptr getInstance() const override
Return a newly created shared instance of the implemented class.
static Factory & instance()
< Retrieve static instance of the factory
std::shared_ptr< DiscretizationGridInterface > Ptr
std::shared_ptr< SystemDynamicsInterface > Ptr
virtual ~FiniteDifferencesGrid()=default