|
Philote-Cpp
C++ bindings for the Philote MDO standard
|
Client class for calling a remote implicit discipline. More...
#include <implicit.h>
Public Member Functions | |
| ImplicitClient ()=default | |
| Constructor. | |
| ~ImplicitClient () noexcept=default | |
| Destructor. | |
| void | ConnectChannel (std::shared_ptr< grpc::ChannelInterface > channel) |
| Connects the client stub to a gRPC channel. | |
| Variables | ComputeResiduals (const Variables &vars) |
| Calls the remote analysis server residuals evaluation via gRPC. | |
| Variables | SolveResiduals (const Variables &vars) |
| Calls the remote analysis server to solve via gRPC. | |
| Partials | ComputeResidualGradients (const Variables &vars) |
| Calls the remote analysis server gradient evaluation via gRPC. | |
| void | SetStub (std::unique_ptr< ImplicitService::StubInterface > stub) |
| Sets the stub for testing purposes (allows dependency injection) | |
Public Member Functions inherited from philote::DisciplineClient | |
| DisciplineClient () | |
| Construct a new Discipline Client object. | |
| void | ConnectChannel (const std::shared_ptr< grpc::ChannelInterface > &channel) |
| Connect to a gRPC channel. | |
| void | GetInfo () |
| Get the discipline info. | |
| void | SendStreamOptions () |
| Send the stream options to the server. | |
| void | SendOptions (const philote::DisciplineOptions &options) |
| Send the discipline options to the server. | |
| void | Setup () |
| Setup the discipline. | |
| void | GetVariableDefinitions () |
| Get the variable definitions from the server. | |
| void | GetPartialDefinitions () |
| Get the partial definitions from the server. | |
| std::vector< std::string > | GetVariableNames () |
| Get the variable names. | |
| VariableMetaData | GetVariableMeta (const std::string &name) |
| Get the variable meta data. | |
| std::vector< philote::PartialsMetaData > | GetPartialsMeta () |
| Get the partials meta data. | |
| void | SetStub (std::unique_ptr< philote::DisciplineService::StubInterface > stub) |
| Set the stub. | |
| const StreamOptions & | GetStreamOptions () const noexcept |
| Get the stream options. | |
| void | SetStreamOptions (const StreamOptions &options) |
| Set the stream options. | |
| const DisciplineProperties & | GetProperties () const noexcept |
| Get the discipline properties. | |
| void | SetProperties (const DisciplineProperties &props) |
| Set the discipline properties. | |
| const std::vector< VariableMetaData > & | GetVariableMetaAll () const noexcept |
| Get the variable metadata. | |
| void | SetVariableMeta (const std::vector< VariableMetaData > &meta) |
| Set the variable metadata. | |
| const std::vector< PartialsMetaData > & | GetPartialsMetaConst () const noexcept |
| Get the partials metadata (const version) | |
| void | SetPartialsMetaData (const std::vector< PartialsMetaData > &meta) |
| Set the partials metadata. | |
| void | SetRPCTimeout (std::chrono::milliseconds timeout) |
| Set the RPC timeout for all client operations. | |
| std::chrono::milliseconds | GetRPCTimeout () const noexcept |
| Get the current RPC timeout. | |
Client class for calling a remote implicit discipline.
This class may be inherited from or used by MDO framework developers. However, it is a fully functional Philote MDO client.
The ImplicitClient connects to a remote ImplicitDiscipline server via gRPC and provides methods to compute residuals, solve for outputs, and evaluate residual gradients.
|
default |
Constructor.
|
defaultnoexcept |
Destructor.
Calls the remote analysis server gradient evaluation via gRPC.
| vars | inputs and outputs for the discipline |
Calls the remote analysis server residuals evaluation via gRPC.
Unlike the analysis server, this function does not need to be overridden, as it contains all logic necessary to retrieve the remote function evaluation.
| vars | inputs and outputs for the discipline |
| void philote::ImplicitClient::ConnectChannel | ( | std::shared_ptr< grpc::ChannelInterface > | channel | ) |
Connects the client stub to a gRPC channel.
| channel |
|
inline |
Sets the stub for testing purposes (allows dependency injection)
| stub | The stub to inject |
Calls the remote analysis server to solve via gRPC.
Unlike the analysis server, this function does not need to be overridden, as it contains all logic necessary to retrieve the remote function evaluation.
| vars | inputs and outputs for the discipline |