Line data Source code
1 : //* This file is part of SALAMANDER: Software for Advanced Large-scale Analysis of MAgnetic confinement for Numerical Design, Engineering & Research, 2 : //* A multiphysics application for modeling plasma facing components 3 : //* https://github.com/idaholab/salamander 4 : //* https://mooseframework.inl.gov/salamander 5 : //* 6 : //* SALAMANDER is powered by the MOOSE Framework 7 : //* https://www.mooseframework.inl.gov 8 : //* 9 : //* Licensed under LGPL 2.1, please see LICENSE for details 10 : //* https://www.gnu.org/licenses/lgpl-2.1.html 11 : //* 12 : //* Copyright 2025, Battelle Energy Alliance, LLC 13 : //* ALL RIGHTS RESERVED 14 : //* 15 : 16 : #pragma once 17 : #include "GeneralUserObject.h" 18 : // including ray for RayDataIndex 19 : #include "Ray.h" 20 : class PICStudyBase; 21 : 22 : class ParticleQuantityResidualAccumulatorBase : public GeneralUserObject 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : ParticleQuantityResidualAccumulatorBase(const InputParameters & params); 28 : 29 : /** 30 : * Unused methods 31 : */ 32 : ///@{ 33 1818 : virtual void initialize() override {} 34 1818 : virtual void finalize() override {} 35 : ///@} 36 : 37 : protected: 38 : /// the name of the variable which we are contributing to the residual of 39 : const NonlinearVariableName _var_name; 40 : /// the PIC study that is tracking all of our particles 41 : const PICStudyBase & _study; 42 : /// the ray data index where each of the velocity components are stored 43 : ///@{ 44 : const RayDataIndex _v_x_index; 45 : const RayDataIndex _v_y_index; 46 : const RayDataIndex _v_z_index; 47 : ///@} 48 : /// the ray data index where the weight of the particle is stored 49 : const RayDataIndex _weight_index; 50 : /// the ray data index where the charge of the particle is stored 51 : const RayDataIndex _charge_index; 52 : /// the ray data index where the mass of the particle is stored 53 : const RayDataIndex _mass_index; 54 : /// the ray data index where the species of the particle is stored 55 : const RayDataIndex _species_index; 56 : };