Line data Source code
1 : /**********************************************************************/ 2 : /* DO NOT MODIFY THIS HEADER */ 3 : /* Swift, a Fourier spectral solver for MOOSE */ 4 : /* */ 5 : /* Copyright 2024 Battelle Energy Alliance, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /**********************************************************************/ 8 : 9 : #pragma once 10 : 11 : #include "TensorPostprocessor.h" 12 : 13 : /** 14 : * Compute the integral of a Tensor buffer 15 : */ 16 : class TensorInterfaceVelocityPostprocessor : public TensorPostprocessor 17 : { 18 : public: 19 : static InputParameters validParams(); 20 : 21 : TensorInterfaceVelocityPostprocessor(const InputParameters & parameters); 22 : 23 40 : virtual void initialize() override {} 24 : virtual void execute() override; 25 40 : virtual void finalize() override {} 26 : virtual PostprocessorValue getValue() const override; 27 : 28 : protected: 29 : const std::vector<torch::Tensor> & _u_old; 30 : unsigned int _dim; 31 : Real _velocity; 32 : 33 : /// imaginary unit i 34 : const torch::Tensor _i; 35 : 36 : const Real _gradient_threshold; 37 : };