// Copyright 2025, ANSYS Inc. Unauthorized use, distribution or duplication is prohibited.
syntax = "proto3";
package ansys.api.discovery.v0.solution;


import "ansys/api/dbu/v0/dbumodels.proto";
import "google/protobuf/empty.proto";

option csharp_namespace = "Ansys.Api.Discovery.V0.Solution";

service Solution
{
  rpc GetSolverFidelity(SimulationStageRequest) returns (SolverFidelityResponse);
  rpc SetSolverFidelity(SolverFidelityRequest) returns (google.protobuf.Empty);
  rpc Solve(SolveExecutionRequest) returns (SolveExecutionResponse);
}

message SolverFidelityRequest{
  SimulationStageRequest simulation_stage = 1;
  double value = 2;
}

message SimulationStageRequest{
  ansys.api.dbu.v0.PhysicsEntityIdentifier simulation_id = 1;
  string stage = 2;
}

message SolverFidelityResponse{
  double value = 1;
}

message SolveExecutionRequest{
  ansys.api.dbu.v0.PhysicsEntityIdentifier simulation_id = 1;
  SolverManager solver_manager = 2;
  bool execute_remotely =3;
  repeated string variation_id_list = 4;
}

message SolveExecutionResponse{
  bool success = 1;
  string message = 2;
}

enum SolverManager {
  ARTEMIS= 0;
  APOLLO = 1;
}