Class ResponseEvaluator

Class Documentation

class ResponseEvaluator

A class used for evaluating responses by folding sources against adjoint solutions.

The workflow for this utility is constructed to minimize the file reading necessary for evaluations. To begin, one should add all adjoint solutions that are desired for response computations into the buffer. Then, one should define the different forward source configurations of interest in the input. With this, the user can now iterate over the source configurations in the input and convolve them against all available adjoint solutions in the buffer. For example,

buffers = {
      {
          buffer1,
          buffer2,
          ...,
          bufferN
      }
  }

  sources = {
      {
          source1,
          source2,
          ...,
          sourceM
      }
  }

  evaluator = lbs.ResponseEvaluator.Create({ lbs_solver_handle = phys })
  evaluator:AddResponseBuffers(buffers)

  responses = {}
  for i = 1, M do
      evaluator:ClearForwardSources()
      evaluator:AddResponseSources(sources[i])

      responses[i] = {}
      for j = 1, N do
          responses[i][buffer_name[j]] =
              evaluator:EvaluateResponse(buffer_name[j])
      end
  end

Public Functions

explicit ResponseEvaluator(const InputParameters &params)
void SetOptions(const InputParameters &params)
void SetBufferOptions(const InputParameters &input)
void SetSourceOptions(const InputParameters &input)
void SetMaterialSourceOptions(const InputParameters &params)
void SetBoundarySourceOptions(const InputParameters &params)
void ClearForwardSources()

Clear the existing forward sources from the response evaluator.

void AddResponseBuffers(const InputParameters &params)
void AddResponseSources(const InputParameters &params)
double EvaluateResponse(const std::string &buffer_name) const

Evaluate a response using the specified adjoint buffer with the currently defined sources in the solver.

Public Static Functions

static InputParameters GetOptionsBlock()
static InputParameters GetBufferOptionsBlock()
static InputParameters GetSourceOptionsBlock()
static InputParameters GetMaterialSourceOptionsBlock()
static InputParameters GetInputParameters()

Returns the input parameters for this object.

static std::shared_ptr<ResponseEvaluator> Create(const ParameterBlock &params)