Advanced Multi-Physics (AMP)
On-Line Documentation
NeutronicsRhs.h
Go to the documentation of this file.
1#ifndef included_AMP_NeutronicsRhs
2#define included_AMP_NeutronicsRhs
3
4#include "AMP/operators/Operator.h"
5#include "AMP/operators/OperatorParameters.h"
6#include "AMP/utils/Database.h"
7#include "AMP/vectors/Variable.h"
8
9#include <memory>
10#include <vector>
11
12namespace AMP::Operator {
13
14//===========================================================================//
19//===========================================================================//
20
21class NeutronicsRhs : public Operator
22{
23public:
26
27private:
28public:
29 explicit NeutronicsRhs( std::shared_ptr<OperatorParameters> parameters );
30
34 virtual ~NeutronicsRhs();
35
37 std::string type() const override { return "NeutronicsRhs"; }
38
42 void printClassData( std::ostream &os ) const;
43
49 void putToDatabase( std::shared_ptr<AMP::Database> db );
50
58
62 void reset( std::shared_ptr<const OperatorParameters> parameters ) override;
63
64 // static SP_HexGaussPointVariable createOutputVariable (const std::string & name, int varId =
65 // -1);
66
67 void setOutputVariableName( const std::string &name, int varId = -1 );
68
69 std::shared_ptr<AMP::LinearAlgebra::Variable> getOutputVariable() const override;
70
71 void setTimeStep( int tStep ) { d_timeStep = tStep; }
72 void setTimeInSeconds( double seconds );
73 void setTimeInDays( double days );
74
75protected:
76 /*
77 * Read input data from specified database and initialize class members.
78 * If run is from restart, a subset of the restart values may be replaced
79 * with those read from input.
80 *
81 * When assertion checking is active, the database pointer must be non-null.
82 */
83 void getFromInput( std::shared_ptr<AMP::Database> db );
84
85 std::shared_ptr<AMP::Database> d_db;
88 std::vector<double> d_timeStepsInDays;
90 std::vector<double> d_fixedValues;
93 std::shared_ptr<AMP::LinearAlgebra::Variable> d_outputVariable;
94 std::vector<std::vector<double>> d_values;
96 SourceType str2id( const std::string &str );
97};
98} // namespace AMP::Operator
99
100
101#endif
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
A class for representing the neutronics source operator.
std::shared_ptr< AMP::LinearAlgebra::Variable > d_outputVariable
void setOutputVariableName(const std::string &name, int varId=-1)
void reset(std::shared_ptr< const OperatorParameters > parameters) override
std::shared_ptr< AMP::LinearAlgebra::Variable > getOutputVariable() const override
Return the output variable.
void putToDatabase(std::shared_ptr< AMP::Database > db)
SourceType
Neutronics Input Types.
std::vector< double > d_fixedValues
std::vector< double > d_timeStepsInDays
std::vector< std::vector< double > > d_values
NeutronicsRhs(std::shared_ptr< OperatorParameters > parameters)
std::shared_ptr< AMP::Database > d_db
SourceType str2id(const std::string &str)
std::string type() const override
Return the name of the operator.
void printClassData(std::ostream &os) const
void setTimeInSeconds(double seconds)
void apply(AMP::LinearAlgebra::Vector::const_shared_ptr u, AMP::LinearAlgebra::Vector::shared_ptr f) override
void getFromInput(std::shared_ptr< AMP::Database > db)
void setTimeInDays(double days)
std::shared_ptr< AMP::Operator::Operator > shared_ptr
Definition Operator.h:29



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page